如果在執行個體建立之後添加新的屬性到執行個體上,它不會觸發視圖更新。
1. event.children = children;
// 為vue變量添加屬性,這句代碼比上句更robust!
2. this.$set(event,'children',children);
如果在執行個體建立之後添加新的屬性到執行個體上,它不會觸發視圖更新。
1. event.children = children;
// 為vue變量添加屬性,這句代碼比上句更robust!
2. this.$set(event,'children',children);