yc-design-vue 2.3.0 → 2.3.2

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 (237) 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 +3 -1
  15. package/es/DatePicker/MonthPicker.vue.js +6 -4
  16. package/es/DatePicker/WeekPicker.vue.js +6 -4
  17. package/es/DatePicker/YearPicker.vue.js +6 -4
  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 +3 -2
  22. package/es/DatePicker/hooks/userPicker.js +24 -25
  23. package/es/DatePicker/type.d.ts +3 -1
  24. package/es/Drawer/Drawer.vue.js +2 -2
  25. package/es/Dropdown/DropdownButton.vue.js +1 -1
  26. package/es/Dropdown/Dsubmenu.vue.js +1 -1
  27. package/es/Empty/index.vue.js +1 -1
  28. package/es/Image/Image.vue.js +1 -1
  29. package/es/Image/ImagePreview.vue.js +1 -1
  30. package/es/Image/ImagePreviewArrow.vue.js +1 -1
  31. package/es/Image/ImagePreviewToolbar.vue.js +1 -1
  32. package/es/Input/Input.vue.js +2 -2
  33. package/es/Input/InputPassword.vue.js +2 -2
  34. package/es/Input/InputSearch.vue.js +2 -2
  35. package/es/InputNumber/InputOperaBtn.vue.js +1 -1
  36. package/es/InputTag/index.vue.js +2 -2
  37. package/es/Layout/LayoutSider.vue.js +1 -1
  38. package/es/Link/index.vue.js +1 -1
  39. package/es/Menu/Menu.vue.js +1 -1
  40. package/es/Menu/MenuEllipsis.vue.js +1 -1
  41. package/es/Menu/SubMenu.vue.js +1 -1
  42. package/es/Message/Message.vue.js +2 -2
  43. package/es/Modal/Modal.vue.js +2 -2
  44. package/es/Notification/Notification.vue.js +2 -2
  45. package/es/PageHeader/index.vue.js +2 -2
  46. package/es/Pagination/PaginationItem.vue.js +1 -1
  47. package/es/Progress/ProgressCircle.vue.js +1 -1
  48. package/es/Radio/Radio.vue.js +2 -2
  49. package/es/Rate/index.vue.js +1 -1
  50. package/es/ResizeBox/index.vue.js +1 -1
  51. package/es/Select/SelectIcon.vue.js +2 -2
  52. package/es/Spin/index.vue.js +1 -1
  53. package/es/Split/index.vue.js +1 -1
  54. package/es/Steps/Step.vue.js +1 -1
  55. package/es/Tabs/TabButton.vue.js +2 -2
  56. package/es/Tabs/Tabs.vue.js +1 -1
  57. package/es/Tag/index.vue.js +2 -2
  58. package/es/Textarea/index.vue.js +2 -2
  59. package/es/TimePicker/TimePicker.vue.d.ts +6 -6
  60. package/es/TimePicker/TimePicker.vue.js +2 -2
  61. package/es/TimePicker/TimePickerPanel.vue.d.ts +2 -2
  62. package/es/Transfer/Transfer.vue.js +1 -1
  63. package/es/Transfer/TransferPanel.vue.js +2 -2
  64. package/es/Trigger/index.vue.js +1 -1
  65. package/es/Typography/TypographyBase.vue.js +1 -1
  66. package/es/Upload/UploadButton.vue.js +1 -1
  67. package/es/Upload/UploadDrag.vue.js +1 -1
  68. package/es/Upload/UploadFileList.vue.js +2 -2
  69. package/es/Upload/UploadPictureCard.vue.js +1 -1
  70. package/es/_shared/components/IconButton/{index.vue2.js → index.vue.js} +1 -1
  71. package/es/_shared/components/IconButton/index.vue3.js +2 -2
  72. package/es/_shared/constants/index.js +1 -1
  73. package/es/_shared/icons/IconArrowDown.vue.js +1 -1
  74. package/es/_shared/icons/IconArrowRight.vue.js +1 -1
  75. package/es/_shared/icons/IconCalendar.vue2.js +1 -1
  76. package/es/_shared/icons/IconCheck.vue.js +1 -1
  77. package/es/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  78. package/es/_shared/icons/IconClose.vue.js +1 -1
  79. package/es/_shared/icons/IconCopy.vue.js +1 -1
  80. package/es/_shared/icons/IconDelete.vue2.js +1 -1
  81. package/es/_shared/icons/IconDoubleLeft.vue2.js +1 -1
  82. package/es/_shared/icons/IconDoubleRight.vue2.js +1 -1
  83. package/es/_shared/icons/IconDragDot.vue.js +1 -1
  84. package/es/_shared/icons/IconEdit.vue.js +1 -1
  85. package/es/_shared/icons/IconEmpty.vue.js +1 -1
  86. package/es/_shared/icons/IconError.vue.js +1 -1
  87. package/es/_shared/icons/IconExclamation.vue2.js +1 -1
  88. package/es/_shared/icons/IconEyeClose.vue.js +1 -1
  89. package/es/_shared/icons/IconEyeOpen.vue.js +1 -1
  90. package/es/_shared/icons/IconFaceSmile.vue.js +1 -1
  91. package/es/_shared/icons/IconFile.vue2.js +1 -1
  92. package/es/_shared/icons/IconFullScreen.vue2.js +1 -1
  93. package/es/_shared/icons/IconImageClose.vue.js +1 -1
  94. package/es/_shared/icons/IconInfo.vue.js +1 -1
  95. package/es/_shared/icons/IconInfoLine.vue.js +1 -1
  96. package/es/_shared/icons/IconLink.vue.js +1 -1
  97. package/es/_shared/icons/IconLoading.vue.js +1 -1
  98. package/es/_shared/icons/IconMenuFold.vue.js +1 -1
  99. package/es/_shared/icons/IconMenuUnfold.vue.js +1 -1
  100. package/es/_shared/icons/IconMinus.vue2.js +1 -1
  101. package/es/_shared/icons/IconMore.vue.js +1 -1
  102. package/es/_shared/icons/IconOriginSize.vue2.js +1 -1
  103. package/es/_shared/icons/IconPlus.vue.js +1 -1
  104. package/es/_shared/icons/IconRight.vue.js +1 -1
  105. package/es/_shared/icons/IconRotateLeft.vue2.js +1 -1
  106. package/es/_shared/icons/IconRotateRight.vue2.js +1 -1
  107. package/es/_shared/icons/IconSearch.vue.js +1 -1
  108. package/es/_shared/icons/IconSeparator.vue2.js +1 -1
  109. package/es/_shared/icons/IconStar.vue.js +1 -1
  110. package/es/_shared/icons/IconSuccess.vue.js +1 -1
  111. package/es/_shared/icons/IconTime.vue.js +1 -1
  112. package/es/_shared/icons/IconToTop.vue.js +1 -1
  113. package/es/_shared/icons/IconUpload.vue2.js +1 -1
  114. package/es/_shared/icons/IconWarning.vue.js +1 -1
  115. package/es/_shared/icons/IconZoomIn.vue2.js +1 -1
  116. package/es/_shared/icons/IconZoomOut.vue2.js +1 -1
  117. package/es/_shared/utils/dependencies.d.ts +2 -2
  118. package/es/node_modules/dayjs/dayjs.min.js +1 -0
  119. package/lib/Alert/index.vue.js +1 -1
  120. package/lib/Avatar/Avatar.vue.js +1 -1
  121. package/lib/BackTop/index.vue.js +1 -1
  122. package/lib/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  123. package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  124. package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  125. package/lib/Calendar/Calendar.vue.js +1 -1
  126. package/lib/Carousel/CarouselArrow.vue.js +1 -1
  127. package/lib/Cascader/CascaderIcon.vue.js +1 -1
  128. package/lib/Cascader/CascaderOption.vue.js +1 -1
  129. package/lib/Checkbox/Checkbox.vue.js +1 -1
  130. package/lib/Collapse/CollapseItem.vue.js +1 -1
  131. package/lib/DatePicker/DatePicker.vue.js +1 -1
  132. package/lib/DatePicker/MonthPicker.vue.js +1 -1
  133. package/lib/DatePicker/WeekPicker.vue.js +1 -1
  134. package/lib/DatePicker/YearPicker.vue.js +1 -1
  135. package/lib/DatePicker/component/Picker.vue.d.ts +5 -1
  136. package/lib/DatePicker/component/Picker.vue.js +1 -1
  137. package/lib/DatePicker/component/PickerHeader.vue.js +1 -1
  138. package/lib/DatePicker/hooks/userPicker.d.ts +3 -2
  139. package/lib/DatePicker/hooks/userPicker.js +1 -1
  140. package/lib/DatePicker/type.d.ts +3 -1
  141. package/lib/Drawer/Drawer.vue.js +1 -1
  142. package/lib/Dropdown/DropdownButton.vue.js +1 -1
  143. package/lib/Dropdown/Dsubmenu.vue.js +1 -1
  144. package/lib/Empty/index.vue.js +1 -1
  145. package/lib/Image/Image.vue.js +1 -1
  146. package/lib/Image/ImagePreview.vue.js +1 -1
  147. package/lib/Image/ImagePreviewArrow.vue.js +1 -1
  148. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  149. package/lib/Input/Input.vue.js +1 -1
  150. package/lib/Input/InputPassword.vue.js +1 -1
  151. package/lib/Input/InputSearch.vue.js +1 -1
  152. package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
  153. package/lib/InputTag/index.vue.js +1 -1
  154. package/lib/Layout/LayoutSider.vue.js +1 -1
  155. package/lib/Link/index.vue.js +1 -1
  156. package/lib/Menu/Menu.vue.js +1 -1
  157. package/lib/Menu/MenuEllipsis.vue.js +1 -1
  158. package/lib/Menu/SubMenu.vue.js +1 -1
  159. package/lib/Message/Message.vue.js +1 -1
  160. package/lib/Modal/Modal.vue.js +1 -1
  161. package/lib/Notification/Notification.vue.js +1 -1
  162. package/lib/PageHeader/index.vue.js +1 -1
  163. package/lib/Pagination/PaginationItem.vue.js +1 -1
  164. package/lib/Progress/ProgressCircle.vue.js +1 -1
  165. package/lib/Radio/Radio.vue.js +1 -1
  166. package/lib/Rate/index.vue.js +1 -1
  167. package/lib/ResizeBox/index.vue.js +1 -1
  168. package/lib/Select/SelectIcon.vue.js +1 -1
  169. package/lib/Spin/index.vue.js +1 -1
  170. package/lib/Split/index.vue.js +1 -1
  171. package/lib/Steps/Step.vue.js +1 -1
  172. package/lib/Tabs/TabButton.vue.js +1 -1
  173. package/lib/Tabs/Tabs.vue.js +1 -1
  174. package/lib/Tag/index.vue.js +1 -1
  175. package/lib/Textarea/index.vue.js +1 -1
  176. package/lib/TimePicker/TimePicker.vue.d.ts +6 -6
  177. package/lib/TimePicker/TimePicker.vue.js +1 -1
  178. package/lib/TimePicker/TimePickerPanel.vue.d.ts +2 -2
  179. package/lib/Transfer/Transfer.vue.js +1 -1
  180. package/lib/Transfer/TransferPanel.vue.js +1 -1
  181. package/lib/Trigger/index.vue.js +1 -1
  182. package/lib/Typography/TypographyBase.vue.js +1 -1
  183. package/lib/Upload/UploadButton.vue.js +1 -1
  184. package/lib/Upload/UploadDrag.vue.js +1 -1
  185. package/lib/Upload/UploadFileList.vue.js +1 -1
  186. package/lib/Upload/UploadPictureCard.vue.js +1 -1
  187. package/lib/_shared/components/IconButton/index.vue.js +1 -0
  188. package/lib/_shared/components/IconButton/index.vue3.js +1 -1
  189. package/lib/_shared/constants/index.js +1 -1
  190. package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
  191. package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
  192. package/lib/_shared/icons/IconCalendar.vue2.js +1 -1
  193. package/lib/_shared/icons/IconCheck.vue.js +1 -1
  194. package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  195. package/lib/_shared/icons/IconClose.vue.js +1 -1
  196. package/lib/_shared/icons/IconCopy.vue.js +1 -1
  197. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  198. package/lib/_shared/icons/IconDoubleLeft.vue2.js +1 -1
  199. package/lib/_shared/icons/IconDoubleRight.vue2.js +1 -1
  200. package/lib/_shared/icons/IconDragDot.vue.js +1 -1
  201. package/lib/_shared/icons/IconEdit.vue.js +1 -1
  202. package/lib/_shared/icons/IconEmpty.vue.js +1 -1
  203. package/lib/_shared/icons/IconError.vue.js +1 -1
  204. package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
  205. package/lib/_shared/icons/IconEyeClose.vue.js +1 -1
  206. package/lib/_shared/icons/IconEyeOpen.vue.js +1 -1
  207. package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
  208. package/lib/_shared/icons/IconFile.vue2.js +1 -1
  209. package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
  210. package/lib/_shared/icons/IconImageClose.vue.js +1 -1
  211. package/lib/_shared/icons/IconInfo.vue.js +1 -1
  212. package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
  213. package/lib/_shared/icons/IconLink.vue.js +1 -1
  214. package/lib/_shared/icons/IconLoading.vue.js +1 -1
  215. package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
  216. package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
  217. package/lib/_shared/icons/IconMinus.vue2.js +1 -1
  218. package/lib/_shared/icons/IconMore.vue.js +1 -1
  219. package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
  220. package/lib/_shared/icons/IconPlus.vue.js +1 -1
  221. package/lib/_shared/icons/IconRight.vue.js +1 -1
  222. package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
  223. package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
  224. package/lib/_shared/icons/IconSearch.vue.js +1 -1
  225. package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
  226. package/lib/_shared/icons/IconStar.vue.js +1 -1
  227. package/lib/_shared/icons/IconSuccess.vue.js +1 -1
  228. package/lib/_shared/icons/IconTime.vue.js +1 -1
  229. package/lib/_shared/icons/IconToTop.vue.js +1 -1
  230. package/lib/_shared/icons/IconUpload.vue2.js +1 -1
  231. package/lib/_shared/icons/IconWarning.vue.js +1 -1
  232. package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
  233. package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
  234. package/lib/_shared/utils/dependencies.d.ts +2 -2
  235. package/lib/node_modules/dayjs/dayjs.min.js +1 -1
  236. package/package.json +1 -1
  237. 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";
