diff --git a/src/components/table/table-head.vue b/src/components/table/table-head.vue index 9a39d949f..5a31ad5b3 100644 --- a/src/components/table/table-head.vue +++ b/src/components/table/table-head.vue @@ -309,7 +309,7 @@ const finalLeft = parseInt(resizeProxy.style.left, 10); const columnWidth = finalLeft - startColumnLeft; - const _column = table.allColumns.find(item => item.__id === column.__id); + const _column = table.cloneColumns.find(item => item.__id === column.__id); if (_column) { _column.width = columnWidth; column.width = columnWidth; diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 2afbb43fe..e6af01741 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -1378,7 +1378,9 @@ makeColumnsId (columns) { const cloneColumns = deepCopy(columns); return cloneColumns.map(item => { - if ('children' in item) this.makeColumnsId(item.children); + if ('children' in item) { + item.children = this.makeColumnsId(item.children); + } item.__id = getRandomStr(6); return item; });