Vue 点击按钮出现,再次点击消失

Html代码:

Vue代码:

new Vue({
			el:".demo",
			data:{
				showArea:true
			},
			methods:{
				change:function(){
					if(this.showArea){
						this.showArea=false
					}else{
						this.showArea=true
					}
				}
			}
		})

你可能感兴趣的:(Vue 点击按钮出现,再次点击消失)