"Show and hide to refresh the entire page."/> "Show and hide to refresh the entire page.">

Home  >  Article  >  Web Front-end  >  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?

藏色散人
藏色散人Original
2020-12-03 10:07:274732browse

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 "975b587bf85a482ea10b0a28848e78a4" 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()

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
})

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!

Statement:
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
Previous article:Is vue.js a framework?Next article:Is vue.js a framework?