render-core 1.3.38 → 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 -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 +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,45 +1,42 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
-
import { controllerCycleTypeTwo } from "../lifecycle/controllerCycle";
|
|
3
|
-
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
|
-
import { mount, unBox } from "../lifecycle/mount";
|
|
5
|
-
import { injectRefs
|
|
6
|
-
import { afterMethodsTypeOne } from "../lifecycle/afterMethods";
|
|
7
|
-
import { findComponent } from "./delivery";
|
|
8
|
-
import { resolver_solt } from "../cmd/solt/v-solt";
|
|
9
|
-
/**
|
|
10
|
-
* 该函数用于初次渲染需要记录状态的组件
|
|
11
|
-
* @param proto
|
|
12
|
-
* @param parent
|
|
13
|
-
* @param child
|
|
14
|
-
* @param link
|
|
15
|
-
* @param tagTemplate
|
|
16
|
-
*/
|
|
17
|
-
export function post_render(proto, parent, child, link, tagTemplate) {
|
|
18
|
-
//获取控制对象
|
|
19
|
-
var controller = new ComponentController();
|
|
20
|
-
//解析solt
|
|
21
|
-
resolver_solt(child, controller);
|
|
22
|
-
//控制对象预处理
|
|
23
|
-
controllerCycleTypeTwo(controller, proto, child, link, tagTemplate);
|
|
24
|
-
//beforeRender
|
|
25
|
-
proto.getBeforeRender().call(controller.raw_data);
|
|
26
|
-
//解析指令
|
|
27
|
-
cmdUtility(tagTemplate, proto, controller);
|
|
28
|
-
//mount
|
|
29
|
-
mount(controller, proto, parent, child, tagTemplate);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
proto.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
unBox(controller.root, controller);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
+
import { controllerCycleTypeTwo } from "../lifecycle/controllerCycle";
|
|
3
|
+
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
|
+
import { mount, unBox } from "../lifecycle/mount";
|
|
5
|
+
import { injectRefs } from "../inject/inject";
|
|
6
|
+
import { afterMethodsTypeOne } from "../lifecycle/afterMethods";
|
|
7
|
+
import { findComponent } from "./delivery";
|
|
8
|
+
import { resolver_solt } from "../cmd/solt/v-solt";
|
|
9
|
+
/**
|
|
10
|
+
* 该函数用于初次渲染需要记录状态的组件
|
|
11
|
+
* @param proto
|
|
12
|
+
* @param parent
|
|
13
|
+
* @param child
|
|
14
|
+
* @param link
|
|
15
|
+
* @param tagTemplate
|
|
16
|
+
*/
|
|
17
|
+
export function post_render(proto, parent, child, link, tagTemplate) {
|
|
18
|
+
//获取控制对象
|
|
19
|
+
var controller = new ComponentController();
|
|
20
|
+
//解析solt
|
|
21
|
+
resolver_solt(child, controller);
|
|
22
|
+
//控制对象预处理
|
|
23
|
+
controllerCycleTypeTwo(controller, proto, child, link, tagTemplate);
|
|
24
|
+
//beforeRender
|
|
25
|
+
proto.getBeforeRender().call(controller.raw_data);
|
|
26
|
+
//解析指令
|
|
27
|
+
cmdUtility(tagTemplate, proto, controller);
|
|
28
|
+
//mount
|
|
29
|
+
mount(controller, proto, parent, child, tagTemplate);
|
|
30
|
+
injectRefs(controller);
|
|
31
|
+
//渲染后处理
|
|
32
|
+
afterCmd(controller.root, controller.proto, controller);
|
|
33
|
+
//后处理
|
|
34
|
+
afterMethodsTypeOne(controller, child, link);
|
|
35
|
+
//afterRender
|
|
36
|
+
proto.getAfterRender().call(controller.proxyForMethods);
|
|
37
|
+
//深度渲染
|
|
38
|
+
findComponent(controller.root.children, controller);
|
|
39
|
+
if (proto.getMode() === "insert") {
|
|
40
|
+
unBox(controller.root);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
-
import { Component } from "../../class/component/component";
|
|
3
|
-
import { PageController } from "../../class/controller/pageController";
|
|
4
|
-
export declare function Render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController): void;
|
|
5
|
-
export declare function findComponent(collection: HTMLCollection, link: ComponentController | PageController): void;
|
|
1
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
+
import { Component } from "../../class/component/component";
|
|
3
|
+
import { PageController } from "../../class/controller/pageController";
|
|
4
|
+
export declare function Render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController): void;
|
|
5
|
+
export declare function findComponent(collection: HTMLCollection, link: ComponentController | PageController): void;
|
package/core/render/delivery.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { isUnKnown } from "../utility/checkUtility";
|
|
2
|
-
import { init_render } from "./initRender";
|
|
3
|
-
import { post_render } from "./PostRender";
|
|
4
|
-
import { raw_render } from "./rawRender";
|
|
5
|
-
import { getTemplate } from "../utility/templateUtility";
|
|
6
|
-
import { styleResolve } from "../utility/styleUtility";
|
|
7
|
-
//渲染自定义标签
|
|
8
|
-
export function Render(proto, parent, child, link) {
|
|
9
|
-
//获得模板元素
|
|
10
|
-
var tagTemplate = getTemplate(proto);
|
|
11
|
-
//注册当前解析元素
|
|
12
|
-
Reflect.get(window, "context").crtTag = child;
|
|
13
|
-
//解析样式
|
|
14
|
-
styleResolve(proto.getName());
|
|
15
|
-
//两种渲染方式
|
|
16
|
-
if (child.hasAttribute("name")) {
|
|
17
|
-
//需要保持状态的渲染
|
|
18
|
-
if (link.link.has(child.getAttribute("name"))) {
|
|
19
|
-
//该name元素存在旧数据,是更新渲染
|
|
20
|
-
init_render(proto, parent, child, link, tagTemplate);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
//该name元素不存在旧数据,是第一次渲染
|
|
24
|
-
post_render(proto, parent, child, link, tagTemplate);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
//不需要保持状态的渲染
|
|
29
|
-
raw_render(proto, parent, child, link, tagTemplate);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//拓展标签深度渲染
|
|
33
|
-
export function findComponent(collection, link) {
|
|
34
|
-
for (var i = 0; i < collection.length; i++) {
|
|
35
|
-
if (isUnKnown(collection[i].nodeName)) {
|
|
36
|
-
Render(Reflect.get(window, "tagLib").get(collection[i].nodeName.toUpperCase()), collection[i].parentNode, collection[i], link);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
findComponent(collection[i].children, link);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
import { isUnKnown } from "../utility/checkUtility";
|
|
2
|
+
import { init_render } from "./initRender";
|
|
3
|
+
import { post_render } from "./PostRender";
|
|
4
|
+
import { raw_render } from "./rawRender";
|
|
5
|
+
import { getTemplate } from "../utility/templateUtility";
|
|
6
|
+
import { styleResolve } from "../utility/styleUtility";
|
|
7
|
+
//渲染自定义标签
|
|
8
|
+
export function Render(proto, parent, child, link) {
|
|
9
|
+
//获得模板元素
|
|
10
|
+
var tagTemplate = getTemplate(proto);
|
|
11
|
+
//注册当前解析元素
|
|
12
|
+
Reflect.get(window, "context").crtTag = child;
|
|
13
|
+
//解析样式
|
|
14
|
+
styleResolve(proto.getName());
|
|
15
|
+
//两种渲染方式
|
|
16
|
+
if (child.hasAttribute("name")) {
|
|
17
|
+
//需要保持状态的渲染
|
|
18
|
+
if (link.link.has(child.getAttribute("name"))) {
|
|
19
|
+
//该name元素存在旧数据,是更新渲染
|
|
20
|
+
init_render(proto, parent, child, link, tagTemplate);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
//该name元素不存在旧数据,是第一次渲染
|
|
24
|
+
post_render(proto, parent, child, link, tagTemplate);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
//不需要保持状态的渲染
|
|
29
|
+
raw_render(proto, parent, child, link, tagTemplate);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//拓展标签深度渲染
|
|
33
|
+
export function findComponent(collection, link) {
|
|
34
|
+
for (var i = 0; i < collection.length; i++) {
|
|
35
|
+
if (isUnKnown(collection[i].nodeName)) {
|
|
36
|
+
Render(Reflect.get(window, "tagLib").get(collection[i].nodeName.toUpperCase()), collection[i].parentNode, collection[i], link);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
findComponent(collection[i].children, link);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Component } from "../../class/component/component";
|
|
2
|
-
import { ComponentController } from "../../class/controller/componentController";
|
|
3
|
-
import { PageController } from "../../class/controller/pageController";
|
|
4
|
-
/**
|
|
5
|
-
* 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
|
|
6
|
-
* @param proto
|
|
7
|
-
* @param parent
|
|
8
|
-
* @param child
|
|
9
|
-
* @param link
|
|
10
|
-
* @param tagTemplate
|
|
11
|
-
*/
|
|
12
|
-
export declare function init_render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController, tagTemplate: Element): void;
|
|
1
|
+
import { Component } from "../../class/component/component";
|
|
2
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
3
|
+
import { PageController } from "../../class/controller/pageController";
|
|
4
|
+
/**
|
|
5
|
+
* 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
|
|
6
|
+
* @param proto
|
|
7
|
+
* @param parent
|
|
8
|
+
* @param child
|
|
9
|
+
* @param link
|
|
10
|
+
* @param tagTemplate
|
|
11
|
+
*/
|
|
12
|
+
export declare function init_render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController, tagTemplate: Element): void;
|
|
@@ -1,41 +1,39 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
-
import { controllerCycleTypeOne } from "../lifecycle/controllerCycle";
|
|
3
|
-
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
|
-
import { mount, unBox } from "../lifecycle/mount";
|
|
5
|
-
import { injectRefs
|
|
6
|
-
import { afterMethodsTypeOne } from "../lifecycle/afterMethods";
|
|
7
|
-
import { findComponent } from "./delivery";
|
|
8
|
-
import { resolver_solt } from "../cmd/solt/v-solt";
|
|
9
|
-
/**
|
|
10
|
-
* 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
|
|
11
|
-
* @param proto
|
|
12
|
-
* @param parent
|
|
13
|
-
* @param child
|
|
14
|
-
* @param link
|
|
15
|
-
* @param tagTemplate
|
|
16
|
-
*/
|
|
17
|
-
export function init_render(proto, parent, child, link, tagTemplate) {
|
|
18
|
-
//获取控制对象
|
|
19
|
-
var controller = new ComponentController();
|
|
20
|
-
//解析solt
|
|
21
|
-
resolver_solt(child, controller);
|
|
22
|
-
//控制对象预处理
|
|
23
|
-
controllerCycleTypeOne(controller, proto, child, link, tagTemplate);
|
|
24
|
-
//内存中模板处理
|
|
25
|
-
cmdUtility(tagTemplate, proto, controller);
|
|
26
|
-
//mount
|
|
27
|
-
mount(controller, proto, parent, child, tagTemplate);
|
|
28
|
-
//获取
|
|
29
|
-
injectRefs(controller);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
+
import { controllerCycleTypeOne } from "../lifecycle/controllerCycle";
|
|
3
|
+
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
|
+
import { mount, unBox } from "../lifecycle/mount";
|
|
5
|
+
import { injectRefs } from "../inject/inject";
|
|
6
|
+
import { afterMethodsTypeOne } from "../lifecycle/afterMethods";
|
|
7
|
+
import { findComponent } from "./delivery";
|
|
8
|
+
import { resolver_solt } from "../cmd/solt/v-solt";
|
|
9
|
+
/**
|
|
10
|
+
* 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
|
|
11
|
+
* @param proto
|
|
12
|
+
* @param parent
|
|
13
|
+
* @param child
|
|
14
|
+
* @param link
|
|
15
|
+
* @param tagTemplate
|
|
16
|
+
*/
|
|
17
|
+
export function init_render(proto, parent, child, link, tagTemplate) {
|
|
18
|
+
//获取控制对象
|
|
19
|
+
var controller = new ComponentController();
|
|
20
|
+
//解析solt
|
|
21
|
+
resolver_solt(child, controller);
|
|
22
|
+
//控制对象预处理
|
|
23
|
+
controllerCycleTypeOne(controller, proto, child, link, tagTemplate);
|
|
24
|
+
//内存中模板处理
|
|
25
|
+
cmdUtility(tagTemplate, proto, controller);
|
|
26
|
+
//mount
|
|
27
|
+
mount(controller, proto, parent, child, tagTemplate);
|
|
28
|
+
//获取
|
|
29
|
+
injectRefs(controller);
|
|
30
|
+
//渲染后数据处理
|
|
31
|
+
afterCmd(controller.root, proto, controller);
|
|
32
|
+
//后处理
|
|
33
|
+
afterMethodsTypeOne(controller, child, link);
|
|
34
|
+
//深度渲染
|
|
35
|
+
findComponent(tagTemplate.children, controller);
|
|
36
|
+
if (proto.getMode() === "insert") {
|
|
37
|
+
unBox(controller.root);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 该函数用于处理数组类型数据的展开
|
|
3
|
-
* @param baseRoot
|
|
4
|
-
* @param temp
|
|
5
|
-
* @param index
|
|
6
|
-
* @param data
|
|
7
|
-
*/
|
|
8
|
-
export declare function part_render_array(baseRoot: ParentNode, temp: Node, index: number, data: any): void;
|
|
9
|
-
/**
|
|
10
|
-
* 该函数用于处理字典数据类型的展开
|
|
11
|
-
* @param baseRoot
|
|
12
|
-
* @param temp
|
|
13
|
-
* @param data
|
|
14
|
-
*/
|
|
15
|
-
export declare function part_render_map(baseRoot: ParentNode, temp: Node, data: any): void;
|
|
1
|
+
/**
|
|
2
|
+
* 该函数用于处理数组类型数据的展开
|
|
3
|
+
* @param baseRoot
|
|
4
|
+
* @param temp
|
|
5
|
+
* @param index
|
|
6
|
+
* @param data
|
|
7
|
+
*/
|
|
8
|
+
export declare function part_render_array(baseRoot: ParentNode, temp: Node, index: number, data: any): void;
|
|
9
|
+
/**
|
|
10
|
+
* 该函数用于处理字典数据类型的展开
|
|
11
|
+
* @param baseRoot
|
|
12
|
+
* @param temp
|
|
13
|
+
* @param data
|
|
14
|
+
*/
|
|
15
|
+
export declare function part_render_map(baseRoot: ParentNode, temp: Node, data: any): void;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { resolver_array_single } from "../cmd/loop/v-index";
|
|
2
|
-
import { resolver_map_single } from "../cmd/loop/v-key";
|
|
3
|
-
/**
|
|
4
|
-
* 该函数用于处理数组类型数据的展开
|
|
5
|
-
* @param baseRoot
|
|
6
|
-
* @param temp
|
|
7
|
-
* @param index
|
|
8
|
-
* @param data
|
|
9
|
-
*/
|
|
10
|
-
export function part_render_array(baseRoot, temp, index, data) {
|
|
11
|
-
// @ts-ignore
|
|
12
|
-
var clone = temp.cloneNode(true);
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
resolver_array_single(clone, index, data);
|
|
15
|
-
//插入模板节点
|
|
16
|
-
baseRoot.insertBefore(clone, temp);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* 该函数用于处理字典数据类型的展开
|
|
20
|
-
* @param baseRoot
|
|
21
|
-
* @param temp
|
|
22
|
-
* @param data
|
|
23
|
-
*/
|
|
24
|
-
export function part_render_map(baseRoot, temp, data) {
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
var clone = temp.cloneNode(true);
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
resolver_map_single(clone, data);
|
|
29
|
-
//插入模板节点
|
|
30
|
-
baseRoot.insertBefore(clone, temp);
|
|
31
|
-
}
|
|
1
|
+
import { resolver_array_single } from "../cmd/loop/v-index";
|
|
2
|
+
import { resolver_map_single } from "../cmd/loop/v-key";
|
|
3
|
+
/**
|
|
4
|
+
* 该函数用于处理数组类型数据的展开
|
|
5
|
+
* @param baseRoot
|
|
6
|
+
* @param temp
|
|
7
|
+
* @param index
|
|
8
|
+
* @param data
|
|
9
|
+
*/
|
|
10
|
+
export function part_render_array(baseRoot, temp, index, data) {
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
var clone = temp.cloneNode(true);
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
resolver_array_single(clone, index, data);
|
|
15
|
+
//插入模板节点
|
|
16
|
+
baseRoot.insertBefore(clone, temp);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 该函数用于处理字典数据类型的展开
|
|
20
|
+
* @param baseRoot
|
|
21
|
+
* @param temp
|
|
22
|
+
* @param data
|
|
23
|
+
*/
|
|
24
|
+
export function part_render_map(baseRoot, temp, data) {
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
var clone = temp.cloneNode(true);
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
resolver_map_single(clone, data);
|
|
29
|
+
//插入模板节点
|
|
30
|
+
baseRoot.insertBefore(clone, temp);
|
|
31
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Component } from "../../class/component/component";
|
|
2
|
-
import { ComponentController } from "../../class/controller/componentController";
|
|
3
|
-
import { PageController } from "../../class/controller/pageController";
|
|
4
|
-
/**
|
|
5
|
-
* 该函数用于渲染不需要记录状态的组件
|
|
6
|
-
* @param proto
|
|
7
|
-
* @param parent
|
|
8
|
-
* @param child
|
|
9
|
-
* @param link
|
|
10
|
-
* @param tagTemplate
|
|
11
|
-
*/
|
|
12
|
-
export declare function raw_render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController, tagTemplate: Element): void;
|
|
1
|
+
import { Component } from "../../class/component/component";
|
|
2
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
3
|
+
import { PageController } from "../../class/controller/pageController";
|
|
4
|
+
/**
|
|
5
|
+
* 该函数用于渲染不需要记录状态的组件
|
|
6
|
+
* @param proto
|
|
7
|
+
* @param parent
|
|
8
|
+
* @param child
|
|
9
|
+
* @param link
|
|
10
|
+
* @param tagTemplate
|
|
11
|
+
*/
|
|
12
|
+
export declare function raw_render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController, tagTemplate: Element): void;
|
package/core/render/rawRender.js
CHANGED
|
@@ -1,45 +1,43 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
-
import { controllerCycleTypeTwo } from "../lifecycle/controllerCycle";
|
|
3
|
-
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
|
-
import { mount, unBox } from "../lifecycle/mount";
|
|
5
|
-
import { injectRefs
|
|
6
|
-
import { afterMethodsTypeTwo } from "../lifecycle/afterMethods";
|
|
7
|
-
import { findComponent } from "./delivery";
|
|
8
|
-
import { resolver_solt } from "../cmd/solt/v-solt";
|
|
9
|
-
/**
|
|
10
|
-
* 该函数用于渲染不需要记录状态的组件
|
|
11
|
-
* @param proto
|
|
12
|
-
* @param parent
|
|
13
|
-
* @param child
|
|
14
|
-
* @param link
|
|
15
|
-
* @param tagTemplate
|
|
16
|
-
*/
|
|
17
|
-
export function raw_render(proto, parent, child, link, tagTemplate) {
|
|
18
|
-
//获取控制对象
|
|
19
|
-
var controller = new ComponentController();
|
|
20
|
-
//解析solt
|
|
21
|
-
resolver_solt(child, controller);
|
|
22
|
-
//控制对象预处理
|
|
23
|
-
controllerCycleTypeTwo(controller, proto, child, link, tagTemplate);
|
|
24
|
-
//beforeRender,可以获取数据而不触发更新
|
|
25
|
-
proto.getBeforeRender().call(controller.raw_data);
|
|
26
|
-
//解析指令(模板处理)
|
|
27
|
-
cmdUtility(tagTemplate, proto, controller);
|
|
28
|
-
//mount
|
|
29
|
-
mount(controller, proto, parent, child, tagTemplate);
|
|
30
|
-
//获取注入引用资源
|
|
31
|
-
injectRefs(controller);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
+
import { controllerCycleTypeTwo } from "../lifecycle/controllerCycle";
|
|
3
|
+
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
|
+
import { mount, unBox } from "../lifecycle/mount";
|
|
5
|
+
import { injectRefs } from "../inject/inject";
|
|
6
|
+
import { afterMethodsTypeTwo } from "../lifecycle/afterMethods";
|
|
7
|
+
import { findComponent } from "./delivery";
|
|
8
|
+
import { resolver_solt } from "../cmd/solt/v-solt";
|
|
9
|
+
/**
|
|
10
|
+
* 该函数用于渲染不需要记录状态的组件
|
|
11
|
+
* @param proto
|
|
12
|
+
* @param parent
|
|
13
|
+
* @param child
|
|
14
|
+
* @param link
|
|
15
|
+
* @param tagTemplate
|
|
16
|
+
*/
|
|
17
|
+
export function raw_render(proto, parent, child, link, tagTemplate) {
|
|
18
|
+
//获取控制对象
|
|
19
|
+
var controller = new ComponentController();
|
|
20
|
+
//解析solt
|
|
21
|
+
resolver_solt(child, controller);
|
|
22
|
+
//控制对象预处理
|
|
23
|
+
controllerCycleTypeTwo(controller, proto, child, link, tagTemplate);
|
|
24
|
+
//beforeRender,可以获取数据而不触发更新
|
|
25
|
+
proto.getBeforeRender().call(controller.raw_data);
|
|
26
|
+
//解析指令(模板处理)
|
|
27
|
+
cmdUtility(tagTemplate, proto, controller);
|
|
28
|
+
//mount
|
|
29
|
+
mount(controller, proto, parent, child, tagTemplate);
|
|
30
|
+
//获取注入引用资源
|
|
31
|
+
injectRefs(controller);
|
|
32
|
+
//渲染后处理
|
|
33
|
+
afterCmd(controller.root, proto, controller);
|
|
34
|
+
//后处理(数据渲染)
|
|
35
|
+
afterMethodsTypeTwo(controller, child, link);
|
|
36
|
+
//afterRender,可以操作渲染后的dom
|
|
37
|
+
proto.getAfterRender().call(controller.proxyForMethods);
|
|
38
|
+
//深度渲染
|
|
39
|
+
findComponent(controller.root.children, controller);
|
|
40
|
+
if (proto.getMode() === "insert") {
|
|
41
|
+
unBox(controller.root);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
-
/**
|
|
3
|
-
* 更新渲染方法
|
|
4
|
-
* @param controller
|
|
5
|
-
*/
|
|
6
|
-
export declare function update_Render(controller: ComponentController): void;
|
|
1
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
2
|
+
/**
|
|
3
|
+
* 更新渲染方法
|
|
4
|
+
* @param controller
|
|
5
|
+
*/
|
|
6
|
+
export declare function update_Render(controller: ComponentController): void;
|
|
@@ -1,32 +1,29 @@
|
|
|
1
|
-
import { afterCmd, cmdUtility, } from "../utility/cmdUtility";
|
|
2
|
-
import { injectRefs
|
|
3
|
-
import { findComponent } from "./delivery";
|
|
4
|
-
import { getTemplate } from "../utility/templateUtility";
|
|
5
|
-
/**
|
|
6
|
-
* 更新渲染方法
|
|
7
|
-
* @param controller
|
|
8
|
-
*/
|
|
9
|
-
export function update_Render(controller) {
|
|
10
|
-
//生成DOM
|
|
11
|
-
var tagTemplate = getTemplate(controller.proto);
|
|
12
|
-
//清除保存的发布对象
|
|
13
|
-
controller.to = [];
|
|
14
|
-
//解析指令
|
|
15
|
-
cmdUtility(tagTemplate, controller.proto, controller);
|
|
16
|
-
//unmount
|
|
17
|
-
while (controller.root.hasChildNodes()) {
|
|
18
|
-
controller.root.removeChild(controller.root.firstChild);
|
|
19
|
-
}
|
|
20
|
-
//mount
|
|
21
|
-
while (tagTemplate.hasChildNodes()) {
|
|
22
|
-
controller.root.appendChild(tagTemplate.firstChild);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
//深度渲染
|
|
31
|
-
findComponent(controller.root.children, controller);
|
|
32
|
-
}
|
|
1
|
+
import { afterCmd, cmdUtility, } from "../utility/cmdUtility";
|
|
2
|
+
import { injectRefs } from "../inject/inject";
|
|
3
|
+
import { findComponent } from "./delivery";
|
|
4
|
+
import { getTemplate } from "../utility/templateUtility";
|
|
5
|
+
/**
|
|
6
|
+
* 更新渲染方法
|
|
7
|
+
* @param controller
|
|
8
|
+
*/
|
|
9
|
+
export function update_Render(controller) {
|
|
10
|
+
//生成DOM
|
|
11
|
+
var tagTemplate = getTemplate(controller.proto);
|
|
12
|
+
//清除保存的发布对象
|
|
13
|
+
controller.to = [];
|
|
14
|
+
//解析指令
|
|
15
|
+
cmdUtility(tagTemplate, controller.proto, controller);
|
|
16
|
+
//unmount
|
|
17
|
+
while (controller.root.hasChildNodes()) {
|
|
18
|
+
controller.root.removeChild(controller.root.firstChild);
|
|
19
|
+
}
|
|
20
|
+
//mount
|
|
21
|
+
while (tagTemplate.hasChildNodes()) {
|
|
22
|
+
controller.root.appendChild(tagTemplate.firstChild);
|
|
23
|
+
}
|
|
24
|
+
injectRefs(controller);
|
|
25
|
+
//渲染后处理
|
|
26
|
+
afterCmd(controller.root, controller.proto, controller);
|
|
27
|
+
//深度渲染
|
|
28
|
+
findComponent(controller.root.children, controller);
|
|
29
|
+
}
|
package/core/resolver/props.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function is used to resolve tag customed properties.
|
|
3
|
-
* @param node
|
|
4
|
-
* @param properties
|
|
5
|
-
*/
|
|
6
|
-
export declare function resolveProps(node: Element, properties: {} | []): any;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param node
|
|
10
|
-
* @param array
|
|
11
|
-
*/
|
|
12
|
-
export declare function getAllPropsByArray(node: Element, array: Array<string>): any;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param node
|
|
16
|
-
* @param object
|
|
17
|
-
*/
|
|
18
|
-
export declare function getAllPropsByObject(node: Element, object: {}): any;
|
|
1
|
+
/**
|
|
2
|
+
* This function is used to resolve tag customed properties.
|
|
3
|
+
* @param node
|
|
4
|
+
* @param properties
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolveProps(node: Element, properties: {} | []): any;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param node
|
|
10
|
+
* @param array
|
|
11
|
+
*/
|
|
12
|
+
export declare function getAllPropsByArray(node: Element, array: Array<string>): any;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param node
|
|
16
|
+
* @param object
|
|
17
|
+
*/
|
|
18
|
+
export declare function getAllPropsByObject(node: Element, object: {}): any;
|