elementUI 表格页面层级嵌套过多不及时刷新/错位的解决办法

1.强制刷新(可能会影响性能)

//(嵌套过深需要强制刷新数据)
forceUpdate() {
    this.$forceUpdate();
},

2.页面重新布局(适用于表格错位等问题)

前提需要绑定: <el-form ref="table"></el-form>

this.$refs["table"][0].doLayout(); //重新布局

猜你喜欢

转载自blog.csdn.net/weixin_44805839/article/details/131684408