Bootstrap

html表格里面加input,el-table中实现点击表格实现填充input实现编辑

bVXfGO?w=1127&h=83

{{ scope.row.title }}

{{scope.row.edit?'完成':'编辑'}}

行内多个编辑

bVXf6F?w=1231&h=487

{{ 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

})

}

}

;