{{ scope.row.title }}
{{scope.row.edit?'完成':'编辑'}}
行内多个编辑
{{ scope.row.author }}
{{scope.row.edit.author?'完成':'编辑'}}
{{ scope.row.title }}
{{scope.row.edit.title?'完成':'编辑'}}
//=================== script =======================
created() {
this.getList()
},
methods: {
getList() {
this.listLoading = true
//获取数据
fetchList(this.listQuery).then(response => {
const items = response.data.items
this.list = items.map(v => {
//整行
//this.$set(v, 'edit', false)
//多列title和author可编辑
v = Object.assign({}, v, { edit: { title: false, author: false }})
return v
})
this.listLoading = false
})
}
}