index.vue 993 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <view class="h100">
  3. <view class="title">基本用法</view>
  4. <o-empty />
  5. <view class="title">自定义背景色</view>
  6. <o-empty img="error" bg="#f6f7f8" text="内容整理中.." />
  7. <view class="title">自定义大小</view>
  8. <o-empty img="search" text="无搜索记录" imgSize="200" />
  9. <view class="title">自定义插槽内容</view>
  10. <o-empty img="network" text="网络中断" >
  11. <button type="primary" size="mini">自定义按钮</button>
  12. </o-empty>
  13. <view class="title">自定义图片</view>
  14. <!-- #ifndef MP -->
  15. <o-empty img="../../static/icon.png" imgSize="180" text="自定义图片" height="50vh" />
  16. <!-- #endif -->
  17. <!-- #ifdef MP -->
  18. <o-empty img="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/gh_33446d7f7a26_430.jpg" imgSize="180" text="小程序需绝对路径" />
  19. <!-- #endif -->
  20. </view>
  21. </template>
  22. <style lang="scss">
  23. .h100{
  24. height:100vh;
  25. }
  26. .title{
  27. padding: 20rpx 0 10rpx 20rpx;
  28. }
  29. </style>