<div @click="handleClick">{{msg}}</div><script>export default { name: "app", data() { return { msg: "hello world", }; }, //事件集中写在methods属性中 methods:{ handleClick(){ this.msg = "change" } }};</script> @click.native //给组件事件必须加上native修饰符