index.vue 658 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view class="loading-mask" v-show="isLoading">
  3. <view class="loading-content">
  4. <view>加载中...</view>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. name: 'WindowLoading',
  11. props: {
  12. isLoading: {
  13. type: Boolean,
  14. default: false
  15. }
  16. }
  17. }
  18. </script>
  19. <style lang="scss" scoped>
  20. .loading-mask {
  21. position: fixed;
  22. top: 0;
  23. left: 0;
  24. right: 0;
  25. bottom: 0;
  26. background-color: rgba(0, 0, 0, 0.5);
  27. display: flex;
  28. justify-content: center;
  29. align-items: center;
  30. z-index: 1000;
  31. }
  32. .loading-content {
  33. width: 100%;
  34. height: 100%;
  35. display: flex;
  36. align-items: center;
  37. justify-content: center;
  38. }
  39. </style>