uview-plus 3.4.64 → 3.4.65
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/changelog.md +3 -0
- package/components/u-icon/u-icon.vue +3 -1
- package/components/u-icon/util.js +10 -20
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import config from '../../libs/config/config';
|
|
2
|
-
// 定义高阶函数
|
|
3
|
-
function once(fn) {
|
|
4
|
-
let called = false;
|
|
5
|
-
let result;
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// 使用高阶函数
|
|
17
|
-
const loadFont = once(() => {
|
|
18
|
-
// console.log('这个函数只能执行一次');
|
|
3
|
+
let params = {
|
|
4
|
+
loaded: false
|
|
5
|
+
};
|
|
6
|
+
// 加载字体方法
|
|
7
|
+
const loadFont = () => {
|
|
8
|
+
// console.log('加载字体图标');
|
|
9
|
+
params.loaded = true;
|
|
19
10
|
// #ifdef APP-NVUE
|
|
20
11
|
// nvue通过weex的dom模块引入字体,相关文档地址如下:
|
|
21
12
|
// https://weex.apache.org/zh/docs/modules/dom.html#addrule
|
|
@@ -66,10 +57,9 @@ const loadFont = once(() => {
|
|
|
66
57
|
// }
|
|
67
58
|
// #endif
|
|
68
59
|
return true;
|
|
69
|
-
}
|
|
60
|
+
};
|
|
70
61
|
|
|
71
|
-
|
|
62
|
+
export default {
|
|
63
|
+
params: params,
|
|
72
64
|
loadFont
|
|
73
65
|
}
|
|
74
|
-
|
|
75
|
-
export default fontUtil
|
package/package.json
CHANGED