路由/userAudit和/userManage共用了同一个view,table有selection, a, b, c, 操作五个列,/userManage显示a, c, 操作三列;/userAudit显示selection, a, b三列。
当路由在/userAudit和/userManage间切换的时候,列表显示出现问题,
<el-table v-if="renderTable"></el-table>
data() {
return {
renderTable: true
}
},
beforeRouteLeave (to, from, next) {
this.loadTable = false;
next()
},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.loadTable = true;
})
}
版权声明:本文为qq_28259083原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。