如图刷新右边
1.添加刷新方法,
export function refresh(that) {
that.$router.replace({
path: '/refresh',
query: {}
})
}
2.调用
let that = this
setTimeout(() => {
refresh(that)
},2000)
3.添加空白页
export default {
beforeRouteEnter(to, from, next) {
next(vm => {
vm.$router.replace(from.path)
})
}
我现在牙疼,就简单写一下,具体有问题的可以直接问我