[英]Loading spinner before app rendered in vue.js
I'm working on vue.js app and I want to add a loading spinner before the app component rendered.. like what Instagram doing when opening the Instagram page it shows their logo before showing the page contents .. I tried a lot of solutions but not working well!我正在开发 vue.js 应用程序,我想在应用程序组件呈现之前添加一个加载微调器..就像 Instagram 在打开 Instagram 页面时所做的那样,它在显示页面内容之前显示了他们的徽标.. 我尝试了很多解决方案但效果不佳!
any idea ?任何的想法 ? thanks in advance :)
提前致谢 :)
initially keep a state variable like showLoading : true最初保留一个状态变量,如 showLoading : true
if(showLoading) {
this.displayLoader();
return;
}
else {
render (); //your main view
} }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.