1 |
|
2 |
|
3 | import * as React from 'react';
|
4 | import CommonProps from '../util';
|
5 | import { PopupProps } from '../overlay';
|
6 |
|
7 | interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
|
8 | defaultValue?: any;
|
9 | onChange?: any;
|
10 | }
|
11 |
|
12 | export interface TimePickerProps extends HTMLAttributesWeak, CommonProps {
|
13 | |
14 |
|
15 |
|
16 | label?: React.ReactNode;
|
17 | name?: string;
|
18 |
|
19 | |
20 |
|
21 |
|
22 | state?: 'error' | 'success';
|
23 |
|
24 | |
25 |
|
26 |
|
27 | placeholder?: string;
|
28 |
|
29 | |
30 |
|
31 |
|
32 | value?: any;
|
33 |
|
34 | |
35 |
|
36 |
|
37 | defaultValue?: any;
|
38 |
|
39 | |
40 |
|
41 |
|
42 | size?: 'small' | 'medium' | 'large';
|
43 |
|
44 | |
45 |
|
46 |
|
47 | hasClear?: boolean;
|
48 |
|
49 | |
50 |
|
51 |
|
52 |
|
53 | format?: string;
|
54 |
|
55 | |
56 |
|
57 |
|
58 | hourStep?: number;
|
59 |
|
60 | |
61 |
|
62 |
|
63 | minuteStep?: number;
|
64 |
|
65 | |
66 |
|
67 |
|
68 | secondStep?: number;
|
69 |
|
70 | |
71 |
|
72 |
|
73 | disabledHours?: (index: number) => boolean;
|
74 |
|
75 | |
76 |
|
77 |
|
78 | disabledMinutes?: (index: number) => boolean;
|
79 |
|
80 | |
81 |
|
82 |
|
83 | disabledSeconds?: (index: number) => boolean;
|
84 |
|
85 | |
86 |
|
87 |
|
88 | visible?: boolean;
|
89 |
|
90 | |
91 |
|
92 |
|
93 | defaultVisible?: boolean;
|
94 |
|
95 | |
96 |
|
97 |
|
98 | popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement);
|
99 |
|
100 | /**
|
101 | * 弹层对齐方式, 详情见Overlay 文档
|
102 | */
|
103 | popupAlign?: string;
|
104 |
|
105 | /**
|
106 | * 弹层触发方式
|
107 | */
|
108 | popupTriggerType?: 'click' | 'hover';
|
109 |
|
110 | /**
|
111 | * 弹层展示状态变化时的回调
|
112 | */
|
113 | onVisibleChange?: (visible: boolean, reason: string) => void;
|
114 |
|
115 | |
116 |
|
117 |
|
118 | popupStyle?: React.CSSProperties;
|
119 |
|
120 | |
121 |
|
122 |
|
123 | popupClassName?: string;
|
124 |
|
125 | |
126 |
|
127 |
|
128 | popupProps?: PopupProps;
|
129 |
|
130 | |
131 |
|
132 |
|
133 | disabled?: boolean;
|
134 |
|
135 | |
136 |
|
137 |
|
138 | onChange?: (value: any | string) => void;
|
139 | }
|
140 |
|
141 | export default class TimePicker extends React.Component<TimePickerProps, any> {}
|