@@ -71,7 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
71
71
  format: { default: (props) => {
72
72
  return props.showTime ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
73
73
  } },
74
- previewShortcut: { type: Boolean, default: true },
74
+ previewShortcut: { type: Boolean, default: false },
75
75
  showConfirmBtn: { type: Boolean, default: false },
76
76
  disabledInput: { type: Boolean, default: false },
77
77
  abbreviation: { type: Boolean, default: true }
@@ -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
  },
@@ -47,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
47
  popupContainer: { default: void 0 },
48
48
  valueFormat: { default: "YYYY-MM" },
49
49
  format: { default: "YYYY-MM" },
50
- previewShortcut: { type: Boolean, default: true },
50
+ previewShortcut: { type: Boolean, default: false },
51
51
  showConfirmBtn: { type: Boolean, default: false },
52
52
  disabledInput: { type: Boolean, default: false },
53
53
  abbreviation: { type: Boolean, default: true }
@@ -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
  }
@@ -59,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  popupContainer: { default: void 0 },
60
60
  valueFormat: { default: "YYYY-MM-DD" },
61
61
  format: { default: "gggg-wo" },
62
- previewShortcut: { type: Boolean, default: true },
62
+ previewShortcut: { type: Boolean, default: false },
63
63
  showConfirmBtn: { type: Boolean, default: false },
