<template>
<view>
<view v-if="show">
异想实验室【1】
</view>
<view v-else>
呜啦啦【2】
</view>
<button type="primary" @click="button_click">按钮</button>
</view>
</template>
<script>
export default {
data() {
return {
show:true,
}
},
methods: {
button_click:function(){
if (this.show===true){
this.show=false
}
else{
this.show=true
}
}
}
}
</script>
<style>
</style>
<template>
<view>
<view v-if="show">
异想实验室【1】
</view>
<view v-else>
呜啦啦【2】
</view>
<button type="primary" @click="button_click">按钮</button>
</view>
</template>
<script>
export default {
data() {
return {
show:true,
}
},
methods: {
button_click:function(){
if (this.show===true){
this.show=false
}
else{
this.show=true
}
}
}
}
</script>
<style>
</style>