Table tree support @on-row-click

This commit is contained in:
梁灏 2020-01-06 17:32:29 +08:00
parent cd68d23fdb
commit cb6477e080
2 changed files with 20 additions and 5 deletions

View file

@ -676,8 +676,11 @@
},
clickCurrentRow (_index, rowKey) {
this.highlightCurrentRow (_index, rowKey);
// todo
this.$emit('on-row-click', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
if (rowKey) {
this.$emit('on-row-click', JSON.parse(JSON.stringify(this.getCloneDataByRowKey(rowKey))));
} else {
this.$emit('on-row-click', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
}
},
dblclickCurrentRow (_index) {
this.highlightCurrentRow (_index);