yc-design-vue 2.3.0 → 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 (231) hide show
  1. package/dist/index.umd.js +1 -1
  2. package/es/Alert/index.vue.js +2 -2
  3. package/es/Avatar/Avatar.vue.js +1 -1
  4. package/es/BackTop/index.vue.js +1 -1
  5. package/es/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  6. package/es/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  7. package/es/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  8. package/es/Calendar/Calendar.vue.js +2 -2
  9. package/es/Carousel/CarouselArrow.vue.js +1 -1
  10. package/es/Cascader/CascaderIcon.vue.js +2 -2
  11. package/es/Cascader/CascaderOption.vue.js +1 -1
  12. package/es/Checkbox/Checkbox.vue.js +2 -2
  13. package/es/Collapse/CollapseItem.vue.js +2 -2
  14. package/es/DatePicker/DatePicker.vue.js +2 -0
  15. package/es/DatePicker/MonthPicker.vue.js +5 -3
  16. package/es/DatePicker/WeekPicker.vue.js +5 -3
  17. package/es/DatePicker/YearPicker.vue.js +5 -3
  18. package/es/DatePicker/component/Picker.vue.d.ts +5 -1
  19. package/es/DatePicker/component/Picker.vue.js +6 -3
  20. package/es/DatePicker/component/PickerHeader.vue.js +1 -1
  21. package/es/DatePicker/hooks/userPicker.d.ts +1 -0
  22. package/es/DatePicker/hooks/userPicker.js +14 -20
  23. package/es/Drawer/Drawer.vue.js +2 -2
  24. package/es/Dropdown/DropdownButton.vue.js +1 -1
  25. package/es/Dropdown/Dsubmenu.vue.js +1 -1
  26. package/es/Empty/index.vue.js +1 -1
  27. package/es/Image/Image.vue.js +1 -1
  28. package/es/Image/ImagePreview.vue.js +1 -1
  29. package/es/Image/ImagePreviewArrow.vue.js +1 -1
  30. package/es/Image/ImagePreviewToolbar.vue.js +1 -1
  31. package/es/Input/Input.vue.js +2 -2
  32. package/es/Input/InputPassword.vue.js +2 -2
  33. package/es/Input/InputSearch.vue.js +2 -2
  34. package/es/InputNumber/InputOperaBtn.vue.js +1 -1
  35. package/es/InputTag/index.vue.js +2 -2
  36. package/es/Layout/LayoutSider.vue.js +1 -1
  37. package/es/Link/index.vue.js +1 -1
  38. package/es/Menu/Menu.vue.js +1 -1
  39. package/es/Menu/MenuEllipsis.vue.js +1 -1
  40. package/es/Menu/SubMenu.vue.js +1 -1
  41. package/es/Message/Message.vue.js +2 -2
  42. package/es/Modal/Modal.vue.js +2 -2
  43. package/es/Notification/Notification.vue.js +2 -2
  44. package/es/PageHeader/index.vue.js +2 -2
  45. package/es/Pagination/PaginationItem.vue.js +1 -1
  46. package/es/Progress/ProgressCircle.vue.js +1 -1
  47. package/es/Radio/Radio.vue.js +2 -2
  48. package/es/Rate/index.vue.js +1 -1
  49. package/es/ResizeBox/index.vue.js +1 -1
  50. package/es/Select/SelectIcon.vue.js +2 -2
  51. package/es/Spin/index.vue.js +1 -1
  52. package/es/Split/index.vue.js +1 -1
  53. package/es/Steps/Step.vue.js +1 -1
  54. package/es/Tabs/TabButton.vue.js +2 -2
  55. package/es/Tabs/Tabs.vue.js +1 -1
  56. package/es/Tag/index.vue.js +2 -2
  57. package/es/Textarea/index.vue.js +2 -2
  58. package/es/TimePicker/TimePicker.vue.js +2 -2
  59. package/es/Transfer/Transfer.vue.js +1 -1
  60. package/es/Transfer/TransferPanel.vue.js +2 -2
  61. package/es/Trigger/index.vue.js +1 -1
  62. package/es/Typography/TypographyBase.vue.js +3 -3
  63. package/es/Upload/UploadButton.vue.js +1 -1
  64. package/es/Upload/UploadDrag.vue.js +1 -1
  65. package/es/Upload/UploadFileList.vue.js +2 -2
  66. package/es/Upload/UploadPictureCard.vue.js +1 -1
  67. package/es/_shared/components/IconButton/{index.vue2.js → index.vue.js} +1 -1
  68. package/es/_shared/components/IconButton/index.vue3.js +2 -2
  69. package/es/_shared/constants/index.js +1 -1
  70. package/es/_shared/icons/IconArrowDown.vue.js +1 -1
  71. package/es/_shared/icons/IconArrowRight.vue.js +1 -1
  72. package/es/_shared/icons/IconCalendar.vue2.js +1 -1
  73. package/es/_shared/icons/IconCheck.vue.js +1 -1
  74. package/es/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  75. package/es/_shared/icons/IconClose.vue.js +1 -1
  76. package/es/_shared/icons/IconCopy.vue.js +1 -24
  77. package/es/_shared/icons/IconCopy.vue2.js +24 -1
  78. package/es/_shared/icons/IconDelete.vue2.js +1 -1
  79. package/es/_shared/icons/IconDoubleLeft.vue2.js +1 -1
  80. package/es/_shared/icons/IconDoubleRight.vue2.js +1 -1
  81. package/es/_shared/icons/IconDragDot.vue.js +1 -1
  82. package/es/_shared/icons/IconEdit.vue.js +1 -24
  83. package/es/_shared/icons/IconEdit.vue2.js +24 -1
  84. package/es/_shared/icons/IconEmpty.vue.js +1 -1
  85. package/es/_shared/icons/IconError.vue.js +1 -1
  86. package/es/_shared/icons/IconExclamation.vue2.js +1 -1
  87. package/es/_shared/icons/IconEyeClose.vue.js +1 -1
  88. package/es/_shared/icons/IconEyeOpen.vue.js +1 -1
  89. package/es/_shared/icons/IconFaceSmile.vue.js +1 -1
  90. package/es/_shared/icons/IconFile.vue2.js +1 -1
  91. package/es/_shared/icons/IconFullScreen.vue2.js +1 -1
  92. package/es/_shared/icons/IconImageClose.vue.js +1 -1
  93. package/es/_shared/icons/IconInfo.vue.js +1 -1
  94. package/es/_shared/icons/IconInfoLine.vue.js +1 -1
  95. package/es/_shared/icons/IconLink.vue.js +1 -1
  96. package/es/_shared/icons/IconLoading.vue.js +1 -1
  97. package/es/_shared/icons/IconMenuFold.vue.js +1 -1
  98. package/es/_shared/icons/IconMenuUnfold.vue.js +1 -1
  99. package/es/_shared/icons/IconMinus.vue2.js +1 -1
  100. package/es/_shared/icons/IconMore.vue.js +1 -1
  101. package/es/_shared/icons/IconOriginSize.vue2.js +1 -1
  102. package/es/_shared/icons/IconPlus.vue.js +1 -1
  103. package/es/_shared/icons/IconRight.vue.js +1 -1
  104. package/es/_shared/icons/IconRotateLeft.vue2.js +1 -1
  105. package/es/_shared/icons/IconRotateRight.vue2.js +1 -1
  106. package/es/_shared/icons/IconSearch.vue.js +1 -1
  107. package/es/_shared/icons/IconSeparator.vue2.js +1 -1
  108. package/es/_shared/icons/IconStar.vue.js +1 -1
  109. package/es/_shared/icons/IconSuccess.vue.js +1 -1
  110. package/es/_shared/icons/IconTime.vue.js +1 -1
  111. package/es/_shared/icons/IconToTop.vue.js +1 -1
  112. package/es/_shared/icons/IconUpload.vue2.js +1 -1
  113. package/es/_shared/icons/IconWarning.vue.js +1 -1
  114. package/es/_shared/icons/IconZoomIn.vue2.js +1 -1
  115. package/es/_shared/icons/IconZoomOut.vue2.js +1 -1
  116. package/lib/Alert/index.vue.js +1 -1
  117. package/lib/Avatar/Avatar.vue.js +1 -1
  118. package/lib/BackTop/index.vue.js +1 -1
  119. package/lib/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  120. package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  121. package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  122. package/lib/Calendar/Calendar.vue.js +1 -1
  123. package/lib/Carousel/CarouselArrow.vue.js +1 -1
  124. package/lib/Cascader/CascaderIcon.vue.js +1 -1
  125. package/lib/Cascader/CascaderOption.vue.js +1 -1
  126. package/lib/Checkbox/Checkbox.vue.js +1 -1
  127. package/lib/Collapse/CollapseItem.vue.js +1 -1
  128. package/lib/DatePicker/DatePicker.vue.js +1 -1
  129. package/lib/DatePicker/MonthPicker.vue.js +1 -1
  130. package/lib/DatePicker/WeekPicker.vue.js +1 -1
  131. package/lib/DatePicker/YearPicker.vue.js +1 -1
  132. package/lib/DatePicker/component/Picker.vue.d.ts +5 -1
  133. package/lib/DatePicker/component/Picker.vue.js +1 -1
  134. package/lib/DatePicker/component/PickerHeader.vue.js +1 -1
  135. package/lib/DatePicker/hooks/userPicker.d.ts +1 -0
  136. package/lib/DatePicker/hooks/userPicker.js +1 -1
  137. package/lib/Drawer/Drawer.vue.js +1 -1
  138. package/lib/Dropdown/DropdownButton.vue.js +1 -1
  139. package/lib/Dropdown/Dsubmenu.vue.js +1 -1
  140. package/lib/Empty/index.vue.js +1 -1
  141. package/lib/Image/Image.vue.js +1 -1
  142. package/lib/Image/ImagePreview.vue.js +1 -1
  143. package/lib/Image/ImagePreviewArrow.vue.js +1 -1
  144. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  145. package/lib/Input/Input.vue.js +1 -1
  146. package/lib/Input/InputPassword.vue.js +1 -1
  147. package/lib/Input/InputSearch.vue.js +1 -1
  148. package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
  149. package/lib/InputTag/index.vue.js +1 -1
  150. package/lib/Layout/LayoutSider.vue.js +1 -1
  151. package/lib/Link/index.vue.js +1 -1
  152. package/lib/Menu/Menu.vue.js +1 -1
  153. package/lib/Menu/MenuEllipsis.vue.js +1 -1
  154. package/lib/Menu/SubMenu.vue.js +1 -1
  155. package/lib/Message/Message.vue.js +1 -1
  156. package/lib/Modal/Modal.vue.js +1 -1
  157. package/lib/Notification/Notification.vue.js +1 -1
  158. package/lib/PageHeader/index.vue.js +1 -1
  159. package/lib/Pagination/PaginationItem.vue.js +1 -1
  160. package/lib/Progress/ProgressCircle.vue.js +1 -1
  161. package/lib/Radio/Radio.vue.js +1 -1
  162. package/lib/Rate/index.vue.js +1 -1
  163. package/lib/ResizeBox/index.vue.js +1 -1
  164. package/lib/Select/SelectIcon.vue.js +1 -1
  165. package/lib/Spin/index.vue.js +1 -1
  166. package/lib/Split/index.vue.js +1 -1
  167. package/lib/Steps/Step.vue.js +1 -1
  168. package/lib/Tabs/TabButton.vue.js +1 -1
  169. package/lib/Tabs/Tabs.vue.js +1 -1
  170. package/lib/Tag/index.vue.js +1 -1
  171. package/lib/Textarea/index.vue.js +1 -1
  172. package/lib/TimePicker/TimePicker.vue.js +1 -1
  173. package/lib/Transfer/Transfer.vue.js +1 -1
  174. package/lib/Transfer/TransferPanel.vue.js +1 -1
  175. package/lib/Trigger/index.vue.js +1 -1
  176. package/lib/Typography/TypographyBase.vue.js +1 -1
  177. package/lib/Upload/UploadButton.vue.js +1 -1
  178. package/lib/Upload/UploadDrag.vue.js +1 -1
  179. package/lib/Upload/UploadFileList.vue.js +1 -1
  180. package/lib/Upload/UploadPictureCard.vue.js +1 -1
  181. package/lib/_shared/components/IconButton/index.vue.js +1 -0
  182. package/lib/_shared/components/IconButton/index.vue3.js +1 -1
  183. package/lib/_shared/constants/index.js +1 -1
  184. package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
  185. package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
  186. package/lib/_shared/icons/IconCalendar.vue2.js +1 -1
  187. package/lib/_shared/icons/IconCheck.vue.js +1 -1
  188. package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  189. package/lib/_shared/icons/IconClose.vue.js +1 -1
  190. package/lib/_shared/icons/IconCopy.vue.js +1 -1
  191. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  192. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  193. package/lib/_shared/icons/IconDoubleLeft.vue2.js +1 -1
  194. package/lib/_shared/icons/IconDoubleRight.vue2.js +1 -1
  195. package/lib/_shared/icons/IconDragDot.vue.js +1 -1
  196. package/lib/_shared/icons/IconEdit.vue.js +1 -1
  197. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  198. package/lib/_shared/icons/IconEmpty.vue.js +1 -1
  199. package/lib/_shared/icons/IconError.vue.js +1 -1
  200. package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
  201. package/lib/_shared/icons/IconEyeClose.vue.js +1 -1
  202. package/lib/_shared/icons/IconEyeOpen.vue.js +1 -1
  203. package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
  204. package/lib/_shared/icons/IconFile.vue2.js +1 -1
  205. package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
  206. package/lib/_shared/icons/IconImageClose.vue.js +1 -1
  207. package/lib/_shared/icons/IconInfo.vue.js +1 -1
  208. package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
  209. package/lib/_shared/icons/IconLink.vue.js +1 -1
  210. package/lib/_shared/icons/IconLoading.vue.js +1 -1
  211. package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
  212. package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
  213. package/lib/_shared/icons/IconMinus.vue2.js +1 -1
  214. package/lib/_shared/icons/IconMore.vue.js +1 -1
  215. package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
  216. package/lib/_shared/icons/IconPlus.vue.js +1 -1
  217. package/lib/_shared/icons/IconRight.vue.js +1 -1
  218. package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
  219. package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
  220. package/lib/_shared/icons/IconSearch.vue.js +1 -1
  221. package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
  222. package/lib/_shared/icons/IconStar.vue.js +1 -1
  223. package/lib/_shared/icons/IconSuccess.vue.js +1 -1
  224. package/lib/_shared/icons/IconTime.vue.js +1 -1
  225. package/lib/_shared/icons/IconToTop.vue.js +1 -1
  226. package/lib/_shared/icons/IconUpload.vue2.js +1 -1
  227. package/lib/_shared/icons/IconWarning.vue.js +1 -1
  228. package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
  229. package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
  230. package/package.json +1 -1
  231. package/lib/_shared/components/IconButton/index.vue2.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, useSlots, ref, createBlock, openBlock, Transition, withCtx, createElementBlock, createCommentVNode, normalizeClass, createElementVNode, renderSlot, resolveDynamicComponent, unref, createTextVNode, toDisplayString, createVNode } from "vue";
