Table add content-menu prop & event
This commit is contained in:
parent
2d77fb5f39
commit
0b7430090d
3 changed files with 26 additions and 2 deletions
|
@ -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 = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue