t<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
[v-cloak]{
display:none;
}
</style>
</head>
<body>
<div id="app" >
<p v-model="name">{{name}}</p>
<my></my>
<div @click.self="calc1">
<a @click="calc">xxx
<a @click="calc2"></a>
</a>
</div>
<select name="" id="select1" v-model="cs">
<option value="+">+</option>
<option value="-">-</option>
<option value="*">*</option>
<option value="/">/</option>
</select>
</div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
const vm=Vue.createApp({
data(){
return {count:4,
name:"aaa",
gogogo:"color:red;",
cs:'+'
}
},
created(){
console.log("xxxx");
},
beforeCreate(){
},
methods:{
calc(){
console.log("111");
console.log(this.cs);
},
calc1(){
console.log("222");
},
calc2(){
console.log("333");
}
},
components:{
my:{
template:'<h2>xxxxx</h2>'
}
}
}).mount("#app");
</script>
</html>