empty-view.vue 821 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <view class="empty-box">
  3. <image class="empty-img" :src="img" mode=""></image>
  4. <view class="title">{{ title }}</view>
  5. <slot name="bottomHtml"></slot>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. name: "empty-view",
  11. props: {
  12. title: {
  13. type: String,
  14. default: "暂无数据",
  15. },
  16. img: {
  17. type: String,
  18. default:
  19. "https://qianzhiy-applet.oss-rg-china-mainland.aliyuncs.com/h5/images/static/empty.png",
  20. },
  21. },
  22. data() {
  23. return {};
  24. },
  25. };
  26. </script>
  27. <style lang="scss" scoped>
  28. .empty-box {
  29. text-align: center;
  30. .empty-img {
  31. width: 300upx;
  32. height: 232upx;
  33. margin-bottom: 34upx;
  34. }
  35. }
  36. .title {
  37. text-align: center;
  38. font-weight: 500;
  39. font-size: 32rpx;
  40. color: #666666;
  41. line-height: 44rpx;
  42. font-style: normal;
  43. }
  44. </style>