fixed #693
This commit is contained in:
parent
75873f9019
commit
ade5dbba52
2 changed files with 9 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<Table highlight-row :columns="columns3" :data="data1" ref="table" @on-current-change="handleChange"></Table>
|
||||
<Table highlight-row :columns="columns3" :data="data1" ref="table" @on-current-change="handleChange" @on-row-click="rc"></Table>
|
||||
<Button @click="handleClear">clear</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -20,7 +20,8 @@
|
|||
},
|
||||
{
|
||||
title: '年龄',
|
||||
key: 'age'
|
||||
key: 'age',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '地址',
|
||||
|
@ -56,7 +57,10 @@
|
|||
this.$refs.table.clearCurrentRow();
|
||||
},
|
||||
handleChange (newData, oldData) {
|
||||
console.log(newData, oldData)
|
||||
// console.log(newData, oldData)
|
||||
},
|
||||
rc (data, index) {
|
||||
console.log(data, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -398,11 +398,11 @@
|
|||
},
|
||||
clickCurrentRow (_index) {
|
||||
this.highlightCurrentRow (_index);
|
||||
this.$emit('on-row-click', JSON.parse(JSON.stringify(this.cloneData[_index])));
|
||||
this.$emit('on-row-click', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
|
||||
},
|
||||
dblclickCurrentRow (_index) {
|
||||
this.highlightCurrentRow (_index);
|
||||
this.$emit('on-row-dblclick', JSON.parse(JSON.stringify(this.cloneData[_index])));
|
||||
this.$emit('on-row-dblclick', JSON.parse(JSON.stringify(this.cloneData[_index])), _index);
|
||||
},
|
||||
getSelection () {
|
||||
let selectionIndexes = [];
|
||||
|
|
Loading…
Add table
Reference in a new issue