index.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <div class="main content">
  3. <div class="search_bottom_tab">
  4. <div
  5. class="tab_list"
  6. v-for="(item, index) in tabs"
  7. @click="toggle(index + 1)"
  8. :class="activeIndex == index + 1 ? 'active' : ''"
  9. :key="index"
  10. >
  11. {{ item.label }}
  12. </div>
  13. </div>
  14. <paymentSetup v-if="activeIndex == 1" />
  15. <valveSetup v-if="activeIndex == 2" />
  16. <gateSetup v-if="activeIndex == 3" />
  17. <billingSettings v-if="activeIndex == 4" />
  18. </div>
  19. </template>
  20. <script>
  21. import gateSetup from './stepPage/gateSetup.vue';
  22. import paymentSetup from './stepPage/paymentSetup.vue';
  23. import valveSetup from './stepPage/valveSetup.vue';
  24. import billingSettings from './stepPage/billingSettings.vue'
  25. export default {
  26. components: {
  27. gateSetup,
  28. paymentSetup,
  29. valveSetup,
  30. billingSettings
  31. },
  32. name: "systemSetup",
  33. data () {
  34. return {
  35. tabs: [
  36. {
  37. label: '缴费设置'
  38. },
  39. {
  40. label: '阀控设置'
  41. },
  42. {
  43. label: '闸控设置'
  44. },
  45. // {
  46. // label: '账单设置'
  47. // }
  48. ],
  49. activeIndex: 1
  50. };
  51. },
  52. methods: {
  53. toggle (index) {
  54. this.activeIndex = index;
  55. }
  56. },
  57. created () { }
  58. };
  59. </script>
  60. <style lang='scss' scoped >
  61. @import '@assets/css/public-style.scss';
  62. .search_bottom_tab {
  63. height: 60px;
  64. line-height: 60px;
  65. background: #ffffff;
  66. border-radius: 4px;
  67. margin-bottom: 20px;
  68. padding: 0 20px;
  69. box-sizing: border-box;
  70. .tab_list {
  71. display: inline-block;
  72. border-bottom: 2px solid transparent;
  73. cursor: pointer;
  74. color: #424656;
  75. &:not(:last-child) {
  76. margin-right: 40px;
  77. }
  78. &.active {
  79. color: $mainTextColor;
  80. border-color: $mainTextColor;
  81. }
  82. }
  83. }
  84. </style>