yc-design-vue 2.1.5 → 2.1.7

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 (224) hide show
  1. package/dist/index.umd.js +1 -1
  2. package/dist/style.css +1 -1
  3. package/es/Alert/index.vue.js +2 -2
  4. package/es/Avatar/Avatar.vue.js +1 -1
  5. package/es/BackTop/index.vue.js +1 -1
  6. package/es/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  7. package/es/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  8. package/es/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  9. package/es/Button/index.css +1 -1
  10. package/es/Calendar/Calendar.vue.js +2 -2
  11. package/es/Carousel/CarouselArrow.vue.js +1 -1
  12. package/es/Cascader/CascaderIcon.vue.js +2 -2
  13. package/es/Cascader/CascaderOption.vue.js +1 -1
  14. package/es/Checkbox/Checkbox.vue.js +2 -2
  15. package/es/Collapse/CollapseItem.vue.js +2 -2
  16. package/es/Drawer/Drawer.vue.js +2 -2
  17. package/es/Dropdown/DropdownButton.vue.js +1 -1
  18. package/es/Dropdown/Dsubmenu.vue.js +1 -1
  19. package/es/Empty/index.vue.js +1 -1
  20. package/es/Image/Image.vue.js +1 -1
  21. package/es/Image/ImagePreview.vue.js +1 -1
  22. package/es/Image/ImagePreviewArrow.vue.js +1 -1
  23. package/es/Image/ImagePreviewToolbar.vue.js +1 -1
  24. package/es/Input/Input.vue.js +2 -2
  25. package/es/Input/InputSuffix.vue.js +2 -2
  26. package/es/InputNumber/InputOperaBtn.vue.js +1 -1
  27. package/es/InputTag/index.vue.js +2 -2
  28. package/es/Layout/LayoutSider.vue.js +1 -1
  29. package/es/Link/index.css +1 -1
  30. package/es/Link/index.vue.js +1 -1
  31. package/es/Menu/Menu.vue.js +1 -1
  32. package/es/Menu/MenuEllipsis.vue.js +1 -1
  33. package/es/Menu/SubMenu.vue.js +1 -1
  34. package/es/Menu/hooks/useCalcMaxMenuItems.d.ts +13 -0
  35. package/es/Menu/hooks/useCalcMaxMenuItems.js +84 -0
  36. package/es/Menu/hooks/useContext.js +8 -23
  37. package/es/Message/Message.vue.js +2 -2
  38. package/es/Modal/Modal.vue.js +2 -2
  39. package/es/Notification/Notification.vue.js +2 -2
  40. package/es/PageHeader/index.vue.js +2 -2
  41. package/es/Pagination/PaginationItem.vue.js +1 -1
  42. package/es/Progress/ProgressCircle.vue.js +1 -1
  43. package/es/Radio/Radio.vue.js +2 -2
  44. package/es/Rate/index.vue.js +1 -1
  45. package/es/ResizeBox/index.vue.js +5 -6
  46. package/es/Select/SelectIcon.vue.js +2 -2
  47. package/es/Spin/index.vue.js +1 -1
  48. package/es/Split/index.vue.js +1 -1
  49. package/es/Steps/Step.vue.js +1 -1
  50. package/es/Tabs/TabButton.vue.js +2 -2
  51. package/es/Tabs/Tabs.vue.js +1 -1
  52. package/es/Tag/index.vue.js +2 -2
  53. package/es/Textarea/index.vue.js +2 -2
  54. package/es/TimePicker/TimePicker.vue.js +2 -2
  55. package/es/Transfer/Transfer.vue.d.ts +2 -2
  56. package/es/Transfer/Transfer.vue.js +49 -4
  57. package/es/Transfer/TransferPanel.vue.d.ts +25 -2
  58. package/es/Transfer/TransferPanel.vue.js +70 -78
  59. package/es/Transfer/hooks/useContext.d.ts +2 -3
  60. package/es/Transfer/hooks/useContext.js +9 -13
  61. package/es/Transfer/index.d.ts +1 -1
  62. package/es/Trigger/index.vue.js +1 -1
  63. package/es/Typography/TypographyBase.vue.js +1 -1
  64. package/es/Upload/UploadButton.vue.js +1 -1
  65. package/es/Upload/UploadDrag.vue.js +1 -1
  66. package/es/Upload/UploadFileList.vue2.js +2 -2
  67. package/es/Upload/UploadPictureCard.vue2.js +1 -1
  68. package/es/_shared/components/IconButton/{index.vue2.js → index.vue.js} +1 -1
  69. package/es/_shared/components/IconButton/index.vue3.js +2 -2
  70. package/es/_shared/constants/index.js +1 -1
  71. package/es/_shared/icons/IconArrowDown.vue.js +1 -1
  72. package/es/_shared/icons/IconArrowRight.vue.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.vue2.js +1 -1
  77. package/es/_shared/icons/IconDelete.vue2.js +1 -1
  78. package/es/_shared/icons/IconDragDot.vue.js +1 -1
  79. package/es/_shared/icons/IconEdit.vue2.js +1 -1
  80. package/es/_shared/icons/IconEmpty.vue.js +1 -1
  81. package/es/_shared/icons/IconError.vue.js +1 -1
  82. package/es/_shared/icons/IconExclamation.vue2.js +1 -1
  83. package/es/_shared/icons/IconEyeClose.vue2.js +1 -1
  84. package/es/_shared/icons/IconEyeOpen.vue2.js +1 -1
  85. package/es/_shared/icons/IconFaceSmile.vue.js +1 -1
  86. package/es/_shared/icons/IconFile.vue2.js +1 -1
  87. package/es/_shared/icons/IconFullScreen.vue2.js +1 -1
  88. package/es/_shared/icons/IconImageClose.vue.js +1 -1
  89. package/es/_shared/icons/IconInfo.vue.js +1 -1
  90. package/es/_shared/icons/IconInfoLine.vue.js +1 -1
  91. package/es/_shared/icons/IconLink.vue.js +1 -1
  92. package/es/_shared/icons/IconLoading.vue.js +1 -1
  93. package/es/_shared/icons/IconMenuFold.vue.js +1 -1
  94. package/es/_shared/icons/IconMenuUnfold.vue.js +1 -1
  95. package/es/_shared/icons/IconMinus.vue2.js +1 -1
  96. package/es/_shared/icons/IconMore.vue.js +1 -1
  97. package/es/_shared/icons/IconOriginSize.vue2.js +1 -1
  98. package/es/_shared/icons/IconPlus.vue.js +1 -1
  99. package/es/_shared/icons/IconRight.vue.js +1 -1
  100. package/es/_shared/icons/IconRotateLeft.vue2.js +1 -1
  101. package/es/_shared/icons/IconRotateRight.vue2.js +1 -1
  102. package/es/_shared/icons/IconSearch.vue2.js +1 -1
  103. package/es/_shared/icons/IconSeparator.vue2.js +1 -1
  104. package/es/_shared/icons/IconStar.vue.js +1 -1
  105. package/es/_shared/icons/IconSuccess.vue.js +1 -1
  106. package/es/_shared/icons/IconTime.vue.js +1 -1
  107. package/es/_shared/icons/IconToTop.vue.js +1 -1
  108. package/es/_shared/icons/IconUpload.vue2.js +1 -1
  109. package/es/_shared/icons/IconWarning.vue.js +1 -1
  110. package/es/_shared/icons/IconZoomIn.vue2.js +1 -1
  111. package/es/_shared/icons/IconZoomOut.vue2.js +1 -1
  112. package/es/style.css +1 -1
  113. package/lib/Alert/index.vue.js +1 -1
  114. package/lib/Avatar/Avatar.vue.js +1 -1
  115. package/lib/BackTop/index.vue.js +1 -1
  116. package/lib/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  117. package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  118. package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  119. package/lib/Button/index.css +1 -1
  120. package/lib/Calendar/Calendar.vue.js +1 -1
  121. package/lib/Carousel/CarouselArrow.vue.js +1 -1
  122. package/lib/Cascader/CascaderIcon.vue.js +1 -1
  123. package/lib/Cascader/CascaderOption.vue.js +1 -1
  124. package/lib/Checkbox/Checkbox.vue.js +1 -1
  125. package/lib/Collapse/CollapseItem.vue.js +1 -1
  126. package/lib/Drawer/Drawer.vue.js +1 -1
  127. package/lib/Dropdown/DropdownButton.vue.js +1 -1
  128. package/lib/Dropdown/Dsubmenu.vue.js +1 -1
  129. package/lib/Empty/index.vue.js +1 -1
  130. package/lib/Image/Image.vue.js +1 -1
  131. package/lib/Image/ImagePreview.vue.js +1 -1
  132. package/lib/Image/ImagePreviewArrow.vue.js +1 -1
  133. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  134. package/lib/Input/Input.vue.js +1 -1
  135. package/lib/Input/InputSuffix.vue.js +1 -1
  136. package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
  137. package/lib/InputTag/index.vue.js +1 -1
  138. package/lib/Layout/LayoutSider.vue.js +1 -1
  139. package/lib/Link/index.css +1 -1
  140. package/lib/Link/index.vue.js +1 -1
  141. package/lib/Menu/Menu.vue.js +1 -1
  142. package/lib/Menu/MenuEllipsis.vue.js +1 -1
  143. package/lib/Menu/SubMenu.vue.js +1 -1
  144. package/lib/Menu/hooks/useCalcMaxMenuItems.d.ts +13 -0
  145. package/lib/Menu/hooks/useCalcMaxMenuItems.js +1 -0
  146. package/lib/Menu/hooks/useContext.js +1 -1
  147. package/lib/Message/Message.vue.js +1 -1
  148. package/lib/Modal/Modal.vue.js +1 -1
  149. package/lib/Notification/Notification.vue.js +1 -1
  150. package/lib/PageHeader/index.vue.js +1 -1
  151. package/lib/Pagination/PaginationItem.vue.js +1 -1
  152. package/lib/Progress/ProgressCircle.vue.js +1 -1
  153. package/lib/Radio/Radio.vue.js +1 -1
  154. package/lib/Rate/index.vue.js +1 -1
  155. package/lib/ResizeBox/index.vue.js +1 -1
  156. package/lib/Select/SelectIcon.vue.js +1 -1
  157. package/lib/Spin/index.vue.js +1 -1
  158. package/lib/Split/index.vue.js +1 -1
  159. package/lib/Steps/Step.vue.js +1 -1
  160. package/lib/Tabs/TabButton.vue.js +1 -1
  161. package/lib/Tabs/Tabs.vue.js +1 -1
  162. package/lib/Tag/index.vue.js +1 -1
  163. package/lib/Textarea/index.vue.js +1 -1
  164. package/lib/TimePicker/TimePicker.vue.js +1 -1
  165. package/lib/Transfer/Transfer.vue.d.ts +2 -2
  166. package/lib/Transfer/Transfer.vue.js +1 -1
  167. package/lib/Transfer/TransferPanel.vue.d.ts +25 -2
  168. package/lib/Transfer/TransferPanel.vue.js +1 -1
  169. package/lib/Transfer/hooks/useContext.d.ts +2 -3
  170. package/lib/Transfer/hooks/useContext.js +1 -1
  171. package/lib/Transfer/index.d.ts +1 -1
  172. package/lib/Trigger/index.vue.js +1 -1
  173. package/lib/Typography/TypographyBase.vue.js +1 -1
  174. package/lib/Upload/UploadButton.vue.js +1 -1
  175. package/lib/Upload/UploadDrag.vue.js +1 -1
  176. package/lib/Upload/UploadFileList.vue2.js +1 -1
  177. package/lib/Upload/UploadPictureCard.vue2.js +1 -1
  178. package/lib/_shared/components/IconButton/index.vue.js +1 -0
  179. package/lib/_shared/components/IconButton/index.vue3.js +1 -1
  180. package/lib/_shared/constants/index.js +1 -1
  181. package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
  182. package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
  183. package/lib/_shared/icons/IconCheck.vue.js +1 -1
  184. package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  185. package/lib/_shared/icons/IconClose.vue.js +1 -1
  186. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  187. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  188. package/lib/_shared/icons/IconDragDot.vue.js +1 -1
  189. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  190. package/lib/_shared/icons/IconEmpty.vue.js +1 -1
  191. package/lib/_shared/icons/IconError.vue.js +1 -1
  192. package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
  193. package/lib/_shared/icons/IconEyeClose.vue2.js +1 -1
  194. package/lib/_shared/icons/IconEyeOpen.vue2.js +1 -1
  195. package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
  196. package/lib/_shared/icons/IconFile.vue2.js +1 -1
  197. package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
  198. package/lib/_shared/icons/IconImageClose.vue.js +1 -1
  199. package/lib/_shared/icons/IconInfo.vue.js +1 -1
  200. package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
  201. package/lib/_shared/icons/IconLink.vue.js +1 -1
  202. package/lib/_shared/icons/IconLoading.vue.js +1 -1
  203. package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
  204. package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
  205. package/lib/_shared/icons/IconMinus.vue2.js +1 -1
  206. package/lib/_shared/icons/IconMore.vue.js +1 -1
  207. package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
  208. package/lib/_shared/icons/IconPlus.vue.js +1 -1
  209. package/lib/_shared/icons/IconRight.vue.js +1 -1
  210. package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
  211. package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
  212. package/lib/_shared/icons/IconSearch.vue2.js +1 -1
  213. package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
  214. package/lib/_shared/icons/IconStar.vue.js +1 -1
  215. package/lib/_shared/icons/IconSuccess.vue.js +1 -1
  216. package/lib/_shared/icons/IconTime.vue.js +1 -1
  217. package/lib/_shared/icons/IconToTop.vue.js +1 -1
  218. package/lib/_shared/icons/IconUpload.vue2.js +1 -1
  219. package/lib/_shared/icons/IconWarning.vue.js +1 -1
  220. package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
  221. package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
  222. package/lib/style.css +1 -1
  223. package/package.json +1 -1
  224. package/lib/_shared/components/IconButton/index.vue2.js +0 -1
