render-core 1.0.6 → 1.0.8
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/core/utility/styleUtility.js +2 -2
- package/index.js +5 -3
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ export function themeStyle(component, styleLib) {
|
|
|
17
17
|
var styles = dom.getElementsByTagName("template")[0].content.querySelectorAll("style");
|
|
18
18
|
var kk = new Map();
|
|
19
19
|
for (var i = 0; i < styles.length; i++) {
|
|
20
|
-
kk.set(styles[i].getAttribute("theme"), styles[i].
|
|
20
|
+
kk.set(styles[i].getAttribute("theme"), styles[i].innerText);
|
|
21
21
|
}
|
|
22
|
-
styleLib.set(component.getName(), kk);
|
|
22
|
+
styleLib.set(component.getName().toUpperCase(), kk);
|
|
23
23
|
}
|
package/index.js
CHANGED
|
@@ -63,11 +63,13 @@ var RenderJS = /** @class */ (function () {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
RenderJS.prototype.render = function () {
|
|
66
|
+
//保存全局tagLib对象
|
|
66
67
|
Reflect.set(window, "tagLib", this.tagLib);
|
|
68
|
+
//获取styleLib对象
|
|
67
69
|
var styleLib = new Map();
|
|
68
|
-
|
|
69
|
-
themeStyle(
|
|
70
|
-
}
|
|
70
|
+
this.tagLib.forEach(function (component) {
|
|
71
|
+
themeStyle(component, styleLib);
|
|
72
|
+
});
|
|
71
73
|
Reflect.set(window, "styleLib", styleLib);
|
|
72
74
|
renderHtml(document.body.children, this.page);
|
|
73
75
|
};
|