<template>
  <div class="demo-menu-bg">
    <hive-menu
      :active.sync="active"
      mode="vertical"
      @select="handleSelect"
      :default-open-keys="'3'"
    >
      <item
        v-for="(item, index) in menu"
        :item-data="item"
        :key="index + ''"
        :sec="index + ''"
      />
    </hive-menu>
  </div>
</template>

<script>
import menu from './gd/data.json';
import item from './gd/item';

export default {
  components: {
    item
  },
  data() {
    return {
      active: '1',
      menu
    };
  },
  methods: {
    handleSelect(tab) {
      console.log(tab);
    }
  }
};
</script>
