<template>
  <div class="mainmenu">
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
    >
      <el-menu-item index="1"
        ><router-link to="/">招聘</router-link></el-menu-item
      >
      <el-menu-item index="2">
        <router-link to="/Policy">政策</router-link></el-menu-item
      >
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "Mainmenu",
  components: {},
  props: {
    activeIndex: {
      type: String,
      default: "1",
    },
  },
  data() {
    return {
      // activeIndex: "1",
    };
  },
  created() {},
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style lang='scss' scoped>
//@import url()
.mainmenu /deep/ .el-menu {
  text-align: center;
  li {
    float: none;
    display: inline-block;
    font-size: 26px;
    color: #8f8f8f;
    padding: 0;
    & + li {
      margin-left: 55px;
    }
    &.is-active {
      color: #4aad78;
      border-bottom: 3px solid #4aad78;
    }
    a {
      display: block;
      height: 66px;
      line-height: 66px;
    }
  }
}
</style>