diff --git a/src/components/table/table-head.vue b/src/components/table/table-head.vue index a458a2c..ecb2e98 100644 --- a/src/components/table/table-head.vue +++ b/src/components/table/table-head.vue @@ -68,13 +68,18 @@ style: Object, columns: Array, objData: Object, + data: Array, // rebuildData fixed: Boolean }, computed: { isSelectAll () { let isSelectAll = true; - for (let i in this.objData) { - if (!this.objData[i]._isChecked) isSelectAll = false; + + for (let i = 0; i < this.data.length; i++) { + if (!this.objData[this.data[i]._index]._isChecked) { + isSelectAll = false; + break; + } } return isSelectAll; diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 5913961..c5f370e 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -7,7 +7,8 @@ :prefix-cls="prefixCls" :style="tableStyle" :columns="cloneColumns" - :obj-data="objData"> + :obj-data="objData" + :data="rebuildData">
+ :obj-data="objData" + :data="rebuildData">
+ :obj-data="objData" + :data="rebuildData">
{ + this.objData[data._index]._isChecked = status; + }); const selection = this.getSelection(); if (status) { diff --git a/test/routers/table.vue b/test/routers/table.vue index 26ed5c6..1eb403b 100644 --- a/test/routers/table.vue +++ b/test/routers/table.vue @@ -198,8 +198,8 @@ this.$Message.info(this.data[index].name); }, current (newData, oldData) { - console.log(newData); - console.log(oldData); +// console.log(newData); +// console.log(oldData); }, select (a,b){ // console.log(a); @@ -209,7 +209,7 @@ // console.log(a) }, sall (a) { -// console.log(a) + console.log(a) }, rowClsName (row, index) { if (index == 1) { @@ -238,7 +238,7 @@ // edit: false // }); // this.data.splice(0, 1); - this.columns.splice(2,1) +// this.columns.splice(2,1) }, 3000); } } -- libgit2 0.21.4