2
2
  import { TYPE_ICON_MAP } from "../_shared/constants/index.js";
3
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
4
- /* empty css */
3
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
4
+ /* empty css */
5
5
  import "../node_modules/b-tween/dist/b-tween.es.js";
6
6
  import "../node_modules/dayjs/dayjs.min.js";
7
7
  import "../node_modules/tinycolor2/esm/tinycolor.js";
@@ -6,7 +6,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
6
6
  import { valueToPx } from "../_shared/utils/dom.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import _sfc_main$1 from "../_shared/icons/IconImageClose.vue.js";
@@ -7,7 +7,7 @@ import { findFirstScrollableParent, getElement } from "../_shared/utils/dom.js";
7
7
  import { isUndefined } from "../_shared/utils/is.js";
8
8
  import "../_shared/utils/locale.js";
9
9
  import "../_shared/utils/time.js";
10
- /* empty css */
10
+ /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  import _sfc_main$1 from "../_shared/icons/IconToTop.vue.js";
@@ -6,7 +6,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
6
6
  import "../_shared/utils/dom.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import Dropdown from "../Dropdown/index.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$2 from "../_shared/icons/IconMore.vue.js";
@@ -6,7 +6,7 @@ import "../_shared/utils/dom.js";
6
6
  import { isUndefined } from "../_shared/utils/is.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import _sfc_main$1 from "../_shared/icons/IconSeparator.vue2.js";
