父页面
<router-view v-if="isRouterAlive"></router-view>
export default {
provide () {
return {
reload: this.reload
}
},
data(){
isRouterAlive:true
}
}
methods: {
reload () {
this.isRouterAlive = false
this.$nextTick(function () {
this.isRouterAlive = true
})
}
}
子页面
export default {
inject:['reload']
}
methods: {
this.reload()
}