feat(types): support custom values from app.config.ts (#863)

This commit is contained in:
Benjamin Canac
2023-11-17 18:48:50 +01:00
committed by GitHub
parent bcc46b87f5
commit 7339324355
26 changed files with 132 additions and 57 deletions

View File

@@ -26,7 +26,7 @@ import { twMerge, twJoin } from 'tailwind-merge'
import { useUI } from '../../composables/useUI'
import { useFormGroup } from '../../composables/useFormGroup'
import { mergeConfig } from '../../utils'
import type { Strategy } from '../../types'
import type { RangeSize, Strategy } from '../../types'
// @ts-expect-error
import appConfig from '#build/app.config'
import { range } from '#ui/ui.config'
@@ -66,7 +66,7 @@ export default defineComponent({
default: 1
},
size: {
type: String as PropType<keyof typeof config.size>,
type: String as PropType<RangeSize>,
default: null,
validator (value: string) {
return Object.keys(config.size).includes(value)