ElementUI表格数据自定义合计行

1.ElementUI表格自定义合计行需要在表格组件添加条件

2.在data中定义参数的数组

data() {
    return {
      sumArrs: ['合计']
    }
  },
methods: {
    // 合计
    getSummaries(param) {
      return this.sumArrs
    },
 updated() { //合计视图渲染慢解决
    this.$nextTick(() => {
      this.$refs['dataTable'].doLayout()
    })
  }

 

猜你喜欢

转载自blog.csdn.net/kobe_IT/article/details/129982996
今日推荐