fs-empty.vue 617 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <view class="fs-empty-box" :style="{padding: padding}">
  3. <image :src="src" mode="widthFix" :style="{width: imageWidth}"></image>
  4. <view class="content">{{text}}</view>
  5. </view>
  6. </template>
  7. <script setup>
  8. import empty from './empty.png'
  9. const props = defineProps({
  10. src: {
  11. type: String,
  12. default: empty
  13. },
  14. text: {
  15. type: String,
  16. default: '暂无数据'
  17. },
  18. padding: {
  19. type: String,
  20. default: '200rpx 30rpx'
  21. },
  22. imageWidth: {
  23. type: String,
  24. default: '400rpx'
  25. }
  26. })
  27. </script>
  28. <style lang="scss" scoped>
  29. .fs-empty-box{
  30. text-align: center;
  31. .content{
  32. margin-top: 20rpx;
  33. }
  34. }
  35. </style>