<template>
  <div class="project-menu-item-container">
    <template>
      <!-- 有下级菜单 -->
      <template v-if="checkHasChidren">
        <el-submenu :index="menuItem.nodeValue" ref="projectSubMenuItem" class="project-sub-menu-item">
          <template slot="title">
            <i class="el-icon-location"></i>
            <span>111</span>
          </template>
        </el-submenu>
      </template>
      <template v-else>

      </template>
    </template>
  </div>
</template>
<script>
export default {
  name: "projectMenuItem",
  props: {
    menuItem: {
      type: Object,
      required: true,
      default: () => ({})
    }
  },
  data() {
    return {

    };
  },
  //可访问data属性
  created() {

  },
  //计算集
  computed: {
    checkHasChidren() {
      return !!(this.menuItem && this.menuItem?.children && this.menuItem.children.length);
    }
  },
  //方法集
  methods: {

  },
}
</script>
<style lang="scss" scoped>
.project-menu-item-container {
}
</style>
