提交 6af38b17 编写于 作者: L LeoKu

Update type modifier

上级 dbd6aa95
...@@ -71,8 +71,9 @@ import ActionBar from '@/components/ActionBar.vue' ...@@ -71,8 +71,9 @@ import ActionBar from '@/components/ActionBar.vue'
import CodeModal from '@/components/CodeModal.vue' import CodeModal from '@/components/CodeModal.vue'
import Configurator from '@/components/Configurator.vue' import Configurator from '@/components/Configurator.vue'
import DownloadModal from '@/components/DownloadModal.vue' import DownloadModal from '@/components/DownloadModal.vue'
import type { VueColorAvatarRef } from '@/components/VueColorAvatar.vue' import VueColorAvatar, {
import VueColorAvatar from '@/components/VueColorAvatar.vue' type VueColorAvatarRef,
} from '@/components/VueColorAvatar.vue'
import { ActionType } from '@/enums' import { ActionType } from '@/enums'
import { useAvatarOption } from '@/hooks' import { useAvatarOption } from '@/hooks'
import Container from '@/layouts/Container.vue' import Container from '@/layouts/Container.vue'
......
...@@ -70,8 +70,7 @@ import { useI18n } from 'vue-i18n' ...@@ -70,8 +70,7 @@ import { useI18n } from 'vue-i18n'
import PerfectScrollbar from '@/components/PerfectScrollbar.vue' import PerfectScrollbar from '@/components/PerfectScrollbar.vue'
import SectionWrapper from '@/components/SectionWrapper.vue' import SectionWrapper from '@/components/SectionWrapper.vue'
import type { WidgetShape, WrapperShape } from '@/enums' import { type WidgetShape, type WrapperShape, WidgetType } from '@/enums'
import { WidgetType } from '@/enums'
import { useAvatarOption } from '@/hooks' import { useAvatarOption } from '@/hooks'
import { SETTINGS } from '@/utils/constant' import { SETTINGS } from '@/utils/constant'
import { previewData } from '@/utils/dynamic-data' import { previewData } from '@/utils/dynamic-data'
......
...@@ -24,7 +24,7 @@ export interface VueColorAvatarRef { ...@@ -24,7 +24,7 @@ export interface VueColorAvatarRef {
import { ref, toRefs, watchEffect } from 'vue' import { ref, toRefs, watchEffect } from 'vue'
import { WrapperShape } from '@/enums' import { WrapperShape } from '@/enums'
import type { AvatarOption } from '@/types' import { type AvatarOption } from '@/types'
import { getRandomAvatarOption } from '@/utils' import { getRandomAvatarOption } from '@/utils'
import { AVATAR_LAYER, NONE } from '@/utils/constant' import { AVATAR_LAYER, NONE } from '@/utils/constant'
import { widgetData } from '@/utils/dynamic-data' import { widgetData } from '@/utils/dynamic-data'
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import type { AvatarOption } from '../../types' import { type AvatarOption } from '../../types'
interface BackgroundProps { interface BackgroundProps {
color: AvatarOption['background']['color'] color: AvatarOption['background']['color']
......
/// <reference types="vite/client" /> /// <reference types="vite/client" />
declare module '*.vue' { declare module '*.vue' {
import type { DefineComponent } from 'vue' import { type DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any> const component: DefineComponent<{}, {}, any>
export default component export default component
......
...@@ -2,7 +2,7 @@ import { computed } from 'vue' ...@@ -2,7 +2,7 @@ import { computed } from 'vue'
import { useStore } from '@/store' import { useStore } from '@/store'
import { SET_AVATAR_OPTION } from '@/store/mutation-type' import { SET_AVATAR_OPTION } from '@/store/mutation-type'
import type { AvatarOption } from '@/types' import { type AvatarOption } from '@/types'
export default function useAvatarOption() { export default function useAvatarOption() {
const store = useStore() const store = useStore()
......
import type { InjectionKey } from 'vue' import { type InjectionKey } from 'vue'
import type { Store } from 'vuex' import { type Store, createStore, useStore as baseUseStore } from 'vuex'
import { createStore, useStore as baseUseStore } from 'vuex'
import { WrapperShape } from '@/enums' import { WrapperShape } from '@/enums'
import type { AvatarOption } from '@/types' import { type AvatarOption } from '@/types'
import { getRandomAvatarOption } from '@/utils' import { getRandomAvatarOption } from '@/utils'
import { SCREEN } from '@/utils/constant' import { SCREEN } from '@/utils/constant'
......
import type { NONE } from '@/utils/constant' import { type NONE } from '@/utils/constant'
export type None = typeof NONE export type None = typeof NONE
import type { import {
BeardShape, type BeardShape,
ClothesShape, type ClothesShape,
EarringsShape, type EarringsShape,
EarShape, type EarShape,
EyebrowsShape, type EyebrowsShape,
EyesShape, type EyesShape,
FaceShape, type FaceShape,
Gender, type Gender,
GlassesShape, type GlassesShape,
MouthShape, type MouthShape,
NoseShape, type NoseShape,
TopsShape, type TopsShape,
WrapperShape, type WrapperShape,
} from '../enums' } from '../enums'
interface Widget<Shape> { interface Widget<Shape> {
......
import type { AvatarOption, AvatarSettings } from '@/types' import { type AvatarOption, type AvatarSettings } from '@/types'
import { import {
BeardShape, BeardShape,
......
import type { EarringsShape, GlassesShape } from '@/enums' import {
import { BeardShape, Gender, TopsShape } from '@/enums' type EarringsShape,
import type { AvatarOption, None } from '@/types' type GlassesShape,
BeardShape,
Gender,
TopsShape,
} from '@/enums'
import { type AvatarOption, type None } from '@/types'
import { NONE, SETTINGS, SPECIAL_AVATARS } from './constant' import { NONE, SETTINGS, SPECIAL_AVATARS } from './constant'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册