Home > Web Front-end > Vue.js > What should I do if the Vue interface does not display when refreshed?

What should I do if the Vue interface does not display when refreshed?

藏色散人
Release: 2023-01-13 00:44:44
Original
4813 people have browsed it

The solution to the problem that the vue interface does not display when refreshing: first open the corresponding code file; then use "this.$router.go(0)" and "location.reload()" in vue; finally use control Just show and hide "" to refresh the entire page.

What should I do if the Vue interface does not display when refreshed?

The operating environment of this tutorial: Windows 7 system, vue version 2.9, Dell G3 computer.

Recommended: "vue tutorial"

Vue page refresh does not appear a blank page

Sometimes during the design and implementation process, We need to refresh the entire page, but a general refresh will cause a blank page, making the page ugly. In vue, we use

this.$router.go(0) 和 location.reload()
Copy after login

which will make the page appear blank. Finally, we found a way to refresh the page. function, and prevent the page from appearing blank, the code is as follows:

this.isRouterAlive = false
this.$nextTick(function () {
this.isRouterAlive = true
})
Copy after login

Use the display and hiding of to refresh the entire page

For more programming-related knowledge, please visit: Programming Teaching! !

The above is the detailed content of What should I do if the Vue interface does not display when refreshed?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
vue
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template