Skip to content

Commit 2b00c06

Browse files
authored
fix: the table height remains unchanged when modifying maxheight (#4216)
1 parent aa62899 commit 2b00c06

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/vue/src/grid/src/table/src/methods.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,6 +1184,8 @@ const Methods = {
11841184
if (!_tableVisible) {
11851185
return
11861186
}
1187+
// 先更新 bodyWrapperMaxHeight,minHeight/height,确保之后用新值
1188+
this.updateStyle()
11871189

11881190
if (!bodyWrapper) {
11891191
return this.computeScrollLoad()

packages/vue/src/grid/src/table/src/table.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,12 @@ export default defineComponent({
531531
height() {
532532
this.$nextTick(this.recalculate)
533533
},
534+
maxHeight() {
535+
this.$nextTick(this.recalculate)
536+
},
537+
minHeight() {
538+
this.$nextTick(this.recalculate)
539+
},
534540
syncResize(value) {
535541
// 是否自动根据状态属性去更新响应式表格宽高
536542
value && this.$nextTick(this.recalculate)

0 commit comments

Comments
 (0)