<template>
  <div id="menus">
    <el-menu :default-active="thisRouter()" class="el-menu-vertical-demo" :router="false" :default-openeds="defalutMenu" @select="to">
      <el-menu-item index="/"> <i class="el-icon-s-grid"></i>首页 </el-menu-item>
      <el-submenu index="1">
        <template v-slot:title>
          <i class="el-icon-s-grid"></i>
          <span>金融数字超市</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="/supermarket/debt">债权产品</el-menu-item>
          <el-menu-item index="/supermarket/stock">股权产品</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-menu-item index="/financial/index"> <i class="el-icon-s-grid"></i>金融机构</el-menu-item>
      <el-menu-item index="/otheruser/index"> <i class="el-icon-s-grid"></i>用户管理</el-menu-item>
      <el-menu-item index="/company/index"> <i class="el-icon-s-grid"></i>企业信息管理</el-menu-item>
      <el-menu-item index="/companyidentify/index"> <i class="el-icon-s-grid"></i>企业认证管理</el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: 'menus',
  props: {},
  components: {},
  data: () => ({
    // defalutMenu: ['1', '2', '3'],
    defalutMenu: [],
    defalutPage: '',
  }),
  created() {},
  computed: {},
  methods: {
    thisRouter() {
      console.log(this.$route.path);
    },
    to(index) {
      this.$router.push({ path: index });
    },
  },
};
</script>

<style lang="less" scoped></style>
