render-core 1.3.68 → 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 CHANGED
@@ -30,6 +30,7 @@ export declare class RenderJS extends AbstractRenderJS implements RenderGeneric
30
30
  * @return void
31
31
  */
32
32
  run(): void;
33
+ init(): void;
33
34
  }
34
35
  /**
35
36
  * Inject element to the window environment.
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 };
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ STRING: string;
3
+ NUMBER: string;
4
+ BOOLEAN: string;
5
+ };
6
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default {
2
+ STRING: 'string',
3
+ NUMBER: 'number',
4
+ BOOLEAN: 'boolean',
5
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.3.68",
3
+ "version": "1.3.70",
4
4
  "description": "The extendable javascript web framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -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,16 +5,7 @@ import { Component } from "render-refer";
6
5
  * @param component
7
6
  */
8
7
  export function registerTagLib(application, component) {
9
- //if the input parameter is an instance of Component,do the code block.
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 {
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
11
  if (!application.tagLib.has(component.getName().toUpperCase())) {
@@ -26,4 +16,12 @@ export function registerTagLib(application, component) {
26
16
  }
27
17
  });
28
18
  }
19
+ else {
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
+ }
26
+ }
29
27
  }