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,12 +1,64 @@
1
+ import { nextTick } from 'vue';
1
2
  import { TimePickerProps } from './type';
3
+ import { dayjs } from '../_shared/utils';
2
4
  declare function __VLS_template(): {
3
5
  attrs: Partial<{}>;
4
6
  slots: any;
5
- refs: {};
7
+ refs: {
8
+ panelRef: ({
9
+ $: import('vue').ComponentInternalInstance;
10
+ $data: {};
11
+ $props: Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
12
+ $attrs: {
13
+ [x: string]: unknown;
14
+ };
15
+ $refs: {
16
+ [x: string]: unknown;
17
+ };
18
+ $slots: Readonly<{
19
+ [name: string]: import('vue').Slot<any> | undefined;
20
+ }>;
21
+ $root: import('vue').ComponentPublicInstance | null;
22
+ $parent: import('vue').ComponentPublicInstance | null;
23
+ $host: Element | null;
24
+ $emit: (event: string, ...args: any[]) => void;
25
+ $el: HTMLDivElement;
26
+ $options: import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
27
+ jump: (newDate: dayjs.Dayjs, oldDate?: dayjs.Dayjs) => Promise<void>;
28
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
29
+ beforeCreate?: (() => void) | (() => void)[];
30
+ created?: (() => void) | (() => void)[];
31
+ beforeMount?: (() => void) | (() => void)[];
32
+ mounted?: (() => void) | (() => void)[];
33
+ beforeUpdate?: (() => void) | (() => void)[];
34
+ updated?: (() => void) | (() => void)[];
35
+ activated?: (() => void) | (() => void)[];
36
+ deactivated?: (() => void) | (() => void)[];
37
+ beforeDestroy?: (() => void) | (() => void)[];
38
+ beforeUnmount?: (() => void) | (() => void)[];
39
+ destroyed?: (() => void) | (() => void)[];
40
+ unmounted?: (() => void) | (() => void)[];
41
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
42
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
43
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
44
+ };
45
+ $forceUpdate: () => void;
46
+ $nextTick: typeof nextTick;
47
+ $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;
48
+ } & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, "jump"> & import('vue').ShallowUnwrapRef<{
49
+ jump: (newDate: dayjs.Dayjs, oldDate?: dayjs.Dayjs) => Promise<void>;
50
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
51
+ $slots: {
52
+ extra?(_: {}): any;
53
+ };
54
+ }) | null;
55
+ };
6
56
  rootEl: any;
7
57
  };
