当el-table被封装在子组件时,tableData发生变化,数据没有重新渲染

解决方法:为该子组件绑定一个key,每次tableData发生变化时,改变这个key

<Table
        class="card-table"
        :tableData="tableData"
        :tableHeader="dataHeader"
        :key="timeStamp"
        v-if="!config.template && value == 1"
      />

  

watch: {
    // 监听页码页宽
    pageQuery: {
      handler(val) {
        this.timeStamp = new Date()
      },
      deep: true
    },
  },

 el-table在Vue组件中数据更新不渲染的bug

相关文章:

  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2022-01-07
  • 2021-12-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2023-02-09
  • 2021-06-20
  • 2021-09-08
相关资源
相似解决方案