<template>
  <div class="menu-child">
    <template v-for="item in this.menuList">
      <el-submenu :key="item.id" :index="item.id" v-if="item.children && item.children.length">
        <template slot="title">
          <span slot="title">{{item.columnName}}</span>
        </template>
        <menuTree :menuList="item.children"></menuTree>
      </el-submenu>
      <el-menu-item :key="item.id" :index="item.id" v-else>
        <span slot="title">{{item.columnName}}</span>
      </el-menu-item>
    </template>
  </div>
</template>

<script>
export default {
  name: 'menuTree',
  props: {
    menuList: {
      type: Array,
      default: []
    }
  },
  data () {
    return {}
  },
  mounted () {},
  methods: {}
}
</script>
<style lang="scss" scoped>
  
</style>