@@ -11,8 +11,8 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
11
11
  import { useControlValue } from "../_shared/utils/hooks.js";
12
12
  import "../_shared/utils/locale.js";
13
13
  import "../_shared/utils/time.js";
14
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
15
- /* empty css */
14
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
15
+ /* empty css */
16
16
  /* empty css */
17
17
  /* empty css */
18
18
  const _hoisted_1 = ["value", "checked", "disabled"];
@@ -11,7 +11,7 @@ import { isObject } from "../_shared/utils/is.js";
11
11
  import { useControlValue } from "../_shared/utils/hooks.js";
12
12
  import "../_shared/utils/locale.js";
13
13
  import "../_shared/utils/time.js";
14
- /* empty css */
14
+ /* empty css */
15
15
  /* empty css */
16
16
  /* empty css */
17
17
  import _sfc_main$1 from "../_shared/icons/IconFaceSmile.vue.js";
@@ -11,7 +11,7 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
11
11
  import { useControlValue } from "../_shared/utils/hooks.js";
12
12
  import "../_shared/utils/locale.js";
13
13
  import "../_shared/utils/time.js";
14
- /* empty css */
14
+ /* empty css */
15
15
  /* empty css */
16
16
  /* empty css */
17
17
  import _sfc_main$1 from "../_shared/icons/IconDragDot.vue.js";
