From 6af38b17eb0296bfe072419e8a70b702220069ba Mon Sep 17 00:00:00 2001 From: LeoKu Date: Sat, 26 Feb 2022 11:30:06 +0800 Subject: [PATCH] Update type modifier --- src/App.vue | 5 +++-- src/components/Configurator.vue | 3 +-- src/components/VueColorAvatar.vue | 2 +- src/components/widgets/Background.vue | 2 +- src/env.d.ts | 2 +- src/hooks/useAvatarOption.ts | 2 +- src/store/index.ts | 7 +++---- src/types/index.ts | 30 +++++++++++++-------------- src/utils/constant.ts | 2 +- src/utils/index.ts | 11 +++++++--- 10 files changed, 35 insertions(+), 31 deletions(-) diff --git a/src/App.vue b/src/App.vue index 3f554c2..5d7fad2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -71,8 +71,9 @@ import ActionBar from '@/components/ActionBar.vue' import CodeModal from '@/components/CodeModal.vue' import Configurator from '@/components/Configurator.vue' import DownloadModal from '@/components/DownloadModal.vue' -import type { VueColorAvatarRef } from '@/components/VueColorAvatar.vue' -import VueColorAvatar from '@/components/VueColorAvatar.vue' +import VueColorAvatar, { + type VueColorAvatarRef, +} from '@/components/VueColorAvatar.vue' import { ActionType } from '@/enums' import { useAvatarOption } from '@/hooks' import Container from '@/layouts/Container.vue' diff --git a/src/components/Configurator.vue b/src/components/Configurator.vue index 35ffc31..40ee789 100644 --- a/src/components/Configurator.vue +++ b/src/components/Configurator.vue @@ -70,8 +70,7 @@ import { useI18n } from 'vue-i18n' import PerfectScrollbar from '@/components/PerfectScrollbar.vue' import SectionWrapper from '@/components/SectionWrapper.vue' -import type { WidgetShape, WrapperShape } from '@/enums' -import { WidgetType } from '@/enums' +import { type WidgetShape, type WrapperShape, WidgetType } from '@/enums' import { useAvatarOption } from '@/hooks' import { SETTINGS } from '@/utils/constant' import { previewData } from '@/utils/dynamic-data' diff --git a/src/components/VueColorAvatar.vue b/src/components/VueColorAvatar.vue index cf2570f..eeee0a0 100644 --- a/src/components/VueColorAvatar.vue +++ b/src/components/VueColorAvatar.vue @@ -24,7 +24,7 @@ export interface VueColorAvatarRef { import { ref, toRefs, watchEffect } from 'vue' import { WrapperShape } from '@/enums' -import type { AvatarOption } from '@/types' +import { type AvatarOption } from '@/types' import { getRandomAvatarOption } from '@/utils' import { AVATAR_LAYER, NONE } from '@/utils/constant' import { widgetData } from '@/utils/dynamic-data' diff --git a/src/components/widgets/Background.vue b/src/components/widgets/Background.vue index 8f3e9a0..b4715da 100644 --- a/src/components/widgets/Background.vue +++ b/src/components/widgets/Background.vue @@ -3,7 +3,7 @@