@qynpm/ui 1.0.45 → 1.0.46

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 (194) hide show
  1. package/README.md +7 -2
  2. package/dist/index.cjs +10 -3
  3. package/dist/index.mjs +258 -92
  4. package/dist/qy-action-bar/index.cjs +3 -1
  5. package/dist/qy-action-bar/index.mjs +7 -2
  6. package/dist/qy-button/index.cjs +1 -1
  7. package/dist/qy-button/index.mjs +1 -1
  8. package/dist/qy-cascader/index.cjs +1 -1
  9. package/dist/qy-cascader/index.mjs +1 -1
  10. package/dist/qy-checkbox/index.cjs +1 -1
  11. package/dist/qy-checkbox/index.mjs +1 -1
  12. package/dist/qy-checkbox-group/index.cjs +1 -1
  13. package/dist/qy-checkbox-group/index.mjs +1 -1
  14. package/dist/qy-collapse/index.cjs +1 -1
  15. package/dist/qy-collapse/index.mjs +1 -1
  16. package/dist/qy-color-picker/index.cjs +1 -1
  17. package/dist/qy-color-picker/index.mjs +1 -1
  18. package/dist/qy-date-picker/index.cjs +1 -1
  19. package/dist/qy-date-picker/index.mjs +1 -1
  20. package/dist/qy-dialog/index.cjs +3 -2
  21. package/dist/qy-dialog/index.mjs +7 -5
  22. package/dist/qy-drawer/index.cjs +1 -1
  23. package/dist/qy-drawer/index.mjs +1 -1
  24. package/dist/qy-file-picker/index.cjs +1 -1
  25. package/dist/qy-file-picker/index.mjs +1 -1
  26. package/dist/qy-form-section/index.cjs +3 -1
  27. package/dist/qy-form-section/index.mjs +7 -2
  28. package/dist/qy-fullscreen/index.cjs +1 -1
  29. package/dist/qy-fullscreen/index.mjs +1 -1
  30. package/dist/qy-icon/index.cjs +1 -1
  31. package/dist/qy-icon/index.mjs +2 -2
  32. package/dist/qy-icon-picker/index.cjs +1 -1
  33. package/dist/qy-icon-picker/index.mjs +1 -1
  34. package/dist/qy-iframe/index.cjs +1 -1
  35. package/dist/qy-iframe/index.mjs +1 -1
  36. package/dist/qy-image/index.cjs +1 -1
  37. package/dist/qy-image/index.mjs +1 -1
  38. package/dist/qy-image-preview/index.mjs +2 -2
  39. package/dist/qy-image-upload/index.cjs +3 -1
  40. package/dist/qy-image-upload/index.mjs +7 -2
  41. package/dist/qy-input/index.cjs +1 -1
  42. package/dist/qy-input/index.mjs +1 -1
  43. package/dist/qy-input-number/index.cjs +1 -1
  44. package/dist/qy-input-number/index.mjs +1 -1
  45. package/dist/qy-input-tag/index.cjs +1 -1
  46. package/dist/qy-input-tag/index.mjs +151 -5
  47. package/dist/qy-legacy-selection-dialog/index.cjs +8 -1
  48. package/dist/qy-legacy-selection-dialog/index.mjs +12 -2
  49. package/dist/qy-menu-actions/index.cjs +1 -1
  50. package/dist/qy-menu-actions/index.mjs +1 -1
  51. package/dist/qy-pagination/index.cjs +1 -1
  52. package/dist/qy-pagination/index.mjs +1 -1
  53. package/dist/qy-popconfirm/index.cjs +1 -1
  54. package/dist/qy-popconfirm/index.mjs +1 -1
  55. package/dist/qy-popover/index.cjs +1 -1
  56. package/dist/qy-popover/index.mjs +1 -1
  57. package/dist/qy-radio/index.cjs +1 -1
  58. package/dist/qy-radio/index.mjs +1 -1
  59. package/dist/qy-radio-group/index.cjs +1 -1
  60. package/dist/qy-radio-group/index.mjs +1 -1
  61. package/dist/qy-record-quote-search/index.cjs +4 -1
  62. package/dist/qy-record-quote-search/index.mjs +8 -2
  63. package/dist/qy-remark-image/index.cjs +3 -1
  64. package/dist/qy-remark-image/index.mjs +11 -2
  65. package/dist/qy-remote-select/index.cjs +3 -1
  66. package/dist/qy-remote-select/index.mjs +7 -2
  67. package/dist/qy-result/index.cjs +1 -1
  68. package/dist/qy-result/index.mjs +1 -1
  69. package/dist/qy-scrollbar/index.cjs +1 -1
  70. package/dist/qy-scrollbar/index.mjs +1 -1
  71. package/dist/qy-search-input/index.cjs +3 -1
  72. package/dist/qy-search-input/index.mjs +7 -2
  73. package/dist/qy-select/index.cjs +1 -1
  74. package/dist/qy-select/index.mjs +1 -1
  75. package/dist/qy-selection-dialog/index.cjs +7 -1
  76. package/dist/qy-selection-dialog/index.mjs +11 -2
  77. package/dist/qy-switch/index.cjs +1 -1
  78. package/dist/qy-switch/index.mjs +1 -1
  79. package/dist/qy-table-column-settings/index.cjs +1 -1
  80. package/dist/qy-table-column-settings/index.mjs +1 -1
  81. package/dist/qy-tabs/index.cjs +1 -1
  82. package/dist/qy-tabs/index.mjs +1 -1
  83. package/dist/qy-tag/index.cjs +1 -1
  84. package/dist/qy-tag/index.mjs +1 -1
  85. package/dist/qy-tooltip/index.cjs +1 -1
  86. package/dist/qy-tooltip/index.mjs +1 -1
  87. package/dist/qy-tree/index.cjs +1 -1
  88. package/dist/qy-tree/index.mjs +1 -1
  89. package/dist/qy-tree-select/index.cjs +1 -1
  90. package/dist/qy-tree-select/index.mjs +1 -1
  91. package/dist/qy-upload/index.cjs +1 -1
  92. package/dist/qy-upload/index.mjs +1 -1
  93. package/dist/shared/{index-DEoy2IfN.mjs → index-B0CTzdRW.mjs} +1 -1
  94. package/dist/shared/index-BN4A-O6P.mjs +727 -0
  95. package/dist/shared/index-BR7tIt2k.mjs +211 -0
  96. package/dist/shared/index-BaRw7pWi.mjs +156 -0
  97. package/dist/shared/index-BqzKToOL.cjs +1 -0
  98. package/dist/shared/{index-DM0zanTb.mjs → index-Bzr2RHi5.mjs} +1 -1
  99. package/dist/shared/index-C50jpQ11.mjs +295 -0
  100. package/dist/shared/{index-CsfcDlq4.cjs → index-CIXJwYI-.cjs} +1 -1
  101. package/dist/shared/index-CKkanVur.cjs +1 -0
  102. package/dist/shared/index-CLvL8LAM.cjs +1 -0
  103. package/dist/shared/index-CN2mgT5V.cjs +1 -0
  104. package/dist/shared/{index-uMEKxoXj.mjs → index-CW4s627w.mjs} +1 -1
  105. package/dist/shared/{index-8Iwma3ls.mjs → index-CXOCZlps.mjs} +2 -2
  106. package/dist/shared/{index-CUlhX6fW.cjs → index-CXnL-0Kp.cjs} +1 -1
  107. package/dist/shared/index-CZs0V4ze.cjs +1 -0
  108. package/dist/shared/index-Cqr-L0yd.mjs +285 -0
  109. package/dist/shared/{index-CjImIyvI.mjs → index-Cu6yAwdj.mjs} +1 -1
  110. package/dist/shared/index-D5HS8M1P.cjs +1 -0
  111. package/dist/shared/index-D6QwZtYV.mjs +56 -0
  112. package/dist/shared/index-DCsun70c.cjs +1 -0
  113. package/dist/shared/{index-D359jZg_.cjs → index-DEzFHeJL.cjs} +1 -1
  114. package/dist/shared/{index-2D5AFexl.mjs → index-DNMRIYkm.mjs} +1 -1
  115. package/dist/shared/index-DiN5vXXD.cjs +1 -0
  116. package/dist/shared/{index-Mj7JZt7y.cjs → index-Duq5XZ5w.cjs} +1 -1
  117. package/dist/shared/index-DwHM9eYc.cjs +1 -0
  118. package/dist/shared/{index-DOpfxPDq.cjs → index-FZ5gl2au.cjs} +1 -1
  119. package/dist/shared/index-PM5yNugz.mjs +573 -0
  120. package/dist/shared/index-VtM0GmfU.mjs +361 -0
  121. package/dist/shared/index-ykI9hKtc.mjs +88 -0
  122. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-qXBKqHCs.mjs → index.vue_vue_type_script_setup_true_lang-4CNzVpgF.mjs} +2 -2
  123. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-BNKC9382.cjs → index.vue_vue_type_script_setup_true_lang-D3MxDFk1.cjs} +1 -1
  124. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-Bypkl4Ty.mjs → index.vue_vue_type_script_setup_true_lang-DECgTYqI.mjs} +1 -1
  125. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-CYaK3oDY.cjs → index.vue_vue_type_script_setup_true_lang-DW2JKXjA.cjs} +1 -1
  126. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DeFEEJk8.cjs +1 -0
  127. package/dist/shared/index.vue_vue_type_script_setup_true_lang-GUuWAB0o.mjs +238 -0
  128. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-Byp7e--Y.mjs → index.vue_vue_type_script_setup_true_lang-mWNAIcqc.mjs} +1 -1
  129. package/dist/shared/{index.vue_vue_type_style_index_0_lang-D2iiEHqM.mjs → index.vue_vue_type_style_index_0_lang-BLRxKB-e.mjs} +1 -1
  130. package/dist/shared/{index.vue_vue_type_style_index_0_lang-z2Unl0WQ.mjs → index.vue_vue_type_style_index_0_lang-Ba6d5zw4.mjs} +1 -1
  131. package/dist/shared/{index.vue_vue_type_style_index_0_lang-OHPkiKBo.cjs → index.vue_vue_type_style_index_0_lang-C4yXFBV_.cjs} +1 -1
  132. package/dist/shared/{index.vue_vue_type_style_index_0_lang-DbQkbvgb.mjs → index.vue_vue_type_style_index_0_lang-CuTyK1Ey.mjs} +3 -3
  133. package/dist/shared/{index.vue_vue_type_style_index_0_lang-BI4abIsm.mjs → index.vue_vue_type_style_index_0_lang-CvVl_Y56.mjs} +21 -21
  134. package/dist/shared/js.cookie-BA-dL3zT.mjs +74 -0
  135. package/dist/shared/js.cookie-BmJmHEx1.cjs +1 -0
  136. package/dist/shared/{overlay-stack-CFFRngnU.mjs → overlay-stack-eI-yzYU6.mjs} +2 -2
  137. package/dist/shared/{utils-CUXINmHY.mjs → utils-DpZkMLkb.mjs} +1 -1
  138. package/index.d.ts +0 -3
  139. package/package.json +1 -1
  140. package/qy-remark-image/index.d.ts +4 -0
  141. package/dist/shared/index-BvXyRAhX.cjs +0 -1
  142. package/dist/shared/index-CPW3gKgP.mjs +0 -2429
  143. package/dist/shared/index-CUwUz-Le.cjs +0 -1
  144. package/dist/shared/index-DPqFEuPp.mjs +0 -798
  145. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CPm8gzId.cjs +0 -1
  146. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DkMm40Ac.mjs +0 -151
  147. /package/dist/shared/{index-DiEag4sK.cjs → index-5UAiwqdT.cjs} +0 -0
  148. /package/dist/shared/{index-BhpomD_C.cjs → index-AvNvmJe5.cjs} +0 -0
  149. /package/dist/shared/{index-_e-HwHF0.mjs → index-B1J7PQMl.mjs} +0 -0
  150. /package/dist/shared/{index-C5hzCMaD.mjs → index-B7j9BtSm.mjs} +0 -0
  151. /package/dist/shared/{index-BcDt1tKY.mjs → index-BAOV5iYx.mjs} +0 -0
  152. /package/dist/shared/{index-B3GsIwhf.mjs → index-BKdw4jD_.mjs} +0 -0
  153. /package/dist/shared/{index-B25yA5j-.mjs → index-BVaIvVMi.mjs} +0 -0
  154. /package/dist/shared/{index-HNFq7v-A.cjs → index-Bdlzmh8A.cjs} +0 -0
  155. /package/dist/shared/{index-MEzLM_rM.cjs → index-BgAP_K2E.cjs} +0 -0
  156. /package/dist/shared/{index-BfA7ZJnJ.cjs → index-Blgz8PJc.cjs} +0 -0
  157. /package/dist/shared/{index-Bq9quq2D.cjs → index-BsNtvE6i.cjs} +0 -0
  158. /package/dist/shared/{index-9G8dxxVx.mjs → index-BuVrLl5B.mjs} +0 -0
  159. /package/dist/shared/{index-Bfmf0msc.mjs → index-Bv1DrJ32.mjs} +0 -0
  160. /package/dist/shared/{index-DaUdmOjn.cjs → index-C6G9eVku.cjs} +0 -0
  161. /package/dist/shared/{index-DWBkjY5O.cjs → index-CB0v25oB.cjs} +0 -0
  162. /package/dist/shared/{index-B3YHS3Aa.mjs → index-CGH2ROZV.mjs} +0 -0
  163. /package/dist/shared/{index-BfXhDFFn.cjs → index-CxTyKMEH.cjs} +0 -0
  164. /package/dist/shared/{index-MyPNS-OR.cjs → index-DY2IXvwl.cjs} +0 -0
  165. /package/dist/shared/{index-XSV-GmR2.mjs → index-DdGlwebp.mjs} +0 -0
  166. /package/dist/shared/{index-ByQyMTPg.mjs → index-DvXzDAmi.mjs} +0 -0
  167. /package/dist/shared/{index-EIFVul2W.cjs → index-O6K0DO_k.cjs} +0 -0
  168. /package/dist/shared/{index-B3XwO-Lc.mjs → index-QN7-6GpS.mjs} +0 -0
  169. /package/dist/shared/{index-CVWru9T3.cjs → index-_Bagw0Pj.cjs} +0 -0
  170. /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-BnIolx5s.cjs → index.vue_vue_type_script_setup_true_lang-2ZOn9XPM.cjs} +0 -0
  171. /package/dist/shared/{index.vue_vue_type_script_setup_true_lang-wG7OTsWa.mjs → index.vue_vue_type_script_setup_true_lang-DM0MGPZh.mjs} +0 -0
  172. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CVdFZeHK.mjs → index.vue_vue_type_style_index_0_lang-90f2jQr7.mjs} +0 -0
  173. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Dt19xolk.cjs → index.vue_vue_type_style_index_0_lang-B4fDeQox.cjs} +0 -0
  174. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-hbNK_h45.cjs → index.vue_vue_type_style_index_0_lang-BNL5vyrU.cjs} +0 -0
  175. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-gs0YJI91.mjs → index.vue_vue_type_style_index_0_lang-BvBAR8A1.mjs} +0 -0
  176. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BZZ8vhEf.cjs → index.vue_vue_type_style_index_0_lang-BzJsAWKD.cjs} +0 -0
  177. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-C1n-zAZh.mjs → index.vue_vue_type_style_index_0_lang-C7L66EnO.mjs} +0 -0
  178. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CYIUfOy9.cjs → index.vue_vue_type_style_index_0_lang-CFp5MK6j.cjs} +0 -0
  179. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Tzo8o6M8.mjs → index.vue_vue_type_style_index_0_lang-CN3dJjUV.mjs} +0 -0
  180. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-CPxbKjvY.mjs → index.vue_vue_type_style_index_0_lang-CNdV3Mnk.mjs} +0 -0
  181. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-W44zpeKW.cjs → index.vue_vue_type_style_index_0_lang-CVAm3ApY.cjs} +0 -0
  182. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-B1FgJZbw.mjs → index.vue_vue_type_style_index_0_lang-CgScSrRJ.mjs} +0 -0
  183. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DFAaBzkW.cjs → index.vue_vue_type_style_index_0_lang-Clt7QDAK.cjs} +0 -0
  184. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-WGzoSatU.cjs → index.vue_vue_type_style_index_0_lang-CvlRVqcl.cjs} +0 -0
  185. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BNBJu1Mq.cjs → index.vue_vue_type_style_index_0_lang-D-p1u8y8.cjs} +0 -0
  186. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DzvboHR2.mjs → index.vue_vue_type_style_index_0_lang-D9T_xdbu.mjs} +0 -0
  187. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-E92uiH6Q.cjs → index.vue_vue_type_style_index_0_lang-DGV7FQlw.cjs} +0 -0
  188. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-KHk9wRYT.mjs → index.vue_vue_type_style_index_0_lang-DGt78p3G.mjs} +0 -0
  189. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-shJS7iXC.mjs → index.vue_vue_type_style_index_0_lang-DZOPXZov.mjs} +0 -0
  190. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BXTkWo5P.cjs → index.vue_vue_type_style_index_0_lang-J7wvS2CR.cjs} +0 -0
  191. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-Bpe6LkvL.mjs → index.vue_vue_type_style_index_0_lang-KXiTSh4t.mjs} +0 -0
  192. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-DVXf-yUs.cjs → index.vue_vue_type_style_index_0_lang-YEjVWWsy.cjs} +0 -0
  193. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-D9DraThL.cjs → index.vue_vue_type_style_index_0_lang-nS-EDK4t.cjs} +0 -0
  194. /package/dist/shared/{index.vue_vue_type_style_index_0_lang-BnPRHCwR.cjs → index.vue_vue_type_style_index_0_lang-yci929so.cjs} +0 -0
