mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-30 02:57:50 +08:00
refactor:timepicker (#6270)
* refactor:timepicker * docs:update & refactor: timepicker type
This commit is contained in:
parent
cd47a277da
commit
9f53d53cb8
@ -31,7 +31,7 @@ import './cascader/style';
|
||||
// import './back-top/style';
|
||||
// import './modal/style';
|
||||
// import './alert/style';
|
||||
import './time-picker/style';
|
||||
// import './time-picker/style';
|
||||
// import './steps/style';
|
||||
// import './breadcrumb/style';
|
||||
// import './calendar/style';
|
||||
|
@ -2,7 +2,7 @@
|
||||
category: Components
|
||||
type: Data Entry
|
||||
title: TimePicker
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/h04Zsl98I/TimePicker.svg
|
||||
cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*kGmGSLk_1fwAAAAAAAAAAAAADrJ8AQ/original
|
||||
---
|
||||
|
||||
To select/input a time.
|
||||
|
@ -3,7 +3,7 @@ category: Components
|
||||
type: 数据录入
|
||||
title: TimePicker
|
||||
subtitle: 时间选择框
|
||||
cover: https://gw.alipayobjects.com/zos/alicdn/h04Zsl98I/TimePicker.svg
|
||||
cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*kGmGSLk_1fwAAAAAAAAAAAAADrJ8AQ/original
|
||||
---
|
||||
|
||||
输入或选择时间的控件。
|
||||
|
@ -1,3 +0,0 @@
|
||||
@import '../../style/themes/index';
|
||||
@import '../../style/mixins/index';
|
||||
@import '../../input/style/mixin';
|
@ -1,5 +0,0 @@
|
||||
import '../../style/index.less';
|
||||
import './index.less';
|
||||
|
||||
// style dependencies
|
||||
import '../../date-picker/style';
|
@ -1,4 +1,4 @@
|
||||
import type { ExtractPropTypes, PropType } from 'vue';
|
||||
import type { ExtractPropTypes } from 'vue';
|
||||
import { defineComponent, ref } from 'vue';
|
||||
import type { RangePickerTimeProps } from '../date-picker/generatePicker';
|
||||
import generatePicker from '../date-picker/generatePicker';
|
||||
@ -15,6 +15,7 @@ import devWarning from '../vc-util/devWarning';
|
||||
import { useInjectFormItemContext } from '../form/FormItemContext';
|
||||
import omit from '../_util/omit';
|
||||
import type { InputStatus } from '../_util/statusUtils';
|
||||
import { booleanType, stringType } from '../_util/type';
|
||||
|
||||
export interface TimePickerLocale {
|
||||
placeholder?: string;
|
||||
@ -23,17 +24,17 @@ export interface TimePickerLocale {
|
||||
|
||||
export const timePickerProps = () => ({
|
||||
format: String,
|
||||
showNow: { type: Boolean, default: undefined },
|
||||
showHour: { type: Boolean, default: undefined },
|
||||
showMinute: { type: Boolean, default: undefined },
|
||||
showSecond: { type: Boolean, default: undefined },
|
||||
use12Hours: { type: Boolean, default: undefined },
|
||||
showNow: booleanType(),
|
||||
showHour: booleanType(),
|
||||
showMinute: booleanType(),
|
||||
showSecond: booleanType(),
|
||||
use12Hours: booleanType(),
|
||||
hourStep: Number,
|
||||
minuteStep: Number,
|
||||
secondStep: Number,
|
||||
hideDisabledOptions: { type: Boolean, default: undefined },
|
||||
hideDisabledOptions: booleanType(),
|
||||
popupClassName: String,
|
||||
status: String as PropType<InputStatus>,
|
||||
status: stringType<InputStatus>(),
|
||||
});
|
||||
type CommonTimePickerProps = Partial<ExtractPropTypes<ReturnType<typeof timePickerProps>>>;
|
||||
export type TimeRangePickerProps<DateType> = Omit<
|
||||
|
Loading…
Reference in New Issue
Block a user