update Table @on-contentmenu event params

This commit is contained in:
梁灏 2020-01-12 13:38:25 +08:00
parent 0b7430090d
commit 617ece1b3e
3 changed files with 6 additions and 5 deletions

View file

@ -342,8 +342,9 @@
osac (s) {
console.log(s);
},
ocm (s) {
ocm (s, e) {
console.log(s);
console.log(e);
},
loadData (item, callback) {
setTimeout(() => {

View file

@ -117,7 +117,7 @@
contextmenuCurrentRow (_index, event, rowKey) {
event.stopPropagation();
if (this.$parent.contentMenu) event.preventDefault();
this.$parent.contextmenuCurrentRow(_index, rowKey);
this.$parent.contextmenuCurrentRow(_index, rowKey, event);
},
getSpan (row, column, rowIndex, columnIndex) {
const fn = this.$parent.spanMethod;

View file

@ -699,11 +699,11 @@
this.$emit('on-row-dblclick', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
}
},
contextmenuCurrentRow (_index, rowKey) {
contextmenuCurrentRow (_index, rowKey, event) {
if (rowKey) {
this.$emit('on-contextmenu', JSON.parse(JSON.stringify(this.getBaseDataByRowKey(rowKey))));
this.$emit('on-contextmenu', JSON.parse(JSON.stringify(this.getBaseDataByRowKey(rowKey))), event);
} else {
this.$emit('on-contextmenu', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
this.$emit('on-contextmenu', JSON.parse(JSON.stringify(this.cloneData[_index])), event);
}
},
getSelection () {