javascript - Is there any way for vue-router to load the component after loading the data?
習慣沉默
習慣沉默 2017-05-16 13:37:09
0
2
435

Is there any way to load the data first and then load the component? Now the structure is loaded but the data is not visible and it is ugly.

習慣沉默
習慣沉默

reply all(2)
小葫芦

You can use placeholder image first. Like Tencent News. When opening the page, first display the placeholder image

巴扎黑

This can be achieved through routing hooks.
vue-router2.x api: http://router.vuejs.org/zh-cn...
vue-router1.x example: /a/11...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!