cwg-empty-state.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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(80) !important;
  29. height: px2rpx(80) !important;
  30. flex-shrink: 0;
  31. }
  32. .title {
  33. color: var(--bs-emphasis-color);
  34. font-family: Roboto;
  35. font-size: px2rpx(16);
  36. font-style: normal;
  37. font-weight: bold;
  38. line-height: px2rpx(24);
  39. margin-top: px2rpx(12);
  40. margin-bottom: 0;
  41. }
  42. .text {
  43. color: #474747;
  44. font-family: Roboto;
  45. font-size: px2rpx(14);
  46. font-style: normal;
  47. font-weight: 400;
  48. line-height: px2rpx(20);
  49. letter-spacing: px2rpx(0.07);
  50. }
  51. }
  52. </style>