fast-element-plus 2.0.0 → 2.0.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 (450) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +4 -2
  3. package/README.zh.md +4 -2
  4. package/dist/components/avatar/index.d.ts +2 -2
  5. package/dist/components/avatar/index.mjs.map +1 -1
  6. package/dist/components/button/index.d.ts +1 -1
  7. package/dist/components/button/index.mjs.map +1 -1
  8. package/dist/components/button/src/button.mjs +1 -1
  9. package/dist/components/carNumber/src/carNumber.mjs +2 -3
  10. package/dist/components/carNumber/src/carNumber.mjs.map +1 -1
  11. package/dist/components/contextMenu/src/contextMenu.d.ts +4 -4
  12. package/dist/components/contextMenu/src/contextMenu.mjs +2 -2
  13. package/dist/components/contextMenu/src/contextMenu.type.d.ts +3 -3
  14. package/dist/components/dialog/index.d.ts +1 -1
  15. package/dist/components/dialog/index.mjs.map +1 -1
  16. package/dist/components/dialog/src/dialog.mjs +1 -1
  17. package/dist/components/drawer/index.d.ts +2 -2
  18. package/dist/components/drawer/index.mjs.map +1 -1
  19. package/dist/components/drawer/src/drawer.mjs +1 -1
  20. package/dist/components/form/index.d.ts +1 -1
  21. package/dist/components/form/index.mjs.map +1 -1
  22. package/dist/components/form/src/form.d.ts +5 -2
  23. package/dist/components/form/src/form.mjs +1 -2
  24. package/dist/components/form/src/form.mjs.map +1 -1
  25. package/dist/components/form/src/formItem.mjs +1 -1
  26. package/dist/components/formItemTip/index.d.ts +1 -1
  27. package/dist/components/formItemTip/index.mjs.map +1 -1
  28. package/dist/components/icon/index.d.ts +2 -2
  29. package/dist/components/icon/index.mjs.map +1 -1
  30. package/dist/components/iconSelector/src/iconSelector.mjs +1 -2
  31. package/dist/components/iconSelector/src/iconSelector.mjs.map +1 -1
  32. package/dist/components/image/index.d.ts +1 -1
  33. package/dist/components/image/index.mjs.map +1 -1
  34. package/dist/components/inputDialogPage/index.d.ts +1 -1
  35. package/dist/components/inputDialogPage/index.mjs.map +1 -1
  36. package/dist/components/inputDialogPage/src/inputDialogPage.d.ts +15 -15
  37. package/dist/components/inputDialogPage/src/inputDialogPage.mjs +2 -5
  38. package/dist/components/inputDialogPage/src/inputDialogPage.mjs.map +1 -1
  39. package/dist/components/layoutGrid/src/layoutGrid.mjs +1 -3
  40. package/dist/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
  41. package/dist/components/layoutGrid/src/layoutGridItem.mjs +1 -1
  42. package/dist/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
  43. package/dist/components/select/index.d.ts +2 -2
  44. package/dist/components/select/index.mjs.map +1 -1
  45. package/dist/components/select/src/select.d.ts +15 -14
  46. package/dist/components/select/src/select.mjs +2 -9
  47. package/dist/components/select/src/select.mjs.map +1 -1
  48. package/dist/components/select/src/select.type.d.ts +4 -4
  49. package/dist/components/select/src/selectOption.d.ts +5 -5
  50. package/dist/components/select/src/selectOption.mjs +1 -1
  51. package/dist/components/selectPage/index.d.ts +1 -1
  52. package/dist/components/selectPage/index.mjs.map +1 -1
  53. package/dist/components/selectPage/src/selectPage.d.ts +10 -10
  54. package/dist/components/selectPage/src/selectPage.mjs +2 -9
  55. package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
  56. package/dist/components/selectV2/index.d.ts +2 -2
  57. package/dist/components/selectV2/index.mjs.map +1 -1
  58. package/dist/components/selectV2/src/selectV2.d.ts +28 -36
  59. package/dist/components/selectV2/src/selectV2.mjs +2 -9
  60. package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
  61. package/dist/components/table/index.d.ts +1 -1
  62. package/dist/components/table/index.mjs.map +1 -1
  63. package/dist/components/table/src/page.type.d.ts +3 -1
  64. package/dist/components/table/src/page.type.mjs.map +1 -1
  65. package/dist/components/table/src/table.d.ts +38 -39
  66. package/dist/components/table/src/table.mjs +5 -11
  67. package/dist/components/table/src/table.mjs.map +1 -1
  68. package/dist/components/table/src/table.state.d.ts +5 -5
  69. package/dist/components/table/src/table.type.d.ts +13 -10
  70. package/dist/components/table/src/table.type.mjs.map +1 -1
  71. package/dist/components/table/src/tableColumn.d.ts +3 -4
  72. package/dist/components/table/src/tableColumn.mjs +2 -7
  73. package/dist/components/table/src/tableColumn.mjs.map +1 -1
  74. package/dist/components/table/src/tableColumnSettingDialog.mjs +1 -1
  75. package/dist/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
  76. package/dist/components/table/src/tablePagination.mjs +1 -2
  77. package/dist/components/table/src/tablePagination.mjs.map +1 -1
  78. package/dist/components/table/src/tableSearchForm.d.ts +1 -1
  79. package/dist/components/table/src/tableSearchForm.mjs.map +1 -1
  80. package/dist/components/table/src/tableSearchFormItem.mjs +1 -1
  81. package/dist/components/table/src/tableSearchFormItem.mjs.map +1 -1
  82. package/dist/components/table/src/useTable.d.ts +5 -5
  83. package/dist/components/table/src/useTable.mjs +1 -2
  84. package/dist/components/table/src/useTable.mjs.map +1 -1
  85. package/dist/components/table/utils/table.d.ts +3 -2
  86. package/dist/components/table/utils/table.mjs +1 -3
  87. package/dist/components/table/utils/table.mjs.map +1 -1
  88. package/dist/components/tree/index.d.ts +1 -1
  89. package/dist/components/tree/index.mjs.map +1 -1
  90. package/dist/components/tree/src/tree.d.ts +27 -25
  91. package/dist/components/tree/src/tree.mjs +5 -8
  92. package/dist/components/tree/src/tree.mjs.map +1 -1
  93. package/dist/components/tree/src/tree.props.d.ts +1 -4
  94. package/dist/components/tree/src/tree.type.d.ts +4 -4
  95. package/dist/components/treeSelect/index.d.ts +1 -1
  96. package/dist/components/treeSelect/index.mjs.map +1 -1
  97. package/dist/components/treeSelect/src/treeSelect.d.ts +32 -31
  98. package/dist/components/treeSelect/src/treeSelect.mjs +2 -9
  99. package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
  100. package/dist/components/upload/index.d.ts +1 -1
  101. package/dist/components/upload/index.mjs.map +1 -1
  102. package/dist/components/upload/src/upload.mjs +1 -3
  103. package/dist/components/upload/src/upload.mjs.map +1 -1
  104. package/dist/components/upload/src/useUpload.mjs +3 -5
  105. package/dist/components/upload/src/useUpload.mjs.map +1 -1
  106. package/dist/components/uploadImage/index.d.ts +1 -1
  107. package/dist/components/uploadImage/index.mjs.map +1 -1
  108. package/dist/components/uploadImage/src/uploadImage.mjs +1 -3
  109. package/dist/components/uploadImage/src/uploadImage.mjs.map +1 -1
  110. package/dist/components/uploadImages/index.d.ts +2 -2
  111. package/dist/components/uploadImages/index.mjs.map +1 -1
  112. package/dist/components/uploadImages/src/uploadImages.mjs +1 -2
  113. package/dist/components/uploadImages/src/uploadImages.mjs.map +1 -1
  114. package/dist/directives/click-icon-copy/index.mjs.map +1 -1
  115. package/dist/element-plus.mjs +1 -2
  116. package/dist/element-plus.mjs.map +1 -1
  117. package/dist/hooks/use-screenFull/index.mjs +13 -13
  118. package/dist/hooks/use-screenFull/index.mjs.map +1 -1
  119. package/dist/index.d.ts +0 -2
  120. package/dist/index.global.min.js +4 -4
  121. package/dist/index.global.min.js.map +1 -1
  122. package/dist/index.mjs +2 -3
  123. package/dist/index.mjs.map +1 -1
  124. package/dist/version.d.ts +1 -1
  125. package/dist/version.mjs +1 -1
  126. package/dist/version.mjs.map +1 -1
  127. package/package.json +1 -1
  128. package/dist/_virtual/_rolldown/runtime.mjs +0 -13
  129. package/dist/components/index.mjs +0 -124
  130. package/dist/components/index.mjs.map +0 -1
  131. package/dist/node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.41_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.mjs +0 -100
  132. package/dist/node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.41_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.mjs.map +0 -1
  133. package/dist/node_modules/.pnpm/@vueuse_shared@14.4.0_vue@3.5.41_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.mjs +0 -25
  134. package/dist/node_modules/.pnpm/@vueuse_shared@14.4.0_vue@3.5.41_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.mjs.map +0 -1
  135. package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.mjs +0 -1997
  136. package/dist/node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.mjs.map +0 -1
  137. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_DataView.mjs +0 -8
  138. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_DataView.mjs.map +0 -1
  139. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Hash.mjs +0 -30
  140. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Hash.mjs.map +0 -1
  141. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.mjs +0 -30
  142. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.mjs.map +0 -1
  143. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Map.mjs +0 -8
  144. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Map.mjs.map +0 -1
  145. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.mjs +0 -30
  146. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.mjs.map +0 -1
  147. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Promise.mjs +0 -8
  148. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Promise.mjs.map +0 -1
  149. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Set.mjs +0 -8
  150. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Set.mjs.map +0 -1
  151. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.mjs +0 -23
  152. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.mjs.map +0 -1
  153. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Stack.mjs +0 -27
  154. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Stack.mjs.map +0 -1
  155. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.mjs +0 -8
  156. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.mjs.map +0 -1
  157. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.mjs +0 -8
  158. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.mjs.map +0 -1
  159. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.mjs +0 -8
  160. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.mjs.map +0 -1
  161. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_apply.mjs +0 -24
  162. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_apply.mjs.map +0 -1
  163. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.mjs +0 -19
  164. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.mjs.map +0 -1
  165. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.mjs +0 -22
  166. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.mjs.map +0 -1
  167. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.mjs +0 -26
  168. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.mjs.map +0 -1
  169. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.mjs +0 -19
  170. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.mjs.map +0 -1
  171. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.mjs +0 -18
  172. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.mjs.map +0 -1
  173. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.mjs +0 -20
  174. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.mjs.map +0 -1
  175. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.mjs +0 -23
  176. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.mjs.map +0 -1
  177. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.mjs +0 -19
  178. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.mjs.map +0 -1
  179. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.mjs +0 -19
  180. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.mjs.map +0 -1
  181. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.mjs +0 -19
  182. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.mjs.map +0 -1
  183. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.mjs +0 -24
  184. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.mjs.map +0 -1
  185. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.mjs +0 -118
  186. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.mjs.map +0 -1
  187. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.mjs +0 -27
  188. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.mjs.map +0 -1
  189. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.mjs +0 -31
  190. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.mjs.map +0 -1
  191. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.mjs +0 -21
  192. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.mjs.map +0 -1
  193. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.mjs +0 -22
  194. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.mjs.map +0 -1
  195. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.mjs +0 -24
  196. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.mjs.map +0 -1
  197. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.mjs +0 -19
  198. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.mjs.map +0 -1
  199. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.mjs +0 -26
  200. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.mjs.map +0 -1
  201. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.mjs +0 -61
  202. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.mjs.map +0 -1
  203. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.mjs +0 -19
  204. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.mjs.map +0 -1
  205. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.mjs +0 -37
  206. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.mjs.map +0 -1
  207. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.mjs +0 -19
  208. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.mjs.map +0 -1
  209. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.mjs +0 -47
  210. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.mjs.map +0 -1
  211. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.mjs +0 -22
  212. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.mjs.map +0 -1
  213. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.mjs +0 -23
  214. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.mjs.map +0 -1
  215. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.mjs +0 -24
  216. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.mjs.map +0 -1
  217. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSlice.mjs +0 -25
  218. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSlice.mjs.map +0 -1
  219. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.mjs +0 -19
  220. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.mjs.map +0 -1
  221. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.mjs +0 -29
  222. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.mjs.map +0 -1
  223. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.mjs +0 -17
  224. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.mjs.map +0 -1
  225. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnset.mjs +0 -31
  226. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnset.mjs.map +0 -1
  227. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.mjs +0 -16
  228. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.mjs.map +0 -1
  229. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castPath.mjs +0 -21
  230. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castPath.mjs.map +0 -1
  231. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.mjs +0 -18
  232. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.mjs.map +0 -1
  233. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.mjs +0 -27
  234. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.mjs.map +0 -1
  235. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.mjs +0 -18
  236. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.mjs.map +0 -1
  237. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.mjs +0 -19
  238. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.mjs.map +0 -1
  239. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.mjs +0 -19
  240. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.mjs.map +0 -1
  241. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.mjs +0 -18
  242. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.mjs.map +0 -1
  243. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.mjs +0 -19
  244. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.mjs.map +0 -1
  245. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.mjs +0 -30
  246. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.mjs.map +0 -1
  247. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.mjs +0 -18
  248. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.mjs.map +0 -1
  249. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.mjs +0 -18
  250. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.mjs.map +0 -1
  251. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.mjs +0 -8
  252. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.mjs.map +0 -1
  253. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_customOmitClone.mjs +0 -18
  254. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_customOmitClone.mjs.map +0 -1
  255. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.mjs +0 -13
  256. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.mjs.map +0 -1
  257. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.mjs +0 -57
  258. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.mjs.map +0 -1
  259. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.mjs +0 -77
  260. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.mjs.map +0 -1
  261. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.mjs +0 -56
  262. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.mjs.map +0 -1
  263. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.mjs +0 -18
  264. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.mjs.map +0 -1
  265. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.mjs +0 -7
  266. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.mjs.map +0 -1
  267. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.mjs +0 -18
  268. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.mjs.map +0 -1
  269. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.mjs +0 -19
  270. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.mjs.map +0 -1
  271. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.mjs +0 -18
  272. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.mjs.map +0 -1
  273. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getNative.mjs +0 -19
  274. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getNative.mjs.map +0 -1
  275. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.mjs +0 -8
  276. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.mjs.map +0 -1
  277. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.mjs +0 -38
  278. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.mjs.map +0 -1
  279. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.mjs +0 -24
  280. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.mjs.map +0 -1
  281. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.mjs +0 -24
  282. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.mjs.map +0 -1
  283. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getTag.mjs +0 -45
  284. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getTag.mjs.map +0 -1
  285. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getValue.mjs +0 -16
  286. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getValue.mjs.map +0 -1
  287. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.mjs +0 -17
  288. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.mjs.map +0 -1
  289. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.mjs +0 -20
  290. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.mjs.map +0 -1
  291. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.mjs +0 -27
  292. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.mjs.map +0 -1
  293. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.mjs +0 -21
  294. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.mjs.map +0 -1
  295. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.mjs +0 -24
  296. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.mjs.map +0 -1
  297. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.mjs +0 -22
  298. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.mjs.map +0 -1
  299. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.mjs +0 -66
  300. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.mjs.map +0 -1
  301. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.mjs +0 -18
  302. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.mjs.map +0 -1
  303. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.mjs +0 -20
  304. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.mjs.map +0 -1
  305. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.mjs +0 -22
  306. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.mjs.map +0 -1
  307. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKey.mjs +0 -24
  308. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKey.mjs.map +0 -1
  309. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.mjs +0 -16
  310. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.mjs.map +0 -1
  311. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.mjs +0 -21
  312. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.mjs.map +0 -1
  313. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.mjs +0 -18
  314. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.mjs.map +0 -1
  315. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.mjs +0 -16
  316. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.mjs.map +0 -1
  317. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.mjs +0 -25
  318. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.mjs.map +0 -1
  319. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.mjs +0 -19
  320. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.mjs.map +0 -1
  321. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.mjs +0 -18
  322. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.mjs.map +0 -1
  323. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.mjs +0 -24
  324. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.mjs.map +0 -1
  325. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.mjs +0 -23
  326. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.mjs.map +0 -1
  327. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.mjs +0 -20
  328. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.mjs.map +0 -1
  329. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.mjs +0 -18
  330. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.mjs.map +0 -1
  331. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.mjs +0 -18
  332. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.mjs.map +0 -1
  333. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.mjs +0 -22
  334. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.mjs.map +0 -1
  335. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.mjs +0 -19
  336. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.mjs.map +0 -1
  337. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.mjs +0 -24
  338. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.mjs.map +0 -1
  339. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.mjs +0 -7
  340. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.mjs.map +0 -1
  341. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.mjs +0 -7
  342. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.mjs.map +0 -1
  343. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.mjs +0 -19
  344. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.mjs.map +0 -1
  345. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.mjs +0 -20
  346. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.mjs.map +0 -1
  347. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.mjs +0 -21
  348. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.mjs.map +0 -1
  349. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overArg.mjs +0 -18
  350. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overArg.mjs.map +0 -1
  351. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overRest.mjs +0 -28
  352. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overRest.mjs.map +0 -1
  353. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_parent.mjs +0 -18
  354. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_parent.mjs.map +0 -1
  355. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_root.mjs +0 -10
  356. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_root.mjs.map +0 -1
  357. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.mjs +0 -21
  358. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.mjs.map +0 -1
  359. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.mjs +0 -17
  360. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.mjs.map +0 -1
  361. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.mjs +0 -19
  362. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.mjs.map +0 -1
  363. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setToString.mjs +0 -16
  364. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setToString.mjs.map +0 -1
  365. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.mjs +0 -29
  366. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.mjs.map +0 -1
  367. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.mjs +0 -17
  368. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.mjs.map +0 -1
  369. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.mjs +0 -19
  370. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.mjs.map +0 -1
  371. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.mjs +0 -17
  372. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.mjs.map +0 -1
  373. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.mjs +0 -17
  374. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.mjs.map +0 -1
  375. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.mjs +0 -35
  376. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.mjs.map +0 -1
  377. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.mjs +0 -25
  378. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.mjs.map +0 -1
  379. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toKey.mjs +0 -20
  380. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toKey.mjs.map +0 -1
  381. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toSource.mjs +0 -25
  382. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toSource.mjs.map +0 -1
  383. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/constant.mjs +0 -29
  384. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/constant.mjs.map +0 -1
  385. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/eq.mjs +0 -40
  386. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/eq.mjs.map +0 -1
  387. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.mjs +0 -23
  388. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.mjs.map +0 -1
  389. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/identity.mjs +0 -24
  390. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/identity.mjs.map +0 -1
  391. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArguments.mjs +0 -36
  392. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArguments.mjs.map +0 -1
  393. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.mjs +0 -29
  394. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.mjs.map +0 -1
  395. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.mjs +0 -35
  396. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.mjs.map +0 -1
  397. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isBoolean.mjs +0 -29
  398. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isBoolean.mjs.map +0 -1
  399. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.mjs +0 -31
  400. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.mjs.map +0 -1
  401. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEqual.mjs +0 -37
  402. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEqual.mjs.map +0 -1
  403. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isFunction.mjs +0 -34
  404. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isFunction.mjs.map +0 -1
  405. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isLength.mjs +0 -36
  406. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isLength.mjs.map +0 -1
  407. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isMap.mjs +0 -27
  408. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isMap.mjs.map +0 -1
  409. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNil.mjs +0 -28
  410. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNil.mjs.map +0 -1
  411. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNull.mjs +0 -25
  412. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNull.mjs.map +0 -1
  413. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNumber.mjs +0 -38
  414. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNumber.mjs.map +0 -1
  415. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObject.mjs +0 -34
  416. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObject.mjs.map +0 -1
  417. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.mjs +0 -32
  418. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.mjs.map +0 -1
  419. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.mjs +0 -54
  420. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.mjs.map +0 -1
  421. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSet.mjs +0 -27
  422. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSet.mjs.map +0 -1
  423. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isString.mjs +0 -30
  424. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isString.mjs.map +0 -1
  425. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.mjs +0 -29
  426. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.mjs.map +0 -1
  427. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.mjs +0 -27
  428. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.mjs.map +0 -1
  429. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isUndefined.mjs +0 -25
  430. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isUndefined.mjs.map +0 -1
  431. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keys.mjs +0 -39
  432. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keys.mjs.map +0 -1
  433. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keysIn.mjs +0 -34
  434. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keysIn.mjs.map +0 -1
  435. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/last.mjs +0 -23
  436. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/last.mjs.map +0 -1
  437. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/memoize.mjs +0 -65
  438. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/memoize.mjs.map +0 -1
  439. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/omit.mjs +0 -52
  440. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/omit.mjs.map +0 -1
  441. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubArray.mjs +0 -26
  442. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubArray.mjs.map +0 -1
  443. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.mjs +0 -21
  444. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.mjs.map +0 -1
  445. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toString.mjs +0 -30
  446. package/dist/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toString.mjs.map +0 -1
  447. package/dist/node_modules/.pnpm/screenfull@6.0.2/node_modules/screenfull/index.mjs +0 -120
  448. package/dist/node_modules/.pnpm/screenfull@6.0.2/node_modules/screenfull/index.mjs.map +0 -1
  449. package/dist/node_modules/.pnpm/sortablejs@1.15.7/node_modules/sortablejs/modular/sortable.esm.mjs +0 -1925
  450. package/dist/node_modules/.pnpm/sortablejs@1.15.7/node_modules/sortablejs/modular/sortable.esm.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["TreeSelect"],"sources":["../../../src/components/treeSelect/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport TreeSelect, { faTreeSelectEmits, faTreeSelectProps } from \"./src/treeSelect\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 组合树结构浏览与选择交互的树选择器组件。 */\nexport const FaTreeSelect: TSXWithInstall<typeof TreeSelect> = withInstall(TreeSelect);\nexport default FaTreeSelect;\n\nexport { faTreeSelectProps, faTreeSelectEmits };\nexport type { FaTreeSelectSlots } from \"./src/treeSelect\";\n\n/** FaTreeSelect 暴露的组件实例类型。 */\nexport type FaTreeSelectInstance = InstanceType<typeof TreeSelect>;\n\n/** FaTreeSelect 的完整 Props 类型。 */\nexport type FaTreeSelectProps = ExtractPropTypes<typeof faTreeSelectProps>;\n\n/** FaTreeSelect 的 Emits 类型。 */\nexport type FaTreeSelectEmits = typeof faTreeSelectEmits;\n"],"mappings":";;;;AAMA,MAAa,eAAkD,YAAYA,kBAAU"}
