render-core 1.3.38 → 1.3.40
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/class/component/component.d.ts +41 -41
- package/class/component/component.js +108 -108
- package/class/controller/appController.d.ts +17 -44
- package/class/controller/appController.js +25 -132
- package/class/controller/componentController.d.ts +15 -15
- package/class/controller/componentController.js +22 -22
- package/class/controller/pageController.d.ts +23 -23
- package/class/controller/pageController.js +40 -40
- package/class/tips/appTip.d.ts +2 -2
- package/class/tips/appTip.js +1 -1
- package/class/tips/componentTip.d.ts +13 -13
- package/class/tips/componentTip.js +1 -1
- package/class/tips/renderTip.d.ts +3 -5
- package/class/tips/renderTip.js +1 -1
- package/core/cmd/data/v-el.d.ts +8 -8
- package/core/cmd/data/v-el.js +28 -28
- package/core/cmd/data/v-html.d.ts +8 -8
- package/core/cmd/data/v-html.js +26 -26
- package/core/cmd/data/v-txt.d.ts +8 -8
- package/core/cmd/data/v-txt.js +29 -29
- package/core/cmd/justify/v-if.d.ts +6 -6
- package/core/cmd/justify/v-if.js +43 -43
- package/core/cmd/justify/v-render.d.ts +6 -6
- package/core/cmd/justify/v-render.js +26 -26
- package/core/cmd/justify/v-show.d.ts +6 -6
- package/core/cmd/justify/v-show.js +26 -26
- package/core/cmd/justify/v-switch.d.ts +6 -6
- package/core/cmd/justify/v-switch.js +35 -35
- package/core/cmd/loop/v-for.d.ts +12 -12
- package/core/cmd/loop/v-for.js +63 -63
- package/core/cmd/loop/v-index.d.ts +14 -14
- package/core/cmd/loop/v-index.js +80 -79
- package/core/cmd/loop/v-key.d.ts +12 -12
- package/core/cmd/loop/v-key.js +70 -70
- package/core/cmd/method/v-on.d.ts +8 -8
- package/core/cmd/method/v-on.js +40 -40
- package/core/cmd/property/v-bind.d.ts +6 -6
- package/core/cmd/property/v-bind.js +33 -33
- package/core/cmd/react/v-model.d.ts +6 -6
- package/core/cmd/react/v-model.js +22 -22
- package/core/cmd/ref/v-ref.d.ts +6 -6
- package/core/cmd/ref/v-ref.js +16 -16
- package/core/cmd/solt/v-solt.d.ts +14 -14
- package/core/cmd/solt/v-solt.js +46 -46
- package/core/inject/inject.d.ts +30 -35
- package/core/inject/inject.js +63 -70
- package/core/lifecycle/afterMethods.d.ts +16 -16
- package/core/lifecycle/afterMethods.js +22 -22
- package/core/lifecycle/controllerCycle.d.ts +13 -13
- package/core/lifecycle/controllerCycle.js +42 -42
- package/core/lifecycle/mount.d.ts +16 -17
- package/core/lifecycle/mount.js +31 -34
- package/core/loader/loader.d.ts +7 -7
- package/core/loader/loader.js +18 -18
- package/core/proxy/getProxy.d.ts +13 -13
- package/core/proxy/getProxy.js +42 -42
- package/core/render/PostRender.d.ts +12 -12
- package/core/render/PostRender.js +42 -45
- package/core/render/delivery.d.ts +5 -5
- package/core/render/delivery.js +42 -42
- package/core/render/initRender.d.ts +12 -12
- package/core/render/initRender.js +39 -41
- package/core/render/partRender.d.ts +15 -15
- package/core/render/partRender.js +31 -31
- package/core/render/rawRender.d.ts +12 -12
- package/core/render/rawRender.js +43 -45
- package/core/render/updateRender.d.ts +6 -6
- package/core/render/updateRender.js +29 -32
- package/core/resolver/props.d.ts +18 -18
- package/core/resolver/props.js +60 -60
- package/core/resolver/query.d.ts +4 -4
- package/core/resolver/query.js +15 -15
- package/core/utility/checkUtility.d.ts +1 -1
- package/core/utility/checkUtility.js +4 -4
- package/core/utility/cmdUtility.d.ts +16 -16
- package/core/utility/cmdUtility.js +57 -57
- package/core/utility/dataUtility.d.ts +1 -1
- package/core/utility/dataUtility.js +8 -8
- package/core/utility/errorUtility.d.ts +3 -3
- package/core/utility/errorUtility.js +9 -9
- package/core/utility/injectUtility.d.ts +13 -13
- package/core/utility/injectUtility.js +58 -58
- package/core/utility/inputType.d.ts +5 -5
- package/core/utility/inputType.js +20 -20
- package/core/utility/inputUtility.d.ts +4 -4
- package/core/utility/inputUtility.js +100 -100
- package/core/utility/miscUtility.d.ts +6 -6
- package/core/utility/miscUtility.js +12 -12
- package/core/utility/modelUtility.d.ts +15 -15
- package/core/utility/modelUtility.js +66 -66
- package/core/utility/sectionUtility.d.ts +6 -6
- package/core/utility/sectionUtility.js +104 -104
- package/core/utility/styleUtility.d.ts +17 -29
- package/core/utility/styleUtility.js +67 -114
- package/core/utility/templateUtility.d.ts +6 -6
- package/core/utility/templateUtility.js +13 -13
- package/core/utility/vForUtility.d.ts +15 -15
- package/core/utility/vForUtility.js +20 -20
- package/http/redirect/redirect.d.ts +11 -11
- package/http/redirect/redirect.js +36 -36
- package/index.d.ts +44 -71
- package/index.js +70 -130
- package/package.json +3 -8
- package/runtime/metaTagLib.d.ts +2 -2
- package/runtime/metaTagLib.js +27 -27
- package/runtime/runtime.d.ts +7 -7
- package/runtime/runtime.js +26 -26
- package/runtime/tools.d.ts +14 -14
- package/runtime/tools.js +43 -49
- package/README.md +0 -2
- package/class/controller/contextController.d.ts +0 -18
- package/class/controller/contextController.js +0 -79
- package/func/Theme.d.ts +0 -16
- package/func/Theme.js +0 -27
- package/status/read/read.d.ts +0 -10
- package/status/read/read.js +0 -26
- package/status/write/write.d.ts +0 -12
- package/status/write/write.js +0 -92
|
@@ -1,41 +1,41 @@
|
|
|
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
|
+
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,108 +1,108 @@
|
|
|
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;
|
|
23
|
-
}
|
|
24
|
-
//添加数据
|
|
25
|
-
if (typeof config.props === "undefined") {
|
|
26
|
-
this.props = [];
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
this.props = config.props;
|
|
30
|
-
}
|
|
31
|
-
//添加数据
|
|
32
|
-
if (typeof config.data === "undefined") {
|
|
33
|
-
this.data = {};
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this.data = config.data;
|
|
37
|
-
}
|
|
38
|
-
//添加计算属性
|
|
39
|
-
if (typeof config.computed === "undefined") {
|
|
40
|
-
this.computed = {};
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
this.computed = config.computed;
|
|
44
|
-
}
|
|
45
|
-
//添加方法属性
|
|
46
|
-
if (typeof config.methods === "undefined") {
|
|
47
|
-
this.methods = {};
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
this.methods = config.methods;
|
|
51
|
-
}
|
|
52
|
-
//添加监控属性
|
|
53
|
-
if (typeof config.watcher === "undefined") {
|
|
54
|
-
this.watcher = {};
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this.watcher = config.watcher;
|
|
58
|
-
}
|
|
59
|
-
//生命周期函数
|
|
60
|
-
if (typeof config.beforeRender === "undefined") {
|
|
61
|
-
this.beforeRender = function () { };
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
this.beforeRender = config.beforeRender;
|
|
65
|
-
}
|
|
66
|
-
if (typeof config.afterRender === "undefined") {
|
|
67
|
-
this.afterRender = function () { };
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
this.afterRender = config.afterRender;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
Component.prototype.getName = function () {
|
|
74
|
-
return this.name;
|
|
75
|
-
};
|
|
76
|
-
Component.prototype.getTemplate = function () {
|
|
77
|
-
return this.template;
|
|
78
|
-
};
|
|
79
|
-
Component.prototype.getMode = function () {
|
|
80
|
-
return this.mode;
|
|
81
|
-
};
|
|
82
|
-
Component.prototype.getBoxStyle = function () {
|
|
83
|
-
return this.boxStyle;
|
|
84
|
-
};
|
|
85
|
-
Component.prototype.getProps = function () {
|
|
86
|
-
return this.props;
|
|
87
|
-
};
|
|
88
|
-
Component.prototype.getData = function () {
|
|
89
|
-
return this.data;
|
|
90
|
-
};
|
|
91
|
-
Component.prototype.getMethods = function () {
|
|
92
|
-
return this.methods;
|
|
93
|
-
};
|
|
94
|
-
Component.prototype.getComputed = function () {
|
|
95
|
-
return this.computed;
|
|
96
|
-
};
|
|
97
|
-
Component.prototype.getWatcher = function () {
|
|
98
|
-
return this.watcher;
|
|
99
|
-
};
|
|
100
|
-
Component.prototype.getBeforeRender = function () {
|
|
101
|
-
return this.beforeRender;
|
|
102
|
-
};
|
|
103
|
-
Component.prototype.getAfterRender = function () {
|
|
104
|
-
return this.afterRender;
|
|
105
|
-
};
|
|
106
|
-
return Component;
|
|
107
|
-
}());
|
|
108
|
-
export { Component };
|
|
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;
|
|
23
|
+
}
|
|
24
|
+
//添加数据
|
|
25
|
+
if (typeof config.props === "undefined") {
|
|
26
|
+
this.props = [];
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this.props = config.props;
|
|
30
|
+
}
|
|
31
|
+
//添加数据
|
|
32
|
+
if (typeof config.data === "undefined") {
|
|
33
|
+
this.data = {};
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.data = config.data;
|
|
37
|
+
}
|
|
38
|
+
//添加计算属性
|
|
39
|
+
if (typeof config.computed === "undefined") {
|
|
40
|
+
this.computed = {};
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.computed = config.computed;
|
|
44
|
+
}
|
|
45
|
+
//添加方法属性
|
|
46
|
+
if (typeof config.methods === "undefined") {
|
|
47
|
+
this.methods = {};
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.methods = config.methods;
|
|
51
|
+
}
|
|
52
|
+
//添加监控属性
|
|
53
|
+
if (typeof config.watcher === "undefined") {
|
|
54
|
+
this.watcher = {};
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.watcher = config.watcher;
|
|
58
|
+
}
|
|
59
|
+
//生命周期函数
|
|
60
|
+
if (typeof config.beforeRender === "undefined") {
|
|
61
|
+
this.beforeRender = function () { };
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
this.beforeRender = config.beforeRender;
|
|
65
|
+
}
|
|
66
|
+
if (typeof config.afterRender === "undefined") {
|
|
67
|
+
this.afterRender = function () { };
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.afterRender = config.afterRender;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
Component.prototype.getName = function () {
|
|
74
|
+
return this.name;
|
|
75
|
+
};
|
|
76
|
+
Component.prototype.getTemplate = function () {
|
|
77
|
+
return this.template;
|
|
78
|
+
};
|
|
79
|
+
Component.prototype.getMode = function () {
|
|
80
|
+
return this.mode;
|
|
81
|
+
};
|
|
82
|
+
Component.prototype.getBoxStyle = function () {
|
|
83
|
+
return this.boxStyle;
|
|
84
|
+
};
|
|
85
|
+
Component.prototype.getProps = function () {
|
|
86
|
+
return this.props;
|
|
87
|
+
};
|
|
88
|
+
Component.prototype.getData = function () {
|
|
89
|
+
return this.data;
|
|
90
|
+
};
|
|
91
|
+
Component.prototype.getMethods = function () {
|
|
92
|
+
return this.methods;
|
|
93
|
+
};
|
|
94
|
+
Component.prototype.getComputed = function () {
|
|
95
|
+
return this.computed;
|
|
96
|
+
};
|
|
97
|
+
Component.prototype.getWatcher = function () {
|
|
98
|
+
return this.watcher;
|
|
99
|
+
};
|
|
100
|
+
Component.prototype.getBeforeRender = function () {
|
|
101
|
+
return this.beforeRender;
|
|
102
|
+
};
|
|
103
|
+
Component.prototype.getAfterRender = function () {
|
|
104
|
+
return this.afterRender;
|
|
105
|
+
};
|
|
106
|
+
return Component;
|
|
107
|
+
}());
|
|
108
|
+
export { Component };
|
|
@@ -1,44 +1,17 @@
|
|
|
1
|
-
import { AppTip } from "../tips/appTip";
|
|
2
|
-
/**
|
|
3
|
-
* This class is associated with localStorage.
|
|
4
|
-
*/
|
|
5
|
-
export declare class AppController implements AppTip {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* store fields
|
|
20
|
-
*/
|
|
21
|
-
storeFields(): void;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param field
|
|
25
|
-
* @param value
|
|
26
|
-
*/
|
|
27
|
-
setField(field: string, value: any): void;
|
|
28
|
-
/**
|
|
29
|
-
* 获取数据
|
|
30
|
-
* @param field
|
|
31
|
-
*/
|
|
32
|
-
getField(field: string): any;
|
|
33
|
-
/**
|
|
34
|
-
* 资源定向
|
|
35
|
-
* @param url
|
|
36
|
-
* @param parameters
|
|
37
|
-
*/
|
|
38
|
-
redirect(url: string, parameters: {}): void;
|
|
39
|
-
/**
|
|
40
|
-
* 位置定位
|
|
41
|
-
* @param position
|
|
42
|
-
*/
|
|
43
|
-
locate(position: string): void;
|
|
44
|
-
}
|
|
1
|
+
import { AppTip } from "../tips/appTip";
|
|
2
|
+
/**
|
|
3
|
+
* This class is associated with localStorage.
|
|
4
|
+
*/
|
|
5
|
+
export declare class AppController implements AppTip {
|
|
6
|
+
/**
|
|
7
|
+
* 资源定向
|
|
8
|
+
* @param url
|
|
9
|
+
* @param parameters
|
|
10
|
+
*/
|
|
11
|
+
redirect(url: string, parameters: {}): void;
|
|
12
|
+
/**
|
|
13
|
+
* 位置定位
|
|
14
|
+
* @param position
|
|
15
|
+
*/
|
|
16
|
+
locate(position: string): void;
|
|
17
|
+
}
|
|
@@ -1,132 +1,25 @@
|
|
|
1
|
-
import { locate, redirect } from "../../http/redirect/redirect";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* This method is used to add custom data.
|
|
30
|
-
* @param fields
|
|
31
|
-
*/
|
|
32
|
-
AppController.prototype.saveFields = function (fields) {
|
|
33
|
-
for (var fieldsKey in fields) {
|
|
34
|
-
if (Reflect.has(this.fields, fieldsKey)) {
|
|
35
|
-
console.log("This filed is a system filed, please have a new name for the filed:" + fieldsKey);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
Reflect.set(this.fields, fieldsKey, fields[fieldsKey]);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* 更新数据
|
|
44
|
-
* @private
|
|
45
|
-
*/
|
|
46
|
-
AppController.prototype.loadFields = function () {
|
|
47
|
-
for (var fieldsKey in this.fields) {
|
|
48
|
-
if (this.fields[fieldsKey].react) {
|
|
49
|
-
if (status_read({
|
|
50
|
-
type: "local",
|
|
51
|
-
fields: [fieldsKey]
|
|
52
|
-
})[fieldsKey]) {
|
|
53
|
-
this.fields[fieldsKey].data = status_read({
|
|
54
|
-
type: "local",
|
|
55
|
-
fields: [fieldsKey]
|
|
56
|
-
})[fieldsKey]["data"];
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (this.fields[fieldsKey].push) {
|
|
60
|
-
// @ts-ignore
|
|
61
|
-
this.fields[fieldsKey].callback(this.fields[fieldsKey]["data"], window.context);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* store fields
|
|
67
|
-
*/
|
|
68
|
-
AppController.prototype.storeFields = function () {
|
|
69
|
-
for (var fieldsKey in this.fields) {
|
|
70
|
-
if (!status_read({
|
|
71
|
-
type: "local",
|
|
72
|
-
fields: [fieldsKey]
|
|
73
|
-
})[fieldsKey]) {
|
|
74
|
-
var data = {};
|
|
75
|
-
Reflect.set(data, fieldsKey, {
|
|
76
|
-
data: this.fields[fieldsKey]["data"]
|
|
77
|
-
});
|
|
78
|
-
status_write({
|
|
79
|
-
type: "local",
|
|
80
|
-
fields: data
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
* @param field
|
|
88
|
-
* @param value
|
|
89
|
-
*/
|
|
90
|
-
AppController.prototype.setField = function (field, value) {
|
|
91
|
-
var data = {};
|
|
92
|
-
Reflect.set(data, field, {
|
|
93
|
-
data: value
|
|
94
|
-
});
|
|
95
|
-
//写入数
|
|
96
|
-
status_write({
|
|
97
|
-
type: "local",
|
|
98
|
-
fields: data
|
|
99
|
-
});
|
|
100
|
-
//更新数据
|
|
101
|
-
this.loadFields();
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* 获取数据
|
|
105
|
-
* @param field
|
|
106
|
-
*/
|
|
107
|
-
AppController.prototype.getField = function (field) {
|
|
108
|
-
if (this.fields[field]) {
|
|
109
|
-
return this.fields[field].data;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* 资源定向
|
|
117
|
-
* @param url
|
|
118
|
-
* @param parameters
|
|
119
|
-
*/
|
|
120
|
-
AppController.prototype.redirect = function (url, parameters) {
|
|
121
|
-
redirect(url, parameters);
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* 位置定位
|
|
125
|
-
* @param position
|
|
126
|
-
*/
|
|
127
|
-
AppController.prototype.locate = function (position) {
|
|
128
|
-
locate(position);
|
|
129
|
-
};
|
|
130
|
-
return AppController;
|
|
131
|
-
}());
|
|
132
|
-
export { AppController };
|
|
1
|
+
import { locate, redirect } from "../../http/redirect/redirect";
|
|
2
|
+
/**
|
|
3
|
+
* This class is associated with localStorage.
|
|
4
|
+
*/
|
|
5
|
+
var AppController = /** @class */ (function () {
|
|
6
|
+
function AppController() {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 资源定向
|
|
10
|
+
* @param url
|
|
11
|
+
* @param parameters
|
|
12
|
+
*/
|
|
13
|
+
AppController.prototype.redirect = function (url, parameters) {
|
|
14
|
+
redirect(url, parameters);
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* 位置定位
|
|
18
|
+
* @param position
|
|
19
|
+
*/
|
|
20
|
+
AppController.prototype.locate = function (position) {
|
|
21
|
+
locate(position);
|
|
22
|
+
};
|
|
23
|
+
return AppController;
|
|
24
|
+
}());
|
|
25
|
+
export { AppController };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Component } from "../component/component";
|
|
2
|
-
export declare class ComponentController {
|
|
3
|
-
root: ParentNode;
|
|
4
|
-
proto: Component;
|
|
5
|
-
mode: string;
|
|
6
|
-
solt: Map<string, any>;
|
|
7
|
-
link: Map<string, {}>;
|
|
8
|
-
to: ComponentController[];
|
|
9
|
-
raw_data: {};
|
|
10
|
-
proxyForMethods: {};
|
|
11
|
-
computed: {};
|
|
12
|
-
watcher: {};
|
|
13
|
-
constructor();
|
|
14
|
-
receiver(method: string, ...args: any[]): any;
|
|
15
|
-
}
|
|
1
|
+
import { Component } from "../component/component";
|
|
2
|
+
export declare class ComponentController {
|
|
3
|
+
root: ParentNode;
|
|
4
|
+
proto: Component;
|
|
5
|
+
mode: string;
|
|
6
|
+
solt: Map<string, any>;
|
|
7
|
+
link: Map<string, {}>;
|
|
8
|
+
to: ComponentController[];
|
|
9
|
+
raw_data: {};
|
|
10
|
+
proxyForMethods: {};
|
|
11
|
+
computed: {};
|
|
12
|
+
watcher: {};
|
|
13
|
+
constructor();
|
|
14
|
+
receiver(method: string, ...args: any[]): any;
|
|
15
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var ComponentController = /** @class */ (function () {
|
|
2
|
-
//构造函数
|
|
3
|
-
function ComponentController() {
|
|
4
|
-
this.link = new Map();
|
|
5
|
-
this.to = Array();
|
|
6
|
-
this.raw_data = {};
|
|
7
|
-
this.solt = new Map();
|
|
8
|
-
this.computed = {};
|
|
9
|
-
this.watcher = {};
|
|
10
|
-
this.mode = "box";
|
|
11
|
-
}
|
|
12
|
-
//接收器
|
|
13
|
-
ComponentController.prototype.receiver = function (method) {
|
|
14
|
-
var args = [];
|
|
15
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
16
|
-
args[_i - 1] = arguments[_i];
|
|
17
|
-
}
|
|
18
|
-
return this.proto.getMethods()[method].apply(this.proxyForMethods, args);
|
|
19
|
-
};
|
|
20
|
-
return ComponentController;
|
|
21
|
-
}());
|
|
22
|
-
export { ComponentController };
|
|
1
|
+
var ComponentController = /** @class */ (function () {
|
|
2
|
+
//构造函数
|
|
3
|
+
function ComponentController() {
|
|
4
|
+
this.link = new Map();
|
|
5
|
+
this.to = Array();
|
|
6
|
+
this.raw_data = {};
|
|
7
|
+
this.solt = new Map();
|
|
8
|
+
this.computed = {};
|
|
9
|
+
this.watcher = {};
|
|
10
|
+
this.mode = "box";
|
|
11
|
+
}
|
|
12
|
+
//接收器
|
|
13
|
+
ComponentController.prototype.receiver = function (method) {
|
|
14
|
+
var args = [];
|
|
15
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
16
|
+
args[_i - 1] = arguments[_i];
|
|
17
|
+
}
|
|
18
|
+
return this.proto.getMethods()[method].apply(this.proxyForMethods, args);
|
|
19
|
+
};
|
|
20
|
+
return ComponentController;
|
|
21
|
+
}());
|
|
22
|
+
export { ComponentController };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ComponentController } from "./componentController";
|
|
2
|
-
export declare class PageController {
|
|
3
|
-
private methods;
|
|
4
|
-
private currentTag;
|
|
5
|
-
solt: Map<string, any>;
|
|
6
|
-
raw_data: {};
|
|
7
|
-
proxyForMethods: {};
|
|
8
|
-
to: ComponentController[];
|
|
9
|
-
link: Map<string, {}>;
|
|
10
|
-
constructor();
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @param method
|
|
14
|
-
* @param args
|
|
15
|
-
*/
|
|
16
|
-
receiver(method: string, ...args: any[]): void;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param element
|
|
20
|
-
*/
|
|
21
|
-
set crtTag(element: Element);
|
|
22
|
-
get crtTag(): Element;
|
|
23
|
-
}
|
|
1
|
+
import { ComponentController } from "./componentController";
|
|
2
|
+
export declare class PageController {
|
|
3
|
+
private methods;
|
|
4
|
+
private currentTag;
|
|
5
|
+
solt: Map<string, any>;
|
|
6
|
+
raw_data: {};
|
|
7
|
+
proxyForMethods: {};
|
|
8
|
+
to: ComponentController[];
|
|
9
|
+
link: Map<string, {}>;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param method
|
|
14
|
+
* @param args
|
|
15
|
+
*/
|
|
16
|
+
receiver(method: string, ...args: any[]): void;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param element
|
|
20
|
+
*/
|
|
21
|
+
set crtTag(element: Element);
|
|
22
|
+
get crtTag(): Element;
|
|
23
|
+
}
|