1 | // eslint-disable-next-line import/no-extraneous-dependencies
|
2 | import Vue from 'vue'
|
3 | import { GntCalendarOptions } from '@livelybone/date-generator'
|
4 | import { VuePopperProps } from '@livelybone/vue-popper'
|
5 | import { VueScrollbarProps } from 'vue-scrollbar-live'
|
6 |
|
7 | declare class CommonProps extends Vue {
|
8 | /**
|
9 | * Id of input element
|
10 | * */
|
11 | id?: string | number
|
12 |
|
13 | placeholder?: string
|
14 |
|
15 | min?: string
|
16 |
|
17 | max?: string
|
18 |
|
19 | canEdit?: boolean
|
20 |
|
21 | inputStyle?: CSSStyleDeclaration | string
|
22 |
|
23 | /**
|
24 | * Props of module [@livelybone/vue-popper](https://github.com/livelybone/vue-popper)
|
25 | *
|
26 | * Default to:
|
27 | * {
|
28 | * arrowPosition: 'start',
|
29 | * arrowOffsetScaling: 1,
|
30 | * popperOptions: {
|
31 | * placement: 'bottom-start',
|
32 | * modifiers: {
|
33 | * preventOverflow: {
|
34 | * boundariesElement:
|
35 | * typeof document !== 'undefined' ? document.body : '',
|
36 | * },
|
37 | * },
|
38 | * },
|
39 | * }
|
40 | * */
|
41 | popperProps?: VuePopperProps
|
42 |
|
43 | /**
|
44 | * Props of scrollbar, see [vue-scrollbar-live](https://github.com/livelybone/vue-scrollbar-live)
|
45 | *
|
46 | * Default to: { isMobile: false, maxHeight: 200 }
|
47 | * */
|
48 | scrollbarProps?: VueScrollbarProps
|
49 | }
|
50 |
|
51 | declare class Datepicker extends CommonProps {
|
52 | value?: string
|
53 |
|
54 | /**
|
55 | * Options: 'year', 'month', 'date'
|
56 | *
|
57 | * Default: 'date'
|
58 | * */
|
59 | type?: string
|
60 |
|
61 | /**
|
62 | * Used to set day name
|
63 | *
|
64 | * Default to:
|
65 | * ['日', '一', '二', '三', '四', '五', '六']
|
66 | * */
|
67 | dayStr?: string[]
|
68 |
|
69 | /**
|
70 | * Used to set month name
|
71 | *
|
72 | * Default to:
|
73 | * `['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']`
|
74 | * */
|
75 | monthStr?: string[]
|
76 |
|
77 | firstDayOfWeek?: GntCalendarOptions['firstDayOfWeek']
|
78 |
|
79 | multiple: boolean
|
80 |
|
81 | /**
|
82 | * Used to set text of button
|
83 | *
|
84 | * Default to: '确定'
|
85 | * */
|
86 | btnStr: string
|
87 | }
|
88 |
|
89 | declare class DateRangePicker extends CommonProps {
|
90 | value?: [string, string] | [string] | []
|
91 |
|
92 | /**
|
93 | * Options: 'year', 'month', 'date'
|
94 | *
|
95 | * Default: 'date'
|
96 | * */
|
97 | type?: string
|
98 |
|
99 | /**
|
100 | * Used to set day name
|
101 | *
|
102 | * Default to:
|
103 | * ['日', '一', '二', '三', '四', '五', '六']
|
104 | * */
|
105 | dayStr?: string[]
|
106 |
|
107 | /**
|
108 | * Used to set month name
|
109 | *
|
110 | * Default to:
|
111 | * `['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']`
|
112 | * */
|
113 | monthStr?: string[]
|
114 |
|
115 | firstDayOfWeek?: GntCalendarOptions['firstDayOfWeek']
|
116 |
|
117 | rangeSeparator?: string
|
118 |
|
119 | secondPlaceholder?: string
|
120 | }
|
121 |
|
122 | declare class Timepicker extends CommonProps {
|
123 | value?: string
|
124 |
|
125 | /**
|
126 | * Options: 'hour', 'minute', 'second'
|
127 | *
|
128 | * Default: 'second'
|
129 | * */
|
130 | type?: string
|
131 |
|
132 | /**
|
133 | * Used to set time name
|
134 | *
|
135 | * Default to: ['时', '分', '秒']
|
136 | * */
|
137 | timeStr?: string[]
|
138 |
|
139 | /**
|
140 | * Used to set text of button
|
141 | *
|
142 | * Default to: '确定'
|
143 | * */
|
144 | btnStr?: string
|
145 | }
|
146 |
|
147 | declare class DatetimePicker extends CommonProps {
|
148 | value?: string
|
149 |
|
150 | /**
|
151 | * Used to set day name. Start with Sunday
|
152 | *
|
153 | * Default to: ['日', '一', '二', '三', '四', '五', '六']
|
154 | * */
|
155 | dayStr?: string[]
|
156 |
|
157 | /**
|
158 | * Used to set month name
|
159 | *
|
160 | * Default to:
|
161 | * `['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']`
|
162 | * */
|
163 | monthStr?: string[]
|
164 |
|
165 | firstDayOfWeek?: GntCalendarOptions['firstDayOfWeek']
|
166 |
|
167 | /**
|
168 | * Used to set time name
|
169 | *
|
170 | * Default to: ['时', '分', '秒']
|
171 | * */
|
172 | timeStr?: string[]
|
173 |
|
174 | /**
|
175 | * Used to set text of button
|
176 | *
|
177 | * Default to: '确定'
|
178 | * */
|
179 | btnStr?: string
|
180 |
|
181 | /**
|
182 | * Options: 'hour', 'minute', 'second'
|
183 | *
|
184 | * Default to: 'second'
|
185 | * */
|
186 | timeType?: string
|
187 | }
|
188 |
|
189 | /**
|
190 | * Svg icon
|
191 | * */
|
192 | declare class IconDate extends Vue {}
|
193 |
|
194 | /**
|
195 | * Svg icon
|
196 | * */
|
197 | declare class IconTime extends Vue {}
|
198 |
|
199 | export {
|
200 | Datepicker,
|
201 | DateRangePicker,
|
202 | Timepicker,
|
203 | DatetimePicker,
|
204 | IconTime,
|
205 | IconDate,
|
206 | }
|