1
+ {"version":3,"file":"index.mjs","names":["TreeSelect"],"sources":["../../../src/components/treeSelect/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport TreeSelect, { faTreeSelectEmits, faTreeSelectProps } from \"./src/treeSelect\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 组合树结构浏览与选择交互的树选择器组件。 */\nexport const FaTreeSelect: TSXWithInstall<typeof TreeSelect> = withInstall(TreeSelect);\nexport default FaTreeSelect;\n\nexport { faTreeSelectProps, faTreeSelectEmits };\nexport type { FaTreeSelectSlots } from \"./src/treeSelect\";\n\n/** FaTreeSelect 暴露的组件实例类型。 */\nexport type FaTreeSelectInstance = InstanceType<typeof TreeSelect>;\n\n/** FaTreeSelect 的完整 Props 类型。 */\nexport type FaTreeSelectProps = ExtractPropTypes<typeof faTreeSelectProps>;\n\n/** FaTreeSelect 的 Emits 类型。 */\nexport type FaTreeSelectEmits = typeof faTreeSelectEmits;\n"],"mappings":";;;;AAMA,MAAa,eAAkD,YAAYA,kBAAU"}
@@ -1,8 +1,9 @@
1
- import { type SelectComponentProps } from "../../select/src/select";
1
+ import type { FilterValue, SelectInstance, TreeInstance, TreeNodeData } from "element-plus";
2
+ import type { ComponentInternalInstance } from "vue";
2
3
  import type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from "../../select";
4
+ import type { SelectComponentProps } from "../../select/src/select";
5
+ import type { PagedInput } from "../../table";
3
6
  import type { FilterNodeMethodFunction, TreeNode } from "../../tree/src/tree.props";
4
- import type { SelectInstance, TreeInstance } from "element-plus";
5
- import type { ComponentInternalInstance } from "vue";
6
7
  /** FaTreeSelect 的运行时 Props 定义。 */