@@ -77,19 +77,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
77
  y = clientY;
78
78
  if (["left", "right"].includes(dragDirection.value)) {
79
79
  computedWidth.value += movementX;
80
- computedWidth.value = computedWidth.value <= minWidth ? minWidth : computedWidth.value;
81
- boxRef.value.style.width = `${valueToPx(computedWidth.value)}`;
80
+ boxRef.value.style.width = `${valueToPx(computedWidth.value <= minWidth ? minWidth : computedWidth.value)}`;
82
81
  } else {
83
82
  computedHeight.value += movementY;
84
- computedHeight.value = computedHeight.value <= minHeight ? minHeight : computedHeight.value;
85
- boxRef.value.style.height = `${valueToPx(computedHeight.value)}`;
83
+ boxRef.value.style.height = `${valueToPx(computedHeight.value <= minHeight ? minHeight : computedHeight.value)}`;
86
84
  }
87
85
  const { width, height } = boxRef.value.getBoundingClientRect();
88
86
  if (width != computedWidth.value) {
89
87
  computedWidth.value = width;
90
88
  }
91
89
  if (height != computedHeight.value) {
92
- computedHeight.value = width;
90
+ computedHeight.value = height;
93
91
  }
94
92
  emits(
95
93
  "moving",
@@ -129,6 +127,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
129
127
  [computedWidth, computedHeight],
130
128
  async () => {
131
129
  if (dragDirection.value) return;
130
+ console.log("函数触发了");
132
131
  await nextTick();
133
132
  boxRef.value.style.width = computedWidth.value ? `${valueToPx(computedWidth.value)}` : "";
134
133
  boxRef.value.style.height = computedHeight.value ? `${valueToPx(computedHeight.value)}` : "";
@@ -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 useSelectContext 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 "../_shared/utils/dom.js";
7
7
  import "../node_modules/b-tween/dist/b-tween.es.js";
8
8
  import "../node_modules/dayjs/dayjs.min.js";
@@ -10,7 +10,7 @@ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
10
10
  import "../node_modules/dayjs/plugin/isSameOrBefore.js";
11
11
  import "../_shared/utils/locale.js";
12
12
  import "../_shared/utils/time.js";
13
- /* empty css */
13
+ /* empty css */
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  import _sfc_main$1 from "../_shared/icons/IconLoading.vue.js";
@@ -12,7 +12,7 @@ import { isNumber } from "../_shared/utils/is.js";
12
12
  import { useControlValue } from "../_shared/utils/hooks.js";
13
13
  import "../_shared/utils/locale.js";
14
14
  import "../_shared/utils/time.js";
15
- /* empty css */
15
+ /* empty css */
16
16
  /* empty css */
17
17
  /* empty css */
18
18
  import _sfc_main$1 from "../_shared/icons/IconDragDot.vue.js";
@@ -9,7 +9,7 @@ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
9
9
  import "../node_modules/dayjs/plugin/isSameOrBefore.js";
10
10
  import "../_shared/utils/locale.js";
11
11
  import "../_shared/utils/time.js";
12
- /* empty css */
12
+ /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
15
15
  import _sfc_main$1 from "../_shared/icons/IconCheck.vue.js";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot, createCommentVNode } 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 "../_shared/utils/dom.js";
5
5
  import "../node_modules/b-tween/dist/b-tween.es.js";
6
6
  import "../node_modules/dayjs/dayjs.min.js";
@@ -12,7 +12,7 @@ import "../_shared/utils/time.js";
12
12
  import { findComponentsFromVnodes } from "../_shared/utils/vue-utils.js";
13
13
  import useTabsContext from "./hooks/useContext.js";
14
14
  import useTabsScroll from "./hooks/useTabsScroll.js";
15
- /* empty css */
15
+ /* empty css */
16
16
  /* empty css */
17
17
  /* empty css */
18
18
  import _sfc_main$3 from "../_shared/icons/IconArrowRight.vue.js";
@@ -13,8 +13,8 @@ import { useControlValue } from "../_shared/utils/hooks.js";
13
13
  import "../_shared/utils/locale.js";
14
14
  import "../_shared/utils/time.js";
15
15
  import Spin from "../Spin/index.js";
16
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
17
- /* empty css */
16
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
17
+ /* empty css */
18
18
  /* empty css */
19
19
  /* empty css */
20
20
  const _hoisted_1 = {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, toRefs, ref, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, createElementVNode, createBlock, toDisplayString, normalizeStyle, withCtx, createTextVNode } from "vue";
2
2
  import useTextareaHeight from "./hooks/useTextareaHeight.js";
3
3
  import useLimitedInput from "../Input/hooks/useLimitedInput.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 _sfc_main$1 from "../_shared/components/PreventFocus/index.vue.js";
7
7
  import "../_shared/utils/dom.js";
8
8
  import "../node_modules/b-tween/dist/b-tween.es.js";
@@ -12,8 +12,8 @@ import { isArray } from "../_shared/utils/is.js";
12
12
  import "../_shared/utils/locale.js";
13
13
  import { isValidTimeRange } from "../_shared/utils/time.js";
14
14
  import useTimePickerContext from "./hooks/useContext.js";
15
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
16
- /* empty css */
15
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
16
+ /* empty css */
17
17
  /* empty css */
18
18
  /* empty css */
19
19
  import _sfc_main$2 from "../_shared/icons/IconTime.vue.js";
@@ -1,7 +1,7 @@
1
- import { TransferProps, TransferSlots } from './type';
1
+ import { TransferProps } from './type';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
- slots: Readonly<TransferSlots> & TransferSlots;
4
+ slots: any;
5
5
  refs: {};
6
6
  rootEl: HTMLDivElement;
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, createElementBlock, openBlock, normalizeClass, createVNode, createCommentVNode, createBlock, unref, withCtx, renderSlot } from "vue";
1
+ import { defineComponent, useSlots, createElementBlock, openBlock, normalizeClass, createVNode, createCommentVNode, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createBlock, unref } from "vue";
2
2
  import useTransferContext from "./hooks/useContext.js";
