EmptyDate.vue 848 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="empty-box" :style="{'padding-top':top +'rpx','background-color':bgColor}">
  3. <image class="empty-img" src="./empty-img.png" mode="aspectFit"></image>
  4. <text class="empty-text">{{emptyText}}</text>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. name: "EmptyDate",
  10. props: {
  11. bgColor: {
  12. type: String,
  13. default: 'transparent'
  14. },
  15. emptyText: {
  16. type: String,
  17. default: '暂无数据'
  18. },
  19. top: {
  20. type: Number,
  21. default: 80
  22. }
  23. },
  24. data() {
  25. return {
  26. };
  27. }
  28. }
  29. </script>
  30. <style lang="scss" scoped>
  31. .empty-box {
  32. width: 100%;
  33. display: flex;
  34. flex-direction: column;
  35. align-items: center;
  36. .empty-img {
  37. width: 204rpx;
  38. height: 193rpx;
  39. }
  40. .empty-text {
  41. padding: 32rpx;
  42. opacity: 0.59;
  43. color: #999999;
  44. font-size: 30rpx;
  45. font-weight: 400;
  46. }
  47. }
  48. </style>