mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 23:49:27 +08:00
fix: date field does not show time configuration
This commit is contained in:
parent
bfa998e478
commit
d8d4ef177a
@ -33,6 +33,13 @@ export function fields2properties(fields = [], options: any = {}) {
|
|||||||
title: field.title,
|
title: field.title,
|
||||||
required: field.required,
|
required: field.required,
|
||||||
};
|
};
|
||||||
|
if (field.dateFormat) {
|
||||||
|
set(data, 'x-component-props.format', field.dateFormat);
|
||||||
|
}
|
||||||
|
if (field.showTime) {
|
||||||
|
set(data, 'x-component-props.showTime', true);
|
||||||
|
field.timeFormat && set(data, 'x-component-props.format', `${field.dateFormat} ${field.timeFormat}`);
|
||||||
|
}
|
||||||
if (field.createOnly && mode !== 'create') {
|
if (field.createOnly && mode !== 'create') {
|
||||||
set(data, 'x-component-props.disabled', true);
|
set(data, 'x-component-props.disabled', true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user