From eae59a55013320b71e499e3ac8ef0721592c4729 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Mon, 10 Apr 2023 21:06:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90issues/435=E3=80=91=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84=E6=97=A5=E6=9C=9F=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E8=B5=8B=E9=BB=98=E8=AE=A4=E5=80=BC=E6=8A=A5=E9=94=99,?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E4=B8=80=E4=B8=8B=EF=BC=8C=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E6=8F=90=E7=A4=BA=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Form/src/BasicForm.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/Form/src/BasicForm.vue b/src/components/Form/src/BasicForm.vue index 015a43f..27a76fd 100644 --- a/src/components/Form/src/BasicForm.vue +++ b/src/components/Form/src/BasicForm.vue @@ -117,7 +117,15 @@ const { defaultValue, component, componentProps } = schema; // handle date type if (defaultValue && dateItemType.includes(component)) { - const { valueFormat } = componentProps + //update-begin---author:wangshuai ---date:20230410 for:【issues/435】代码生成的日期控件赋默认值报错------------ + let valueFormat:string = ""; + if(componentProps){ + valueFormat = componentProps?.valueFormat; + } + if(!valueFormat){ + console.warn("未配置valueFormat,可能导致格式化错误!"); + } + //update-end---author:wangshuai ---date:20230410 for:【issues/435】代码生成的日期控件赋默认值报错------------ if (!Array.isArray(defaultValue)) { //update-begin---author:wangshuai ---date:20221124 for:[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------ if(valueFormat){