empty.vue 831 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <div class="hui-empty">
  3. <img :src="undefinedImage" alt="" :style="'width: '+ width +'px;'" />
  4. <div class="space-undefined-text">{{description}}</div>
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. name: 'empty',
  10. props: {
  11. width: {
  12. type: String,
  13. default: '160'
  14. },
  15. description: {
  16. type: String,
  17. default: '暂无数据'
  18. }
  19. },
  20. data() {
  21. return {
  22. undefinedImage: require('@/assets/image/common/dataUndefined.png'),
  23. }
  24. },
  25. created() {}
  26. }
  27. </script>
  28. <style lang="scss">
  29. .hui-empty {
  30. display: flex;
  31. align-items: center;
  32. justify-content: center;
  33. flex-direction: column;
  34. img {
  35. width: 160px;
  36. }
  37. .space-undefined-text {
  38. margin-top: 10px;
  39. opacity: 0.6;
  40. line-height: 20px;
  41. font-size: 12px;
  42. }
  43. }
  44. </style>