@rdeam/qui 2.0.0

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 (434) hide show
  1. package/README.md +59 -0
  2. package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/defineProperty.mjs +12 -0
  3. package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/toPrimitive.mjs +14 -0
  4. package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/toPropertyKey.mjs +9 -0
  5. package/es/_virtual/_@oxc-project_runtime@0.127.0/helpers/typeof.mjs +11 -0
  6. package/es/component.d.ts +3 -0
  7. package/es/component.mjs +39 -0
  8. package/es/component.mjs.map +1 -0
  9. package/es/components/date-picker/index.d.ts +6 -0
  10. package/es/components/date-picker/index.mjs +9 -0
  11. package/es/components/date-picker/index.mjs.map +1 -0
  12. package/es/components/date-picker/src/date-picker.d.ts +19 -0
  13. package/es/components/date-picker/src/date-picker.mjs +28 -0
  14. package/es/components/date-picker/src/date-picker.mjs.map +1 -0
  15. package/es/components/date-picker/src/date-picker.vue.d.ts +33 -0
  16. package/es/components/date-picker/src/date-picker.vue.mjs +7 -0
  17. package/es/components/date-picker/src/date-picker.vue.mjs.map +1 -0
  18. package/es/components/date-picker/src/date-picker.vue_vue_type_script_setup_true_lang.mjs +42 -0
  19. package/es/components/date-picker/src/date-picker.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  20. package/es/components/date-picker/src/instance.d.ts +2 -0
  21. package/es/components/date-picker/src/instance.mjs +0 -0
  22. package/es/components/date-picker/style/index.d.ts +1 -0
  23. package/es/components/descriptions/index.d.ts +6 -0
  24. package/es/components/descriptions/index.mjs +9 -0
  25. package/es/components/descriptions/index.mjs.map +1 -0
  26. package/es/components/descriptions/src/descriptions.d.ts +42 -0
  27. package/es/components/descriptions/src/descriptions.mjs +86 -0
  28. package/es/components/descriptions/src/descriptions.mjs.map +1 -0
  29. package/es/components/descriptions/src/idescriptions.d.ts +72 -0
  30. package/es/components/descriptions/src/idescriptions.mjs +55 -0
  31. package/es/components/descriptions/src/idescriptions.mjs.map +1 -0
  32. package/es/components/descriptions/src/instance.d.ts +2 -0
  33. package/es/components/descriptions/src/instance.mjs +0 -0
  34. package/es/components/descriptions/style/index.d.ts +1 -0
  35. package/es/components/ellipsis-tag/index.d.ts +6 -0
  36. package/es/components/ellipsis-tag/index.mjs +9 -0
  37. package/es/components/ellipsis-tag/index.mjs.map +1 -0
  38. package/es/components/ellipsis-tag/src/ellipsis-tag.d.ts +20 -0
  39. package/es/components/ellipsis-tag/src/ellipsis-tag.mjs +19 -0
  40. package/es/components/ellipsis-tag/src/ellipsis-tag.mjs.map +1 -0
  41. package/es/components/ellipsis-tag/src/ellipsis-tag.vue.d.ts +51 -0
  42. package/es/components/ellipsis-tag/src/ellipsis-tag.vue.mjs +7 -0
  43. package/es/components/ellipsis-tag/src/ellipsis-tag.vue.mjs.map +1 -0
  44. package/es/components/ellipsis-tag/src/ellipsis-tag.vue_vue_type_script_setup_true_lang.mjs +74 -0
  45. package/es/components/ellipsis-tag/src/ellipsis-tag.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  46. package/es/components/ellipsis-tag/src/instance.d.ts +2 -0
  47. package/es/components/ellipsis-tag/src/instance.mjs +0 -0
  48. package/es/components/ellipsis-tag/style/index.d.ts +1 -0
  49. package/es/components/empty/index.d.ts +6 -0
  50. package/es/components/empty/index.mjs +9 -0
  51. package/es/components/empty/index.mjs.map +1 -0
  52. package/es/components/empty/src/empty.d.ts +86 -0
  53. package/es/components/empty/src/empty.mjs +158 -0
  54. package/es/components/empty/src/empty.mjs.map +1 -0
  55. package/es/components/empty/src/iempty.d.ts +41 -0
  56. package/es/components/empty/src/iempty.mjs +44 -0
  57. package/es/components/empty/src/iempty.mjs.map +1 -0
  58. package/es/components/empty/src/instance.d.ts +2 -0
  59. package/es/components/empty/src/instance.mjs +0 -0
  60. package/es/components/empty/style/index.d.ts +1 -0
  61. package/es/components/index.d.ts +16 -0
  62. package/es/components/index.mjs +33 -0
  63. package/es/components/jdata-viewer/index.d.ts +6 -0
  64. package/es/components/jdata-viewer/index.mjs +9 -0
  65. package/es/components/jdata-viewer/index.mjs.map +1 -0
  66. package/es/components/jdata-viewer/src/ijdata-viewer.d.ts +40 -0
  67. package/es/components/jdata-viewer/src/ijdata-viewer.mjs +43 -0
  68. package/es/components/jdata-viewer/src/ijdata-viewer.mjs.map +1 -0
  69. package/es/components/jdata-viewer/src/instance.d.ts +2 -0
  70. package/es/components/jdata-viewer/src/instance.mjs +0 -0
  71. package/es/components/jdata-viewer/src/jdata-viewer.d.ts +87 -0
  72. package/es/components/jdata-viewer/src/jdata-viewer.mjs +125 -0
  73. package/es/components/jdata-viewer/src/jdata-viewer.mjs.map +1 -0
  74. package/es/components/jdata-viewer/src/use-view.d.ts +7 -0
  75. package/es/components/jdata-viewer/src/use-view.mjs +98 -0
  76. package/es/components/jdata-viewer/src/use-view.mjs.map +1 -0
  77. package/es/components/jdata-viewer/style/index.d.ts +1 -0
  78. package/es/components/radio/index.d.ts +6 -0
  79. package/es/components/radio/index.mjs +9 -0
  80. package/es/components/radio/index.mjs.map +1 -0
  81. package/es/components/radio/src/instance.d.ts +2 -0
  82. package/es/components/radio/src/instance.mjs +0 -0
  83. package/es/components/radio/src/radio.d.ts +16 -0
  84. package/es/components/radio/src/radio.mjs +37 -0
  85. package/es/components/radio/src/radio.mjs.map +1 -0
  86. package/es/components/radio/src/radio.vue.d.ts +25 -0
  87. package/es/components/radio/src/radio.vue.mjs +7 -0
  88. package/es/components/radio/src/radio.vue.mjs.map +1 -0
  89. package/es/components/radio/src/radio.vue_vue_type_script_setup_true_lang.mjs +44 -0
  90. package/es/components/radio/src/radio.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  91. package/es/components/radio/style/index.d.ts +1 -0
  92. package/es/components/remote-search/index.d.ts +6 -0
  93. package/es/components/remote-search/index.mjs +9 -0
  94. package/es/components/remote-search/index.mjs.map +1 -0
  95. package/es/components/remote-search/src/instance.d.ts +2 -0
  96. package/es/components/remote-search/src/instance.mjs +0 -0
  97. package/es/components/remote-search/src/iremote-search.d.ts +26 -0
  98. package/es/components/remote-search/src/iremote-search.mjs +94 -0
  99. package/es/components/remote-search/src/iremote-search.mjs.map +1 -0
  100. package/es/components/remote-search/src/remote-search.d.ts +72 -0
  101. package/es/components/remote-search/src/remote-search.mjs +191 -0
  102. package/es/components/remote-search/src/remote-search.mjs.map +1 -0
  103. package/es/components/remote-search/style/index.d.ts +1 -0
  104. package/es/components/search-form/index.d.ts +6 -0
  105. package/es/components/search-form/index.mjs +9 -0
  106. package/es/components/search-form/index.mjs.map +1 -0
  107. package/es/components/search-form/src/components/Grid/components/GridItem.vue.d.ts +33 -0
  108. package/es/components/search-form/src/components/Grid/components/GridItem.vue.mjs +7 -0
  109. package/es/components/search-form/src/components/Grid/components/GridItem.vue.mjs.map +1 -0
  110. package/es/components/search-form/src/components/Grid/components/GridItem.vue_vue_type_script_setup_true_lang.mjs +54 -0
  111. package/es/components/search-form/src/components/Grid/components/GridItem.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  112. package/es/components/search-form/src/components/Grid/index.vue.d.ts +28 -0
  113. package/es/components/search-form/src/components/Grid/index.vue.mjs +7 -0
  114. package/es/components/search-form/src/components/Grid/index.vue.mjs.map +1 -0
  115. package/es/components/search-form/src/components/Grid/index.vue_vue_type_script_setup_true_lang.mjs +62 -0
  116. package/es/components/search-form/src/components/Grid/index.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  117. package/es/components/search-form/src/components/Grid/interface/index.d.ts +5 -0
  118. package/es/components/search-form/src/components/Grid/interface/index.mjs +0 -0
  119. package/es/components/search-form/src/components/SearchFormItem.vue.d.ts +36 -0
  120. package/es/components/search-form/src/components/SearchFormItem.vue.mjs +7 -0
  121. package/es/components/search-form/src/components/SearchFormItem.vue.mjs.map +1 -0
  122. package/es/components/search-form/src/components/SearchFormItem.vue_vue_type_script_lang.mjs +103 -0
  123. package/es/components/search-form/src/components/SearchFormItem.vue_vue_type_script_lang.mjs.map +1 -0
  124. package/es/components/search-form/src/instance.d.ts +2 -0
  125. package/es/components/search-form/src/instance.mjs +0 -0
  126. package/es/components/search-form/src/isearch-form.d.ts +76 -0
  127. package/es/components/search-form/src/isearch-form.mjs +63 -0
  128. package/es/components/search-form/src/isearch-form.mjs.map +1 -0
  129. package/es/components/search-form/src/search-form.d.ts +55 -0
  130. package/es/components/search-form/src/search-form.mjs +319 -0
  131. package/es/components/search-form/src/search-form.mjs.map +1 -0
  132. package/es/components/search-form/style/index.d.ts +1 -0
  133. package/es/components/sticky-container/index.d.ts +6 -0
  134. package/es/components/sticky-container/index.mjs +9 -0
  135. package/es/components/sticky-container/index.mjs.map +1 -0
  136. package/es/components/sticky-container/src/instance.d.ts +2 -0
  137. package/es/components/sticky-container/src/instance.mjs +0 -0
  138. package/es/components/sticky-container/src/isticky-container.d.ts +4 -0
  139. package/es/components/sticky-container/src/isticky-container.mjs +8 -0
  140. package/es/components/sticky-container/src/isticky-container.mjs.map +1 -0
  141. package/es/components/sticky-container/src/sticky-container.d.ts +2 -0
  142. package/es/components/sticky-container/src/sticky-container.mjs +32 -0
  143. package/es/components/sticky-container/src/sticky-container.mjs.map +1 -0
  144. package/es/components/sticky-container/style/index.d.ts +1 -0
  145. package/es/components/table/index.d.ts +6 -0
  146. package/es/components/table/index.mjs +9 -0
  147. package/es/components/table/index.mjs.map +1 -0
  148. package/es/components/table/src/components/Setting.vue.d.ts +30 -0
  149. package/es/components/table/src/components/Setting.vue.mjs +7 -0
  150. package/es/components/table/src/components/Setting.vue.mjs.map +1 -0
  151. package/es/components/table/src/components/Setting.vue_vue_type_script_setup_true_lang.mjs +67 -0
  152. package/es/components/table/src/components/Setting.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  153. package/es/components/table/src/components/TableColumn.vue.d.ts +15 -0
  154. package/es/components/table/src/components/TableColumn.vue.mjs +7 -0
  155. package/es/components/table/src/components/TableColumn.vue.mjs.map +1 -0
  156. package/es/components/table/src/components/TableColumn.vue_vue_type_script_setup_true_lang.mjs +132 -0
  157. package/es/components/table/src/components/TableColumn.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  158. package/es/components/table/src/instance.d.ts +2 -0
  159. package/es/components/table/src/instance.mjs +0 -0
  160. package/es/components/table/src/table.d.ts +84 -0
  161. package/es/components/table/src/table.mjs +139 -0
  162. package/es/components/table/src/table.mjs.map +1 -0
  163. package/es/components/table/src/table.vue.d.ts +384 -0
  164. package/es/components/table/src/table.vue.mjs +7 -0
  165. package/es/components/table/src/table.vue.mjs.map +1 -0
  166. package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs +143 -0
  167. package/es/components/table/src/table.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  168. package/es/components/table/src/use-controller.d.ts +10 -0
  169. package/es/components/table/src/use-controller.mjs +117 -0
  170. package/es/components/table/src/use-controller.mjs.map +1 -0
  171. package/es/components/table/src/use-table.d.ts +26 -0
  172. package/es/components/table/src/use-table.mjs +188 -0
  173. package/es/components/table/src/use-table.mjs.map +1 -0
  174. package/es/components/table/style/index.d.ts +1 -0
  175. package/es/components/table-editor/index.d.ts +6 -0
  176. package/es/components/table-editor/index.mjs +9 -0
  177. package/es/components/table-editor/index.mjs.map +1 -0
  178. package/es/components/table-editor/src/components/BaseItem.vue.d.ts +15 -0
  179. package/es/components/table-editor/src/components/BaseItem.vue.mjs +7 -0
  180. package/es/components/table-editor/src/components/BaseItem.vue.mjs.map +1 -0
  181. package/es/components/table-editor/src/components/BaseItem.vue_vue_type_script_lang.mjs +37 -0
  182. package/es/components/table-editor/src/components/BaseItem.vue_vue_type_script_lang.mjs.map +1 -0
  183. package/es/components/table-editor/src/instance.d.ts +2 -0
  184. package/es/components/table-editor/src/instance.mjs +0 -0
  185. package/es/components/table-editor/src/table-editor.d.ts +45 -0
  186. package/es/components/table-editor/src/table-editor.mjs +24 -0
  187. package/es/components/table-editor/src/table-editor.mjs.map +1 -0
  188. package/es/components/table-editor/src/table-editor.vue.d.ts +82 -0
  189. package/es/components/table-editor/src/table-editor.vue.mjs +7 -0
  190. package/es/components/table-editor/src/table-editor.vue.mjs.map +1 -0
  191. package/es/components/table-editor/src/table-editor.vue_vue_type_script_setup_true_lang.mjs +75 -0
  192. package/es/components/table-editor/src/table-editor.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  193. package/es/components/table-editor/style/index.d.ts +1 -0
  194. package/es/components/tabs/index.d.ts +6 -0
  195. package/es/components/tabs/index.mjs +9 -0
  196. package/es/components/tabs/index.mjs.map +1 -0
  197. package/es/components/tabs/src/instance.d.ts +2 -0
  198. package/es/components/tabs/src/instance.mjs +0 -0
  199. package/es/components/tabs/src/itabs.d.ts +31 -0
  200. package/es/components/tabs/src/itabs.mjs +33 -0
  201. package/es/components/tabs/src/itabs.mjs.map +1 -0
  202. package/es/components/tabs/src/tabs.d.ts +55 -0
  203. package/es/components/tabs/src/tabs.mjs +58 -0
  204. package/es/components/tabs/src/tabs.mjs.map +1 -0
  205. package/es/components/tabs/style/index.d.ts +1 -0
  206. package/es/components/tarea-tag/index.d.ts +6 -0
  207. package/es/components/tarea-tag/index.mjs +9 -0
  208. package/es/components/tarea-tag/index.mjs.map +1 -0
  209. package/es/components/tarea-tag/src/instance.d.ts +2 -0
  210. package/es/components/tarea-tag/src/instance.mjs +0 -0
  211. package/es/components/tarea-tag/src/tarea-tag.d.ts +10 -0
  212. package/es/components/tarea-tag/src/tarea-tag.mjs +29 -0
  213. package/es/components/tarea-tag/src/tarea-tag.mjs.map +1 -0
  214. package/es/components/tarea-tag/src/tarea-tag.vue.d.ts +23 -0
  215. package/es/components/tarea-tag/src/tarea-tag.vue.mjs +7 -0
  216. package/es/components/tarea-tag/src/tarea-tag.vue.mjs.map +1 -0
  217. package/es/components/tarea-tag/src/tarea-tag.vue_vue_type_script_setup_true_lang.mjs +149 -0
  218. package/es/components/tarea-tag/src/tarea-tag.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  219. package/es/components/tarea-tag/style/index.d.ts +1 -0
  220. package/es/components/text-ellipsis/index.d.ts +5 -0
  221. package/es/components/text-ellipsis/index.mjs +9 -0
  222. package/es/components/text-ellipsis/index.mjs.map +1 -0
  223. package/es/components/text-ellipsis/src/instance.d.ts +2 -0
  224. package/es/components/text-ellipsis/src/instance.mjs +0 -0
  225. package/es/components/text-ellipsis/src/itext-ellipsis.d.ts +11 -0
  226. package/es/components/text-ellipsis/src/itext-ellipsis.mjs +16 -0
  227. package/es/components/text-ellipsis/src/itext-ellipsis.mjs.map +1 -0
  228. package/es/components/text-ellipsis/src/text-ellipsis.d.ts +25 -0
  229. package/es/components/text-ellipsis/src/text-ellipsis.mjs +115 -0
  230. package/es/components/text-ellipsis/src/text-ellipsis.mjs.map +1 -0
  231. package/es/components/text-ellipsis/src/use-window-size.d.ts +5 -0
  232. package/es/components/text-ellipsis/src/use-window-size.mjs +28 -0
  233. package/es/components/text-ellipsis/src/use-window-size.mjs.map +1 -0
  234. package/es/components/text-ellipsis/src/utils.d.ts +22 -0
  235. package/es/components/text-ellipsis/src/utils.mjs +26 -0
  236. package/es/components/text-ellipsis/src/utils.mjs.map +1 -0
  237. package/es/components/text-ellipsis/style/index.d.ts +1 -0
  238. package/es/components/time-line/index.d.ts +6 -0
  239. package/es/components/time-line/index.mjs +9 -0
  240. package/es/components/time-line/index.mjs.map +1 -0
  241. package/es/components/time-line/src/instance.d.ts +2 -0
  242. package/es/components/time-line/src/instance.mjs +0 -0
  243. package/es/components/time-line/src/time-line.d.ts +28 -0
  244. package/es/components/time-line/src/time-line.mjs +25 -0
  245. package/es/components/time-line/src/time-line.mjs.map +1 -0
  246. package/es/components/time-line/src/time-line.vue.d.ts +81 -0
  247. package/es/components/time-line/src/time-line.vue.mjs +7 -0
  248. package/es/components/time-line/src/time-line.vue.mjs.map +1 -0
  249. package/es/components/time-line/src/time-line.vue_vue_type_script_setup_true_lang.mjs +37 -0
  250. package/es/components/time-line/src/time-line.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  251. package/es/components/time-line/style/index.d.ts +1 -0
  252. package/es/components/uploader/index.d.ts +6 -0
  253. package/es/components/uploader/index.mjs +9 -0
  254. package/es/components/uploader/index.mjs.map +1 -0
  255. package/es/components/uploader/src/UploadInfo.vue.d.ts +30 -0
  256. package/es/components/uploader/src/UploadInfo.vue.mjs +7 -0
  257. package/es/components/uploader/src/UploadInfo.vue.mjs.map +1 -0
  258. package/es/components/uploader/src/UploadInfo.vue_vue_type_script_setup_true_lang.mjs +167 -0
  259. package/es/components/uploader/src/UploadInfo.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  260. package/es/components/uploader/src/instance.d.ts +2 -0
  261. package/es/components/uploader/src/instance.mjs +0 -0
  262. package/es/components/uploader/src/toast.d.ts +1 -0
  263. package/es/components/uploader/src/toast.mjs +37 -0
  264. package/es/components/uploader/src/toast.mjs.map +1 -0
  265. package/es/components/uploader/src/uploader.d.ts +32 -0
  266. package/es/components/uploader/src/uploader.mjs +104 -0
  267. package/es/components/uploader/src/uploader.mjs.map +1 -0
  268. package/es/components/uploader/src/uploader.vue.d.ts +98 -0
  269. package/es/components/uploader/src/uploader.vue.mjs +7 -0
  270. package/es/components/uploader/src/uploader.vue.mjs.map +1 -0
  271. package/es/components/uploader/src/uploader.vue_vue_type_script_setup_true_lang.mjs +48 -0
  272. package/es/components/uploader/src/uploader.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  273. package/es/components/uploader/src/use-uploader.d.ts +20 -0
  274. package/es/components/uploader/src/use-uploader.mjs +263 -0
  275. package/es/components/uploader/src/use-uploader.mjs.map +1 -0
  276. package/es/components/uploader/style/index.d.ts +1 -0
  277. package/es/defaults.d.ts +5 -0
  278. package/es/defaults.mjs +8 -0
  279. package/es/defaults.mjs.map +1 -0
  280. package/es/directives/copy/index.d.ts +3 -0
  281. package/es/directives/copy/index.mjs +31 -0
  282. package/es/directives/copy/index.mjs.map +1 -0
  283. package/es/directives/draggable/index.d.ts +3 -0
  284. package/es/directives/draggable/index.mjs +28 -0
  285. package/es/directives/draggable/index.mjs.map +1 -0
  286. package/es/directives/index.d.ts +4 -0
  287. package/es/directives/index.mjs +5 -0
  288. package/es/directives/longpress/index.d.ts +7 -0
  289. package/es/directives/longpress/index.mjs +32 -0
  290. package/es/directives/longpress/index.mjs.map +1 -0
  291. package/es/directives/resize-element/index.d.ts +3 -0
  292. package/es/directives/resize-element/index.mjs +30 -0
  293. package/es/directives/resize-element/index.mjs.map +1 -0
  294. package/es/directives/show-tip/index.d.ts +3 -0
  295. package/es/directives/show-tip/index.mjs +19 -0
  296. package/es/directives/show-tip/index.mjs.map +1 -0
  297. package/es/hooks/_configurable.d.ts +27 -0
  298. package/es/hooks/_configurable.mjs +10 -0
  299. package/es/hooks/_configurable.mjs.map +1 -0
  300. package/es/hooks/index.d.ts +1 -0
  301. package/es/hooks/index.mjs +2 -0
  302. package/es/hooks/toRef/index.d.ts +14 -0
  303. package/es/hooks/toRef/index.mjs +19 -0
  304. package/es/hooks/toRef/index.mjs.map +1 -0
  305. package/es/hooks/tryOnScopeDispose/index.d.ts +7 -0
  306. package/es/hooks/tryOnScopeDispose/index.mjs +18 -0
  307. package/es/hooks/tryOnScopeDispose/index.mjs.map +1 -0
  308. package/es/hooks/unrefElement/index.d.ts +12 -0
  309. package/es/hooks/unrefElement/index.mjs +16 -0
  310. package/es/hooks/unrefElement/index.mjs.map +1 -0
  311. package/es/hooks/use-full-screen/index.d.ts +1 -0
  312. package/es/hooks/use-full-screen/index.mjs +32 -0
  313. package/es/hooks/use-full-screen/index.mjs.map +1 -0
  314. package/es/hooks/useEventListener/index.d.ts +83 -0
  315. package/es/hooks/useEventListener/index.mjs +47 -0
  316. package/es/hooks/useEventListener/index.mjs.map +1 -0
  317. package/es/hooks/useFullscreen/index.d.ts +25 -0
  318. package/es/hooks/useFullscreen/index.mjs +121 -0
  319. package/es/hooks/useFullscreen/index.mjs.map +1 -0
  320. package/es/hooks/useMounted/index.d.ts +6 -0
  321. package/es/hooks/useMounted/index.mjs +19 -0
  322. package/es/hooks/useMounted/index.mjs.map +1 -0
  323. package/es/hooks/useSupported/index.d.ts +2 -0
  324. package/es/hooks/useSupported/index.mjs +14 -0
  325. package/es/hooks/useSupported/index.mjs.map +1 -0
  326. package/es/hooks/utils/filters.d.ts +84 -0
  327. package/es/hooks/utils/filters.mjs +141 -0
  328. package/es/hooks/utils/filters.mjs.map +1 -0
  329. package/es/hooks/utils/general.d.ts +49 -0
  330. package/es/hooks/utils/general.mjs +85 -0
  331. package/es/hooks/utils/general.mjs.map +1 -0
  332. package/es/hooks/utils/index.d.ts +6 -0
  333. package/es/hooks/utils/index.mjs +6 -0
  334. package/es/hooks/utils/is.d.ts +13 -0
  335. package/es/hooks/utils/is.mjs +29 -0
  336. package/es/hooks/utils/is.mjs.map +1 -0
  337. package/es/hooks/utils/port.d.ts +2 -0
  338. package/es/hooks/utils/port.mjs +17 -0
  339. package/es/hooks/utils/port.mjs.map +1 -0
  340. package/es/hooks/utils/types.d.ts +117 -0
  341. package/es/hooks/utils/types.mjs +0 -0
  342. package/es/hooks/utils/vue.d.ts +1 -0
  343. package/es/hooks/utils/vue.mjs +9 -0
  344. package/es/hooks/utils/vue.mjs.map +1 -0
  345. package/es/hooks/watchImmediate/index.d.ts +5 -0
  346. package/es/hooks/watchImmediate/index.mjs +17 -0
  347. package/es/hooks/watchImmediate/index.mjs.map +1 -0
  348. package/es/index.d.ts +8 -0
  349. package/es/index.mjs +47 -0
  350. package/es/index.mjs.map +1 -0
  351. package/es/make-installer.d.ts +5 -0
  352. package/es/make-installer.mjs +15 -0
  353. package/es/make-installer.mjs.map +1 -0
  354. package/es/share/dist/index.d.ts +60 -0
  355. package/es/share/dist/index.mjs +16 -0
  356. package/es/share/dist/index.mjs.map +1 -0
  357. package/es/utils/browser.d.ts +3 -0
  358. package/es/utils/browser.mjs +9 -0
  359. package/es/utils/browser.mjs.map +1 -0
  360. package/es/utils/console-log/index.d.ts +3 -0
  361. package/es/utils/console-log/index.mjs +23 -0
  362. package/es/utils/console-log/index.mjs.map +1 -0
  363. package/es/utils/create/index.d.ts +21 -0
  364. package/es/utils/create/index.mjs +43 -0
  365. package/es/utils/create/index.mjs.map +1 -0
  366. package/es/utils/dom/index.d.ts +2 -0
  367. package/es/utils/dom/index.mjs +3 -0
  368. package/es/utils/dom/scroll.d.ts +11 -0
  369. package/es/utils/dom/scroll.mjs +107 -0
  370. package/es/utils/dom/scroll.mjs.map +1 -0
  371. package/es/utils/dom/style.d.ts +5 -0
  372. package/es/utils/dom/style.mjs +35 -0
  373. package/es/utils/dom/style.mjs.map +1 -0
  374. package/es/utils/easings.d.ts +1 -0
  375. package/es/utils/easings.mjs +11 -0
  376. package/es/utils/easings.mjs.map +1 -0
  377. package/es/utils/index.d.ts +11 -0
  378. package/es/utils/index.mjs +14 -0
  379. package/es/utils/objects.d.ts +8 -0
  380. package/es/utils/objects.mjs +19 -0
  381. package/es/utils/objects.mjs.map +1 -0
  382. package/es/utils/raf.d.ts +2 -0
  383. package/es/utils/raf.mjs +8 -0
  384. package/es/utils/raf.mjs.map +1 -0
  385. package/es/utils/request/index.d.ts +25 -0
  386. package/es/utils/request/index.mjs +49 -0
  387. package/es/utils/request/index.mjs.map +1 -0
  388. package/es/utils/types.d.ts +10 -0
  389. package/es/utils/types.mjs +22 -0
  390. package/es/utils/types.mjs.map +1 -0
  391. package/es/utils/typescript.d.ts +12 -0
  392. package/es/utils/typescript.mjs +6 -0
  393. package/es/utils/typescript.mjs.map +1 -0
  394. package/es/utils/vue/index.d.ts +3 -0
  395. package/es/utils/vue/index.mjs +3 -0
  396. package/es/utils/vue/install.d.ts +50 -0
  397. package/es/utils/vue/install.mjs +74 -0
  398. package/es/utils/vue/install.mjs.map +1 -0
  399. package/es/utils/vue/props/index.d.ts +3 -0
  400. package/es/utils/vue/props/index.mjs +2 -0
  401. package/es/utils/vue/props/runtime.d.ts +29 -0
  402. package/es/utils/vue/props/runtime.mjs +59 -0
  403. package/es/utils/vue/props/runtime.mjs.map +1 -0
  404. package/es/utils/vue/props/types.d.ts +120 -0
  405. package/es/utils/vue/props/types.mjs +0 -0
  406. package/es/utils/vue/props/util.d.ts +8 -0
  407. package/es/utils/vue/props/util.mjs +0 -0
  408. package/es/utils/vue/typescript.d.ts +6 -0
  409. package/es/utils/vue/typescript.mjs +0 -0
  410. package/es/version.d.ts +1 -0
  411. package/es/version.mjs +6 -0
  412. package/es/version.mjs.map +1 -0
  413. package/global.d.ts +1 -0
  414. package/package.json +80 -0
  415. package/resolvers/index.d.mts +19 -0
  416. package/resolvers/index.d.ts +19 -0
  417. package/resolvers/index.mjs +32 -0
  418. package/theme-chalk/hd-date-picker.css +1 -0
  419. package/theme-chalk/hd-descriptions.css +1 -0
  420. package/theme-chalk/hd-ellipsis-tag.css +1 -0
  421. package/theme-chalk/hd-empty.css +2 -0
  422. package/theme-chalk/hd-jdata-viewer.css +1 -0
  423. package/theme-chalk/hd-radio.css +1 -0
  424. package/theme-chalk/hd-remote-search.css +1 -0
  425. package/theme-chalk/hd-search-form.css +1 -0
  426. package/theme-chalk/hd-sticky-container.css +1 -0
  427. package/theme-chalk/hd-table-editor.css +1 -0
  428. package/theme-chalk/hd-table.css +1 -0
  429. package/theme-chalk/hd-tabs.css +1 -0
  430. package/theme-chalk/hd-tarea-tag.css +1 -0
  431. package/theme-chalk/hd-text-ellipsis.css +1 -0
  432. package/theme-chalk/hd-time-line.css +1 -0
  433. package/theme-chalk/hd-uploader.css +1 -0
  434. package/theme-chalk/index.css +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.mjs","names":[],"sources":["../../../../../../packages/components/radio/src/radio.ts"],"sourcesContent":["import type { ExtractPropTypes, PropType } from 'vue'\nimport { buildProps } from '@hd-custom/utils'\n\nexport interface RadioOptionProp {\n label: string\n value: any\n [key: string]: any\n}\n\nexport const radioProps = buildProps({\n options: {\n type: Array as PropType<RadioOptionProp[]>,\n default: () => [],\n },\n modelValue: {\n type: [String, Number, Boolean],\n default: '',\n },\n value: {\n type: String,\n default: 'value',\n },\n label: {\n type: String,\n default: 'label',\n },\n cancel: {\n type: Boolean,\n default: true,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n})\n\nexport const radioEmits = ['update:modelValue', 'change']\n\nexport type RadioProps = ExtractPropTypes<typeof radioProps>\n"],"mappings":";;AASA,IAAa,aAAa,WAAW;CACnC,SAAS;EACP,MAAM;EACN,eAAe,EAAE;EAClB;CACD,YAAY;EACV,MAAM;GAAC;GAAQ;GAAQ;GAAQ;EAC/B,SAAS;EACV;CACD,OAAO;EACL,MAAM;EACN,SAAS;EACV;CACD,OAAO;EACL,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,MAAM;EACN,SAAS;EACV;CACF,CAAC;AAEF,IAAa,aAAa,CAAC,qBAAqB,SAAS"}
@@ -0,0 +1,25 @@
1
+ import { RadioOptionProp } from './radio.js';
2
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ options: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => RadioOptionProp[]) | (() => RadioOptionProp[]) | (((new (...args: any[]) => RadioOptionProp[]) | (() => RadioOptionProp[])) | null)[], unknown, unknown, () => never[], boolean>;
4
+ modelValue: import("../../../utils/index.js").EpPropFinalized<(NumberConstructor | StringConstructor | BooleanConstructor)[], unknown, unknown, string, boolean>;
5
+ value: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
6
+ label: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
7
+ cancel: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
8
+ disabled: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
9
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
10
+ options: import("../../../utils/index.js").EpPropFinalized<(new (...args: any[]) => RadioOptionProp[]) | (() => RadioOptionProp[]) | (((new (...args: any[]) => RadioOptionProp[]) | (() => RadioOptionProp[])) | null)[], unknown, unknown, () => never[], boolean>;
11
+ modelValue: import("../../../utils/index.js").EpPropFinalized<(NumberConstructor | StringConstructor | BooleanConstructor)[], unknown, unknown, string, boolean>;
12
+ value: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
13
+ label: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
14
+ cancel: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
15
+ disabled: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
16
+ }>> & Readonly<{}>, {
17
+ label: string;
18
+ options: RadioOptionProp[];
19
+ cancel: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
20
+ value: string;
21
+ disabled: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
22
+ modelValue: import("../../../utils/index.js").EpPropMergeType<(NumberConstructor | StringConstructor | BooleanConstructor)[], unknown, unknown>;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import radio_vue_vue_type_script_setup_true_lang_default from "./radio.vue_vue_type_script_setup_true_lang.mjs";
2
+ //#region packages/components/radio/src/radio.vue
3
+ var radio_default = radio_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { radio_default as default };
6
+
7
+ //# sourceMappingURL=radio.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.vue.mjs","names":[],"sources":["../../../../../../packages/components/radio/src/radio.vue"],"sourcesContent":["<template>\r\n <div class=\"hd-radio flex\">\r\n <div\r\n v-for=\"(op, idx) in props.options\"\r\n :key=\"idx\"\r\n class=\"flex py-[6px] cursor-pointer items-center select-none mr-[32px] last:(mr-0)\"\r\n @click=\"onClicked(op)\"\r\n >\r\n <div\r\n :class=\"`${\r\n isCheck === (typeof op === 'string' ? op : op[props.value]) ? `active-icon` : ''\r\n } w-[14px] h-[14px] border rounded-full mr-[8px] flex items-center justify-center ${\r\n disabled ? 'disabled-radio' : ''\r\n }`\"\r\n >\r\n <div\r\n v-show=\"isCheck === (typeof op === 'string' ? op : op[props.value])\"\r\n class=\"w-[4px] h-[4px] rounded-full border-full shadow bg-white\"\r\n ></div>\r\n </div>\r\n <div\r\n :class=\"{\r\n 'active-text': isCheck === (typeof op === 'string' ? op : op[props.value]),\r\n 'disabled-text': disabled,\r\n }\"\r\n >\r\n {{ typeof op === 'string' ? op : op[props.label] }}\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { computed } from 'vue'\r\nimport { radioProps, radioEmits, RadioOptionProp } from './radio'\r\n\r\ndefineOptions({\r\n name: 'Radio',\r\n})\r\n\r\nconst props = defineProps(radioProps)\r\nconst emit = defineEmits(radioEmits)\r\n\r\nconst isCheck = computed({\r\n set: (val) => {\r\n emit('update:modelValue', val)\r\n },\r\n get: () => props.modelValue,\r\n})\r\nconst onClicked = (op: string | RadioOptionProp) => {\r\n if (props.disabled) return\r\n const _key = typeof op === 'string' ? op : op[props.value]\r\n if (isCheck.value === _key) {\r\n if (!props.cancel) return\r\n isCheck.value = ''\r\n } else {\r\n isCheck.value = _key\r\n }\r\n emit('change', isCheck.value, typeof op === 'string' ? '' : op[props.value])\r\n}\r\n</script>\r\n"],"mappings":""}
@@ -0,0 +1,44 @@
1
+ import { radioEmits, radioProps } from "./radio.mjs";
2
+ import { Fragment, computed, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, vShow, withDirectives } from "vue";
3
+ //#region packages/components/radio/src/radio.vue?vue&type=script&setup=true&lang.ts
4
+ var radio_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
5
+ name: "Radio",
6
+ __name: "radio",
7
+ props: radioProps,
8
+ emits: radioEmits,
9
+ setup(__props, { emit: __emit }) {
10
+ const props = __props;
11
+ const emit = __emit;
12
+ const isCheck = computed({
13
+ set: (val) => {
14
+ emit("update:modelValue", val);
15
+ },
16
+ get: () => props.modelValue
17
+ });
18
+ const onClicked = (op) => {
19
+ if (props.disabled) return;
20
+ const _key = typeof op === "string" ? op : op[props.value];
21
+ if (isCheck.value === _key) {
22
+ if (!props.cancel) return;
23
+ isCheck.value = "";
24
+ } else isCheck.value = _key;
25
+ emit("change", isCheck.value, typeof op === "string" ? "" : op[props.value]);
26
+ };
27
+ return (_ctx, _cache) => {
28
+ return openBlock(), createElementBlock("div", { class: "hd-radio flex" }, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (op, idx) => {
29
+ return openBlock(), createElementBlock("div", {
30
+ key: idx,
31
+ class: "flex py-[6px] cursor-pointer items-center select-none mr-[32px] last:(mr-0)",
32
+ onClick: ($event) => onClicked(op)
33
+ }, [createElementVNode("div", { class: normalizeClass(`${isCheck.value === (typeof op === "string" ? op : op[props.value]) ? `active-icon` : ""} w-[14px] h-[14px] border rounded-full mr-[8px] flex items-center justify-center ${_ctx.disabled ? "disabled-radio" : ""}`) }, [withDirectives(createElementVNode("div", { class: "w-[4px] h-[4px] rounded-full border-full shadow bg-white" }, null, 512), [[vShow, isCheck.value === (typeof op === "string" ? op : op[props.value])]])], 2), createElementVNode("div", { class: normalizeClass({
34
+ "active-text": isCheck.value === (typeof op === "string" ? op : op[props.value]),
35
+ "disabled-text": _ctx.disabled
36
+ }) }, toDisplayString(typeof op === "string" ? op : op[props.label]), 3)], 8, ["onClick"]);
37
+ }), 128))]);
38
+ };
39
+ }
40
+ });
41
+ //#endregion
42
+ export { radio_vue_vue_type_script_setup_true_lang_default as default };
43
+
44
+ //# sourceMappingURL=radio.vue_vue_type_script_setup_true_lang.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.vue_vue_type_script_setup_true_lang.mjs","names":["disabled"],"sources":["../../../../../../packages/components/radio/src/radio.vue"],"sourcesContent":["<template>\r\n <div class=\"hd-radio flex\">\r\n <div\r\n v-for=\"(op, idx) in props.options\"\r\n :key=\"idx\"\r\n class=\"flex py-[6px] cursor-pointer items-center select-none mr-[32px] last:(mr-0)\"\r\n @click=\"onClicked(op)\"\r\n >\r\n <div\r\n :class=\"`${\r\n isCheck === (typeof op === 'string' ? op : op[props.value]) ? `active-icon` : ''\r\n } w-[14px] h-[14px] border rounded-full mr-[8px] flex items-center justify-center ${\r\n disabled ? 'disabled-radio' : ''\r\n }`\"\r\n >\r\n <div\r\n v-show=\"isCheck === (typeof op === 'string' ? op : op[props.value])\"\r\n class=\"w-[4px] h-[4px] rounded-full border-full shadow bg-white\"\r\n ></div>\r\n </div>\r\n <div\r\n :class=\"{\r\n 'active-text': isCheck === (typeof op === 'string' ? op : op[props.value]),\r\n 'disabled-text': disabled,\r\n }\"\r\n >\r\n {{ typeof op === 'string' ? op : op[props.label] }}\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n<script lang=\"ts\" setup>\r\nimport { computed } from 'vue'\r\nimport { radioProps, radioEmits, RadioOptionProp } from './radio'\r\n\r\ndefineOptions({\r\n name: 'Radio',\r\n})\r\n\r\nconst props = defineProps(radioProps)\r\nconst emit = defineEmits(radioEmits)\r\n\r\nconst isCheck = computed({\r\n set: (val) => {\r\n emit('update:modelValue', val)\r\n },\r\n get: () => props.modelValue,\r\n})\r\nconst onClicked = (op: string | RadioOptionProp) => {\r\n if (props.disabled) return\r\n const _key = typeof op === 'string' ? op : op[props.value]\r\n if (isCheck.value === _key) {\r\n if (!props.cancel) return\r\n isCheck.value = ''\r\n } else {\r\n isCheck.value = _key\r\n }\r\n emit('change', isCheck.value, typeof op === 'string' ? '' : op[props.value])\r\n}\r\n</script>\r\n"],"mappings":";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 @@
1
+ import RemoteSearch from './src/remote-search.js';
2
+ import type { SFCWithInstall } from '../../utils/index.js';
3
+ export declare const HdRemoteSearch: SFCWithInstall<typeof RemoteSearch>;
4
+ export default HdRemoteSearch;
5
+ export * from './src/iremote-search.js';
6
+ export type { RemoteSearchInstance } from './src/instance.js';
@@ -0,0 +1,9 @@
1
+ import { withInstall } from "../../utils/vue/install.mjs";
2
+ import { remoteSearchEmits, remoteSearchProps } from "./src/iremote-search.mjs";
3
+ import remote_search_default from "./src/remote-search.mjs";
4
+ //#region packages/components/remote-search/index.ts
5
+ var HdRemoteSearch = withInstall(remote_search_default);
6
+ //#endregion
7
+ export { HdRemoteSearch, HdRemoteSearch as default, remoteSearchEmits, remoteSearchProps };
8
+
9
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../packages/components/remote-search/index.ts"],"sourcesContent":["import { withInstall } from '@hd-custom/utils'\n\nimport RemoteSearch from './src/remote-search'\nimport type { SFCWithInstall } from '@hd-custom/utils'\n\nexport const HdRemoteSearch: SFCWithInstall<typeof RemoteSearch> = withInstall(RemoteSearch)\nexport default HdRemoteSearch\n\nexport * from './src/iremote-search'\n\nexport type { RemoteSearchInstance } from './src/instance'\n"],"mappings":";;;;AAKA,IAAa,iBAAsD,YAAY,sBAAa"}
@@ -0,0 +1,2 @@
1
+ import type RemoteSearch from './remote-search.js';
2
+ export type RemoteSearchInstance = InstanceType<typeof RemoteSearch>;
File without changes
@@ -0,0 +1,26 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ export declare const remoteSearchProps: {
3
+ url: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
4
+ exposeRef: import("../../../utils/index.js").EpPropFinalized<ObjectConstructor, unknown, unknown, null, boolean>;
5
+ method: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
6
+ isRemoteSearch: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
7
+ requestApi: import("../../../utils/index.js").EpPropFinalized<FunctionConstructor, unknown, unknown, null, boolean>;
8
+ requestAuto: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
9
+ searchField: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
10
+ requestParams: import("../../../utils/index.js").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
11
+ defaultParams: import("../../../utils/index.js").EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
12
+ requestHeaders: import("../../../utils/index.js").EpPropFinalized<(ObjectConstructor | FunctionConstructor)[], unknown, unknown, () => {}, boolean>;
13
+ resultKey: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
14
+ dataCallback: import("../../../utils/index.js").EpPropFinalized<FunctionConstructor[], unknown, unknown, null, boolean>;
15
+ valueKey: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
16
+ labelKey: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
17
+ modelItem: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
18
+ optTemp: import("../../../utils/index.js").EpPropFinalized<(ObjectConstructor | FunctionConstructor)[], unknown, unknown, null, boolean>;
19
+ w: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
20
+ getInstance: import("../../../utils/index.js").EpPropFinalized<FunctionConstructor, unknown, unknown, null, boolean>;
21
+ getExposed: import("../../../utils/index.js").EpPropFinalized<FunctionConstructor, unknown, unknown, null, boolean>;
22
+ stag: import("../../../utils/index.js").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
23
+ defaultFirstOption: import("../../../utils/index.js").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
24
+ };
25
+ export declare const remoteSearchEmits: string[];
26
+ export type RemoteSearchProps = ExtractPropTypes<typeof remoteSearchProps>;
@@ -0,0 +1,94 @@
1
+ import { buildProps } from "../../../utils/vue/props/runtime.mjs";
2
+ //#region packages/components/remote-search/src/iremote-search.ts
3
+ var remoteSearchProps = buildProps({
4
+ url: {
5
+ type: String,
6
+ default: ""
7
+ },
8
+ exposeRef: {
9
+ type: Object,
10
+ default: null
11
+ },
12
+ method: {
13
+ type: String,
14
+ default: "GET"
15
+ },
16
+ isRemoteSearch: {
17
+ type: Boolean,
18
+ default: true
19
+ },
20
+ requestApi: {
21
+ type: Function,
22
+ default: null
23
+ },
24
+ requestAuto: {
25
+ type: Boolean,
26
+ default: true
27
+ },
28
+ searchField: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ requestParams: {
33
+ type: Object,
34
+ default: () => ({})
35
+ },
36
+ defaultParams: {
37
+ type: Object,
38
+ default: () => ({})
39
+ },
40
+ requestHeaders: {
41
+ type: [Object, Function],
42
+ default: () => ({})
43
+ },
44
+ resultKey: {
45
+ type: String,
46
+ default: "items"
47
+ },
48
+ dataCallback: {
49
+ type: [Function],
50
+ required: false,
51
+ default: null
52
+ },
53
+ valueKey: {
54
+ type: String,
55
+ default: "id"
56
+ },
57
+ labelKey: {
58
+ type: String,
59
+ default: "label"
60
+ },
61
+ modelItem: {
62
+ type: Boolean,
63
+ default: false
64
+ },
65
+ optTemp: {
66
+ type: [Function, Object],
67
+ default: null
68
+ },
69
+ w: {
70
+ type: String,
71
+ default: "100%"
72
+ },
73
+ getInstance: {
74
+ type: Function,
75
+ default: null
76
+ },
77
+ getExposed: {
78
+ type: Function,
79
+ default: null
80
+ },
81
+ stag: {
82
+ type: String,
83
+ default: "select"
84
+ },
85
+ defaultFirstOption: {
86
+ type: Boolean,
87
+ default: false
88
+ }
89
+ });
90
+ var remoteSearchEmits = ["after-remote"];
91
+ //#endregion
92
+ export { remoteSearchEmits, remoteSearchProps };
93
+
94
+ //# sourceMappingURL=iremote-search.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iremote-search.mjs","names":[],"sources":["../../../../../../packages/components/remote-search/src/iremote-search.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { buildProps } from '@hd-custom/utils'\n\nexport const remoteSearchProps = buildProps({\n url: {\n type: String,\n default: '',\n },\n exposeRef: {\n type: Object,\n default: null,\n },\n method: {\n type: String,\n default: 'GET',\n },\n isRemoteSearch: {\n type: Boolean,\n default: true,\n },\n requestApi: {\n type: Function,\n default: null,\n },\n requestAuto: {\n type: Boolean,\n default: true,\n },\n searchField: {\n type: String,\n default: '',\n },\n requestParams: {\n type: Object,\n default: () => ({}),\n },\n defaultParams: {\n type: Object,\n default: () => ({}),\n },\n requestHeaders: {\n type: [Object, Function],\n default: () => ({}),\n },\n resultKey: {\n type: String,\n default: 'items',\n },\n dataCallback: {\n type: [Function],\n required: false,\n default: null,\n },\n valueKey: {\n type: String,\n default: 'id',\n },\n labelKey: {\n type: String,\n default: 'label',\n },\n modelItem: {\n type: Boolean,\n default: false,\n },\n optTemp: {\n type: [Function, Object],\n default: null,\n },\n w: {\n type: String,\n default: '100%',\n },\n getInstance: {\n type: Function,\n default: null,\n },\n getExposed: {\n type: Function,\n default: null,\n },\n stag: {\n type: String,\n default: 'select',\n },\n defaultFirstOption: {\n type: Boolean,\n default: false,\n },\n})\n\nexport const remoteSearchEmits = ['after-remote']\n\nexport type RemoteSearchProps = ExtractPropTypes<typeof remoteSearchProps>\n"],"mappings":";;AAGA,IAAa,oBAAoB,WAAW;CAC1C,KAAK;EACH,MAAM;EACN,SAAS;EACV;CACD,WAAW;EACT,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CACD,gBAAgB;EACd,MAAM;EACN,SAAS;EACV;CACD,YAAY;EACV,MAAM;EACN,SAAS;EACV;CACD,aAAa;EACX,MAAM;EACN,SAAS;EACV;CACD,aAAa;EACX,MAAM;EACN,SAAS;EACV;CACD,eAAe;EACb,MAAM;EACN,gBAAgB,EAAE;EACnB;CACD,eAAe;EACb,MAAM;EACN,gBAAgB,EAAE;EACnB;CACD,gBAAgB;EACd,MAAM,CAAC,QAAQ,SAAS;EACxB,gBAAgB,EAAE;EACnB;CACD,WAAW;EACT,MAAM;EACN,SAAS;EACV;CACD,cAAc;EACZ,MAAM,CAAC,SAAS;EAChB,UAAU;EACV,SAAS;EACV;CACD,UAAU;EACR,MAAM;EACN,SAAS;EACV;CACD,UAAU;EACR,MAAM;EACN,SAAS;EACV;CACD,WAAW;EACT,MAAM;EACN,SAAS;EACV;CACD,SAAS;EACP,MAAM,CAAC,UAAU,OAAO;EACxB,SAAS;EACV;CACD,GAAG;EACD,MAAM;EACN,SAAS;EACV;CACD,aAAa;EACX,MAAM;EACN,SAAS;EACV;CACD,YAAY;EACV,MAAM;EACN,SAAS;EACV;CACD,MAAM;EACJ,MAAM;EACN,SAAS;EACV;CACD,oBAAoB;EAClB,MAAM;EACN,SAAS;EACV;CACF,CAAC;AAEF,IAAa,oBAAoB,CAAC,eAAe"}
@@ -0,0 +1,72 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ url: string;
3
+ method: string;
4
+ valueKey: string;
5
+ labelKey: string;
6
+ exposeRef: Record<string, any>;
7
+ isRemoteSearch: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
8
+ requestApi: Function;
9
+ requestAuto: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
10
+ searchField: string;
11
+ requestParams: Record<string, any>;
12
+ defaultParams: Record<string, any>;
13
+ requestHeaders: import("../../../utils/index.js").EpPropMergeType<(ObjectConstructor | FunctionConstructor)[], unknown, unknown>;
14
+ resultKey: string;
15
+ dataCallback: Function;
16
+ modelItem: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
17
+ optTemp: import("../../../utils/index.js").EpPropMergeType<(ObjectConstructor | FunctionConstructor)[], unknown, unknown>;
18
+ w: string;
19
+ getInstance: Function;
20
+ getExposed: Function;
21
+ stag: string;
22
+ defaultFirstOption: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
23
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
24
+ [key: string]: any;
25
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").PublicProps, Readonly<{
26
+ url: string;
27
+ method: string;
28
+ valueKey: string;
29
+ labelKey: string;
30
+ exposeRef: Record<string, any>;
31
+ isRemoteSearch: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
32
+ requestApi: Function;
33
+ requestAuto: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
34
+ searchField: string;
35
+ requestParams: Record<string, any>;
36
+ defaultParams: Record<string, any>;
37
+ requestHeaders: import("../../../utils/index.js").EpPropMergeType<(ObjectConstructor | FunctionConstructor)[], unknown, unknown>;
38
+ resultKey: string;
39
+ dataCallback: Function;
40
+ modelItem: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
41
+ optTemp: import("../../../utils/index.js").EpPropMergeType<(ObjectConstructor | FunctionConstructor)[], unknown, unknown>;
42
+ w: string;
43
+ getInstance: Function;
44
+ getExposed: Function;
45
+ stag: string;
46
+ defaultFirstOption: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
47
+ }> & Readonly<{
48
+ [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
49
+ }>, {
50
+ url: string;
51
+ method: string;
52
+ valueKey: string;
53
+ labelKey: string;
54
+ exposeRef: Record<string, any>;
55
+ isRemoteSearch: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
56
+ requestApi: Function;
57
+ requestAuto: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
58
+ searchField: string;
59
+ requestParams: Record<string, any>;
60
+ defaultParams: Record<string, any>;
61
+ requestHeaders: import("../../../utils/index.js").EpPropMergeType<(ObjectConstructor | FunctionConstructor)[], unknown, unknown>;
62
+ resultKey: string;
63
+ dataCallback: Function;
64
+ modelItem: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
65
+ optTemp: import("../../../utils/index.js").EpPropMergeType<(ObjectConstructor | FunctionConstructor)[], unknown, unknown>;
66
+ w: string;
67
+ getInstance: Function;
68
+ getExposed: Function;
69
+ stag: string;
70
+ defaultFirstOption: import("../../../utils/index.js").EpPropMergeType<BooleanConstructor, unknown, unknown>;
71
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
72
+ export default _default;
@@ -0,0 +1,191 @@
1
+ import request from "../../../utils/request/index.mjs";
2
+ import { remoteSearchEmits, remoteSearchProps } from "./iremote-search.mjs";
3
+ import { useDebounceFn } from "@vueuse/core";
4
+ import { createVNode, defineComponent, getCurrentInstance, h, mergeProps, nextTick, onMounted, ref } from "vue";
5
+ import { ElOption, ElSelect, ElSelectV2 } from "element-plus";
6
+ //#region packages/components/remote-search/src/remote-search.tsx
7
+ var remote_search_default = /* @__PURE__ */ defineComponent({
8
+ name: "RemoteSearch",
9
+ props: remoteSearchProps,
10
+ emits: remoteSearchEmits,
11
+ setup(props, { attrs, expose, emit }) {
12
+ const options = ref([]);
13
+ const copyOptions = ref([]);
14
+ const loading = ref(false);
15
+ const collapse = ref(true);
16
+ const setData = (list) => {
17
+ options.value = list;
18
+ copyOptions.value = [...list];
19
+ setDefaultFirstOption(list);
20
+ };
21
+ const setDefaultFirstOption = (list) => {
22
+ if (props.defaultFirstOption && list.length > 0 && !attrs.modelValue) {
23
+ const firstItem = list[0];
24
+ const value = props.modelItem ? firstItem : firstItem[props.valueKey];
25
+ nextTick(() => {
26
+ if (attrs["onUpdate:modelValue"]) attrs["onUpdate:modelValue"](value);
27
+ });
28
+ }
29
+ };
30
+ const source = request.CancelToken.source();
31
+ const updateData = (params = {}) => {
32
+ source.cancel();
33
+ source.token = request.CancelToken.source().token;
34
+ let _headers = { ...props.requestHeaders };
35
+ if (typeof props.requestHeaders === "function") _headers = props.requestHeaders();
36
+ if (!collapse.value) return;
37
+ const _params = {
38
+ ...props.defaultParams,
39
+ ...props.requestParams,
40
+ ...params
41
+ };
42
+ try {
43
+ loading.value = true;
44
+ request.request({
45
+ url: props.url,
46
+ method: props.method,
47
+ ...props.method.toUpperCase() === "POST" ? { data: _params } : { params: _params },
48
+ headers: _headers,
49
+ cancelToken: source.token
50
+ }).then((res) => {
51
+ if (!res) {
52
+ setData([]);
53
+ emit("after-remote", res);
54
+ return;
55
+ }
56
+ if (props.dataCallback) {
57
+ var _props$dataCallback;
58
+ setData((_props$dataCallback = props.dataCallback(res)) !== null && _props$dataCallback !== void 0 ? _props$dataCallback : []);
59
+ emit("after-remote", res);
60
+ return;
61
+ }
62
+ if (Array.isArray(res)) {
63
+ setData(res);
64
+ emit("after-remote", res);
65
+ return;
66
+ }
67
+ if (props.resultKey && Array.isArray(res[props.resultKey])) setData(res[props.resultKey]);
68
+ else setData([]);
69
+ emit("after-remote", res);
70
+ }).finally(() => {
71
+ loading.value = false;
72
+ });
73
+ } catch (error) {
74
+ console.error("获取数据失败", error);
75
+ }
76
+ };
77
+ const callRequestApi = async (keywords) => {
78
+ if (props.requestApi) try {
79
+ loading.value = true;
80
+ setData(await props.requestApi(keywords));
81
+ } catch (error) {
82
+ console.error("请求报错", error);
83
+ } finally {
84
+ loading.value = false;
85
+ }
86
+ };
87
+ if (props.requestAuto && props.url && !props.isRemoteSearch) updateData(props.requestParams);
88
+ else if (props.requestAuto && props.requestApi && !props.isRemoteSearch) callRequestApi();
89
+ const remoteMethod = useDebounceFn((query) => {
90
+ if (query) if (!props.url && props.requestApi) callRequestApi(query);
91
+ else {
92
+ let params = {};
93
+ if (props.searchField) params = { [props.searchField]: query };
94
+ updateData(params);
95
+ }
96
+ else options.value = [];
97
+ }, 300);
98
+ const cusTemplate = (item) => {
99
+ if (props.optTemp && typeof props.optTemp === "function") return props.optTemp(item);
100
+ return h("div", { class: "cus-temp" }, [h("span", {}, props.labelKey && item[props.labelKey])]);
101
+ };
102
+ const getOptions = (params = {}) => {
103
+ options.value = [];
104
+ if (!props.url && props.requestApi) callRequestApi();
105
+ else updateData(params);
106
+ };
107
+ const clearOptions = () => {
108
+ options.value = [];
109
+ copyOptions.value = [];
110
+ };
111
+ const setOptions = (list) => {
112
+ options.value = list;
113
+ copyOptions.value = [...list];
114
+ };
115
+ const disLabelEvent = () => {
116
+ var _RemoteSearchSelectIn;
117
+ const label = (_RemoteSearchSelectIn = RemoteSearchSelectInstance.value) === null || _RemoteSearchSelectIn === void 0 ? void 0 : _RemoteSearchSelectIn.$el.parentElement.parentElement;
118
+ if (label) label.classList.add("el-form-label-dis");
119
+ };
120
+ onMounted(() => {
121
+ if (props.getInstance && typeof props.getInstance === "function") props.getInstance(getCurrentInstance());
122
+ if (props.getExposed && typeof props.getExposed === "function") {
123
+ var _getCurrentInstance;
124
+ props.getExposed((_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.exposed);
125
+ }
126
+ disLabelEvent();
127
+ });
128
+ const _exposeApi = {
129
+ getOptions,
130
+ clearOptions,
131
+ setOptions
132
+ };
133
+ if (props.exposeRef) props.exposeRef.value = _exposeApi;
134
+ const RemoteSearchSelectInstance = ref();
135
+ expose(_exposeApi);
136
+ const renderSelect = () => {
137
+ return h(ElSelect, {
138
+ class: "hd-remote-search remote-search-select",
139
+ ref: RemoteSearchSelectInstance,
140
+ loading: loading.value,
141
+ "value-key": props.valueKey,
142
+ remote: false,
143
+ clearable: true,
144
+ filterable: true,
145
+ reserveKeyword: true,
146
+ collapseTags: true,
147
+ collapseTagsTooltip: true,
148
+ placeholder: props.isRemoteSearch ? "请输入" : "请选择",
149
+ style: { width: props.w },
150
+ ...attrs,
151
+ remoteMethod,
152
+ onVisibleChange: async (value) => {
153
+ await nextTick();
154
+ if (value) {
155
+ if (!props.isRemoteSearch) options.value = [...copyOptions.value];
156
+ } else options.value = [];
157
+ }
158
+ }, () => [options.value.map((item, index) => {
159
+ return h(ElOption, {
160
+ key: index,
161
+ label: props.labelKey && item[props.labelKey],
162
+ value: props.modelItem ? item : props.valueKey && item[props.valueKey]
163
+ }, { default: () => cusTemplate(item) });
164
+ })]);
165
+ };
166
+ const renderSelectV2 = () => {
167
+ const _props = {
168
+ label: props.labelKey,
169
+ value: props.modelItem ? "value" : props.valueKey
170
+ };
171
+ return createVNode(ElSelectV2, mergeProps({
172
+ "class": "hd-remote-search remote-search-select",
173
+ "style": { width: props.w },
174
+ "options": options.value,
175
+ "value-key": props.valueKey,
176
+ "props": _props,
177
+ "clearable": true,
178
+ "filterable": true,
179
+ "remoteMethod": remoteMethod,
180
+ "loading": loading.value
181
+ }, attrs), null);
182
+ };
183
+ return () => {
184
+ return props.stag === "select" ? renderSelect() : renderSelectV2();
185
+ };
186
+ }
187
+ });
188
+ //#endregion
189
+ export { remote_search_default as default };
190
+
191
+ //# sourceMappingURL=remote-search.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-search.mjs","names":["defineComponent","h","ref","getCurrentInstance","onMounted","nextTick","mergeProps","_mergeProps","createVNode","_createVNode","remoteSearchProps","remoteSearchEmits","ElSelect","ElOption","ElSelectV2","request","useDebounceFn","name","props","emits","setup","attrs","expose","emit","options","copyOptions","loading","collapse","setData","list","value","setDefaultFirstOption","defaultFirstOption","length","modelValue","firstItem","modelItem","valueKey","source","CancelToken","updateData","params","cancel","token","_headers","requestHeaders","_params","defaultParams","requestParams","url","method","toUpperCase","data","headers","cancelToken","then","res","dataCallback","Array","isArray","resultKey","finally","error","console","callRequestApi","keywords","requestApi","requestAuto","isRemoteSearch","remoteMethod","query","searchField","cusTemplate","item","optTemp","class","labelKey","getOptions","clearOptions","setOptions","disLabelEvent","label","RemoteSearchSelectInstance","$el","parentElement","classList","add","getInstance","getExposed","exposed","_exposeApi","exposeRef","renderSelect","remote","clearable","filterable","reserveKeyword","collapseTags","collapseTagsTooltip","placeholder","style","width","w","onVisibleChange","map","index","key","default","renderSelectV2","_props","stag"],"sources":["../../../../../../packages/components/remote-search/src/remote-search.tsx"],"sourcesContent":["import { defineComponent, h, ref, getCurrentInstance, onMounted, nextTick } from 'vue'\nimport { remoteSearchProps, remoteSearchEmits, RemoteSearchProps } from './iremote-search'\nimport { ElSelect, ElOption, ElSelectV2 } from 'element-plus'\nimport { request } from '@hd-custom/utils'\nimport { useDebounceFn } from '@vueuse/core'\n\nexport default defineComponent({\n name: 'RemoteSearch',\n props: remoteSearchProps,\n emits: remoteSearchEmits,\n setup(props: RemoteSearchProps, { attrs, expose, emit }: any) {\n const options: any = ref([])\n const copyOptions: any = ref([])\n const loading = ref(false)\n const collapse = ref(true)\n const setData = (list: any) => {\n options.value = list\n copyOptions.value = [...list]\n setDefaultFirstOption(list)\n }\n\n const setDefaultFirstOption = (list: any) => {\n // 如果设置了defaultFirstOption且有数据,将第一条数据设为默认�?\n if (props.defaultFirstOption && list.length > 0 && !attrs.modelValue) {\n const firstItem = list[0]\n const value = props.modelItem ? firstItem : firstItem[props.valueKey]\n // 使用nextTick确保在DOM更新后设置�?\n nextTick(() => {\n if (attrs['onUpdate:modelValue']) {\n attrs['onUpdate:modelValue'](value)\n }\n })\n }\n }\n\n const source = request.CancelToken.source()\n const updateData = (params = {}) => {\n source.cancel()\n source.token = request.CancelToken.source().token\n let _headers: any = { ...props.requestHeaders }\n if (typeof props.requestHeaders === 'function') {\n _headers = props.requestHeaders()\n }\n if (!collapse.value) {\n return\n }\n const _params = {\n ...props.defaultParams,\n ...props.requestParams,\n ...params,\n }\n try {\n loading.value = true\n request\n .request({\n url: props.url,\n method: props.method,\n ...(props.method.toUpperCase() === 'POST' ? { data: _params } : { params: _params }),\n // params: _params,\n // data: JSON.stringify(_params),\n headers: _headers,\n cancelToken: source.token,\n })\n .then((res: any) => {\n // 处理空响�?\n if (!res) {\n setData([])\n emit('after-remote', res)\n return\n }\n\n // 使用数据回调处理\n if (props.dataCallback) {\n setData(props.dataCallback(res) ?? [])\n emit('after-remote', res)\n return\n }\n\n // 处理数组响应\n if (Array.isArray(res)) {\n setData(res)\n emit('after-remote', res)\n return\n }\n\n // 处理对象响应\n if (props.resultKey && Array.isArray(res[props.resultKey])) {\n setData(res[props.resultKey])\n } else {\n setData([])\n }\n\n emit('after-remote', res)\n })\n .finally(() => {\n loading.value = false\n })\n } catch (error) {\n console.error('获取数据失败', error)\n }\n }\n\n const callRequestApi = async (keywords?: string) => {\n if (props.requestApi) {\n try {\n loading.value = true\n const list = await props.requestApi(keywords)\n setData(list)\n } catch (error) {\n console.error('请求报错', error)\n } finally {\n loading.value = false\n }\n }\n }\n\n // 一次性获取所有数�?不需要动态搜�?\n if (props.requestAuto && props.url && !props.isRemoteSearch) {\n updateData(props.requestParams)\n } else if (props.requestAuto && props.requestApi && !props.isRemoteSearch) {\n callRequestApi()\n }\n const remoteMethod = useDebounceFn((query: string) => {\n if (query) {\n if (!props.url && props.requestApi) {\n callRequestApi(query)\n } else {\n let params = {}\n if (props.searchField) params = { [props.searchField]: query }\n updateData(params)\n }\n } else {\n options.value = []\n }\n }, 300)\n const cusTemplate = (item: any) => {\n if (props.optTemp && typeof props.optTemp === 'function') {\n return props.optTemp(item)\n }\n return h('div', { class: 'cus-temp' }, [h('span', {}, props.labelKey && item[props.labelKey])])\n }\n\n const getOptions = (params = {}) => {\n options.value = []\n if (!props.url && props.requestApi) {\n callRequestApi()\n } else {\n updateData(params)\n }\n }\n\n const clearOptions = () => {\n options.value = []\n copyOptions.value = []\n }\n\n const setOptions = (list: any) => {\n options.value = list\n copyOptions.value = [...list]\n }\n\n const disLabelEvent = () => {\n const label = RemoteSearchSelectInstance.value?.$el.parentElement.parentElement\n if (label) label.classList.add('el-form-label-dis')\n }\n\n onMounted(() => {\n if (props.getInstance && typeof props.getInstance === 'function') {\n props.getInstance(getCurrentInstance())\n }\n if (props.getExposed && typeof props.getExposed === 'function') {\n props.getExposed(getCurrentInstance()?.exposed)\n }\n disLabelEvent()\n })\n\n const _exposeApi = {\n getOptions,\n clearOptions,\n setOptions,\n }\n\n if (props.exposeRef) {\n props.exposeRef.value = _exposeApi\n }\n\n const RemoteSearchSelectInstance: any = ref()\n expose(_exposeApi)\n\n const renderSelect = () => {\n return h(\n ElSelect,\n {\n class: 'hd-remote-search remote-search-select',\n ref: RemoteSearchSelectInstance,\n loading: loading.value,\n 'value-key': props.valueKey,\n remote: false,\n clearable: true,\n filterable: true,\n reserveKeyword: true,\n collapseTags: true,\n collapseTagsTooltip: true,\n placeholder: props.isRemoteSearch ? '请输入' : '请选择',\n style: {\n width: props.w,\n },\n ...attrs,\n remoteMethod: remoteMethod,\n onVisibleChange: async (value: boolean) => {\n await nextTick()\n if (value) {\n if (!props.isRemoteSearch) {\n options.value = [...copyOptions.value]\n }\n } else {\n options.value = []\n }\n },\n },\n () => [\n options.value.map((item: any, index: number) => {\n return h(\n ElOption,\n {\n key: index,\n label: props.labelKey && item[props.labelKey],\n value: props.modelItem ? item : props.valueKey && item[props.valueKey],\n },\n {\n default: () => cusTemplate(item),\n },\n )\n }),\n ],\n )\n }\n const renderSelectV2 = () => {\n const _props = {\n label: props.labelKey,\n value: props.modelItem ? 'value' : props.valueKey,\n }\n return (\n <ElSelectV2\n class=\"hd-remote-search remote-search-select\"\n style={{ width: props.w }}\n options={options.value}\n value-key={props.valueKey}\n props={_props}\n clearable\n filterable\n remoteMethod={remoteMethod}\n loading={loading.value}\n {...attrs}\n ></ElSelectV2>\n )\n }\n\n return () => {\n return props.stag === 'select' ? renderSelect() : renderSelectV2()\n }\n },\n})\n"],"mappings":";;;;;;AAMA,IAAA,wBAAeA,gCAAgB;CAC7BiB,MAAM;CACNC,OAAOR;CACPS,OAAOR;CACPS,MAAMF,OAA0B,EAAEG,OAAOC,QAAQC,QAAa;EAC5D,MAAMC,UAAetB,IAAI,EAAE,CAAC;EAC5B,MAAMuB,cAAmBvB,IAAI,EAAE,CAAC;EAChC,MA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Z,MAAMmB;IACnBwD,QAAQ;IACRC,WAAW;IACXC,YAAY;IACZC,gBAAgB;IAChBC,cAAc;IACdC,qBAAqB;IACrBC,aAAajF,MAAMkD,iBAAiB,QAAQ;IAC5CgC,OAAO,EACLC,OAAOnF,MAAMoF,GACd;IACD,GAAGjF;IACWgD;IACdkC,iBAAiB,OAAOzE,UAAmB;AACzC,WAAMzB,UAAU;AAChB,SAAIyB;UACE,CAACZ,MAAMkD,eACT5C,SAAQM,QAAQ,CAAC,GAAGL,YAAYK,MAAM;WAGxCN,SAAQM,QAAQ,EAAE;;IAGvB,QACK,CACJN,QAAQM,MAAM0E,KAAK/B,MAAWgC,UAAkB;AAC9C,WAAOxG,EACLY,UACA;KACE6F,KAAKD;KACLxB,OAAO/D,MAAM0D,YAAYH,KAAKvD,MAAM0D;KACpC9C,OAAOZ,MAAMkB,YAAYqC,OAAOvD,MAAMmB,YAAYoC,KAAKvD,MAAMmB;KAC9D,EACD,EACEsE,eAAenC,YAAYC,KAAI,EAEnC,CAAC;KACD,CAEN,CAAC;;EAEH,MAAMmC,uBAAuB;GAC3B,MAAMC,SAAS;IACb5B,OAAO/D,MAAM0D;IACb9C,OAAOZ,MAAMkB,YAAY,UAAUlB,MAAMmB;IAC1C;AACD,UAAA5B,YAAAK,YAAAP,WAAA;IAAA,SAAA;IAAA,SAGW,EAAE8F,OAAOnF,MAAMoF,GAAG;IAAA,WAChB9E,QAAQM;IAAK,aACXZ,MAAMmB;IAAQ,SAClBwE;IAAM,aAAA;IAAA,cAAA;IAAA,gBAGCxC;IAAY,WACjB3C,QAAQI;IAAK,EAClBT,MAAK,EAAA,KAAA;;AAKf,eAAa;AACX,UAAOH,MAAM4F,SAAS,WAAWlB,cAAc,GAAGgB,gBAAgB;;;CAGvE,CAAC"}
@@ -0,0 +1 @@
1
+ import '../src/remote-search.scss';
@@ -0,0 +1,6 @@
1
+ import SearchForm from './src/search-form.js';
2
+ import type { SFCWithInstall } from '../../utils/index.js';
3
+ export declare const HdSearchForm: SFCWithInstall<typeof SearchForm>;
4
+ export default HdSearchForm;
5
+ export * from './src/isearch-form.js';
6
+ export type { SearchFormInstance } from './src/instance.js';
@@ -0,0 +1,9 @@
1
+ import { withInstall } from "../../utils/vue/install.mjs";
2
+ import { searchFormEmits, searchFormProps } from "./src/isearch-form.mjs";
3
+ import search_form_default from "./src/search-form.mjs";
4
+ //#region packages/components/search-form/index.ts
5
+ var HdSearchForm = withInstall(search_form_default);
6
+ //#endregion
7
+ export { HdSearchForm, HdSearchForm as default, searchFormEmits, searchFormProps };
8
+
9
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../packages/components/search-form/index.ts"],"sourcesContent":["import { withInstall } from '@hd-custom/utils'\n\nimport SearchForm from './src/search-form'\nimport type { SFCWithInstall } from '@hd-custom/utils'\n\nexport const HdSearchForm: SFCWithInstall<typeof SearchForm> = withInstall(SearchForm)\nexport default HdSearchForm\n\nexport * from './src/isearch-form'\nexport type { SearchFormInstance } from './src/instance'\n"],"mappings":";;;;AAKA,IAAa,eAAkD,YAAY,oBAAW"}
@@ -0,0 +1,33 @@
1
+ import { Responsive } from '../interface/index.js';
2
+ type Props = {
3
+ offset?: number;
4
+ span?: number;
5
+ suffix?: boolean;
6
+ xs?: Responsive;
7
+ sm?: Responsive;
8
+ md?: Responsive;
9
+ lg?: Responsive;
10
+ xl?: Responsive;
11
+ };
12
+ declare var __VLS_1: {};
13
+ type __VLS_Slots = {} & {
14
+ default?: (props: typeof __VLS_1) => any;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
17
+ span: number;
18
+ offset: number;
19
+ xs: Responsive;
20
+ sm: Responsive;
21
+ md: Responsive;
22
+ lg: Responsive;
23
+ xl: Responsive;
24
+ suffix: boolean;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,7 @@
1
+ import GridItem_vue_vue_type_script_setup_true_lang_default from "./GridItem.vue_vue_type_script_setup_true_lang.mjs";
2
+ //#region packages/components/search-form/src/components/Grid/components/GridItem.vue
3
+ var GridItem_default = GridItem_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { GridItem_default as default };
6
+
7
+ //# sourceMappingURL=GridItem.vue.mjs.map