vue中的变异方法之splice:
增加:
function add () {
this.list.splice(index,0,newItem)
}
修改:
function update () {
this.list.splice(index,1,newItem)
}
删除:
function update () {
this.list.splice(index,1)
}
vue中的变异方法之splice:
增加:
function add () {
this.list.splice(index,0,newItem)
}
修改:
function update () {
this.list.splice(index,1,newItem)
}
删除:
function update () {
this.list.splice(index,1)
}