如圖刷新右邊
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)
})
}
我現在牙疼,就簡單寫一下,具體有問題的可以直接問我