render-core 1.3.37 → 1.3.39
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 +44 -44
- package/class/controller/appController.js +132 -132
- package/class/controller/componentController.d.ts +15 -15
- package/class/controller/componentController.js +22 -22
- package/class/controller/contextController.d.ts +18 -18
- package/class/controller/contextController.js +79 -79
- 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 +5 -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 -78
- 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 +29 -29
- package/core/utility/styleUtility.js +114 -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/func/Theme.d.ts +16 -16
- package/func/Theme.js +27 -27
- package/http/redirect/redirect.d.ts +11 -11
- package/http/redirect/redirect.js +36 -36
- package/index.d.ts +71 -71
- package/index.js +130 -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 +49 -49
- package/status/read/read.d.ts +10 -10
- package/status/read/read.js +26 -26
- package/status/write/write.d.ts +12 -12
- package/status/write/write.js +92 -92
- package/README.md +0 -2
|
@@ -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,18 +1,18 @@
|
|
|
1
|
-
export declare class ContextController {
|
|
2
|
-
private readonly fields;
|
|
3
|
-
constructor();
|
|
4
|
-
saveFields(fields: {}): void;
|
|
5
|
-
loadFields(): void;
|
|
6
|
-
storeFields(): void;
|
|
7
|
-
/**
|
|
8
|
-
* 写入数据
|
|
9
|
-
* @param field
|
|
10
|
-
* @param value
|
|
11
|
-
*/
|
|
12
|
-
setField(field: string, value: any): void;
|
|
13
|
-
/**
|
|
14
|
-
* 获取数据
|
|
15
|
-
* @param field
|
|
16
|
-
*/
|
|
17
|
-
getField(field: string): any;
|
|
18
|
-
}
|
|
1
|
+
export declare class ContextController {
|
|
2
|
+
private readonly fields;
|
|
3
|
+
constructor();
|
|
4
|
+
saveFields(fields: {}): void;
|
|
5
|
+
loadFields(): void;
|
|
6
|
+
storeFields(): void;
|
|
7
|
+
/**
|
|
8
|
+
* 写入数据
|
|
9
|
+
* @param field
|
|
10
|
+
* @param value
|
|
11
|
+
*/
|
|
12
|
+
setField(field: string, value: any): void;
|
|
13
|
+
/**
|
|
14
|
+
* 获取数据
|
|
15
|
+
* @param field
|
|
16
|
+
*/
|
|
17
|
+
getField(field: string): any;
|
|
18
|
+
}
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { status_read, status_write } from "../../index";
|
|
2
|
-
var ContextController = /** @class */ (function () {
|
|
3
|
-
function ContextController() {
|
|
4
|
-
this.fields = {};
|
|
5
|
-
}
|
|
6
|
-
ContextController.prototype.saveFields = function (fields) {
|
|
7
|
-
for (var fieldsKey in fields) {
|
|
8
|
-
if (Reflect.has(this.fields, fieldsKey)) {
|
|
9
|
-
console.log("This field is a system field, please have a new name for the field:" + fieldsKey);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
Reflect.set(this.fields, fieldsKey, fields[fieldsKey]);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
ContextController.prototype.loadFields = function () {
|
|
17
|
-
for (var fieldsKey in this.fields) {
|
|
18
|
-
if (this.fields[fieldsKey].react) {
|
|
19
|
-
if (status_read({
|
|
20
|
-
type: "session",
|
|
21
|
-
fields: [fieldsKey]
|
|
22
|
-
})[fieldsKey]) {
|
|
23
|
-
this.fields[fieldsKey].data = status_read({
|
|
24
|
-
type: "session",
|
|
25
|
-
fields: [fieldsKey]
|
|
26
|
-
})[fieldsKey]["data"];
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (this.fields[fieldsKey].down) {
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
this.fields[fieldsKey].callback(this.fields[fieldsKey]["data"], window.appSite);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
ContextController.prototype.storeFields = function () {
|
|
36
|
-
for (var fieldsKey in this.fields) {
|
|
37
|
-
var data = {};
|
|
38
|
-
Reflect.set(data, fieldsKey, {
|
|
39
|
-
data: this.fields[fieldsKey]["data"]
|
|
40
|
-
});
|
|
41
|
-
status_write({
|
|
42
|
-
type: "session",
|
|
43
|
-
fields: data
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* 写入数据
|
|
49
|
-
* @param field
|
|
50
|
-
* @param value
|
|
51
|
-
*/
|
|
52
|
-
ContextController.prototype.setField = function (field, value) {
|
|
53
|
-
var data = {};
|
|
54
|
-
Reflect.set(data, field, {
|
|
55
|
-
data: value
|
|
56
|
-
});
|
|
57
|
-
//写入数据
|
|
58
|
-
status_write({
|
|
59
|
-
type: "session",
|
|
60
|
-
fields: data
|
|
61
|
-
});
|
|
62
|
-
//更新数据
|
|
63
|
-
this.loadFields();
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* 获取数据
|
|
67
|
-
* @param field
|
|
68
|
-
*/
|
|
69
|
-
ContextController.prototype.getField = function (field) {
|
|
70
|
-
if (this.fields[field]) {
|
|
71
|
-
return this.fields[field].data;
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
return ContextController;
|
|
78
|
-
}());
|
|
79
|
-
export { ContextController };
|
|
1
|
+
import { status_read, status_write } from "../../index";
|
|
2
|
+
var ContextController = /** @class */ (function () {
|
|
3
|
+
function ContextController() {
|
|
4
|
+
this.fields = {};
|
|
5
|
+
}
|
|
6
|
+
ContextController.prototype.saveFields = function (fields) {
|
|
7
|
+
for (var fieldsKey in fields) {
|
|
8
|
+
if (Reflect.has(this.fields, fieldsKey)) {
|
|
9
|
+
console.log("This field is a system field, please have a new name for the field:" + fieldsKey);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
Reflect.set(this.fields, fieldsKey, fields[fieldsKey]);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
ContextController.prototype.loadFields = function () {
|
|
17
|
+
for (var fieldsKey in this.fields) {
|
|
18
|
+
if (this.fields[fieldsKey].react) {
|
|
19
|
+
if (status_read({
|
|
20
|
+
type: "session",
|
|
21
|
+
fields: [fieldsKey]
|
|
22
|
+
})[fieldsKey]) {
|
|
23
|
+
this.fields[fieldsKey].data = status_read({
|
|
24
|
+
type: "session",
|
|
25
|
+
fields: [fieldsKey]
|
|
26
|
+
})[fieldsKey]["data"];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (this.fields[fieldsKey].down) {
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
this.fields[fieldsKey].callback(this.fields[fieldsKey]["data"], window.appSite);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
ContextController.prototype.storeFields = function () {
|
|
36
|
+
for (var fieldsKey in this.fields) {
|
|
37
|
+
var data = {};
|
|
38
|
+
Reflect.set(data, fieldsKey, {
|
|
39
|
+
data: this.fields[fieldsKey]["data"]
|
|
40
|
+
});
|
|
41
|
+
status_write({
|
|
42
|
+
type: "session",
|
|
43
|
+
fields: data
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 写入数据
|
|
49
|
+
* @param field
|
|
50
|
+
* @param value
|
|
51
|
+
*/
|
|
52
|
+
ContextController.prototype.setField = function (field, value) {
|
|
53
|
+
var data = {};
|
|
54
|
+
Reflect.set(data, field, {
|
|
55
|
+
data: value
|
|
56
|
+
});
|
|
57
|
+
//写入数据
|
|
58
|
+
status_write({
|
|
59
|
+
type: "session",
|
|
60
|
+
fields: data
|
|
61
|
+
});
|
|
62
|
+
//更新数据
|
|
63
|
+
this.loadFields();
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* 获取数据
|
|
67
|
+
* @param field
|
|
68
|
+
*/
|
|
69
|
+
ContextController.prototype.getField = function (field) {
|
|
70
|
+
if (this.fields[field]) {
|
|
71
|
+
return this.fields[field].data;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
return ContextController;
|
|
78
|
+
}());
|
|
79
|
+
export { ContextController };
|
|
@@ -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
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
var PageController = /** @class */ (function () {
|
|
2
|
-
//构造函数
|
|
3
|
-
function PageController() {
|
|
4
|
-
//注入系统方法
|
|
5
|
-
this.methods = Reflect.get(window, "pageMethods");
|
|
6
|
-
this.link = new Map();
|
|
7
|
-
this.to = Array();
|
|
8
|
-
this.crtTag = null;
|
|
9
|
-
this.solt = new Map();
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @param method
|
|
14
|
-
* @param args
|
|
15
|
-
*/
|
|
16
|
-
PageController.prototype.receiver = function (method) {
|
|
17
|
-
var args = [];
|
|
18
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
19
|
-
args[_i - 1] = arguments[_i];
|
|
20
|
-
}
|
|
21
|
-
Reflect.get(window, method).call(window, args);
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(PageController.prototype, "crtTag", {
|
|
24
|
-
//返回当前页面的渲染元素
|
|
25
|
-
get: function () {
|
|
26
|
-
return this.currentTag;
|
|
27
|
-
},
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @param element
|
|
31
|
-
*/
|
|
32
|
-
set: function (element) {
|
|
33
|
-
this.currentTag = element;
|
|
34
|
-
},
|
|
35
|
-
enumerable: false,
|
|
36
|
-
configurable: true
|
|
37
|
-
});
|
|
38
|
-
return PageController;
|
|
39
|
-
}());
|
|
40
|
-
export { PageController };
|
|
1
|
+
var PageController = /** @class */ (function () {
|
|
2
|
+
//构造函数
|
|
3
|
+
function PageController() {
|
|
4
|
+
//注入系统方法
|
|
5
|
+
this.methods = Reflect.get(window, "pageMethods");
|
|
6
|
+
this.link = new Map();
|
|
7
|
+
this.to = Array();
|
|
8
|
+
this.crtTag = null;
|
|
9
|
+
this.solt = new Map();
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param method
|
|
14
|
+
* @param args
|
|
15
|
+
*/
|
|
16
|
+
PageController.prototype.receiver = function (method) {
|
|
17
|
+
var args = [];
|
|
18
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
19
|
+
args[_i - 1] = arguments[_i];
|
|
20
|
+
}
|
|
21
|
+
Reflect.get(window, method).call(window, args);
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(PageController.prototype, "crtTag", {
|
|
24
|
+
//返回当前页面的渲染元素
|
|
25
|
+
get: function () {
|
|
26
|
+
return this.currentTag;
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param element
|
|
31
|
+
*/
|
|
32
|
+
set: function (element) {
|
|
33
|
+
this.currentTag = element;
|
|
34
|
+
},
|
|
35
|
+
enumerable: false,
|
|
36
|
+
configurable: true
|
|
37
|
+
});
|
|
38
|
+
return PageController;
|
|
39
|
+
}());
|
|
40
|
+
export { PageController };
|
package/class/tips/appTip.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export interface AppTip {
|
|
2
|
-
}
|
|
1
|
+
export interface AppTip {
|
|
2
|
+
}
|
package/class/tips/appTip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
-
}
|
|
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface RenderTip {
|
|
2
|
-
use(callable: any): void;
|
|
3
|
-
configApp(config: {}): void;
|
|
4
|
-
configContext(config: {}): void;
|
|
5
|
-
}
|
|
1
|
+
export interface RenderTip {
|
|
2
|
+
use(callable: any): void;
|
|
3
|
+
configApp(config: {}): void;
|
|
4
|
+
configContext(config: {}): void;
|
|
5
|
+
}
|
package/class/tips/renderTip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/core/cmd/data/v-el.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentController } from "../../../class/controller/componentController";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param node
|
|
5
|
-
* @param data
|
|
6
|
-
* @param controller
|
|
7
|
-
*/
|
|
8
|
-
export declare function resolver_experssion(node: ParentNode, data: {}, controller: ComponentController): void;
|
|
1
|
+
import { ComponentController } from "../../../class/controller/componentController";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param node
|
|
5
|
+
* @param data
|
|
6
|
+
* @param controller
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolver_experssion(node: ParentNode, data: {}, controller: ComponentController): void;
|
package/core/cmd/data/v-el.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param node
|
|
4
|
-
* @param data
|
|
5
|
-
* @param controller
|
|
6
|
-
*/
|
|
7
|
-
export function resolver_experssion(node, data, controller) {
|
|
8
|
-
if (node.hasChildNodes()) {
|
|
9
|
-
for (var j = 0; j < node.childNodes.length; j++) {
|
|
10
|
-
if (node.childNodes[j].nodeType === 3) {
|
|
11
|
-
var result = node.childNodes[j].nodeValue.match(/\{\{([a-zA-Z]+)}}/g);
|
|
12
|
-
if (result) {
|
|
13
|
-
var property = result[0].replace(/\{/g, "").replace(/}/g, "");
|
|
14
|
-
try {
|
|
15
|
-
node.childNodes[j].nodeValue = data[property];
|
|
16
|
-
}
|
|
17
|
-
catch (e) {
|
|
18
|
-
node.childNodes[j].nodeValue = controller.computed[property]();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
else if (node.childNodes[j].nodeType === 1) {
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
resolver_experssion(node.childNodes[j], data, controller);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param node
|
|
4
|
+
* @param data
|
|
5
|
+
* @param controller
|
|
6
|
+
*/
|
|
7
|
+
export function resolver_experssion(node, data, controller) {
|
|
8
|
+
if (node.hasChildNodes()) {
|
|
9
|
+
for (var j = 0; j < node.childNodes.length; j++) {
|
|
10
|
+
if (node.childNodes[j].nodeType === 3) {
|
|
11
|
+
var result = node.childNodes[j].nodeValue.match(/\{\{([a-zA-Z]+)}}/g);
|
|
12
|
+
if (result) {
|
|
13
|
+
var property = result[0].replace(/\{/g, "").replace(/}/g, "");
|
|
14
|
+
try {
|
|
15
|
+
node.childNodes[j].nodeValue = data[property];
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
node.childNodes[j].nodeValue = controller.computed[property]();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else if (node.childNodes[j].nodeType === 1) {
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
resolver_experssion(node.childNodes[j], data, controller);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentController } from "../../../class/controller/componentController";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param elements
|
|
5
|
-
* @param data
|
|
6
|
-
* @param controller
|
|
7
|
-
*/
|
|
8
|
-
export declare function resolver_html(elements: HTMLCollection, data: {}, controller: ComponentController): void;
|
|
1
|
+
import { ComponentController } from "../../../class/controller/componentController";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param elements
|
|
5
|
+
* @param data
|
|
6
|
+
* @param controller
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolver_html(elements: HTMLCollection, data: {}, controller: ComponentController): void;
|
package/core/cmd/data/v-html.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param elements
|
|
4
|
-
* @param data
|
|
5
|
-
* @param controller
|
|
6
|
-
*/
|
|
7
|
-
export function resolver_html(elements, data, controller) {
|
|
8
|
-
for (var i = 0; i < elements.length; i++) {
|
|
9
|
-
if (elements[i].hasAttribute("@html")) {
|
|
10
|
-
var dataName = elements[i].getAttribute("@html");
|
|
11
|
-
elements[i].removeAttribute("@html");
|
|
12
|
-
try {
|
|
13
|
-
if (data[dataName] === undefined) {
|
|
14
|
-
elements[i].innerHTML = controller.computed[dataName]();
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
elements[i].innerHTML = data[dataName];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
console.error("Can not find data:" + dataName + " in the component");
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
resolver_html(elements[i].children, data, controller);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param elements
|
|
4
|
+
* @param data
|
|
5
|
+
* @param controller
|
|
6
|
+
*/
|
|
7
|
+
export function resolver_html(elements, data, controller) {
|
|
8
|
+
for (var i = 0; i < elements.length; i++) {
|
|
9
|
+
if (elements[i].hasAttribute("@html")) {
|
|
10
|
+
var dataName = elements[i].getAttribute("@html");
|
|
11
|
+
elements[i].removeAttribute("@html");
|
|
12
|
+
try {
|
|
13
|
+
if (data[dataName] === undefined) {
|
|
14
|
+
elements[i].innerHTML = controller.computed[dataName]();
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
elements[i].innerHTML = data[dataName];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
console.error("Can not find data:" + dataName + " in the component");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
resolver_html(elements[i].children, data, controller);
|
|
25
|
+
}
|
|
26
|
+
}
|
package/core/cmd/data/v-txt.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentController } from "../../../class/controller/componentController";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param elements
|
|
5
|
-
* @param data
|
|
6
|
-
* @param controller
|
|
7
|
-
*/
|
|
8
|
-
export declare function resolver_txt(elements: HTMLCollection, data: {}, controller: ComponentController): void;
|
|
1
|
+
import { ComponentController } from "../../../class/controller/componentController";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param elements
|
|
5
|
+
* @param data
|
|
6
|
+
* @param controller
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolver_txt(elements: HTMLCollection, data: {}, controller: ComponentController): void;
|
package/core/cmd/data/v-txt.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param elements
|
|
4
|
-
* @param data
|
|
5
|
-
* @param controller
|
|
6
|
-
*/
|
|
7
|
-
export function resolver_txt(elements, data, controller) {
|
|
8
|
-
for (var i = 0; i < elements.length; i++) {
|
|
9
|
-
var result = elements[i].hasAttribute("@txt");
|
|
10
|
-
if (result) {
|
|
11
|
-
var dataName = elements[i].getAttribute("@txt");
|
|
12
|
-
elements[i].removeAttribute("@txt");
|
|
13
|
-
try {
|
|
14
|
-
if (data[dataName] === undefined) {
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
elements[i].innerText = controller.computed[dataName]();
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
elements[i].innerText = data[dataName];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
console.error("Can not find data:" + dataName + " in the component");
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
resolver_txt(elements[i].children, data, controller);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param elements
|
|
4
|
+
* @param data
|
|
5
|
+
* @param controller
|
|
6
|
+
*/
|
|
7
|
+
export function resolver_txt(elements, data, controller) {
|
|
8
|
+
for (var i = 0; i < elements.length; i++) {
|
|
9
|
+
var result = elements[i].hasAttribute("@txt");
|
|
10
|
+
if (result) {
|
|
11
|
+
var dataName = elements[i].getAttribute("@txt");
|
|
12
|
+
elements[i].removeAttribute("@txt");
|
|
13
|
+
try {
|
|
14
|
+
if (data[dataName] === undefined) {
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
elements[i].innerText = controller.computed[dataName]();
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
elements[i].innerText = data[dataName];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error("Can not find data:" + dataName + " in the component");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
resolver_txt(elements[i].children, data, controller);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param elements
|
|
4
|
-
* @param data
|
|
5
|
-
*/
|
|
6
|
-
export declare function resolver_if(elements: HTMLCollection, data: {}): void;
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param elements
|
|
4
|
+
* @param data
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolver_if(elements: HTMLCollection, data: {}): void;
|