@@ -6,8 +6,8 @@ import "../_shared/utils/dom.js";
6
6
  import { useControlValue } from "../_shared/utils/hooks.js";
7
7
  import { useI18n } from "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
10
- /* empty css */
9
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
10
+ /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  import _sfc_main$2 from "../_shared/icons/IconArrowRight.vue.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$1 from "../_shared/icons/IconArrowRight.vue.js";
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, resolveComponent, createBlock, createElementBlock, openBlock, unref, createSlots, withCtx, resolveDynamicComponent, Fragment, createElementVNode, createCommentVNode, withModifiers } from "vue";
2
2
  import useCascaderContext from "./hooks/useContext.js";
3
3
  import _sfc_main$1 from "../_shared/icons/IconArrowDown.vue.js";
4
- import _sfc_main$2 from "../_shared/components/IconButton/index.vue2.js";
5
- /* empty css */
4
+ import _sfc_main$2 from "../_shared/components/IconButton/index.vue.js";
5
+ /* empty css */
6
6
  import "../node_modules/b-tween/dist/b-tween.es.js";
7
7
  import "../node_modules/dayjs/dayjs.min.js";
8
8
  import "../node_modules/tinycolor2/esm/tinycolor.js";
@@ -6,7 +6,7 @@ import { sleep } from "../_shared/utils/dom.js";
6
6
  import { isFunction } from "../_shared/utils/is.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import _sfc_main$1 from "../_shared/icons/IconArrowRight.vue.js";
