Please ask, I used vue to write a tree, but all will be displayed together, I want to click on the operation to show a how to change?

I wrote a tree diagram in vue, but it will be displayed together.

I want to click on the operation to show one how to change it?

<template>
  <li class="tree-menu-list">
    <a @click="toggle();sendParams()">
      <i v-if="isFolder" class="iconfont" :class="[open ? "icon-jiantouarrow487": "icon-iconfontjiantou"]"></i>
      <i v-if="!isFolder" class="iconfont"></i>
      {{ model.menuName }}
    </a>
    <ul v-show="open" v-if="isFolder">
       <tree-menu v-for="(item, index) in model.children" :model="item" :key="index"></tree-menu>
    </ul>
  </li>
</template>

<script>
export default {
  name: "treeMenu",
  props: ["model"],
  data () {
    return {
      open: false,
      currentTab: false,
      isFolder: this.model.children && this.model.children.length ? true : false
    }
  },
  methods: {
    toggle: function () {
      if (this.isFolder) {
        this.open = !this.open
      }
    },
    sendParams: function () {
      this.$router.push({
        path: "/info",
        name: "info",
        query: {
          id: this.model.id,
          name: this.model.menuName
        }
      })
    }
  }
}
</script>
Mar.22,2021

I don't have a picture. I can't understand what you're talking about. The posted code is too highly coupled to reproduce
I guess you want this effect

<template>
  <ul>
    <li class="tree-menu-list">
      <a @click="toggle()">
        <i v-if="isFolder" class="iconfont" :class="[open ? 'icon-jiantouarrow487': 'icon-iconfontjiantou']"></i>
        <i v-if="!isFolder" class="iconfont"></i>
        {{ model.menuName }}
      </a>
      <ul v-show="open"  >
        <li v-for="(item, index) in model.children" :model="item" :key="index" v-text="item"  @click="sendParams(index)"></li>
        <!--<tree-menu v-for="(item, index) in model.children" :model="item" :key="index"></tree-menu>-->
      </ul>
    </li>
  </ul>
</template>
export default {
  name: 'HelloWorld',
//  props: ['model'],
  data () {
    return {
      model:{
        id:1314,
        menuName:'',
        children:[
          '1',
          '2',
          '3',
          '4',
        ],
      },
      open: false,
      currentTab: false,
      isFolder: false,
//      isFolder: this.model.children && this.model.children.length ? true : false

    }
  },
  created(){
    this.isFolder=this.model.children && this.model.children.length
  },
  methods: {
    toggle: function () {
      console.log(this.isFolder);
      if (this.isFolder) {
        this.open = !this.open
      }
    },
    sendParams: function (i) {
      console.log(this.model.children[i]);
//      this.$router.push({
//        path: '/info',
//        name: 'info',
//        query: {
//          id: this.model.id,
//          name: this.model.menuName
//        }
//      })
    }
  }
}
</script>
Menu