8
58
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
9
- declare const __VLS_component: import('vue').DefineComponent<TimePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
59
+ declare const __VLS_component: import('vue').DefineComponent<TimePickerProps, {
60
+ jump(date: dayjs.Dayjs, oldDate?: dayjs.Dayjs): void;
61
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
10
62
  change: (timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any;
11
63
  "update:popupVisible": (value: boolean) => any;
12
64
  "popup-visible-change": (value: boolean) => any;
@@ -41,10 +93,59 @@ declare const __VLS_component: import('vue').DefineComponent<TimePickerProps, {}
41
93
  hideDisabledOptions: boolean;
42
94
  scrollOffset: number;
43
95
  hideTrigger: boolean;
96
+ watchValueChange: boolean;
44
97
  disabledHours: import('./type').DisabledHours;
45
98
  disabledMinutes: import('./type').DisabledMinutes;
46
99
  disabledSeconds: import('./type').DisabledSeconds;
47
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
100
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
101
+ panelRef: ({
102
+ $: import('vue').ComponentInternalInstance;
103
+ $data: {};
104
+ $props: Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
105
+ $attrs: {
106
+ [x: string]: unknown;
107
+ };
108
+ $refs: {
109
+ [x: string]: unknown;
110
+ };
111
+ $slots: Readonly<{
112
+ [name: string]: import('vue').Slot<any> | undefined;
113
+ }>;
114
+ $root: import('vue').ComponentPublicInstance | null;
115
+ $parent: import('vue').ComponentPublicInstance | null;
116
+ $host: Element | null;
117
+ $emit: (event: string, ...args: any[]) => void;
118
+ $el: HTMLDivElement;
119
+ $options: import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
120
+ jump: (newDate: dayjs.Dayjs, oldDate?: dayjs.Dayjs) => Promise<void>;
121
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
122
+ beforeCreate?: (() => void) | (() => void)[];
123
+ created?: (() => void) | (() => void)[];
124
+ beforeMount?: (() => void) | (() => void)[];
125
+ mounted?: (() => void) | (() => void)[];
126
+ beforeUpdate?: (() => void) | (() => void)[];
127
+ updated?: (() => void) | (() => void)[];
128
+ activated?: (() => void) | (() => void)[];
129
+ deactivated?: (() => void) | (() => void)[];
130
+ beforeDestroy?: (() => void) | (() => void)[];
131
+ beforeUnmount?: (() => void) | (() => void)[];
132
+ destroyed?: (() => void) | (() => void)[];
133
+ unmounted?: (() => void) | (() => void)[];
134
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
135
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
136
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
137
+ };
138
+ $forceUpdate: () => void;
139
+ $nextTick: typeof nextTick;
140
+ $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;
141
+ } & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, "jump"> & import('vue').ShallowUnwrapRef<{
142
+ jump: (newDate: dayjs.Dayjs, oldDate?: dayjs.Dayjs) => Promise<void>;
143
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
144
+ $slots: {
145
+ extra?(_: {}): any;
146
+ };
147
+ }) | null;
148
+ }, any>;
48
149
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
49
150
  export default _default;
50
151
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,4 +1,4 @@
1
- import { defineComponent, useSlots, createBlock, openBlock, unref, mergeProps, withCtx, createElementVNode, normalizeStyle, normalizeClass, createElementBlock, createCommentVNode, renderSlot, withModifiers, Fragment, createVNode, createSlots, nextTick } from "vue";
1
+ import { defineComponent, useSlots, ref, createBlock, openBlock, unref, mergeProps, withCtx, createElementVNode, normalizeStyle, normalizeClass, createElementBlock, createCommentVNode, renderSlot, withModifiers, Fragment, createVNode, createSlots, nextTick } from "vue";
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
@@ -59,10 +59,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  unmountOnClose: { type: Boolean, default: false },
60
60
  hideTrigger: { type: Boolean, default: false },
61
61
  scrollbar: { type: Boolean, default: true },
62
- scrollOffset: { default: 0 }
62
+ scrollOffset: { default: 0 },
63
+ watchValueChange: { type: Boolean, default: true }
63
64
  },
64
65
  emits: ["update:modelValue", "update:popupVisible", "change", "select", "clear", "popup-visible-change"],
65
- setup(__props, { emit: __emit }) {
66
+ setup(__props, { expose: __expose, emit: __emit }) {
66
67
  const $slots = useSlots();
67
68
  const props = __props;
68
69
  const emits = __emit;
@@ -79,6 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
79
80
  format,
80
81
  placeholder
81
82
  } = useTimePickerContext().provide(props, emits);
83
+ const panelRef = ref();
82
84
  const handleClear = () => {
83
85
  computedValue.value = type.value == "time-range" ? [] : "";
84
86
  emits("clear");
@@ -103,6 +105,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
105
  }
104
106
  computedValue.value = [];
105
107
  };
