nodata.vue 978 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <view class="nodata" :style="'padding-top:'+padtop+'rpx'">
  3. <image :src="nodata" class="noimg"></image>
  4. <!-- <image :src="noiconpimg" v-else></image> -->
  5. <view>{{notxt}}</view>
  6. </view>
  7. </template>
  8. <script>
  9. export default{
  10. props:{
  11. notxt:{
  12. type: String,
  13. default () {
  14. return '暂无数据'
  15. }
  16. },
  17. padtop:{
  18. type: Number,
  19. default () {
  20. return 100
  21. }
  22. },
  23. type:{
  24. type: String,
  25. default () {
  26. return ''
  27. }
  28. }
  29. },
  30. data(){
  31. return{
  32. noiconpimg:require("@/static/images/noiconp.png"),
  33. nodata:require("@/static/images/nodata.png"),
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. // 无数据
  40. .nodata{
  41. display: flex;flex-direction: column;align-items: center;box-sizing: border-box;padding-bottom: 100rpx;
  42. image{width: 456rpx;height: 178rpx;margin-bottom: 28rpx;}
  43. view{font-size: 26rpx;color: #666666;font-weight: 500;}
  44. .noimg{width: 410rpx;height: 286rpx;margin-bottom: 44rpx;}
  45. }
  46. </style>