3
3
  import "../_shared/utils/dom.js";
4
4
  import "../node_modules/b-tween/dist/b-tween.es.js";
@@ -10,7 +10,7 @@ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
10
10
  import "../node_modules/dayjs/plugin/isSameOrBefore.js";
11
11
  import "../_shared/utils/locale.js";
12
12
  import "../_shared/utils/time.js";
13
- /* empty css */
13
+ /* empty css */
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  import _sfc_main$2 from "../_shared/icons/IconArrowRight.vue.js";
@@ -47,6 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
47
  },
48
48
  emits: ["update:selected", "update:modelValue", "change", "select", "search"],
49
49
  setup(__props, { emit: __emit }) {
50
+ const $slots = useSlots();
50
51
  const props = __props;
51
52
  const emits = __emit;
52
53
  const { computedValue, targetChecked, computedSelected, sourceChecked } = useTransferContext().provide(props, emits);
@@ -76,7 +77,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76
77
  }
77
78
  ])
78
79
  }, [
79
- createVNode(_sfc_main$1, { type: "source" }),
80
+ createVNode(_sfc_main$1, { type: "source" }, createSlots({ _: 2 }, [
81
+ $slots["source-title"] ? {
82
+ name: "source-title",
83
+ fn: withCtx((scope) => [
84
+ renderSlot(_ctx.$slots, "source-title", normalizeProps(guardReactiveProps(scope)))
85
+ ]),
86
+ key: "0"
87
+ } : void 0,
88
+ $slots["source"] ? {
89
+ name: "source",
90
+ fn: withCtx((scope) => [
91
+ renderSlot(_ctx.$slots, "source", normalizeProps(guardReactiveProps(scope)))
92
+ ]),
93
+ key: "1"
94
+ } : void 0,
95
+ $slots["item"] ? {
96
+ name: "item",
97
+ fn: withCtx((scope) => [
98
+ renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps(scope)))
99
+ ]),
100
+ key: "2"
101
+ } : void 0
102
+ ]), 1024),
80
103
  !_ctx.simple ? (openBlock(), createElementBlock("div", _hoisted_1, [
81
104
  createVNode(unref(Button), {
82
105
  disabled: !unref(sourceChecked).length || _ctx.disabled,
@@ -104,7 +127,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
104
127
  _: 3
105
128
  }, 8, ["disabled"])) : createCommentVNode("", true)
106
129
  ])) : createCommentVNode("", true),
