From 3d420288a6683988f445e653378db27cd80c863e Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 20 八月 2025 11:22:35 +0800 Subject: [PATCH] fix: 实名 --- packages/components/src/Input/ChooseInputWithDatePicker.vue | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/components/src/Input/ChooseInputWithDatePicker.vue b/packages/components/src/Input/ChooseInputWithDatePicker.vue index f14b604..a2d8450 100644 --- a/packages/components/src/Input/ChooseInputWithDatePicker.vue +++ b/packages/components/src/Input/ChooseInputWithDatePicker.vue @@ -15,9 +15,15 @@ type Props = { modelValue: string | number; + minDate?: Date; + maxDate?: Date; + type?: string; + format?: string; }; -const props = withDefaults(defineProps<Props>(), {}); +const props = withDefaults(defineProps<Props>(), { + format: 'YYYY-MM-DD', +}); const emit = defineEmits<{ (e: 'update:modelValue', val: string | number): void; @@ -43,10 +49,13 @@ h(DatePicker, { modelValue: _modelValue, onCancel: onClose, + type: props.type, + maxDate: props.maxDate, onConfirm: ({ selectedValue }) => { - emit('update:modelValue', dayjs(selectedValue).format('YYYY-MM-DD')); + emit('update:modelValue', dayjs(selectedValue.join('-')).format(props.format)); onClose(); }, + minDate: props.minDate, }), } ), -- Gitblit v1.9.1