index.vue 661 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view class="empty-view" :style="{ left: left }">
  3. <image :src="src" mode="aspectFit" class="empty-img"></image>
  4. <view class="empty-text">{{ text }}</view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. props: {
  10. left: {
  11. type: String,
  12. default: '0'
  13. },
  14. text: {
  15. type: String,
  16. default: '没有数据哦~~'
  17. },
  18. src: {
  19. type: String,
  20. default: '../../static/empty/data.png'
  21. }
  22. }
  23. };
  24. </script>
  25. <style lang="scss">
  26. .empty-view {
  27. width: 100%;
  28. text-align: center;
  29. margin-top: 200upx;
  30. .empty-img {
  31. width: 200rpx;
  32. height: 200rpx;
  33. }
  34. .empty-text {
  35. font-size: 26upx;
  36. color: #999999;
  37. padding-top: 10rpx;
  38. }
  39. }
  40. </style>