107
- createVNode(_sfc_main$1, { type: "target" })
130
+ createVNode(_sfc_main$1, { type: "target" }, createSlots({ _: 2 }, [
131
+ $slots["target-title"] ? {
132
+ name: "target-title",
133
+ fn: withCtx((scope) => [
134
+ renderSlot(_ctx.$slots, "source-title", normalizeProps(guardReactiveProps(scope)))
135
+ ]),
136
+ key: "0"
137
+ } : void 0,
138
+ $slots["target"] ? {
139
+ name: "target",
140
+ fn: withCtx((scope) => [
141
+ renderSlot(_ctx.$slots, "source", normalizeProps(guardReactiveProps(scope)))
142
+ ]),
143
+ key: "1"
144
+ } : void 0,
145
+ $slots["item"] ? {
146
+ name: "item",
147
+ fn: withCtx((scope) => [
148
+ renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps(scope)))
149
+ ]),
150
+ key: "2"
151
+ } : void 0
152
+ ]), 1024)
108
153
  ], 2);
109
154
  };
110
155
  }
@@ -1,10 +1,33 @@
1
- import { TransferPanelSlots } from './type';
1
+ import { TransferItem, TransferItemValue } from './type';
2
2
  type __VLS_Props = {
3
3
  type: 'source' | 'target';
4
4
  };
