
<template>
    <div class="left">
      <ul>
        <li :class="{active:ind===item.id}" v-for="(item, index) in tabList" :key="index" @click="skip(item.id)">
          <i class="el-icon-edit"></i>
          {{ item.name }}
        </li>
      </ul>
    </div>

</template>

<script>
export default {
  components: {},
  props: {
    ind: {
      type: Number,
      default: 0
    }
  },
  data () {
    return {
      tabList: [
        { name: '藏品登记', id: 0 },
        { name: '藏品总账', id: 3 },
        { name: '入库管理', id: 1 },
        { name: '出库管理', id: 2 },
        // { name: '藏品盘核', id: 4 },
        { name: '藏品注销', id: 5 }
      ]
    }
  },
  methods: {
    skip (index) {
      this.$router.push(`/layout/holding${index}`).catch(() => {})
    }
  }
}
</script>
<style lang='less' scoped>
  .left {
    width: 220px;
    min-width: 130px;
    height: 868px;
    background-color: #fff;
    box-shadow: 1px 1px 10px 1px;
    ul {
      li {
        cursor: pointer;
        color: black;
        font-size: 16px;
        height: 60px;
        display: flex;
        align-items: center;
        i {
          margin: 0 18px;
        }
      }
      li:hover{
        background:#e6f7ff ;
      }
      .active {
        background:#e6f7ff ;
      }
    }
  }</style>
