Table add content-menu prop & event

This commit is contained in:
梁灏 2020-01-12 13:33:48 +08:00
parent 2d77fb5f39
commit 0b7430090d
3 changed files with 26 additions and 2 deletions

View file

@ -266,6 +266,11 @@
// 4.1.0
loadData: {
type: Function
},
// 4.1.0
contentMenu: {
type: Boolean,
default: false
}
},
data () {
@ -694,6 +699,13 @@
this.$emit('on-row-dblclick', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
}
},
contextmenuCurrentRow (_index, rowKey) {
if (rowKey) {
this.$emit('on-contextmenu', JSON.parse(JSON.stringify(this.getBaseDataByRowKey(rowKey))));
} else {
this.$emit('on-contextmenu', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
}
},
getSelection () {
//
let selectionIndexes = [];