108
+ __expose({
109
+ jump(date, oldDate) {
110
+ var _a;
111
+ (_a = panelRef.value) == null ? void 0 : _a.jump(date, oldDate);
112
+ }
113
+ });
106
114
  return (_ctx, _cache) => {
107
115
  return !_ctx.hideTrigger ? (openBlock(), createBlock(unref(Trigger), mergeProps({
108
116
  key: 0,
@@ -120,7 +128,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
120
128
  "prevent-focus": ""
121
129
  }, _ctx.triggerProps), {
122
130
  content: withCtx(() => [
123
- createVNode(_sfc_main$3, null, createSlots({ _: 2 }, [
131
+ createVNode(_sfc_main$3, {
132
+ ref_key: "panelRef",
133
+ ref: panelRef
134
+ }, createSlots({ _: 2 }, [
124
135
  $slots.extra ? {
125
136
  name: "extra",
126
137
  fn: withCtx(() => [
@@ -128,7 +139,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
128
139
  ]),
129
140
  key: "0"
130
141
  } : void 0
131
- ]), 1024)
142
+ ]), 1536)
132
143
  ]),
133
144
  default: withCtx(() => [
134
145
  createElementVNode("div", {
@@ -207,7 +218,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
207
218
  ], 6)
208
219
  ]),
209
220
  _: 3
210
- }, 16, ["popup-visible", "position", "popup-container", "unmount-on-close", "disabled"])) : (openBlock(), createBlock(_sfc_main$3, { key: 1 }, createSlots({ _: 2 }, [
221
+ }, 16, ["popup-visible", "position", "popup-container", "unmount-on-close", "disabled"])) : (openBlock(), createBlock(_sfc_main$3, {
222
+ key: 1,
223
+ ref_key: "panelRef",
224
+ ref: panelRef
225
+ }, createSlots({ _: 2 }, [
211
226
  $slots.extra ? {
212
227
  name: "extra",
213
228
  fn: withCtx(() => [
@@ -215,7 +230,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
215
230
  ]),
216
231
  key: "0"
217
232
  } : void 0
218
- ]), 1024));
233
+ ]), 1536));
219
234
  };
220
235
  }
221
236
  });
