tab.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <div>
  3. <!-- //tab栏 -->
  4. <div class="naue_tab">
  5. <p @click="tabClid(index)" v-for="(item,index) in tabNume" :key="index" :class="[tab == index? 'p' : '']">{{item}}</p>
  6. </div>
  7. <div>
  8. <slot></slot>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name: "Config",
  15. data() {
  16. return {
  17. // 遮罩层
  18. loading: true,
  19. //步骤条
  20. naueactive:2,
  21. tab:1,
  22. tabNume:['线索信息','签约信息','在建信息','投产信息'],
  23. // 选中数组
  24. ids: [],
  25. // 非单个禁用
  26. single: true,
  27. // 非多个禁用
  28. };
  29. },
  30. created() {
  31. },
  32. methods: {
  33. //tab
  34. tabClid(index){
  35. this.tab = index
  36. }
  37. }
  38. };
  39. </script>
  40. <style rel="stylesheet/scss" lang="scss">
  41. //tab
  42. .naue_tab{
  43. border-bottom: 1px solid #CDCDCD;
  44. display: flex;
  45. margin-top: 30px;
  46. padding: 0 10px;
  47. margin-bottom: 30px;
  48. p{
  49. font-size: 12px;
  50. font-family: PingFang SC;
  51. font-weight: 400;
  52. color: #343434;
  53. padding: 11px 15px;
  54. margin: 0;
  55. }
  56. .p{
  57. border-bottom: 2px solid #1C84C6;
  58. margin-bottom: -1px;
  59. }
  60. }
  61. </style>