render-core 1.3.69 → 1.3.70
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/index.d.ts +1 -0
- package/index.js +4 -0
- package/library/props/PropertyLib.d.ts +6 -0
- package/library/props/PropertyLib.js +5 -0
- package/package.json +1 -1
- package/runtime/TagProcessor.js +12 -19
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -70,9 +70,13 @@ var RenderJS = /** @class */ (function (_super) {
|
|
|
70
70
|
this.registerElements("changeStyle", changeStyle);
|
|
71
71
|
//注册函数
|
|
72
72
|
this.registerElements("changeTheme", changeTheme);
|
|
73
|
+
//初始化
|
|
74
|
+
this.init();
|
|
73
75
|
//execute
|
|
74
76
|
render(this);
|
|
75
77
|
};
|
|
78
|
+
RenderJS.prototype.init = function () {
|
|
79
|
+
};
|
|
76
80
|
return RenderJS;
|
|
77
81
|
}(AbstractRenderJS));
|
|
78
82
|
export { RenderJS };
|
package/package.json
CHANGED
package/runtime/TagProcessor.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Component } from "render-refer";
|
|
2
1
|
/**
|
|
3
2
|
* This function is used to save the prototype component proto in the window object.
|
|
4
3
|
* So, you can hava a tip that we custom a property named 'tagLib' in the window object.
|
|
@@ -6,29 +5,23 @@ import { Component } from "render-refer";
|
|
|
6
5
|
* @param component
|
|
7
6
|
*/
|
|
8
7
|
export function registerTagLib(application, component) {
|
|
9
|
-
|
|
10
|
-
if (component instanceof Component) {
|
|
11
|
-
if (!application.tagLib.has(component.getName().toUpperCase())) {
|
|
12
|
-
application.tagLib.set(component.getName().toUpperCase(), component);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
else if (Array.isArray(component)) {
|
|
8
|
+
if (Array.isArray(component)) {
|
|
19
9
|
//if the input parameter is an array of Component,do the code block.
|
|
20
10
|
component.forEach(function (component) {
|
|
21
|
-
if (component
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
|
|
27
|
-
}
|
|
11
|
+
if (!application.tagLib.has(component.getName().toUpperCase())) {
|
|
12
|
+
application.tagLib.set(component.getName().toUpperCase(), component);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
|
|
28
16
|
}
|
|
29
17
|
});
|
|
30
18
|
}
|
|
31
19
|
else {
|
|
32
|
-
|
|
20
|
+
if (!application.tagLib.has(component.getName().toUpperCase())) {
|
|
21
|
+
application.tagLib.set(component.getName().toUpperCase(), component);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
|
|
25
|
+
}
|
|
33
26
|
}
|
|
34
27
|
}
|