diff --git a/Web/src/components/PageLoading.vue b/Web/src/components/PageLoading.vue new file mode 100644 index 0000000..4653bd1 --- /dev/null +++ b/Web/src/components/PageLoading.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/Web/src/composables/usePageLoading.ts b/Web/src/composables/usePageLoading.ts new file mode 100644 index 0000000..3c5fa12 --- /dev/null +++ b/Web/src/composables/usePageLoading.ts @@ -0,0 +1,14 @@ +export class PageLoading{ + + private static get PageLoading() { + return useAppStore() + } + public static Loading(): void { + this.PageLoading.startLoading("加载中..."); + } + public static Close(): void { + + this.PageLoading.endLoading(); + } +} + diff --git a/Web/src/middleware/page-loading.ts b/Web/src/middleware/page-loading.ts new file mode 100644 index 0000000..bf0ae82 --- /dev/null +++ b/Web/src/middleware/page-loading.ts @@ -0,0 +1,3 @@ +export default defineNuxtRouteMiddleware(() => { + PageLoading.Loading() +})