How to show and hide vue v-show?

after clicking on the category, the following list shows and hides

clipboard.png

<template>
  <div class="classify">
    <div class="fense">
      <div class="sify" @click="toggle()">
        

<img src="../../assets/images/Spinner.png"> </div> <div class="liebiao" v-show="isShow"> <ul> <li :to="item.to" v-for="item in links" :key="item.text">{{ item }}</li> </ul> </div> </div> <div class="seek"> <a href="-sharp"><img src="../../assets/images/icon-search.png"></a> <input type="text" name="" placeholder=""> </div> </div> </template> <script> export default { name: "classify", data: function () { return { links: [ "", "", "" ] } }, el: ".fense", data: { isShow: false }, methods: { toggle: function () { this.isShow = !this.isShow } } } </script>
Jun.29,2021

< H2 > change this to < / H2 >
export default {
  name: 'fense',
  data: function () {
    return {
      links: [
        '',
        '',
        ''
      ],
      isShow: false
    }
  },
  methods: {
    toggle: function () {
      this.isShow = !this.isShow
    }
  }
}

if you are using element-ui, you can write: category + icon (top / bottom) + Popover pop-up box, put 'book review, film review, etc.' in popover. Final effect

clipboard.png

Menu