When vue router switches pages, Catton: the current page pauses for a while before switching to the new page.

when vue router switches pages, there will be stutters:
pauses on the current page (and scrolls to the top) before switching to the new page

the address bar changes immediately. Back to the top is the configuration item of the route, indicating that the route has taken effect. The preliminary judgment is that the rendering of the target page is relatively slow, resulting in stutters in the screen. Does anyone know how to solve this problem?

Mar.01,2021

the outermost layer is laid out at 100%, followed by a scroll

overflow: scroll;
-webkit-overflow-scrolling: touch;

so that you don't roll to the top during route switching

you can refer to vux's demo homepage
https://github.com/airyland/v.

.

has it been solved? Did I have the same problem?


keep-alive caches the current page
https://www.zhihu.com/questio.


you can use keep-alive to cache data with its two hook functions activated. If you want to get the data back, you have to write created


House owner in this function. Have you solved it?


add or remove mode from the router-view tag


I also encountered this problem, and then in the meta of index.html, I added the prohibition of zooming, which is fine, but the principle in it is still unknown


.

I also encountered the same problem. After debug for a long time, I found that an interface was requested in the router.beforeEach hook (getting user info), stutter is caused by the request time of this interface, so I ok it with one request

).

has nothing to do with keep-alive


you should use lazy loading, click to load the page, there will be a certain delay, you can use asynchronous components to solve. ide/components-dynamic-async.html" rel=" nofollow noreferrer "> https://cn.vuejs.org/v2/guide.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7b7dd3-29c9f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7b7dd3-29c9f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?