yc-design-vue 2.2.9 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/index.umd.js +1 -1
  2. package/dist/style.css +1 -1
  3. package/es/DatePicker/DatePicker.vue.d.ts +408 -3
  4. package/es/DatePicker/DatePicker.vue.js +29 -5
  5. package/es/DatePicker/MonthPicker.vue.d.ts +1 -1
  6. package/es/DatePicker/MonthPicker.vue.js +7 -5
  7. package/es/DatePicker/WeekPicker.vue.d.ts +1 -1
  8. package/es/DatePicker/WeekPicker.vue.js +7 -5
  9. package/es/DatePicker/YearPicker.vue.js +7 -5
  10. package/es/DatePicker/component/{PickerInput.vue.d.ts → Picker.vue.d.ts} +5 -1
  11. package/es/DatePicker/component/{PickerInput.vue.js → Picker.vue.js} +7 -3
  12. package/es/DatePicker/component/Picker.vue3.js +5 -0
  13. package/es/DatePicker/hooks/userPicker.d.ts +2 -0
  14. package/es/DatePicker/hooks/userPicker.js +18 -22
  15. package/es/DatePicker/index.css +1 -1
  16. package/es/DatePicker/index.d.ts +206 -4
  17. package/es/TimePicker/TimePicker.vue.d.ts +104 -3
  18. package/es/TimePicker/TimePicker.vue.js +22 -7
  19. package/es/TimePicker/TimePickerPanel.vue.d.ts +4 -1
  20. package/es/TimePicker/TimePickerPanel.vue.js +37 -41
  21. package/es/TimePicker/hooks/useContext.d.ts +2 -0
  22. package/es/TimePicker/hooks/useContext.js +3 -0
  23. package/es/TimePicker/index.d.ts +61 -4
  24. package/es/TimePicker/type.d.ts +1 -0
  25. package/es/Typography/TypographyBase.vue.js +2 -2
  26. package/es/_shared/icons/IconCopy.vue.js +1 -24
  27. package/es/_shared/icons/IconCopy.vue2.js +24 -1
  28. package/es/_shared/icons/IconEdit.vue.js +1 -24
  29. package/es/_shared/icons/IconEdit.vue2.js +24 -1
  30. package/es/index.d.ts +3 -3
  31. package/es/style.css +1 -1
  32. package/lib/DatePicker/DatePicker.vue.d.ts +408 -3
  33. package/lib/DatePicker/DatePicker.vue.js +1 -1
  34. package/lib/DatePicker/MonthPicker.vue.d.ts +1 -1
  35. package/lib/DatePicker/MonthPicker.vue.js +1 -1
  36. package/lib/DatePicker/WeekPicker.vue.d.ts +1 -1
  37. package/lib/DatePicker/WeekPicker.vue.js +1 -1
  38. package/lib/DatePicker/YearPicker.vue.js +1 -1
  39. package/lib/DatePicker/component/{PickerInput.vue.d.ts → Picker.vue.d.ts} +5 -1
  40. package/lib/DatePicker/component/Picker.vue.js +1 -0
  41. package/lib/DatePicker/component/{PickerInput.vue3.js → Picker.vue3.js} +1 -1
  42. package/lib/DatePicker/hooks/userPicker.d.ts +2 -0
  43. package/lib/DatePicker/hooks/userPicker.js +1 -1
  44. package/lib/DatePicker/index.css +1 -1
  45. package/lib/DatePicker/index.d.ts +206 -4
  46. package/lib/TimePicker/TimePicker.vue.d.ts +104 -3
  47. package/lib/TimePicker/TimePicker.vue.js +1 -1
  48. package/lib/TimePicker/TimePickerPanel.vue.d.ts +4 -1
  49. package/lib/TimePicker/TimePickerPanel.vue.js +1 -1
  50. package/lib/TimePicker/hooks/useContext.d.ts +2 -0
  51. package/lib/TimePicker/hooks/useContext.js +1 -1
  52. package/lib/TimePicker/index.d.ts +61 -4
  53. package/lib/TimePicker/type.d.ts +1 -0
  54. package/lib/Typography/TypographyBase.vue.js +1 -1
  55. package/lib/_shared/icons/IconCopy.vue.js +1 -1
  56. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  57. package/lib/_shared/icons/IconEdit.vue.js +1 -1
  58. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  59. package/lib/index.d.ts +3 -3
  60. package/lib/style.css +1 -1
  61. package/package.json +1 -1
  62. package/es/DatePicker/component/PickerInput.vue3.js +0 -5
  63. package/lib/DatePicker/component/PickerInput.vue.js +0 -1
