cwg-empty-state.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="empty-state">
  3. <image class="img" src="/static/images/no-data.png" alt="" />
  4. <view class="r">
  5. <view class="title" v-if="title" v-t="title" />
  6. <view class="title" v-else v-t="'Documentary.tradingCenter.item143'" />
  7. </view>
  8. </view>
  9. </template>
  10. <script setup lang="ts">
  11. const props = defineProps({
  12. title: { type: String, default: '' }
  13. });
  14. </script>
  15. <style scoped lang="scss">
  16. @import "@/uni.scss";
  17. .empty-state {
  18. width: 100%;
  19. height: 100%;
  20. display: flex;
  21. padding: 0 px2rpx(20);
  22. flex-direction: column;
  23. justify-content: center;
  24. align-items: center;
  25. border-radius: 12px;
  26. //gap: px2rpx(16);
  27. .img {
  28. width: px2rpx(120) !important;
  29. height: px2rpx(120) !important;
  30. flex-shrink: 0;
  31. }
  32. .title {
  33. color: var(--bs-emphasis-color);
  34. font-family: Roboto;
  35. font-size: px2rpx(18);
  36. font-style: normal;
  37. font-weight: bold;
  38. line-height: px2rpx(44);
  39. margin-bottom: px2rpx(8);
  40. }
  41. .text {
  42. color: #474747;
  43. font-family: Roboto;
  44. font-size: px2rpx(14);
  45. font-style: normal;
  46. font-weight: 400;
  47. line-height: px2rpx(20);
  48. letter-spacing: px2rpx(0.07);
  49. }
  50. }
  51. </style>