wujingjing
2024-07-26 bcff2cf9253145d0dd4b36daed70a12ecbd2ff54
src/utils/util.ts
@@ -704,6 +704,7 @@
};
export function getTextWidth(text: string, option: GetTextWidthOption) {
   if (!text) return 0;
   const { size = '14px', family = 'Microsoft YaHei' } = option;
   const spanEle = document.createElement('span');
   document.body.appendChild(spanEle);