Loading.vue 566 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <div class="loading" v-if="show">
  3. <div class="loadingModal"></div>
  4. <img src="../images/loading.gif" alt="">
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. data(){
  10. return {
  11. show:true
  12. }
  13. }
  14. }
  15. </script>
  16. <style lang="less" scoped>
  17. @import "../less/base.less";
  18. .loading {
  19. .loadingModal{
  20. .mask;
  21. position: fixed;
  22. width: 100%;
  23. height: 100%;
  24. left: 0;
  25. top: 0;
  26. z-index: 999;
  27. }
  28. img {
  29. position: fixed;
  30. top: 50%;
  31. left: 50%;
  32. transform: translate(-50%, -50%);
  33. z-index: 1000;
  34. }
  35. }
  36. </style>