@@ -1,8 +1,211 @@
1
1
  import { DatePickerProps } from './type';
2
+ import { dayjs } from '../_shared/utils';
2
3
  declare function __VLS_template(): {
3
4
  attrs: Partial<{}>;
4
5
  slots: any;
5
- refs: {};
6
+ refs: {
7
+ timePickerRef: ({
8
+ $: import('vue').ComponentInternalInstance;
9
+ $data: {};
10
+ $props: {
11
+ readonly type?: import('../TimePicker').TimePickerType | undefined;
12
+ readonly modelValue?: import('../TimePicker').TimePickerValue | undefined;
13
+ readonly defaultValue?: import('../TimePicker').TimePickerValue | undefined;
14
+ readonly disabled?: boolean | undefined;
15
+ readonly allowClear?: boolean | undefined;
16
+ readonly readonly?: boolean | undefined;
17
+ readonly error?: boolean | undefined;
18
+ readonly format?: string | undefined;
19
+ readonly placeholder?: string | string[] | undefined;
20
+ readonly size?: import('..').Size | undefined;
21
+ readonly popupContainer?: import('..').PopupContainer | undefined;
22
+ readonly step?: {
23
+ hour?: number;
24
+ minute?: number;
25
+ second?: number;
26
+ } | undefined;
27
+ readonly disabledHours?: import('../TimePicker').DisabledHours | undefined;
28
+ readonly disabledMinutes?: import('../TimePicker').DisabledMinutes | undefined;
29
+ readonly disabledSeconds?: import('../TimePicker').DisabledSeconds | undefined;
30
+ readonly hideDisabledOptions?: boolean | undefined;
31
+ readonly disableConfirm?: boolean | undefined;
32
+ readonly position?: import('../TimePicker').TimePickerPosition | undefined;
33
+ readonly popupVisible?: boolean | undefined;
34
+ readonly defaultPopupVisible?: boolean | undefined;
35
+ readonly triggerProps?: import('..').TriggerProps | undefined;
36
+ readonly unmountOnClose?: boolean | undefined;
37
+ readonly hideTrigger?: boolean | undefined;
38
+ readonly scrollbar?: boolean | undefined;
39
+ readonly scrollOffset?: number | undefined;
40
+ readonly watchValueChange?: boolean | undefined;
41
+ readonly onChange?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
42
+ readonly "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
43
+ readonly "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
44
+ readonly onClear?: (() => any) | undefined;
45
+ readonly onSelect?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
46
+ readonly "onUpdate:modelValue"?: ((value: import('../TimePicker').TimePickerValue) => any) | undefined;
47
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
48
+ $attrs: {
49
+ [x: string]: unknown;
50
+ };
51
+ $refs: {
52
+ [x: string]: unknown;
53
+ } & {
54
+ panelRef: ({
55
+ $: import('vue').ComponentInternalInstance;
56
+ $data: {};
57
+ $props: Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
58
+ $attrs: {
59
+ [x: string]: unknown;
60
+ };
61
+ $refs: {
62
+ [x: string]: unknown;
63
+ };
64
+ $slots: Readonly<{
65
+ [name: string]: import('vue').Slot<any> | undefined;
66
+ }>;
67
+ $root: import('vue').ComponentPublicInstance | null;
68
+ $parent: import('vue').ComponentPublicInstance | null;
69
+ $host: Element | null;
70
+ $emit: (event: string, ...args: any[]) => void;
71
+ $el: HTMLDivElement;
72
+ $options: import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
73
+ jump: (newDate: dayjs.Dayjs, oldDate?: dayjs.Dayjs) => Promise<void>;
74
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
75
+ beforeCreate?: (() => void) | (() => void)[];
76
+ created?: (() => void) | (() => void)[];
77
+ beforeMount?: (() => void) | (() => void)[];
78
+ mounted?: (() => void) | (() => void)[];
79
+ beforeUpdate?: (() => void) | (() => void)[];
80
+ updated?: (() => void) | (() => void)[];
81
+ activated?: (() => void) | (() => void)[];
82
+ deactivated?: (() => void) | (() => void)[];
83
+ beforeDestroy?: (() => void) | (() => void)[];
84
+ beforeUnmount?: (() => void) | (() => void)[];
85
+ destroyed?: (() => void) | (() => void)[];
86
+ unmounted?: (() => void) | (() => void)[];
87
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
88
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
89
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
90
+ };
91
+ $forceUpdate: () => void;
92
+ $nextTick: typeof import('vue').nextTick;
93
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
94
+ } & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, "jump"> & import('vue').ShallowUnwrapRef<{
95
+ jump: (newDate: dayjs.Dayjs, oldDate?: dayjs.Dayjs) => Promise<void>;
96
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
97
+ $slots: {
98
+ extra?(_: {}): any;
99
+ };
100
+ }) | null;
101
+ };
102
+ $slots: Readonly<{
103
+ [name: string]: import('vue').Slot<any> | undefined;
104
+ }>;
105
+ $root: import('vue').ComponentPublicInstance | null;
106
+ $parent: import('vue').ComponentPublicInstance | null;
107
+ $host: Element | null;
108
+ $emit: ((event: "change", timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => void) & ((event: "update:popupVisible", value: boolean) => void) & ((event: "popup-visible-change", value: boolean) => void) & ((event: "clear") => void) & ((event: "select", timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => void) & ((event: "update:modelValue", value: import('../TimePicker').TimePickerValue) => void);
109
+ $el: any;
110
+ $options: import('vue').ComponentOptionsBase<Readonly<import('../TimePicker').TimePickerProps> & Readonly<{
111
+ onChange?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
112
+ "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
113
+ "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
114
+ onClear?: (() => any) | undefined;
115
+ onSelect?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
116
+ "onUpdate:modelValue"?: ((value: import('../TimePicker').TimePickerValue) => any) | undefined;
117
+ }>, {
118
+ jump(date: dayjs.Dayjs, oldDate?: dayjs.Dayjs): void;
119
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
120
+ change: (timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any;
121
+ "update:popupVisible": (value: boolean) => any;
122
+ "popup-visible-change": (value: boolean) => any;
123
+ clear: () => any;
124
+ select: (timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any;
125
+ "update:modelValue": (value: import('../TimePicker').TimePickerValue) => any;
126
+ }, string, {
127
+ error: boolean;
128
+ size: import('..').Size;
129
+ popupVisible: boolean;
130
+ defaultPopupVisible: boolean;
131
+ disabled: boolean;
132
+ position: import('../TimePicker').TimePickerPosition;
133
+ unmountOnClose: boolean;
134
+ popupContainer: import('..').PopupContainer;
135
+ scrollbar: boolean;
136
+ type: import('../TimePicker').TimePickerType;
137
+ placeholder: string | string[];
138
+ modelValue: import('../TimePicker').TimePickerValue;
139
+ defaultValue: import('../TimePicker').TimePickerValue;
140
+ allowClear: boolean;
141
+ readonly: boolean;
142
+ triggerProps: import('..').TriggerProps;
143
+ format: string;
144
+ hideDisabledOptions: boolean;
145
+ scrollOffset: number;
146
+ hideTrigger: boolean;
147
+ watchValueChange: boolean;
148
+ disabledHours: import('../TimePicker').DisabledHours;
149
+ disabledMinutes: import('../TimePicker').DisabledMinutes;
150
+ disabledSeconds: import('../TimePicker').DisabledSeconds;
151
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
152
+ beforeCreate?: (() => void) | (() => void)[];
153
+ created?: (() => void) | (() => void)[];
154
+ beforeMount?: (() => void) | (() => void)[];
155
+ mounted?: (() => void) | (() => void)[];
156
+ beforeUpdate?: (() => void) | (() => void)[];
157
+ updated?: (() => void) | (() => void)[];
158
+ activated?: (() => void) | (() => void)[];
159
+ deactivated?: (() => void) | (() => void)[];
160
+ beforeDestroy?: (() => void) | (() => void)[];
161
+ beforeUnmount?: (() => void) | (() => void)[];
162
+ destroyed?: (() => void) | (() => void)[];
163
+ unmounted?: (() => void) | (() => void)[];
164
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
165
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
166
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
167
+ };
168
+ $forceUpdate: () => void;
169
+ $nextTick: typeof import('vue').nextTick;
170
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
171
+ } & Readonly<{
172
+ error: boolean;
173
+ size: import('..').Size;
174
+ popupVisible: boolean;
175
+ defaultPopupVisible: boolean;
176
+ disabled: boolean;
177
+ position: import('../TimePicker').TimePickerPosition;
178
+ unmountOnClose: boolean;
179
+ popupContainer: import('..').PopupContainer;
180
+ scrollbar: boolean;
181
+ type: import('../TimePicker').TimePickerType;
182
+ placeholder: string | string[];
183
+ modelValue: import('../TimePicker').TimePickerValue;
184
+ defaultValue: import('../TimePicker').TimePickerValue;
185
+ allowClear: boolean;
186
+ readonly: boolean;
187
+ triggerProps: import('..').TriggerProps;
188
+ format: string;
189
+ hideDisabledOptions: boolean;
190
+ scrollOffset: number;
191
+ hideTrigger: boolean;
192
+ watchValueChange: boolean;
193
+ disabledHours: import('../TimePicker').DisabledHours;
194
+ disabledMinutes: import('../TimePicker').DisabledMinutes;
195
+ disabledSeconds: import('../TimePicker').DisabledSeconds;
196
+ }> & Omit<Readonly<import('../TimePicker').TimePickerProps> & Readonly<{
197
+ onChange?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
198
+ "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
199
+ "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
200
+ onClear?: (() => any) | undefined;
201
+ onSelect?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
202
+ "onUpdate:modelValue"?: ((value: import('../TimePicker').TimePickerValue) => any) | undefined;
203
+ }>, "jump" | ("error" | "size" | "popupVisible" | "defaultPopupVisible" | "disabled" | "position" | "unmountOnClose" | "popupContainer" | "scrollbar" | "type" | "placeholder" | "modelValue" | "defaultValue" | "allowClear" | "readonly" | "triggerProps" | "format" | "hideDisabledOptions" | "scrollOffset" | "hideTrigger" | "watchValueChange" | "disabledHours" | "disabledMinutes" | "disabledSeconds")> & import('vue').ShallowUnwrapRef<{
204
+ jump(date: dayjs.Dayjs, oldDate?: dayjs.Dayjs): void;
205
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
206
+ $slots: any;
207
+ }) | null;
208
+ };
6
209
  rootEl: any;
7
210
  };
8
211
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -53,14 +256,216 @@ declare const __VLS_component: import('vue').DefineComponent<DatePickerProps, {}
53
256
  pickerValue: import('./type').DatePickerValue;
54
257
  defaultPickerValue: import('./type').DatePickerValue;
55
258
  valueFormat: import('./type').ValueFormat;
56
- showConfirmBtn: boolean;
57
259
  abbreviation: boolean;
260
+ showConfirmBtn: boolean;
58
261
  disabledDate: import('./type').DisabledDate;
59
262
  shortcutsPosition: import('./type').ShortcutsPosition;
60
263
  shortcuts: import('./type').ShortcutType[];
61
264
  previewShortcut: boolean;
62
265
  disabledInput: boolean;
63
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
266
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
267
+ timePickerRef: ({
268
+ $: import('vue').ComponentInternalInstance;
269
+ $data: {};
270
+ $props: {
271
+ readonly type?: import('../TimePicker').TimePickerType | undefined;
272
+ readonly modelValue?: import('../TimePicker').TimePickerValue | undefined;
273
+ readonly defaultValue?: import('../TimePicker').TimePickerValue | undefined;
274
+ readonly disabled?: boolean | undefined;
275
+ readonly allowClear?: boolean | undefined;
276
+ readonly readonly?: boolean | undefined;
277
+ readonly error?: boolean | undefined;
278
+ readonly format?: string | undefined;
279
+ readonly placeholder?: string | string[] | undefined;
280
+ readonly size?: import('..').Size | undefined;
281
+ readonly popupContainer?: import('..').PopupContainer | undefined;
282
+ readonly step?: {
283
+ hour?: number;
284
+ minute?: number;
285
+ second?: number;
286
+ } | undefined;
287
+ readonly disabledHours?: import('../TimePicker').DisabledHours | undefined;
288
+ readonly disabledMinutes?: import('../TimePicker').DisabledMinutes | undefined;
289
+ readonly disabledSeconds?: import('../TimePicker').DisabledSeconds | undefined;
290
+ readonly hideDisabledOptions?: boolean | undefined;
291
+ readonly disableConfirm?: boolean | undefined;
292
+ readonly position?: import('../TimePicker').TimePickerPosition | undefined;
293
+ readonly popupVisible?: boolean | undefined;
294
+ readonly defaultPopupVisible?: boolean | undefined;
295
+ readonly triggerProps?: import('..').TriggerProps | undefined;
296
+ readonly unmountOnClose?: boolean | undefined;
297
+ readonly hideTrigger?: boolean | undefined;
298
+ readonly scrollbar?: boolean | undefined;
299
+ readonly scrollOffset?: number | undefined;
300
+ readonly watchValueChange?: boolean | undefined;
301
+ readonly onChange?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
302
+ readonly "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
303
+ readonly "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
304
+ readonly onClear?: (() => any) | undefined;
305
+ readonly onSelect?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
306
+ readonly "onUpdate:modelValue"?: ((value: import('../TimePicker').TimePickerValue) => any) | undefined;
307
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
308
+ $attrs: {
309
+ [x: string]: unknown;
310
+ };
311
+ $refs: {
312
+ [x: string]: unknown;
313
+ } & {
314
+ panelRef: ({
315
+ $: import('vue').ComponentInternalInstance;
316
+ $data: {};
317
+ $props: Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
318
+ $attrs: {
319
+ [x: string]: unknown;
320
+ };
321
+ $refs: {
322
+ [x: string]: unknown;
323
+ };
324
+ $slots: Readonly<{
325
+ [name: string]: import('vue').Slot<any> | undefined;
326
+ }>;
327
+ $root: import('vue').ComponentPublicInstance | null;
328
+ $parent: import('vue').ComponentPublicInstance | null;
329
+ $host: Element | null;
330
+ $emit: (event: string, ...args: any[]) => void;
331
+ $el: HTMLDivElement;
332
+ $options: import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
333
+ jump: (newDate: dayjs.Dayjs, oldDate?: dayjs.Dayjs) => Promise<void>;
334
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
335
+ beforeCreate?: (() => void) | (() => void)[];
336
+ created?: (() => void) | (() => void)[];
337
+ beforeMount?: (() => void) | (() => void)[];
338
+ mounted?: (() => void) | (() => void)[];
339
+ beforeUpdate?: (() => void) | (() => void)[];
340
+ updated?: (() => void) | (() => void)[];
341
+ activated?: (() => void) | (() => void)[];
342
+ deactivated?: (() => void) | (() => void)[];
343
+ beforeDestroy?: (() => void) | (() => void)[];
344
+ beforeUnmount?: (() => void) | (() => void)[];
345
+ destroyed?: (() => void) | (() => void)[];
346
+ unmounted?: (() => void) | (() => void)[];
347
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
348
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
349
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
350
+ };
351
+ $forceUpdate: () => void;
352
+ $nextTick: typeof import('vue').nextTick;
353
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
354
+ } & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, "jump"> & import('vue').ShallowUnwrapRef<{
355
+ jump: (newDate: dayjs.Dayjs, oldDate?: dayjs.Dayjs) => Promise<void>;
356
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
357
+ $slots: {
358
+ extra?(_: {}): any;
359
+ };
360
+ }) | null;
361
+ };
362
+ $slots: Readonly<{
363
+ [name: string]: import('vue').Slot<any> | undefined;
364
+ }>;
365
+ $root: import('vue').ComponentPublicInstance | null;
366
+ $parent: import('vue').ComponentPublicInstance | null;
367
+ $host: Element | null;
368
+ $emit: ((event: "change", timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => void) & ((event: "update:popupVisible", value: boolean) => void) & ((event: "popup-visible-change", value: boolean) => void) & ((event: "clear") => void) & ((event: "select", timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => void) & ((event: "update:modelValue", value: import('../TimePicker').TimePickerValue) => void);
369
+ $el: any;
370
+ $options: import('vue').ComponentOptionsBase<Readonly<import('../TimePicker').TimePickerProps> & Readonly<{
371
+ onChange?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
372
+ "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
373
+ "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
374
+ onClear?: (() => any) | undefined;
375
+ onSelect?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
376
+ "onUpdate:modelValue"?: ((value: import('../TimePicker').TimePickerValue) => any) | undefined;
377
+ }>, {
378
+ jump(date: dayjs.Dayjs, oldDate?: dayjs.Dayjs): void;
379
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
380
+ change: (timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any;
381
+ "update:popupVisible": (value: boolean) => any;
382
+ "popup-visible-change": (value: boolean) => any;
383
+ clear: () => any;
384
+ select: (timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any;
385
+ "update:modelValue": (value: import('../TimePicker').TimePickerValue) => any;
386
+ }, string, {
387
+ error: boolean;
388
+ size: import('..').Size;
389
+ popupVisible: boolean;
390
+ defaultPopupVisible: boolean;
391
+ disabled: boolean;
392
+ position: import('../TimePicker').TimePickerPosition;
393
+ unmountOnClose: boolean;
394
+ popupContainer: import('..').PopupContainer;
395
+ scrollbar: boolean;
396
+ type: import('../TimePicker').TimePickerType;
397
+ placeholder: string | string[];
398
+ modelValue: import('../TimePicker').TimePickerValue;
399
+ defaultValue: import('../TimePicker').TimePickerValue;
400
+ allowClear: boolean;
401
+ readonly: boolean;
402
+ triggerProps: import('..').TriggerProps;
403
+ format: string;
404
+ hideDisabledOptions: boolean;
405
+ scrollOffset: number;
406
+ hideTrigger: boolean;
407
+ watchValueChange: boolean;
408
+ disabledHours: import('../TimePicker').DisabledHours;
409
+ disabledMinutes: import('../TimePicker').DisabledMinutes;
410
+ disabledSeconds: import('../TimePicker').DisabledSeconds;
411
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
412
+ beforeCreate?: (() => void) | (() => void)[];
413
+ created?: (() => void) | (() => void)[];
414
+ beforeMount?: (() => void) | (() => void)[];
415
+ mounted?: (() => void) | (() => void)[];
416
+ beforeUpdate?: (() => void) | (() => void)[];
417
+ updated?: (() => void) | (() => void)[];
418
+ activated?: (() => void) | (() => void)[];
419
+ deactivated?: (() => void) | (() => void)[];
420
+ beforeDestroy?: (() => void) | (() => void)[];
421
+ beforeUnmount?: (() => void) | (() => void)[];
422
+ destroyed?: (() => void) | (() => void)[];
423
+ unmounted?: (() => void) | (() => void)[];
424
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
425
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
426
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
427
+ };
428
+ $forceUpdate: () => void;
429
+ $nextTick: typeof import('vue').nextTick;
430
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
431
+ } & Readonly<{
432
+ error: boolean;
433
+ size: import('..').Size;
434
+ popupVisible: boolean;
435
+ defaultPopupVisible: boolean;
436
+ disabled: boolean;
437
+ position: import('../TimePicker').TimePickerPosition;
438
+ unmountOnClose: boolean;
439
+ popupContainer: import('..').PopupContainer;
440
+ scrollbar: boolean;
441
+ type: import('../TimePicker').TimePickerType;
442
+ placeholder: string | string[];
443
+ modelValue: import('../TimePicker').TimePickerValue;
444
+ defaultValue: import('../TimePicker').TimePickerValue;
445
+ allowClear: boolean;
446
+ readonly: boolean;
447
+ triggerProps: import('..').TriggerProps;
448
+ format: string;
449
+ hideDisabledOptions: boolean;
450
+ scrollOffset: number;
451
+ hideTrigger: boolean;
452
+ watchValueChange: boolean;
453
+ disabledHours: import('../TimePicker').DisabledHours;
454
+ disabledMinutes: import('../TimePicker').DisabledMinutes;
455
+ disabledSeconds: import('../TimePicker').DisabledSeconds;
456
+ }> & Omit<Readonly<import('../TimePicker').TimePickerProps> & Readonly<{
457
+ onChange?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
458
+ "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
459
+ "onPopup-visible-change"?: ((value: boolean) => any) | undefined;
460
+ onClear?: (() => any) | undefined;
461
+ onSelect?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
462
+ "onUpdate:modelValue"?: ((value: import('../TimePicker').TimePickerValue) => any) | undefined;
463
+ }>, "jump" | ("error" | "size" | "popupVisible" | "defaultPopupVisible" | "disabled" | "position" | "unmountOnClose" | "popupContainer" | "scrollbar" | "type" | "placeholder" | "modelValue" | "defaultValue" | "allowClear" | "readonly" | "triggerProps" | "format" | "hideDisabledOptions" | "scrollOffset" | "hideTrigger" | "watchValueChange" | "disabledHours" | "disabledMinutes" | "disabledSeconds")> & import('vue').ShallowUnwrapRef<{
464
+ jump(date: dayjs.Dayjs, oldDate?: dayjs.Dayjs): void;
465
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
466
+ $slots: any;
467
+ }) | null;
468
+ }, any>;
64
469
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
65
470
  export default _default;
66
471
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -14,8 +14,8 @@ import _sfc_main$5 from "./component/PickerWeekHeader.vue.js";
14
14
  /* empty css */
15
15
  import _sfc_main$1 from "./component/PickerPanel.vue.js";
16
16
  /* empty css */
17
- import _sfc_main$7 from "./component/PickerInput.vue.js";
18
- /* empty css */
17
+ import _sfc_main$7 from "./component/Picker.vue.js";
18
+ /* empty css */
19
19
  import _sfc_main$2 from "./YearPicker.vue.js";
20
20
  /* empty css */
21
21
  import _sfc_main$3 from "./MonthPicker.vue.js";
@@ -92,9 +92,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
92
92
  showMonthPicker,
93
93
  showYearPicker,
94
94
  valueFormat,
95
+ hideTrigger,
96
+ computedVisible,
95
97
  DefinePanel,
96
98
  ReusePanel,
97
99
  showConfirmBtn,
100
+ handleVisibleChange,
98
101
  t,
99
102
  getDateFromFormat,
100
103
  isCellInView,
@@ -110,6 +113,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
110
113
  emits
111
114
  });
112
115
  const dayData = ref([]);
116
+ const timePickerRef = ref();
113
117
  const handleDateChange = (dateType, type) => {
114
118
  if (dateType == "year") {
115
119
  curYear.value = type == "pre" ? curYear.value - 1 : curYear.value + 1;
@@ -130,9 +134,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
130
134
  );
131
135
  }
132
136
  };
137
+ watch(
138
+ () => computedVisible.value,
139
+ (visible) => {
140
+ var _a;
141
+ handleVisibleChange(visible);
142
+ if (!computedValue.value || !visible) return;
143
+ (_a = timePickerRef.value) == null ? void 0 : _a.jump(dayjs(getDateFromFormat(computedValue.value)));
144
+ },
145
+ {
146
+ immediate: true
147
+ }
148
+ );
133
149
  watch(
134
150
  () => computedValue.value,
135
- (val) => {
151
+ (val, oldVal) => {
152
+ var _a;
136
153
  const date = val ? getDateFromFormat(val) : /* @__PURE__ */ new Date();
137
154
  curYear.value = date.getFullYear();
138
155
  curMonth.value = date.getMonth();
@@ -141,6 +158,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
141
158
  curMonth.value,
142
159
  dayStartOfWeek.value
143
160
  );
161
+ if (!hideTrigger.value || !val) return;
162
+ const newDate = dayjs(getDateFromFormat(val));
163
+ const oldDate = oldVal ? dayjs(getDateFromFormat(oldVal)) : void 0;
164
+ (_a = timePickerRef.value) == null ? void 0 : _a.jump(newDate, oldDate);
144
165
  },
145
166
  {
146
167
  immediate: true
@@ -273,8 +294,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
273
294
  "disabled-hours": (_c = (_b = _ctx.disabledTime) == null ? void 0 : _b.call(_ctx, unref(getDateFromFormat)(unref(computedValue)))) == null ? void 0 : _c.disabledHours,
274
295
  "disabled-minutes": (_e = (_d = _ctx.disabledTime) == null ? void 0 : _d.call(_ctx, unref(getDateFromFormat)(unref(computedValue)))) == null ? void 0 : _e.disabledMinutes,
275
296
  "disabled-seconds": (_g = (_f = _ctx.disabledTime) == null ? void 0 : _f.call(_ctx, unref(getDateFromFormat)(unref(computedValue)))) == null ? void 0 : _g.disabledSeconds,
297
+ "watch-value-change": false,
276
298
  "hide-trigger": "",
277
- "disable-confirm": ""
299
+ "disable-confirm": "",
300
+ ref_key: "timePickerRef",
301
+ ref: timePickerRef
278
302
  }), null, 16, ["modelValue", "format", "disabled-hours", "disabled-minutes", "disabled-seconds"])
279
303
  ])) : createCommentVNode("", true)