@@ -8,8 +8,8 @@ import { useControlValue } from "../_shared/utils/hooks.js";
8
8
  import "../_shared/utils/locale.js";
9
9
  import "../_shared/utils/time.js";
10
10
  import useCheckboxContext from "./hooks/useContext.js";
11
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
12
- /* empty css */
11
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
12
+ /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
15
15
  import _sfc_main$2 from "../_shared/icons/IconCheckboxChecked.vue.js";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, toRefs, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createVNode, createBlock, createCommentVNode, withCtx, renderSlot, resolveDynamicComponent, createTextVNode, toDisplayString, withDirectives, vShow } from "vue";
2
2
  import useCollapseContext from "./hooks/useContext.js";
3
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
4
- /* empty css */
3
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
4
+ /* empty css */
5
5
  import _sfc_main$3 from "../_shared/components/ExpandTransition/index.vue2.js";
6
6
  /* empty css */
7
7
  import "../node_modules/b-tween/dist/b-tween.es.js";
@@ -97,6 +97,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
97
97
  DefinePanel,
98
98
  ReusePanel,
99
99
  showConfirmBtn,
100
+ handleVisibleChange,
100
101
  t,
101
102
  getDateFromFormat,
102
103
  isCellInView,
@@ -137,6 +138,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
137
138
  () => computedVisible.value,
