index.vue 2.7 KB

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