element -Ui,表格el-table设置高度之后合计行不显示解决方法

<template>
    <el-table
        ref="table"
        :height="500"
        :data="dataSource"
        show-summary
    />
</template>

<script>
export default {
    data() {
        return {
            dataSource: []
        }
    },
    updated() {
        this.$nextTick(() => {
            this.$refs.table.doLayout()
        })
    }
    
}
</script>

 

 

 

 

 

在此更新方法中使用更新表格组件

updated() {
   this.$nextTick(() => {
       this.$refs.table.doLayout()
   })
}

 

posted @ 2022-08-17 10:29  八月正凉  阅读(786)  评论(0编辑  收藏  举报