app-no-goods.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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" :style="{'color': color}">{{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. color: {
  19. type: String,
  20. default() {
  21. return '#666666';
  22. }
  23. },
  24. title: {
  25. type: String,
  26. default() {
  27. return '没有任何商品哦~';
  28. }
  29. },
  30. is_image: {
  31. type: Number,
  32. default() {
  33. return 0;
  34. }
  35. },
  36. },
  37. }
  38. </script>
  39. <style scoped lang="scss">
  40. .app-no-goods {
  41. width: 100%;
  42. height: #{400upx};
  43. .icon {
  44. width: #{240upx};
  45. height: #{240upx};
  46. }
  47. .text {
  48. font-size: #{24upx};
  49. line-height: 1;
  50. margin-top: #{25upx};
  51. }
  52. }
  53. </style>