直接上代码

HTML部分

 <div class='herder_left' @click="change">
  头部
 </div>
<div class='show_wrap' v-show="show">
显示部分
</div>

js部分

 data() {
    return {
      show:false,
  }
},
mounted() {
  this.LopTime();
},
methods: {
 change(){
   this.show = !this.show
  },
}

通过指令 v-show便可以完成

相关文章:

  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-04-11
  • 2022-03-15
  • 2022-12-23
猜你喜欢
  • 2022-02-09
  • 2021-10-26
  • 2022-12-23
  • 1970-01-01
  • 2021-11-22
  • 2021-12-24
  • 2021-10-04
相关资源
相似解决方案