fast-element-plus 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (558) hide show
  1. package/Fast.png +0 -0
  2. package/LICENSE +201 -0
  3. package/README.md +164 -0
  4. package/README.zh.md +164 -0
  5. package/dist/index.full.js +28446 -0
  6. package/dist/index.full.js.map +1 -0
  7. package/dist/index.full.min.js +36 -0
  8. package/dist/index.full.min.js.map +1 -0
  9. package/dist/index.full.min.mjs +36 -0
  10. package/dist/index.full.min.mjs.map +1 -0
  11. package/dist/index.full.mjs +28445 -0
  12. package/dist/index.full.mjs.map +1 -0
  13. package/dist/styles/index.css +984 -0
  14. package/dist/styles/index.css.map +1 -0
  15. package/es/component.d.ts +3 -0
  16. package/es/component.mjs +52 -0
  17. package/es/component.mjs.map +1 -0
  18. package/es/components/avatar/index.d.ts +14 -0
  19. package/es/components/avatar/index.mjs +8 -0
  20. package/es/components/avatar/index.mjs.map +1 -0
  21. package/es/components/avatar/src/avatar.d.ts +96 -0
  22. package/es/components/avatar/src/avatar.mjs +76 -0
  23. package/es/components/avatar/src/avatar.mjs.map +1 -0
  24. package/es/components/button/index.d.ts +15 -0
  25. package/es/components/button/index.mjs +11 -0
  26. package/es/components/button/index.mjs.map +1 -0
  27. package/es/components/button/src/button.d.ts +173 -0
  28. package/es/components/button/src/button.mjs +118 -0
  29. package/es/components/button/src/button.mjs.map +1 -0
  30. package/es/components/carNumber/index.d.ts +9 -0
  31. package/es/components/carNumber/index.mjs +12 -0
  32. package/es/components/carNumber/index.mjs.map +1 -0
  33. package/es/components/carNumber/src/carNumber.d.ts +217 -0
  34. package/es/components/carNumber/src/carNumber.mjs +164 -0
  35. package/es/components/carNumber/src/carNumber.mjs.map +1 -0
  36. package/es/components/carNumber/src/common.d.ts +15 -0
  37. package/es/components/carNumber/src/common.mjs +75 -0
  38. package/es/components/carNumber/src/common.mjs.map +1 -0
  39. package/es/components/contextMenu/index.d.ts +9 -0
  40. package/es/components/contextMenu/index.mjs +9 -0
  41. package/es/components/contextMenu/index.mjs.map +1 -0
  42. package/es/components/contextMenu/src/contextMenu.d.ts +32 -0
  43. package/es/components/contextMenu/src/contextMenu.mjs +85 -0
  44. package/es/components/contextMenu/src/contextMenu.mjs.map +1 -0
  45. package/es/components/contextMenu/src/contextMenu.type.d.ts +33 -0
  46. package/es/components/contextMenu/src/contextMenu.type.mjs +2 -0
  47. package/es/components/contextMenu/src/contextMenu.type.mjs.map +1 -0
  48. package/es/components/dialog/index.d.ts +14 -0
  49. package/es/components/dialog/index.mjs +11 -0
  50. package/es/components/dialog/index.mjs.map +1 -0
  51. package/es/components/dialog/src/dialog.d.ts +454 -0
  52. package/es/components/dialog/src/dialog.mjs +285 -0
  53. package/es/components/dialog/src/dialog.mjs.map +1 -0
  54. package/es/components/drawer/index.d.ts +14 -0
  55. package/es/components/drawer/index.mjs +8 -0
  56. package/es/components/drawer/index.mjs.map +1 -0
  57. package/es/components/drawer/src/drawer.d.ts +449 -0
  58. package/es/components/drawer/src/drawer.mjs +284 -0
  59. package/es/components/drawer/src/drawer.mjs.map +1 -0
  60. package/es/components/form/index.d.ts +23 -0
  61. package/es/components/form/index.mjs +19 -0
  62. package/es/components/form/index.mjs.map +1 -0
  63. package/es/components/form/src/form.d.ts +194 -0
  64. package/es/components/form/src/form.mjs +109 -0
  65. package/es/components/form/src/form.mjs.map +1 -0
  66. package/es/components/form/src/formItem.d.ts +190 -0
  67. package/es/components/form/src/formItem.mjs +117 -0
  68. package/es/components/form/src/formItem.mjs.map +1 -0
  69. package/es/components/form/utils/form.d.ts +81 -0
  70. package/es/components/form/utils/form.mjs +217 -0
  71. package/es/components/form/utils/form.mjs.map +1 -0
  72. package/es/components/formItemTip/index.d.ts +12 -0
  73. package/es/components/formItemTip/index.mjs +10 -0
  74. package/es/components/formItemTip/index.mjs.map +1 -0
  75. package/es/components/formItemTip/src/formItemTip.d.ts +22 -0
  76. package/es/components/formItemTip/src/formItemTip.mjs +38 -0
  77. package/es/components/formItemTip/src/formItemTip.mjs.map +1 -0
  78. package/es/components/icon/index.d.ts +12 -0
  79. package/es/components/icon/index.mjs +8 -0
  80. package/es/components/icon/index.mjs.map +1 -0
  81. package/es/components/icon/src/icon.d.ts +39 -0
  82. package/es/components/icon/src/icon.mjs +69 -0
  83. package/es/components/icon/src/icon.mjs.map +1 -0
  84. package/es/components/iconSelector/index.d.ts +7 -0
  85. package/es/components/iconSelector/index.mjs +8 -0
  86. package/es/components/iconSelector/index.mjs.map +1 -0
  87. package/es/components/iconSelector/src/iconSelector.d.ts +23 -0
  88. package/es/components/iconSelector/src/iconSelector.mjs +143 -0
  89. package/es/components/iconSelector/src/iconSelector.mjs.map +1 -0
  90. package/es/components/image/index.d.ts +12 -0
  91. package/es/components/image/index.mjs +10 -0
  92. package/es/components/image/index.mjs.map +1 -0
  93. package/es/components/image/src/image.d.ts +225 -0
  94. package/es/components/image/src/image.mjs +90 -0
  95. package/es/components/image/src/image.mjs.map +1 -0
  96. package/es/components/index.d.ts +21 -0
  97. package/es/components/index.mjs +100 -0
  98. package/es/components/index.mjs.map +1 -0
  99. package/es/components/layoutGrid/index.d.ts +16 -0
  100. package/es/components/layoutGrid/index.mjs +14 -0
  101. package/es/components/layoutGrid/index.mjs.map +1 -0
  102. package/es/components/layoutGrid/src/layoutGrid.d.ts +60 -0
  103. package/es/components/layoutGrid/src/layoutGrid.mjs +178 -0
  104. package/es/components/layoutGrid/src/layoutGrid.mjs.map +1 -0
  105. package/es/components/layoutGrid/src/layoutGrid.type.d.ts +12 -0
  106. package/es/components/layoutGrid/src/layoutGrid.type.mjs +2 -0
  107. package/es/components/layoutGrid/src/layoutGrid.type.mjs.map +1 -0
  108. package/es/components/layoutGrid/src/layoutGridItem.d.ts +100 -0
  109. package/es/components/layoutGrid/src/layoutGridItem.mjs +97 -0
  110. package/es/components/layoutGrid/src/layoutGridItem.mjs.map +1 -0
  111. package/es/components/select/index.d.ts +22 -0
  112. package/es/components/select/index.mjs +17 -0
  113. package/es/components/select/index.mjs.map +1 -0
  114. package/es/components/select/src/select.d.ts +1201 -0
  115. package/es/components/select/src/select.mjs +559 -0
  116. package/es/components/select/src/select.mjs.map +1 -0
  117. package/es/components/select/src/select.type.d.ts +28 -0
  118. package/es/components/select/src/select.type.mjs +2 -0
  119. package/es/components/select/src/select.type.mjs.map +1 -0
  120. package/es/components/select/src/selectOption.d.ts +99 -0
  121. package/es/components/select/src/selectOption.mjs +71 -0
  122. package/es/components/select/src/selectOption.mjs.map +1 -0
  123. package/es/components/selectPage/index.d.ts +14 -0
  124. package/es/components/selectPage/index.mjs +11 -0
  125. package/es/components/selectPage/index.mjs.map +1 -0
  126. package/es/components/selectPage/src/selectPage.d.ts +595 -0
  127. package/es/components/selectPage/src/selectPage.mjs +381 -0
  128. package/es/components/selectPage/src/selectPage.mjs.map +1 -0
  129. package/es/components/selectV2/index.d.ts +14 -0
  130. package/es/components/selectV2/index.mjs +11 -0
  131. package/es/components/selectV2/index.mjs.map +1 -0
  132. package/es/components/selectV2/src/selectV2.d.ts +1407 -0
  133. package/es/components/selectV2/src/selectV2.mjs +606 -0
  134. package/es/components/selectV2/src/selectV2.mjs.map +1 -0
  135. package/es/components/table/images/artwork.png.mjs +5 -0
  136. package/es/components/table/images/artwork.png.mjs.map +1 -0
  137. package/es/components/table/images/index.d.ts +4 -0
  138. package/es/components/table/images/notImage.png.mjs +5 -0
  139. package/es/components/table/images/notImage.png.mjs.map +1 -0
  140. package/es/components/table/index.d.ts +35 -0
  141. package/es/components/table/index.mjs +32 -0
  142. package/es/components/table/index.mjs.map +1 -0
  143. package/es/components/table/src/page.type.d.ts +145 -0
  144. package/es/components/table/src/page.type.mjs +16 -0
  145. package/es/components/table/src/page.type.mjs.map +1 -0
  146. package/es/components/table/src/table.d.ts +1382 -0
  147. package/es/components/table/src/table.mjs +1046 -0
  148. package/es/components/table/src/table.mjs.map +1 -0
  149. package/es/components/table/src/table.state.d.ts +115 -0
  150. package/es/components/table/src/table.state.mjs +2 -0
  151. package/es/components/table/src/table.state.mjs.map +1 -0
  152. package/es/components/table/src/table.type.d.ts +316 -0
  153. package/es/components/table/src/table.type.mjs +14 -0
  154. package/es/components/table/src/table.type.mjs.map +1 -0
  155. package/es/components/table/src/tableColumn.d.ts +644 -0
  156. package/es/components/table/src/tableColumn.mjs +604 -0
  157. package/es/components/table/src/tableColumn.mjs.map +1 -0
  158. package/es/components/table/src/tableColumnSettingDialog.d.ts +18 -0
  159. package/es/components/table/src/tableColumnSettingDialog.mjs +430 -0
  160. package/es/components/table/src/tableColumnSettingDialog.mjs.map +1 -0
  161. package/es/components/table/src/tablePagination.d.ts +24 -0
  162. package/es/components/table/src/tablePagination.mjs +56 -0
  163. package/es/components/table/src/tablePagination.mjs.map +1 -0
  164. package/es/components/table/src/tableSearchForm.d.ts +88 -0
  165. package/es/components/table/src/tableSearchForm.mjs +269 -0
  166. package/es/components/table/src/tableSearchForm.mjs.map +1 -0
  167. package/es/components/table/src/tableSearchFormItem.d.ts +37 -0
  168. package/es/components/table/src/tableSearchFormItem.mjs +121 -0
  169. package/es/components/table/src/tableSearchFormItem.mjs.map +1 -0
  170. package/es/components/table/src/useTable.d.ts +32 -0
  171. package/es/components/table/src/useTable.mjs +374 -0
  172. package/es/components/table/src/useTable.mjs.map +1 -0
  173. package/es/components/table/utils/table.d.ts +45 -0
  174. package/es/components/table/utils/table.mjs +122 -0
  175. package/es/components/table/utils/table.mjs.map +1 -0
  176. package/es/components/tree/index.d.ts +15 -0
  177. package/es/components/tree/index.mjs +12 -0
  178. package/es/components/tree/index.mjs.map +1 -0
  179. package/es/components/tree/src/tree.d.ts +668 -0
  180. package/es/components/tree/src/tree.mjs +364 -0
  181. package/es/components/tree/src/tree.mjs.map +1 -0
  182. package/es/components/tree/src/tree.props.d.ts +81 -0
  183. package/es/components/tree/src/tree.props.mjs +71 -0
  184. package/es/components/tree/src/tree.props.mjs.map +1 -0
  185. package/es/components/tree/src/tree.type.d.ts +36 -0
  186. package/es/components/tree/src/tree.type.mjs +2 -0
  187. package/es/components/tree/src/tree.type.mjs.map +1 -0
  188. package/es/components/treeSelect/index.d.ts +14 -0
  189. package/es/components/treeSelect/index.mjs +11 -0
  190. package/es/components/treeSelect/index.mjs.map +1 -0
  191. package/es/components/treeSelect/src/treeSelect.d.ts +1063 -0
  192. package/es/components/treeSelect/src/treeSelect.mjs +492 -0
  193. package/es/components/treeSelect/src/treeSelect.mjs.map +1 -0
  194. package/es/components/upload/index.d.ts +15 -0
  195. package/es/components/upload/index.mjs +11 -0
  196. package/es/components/upload/index.mjs.map +1 -0
  197. package/es/components/upload/src/upload.d.ts +525 -0
  198. package/es/components/upload/src/upload.mjs +140 -0
  199. package/es/components/upload/src/upload.mjs.map +1 -0
  200. package/es/components/upload/src/useUpload.d.ts +65 -0
  201. package/es/components/upload/src/useUpload.mjs +150 -0
  202. package/es/components/upload/src/useUpload.mjs.map +1 -0
  203. package/es/components/upload/utils/upload.d.ts +30 -0
  204. package/es/components/upload/utils/upload.mjs +119 -0
  205. package/es/components/upload/utils/upload.mjs.map +1 -0
  206. package/es/components/uploadImage/index.d.ts +14 -0
  207. package/es/components/uploadImage/index.mjs +11 -0
  208. package/es/components/uploadImage/index.mjs.map +1 -0
  209. package/es/components/uploadImage/src/uploadImage.d.ts +575 -0
  210. package/es/components/uploadImage/src/uploadImage.mjs +207 -0
  211. package/es/components/uploadImage/src/uploadImage.mjs.map +1 -0
  212. package/es/components/uploadImages/index.d.ts +14 -0
  213. package/es/components/uploadImages/index.mjs +8 -0
  214. package/es/components/uploadImages/index.mjs.map +1 -0
  215. package/es/components/uploadImages/src/uploadImages.d.ts +544 -0
  216. package/es/components/uploadImages/src/uploadImages.mjs +194 -0
  217. package/es/components/uploadImages/src/uploadImages.mjs.map +1 -0
  218. package/es/constants/index.d.ts +2 -0
  219. package/es/constants/index.mjs +7 -0
  220. package/es/constants/index.mjs.map +1 -0
  221. package/es/constants/mime.d.ts +61 -0
  222. package/es/constants/mime.mjs +62 -0
  223. package/es/constants/mime.mjs.map +1 -0
  224. package/es/constants/regex.d.ts +78 -0
  225. package/es/constants/regex.mjs +79 -0
  226. package/es/constants/regex.mjs.map +1 -0
  227. package/es/directive.d.ts +2 -0
  228. package/es/directive.mjs +11 -0
  229. package/es/directive.mjs.map +1 -0
  230. package/es/directives/click-copy/index.d.ts +2 -0
  231. package/es/directives/click-copy/index.mjs +36 -0
  232. package/es/directives/click-copy/index.mjs.map +1 -0
  233. package/es/directives/click-debounce/index.d.ts +2 -0
  234. package/es/directives/click-debounce/index.mjs +20 -0
  235. package/es/directives/click-debounce/index.mjs.map +1 -0
  236. package/es/directives/click-draggable/index.d.ts +2 -0
  237. package/es/directives/click-draggable/index.mjs +38 -0
  238. package/es/directives/click-draggable/index.mjs.map +1 -0
  239. package/es/directives/click-icon-copy/index.d.ts +2 -0
  240. package/es/directives/click-icon-copy/index.mjs +54 -0
  241. package/es/directives/click-icon-copy/index.mjs.map +1 -0
  242. package/es/directives/click-longpress/index.d.ts +2 -0
  243. package/es/directives/click-longpress/index.mjs +42 -0
  244. package/es/directives/click-longpress/index.mjs.map +1 -0
  245. package/es/directives/click-throttle/index.d.ts +2 -0
  246. package/es/directives/click-throttle/index.mjs +31 -0
  247. package/es/directives/click-throttle/index.mjs.map +1 -0
  248. package/es/directives/index.d.ts +6 -0
  249. package/es/directives/index.mjs +15 -0
  250. package/es/directives/index.mjs.map +1 -0
  251. package/es/element-plus.d.ts +2 -0
  252. package/es/element-plus.mjs +304 -0
  253. package/es/element-plus.mjs.map +1 -0
  254. package/es/hooks/index.d.ts +3 -0
  255. package/es/hooks/index.mjs +9 -0
  256. package/es/hooks/index.mjs.map +1 -0
  257. package/es/hooks/use-loading/index.d.ts +4 -0
  258. package/es/hooks/use-loading/index.mjs +34 -0
  259. package/es/hooks/use-loading/index.mjs.map +1 -0
  260. package/es/hooks/use-overlay/index.d.ts +4 -0
  261. package/es/hooks/use-overlay/index.mjs +26 -0
  262. package/es/hooks/use-overlay/index.mjs.map +1 -0
  263. package/es/hooks/use-screenFull/index.d.ts +7 -0
  264. package/es/hooks/use-screenFull/index.mjs +45 -0
  265. package/es/hooks/use-screenFull/index.mjs.map +1 -0
  266. package/es/index.d.ts +14 -0
  267. package/es/index.es.d.ts +6 -0
  268. package/es/index.mjs +138 -0
  269. package/es/index.mjs.map +1 -0
  270. package/es/make-installer.d.ts +6 -0
  271. package/es/make-installer.mjs +27 -0
  272. package/es/make-installer.mjs.map +1 -0
  273. package/es/version.d.ts +1 -0
  274. package/es/version.mjs +5 -0
  275. package/es/version.mjs.map +1 -0
  276. package/global.d.ts +2 -0
  277. package/lib/component.d.ts +3 -0
  278. package/lib/component.js +2 -0
  279. package/lib/component.js.map +1 -0
  280. package/lib/components/avatar/index.d.ts +14 -0
  281. package/lib/components/avatar/index.js +2 -0
  282. package/lib/components/avatar/index.js.map +1 -0
  283. package/lib/components/avatar/src/avatar.d.ts +96 -0
  284. package/lib/components/avatar/src/avatar.js +2 -0
  285. package/lib/components/avatar/src/avatar.js.map +1 -0
  286. package/lib/components/button/index.d.ts +15 -0
  287. package/lib/components/button/index.js +2 -0
  288. package/lib/components/button/index.js.map +1 -0
  289. package/lib/components/button/src/button.d.ts +173 -0
  290. package/lib/components/button/src/button.js +2 -0
  291. package/lib/components/button/src/button.js.map +1 -0
  292. package/lib/components/carNumber/index.d.ts +9 -0
  293. package/lib/components/carNumber/index.js +2 -0
  294. package/lib/components/carNumber/index.js.map +1 -0
  295. package/lib/components/carNumber/src/carNumber.d.ts +217 -0
  296. package/lib/components/carNumber/src/carNumber.js +2 -0
  297. package/lib/components/carNumber/src/carNumber.js.map +1 -0
  298. package/lib/components/carNumber/src/common.d.ts +15 -0
  299. package/lib/components/carNumber/src/common.js +2 -0
  300. package/lib/components/carNumber/src/common.js.map +1 -0
  301. package/lib/components/contextMenu/index.d.ts +9 -0
  302. package/lib/components/contextMenu/index.js +2 -0
  303. package/lib/components/contextMenu/index.js.map +1 -0
  304. package/lib/components/contextMenu/src/contextMenu.d.ts +32 -0
  305. package/lib/components/contextMenu/src/contextMenu.js +2 -0
  306. package/lib/components/contextMenu/src/contextMenu.js.map +1 -0
  307. package/lib/components/contextMenu/src/contextMenu.type.d.ts +33 -0
  308. package/lib/components/contextMenu/src/contextMenu.type.js +2 -0
  309. package/lib/components/contextMenu/src/contextMenu.type.js.map +1 -0
  310. package/lib/components/dialog/index.d.ts +14 -0
  311. package/lib/components/dialog/index.js +2 -0
  312. package/lib/components/dialog/index.js.map +1 -0
  313. package/lib/components/dialog/src/dialog.d.ts +454 -0
  314. package/lib/components/dialog/src/dialog.js +2 -0
  315. package/lib/components/dialog/src/dialog.js.map +1 -0
  316. package/lib/components/drawer/index.d.ts +14 -0
  317. package/lib/components/drawer/index.js +2 -0
  318. package/lib/components/drawer/index.js.map +1 -0
  319. package/lib/components/drawer/src/drawer.d.ts +449 -0
  320. package/lib/components/drawer/src/drawer.js +2 -0
  321. package/lib/components/drawer/src/drawer.js.map +1 -0
  322. package/lib/components/form/index.d.ts +23 -0
  323. package/lib/components/form/index.js +2 -0
  324. package/lib/components/form/index.js.map +1 -0
  325. package/lib/components/form/src/form.d.ts +194 -0
  326. package/lib/components/form/src/form.js +2 -0
  327. package/lib/components/form/src/form.js.map +1 -0
  328. package/lib/components/form/src/formItem.d.ts +190 -0
  329. package/lib/components/form/src/formItem.js +2 -0
  330. package/lib/components/form/src/formItem.js.map +1 -0
  331. package/lib/components/form/utils/form.d.ts +81 -0
  332. package/lib/components/form/utils/form.js +2 -0
  333. package/lib/components/form/utils/form.js.map +1 -0
  334. package/lib/components/formItemTip/index.d.ts +12 -0
  335. package/lib/components/formItemTip/index.js +2 -0
  336. package/lib/components/formItemTip/index.js.map +1 -0
  337. package/lib/components/formItemTip/src/formItemTip.d.ts +22 -0
  338. package/lib/components/formItemTip/src/formItemTip.js +2 -0
  339. package/lib/components/formItemTip/src/formItemTip.js.map +1 -0
  340. package/lib/components/icon/index.d.ts +12 -0
  341. package/lib/components/icon/index.js +2 -0
  342. package/lib/components/icon/index.js.map +1 -0
  343. package/lib/components/icon/src/icon.d.ts +39 -0
  344. package/lib/components/icon/src/icon.js +2 -0
  345. package/lib/components/icon/src/icon.js.map +1 -0
  346. package/lib/components/iconSelector/index.d.ts +7 -0
  347. package/lib/components/iconSelector/index.js +2 -0
  348. package/lib/components/iconSelector/index.js.map +1 -0
  349. package/lib/components/iconSelector/src/iconSelector.d.ts +23 -0
  350. package/lib/components/iconSelector/src/iconSelector.js +2 -0
  351. package/lib/components/iconSelector/src/iconSelector.js.map +1 -0
  352. package/lib/components/image/index.d.ts +12 -0
  353. package/lib/components/image/index.js +2 -0
  354. package/lib/components/image/index.js.map +1 -0
  355. package/lib/components/image/src/image.d.ts +225 -0
  356. package/lib/components/image/src/image.js +2 -0
  357. package/lib/components/image/src/image.js.map +1 -0
  358. package/lib/components/index.d.ts +21 -0
  359. package/lib/components/index.js +2 -0
  360. package/lib/components/index.js.map +1 -0
  361. package/lib/components/layoutGrid/index.d.ts +16 -0
  362. package/lib/components/layoutGrid/index.js +2 -0
  363. package/lib/components/layoutGrid/index.js.map +1 -0
  364. package/lib/components/layoutGrid/src/layoutGrid.d.ts +60 -0
  365. package/lib/components/layoutGrid/src/layoutGrid.js +2 -0
  366. package/lib/components/layoutGrid/src/layoutGrid.js.map +1 -0
  367. package/lib/components/layoutGrid/src/layoutGrid.type.d.ts +12 -0
  368. package/lib/components/layoutGrid/src/layoutGrid.type.js +2 -0
  369. package/lib/components/layoutGrid/src/layoutGrid.type.js.map +1 -0
  370. package/lib/components/layoutGrid/src/layoutGridItem.d.ts +100 -0
  371. package/lib/components/layoutGrid/src/layoutGridItem.js +2 -0
  372. package/lib/components/layoutGrid/src/layoutGridItem.js.map +1 -0
  373. package/lib/components/select/index.d.ts +22 -0
  374. package/lib/components/select/index.js +2 -0
  375. package/lib/components/select/index.js.map +1 -0
  376. package/lib/components/select/src/select.d.ts +1201 -0
  377. package/lib/components/select/src/select.js +2 -0
  378. package/lib/components/select/src/select.js.map +1 -0
  379. package/lib/components/select/src/select.type.d.ts +28 -0
  380. package/lib/components/select/src/select.type.js +2 -0
  381. package/lib/components/select/src/select.type.js.map +1 -0
  382. package/lib/components/select/src/selectOption.d.ts +99 -0
  383. package/lib/components/select/src/selectOption.js +2 -0
  384. package/lib/components/select/src/selectOption.js.map +1 -0
  385. package/lib/components/selectPage/index.d.ts +14 -0
  386. package/lib/components/selectPage/index.js +2 -0
  387. package/lib/components/selectPage/index.js.map +1 -0
  388. package/lib/components/selectPage/src/selectPage.d.ts +595 -0
  389. package/lib/components/selectPage/src/selectPage.js +2 -0
  390. package/lib/components/selectPage/src/selectPage.js.map +1 -0
  391. package/lib/components/selectV2/index.d.ts +14 -0
  392. package/lib/components/selectV2/index.js +2 -0
  393. package/lib/components/selectV2/index.js.map +1 -0
  394. package/lib/components/selectV2/src/selectV2.d.ts +1407 -0
  395. package/lib/components/selectV2/src/selectV2.js +2 -0
  396. package/lib/components/selectV2/src/selectV2.js.map +1 -0
  397. package/lib/components/table/images/artwork.png.js +2 -0
  398. package/lib/components/table/images/artwork.png.js.map +1 -0
  399. package/lib/components/table/images/index.d.ts +4 -0
  400. package/lib/components/table/images/notImage.png.js +2 -0
  401. package/lib/components/table/images/notImage.png.js.map +1 -0
  402. package/lib/components/table/index.d.ts +35 -0
  403. package/lib/components/table/index.js +2 -0
  404. package/lib/components/table/index.js.map +1 -0
  405. package/lib/components/table/src/page.type.d.ts +145 -0
  406. package/lib/components/table/src/page.type.js +2 -0
  407. package/lib/components/table/src/page.type.js.map +1 -0
  408. package/lib/components/table/src/table.d.ts +1382 -0
  409. package/lib/components/table/src/table.js +2 -0
  410. package/lib/components/table/src/table.js.map +1 -0
  411. package/lib/components/table/src/table.state.d.ts +115 -0
  412. package/lib/components/table/src/table.state.js +2 -0
  413. package/lib/components/table/src/table.state.js.map +1 -0
  414. package/lib/components/table/src/table.type.d.ts +316 -0
  415. package/lib/components/table/src/table.type.js +2 -0
  416. package/lib/components/table/src/table.type.js.map +1 -0
  417. package/lib/components/table/src/tableColumn.d.ts +644 -0
  418. package/lib/components/table/src/tableColumn.js +2 -0
  419. package/lib/components/table/src/tableColumn.js.map +1 -0
  420. package/lib/components/table/src/tableColumnSettingDialog.d.ts +18 -0
  421. package/lib/components/table/src/tableColumnSettingDialog.js +2 -0
  422. package/lib/components/table/src/tableColumnSettingDialog.js.map +1 -0
  423. package/lib/components/table/src/tablePagination.d.ts +24 -0
  424. package/lib/components/table/src/tablePagination.js +2 -0
  425. package/lib/components/table/src/tablePagination.js.map +1 -0
  426. package/lib/components/table/src/tableSearchForm.d.ts +88 -0
  427. package/lib/components/table/src/tableSearchForm.js +2 -0
  428. package/lib/components/table/src/tableSearchForm.js.map +1 -0
  429. package/lib/components/table/src/tableSearchFormItem.d.ts +37 -0
  430. package/lib/components/table/src/tableSearchFormItem.js +2 -0
  431. package/lib/components/table/src/tableSearchFormItem.js.map +1 -0
  432. package/lib/components/table/src/useTable.d.ts +32 -0
  433. package/lib/components/table/src/useTable.js +2 -0
  434. package/lib/components/table/src/useTable.js.map +1 -0
  435. package/lib/components/table/utils/table.d.ts +45 -0
  436. package/lib/components/table/utils/table.js +2 -0
  437. package/lib/components/table/utils/table.js.map +1 -0
  438. package/lib/components/tree/index.d.ts +15 -0
  439. package/lib/components/tree/index.js +2 -0
  440. package/lib/components/tree/index.js.map +1 -0
  441. package/lib/components/tree/src/tree.d.ts +668 -0
  442. package/lib/components/tree/src/tree.js +2 -0
  443. package/lib/components/tree/src/tree.js.map +1 -0
  444. package/lib/components/tree/src/tree.props.d.ts +81 -0
  445. package/lib/components/tree/src/tree.props.js +2 -0
  446. package/lib/components/tree/src/tree.props.js.map +1 -0
  447. package/lib/components/tree/src/tree.type.d.ts +36 -0
  448. package/lib/components/tree/src/tree.type.js +2 -0
  449. package/lib/components/tree/src/tree.type.js.map +1 -0
  450. package/lib/components/treeSelect/index.d.ts +14 -0
  451. package/lib/components/treeSelect/index.js +2 -0
  452. package/lib/components/treeSelect/index.js.map +1 -0
  453. package/lib/components/treeSelect/src/treeSelect.d.ts +1063 -0
  454. package/lib/components/treeSelect/src/treeSelect.js +2 -0
  455. package/lib/components/treeSelect/src/treeSelect.js.map +1 -0
  456. package/lib/components/upload/index.d.ts +15 -0
  457. package/lib/components/upload/index.js +2 -0
  458. package/lib/components/upload/index.js.map +1 -0
  459. package/lib/components/upload/src/upload.d.ts +525 -0
  460. package/lib/components/upload/src/upload.js +2 -0
  461. package/lib/components/upload/src/upload.js.map +1 -0
  462. package/lib/components/upload/src/useUpload.d.ts +65 -0
  463. package/lib/components/upload/src/useUpload.js +2 -0
  464. package/lib/components/upload/src/useUpload.js.map +1 -0
  465. package/lib/components/upload/utils/upload.d.ts +30 -0
  466. package/lib/components/upload/utils/upload.js +2 -0
  467. package/lib/components/upload/utils/upload.js.map +1 -0
  468. package/lib/components/uploadImage/index.d.ts +14 -0
  469. package/lib/components/uploadImage/index.js +2 -0
  470. package/lib/components/uploadImage/index.js.map +1 -0
  471. package/lib/components/uploadImage/src/uploadImage.d.ts +575 -0
  472. package/lib/components/uploadImage/src/uploadImage.js +2 -0
  473. package/lib/components/uploadImage/src/uploadImage.js.map +1 -0
  474. package/lib/components/uploadImages/index.d.ts +14 -0
  475. package/lib/components/uploadImages/index.js +2 -0
  476. package/lib/components/uploadImages/index.js.map +1 -0
  477. package/lib/components/uploadImages/src/uploadImages.d.ts +544 -0
  478. package/lib/components/uploadImages/src/uploadImages.js +2 -0
  479. package/lib/components/uploadImages/src/uploadImages.js.map +1 -0
  480. package/lib/constants/index.d.ts +2 -0
  481. package/lib/constants/index.js +2 -0
  482. package/lib/constants/index.js.map +1 -0
  483. package/lib/constants/mime.d.ts +61 -0
  484. package/lib/constants/mime.js +2 -0
  485. package/lib/constants/mime.js.map +1 -0
  486. package/lib/constants/regex.d.ts +78 -0
  487. package/lib/constants/regex.js +2 -0
  488. package/lib/constants/regex.js.map +1 -0
  489. package/lib/directive.d.ts +2 -0
  490. package/lib/directive.js +2 -0
  491. package/lib/directive.js.map +1 -0
  492. package/lib/directives/click-copy/index.d.ts +2 -0
  493. package/lib/directives/click-copy/index.js +2 -0
  494. package/lib/directives/click-copy/index.js.map +1 -0
  495. package/lib/directives/click-debounce/index.d.ts +2 -0
  496. package/lib/directives/click-debounce/index.js +2 -0
  497. package/lib/directives/click-debounce/index.js.map +1 -0
  498. package/lib/directives/click-draggable/index.d.ts +2 -0
  499. package/lib/directives/click-draggable/index.js +2 -0
  500. package/lib/directives/click-draggable/index.js.map +1 -0
  501. package/lib/directives/click-icon-copy/index.d.ts +2 -0
  502. package/lib/directives/click-icon-copy/index.js +2 -0
  503. package/lib/directives/click-icon-copy/index.js.map +1 -0
  504. package/lib/directives/click-longpress/index.d.ts +2 -0
  505. package/lib/directives/click-longpress/index.js +2 -0
  506. package/lib/directives/click-longpress/index.js.map +1 -0
  507. package/lib/directives/click-throttle/index.d.ts +2 -0
  508. package/lib/directives/click-throttle/index.js +2 -0
  509. package/lib/directives/click-throttle/index.js.map +1 -0
  510. package/lib/directives/index.d.ts +6 -0
  511. package/lib/directives/index.js +2 -0
  512. package/lib/directives/index.js.map +1 -0
  513. package/lib/element-plus.d.ts +2 -0
  514. package/lib/element-plus.js +2 -0
  515. package/lib/element-plus.js.map +1 -0
  516. package/lib/hooks/index.d.ts +3 -0
  517. package/lib/hooks/index.js +2 -0
  518. package/lib/hooks/index.js.map +1 -0
  519. package/lib/hooks/use-loading/index.d.ts +4 -0
  520. package/lib/hooks/use-loading/index.js +2 -0
  521. package/lib/hooks/use-loading/index.js.map +1 -0
  522. package/lib/hooks/use-overlay/index.d.ts +4 -0
  523. package/lib/hooks/use-overlay/index.js +2 -0
  524. package/lib/hooks/use-overlay/index.js.map +1 -0
  525. package/lib/hooks/use-screenFull/index.d.ts +7 -0
  526. package/lib/hooks/use-screenFull/index.js +2 -0
  527. package/lib/hooks/use-screenFull/index.js.map +1 -0
  528. package/lib/index.d.ts +14 -0
  529. package/lib/index.es.d.ts +6 -0
  530. package/lib/index.js +2 -0
  531. package/lib/index.js.map +1 -0
  532. package/lib/make-installer.d.ts +6 -0
  533. package/lib/make-installer.js +2 -0
  534. package/lib/make-installer.js.map +1 -0
  535. package/lib/version.d.ts +1 -0
  536. package/lib/version.js +2 -0
  537. package/lib/version.js.map +1 -0
  538. package/package.json +139 -26
  539. package/styles/common/animation.scss +46 -0
  540. package/styles/common/common.scss +44 -0
  541. package/styles/common/loading.scss +29 -0
  542. package/styles/common/overlay.scss +12 -0
  543. package/styles/components/carNumber.scss +44 -0
  544. package/styles/components/contextMenu.scss +34 -0
  545. package/styles/components/dialog.scss +88 -0
  546. package/styles/components/drawer.scss +87 -0
  547. package/styles/components/form.scss +44 -0
  548. package/styles/components/formItemTip.scss +7 -0
  549. package/styles/components/image.scss +19 -0
  550. package/styles/components/selectPage.scss +74 -0
  551. package/styles/components/selectV2.scss +22 -0
  552. package/styles/components/table.scss +439 -0
  553. package/styles/components/tree.scss +100 -0
  554. package/styles/components/uploadImage.scss +61 -0
  555. package/styles/components/uploadImages.scss +9 -0
  556. package/styles/index.scss +18 -0
  557. package/types/components.d.ts +36 -0
  558. package/types/env.d.ts +17 -0
