tencent.jquery.pix.component 1.0.88-beta1 → 1.0.88-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/change.md +4 -0
- package/package.json +1 -1
- package/utils/utils.js +6 -3
package/change.md
CHANGED
package/package.json
CHANGED
package/utils/utils.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { $ } from "../components/config";
|
|
2
2
|
|
|
3
|
-
let fontSize = -1;
|
|
4
3
|
|
|
5
4
|
// 获取字体大小
|
|
6
5
|
export const getFontSize = () => {
|
|
@@ -8,9 +7,13 @@ export const getFontSize = () => {
|
|
|
8
7
|
if (htmlFontSize) {
|
|
9
8
|
return htmlFontSize;
|
|
10
9
|
}
|
|
10
|
+
let fontSize = 0;
|
|
11
11
|
const baseFontSize = 16; // 默认根元素字体大小
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
fontSize = parseFloat($(document.body).css("font-size").replace('px', ''));
|
|
14
|
+
|
|
15
|
+
if(fontSize){
|
|
16
|
+
return fontSize;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
if(!fontSize) {
|