render-core 1.2.4 → 1.2.5

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,6 +1,7 @@
1
1
  import { inject, injectComputed, injectMethod, injectWatcher } from "../inject/inject";
2
2
  import { getProxyObject } from "../proxy/getProxy";
3
3
  import { getCodeSpaceForCommit, getCodeSpaceForProperty, getCodeSpaceForPublish, getCommitMethod, getPublishMethod, getSetterMethod } from "../utility/injectUtility";
4
+ import { dataInject } from "../utility/dataUtility";
4
5
  /**
5
6
  * This function is used to initiate the component controller object.
6
7
  * @param controller
@@ -16,7 +17,7 @@ export function controllerCycleTypeOne(controller, proto, child, link, tagTempla
16
17
  }
17
18
  export function controllerCycleTypeTwo(controller, proto, child, link, tagTemplate) {
18
19
  //复制原始数据对象到控制对象
19
- controller.raw_data = Object.create(proto.getData());
20
+ controller.raw_data = dataInject(proto.getData());
20
21
  cycleBridge(controller, proto, child, link, tagTemplate);
21
22
  }
22
23
  function cycleBridge(controller, proto, child, link, tagTemplate) {
@@ -0,0 +1 @@
1
+ export declare function dataInject(data: any): any;
@@ -0,0 +1,8 @@
1
+ export function dataInject(data) {
2
+ var out = {};
3
+ var keys = data.getOwnPropertyNames();
4
+ keys.forEach(function (value) {
5
+ out[value] = data[value];
6
+ });
7
+ return out;
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "The core of render-js",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",