tabLeft2.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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="item.inon"></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, inon: 'el-icon-s-order' },
  24. { name: '征集品提用', id: 1, inon: 'el-icon-caret-left' },
  25. { name: '征集品注销', id: 2, inon: 'el-icon-delete-solid' }
  26. ]
  27. }
  28. },
  29. methods: {
  30. skip (index) {
  31. this.$router.push(`/layout/collect${index}`).catch(() => {})
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang='less' scoped>
  37. .left {
  38. width: 220px;
  39. min-width: 130px;
  40. height: 868px;
  41. background-color: #fff;
  42. box-shadow: 1px 1px 10px 1px;
  43. ul {
  44. li {
  45. cursor: pointer;
  46. color: black;
  47. font-size: 16px;
  48. height: 60px;
  49. display: flex;
  50. align-items: center;
  51. i {
  52. margin: 0 18px;
  53. }
  54. }
  55. li:hover{
  56. background:#e6f7ff ;
  57. }
  58. .active {
  59. background:#e6f7ff ;
  60. }
  61. }
  62. }</style>