element tabel表格错行展示问题

 getTableData (val) {
      this.loading = true;
      let category = this.formData.category && this.formData.category.slice();
      this.formData.categoryId = category && category.length ? category.pop() : null;
      WmsStockApi.query({
        pageNo: this.pageData.pageNo,
        pageSize: this.pageData.pageSize,
        data: this.formData
      }).then(resp => {
        let resData = resp.result.list
        this.pageData.totalCount = resp.result.totalCount
        this.loading = false;
        this.$refs.table.doLayout();
      });
    },

在数据刷新的时候 调用 this.$refs.table.doLayout()即可。

项目中还遇到使用element ui 使用getSummaries 合计那一行没有展示的问题也是这样的解决方式。

猜你喜欢

转载自blog.csdn.net/gyl_sunshine/article/details/122092661