Browse Source

无JIRA feat: 加个方法 BI.getMinimumFontSize() 获取当前最小字体设置

es6
zsmj 2 years ago
parent
commit
ce6b828d92
  1. 9
      src/core/platform/web/function.js

9
src/core/platform/web/function.js

@ -137,5 +137,14 @@ BI._.extend(BI, {
return version[1] * 1; return version[1] * 1;
} }
return 0; return 0;
},
getMinimumFontSize: function () {
const el = document.createElement('div');
el.style.fontSize = "0px";
document.body.appendChild(el);
const size = getComputedStyle(el).fontSize;
el.remove();
return size;
} }
}); });

Loading…
Cancel
Save