From b4f686e007799d9dea2cb5cae090de1c3577ff20 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Mon, 26 Jun 2023 15:53:11 +0800 Subject: [PATCH] fix bug --- auto-imports.d.ts | 40 ++++++++++++++++------------------------ components.d.ts | 9 +++------ vite.config.ts | 4 ++-- 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/auto-imports.d.ts b/auto-imports.d.ts index afffcccc..e21b87e2 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -5,7 +5,6 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] - const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const computed: typeof import('vue')['computed'] @@ -20,11 +19,13 @@ declare global { const createGenericProjection: typeof import('@vueuse/math')['createGenericProjection'] const createGlobalState: typeof import('@vueuse/core')['createGlobalState'] const createInjectionState: typeof import('@vueuse/core')['createInjectionState'] - const createPinia: typeof import('pinia')['createPinia'] + const createLogger: typeof import('vuex')['createLogger'] + const createNamespacedHelpers: typeof import('vuex')['createNamespacedHelpers'] const createProjection: typeof import('@vueuse/math')['createProjection'] const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn'] const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate'] const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable'] + const createStore: typeof import('vuex')['createStore'] const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise'] const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn'] const customRef: typeof import('vue')['customRef'] @@ -32,11 +33,9 @@ declare global { const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch'] const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] const defineComponent: typeof import('vue')['defineComponent'] - const defineStore: typeof import('pinia')['defineStore'] const eagerComputed: typeof import('@vueuse/core')['eagerComputed'] const effectScope: typeof import('vue')['effectScope'] const extendRef: typeof import('@vueuse/core')['extendRef'] - const getActivePinia: typeof import('pinia')['getActivePinia'] const getCurrentInstance: typeof import('vue')['getCurrentInstance'] const getCurrentScope: typeof import('vue')['getCurrentScope'] const h: typeof import('vue')['h'] @@ -51,11 +50,10 @@ declare global { const logicNot: typeof import('@vueuse/math')['logicNot'] const logicOr: typeof import('@vueuse/math')['logicOr'] const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable'] - const mapActions: typeof import('pinia')['mapActions'] - const mapGetters: typeof import('pinia')['mapGetters'] - const mapState: typeof import('pinia')['mapState'] - const mapStores: typeof import('pinia')['mapStores'] - const mapWritableState: typeof import('pinia')['mapWritableState'] + const mapActions: typeof import('vuex')['mapActions'] + const mapGetters: typeof import('vuex')['mapGetters'] + const mapMutations: typeof import('vuex')['mapMutations'] + const mapState: typeof import('vuex')['mapState'] const markRaw: typeof import('vue')['markRaw'] const nextTick: typeof import('vue')['nextTick'] const onActivated: typeof import('vue')['onActivated'] @@ -95,12 +93,9 @@ declare global { const resolveComponent: typeof import('vue')['resolveComponent'] const resolveRef: typeof import('@vueuse/core')['resolveRef'] const resolveUnref: typeof import('@vueuse/core')['resolveUnref'] - const setActivePinia: typeof import('pinia')['setActivePinia'] - const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix'] const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] - const storeToRefs: typeof import('pinia')['storeToRefs'] const syncRef: typeof import('@vueuse/core')['syncRef'] const syncRefs: typeof import('@vueuse/core')['syncRefs'] const templateRef: typeof import('@vueuse/core')['templateRef'] @@ -256,6 +251,7 @@ declare global { const useStepper: typeof import('@vueuse/core')['useStepper'] const useStorage: typeof import('@vueuse/core')['useStorage'] const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync'] + const useStore: typeof import('vuex')['useStore'] const useStyleTag: typeof import('@vueuse/core')['useStyleTag'] const useSum: typeof import('@vueuse/math')['useSum'] const useSupported: typeof import('@vueuse/core')['useSupported'] @@ -319,7 +315,6 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { readonly EffectScope: UnwrapRef - readonly acceptHMRUpdate: UnwrapRef readonly asyncComputed: UnwrapRef readonly autoResetRef: UnwrapRef readonly computed: UnwrapRef @@ -334,11 +329,13 @@ declare module 'vue' { readonly createGenericProjection: UnwrapRef readonly createGlobalState: UnwrapRef readonly createInjectionState: UnwrapRef - readonly createPinia: UnwrapRef + readonly createLogger: UnwrapRef + readonly createNamespacedHelpers: UnwrapRef readonly createProjection: UnwrapRef readonly createReactiveFn: UnwrapRef readonly createReusableTemplate: UnwrapRef readonly createSharedComposable: UnwrapRef + readonly createStore: UnwrapRef readonly createTemplatePromise: UnwrapRef readonly createUnrefFn: UnwrapRef readonly customRef: UnwrapRef @@ -346,11 +343,9 @@ declare module 'vue' { readonly debouncedWatch: UnwrapRef readonly defineAsyncComponent: UnwrapRef readonly defineComponent: UnwrapRef - readonly defineStore: UnwrapRef readonly eagerComputed: UnwrapRef readonly effectScope: UnwrapRef readonly extendRef: UnwrapRef - readonly getActivePinia: UnwrapRef readonly getCurrentInstance: UnwrapRef readonly getCurrentScope: UnwrapRef readonly h: UnwrapRef @@ -365,11 +360,10 @@ declare module 'vue' { readonly logicNot: UnwrapRef readonly logicOr: UnwrapRef readonly makeDestructurable: UnwrapRef - readonly mapActions: UnwrapRef - readonly mapGetters: UnwrapRef - readonly mapState: UnwrapRef - readonly mapStores: UnwrapRef - readonly mapWritableState: UnwrapRef + readonly mapActions: UnwrapRef + readonly mapGetters: UnwrapRef + readonly mapMutations: UnwrapRef + readonly mapState: UnwrapRef readonly markRaw: UnwrapRef readonly nextTick: UnwrapRef readonly onActivated: UnwrapRef @@ -409,12 +403,9 @@ declare module 'vue' { readonly resolveComponent: UnwrapRef readonly resolveRef: UnwrapRef readonly resolveUnref: UnwrapRef - readonly setActivePinia: UnwrapRef - readonly setMapStoreSuffix: UnwrapRef readonly shallowReactive: UnwrapRef readonly shallowReadonly: UnwrapRef readonly shallowRef: UnwrapRef - readonly storeToRefs: UnwrapRef readonly syncRef: UnwrapRef readonly syncRefs: UnwrapRef readonly templateRef: UnwrapRef @@ -570,6 +561,7 @@ declare module 'vue' { readonly useStepper: UnwrapRef readonly useStorage: UnwrapRef readonly useStorageAsync: UnwrapRef + readonly useStore: UnwrapRef readonly useStyleTag: UnwrapRef readonly useSum: UnwrapRef readonly useSupported: UnwrapRef diff --git a/components.d.ts b/components.d.ts index f04e1c9c..076f0808 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,13 +9,10 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { - CardStatisticsHorizontal: typeof import('./src/components/cards/CardStatisticsHorizontal.vue')['default'] - CardStatisticsVertical: typeof import('./src/components/cards/CardStatisticsVertical.vue')['default'] - CardStatisticsWithImages: typeof import('./src/components/cards/CardStatisticsWithImages.vue')['default'] - ErrorHeader: typeof import('./src/@/components/ErrorHeader.vue')['default'] - MoreBtn: typeof import('./src/@/components/MoreBtn.vue')['default'] + ErrorHeader: typeof import('./src/@core/components/ErrorHeader.vue')['default'] + MoreBtn: typeof import('./src/@core/components/MoreBtn.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ThemeSwitcher: typeof import('./src/@/components/ThemeSwitcher.vue')['default'] + ThemeSwitcher: typeof import('./src/@core/components/ThemeSwitcher.vue')['default'] } } diff --git a/vite.config.ts b/vite.config.ts index 95f0b2f7..1ee5d319 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,11 +20,11 @@ export default defineConfig({ }, }), Components({ - dirs: ['src/@/components'], + dirs: ['src/@core/components'], dts: true, }), AutoImport({ - imports: ['vue', 'vue-router', '@vueuse/core', '@vueuse/math', 'pinia'], + imports: ['vue', 'vue-router', '@vueuse/core', '@vueuse/math', 'vuex'], vueTemplate: true, }), VitePWA({ registerType: 'autoUpdate', injectRegister: 'auto', srcDir: 'public' }),