emptyPage.vue 795 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <!-- 无数据时显示 -->
  3. <view class="empty-page w-full flex-col flex-center pt-82 bg--w111-fff rd-24rpx">
  4. <image class="empty-img" :src="imgSrc"></image>
  5. <view class="fs-26 text--w111-999 lh-36rpx pt-16">{{title}}</view>
  6. <slot name="bottom"></slot>
  7. </view>
  8. </template>
  9. <script>
  10. import {HTTP_REQUEST_URL} from '@/config/app';
  11. export default{
  12. props: {
  13. title: {
  14. type: String,
  15. default: '暂无记录',
  16. },
  17. src:{
  18. type: String,
  19. default: '/statics/images/empty-box.gif',
  20. }
  21. },
  22. data(){
  23. return{
  24. imgHost:HTTP_REQUEST_URL
  25. }
  26. },
  27. computed:{
  28. imgSrc(){
  29. return HTTP_REQUEST_URL + this.src
  30. }
  31. }
  32. }
  33. </script>
  34. <style lang="scss">
  35. .pt-82{
  36. padding: 82rpx 0 160rpx;
  37. }
  38. .empty-img{
  39. width: 440rpx;
  40. height: 360rpx;
  41. }
  42. </style>