@qynpm/ui 1.0.45 → 1.0.47

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