138
139
  (visible) => {
139
140
  var _a;
141
+ handleVisibleChange(visible);
140
142
  if (!computedValue.value || !visible) return;
141
143
  (_a = timePickerRef.value) == null ? void 0 : _a.jump(dayjs(getDateFromFormat(computedValue.value)));
142
144
  },
@@ -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
  }
@@ -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
  }
@@ -64,7 +64,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
64
  getRangeOfYear,
65
65
  handleConfirm,
66
66
  handleSelect,
67
- handleShortcut
67
+ handleShortcut,
68
+ handleVisibleChange
68
69
  } = usePicker({
69
70
  props,
70
71
  emits
@@ -178,7 +179,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
178
179
  key: 0,
179
180
  class: normalizeClass(_ctx.$attrs.class),
180
181
  style: normalizeStyle(_ctx.$attrs.style),
181
- type: "year"
182
+ type: "year",
183
+ onPopupVisibleChange: unref(handleVisibleChange)
182
184
  }, createSlots({
183
185
  content: withCtx(() => [
184
186
  createVNode(unref(ReusePanel))
@@ -206,7 +208,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
206
208
  ]),
207
209
  key: "2"
208
210
  } : void 0
209
- ]), 1032, ["class", "style"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
211
+ ]), 1032, ["class", "style", "onPopupVisibleChange"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
210
212
  ], 64);
211
213
  };
212
214
  }
@@ -150,7 +150,11 @@ declare function __VLS_template(): {
150
150
  rootEl: any;
151
151
  };
