elementUI table固定列渲染错位

1、问题

问题

3、解决

官方

1、可以在获取数据的方法中添加 this.$refs.multipleTable.doLayout()

注意: 是在获取到数据之后

/**获取列表数据**/
      GET_ContractList() {
        API_Purchase[fn](this.params).then(response => {
          this.loading = false
          if (response.code && response.code === 200) {
            const list = response.data.records
            list.forEach(item => {
              if (item.rate) {
                item.rate = Number(item.rate) * 100
              }
            })
            this.tableData = {
              ...response.data,
              records: list
            }
            //
            this.$refs.multipleTable.doLayout()
          } else {
            this.$message.error(response.msg || '系统错误,请联系客服')
          }
        })
posted @ 2021-11-17 16:54  .爬行的蜗牛  阅读(419)  评论(0编辑  收藏  举报
Document