render-core 1.0.90 → 1.0.92
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 +4 -17
- package/class/component/component.js +3 -0
- package/class/controller/appController.d.ts +6 -0
- package/class/controller/appController.js +22 -0
- package/class/controller/{controller.d.ts → componentController.d.ts} +4 -2
- package/class/controller/{controller.js → componentController.js} +7 -5
- package/class/controller/pageController.d.ts +2 -2
- package/class/tips/appTip.d.ts +3 -0
- package/class/tips/appTip.js +1 -0
- package/class/tips/componentTip.d.ts +16 -0
- package/class/tips/componentTip.js +1 -0
- package/core/cmd/data/v-el.d.ts +8 -0
- package/core/cmd/{v-el.js → data/v-el.js} +10 -4
- package/core/cmd/data/v-html.d.ts +8 -0
- package/core/cmd/data/v-html.js +22 -0
- package/core/cmd/data/v-txt.d.ts +8 -0
- package/core/cmd/{v-txt.js → data/v-txt.js} +10 -4
- package/core/cmd/{v-if.d.ts → justify/v-if.d.ts} +5 -0
- package/core/cmd/{v-if.js → justify/v-if.js} +5 -0
- package/core/cmd/{v-render.d.ts → justify/v-render.d.ts} +5 -0
- package/core/cmd/{v-render.js → justify/v-render.js} +6 -2
- package/core/cmd/{v-show.d.ts → justify/v-show.d.ts} +5 -0
- package/core/cmd/{v-show.js → justify/v-show.js} +6 -2
- package/core/cmd/{v-switch.d.ts → justify/v-switch.d.ts} +5 -0
- package/core/cmd/{v-switch.js → justify/v-switch.js} +5 -0
- package/core/cmd/{v-for.js → loop/v-for.js} +1 -1
- package/core/cmd/{v-index.js → loop/v-index.js} +3 -5
- package/core/cmd/{v-key.js → loop/v-key.js} +2 -2
- package/core/cmd/{v-on.d.ts → method/v-on.d.ts} +6 -0
- package/core/cmd/{v-on.js → method/v-on.js} +7 -3
- package/core/cmd/{v-bind.d.ts → property/v-bind.d.ts} +5 -0
- package/core/cmd/{v-bind.js → property/v-bind.js} +7 -3
- package/core/cmd/{v-model.js → react/v-model.js} +9 -2
- package/core/cmd/{v-ref.d.ts → ref/v-ref.d.ts} +5 -0
- package/core/cmd/{v-ref.js → ref/v-ref.js} +5 -0
- package/core/cmd/solt/v-solt.d.ts +14 -0
- package/core/inject/inject.d.ts +6 -6
- package/core/inject/inject.js +3 -3
- package/core/proxy/getProxy.d.ts +3 -3
- package/core/proxy/getProxy.js +3 -3
- package/core/render/PostRender.d.ts +2 -3
- package/core/render/PostRender.js +3 -3
- package/core/render/delivery.d.ts +3 -4
- package/core/render/initRender.d.ts +2 -3
- package/core/render/initRender.js +3 -3
- package/core/render/partRender.js +2 -2
- package/core/render/rawRender.d.ts +2 -3
- package/core/render/rawRender.js +3 -3
- package/core/render/updateRender.d.ts +2 -2
- package/core/render/updateRender.js +2 -2
- package/core/resolver/props.d.ts +15 -0
- package/core/resolver/props.js +15 -0
- package/core/resolver/query.d.ts +3 -0
- package/core/resolver/query.js +3 -0
- package/core/utility/injectUtility.d.ts +4 -5
- package/core/utility/miscUtility.d.ts +0 -1
- package/core/utility/miscUtility.js +0 -42
- package/core/utility/sectionUtility.d.ts +6 -0
- package/core/utility/sectionUtility.js +11 -0
- package/core/utility/styleUtility.d.ts +17 -0
- package/core/utility/styleUtility.js +17 -0
- package/core/utility/templateUtility.d.ts +5 -2
- package/core/utility/templateUtility.js +4 -0
- package/index.d.ts +20 -3
- package/index.js +34 -51
- package/library/cmd/cmd.d.ts +22 -6
- package/library/cmd/cmd.js +37 -17
- package/library/lifecycle/afterMethods.d.ts +3 -4
- package/library/lifecycle/controllerCycle.d.ts +11 -4
- package/library/lifecycle/controllerCycle.js +8 -0
- package/library/lifecycle/mount.d.ts +10 -2
- package/library/lifecycle/mount.js +8 -0
- package/package.json +1 -4
- package/runtime/runtime.d.ts +5 -1
- package/runtime/runtime.js +5 -4
- package/runtime/tools.d.ts +14 -0
- package/runtime/tools.js +50 -0
- package/bin/bin.d.ts +0 -1
- package/bin/bin.js +0 -4
- package/class/component/apiComponent.d.ts +0 -55
- package/class/component/apiComponent.js +0 -111
- package/class/controller/apiController.d.ts +0 -14
- package/class/controller/apiController.js +0 -17
- package/core/cmd/v-el.d.ts +0 -1
- package/core/cmd/v-html.d.ts +0 -1
- package/core/cmd/v-html.js +0 -18
- package/core/cmd/v-solt.d.ts +0 -15
- package/core/cmd/v-txt.d.ts +0 -1
- package/meta/app.d.ts +0 -3
- package/meta/app.js +0 -19
- /package/core/cmd/{v-for.d.ts → loop/v-for.d.ts} +0 -0
- /package/core/cmd/{v-index.d.ts → loop/v-index.d.ts} +0 -0
- /package/core/cmd/{v-key.d.ts → loop/v-key.d.ts} +0 -0
- /package/core/cmd/{v-model.d.ts → react/v-model.d.ts} +0 -0
- /package/core/cmd/{v-solt.js → solt/v-solt.js} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ApiController } from "../../class/controller/apiController";
|
|
1
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
3
2
|
import { PageController } from "../../class/controller/pageController";
|
|
4
3
|
/**
|
|
5
4
|
* 该函数用于处理渲染后操作
|
|
@@ -7,11 +6,11 @@ import { PageController } from "../../class/controller/pageController";
|
|
|
7
6
|
* @param child
|
|
8
7
|
* @param link
|
|
9
8
|
*/
|
|
10
|
-
export declare function afterMethodsTypeOne(controller:
|
|
9
|
+
export declare function afterMethodsTypeOne(controller: ComponentController, child: Element, link: ComponentController | PageController): void;
|
|
11
10
|
/**
|
|
12
11
|
* 该函数用于处理渲染后操作
|
|
13
12
|
* @param controller
|
|
14
13
|
* @param child
|
|
15
14
|
* @param link
|
|
16
15
|
*/
|
|
17
|
-
export declare function afterMethodsTypeTwo(controller:
|
|
16
|
+
export declare function afterMethodsTypeTwo(controller: ComponentController, child: Element, link: ComponentController | PageController): void;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
2
2
|
import { Component } from "../../class/component/component";
|
|
3
|
-
import { ApiController } from "../../class/controller/apiController";
|
|
4
3
|
import { PageController } from "../../class/controller/pageController";
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* This function is used to initiate the component controller object.
|
|
6
|
+
* @param controller
|
|
7
|
+
* @param proto
|
|
8
|
+
* @param child
|
|
9
|
+
* @param link
|
|
10
|
+
* @param tagTemplate
|
|
11
|
+
*/
|
|
12
|
+
export declare function controllerCycleTypeOne(controller: ComponentController, proto: Component, child: Element, link: ComponentController | PageController, tagTemplate: Element): void;
|
|
13
|
+
export declare function controllerCycleTypeTwo(controller: ComponentController, proto: Component, child: Element, link: ComponentController | PageController, tagTemplate: Element): void;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { inject, injectComputed, injectMethod, injectWatcher } from "../../core/inject/inject";
|
|
2
2
|
import { getProxyObject } from "../../core/proxy/getProxy";
|
|
3
3
|
import { getCodeSpaceForCommit, getCodeSpaceForProperty, getCodeSpaceForPublish, getCommitMethod, getPublishMethod, getSetterMethod } from "../../core/utility/injectUtility";
|
|
4
|
+
/**
|
|
5
|
+
* This function is used to initiate the component controller object.
|
|
6
|
+
* @param controller
|
|
7
|
+
* @param proto
|
|
8
|
+
* @param child
|
|
9
|
+
* @param link
|
|
10
|
+
* @param tagTemplate
|
|
11
|
+
*/
|
|
4
12
|
export function controllerCycleTypeOne(controller, proto, child, link, tagTemplate) {
|
|
5
13
|
//保持控制器模板对象
|
|
6
14
|
controller.proto = proto;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
2
2
|
import { Component } from "../../class/component/component";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* This function is used to mount the dom to the html document.
|
|
5
|
+
* @param controller
|
|
6
|
+
* @param proto
|
|
7
|
+
* @param parent
|
|
8
|
+
* @param child
|
|
9
|
+
* @param tagTemplate
|
|
10
|
+
*/
|
|
11
|
+
export declare function mount(controller: ComponentController, proto: Component, parent: ParentNode, child: Element, tagTemplate: Element): void;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function is used to mount the dom to the html document.
|
|
3
|
+
* @param controller
|
|
4
|
+
* @param proto
|
|
5
|
+
* @param parent
|
|
6
|
+
* @param child
|
|
7
|
+
* @param tagTemplate
|
|
8
|
+
*/
|
|
1
9
|
export function mount(controller, proto, parent, child, tagTemplate) {
|
|
2
10
|
//mount
|
|
3
11
|
var renderSpace = document.createElement("div");
|
package/package.json
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "render-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.92",
|
|
4
4
|
"description": "The core of render-js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
|
-
"bin": {
|
|
8
|
-
"render-core": "./bin/bin.js"
|
|
9
|
-
},
|
|
10
7
|
"repository": {
|
|
11
8
|
"type": "git",
|
|
12
9
|
"url": "https://github.com//render-js/render-core.git"
|
package/runtime/runtime.d.ts
CHANGED
package/runtime/runtime.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { isUnKnown } from "../core/utility/checkUtility";
|
|
2
2
|
import { Render } from "../core/render/delivery";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param collection
|
|
6
|
+
* @param link
|
|
7
|
+
*/
|
|
4
8
|
export function renderHtml(collection, link) {
|
|
5
9
|
//遍历element节点,判断是否为自定义标签
|
|
6
10
|
for (var i = 0; i < collection.length; i++) {
|
|
@@ -14,6 +18,3 @@ export function renderHtml(collection, link) {
|
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
|
-
export function reloadPage() {
|
|
18
|
-
this.run();
|
|
19
|
-
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from "../class/component/component";
|
|
2
|
+
import { RenderJS } from "../index";
|
|
3
|
+
/**
|
|
4
|
+
* This function is used to save the protype component class in the window object.
|
|
5
|
+
* So, you can hava a tip that we customed a property named 'tagLib' in the window object.
|
|
6
|
+
* @param application
|
|
7
|
+
* @param component
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerTagLib(application: RenderJS, component: Component | Component[]): void;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param renderjs
|
|
13
|
+
*/
|
|
14
|
+
export declare function render(renderjs: RenderJS): void;
|
package/runtime/tools.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Component } from "../class/component/component";
|
|
2
|
+
import { themeStyle } from "../core/utility/styleUtility";
|
|
3
|
+
import { AppController } from "../class/controller/appController";
|
|
4
|
+
import { renderHtml } from "./runtime";
|
|
5
|
+
/**
|
|
6
|
+
* This function is used to save the protype component class in the window object.
|
|
7
|
+
* So, you can hava a tip that we customed a property named 'tagLib' in the window object.
|
|
8
|
+
* @param application
|
|
9
|
+
* @param component
|
|
10
|
+
*/
|
|
11
|
+
export function registerTagLib(application, component) {
|
|
12
|
+
//if the input parameter is an instance of Component,do the code block.
|
|
13
|
+
if (component instanceof Component) {
|
|
14
|
+
if (!application.tagLib.has(component.getName().toUpperCase())) {
|
|
15
|
+
application.tagLib.set(component.getName().toUpperCase(), component);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
//if the input parameter is an array of Component,do the code block.
|
|
23
|
+
component.forEach(function (component) {
|
|
24
|
+
if (!application.tagLib.has(component.getName().toUpperCase())) {
|
|
25
|
+
application.tagLib.set(component.getName().toUpperCase(), component);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param renderjs
|
|
36
|
+
*/
|
|
37
|
+
export function render(renderjs) {
|
|
38
|
+
//save tagLib to window
|
|
39
|
+
Reflect.set(window, "tagLib", renderjs.tagLib);
|
|
40
|
+
//获取styleLib对象
|
|
41
|
+
renderjs.tagLib.forEach(function (component) {
|
|
42
|
+
themeStyle(component, renderjs.styleLib);
|
|
43
|
+
});
|
|
44
|
+
//save styleLib to window
|
|
45
|
+
Reflect.set(window, "styleLib", renderjs.styleLib);
|
|
46
|
+
Reflect.set(window, "context", new AppController());
|
|
47
|
+
Reflect.set(window, "router", renderjs.router);
|
|
48
|
+
//开始渲染
|
|
49
|
+
renderHtml(document.body.children, renderjs.page);
|
|
50
|
+
}
|
package/bin/bin.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare function version(): void;
|
package/bin/bin.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
interface EmbedBase {
|
|
2
|
-
getName(): string;
|
|
3
|
-
getTemplate(): string;
|
|
4
|
-
getData(): {};
|
|
5
|
-
getComputed(): {};
|
|
6
|
-
getMethods(): {};
|
|
7
|
-
getWatcher(): {};
|
|
8
|
-
getBeforeRender(): () => void;
|
|
9
|
-
getAfterRender(): () => void;
|
|
10
|
-
getBeforeUpdate(): () => void;
|
|
11
|
-
getAfterUpdate(): () => void;
|
|
12
|
-
getBeforeMount(): () => void;
|
|
13
|
-
getBeforeUnmount(): () => void;
|
|
14
|
-
}
|
|
15
|
-
export default class ApiComponent implements EmbedBase {
|
|
16
|
-
private readonly name;
|
|
17
|
-
private readonly template;
|
|
18
|
-
private readonly data;
|
|
19
|
-
private readonly methods?;
|
|
20
|
-
private readonly computed?;
|
|
21
|
-
private readonly watcher?;
|
|
22
|
-
private readonly beforeRender?;
|
|
23
|
-
private readonly afterRender?;
|
|
24
|
-
private readonly beforeUpdate?;
|
|
25
|
-
private readonly afterUpdate?;
|
|
26
|
-
private readonly beforeMount?;
|
|
27
|
-
private readonly beforeUnmount?;
|
|
28
|
-
constructor(config: {
|
|
29
|
-
name: string;
|
|
30
|
-
template: string;
|
|
31
|
-
data?: {};
|
|
32
|
-
computed?: {};
|
|
33
|
-
methods?: {};
|
|
34
|
-
watcher?: {};
|
|
35
|
-
beforeRender?: () => void;
|
|
36
|
-
afterRender?: () => void;
|
|
37
|
-
beforeUpdate?: () => void;
|
|
38
|
-
afterUpdate?: () => void;
|
|
39
|
-
beforeMount?: () => void;
|
|
40
|
-
beforeUnmount?: () => void;
|
|
41
|
-
});
|
|
42
|
-
getName(): string;
|
|
43
|
-
getTemplate(): string;
|
|
44
|
-
getData(): {};
|
|
45
|
-
getMethods(): {};
|
|
46
|
-
getComputed(): {};
|
|
47
|
-
getWatcher(): {};
|
|
48
|
-
getBeforeRender(): () => void;
|
|
49
|
-
getAfterRender(): () => void;
|
|
50
|
-
getBeforeUpdate(): () => void;
|
|
51
|
-
getAfterUpdate(): () => void;
|
|
52
|
-
getBeforeMount(): () => void;
|
|
53
|
-
getBeforeUnmount(): () => void;
|
|
54
|
-
}
|
|
55
|
-
export {};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
var ApiComponent = /** @class */ (function () {
|
|
2
|
-
function ApiComponent(config) {
|
|
3
|
-
//标签名称
|
|
4
|
-
this.name = config.name;
|
|
5
|
-
//标签模板样式
|
|
6
|
-
this.template = config.template;
|
|
7
|
-
//添加数据
|
|
8
|
-
if (typeof config.data == "undefined") {
|
|
9
|
-
this.data = {};
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
this.data = config.data;
|
|
13
|
-
}
|
|
14
|
-
//添加计算属性
|
|
15
|
-
if (config.computed == "undefined") {
|
|
16
|
-
this.computed = {};
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
this.computed = config.computed;
|
|
20
|
-
}
|
|
21
|
-
//添加方法属性
|
|
22
|
-
if (typeof config.methods == "undefined") {
|
|
23
|
-
this.methods = {};
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
this.methods = config.methods;
|
|
27
|
-
}
|
|
28
|
-
//添加监控属性
|
|
29
|
-
if (typeof config.watcher == "undefined") {
|
|
30
|
-
this.watcher = {};
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
this.watcher = config.watcher;
|
|
34
|
-
}
|
|
35
|
-
//生命周期函数
|
|
36
|
-
if (typeof config.beforeRender == "undefined") {
|
|
37
|
-
this.beforeRender = function () { };
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
this.beforeRender = config.beforeRender;
|
|
41
|
-
}
|
|
42
|
-
if (typeof config.afterRender == "undefined") {
|
|
43
|
-
this.afterRender = function () { };
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
this.afterRender = config.afterRender;
|
|
47
|
-
}
|
|
48
|
-
if (typeof config.beforeUpdate == "undefined") {
|
|
49
|
-
this.beforeUpdate = function () { };
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this.beforeUpdate = config.beforeUpdate;
|
|
53
|
-
}
|
|
54
|
-
if (typeof config.afterUpdate == "undefined") {
|
|
55
|
-
this.afterUpdate = function () { };
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
this.afterUpdate = config.afterUpdate;
|
|
59
|
-
}
|
|
60
|
-
if (typeof config.beforeMount == "undefined") {
|
|
61
|
-
this.beforeMount = function () { };
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
this.beforeMount = config.beforeMount;
|
|
65
|
-
}
|
|
66
|
-
if (typeof config.beforeUnmount == "undefined") {
|
|
67
|
-
this.beforeUnmount = function () { };
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
this.beforeUnmount = config.beforeUnmount;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
ApiComponent.prototype.getName = function () {
|
|
74
|
-
return this.name;
|
|
75
|
-
};
|
|
76
|
-
ApiComponent.prototype.getTemplate = function () {
|
|
77
|
-
return this.template;
|
|
78
|
-
};
|
|
79
|
-
ApiComponent.prototype.getData = function () {
|
|
80
|
-
return this.data;
|
|
81
|
-
};
|
|
82
|
-
ApiComponent.prototype.getMethods = function () {
|
|
83
|
-
return this.methods;
|
|
84
|
-
};
|
|
85
|
-
ApiComponent.prototype.getComputed = function () {
|
|
86
|
-
return this.computed;
|
|
87
|
-
};
|
|
88
|
-
ApiComponent.prototype.getWatcher = function () {
|
|
89
|
-
return this.watcher;
|
|
90
|
-
};
|
|
91
|
-
ApiComponent.prototype.getBeforeRender = function () {
|
|
92
|
-
return this.beforeRender;
|
|
93
|
-
};
|
|
94
|
-
ApiComponent.prototype.getAfterRender = function () {
|
|
95
|
-
return this.afterRender;
|
|
96
|
-
};
|
|
97
|
-
ApiComponent.prototype.getBeforeUpdate = function () {
|
|
98
|
-
return this.beforeUpdate;
|
|
99
|
-
};
|
|
100
|
-
ApiComponent.prototype.getAfterUpdate = function () {
|
|
101
|
-
return this.afterUpdate;
|
|
102
|
-
};
|
|
103
|
-
ApiComponent.prototype.getBeforeMount = function () {
|
|
104
|
-
return this.beforeMount;
|
|
105
|
-
};
|
|
106
|
-
ApiComponent.prototype.getBeforeUnmount = function () {
|
|
107
|
-
return this.beforeUnmount;
|
|
108
|
-
};
|
|
109
|
-
return ApiComponent;
|
|
110
|
-
}());
|
|
111
|
-
export default ApiComponent;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import ApiComponent from "../component/apiComponent";
|
|
2
|
-
import { Controller } from "./controller";
|
|
3
|
-
export declare class ApiController {
|
|
4
|
-
root: ParentNode;
|
|
5
|
-
proto: ApiComponent;
|
|
6
|
-
solt: Map<string, any>;
|
|
7
|
-
preRender: boolean;
|
|
8
|
-
link: Map<string, {}>;
|
|
9
|
-
to: Controller[];
|
|
10
|
-
raw_data: {};
|
|
11
|
-
proxyForMethods: {};
|
|
12
|
-
constructor();
|
|
13
|
-
receiver(method: string, ...args: any[]): any;
|
|
14
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var ApiController = /** @class */ (function () {
|
|
2
|
-
function ApiController() {
|
|
3
|
-
this.link = new Map();
|
|
4
|
-
this.preRender = false;
|
|
5
|
-
this.solt = new Map();
|
|
6
|
-
}
|
|
7
|
-
//接收器
|
|
8
|
-
ApiController.prototype.receiver = function (method) {
|
|
9
|
-
var args = [];
|
|
10
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
11
|
-
args[_i - 1] = arguments[_i];
|
|
12
|
-
}
|
|
13
|
-
return this.proto.getMethods()[method].apply(this.proxyForMethods, args);
|
|
14
|
-
};
|
|
15
|
-
return ApiController;
|
|
16
|
-
}());
|
|
17
|
-
export { ApiController };
|
package/core/cmd/v-el.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function express_langulage(node: ParentNode, data: {}): void;
|
package/core/cmd/v-html.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function resolver_html(elements: HTMLCollection, data: {}): void;
|
package/core/cmd/v-html.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export function resolver_html(elements, data) {
|
|
2
|
-
for (var i = 0; i < elements.length; i++) {
|
|
3
|
-
var result = elements[i].hasAttribute("v-html");
|
|
4
|
-
if (result) {
|
|
5
|
-
var dataName = elements[i].getAttribute("v-html");
|
|
6
|
-
elements[i].removeAttribute("v-html");
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
try {
|
|
9
|
-
elements[i].innerHTML = data[dataName]();
|
|
10
|
-
}
|
|
11
|
-
catch (e) {
|
|
12
|
-
elements[i].innerHTML = data[dataName];
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
var subElements = elements[i].children;
|
|
16
|
-
resolver_html(subElements, data);
|
|
17
|
-
}
|
|
18
|
-
}
|
package/core/cmd/v-solt.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Controller } from "../../class/controller/controller";
|
|
2
|
-
import { ApiController } from "../../class/controller/apiController";
|
|
3
|
-
import { PageController } from "../../class/controller/pageController";
|
|
4
|
-
/**
|
|
5
|
-
* 此函数用于解析自定义元素solt
|
|
6
|
-
* @param tagTemplate
|
|
7
|
-
* @param controller
|
|
8
|
-
*/
|
|
9
|
-
export declare function resolver_solt(tagTemplate: Element, controller: Controller | ApiController | PageController): void;
|
|
10
|
-
/**
|
|
11
|
-
* 此函数用于展开solt
|
|
12
|
-
* @param elements
|
|
13
|
-
* @param controller
|
|
14
|
-
*/
|
|
15
|
-
export declare function extract_solt(elements: HTMLCollection, controller: Controller | ApiController | PageController): void;
|
package/core/cmd/v-txt.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function resolver_txt(elements: HTMLCollection, data: any): void;
|
package/meta/app.d.ts
DELETED
package/meta/app.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import { status_write } from "render-status";
|
|
3
|
-
import { reloadStyle } from "../core/utility/styleUtility";
|
|
4
|
-
var App = /** @class */ (function () {
|
|
5
|
-
function App() {
|
|
6
|
-
}
|
|
7
|
-
//更改会话样式
|
|
8
|
-
App.prototype.setTheme = function (theme) {
|
|
9
|
-
status_write({
|
|
10
|
-
type: "session",
|
|
11
|
-
fields: {
|
|
12
|
-
theme: theme
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
reloadStyle(theme);
|
|
16
|
-
};
|
|
17
|
-
return App;
|
|
18
|
-
}());
|
|
19
|
-
export { App };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|