app.vue 766 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <router-view ref="routerView" v-slot="{Component}">
  3. <component :is="Component" :cnc="appData" />
  4. </router-view>
  5. </template>
  6. <script lang="ts">
  7. import {ref, defineComponent} from "vue";
  8. import {ElLoading} from "element-plus";
  9. export default defineComponent({
  10. name: "App",
  11. emits: [],
  12. props: [],
  13. components: {},
  14. setup(props, context) {
  15. const appData: any = ref({
  16. loading: ElLoading.service({
  17. lock: true,
  18. background: "rgba(0, 0, 0, .5)",
  19. customClass: "desktop",
  20. }),
  21. data: false
  22. });
  23. return {
  24. props,
  25. appData
  26. }
  27. }
  28. });
  29. </script>
  30. <style>
  31. @import "./assets/css/base.scss";
  32. </style>