render-core 1.0.94 → 1.0.95
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { bindModelForUpdater } from "../utility/miscUtility";
|
|
1
2
|
import { afterCmd, cmdForUpdate } from "../../library/cmd/cmd";
|
|
2
3
|
import { injectRefs } from "../inject/inject";
|
|
3
4
|
import { findComponent } from "./delivery";
|
|
4
5
|
import { getTemplate } from "../utility/templateUtility";
|
|
5
|
-
import { locateInputAddress } from "../utility/sectionUtility";
|
|
6
6
|
/**
|
|
7
7
|
* 更新渲染方法
|
|
8
8
|
* @param controller
|
|
@@ -38,7 +38,7 @@ export function update_Render(controller) {
|
|
|
38
38
|
var afterRender = controller.proto.getAfterRender().bind(controller.raw_data);
|
|
39
39
|
afterRender();
|
|
40
40
|
//获取定位
|
|
41
|
-
|
|
41
|
+
bindModelForUpdater(controller.root.children, controller.proxyForMethods, controller);
|
|
42
42
|
//深度渲染
|
|
43
43
|
findComponent(controller.root.children, controller);
|
|
44
44
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ComponentController } from "../../class/controller/componentController";
|
|
1
2
|
/**
|
|
2
3
|
* 给组件元素添加cpn标签
|
|
3
4
|
* @param nodes
|
|
4
5
|
* @param component
|
|
5
6
|
*/
|
|
6
7
|
export declare function addLabel(nodes: HTMLCollection, component: string): void;
|
|
7
|
-
export declare function bindModelForUpdater(nodes: HTMLCollection, data: {}): void;
|
|
8
|
+
export declare function bindModelForUpdater(nodes: HTMLCollection, data: {}, controller: ComponentController): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { locateInputAddress } from "./sectionUtility";
|
|
1
2
|
/**
|
|
2
3
|
* 给组件元素添加cpn标签
|
|
3
4
|
* @param nodes
|
|
@@ -10,7 +11,7 @@ export function addLabel(nodes, component) {
|
|
|
10
11
|
addLabel(kk, component);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
export function bindModelForUpdater(nodes, data) {
|
|
14
|
+
export function bindModelForUpdater(nodes, data, controller) {
|
|
14
15
|
for (var i = 0; i < nodes.length; i++) {
|
|
15
16
|
if (nodes[i].hasAttribute("v-model")) {
|
|
16
17
|
var dataName = nodes[i].getAttribute("v-model");
|
|
@@ -44,11 +45,9 @@ export function bindModelForUpdater(nodes, data) {
|
|
|
44
45
|
nodes[i].addEventListener("compositionstart", compositionstart);
|
|
45
46
|
nodes[i].addEventListener("compositionend", compositionend.bind(data));
|
|
46
47
|
// @ts-ignore
|
|
47
|
-
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
nodes[i].setSelectionRange(data[dataName].length, data[dataName].length);
|
|
48
|
+
locateInputAddress(controller);
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
|
-
bindModelForUpdater(nodes[i].children, data);
|
|
51
|
+
bindModelForUpdater(nodes[i].children, data, controller);
|
|
53
52
|
}
|
|
54
53
|
}
|
|
@@ -9,7 +9,7 @@ export function locateInputAddress(controller) {
|
|
|
9
9
|
var target = document.querySelectorAll(doc_1.tag.toLowerCase().concat("[cpn=".concat(doc_1.cpn).concat("]")));
|
|
10
10
|
target.forEach(function (value) {
|
|
11
11
|
// @ts-ignore
|
|
12
|
-
if (value.
|
|
12
|
+
if (value.hasAttribute(doc_1.name)) {
|
|
13
13
|
// @ts-ignore
|
|
14
14
|
value.setSelectionRange(controller.proxyForMethods[doc_1.name].length, controller.proxyForMethods[doc_1.name].length);
|
|
15
15
|
}
|
package/library/cmd/cmd.js
CHANGED
|
@@ -72,8 +72,6 @@ export function cmdForUpdate(tagTemplate, proto, controller) {
|
|
|
72
72
|
resolver_txt(tagTemplate.children, controller.proxyForMethods, controller);
|
|
73
73
|
//v-show
|
|
74
74
|
resolver_show(tagTemplate.children, controller.proxyForMethods);
|
|
75
|
-
//渲染属性
|
|
76
|
-
resolver_bind(tagTemplate.children, controller.proxyForMethods);
|
|
77
75
|
//v-render
|
|
78
76
|
resolver_render(tagTemplate.children, controller.proxyForMethods);
|
|
79
77
|
}
|