5
5
  declare function __VLS_template(): {
6
6
  attrs: Partial<{}>;
7
- slots: Readonly<TransferPanelSlots> & TransferPanelSlots;
7
+ slots: Partial<Record<NonNullable<"target-title" | "source-title">, (_: {
8
+ countTotal: number;
9
+ countSelected: number;
10
+ searchValue: string;
11
+ checked: boolean;
12
+ indeterminate: boolean;
13
+ onSelectAllChange: (v: boolean) => void;
14
+ onClear: () => void;
15
+ }) => any>> & Partial<Record<NonNullable<"target" | "source">, (_: {
16
+ selectedKeys: TransferItemValue[];
17
+ data: TransferItem[];
18
+ onSelect: (val: TransferItemValue[]) => void;
19
+ }) => any>> & {
20
+ item?(_: {
21
+ label?: string;
22
+ value?: TransferItemValue;
23
+ disabled?: boolean;
24
+ }): any;
25
+ item?(_: {
26
+ label?: string;
27
+ value?: TransferItemValue;
28
+ disabled?: boolean;
29
+ }): any;
30
+ };
8
31
  refs: {};
9
32
  rootEl: HTMLDivElement;
10
33
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent, toRefs, ref, computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, createBlock, unref, resolveDynamicComponent, Fragment, withCtx, createTextVNode, toDisplayString, createVNode, mergeProps, renderList, normalizeClass } from "vue";
2
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
3
- /* empty css */
1
+ import { defineComponent, toRefs, ref, computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, unref, normalizeProps, guardReactiveProps, createBlock, withCtx, createTextVNode, toDisplayString, Fragment, createVNode, mergeProps, renderList, normalizeClass } from "vue";
2
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
3
+ /* empty css */
4
4
  import "../_shared/utils/dom.js";
5
5
  import "../node_modules/b-tween/dist/b-tween.es.js";
6
6
  import "../node_modules/dayjs/dayjs.min.js";
@@ -31,7 +31,6 @@ const _hoisted_5 = {
31
31
  };
32
32
  const _hoisted_6 = { class: "yc-transfer-view-body" };
33
33
  const _hoisted_7 = {
34
- key: 1,
35
34
  role: "list",
36
35
  class: "yc-transfer-list"
37
36
  };
@@ -59,7 +58,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
58
  simple,
60
59
  sourceInputSearchProps,
61
60
  targetInputSearchProps,
62
- slots,
63
61
  title: _title,
64
62
  emits
65
63
  } = useTransferContext().inject();
@@ -80,6 +78,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
80
78
  const title = computed(() => {
81
79
  return type.value == "source" ? _title.value[0] : _title.value[1];
82
80
  });
