From ade5dbba527dfd0219188c86acc4a2d0803ebd3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= 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 6ca563b5..72500181 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 d6942691..51a5b32b 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 = [];