Browse Source

Merge pull request #208774 in DEC/fineui from master to feature/x

* commit '8114b75e2da64f336528d236de315a22bec28e38':
  auto upgrade version to 2.0.20221124203811
  无JIRA feat: 加个方法 BI.getMinimumFontSize() 获取当前最小字体设置
  无JIRA feat: 加个方法 BI.getMinimumFontSize() 获取当前最小字体设置
master
superman 2 years ago
parent
commit
ba0b6025f7
  1. 2
      package.json
  2. 9
      src/core/platform/web/function.js

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20221123105406",
"version": "2.0.20221124203811",
"description": "fineui",
"main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts",

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

@ -137,5 +137,14 @@ BI._.extend(BI, {
return version[1] * 1;
}
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 parseInt(size);
}
});

Loading…
Cancel
Save