Skip to content

Commit 395ed56

Browse files
committed
fix: auto import
1 parent 1110d5d commit 395ed56

File tree

10 files changed

+42
-24
lines changed

10 files changed

+42
-24
lines changed

src/app.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts" setup>
2-
import { VLayout } from 'templates'
2+
import VLayout from 'templates/VLayout/vlayout.vue'
33
</script>
44

55
<template>

src/components/molecules/index.ts

-3
This file was deleted.

src/components/templates/index.ts

-5
This file was deleted.

src/composables/index.ts

-5
This file was deleted.

src/modules/About/views/about.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts" setup>
22
import { onMounted } from 'vue'
33
4-
import { useCommon } from '@/composables'
4+
import useCommon from '@/composables/useCommon'
55
66
const { setTitle } = useCommon()
77

src/modules/Home/views/home.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { useI18n } from 'vue-i18n'
88
import { useVuelidate } from '@vuelidate/core'
99
import { required } from '@vuelidate/validators'
1010
11-
import { VFormItem } from 'molecules'
12-
import { useCommon } from '@/composables'
11+
import VFormItem from 'molecules/VFormItem/vformItem.vue'
12+
import useCommon from '@/composables/useCommon'
1313
1414
const {
1515
t,

src/router.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
createWebHistory,
77
} from 'vue-router'
88

9-
import { routerGuard } from '@/utils'
9+
import routerGuard from '@/utils/routerGuard'
1010

1111
const domainRouterFiles = import.meta.globEager('../src/modules/**/router.ts')
1212
const domainRoutes: RouteRecordRaw[] = []

src/typings/auto-imports.d.ts

+28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
export {}
22
declare global {
33
const EffectScope: typeof import('vue')['EffectScope']
4+
const SET_TITLE: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonTypes')['SET_TITLE']
5+
const common: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/index')['default']
6+
const commonActions: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonActions')['default']
7+
const commonGetters: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonGetters')['default']
8+
const commonMutations: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonMutations')['default']
9+
const commonState: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonState')['default']
410
const computed: typeof import('vue')['computed']
511
const createApp: typeof import('vue')['createApp']
612
const createLogger: typeof import('vuex')['createLogger']
@@ -9,13 +15,18 @@ declare global {
915
const customRef: typeof import('vue')['customRef']
1016
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
1117
const defineComponent: typeof import('vue')['defineComponent']
18+
const delErrorPage: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/storage')['delErrorPage']
1219
const effectScope: typeof import('vue')['effectScope']
1320
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
1421
const getCurrentScope: typeof import('vue')['getCurrentScope']
22+
const getErrorPage: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/storage')['getErrorPage']
1523
const h: typeof import('vue')['h']
24+
const http: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/services/Http')['default']
25+
const httpService: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/services/index')['httpService']
1626
const inject: typeof import('vue')['inject']
1727
const isReadonly: typeof import('vue')['isReadonly']
1828
const isRef: typeof import('vue')['isRef']
29+
const isUndefined: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/filters')['isUndefined']
1930
const mapActions: typeof import('vuex')['mapActions']
2031
const mapGetters: typeof import('vuex')['mapGetters']
2132
const mapMutations: typeof import('vuex')['mapMutations']
@@ -40,6 +51,8 @@ declare global {
4051
const readonly: typeof import('vue')['readonly']
4152
const ref: typeof import('vue')['ref']
4253
const resolveComponent: typeof import('vue')['resolveComponent']
54+
const routerGuard: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/routerGuard')['default']
55+
const setErrorPage: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/storage')['setErrorPage']
4356
const shallowReactive: typeof import('vue')['shallowReactive']
4457
const shallowReadonly: typeof import('vue')['shallowReadonly']
4558
const shallowRef: typeof import('vue')['shallowRef']
@@ -50,6 +63,7 @@ declare global {
5063
const triggerRef: typeof import('vue')['triggerRef']
5164
const unref: typeof import('vue')['unref']
5265
const useAttrs: typeof import('vue')['useAttrs']
66+
const useCommon: typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/composables/useCommon')['default']
5367
const useCssModule: typeof import('vue')['useCssModule']
5468
const useCssVars: typeof import('vue')['useCssVars']
5569
const useI18n: typeof import('vue-i18n')['useI18n']
@@ -65,6 +79,12 @@ import { UnwrapRef } from 'vue'
6579
declare module 'vue' {
6680
interface ComponentCustomProperties {
6781
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
82+
readonly SET_TITLE: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonTypes')['SET_TITLE']>
83+
readonly common: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/index')['default']>
84+
readonly commonActions: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonActions')['default']>
85+
readonly commonGetters: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonGetters')['default']>
86+
readonly commonMutations: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonMutations')['default']>
87+
readonly commonState: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/stores/Common/commonState')['default']>
6888
readonly computed: UnwrapRef<typeof import('vue')['computed']>
6989
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
7090
readonly createLogger: UnwrapRef<typeof import('vuex')['createLogger']>
@@ -73,13 +93,18 @@ declare module 'vue' {
7393
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
7494
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
7595
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
96+
readonly delErrorPage: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/storage')['delErrorPage']>
7697
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
7798
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
7899
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
100+
readonly getErrorPage: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/storage')['getErrorPage']>
79101
readonly h: UnwrapRef<typeof import('vue')['h']>
102+
readonly http: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/services/Http')['default']>
103+
readonly httpService: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/services/index')['httpService']>
80104
readonly inject: UnwrapRef<typeof import('vue')['inject']>
81105
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
82106
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
107+
readonly isUndefined: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/filters')['isUndefined']>
83108
readonly mapActions: UnwrapRef<typeof import('vuex')['mapActions']>
84109
readonly mapGetters: UnwrapRef<typeof import('vuex')['mapGetters']>
85110
readonly mapMutations: UnwrapRef<typeof import('vuex')['mapMutations']>
@@ -104,6 +129,8 @@ declare module 'vue' {
104129
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
105130
readonly ref: UnwrapRef<typeof import('vue')['ref']>
106131
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
132+
readonly routerGuard: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/routerGuard')['default']>
133+
readonly setErrorPage: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/utils/storage')['setErrorPage']>
107134
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
108135
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
109136
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
@@ -114,6 +141,7 @@ declare module 'vue' {
114141
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
115142
readonly unref: UnwrapRef<typeof import('vue')['unref']>
116143
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
144+
readonly useCommon: UnwrapRef<typeof import('/Volumes/DIST/Documents/Open Source/vivu/src/composables/useCommon')['default']>
117145
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
118146
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
119147
readonly useI18n: UnwrapRef<typeof import('vue-i18n')['useI18n']>

src/utils/index.ts

-5
This file was deleted.

vite.config.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,16 @@ export default defineConfig(({ mode }) => {
2424
*/
2525
ViteUnimport.vite({
2626
dirs: [
27+
'src/components/**/**/*.{vue,ts}',
2728
'src/composables',
28-
'src/stores',
29+
'src/services',
30+
'src/stores/**',
31+
'src/utils',
32+
'src/modules/components/**/**/*.{vue,ts}',
33+
'src/modules/composables',
34+
'src/modules/services',
35+
'src/modules/stores/**',
36+
'src/modules/utils',
2937
],
3038
dts: 'src/typings/auto-imports.d.ts',
3139
addons: {

0 commit comments

Comments
 (0)