render-core 1.0.131 → 1.2.1

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.
@@ -12,7 +12,7 @@ var Component = /** @class */ (function () {
12
12
  this.mode = "box";
13
13
  }
14
14
  else {
15
- this.mode = "insert";
15
+ this.mode = config.mode;
16
16
  }
17
17
  //添加box样式
18
18
  if (typeof config.boxStyle === "undefined") {
@@ -2,6 +2,7 @@ import { Component } from "../component/component";
2
2
  export declare class ComponentController {
3
3
  root: ParentNode;
4
4
  proto: Component;
5
+ mode: string;
5
6
  solt: Map<string, any>;
6
7
  link: Map<string, {}>;
7
8
  to: ComponentController[];
@@ -7,6 +7,7 @@ var ComponentController = /** @class */ (function () {
7
7
  this.solt = new Map();
8
8
  this.computed = {};
9
9
  this.watcher = {};
10
+ this.mode = "box";
10
11
  }
11
12
  //接收器
12
13
  ComponentController.prototype.receiver = function (method) {
@@ -19,6 +19,10 @@ export function getProxyObject(obj, updater) {
19
19
  */
20
20
  export function getSetter(data, updater) {
21
21
  var setter = function (obj, prop, value) {
22
+ if (this.mode !== "box") {
23
+ console.log("Not box element can not to update data!");
24
+ return false;
25
+ }
22
26
  //检查是否有watcher
23
27
  try {
24
28
  this.watcher[prop](obj[prop], value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.0.131",
3
+ "version": "1.2.1",
4
4
  "description": "The core of render-js",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",