s-notice-block.vue 769 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <view class="ss-flex ss-col-center notice-wrap">
  3. <image class="icon-img" :src="sheep.$url.cdn(data.iconUrl)" mode="heightFix"></image>
  4. <!-- todo:@owen 暂时只支持一个公告 -->
  5. <su-notice-bar
  6. style="flex: 1"
  7. :showIcon="false"
  8. scrollable
  9. single
  10. :text="data.contents[0].text"
  11. :speed="50"
  12. :color="data.textColor"
  13. @tap="sheep.$router.go(data.contents[0].url)"
  14. />
  15. </view>
  16. </template>
  17. <script setup>
  18. /**
  19. * 装修组件 - 通知栏
  20. *
  21. */
  22. import sheep from '@/sheep';
  23. const props = defineProps({
  24. data: {
  25. type: Object,
  26. default() {},
  27. },
  28. });
  29. </script>
  30. <style lang="scss" scoped>
  31. .notice-wrap {
  32. .icon-img {
  33. height: 56rpx;
  34. }
  35. }
  36. </style>