diff --git a/examples/routers/table.vue b/examples/routers/table.vue index 6ca563b..7250018 100644 --- a/examples/routers/table.vue +++ b/examples/routers/table.vue @@ -1,6 +1,6 @@ @@ -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); } } } diff --git a/src/components/table/table.vue b/src/components/table/table.vue index d694269..51a5b32 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -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 = []; -- libgit2 0.21.4