render-core 1.0.12 → 1.0.14
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/controller.js +1 -0
- package/index.js +1 -0
- package/library/render/render.js +4 -4
- package/package.json +2 -2
package/class/controller.js
CHANGED
package/index.js
CHANGED
package/library/render/render.js
CHANGED
|
@@ -2,6 +2,7 @@ import { Controller } from "../../class/controller";
|
|
|
2
2
|
import { getCodeSpaceForCommit, getCodeSpaceForPublish, getCommitMethod, getPublishMethod } from "../../core/utility/injectUtility";
|
|
3
3
|
import { getProxyObject } from "../../core/proxy/getProxy";
|
|
4
4
|
import { findComponent } from "../../core/render/initRender";
|
|
5
|
+
import { inject } from "../inject/inject";
|
|
5
6
|
import { cmd } from "../cmd/cmd";
|
|
6
7
|
export function init_render(proto, parent, child, link, tagTemplate) {
|
|
7
8
|
//获取控制对象
|
|
@@ -11,7 +12,7 @@ export function init_render(proto, parent, child, link, tagTemplate) {
|
|
|
11
12
|
//复制原始数据对象到控制对象
|
|
12
13
|
controller.raw_data = link.link.get(child.getAttribute("name"));
|
|
13
14
|
//向raw_data中注入元数据
|
|
14
|
-
|
|
15
|
+
inject(controller, tagTemplate);
|
|
15
16
|
//数据渲染代理对象
|
|
16
17
|
controller.proxyForMethods = getProxyObject(controller.raw_data, controller);
|
|
17
18
|
//注入commit
|
|
@@ -49,7 +50,7 @@ export function post_render(proto, parent, child, link, tagTemplate) {
|
|
|
49
50
|
//复制原始数据对象到控制对象
|
|
50
51
|
controller.raw_data = Object.create(proto.getData());
|
|
51
52
|
//向raw_data中注入元数据
|
|
52
|
-
|
|
53
|
+
inject(controller, tagTemplate);
|
|
53
54
|
//保持数据代理对象
|
|
54
55
|
controller.proxyForMethods = getProxyObject(controller.raw_data, controller);
|
|
55
56
|
//注入commit
|
|
@@ -84,7 +85,7 @@ export function raw_render(proto, parent, child, link, tagTemplate) {
|
|
|
84
85
|
//保持控制对象原型对象
|
|
85
86
|
controller.proto = proto;
|
|
86
87
|
//向raw_data中注入元数据
|
|
87
|
-
|
|
88
|
+
inject(controller, tagTemplate);
|
|
88
89
|
//复制原始数据对象到控制对象
|
|
89
90
|
controller.raw_data = Object.create(proto.getData());
|
|
90
91
|
//数据渲染对象
|
|
@@ -111,7 +112,6 @@ export function raw_render(proto, parent, child, link, tagTemplate) {
|
|
|
111
112
|
//afterRender
|
|
112
113
|
var afterRender = proto.getAfterRender().bind(controller.raw_data);
|
|
113
114
|
afterRender();
|
|
114
|
-
link.to.push(controller);
|
|
115
115
|
//深度渲染
|
|
116
116
|
findComponent(controller.root.children, controller);
|
|
117
117
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "render-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "The router for render-js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com//render-js/render.git"
|
|
12
|
+
"url": "https://github.com//render-js/render-core.git"
|
|
13
13
|
},
|
|
14
14
|
"author": "mutian",
|
|
15
15
|
"license": "MIT",
|