81
+ const titleParams = computed(() => {
82
+ return {
83
+ countTotal: type.value == "source" ? sourceOptions.value.length : targetOptions.value.length,
84
+ countSelected: type.value == "source" ? sourceChecked.value.length : targetChecked.value.length,
85
+ searchValue: keywords.value,
86
+ checked: selectedAll.value,
87
+ indeterminate: indeterminate.value,
88
+ onSelectAllChange: (v) => {
89
+ selectedAll.value = v;
90
+ },
91
+ onClear: handleClear
92
+ };
93
+ });
94
+ const listParams = computed(() => {
95
+ return {
96
+ selectedKeys: curSeleced.value,
97
+ data: curData.value,
98
+ onSelect: (val) => {
99
+ computedSelected.value = val;
100
+ }
101
+ };
102
+ });
83
103
  const selectedAll = computed({
84
104
  get() {
85
105
  return !!curSeleced.value.length && curSeleced.value.length == curData.value.length;
@@ -121,40 +141,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
121
141
  if (disabled.value || !computedValue.value.length) return;
122
142
  computedValue.value = [];
123
143
  };
124
- const renderTitle = () => {
125
- var _a;
126
- return (_a = slots[type.value == "source" ? "source-title" : "target-title"]) == null ? void 0 : _a.call(slots, {
127
- countTotal: type.value == "source" ? sourceOptions.value.length : targetOptions.value.length,
128
- countSelected: type.value == "source" ? sourceChecked.value.length : targetChecked.value.length,
129
- searchValue: keywords.value,
130
- checked: selectedAll.value,
131
- indeterminate: indeterminate.value,
132
- onSelectAllChange: (v) => {
133
- selectedAll.value = v;
134
- },
135
- onClear: handleClear
136
- });
137
- };
138
- const renderList$1 = () => {
139
- var _a;
140
- return (_a = slots[type.value]) == null ? void 0 : _a.call(slots, {
141
- selectedKeys: curSeleced.value,
142
- data: curData.value,
143
- onSelect: (val) => {
144
- computedSelected.value = val;
145
- }
146
- });
147
- };
148
- const renderItem = (item) => {
149
- return () => {
150
- var _a;
151
- return (_a = slots.item) == null ? void 0 : _a.call(slots, item);
152
- };
153
- };
154
144
  return (_ctx, _cache) => {
155
145
  return openBlock(), createElementBlock("div", _hoisted_1, [
156
146
  createElementVNode("div", _hoisted_2, [
157
- unref(slots)[`${unref(type)}-title`] ? (openBlock(), createBlock(resolveDynamicComponent(renderTitle), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
147
+ renderSlot(_ctx.$slots, `${unref(type)}-title`, normalizeProps(guardReactiveProps(titleParams.value)), () => [
158
148
  createElementVNode("span", _hoisted_3, [
159
149
  unref(showSelectAll) && !unref(simple) && (!unref(oneWay) || unref(type) != "target") ? (openBlock(), createBlock(unref(Checkbox), {
160
150
  key: 0,
@@ -185,7 +175,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
185
175
  _: 1
186
176
  })) : createCommentVNode("", true)
187
177
  ])
188
- ], 64))
178
+ ])
189
179
  ]),
190
180
  unref(showSearch) ? (openBlock(), createElementBlock("div", _hoisted_5, [
191
181
  createVNode(unref(Input), mergeProps({
@@ -203,54 +193,56 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
203
193
  createElementVNode("div", _hoisted_6, [
204
194
  curData.value.length ? (openBlock(), createBlock(unref(Scrollbar), { key: 0 }, {
205
195
  default: withCtx(() => [
206
- unref(slots)[unref(type)] ? (openBlock(), createBlock(resolveDynamicComponent(renderList$1), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_7, [
207
- (openBlock(true), createElementBlock(Fragment, null, renderList(curData.value, (item) => {
208
- return openBlock(), createElementBlock("div", {
209
- key: item.value,
210
- role: "listitem",
211
- class: normalizeClass([
212
- "yc-transfer-list-item",
213
- {
214
- "yc-transfer-list-item-disabled": item.disabled || unref(disabled)
215
- }
216
- ]),
217
- onClick: ($event) => handleClick(item)
218
- }, [
219
- (!unref(oneWay) || unref(oneWay) && unref(type) == "source") && !unref(simple) ? (openBlock(), createBlock(unref(Checkbox), {
220
- key: 0,
221
- "model-value": curSeleced.value.includes(item.value),
222
- disabled: item.disabled || unref(disabled),
223
- onChange: (isSelected) => handleCheck(isSelected, item.value)
224
- }, {
225
- default: withCtx(() => [
226
- unref(slots).item ? (openBlock(), createBlock(resolveDynamicComponent(renderItem(item)), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
227
- createTextVNode(toDisplayString(item.label), 1)
228
- ], 64))
229
- ]),
230
- _: 2
231
- }, 1032, ["model-value", "disabled", "onChange"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
232
- createElementVNode("span", _hoisted_9, [
233
- unref(slots).item ? (openBlock(), createBlock(resolveDynamicComponent(renderItem(item)), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
234
- createTextVNode(toDisplayString(item.label), 1)
235
- ], 64))
196
+ renderSlot(_ctx.$slots, unref(type), normalizeProps(guardReactiveProps(listParams.value)), () => [
197
+ createElementVNode("div", _hoisted_7, [
198
+ (openBlock(true), createElementBlock(Fragment, null, renderList(curData.value, (item) => {
199
+ return openBlock(), createElementBlock("div", {
200
+ key: item.value,
201
+ role: "listitem",
202
+ class: normalizeClass([
203
+ "yc-transfer-list-item",
204
+ {
205
+ "yc-transfer-list-item-disabled": item.disabled || unref(disabled)
206
+ }
236
207
  ]),
237
- unref(type) == "target" && !unref(simple) ? (openBlock(), createBlock(unref(_sfc_main$1), {
208
+ onClick: ($event) => handleClick(item)
209
+ }, [
210
+ (!unref(oneWay) || unref(oneWay) && unref(type) == "source") && !unref(simple) ? (openBlock(), createBlock(unref(Checkbox), {
238
211
  key: 0,
239
- "hover-size": 20
212
+ "model-value": curSeleced.value.includes(item.value),
213
+ disabled: item.disabled || unref(disabled),
214
+ onChange: (isSelected) => handleCheck(isSelected, item.value)
240
215
  }, {
241
216
  default: withCtx(() => [
242
- createVNode(unref(_sfc_main$4))
217
+ renderSlot(_ctx.$slots, "item", mergeProps({ ref_for: true }, item), () => [
218
+ createTextVNode(toDisplayString(item.label), 1)
219
+ ])
243
220
  ]),
244
- _: 1
245
- })) : createCommentVNode("", true)
246
- ], 64))
247
- ], 10, _hoisted_8);
248
- }), 128))
249
- ]))
221
+ _: 2
222
+ }, 1032, ["model-value", "disabled", "onChange"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
223
+ createElementVNode("span", _hoisted_9, [
224
+ renderSlot(_ctx.$slots, "item", mergeProps({ ref_for: true }, item), () => [
225
+ createTextVNode(toDisplayString(item.label), 1)
226
+ ])
227
+ ]),
228
+ unref(type) == "target" && !unref(simple) ? (openBlock(), createBlock(unref(_sfc_main$1), {
229
+ key: 0,
230
+ "hover-size": 20
231
+ }, {
232
+ default: withCtx(() => [
233
+ createVNode(unref(_sfc_main$4))
234
+ ]),
235
+ _: 1
236
+ })) : createCommentVNode("", true)
237
+ ], 64))
238
+ ], 10, _hoisted_8);
239
+ }), 128))
240
+ ])
241
+ ])
250
242
  ]),
251
- _: 1
243
+ _: 3
252
244
  })) : createCommentVNode("", true),
253
- (openBlock(), createBlock(resolveDynamicComponent(unref(Empty))))
245
+ createVNode(unref(Empty))
254
246
  ])
255
247
  ]);
256
248
  };
@@ -1,4 +1,4 @@
1
- import { Ref, Slots } from 'vue';
1
+ import { Ref } from 'vue';
2
2
  import { TransferEmits, TransferItem, TransferItemValue } from '../type';
3
3
  import { InputProps } from '../../Input';
4
4
  import { RecordType } from '../../_shared/type';
@@ -17,14 +17,13 @@ type TransferContext = {
17
17
  showSearch: Ref<boolean>;
18
18
  oneWay: Ref<boolean>;
19
19
  simple: Ref<boolean>;
20
- slots: Slots;
21
20
  emits: TransferEmits;
22
21
  };
23
22
  export default function useTransferContext(): {
24
23
  provide: (props: RecordType, emits: TransferEmits) => {
25
24
  computedValue: import('vue').WritableComputedRef<TransferItemValue[], TransferItemValue[]>;
26
- targetChecked: import('vue').ComputedRef<TransferItemValue[]>;
27
25
  computedSelected: import('vue').WritableComputedRef<TransferItemValue[], TransferItemValue[]>;
26
+ targetChecked: import('vue').ComputedRef<TransferItemValue[]>;
28
27
  sourceChecked: import('vue').ComputedRef<TransferItemValue[]>;
29
28
  };
30
29
  inject: () => TransferContext;
@@ -1,4 +1,4 @@
1
- import { toRefs, useSlots, computed, provide, inject, ref } from "vue";
1
+ import { toRefs, computed, provide, inject, ref } from "vue";
2
2
  import "../../_shared/utils/dom.js";
3
3
  import "../../node_modules/b-tween/dist/b-tween.es.js";
4
4
  import "../../node_modules/dayjs/dayjs.min.js";
@@ -28,7 +28,6 @@ function useTransferContext() {
28
28
  disabled,
29
29
  title
30
30
  } = toRefs(props);
31
- const slots = useSlots();
32
31
  const dataMap = computed(() => {
33
32
  return Object.fromEntries(data.value.map((item) => [item.value, item]));
34
33
  });
@@ -61,19 +60,18 @@ function useTransferContext() {
61
60
  });
62
61
  const targetOptions = computed(() => {
63
62
  return computedValue.value.map((item) => {
64
- const target = dataMap.value[item];
65
- return target;
63
+ return dataMap.value[item];
66
64
  });
67
65
  });
68
66
  const sourceChecked = computed(() => {
69
- return computedSelected.value.filter(
70
- (item) => !computedValueMap.value.has(item)
71
- );
67
+ return computedSelected.value.filter((item) => {
68
+ return !computedValueMap.value.has(item);
69
+ });
72
70
  });
73
71
  const targetChecked = computed(() => {
74
- return computedSelected.value.filter(
75
- (item) => computedValueMap.value.has(item)
76
- );
72
+ return computedSelected.value.filter((item) => {
73
+ return computedValueMap.value.has(item);
74
+ });
77
75
  });
78
76
  provide(TRANSFER_CONTEXT_KEY, {
79
77
  computedValue,
@@ -90,13 +88,12 @@ function useTransferContext() {
90
88
  showSelectAll,
91
89
  disabled,
92
90
  title,
93
- slots,
94
91
  emits
95
92
  });
96
93
  return {
97
94
  computedValue,
98
- targetChecked,
99
95
  computedSelected,
96
+ targetChecked,
100
97
  sourceChecked
101
98
  };
102
99
  };
@@ -116,7 +113,6 @@ function useTransferContext() {
116
113
  showSelectAll: ref(false),
117
114
  sourceInputSearchProps: ref({}),
118
115
  targetInputSearchProps: ref({}),
119
- slots: {},
120
116
  emits: () => {
121
117
  }
122
118
  });
@@ -87,7 +87,7 @@ declare const Transfer: {
87
87
  showSearch: boolean;
88
88
  showSelectAll: boolean;
89
89
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
90
- $slots: Readonly<import('./type').TransferSlots> & import('./type').TransferSlots;
90
+ $slots: any;
91
91
  }) & {
92
92
  install: (app: App) => void;
93
93
  };
@@ -13,7 +13,7 @@ import "../_shared/utils/time.js";
13
13
  import { findFirstLegitChild } from "../_shared/utils/vue-utils.js";
14
14
  import useTriggerVisible from "./hooks/useTriggerVisible.js";
15
15
  import useTriggerPosition from "./hooks/useTriggerPosition.js";
16
- /* empty css */
16
+ /* empty css */
17
17
  import _sfc_main$1 from "../_shared/components/PreventFocus/index.vue.js";
18
18
  /* empty css */
19
19
  /* empty css */
@@ -11,7 +11,7 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
11
11
  import { useControlValue } from "../_shared/utils/hooks.js";
12
12
  import { useI18n } from "../_shared/utils/locale.js";
13
13
  import "../_shared/utils/time.js";
14
- /* empty css */
14
+ /* empty css */
15
15
  /* empty css */
16
16
  /* empty css */
17
17
  import _sfc_main$3 from "../_shared/icons/IconCopy.vue2.js";
@@ -10,7 +10,7 @@ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
10
10
  import "../node_modules/dayjs/plugin/isSameOrBefore.js";
11
11
  import { useI18n } from "../_shared/utils/locale.js";
12
12
  import "../_shared/utils/time.js";
13
- /* empty css */
13
+ /* empty css */
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  import _sfc_main$1 from "../_shared/icons/IconUpload.vue2.js";
@@ -10,7 +10,7 @@ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
10
10
  import "../node_modules/dayjs/plugin/isSameOrBefore.js";
11
11
  import { useI18n } from "../_shared/utils/locale.js";
12
12
  import "../_shared/utils/time.js";
13
- /* empty css */
13
+ /* empty css */
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  import _sfc_main$1 from "../_shared/icons/IconPlus.vue.js";