index.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <view class="notData-box u-flex-col"
  3. :style="{'padding-top':paddingTop+'rpx','margin-top':marginTop+'rpx','background-color':backgroundColor,'z-index':zIndex}">
  4. <view class="u-flex-col notData-inner">
  5. <image :src="icon" mode="" class="notData-inner-img"></image>
  6. <text class="notData-inner-text">{{$t('common.noData')}}</text>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import resources from '@/libs/resources.js'
  12. export default {
  13. props: {
  14. paddingTop: {
  15. type: [String, Number],
  16. default: 300
  17. },
  18. marginTop: {
  19. type: [String, Number],
  20. default: 0
  21. },
  22. zIndex: {
  23. type: [String, Number],
  24. default: 999
  25. },
  26. backgroundColor: {
  27. type: String,
  28. default: '#f0f2f6'
  29. }
  30. },
  31. data() {
  32. return {
  33. icon: resources.message.nodata,
  34. }
  35. },
  36. }
  37. </script>
  38. <style lang="scss">
  39. .notData-box {
  40. width: 100%;
  41. height: 100%;
  42. justify-content: center;
  43. align-items: center;
  44. .notData-inner {
  45. width: 154px;
  46. height: 170px;
  47. align-items: center;
  48. .notData-inner-text {
  49. padding: 30rpx 0;
  50. color: #909399;
  51. }
  52. .notData-inner-img {
  53. width: 100%;
  54. height: 100%;
  55. }
  56. }
  57. }
  58. </style>