elementUI 表格页面层级嵌套过多不及时刷新/错位的解决办法
1.强制刷新(可能会影响性能)
//(嵌套过深需要强制刷新数据)
forceUpdate() {
this.$forceUpdate();
},
2.页面重新布局(适用于表格错位等问题)
前提需要绑定: <el-form ref="table"></el-form>
this.$refs["table"][0].doLayout(); //重新布局
//(嵌套过深需要强制刷新数据)
forceUpdate() {
this.$forceUpdate();
},
前提需要绑定: <el-form ref="table"></el-form>
this.$refs["table"][0].doLayout(); //重新布局