First you need to modify App.vue. <template> <!-- Company Management --> <div class="companyManage"> <router-view v-if="isRouterAlive"></router-view> </div> </template> <script> export default { name: "companyManage", watch: {}, provide() { return { reload:this.reload } }, data() { return { isRouterAlive:true }; }, methods: { reload() { this.isRouterAlive = false; this.$nextTick( () => { this.isRouterAlive = true; }) } }, mounted() {} }; </script> <style scoped> .companyManage { width: 100%; height: 100%; position: relative; background: #fff; } </style> 2. Go to the page that needs to be refreshed to reference it, use inject to import the reference reload, and then call it directly. inject:["reload"], this.reload(); This is the end of this article about Vue's partial page refresh (router-view page refresh). For more relevant Vue page partial refresh content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Exploring the use of percentage values in the background-position property
>>: Tutorial on installing nginx in Linux environment
Achieve results html <div class="containe...
TRUNCATE TABLE Deletes all rows in a table withou...
This is an important (and wonderful) topic for Li...
VMware Preparation CentOS preparation, here is Ce...
Mysqldump is used for logical backup in MySQL. Al...
This article shares the installation steps of MyS...
0. Why do we need remote development? When develo...
Table of contents Preface JS Magic Number Storing...
Using UNION Most SQL queries consist of a single ...
This question is a discussion among netizens in a...
<a href="http://" style="cursor...
Table of contents Build Vuex environment Summariz...
The ECS cloud server created by the historical Li...
deepin and Ubuntu are both distributions based on...
Earlier we talked about how to make a square with...