vue學習(九) set用法
阿新 • • 發佈:2018-12-19
1,示例程式碼
|
2,在控制檯輸入
Vue.set(app.list,1,{id:'003',name:'hhhh'})
//app.$set(app.list,0,{id:'004',name:'ahshhs'})
Vue.set(app.userInfo,'sex','男')
//app.$set(app.userInfo,'phone','12345678')
頁面會及時更新
3,運算元組有7中方法
push pop shift unshift splice sort reverse