empty.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div class="app-empty">
  3. <div class="app-empty-center">
  4. <div class="app_empty_img">
  5. <image :src="`${constant.hostUrl}/image/common/no_data_hua.png`" mode="widthFix"></image>
  6. </div>
  7. <div class="app-empty-title">
  8. <span class="empty_no_data">{{title}}</span>
  9. </div>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'empty',
  16. props: {
  17. title: {
  18. type: String,
  19. default: '暂无数据'
  20. }
  21. },
  22. computed: {
  23. },
  24. data() {
  25. return {}
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. .app-empty {
  31. width: 100%;
  32. display: flex;
  33. align-items: center;
  34. & .app-empty-center {
  35. width: 100%;
  36. }
  37. & .app_empty_img {
  38. width: 100%;
  39. margin-top:80upx;
  40. text-align: center;
  41. & image {
  42. margin:0 auto;
  43. width: 40%;
  44. }
  45. }
  46. & .app-empty-title {
  47. font-size: 32upx;
  48. margin-top:30upx;
  49. text-align:center;
  50. color:#666161;
  51. & .empty_no_data {
  52. font-size:30upx;
  53. }
  54. }
  55. }
  56. </style>