index.vue 646 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <div v-if="showProgress" class="progress">
  3. <div class="progress-bar">
  4. <el-progress type="circle" :percentage="percentage" />
  5. </div>
  6. </div>
  7. </template>
  8. <script>
  9. import { mapGetters } from 'vuex';
  10. export default {
  11. computed: {
  12. ...mapGetters(['showProgress', 'percentage'])
  13. }
  14. };
  15. </script>
  16. <style lang="scss" scoped>
  17. .progress {
  18. position: fixed;
  19. top: 0;
  20. right: 0;
  21. bottom: 0;
  22. left: 0;
  23. z-index: 3001;
  24. background-color: hsla(0, 0%, 100%, 0.9);
  25. transition: opacity 0.3s;
  26. &-bar {
  27. position: absolute;
  28. top: 50%;
  29. width: 100%;
  30. margin-top: -65px;
  31. text-align: center;
  32. }
  33. }
  34. </style>