app-no-goods.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="app-no-goods dir-top-nowrap main-center cross-center" :style="{'backgroundColor': background}">
  3. <image class="icon" v-if="is_image === 0" src="/static/image/no-goods.png"></image>
  4. <image class="icon" v-else-if="is_image === 1" src="/static/image/order-empty.png"></image>
  5. <text class="text">{{title}}</text>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. name: "app-no-goods",
  11. props: {
  12. background: {
  13. type: String,
  14. default() {
  15. return '#ffffff';
  16. }
  17. },
  18. title: {
  19. type: String,
  20. default() {
  21. return '没有任何商品哦~';
  22. }
  23. },
  24. is_image: {
  25. type: Number,
  26. default() {
  27. return 0;
  28. }
  29. },
  30. },
  31. }
  32. </script>
  33. <style scoped lang="scss">
  34. .app-no-goods {
  35. width: 100%;
  36. height: #{400upx};
  37. .icon {
  38. width: #{240upx};
  39. height: #{240upx};
  40. }
  41. .text {
  42. font-size: #{24upx};
  43. line-height: 1;
  44. color: #666666;
  45. margin-top: #{25upx};
  46. }
  47. }
  48. </style>