index.vue 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <div class="thirdMenu">
  3. <a-tabs default-active-key="1" @change="callback">
  4. <a-tab-pane key="1" tab="一口价挂牌">
  5. </a-tab-pane>
  6. <a-tab-pane key="2" tab="浮动价挂牌">
  7. </a-tab-pane>
  8. <!-- <a-tab-pane key="3" tab="Tab 3">
  9. </a-tab-pane> -->
  10. </a-tabs>
  11. </div>
  12. </template>
  13. <script lang="ts">
  14. import { defineComponent, ref, PropType } from 'vue';
  15. interface Key {
  16. [propName: string]: string;
  17. }
  18. export default defineComponent({
  19. name: 'third-menu',
  20. props: {
  21. list: {
  22. default: [],
  23. type: Object as PropType<Key[]>,
  24. },
  25. value: {
  26. // 需要绑定的值得 key
  27. default: '',
  28. type: String,
  29. },
  30. },
  31. components: {},
  32. setup(props, context) {
  33. function callback(key: any) {
  34. console.log(key);
  35. };
  36. return {
  37. callback,
  38. };
  39. },
  40. });
  41. </script>
  42. <style lang="less">
  43. .noBorderBottom {
  44. border-bottom: none;
  45. }
  46. .thirdMenu {
  47. width: 100%;
  48. height: 28px;
  49. padding-bottom: 2px;
  50. background-color: @m-black5;
  51. .ant-tabs {
  52. line-height: 26px;
  53. .flex;
  54. .ant-tabs-bar {
  55. margin-bottom: 0;
  56. border-bottom: 0;
  57. .ant-tabs-nav-container {
  58. margin-bottom: 0;
  59. line-height: 100%;
  60. .ant-tabs-nav-wrap {
  61. margin-bottom: 0;
  62. .ant-tabs-nav-scroll {
  63. .ant-tabs-nav {
  64. .ant-tabs-tab {
  65. width: 121px;
  66. height: 26px;
  67. line-height: 26px;
  68. text-align: center;
  69. color: @m-grey1;
  70. padding: 0;
  71. margin: 0;
  72. background: url(../../assets/images/tabbg.png) center center no-repeat;
  73. background-size: cover;
  74. }
  75. .ant-tabs-tab-active.ant-tabs-tab {
  76. color: @m-white0;
  77. background: url(../../assets/images/tabbgActive.png) center center no-repeat;
  78. background-size: cover;
  79. z-index: 2;
  80. }
  81. .ant-tabs-tab+.ant-tabs-tab {
  82. margin-left: -14px;
  83. }
  84. .ant-tabs-ink-bar {
  85. width: 0px !important;
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }
  92. }
  93. }
  94. </style>;