Type Alias: RCustomFieldDefaultSlotProps
ts
type RCustomFieldDefaultSlotProps = Pick<
RCustomFieldProps,
"modelValue" | "onUpdate:modelValue" | "onUpdate:model-value"
> & {
autofocus: boolean;
disabled: boolean;
name: string | undefined;
readonly: boolean;
} & {
[x: string]: any;
} & Partial<Record<string, unknown>>;Props object passed to custom field implementations via the default slot.
Contains the essential props that custom field implementations need to integrate properly with the wrapper's state management and event system. Includes model value handling, validation state, and core input properties.
Key properties:
modelValue: Current field valueonUpdate:modelValue/onUpdate:model-value: Value update handlersautofocus,readonly,disabled: State flagsname: Input name attribute- Additional props spread from VField/VInput processing
Type Declaration
| Name | Type |
|---|---|
autofocus | boolean |
disabled | boolean |
name | string | undefined |
readonly | boolean |
Example
typescript
// In custom field slot
<template #default="{ props }">
<input
:value="props.modelValue"
@input="props['onUpdate:modelValue']($event.target.value)"
:readonly="props.readonly"
:disabled="props.disabled"
/>
</template>