render-core 1.3.63 → 1.3.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/core/cmd/data/v-el.d.ts +1 -1
- package/core/cmd/data/v-html.d.ts +1 -1
- package/core/cmd/data/v-txt.d.ts +1 -1
- package/core/cmd/solt/v-solt.d.ts +2 -2
- package/core/inject/inject.d.ts +2 -2
- package/core/lifecycle/afterMethods.d.ts +2 -2
- package/core/lifecycle/controllerCycle.d.ts +3 -3
- package/core/lifecycle/mount.d.ts +2 -2
- package/core/proxy/getProxy.d.ts +1 -1
- package/core/render/PostRender.d.ts +3 -3
- package/core/render/PostRender.js +1 -1
- package/core/render/delivery.d.ts +3 -3
- package/core/render/initRender.d.ts +3 -3
- package/core/render/initRender.js +1 -1
- package/core/render/rawRender.d.ts +3 -3
- package/core/render/rawRender.js +1 -1
- package/core/render/updateRender.d.ts +1 -1
- package/core/utility/cmdUtility.d.ts +2 -2
- package/core/utility/injectUtility.d.ts +2 -2
- package/core/utility/inputType.d.ts +1 -1
- package/core/utility/sectionUtility.d.ts +1 -1
- package/core/utility/styleUtility.d.ts +1 -1
- package/core/utility/templateUtility.d.ts +1 -1
- package/http/{redirect/redirect.d.ts → Http.d.ts} +1 -1
- package/http/{redirect/redirect.js → Http.js} +1 -1
- package/http/generic/HttpGeneric.d.ts +0 -0
- package/http/generic/HttpGeneric.js +0 -0
- package/index.d.ts +9 -19
- package/index.js +34 -26
- package/lib/generic/RenderGeneric.d.ts +5 -0
- package/{class/controller/appController.d.ts → lib/proto/controller/AppController.d.ts} +2 -2
- package/{class/controller/appController.js → lib/proto/controller/AppController.js} +4 -4
- package/{class/component/componentController.d.ts → lib/proto/controller/ComponentController.d.ts} +1 -1
- package/{class/controller/pageController.d.ts → lib/proto/controller/PageController.d.ts} +1 -1
- package/package.json +26 -16
- package/runtime/runtime.d.ts +1 -1
- package/runtime/tools.d.ts +2 -2
- package/runtime/tools.js +2 -2
- package/class/component/component.d.ts +0 -41
- package/class/component/component.js +0 -111
- package/class/tips/componentTip.d.ts +0 -13
- package/class/tips/renderTip.d.ts +0 -4
- package/class/tips/renderTip.js +0 -1
- /package/{class/tips/componentTip.js → lib/generic/RenderGeneric.js} +0 -0
- /package/{class/component/componentController.js → lib/proto/controller/ComponentController.js} +0 -0
- /package/{class/controller/pageController.js → lib/proto/controller/PageController.js} +0 -0
package/core/cmd/data/v-el.d.ts
CHANGED
package/core/cmd/data/v-txt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentController } from "../../../
|
|
2
|
-
import { PageController } from "../../../
|
|
1
|
+
import { ComponentController } from "../../../lib/proto/controller/ComponentController";
|
|
2
|
+
import { PageController } from "../../../lib/proto/controller/PageController";
|
|
3
3
|
/**
|
|
4
4
|
* 此函数用于解析自定义元素solt
|
|
5
5
|
* @param tagTemplate
|
package/core/inject/inject.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
2
|
-
import { Component } from "
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
|
+
import { Component } from "render-refer";
|
|
3
3
|
/**
|
|
4
4
|
* 向raw_data中注入props和Query
|
|
5
5
|
* @param controller
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
2
|
-
import { PageController } from "../../
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
|
+
import { PageController } from "../../lib/proto/controller/PageController";
|
|
3
3
|
/**
|
|
4
4
|
* 该函数用于处理渲染后操作
|
|
5
5
|
* @param controller
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
2
|
-
import { Component } from "../../
|
|
3
|
-
import { PageController } from "../../
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
|
+
import { Component } from "../../lib/proto/component";
|
|
3
|
+
import { PageController } from "../../lib/proto/controller/PageController";
|
|
4
4
|
/**
|
|
5
5
|
* This function is used to initiate the component controller object.
|
|
6
6
|
* @param controller
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
2
|
-
import { Component } from "../../
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
|
+
import { Component } from "../../lib/proto/component";
|
|
3
3
|
/**
|
|
4
4
|
* This function is used to mount the dom to the html document.
|
|
5
5
|
* @param controller
|
package/core/proxy/getProxy.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component } from "../../
|
|
2
|
-
import { ComponentController } from "../../
|
|
3
|
-
import { PageController } from "../../
|
|
1
|
+
import { Component } from "../../lib/proto/component";
|
|
2
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
3
|
+
import { PageController } from "../../lib/proto/controller/PageController";
|
|
4
4
|
/**
|
|
5
5
|
* 该函数用于初次渲染需要记录状态的组件
|
|
6
6
|
* @param proto
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
2
|
import { controllerCycleTypeTwo } from "../lifecycle/controllerCycle";
|
|
3
3
|
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
4
|
import { mount, unBox } from "../lifecycle/mount";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
2
|
-
import { Component } from "../../
|
|
3
|
-
import { PageController } from "../../
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
|
+
import { Component } from "../../lib/proto/component";
|
|
3
|
+
import { PageController } from "../../lib/proto/controller/PageController";
|
|
4
4
|
export declare function Render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController): void;
|
|
5
5
|
export declare function findComponent(collection: HTMLCollection, link: ComponentController | PageController): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component } from "../../
|
|
2
|
-
import { ComponentController } from "../../
|
|
3
|
-
import { PageController } from "../../
|
|
1
|
+
import { Component } from "../../lib/proto/component";
|
|
2
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
3
|
+
import { PageController } from "../../lib/proto/controller/PageController";
|
|
4
4
|
/**
|
|
5
5
|
* 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
|
|
6
6
|
* @param proto
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
2
|
import { controllerCycleTypeOne } from "../lifecycle/controllerCycle";
|
|
3
3
|
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
4
|
import { mount, unBox } from "../lifecycle/mount";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component } from "../../
|
|
2
|
-
import { ComponentController } from "../../
|
|
3
|
-
import { PageController } from "../../
|
|
1
|
+
import { Component } from "../../lib/proto/component";
|
|
2
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
3
|
+
import { PageController } from "../../lib/proto/controller/PageController";
|
|
4
4
|
/**
|
|
5
5
|
* 该函数用于渲染不需要记录状态的组件
|
|
6
6
|
* @param proto
|
package/core/render/rawRender.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
2
|
import { controllerCycleTypeTwo } from "../lifecycle/controllerCycle";
|
|
3
3
|
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
4
|
import { mount, unBox } from "../lifecycle/mount";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Component } from "../../
|
|
2
|
-
import { ComponentController } from "../../
|
|
1
|
+
import { Component } from "../../lib/proto/component";
|
|
2
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
3
3
|
/**
|
|
4
4
|
* This function is used to resolver those commands which should be executed before mount.
|
|
5
5
|
* @param tagTemplate
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
2
|
-
import { PageController } from "../../
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
|
+
import { PageController } from "../../lib/proto/controller/PageController";
|
|
3
3
|
export declare function getCodeSpaceForProps(data: {}, $props: Map<string, object>): void;
|
|
4
4
|
export declare function getCodeSpaceForQuery(data: {}, $query: Map<string, any>): void;
|
|
5
5
|
export declare function getCodeSpaceForRef(data: {}, $ref: Map<string, Element>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../
|
|
1
|
+
import { ComponentController } from "../../lib/proto/controller/ComponentController";
|
|
2
2
|
export declare function textType(target: any, doc: any, controller: ComponentController): void;
|
|
3
3
|
export declare function assignType(target: any, doc: any, controller: ComponentController): void;
|
|
4
4
|
export declare function fileType(target: any, doc: any, controller: ComponentController): void;
|
|
File without changes
|
|
File without changes
|
package/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { PageController } from "./lib/proto/controller/PageController";
|
|
2
|
+
import { AbstractRenderJS, Component } from "render-refer";
|
|
3
|
+
import { PluginGeneric } from "render-refer/generic/PluginGeneric";
|
|
4
|
+
import { RenderGeneric } from "./lib/generic/RenderGeneric";
|
|
4
5
|
/**
|
|
5
|
-
* This
|
|
6
|
+
* This proto is the application proto.
|
|
6
7
|
*/
|
|
7
|
-
export declare class RenderJS implements
|
|
8
|
+
export declare class RenderJS extends AbstractRenderJS implements RenderGeneric {
|
|
8
9
|
readonly tagLib: Map<string, Component>;
|
|
9
10
|
readonly styleLib: Map<string, Map<string, string>>;
|
|
10
11
|
private readonly application;
|
|
@@ -12,9 +13,8 @@ export declare class RenderJS implements RenderTip {
|
|
|
12
13
|
constructor();
|
|
13
14
|
/**
|
|
14
15
|
* This func is the plugin entry to third vendor
|
|
15
|
-
* @param callable
|
|
16
16
|
*/
|
|
17
|
-
use(
|
|
17
|
+
use(plugin: PluginGeneric): void;
|
|
18
18
|
/**
|
|
19
19
|
* You can use the method to register your single component or an array of components.
|
|
20
20
|
* @param component
|
|
@@ -22,22 +22,12 @@ export declare class RenderJS implements RenderTip {
|
|
|
22
22
|
addTag(component: Component | Component[]): void;
|
|
23
23
|
/**
|
|
24
24
|
* mount some base object
|
|
25
|
+
* @return void
|
|
25
26
|
*/
|
|
26
27
|
private mount;
|
|
27
28
|
/**
|
|
28
29
|
* This method is the booster method of the render.
|
|
30
|
+
* @return void
|
|
29
31
|
*/
|
|
30
32
|
run(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Use the func to register some tool-functions to the windows object.
|
|
33
|
-
* @param name
|
|
34
|
-
* @param func
|
|
35
|
-
*/
|
|
36
|
-
registerElements(name: string, func: any): void;
|
|
37
33
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Use the func to register some tool-functions to the windows object.
|
|
40
|
-
* @param name
|
|
41
|
-
* @param func
|
|
42
|
-
*/
|
|
43
|
-
export declare function registerElements(name: string, func: any): void;
|
package/index.js
CHANGED
|
@@ -1,27 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { PageController } from "./lib/proto/controller/PageController";
|
|
2
17
|
import { registerTagLib, render } from "./runtime/tools";
|
|
3
|
-
import { AppController } from "./class/controller/appController";
|
|
4
18
|
import { changeStyle, changeTheme } from "./core/utility/styleUtility";
|
|
19
|
+
import { AppController } from "./lib/proto/controller/AppController";
|
|
20
|
+
import { AbstractRenderJS } from "render-refer";
|
|
5
21
|
/**
|
|
6
|
-
* This
|
|
22
|
+
* This proto is the application proto.
|
|
7
23
|
*/
|
|
8
|
-
var RenderJS = /** @class */ (function () {
|
|
24
|
+
var RenderJS = /** @class */ (function (_super) {
|
|
25
|
+
__extends(RenderJS, _super);
|
|
9
26
|
function RenderJS() {
|
|
27
|
+
var _this = _super.call(this) || this;
|
|
10
28
|
//initiate the tagLib object
|
|
11
|
-
|
|
29
|
+
_this.tagLib = new Map();
|
|
12
30
|
//initiate the styleLib object
|
|
13
|
-
|
|
31
|
+
_this.styleLib = new Map();
|
|
14
32
|
//initiate the application controller
|
|
15
|
-
|
|
33
|
+
_this.application = new AppController();
|
|
16
34
|
//initiate the page controller
|
|
17
|
-
|
|
35
|
+
_this.page = new PageController();
|
|
36
|
+
return _this;
|
|
18
37
|
}
|
|
19
38
|
/**
|
|
20
39
|
* This func is the plugin entry to third vendor
|
|
21
|
-
* @param callable
|
|
22
40
|
*/
|
|
23
|
-
RenderJS.prototype.use = function (
|
|
24
|
-
|
|
41
|
+
RenderJS.prototype.use = function (plugin) {
|
|
42
|
+
plugin.plugin(this);
|
|
25
43
|
};
|
|
26
44
|
/**
|
|
27
45
|
* You can use the method to register your single component or an array of components.
|
|
@@ -32,6 +50,7 @@ var RenderJS = /** @class */ (function () {
|
|
|
32
50
|
};
|
|
33
51
|
/**
|
|
34
52
|
* mount some base object
|
|
53
|
+
* @return void
|
|
35
54
|
*/
|
|
36
55
|
RenderJS.prototype.mount = function () {
|
|
37
56
|
Reflect.set(window, "tagLib", this.tagLib);
|
|
@@ -41,6 +60,7 @@ var RenderJS = /** @class */ (function () {
|
|
|
41
60
|
};
|
|
42
61
|
/**
|
|
43
62
|
* This method is the booster method of the render.
|
|
63
|
+
* @return void
|
|
44
64
|
*/
|
|
45
65
|
RenderJS.prototype.run = function () {
|
|
46
66
|
//挂载对象
|
|
@@ -49,29 +69,17 @@ var RenderJS = /** @class */ (function () {
|
|
|
49
69
|
this.registerElements("changeStyle", changeStyle);
|
|
50
70
|
//注册函数
|
|
51
71
|
this.registerElements("changeTheme", changeTheme);
|
|
52
|
-
//plugin
|
|
53
|
-
this.use(function (render) {
|
|
54
|
-
sessionStorage.setItem("theme_style", "default");
|
|
55
|
-
});
|
|
56
72
|
//execute
|
|
57
73
|
render(this);
|
|
58
74
|
};
|
|
59
|
-
/**
|
|
60
|
-
* Use the func to register some tool-functions to the windows object.
|
|
61
|
-
* @param name
|
|
62
|
-
* @param func
|
|
63
|
-
*/
|
|
64
|
-
RenderJS.prototype.registerElements = function (name, func) {
|
|
65
|
-
Reflect.set(window, name, func);
|
|
66
|
-
};
|
|
67
75
|
return RenderJS;
|
|
68
|
-
}());
|
|
76
|
+
}(AbstractRenderJS));
|
|
69
77
|
export { RenderJS };
|
|
70
78
|
/**
|
|
71
|
-
*
|
|
79
|
+
* Inject element to the window environment.
|
|
72
80
|
* @param name
|
|
73
81
|
* @param func
|
|
74
82
|
*/
|
|
75
|
-
|
|
83
|
+
function registerElements(name, func) {
|
|
76
84
|
Reflect.set(window, name, func);
|
|
77
85
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { relocate, redirect } from "../../../http/Http";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
* This proto is associated with localStorage.
|
|
4
|
+
*/
|
|
5
5
|
var AppController = /** @class */ (function () {
|
|
6
6
|
function AppController() {
|
|
7
7
|
}
|
|
@@ -18,7 +18,7 @@ var AppController = /** @class */ (function () {
|
|
|
18
18
|
* @param position
|
|
19
19
|
*/
|
|
20
20
|
AppController.prototype.locate = function (position) {
|
|
21
|
-
|
|
21
|
+
relocate(position);
|
|
22
22
|
};
|
|
23
23
|
return AppController;
|
|
24
24
|
}());
|
package/package.json
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "render-core",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "The extendable javascript web framework",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.d.ts",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
},
|
|
15
|
-
"
|
|
16
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "render-core",
|
|
3
|
+
"version": "1.3.65",
|
|
4
|
+
"description": "The extendable javascript web framework",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com//render-js/render-core.git"
|
|
14
|
+
},
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "mutian-xiangcai",
|
|
17
|
+
"email": "mutian_xiangcai@outlook.com"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"render-refer": "0.0.7"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"typescript": "^5.8.3"
|
|
25
|
+
}
|
|
26
|
+
}
|
package/runtime/runtime.d.ts
CHANGED
package/runtime/tools.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Component } from "../class/component/component";
|
|
2
1
|
import { RenderJS } from "../index";
|
|
2
|
+
import { Component } from "render-refer";
|
|
3
3
|
/**
|
|
4
|
-
* This function is used to save the prototype component
|
|
4
|
+
* This function is used to save the prototype component proto in the window object.
|
|
5
5
|
* So, you can hava a tip that we custom a property named 'tagLib' in the window object.
|
|
6
6
|
* @param application
|
|
7
7
|
* @param component
|
package/runtime/tools.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Component } from "../class/component/component";
|
|
2
1
|
import { themeStyle } from "../core/utility/styleUtility";
|
|
3
2
|
import { renderHtml } from "./runtime";
|
|
3
|
+
import { Component } from "render-refer";
|
|
4
4
|
/**
|
|
5
|
-
* This function is used to save the prototype component
|
|
5
|
+
* This function is used to save the prototype component proto in the window object.
|
|
6
6
|
* So, you can hava a tip that we custom a property named 'tagLib' in the window object.
|
|
7
7
|
* @param application
|
|
8
8
|
* @param component
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { RenderBase } from "../tips/componentTip";
|
|
2
|
-
/**
|
|
3
|
-
* This is the component class.
|
|
4
|
-
*/
|
|
5
|
-
export declare class Component implements RenderBase {
|
|
6
|
-
private readonly name;
|
|
7
|
-
private readonly template;
|
|
8
|
-
private readonly mode;
|
|
9
|
-
private readonly boxStyle?;
|
|
10
|
-
private readonly props?;
|
|
11
|
-
private readonly data?;
|
|
12
|
-
private readonly methods?;
|
|
13
|
-
private readonly computed?;
|
|
14
|
-
private readonly watcher?;
|
|
15
|
-
private readonly beforeRender?;
|
|
16
|
-
private readonly afterRender?;
|
|
17
|
-
constructor(config: {
|
|
18
|
-
name: string;
|
|
19
|
-
template: string;
|
|
20
|
-
mode?: string;
|
|
21
|
-
boxStyle?: string;
|
|
22
|
-
props?: {} | string[];
|
|
23
|
-
data?: {};
|
|
24
|
-
computed?: {};
|
|
25
|
-
methods?: {};
|
|
26
|
-
watcher?: {};
|
|
27
|
-
beforeRender?: () => void;
|
|
28
|
-
afterRender?: () => void;
|
|
29
|
-
});
|
|
30
|
-
getName(): string;
|
|
31
|
-
getTemplate(): string;
|
|
32
|
-
getMode(): string;
|
|
33
|
-
getBoxStyle(): string;
|
|
34
|
-
getProps(): {};
|
|
35
|
-
getData(): {};
|
|
36
|
-
getMethods(): {};
|
|
37
|
-
getComputed(): {};
|
|
38
|
-
getWatcher(): {};
|
|
39
|
-
getBeforeRender(): () => void;
|
|
40
|
-
getAfterRender(): () => void;
|
|
41
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is the component class.
|
|
3
|
-
*/
|
|
4
|
-
var Component = /** @class */ (function () {
|
|
5
|
-
function Component(config) {
|
|
6
|
-
//标签名称
|
|
7
|
-
this.name = config.name;
|
|
8
|
-
//标签模板样式
|
|
9
|
-
this.template = config.template;
|
|
10
|
-
//添加box样式
|
|
11
|
-
if (typeof config.mode === "undefined") {
|
|
12
|
-
this.mode = "box";
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
this.mode = config.mode;
|
|
16
|
-
}
|
|
17
|
-
//添加box样式
|
|
18
|
-
if (typeof config.boxStyle === "undefined") {
|
|
19
|
-
this.boxStyle = "";
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
this.boxStyle = config.boxStyle.replace(/^{/, "");
|
|
23
|
-
this.boxStyle = this.boxStyle.replace(/}$/, "");
|
|
24
|
-
this.boxStyle = this.boxStyle.replace(/\n/, "");
|
|
25
|
-
this.boxStyle = this.boxStyle.trim();
|
|
26
|
-
}
|
|
27
|
-
//props validate
|
|
28
|
-
if (typeof config.props === "undefined") {
|
|
29
|
-
this.props = [];
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
this.props = config.props;
|
|
33
|
-
}
|
|
34
|
-
//添加数据
|
|
35
|
-
if (typeof config.data === "undefined") {
|
|
36
|
-
this.data = {};
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
this.data = config.data;
|
|
40
|
-
}
|
|
41
|
-
//添加计算属性
|
|
42
|
-
if (typeof config.computed === "undefined") {
|
|
43
|
-
this.computed = {};
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
this.computed = config.computed;
|
|
47
|
-
}
|
|
48
|
-
//添加方法属性
|
|
49
|
-
if (typeof config.methods === "undefined") {
|
|
50
|
-
this.methods = {};
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
this.methods = config.methods;
|
|
54
|
-
}
|
|
55
|
-
//添加监控属性
|
|
56
|
-
if (typeof config.watcher === "undefined") {
|
|
57
|
-
this.watcher = {};
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
this.watcher = config.watcher;
|
|
61
|
-
}
|
|
62
|
-
//生命周期函数
|
|
63
|
-
if (typeof config.beforeRender === "undefined") {
|
|
64
|
-
this.beforeRender = function () { };
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
this.beforeRender = config.beforeRender;
|
|
68
|
-
}
|
|
69
|
-
if (typeof config.afterRender === "undefined") {
|
|
70
|
-
this.afterRender = function () { };
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
this.afterRender = config.afterRender;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
Component.prototype.getName = function () {
|
|
77
|
-
return this.name;
|
|
78
|
-
};
|
|
79
|
-
Component.prototype.getTemplate = function () {
|
|
80
|
-
return this.template;
|
|
81
|
-
};
|
|
82
|
-
Component.prototype.getMode = function () {
|
|
83
|
-
return this.mode;
|
|
84
|
-
};
|
|
85
|
-
Component.prototype.getBoxStyle = function () {
|
|
86
|
-
return this.boxStyle;
|
|
87
|
-
};
|
|
88
|
-
Component.prototype.getProps = function () {
|
|
89
|
-
return this.props;
|
|
90
|
-
};
|
|
91
|
-
Component.prototype.getData = function () {
|
|
92
|
-
return this.data;
|
|
93
|
-
};
|
|
94
|
-
Component.prototype.getMethods = function () {
|
|
95
|
-
return this.methods;
|
|
96
|
-
};
|
|
97
|
-
Component.prototype.getComputed = function () {
|
|
98
|
-
return this.computed;
|
|
99
|
-
};
|
|
100
|
-
Component.prototype.getWatcher = function () {
|
|
101
|
-
return this.watcher;
|
|
102
|
-
};
|
|
103
|
-
Component.prototype.getBeforeRender = function () {
|
|
104
|
-
return this.beforeRender;
|
|
105
|
-
};
|
|
106
|
-
Component.prototype.getAfterRender = function () {
|
|
107
|
-
return this.afterRender;
|
|
108
|
-
};
|
|
109
|
-
return Component;
|
|
110
|
-
}());
|
|
111
|
-
export { Component };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface RenderBase {
|
|
2
|
-
getName(): string;
|
|
3
|
-
getTemplate(): string;
|
|
4
|
-
getMode(): string;
|
|
5
|
-
getBoxStyle(): string;
|
|
6
|
-
getProps(): {};
|
|
7
|
-
getData(): {};
|
|
8
|
-
getComputed(): {};
|
|
9
|
-
getMethods(): {};
|
|
10
|
-
getWatcher(): {};
|
|
11
|
-
getBeforeRender(): () => void;
|
|
12
|
-
getAfterRender(): () => void;
|
|
13
|
-
}
|
package/class/tips/renderTip.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
/package/{class/component/componentController.js → lib/proto/controller/ComponentController.js}
RENAMED
|
File without changes
|
|
File without changes
|