152
152
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
153
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
153
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
154
+ "popup-visible-change": (val: boolean) => any;
155
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
156
+ "onPopup-visible-change"?: ((val: boolean) => any) | undefined;
157
+ }>, {
154
158
  type: "year" | "month" | "week" | "time" | "date";
155
159
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
156
160
  inputRef: ({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, toRefs, computed, ref, watch, nextTick, createBlock, openBlock, unref, mergeProps, isRef, withCtx, renderSlot, createVNode, normalizeClass, normalizeStyle, createSlots, createElementVNode, createCommentVNode, withModifiers } from "vue";
2
- import _sfc_main$2 from "../../_shared/components/IconButton/index.vue2.js";
3
- /* empty css */
2
+ import _sfc_main$2 from "../../_shared/components/IconButton/index.vue.js";
3
+ /* empty css */
4
4
  import "../../node_modules/b-tween/dist/b-tween.es.js";
5
5
  import "../../node_modules/dayjs/dayjs.min.js";
6
6
  import "../../node_modules/tinycolor2/esm/tinycolor.js";
@@ -22,6 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
22
  props: {
23
23
  type: { default: "date" }
24
24
  },
25
+ emits: ["popup-visible-change"],
25
26
  setup(__props) {
26
27
  const $props = __props;
27
28
  const { props, computedVisible, formatValue, showClearBtn, onClear } = usePickerInputContext().inject();
@@ -67,7 +68,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
67
68
  trigger: "click",
68
69
  "animation-name": "slide-dynamic-origin",
69
70
  "need-transform-origin": ""
70
- }, unref(triggerProps)), {
71
+ }, unref(triggerProps), {
72
+ onPopupVisibleChange: _cache[1] || (_cache[1] = (v) => _ctx.$emit("popup-visible-change", v))
73
+ }), {
71
74
  content: withCtx(() => [
72
75
  renderSlot(_ctx.$slots, "content")
73
76
  ]),
@@ -6,7 +6,7 @@ import "../../_shared/utils/dom.js";
6
6
  import { isUndefined } from "../../_shared/utils/is.js";
7
7
  import "../../_shared/utils/locale.js";
8
8
  import "../../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import _sfc_main$2 from "../../_shared/icons/IconArrowRight.vue.js";
@@ -27,6 +27,7 @@ export default function usePicker(params: {
27
27
  isCellInView: (v: Date, type: string) => boolean;
28
28
  isToday: (v: Date, type: string) => boolean;
29
29
  isSelected: (v: Date, type: string) => boolean;
30
+ handleVisibleChange: (visible: boolean) => void;
30
31
  getRangeOfYear: (curYear: number) => {
31
32
  range: import('../../_shared/utils').YearData[][];
32
33
  startYear: number;
@@ -1,10 +1,10 @@
1
- import { toRefs, computed, ref, watch } from "vue";
1
+ import { toRefs, computed, ref } from "vue";
2
2
  import { createReusableTemplate } from "../../node_modules/@vueuse/core/index.js";
3
3
  import "../../node_modules/b-tween/dist/b-tween.es.js";
4
4
  import dayjs from "../../node_modules/dayjs/dayjs.min.js";
5
5
  import "../../node_modules/tinycolor2/esm/tinycolor.js";
6
6
  import { sleep } from "../../_shared/utils/dom.js";
7
- import { isUndefined, isString } from "../../_shared/utils/is.js";
7
+ import { isString, isUndefined } from "../../_shared/utils/is.js";
8
8
  import { useControlValue } from "../../_shared/utils/hooks.js";
9
9
  import { useI18n } from "../../_shared/utils/locale.js";
10
10
  import { getDaysOfMonth, getWeeksOfMonth, getRangeOfYear } from "../../_shared/utils/time.js";
@@ -86,23 +86,17 @@ function usePicker(params) {
86
86
  const curMonth = ref(0);
87
87
  const showYearPicker = ref(false);
88
88
  const showMonthPicker = ref(false);
89
- watch(
90
- () => computedVisible.value,
91
- (val) => {
92
- if (val) {
93
- isConfirm = false;
94
- oldDate = computedValue.value ? getDateFromFormat(computedValue.value) : computedValue.value;
95
- } else {
96
- showYearPicker.value = false;
97
- showMonthPicker.value = false;
98
- if (!showConfirmBtn.value || isConfirm || isUndefined(oldDate)) return;
99
- computedValue.value = oldDate;
100
- }
101
- },
102
- {
103
- immediate: true
89
+ const handleVisibleChange = (visible) => {
90
+ if (visible) {
91
+ isConfirm = false;
92
+ oldDate = computedValue.value ? getDateFromFormat(computedValue.value) : computedValue.value;
93
+ } else {
94
+ showYearPicker.value = false;
95
+ showMonthPicker.value = false;
96
+ if (!showConfirmBtn.value || isConfirm || isUndefined(oldDate)) return;
97
+ computedValue.value = oldDate;
104
98
  }
105
- );
99
+ };
106
100
  const handleShortcut = (shortcut, hover) => {
107
101
  if (!hover) {
108
102
  emits("select-shortcut", shortcut);
@@ -162,9 +156,8 @@ function usePicker(params) {
162
156
  return date;
163
157
  };
164
158
  const isCellInView = (v, type) => {
165
- const curDate = dayjs();
166
159
  if (type == "year") {
167
- const startYear = Math.floor(curDate.year() / 10) * 10;
160
+ const startYear = Math.floor(curYear.value / 10) * 10;
168
161
  return v.getFullYear() >= startYear && v.getFullYear() <= startYear + 10;
169
162
  }
170
163
  if (type == "month") {
@@ -226,6 +219,7 @@ function usePicker(params) {
226
219
  isCellInView,
227
220
  isToday,
228
221
  isSelected,
222
+ handleVisibleChange,
229
223
  getRangeOfYear,
230
224
  getWeeksOfMonth,
231
225
  getDaysOfMonth,
@@ -8,8 +8,8 @@ import { useI18n } from "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
9
  import useModalClose from "../Modal/hooks/useModalClose.js";
10
10
  import Button from "../Button/index.js";
11
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
12
- /* empty css */
11
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
12
+ /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
15
15
  const _hoisted_1 = { class: "yc-drawer-header" };
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$3 from "../_shared/icons/IconMore.vue.js";
@@ -8,7 +8,7 @@ import { isBoolean, isUndefined } from "../_shared/utils/is.js";
8
8
  import { useControlValue } from "../_shared/utils/hooks.js";
9
9
  import "../_shared/utils/locale.js";
10
10
  import "../_shared/utils/time.js";
11
- /* empty css */
11
+ /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  import _sfc_main$2 from "../_shared/icons/IconArrowRight.vue.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import { useI18n } from "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$1 from "../_shared/icons/IconEmpty.vue.js";
@@ -6,7 +6,7 @@ import { valueToPx } from "../_shared/utils/dom.js";
6
6
  import { useControlValue } from "../_shared/utils/hooks.js";
7
7
  import { useI18n } from "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import _sfc_main$2 from "../_shared/icons/IconImageClose.vue.js";
@@ -8,7 +8,7 @@ import { getGlobalConfig } from "../_shared/utils/global-config.js";
8
8
  import { useControlValue } from "../_shared/utils/hooks.js";
9
9
  import "../_shared/utils/locale.js";
10
10
  import "../_shared/utils/time.js";
11
- /* empty css */
11
+ /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  import _sfc_main$2 from "../_shared/icons/IconClose.vue.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$1 from "../_shared/icons/IconArrowRight.vue.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import { useI18n } from "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$6 from "../_shared/icons/IconFullScreen.vue2.js";
@@ -7,8 +7,8 @@ import { getGlobalConfig } from "../_shared/utils/global-config.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
9
  import useLimitedInput from "./hooks/useLimitedInput.js";
10
- import _sfc_main$2 from "../_shared/components/IconButton/index.vue2.js";
11
- /* empty css */
10
+ import _sfc_main$2 from "../_shared/components/IconButton/index.vue.js";
11
+ /* empty css */
12
12
  import _sfc_main$1 from "../_shared/components/PreventFocus/index.vue.js";
13
13
  /* empty css */
14
14
  /* empty css */
@@ -6,8 +6,8 @@ import { sleep } from "../_shared/utils/dom.js";
6
6
  import { useControlValue } from "../_shared/utils/hooks.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- import _sfc_main$2 from "../_shared/components/IconButton/index.vue2.js";
10
- /* empty css */
9
+ import _sfc_main$2 from "../_shared/components/IconButton/index.vue.js";
10
+ /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  import _sfc_main$4 from "../_shared/icons/IconEyeClose.vue.js";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, createBlock, openBlock, mergeProps, createSlots, withCtx, renderSlot, createVNode, unref, createTextVNode, toDisplayString } from "vue";
2
- import _sfc_main$3 from "../_shared/components/IconButton/index.vue2.js";
3
- /* empty css */
2
+ import _sfc_main$3 from "../_shared/components/IconButton/index.vue.js";
3
+ /* empty css */
4
4
  import "../node_modules/b-tween/dist/b-tween.es.js";
5
5
  import "../node_modules/dayjs/dayjs.min.js";
6
6
  import "../node_modules/tinycolor2/esm/tinycolor.js";
@@ -6,7 +6,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
6
6
  import "../_shared/utils/dom.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import _sfc_main$2 from "../_shared/icons/IconMinus.vue2.js";
@@ -11,8 +11,8 @@ import { isObject, isBoolean } from "../_shared/utils/is.js";
11
11
  import "../_shared/utils/locale.js";
12
12
  import "../_shared/utils/time.js";
13
13
  import Tag from "../Tag/index.js";
14
- import _sfc_main$2 from "../_shared/components/IconButton/index.vue2.js";
15
- /* empty css */
14
+ import _sfc_main$2 from "../_shared/components/IconButton/index.vue.js";
15
+ /* empty css */
16
16
  import _sfc_main$1 from "../_shared/components/PreventFocus/index.vue.js";
17
17
  /* empty css */
18
18
  /* empty css */
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import { mediaQueryHandler, valueToPx } from "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$1 from "../_shared/icons/IconArrowRight.vue.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$1 from "../_shared/icons/IconLink.vue.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import { mediaQueryHandler } from "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$2 from "../_shared/icons/IconMenuFold.vue.js";
@@ -6,7 +6,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
6
6
  import "../_shared/utils/dom.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import _sfc_main$1 from "../_shared/icons/IconMore.vue.js";
@@ -7,7 +7,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
7
7
  import "../_shared/utils/dom.js";
8
8
  import "../_shared/utils/locale.js";
9
9
  import "../_shared/utils/time.js";
10
- /* empty css */
10
+ /* empty css */
11
11
  import _sfc_main$3 from "../_shared/components/ExpandTransition/index.vue2.js";
12
12
  /* empty css */
13
13
  /* empty css */
@@ -7,8 +7,8 @@ import "../_shared/utils/dom.js";
7
7
  import { isUndefined } from "../_shared/utils/is.js";
8
8
  import "../_shared/utils/locale.js";
9
9
  import "../_shared/utils/time.js";
10
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
11
- /* empty css */
10
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
11
+ /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  import { useTimeoutFn } from "../node_modules/@vueuse/shared/index.js";
@@ -9,8 +9,8 @@ import "../_shared/utils/time.js";
9
9
  import useModalClose from "./hooks/useModalClose.js";
10
10
  import useModalDraggable from "./hooks/useModalDraggable.js";
11
11
  import Button from "../Button/index.js";
12
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
13
- /* empty css */
12
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
13
+ /* empty css */
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  const _hoisted_1 = {
@@ -8,8 +8,8 @@ import { isUndefined, isFunction } from "../_shared/utils/is.js";
8
8
  import "../_shared/utils/locale.js";
9
9
  import "../_shared/utils/time.js";
10
10
  import { getSlotFunction } from "../_shared/utils/vue-utils.js";
11
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
12
- /* empty css */
11
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
12
+ /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
15
15
  import { useTimeoutFn } from "../node_modules/@vueuse/shared/index.js";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, useSlots, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, createVNode, createBlock, unref, withCtx, createTextVNode, toDisplayString } from "vue";
2
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
3
- /* empty css */
2
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
3
+ /* empty css */
4
4
  import "../node_modules/b-tween/dist/b-tween.es.js";
5
5
  import "../node_modules/dayjs/dayjs.min.js";
6
6
  import "../node_modules/tinycolor2/esm/tinycolor.js";