cwg-empty-state.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view class="empty-state">
  3. <image class="img" src="/static/images/undraw.png" alt="" />
  4. <view class="r">
  5. <view class="title">{{ t('Documentary.tradingCenter.item131') }}</view>
  6. <view class="text">{{ text || t('Documentary.tradingCenter.item131') }}</view>
  7. </view>
  8. </view>
  9. </template>
  10. <script setup lang="ts">
  11. import { useI18n } from 'vue-i18n';
  12. const { t } = useI18n();
  13. withDefaults(
  14. defineProps<{
  15. text?: string;
  16. }>(),
  17. {
  18. text: "",
  19. }
  20. );
  21. </script>
  22. <style scoped lang="scss">
  23. @import "@/uni.scss";
  24. .empty-state {
  25. display: flex;
  26. padding: px2rpx(31) px2rpx(24);
  27. justify-content: center;
  28. align-items: center;
  29. border-radius: 12px;
  30. gap: px2rpx(24);
  31. .img {
  32. width: px2rpx(100) !important;
  33. height: px2rpx(98) !important;
  34. flex-shrink: 0;
  35. }
  36. .title {
  37. color: #1a1a1a;
  38. font-family: Roboto;
  39. font-size: px2rpx(31);
  40. font-style: normal;
  41. font-weight: 600;
  42. line-height: px2rpx(44);
  43. margin-bottom: px2rpx(8);
  44. }
  45. .text {
  46. color: #474747;
  47. font-family: Roboto;
  48. font-size: px2rpx(14);
  49. font-style: normal;
  50. font-weight: 400;
  51. line-height: px2rpx(20);
  52. letter-spacing: px2rpx(0.07);
  53. }
  54. }
  55. </style>