empty.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view class="page-box" :style="isShow?'height:50vh':''">
  3. <view class="centre">
  4. <image :class="size" src="../static/images/index/empty.png" mode=""></image>
  5. <view class="tips">
  6. {{content}}
  7. </view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. content: {
  15. type: String,
  16. default: '暂无内容'
  17. },
  18. size:{
  19. type: String,
  20. default: 'large'
  21. },
  22. isShow:{
  23. type:Boolean,
  24. default:true
  25. }
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. .page-box {
  31. position: relative;
  32. left: 0;
  33. // height: 50vh;
  34. }
  35. .centre {
  36. position: absolute;
  37. left: 0;
  38. top: 0;
  39. right: 0;
  40. bottom: 0;
  41. margin: auto;
  42. height: 0rpx;
  43. text-align: center;
  44. // padding: 200rpx auto;
  45. font-size: 32rpx;
  46. image {
  47. // width: 387rpx;
  48. // height: 341rpx;
  49. width: 340rpx;
  50. height: 340rpx;
  51. // margin-bottom: 20rpx;
  52. margin: 0 auto 20rpx;
  53. // border: 1px dotted #000000;
  54. }
  55. .large{
  56. width: 340rpx;
  57. height: 340rpx;
  58. }
  59. .medium{
  60. width: 240rpx;
  61. height: 240rpx;
  62. }
  63. .mini{
  64. width: 140rpx;
  65. height: 140rpx;
  66. margin-top: 40rpx;
  67. }
  68. .tips {
  69. color: rgba(200, 201, 204, 1);
  70. font-family: DM Sans;
  71. font-size: 28rpx;
  72. font-weight: 400;
  73. line-height: 20px;
  74. letter-spacing: 0px;
  75. text-align: center;
  76. }
  77. .btn {
  78. margin: 80rpx auto;
  79. width: 600rpx;
  80. border-radius: 32rpx;
  81. line-height: 90rpx;
  82. color: #ffffff;
  83. font-size: 34rpx;
  84. background: #5074FF;
  85. }
  86. }
  87. </style>