tabLeft.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <div class="left">
  3. <ul>
  4. <li :class="{active:ind===item.id}" v-for="(item, index) in tabList" :key="index" @click="skip(item.id)">
  5. <i class="el-icon-edit"></i>
  6. {{ item.name }}
  7. </li>
  8. </ul>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. components: {},
  14. props: {
  15. ind: {
  16. type: Number,
  17. default: 0
  18. }
  19. },
  20. data () {
  21. return {
  22. tabList: [
  23. { name: '藏品登记', id: 0 },
  24. { name: '藏品总账', id: 3 },
  25. { name: '入库管理', id: 1 },
  26. { name: '出库管理', id: 2 },
  27. // { name: '藏品盘核', id: 4 },
  28. { name: '藏品注销', id: 5 }
  29. ]
  30. }
  31. },
  32. methods: {
  33. skip (index) {
  34. this.$router.push(`/layout/holding${index}`).catch(() => {})
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang='less' scoped>
  40. .left {
  41. width: 220px;
  42. min-width: 130px;
  43. height: 868px;
  44. background-color: #fff;
  45. box-shadow: 1px 1px 10px 1px;
  46. ul {
  47. li {
  48. cursor: pointer;
  49. color: black;
  50. font-size: 16px;
  51. height: 60px;
  52. display: flex;
  53. align-items: center;
  54. i {
  55. margin: 0 18px;
  56. }
  57. }
  58. li:hover{
  59. background:#e6f7ff ;
  60. }
  61. .active {
  62. background:#e6f7ff ;
  63. }
  64. }
  65. }</style>