< template >
<div @click="loginFn">aaaa</div>
< / template >
< script >
export default {
data () {
return {
}
},
methods: {
loginFn () {
// alert(1)
console.log("hehe")
}
},
mounted () {
console.log("hehe-mounted")
}
}
< / script >
there are two problems:
1. Does the event not work?
2. Mounted is not executed? It is executed in the created phase, so why doesn"t mounted execute it?