render-core 1.0.77 → 1.0.78

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 +1 @@
1
- export declare function express_langulage(elements: HTMLCollection, data: {}): void;
1
+ export declare function express_langulage(node: ParentNode, data: {}): void;
package/core/cmd/v-el.js CHANGED
@@ -1,19 +1,19 @@
1
- export function express_langulage(elements, data) {
2
- for (var i = 0; i < elements.length; i++) {
3
- if (elements[i].hasChildNodes()) {
4
- if (!(elements[i].children.length > 0)) {
5
- for (var j = 0; j < elements[i].childNodes.length; j++) {
6
- if (elements[i].childNodes[j].nodeType === 3) {
7
- var result = elements[i].childNodes[j].nodeValue.match(/^\{\{([a-zA-Z]+)}}$/g);
8
- var property = result[0].replace("{", "").replace("}", "");
9
- try {
10
- elements[i].childNodes[j].nodeValue = data[property]();
11
- }
12
- catch (e) {
13
- elements[i].childNodes[j].nodeValue = data[property];
14
- }
15
- }
1
+ export function express_langulage(node, data) {
2
+ if (node.hasChildNodes()) {
3
+ for (var j = 0; j < node.childNodes.length; j++) {
4
+ if (node.childNodes[j].nodeType === 3) {
5
+ var result = node.childNodes[j].nodeValue.match(/^\{\{([a-zA-Z]+)}}$/g);
6
+ var property = result[0].replace("{", "").replace("}", "");
7
+ try {
8
+ node.childNodes[j].nodeValue = data[property]();
16
9
  }
10
+ catch (e) {
11
+ node.childNodes[j].nodeValue = data[property];
12
+ }
13
+ }
14
+ else if (node.childNodes[j].nodeType === 1) {
15
+ // @ts-ignore
16
+ express_langulage(node.childNodes[j], data);
17
17
  }
18
18
  }
19
19
  }
@@ -27,7 +27,7 @@ export function cmd(tagTemplate, proto, controller) {
27
27
  //solt
28
28
  extract_solt(tagTemplate.children, controller);
29
29
  //v-el
30
- express_langulage(tagTemplate.children, controller.proxyForMethods);
30
+ express_langulage(controller.root, controller.proxyForMethods);
31
31
  }
32
32
  export function afterCmd(templateSpace, proto, controller) {
33
33
  //v-show
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.0.77",
3
+ "version": "1.0.78",
4
4
  "description": "The core for render-js",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",