@dolphinweex/weex-vue-render 0.2.33 → 0.2.34
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/dist/index.common.js +21 -0
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -10483,6 +10483,13 @@ var dom = {
|
|
|
10483
10483
|
var styleText = "@" + key + "{" + stylesText + "}";
|
|
10484
10484
|
styleText = styleText.replace('local://', 'arkweb://');
|
|
10485
10485
|
appendCss(styleText, 'dom-added-rules');
|
|
10486
|
+
|
|
10487
|
+
// 记录添加过的字体资源
|
|
10488
|
+
weex.requireModule("weexModule").callNative('fontsHandle', {
|
|
10489
|
+
method: 'addRule',
|
|
10490
|
+
key,
|
|
10491
|
+
styles,
|
|
10492
|
+
}, undefined, undefined, undefined);
|
|
10486
10493
|
}
|
|
10487
10494
|
};
|
|
10488
10495
|
var dom$1 = {
|
|
@@ -10490,6 +10497,20 @@ var dom$1 = {
|
|
|
10490
10497
|
var extendKeys = weex.utils.extendKeys;
|
|
10491
10498
|
extendKeys(utils$3, weex.utils, ['camelToKebab', 'appendCss', 'isArray', 'getParentScrollerElement']);
|
|
10492
10499
|
weex.registerModule('dom', dom);
|
|
10500
|
+
|
|
10501
|
+
// 在二级页面自动加载之前添加过的主题
|
|
10502
|
+
if (!global.addRuleFirst) {
|
|
10503
|
+
global.addRuleFirst = true
|
|
10504
|
+
weex.requireModule("weexModule").callNative('fontsHandle', {
|
|
10505
|
+
method: 'getRules'
|
|
10506
|
+
}, undefined, function(rules){
|
|
10507
|
+
if (rules && Array.isArray(rules)) {
|
|
10508
|
+
rules.forEach(rule=>{
|
|
10509
|
+
dom.addRule(rule.key, rule.styles);
|
|
10510
|
+
})
|
|
10511
|
+
}
|
|
10512
|
+
}, undefined);
|
|
10513
|
+
}
|
|
10493
10514
|
}
|
|
10494
10515
|
};
|
|
10495
10516
|
|
package/package.json
CHANGED