I have an avatar widget built with Vue.js on a sidebar in my app. It takes a split-second to load and this causes the sidebar to jank. Is there a way that I can show plain HTML in place of the Vue app while it is loading? Basically the opposite of v-cloak
.
You can manually show html using beforeCreate yada beforeMount.
new Vue({
el: '#editor',
data: {
input: '# hello'
},
beforeCreate: function () {
this.a = "First Value";
console.log("First Value");
},
created: function () {
this.a = "Second Value";
console.log("Second Value");
},
beforeMount: function () {
this.a = "Third Value";
console.log("Third Value");
}
})
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.