@@ -0,0 +1,559 @@
1
+ import { defineComponent, reactive, ref, watch, onMounted, createVNode, mergeProps, computed } from "vue";
2
+ import { useAriaProps, useEmptyValuesProps, tagProps, useTooltipContentProps, useSizeProp, ElSelect } from "element-plus";
3
+ import { ArrowDown, CircleClose } from "@element-plus/icons-vue";
4
+ import { definePropType, withDefineType, consoleError, useProps, useRender, addUnit, useExpose, makeSlots } from "@fast-china/utils";
5
+ import { useVModel } from "@vueuse/core";
6
+ import { isString, isNumber, isBoolean, isObject, isArray, isNull, isFunction, isNil, isEqual } from "lodash-unified";
7
+ import SelectOption from "./selectOption.mjs";
8
+ const SelectProps = {
9
+ /**
10
+ * @description the name attribute of select input
11
+ */
12
+ name: String,
13
+ /**
14
+ * @description native input id
15
+ */
16
+ id: String,
17
+ /**
18
+ * @description binding value
19
+ */
20
+ modelValue: {
21
+ type: [Array, String, Number, Boolean, Object],
22
+ default: void 0
23
+ },
24
+ /**
25
+ * @description the autocomplete attribute of select input
26
+ */
27
+ autocomplete: {
28
+ type: String,
29
+ default: "off"
30
+ },
31
+ /**
32
+ * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused
33
+ */
34
+ automaticDropdown: Boolean,
35
+ /**
36
+ * @description size of Input
37
+ */
38
+ size: useSizeProp,
39
+ /**
40
+ * @description tooltip theme, built-in theme: `dark` / `light`
41
+ */
42
+ effect: {
43
+ type: definePropType(String),
44
+ default: "light"
45
+ },
46
+ /**
47
+ * @description whether Select is disabled
48
+ */
49
+ disabled: Boolean,
50
+ /**
51
+ * @description whether select can be cleared
52
+ */
53
+ clearable: Boolean,
54
+ /**
55
+ * @description whether Select is filterable
56
+ */
57
+ filterable: Boolean,
58
+ /**
59
+ * @description whether creating new items is allowed. To use this, `filterable` must be true
60
+ */
61
+ allowCreate: Boolean,
62
+ /**
63
+ * @description whether Select is loading data from server
64
+ */
65
+ loading: Boolean,
66
+ /**
67
+ * @description custom class name for Select's dropdown
68
+ */
69
+ popperClass: {
70
+ type: String,
71
+ default: ""
72
+ },
73
+ /**
74
+ * @description [popper.js](https://popper.js.org/docs/v2/) parameters
75
+ */
76
+ popperOptions: {
77
+ type: definePropType(Object),
78
+ default: () => ({})
79
+ },
80
+ /**
81
+ * @description whether options are loaded from server
82
+ */
83
+ remote: Boolean,
84
+ /**
85
+ * @description displayed text while loading data from server, default is 'Loading'
86
+ */
87
+ loadingText: String,
88
+ /**
89
+ * @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'
90
+ */
91
+ noMatchText: String,
92
+ /**
93
+ * @description displayed text when there is no options, you can also use slot `empty`, default is 'No data'
94
+ */
95
+ noDataText: String,
96
+ /**
97
+ * @description custom remote search method
98
+ */
99
+ remoteMethod: Function,
100
+ /**
101
+ * @description custom filter method
102
+ */
103
+ filterMethod: Function,
104
+ /**
105
+ * @description whether multiple-select is activated
106
+ */
107
+ multiple: Boolean,
108
+ /**
109
+ * @description maximum number of options user can select when `multiple` is `true`. No limit when set to 0
110
+ */
111
+ multipleLimit: {
112
+ type: Number,
113
+ default: 0
114
+ },
115
+ /**
116
+ * @description placeholder, default is 'Select'
117
+ */
118
+ placeholder: {
119
+ type: String
120
+ },
121
+ /**
122
+ * @description select first matching option on enter key. Use with `filterable` or `remote`
123
+ */
124
+ defaultFirstOption: Boolean,
125
+ /**
126
+ * @description when `multiple` and `filter` is true, whether to reserve current keyword after selecting an option
127
+ */
128
+ reserveKeyword: {
129
+ type: Boolean,
130
+ default: true
131
+ },
132
+ /**
133
+ * @description unique identity key name for value, required when value is an object
134
+ */
135
+ valueKey: {
136
+ type: String,
137
+ default: "value"
138
+ },
139
+ /**
140
+ * @description whether to collapse tags to a text when multiple selecting
141
+ */
142
+ collapseTags: Boolean,
143
+ /**
144
+ * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true
145
+ */
146
+ collapseTagsTooltip: Boolean,
147
+ /**
148
+ * @description the max tags number to be shown. To use this, `collapse-tags` must be true
149
+ */
150
+ maxCollapseTags: {
151
+ type: Number,
152
+ default: 1
153
+ },
154
+ /**
155
+ * @description whether select dropdown is teleported to the body
156
+ */
157
+ teleported: useTooltipContentProps.teleported,
158
+ /**
159
+ * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed
160
+ */
161
+ persistent: {
162
+ type: Boolean,
163
+ default: true
164
+ },
165
+ /**
166
+ * @description custom clear icon component
167
+ */
168
+ clearIcon: {
169
+ type: definePropType([String, Object, Function]),
170
+ default: CircleClose
171
+ },
172
+ /**
173
+ * @description whether the width of the dropdown is the same as the input
174
+ */
175
+ fitInputWidth: Boolean,
176
+ /**
177
+ * @description custom suffix icon component
178
+ */
179
+ suffixIcon: {
180
+ type: definePropType([String, Object, Function]),
181
+ default: ArrowDown
182
+ },
183
+ /**
184
+ * @description tag type
185
+ */
186
+ tagType: {
187
+ ...tagProps.type,
188
+ default: "info"
189
+ },
190
+ /**
191
+ * @description tag effect
192
+ */
193
+ tagEffect: {
194
+ ...tagProps.effect,
195
+ default: "light"
196
+ },
197
+ /**
198
+ * @description whether to trigger form validation
199
+ */
200
+ validateEvent: {
201
+ type: Boolean,
202
+ default: true
203
+ },
204
+ /**
205
+ * @description in remote search method show suffix icon
206
+ */
207
+ remoteShowSuffix: Boolean,
208
+ /**
209
+ * @description position of dropdown
210
+ */
211
+ placement: {
212
+ type: definePropType(String),
213
+ default: "bottom-start"
214
+ },
215
+ /**
216
+ * @description list of possible positions for dropdown
217
+ */
218
+ fallbackPlacements: {
219
+ type: definePropType(Array),
220
+ default: ["bottom-start", "top-start", "right", "left"]
221
+ },
222
+ ...useEmptyValuesProps,
223
+ ...useAriaProps(["ariaLabel"])
224
+ };
225
+ const faSelectProps = {
226
+ ...SelectProps,
227
+ /** @description displayed text while loading data from server, default is 'Loading' */
228
+ loadingText: {
229
+ type: String,
230
+ default: "加载中..."
231
+ },
232
+ /** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */
233
+ noMatchText: {
234
+ type: String,
235
+ default: "暂无匹配的数据"
236
+ },
237
+ /** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */
238
+ noDataText: {
239
+ type: String,
240
+ default: "暂无数据"
241
+ },
242
+ /** @description whether to collapse tags to a text when multiple selecting */
243
+ collapseTags: {
244
+ type: Boolean,
245
+ default: true
246
+ },
247
+ /** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */
248
+ collapseTagsTooltip: {
249
+ type: Boolean,
250
+ default: true
251
+ },
252
+ /** @description v-model绑定值 */
253
+ modelValue: {
254
+ type: definePropType([String, Number, Boolean, Object, Array]),
255
+ default: void 0
256
+ },
257
+ /** @description v-model:label绑定值 */
258
+ label: definePropType([String, Array]),
259
+ /** @description 宽度 */
260
+ width: {
261
+ type: [String, Number],
262
+ default: "100%"
263
+ },
264
+ /** @description 更多细节,只有使用slot的时候有用 */
265
+ moreDetail: Boolean,
266
+ /** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/
267
+ lazy: {
268
+ type: Boolean,
269
+ default: true
270
+ },
271
+ /** @description 默认选中。不能和懒加载一起使用 */
272
+ defaultSelected: Boolean,
273
+ /** @description 配置选项 */
274
+ props: {
275
+ type: definePropType(Object),
276
+ default: () => ({
277
+ label: "label",
278
+ hide: "hide",
279
+ disabled: "disabled",
280
+ children: "children"
281
+ })
282
+ },
283
+ /** @description 下拉框数据 */
284
+ data: {
285
+ type: definePropType(Array),
286
+ default: () => []
287
+ },
288
+ /** @description 请求api */
289
+ requestApi: {
290
+ type: definePropType(Function)
291
+ },
292
+ /** 初始化参数 */
293
+ initParam: definePropType([String, Number, Object])
294
+ };
295
+ const faSelectEmits = {
296
+ /** @description v-model 回调 */
297
+ "update:modelValue": (value) => isString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value),
298
+ /** @description v-model:label 回调 */
299
+ "update:label": (value) => isString(value) || isArray(value) || isNull(value),
300
+ /** @description 数据改变 */
301
+ dataChangeCallBack: (data) => isArray(data),
302
+ /** @description 改变 */
303
+ change: (data, value) => (isObject(data) || isArray(data) || isNull(data)) && (isString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value)),
304
+ /** @description 下拉框出现/隐藏时触发 */
305
+ visibleChange: (visible) => isBoolean(visible),
306
+ /** @description 多选模式下移除tag时触发 */
307
+ removeTag: (tagValue) => isString(tagValue) || isNumber(tagValue) || isBoolean(tagValue) || isObject(tagValue) || isArray(tagValue),
308
+ /** @description 可清空的单选模式下用户点击清空按钮时触发 */
309
+ clear: () => true,
310
+ /** @description 当 input 失去焦点时触发 */
311
+ blur: (event) => event instanceof FocusEvent,
312
+ /** @description 当 input 获得焦点时触发 */
313
+ focus: (event) => event instanceof FocusEvent
314
+ };
315
+ const Select = /* @__PURE__ */ defineComponent({
316
+ name: "FaSelect",
317
+ props: faSelectProps,
318
+ emits: faSelectEmits,
319
+ slots: makeSlots(),
320
+ setup(props, {
321
+ attrs,
322
+ slots,
323
+ emit,
324
+ expose
325
+ }) {
326
+ const selectedLabel = useVModel(props, "label", emit, {
327
+ passive: true
328
+ });
329
+ const state = reactive({
330
+ value: withDefineType(),
331
+ loading: false,
332
+ selectorData: withDefineType([]),
333
+ /** 首次出现 */
334
+ debut: true,
335
+ /** 回显 */
336
+ echo: props.data?.length > 0 ? false : true,
337
+ /** 下次刷新 */
338
+ nextRefresh: false
339
+ });
340
+ const selectRef = ref();
341
+ const handleData = (data) => {
342
+ return data?.map((m) => ({
343
+ ...m,
344
+ value: m[props.valueKey],
345
+ label: isFunction(props.props.label) ? props.props.label(m) : m[props.props.label ?? "label"],
346
+ hide: isFunction(props.props.hide) ? props.props.hide(m) : m[props.props.hide ?? "hide"],
347
+ disabled: isFunction(props.props.disabled) ? props.props.disabled(m) : m[props.props.disabled ?? "disabled"],
348
+ children: isFunction(props.props.children) ? handleData(props.props.children(m)) : handleData(m[props.props.children ?? "children"])
349
+ })).filter((f) => !f.hide);
350
+ };
351
+ const loadData = async () => {
352
+ if (props.requestApi) {
353
+ state.loading = true;
354
+ const params = props.initParam ?? {};
355
+ try {
356
+ const resData = await props.requestApi(params);
357
+ state.echo = false;
358
+ state.selectorData = handleData(resData);
359
+ emit("dataChangeCallBack", state.selectorData);
360
+ } catch (error) {
361
+ consoleError("FaSelect", error);
362
+ state.selectorData = [];
363
+ } finally {
364
+ state.loading = false;
365
+ }
366
+ } else {
367
+ state.echo = false;
368
+ state.selectorData = handleData(props.data);
369
+ }
370
+ };
371
+ const handleChange = (value) => {
372
+ if (props.multiple) {
373
+ const valueArr = value;
374
+ if (valueArr?.length === 0) {
375
+ state.value = null;
376
+ selectedLabel.value = null;
377
+ emit("update:modelValue", null);
378
+ emit("change", null, null);
379
+ return;
380
+ }
381
+ const dataList = state.selectorData.filter((f) => valueArr.includes(f.value));
382
+ state.value = value;
383
+ selectedLabel.value = dataList.map((m) => m.label);
384
+ emit("update:modelValue", value);
385
+ emit("change", dataList, value);
386
+ } else {
387
+ if (isNil(value)) {
388
+ state.value = null;
389
+ selectedLabel.value = null;
390
+ emit("update:modelValue", null);
391
+ emit("change", null, null);
392
+ return;
393
+ }
394
+ const data = state.selectorData.find((f) => f.value === value);
395
+ state.value = value;
396
+ selectedLabel.value = data.label;
397
+ emit("update:modelValue", value);
398
+ emit("change", data, value);
399
+ }
400
+ };
401
+ const handleClear = () => {
402
+ state.value = null;
403
+ selectedLabel.value = null;
404
+ emit("clear");
405
+ };
406
+ const handleVisibleChange = async (visible) => {
407
+ if (visible) {
408
+ if (state.debut) {
409
+ state.debut = false;
410
+ !props.defaultSelected && props.lazy && await loadData();
411
+ } else {
412
+ if (state.nextRefresh) {
413
+ state.nextRefresh = false;
414
+ await loadData();
415
+ }
416
+ }
417
+ }
418
+ emit("visibleChange", visible);
419
+ };
420
+ watch(() => props.modelValue, (newValue) => {
421
+ if (state.echo && !isNil(newValue)) {
422
+ const hasLabel = !isNil(props.label);
423
+ if (props.multiple) {
424
+ if (!isArray(newValue)) {
425
+ consoleError("FaSelect", "当启用 multiple 时,传入的 modelValue 必须是Array。");
426
+ return;
427
+ }
428
+ if (hasLabel && !isArray(props.label)) {
429
+ consoleError("FaSelect", "当启用 multiple 时,传入的 modelValue:label 必须是Array。");
430
+ return;
431
+ }
432
+ state.selectorData = newValue.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length).map((item, index) => ({
433
+ value: item,
434
+ label: hasLabel ? props.label[index] : void 0
435
+ }));
436
+ } else {
437
+ if (isArray(newValue)) {
438
+ consoleError("FaSelect", "当禁用 multiple 时,传入的 modelValue 不能是Array。");
439
+ return;
440
+ }
441
+ if (hasLabel && isArray(props.label)) {
442
+ consoleError("FaSelect", "当禁用 multiple 时,传入的 modelValue:label 不能是Array。");
443
+ return;
444
+ }
445
+ state.selectorData = [{
446
+ value: newValue,
447
+ label: props.label
448
+ }];
449
+ }
450
+ }
451
+ state.value = newValue;
452
+ }, {
453
+ immediate: true
454
+ });
455
+ onMounted(async () => {
456
+ if (props.defaultSelected) {
457
+ await loadData();
458
+ if (state.selectorData.length > 0) {
459
+ handleChange(props.multiple ? [state.selectorData[0].value] : state.selectorData[0].value);
460
+ }
461
+ } else if (!props.requestApi && props.data?.length > 0) {
462
+ state.debut = false;
463
+ await loadData();
464
+ } else if (!props.lazy) {
465
+ await loadData();
466
+ }
467
+ watch(() => props.initParam, (newValue, oldValue) => {
468
+ if (!isEqual(newValue, oldValue)) {
469
+ state.nextRefresh = true;
470
+ if (!isNil(state.value)) {
471
+ handleChange();
472
+ }
473
+ }
474
+ });
475
+ watch(() => props.data, async () => {
476
+ if (!props.requestApi) {
477
+ await loadData();
478
+ }
479
+ }, {
480
+ deep: true
481
+ });
482
+ });
483
+ const elSelectProps = useProps(props, SelectProps, ["modelValue", "popperClass", "loading"]);
484
+ useRender(() => createVNode(ElSelect, mergeProps(elSelectProps.value, {
485
+ "ref": selectRef,
486
+ "class": "fa-select",
487
+ "popperClass": `fa-select-dropdown ${props.popperClass}`,
488
+ "style": {
489
+ width: addUnit(props.width)
490
+ },
491
+ "modelValue": state.value,
492
+ "onUpdate:modelValue": ($event) => state.value = $event,
493
+ "loading": state.loading,
494
+ "onChange": handleChange,
495
+ "onClear": handleClear,
496
+ "onVisibleChange": handleVisibleChange,
497
+ "onRemoveTag": (tagValue) => emit("removeTag", tagValue),
498
+ "onBlur": (event) => emit("blur", event),
499
+ "onFocus": (event) => emit("focus", event)
500
+ }), {
501
+ default: () => state.selectorData.map((item) => createVNode(SelectOption, {
502
+ "data": item,
503
+ "moreDetail": props.moreDetail
504
+ }, {
505
+ default: slots.default
506
+ })),
507
+ ...slots.header && {
508
+ header: () => slots.header()
509
+ },
510
+ ...slots.footer && {
511
+ footer: () => slots.footer()
512
+ },
513
+ ...slots.prefix && {
514
+ prefix: () => slots.prefix()
515
+ },
516
+ ...slots.empty && {
517
+ empty: () => slots.empty()
518
+ },
519
+ ...slots.tag && {
520
+ tag: () => slots.tag()
521
+ },
522
+ ...slots.loading && {
523
+ loading: () => slots.loading()
524
+ },
525
+ ...slots.label && {
526
+ label: ({
527
+ label,
528
+ value
529
+ }) => slots.label({
530
+ label,
531
+ value
532
+ })
533
+ }
534
+ }));
535
+ return useExpose(expose, {
536
+ /** @description 使选择器的输入框获取焦点 */
537
+ focus: computed(() => selectRef.value?.focus),
538
+ /** @description 使选择器的输入框失去焦点,并隐藏下拉框 */
539
+ blur: computed(() => selectRef.value?.blur),
540
+ /** @description 获取当前选中的标签 */
541
+ selectedLabel: computed(() => selectRef.value?.selectedLabel),
542
+ /** @description 加载状态 */
543
+ loading: computed(() => state.loading),
544
+ /** @description 刷新 */
545
+ refresh: loadData,
546
+ /** @description 设置选择 */
547
+ setSelection: (value) => handleChange(value),
548
+ /** @description 清除选择 */
549
+ clearSelection: () => handleChange(null)
550
+ });
551
+ }
552
+ });
553
+ export {
554
+ SelectProps,
555
+ Select as default,
556
+ faSelectEmits,
557
+ faSelectProps
558
+ };
559
+ //# sourceMappingURL=select.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.mjs","sources":["../../../../../packages/components/select/src/select.tsx"],"sourcesContent":["import { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ElSelect, tagProps, useAriaProps, useEmptyValuesProps, useSizeProp, useTooltipContentProps } from \"element-plus\";\nimport { ArrowDown, CircleClose } from \"@element-plus/icons-vue\";\nimport { addUnit, consoleError, definePropType, makeSlots, useExpose, useProps, useRender, withDefineType } from \"@fast-china/utils\";\nimport { useVModel } from \"@vueuse/core\";\nimport { isArray, isBoolean, isEqual, isFunction, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport FaSelectOption from \"./selectOption\";\nimport type { ElSelectorOutput } from \"./select.type\";\nimport type { Options, Placement, PopperEffect } from \"element-plus\";\nimport type { Component, VNode } from \"vue\";\n\nexport const SelectProps = {\n\t/**\n\t * @description the name attribute of select input\n\t */\n\tname: String,\n\t/**\n\t * @description native input id\n\t */\n\tid: String,\n\t/**\n\t * @description binding value\n\t */\n\tmodelValue: {\n\t\ttype: [Array, String, Number, Boolean, Object],\n\t\tdefault: undefined,\n\t},\n\t/**\n\t * @description the autocomplete attribute of select input\n\t */\n\tautocomplete: {\n\t\ttype: String,\n\t\tdefault: \"off\",\n\t},\n\t/**\n\t * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused\n\t */\n\tautomaticDropdown: Boolean,\n\t/**\n\t * @description size of Input\n\t */\n\tsize: useSizeProp,\n\t/**\n\t * @description tooltip theme, built-in theme: `dark` / `light`\n\t */\n\teffect: {\n\t\ttype: definePropType<PopperEffect | string>(String),\n\t\tdefault: \"light\",\n\t},\n\t/**\n\t * @description whether Select is disabled\n\t */\n\tdisabled: Boolean,\n\t/**\n\t * @description whether select can be cleared\n\t */\n\tclearable: Boolean,\n\t/**\n\t * @description whether Select is filterable\n\t */\n\tfilterable: Boolean,\n\t/**\n\t * @description whether creating new items is allowed. To use this, `filterable` must be true\n\t */\n\tallowCreate: Boolean,\n\t/**\n\t * @description whether Select is loading data from server\n\t */\n\tloading: Boolean,\n\t/**\n\t * @description custom class name for Select's dropdown\n\t */\n\tpopperClass: {\n\t\ttype: String,\n\t\tdefault: \"\",\n\t},\n\t/**\n\t * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n\t */\n\tpopperOptions: {\n\t\ttype: definePropType<Partial<Options>>(Object),\n\t\tdefault: (): Partial<Options> => ({}),\n\t},\n\t/**\n\t * @description whether options are loaded from server\n\t */\n\tremote: Boolean,\n\t/**\n\t * @description displayed text while loading data from server, default is 'Loading'\n\t */\n\tloadingText: String,\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\t */\n\tnoMatchText: String,\n\t/**\n\t * @description displayed text when there is no options, you can also use slot `empty`, default is 'No data'\n\t */\n\tnoDataText: String,\n\t/**\n\t * @description custom remote search method\n\t */\n\tremoteMethod: Function,\n\t/**\n\t * @description custom filter method\n\t */\n\tfilterMethod: Function,\n\t/**\n\t * @description whether multiple-select is activated\n\t */\n\tmultiple: Boolean,\n\t/**\n\t * @description maximum number of options user can select when `multiple` is `true`. No limit when set to 0\n\t */\n\tmultipleLimit: {\n\t\ttype: Number,\n\t\tdefault: 0,\n\t},\n\t/**\n\t * @description placeholder, default is 'Select'\n\t */\n\tplaceholder: {\n\t\ttype: String,\n\t},\n\t/**\n\t * @description select first matching option on enter key. Use with `filterable` or `remote`\n\t */\n\tdefaultFirstOption: Boolean,\n\t/**\n\t * @description when `multiple` and `filter` is true, whether to reserve current keyword after selecting an option\n\t */\n\treserveKeyword: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description unique identity key name for value, required when value is an object\n\t */\n\tvalueKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/**\n\t * @description whether to collapse tags to a text when multiple selecting\n\t */\n\tcollapseTags: Boolean,\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\t */\n\tcollapseTagsTooltip: Boolean,\n\t/**\n\t * @description the max tags number to be shown. To use this, `collapse-tags` must be true\n\t */\n\tmaxCollapseTags: {\n\t\ttype: Number,\n\t\tdefault: 1,\n\t},\n\t/**\n\t * @description whether select dropdown is teleported to the body\n\t */\n\tteleported: useTooltipContentProps.teleported,\n\t/**\n\t * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed\n\t */\n\tpersistent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description custom clear icon component\n\t */\n\tclearIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: CircleClose,\n\t},\n\t/**\n\t * @description whether the width of the dropdown is the same as the input\n\t */\n\tfitInputWidth: Boolean,\n\t/**\n\t * @description custom suffix icon component\n\t */\n\tsuffixIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: ArrowDown,\n\t},\n\t/**\n\t * @description tag type\n\t */\n\n\ttagType: { ...tagProps.type, default: \"info\" },\n\t/**\n\t * @description tag effect\n\t */\n\ttagEffect: { ...tagProps.effect, default: \"light\" },\n\t/**\n\t * @description whether to trigger form validation\n\t */\n\tvalidateEvent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description in remote search method show suffix icon\n\t */\n\tremoteShowSuffix: Boolean,\n\t/**\n\t * @description position of dropdown\n\t */\n\tplacement: {\n\t\ttype: definePropType<Placement>(String),\n\t\tdefault: \"bottom-start\",\n\t},\n\t/**\n\t * @description list of possible positions for dropdown\n\t */\n\tfallbackPlacements: {\n\t\ttype: definePropType<Placement[]>(Array),\n\t\tdefault: [\"bottom-start\", \"top-start\", \"right\", \"left\"],\n\t},\n\t...useEmptyValuesProps,\n\t...useAriaProps([\"ariaLabel\"]),\n};\n\nexport type SelectComponentProps = {\n\t/** @description 指定标签为节点的某个属性值 */\n\tlabel?: string | ((data: any) => string);\n\t/** @description 指定是否隐藏为节点的某个属性值 */\n\thide?: string | ((data: any) => boolean);\n\t/** @description 指定是否禁用为节点的某个属性值 */\n\tdisabled?: string | ((data: any) => boolean);\n\t/** @description 指定子节点对象为节点的某个属性值 */\n\tchildren?: string;\n};\n\nexport const faSelectProps = {\n\t...SelectProps,\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/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<string | number | boolean | object | (string | number | boolean | object)[]>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[]>([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?: any) => Promise<ElSelectorOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | any>([String, Number, Object]),\n};\n\nexport const faSelectEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | boolean | object | (string | number | boolean | object)[]): 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[]): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[] | any[]): boolean => isArray(data),\n\t/** @description 改变 */\n\tchange: (\n\t\tdata: ElSelectorOutput | ElSelectorOutput[] | any | any[],\n\t\tvalue?: string | number | boolean | object | (string | number | boolean | object)[]\n\t): boolean =>\n\t\t(isObject(data) || isArray(data) || isNull(data)) &&\n\t\t(isString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value)),\n\t/** @description 下拉框出现/隐藏时触发 */\n\tvisibleChange: (visible: boolean): boolean => isBoolean(visible),\n\t/** @description 多选模式下移除tag时触发 */\n\tremoveTag: (tagValue: any): boolean => isString(tagValue) || isNumber(tagValue) || isBoolean(tagValue) || isObject(tagValue) || isArray(tagValue),\n\t/** @description 可清空的单选模式下用户点击清空按钮时触发 */\n\tclear: (): boolean => true,\n\t/** @description 当 input 失去焦点时触发 */\n\tblur: (event: FocusEvent): boolean => event instanceof FocusEvent,\n\t/** @description 当 input 获得焦点时触发 */\n\tfocus: (event: FocusEvent): boolean => event instanceof FocusEvent,\n};\n\ntype FaSelectSlots = {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: ElSelectorOutput;\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: \"FaSelect\",\n\tprops: faSelectProps,\n\temits: faSelectEmits,\n\tslots: makeSlots<FaSelectSlots>(),\n\tsetup(props, { attrs, slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<string | number | boolean | object | (string | number | boolean | object)[]>(),\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 selectRef = ref<InstanceType<typeof ElSelect>>();\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t?.map((m) => ({\n\t\t\t\t\t...m,\n\t\t\t\t\tvalue: m[props.valueKey],\n\t\t\t\t\tlabel: isFunction(props.props.label) ? props.props.label(m) : m[props.props.label ?? \"label\"],\n\t\t\t\t\thide: isFunction(props.props.hide) ? props.props.hide(m) : m[props.props.hide ?? \"hide\"],\n\t\t\t\t\tdisabled: isFunction(props.props.disabled) ? props.props.disabled(m) : m[props.props.disabled ?? \"disabled\"],\n\t\t\t\t\tchildren: isFunction(props.props.children)\n\t\t\t\t\t\t? handleData(props.props.children(m))\n\t\t\t\t\t\t: handleData(m[props.props.children ?? \"children\"]),\n\t\t\t\t}))\n\t\t\t\t.filter((f) => !f.hide);\n\t\t};\n\n\t\tconst loadData = async (): Promise<void> => {\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\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\tconsoleError(\"FaSelect\", error);\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t} finally {\n\t\t\t\t\tstate.loading = false;\n\t\t\t\t}\n\t\t\t} else {\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 handleChange = (value?: string | number | boolean | object | (string | number | boolean | object)[]): void => {\n\t\t\t// 判断是否为多选\n\t\t\tif (props.multiple) {\n\t\t\t\t// value 必然是数组\n\t\t\t\tconst valueArr = value as (string | number | boolean | object)[];\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((f) => valueArr.includes(f.value));\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = dataList.map((m) => m.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\tconst data = state.selectorData.find((f) => f.value === value);\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = data.label;\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", data, 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(\"clear\");\n\t\t};\n\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\t!props.defaultSelected && props.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(\"visibleChange\", 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 (!isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"FaSelect\", \"当启用 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\tconsoleError(\"FaSelect\", \"当启用 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\tvalue: item,\n\t\t\t\t\t\t\t\tlabel: hasLabel ? props.label[index] : undefined,\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"FaSelect\", \"当禁用 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\tconsoleError(\"FaSelect\", \"当禁用 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: props.label,\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\tif (state.selectorData.length > 0) {\n\t\t\t\t\thandleChange(props.multiple ? [state.selectorData[0].value] : state.selectorData[0].value);\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\tasync () => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\tawait 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 elSelectProps = useProps(props, SelectProps, [\"modelValue\", \"popperClass\", \"loading\"]);\n\n\t\tuseRender(() => (\n\t\t\t<ElSelect\n\t\t\t\t{...elSelectProps.value}\n\t\t\t\tref={selectRef}\n\t\t\t\tclass=\"fa-select\"\n\t\t\t\tpopperClass={`fa-select-dropdown ${props.popperClass}`}\n\t\t\t\tstyle={{ width: addUnit(props.width) }}\n\t\t\t\tvModel={state.value}\n\t\t\t\tloading={state.loading}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tonClear={handleClear}\n\t\t\t\tonVisibleChange={handleVisibleChange}\n\t\t\t\tonRemoveTag={(tagValue: any) => emit(\"removeTag\", tagValue)}\n\t\t\t\tonBlur={(event: FocusEvent) => emit(\"blur\", event)}\n\t\t\t\tonFocus={(event: FocusEvent) => emit(\"focus\", event)}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: (): VNode[] =>\n\t\t\t\t\t\tstate.selectorData.map((item) => (\n\t\t\t\t\t\t\t<FaSelectOption vSlots={{ default: slots.default }} data={item} moreDetail={props.moreDetail} />\n\t\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</ElSelect>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectRef.value?.selectedLabel),\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: string | number | boolean | object | (string | number | boolean | object)[]) => handleChange(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleChange(null),\n\t\t});\n\t},\n});\n"],"names":["SelectProps","name","String","id","modelValue","type","Array","Number","Boolean","Object","default","undefined","autocomplete","automaticDropdown","size","useSizeProp","effect","definePropType","disabled","clearable","filterable","allowCreate","loading","popperClass","popperOptions","remote","loadingText","noMatchText","noDataText","remoteMethod","Function","filterMethod","multiple","multipleLimit","placeholder","defaultFirstOption","reserveKeyword","valueKey","collapseTags","collapseTagsTooltip","maxCollapseTags","teleported","useTooltipContentProps","persistent","clearIcon","CircleClose","fitInputWidth","suffixIcon","ArrowDown","tagType","tagProps","tagEffect","validateEvent","remoteShowSuffix","placement","fallbackPlacements","useEmptyValuesProps","useAriaProps","faSelectProps","label","width","moreDetail","lazy","defaultSelected","props","hide","children","data","requestApi","initParam","faSelectEmits","value","isString","isNumber","isBoolean","isObject","isArray","isNull","dataChangeCallBack","change","visibleChange","visible","removeTag","tagValue","clear","blur","event","FocusEvent","focus","emits","slots","makeSlots","setup","attrs","emit","expose","selectedLabel","useVModel","passive","state","reactive","withDefineType","selectorData","debut","echo","length","nextRefresh","selectRef","ref","handleData","map","m","isFunction","filter","f","loadData","params","resData","error","consoleError","handleChange","valueArr","dataList","includes","isNil","find","handleClear","handleVisibleChange","watch","newValue","hasLabel","slice","item","index","immediate","onMounted","oldValue","isEqual","deep","elSelectProps","useProps","useRender","_createVNode","ElSelect","_mergeProps","addUnit","$event","FaSelectOption","header","footer","prefix","empty","tag","useExpose","computed","refresh","setSelection","clearSelection"],"mappings":";;;;;;;AAWO,MAAMA,cAAc;AAAA;AAAA;AAAA;AAAA,EAI1BC,MAAMC;AAAA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1CW,eAAe0D,SAAS,MAAM/C,UAAUpC,OAAOyB,aAAa;AAAA;AAAA,MAE5D1E,SAASoI,SAAS,MAAMvD,MAAM7E,OAAO;AAAA;AAAA,MAErCqI,SAASxC;AAAAA;AAAAA,MAETyC,cAAerF,WAAuFiD,aAAajD,KAAK;AAAA;AAAA,MAExHsF,gBAAgBA,MAAMrC,aAAa,IAAI;AAAA,IACxC,CAAC;AAAA,EACF;AACD,CAAC;"}
@@ -0,0 +1,28 @@
1
+ /** @description 选择器数据 */
2
+ export type ElSelectorOutput<T = any> = T extends string | number | boolean | object ? {
3
+ /**
4
+ * 显示
5
+ */
6
+ label?: string;
7
+ /**
8
+ * 值
9
+ */
10
+ value?: T;
11
+ /**
12
+ * 附加数据
13
+ */
14
+ data?: any;
15
+ /**
16
+ * 是否隐藏
17
+ */
18
+ hide?: boolean;
19
+ /**
20
+ * 是否禁用
21
+ */
22
+ disabled?: boolean;
23
+ /**
24
+ * 子节点
25
+ */
26
+ children?: Array<ElSelectorOutput<T>>;
27
+ [key: string]: any;
28
+ } : never;
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=select.type.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.type.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}