uni-loading.vue 887 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view class="loading-container">
  3. <Loading1 v-if="loadingType==1"/>
  4. <Loading2 v-if="loadingType==2"/>
  5. <Loading3 v-if="loadingType==3"/>
  6. <Loading4 v-if="loadingType==4"/>
  7. <Loading5 v-if="loadingType==5"/>
  8. </view>
  9. </template>
  10. <script>
  11. import Loading1 from "./loading1.vue";
  12. import Loading2 from "./loading2.vue";
  13. import Loading3 from "./loading3.vue";
  14. import Loading4 from "./loading4.vue";
  15. import Loading5 from "./loading5.vue";
  16. export default {
  17. components:{Loading1,Loading2,Loading3,Loading4,Loading5},
  18. name: 'uni-loading1',
  19. props: {
  20. loadingType: {
  21. type: Number,
  22. default: 2
  23. },
  24. },
  25. data() {
  26. return {
  27. };
  28. },
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. @import "@/uni.scss";
  33. .loading-container {
  34. display: flex;
  35. flex-direction: column;
  36. align-items: center;
  37. justify-content: center;
  38. height: 200px;
  39. }
  40. </style>