今天写项目有一个需求,是要进入某个路由时重新渲染reload,找出了这么一段代码实现
routeReload(){
this.reloadFlag = false
let ToggleMultipage = "ToggleMultipage"
this.$store.dispatch(ToggleMultipage,false)
this.$nextTick(()=>{ this.$store.dispatch(ToggleMultipage,true)
this.reloadFlag = true })
},