7
8
  export declare const faTreeSelectProps: {
8
9
  /** 树节点筛选方法。 */
@@ -107,15 +108,15 @@ export declare const faTreeSelectProps: {
107
108
  };
108
109
  /** @description 下拉框数据 */
109
110
  data: {
110
- type: import("vue").PropType<ElSelectorOutput<ElSelectorValue>[]>;
111
+ type: import("vue").PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
111
112
  default: () => ElSelectorOutput[];
112
113
  };
113
114
  /** @description 请求api */
114
115
  requestApi: {
115
- type: import("vue").PropType<(params?: unknown) => Promise<ElSelectorOutput[]>>;
116
+ type: import("vue").PropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[]>>;
116
117
  };
117
118
  /** 初始化参数 */
118
- initParam: import("vue").PropType<unknown>;
119
+ initParam: import("vue").PropType<string | number | PagedInput>;
119
120
  emptyText: {
120
121
  readonly type: import("vue").PropType<string>;
121
122
  readonly required: false;
@@ -174,7 +175,7 @@ export declare const faTreeSelectProps: {
174
175
  accordion: BooleanConstructor;
175
176
  indent: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 18, boolean>;
176
177
  icon: {
177
- readonly type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
178
+ readonly type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (... /** @description v-model绑定值 */args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
178
179
  readonly required: false;
179
180
  readonly validator: ((val: unknown) => boolean) | undefined;
180
181
  __epPropKey: true;
@@ -275,7 +276,7 @@ export declare const faTreeSelectEmits: {
275
276
  /** @description 数据改变 */
276
277
  dataChangeCallBack: (data: ElSelectorOutput[]) => boolean;
277
278
  /** @description 改变 */
278
- change: (_data: unknown, _value?: ElSelectorModelValue) => boolean;
279
+ change: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => boolean;
279
280
  /** @description 节点点击 */
280
281
  "node-click": (_data: ElSelectorOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent) => boolean;
281
282
  'check-change': (data: any, checked: boolean, indeterminate: boolean) => any;
@@ -429,15 +430,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
429
430
  };
430
431
  /** @description 下拉框数据 */
431
432
  data: {
432
- type: import("vue").PropType<ElSelectorOutput<ElSelectorValue>[]>;
433
+ type: import("vue").PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
433
434
  default: () => ElSelectorOutput[];
434
435
  };
435
436
  /** @description 请求api */
436
437
  requestApi: {
437
- type: import("vue").PropType<(params?: unknown) => Promise<ElSelectorOutput[]>>;
438
+ type: import("vue").PropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[]>>;
438
439
  };
439
440
  /** 初始化参数 */
440
- initParam: import("vue").PropType<unknown>;
441
+ initParam: import("vue").PropType<string | number | PagedInput>;
441
442
  emptyText: {
442
443
  readonly type: import("vue").PropType<string>;
443
444
  readonly required: false;
@@ -496,7 +497,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
496
497
  accordion: BooleanConstructor;
497
498
  indent: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 18, boolean>;
498
499
  icon: {
499
- readonly type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
500
+ readonly type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (... /** @description v-model绑定值 */args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
500
501
  readonly required: false;
501
502
  readonly validator: ((val: unknown) => boolean) | undefined;
502
503
  __epPropKey: true;
@@ -595,11 +596,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
595
596
  /** @description 获取当前选中的标签。 */
596
597
  selectedLabel: import("vue").ComputedRef<string | string[] | undefined>;
597
598
  /** @description 过滤所有树节点,过滤后的节点将被隐藏。 */
598
- filter: import("vue").ComputedRef<((value: import("element-plus").FilterValue) => void) | undefined>;
599
+ filter: import("vue").ComputedRef<((value: FilterValue) => void) | undefined>;
599
600
  /** @description 为节点设置新数据,只有设置 node-key 时可用。 */
600
601
  updateKeyChildren: import("vue").ComputedRef<((key: import("element-plus").TreeKey, data: import("element-plus").TreeData) => void) | undefined>;
601
602
  /** @description 获取当前选中的节点。 */
602
- getCheckedNodes: import("vue").ComputedRef<((leafOnly?: boolean, includeHalfChecked?: boolean) => import("element-plus").TreeNodeData[]) | undefined>;
603
+ getCheckedNodes: import("vue").ComputedRef<((leafOnly?: boolean, includeHalfChecked?: boolean) => TreeNodeData[]) | undefined>;
603
604
  /** @description 设置当前选中的节点。 */
604
605
  setCheckedNodes: import("vue").ComputedRef<((nodes: import("element-plus/es/components/tree/src/model/node.mjs").default[], leafOnly?: boolean) => void) | undefined>;
605
606
  /** @description 获取当前选中的节点 Key。 */
@@ -607,29 +608,29 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
607
608
  /** @description 设置当前选中的节点 Key。 */
608
609
  setCheckedKeys: import("vue").ComputedRef<((keys: import("element-plus").TreeKey[], leafOnly?: boolean) => void) | undefined>;
609
610
  /** @description 设置节点选中状态。 */
610
- setChecked: import("vue").ComputedRef<((data: import("element-plus").TreeKey | import("element-plus").TreeNodeData, checked: boolean, deep?: boolean) => void) | undefined>;
611
+ setChecked: import("vue").ComputedRef<((data: import("element-plus").TreeKey | TreeNodeData, checked: boolean, deep?: boolean) => void) | undefined>;
611
612
  /** @description 获取当前半选中的节点。 */
612
- getHalfCheckedNodes: import("vue").ComputedRef<(() => import("element-plus").TreeNodeData[]) | undefined>;
613
+ getHalfCheckedNodes: import("vue").ComputedRef<(() => TreeNodeData[]) | undefined>;
613
614
  /** @description 获取当前半选中的节点 Key。 */
614
615
  getHalfCheckedKeys: import("vue").ComputedRef<(() => import("element-plus").TreeKey[]) | undefined>;
615
616
  /** @description 获取当前节点 Key。 */
616
617
  getCurrentKey: import("vue").ComputedRef<(() => import("element-plus").TreeKey | null) | undefined>;
617
618
  /** @description 获取当前节点。 */
618
- getCurrentNode: import("vue").ComputedRef<(() => import("element-plus").TreeNodeData | null) | undefined>;
619
+ getCurrentNode: import("vue").ComputedRef<(() => TreeNodeData | null) | undefined>;
619
620
  /** @description 设置当前节点 Key。 */
620
621
  setCurrentKey: import("vue").ComputedRef<((key?: import("element-plus").TreeKey | null, shouldAutoExpandParent?: boolean) => void) | undefined>;
621
622
  /** @description 设置当前节点。 */
622
623
  setCurrentNode: import("vue").ComputedRef<((node: import("element-plus/es/components/tree/src/model/node.mjs").default, shouldAutoExpandParent?: boolean) => void) | undefined>;
623
624
  /** @description 根据数据或 Key 获取节点。 */
624
- getNode: import("vue").ComputedRef<((data: import("element-plus").TreeKey | import("element-plus").TreeNodeData) => import("element-plus/es/components/tree/src/model/node.mjs").default) | undefined>;
625
+ getNode: import("vue").ComputedRef<((data: import("element-plus").TreeKey | TreeNodeData) => import("element-plus/es/components/tree/src/model/node.mjs").default) | undefined>;
625
626
  /** @description 删除节点。 */
626
- remove: import("vue").ComputedRef<((data: import("element-plus").TreeNodeData | import("element-plus/es/components/tree/src/model/node.mjs").default) => void) | undefined>;
627
+ remove: import("vue").ComputedRef<((data: TreeNodeData | import("element-plus/es/components/tree/src/model/node.mjs").default) => void) | undefined>;
627
628
  /** @description 追加子节点。 */
628
- append: import("vue").ComputedRef<((data: import("element-plus").TreeNodeData, parentNode: import("element-plus").TreeNodeData | import("element-plus").TreeKey | import("element-plus/es/components/tree/src/model/node.mjs").default) => void) | undefined>;
629
+ append: import("vue").ComputedRef<((data: TreeNodeData, parentNode: TreeNodeData | import("element-plus").TreeKey | import("element-plus/es/components/tree/src/model/node.mjs").default) => void) | undefined>;
629
630
  /** @description 在指定节点前插入节点。 */
630
- insertBefore: import("vue").ComputedRef<((data: import("element-plus").TreeNodeData, refNode: import("element-plus").TreeKey | import("element-plus").TreeNodeData | import("element-plus/es/components/tree/src/model/node.mjs").default) => void) | undefined>;
631
+ insertBefore: import("vue").ComputedRef<((data: TreeNodeData, refNode: import("element-plus").TreeKey | TreeNodeData | import("element-plus/es/components/tree/src/model/node.mjs").default) => void) | undefined>;
631
632
  /** @description 在指定节点后插入节点。 */
632
- insertAfter: import("vue").ComputedRef<((data: import("element-plus").TreeNodeData, refNode: import("element-plus").TreeKey | import("element-plus").TreeNodeData | import("element-plus/es/components/tree/src/model/node.mjs").default) => void) | undefined>;
633
+ insertAfter: import("vue").ComputedRef<((data: TreeNodeData, refNode: import("element-plus").TreeKey | TreeNodeData | import("element-plus/es/components/tree/src/model/node.mjs").default) => void) | undefined>;
633
634
  /** @description Element Plus Tree 实例。 */
634
635
  treeRef: import("vue").ComputedRef<TreeInstance | undefined>;
635
636
  /** @description Element Plus Select 实例。 */
@@ -650,7 +651,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
650
651
  /** @description 数据改变 */
651
652
  dataChangeCallBack: (data: ElSelectorOutput[]) => boolean;
652
653
  /** @description 改变 */
653
- change: (_data: unknown, _value?: ElSelectorModelValue) => boolean;
654
+ change: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => boolean;
654
655
  /** @description 节点点击 */
655
656
  "node-click": (_data: ElSelectorOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent) => boolean;
656
657
  'check-change': (data: any, checked: boolean, indeterminate: boolean) => any;
@@ -778,15 +779,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
778
779
  };
779
780
  /** @description 下拉框数据 */
780
781
  data: {
781
- type: import("vue").PropType<ElSelectorOutput<ElSelectorValue>[]>;
782
+ type: import("vue").PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
782
783
  default: () => ElSelectorOutput[];
783
784
  };
784
785
  /** @description 请求api */
785
786
  requestApi: {
786
- type: import("vue").PropType<(params?: unknown) => Promise<ElSelectorOutput[]>>;
787
+ type: import("vue").PropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[]>>;
787
788
  };
788
789
  /** 初始化参数 */
789
- initParam: import("vue").PropType<unknown>;
790
+ initParam: import("vue").PropType<string | number | PagedInput>;
790
791
  emptyText: {
791
792
  readonly type: import("vue").PropType<string>;
792
793
  readonly required: false;
@@ -845,7 +846,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
845
846
  accordion: BooleanConstructor;
846
847
  indent: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 18, boolean>;
847
848
  icon: {
848
- readonly type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
849
+ readonly type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (... /** @description v-model绑定值 */args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown>>;
849
850
  readonly required: false;
850
851
  readonly validator: ((val: unknown) => boolean) | undefined;
851
852
  __epPropKey: true;
@@ -940,19 +941,19 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
940
941
  onBlur?: ((evt: FocusEvent) => any) | undefined;
941
942
  onFocus?: ((evt: FocusEvent) => any) | undefined;
942
943
  onClear?: (() => any) | undefined;
943
- onChange?: ((_data: unknown, _value?: ElSelectorModelValue) => any) | undefined;
944
+ onChange?: ((_data: ElSelectorOutput<ElSelectorValue, any> | ElSelectorOutput<ElSelectorValue, any>[] | null, _value?: ElSelectorModelValue) => any) | undefined;
944
945
  "onUpdate:modelValue"?: ((value: ElSelectorModelValue) => any) | undefined;
945
946
  "onEnd-reached"?: ((direction: import("element-plus").ScrollbarDirection) => any) | undefined;
946
947
  "onCurrent-change"?: ((data: any, node: import("element-plus/es/components/tree/src/model/node.mjs").default | null) => any) | undefined;
947
948
  "onVisible-change"?: ((visible: boolean) => any) | undefined;
948
949
  "onUpdate:label"?: ((value: string | string[] | null) => any) | undefined;
949
- onDataChangeCallBack?: ((data: ElSelectorOutput<ElSelectorValue>[]) => any) | undefined;
950
+ onDataChangeCallBack?: ((data: ElSelectorOutput<ElSelectorValue, any>[]) => any) | undefined;
950
951
  "onPopup-scroll"?: ((args_0: {
951
952
  scrollTop: number;
952
953
  scrollLeft: number;
953
954
  }) => any) | undefined;
954
955
  "onRemove-tag"?: ((val: unknown) => any) | undefined;
955
- "onNode-click"?: ((_data: ElSelectorOutput<ElSelectorValue>, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent) => any) | undefined;
956
+ "onNode-click"?: ((_data: ElSelectorOutput<ElSelectorValue, any>, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent) => any) | undefined;
956
957
  "onCheck-change"?: ((data: any, checked: boolean, indeterminate: boolean) => any) | undefined;
957
958
  "onNode-contextmenu"?: ((evt: Event, data: any, node: import("element-plus/es/components/tree/src/model/node.mjs").default, nodeInstance: ComponentInternalInstance | null) => any) | undefined;
958
959
  "onNode-collapse"?: ((data: any, node: import("element-plus/es/components/tree/src/model/node.mjs").default, nodeInstance: ComponentInternalInstance | null) => any) | undefined;
@@ -965,7 +966,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
965
966
  "onNode-drag-enter"?: ((draggingNode: import("element-plus/es/components/tree/src/model/node.mjs").default, dropNode: import("element-plus/es/components/tree/src/model/node.mjs").default, evt: DragEvent) => any) | undefined;
966
967
  "onNode-drag-over"?: ((draggingNode: import("element-plus/es/components/tree/src/model/node.mjs").default, dropNode: import("element-plus/es/components/tree/src/model/node.mjs").default, evt: DragEvent) => any) | undefined;
967
968
  }>, {
968
- data: ElSelectorOutput<ElSelectorValue>[];
969
+ data: ElSelectorOutput<ElSelectorValue, any>[];
969
970
  props: SelectComponentProps;
970
971
  offset: number;
971
972
  placement: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement) | ((new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement) | null)[], import("element-plus").Placement, unknown>;
@@ -5,17 +5,10 @@ import { definePropType, useProps } from "../../../utils/vue/props.mjs";
5
5
  import { useRender } from "../../../utils/vue/render.mjs";
6
6
  import { makeSlots } from "../../../utils/vue/slots.mjs";
7
7
  import { withDefineType } from "../../../utils/vue/with.mjs";
8
- import isArray from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.mjs";
9
- import isObject from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObject.mjs";
10
- import isString from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isString.mjs";
11
- import isBoolean from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isBoolean.mjs";
12
- import isEqual from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEqual.mjs";
13
- import isNumber from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNumber.mjs";
14
- import isNil from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNil.mjs";
15
- import isNull from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNull.mjs";
16
- import { useVModel } from "../../../node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.41_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.mjs";
17
8
  import { computed, createVNode, defineComponent, mergeProps, onMounted, reactive, ref, watch } from "vue";
18
9
  import { ElTreeSelect, selectEmits, selectProps, treeEmits, treeProps } from "element-plus";
10
+ import { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from "lodash-unified";
11
+ import { useVModel } from "@vueuse/core";
19
12
  //#region src/components/treeSelect/src/treeSelect.tsx
20
13
  const ElTreeSelectWithClear = ElTreeSelect;
21
14
  /** FaTreeSelect 的运行时 Props 定义。 */
@@ -1 +1 @@
1
- {"version":3,"file":"treeSelect.mjs","names":["update:modelValue","update:label","node-click"],"sources":["../../../../src/components/treeSelect/src/treeSelect.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ElTreeSelect, selectEmits, selectProps, treeEmits, treeProps } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport { type SelectComponentProps } from \"../../select/src/select\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select\";\nimport type { FilterNodeMethodFunction, FilterValue, TreeNode, TreeNodeData } from \"../../tree/src/tree.props\";\nimport type { SelectInstance, TreeInstance } from \"element-plus\";\nimport type { ComponentInternalInstance, VNode } from \"vue\";\n\n/** 补充 Element Plus TreeSelect 运行时支持但类型声明缺失的 clear 事件。 */\ntype ElTreeSelectWithClearType = typeof ElTreeSelect &\n\t(new () => {\n\t\t$props: InstanceType<typeof ElTreeSelect>[\"$props\"] & {\n\t\t\tonClear?: () => void;\n\t\t};\n\t});\n\nconst ElTreeSelectWithClear = ElTreeSelect as ElTreeSelectWithClearType;\n\n/** Element Plus TreeSelect 运行时实际暴露的方法集合。 */\ntype ElTreeSelectExposes = Pick<SelectInstance, \"focus\" | \"blur\" | \"selectedLabel\"> &\n\tPick<\n\t\tTreeInstance,\n\t\t| \"filter\"\n\t\t| \"updateKeyChildren\"\n\t\t| \"getCheckedNodes\"\n\t\t| \"setCheckedNodes\"\n\t\t| \"getCheckedKeys\"\n\t\t| \"setCheckedKeys\"\n\t\t| \"setChecked\"\n\t\t| \"getHalfCheckedNodes\"\n\t\t| \"getHalfCheckedKeys\"\n\t\t| \"getCurrentKey\"\n\t\t| \"getCurrentNode\"\n\t\t| \"setCurrentKey\"\n\t\t| \"setCurrentNode\"\n\t\t| \"getNode\"\n\t\t| \"remove\"\n\t\t| \"append\"\n\t\t| \"insertBefore\"\n\t\t| \"insertAfter\"\n\t> & {\n\t\ttreeRef: TreeInstance;\n\t\tselectRef: SelectInstance;\n\t};\n\n/** FaTreeSelect 的运行时 Props 定义。 */\nexport const faTreeSelectProps = {\n\t...selectProps,\n\t...treeProps,\n\t/** 树节点筛选方法。 */\n\tfilterNodeMethod: {\n\t\ttype: definePropType<FilterNodeMethodFunction>(Function),\n\t},\n\t/**\n\t * 懒加载节点的缓存数据,结构与数据相同,用于获取未加载数据的标签\n\t * @description The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data\n\t */\n\tcacheData: {\n\t\ttype: definePropType<\n\t\t\t{\n\t\t\t\tvalue: string | number | boolean | object;\n\t\t\t\tcurrentLabel: string | number;\n\t\t\t\tisDisabled: boolean;\n\t\t\t}[]\n\t\t>(Array),\n\t\tdefault: [] as {\n\t\t\tvalue: string | number | boolean | object;\n\t\t\tcurrentLabel: string | number;\n\t\t\tisDisabled: boolean;\n\t\t}[],\n\t},\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */\n\tnodeKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/** @description 是否默认展开所有节点 */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候选中节点 */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否高亮当前选中节点 */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。 */\n\texpandOnClickNode: Boolean,\n\t/** @description 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: (): Partial<SelectComponentProps> => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 下拉框数据 */\n\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: unknown) => Promise<ElSelectorOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<unknown>([String, Number, Object]),\n};\n\n/** FaTreeSelect 的运行时 Emits 定义。 */\nexport const faTreeSelectEmits = {\n\t...selectEmits,\n\t...treeEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value),\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n\t/** @description 改变 */\n\tchange: (_data: unknown, _value?: ElSelectorModelValue): boolean => true,\n\t/** @description 节点点击 */\n\t\"node-click\": (_data: ElSelectorOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent): boolean => true,\n};\n\n/** FaTreeSelect 的插槽参数。 */\nexport interface FaTreeSelectSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: TreeNode; data: ElSelectorOutput };\n\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n}\n\nexport default defineComponent({\n\tname: \"FaTreeSelect\",\n\tprops: faTreeSelectProps,\n\temits: faTreeSelectEmits,\n\tslots: makeSlots<FaTreeSelectSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: props.data?.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst treeSelectRef = ref<ElTreeSelectExposes>();\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item): ElSelectorOutput => {\n\t\t\t\t\tconst value = item[props.nodeKey];\n\t\t\t\t\tconst label = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst loadData = async (): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\tstate.selectorData = handleData(resData);\n\t\t\t\t\temit(\"dataChangeCallBack\", state.selectorData);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = handleData(props.data);\n\t\t\t}\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: TreeNode): boolean => {\n\t\t\tif (!value) return true;\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels = [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level && parentNode) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst filterText = typeof value === \"string\" || typeof value === \"number\" ? String(value) : \"\";\n\t\t\tconst result = labels.some((label) => label.includes(filterText));\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleChange = (value?: ElSelectorModelValue, data?: ElSelectorOutput): void => {\n\t\t\t// 判断是否为多选\n\t\t\tif (props.multiple) {\n\t\t\t\t// value 必然是数组\n\t\t\t\tconst valueArr = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueArr?.length === 0) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = state.selectorData.filter((item) => item.value !== undefined && valueArr.includes(item.value));\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = dataList.map((item) => item.label ?? \"\");\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t} else {\n\t\t\t\t// value 必然不是数组\n\t\t\t\tif (isNil(value)) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdata ??= state.selectorData.find((f) => f.value === value);\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = data?.label ?? null;\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", data ?? null, value);\n\t\t\t}\n\t\t};\n\n\t\tconst handleClear = (): void => {\n\t\t\tstate.value = null;\n\t\t\tselectedLabel.value = null;\n\t\t\temit(\"update:modelValue\", null);\n\t\t\temit(\"clear\");\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElSelectorOutput, node: TreeNode, instance: ComponentInternalInstance | null, event: MouseEvent): void => {\n\t\t\tif (!instance) return;\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (node.expanded && props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否开启了 checkStrictly\n\t\t\tif (props.checkStrictly) {\n\t\t\t\thandleChange(data.value, data);\n\t\t\t} else {\n\t\t\t\tif (node.isLeaf) {\n\t\t\t\t\thandleChange(data.value, data);\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"node-click\", data, node, instance, event);\n\t\t};\n\n\t\t/**\n\t\t * 下拉框出现/隐藏时触发\n\t\t */\n\t\tconst handleVisibleChange = async (visible: boolean): Promise<void> => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\t// 懒加载\n\t\t\t\t\tprops.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tconst firstItem = state.selectorData[0];\n\t\t\t\tif (firstItem?.value !== undefined) {\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\thandleChange([firstItem.value]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandleChange(firstItem.value, firstItem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否为本地数据\n\t\t\telse if (!props.requestApi && props.data?.length > 0) {\n\t\t\t\tstate.debut = false;\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\t// 判断是否非默认选中,且未启用懒加载\n\t\t\telse if (!props.lazy) {\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\twatch(\n\t\t\t\t() => props.initParam,\n\t\t\t\t(newValue, oldValue) => {\n\t\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\t\tif (!isNil(state.value)) {\n\t\t\t\t\t\t\thandleChange();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\t() => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\treturn loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elTreeSelectProps = useProps(props, { ...selectProps, ...treeProps }, [\n\t\t\t\"modelValue\",\n\t\t\t\"popperClass\",\n\t\t\t\"lazy\",\n\t\t\t\"loading\",\n\t\t\t\"expandOnClickNode\",\n\t\t\t\"filterNodeMethod\",\n\t\t\t\"props\",\n\t\t]);\n\t\tconst elTreeSelectEmits = useEmits({ ...selectEmits, ...treeEmits }, emit, [\"update:modelValue\", \"clear\", \"visible-change\", \"node-click\"]);\n\n\t\tuseRender(() => (\n\t\t\t<ElTreeSelectWithClear\n\t\t\t\t{...elTreeSelectProps.value}\n\t\t\t\t{...elTreeSelectEmits.value}\n\t\t\t\tref={treeSelectRef}\n\t\t\t\tclass=\"fa-tree-select\"\n\t\t\t\tpopperClass={[\"fa-tree-select-dropdown\", props.popperClass]}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tvModel={state.value}\n\t\t\t\tlazy={false}\n\t\t\t\tloading={state.loading}\n\t\t\t\tdata={state.selectorData}\n\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\tfilterNodeMethod={handleFilterNode as typeof props.filterNodeMethod}\n\t\t\t\tonNode-click={handleNodeClick}\n\t\t\t\tonClear={handleClear}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\t...(slots.default && {\n\t\t\t\t\t\tdefault: ({ node, data }: { node: TreeNode; data: ElSelectorOutput }): VNode[] => slots.default?.({ node, data }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t\t...(slots.header && { header: (): VNode[] => slots.header?.() ?? [] }),\n\t\t\t\t\t...(slots.footer && { footer: (): VNode[] => slots.footer?.() ?? [] }),\n\t\t\t\t\t...(slots.prefix && { prefix: (): VNode[] => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: (): VNode[] => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: (): VNode[] => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: (): VNode[] => slots.loading?.() ?? [] }),\n\t\t\t\t\t...(slots.label && {\n\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }): VNode[] =>\n\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElTreeSelectWithClear>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点。 */\n\t\t\tfocus: computed(() => treeSelectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框。 */\n\t\t\tblur: computed(() => treeSelectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签。 */\n\t\t\tselectedLabel: computed(() => treeSelectRef.value?.selectedLabel),\n\t\t\t/** @description 过滤所有树节点,过滤后的节点将被隐藏。 */\n\t\t\tfilter: computed(() => treeSelectRef.value?.filter),\n\t\t\t/** @description 为节点设置新数据,只有设置 node-key 时可用。 */\n\t\t\tupdateKeyChildren: computed(() => treeSelectRef.value?.updateKeyChildren),\n\t\t\t/** @description 获取当前选中的节点。 */\n\t\t\tgetCheckedNodes: computed(() => treeSelectRef.value?.getCheckedNodes),\n\t\t\t/** @description 设置当前选中的节点。 */\n\t\t\tsetCheckedNodes: computed(() => treeSelectRef.value?.setCheckedNodes),\n\t\t\t/** @description 获取当前选中的节点 Key。 */\n\t\t\tgetCheckedKeys: computed(() => treeSelectRef.value?.getCheckedKeys),\n\t\t\t/** @description 设置当前选中的节点 Key。 */\n\t\t\tsetCheckedKeys: computed(() => treeSelectRef.value?.setCheckedKeys),\n\t\t\t/** @description 设置节点选中状态。 */\n\t\t\tsetChecked: computed(() => treeSelectRef.value?.setChecked),\n\t\t\t/** @description 获取当前半选中的节点。 */\n\t\t\tgetHalfCheckedNodes: computed(() => treeSelectRef.value?.getHalfCheckedNodes),\n\t\t\t/** @description 获取当前半选中的节点 Key。 */\n\t\t\tgetHalfCheckedKeys: computed(() => treeSelectRef.value?.getHalfCheckedKeys),\n\t\t\t/** @description 获取当前节点 Key。 */\n\t\t\tgetCurrentKey: computed(() => treeSelectRef.value?.getCurrentKey),\n\t\t\t/** @description 获取当前节点。 */\n\t\t\tgetCurrentNode: computed(() => treeSelectRef.value?.getCurrentNode),\n\t\t\t/** @description 设置当前节点 Key。 */\n\t\t\tsetCurrentKey: computed(() => treeSelectRef.value?.setCurrentKey),\n\t\t\t/** @description 设置当前节点。 */\n\t\t\tsetCurrentNode: computed(() => treeSelectRef.value?.setCurrentNode),\n\t\t\t/** @description 根据数据或 Key 获取节点。 */\n\t\t\tgetNode: computed(() => treeSelectRef.value?.getNode),\n\t\t\t/** @description 删除节点。 */\n\t\t\tremove: computed(() => treeSelectRef.value?.remove),\n\t\t\t/** @description 追加子节点。 */\n\t\t\tappend: computed(() => treeSelectRef.value?.append),\n\t\t\t/** @description 在指定节点前插入节点。 */\n\t\t\tinsertBefore: computed(() => treeSelectRef.value?.insertBefore),\n\t\t\t/** @description 在指定节点后插入节点。 */\n\t\t\tinsertAfter: computed(() => treeSelectRef.value?.insertAfter),\n\t\t\t/** @description Element Plus Tree 实例。 */\n\t\t\ttreeRef: computed(() => treeSelectRef.value?.treeRef),\n\t\t\t/** @description Element Plus Select 实例。 */\n\t\t\tselectRef: computed(() => treeSelectRef.value?.selectRef),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleChange(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleChange(null),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,MAAM,wBAAwB;;AA8B9B,MAAa,oBAAoB;CAChC,GAAG;CACH,GAAG;;CAEH,kBAAkB,EACjB,MAAM,eAAyC,QAAQ,EACxD;;;;;CAKA,WAAW;EACV,MAAM,eAMJ,KAAK;EACP,SAAS,CAAA;CAKV;;CAEA,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM;EACN,SAAS;CACV;;CAEA,cAAc;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c,OAAO,MAAM;;GAElD,QAAQ,eAAe,cAAc,OAAO,MAAM;;GAElD,cAAc,eAAe,cAAc,OAAO,YAAY;;GAE9D,aAAa,eAAe,cAAc,OAAO,WAAW;;GAE5D,SAAS,eAAe,cAAc,OAAO,OAAO;;GAEpD,WAAW,eAAe,cAAc,OAAO,SAAS;;GAExD,SAAS,eAAe,MAAM,OAAO;;GAErC,SAAS;;GAET,eAAe,UAA2D,aAAa,KAAK;;GAE5F,sBAAsB,aAAa,IAAI;EACxC,CAAC;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"treeSelect.mjs","names":["update:modelValue","update:label","node-click"],"sources":["../../../../src/components/treeSelect/src/treeSelect.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ElTreeSelect, selectEmits, selectProps, treeEmits, treeProps } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { FilterValue, SelectInstance, TreeInstance, TreeNodeData } from \"element-plus\";\nimport type { ComponentInternalInstance, VNode } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select\";\nimport type { SelectComponentProps } from \"../../select/src/select\";\nimport type { PagedInput } from \"../../table\";\nimport type { FilterNodeMethodFunction, TreeNode } from \"../../tree/src/tree.props\";\n\n/** 补充 Element Plus TreeSelect 运行时支持但类型声明缺失的 clear 事件。 */\ntype ElTreeSelectWithClearType = typeof ElTreeSelect &\n\t(new () => {\n\t\t$props: InstanceType<typeof ElTreeSelect>[\"$props\"] & {\n\t\t\tonClear?: () => void;\n\t\t};\n\t});\n\nconst ElTreeSelectWithClear = ElTreeSelect as ElTreeSelectWithClearType;\n\n/** Element Plus TreeSelect 运行时实际暴露的方法集合。 */\ntype ElTreeSelectExposes = Pick<SelectInstance, \"focus\" | \"blur\" | \"selectedLabel\"> &\n\tPick<\n\t\tTreeInstance,\n\t\t| \"filter\"\n\t\t| \"updateKeyChildren\"\n\t\t| \"getCheckedNodes\"\n\t\t| \"setCheckedNodes\"\n\t\t| \"getCheckedKeys\"\n\t\t| \"setCheckedKeys\"\n\t\t| \"setChecked\"\n\t\t| \"getHalfCheckedNodes\"\n\t\t| \"getHalfCheckedKeys\"\n\t\t| \"getCurrentKey\"\n\t\t| \"getCurrentNode\"\n\t\t| \"setCurrentKey\"\n\t\t| \"setCurrentNode\"\n\t\t| \"getNode\"\n\t\t| \"remove\"\n\t\t| \"append\"\n\t\t| \"insertBefore\"\n\t\t| \"insertAfter\"\n\t> & {\n\t\ttreeRef: TreeInstance;\n\t\tselectRef: SelectInstance;\n\t};\n\n/** FaTreeSelect 的运行时 Props 定义。 */\nexport const faTreeSelectProps = {\n\t...selectProps,\n\t...treeProps,\n\t/** 树节点筛选方法。 */\n\tfilterNodeMethod: {\n\t\ttype: definePropType<FilterNodeMethodFunction>(Function),\n\t},\n\t/**\n\t * 懒加载节点的缓存数据,结构与数据相同,用于获取未加载数据的标签\n\t * @description The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data\n\t */\n\tcacheData: {\n\t\ttype: definePropType<\n\t\t\t{\n\t\t\t\tvalue: string | number | boolean | object;\n\t\t\t\tcurrentLabel: string | number;\n\t\t\t\tisDisabled: boolean;\n\t\t\t}[]\n\t\t>(Array),\n\t\tdefault: [] as {\n\t\t\tvalue: string | number | boolean | object;\n\t\t\tcurrentLabel: string | number;\n\t\t\tisDisabled: boolean;\n\t\t}[],\n\t},\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */\n\tnodeKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/** @description 是否默认展开所有节点 */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候选中节点 */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否高亮当前选中节点 */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。 */\n\texpandOnClickNode: Boolean,\n\t/** @description 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: (): Partial<SelectComponentProps> => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 下拉框数据 */\n\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput>([String, Number, Object]),\n};\n\n/** FaTreeSelect 的运行时 Emits 定义。 */\nexport const faTreeSelectEmits = {\n\t...selectEmits,\n\t...treeEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value),\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n\t/** @description 改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue): boolean => true,\n\t/** @description 节点点击 */\n\t\"node-click\": (_data: ElSelectorOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent): boolean => true,\n};\n\n/** FaTreeSelect 的插槽参数。 */\nexport interface FaTreeSelectSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: TreeNode; data: ElSelectorOutput };\n\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n}\n\nexport default defineComponent({\n\tname: \"FaTreeSelect\",\n\tprops: faTreeSelectProps,\n\temits: faTreeSelectEmits,\n\tslots: makeSlots<FaTreeSelectSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: props.data?.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst treeSelectRef = ref<ElTreeSelectExposes>();\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item): ElSelectorOutput => {\n\t\t\t\t\tconst value: unknown = item[props.nodeKey];\n\t\t\t\t\tconst label: unknown = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide: unknown = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled: unknown =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children: unknown = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst loadData = async (): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\tstate.selectorData = handleData(resData);\n\t\t\t\t\temit(\"dataChangeCallBack\", state.selectorData);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = handleData(props.data);\n\t\t\t}\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: TreeNode): boolean => {\n\t\t\tif (!value) return true;\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels = [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level && parentNode) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst filterText = typeof value === \"string\" || typeof value === \"number\" ? String(value) : \"\";\n\t\t\tconst result = labels.some((label) => label.includes(filterText));\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleChange = (value?: ElSelectorModelValue, data?: ElSelectorOutput): void => {\n\t\t\t// 判断是否为多选\n\t\t\tif (props.multiple) {\n\t\t\t\t// value 必然是数组\n\t\t\t\tconst valueArr = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueArr?.length === 0) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = state.selectorData.filter((item) => item.value !== undefined && valueArr.includes(item.value));\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = dataList.map((item) => item.label ?? \"\");\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t} else {\n\t\t\t\t// value 必然不是数组\n\t\t\t\tif (isNil(value)) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdata ??= state.selectorData.find((f) => f.value === value);\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = data?.label ?? null;\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", data ?? null, value);\n\t\t\t}\n\t\t};\n\n\t\tconst handleClear = (): void => {\n\t\t\tstate.value = null;\n\t\t\tselectedLabel.value = null;\n\t\t\temit(\"update:modelValue\", null);\n\t\t\temit(\"clear\");\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElSelectorOutput, node: TreeNode, instance: ComponentInternalInstance | null, event: MouseEvent): void => {\n\t\t\tif (!instance) return;\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (node.expanded && props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否开启了 checkStrictly\n\t\t\tif (props.checkStrictly) {\n\t\t\t\thandleChange(data.value, data);\n\t\t\t} else {\n\t\t\t\tif (node.isLeaf) {\n\t\t\t\t\thandleChange(data.value, data);\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"node-click\", data, node, instance, event);\n\t\t};\n\n\t\t/**\n\t\t * 下拉框出现/隐藏时触发\n\t\t */\n\t\tconst handleVisibleChange = async (visible: boolean): Promise<void> => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\t// 懒加载\n\t\t\t\t\tprops.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tconst firstItem = state.selectorData[0];\n\t\t\t\tif (firstItem?.value !== undefined) {\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\thandleChange([firstItem.value]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandleChange(firstItem.value, firstItem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否为本地数据\n\t\t\telse if (!props.requestApi && props.data?.length > 0) {\n\t\t\t\tstate.debut = false;\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\t// 判断是否非默认选中,且未启用懒加载\n\t\t\telse if (!props.lazy) {\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\twatch(\n\t\t\t\t() => props.initParam,\n\t\t\t\t(newValue, oldValue) => {\n\t\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\t\tif (!isNil(state.value)) {\n\t\t\t\t\t\t\thandleChange();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\t() => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\treturn loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elTreeSelectProps = useProps(props, { ...selectProps, ...treeProps }, [\n\t\t\t\"modelValue\",\n\t\t\t\"popperClass\",\n\t\t\t\"lazy\",\n\t\t\t\"loading\",\n\t\t\t\"expandOnClickNode\",\n\t\t\t\"filterNodeMethod\",\n\t\t\t\"props\",\n\t\t]);\n\t\tconst elTreeSelectEmits = useEmits({ ...selectEmits, ...treeEmits }, emit, [\"update:modelValue\", \"clear\", \"visible-change\", \"node-click\"]);\n\n\t\tuseRender(() => (\n\t\t\t<ElTreeSelectWithClear\n\t\t\t\t{...elTreeSelectProps.value}\n\t\t\t\t{...elTreeSelectEmits.value}\n\t\t\t\tref={treeSelectRef}\n\t\t\t\tclass=\"fa-tree-select\"\n\t\t\t\tpopperClass={[\"fa-tree-select-dropdown\", props.popperClass]}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tvModel={state.value}\n\t\t\t\tlazy={false}\n\t\t\t\tloading={state.loading}\n\t\t\t\tdata={state.selectorData}\n\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\tfilterNodeMethod={handleFilterNode as typeof props.filterNodeMethod}\n\t\t\t\tonNode-click={handleNodeClick}\n\t\t\t\tonClear={handleClear}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\t...(slots.default && {\n\t\t\t\t\t\tdefault: ({ node, data }: { node: TreeNode; data: ElSelectorOutput }): VNode[] => slots.default?.({ node, data }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t\t...(slots.header && { header: (): VNode[] => slots.header?.() ?? [] }),\n\t\t\t\t\t...(slots.footer && { footer: (): VNode[] => slots.footer?.() ?? [] }),\n\t\t\t\t\t...(slots.prefix && { prefix: (): VNode[] => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: (): VNode[] => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: (): VNode[] => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: (): VNode[] => slots.loading?.() ?? [] }),\n\t\t\t\t\t...(slots.label && {\n\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }): VNode[] =>\n\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElTreeSelectWithClear>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点。 */\n\t\t\tfocus: computed(() => treeSelectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框。 */\n\t\t\tblur: computed(() => treeSelectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签。 */\n\t\t\tselectedLabel: computed(() => treeSelectRef.value?.selectedLabel),\n\t\t\t/** @description 过滤所有树节点,过滤后的节点将被隐藏。 */\n\t\t\tfilter: computed(() => treeSelectRef.value?.filter),\n\t\t\t/** @description 为节点设置新数据,只有设置 node-key 时可用。 */\n\t\t\tupdateKeyChildren: computed(() => treeSelectRef.value?.updateKeyChildren),\n\t\t\t/** @description 获取当前选中的节点。 */\n\t\t\tgetCheckedNodes: computed(() => treeSelectRef.value?.getCheckedNodes),\n\t\t\t/** @description 设置当前选中的节点。 */\n\t\t\tsetCheckedNodes: computed(() => treeSelectRef.value?.setCheckedNodes),\n\t\t\t/** @description 获取当前选中的节点 Key。 */\n\t\t\tgetCheckedKeys: computed(() => treeSelectRef.value?.getCheckedKeys),\n\t\t\t/** @description 设置当前选中的节点 Key。 */\n\t\t\tsetCheckedKeys: computed(() => treeSelectRef.value?.setCheckedKeys),\n\t\t\t/** @description 设置节点选中状态。 */\n\t\t\tsetChecked: computed(() => treeSelectRef.value?.setChecked),\n\t\t\t/** @description 获取当前半选中的节点。 */\n\t\t\tgetHalfCheckedNodes: computed(() => treeSelectRef.value?.getHalfCheckedNodes),\n\t\t\t/** @description 获取当前半选中的节点 Key。 */\n\t\t\tgetHalfCheckedKeys: computed(() => treeSelectRef.value?.getHalfCheckedKeys),\n\t\t\t/** @description 获取当前节点 Key。 */\n\t\t\tgetCurrentKey: computed(() => treeSelectRef.value?.getCurrentKey),\n\t\t\t/** @description 获取当前节点。 */\n\t\t\tgetCurrentNode: computed(() => treeSelectRef.value?.getCurrentNode),\n\t\t\t/** @description 设置当前节点 Key。 */\n\t\t\tsetCurrentKey: computed(() => treeSelectRef.value?.setCurrentKey),\n\t\t\t/** @description 设置当前节点。 */\n\t\t\tsetCurrentNode: computed(() => treeSelectRef.value?.setCurrentNode),\n\t\t\t/** @description 根据数据或 Key 获取节点。 */\n\t\t\tgetNode: computed(() => treeSelectRef.value?.getNode),\n\t\t\t/** @description 删除节点。 */\n\t\t\tremove: computed(() => treeSelectRef.value?.remove),\n\t\t\t/** @description 追加子节点。 */\n\t\t\tappend: computed(() => treeSelectRef.value?.append),\n\t\t\t/** @description 在指定节点前插入节点。 */\n\t\t\tinsertBefore: computed(() => treeSelectRef.value?.insertBefore),\n\t\t\t/** @description 在指定节点后插入节点。 */\n\t\t\tinsertAfter: computed(() => treeSelectRef.value?.insertAfter),\n\t\t\t/** @description Element Plus Tree 实例。 */\n\t\t\ttreeRef: computed(() => treeSelectRef.value?.treeRef),\n\t\t\t/** @description Element Plus Select 实例。 */\n\t\t\tselectRef: computed(() => treeSelectRef.value?.selectRef),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleChange(value),\n\t\t\t/** @description 清除选择 */\n\t\t\t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EpE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,YAAY,eAAe,cAAc,OAAO,UAAU;;GAE1D,qBAAqB,eAAe,cAAc,OAAO,mBAAmB;;GAE5E,oBAAoB,eAAe,cAAc,OAAO,kBAAkB;;GAE1E,eAAe,eAAe,cAAc,OAAO,aAAa;;GAEhE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,eAAe,eAAe,cAAc,OAAO,aAAa;;GAEhE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,SAAS,eAAe,cAAc,OAAO,OAAO;;GAEpD,QAAQ,eAAe,cAAc,OAAO,MAAM;;GAElD,QAAQ,eAAe,cAAc,OAAO,MAAM;;GAElD,cAAc,eAAe,cAAc,OAAO,YAAY;;GAE9D,aAAa,eAAe,cAAc,OAAO,WAAW;;GAE5D,SAAS,eAAe,cAAc,OAAO,OAAO;;GAEpD,WAAW,eAAe,cAAc,OAAO,SAAS;;GAExD,SAAS,eAAe,MAAM,OAAO;;GAErC,SAAS;;GAET,eAAe,UAA2D,aAAa,KAAK;;GAE5F,sBAAsB,aAAa,IAAI;EACxC,CAAC;CACF;AACD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import Upload, { faUploadEmits, faUploadProps } from "./src/upload";
2
- import type { TSXWithInstall } from "../../utils";
3
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
4
  /** 统一上传校验、进度和文件列表处理的上传组件。 */
5
5
  export declare const FaUpload: TSXWithInstall<typeof Upload>;
6
6
  export default FaUpload;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Upload"],"sources":["../../../src/components/upload/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Upload, { faUploadEmits, faUploadProps } from \"./src/upload\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 统一上传校验、进度和文件列表处理的上传组件。 */\nexport const FaUpload: TSXWithInstall<typeof Upload> = withInstall(Upload);\nexport default FaUpload;\n\nexport { faUploadProps, faUploadEmits };\nexport type { FaUploadSlots } from \"./src/upload\";\n\n/** FaUpload 暴露的组件实例类型。 */\nexport type FaUploadInstance = InstanceType<typeof Upload>;\n\n/** FaUpload 的完整 Props 类型。 */\nexport type FaUploadProps = ExtractPropTypes<typeof faUploadProps>;\n\n/** FaUpload 的 Emits 类型。 */\nexport type FaUploadEmits = typeof faUploadEmits;\n"],"mappings":";;;;AAMA,MAAa,WAA0C,YAAYA,cAAM"}
1
+ {"version":3,"file":"index.mjs","names":["Upload"],"sources":["../../../src/components/upload/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Upload, { faUploadEmits, faUploadProps } from \"./src/upload\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 统一上传校验、进度和文件列表处理的上传组件。 */\nexport const FaUpload: TSXWithInstall<typeof Upload> = withInstall(Upload);\nexport default FaUpload;\n\nexport { faUploadProps, faUploadEmits };\nexport type { FaUploadSlots } from \"./src/upload\";\n\n/** FaUpload 暴露的组件实例类型。 */\nexport type FaUploadInstance = InstanceType<typeof Upload>;\n\n/** FaUpload 的完整 Props 类型。 */\nexport type FaUploadProps = ExtractPropTypes<typeof faUploadProps>;\n\n/** FaUpload 的 Emits 类型。 */\nexport type FaUploadEmits = typeof faUploadEmits;\n"],"mappings":";;;;AAMA,MAAa,WAA0C,YAAYA,cAAM"}
@@ -2,13 +2,11 @@ import { useExpose } from "../../../utils/vue/expose.mjs";
2
2
  import { definePropType, useProps } from "../../../utils/vue/props.mjs";
3
3
  import { useRender } from "../../../utils/vue/render.mjs";
4
4
  import { makeSlots } from "../../../utils/vue/slots.mjs";
5
- import isArray from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.mjs";
6
- import isString from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isString.mjs";
7
- import isNull from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNull.mjs";
8
5
  import { useUpload } from "./useUpload.mjs";
9
6
  import { Fragment, computed, createTextVNode, createVNode, defineComponent, mergeProps, ref, resolveDirective, withDirectives } from "vue";
10
7
  import { UploadFilled } from "@element-plus/icons-vue";
11
8
  import { ElIcon, ElUpload, uploadProps } from "element-plus";
9
+ import { isArray, isNull, isString } from "lodash-unified";
12
10
  //#region src/components/upload/src/upload.tsx
13
11
  /** FaUpload 的运行时 Props 定义。 */
14
12
  const faUploadProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"upload.mjs","names":["update:modelValue","update:fileList"],"sources":["../../../../src/components/upload/src/upload.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, ref } from \"vue\";\nimport { UploadFilled } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElUpload, uploadProps } from \"element-plus\";\nimport { isArray, isNull, isString } from \"lodash-unified\";\nimport { definePropType, makeSlots, useExpose, useProps, useRender } from \"../../../utils\";\nimport { useUpload } from \"./useUpload\";\nimport type { UploadFile, UploadInstance, UploadProps, UploadUserFile } from \"element-plus\";\nimport type { VNode } from \"vue\";\n\n/** FaUpload 的运行时 Props 定义。 */\nexport const faUploadProps = {\n\t...uploadProps,\n\t/** @description whether to activate drag and drop mode */\n\tdrag: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description maximum number of uploads allowed */\n\tlimit: {\n\t\ttype: Number,\n\t\tdefault: 1,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 大小限制,单位kb */\n\tmaxSize: {\n\t\ttype: definePropType<string | number>([String, Number]),\n\t\tdefault: 5120,\n\t},\n\t/** @description 图片上传接口,优先级最高 */\n\tuploadApi: {\n\t\ttype: definePropType<(formData: FormData) => Promise<string>>(Function),\n\t},\n\t/** @description 图片上传地址 */\n\tuploadUrl: String,\n};\n\n/** FaUpload 的运行时 Emits 定义。 */\nexport const faUploadEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description v-model:fileList 回调 */\n\t\"update:fileList\": (value: UploadUserFile[]): boolean => isArray(value),\n\t/** @description 改变 */\n\tchange: (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n};\n\n/** FaUpload 的插槽参数。 */\nexport interface FaUploadSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n\t/** @description 触发文件选择框的内容 */\n\ttrigger: never;\n\t/** @description 提示说明文字 */\n\ttip: never;\n\t/** @description 缩略图模板的内容 */\n\tfile: { file: UploadFile; index: number };\n}\n\nexport default defineComponent({\n\tname: \"FaUpload\",\n\tprops: faUploadProps,\n\temits: faUploadEmits,\n\tslots: makeSlots<FaUploadSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst {\n\t\t\tfileList,\n\t\t\tloading,\n\t\t\tformContext,\n\t\t\tmaxSizeMB,\n\t\t\thandleHttpRequest,\n\t\t\thandleOnSuccess,\n\t\t\thandleOnError,\n\t\t\thandleOnRemove,\n\t\t\thandleOnExceed,\n\t\t\thandleOnUpload,\n\t\t} = useUpload(\"FaUpload\", \"文件\", props, emit, {\n\t\t\tget maxSize() {\n\t\t\t\treturn props.maxSize;\n\t\t\t},\n\t\t\tget uploadApi() {\n\t\t\t\treturn props.uploadApi;\n\t\t\t},\n\t\t\tget uploadUrl() {\n\t\t\t\treturn props.uploadUrl || (props.action === uploadProps.action.default ? undefined : props.action);\n\t\t\t},\n\t\t});\n\n\t\tconst disabled = computed(() => {\n\t\t\treturn props.disabled === true || formContext?.disabled === true;\n\t\t});\n\n\t\tconst uploadRef = ref<UploadInstance>();\n\t\tconst httpRequest = computed(() => (props.httpRequest === uploadProps.httpRequest.default ? handleHttpRequest : props.httpRequest));\n\n\t\tconst handleOnChange: UploadProps[\"onChange\"] = (uploadFile, uploadFiles) => {\n\t\t\tif (uploadFile.status !== \"ready\") return;\n\n\t\t\tif (!handleOnUpload(uploadFile)) {\n\t\t\t\tfileList.value = fileList.value.filter((item) => item.uid !== uploadFile.uid);\n\t\t\t} else {\n\t\t\t\tprops.onChange?.(uploadFile, uploadFiles);\n\t\t\t}\n\t\t};\n\n\t\tconst handleBeforeUpload: UploadProps[\"beforeUpload\"] = (rawFile) => {\n\t\t\t// onChange 已完成首次校验;被移除的非法文件不能在自动上传流程中继续提交。\n\t\t\tif (!fileList.value.some((item) => item.uid === rawFile.uid) || !handleOnUpload(rawFile)) return false;\n\t\t\treturn props.beforeUpload?.(rawFile) ?? true;\n\t\t};\n\n\t\tconst elUploadProps = useProps(props, uploadProps, [\n\t\t\t\"fileList\",\n\t\t\t\"disabled\",\n\t\t\t\"httpRequest\",\n\t\t\t\"beforeUpload\",\n\t\t\t\"onExceed\",\n\t\t\t\"onSuccess\",\n\t\t\t\"onError\",\n\t\t\t\"onRemove\",\n\t\t\t\"onChange\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElUpload\n\t\t\t\t{...elUploadProps.value}\n\t\t\t\tref={uploadRef}\n\t\t\t\tclass={[\"fa-upload\", { \"fa-upload__default\": !slots.default }]}\n\t\t\t\tvLoading={loading.value}\n\t\t\t\tvModel:fileList={fileList.value}\n\t\t\t\tdisabled={disabled.value}\n\t\t\t\thttpRequest={httpRequest.value}\n\t\t\t\tbeforeUpload={handleBeforeUpload}\n\t\t\t\tonExceed={handleOnExceed}\n\t\t\t\tonSuccess={handleOnSuccess}\n\t\t\t\tonError={handleOnError}\n\t\t\t\tonRemove={handleOnRemove}\n\t\t\t\tonChange={handleOnChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\tslots.default ? (\n\t\t\t\t\t\t\tslots.default()\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<ElIcon class=\"el-icon--upload\">\n\t\t\t\t\t\t\t\t\t<UploadFilled />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t<div class=\"el-upload__text\">\n\t\t\t\t\t\t\t\t\tDrop file here or <em>click to upload</em>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t),\n\t\t\t\t\t...(slots.trigger && { trigger: (): VNode | VNode[] => slots.trigger?.() ?? [] }),\n\t\t\t\t\ttip: () =>\n\t\t\t\t\t\tslots.tip ? (\n\t\t\t\t\t\t\tslots.tip()\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class=\"el-upload__tip\">files with a size less than {maxSizeMB.value.toString()}MB</div>\n\t\t\t\t\t\t\t\t{!props.showFileList && fileList.value.length > 0 && (\n\t\t\t\t\t\t\t\t\t<div class=\"el-upload__tip\">\n\t\t\t\t\t\t\t\t\t\t{fileList.value.map((item, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t\t\t\t{item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t{fileList.value.length <= index && <br />}\n\t\t\t\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t),\n\t\t\t\t\t...(slots.file && {\n\t\t\t\t\t\tfile: ({ file, index }: { file: UploadFile; index: number }): VNode | VNode[] => slots.file?.({ file, index }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElUpload>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 取消上传请求 */\n\t\t\tabort: computed(() => uploadRef.value?.abort),\n\t\t\t/** @description 手动上传文件列表 */\n\t\t\tsubmit: computed(() => uploadRef.value?.submit),\n\t\t\t/** @description 清空已上传的文件列表(该方法不支持在 before-upload 中调用) */\n\t\t\tclearFiles: computed(() => uploadRef.value?.clearFiles),\n\t\t\t/** @description 手动选择文件 */\n\t\t\thandleStart: computed(() => uploadRef.value?.handleStart),\n\t\t\t/** @description 手动移除文件。file 和 rawFile 已被合并。 */\n\t\t\thandleRemove: computed(() => uploadRef.value?.handleRemove),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading,\n\t\t\t/** @description 文件集合 */\n\t\t\tfileList,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;AAUA,MAAa,gBAAgB;CAC5B,GAAG;;CAEH,MAAM;EACL,MAAM;EACN,SAAS;CACV;;CAEA,OAAO;EACN,MAAM;EACN,SAAS;CACV;;CAEA,YAAY,eAAyC,CAAC,QAAQ,KAAK,CAAC;;CAEpE,SAAS;EACR,MAAM,eAAgC,CAAC,QAAQ,MAAM,CAAC;EACtD,SAAS;CACV;;CAEA,WAAW,EACV,MAAM,eAAwD,QAAQ,EACvE;;CAEA,WAAW;AACZ;;AAGA,MAAa,gBAAgB;;CAE5B,sBAAsB,UAA6C,SAAS,KAAK,KAAK,QAAQ,KAAK,KAAK,OAAO,KAAK;;CAEpH,oBAAoB,UAAqC,QAAQ,KAAK;;CAEtE,SAAS,UAA6C,SAAS,KAAK,KAAK,QAAQ,KAAK,KAAK,OAAO,KAAK;AACxG;AAcA,IAAA,iBAAe,gBAAgB;CAC9B,MAAM;CACN,OAAO;CACP,OAAO;CACP,OAAO,UAAyB;CAChC,MAAM,OAAO,EAAE,OAAO,MAAM,UAAU;EACrC,MAAM,EACL,UACA,SACA,aACA,WACA,mBACA,iBACA,eACA,gBACA,gBACA,mBACG,UAAU,YAAY,MAAM,OAAO,MAAM;GAC5C,IAAI,UAAU;IACb,OAAO,MAAM;GACd;GACA,IAAI,YAAY;IACf,OAAO,MAAM;GACd;GACA,IAAI,YAAY;IACf,OAAO,MAAM,cAAc,MAAM,WAAW,YAAY,OAAO,UAAU,KAAA,IAAY,MAAM;GAC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AAA,iBAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;GAWjB,GAAI,MAAM,WAAW,EAAE,eAAgC,MAAM,UAAU,KAAK,CAAA,EAAG;GAC/E,WACC,MAAM,MACL,MAAM,IAAI,IAAC,YAAA,UAAA,MAAA,CAAA,YAAA,OAAA,EAAA,SAAA,iBAAA,GAAA;IAAA,gBAAA,8BAAA;IAG+C,UAAU,MAAM,SAAS;IAAC,gBAAA,IAAA;GAAA,CAAA,GAClF,CAAC,MAAM,gBAAgB,SAAS,MAAM,SAAS,KAAC,YAAA,OAAA,EAAA,SAAA,iBAAA,GAAA,CAE9C,SAAS,MAAM,KAAK,MAAM,UAAK,YAAA,UAAA,MAAA,CAE7B,KAAK,MACL,SAAS,MAAM,UAAU,SAAK,YAAA,MAAA,MAAA,IAAA,CAAU,CAAA,CAE1C,CAAC,CAAA,CAEH,CAAA;GAGJ,GAAI,MAAM,QAAQ,EACjB,OAAO,EAAE,MAAM,YAAkE,MAAM,OAAO;IAAE;IAAM;GAAM,CAAC,KAAK,CAAA,EACnH;EAAE,CAAA,GAAA,CAAA,CAAA,iBAAA,SAAA,GA9CO,QAAQ,KAAK,CAAA,CAAA,CAiDxB;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,UAAU,OAAO,KAAK;;GAE5C,QAAQ,eAAe,UAAU,OAAO,MAAM;;GAE9C,YAAY,eAAe,UAAU,OAAO,UAAU;;GAEtD,aAAa,eAAe,UAAU,OAAO,WAAW;;GAExD,cAAc,eAAe,UAAU,OAAO,YAAY;;GAE1D;;GAEA;EACD,CAAC;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"upload.mjs","names":["update:modelValue","update:fileList"],"sources":["../../../../src/components/upload/src/upload.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, ref } from \"vue\";\nimport { UploadFilled } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElUpload, uploadProps } from \"element-plus\";\nimport { isArray, isNull, isString } from \"lodash-unified\";\nimport { definePropType, makeSlots, useExpose, useProps, useRender } from \"../../../utils\";\nimport { useUpload } from \"./useUpload\";\nimport type { UploadFile, UploadInstance, UploadProps, UploadUserFile } from \"element-plus\";\nimport type { VNode } from \"vue\";\n\n/** FaUpload 的运行时 Props 定义。 */\nexport const faUploadProps = {\n\t...uploadProps,\n\t/** @description whether to activate drag and drop mode */\n\tdrag: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description maximum number of uploads allowed */\n\tlimit: {\n\t\ttype: Number,\n\t\tdefault: 1,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 大小限制,单位kb */\n\tmaxSize: {\n\t\ttype: definePropType<string | number>([String, Number]),\n\t\tdefault: 5120,\n\t},\n\t/** @description 图片上传接口,优先级最高 */\n\tuploadApi: {\n\t\ttype: definePropType<(formData: FormData) => Promise<string>>(Function),\n\t},\n\t/** @description 图片上传地址 */\n\tuploadUrl: String,\n};\n\n/** FaUpload 的运行时 Emits 定义。 */\nexport const faUploadEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description v-model:fileList 回调 */\n\t\"update:fileList\": (value: UploadUserFile[]): boolean => isArray(value),\n\t/** @description 改变 */\n\tchange: (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n};\n\n/** FaUpload 的插槽参数。 */\nexport interface FaUploadSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n\t/** @description 触发文件选择框的内容 */\n\ttrigger: never;\n\t/** @description 提示说明文字 */\n\ttip: never;\n\t/** @description 缩略图模板的内容 */\n\tfile: { file: UploadFile; index: number };\n}\n\nexport default defineComponent({\n\tname: \"FaUpload\",\n\tprops: faUploadProps,\n\temits: faUploadEmits,\n\tslots: makeSlots<FaUploadSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst {\n\t\t\tfileList,\n\t\t\tloading,\n\t\t\tformContext,\n\t\t\tmaxSizeMB,\n\t\t\thandleHttpRequest,\n\t\t\thandleOnSuccess,\n\t\t\thandleOnError,\n\t\t\thandleOnRemove,\n\t\t\thandleOnExceed,\n\t\t\thandleOnUpload,\n\t\t} = useUpload(\"FaUpload\", \"文件\", props, emit, {\n\t\t\tget maxSize() {\n\t\t\t\treturn props.maxSize;\n\t\t\t},\n\t\t\tget uploadApi() {\n\t\t\t\treturn props.uploadApi;\n\t\t\t},\n\t\t\tget uploadUrl() {\n\t\t\t\treturn props.uploadUrl || (props.action === uploadProps.action.default ? undefined : props.action);\n\t\t\t},\n\t\t});\n\n\t\tconst disabled = computed(() => {\n\t\t\treturn props.disabled === true || formContext?.disabled === true;\n\t\t});\n\n\t\tconst uploadRef = ref<UploadInstance>();\n\t\tconst httpRequest = computed(() => (props.httpRequest === uploadProps.httpRequest.default ? handleHttpRequest : props.httpRequest));\n\n\t\tconst handleOnChange: UploadProps[\"onChange\"] = (uploadFile, uploadFiles) => {\n\t\t\tif (uploadFile.status !== \"ready\") return;\n\n\t\t\tif (!handleOnUpload(uploadFile)) {\n\t\t\t\tfileList.value = fileList.value.filter((item) => item.uid !== uploadFile.uid);\n\t\t\t} else {\n\t\t\t\tprops.onChange?.(uploadFile, uploadFiles);\n\t\t\t}\n\t\t};\n\n\t\tconst handleBeforeUpload: UploadProps[\"beforeUpload\"] = (rawFile) => {\n\t\t\t// onChange 已完成首次校验;被移除的非法文件不能在自动上传流程中继续提交。\n\t\t\tif (!fileList.value.some((item) => item.uid === rawFile.uid) || !handleOnUpload(rawFile)) return false;\n\t\t\treturn props.beforeUpload?.(rawFile) ?? true;\n\t\t};\n\n\t\tconst elUploadProps = useProps(props, uploadProps, [\n\t\t\t\"fileList\",\n\t\t\t\"disabled\",\n\t\t\t\"httpRequest\",\n\t\t\t\"beforeUpload\",\n\t\t\t\"onExceed\",\n\t\t\t\"onSuccess\",\n\t\t\t\"onError\",\n\t\t\t\"onRemove\",\n\t\t\t\"onChange\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElUpload\n\t\t\t\t{...elUploadProps.value}\n\t\t\t\tref={uploadRef}\n\t\t\t\tclass={[\"fa-upload\", { \"fa-upload__default\": !slots.default }]}\n\t\t\t\tvLoading={loading.value}\n\t\t\t\tvModel:fileList={fileList.value}\n\t\t\t\tdisabled={disabled.value}\n\t\t\t\thttpRequest={httpRequest.value}\n\t\t\t\tbeforeUpload={handleBeforeUpload}\n\t\t\t\tonExceed={handleOnExceed}\n\t\t\t\tonSuccess={handleOnSuccess}\n\t\t\t\tonError={handleOnError}\n\t\t\t\tonRemove={handleOnRemove}\n\t\t\t\tonChange={handleOnChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\tslots.default ? (\n\t\t\t\t\t\t\tslots.default()\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<ElIcon class=\"el-icon--upload\">\n\t\t\t\t\t\t\t\t\t<UploadFilled />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t<div class=\"el-upload__text\">\n\t\t\t\t\t\t\t\t\tDrop file here or <em>click to upload</em>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t),\n\t\t\t\t\t...(slots.trigger && { trigger: (): VNode | VNode[] => slots.trigger?.() ?? [] }),\n\t\t\t\t\ttip: () =>\n\t\t\t\t\t\tslots.tip ? (\n\t\t\t\t\t\t\tslots.tip()\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class=\"el-upload__tip\">files with a size less than {maxSizeMB.value.toString()}MB</div>\n\t\t\t\t\t\t\t\t{!props.showFileList && fileList.value.length > 0 && (\n\t\t\t\t\t\t\t\t\t<div class=\"el-upload__tip\">\n\t\t\t\t\t\t\t\t\t\t{fileList.value.map((item, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t\t\t\t{item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t{fileList.value.length <= index && <br />}\n\t\t\t\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t),\n\t\t\t\t\t...(slots.file && {\n\t\t\t\t\t\tfile: ({ file, index }: { file: UploadFile; index: number }): VNode | VNode[] => slots.file?.({ file, index }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElUpload>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 取消上传请求 */\n\t\t\tabort: computed(() => uploadRef.value?.abort),\n\t\t\t/** @description 手动上传文件列表 */\n\t\t\tsubmit: computed(() => uploadRef.value?.submit),\n\t\t\t/** @description 清空已上传的文件列表(该方法不支持在 before-upload 中调用) */\n\t\t\tclearFiles: computed(() => uploadRef.value?.clearFiles),\n\t\t\t/** @description 手动选择文件 */\n\t\t\thandleStart: computed(() => uploadRef.value?.handleStart),\n\t\t\t/** @description 手动移除文件。file 和 rawFile 已被合并。 */\n\t\t\thandleRemove: computed(() => uploadRef.value?.handleRemove),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading,\n\t\t\t/** @description 文件集合 */\n\t\t\tfileList,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,gBAAgB;CAC5B,GAAG;;CAEH,MAAM;EACL,MAAM;EACN,SAAS;CACV;;CAEA,OAAO;EACN,MAAM;EACN,SAAS;CACV;;CAEA,YAAY,eAAyC,CAAC,QAAQ,KAAK,CAAC;;CAEpE,SAAS;EACR,MAAM,eAAgC,CAAC,QAAQ,MAAM,CAAC;EACtD,SAAS;CACV;;CAEA,WAAW,EACV,MAAM,eAAwD,QAAQ,EACvE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AAM,OAAO;IAAE;IAAM;GAAM,CAAC,KAAK,CAAA,EACnH;EAAE,CAAA,GAAA,CAAA,CAAA,iBAAA,SAAA,GA9CO,QAAQ,KAAK,CAAA,CAAA,CAiDxB;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,UAAU,OAAO,KAAK;;GAE5C,QAAQ,eAAe,UAAU,OAAO,MAAM;;GAE9C,YAAY,eAAe,UAAU,OAAO,UAAU;;GAEtD,aAAa,eAAe,UAAU,OAAO,WAAW;;GAExD,cAAc,eAAe,UAAU,OAAO,YAAY;;GAE1D;;GAEA;EACD,CAAC;CACF;AACD,CAAC"}
@@ -1,11 +1,9 @@
1
- import isArray from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.mjs";
2
- import isString from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isString.mjs";
3
- import isNumber from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNumber.mjs";
4
- import { useVModel } from "../../../node_modules/.pnpm/@vueuse_core@14.4.0_vue@3.5.41_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.mjs";
5
- import { Decimal } from "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.mjs";
6
1
  import { uploadUtil } from "../utils/upload.mjs";
7
2
  import { computed, inject, onMounted, ref, watch } from "vue";
8
3
  import { ElMessage, ElNotification, formContextKey, formItemContextKey, genFileId, uploadProps } from "element-plus";
4
+ import { isArray, isNumber, isString } from "lodash-unified";
5
+ import { useVModel } from "@vueuse/core";
6
+ import { Decimal } from "decimal.js";
9
7
  //#region src/components/upload/src/useUpload.ts
10
8
  /**
11
9
  * 创建上传组件共享的文件状态和操作方法。
@@ -1 +1 @@
1
- {"version":3,"file":"useUpload.mjs","names":[],"sources":["../../../../src/components/upload/src/useUpload.ts"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, inject, onMounted, ref, watch } from \"vue\";\nimport { ElMessage, ElNotification, formContextKey, formItemContextKey, genFileId, uploadProps } from \"element-plus\";\nimport { isArray, isNumber, isString } from \"lodash-unified\";\nimport { Decimal } from \"decimal.js\";\nimport { uploadUtil } from \"../utils/upload\";\nimport type {\n\tFormContext,\n\tFormItemContext,\n\tUploadFile,\n\tUploadFiles,\n\tUploadProps,\n\tUploadRawFile,\n\tUploadRequestOptions,\n\tUploadUserFile,\n} from \"element-plus\";\nimport type { ComputedRef, Ref, WritableComputedRef } from \"vue\";\n\ninterface UploadComposable {\n\tfileList: WritableComputedRef<UploadUserFile[]>;\n\tloading: Ref<boolean>;\n\tformContext: FormContext | undefined;\n\tformItemContext: FormItemContext | undefined;\n\tmaxSizeMB: ComputedRef<Decimal>;\n\thandleValue: () => void;\n\thandleHttpRequest: (options: UploadRequestOptions) => Promise<void>;\n\thandleOnSuccess: (fileUrl: string, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;\n\thandleOnError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;\n\thandleOnRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;\n\thandleOnExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;\n\thandleOnUpload: (file: UploadFile | UploadRawFile) => boolean;\n}\n\n/**\n * 创建上传组件共享的文件状态和操作方法。\n *\n * @param componentName - 组件名称。\n * @param fileTypeName - 文件类型名称。\n * @param props - 上传组件的 Props。\n * @param emit - 上传组件的事件触发器。\n * @param options - 文件大小和类型校验配置。\n * @returns 文件列表、加载状态和上传操作方法。\n */\nexport const useUpload = <T extends string | string[]>(\n\tcomponentName: string,\n\tfileTypeName: string,\n\tprops: Partial<UploadProps> & {\n\t\tmodelValue?: T | null;\n\t},\n\temit: ((event: \"update:fileList\", value: UploadUserFile[]) => void) &\n\t\t((event: \"update:modelValue\", value: T | null) => void) &\n\t\t((event: \"change\", value: T | null) => void),\n\tdata?: {\n\t\tmaxSize?: string | number;\n\t\tuploadApi?: (formData: FormData) => Promise<string>;\n\t\tuploadUrl?: string;\n\t}\n): UploadComposable => {\n\tconst fileListModel = useVModel(props, \"fileList\", emit, { passive: true });\n\tconst fileList = computed<UploadUserFile[]>({\n\t\tget: () => fileListModel.value ?? [],\n\t\tset: (value) => {\n\t\t\tfileListModel.value = value;\n\t\t},\n\t});\n\n\tconst loading = ref(false);\n\tlet activeUploadCount = 0;\n\n\t// 获取 el-form 组件上下文\n\tconst formContext = inject(formContextKey, undefined);\n\t// 获取 el-form-item 组件上下文\n\tconst formItemContext = inject(formItemContextKey, undefined);\n\n\tconst mbNum = new Decimal(1024);\n\tconst maxSizeKB = computed(() => new Decimal(isNumber(data?.maxSize) ? data.maxSize : Number(data?.maxSize)));\n\tconst maxSizeMB = computed(() => maxSizeKB.value.div(mbNum));\n\n\tonMounted(() => {\n\t\tif (!props.disabled && props.autoUpload && !data?.uploadApi && !data?.uploadUrl && props.httpRequest === uploadProps.httpRequest.default) {\n\t\t\tconsole.warn(`[Fast:${componentName}]`, \"uploadApi 和 uploadUrl 至少需要提供一个。\");\n\t\t}\n\t});\n\n\tconst handleValue = (files: UploadUserFile[] = fileList.value): void => {\n\t\tif (files.length > 0) {\n\t\t\tif (isString(props.modelValue)) {\n\t\t\t\tconst fileUrl = files[0]?.url;\n\t\t\t\tif (!fileUrl) return;\n\t\t\t\temit(\"update:modelValue\", fileUrl as T);\n\t\t\t\temit(\"change\", fileUrl as T);\n\t\t\t} else {\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tconst value = files.flatMap((item) => (item.url ? [item.url] : []));\n\t\t\t\t\temit(\"update:modelValue\", value as T);\n\t\t\t\t\temit(\"change\", value as T);\n\t\t\t\t} else {\n\t\t\t\t\tconst fileUrl = files[0]?.url;\n\t\t\t\t\tif (!fileUrl) return;\n\t\t\t\t\temit(\"update:modelValue\", fileUrl as T);\n\t\t\t\t\temit(\"change\", fileUrl as T);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\temit(\"update:modelValue\", null);\n\t\t\temit(\"change\", null);\n\t\t}\n\t};\n\n\tconst handleHttpRequest = async (options: UploadRequestOptions): Promise<void> => {\n\t\tconst propsData = options.data;\n\t\tif (!data?.uploadApi && !data?.uploadUrl) {\n\t\t\tconst error = new Error(`上传${fileTypeName}接口 uploadApi 或地址 uploadUrl 不能为空。`);\n\t\t\tElMessage.error(`上传${fileTypeName}Api或地址不能为空`);\n\t\t\tconsole.error(`[Fast:${componentName}]`, error.message);\n\t\t\treturn Promise.reject(error);\n\t\t}\n\t\tactiveUploadCount++;\n\t\tloading.value = true;\n\t\ttry {\n\t\t\tlet fileUrl: string;\n\t\t\tif (data?.uploadApi) {\n\t\t\t\tfileUrl = await uploadUtil.uploadFileByApi(data.uploadApi, options.file, options.filename, propsData);\n\t\t\t} else {\n\t\t\t\tconst headers =\n\t\t\t\t\toptions.headers instanceof Headers\n\t\t\t\t\t\t? options.headers\n\t\t\t\t\t\t: new Headers(\n\t\t\t\t\t\t\t\tObject.entries(options.headers).flatMap(([key, value]) =>\n\t\t\t\t\t\t\t\t\tvalue === null || value === undefined ? [] : [[key, String(value)] as [string, string]]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\tfileUrl = await uploadUtil.uploadFile(data?.uploadUrl ?? options.action, options.file, options.filename, propsData, {\n\t\t\t\t\theaders,\n\t\t\t\t\tmethod: options.method,\n\t\t\t\t\twithCredentials: options.withCredentials,\n\t\t\t\t});\n\t\t\t}\n\t\t\toptions.onSuccess(fileUrl);\n\t\t} finally {\n\t\t\tactiveUploadCount = Math.max(activeUploadCount - 1, 0);\n\t\t\tloading.value = activeUploadCount > 0;\n\t\t}\n\t};\n\n\tconst handleOnSuccess = (fileUrl: string, uploadFile: UploadFile, uploadFiles: UploadFiles): void => {\n\t\tif (!fileUrl) return;\n\t\tif (!props.multiple && uploadFiles.length > 1) {\n\t\t\tuploadFiles.shift();\n\t\t}\n\t\tuploadFile.url = fileUrl;\n\t\thandleValue();\n\t\t// 调用 el-form 内部的校验方法(可自动校验)\n\t\tif (formItemContext?.prop) void formContext?.validateField([formItemContext.prop]);\n\t\tElMessage.success(\"上传成功\");\n\t\tprops.onSuccess?.(fileUrl, uploadFile, uploadFiles);\n\t};\n\n\tconst handleOnError = (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles): void => {\n\t\tElNotification({\n\t\t\tmessage: `【${uploadFile.name}】${fileTypeName}上传失败,请您重新上传`,\n\t\t\ttype: \"error\",\n\t\t});\n\t\tprops.onError?.(error, uploadFile, uploadFiles);\n\t};\n\n\tconst handleOnRemove = (uploadFile: UploadFile, uploadFiles: UploadFiles): void => {\n\t\tfileList.value = uploadFiles;\n\t\thandleValue(uploadFiles);\n\t\tprops.onRemove?.(uploadFile, uploadFiles);\n\t};\n\n\tconst handleOnExceed = (files: File[], uploadFiles: UploadUserFile[]): void => {\n\t\tElMessage.warning(`最多只能上传 ${props.limit} 个${fileTypeName},请移除后再进行上传`);\n\t\tprops.onExceed?.(files, uploadFiles);\n\t};\n\n\tconst handleOnUpload = (file: UploadFile | UploadRawFile): boolean => {\n\t\tconst fileSizeKB = new Decimal(file.size ?? 0).div(mbNum);\n\n\t\tif (fileSizeKB.greaterThan(maxSizeKB.value)) {\n\t\t\tconsole.warn(`[Fast:${componentName}]`, `【${file.name}】${fileTypeName}上传大小不能超过 ${maxSizeMB.value.toString()}MB。`);\n\t\t\tElMessage.warning(`【${file.name}】${fileTypeName}上传大小不能超过 ${maxSizeMB.value.toString()}MB`);\n\t\t\treturn false;\n\t\t}\n\n\t\tconst rawFile = \"type\" in file ? file : file.raw;\n\t\tif (!rawFile) return false;\n\t\tif (!uploadUtil.matchesAccept(rawFile, props.accept)) {\n\t\t\tconst uploadFileNames = uploadUtil.detectFileType(props.accept ?? \"\");\n\t\t\tconsole.warn(`[Fast:${componentName}]`, `只允许上传【${uploadFileNames}】格式的${fileTypeName}。`);\n\t\t\tElMessage.warning(`只允许上传【${uploadFileNames}】格式的${fileTypeName}`);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\t/**\n\t * 监听 v-model 绑定数据\n\t */\n\twatch(\n\t\t() => props.modelValue,\n\t\t(newValue) => {\n\t\t\tif (newValue) {\n\t\t\t\tif (isArray(newValue)) {\n\t\t\t\t\tfileList.value = newValue.map((m) => {\n\t\t\t\t\t\tconst find = fileList.value.find((f) => f.url === m);\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tname: \"\",\n\t\t\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\t\t\tuid: find?.uid ?? genFileId(),\n\t\t\t\t\t\t\turl: m,\n\t\t\t\t\t\t};\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst find = fileList.value.find((f) => f.url === newValue);\n\t\t\t\t\tfileList.value = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"\",\n\t\t\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\t\t\tuid: find?.uid ?? genFileId(),\n\t\t\t\t\t\t\turl: newValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfileList.value = [];\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\timmediate: true,\n\t\t}\n\t);\n\n\treturn {\n\t\tfileList,\n\t\tloading,\n\t\tformContext,\n\t\tformItemContext,\n\t\tmaxSizeMB,\n\t\thandleValue,\n\t\thandleHttpRequest,\n\t\thandleOnSuccess,\n\t\thandleOnError,\n\t\thandleOnRemove,\n\t\thandleOnExceed,\n\t\thandleOnUpload,\n\t};\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2CA,MAAa,aACZ,eACA,cACA,OAGA,MAGA,SAKsB;CACtB,MAAM,gBAAgB,UAAU,OAAO,YAAY,MAAM,EAAE,SAAS,KAAK,CAAC;CAC1E,MAAM,WAAW,SAA2B;EAC3C,WAAW,cAAc,SAAS,CAAC;EACnC,MAAM,UAAU;GACf,cAAc,QAAQ;EACvB;CACD,CAAC;CAED,MAAM,UAAU,I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Q,QAAQ;IAC1D,SAAS,QAAQ,CAChB;KACC,MAAM;KACN,QAAQ;KACR,KAAK,MAAM,OAAO,UAAU;KAC5B,KAAK;IACN,CACD;GACD;EACD,OACC,SAAS,QAAQ,CAAC;CAEpB,GACA,EACC,WAAW,KACZ,CACD;CAEA,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD"}
1
+ {"version":3,"file":"useUpload.mjs","names":[],"sources":["../../../../src/components/upload/src/useUpload.ts"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, inject, onMounted, ref, watch } from \"vue\";\nimport { ElMessage, ElNotification, formContextKey, formItemContextKey, genFileId, uploadProps } from \"element-plus\";\nimport { isArray, isNumber, isString } from \"lodash-unified\";\nimport { Decimal } from \"decimal.js\";\nimport { uploadUtil } from \"../utils/upload\";\nimport type {\n\tFormContext,\n\tFormItemContext,\n\tUploadFile,\n\tUploadFiles,\n\tUploadProps,\n\tUploadRawFile,\n\tUploadRequestOptions,\n\tUploadUserFile,\n} from \"element-plus\";\nimport type { ComputedRef, Ref, WritableComputedRef } from \"vue\";\n\ninterface UploadComposable {\n\tfileList: WritableComputedRef<UploadUserFile[]>;\n\tloading: Ref<boolean>;\n\tformContext: FormContext | undefined;\n\tformItemContext: FormItemContext | undefined;\n\tmaxSizeMB: ComputedRef<Decimal>;\n\thandleValue: () => void;\n\thandleHttpRequest: (options: UploadRequestOptions) => Promise<void>;\n\thandleOnSuccess: (fileUrl: string, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;\n\thandleOnError: (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void;\n\thandleOnRemove: (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;\n\thandleOnExceed: (files: File[], uploadFiles: UploadUserFile[]) => void;\n\thandleOnUpload: (file: UploadFile | UploadRawFile) => boolean;\n}\n\n/**\n * 创建上传组件共享的文件状态和操作方法。\n *\n * @param componentName - 组件名称。\n * @param fileTypeName - 文件类型名称。\n * @param props - 上传组件的 Props。\n * @param emit - 上传组件的事件触发器。\n * @param options - 文件大小和类型校验配置。\n * @returns 文件列表、加载状态和上传操作方法。\n */\nexport const useUpload = <T extends string | string[]>(\n\tcomponentName: string,\n\tfileTypeName: string,\n\tprops: Partial<UploadProps> & {\n\t\tmodelValue?: T | null;\n\t},\n\temit: ((event: \"update:fileList\", value: UploadUserFile[]) => void) &\n\t\t((event: \"update:modelValue\", value: T | null) => void) &\n\t\t((event: \"change\", value: T | null) => void),\n\tdata?: {\n\t\tmaxSize?: string | number;\n\t\tuploadApi?: (formData: FormData) => Promise<string>;\n\t\tuploadUrl?: string;\n\t}\n): UploadComposable => {\n\tconst fileListModel = useVModel(props, \"fileList\", emit, { passive: true });\n\tconst fileList = computed<UploadUserFile[]>({\n\t\tget: () => fileListModel.value ?? [],\n\t\tset: (value) => {\n\t\t\tfileListModel.value = value;\n\t\t},\n\t});\n\n\tconst loading = ref(false);\n\tlet activeUploadCount = 0;\n\n\t// 获取 el-form 组件上下文\n\tconst formContext = inject(formContextKey, undefined);\n\t// 获取 el-form-item 组件上下文\n\tconst formItemContext = inject(formItemContextKey, undefined);\n\n\tconst mbNum = new Decimal(1024);\n\tconst maxSizeKB = computed(() => new Decimal(isNumber(data?.maxSize) ? data.maxSize : Number(data?.maxSize)));\n\tconst maxSizeMB = computed(() => maxSizeKB.value.div(mbNum));\n\n\tonMounted(() => {\n\t\tif (!props.disabled && props.autoUpload && !data?.uploadApi && !data?.uploadUrl && props.httpRequest === uploadProps.httpRequest.default) {\n\t\t\tconsole.warn(`[Fast:${componentName}]`, \"uploadApi 和 uploadUrl 至少需要提供一个。\");\n\t\t}\n\t});\n\n\tconst handleValue = (files: UploadUserFile[] = fileList.value): void => {\n\t\tif (files.length > 0) {\n\t\t\tif (isString(props.modelValue)) {\n\t\t\t\tconst fileUrl = files[0]?.url;\n\t\t\t\tif (!fileUrl) return;\n\t\t\t\temit(\"update:modelValue\", fileUrl as T);\n\t\t\t\temit(\"change\", fileUrl as T);\n\t\t\t} else {\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tconst value = files.flatMap((item) => (item.url ? [item.url] : []));\n\t\t\t\t\temit(\"update:modelValue\", value as T);\n\t\t\t\t\temit(\"change\", value as T);\n\t\t\t\t} else {\n\t\t\t\t\tconst fileUrl = files[0]?.url;\n\t\t\t\t\tif (!fileUrl) return;\n\t\t\t\t\temit(\"update:modelValue\", fileUrl as T);\n\t\t\t\t\temit(\"change\", fileUrl as T);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\temit(\"update:modelValue\", null);\n\t\t\temit(\"change\", null);\n\t\t}\n\t};\n\n\tconst handleHttpRequest = async (options: UploadRequestOptions): Promise<void> => {\n\t\tconst propsData = options.data;\n\t\tif (!data?.uploadApi && !data?.uploadUrl) {\n\t\t\tconst error = new Error(`上传${fileTypeName}接口 uploadApi 或地址 uploadUrl 不能为空。`);\n\t\t\tElMessage.error(`上传${fileTypeName}Api或地址不能为空`);\n\t\t\tconsole.error(`[Fast:${componentName}]`, error.message);\n\t\t\treturn Promise.reject(error);\n\t\t}\n\t\tactiveUploadCount++;\n\t\tloading.value = true;\n\t\ttry {\n\t\t\tlet fileUrl: string;\n\t\t\tif (data?.uploadApi) {\n\t\t\t\tfileUrl = await uploadUtil.uploadFileByApi(data.uploadApi, options.file, options.filename, propsData);\n\t\t\t} else {\n\t\t\t\tconst headers =\n\t\t\t\t\toptions.headers instanceof Headers\n\t\t\t\t\t\t? options.headers\n\t\t\t\t\t\t: new Headers(\n\t\t\t\t\t\t\t\tObject.entries(options.headers).flatMap(([key, value]) =>\n\t\t\t\t\t\t\t\t\tvalue === null || value === undefined ? [] : [[key, String(value)] as [string, string]]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\tfileUrl = await uploadUtil.uploadFile(data?.uploadUrl ?? options.action, options.file, options.filename, propsData, {\n\t\t\t\t\theaders,\n\t\t\t\t\tmethod: options.method,\n\t\t\t\t\twithCredentials: options.withCredentials,\n\t\t\t\t});\n\t\t\t}\n\t\t\toptions.onSuccess(fileUrl);\n\t\t} finally {\n\t\t\tactiveUploadCount = Math.max(activeUploadCount - 1, 0);\n\t\t\tloading.value = activeUploadCount > 0;\n\t\t}\n\t};\n\n\tconst handleOnSuccess = (fileUrl: string, uploadFile: UploadFile, uploadFiles: UploadFiles): void => {\n\t\tif (!fileUrl) return;\n\t\tif (!props.multiple && uploadFiles.length > 1) {\n\t\t\tuploadFiles.shift();\n\t\t}\n\t\tuploadFile.url = fileUrl;\n\t\thandleValue();\n\t\t// 调用 el-form 内部的校验方法(可自动校验)\n\t\tif (formItemContext?.prop) void formContext?.validateField([formItemContext.prop]);\n\t\tElMessage.success(\"上传成功\");\n\t\tprops.onSuccess?.(fileUrl, uploadFile, uploadFiles);\n\t};\n\n\tconst handleOnError = (error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles): void => {\n\t\tElNotification({\n\t\t\tmessage: `【${uploadFile.name}】${fileTypeName}上传失败,请您重新上传`,\n\t\t\ttype: \"error\",\n\t\t});\n\t\tprops.onError?.(error, uploadFile, uploadFiles);\n\t};\n\n\tconst handleOnRemove = (uploadFile: UploadFile, uploadFiles: UploadFiles): void => {\n\t\tfileList.value = uploadFiles;\n\t\thandleValue(uploadFiles);\n\t\tprops.onRemove?.(uploadFile, uploadFiles);\n\t};\n\n\tconst handleOnExceed = (files: File[], uploadFiles: UploadUserFile[]): void => {\n\t\tElMessage.warning(`最多只能上传 ${props.limit} 个${fileTypeName},请移除后再进行上传`);\n\t\tprops.onExceed?.(files, uploadFiles);\n\t};\n\n\tconst handleOnUpload = (file: UploadFile | UploadRawFile): boolean => {\n\t\tconst fileSizeKB = new Decimal(file.size ?? 0).div(mbNum);\n\n\t\tif (fileSizeKB.greaterThan(maxSizeKB.value)) {\n\t\t\tconsole.warn(`[Fast:${componentName}]`, `【${file.name}】${fileTypeName}上传大小不能超过 ${maxSizeMB.value.toString()}MB。`);\n\t\t\tElMessage.warning(`【${file.name}】${fileTypeName}上传大小不能超过 ${maxSizeMB.value.toString()}MB`);\n\t\t\treturn false;\n\t\t}\n\n\t\tconst rawFile = \"type\" in file ? file : file.raw;\n\t\tif (!rawFile) return false;\n\t\tif (!uploadUtil.matchesAccept(rawFile, props.accept)) {\n\t\t\tconst uploadFileNames = uploadUtil.detectFileType(props.accept ?? \"\");\n\t\t\tconsole.warn(`[Fast:${componentName}]`, `只允许上传【${uploadFileNames}】格式的${fileTypeName}。`);\n\t\t\tElMessage.warning(`只允许上传【${uploadFileNames}】格式的${fileTypeName}`);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\t/**\n\t * 监听 v-model 绑定数据\n\t */\n\twatch(\n\t\t() => props.modelValue,\n\t\t(newValue) => {\n\t\t\tif (newValue) {\n\t\t\t\tif (isArray(newValue)) {\n\t\t\t\t\tfileList.value = newValue.map((m) => {\n\t\t\t\t\t\tconst find = fileList.value.find((f) => f.url === m);\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tname: \"\",\n\t\t\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\t\t\tuid: find?.uid ?? genFileId(),\n\t\t\t\t\t\t\turl: m,\n\t\t\t\t\t\t};\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst find = fileList.value.find((f) => f.url === newValue);\n\t\t\t\t\tfileList.value = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"\",\n\t\t\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\t\t\tuid: find?.uid ?? genFileId(),\n\t\t\t\t\t\t\turl: newValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfileList.value = [];\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\timmediate: true,\n\t\t}\n\t);\n\n\treturn {\n\t\tfileList,\n\t\tloading,\n\t\tformContext,\n\t\tformItemContext,\n\t\tmaxSize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,aAAa,EAAE;GACtF,UAAU,QAAQ,SAAS,gBAAgB,MAAM,cAAc;GAC/D,OAAO;EACR;EAEA,OAAO;CACR;;;;CAKA,YACO,MAAM,aACX,aAAa;EACb,IAAI,UAAU;GACb,IAAI,QAAQ,QAAQ,GACnB,SAAS,QAAQ,SAAS,KAAK,MAAM;IAEpC,OAAO;KACN,MAAM;KACN,QAAQ;KACR,KAJY,SAAS,MAAM,MAAM,MAAM,EAAE,QAAQ,CAIzC,CAAC,EAAE,OAAO,UAAU;KAC5B,KAAK;IACN;GACD,CAAC;QACK;IACN,MAAM,OAAO,SAAS,MAAM,MAAM,MAAM,EAAE,QAAQ,QAAQ;IAC1D,SAAS,QAAQ,CAChB;KACC,MAAM;KACN,QAAQ;KACR,KAAK,MAAM,OAAO,UAAU;KAC5B,KAAK;IACN,CACD;GACD;EACD,OACC,SAAS,QAAQ,CAAC;CAEpB,GACA,EACC,WAAW,KACZ,CACD;CAEA,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD"}
@@ -1,6 +1,6 @@
1
1
  import UploadImage, { faUploadImageEmits, faUploadImageProps } from "./src/uploadImage";
2
- import type { TSXWithInstall } from "../../utils";
3
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
4
  /** 支持预览、校验和状态同步的单图片上传组件。 */
5
5
  export declare const FaUploadImage: TSXWithInstall<typeof UploadImage>;
6
6
  export default FaUploadImage;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["UploadImage"],"sources":["../../../src/components/uploadImage/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport UploadImage, { faUploadImageEmits, faUploadImageProps } from \"./src/uploadImage\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 支持预览、校验和状态同步的单图片上传组件。 */\nexport const FaUploadImage: TSXWithInstall<typeof UploadImage> = withInstall(UploadImage);\nexport default FaUploadImage;\n\nexport { faUploadImageProps, faUploadImageEmits };\nexport type { FaUploadImageSlots } from \"./src/uploadImage\";\n\n/** FaUploadImage 暴露的组件实例类型。 */\nexport type FaUploadImageInstance = InstanceType<typeof UploadImage>;\n\n/** FaUploadImage 的完整 Props 类型。 */\nexport type FaUploadImageProps = ExtractPropTypes<typeof faUploadImageProps>;\n\n/** FaUploadImage 的 Emits 类型。 */\nexport type FaUploadImageEmits = typeof faUploadImageEmits;\n"],"mappings":";;;;AAMA,MAAa,gBAAoD,YAAYA,mBAAW"}
1
+ {"version":3,"file":"index.mjs","names":["UploadImage"],"sources":["../../../src/components/uploadImage/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport UploadImage, { faUploadImageEmits, faUploadImageProps } from \"./src/uploadImage\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 支持预览、校验和状态同步的单图片上传组件。 */\nexport const FaUploadImage: TSXWithInstall<typeof UploadImage> = withInstall(UploadImage);\nexport default FaUploadImage;\n\nexport { faUploadImageProps, faUploadImageEmits };\nexport type { FaUploadImageSlots } from \"./src/uploadImage\";\n\n/** FaUploadImage 暴露的组件实例类型。 */\nexport type FaUploadImageInstance = InstanceType<typeof UploadImage>;\n\n/** FaUploadImage 的完整 Props 类型。 */\nexport type FaUploadImageProps = ExtractPropTypes<typeof faUploadImageProps>;\n\n/** FaUploadImage 的 Emits 类型。 */\nexport type FaUploadImageEmits = typeof faUploadImageEmits;\n"],"mappings":";;;;AAMA,MAAa,gBAAoD,YAAYA,mBAAW"}