empty.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="page-box" :style="isShow?'height:50vh':''">
  3. <view class="centre">
  4. <image src="../static/images/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. isShow:{
  19. type:Boolean,
  20. default:true
  21. }
  22. }
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .page-box {
  27. position: relative;
  28. left: 0;
  29. // height: 50vh;
  30. }
  31. .centre {
  32. position: absolute;
  33. left: 0;
  34. top: 0;
  35. right: 0;
  36. bottom: 0;
  37. margin: auto;
  38. height: 0rpx;
  39. text-align: center;
  40. // padding: 200rpx auto;
  41. font-size: 32rpx;
  42. image {
  43. // width: 387rpx;
  44. // height: 341rpx;
  45. width: 340rpx;
  46. height: 270rpx;
  47. // margin-bottom: 20rpx;
  48. margin: 0 auto 20rpx;
  49. // border: 1px dotted #000000;
  50. }
  51. .tips {
  52. font-size: 32rpx;
  53. color: #2F3044;
  54. margin-top: 20rpx;
  55. font-weight: 700;
  56. }
  57. .btn {
  58. margin: 80rpx auto;
  59. width: 600rpx;
  60. border-radius: 32rpx;
  61. line-height: 90rpx;
  62. color: #ffffff;
  63. font-size: 34rpx;
  64. background: #5074FF;
  65. }
  66. }
  67. </style>