diff --git a/frontend/src/hooks/useTableStore.ts b/frontend/src/hooks/useTableStore.ts index 5c5f9f11e7..36fb4aae29 100644 --- a/frontend/src/hooks/useTableStore.ts +++ b/frontend/src/hooks/useTableStore.ts @@ -79,7 +79,7 @@ export default function useTableStore() { if (!isEqual) { column.forEach((col) => { - const storedCol = oldColumn.find((sc) => sc.dataIndex === col.dataIndex); + const storedCol = tableColumnsMap.column.find((sc) => sc.dataIndex === col.dataIndex); if (storedCol) { col.width = storedCol.width; // 使用上一次拖拽存储的宽度,避免组件里边使用时候初始化到最初的列宽 }