Commit 2a0425df4aab62d120d01e04156416a43c15138c
Merge branch 'ww' into 'main'
fix: RangePicker format is not correct See merge request huang/yun-teng-iot-front!283
Showing
3 changed files
with
8 additions
and
3 deletions
... | ... | @@ -10,7 +10,9 @@ |
10 | 10 | baseColProps: { |
11 | 11 | span: 5, |
12 | 12 | }, |
13 | - fieldMapToTime: [[SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS]]], | |
13 | + fieldMapToTime: [ | |
14 | + [SchemaFiled.DATE_RANGE, [SchemaFiled.START_TS, SchemaFiled.END_TS], 'YYYY-MM-DD HH:mm:ss'], | |
15 | + ], | |
14 | 16 | }); |
15 | 17 | onMounted(() => { |
16 | 18 | emit('register', method); | ... | ... |
1 | -import { Moment } from 'moment'; | |
1 | +import moment, { Moment } from 'moment'; | |
2 | 2 | import { getPacketIntervalByRange, getPacketIntervalByValue, intervalOption } from './helper'; |
3 | 3 | import { FormSchema } from '/@/components/Form'; |
4 | 4 | import { ColEx } from '/@/components/Form/src/types'; |
... | ... | @@ -86,7 +86,9 @@ export const defaultSchemas: FormSchema[] = [ |
86 | 86 | const { setFieldsValue } = formActionType; |
87 | 87 | let dates: Moment[] = []; |
88 | 88 | return { |
89 | - showTime: true, | |
89 | + showTime: { | |
90 | + defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')], | |
91 | + }, | |
90 | 92 | onCalendarChange(value: Moment[]) { |
91 | 93 | dates = value; |
92 | 94 | }, | ... | ... |