render-core 1.2.12 → 1.2.13
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.
|
@@ -5,20 +5,21 @@
|
|
|
5
5
|
export function locateInputAddress(controller) {
|
|
6
6
|
//判断是否是输入导致的数据更新
|
|
7
7
|
if (controller.proxyForMethods.hasOwnProperty("origin")) {
|
|
8
|
-
var
|
|
8
|
+
var doc = Reflect.get(controller.proxyForMethods, "origin");
|
|
9
9
|
// @ts-ignore
|
|
10
|
-
var target = document.querySelectorAll(
|
|
10
|
+
var target = document.querySelectorAll(doc.tag.toLowerCase().concat("[cpn=".concat(doc.cpn).concat("]")));
|
|
11
11
|
// @ts-ignore
|
|
12
|
-
target.
|
|
13
|
-
|
|
12
|
+
for (var i = 0; i < target.length; i++) {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
if (target[i].getAttribute("name") === doc.name) {
|
|
14
15
|
// @ts-ignore
|
|
15
|
-
|
|
16
|
+
target[i].value = controller.proxyForMethods[doc.name];
|
|
16
17
|
// @ts-ignore
|
|
17
|
-
|
|
18
|
+
target[i].focus();
|
|
18
19
|
// @ts-ignore
|
|
19
|
-
|
|
20
|
+
target[i].setSelectionRange(controller.proxyForMethods[doc.name].length, controller.proxyForMethods[doc.name].length);
|
|
20
21
|
}
|
|
21
|
-
}
|
|
22
|
+
}
|
|
22
23
|
//清楚输入标记
|
|
23
24
|
Reflect.deleteProperty(controller.proxyForMethods, "origin");
|
|
24
25
|
}
|