index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <div>
  3. <!-- //tab栏 -->
  4. <div class="naue_tab">
  5. <p @click="changeTab(tab)" v-for="tab in tabList" :key="tab.index" :class="[tabIndex == tab.index? 'p' : '']">{{tab.name}}</p>
  6. </div>
  7. <div>
  8. <slot></slot>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name: "'Mytabs'",
  15. props:{
  16. tabList: Array,
  17. tabIndex: Number,
  18. queryParams:Object
  19. },
  20. data() {
  21. return {
  22. // 遮罩层
  23. loading: true,
  24. //步骤条
  25. naueactive:2,
  26. tabNume:['线索信息','签约信息','在建信息','投产信息'],
  27. // 选中数组
  28. ids: [],
  29. // 非单个禁用
  30. single: true,
  31. // 非多个禁用
  32. };
  33. },
  34. created() {
  35. },
  36. methods: {
  37. //tab
  38. changeTab(index){
  39. this.$emit('changeTab', index)
  40. // this.tab = index
  41. }
  42. }
  43. };
  44. </script>
  45. <style rel="stylesheet/scss" lang="scss">
  46. //tab
  47. .naue_tab{
  48. border-bottom: 1px solid #CDCDCD;
  49. display: flex;
  50. margin-top: 30px;
  51. padding: 0 10px;
  52. margin-bottom: 30px;
  53. p{
  54. font-size: 16px;
  55. font-family: PingFang SC;
  56. font-weight: 700;
  57. color: #fff !important;
  58. padding: 11px 15px;
  59. margin: 0;
  60. cursor: pointer;
  61. background-color: #0086c6;
  62. margin-right: 10px !important;
  63. // border-radius: 6px;
  64. }
  65. p:nth-child(2){
  66. font-size: 16px;
  67. font-family: PingFang SC;
  68. font-weight: 700;
  69. color: #fff;
  70. padding: 11px 15px;
  71. margin: 0;
  72. cursor: pointer;
  73. background-color: #02b938;
  74. margin-right: 10px;
  75. // border-radius: 6px;
  76. }
  77. p:nth-child(3){
  78. font-size: 16px;
  79. font-family: PingFang SC;
  80. font-weight: 700;
  81. color: #fff;
  82. padding: 11px 15px;
  83. margin: 0;
  84. cursor: pointer;
  85. background-color: #df3838;
  86. margin-right: 10px;
  87. // border-radius: 6px;
  88. }
  89. p:nth-child(4){
  90. font-size: 16px;
  91. font-family: PingFang SC;
  92. font-weight: 700;
  93. color: #fff !important;
  94. padding: 11px 15px;
  95. margin: 0;
  96. cursor: pointer;
  97. background-color: #f66e00;
  98. margin-right: 10px !important;
  99. // border-radius: 6px;
  100. }
  101. .p{
  102. // border-bottom: 2px solid #1C84C6;
  103. // margin-bottom: -1px;
  104. // color: #343434;
  105. opacity: .8;
  106. }
  107. }
  108. </style>