mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-12-21 18:50:16 +00:00
fix(form): datatime没有初始值时异常
This commit is contained in:
parent
36ff636561
commit
45502b2ef1
@ -32,9 +32,9 @@ const emit = defineEmits<{
|
||||
|
||||
useAddField(props.prop);
|
||||
|
||||
const value = props.model?.[props.name].toString();
|
||||
const value = props.model?.[props.name]?.toString();
|
||||
if (props.model) {
|
||||
if (value === 'Invalid Date') {
|
||||
if (!value || value === 'Invalid Date') {
|
||||
props.model[props.name] = '';
|
||||
} else {
|
||||
props.model[props.name] = datetimeFormatter(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user