diff --git a/src/components/table/table-body.vue b/src/components/table/table-body.vue
index 510b23d6..65ee8c33 100644
--- a/src/components/table/table-body.vue
+++ b/src/components/table/table-body.vue
@@ -47,7 +47,6 @@
[`${this.prefixCls}-row-highlight`]: this.cloneData[index] && this.cloneData[index]._isHighlight,
[`${this.prefixCls}-row-hover`]: this.cloneData[index] && this.cloneData[index]._isHover
}
-
]
},
setCellWidth (column, index) {
diff --git a/src/components/table/table-head.vue b/src/components/table/table-head.vue
index adb08141..0a24371e 100644
--- a/src/components/table/table-head.vue
+++ b/src/components/table/table-head.vue
@@ -57,16 +57,6 @@
selectAll () {
const status = !this.isSelectAll;
this.$parent.selectAll(status);
-
-// let tmpData = deepCopy(this.cloneData);
-// tmpData.forEach((data) => {
-// data._isChecked = status;
-// });
-// this.cloneData = tmpData;
-//
-// if (status) {
-// this.$parent.selectAll();
-// }
}
}
}
diff --git a/src/components/table/table.vue b/src/components/table/table.vue
index 8e2f1b2d..51df5825 100644
--- a/src/components/table/table.vue
+++ b/src/components/table/table.vue
@@ -179,6 +179,7 @@
this.columnsWidth = [];
let autoWidthIndex = -1;
if (allWidth) autoWidthIndex = this.cloneColumns.findIndex(cell => !cell.width);
+ console.log(1)
const $td = this.$refs.tbody.$el.querySelectorAll('tbody tr')[0].querySelectorAll('td');
for (let i = 0; i < $td.length; i++) { // can not use forEach in Firefox
@@ -328,6 +329,7 @@
},
columns: {
handler () {
+ this.cloneColumns = deepCopy(this.columns);
this.parseColumns();
this.handleResize();
},
diff --git a/test/routers/table.vue b/test/routers/table.vue
index 2becea1e..5b524acc 100644
--- a/test/routers/table.vue
+++ b/test/routers/table.vue
@@ -74,7 +74,7 @@
title: '操作',
key: 'action',
fixed: 'right',
- width: 200,
+ width: 120,
render (row, column, index) {
return `${row.name}`
// return `${row.name}`
@@ -145,6 +145,8 @@
},
ready () {
setTimeout(() => {
+// this.columns[3].width = 300;
+// this.columns[2].width = 150;
// return;
// this.height = 150;
// return
@@ -155,7 +157,7 @@
// edit: false
// });
// this.data.splice(1, 1)
- }, 1000);
+ }, 2000);
}
}
\ No newline at end of file