module.eksport = {
data: function(){
return {
memberQrcodeState: false
}
},
components: {memberQrcode},
created: function(){
},
beforeRouteEnter: function(to, from, next) {
// 在渲染該組件的對(duì)應(yīng)路由被 confirm 前調(diào)用
// 不!能!獲取組件實(shí)例 `this`
// 因?yàn)楫?dāng)鉤子執(zhí)行前,組件實(shí)例還沒被創(chuàng)建
//$e.target.src= require("../imgs/test/232.jpg")
next();
return true;
},
methods: {
},
beforeRouteLeave: function(to, from, next) {
// 導(dǎo)航離開該組件的對(duì)應(yīng)路由時(shí)調(diào)用
// 可以訪問組件實(shí)例 `this`
next();
}
};
Tambah fungsi yang akan dilaksanakan selepas halaman dimuatkan! Saya orang baru, saya berhubung dengan vuejs pada keesokan harinya, saya harap seseorang boleh memberi saya nasihat
mounted(){
this.init()
},
methods:{
init(){
console.log('hello,world')
}
}
Untuk rujukan sahaja~