Update type modifier

This commit is contained in:
LeoKu 2022-02-26 11:30:06 +08:00
parent dbd6aa9573
commit 6af38b17eb
10 changed files with 35 additions and 31 deletions

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -3,7 +3,7 @@
</template>
<script lang="ts" setup>
import type { AvatarOption } from '../../types'
import { type AvatarOption } from '../../types'
interface BackgroundProps {
color: AvatarOption['background']['color']

2
src/env.d.ts vendored
View File

@ -1,7 +1,7 @@
/// <reference types="vite/client" />
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
const component: DefineComponent<{}, {}, any>
export default component

View File

@ -2,7 +2,7 @@ import { computed } from 'vue'
import { useStore } from '@/store'
import { SET_AVATAR_OPTION } from '@/store/mutation-type'
import type { AvatarOption } from '@/types'
import { type AvatarOption } from '@/types'
export default function useAvatarOption() {
const store = useStore()

View File

@ -1,9 +1,8 @@
import type { InjectionKey } from 'vue'
import type { Store } from 'vuex'
import { createStore, useStore as baseUseStore } from 'vuex'
import { type InjectionKey } from 'vue'
import { type Store, createStore, useStore as baseUseStore } from 'vuex'
import { WrapperShape } from '@/enums'
import type { AvatarOption } from '@/types'
import { type AvatarOption } from '@/types'
import { getRandomAvatarOption } from '@/utils'
import { SCREEN } from '@/utils/constant'

View File

@ -1,21 +1,21 @@
import type { NONE } from '@/utils/constant'
import { type NONE } from '@/utils/constant'
export type None = typeof NONE
import type {
BeardShape,
ClothesShape,
EarringsShape,
EarShape,
EyebrowsShape,
EyesShape,
FaceShape,
Gender,
GlassesShape,
MouthShape,
NoseShape,
TopsShape,
WrapperShape,
import {
type BeardShape,
type ClothesShape,
type EarringsShape,
type EarShape,
type EyebrowsShape,
type EyesShape,
type FaceShape,
type Gender,
type GlassesShape,
type MouthShape,
type NoseShape,
type TopsShape,
type WrapperShape,
} from '../enums'
interface Widget<Shape> {

View File

@ -1,4 +1,4 @@
import type { AvatarOption, AvatarSettings } from '@/types'
import { type AvatarOption, type AvatarSettings } from '@/types'
import {
BeardShape,

View File

@ -1,6 +1,11 @@
import type { EarringsShape, GlassesShape } from '@/enums'
import { BeardShape, Gender, TopsShape } from '@/enums'
import type { AvatarOption, None } from '@/types'
import {
type EarringsShape,
type GlassesShape,
BeardShape,
Gender,
TopsShape,
} from '@/enums'
import { type AvatarOption, type None } from '@/types'
import { NONE, SETTINGS, SPECIAL_AVATARS } from './constant'