@@ -0,0 +1,573 @@
1
+ import { ElLoadingDirective as _e } from "element-plus/es";
2
+ import { defineComponent as xe, useAttrs as Ee, useSlots as Me, getCurrentInstance as $e, ref as b, watch as $, onBeforeUnmount as De, reactive as Ue, computed as g, nextTick as Ne, openBlock as s, createBlock as w, withCtx as i, createElementVNode as z, renderSlot as R, createElementBlock as V, Fragment as je, renderList as Ie, createTextVNode as S, toDisplayString as Qe, createCommentVNode as v, createVNode as y, unref as u, mergeProps as ne, withKeys as Le, withModifiers as Je, withDirectives as Ge } from "vue";
3
+ import { ElButton as P, ElForm as He, ElFormItem as D, ElInput as re, ElTable as We, ElTableColumn as Xe, ElPagination as Ye, ElMessage as H } from "element-plus";
4
+ import { _ as ie } from "./index.vue_vue_type_style_index_0_lang-BLRxKB-e.mjs";
5
+ import { S as Ze } from "./index-B7j9BtSm.mjs";
6
+ import { T as ue } from "./index-CGH2ROZV.mjs";
7
+ import { T as et } from "./index-BAOV5iYx.mjs";
8
+ import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
9
+ const at = { class: "qy-selection-dialog" }, lt = { class: "qy-selection-dialog__main" }, ot = {
10
+ key: 0,
11
+ class: "qy-selection-dialog__selected"
12
+ }, nt = { class: "qy-selection-dialog__selected-tags" }, rt = {
13
+ key: 0,
14
+ class: "qy-selection-dialog__selected-actions"
15
+ }, it = {
16
+ key: 1,
17
+ class: "qy-selection-dialog__search-row"
18
+ }, ut = {
19
+ key: 0,
20
+ class: "qy-selection-dialog__toolbar"
21
+ }, st = {
22
+ key: 2,
23
+ class: "qy-selection-dialog__pagination"
24
+ }, ct = { class: "qy-selection-dialog__paste-actions" }, dt = /* @__PURE__ */ xe({
25
+ name: "QySelectionDialog",
26
+ inheritAttrs: !1,
27
+ __name: "index",
28
+ props: {
29
+ modelValue: { default: () => [] },
30
+ open: { type: Boolean, default: !0 },
31
+ title: { default: "选择数据" },
32
+ width: { default: "1200px" },
33
+ fetchMethod: { type: Function, default: void 0 },
34
+ query: { type: Function, default: void 0 },
35
+ responseFormatter: { type: Function, default: void 0 },
36
+ selectionMode: { default: void 0 },
37
+ selection: { default: "single" },
38
+ selected: { default: () => [] },
39
+ rowKey: { default: "id" },
40
+ mainKey: { default: void 0 },
41
+ labelKey: { default: "name" },
42
+ tagName: { default: void 0 },
43
+ searchKey: { default: "conditions" },
44
+ queryParams: { default: () => ({}) },
45
+ category: { type: [Array, Function, Boolean], default: !1 },
46
+ categoryFormatter: { type: [Function, Array], default: void 0 },
47
+ categoryOptions: { default: () => [] },
48
+ categoryFetchMethod: { type: [Function, null], default: null },
49
+ type: { type: [Array, Boolean], default: !1 },
50
+ typeOptions: { default: () => [] },
51
+ typeSelectionProps: { default: () => ({}) },
52
+ typeSelectProps: { default: () => ({}) },
53
+ tableProps: { default: () => ({}) },
54
+ showSelected: { type: Boolean, default: !0 },
55
+ showSearch: { type: Boolean, default: !0 },
56
+ showPagination: { type: Boolean, default: !0 },
57
+ showCopyPaste: { type: Boolean, default: !1 },
58
+ append: { type: Boolean, default: !1 },
59
+ showAppend: { type: Boolean, default: !1 },
60
+ pageSizes: { default: () => [10, 20, 50, 100] }
61
+ },
62
+ emits: ["update:modelValue", "update:open", "error", "selection-change", "confirm", "submit", "cancel", "close", "append", "loaded"],
63
+ setup(f, { expose: se, emit: ce }) {
64
+ const a = f, p = ce, de = Ee(), W = Me(), U = $e(), m = b(null), C = b([]), r = b([]), O = b([]), F = b(!1);
65
+ let T = 0, N = 0, j = !1;
66
+ function I() {
67
+ T += 1, N += 1, F.value = !1;
68
+ }
69
+ $(() => a.open, I, { flush: "sync" }), De(() => {
70
+ j = !0, I();
71
+ });
72
+ function B(e) {
73
+ return !j && a.open && e === T;
74
+ }
75
+ const Q = b(0), k = b(!1), _ = b(""), n = Ue({
76
+ category: [],
77
+ type: "",
78
+ page: 1,
79
+ pageSize: 10,
80
+ ...a.searchKey ? { [a.searchKey]: "" } : {},
81
+ ...a.queryParams
82
+ }), q = g(() => a.selectionMode ? a.selectionMode : a.selection === "multi" ? "multiple" : a.selection), X = g(() => a.mainKey || a.rowKey), ye = g(() => a.tagName || a.labelKey), Y = g(() => a.typeOptions.length ? a.typeOptions : a.type || []), fe = g(() => ({
83
+ ...a.typeSelectionProps,
84
+ ...a.typeSelectProps
85
+ })), L = g(() => a.tableProps || {}), pe = g(
86
+ () => a.showSearch || !!de["search-visible"]
87
+ ), Z = g(() => a.showAppend || a.append), ge = g(
88
+ () => Z.value || !!W.toolbar || !!W.bar
89
+ ), ee = g(() => a.fetchMethod || a.query), J = g(() => ve() ? a.modelValue : a.selected);
90
+ function ve() {
91
+ const e = (U == null ? void 0 : U.vnode.props) || {};
92
+ return Object.prototype.hasOwnProperty.call(e, "modelValue") || Object.prototype.hasOwnProperty.call(e, "model-value") || Object.prototype.hasOwnProperty.call(e, "onUpdate:modelValue");
93
+ }
94
+ $(
95
+ [() => a.modelValue, () => a.selected, () => a.open],
96
+ () => {
97
+ a.open && (r.value = K(J.value), x());
98
+ },
99
+ { immediate: !0, deep: !0 }
100
+ ), $(
101
+ [() => a.categoryOptions, () => a.category],
102
+ (e) => {
103
+ if (Array.isArray(a.category) && a.category.length) {
104
+ O.value = a.category;
105
+ return;
106
+ }
107
+ O.value = a.categoryOptions || [];
108
+ },
109
+ { immediate: !0 }
110
+ ), $(k, (e) => {
111
+ e || (_.value = "");
112
+ });
113
+ async function me() {
114
+ const e = ++T;
115
+ r.value = K(J.value);
116
+ try {
117
+ await he(e);
118
+ } catch (t) {
119
+ B(e) && p("error", t);
120
+ return;
121
+ }
122
+ B(e) && (await A(), B(e) && x());
123
+ }
124
+ async function he(e) {
125
+ const t = a.categoryFetchMethod || (typeof a.category == "function" ? a.category : null);
126
+ if (!t) return;
127
+ const o = await t();
128
+ B(e) && (O.value = Ce(o));
129
+ }
130
+ async function A() {
131
+ if (!ee.value || !a.open || j) return;
132
+ const e = T, t = ++N, o = () => B(e) && t === N;
133
+ F.value = !0;
134
+ try {
135
+ const l = await ee.value(qe());
136
+ if (!o()) return;
137
+ const d = a.responseFormatter ? await a.responseFormatter(l) : l;
138
+ if (!o()) return;
139
+ const { rows: oe, total: Te } = be(d);
140
+ return C.value = oe, Q.value = Te, p("loaded", oe), x(), d;
141
+ } catch (l) {
142
+ o() && p("error", l);
143
+ } finally {
144
+ o() && (F.value = !1);
145
+ }
146
+ }
147
+ function h() {
148
+ return n.page = 1, A();
149
+ }
150
+ function we() {
151
+ return n.page = 1, A();
152
+ }
153
+ function G() {
154
+ return Object.assign(n, {
155
+ category: [],
156
+ type: "",
157
+ page: 1,
158
+ pageSize: n.pageSize,
159
+ ...a.searchKey ? { [a.searchKey]: "" } : {},
160
+ ...a.queryParams
161
+ }), A();
162
+ }
163
+ function Se() {
164
+ p("append");
165
+ }
166
+ function be(e) {
167
+ if (Array.isArray(e))
168
+ return { rows: e, total: e.length };
169
+ const t = e == null ? void 0 : e.data;
170
+ if (Array.isArray(t))
171
+ return { rows: t, total: (e == null ? void 0 : e.total) ?? t.length };
172
+ const o = (e == null ? void 0 : e.records) || (e == null ? void 0 : e.rows) || (t == null ? void 0 : t.records) || [], l = (e == null ? void 0 : e.total) ?? (t == null ? void 0 : t.total) ?? o.length;
173
+ return { rows: o, total: l };
174
+ }
175
+ function Ce(e) {
176
+ const t = (e == null ? void 0 : e.data) ?? e;
177
+ if (!Array.isArray(t)) return [];
178
+ if (typeof a.categoryFormatter == "function")
179
+ return a.categoryFormatter(t);
180
+ if (Array.isArray(a.categoryFormatter)) {
181
+ const [o, l] = a.categoryFormatter;
182
+ return t.map((d) => ({
183
+ ...d,
184
+ label: d[o],
185
+ value: d[l],
186
+ children: Array.isArray(d.children) ? te(d.children, o, l) : d.children
187
+ }));
188
+ }
189
+ return t;
190
+ }
191
+ function te(e, t, o) {
192
+ return e.map((l) => ({
193
+ ...l,
194
+ label: l[t],
195
+ value: l[o],
196
+ children: Array.isArray(l.children) ? te(l.children, t, o) : l.children
197
+ }));
198
+ }
199
+ function qe() {
200
+ const e = { ...a.queryParams, ...n };
201
+ return a.searchKey && (e[a.searchKey] = String(e[a.searchKey] || "").trim()), e.category = Pe(), e;
202
+ }
203
+ function Pe() {
204
+ if (Object.prototype.hasOwnProperty.call(a.queryParams, "category"))
205
+ return a.queryParams.category;
206
+ const e = n.category;
207
+ return Array.isArray(e) ? e : e ? [e] : [];
208
+ }
209
+ function ke(e) {
210
+ var t, o;
211
+ if (q.value !== "none") {
212
+ if (q.value === "single") {
213
+ r.value = [e], (t = m.value) == null || t.setCurrentRow(e), M();
214
+ return;
215
+ }
216
+ Re(e) && ((o = m.value) == null || o.toggleRowSelection(e, !E(e)));
217
+ }
218
+ }
219
+ function Ae(e) {
220
+ if (q.value !== "multiple") return;
221
+ const t = new Set(C.value.map(c)), o = new Set(e.map(c));
222
+ r.value = r.value.filter(
223
+ (l) => !t.has(c(l)) || o.has(c(l))
224
+ ), e.forEach((l) => {
225
+ E(l) || r.value.push(l);
226
+ }), M();
227
+ }
228
+ function Ke(e) {
229
+ var o, l;
230
+ r.value = r.value.filter(
231
+ (d) => c(d) !== c(e)
232
+ );
233
+ const t = C.value.find((d) => c(d) === c(e));
234
+ t && (q.value === "multiple" ? (o = m.value) == null || o.toggleRowSelection(t, !1) : (l = m.value) == null || l.setCurrentRow()), M();
235
+ }
236
+ function x() {
237
+ Ne(() => {
238
+ var e;
239
+ if (m.value) {
240
+ if (q.value === "single") {
241
+ const [t] = r.value, o = C.value.find(
242
+ (l) => t && c(l) === c(t)
243
+ );
244
+ (e = m.value) == null || e.setCurrentRow(o);
245
+ return;
246
+ }
247
+ q.value === "multiple" && C.value.forEach((t) => {
248
+ var o;
249
+ (o = m.value) == null || o.toggleRowSelection(t, E(t));
250
+ });
251
+ }
252
+ });
253
+ }
254
+ function Re(e) {
255
+ var o;
256
+ const t = (o = L.value) == null ? void 0 : o.selectable;
257
+ return typeof t == "function" ? t(e) !== !1 : !0;
258
+ }
259
+ function E(e) {
260
+ return r.value.some((t) => c(t) === c(e));
261
+ }
262
+ function c(e) {
263
+ return ae(e, X.value);
264
+ }
265
+ function Ve(e) {
266
+ return ae(e, ye.value) ?? c(e);
267
+ }
268
+ function ae(e, t) {
269
+ if (!(!e || !t))
270
+ return t.split(".").reduce((o, l) => o == null ? void 0 : o[l], e);
271
+ }
272
+ function M() {
273
+ const e = K(r.value);
274
+ p("selection-change", e);
275
+ }
276
+ function Oe() {
277
+ const e = K(r.value);
278
+ p("update:modelValue", e), p("confirm", e), p("submit", { selection: e, rows: e, query: { ...n } });
279
+ }
280
+ function Be(e) {
281
+ (e === "escape" || e === "overlay") && le();
282
+ }
283
+ function le() {
284
+ I(), r.value = K(J.value), p("update:open", !1), p("cancel"), p("close");
285
+ }
286
+ async function ze() {
287
+ var t;
288
+ const e = JSON.stringify(r.value);
289
+ await ((t = navigator.clipboard) == null ? void 0 : t.writeText(e)), H.success("复制成功");
290
+ }
291
+ function Fe() {
292
+ try {
293
+ const e = JSON.parse(_.value);
294
+ if (!Array.isArray(e)) {
295
+ H.error("粘贴内容需要是数组");
296
+ return;
297
+ }
298
+ e.forEach((t) => {
299
+ E(t) || r.value.push(t);
300
+ }), k.value = !1, M(), x();
301
+ } catch (e) {
302
+ H.error(`粘贴错误: ${(e == null ? void 0 : e.message) || "内容格式错误"}`);
303
+ }
304
+ }
305
+ function K(e = []) {
306
+ return e.map((t) => ({ ...t }));
307
+ }
308
+ return se({
309
+ search: h,
310
+ handleSearch: A,
311
+ handleQuerySearch: h,
312
+ resetSearch: G,
313
+ getTableRef: () => m.value,
314
+ getTableData: () => C.value,
315
+ getSelection: () => K(r.value)
316
+ }), (e, t) => {
317
+ const o = _e;
318
+ return s(), w(ie, {
319
+ open: f.open,
320
+ title: f.title,
321
+ width: f.width,
322
+ onOpened: me,
323
+ onConfirm: Oe,
324
+ onCancel: le,
325
+ onClose: Be
326
+ }, {
327
+ default: i(() => [
328
+ z("div", at, [
329
+ R(e.$slots, "side", {}, void 0, !0),
330
+ z("div", lt, [
331
+ f.showSelected ? (s(), V("div", ot, [
332
+ t[12] || (t[12] = z("span", { class: "qy-selection-dialog__selected-label" }, "已选项", -1)),
333
+ z("div", nt, [
334
+ (s(!0), V(je, null, Ie(r.value, (l) => (s(), w(ue, {
335
+ key: c(l),
336
+ closable: "",
337
+ class: "qy-selection-dialog__selected-tag",
338
+ onClose: (d) => Ke(l)
339
+ }, {
340
+ default: i(() => [
341
+ S(Qe(Ve(l)), 1)
342
+ ]),
343
+ _: 2
344
+ }, 1032, ["onClose"]))), 128)),
345
+ r.value.length ? v("", !0) : (s(), w(ue, {
346
+ key: 0,
347
+ tone: "info"
348
+ }, {
349
+ default: i(() => [...t[9] || (t[9] = [
350
+ S("无", -1)
351
+ ])]),
352
+ _: 1
353
+ }))
354
+ ]),
355
+ f.showCopyPaste ? (s(), V("div", rt, [
356
+ y(u(P), {
357
+ size: "small",
358
+ onClick: ze
359
+ }, {
360
+ default: i(() => [...t[10] || (t[10] = [
361
+ S("复制", -1)
362
+ ])]),
363
+ _: 1
364
+ }),
365
+ y(u(P), {
366
+ size: "small",
367
+ onClick: t[0] || (t[0] = (l) => k.value = !0)
368
+ }, {
369
+ default: i(() => [...t[11] || (t[11] = [
370
+ S("粘贴", -1)
371
+ ])]),
372
+ _: 1
373
+ })
374
+ ])) : v("", !0)
375
+ ])) : v("", !0),
376
+ pe.value ? (s(), V("div", it, [
377
+ y(u(He), {
378
+ class: "qy-selection-dialog__search",
379
+ inline: "",
380
+ model: n
381
+ }, {
382
+ default: i(() => [
383
+ R(e.$slots, "search", {
384
+ query: n,
385
+ search: h,
386
+ reset: G
387
+ }, () => [
388
+ O.value.length ? (s(), w(u(D), {
389
+ key: 0,
390
+ label: "分类"
391
+ }, {
392
+ default: i(() => [
393
+ y(et, {
394
+ modelValue: n.category,
395
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => n.category = l),
396
+ class: "qy-selection-dialog__category",
397
+ options: O.value,
398
+ clearable: "",
399
+ filterable: "",
400
+ "check-strictly": "",
401
+ "render-after-expand": !1,
402
+ onChange: h
403
+ }, null, 8, ["modelValue", "options"])
404
+ ]),
405
+ _: 1
406
+ })) : v("", !0),
407
+ Y.value.length ? (s(), w(u(D), {
408
+ key: 1,
409
+ label: "类型"
410
+ }, {
411
+ default: i(() => [
412
+ y(Ze, ne({
413
+ modelValue: n.type,
414
+ "onUpdate:modelValue": t[2] || (t[2] = (l) => n.type = l),
415
+ class: "qy-selection-dialog__type",
416
+ options: Y.value,
417
+ placeholder: "请选择类型",
418
+ clearable: ""
419
+ }, fe.value, { onChange: h }), null, 16, ["modelValue", "options"])
420
+ ]),
421
+ _: 1
422
+ })) : v("", !0),
423
+ f.searchKey ? (s(), w(u(D), {
424
+ key: 2,
425
+ label: "搜索"
426
+ }, {
427
+ default: i(() => [
428
+ y(u(re), {
429
+ modelValue: n[f.searchKey],
430
+ "onUpdate:modelValue": t[3] || (t[3] = (l) => n[f.searchKey] = l),
431
+ clearable: "",
432
+ placeholder: "请输入",
433
+ class: "qy-selection-dialog__search-input",
434
+ onKeydown: Le(Je(h, ["prevent"]), ["enter"])
435
+ }, null, 8, ["modelValue", "onKeydown"])
436
+ ]),
437
+ _: 1
438
+ })) : v("", !0),
439
+ y(u(D), null, {
440
+ default: i(() => [
441
+ y(u(P), {
442
+ type: "primary",
443
+ onClick: h
444
+ }, {
445
+ default: i(() => [...t[13] || (t[13] = [
446
+ S("查询", -1)
447
+ ])]),
448
+ _: 1
449
+ }),
450
+ y(u(P), { onClick: G }, {
451
+ default: i(() => [...t[14] || (t[14] = [
452
+ S("重置", -1)
453
+ ])]),
454
+ _: 1
455
+ })
456
+ ]),
457
+ _: 1
458
+ })
459
+ ], !0)
460
+ ]),
461
+ _: 3
462
+ }, 8, ["model"]),
463
+ ge.value ? (s(), V("div", ut, [
464
+ Z.value ? (s(), w(u(P), {
465
+ key: 0,
466
+ type: "primary",
467
+ onClick: Se
468
+ }, {
469
+ default: i(() => [...t[15] || (t[15] = [
470
+ S(" 新增 ", -1)
471
+ ])]),
472
+ _: 1
473
+ })) : v("", !0),
474
+ R(e.$slots, "toolbar", {
475
+ query: n,
476
+ search: h
477
+ }, void 0, !0),
478
+ R(e.$slots, "bar", {
479
+ query: n,
480
+ search: h
481
+ }, void 0, !0)
482
+ ])) : v("", !0)
483
+ ])) : v("", !0),
484
+ Ge((s(), w(u(We), ne({
485
+ ref_key: "tableRef",
486
+ ref: m,
487
+ data: C.value,
488
+ "row-key": X.value,
489
+ border: "",
490
+ "highlight-current-row": "",
491
+ "max-height": "550px"
492
+ }, L.value, {
493
+ onSelectionChange: Ae,
494
+ onRowClick: ke
495
+ }), {
496
+ default: i(() => {
497
+ var l;
498
+ return [
499
+ q.value === "multiple" ? (s(), w(u(Xe), {
500
+ key: 0,
501
+ type: "selection",
502
+ "reserve-selection": "",
503
+ width: "42",
504
+ selectable: (l = L.value) == null ? void 0 : l.selectable
505
+ }, null, 8, ["selectable"])) : v("", !0),
506
+ R(e.$slots, "columns", {}, void 0, !0),
507
+ R(e.$slots, "cols", {}, void 0, !0)
508
+ ];
509
+ }),
510
+ _: 3
511
+ }, 16, ["data", "row-key"])), [
512
+ [o, F.value]
513
+ ]),
514
+ f.showPagination && Q.value > 0 ? (s(), V("div", st, [
515
+ y(u(Ye), {
516
+ "current-page": n.page,
517
+ "onUpdate:currentPage": t[4] || (t[4] = (l) => n.page = l),
518
+ "page-size": n.pageSize,
519
+ "onUpdate:pageSize": t[5] || (t[5] = (l) => n.pageSize = l),
520
+ total: Q.value,
521
+ "page-sizes": f.pageSizes,
522
+ layout: "total, sizes, prev, pager, next, jumper",
523
+ onSizeChange: we,
524
+ onCurrentChange: A
525
+ }, null, 8, ["current-page", "page-size", "total", "page-sizes"])
526
+ ])) : v("", !0)
527
+ ])
528
+ ]),
529
+ y(ie, {
530
+ open: k.value,
531
+ title: "粘贴数据",
532
+ "show-footer": !1,
533
+ width: "560px",
534
+ "onUpdate:open": t[8] || (t[8] = (l) => k.value = l)
535
+ }, {
536
+ default: i(() => [
537
+ y(u(re), {
538
+ modelValue: _.value,
539
+ "onUpdate:modelValue": t[6] || (t[6] = (l) => _.value = l),
540
+ type: "textarea",
541
+ rows: 8
542
+ }, null, 8, ["modelValue"]),
543
+ z("div", ct, [
544
+ y(u(P), {
545
+ onClick: t[7] || (t[7] = (l) => k.value = !1)
546
+ }, {
547
+ default: i(() => [...t[16] || (t[16] = [
548
+ S("取消", -1)
549
+ ])]),
550
+ _: 1
551
+ }),
552
+ y(u(P), {
553
+ type: "primary",
554
+ onClick: Fe
555
+ }, {
556
+ default: i(() => [...t[17] || (t[17] = [
557
+ S("确认", -1)
558
+ ])]),
559
+ _: 1
560
+ })
561
+ ])
562
+ ]),
563
+ _: 1
564
+ }, 8, ["open"])
565
+ ]),
566
+ _: 3
567
+ }, 8, ["open", "title", "width"]);
568
+ };
569
+ }
570
+ }), St = /* @__PURE__ */ tt(dt, [["__scopeId", "data-v-47259611"]]);
571
+ export {
572
+ St as C
573
+ };