index.vue 572 B

1234567891011121314151617181920212223242526272829303132333435
  1. <style>
  2. .loadingClass {
  3. z-index: 0!important;
  4. .el-loading-spinner {
  5. top: 0%;
  6. margin-top: 30%;
  7. }
  8. }
  9. </style>
  10. <script>
  11. import bus from '../../../../bus.js';
  12. import './progress.js';
  13. export default {
  14. data() {
  15. return {
  16. count: 0
  17. };
  18. },
  19. created() {
  20. bus.$on('user-theme-config-loading', val => {
  21. if (val) {
  22. this.count++;
  23. if (this.count > 1) return;
  24. this.$bar.start();
  25. } else {
  26. this.count--;
  27. if (this.count) return;
  28. this.$bar.finish();
  29. }
  30. });
  31. }
  32. };
  33. </script>