280
304
  ]))
@@ -293,7 +317,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
293
317
  ]),
294
318
  _: 3
295
319
  }),
296
- !_ctx.hideTrigger ? (openBlock(), createBlock(_sfc_main$7, {
320
+ !unref(hideTrigger) ? (openBlock(), createBlock(_sfc_main$7, {
297
321
  key: 0,
298
322
  class: normalizeClass(_ctx.$attrs.class),
299
323
  style: normalizeStyle(_ctx.$attrs.style),
@@ -49,8 +49,8 @@ declare const __VLS_component: import('vue').DefineComponent<MonthPickerProps, {
49
49
  pickerValue: import('./type').DatePickerValue;
50
50
  defaultPickerValue: import('./type').DatePickerValue;
51
51
  valueFormat: import('./type').ValueFormat;
52
- showConfirmBtn: boolean;
53
52
  abbreviation: boolean;
53
+ showConfirmBtn: boolean;
54
54
  disabledDate: import('./type').DisabledDate;
55
55
  shortcutsPosition: import('./type').ShortcutsPosition;
56
56
  shortcuts: import('./type').ShortcutType[];
@@ -2,12 +2,12 @@ import { defineComponent, useSlots, computed, watch, createElementBlock, openBlo
2
2
  import usePicker from "./hooks/userPicker.js";
3
3
  import _sfc_main$3 from "./component/PickerHeader.vue.js";
4
4
  /* empty css */
5
+ import _sfc_main$5 from "./component/Picker.vue.js";
6
+ /* empty css */
5
7
  import _sfc_main$4 from "./component/PickerCell.vue.js";
6
8
  /* empty css */
7
9
  import _sfc_main$1 from "./component/PickerPanel.vue.js";
8
10
  /* empty css */
9
- import _sfc_main$5 from "./component/PickerInput.vue.js";
10
- /* empty css */
11
11
  import _sfc_main$2 from "./YearPicker.vue.js";
12
12
  /* empty css */
13
13
  const _hoisted_1 = {
@@ -72,7 +72,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
72
  isSelected,
73
73
  handleConfirm,
74
74
  handleSelect,
75
- handleShortcut
75
+ handleShortcut,
76
+ handleVisibleChange
76
77
  } = usePicker({
77
78
  props,
78
79
  emits
@@ -204,7 +205,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
204
205
  key: 0,
205
206
  class: normalizeClass(_ctx.$attrs.class),
206
207
  style: normalizeStyle(_ctx.$attrs.style),
207
- type: "month"
208
+ type: "month",
209
+ onPopupVisibleChange: unref(handleVisibleChange)
208
210
  }, createSlots({
209
211
  content: withCtx(() => [
210
212
  createVNode(unref(ReusePanel))
@@ -232,7 +234,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
232
234
  ]),
233
235
  key: "2"
234
236
  } : void 0
235
- ]), 1032, ["class", "style"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
237
+ ]), 1032, ["class", "style", "onPopupVisibleChange"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
236
238
  ], 64);
237
239
  };
238
240
  }
@@ -50,8 +50,8 @@ declare const __VLS_component: import('vue').DefineComponent<WeekPickerProps, {}
50
50
  pickerValue: import('./type').DatePickerValue;
51
51
  defaultPickerValue: import('./type').DatePickerValue;
52
52
  valueFormat: import('./type').ValueFormat;
53
- showConfirmBtn: boolean;
54
53
  abbreviation: boolean;
54
+ showConfirmBtn: boolean;
55
55
  disabledDate: import('./type').DisabledDate;
56
56
  shortcutsPosition: import('./type').ShortcutsPosition;
57
57
  shortcuts: import('./type').ShortcutType[];
@@ -14,8 +14,8 @@ import _sfc_main$6 from "./component/PickerCell.vue.js";
14
14
  /* empty css */
15
15
  import _sfc_main$1 from "./component/PickerPanel.vue.js";
16
16
  /* empty css */
17
- import _sfc_main$7 from "./component/PickerInput.vue.js";
18
- /* empty css */
17
+ import _sfc_main$7 from "./component/Picker.vue.js";
18
+ /* empty css */
19
19
  import _sfc_main$2 from "./YearPicker.vue.js";
20
20
  /* empty css */
21
21
  import _sfc_main$3 from "./MonthPicker.vue.js";
@@ -87,7 +87,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
87
87
  getWeeksOfMonth,
88
88
  handleConfirm,
89
89
  handleSelect,
90
- handleShortcut
90
+ handleShortcut,
91
+ handleVisibleChange
91
92
  } = usePicker({
92
93
  props,
93
94
  emits
@@ -263,7 +264,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
263
264
  key: 0,
264
265
  class: normalizeClass(_ctx.$attrs.class),
265
266
  style: normalizeStyle(_ctx.$attrs.style),
266
- type: "week"
267
+ type: "week",
268
+ onPopupVisibleChange: unref(handleVisibleChange)
267
269
  }, createSlots({
268
270
  content: withCtx(() => [
269
271
  createVNode(unref(ReusePanel))
@@ -291,7 +293,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
291
293
  ]),
292
294
  key: "2"
293
295
  } : void 0
294
- ]), 1032, ["class", "style"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
296
+ ]), 1032, ["class", "style", "onPopupVisibleChange"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
295
297
  ], 64);
296
298
  };
297
299
  }