mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 11:47:55 +01:00
fix(Input/Textarea): define model modifiers types (#4195)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -38,6 +38,13 @@ export interface InputProps extends UseComponentIconsProps {
|
|||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
/** Highlight the ring color like a focus state. */
|
/** Highlight the ring color like a focus state. */
|
||||||
highlight?: boolean
|
highlight?: boolean
|
||||||
|
modelModifiers?: {
|
||||||
|
string?: boolean
|
||||||
|
number?: boolean
|
||||||
|
trim?: boolean
|
||||||
|
lazy?: boolean
|
||||||
|
nullify?: boolean
|
||||||
|
}
|
||||||
class?: any
|
class?: any
|
||||||
ui?: Input['slots']
|
ui?: Input['slots']
|
||||||
}
|
}
|
||||||
@@ -77,6 +84,7 @@ const props = withDefaults(defineProps<InputProps>(), {
|
|||||||
const emits = defineEmits<InputEmits<T>>()
|
const emits = defineEmits<InputEmits<T>>()
|
||||||
const slots = defineSlots<InputSlots>()
|
const slots = defineSlots<InputSlots>()
|
||||||
|
|
||||||
|
// eslint-disable-next-line vue/no-dupe-keys
|
||||||
const [modelValue, modelModifiers] = defineModel<T>()
|
const [modelValue, modelModifiers] = defineModel<T>()
|
||||||
|
|
||||||
const appConfig = useAppConfig() as Input['AppConfig']
|
const appConfig = useAppConfig() as Input['AppConfig']
|
||||||
|
|||||||
@@ -35,11 +35,17 @@ export interface TextareaProps extends UseComponentIconsProps {
|
|||||||
autoresize?: boolean
|
autoresize?: boolean
|
||||||
autoresizeDelay?: number
|
autoresizeDelay?: number
|
||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
class?: any
|
|
||||||
rows?: number
|
rows?: number
|
||||||
maxrows?: number
|
maxrows?: number
|
||||||
/** Highlight the ring color like a focus state. */
|
/** Highlight the ring color like a focus state. */
|
||||||
highlight?: boolean
|
highlight?: boolean
|
||||||
|
modelModifiers?: {
|
||||||
|
string?: boolean
|
||||||
|
trim?: boolean
|
||||||
|
lazy?: boolean
|
||||||
|
nullify?: boolean
|
||||||
|
}
|
||||||
|
class?: any
|
||||||
ui?: Textarea['slots']
|
ui?: Textarea['slots']
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +82,7 @@ const props = withDefaults(defineProps<TextareaProps>(), {
|
|||||||
const emits = defineEmits<TextareaEmits<T>>()
|
const emits = defineEmits<TextareaEmits<T>>()
|
||||||
const slots = defineSlots<TextareaSlots>()
|
const slots = defineSlots<TextareaSlots>()
|
||||||
|
|
||||||
|
// eslint-disable-next-line vue/no-dupe-keys
|
||||||
const [modelValue, modelModifiers] = defineModel<T>()
|
const [modelValue, modelModifiers] = defineModel<T>()
|
||||||
|
|
||||||
const appConfig = useAppConfig() as Textarea['AppConfig']
|
const appConfig = useAppConfig() as Textarea['AppConfig']
|
||||||
|
|||||||
Reference in New Issue
Block a user