Browse Source
Revert "type: TimePicker added hourStep type" (#40956)
* Revert "type: TimePicker added hourStep type (#40947)"
This reverts commit c89640d843
.
* deps: bump rc-picker@3.6.0
* Update package.json
Co-authored-by: Wuxh <wxh1220@gmail.com>
* Update components/time-picker/demo/interval-options.tsx
---------
Co-authored-by: MadCcc <1075746765@qq.com>
pull/41756/head
Wuxh
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
7 deletions
-
components/date-picker/generatePicker/index.tsx
-
components/time-picker/demo/interval-options.tsx
-
package.json
|
@ -72,19 +72,15 @@ export function getTimeProps<DateType, DisabledTime>( |
|
|
const DataPickerPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const; |
|
|
const DataPickerPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const; |
|
|
type DataPickerPlacement = typeof DataPickerPlacements[number]; |
|
|
type DataPickerPlacement = typeof DataPickerPlacements[number]; |
|
|
|
|
|
|
|
|
const HourStep = [0.5, 1, 1.5, 2, 3, 4, 6, 8, 12] as const; |
|
|
|
|
|
type THourStep = typeof HourStep[number]; |
|
|
|
|
|
|
|
|
|
|
|
type InjectDefaultProps<Props> = Omit< |
|
|
type InjectDefaultProps<Props> = Omit< |
|
|
Props, |
|
|
Props, |
|
|
'locale' | 'generateConfig' | 'hideHeader' | 'components' | 'hourStep' |
|
|
'locale' | 'generateConfig' | 'hideHeader' | 'components' |
|
|
> & { |
|
|
> & { |
|
|
locale?: PickerLocale; |
|
|
locale?: PickerLocale; |
|
|
size?: SizeType; |
|
|
size?: SizeType; |
|
|
placement?: DataPickerPlacement; |
|
|
placement?: DataPickerPlacement; |
|
|
bordered?: boolean; |
|
|
bordered?: boolean; |
|
|
status?: InputStatus; |
|
|
status?: InputStatus; |
|
|
hourStep?: THourStep; |
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
export type PickerLocale = { |
|
|
export type PickerLocale = { |
|
|
|
@ -1,5 +1,5 @@ |
|
|
import { TimePicker } from 'antd'; |
|
|
|
|
|
import React from 'react'; |
|
|
import React from 'react'; |
|
|
|
|
|
import { TimePicker } from 'antd'; |
|
|
|
|
|
|
|
|
const App: React.FC = () => <TimePicker minuteStep={15} secondStep={10} hourStep={1} />; |
|
|
const App: React.FC = () => <TimePicker minuteStep={15} secondStep={10} hourStep={1} />; |
|
|
|
|
|
|
|
|
|
@ -135,7 +135,7 @@ |
|
|
"rc-motion": "^2.6.1", |
|
|
"rc-motion": "^2.6.1", |
|
|
"rc-notification": "~5.0.0", |
|
|
"rc-notification": "~5.0.0", |
|
|
"rc-pagination": "~3.3.1", |
|
|
"rc-pagination": "~3.3.1", |
|
|
"rc-picker": "~3.5.0", |
|
|
"rc-picker": "~3.6.0", |
|
|
"rc-progress": "~3.4.1", |
|
|
"rc-progress": "~3.4.1", |
|
|
"rc-rate": "~2.10.0", |
|
|
"rc-rate": "~2.10.0", |
|
|
"rc-resize-observer": "^1.2.0", |
|
|
"rc-resize-observer": "^1.2.0", |
|
|