<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="js/vue.js"></script>
</head>
<body>
<div class="main">
<div v-if="ok">
Sorry
</div>
<div v-else>
<span @click="add">
Not sorry
</span> </div> <div v-show="ok" @click="add">
show
</div>
</div>
<script>
var vm=new Vue({
el:".main",
data:{
ok:true
},
methods:{
add(){
this.ok=!this.ok;
}
}
})
</script>
</body>
</html>