64
64
  disabledInput: { type: Boolean, default: false },
65
65
  abbreviation: { type: Boolean, default: true }
@@ -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
  }
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
42
42
  popupContainer: { default: void 0 },
43
43
  valueFormat: { default: "YYYY" },
44
44
  format: { default: "YYYY" },
45
- previewShortcut: { type: Boolean, default: true },
45
+ previewShortcut: { type: Boolean, default: false },
46
46
  showConfirmBtn: { type: Boolean, default: false },
47
47
  disabledInput: { type: Boolean, default: false },
48
48
  abbreviation: { type: Boolean }
@@ -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";
@@ -1,4 +1,4 @@
1
- import { BasePickerEmits, DatePickerValue, DayStartOfWeek, ShortcutType } from '../type';
1
+ import { BasePickerEmits, DatePickerValue, ShortcutType } from '../type';
2
2
  import { RecordType } from '../../_shared/type';
3
3
  export default function usePicker(params: {
4
4
  props: RecordType;
@@ -27,11 +27,12 @@ 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;
33
34
  };
34
- getWeeksOfMonth: (year: number, month: number, startOfWeek?: DayStartOfWeek) => import('../../_shared/utils').WeekData[];
35
+ getWeeksOfMonth: (year: number, month: number, startOfWeek?: import('..').DayStartOfWeek) => import('../../_shared/utils').WeekData[];
35
36
  getDaysOfMonth: (year: number, month: number, dayStartOfWeek?: number) => import('../../_shared/utils').DayData[][];
36
37
  handleNowClick: () => void;
37
38
  handleSelect: (date: Date) => void;
@@ -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
- import dayjs from "../../node_modules/dayjs/dayjs.min.js";
4
+ import dayjs, { d as dayjs_minExports } 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, isFunction, isArray } 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,33 +86,32 @@ 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
- if (!hover) {
108
- emits("select-shortcut", shortcut);
109
- }
110
101
  if (shortcut.value) {
111
- computedValue.value = shortcut.value;
102
+ const value = isFunction(shortcut.value) ? shortcut.value() : shortcut.value;
103
+ if (isArray(value)) {
104
+ computedValue.value = value.map((v) => {
105
+ return dayjs_minExports.isDayjs(v) ? v.toDate() : v;
106
+ });
107
+ } else {
108
+ computedValue.value = dayjs_minExports.isDayjs(value) ? value.toDate() : value;
109
+ }
112
110
  }
