Line breaks cannot be used as statement delimiters
Version
3.1.4
Reproduction link
Steps to reproduce
<template>
<div>
<p>{{msg}}</p>
<button @click="
msg=msg msg
getconsole()
">click_test</button>
</div>
</template>
<script>
export default {
name: "click_test",
data(){
return{
msg:'test'
}
},
methods:{
getconsole(){
console.log("click function")
}
}
}
</script>
What is expected?
do not need to add ';'
What is actually happening?
when npm run serve,it will have a wrong message. Must add a ';' or ',' between "msg=msg msg" and " getconsole()". the ';' is not necessary in vue2