Skip to content

Commit c05b304

Browse files
committed
优化
1 parent 3df9a7d commit c05b304

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/ve-table/src/index.jsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,12 +444,15 @@ export default {
444444
},
445445
columns: {
446446
handler(newVal, oldVal) {
447-
if (newVal != oldVal) {
448-
this.columnsOptionResetTime++;
449-
}
450447
this.initColumns();
451448
this.initGroupColumns();
452-
this.initScrolling();
449+
450+
// 排除首次
451+
if (newVal != oldVal && oldVal) {
452+
this.columnsOptionResetTime++;
453+
// 需要等待 initColumns 和 initGroupColumns 先执行
454+
this.initScrolling();
455+
}
453456
},
454457
immediate: true,
455458
},

0 commit comments

Comments
 (0)