guy 7 years ago
parent
commit
106f6638e7
  1. 14
      demo/js/fix-2.0/demo.js
  2. 14
      dist/demo.js
  3. 2
      dist/fix/fix.js

14
demo/js/fix-2.0/demo.js

@ -12,24 +12,24 @@ Demo.Computed = BI.inherit(Fix.VM, {
return this.name + 1
},
c: function () {
return this.name + this.b
return this.arr[1].n + this.b
}
}
})
Demo.Store = BI.inherit(Fix.VM, {
_init: function () {
this.computed = new Demo.Computed(model).model;
this.comp = new Demo.Computed(model).model;
},
computed: {
b: function () {
return this.computed.c + 1
},
return this.comp.c + 1
}
},
methods: {
actions: {
run: function () {
var t = this.model.b;
this.computed.name = 2;
this.comp.name = 2;
this.comp.arr[1].n = "c"
}
}
});

14
dist/demo.js vendored

@ -10084,24 +10084,24 @@ Demo.Computed = BI.inherit(Fix.VM, {
return this.name + 1
},
c: function () {
return this.name + this.b
return this.arr[1].n + this.b
}
}
})
Demo.Store = BI.inherit(Fix.VM, {
_init: function () {
this.computed = new Demo.Computed(model).model;
this.comp = new Demo.Computed(model).model;
},
computed: {
b: function () {
return this.computed.c + 1
},
return this.comp.c + 1
}
},
methods: {
actions: {
run: function () {
var t = this.model.b;
this.computed.name = 2;
this.comp.name = 2;
this.comp.arr[1].n = "c"
}
}
});

2
dist/fix/fix.js vendored

@ -911,7 +911,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
this.model = createViewModel$1({}, props);
this.$$model && (this.model.__ob__ = this.$$model.__ob__);
initComputed(this, this.computed);
initMethods(this, this.methods);
initMethods(this, this.actions);
this._init();
}

Loading…
Cancel
Save