diff --git a/demo/js/fix-2.0/demo.js b/demo/js/fix-2.0/demo.js index ccfeb12b6..fe1d2ce46 100644 --- a/demo/js/fix-2.0/demo.js +++ b/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" } } }); diff --git a/dist/demo.js b/dist/demo.js index 4fa538c59..4e6b12974 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -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" } } }); diff --git a/dist/fix/fix.js b/dist/fix/fix.js index f07bc4798..534d30b41 100644 --- a/dist/fix/fix.js +++ b/dist/fix/fix.js @@ -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(); }