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">