render-core 1.2.11 → 1.2.12
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.
|
@@ -11,8 +11,8 @@ export function resolver_model(nodes, data) {
|
|
|
11
11
|
nodes[i].removeAttribute("v-model");
|
|
12
12
|
var tagName = nodes[i].tagName;
|
|
13
13
|
nodes[i].setAttribute("name", dataName);
|
|
14
|
-
if (tagName === "INPUT" || tagName === "SELECT" || tagName === "TEXTAREA"
|
|
15
|
-
nodes[i].addEventListener("
|
|
14
|
+
if (tagName === "INPUT" || tagName === "SELECT" || tagName === "TEXTAREA") {
|
|
15
|
+
nodes[i].addEventListener("onchange", listerner.bind(data));
|
|
16
16
|
nodes[i].addEventListener("compositionstart", compositionstart);
|
|
17
17
|
nodes[i].addEventListener("compositionend", compositionend.bind(data));
|
|
18
18
|
}
|
|
@@ -2,7 +2,6 @@ import { afterCmd, cmdUtility, } from "../utility/cmdUtility";
|
|
|
2
2
|
import { injectRefs } from "../inject/inject";
|
|
3
3
|
import { findComponent } from "./delivery";
|
|
4
4
|
import { getTemplate } from "../utility/templateUtility";
|
|
5
|
-
import { resolver_model } from "../cmd/react/v-model";
|
|
6
5
|
import { locateInputAddress } from "../utility/sectionUtility";
|
|
7
6
|
/**
|
|
8
7
|
* 更新渲染方法
|
|
@@ -26,7 +25,6 @@ export function update_Render(controller) {
|
|
|
26
25
|
injectRefs(controller);
|
|
27
26
|
//渲染后处理
|
|
28
27
|
afterCmd(controller.root, controller.proto, controller);
|
|
29
|
-
resolver_model(controller.root.children, controller.proxyForMethods);
|
|
30
28
|
//获取定位
|
|
31
29
|
locateInputAddress(controller);
|
|
32
30
|
//深度渲染
|
|
@@ -3,19 +3,23 @@
|
|
|
3
3
|
* @param controller
|
|
4
4
|
*/
|
|
5
5
|
export function locateInputAddress(controller) {
|
|
6
|
+
//判断是否是输入导致的数据更新
|
|
6
7
|
if (controller.proxyForMethods.hasOwnProperty("origin")) {
|
|
7
8
|
var doc_1 = Reflect.get(controller.proxyForMethods, "origin");
|
|
8
9
|
// @ts-ignore
|
|
9
10
|
var target = document.querySelectorAll(doc_1.tag.toLowerCase().concat("[cpn=".concat(doc_1.cpn).concat("]")));
|
|
11
|
+
// @ts-ignore
|
|
10
12
|
target.forEach(function (value) {
|
|
11
|
-
// @ts-ignore
|
|
12
13
|
if (value.getAttribute("name") === doc_1.name) {
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
value.value = controller.proxyForMethods[doc_1.name];
|
|
13
16
|
// @ts-ignore
|
|
14
17
|
value.focus();
|
|
15
18
|
// @ts-ignore
|
|
16
19
|
value.setSelectionRange(controller.proxyForMethods[doc_1.name].length, controller.proxyForMethods[doc_1.name].length);
|
|
17
20
|
}
|
|
18
21
|
});
|
|
22
|
+
//清楚输入标记
|
|
19
23
|
Reflect.deleteProperty(controller.proxyForMethods, "origin");
|
|
20
24
|
}
|
|
21
25
|
}
|