NewSliderCardUpDown.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div class="slider-card">
  3. <a-carousel
  4. style="width: 700px; height: 70px"
  5. :dots="false"
  6. dot-position="left"
  7. autoplay
  8. :speed="1000"
  9. :autoplaySpeed="4000"
  10. >
  11. <div v-for="(qg, i) in questions" :key="'item-list-' + i">
  12. <div class="item-list">
  13. <div
  14. class="item"
  15. v-for="(q, i) in qg"
  16. @click="emits('ask', q.name)"
  17. :key="'item-' + i"
  18. v-login-required
  19. >
  20. <div class="diver"></div>
  21. <div>{{ q.name }}</div>
  22. </div>
  23. </div>
  24. </div>
  25. </a-carousel>
  26. </div>
  27. </template>
  28. <script setup>
  29. const { questions } = window.AppGlobalConfig;
  30. const emits = defineEmits(['ask']);
  31. </script>
  32. <style scoped lang="scss">
  33. .slider-card {
  34. width: 782px;
  35. height: 34px;
  36. display: flex;
  37. //border: 1px solid red;
  38. position: relative;
  39. overflow: hidden;
  40. :deep(.slick-slide .item-list) {
  41. display: flex;
  42. height: 70px;
  43. }
  44. .hot-box {
  45. display: flex;
  46. align-items: center;
  47. font-family: PangMenZhengDao, PangMenZhengDao;
  48. font-weight: 400;
  49. font-size: 18px;
  50. height: 31px;
  51. color: #3B3B3B;
  52. img {
  53. width: 13px;
  54. height: 16px;
  55. margin-right: 7px;
  56. }
  57. }
  58. .item-list {
  59. >.item {
  60. border: 1px solid #E3E4E4;
  61. background: #fff;
  62. >div {
  63. color: #3C4755;
  64. }
  65. }
  66. }
  67. .diver {
  68. width: 1px;
  69. height: 13px;
  70. margin: 3px 3px 0px 13px;
  71. border: 1px solid #ffffff;
  72. opacity: 0.2;
  73. }
  74. :deep(.slick-slide .item-list .item) {
  75. cursor: pointer;
  76. height: 34px;
  77. // background: rgba(255,255,255, 70);
  78. border-radius: 4px;
  79. margin-right: 10px;
  80. //border-radius: 10px;
  81. display: flex;
  82. align-items: center;
  83. justify-content: center;
  84. color: #fff;
  85. font-family: PingFang SC, PingFang SC;
  86. font-weight: 400;
  87. .diver {
  88. width: 1px;
  89. height: 13px;
  90. margin-right: 13px;
  91. margin-left: -3px;
  92. border: 1px solid #ffffff;
  93. opacity: 0.2;
  94. }
  95. .name {
  96. font-family: PingFang SC, PingFang SC;
  97. font-weight: 400;
  98. font-size: 14px;
  99. color: #1d385f;
  100. text-align: left;
  101. font-style: normal;
  102. text-transform: none;
  103. }
  104. }
  105. }
  106. </style>