From b0f1c61f8e7605c8b5225b008069478532dfa6ed Mon Sep 17 00:00:00 2001 From: Rijn Date: Fri, 7 Jul 2017 13:01:49 -0500 Subject: [PATCH] add a event @on-select-cancel to Table. #705 --- examples/routers/table.vue | 13 ++++++++++++- src/components/table/table.vue | 4 +--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/examples/routers/table.vue b/examples/routers/table.vue index e4a0191..2639c9a 100644 --- a/examples/routers/table.vue +++ b/examples/routers/table.vue @@ -1,5 +1,5 @@ diff --git a/src/components/table/table.vue b/src/components/table/table.vue index eac3309..555d0cc 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -404,9 +404,7 @@ this.objData[_index]._isChecked = status; const selection = this.getSelection(); - if (status) { - this.$emit('on-select', selection, JSON.parse(JSON.stringify(this.data[_index]))); - } + this.$emit(status ? 'on-select' : 'on-select-cancel', selection, JSON.parse(JSON.stringify(this.data[_index]))); this.$emit('on-selection-change', selection); }, toggleExpand (_index) { -- libgit2 0.21.4