Browse Source

修改

research/test
jian 1 year ago
parent
commit
23c8c02102
  1. 7
      examples/watch-order.html

7
examples/watch-order.html

@ -16,7 +16,7 @@
widget: { widget: {
name: "触发arr和dims变化", name: "触发arr和dims变化",
arr: [], arr: [],
dims: {}, dims: [],
} }
}; };
}, },
@ -84,11 +84,12 @@
addArrFirst: function () { addArrFirst: function () {
// 修改arr在前,先触发arr的watch 再触发widget.**的监听 // 修改arr在前,先触发arr的watch 再触发widget.**的监听
this.model.widget.arr.push(BI.UUID()); this.model.widget.arr.push(BI.UUID());
Fix.set(this.model.widget.dims, BI.UUID(), {}); this.model.widget.dims.push(BI.UUID());
}, },
addDimFirst: function () { addDimFirst: function () {
// 修改dim在前先执行 widget.** 再出发arr的watch // 修改dim在前先执行 widget.** 再出发arr的watch
Fix.set(this.model.widget.dims, BI.UUID(), {}); this.model.widget.dims.push(BI.UUID());
this.model.widget.arr.push(BI.UUID()); this.model.widget.arr.push(BI.UUID());
} }
} }

Loading…
Cancel
Save