<template>
  <div id="native">
    <el-row>
      <!-- <el-menu :default-active="activeIndex" mode="horizontal" background-color="#850000" text-color="#fff" active-text-color="#fff" :router="true">
        <template v-for="(item, index) in menuList">
          <el-submenu v-if="item.children.length > 0" :index="`${index}`" :key="index">
            <template slot="title">
              {{ item.name }}
            </template>
            <el-menu-item v-for="(sub, subIndex) in item.children" :key="subIndex" :index="sub.path">{{ sub.name }}</el-menu-item>
          </el-submenu>
          <el-menu-item v-else :index="item.path" :key="index">{{ item.name }}</el-menu-item>
        </template>
      </el-menu> -->
      <el-menu
        :default-active="activeIndex2"
        class="el-menu-demo"
        mode="horizontal"
        @select="handleSelect"
        background-color="#850000"
        text-color="#fff"
        active-text-color="#fff"
        style="height:40px;"
      >
        <el-menu-item index="1">首页</el-menu-item>
        <el-submenu index="2">
          <template slot="title">
            招聘管理
          </template>
          <el-menu-item index="2-1">宣讲会</el-menu-item>
          <el-menu-item index="2-2">招聘会</el-menu-item>
          <el-menu-item index="2-3">职位管理</el-menu-item>
        </el-submenu>
      </el-menu>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'native',
  props: {
    // menuList: null,
  },
  components: {},
  data: () => ({
    activeIndex2: '1',
  }),
  created() {},
  computed: {},
  methods: {
    handleSelect(key, keyPath) {
      // eslint-disable-next-line no-console
      console.log(key, keyPath);
    },
  },
};
</script>

<style lang="less" scoped>
.el-menu--horizontal > .el-menu-item {
  height: 40px;
  line-height: 40px;
}
/deep/.el-menu--horizontal > .el-submenu .el-submenu__title {
  height: 40px;
  line-height: 40px;
}
</style>
