toggle - vue 点击组件弹出组件
- burger icon绑定事件
@click="toggle()"
- 写toggle方法
methods:{
toggle: function () {
this.isShow=!this.isShow
}
}
- 在data中增加默认值
data
@click="toggle()"
methods:{
toggle: function () {
this.isShow=!this.isShow
}
}
data