Click the refresh button only to change the main part, navigation bar and sidebar do not change how to achieve?
< template >< div id= "app" > in
app.VUE
<router-view v-if="isRouterAlive"></router-view>
<!-- <router-view></router-view> -->
< / div >
< / template >
< script >
export default {
name: "App",
provide () {
return {
reload: this.reload
}
},
data () {
return {
isRouterAlive:true
}
},
methods: {
reload() {
this.isRouterAlive = false
this.$nextTick(function(){
this.isRouterAlive = true
})
}
}
}
< / script >
export default {
inject: ["reload"],
data () {
return {
},
handleRefres() {
this.reload()
},