mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 08:20:39 +01:00
feat(types): support custom values from app.config.ts (#863)
This commit is contained in:
@@ -42,7 +42,7 @@ import { computed, defineComponent, provide, inject, ref, toRef } from 'vue'
|
||||
import type { Ref, PropType } from 'vue'
|
||||
import { useUI } from '../../composables/useUI'
|
||||
import { mergeConfig } from '../../utils'
|
||||
import type { FormError, InjectedFormGroupValue, Strategy } from '../../types'
|
||||
import type { FormError, InjectedFormGroupValue, FormGroupSize, Strategy } from '../../types'
|
||||
// @ts-expect-error
|
||||
import appConfig from '#build/app.config'
|
||||
import { formGroup } from '#ui/ui.config'
|
||||
@@ -57,7 +57,7 @@ export default defineComponent({
|
||||
default: null
|
||||
},
|
||||
size: {
|
||||
type: String as PropType<keyof typeof config.size>,
|
||||
type: String as PropType<FormGroupSize>,
|
||||
default: null,
|
||||
validator (value: string) {
|
||||
return Object.keys(config.size).includes(value)
|
||||
|
||||
Reference in New Issue
Block a user