多租户商城-商户小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

153 lines
2.9 KiB

2 years ago
  1. <!--
  2. * @FileDescription: Skeleton
  3. * @Author: kahu
  4. * @Date: 2023/3/8
  5. * @LastEditors: kahu
  6. * @LastEditTime: 2023/3/8
  7. -->
  8. <template>
  9. <view v-if="isFirst">
  10. <Skeletons
  11. :loading="loading && isFirst"
  12. :animation="true"
  13. bgColor="#FFF"
  14. />
  15. <div class="skeleton_content u-skeleton">
  16. <div class="empty_box u-skeleton-fillet"></div>
  17. <div class="banner_box u-skeleton-fillet"></div>
  18. <div class="icon_box ">
  19. <div class="icon_item" v-for="item in 4">
  20. <div class="img u-skeleton-fillet"></div>
  21. <div class="text u-skeleton-fillet"></div>
  22. </div>
  23. </div>
  24. <div class="hot_box ">
  25. <div class="left u-skeleton-fillet"></div>
  26. <div class="right ">
  27. <div class="top u-skeleton-fillet"></div>
  28. <div class="bottom u-skeleton-fillet"></div>
  29. </div>
  30. </div>
  31. <div class="new_box ">
  32. <div class="item u-skeleton-fillet" v-for="item in 3"></div>
  33. </div>
  34. <div class="hot_box ">
  35. <div class="left u-skeleton-fillet"></div>
  36. <div class="right ">
  37. <div class="top u-skeleton-fillet"></div>
  38. <div class="bottom u-skeleton-fillet"></div>
  39. </div>
  40. </div>
  41. </div>
  42. </view>
  43. </template>
  44. <script>
  45. import Skeletons from "@/components/Skeleton";
  46. export default {
  47. name: "Skeleton",
  48. components:{Skeletons},
  49. data() {
  50. return {}
  51. },
  52. props:{
  53. loading:{
  54. type:Boolean,
  55. default:true
  56. },
  57. isFirst:{
  58. type:Boolean,
  59. default:true
  60. }
  61. },
  62. methods: {}
  63. }
  64. </script>
  65. <style
  66. lang="scss"
  67. scoped
  68. >
  69. .skeleton_content {
  70. width: 100%;
  71. height: calc(100vh - 50px);
  72. overflow-y: hidden;
  73. box-sizing: border-box;
  74. .empty_box{
  75. width: 100%;
  76. height: 140rpx;
  77. }
  78. .banner_box {
  79. width: 100%;
  80. height: 320rpx;
  81. }
  82. .icon_box {
  83. width: 100%;
  84. display: flex;
  85. align-items: center;
  86. justify-content: space-between;
  87. padding: 30rpx 60rpx;
  88. box-sizing: border-box;
  89. .icon_item {
  90. width: 80rpx;
  91. .img {
  92. width: 100%;
  93. height: 80rpx;
  94. }
  95. .text {
  96. margin-top: 20rpx;
  97. width: 100%;
  98. height: 30rpx;
  99. }
  100. }
  101. }
  102. .hot_box {
  103. width: 100%;
  104. height: 390rpx;
  105. display: flex;
  106. align-items: center;
  107. justify-content: space-between;
  108. padding: 20rpx 30rpx;
  109. box-sizing: border-box;
  110. .left {
  111. width: 49%;
  112. height: 100%;
  113. }
  114. .right {
  115. width: 49%;
  116. height: 100%;
  117. display: flex;
  118. flex-direction: column;
  119. justify-content: space-between;
  120. .top, .bottom {
  121. width: 100%;
  122. height: 49%;
  123. }
  124. }
  125. }
  126. .new_box {
  127. width: 100%;
  128. height: 390rpx;
  129. display: flex;
  130. align-items: center;
  131. justify-content: space-between;
  132. padding: 20rpx 30rpx;
  133. box-sizing: border-box;
  134. .item {
  135. width: 30%;
  136. height: 100%;
  137. }
  138. }
  139. }
  140. </style>