render-core 1.0.84 → 1.0.86
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/bin/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare function version(): void;
|
package/bin/bin.js
ADDED
package/core/inject/inject.js
CHANGED
|
@@ -42,7 +42,7 @@ export function injectMethod(controller, proto) {
|
|
|
42
42
|
export function injectWatcher(controller, proto) {
|
|
43
43
|
var methods = Object.getOwnPropertyNames(proto.getWatcher());
|
|
44
44
|
methods.forEach(function (value) {
|
|
45
|
-
Reflect.set(controller.raw_data, value, proto.getWatcher()[value].bind(controller.raw_data));
|
|
45
|
+
Reflect.set(controller.raw_data, "w_" + value, proto.getWatcher()[value].bind(controller.raw_data));
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
/**
|
package/core/proxy/getProxy.js
CHANGED
|
@@ -19,15 +19,15 @@ export function getProxyObject(obj, updater) {
|
|
|
19
19
|
*/
|
|
20
20
|
export function getSetter(data, updater) {
|
|
21
21
|
var setter = function (obj, prop, value) {
|
|
22
|
-
//更新值
|
|
23
|
-
obj[prop] = value;
|
|
24
22
|
//检查是否有watcher
|
|
25
23
|
try {
|
|
26
|
-
obj[prop]();
|
|
24
|
+
obj["w" + prop](obj[prop], value);
|
|
27
25
|
}
|
|
28
26
|
catch (e) {
|
|
29
27
|
console.log(e.message);
|
|
30
28
|
}
|
|
29
|
+
//更新值
|
|
30
|
+
obj[prop] = value;
|
|
31
31
|
//更新前操作
|
|
32
32
|
this.proto.getBeforeUpdate();
|
|
33
33
|
//执行更新
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "render-core",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "The core
|
|
3
|
+
"version": "1.0.86",
|
|
4
|
+
"description": "The core of render-js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"render-core": "./bin/bin.js"
|
|
9
|
+
},
|
|
7
10
|
"scripts": {
|
|
8
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
12
|
},
|