hb-crud-x
Version:
d2-crud改进版
34 lines (32 loc) • 746 B
JavaScript
export default {
data () {
return {
/**
* @description 被编辑行的索引
*/
editIndex: 0
}
},
methods: {
/**
* @description 编辑行数据
* @param {Number} index 行所在索引
* @param {Object} row 行数据
*/
handleView (index, row, templage = null) {
this.formMode = 'view'
this.globalDisabled = true
this.btnOptions = false
this.$emit('dialog-open', {
mode: 'edit',
row
})
this.editIndex = index
if (!templage) {
templage = this.editTemplate
}
console.log('------执行handleView------', templage)
this.openDialog(index, row, templage)
}
}
}