fix(form): time value改成HH:mm:ss字符串,支持配置

This commit is contained in:
roymondchen 2022-11-15 18:16:14 +08:00
parent 52fc452823
commit 4fe45eb36d
3 changed files with 6 additions and 1 deletions

View File

@ -6,7 +6,7 @@
:placeholder="config.placeholder"
:disabled="disabled"
:format="config.format"
:value-format="config.format || 'YYYY-MM-DD HH:mm:ss'"
:value-format="config.valueFormat || 'YYYY-MM-DD HH:mm:ss'"
@change="changeHandler"
></TMagicDatePicker>
</template>

View File

@ -1,6 +1,8 @@
<template>
<TMagicTimePicker
v-model="model[name]"
:value-format="config.valueFormat || 'HH:mm:ss'"
:format="config.format || 'HH:mm:ss'"
:size="size"
:placeholder="config.placeholder"
:disabled="disabled"

View File

@ -348,6 +348,7 @@ export interface HiddenConfig extends FormItem {
export interface DateConfig extends FormItem, Input {
type: 'date';
format?: 'YYYY-MM-dd HH:mm:ss' | string;
valueFormat?: 'YYYY-MM-dd HH:mm:ss' | string;
}
/**
@ -365,6 +366,8 @@ export interface DateTimeConfig extends FormItem, Input {
*/
export interface TimeConfig extends FormItem, Input {
type: 'time';
format?: 'HH:mm:ss' | string;
valueFormat?: 'HH:mm:ss' | string;
}
/**