|
@@ -22,14 +22,14 @@ interface Field {
|
|
|
control: {
|
|
|
label: string; placeholder?: string;
|
|
|
type?: string; min?: number; max?: number; minlength?: number; maxlength?: number;
|
|
|
- clearable?: boolean; border?: boolean;
|
|
|
+ clearable?: boolean; border?: boolean; readonly?:boolean;
|
|
|
};
|
|
|
component?: |
|
|
|
{ name: 'radio', options: { label: string; value: string; }[] } |
|
|
|
{ name: 'code', props?: Partial<PasswordInputProps> };
|
|
|
keyboard?: { show: boolean; } & Partial<NumberKeyboardProps>;
|
|
|
suffix?: string;
|
|
|
- rules?: FieldRule | FieldRule[];
|
|
|
+ rules?: FieldRule[];
|
|
|
}
|
|
|
|
|
|
const Fields: Record<FieldKey, Field> = {
|
|
@@ -227,7 +227,7 @@ const { send: handle } = useRequest(
|
|
|
<template #input v-else-if="field.component?.name === 'code'">
|
|
|
<van-password-input
|
|
|
style="width: 100%;"
|
|
|
- v-model:value="modelRef[field.name]" v-bind="field.component.props"
|
|
|
+ v-model:value="modelRef[field.name]" v-bind="(field.component as any)!.props"
|
|
|
:focused="field.keyboard?.show" @focus="field.keyboard && (field.keyboard.show = true)"
|
|
|
/>
|
|
|
</template>
|