Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

notice-bar.vue 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <template>
  2. <!-- 通告栏 -->
  3. <view class="noticeBar">
  4. <swiper
  5. class="list"
  6. circular="true"
  7. vertical="true"
  8. autoplay="true"
  9. interval="3000"
  10. duration="1000"
  11. >
  12. <swiper-item v-for="item in noticeList" :key="item.id">
  13. <view class="content" @click="emits('noticeClick', item)">
  14. <view class="icon-notice">●</view>
  15. <view class="notice-txt">
  16. {{ item.title }}
  17. </view>
  18. <view class="right">
  19. <view class="label">去办理</view>
  20. <image class="arror" :src="`${$imgUrl}common/arror-right.png`" mode="aspectFill"/>
  21. </view>
  22. </view>
  23. </swiper-item>
  24. </swiper>
  25. </view>
  26. </template>
  27. <script setup>
  28. import { ref } from "vue";
  29. const emits = defineEmits(["noticeClick"]);
  30. defineProps({
  31. //公告栏列表
  32. noticeList: {
  33. type: Array,
  34. default: () => {
  35. return [];
  36. },
  37. },
  38. });
  39. </script>
  40. <style lang="scss" scoped>
  41. .noticeBar {
  42. /* margin: 50rpx 30rpx 0px; */
  43. padding-left: 30rpx;
  44. padding-right: 20rpx;
  45. height: 88rpx;
  46. line-height: 88rpx;
  47. background: #ffffff;
  48. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  49. border-radius: 20rpx;
  50. color: #172843;
  51. font-size: 26rpx;
  52. display: flex;
  53. .list {
  54. width: 100%;
  55. height: 100%;
  56. .content {
  57. display: flex;
  58. align-items: center;
  59. .icon-notice {
  60. font-size: 18rpx;
  61. color: #172843;
  62. }
  63. .notice-txt {
  64. flex: 1;
  65. font-size: 26rpx;
  66. color: #172843;
  67. padding-left: 20rpx;
  68. overflow: hidden;
  69. text-overflow: ellipsis;
  70. white-space: nowrap;
  71. margin-right: 10rpx;
  72. }
  73. .right {
  74. display: flex;
  75. flex-direction: row;
  76. justify-content: center;
  77. align-items: center;
  78. .arror {
  79. width: 30rpx;
  80. height: 30rpx;
  81. }
  82. .label {
  83. font-size: 24rpx;
  84. color: #00b38b;
  85. line-height: 36rpx;
  86. margin-right: 10rpx;
  87. }
  88. }
  89. }
  90. }
  91. }
  92. </style>