113
111
  if (hover) return;
114
112
  isConfirm = true;
115
113
  computedVisible.value = false;
114
+ emits("select-shortcut", shortcut);
116
115
  };
117
116
  const handleSelect = (date) => {
118
117
  if (disabledDate == null ? void 0 : disabledDate(date)) {
@@ -162,9 +161,8 @@ function usePicker(params) {
162
161
  return date;
163
162
  };
164
163
  const isCellInView = (v, type) => {
165
- const curDate = dayjs();
166
164
  if (type == "year") {
167
- const startYear = Math.floor(curDate.year() / 10) * 10;
165
+ const startYear = Math.floor(curYear.value / 10) * 10;
168
166
  return v.getFullYear() >= startYear && v.getFullYear() <= startYear + 10;
169
167
  }
170
168
  if (type == "month") {
@@ -226,6 +224,7 @@ function usePicker(params) {
226
224
  isCellInView,
227
225
  isToday,
228
226
  isSelected,
227
+ handleVisibleChange,
229
228
  getRangeOfYear,
230
229
  getWeeksOfMonth,
231
230
  getDaysOfMonth,
@@ -2,6 +2,7 @@ import { VNode } from 'vue';
2
2
  import { PopupContainer, Position, Size } from '../_shared/type';
3
3
  import { TriggerProps } from '../Trigger';
4
4
  import { DisabledHours, DisabledMinutes, DisabledSeconds, TimePickerProps } from '../TimePicker';
5
+ import { Dayjs } from '../_shared/utils';
5
6
  export interface BasePickerProps {
6
7
  locale?: Record<string, any>;
7
8
  hideTrigger?: boolean;
@@ -98,8 +99,9 @@ export type DisabledTime = (current: Date | string) => {
98
99
  disabledMinutes?: DisabledMinutes;
99
100
  disabledSeconds?: DisabledSeconds;
100
101
  };
102
+ export type ShortcutValue = Date | Dayjs | (Date | Dayjs)[];
101
103
  export type ShortcutType = {
102
104
  label: string | number | (() => VNode);
103
- value: Date | Date[] | (() => Date | Date[]);
105
+ value: ShortcutValue | (() => ShortcutValue);
104
106
  format: string;
105
107
  };
@@ -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";