mirror of
https://github.com/Codennnn/vue-color-avatar.git
synced 2024-12-22 20:22:39 +00:00
Update type modifier
This commit is contained in:
parent
dbd6aa9573
commit
6af38b17eb
@ -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'
|
|||||||
|
|
||||||
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 {
|
|||||||
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 @@
|
|||||||
</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']
|
||||||
|
2
src/env.d.ts
vendored
2
src/env.d.ts
vendored
@ -1,7 +1,7 @@
|
|||||||
/// <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'
|
|||||||
|
|
||||||
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()
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
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'
|
||||||
|
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
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> {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { AvatarOption, AvatarSettings } from '@/types'
|
import { type AvatarOption, type AvatarSettings } from '@/types'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BeardShape,
|
BeardShape,
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
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'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user