render-core 1.3.56 → 1.3.58
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/core/cmd/loop/v-map.d.ts +0 -14
- package/core/cmd/loop/v-map.js +1 -27
- package/package.json +1 -1
package/core/cmd/loop/v-map.d.ts
CHANGED
|
@@ -4,17 +4,3 @@
|
|
|
4
4
|
* @param data
|
|
5
5
|
*/
|
|
6
6
|
export declare function resolver_for_map(elements: HTMLCollection, data: {}): void;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param baseRoot
|
|
10
|
-
* @param temp
|
|
11
|
-
* @param data
|
|
12
|
-
*/
|
|
13
|
-
export declare function extractForMap(baseRoot: ParentNode, temp: Node, data: any): void;
|
|
14
|
-
/**
|
|
15
|
-
* 该函数用于处理字典数据类型的展开
|
|
16
|
-
* @param baseRoot
|
|
17
|
-
* @param temp
|
|
18
|
-
* @param data
|
|
19
|
-
*/
|
|
20
|
-
export declare function part_render_map(baseRoot: ParentNode, temp: Node, data: any): void;
|
package/core/cmd/loop/v-map.js
CHANGED
|
@@ -11,40 +11,14 @@ export function resolver_for_map(elements, data) {
|
|
|
11
11
|
var dataName = elements[i].getAttribute("@map");
|
|
12
12
|
elements[i].removeAttribute("@map");
|
|
13
13
|
if (data[dataName] instanceof Object) {
|
|
14
|
-
|
|
15
|
-
i++;
|
|
14
|
+
resolver_map_single(elements[i], data[dataName]);
|
|
16
15
|
}
|
|
17
16
|
else {
|
|
18
17
|
console.log("Instruction @document need an object datatype to extract!");
|
|
19
18
|
}
|
|
20
|
-
//将模板节点删除
|
|
21
|
-
elements[i].parentNode.removeChild(elements[i]);
|
|
22
|
-
i--;
|
|
23
19
|
}
|
|
24
20
|
if (elements[i]) {
|
|
25
21
|
resolver_for_map(elements[i].children, data);
|
|
26
22
|
}
|
|
27
23
|
}
|
|
28
24
|
}
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @param baseRoot
|
|
32
|
-
* @param temp
|
|
33
|
-
* @param data
|
|
34
|
-
*/
|
|
35
|
-
export function extractForMap(baseRoot, temp, data) {
|
|
36
|
-
part_render_map(baseRoot, temp, data);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* 该函数用于处理字典数据类型的展开
|
|
40
|
-
* @param baseRoot
|
|
41
|
-
* @param temp
|
|
42
|
-
* @param data
|
|
43
|
-
*/
|
|
44
|
-
export function part_render_map(baseRoot, temp, data) {
|
|
45
|
-
// @ts-ignore
|
|
46
|
-
var clone = temp.cloneNode(true);
|
|
47
|
-
resolver_map_single(clone, data);
|
|
48
|
-
//插入模板节点
|
|
49
|
-
baseRoot.insertBefore(clone, temp);
|
|
50
|
-
}
|