Table tree support on-row-dbclick
This commit is contained in:
parent
cb6477e080
commit
20fb34b2b0
2 changed files with 12 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
|||
highlight-row
|
||||
@on-current-change="occ"
|
||||
@on-row-click="orc"
|
||||
@on-row-dblclick="ordc"
|
||||
ref="selection"
|
||||
:columns="columns4"
|
||||
:data="data1"
|
||||
|
@ -151,6 +152,10 @@
|
|||
// console.log(o);
|
||||
},
|
||||
orc (data, index) {
|
||||
// console.log(data);
|
||||
// console.log(index);
|
||||
},
|
||||
ordc (data, index) {
|
||||
console.log(data);
|
||||
console.log(index);
|
||||
}
|
||||
|
|
|
@ -682,9 +682,13 @@
|
|||
this.$emit('on-row-click', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
|
||||
}
|
||||
},
|
||||
dblclickCurrentRow (_index) {
|
||||
this.highlightCurrentRow (_index);
|
||||
dblclickCurrentRow (_index, rowKey) {
|
||||
this.highlightCurrentRow (_index, rowKey);
|
||||
if (rowKey) {
|
||||
this.$emit('on-row-dblclick', JSON.parse(JSON.stringify(this.getCloneDataByRowKey(rowKey))));
|
||||
} else {
|
||||
this.$emit('on-row-dblclick', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
|
||||
}
|
||||
},
|
||||
getSelection () {
|
||||
let selectionIndexes = [];
|
||||
|
|
Loading…
Add table
Reference in a new issue