From ade5dbba527dfd0219188c86acc4a2d0803ebd3c Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Mon, 18 Sep 2017 13:52:40 +0800 Subject: [PATCH] fixed #693 --- examples/routers/table.vue | 10 +++++++--- src/components/table/table.vue | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) 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