update 字典数据在表格中编辑
This commit is contained in:
@@ -159,7 +159,18 @@ export default {
|
||||
onResetQuery() {
|
||||
this.$emit('resetQuery')
|
||||
this.$emit('reset-query')
|
||||
}
|
||||
},
|
||||
|
||||
onAddRow(row = {}) {
|
||||
if (!this.data.find(p => !p.id))
|
||||
this.data.push(row)
|
||||
},
|
||||
|
||||
onDeleteRow(row) {
|
||||
if (row && this.data.indexOf(row) > -1) {
|
||||
this.data.splice(this.data.indexOf(row), 1)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
render() {
|
||||
@@ -171,7 +182,8 @@ export default {
|
||||
bordered: true,
|
||||
size: 'middle',
|
||||
rowKey: record => record.id || Math.random().toString(16).slice(2),
|
||||
scroll: { x: 'max-content' }
|
||||
scroll: { x: 'max-content' },
|
||||
...this.$attrs
|
||||
}
|
||||
|
||||
const on = {
|
||||
|
||||
Reference in New Issue
Block a user