@@ -1,3 +1,4 @@
1
+ import { dayjs } from '../_shared/utils';
1
2
  declare function __VLS_template(): {
2
3
  attrs: Partial<{}>;
3
4
  slots: {
@@ -7,7 +8,9 @@ declare function __VLS_template(): {
7
8
  rootEl: HTMLDivElement;
8
9
  };
9
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
- declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
11
+ declare const __VLS_component: import('vue').DefineComponent<{}, {
12
+ jump: (newDate: dayjs.Dayjs, oldDate?: dayjs.Dayjs) => Promise<void>;
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
11
14
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
15
  export default _default;
13
16
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -23,7 +23,7 @@ const _hoisted_6 = {
23
23
  };
24
24
  const _sfc_main = /* @__PURE__ */ defineComponent({
25
25
  __name: "TimePickerPanel",
26
- setup(__props) {
26
+ setup(__props, { expose: __expose }) {
27
27
  const {
28
28
  timeColumn,
29
29
  timeColumnCells,
@@ -38,6 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
38
  hideTrigger,
39
39
  scrollbar,
40
40
  scrollOffset,
41
+ watchValueChange,
41
42
  disabledHours,
42
43
  disabledMinutes,
43
44
  disabledSeconds
@@ -59,32 +60,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
60
  }
60
61
  };
61
62
  const handleClick = (val, i, cell) => {
62
- return new Promise((resolve) => {
63
- curValue.value[i] = val;
64
- timeColumn.value.forEach((_, i1) => {
65
- curValue.value[i1] = isUndefined(curValue.value[i1]) ? 0 : curValue.value[i1];
66
- });
67
- const container = scrollContainer.value[i];
68
- if (container && cell) {
69
- new Tween({
70
- from: { scroll: container.scrollTop },
71
- to: { scroll: cell.offsetTop },
72
- duration: 300,
73
- easing: "quadOut",
74
- onUpdate: (current) => {
75
- container.scrollTop = current.scroll - scrollOffset.value;
76
- },
77
- onFinish: () => {
78
- resolve("");
79
- }
80
- }).start();
81
- }
82
- if (disableConfirm.value) {
83
- handleConfirm();
84
- }
63
+ curValue.value[i] = val;
64
+ timeColumn.value.forEach((_, i1) => {
65
+ curValue.value[i1] = isUndefined(curValue.value[i1]) ? 0 : curValue.value[i1];
85
66
  });
67
+ const container = scrollContainer.value[i];
68
+ if (container && cell) {
69
+ new Tween({
70
+ from: { scroll: container.scrollTop },
71
+ to: { scroll: cell.offsetTop },
72
+ duration: 300,
73
+ easing: "quadOut",
74
+ onUpdate: (current) => {
75
+ container.scrollTop = current.scroll - scrollOffset.value;
76
+ }
77
+ }).start();
78
+ }
79
+ if (disableConfirm.value) {
80
+ handleConfirm();
81
+ }
86
82
  };
87
83
  const hanldeJump = async (newDate, oldDate) => {
84
+ await sleep(0);
88
85
  const newTimeMap = {
89
86
  hour: newDate.hour(),
90
87
  minute: newDate.minute(),
@@ -95,15 +92,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
95
92
  minute: oldDate == null ? void 0 : oldDate.minute(),
96
93
  second: oldDate == null ? void 0 : oldDate.second()
97
94
  };
98
- console.log(newTimeMap, oldTimeMap);
99
- for (let i = 0; i < timeColumn.value.length; i++) {
100
- const time = newTimeMap[timeColumn.value[i]];
101
- if (oldTimeMap) {
102
- const oldTime = oldTimeMap[timeColumn.value[i]];
103
- if (oldTime == time) continue;
104
- }
105
- await handleClick(time, i, cells.value[i][time]);
106
- }
95
+ timeColumn.value.forEach((v, i) => {
96
+ const time = newTimeMap[v];
97
+ const oldTime = oldTimeMap ? oldTimeMap[timeColumn.value[i]] : -1;
98
+ if (oldTime == time) return;
99
+ handleClick(time, i, cells.value[i][time]);
100
+ });
107
101
  };
108
102
  const handleConfirm = () => {
109
103
  var _a;
@@ -139,13 +133,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
139
133
  };
140
134
  watch(
141
135
  () => computedValue.value,
142
- async (newVal, oldVal) => {
143
- await sleep(0);
136
+ (newVal, oldVal) => {
144
137
  if (!newVal) return curValue.value = [];
145
- if (!hideTrigger.value) return;
146
- const oldDate = dayjs(oldVal, format.value);
147
- const newDate = dayjs(newVal, format.value);
148
- hanldeJump(newDate, oldDate);
138
+ if (!hideTrigger.value || !watchValueChange.value) return;
139
+ hanldeJump(
140
+ dayjs(newVal, format.value),
141
+ dayjs(oldVal, format.value)
142
+ );
149
143
  },
150
144
  {
151
145
  immediate: true
@@ -153,17 +147,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
153
147
  );
154
148
  watch(
155
149
  () => computedVisible.value,
156
- async (visible) => {
150
+ (visible) => {
157
151
  const value = isArray(computedValue.value) ? computedValue.value[curIndex.value] : computedValue.value;
158
152
  if (!value) return curValue.value = [];
159
153
  if (!visible) return;
160
- await sleep(0);
161
154
  hanldeJump(dayjs(value, format.value));
162
155
  },
163
156
  {
164
157
  immediate: true
165
158
  }
166
159
  );
160
+ __expose({
161
+ jump: hanldeJump
162
+ });
167
163
  return (_ctx, _cache) => {
168
164
  return openBlock(), createElementBlock("div", _hoisted_1, [
169
165
  createElementVNode("div", _hoisted_2, [
@@ -19,6 +19,7 @@ type TimePickerContext = {
19
19
  scrollOffset: Ref<number>;
20
20
  hideDisabledOptions: Ref<boolean>;
21
21
  hideTrigger: Ref<boolean>;
22
+ watchValueChange: Ref<boolean>;
22
23
  disabledHours: DisabledHours;
23
24
  disabledMinutes: DisabledMinutes;
24
25
  disabledSeconds: DisabledSeconds;
@@ -50,6 +51,7 @@ export default function useTimePickerContext(): {
50
51
  scrollOffset: Ref<number>;
51
52
  hideDisabledOptions: Ref<boolean>;
52
53
  hideTrigger: Ref<boolean>;
54
+ watchValueChange: Ref<boolean>;
53
55
  disabledHours: DisabledHours;
54
56
  disabledMinutes: DisabledMinutes;
55
57
  disabledSeconds: DisabledSeconds;
@@ -26,6 +26,7 @@ function useTimePickerContext() {
26
26
  scrollbar,
27
27
  scrollOffset,
28
28
  hideTrigger,
29
+ watchValueChange,
29
30
  placeholder: _placeholder
30
31
  } = toRefs(props);
31
32
  const { disabledHours, disabledMinutes, disabledSeconds } = props;
@@ -100,6 +101,7 @@ function useTimePickerContext() {
100
101
  hideTrigger,
101
102
  scrollOffset,
102
103
  disableConfirm,
104
+ watchValueChange,
103
105
  hideDisabledOptions,
104
106
  disabledHours,
105
107
  disabledMinutes,
@@ -129,6 +131,7 @@ function useTimePickerContext() {
129
131
  scrollbar: ref(true),
130
132
  hideTrigger: ref(false),
131
133
  scrollOffset: ref(4),
134
+ watchValueChange: ref(true),
132
135
  hideDisabledOptions: ref(false),
133
136
  disabledHours: () => [],
134
137
  disabledMinutes: () => [],
@@ -10,7 +10,9 @@ declare const TimePicker: {
10
10
  onClear?: (() => any) | undefined;
11
11
  onSelect?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
12
12
  "onUpdate:modelValue"?: ((value: import('./type').TimePickerValue) => any) | undefined;
13
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
13
+ }>, {
14
+ jump(date: import('dayjs').Dayjs, oldDate?: import('dayjs').Dayjs): void;
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
14
16
  change: (timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any;
15
17
  "update:popupVisible": (value: boolean) => any;
16
18
  "popup-visible-change": (value: boolean) => any;
@@ -38,10 +40,59 @@ declare const TimePicker: {
38
40
  hideDisabledOptions: boolean;
39
41
  scrollOffset: number;
40
42
  hideTrigger: boolean;
43
+ watchValueChange: boolean;
41
44
  disabledHours: import('./type').DisabledHours;
42
45
  disabledMinutes: import('./type').DisabledMinutes;
43
46
  disabledSeconds: import('./type').DisabledSeconds;
44
- }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
47
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
48
+ panelRef: ({
49
+ $: import('vue').ComponentInternalInstance;
50
+ $data: {};
51
+ $props: Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>;
52
+ $attrs: {
53
+ [x: string]: unknown;
54
+ };
55
+ $refs: {
56
+ [x: string]: unknown;
57
+ };
58
+ $slots: Readonly<{
59
+ [name: string]: import('vue').Slot<any> | undefined;
60
+ }>;
61
+ $root: import('vue').ComponentPublicInstance | null;
62
+ $parent: import('vue').ComponentPublicInstance | null;
63
+ $host: Element | null;
64
+ $emit: (event: string, ...args: any[]) => void;
65
+ $el: HTMLDivElement;
66
+ $options: import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
67
+ jump: (newDate: import('dayjs').Dayjs, oldDate?: import('dayjs').Dayjs) => Promise<void>;
68
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
69
+ beforeCreate?: (() => void) | (() => void)[];
70
+ created?: (() => void) | (() => void)[];
71
+ beforeMount?: (() => void) | (() => void)[];
72
+ mounted?: (() => void) | (() => void)[];
73
+ beforeUpdate?: (() => void) | (() => void)[];
74
+ updated?: (() => void) | (() => void)[];
75
+ activated?: (() => void) | (() => void)[];
76
+ deactivated?: (() => void) | (() => void)[];
77
+ beforeDestroy?: (() => void) | (() => void)[];
78
+ beforeUnmount?: (() => void) | (() => void)[];
79
+ destroyed?: (() => void) | (() => void)[];
80
+ unmounted?: (() => void) | (() => void)[];
81
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
82
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
83
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
84
+ };
85
+ $forceUpdate: () => void;
86
+ $nextTick: typeof import('vue').nextTick;
87
+ $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;
88
+ } & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, "jump"> & import('vue').ShallowUnwrapRef<{
89
+ jump: (newDate: import('dayjs').Dayjs, oldDate?: import('dayjs').Dayjs) => Promise<void>;
90
+ }> & {} & import('@vue/runtime-core').ComponentCustomProperties & {} & {
91
+ $slots: {
92
+ extra?(_: {}): any;
93
+ };
94
+ }) | null;
95
+ }, any, import('vue').ComponentProvideOptions, {
45
96
  P: {};
46
97
  B: {};
47
98
  D: {};
@@ -55,7 +106,9 @@ declare const TimePicker: {
55
106
  onClear?: (() => any) | undefined;
56
107
  onSelect?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
57
108
  "onUpdate:modelValue"?: ((value: import('./type').TimePickerValue) => any) | undefined;
58
- }>, {}, {}, {}, {}, {
109
+ }>, {
110
+ jump(date: import('dayjs').Dayjs, oldDate?: import('dayjs').Dayjs): void;
111
+ }, {}, {}, {}, {
59
112
  error: boolean;
60
113
  size: import('..').Size;
61
114
  popupVisible: boolean;
@@ -76,6 +129,7 @@ declare const TimePicker: {
76
129
  hideDisabledOptions: boolean;
77
130
  scrollOffset: number;
78
131
  hideTrigger: boolean;
132
+ watchValueChange: boolean;
79
133
  disabledHours: import('./type').DisabledHours;
80
134
  disabledMinutes: import('./type').DisabledMinutes;
81
135
  disabledSeconds: import('./type').DisabledSeconds;
@@ -90,7 +144,9 @@ declare const TimePicker: {
90
144
  onClear?: (() => any) | undefined;
91
145
  onSelect?: ((timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any) | undefined;
92
146
  "onUpdate:modelValue"?: ((value: import('./type').TimePickerValue) => any) | undefined;
93
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
147
+ }>, {
148
+ jump(date: import('dayjs').Dayjs, oldDate?: import('dayjs').Dayjs): void;
149
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
94
150
  change: (timeString: string | (string | undefined)[] | undefined, time: Date | (Date | undefined)[] | undefined) => any;
95
151
  "update:popupVisible": (value: boolean) => any;
96
152
  "popup-visible-change": (value: boolean) => any;
@@ -118,6 +174,7 @@ declare const TimePicker: {
118
174
  hideDisabledOptions: boolean;
119
175
  scrollOffset: number;
120
176
  hideTrigger: boolean;
177
+ watchValueChange: boolean;
121
178
  disabledHours: import('./type').DisabledHours;
122
179
  disabledMinutes: import('./type').DisabledMinutes;
123
180
  disabledSeconds: import('./type').DisabledSeconds;
@@ -31,6 +31,7 @@ export interface TimePickerProps {
31
31
  hideTrigger?: boolean;
32
32
  scrollbar?: boolean;
33
33
  scrollOffset?: number;
34
+ watchValueChange?: boolean;
34
35
  }
35
36
  export interface TimePickerEmits {
36
37
  (e: 'update:modelValue', value: TimePickerValue): void;
@@ -10,8 +10,8 @@ import "../_shared/utils/time.js";
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
- import _sfc_main$3 from "../_shared/icons/IconCopy.vue.js";
14
- import _sfc_main$1 from "../_shared/icons/IconEdit.vue.js";
13
+ import _sfc_main$3 from "../_shared/icons/IconCopy.vue2.js";
14
+ import _sfc_main$1 from "../_shared/icons/IconEdit.vue2.js";
15
15
  import _sfc_main$2 from "../_shared/icons/IconInfo.vue.js";
16
16
  import Input from "../Input/index.js";
17
17
  import Tooltip from "../Tooltip/index.js";
@@ -1,27 +1,4 @@
1
- import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
- import "../../node_modules/b-tween/dist/b-tween.es.js";
3
- import "../../node_modules/dayjs/dayjs.min.js";
4
- import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../utils/dom.js";
6
- import "../utils/locale.js";
7
- import "../utils/time.js";
8
- /* empty css */
9
- /* empty css */
10
- import _sfc_main$1 from "../components/Icon/index.vue3.js";
11
- /* empty css */
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- __name: "IconCopy",
14
- setup(__props) {
15
- return (_ctx, _cache) => {
16
- return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(_ctx.$attrs)), {
17
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
18
- createElementVNode("path", { d: "M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z" }, null, -1)
19
- ])]),
20
- _: 1
21
- }, 16);
22
- };
23
- }
24
- });
1
+ import _sfc_main from "./IconCopy.vue2.js";
25
2
  export {
26
3
  _sfc_main as default
27
4
  };
@@ -1,4 +1,27 @@
1
- import _sfc_main from "./IconCopy.vue.js";
1
+ import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
+ import "../../node_modules/b-tween/dist/b-tween.es.js";
3
+ import "../../node_modules/dayjs/dayjs.min.js";
4
+ import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
+ import "../utils/dom.js";
6
+ import "../utils/locale.js";
7
+ import "../utils/time.js";
8
+ /* empty css */
9
+ /* empty css */
10
+ import _sfc_main$1 from "../components/Icon/index.vue3.js";
11
+ /* empty css */
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ __name: "IconCopy",
14
+ setup(__props) {
15
+ return (_ctx, _cache) => {
16
+ return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(_ctx.$attrs)), {
17
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
18
+ createElementVNode("path", { d: "M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z" }, null, -1)
19
+ ])]),
20
+ _: 1
21
+ }, 16);
22
+ };
23
+ }
24
+ });
2
25
  export {
3
26
  _sfc_main as default
4
27
  };
@@ -1,27 +1,4 @@
1
- import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
- import "../../node_modules/b-tween/dist/b-tween.es.js";
3
- import "../../node_modules/dayjs/dayjs.min.js";
4
- import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../utils/dom.js";
6
- import "../utils/locale.js";
7
- import "../utils/time.js";
8
- /* empty css */
9
- /* empty css */
10
- import _sfc_main$1 from "../components/Icon/index.vue3.js";
11
- /* empty css */
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- __name: "IconEdit",
14
- setup(__props) {
15
- return (_ctx, _cache) => {
16
- return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(_ctx.$attrs)), {
17
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
18
- createElementVNode("path", { d: "m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36" }, null, -1)
19
- ])]),
20
- _: 1
21
- }, 16);
22
- };
23
- }
24
- });
1
+ import _sfc_main from "./IconEdit.vue2.js";
25
2
  export {
26
3
  _sfc_main as default
27
4
  };
@@ -1,4 +1,27 @@
1
- import _sfc_main from "./IconEdit.vue.js";
1
+ import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
+ import "../../node_modules/b-tween/dist/b-tween.es.js";
3
+ import "../../node_modules/dayjs/dayjs.min.js";
4
+ import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
+ import "../utils/dom.js";
6
+ import "../utils/locale.js";
7
+ import "../utils/time.js";
8
+ /* empty css */
9
+ /* empty css */
10
+ import _sfc_main$1 from "../components/Icon/index.vue3.js";
11
+ /* empty css */
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ __name: "IconEdit",
14
+ setup(__props) {
15
+ return (_ctx, _cache) => {
16
+ return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(_ctx.$attrs)), {
17
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
18
+ createElementVNode("path", { d: "m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36" }, null, -1)
19
+ ])]),
20
+ _: 1
21
+ }, 16);
22
+ };
23
+ }
24
+ });
2
25
  export {
3
26
  _sfc_main as default
4
27
  };