@qynpm/ui 1.0.44 → 1.0.45

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 (185) hide show
  1. package/README.md +2 -0
  2. package/dist/index.cjs +12 -12
  3. package/dist/index.mjs +13 -13
  4. package/dist/qy-action-bar/index.cjs +1 -1
  5. package/dist/qy-action-bar/index.mjs +1 -1
  6. package/dist/qy-autocomplete/index.cjs +1 -1
  7. package/dist/qy-autocomplete/index.mjs +1 -1
  8. package/dist/qy-checkbox/index.cjs +1 -1
  9. package/dist/qy-checkbox/index.mjs +1 -1
  10. package/dist/qy-checkbox-group/index.cjs +1 -1
  11. package/dist/qy-checkbox-group/index.mjs +1 -1
  12. package/dist/qy-color-picker/index.cjs +1 -1
  13. package/dist/qy-color-picker/index.mjs +1 -1
  14. package/dist/qy-date-picker/index.cjs +1 -1
  15. package/dist/qy-date-picker/index.mjs +1 -1
  16. package/dist/qy-dialog/index.cjs +1 -1
  17. package/dist/qy-dialog/index.mjs +1 -1
  18. package/dist/qy-dropdown/index.cjs +2 -2
  19. package/dist/qy-dropdown/index.mjs +2 -2
  20. package/dist/qy-file-picker/index.cjs +1 -1
  21. package/dist/qy-file-picker/index.mjs +1 -1
  22. package/dist/qy-form-section/index.cjs +1 -1
  23. package/dist/qy-form-section/index.mjs +1 -1
  24. package/dist/qy-image/index.cjs +1 -1
  25. package/dist/qy-image/index.mjs +1 -1
  26. package/dist/qy-image-preview/index.cjs +1 -1
  27. package/dist/qy-image-preview/index.mjs +2 -2
  28. package/dist/qy-image-upload/index.cjs +1 -1
  29. package/dist/qy-image-upload/index.mjs +1 -1
  30. package/dist/qy-input-tag/index.cjs +1 -1
  31. package/dist/qy-input-tag/index.mjs +1 -1
  32. package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
  33. package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
  34. package/dist/qy-menu-actions/index.cjs +1 -1
  35. package/dist/qy-menu-actions/index.mjs +1 -1
  36. package/dist/qy-money-input/index.cjs +1 -1
  37. package/dist/qy-money-input/index.mjs +1 -1
  38. package/dist/qy-pagination/index.cjs +1 -1
  39. package/dist/qy-pagination/index.mjs +1 -1
  40. package/dist/qy-popconfirm/index.cjs +1 -1
  41. package/dist/qy-popconfirm/index.mjs +1 -1
  42. package/dist/qy-popover/index.cjs +1 -1
  43. package/dist/qy-popover/index.mjs +1 -1
  44. package/dist/qy-radio/index.cjs +1 -1
  45. package/dist/qy-radio/index.mjs +1 -1
  46. package/dist/qy-radio-group/index.cjs +1 -1
  47. package/dist/qy-radio-group/index.mjs +1 -1
  48. package/dist/qy-record-quote-search/index.cjs +1 -1
  49. package/dist/qy-record-quote-search/index.mjs +1 -1
  50. package/dist/qy-remark-image/index.cjs +1 -1
  51. package/dist/qy-remark-image/index.mjs +1 -1
  52. package/dist/qy-remote-select/index.cjs +1 -1
  53. package/dist/qy-remote-select/index.mjs +1 -1
  54. package/dist/qy-search-input/index.cjs +1 -1
  55. package/dist/qy-search-input/index.mjs +1 -1
  56. package/dist/qy-select/index.cjs +1 -1
  57. package/dist/qy-select/index.mjs +1 -1
  58. package/dist/qy-selection-dialog/index.cjs +1 -1
  59. package/dist/qy-selection-dialog/index.mjs +1 -1
  60. package/dist/qy-switch/index.cjs +1 -1
  61. package/dist/qy-switch/index.mjs +1 -1
  62. package/dist/qy-table-column-settings/index.cjs +1 -1
  63. package/dist/qy-table-column-settings/index.mjs +1 -1
  64. package/dist/qy-tooltip/index.cjs +1 -1
  65. package/dist/qy-tooltip/index.mjs +1 -1
  66. package/dist/qy-tree-select/index.cjs +1 -1
  67. package/dist/qy-tree-select/index.mjs +1 -1
  68. package/dist/qy-upload/index.cjs +1 -1
  69. package/dist/qy-upload/index.mjs +1 -1
  70. package/dist/shared/{index-BNssRW4d.mjs → index-9G8dxxVx.mjs} +13 -13
  71. package/dist/shared/{index-DRIoLeFE.mjs → index-B1gnVI8Y.mjs} +44 -45
  72. package/dist/shared/{index-CiE6qJCJ.mjs → index-BcDt1tKY.mjs} +151 -143
  73. package/dist/shared/index-BfA7ZJnJ.cjs +1 -0
  74. package/dist/shared/index-BfXhDFFn.cjs +1 -0
  75. package/dist/shared/index-Bfmf0msc.mjs +71 -0
  76. package/dist/shared/index-BhpomD_C.cjs +1 -0
  77. package/dist/shared/index-BvXyRAhX.cjs +1 -0
  78. package/dist/shared/index-Bz9WjKdL.cjs +1 -0
  79. package/dist/shared/{index-Co84fsS5.mjs → index-C5hzCMaD.mjs} +88 -80
  80. package/dist/shared/index-CPW3gKgP.mjs +2429 -0
  81. package/dist/shared/index-CUwUz-Le.cjs +1 -0
  82. package/dist/shared/index-CjImIyvI.mjs +124 -0
  83. package/dist/shared/{index-gMrQlV5n.cjs → index-CsfcDlq4.cjs} +1 -1
  84. package/dist/shared/{index-BweLwi2_.cjs → index-D359jZg_.cjs} +1 -1
  85. package/dist/shared/{index-DvFMgAcu.mjs → index-DEoy2IfN.mjs} +1 -1
  86. package/dist/shared/{index-BjqJCq-6.mjs → index-DM0zanTb.mjs} +3 -3
  87. package/dist/shared/index-DOpfxPDq.cjs +1 -0
  88. package/dist/shared/index-DPqFEuPp.mjs +798 -0
  89. package/dist/shared/index-DWBkjY5O.cjs +1 -0
  90. package/dist/shared/index-DaUdmOjn.cjs +1 -0
  91. package/dist/shared/index-MEzLM_rM.cjs +1 -0
  92. package/dist/shared/index-MyPNS-OR.cjs +1 -0
  93. package/dist/shared/{index-C4F8hXzQ.mjs → index-XSV-GmR2.mjs} +90 -81
  94. package/dist/shared/index-_e-HwHF0.mjs +79 -0
  95. package/dist/shared/{index-DNnWRAFl.mjs → index-uMEKxoXj.mjs} +1 -1
  96. package/dist/shared/index.vue_vue_type_script_setup_true_lang-B38X3tvf.cjs +1 -0
  97. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BNKC9382.cjs +1 -0
  98. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DIWWHODS.mjs → index.vue_vue_type_script_setup_true_lang-BtMkNw_I.mjs} +49 -47
  99. package/dist/shared/index.vue_vue_type_script_setup_true_lang-Byp7e--Y.mjs +63 -0
  100. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-Dn29lZTs.mjs → index.vue_vue_type_script_setup_true_lang-Bypkl4Ty.mjs} +20 -18
  101. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CPm8gzId.cjs +1 -0
  102. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CYaK3oDY.cjs +1 -0
  103. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CeVvm5Ph.cjs +1 -0
  104. package/dist/shared/index.vue_vue_type_script_setup_true_lang-Cn0JqB5r.cjs +1 -0
  105. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DMHhx9lY.mjs +133 -0
  106. package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DwFGEW4B.mjs → index.vue_vue_type_script_setup_true_lang-DkMm40Ac.mjs} +50 -42
  107. package/dist/shared/index.vue_vue_type_script_setup_true_lang-qXBKqHCs.mjs +40 -0
  108. package/dist/shared/index.vue_vue_type_style_index_0_lang-BI4abIsm.mjs +219 -0
  109. package/dist/shared/index.vue_vue_type_style_index_0_lang-BNBJu1Mq.cjs +1 -0
  110. package/dist/shared/index.vue_vue_type_style_index_0_lang-BZZ8vhEf.cjs +1 -0
  111. package/dist/shared/{index.vue_vue_type_style_index_0_lang-DSur831A.mjs → index.vue_vue_type_style_index_0_lang-Bpe6LkvL.mjs} +24 -18
  112. package/dist/shared/index.vue_vue_type_style_index_0_lang-CYIUfOy9.cjs +1 -0
  113. package/dist/shared/index.vue_vue_type_style_index_0_lang-D2iiEHqM.mjs +413 -0
  114. package/dist/shared/index.vue_vue_type_style_index_0_lang-Dt19xolk.cjs +1 -0
  115. package/dist/shared/index.vue_vue_type_style_index_0_lang-DzvboHR2.mjs +176 -0
  116. package/dist/shared/index.vue_vue_type_style_index_0_lang-E92uiH6Q.cjs +1 -0
  117. package/dist/shared/index.vue_vue_type_style_index_0_lang-W44zpeKW.cjs +1 -0
  118. package/dist/shared/{index.vue_vue_type_style_index_0_lang-CcVf5MXE.mjs → index.vue_vue_type_style_index_0_lang-shJS7iXC.mjs} +59 -57
  119. package/dist/shared/index.vue_vue_type_style_index_0_lang-z2Unl0WQ.mjs +142 -0
  120. package/dist/shared/overlay-stack-CFFRngnU.mjs +34 -0
  121. package/dist/shared/overlay-stack-DeKq7jZu.cjs +1 -0
  122. package/dist/shared/{utils-DoyI5oM8.mjs → utils-CUXINmHY.mjs} +63 -49
  123. package/dist/shared/utils-DpkN3Zat.cjs +1 -0
  124. package/index.d.ts +44 -12
  125. package/package.json +1 -1
  126. package/qy-action-bar/index.d.ts +16 -4
  127. package/qy-autocomplete/index.d.ts +43 -2
  128. package/qy-checkbox/index.d.ts +1 -0
  129. package/qy-checkbox-group/index.d.ts +1 -0
  130. package/qy-date-picker/index.d.ts +1 -0
  131. package/qy-dialog/index.d.ts +4 -0
  132. package/qy-form-section/index.d.ts +22 -4
  133. package/qy-image/index.d.ts +1 -0
  134. package/qy-image-preview/index.d.ts +8 -4
  135. package/qy-menu-actions/index.d.ts +21 -2
  136. package/qy-money-input/index.d.ts +1 -0
  137. package/qy-pagination/index.d.ts +4 -0
  138. package/qy-popover/index.d.ts +4 -0
  139. package/qy-radio-group/index.d.ts +1 -0
  140. package/qy-record-quote-search/index.d.ts +53 -4
  141. package/qy-remark-image/index.d.ts +44 -4
  142. package/qy-remote-select/index.d.ts +53 -2
  143. package/qy-search-input/index.d.ts +66 -4
  144. package/qy-select/index.d.ts +4 -0
  145. package/qy-selection-dialog/index.d.ts +63 -2
  146. package/qy-switch/index.d.ts +1 -0
  147. package/qy-table-column-settings/index.d.ts +19 -2
  148. package/qy-tooltip/index.d.ts +5 -0
  149. package/qy-tree-select/index.d.ts +1 -0
  150. package/dist/shared/index-5dxbpQb_.cjs +0 -1
  151. package/dist/shared/index-BEcS8y8g.mjs +0 -68
  152. package/dist/shared/index-BSTMCPDj.mjs +0 -72
  153. package/dist/shared/index-Bh9hxVFh.mjs +0 -766
  154. package/dist/shared/index-CGq7Q_hV.mjs +0 -119
  155. package/dist/shared/index-CVYNG8Fc.cjs +0 -1
  156. package/dist/shared/index-CmgTSaFS.cjs +0 -1
  157. package/dist/shared/index-CnVhquq5.cjs +0 -1
  158. package/dist/shared/index-D27mwR57.cjs +0 -1
  159. package/dist/shared/index-DKw-seoh.cjs +0 -1
  160. package/dist/shared/index-DRugp8x0.cjs +0 -1
  161. package/dist/shared/index-DTbGlDqr.cjs +0 -1
  162. package/dist/shared/index-MyDDX-zj.cjs +0 -1
  163. package/dist/shared/index-afOuq3YX.cjs +0 -1
  164. package/dist/shared/index-rSrDnOpu.cjs +0 -1
  165. package/dist/shared/index-rjciSHaR.mjs +0 -2362
  166. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BiIgNax-.cjs +0 -1
  167. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs +0 -1
  168. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CqSJ_8hG.cjs +0 -1
  169. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DbLp1kvW.cjs +0 -1
  170. package/dist/shared/index.vue_vue_type_script_setup_true_lang-EiHoQBXt.mjs +0 -94
  171. package/dist/shared/index.vue_vue_type_script_setup_true_lang-IyZesuKm.mjs +0 -48
  172. package/dist/shared/index.vue_vue_type_script_setup_true_lang-UBQQ6Z03.cjs +0 -1
  173. package/dist/shared/index.vue_vue_type_script_setup_true_lang-ccFLNRry.cjs +0 -1
  174. package/dist/shared/index.vue_vue_type_script_setup_true_lang-r7iyZzDS.mjs +0 -61
  175. package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +0 -1
  176. package/dist/shared/index.vue_vue_type_style_index_0_lang-B2thgQml.cjs +0 -1
  177. package/dist/shared/index.vue_vue_type_style_index_0_lang-BMZqMPZb.mjs +0 -215
  178. package/dist/shared/index.vue_vue_type_style_index_0_lang-Bb3L64L8.mjs +0 -406
  179. package/dist/shared/index.vue_vue_type_style_index_0_lang-BoaO6MKl.cjs +0 -1
  180. package/dist/shared/index.vue_vue_type_style_index_0_lang-C4Yk-UdJ.mjs +0 -172
  181. package/dist/shared/index.vue_vue_type_style_index_0_lang-D9-2GN18.cjs +0 -1
  182. package/dist/shared/index.vue_vue_type_style_index_0_lang-DHK86rdP.cjs +0 -1
  183. package/dist/shared/index.vue_vue_type_style_index_0_lang-DsOg_Rum.mjs +0 -128
  184. package/dist/shared/index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs +0 -1
  185. package/dist/shared/utils-BjEXwY3L.cjs +0 -1
@@ -1,13 +1,13 @@
1
- import { defineComponent as P, useAttrs as R, ref as k, computed as d, onMounted as H, onBeforeUnmount as I, openBlock as i, createElementBlock as l, mergeProps as N, unref as T, renderSlot as s, createElementVNode as u, normalizeProps as A, guardReactiveProps as W, toDisplayString as _, withDirectives as K, normalizeStyle as F, Fragment as M, renderList as Q, normalizeClass as U, createBlock as X, resolveDynamicComponent as Y, createCommentVNode as j, createTextVNode as w, vShow as G, markRaw as J, toRaw as Z } from "vue";
2
- import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
- const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = ["disabled", "title", "data-qy-dropdown-key", "data-danger", "data-active", "data-disabled", "aria-disabled", "onClick"], ne = {
1
+ import { defineComponent as R, useAttrs as T, ref as _, computed as d, onMounted as H, onBeforeUnmount as I, openBlock as i, createElementBlock as l, mergeProps as N, unref as A, renderSlot as s, createElementVNode as u, normalizeProps as K, guardReactiveProps as W, toDisplayString as k, withDirectives as F, normalizeStyle as M, Fragment as Q, renderList as U, normalizeClass as X, createBlock as Y, resolveDynamicComponent as j, createCommentVNode as G, createTextVNode as w, vShow as J, nextTick as Z, markRaw as ee, toRaw as te } from "vue";
2
+ import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
+ const oe = { class: "qy-dropdown__trigger-label" }, ne = ["aria-hidden"], de = ["disabled", "title", "data-qy-dropdown-key", "data-danger", "data-active", "data-disabled", "aria-disabled", "onClick"], re = {
4
4
  key: 0,
5
5
  class: "qy-dropdown__item-icon",
6
6
  "aria-hidden": "true"
7
- }, de = { class: "qy-dropdown__item-label" }, re = {
7
+ }, ie = { class: "qy-dropdown__item-label" }, le = {
8
8
  key: 1,
9
9
  class: "qy-dropdown__empty"
10
- }, ie = /* @__PURE__ */ P({
10
+ }, se = /* @__PURE__ */ R({
11
11
  name: "QyDropdown",
12
12
  inheritAttrs: !1,
13
13
  __name: "index",
@@ -25,18 +25,18 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
25
25
  },
26
26
  emits: ["select", "open-change", "update:modelValue"],
27
27
  setup(c, { emit: C }) {
28
- const t = c, p = C, q = R(), f = k(null), v = k(!1), m = d(() => t.modelValue !== void 0), o = d(() => t.disabled ? !1 : m.value ? !!t.modelValue : v.value), g = d(() => t.items.filter((e) => !e.hidden)), D = d(() => t.panelWidth ?? t.width), x = d(() => [
28
+ const t = c, p = C, q = T(), f = _(null), v = _(!1), g = d(() => t.modelValue !== void 0), o = d(() => t.disabled ? !1 : g.value ? !!t.modelValue : v.value), m = d(() => t.items.filter((e) => !e.hidden)), D = d(() => t.panelWidth ?? t.width), x = d(() => [
29
29
  `qy-dropdown--${t.placement}`,
30
30
  {
31
31
  "is-open": o.value,
32
32
  "is-disabled": t.disabled
33
33
  }
34
- ]), B = d(() => ({
35
- width: y(D.value),
36
- maxHeight: y(t.maxHeight),
34
+ ]), S = d(() => ({
35
+ width: b(D.value),
36
+ maxHeight: b(t.maxHeight),
37
37
  overflowX: "hidden",
38
38
  overflowY: t.maxHeight ? "auto" : void 0
39
- })), b = d(() => ({
39
+ })), y = d(() => ({
40
40
  class: [
41
41
  "qy-dropdown__trigger",
42
42
  {
@@ -49,30 +49,28 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
49
49
  "aria-haspopup": "menu",
50
50
  "aria-expanded": o.value ? "true" : "false",
51
51
  "aria-label": t.ariaLabel || void 0,
52
- onClick: S,
52
+ onClick: B,
53
53
  onContextmenu: V,
54
- onKeydown: $
54
+ onKeydown: E
55
55
  }));
56
- function y(e) {
56
+ function b(e) {
57
57
  return typeof e == "number" ? `${e}px` : e;
58
58
  }
59
59
  function r(e) {
60
- t.disabled || e === o.value || (m.value || (v.value = e), p("update:modelValue", e), p("open-change", e));
60
+ t.disabled || e === o.value || (g.value || (v.value = e), p("update:modelValue", e), p("open-change", e));
61
61
  }
62
- function S(e) {
62
+ function B(e) {
63
63
  t.trigger !== "click" || t.disabled || (e.stopPropagation(), r(!o.value));
64
64
  }
65
65
  function V(e) {
66
66
  t.trigger !== "contextmenu" || t.disabled || (e.preventDefault(), e.stopPropagation(), r(!0));
67
67
  }
68
- function $(e) {
69
- if (!t.disabled) {
70
- if (e.key === "Escape") {
71
- r(!1);
72
- return;
73
- }
74
- t.trigger === "click" && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r(!o.value));
75
- }
68
+ function E(e) {
69
+ t.disabled || t.trigger === "click" && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r(!o.value));
70
+ }
71
+ async function $(e) {
72
+ var n, a;
73
+ e.key !== "Escape" || !o.value || (e.preventDefault(), e.stopPropagation(), r(!1), await Z(), o.value || (a = (n = f.value) == null ? void 0 : n.querySelector(".qy-dropdown__trigger")) == null || a.focus());
76
74
  }
77
75
  function z(e, n) {
78
76
  if (e.disabled) {
@@ -81,7 +79,7 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
81
79
  }
82
80
  p("select", e), t.closeOnSelect && r(!1);
83
81
  }
84
- function E(e) {
82
+ function L(e) {
85
83
  return {
86
84
  "is-disabled": e.disabled,
87
85
  "is-danger": e.danger,
@@ -89,8 +87,8 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
89
87
  "is-divided": e.divided
90
88
  };
91
89
  }
92
- function L(e) {
93
- return e ? J(Z(e)) : void 0;
90
+ function P(e) {
91
+ return e ? ee(te(e)) : void 0;
94
92
  }
95
93
  function h(e) {
96
94
  var a;
@@ -104,29 +102,30 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
104
102
  }), (e, n) => (i(), l("div", N({
105
103
  ref_key: "rootRef",
106
104
  ref: f
107
- }, T(q), {
108
- class: ["qy-dropdown", x.value]
105
+ }, A(q), {
106
+ class: ["qy-dropdown", x.value],
107
+ onKeydown: $
109
108
  }), [
110
109
  s(e.$slots, "trigger", {
111
110
  open: o.value,
112
111
  disabled: c.disabled,
113
- attrs: b.value
112
+ attrs: y.value
114
113
  }, () => [
115
- u("button", A(W(b.value)), [
116
- u("span", te, _(c.ariaLabel || "更多"), 1)
114
+ u("button", K(W(y.value)), [
115
+ u("span", oe, k(c.ariaLabel || "更多"), 1)
117
116
  ], 16)
118
117
  ], !0),
119
- K(u("div", {
118
+ F(u("div", {
120
119
  class: "qy-dropdown__panel",
121
- style: F(B.value),
120
+ style: M(S.value),
122
121
  "aria-hidden": o.value ? void 0 : "true",
123
122
  role: "menu"
124
123
  }, [
125
124
  s(e.$slots, "header", {}, void 0, !0),
126
- g.value.length > 0 ? (i(!0), l(M, { key: 0 }, Q(g.value, (a) => (i(), l("button", {
125
+ m.value.length > 0 ? (i(!0), l(Q, { key: 0 }, U(m.value, (a) => (i(), l("button", {
127
126
  key: a.key,
128
127
  type: "button",
129
- class: U(["qy-dropdown__item", E(a)]),
128
+ class: X(["qy-dropdown__item", L(a)]),
130
129
  disabled: a.disabled,
131
130
  title: a.title,
132
131
  "data-qy-dropdown-key": a.key,
@@ -137,26 +136,26 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
137
136
  role: "menuitem",
138
137
  onClick: (O) => z(a, O)
139
138
  }, [
140
- a.icon ? (i(), l("span", ne, [
141
- (i(), X(Y(L(a.icon))))
142
- ])) : j("", !0),
143
- u("span", de, [
139
+ a.icon ? (i(), l("span", re, [
140
+ (i(), Y(j(P(a.icon))))
141
+ ])) : G("", !0),
142
+ u("span", ie, [
144
143
  s(e.$slots, "item", { item: a }, () => [
145
- w(_(a.label), 1)
144
+ w(k(a.label), 1)
146
145
  ], !0)
147
146
  ])
148
- ], 10, oe))), 128)) : (i(), l("div", re, [
147
+ ], 10, de))), 128)) : (i(), l("div", le, [
149
148
  s(e.$slots, "empty", {}, () => [
150
149
  n[0] || (n[0] = w("暂无数据", -1))
151
150
  ], !0)
152
151
  ])),
153
152
  s(e.$slots, "footer", {}, void 0, !0)
154
- ], 12, ae), [
155
- [G, o.value]
153
+ ], 12, ne), [
154
+ [J, o.value]
156
155
  ])
157
156
  ], 16));
158
157
  }
159
- }), ue = /* @__PURE__ */ ee(ie, [["__scopeId", "data-v-d9643661"]]);
158
+ }), pe = /* @__PURE__ */ ae(se, [["__scopeId", "data-v-f0689274"]]);
160
159
  export {
161
- ue as D
160
+ pe as D
162
161
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as ue, useAttrs as fe, ref as w, computed as y, watch as he, toRaw as f, openBlock as ye, createBlock as pe, unref as ke, mergeProps as be, createSlots as me, withCtx as p, renderSlot as k } from "vue";
2
- import { ElTreeSelect as ge } from "element-plus";
3
- import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
- const Ce = /* @__PURE__ */ ue({
1
+ import { defineComponent as he, useAttrs as ye, ref as L, computed as k, watch as pe, toRaw as h, openBlock as ke, createBlock as be, unref as me, mergeProps as ve, createSlots as ge, withCtx as b, renderSlot as m } from "vue";
2
+ import { ElTreeSelect as Ce } from "element-plus";
3
+ import { _ as Ke } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ const xe = /* @__PURE__ */ he({
5
5
  name: "QyTreeSelect",
6
6
  inheritAttrs: !1,
7
7
  __name: "index",
@@ -16,7 +16,8 @@ const Ce = /* @__PURE__ */ ue({
16
16
  props: { default: () => ({}) },
17
17
  nodeKey: { default: void 0 },
18
18
  placeholder: { default: "请选择" },
19
- disabled: { type: Boolean, default: !1 },
19
+ validateEvent: { type: Boolean, default: !0 },
20
+ disabled: { type: Boolean, default: void 0 },
20
21
  clearable: { type: Boolean, default: !1 },
21
22
  filterable: { type: Boolean, default: !1 },
22
23
  filterMethod: { type: Function, default: void 0 },
@@ -52,88 +53,94 @@ const Ce = /* @__PURE__ */ ue({
52
53
  popperClass: { default: "" }
53
54
  },
54
55
  emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur", "node-click", "node-expand", "node-collapse", "check-change", "check"],
55
- setup(a, { expose: j, emit: T }) {
56
- const i = Symbol("invalid-tree-select-value"), n = a, r = T, z = fe(), x = w(null), b = y(() => n.data === void 0 ? n.options : n.data), $ = w(n.defaultExpandedKeys ? [...n.defaultExpandedKeys] : void 0), F = w(n.defaultCheckedKeys ? [...n.defaultCheckedKeys] : void 0);
57
- let N = /* @__PURE__ */ new WeakSet(), m = /* @__PURE__ */ new Set();
58
- he(b, (e) => {
59
- N = /* @__PURE__ */ new WeakSet(), m = /* @__PURE__ */ new Set(), V(e);
60
- }, { immediate: !0, deep: !1 });
61
- const W = y(() => Object.fromEntries(Object.entries(z).filter(
56
+ setup(a, { expose: z, emit: $ }) {
57
+ const c = Symbol("invalid-tree-select-value"), n = a, r = $, F = ye(), B = L(null), D = k(() => n.data === void 0 ? n.options : n.data), W = L(n.defaultExpandedKeys ? [...n.defaultExpandedKeys] : void 0), I = L(n.defaultCheckedKeys ? [...n.defaultCheckedKeys] : void 0);
58
+ let y = /* @__PURE__ */ new WeakSet(), v = /* @__PURE__ */ new Set();
59
+ const f = /* @__PURE__ */ new Map();
60
+ let S = 0;
61
+ pe(D, (e, t) => {
62
+ S++, e !== t && f.clear(), y = /* @__PURE__ */ new WeakSet(), v = /* @__PURE__ */ new Set(), K(e), K(f.get(null));
63
+ for (const l of f.keys())
64
+ l && !y.has(l) && f.delete(l);
65
+ }, { immediate: !0, deep: !0 });
66
+ const P = k(() => Object.fromEntries(Object.entries(F).filter(
62
67
  ([e]) => e === "class" || e === "style" || e === "id" || e === "title" || e.startsWith("data-") || e.startsWith("aria-")
63
- ))), I = y(() => ["qy-tree-select__popper", n.popperClass].filter(Boolean).join(" ")), P = y(() => {
64
- const e = S(n.modelValue);
65
- if (e !== i && q(e) && !n.nodeKey)
68
+ ))), R = k(() => ["qy-tree-select__popper", n.popperClass].filter(Boolean).join(" ")), q = k(() => {
69
+ const e = w(n.modelValue);
70
+ if (e !== c && Q(e) && !n.nodeKey)
66
71
  throw new Error("QyTreeSelect object values require nodeKey");
67
- return e === i ? void 0 : re(e);
68
- }), R = y(() => {
72
+ return e === c ? void 0 : ce(e);
73
+ }), U = k(() => {
69
74
  const e = n.props ?? {};
70
75
  return {
71
- value: h(e.value ?? n.nodeKey ?? n.valueKey),
72
- label: h(e.label ?? n.labelKey),
73
- children: h(e.children ?? n.childrenKey),
74
- disabled: h(e.disabled ?? n.disabledKey),
75
- isLeaf: h(e.isLeaf),
76
- class: U(e.class)
76
+ value: p(e.value ?? n.nodeKey ?? n.valueKey),
77
+ label: p(e.label ?? n.labelKey),
78
+ children: p(e.children ?? n.childrenKey),
79
+ disabled: p(e.disabled ?? n.disabledKey),
80
+ isLeaf: p(e.isLeaf),
81
+ class: G(e.class)
77
82
  };
78
83
  });
79
84
  function g(e) {
80
85
  return typeof e == "object" && e !== null && !Array.isArray(e);
81
86
  }
82
- function B(e) {
83
- return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : g(e) ? f(e) : i;
87
+ function A(e) {
88
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : g(e) ? h(e) : c;
84
89
  }
85
- function S(e) {
86
- return e == null ? e : Array.isArray(e) ? e.every((t) => B(t) !== i) ? e : i : B(e);
90
+ function w(e) {
91
+ return e == null ? e : Array.isArray(e) ? e.every((t) => A(t) !== c) ? e : c : A(e);
87
92
  }
88
- function q(e) {
93
+ function Q(e) {
89
94
  return Array.isArray(e) ? e.some(g) : g(e);
90
95
  }
91
- function v(e) {
92
- return g(e) ? f(e) : null;
96
+ function C(e) {
97
+ return g(e) ? h(e) : null;
93
98
  }
94
- function V(e) {
95
- for (const t of e ?? []) L(t);
99
+ function K(e) {
100
+ for (const t of e ?? []) M(t);
96
101
  }
97
- function L(e) {
98
- const t = f(e);
99
- N.add(t), m.add(t);
100
- const l = C("children", t);
102
+ function M(e) {
103
+ const t = h(e);
104
+ if (y.has(t)) return;
105
+ y.add(t), v.add(t);
106
+ const l = x("children", t);
101
107
  if (Array.isArray(l))
102
108
  for (const o of l) {
103
- const d = v(o);
104
- d && L(d);
109
+ const d = C(o);
110
+ d && M(d);
105
111
  }
112
+ K(f.get(t));
106
113
  }
107
- function c(e) {
108
- const t = v(e);
109
- return t !== null && N.has(t);
114
+ function i(e) {
115
+ const t = C(e);
116
+ return t !== null && y.has(t);
110
117
  }
111
- function C(e, t) {
118
+ function x(e, t) {
112
119
  var u;
113
120
  const l = (u = n.props) == null ? void 0 : u[e], o = e === "value" ? n.valueKey : e === "label" ? n.labelKey : e === "children" ? n.childrenKey : e === "disabled" ? n.disabledKey : void 0, d = l ?? o;
114
121
  return typeof d == "function" ? d(t) : typeof d == "string" ? t[d] : void 0;
115
122
  }
116
- function h(e) {
123
+ function p(e) {
117
124
  return typeof e == "function" ? (t) => e(t) : e;
118
125
  }
119
- function U(e) {
126
+ function G(e) {
120
127
  return typeof e != "function" ? e : (t, l) => {
121
128
  const o = s(l);
122
- return o && c(t) ? e(t, o) : "";
129
+ return o && i(t) ? e(t, o) : "";
123
130
  };
124
131
  }
125
- function K(e) {
132
+ function N(e) {
126
133
  return typeof e == "string" || typeof e == "number" ? e : null;
127
134
  }
128
135
  function s(e) {
129
136
  var l;
130
- if (!e || !c(e.data)) return null;
131
- const t = v(e.data);
137
+ if (!e || !i(e.data)) return null;
138
+ const t = C(e.data);
132
139
  return t ? Object.freeze({
133
- key: K(e.key),
134
- parentKey: K((l = e.parent) == null ? void 0 : l.key),
140
+ key: N(e.key),
141
+ parentKey: N((l = e.parent) == null ? void 0 : l.key),
135
142
  data: t,
136
- label: typeof e.label == "string" ? e.label : String(C("label", t) ?? ""),
143
+ label: typeof e.label == "string" ? e.label : String(x("label", t) ?? ""),
137
144
  level: typeof e.level == "number" ? e.level : 0,
138
145
  expanded: e.expanded === !0,
139
146
  checked: e.checked === !0,
@@ -146,7 +153,7 @@ const Ce = /* @__PURE__ */ ue({
146
153
  childCount: Array.isArray(e.childNodes) ? e.childNodes.length : 0
147
154
  }) : null;
148
155
  }
149
- function Q(e) {
156
+ function H(e) {
150
157
  return Object.freeze({
151
158
  key: null,
152
159
  parentKey: null,
@@ -164,126 +171,127 @@ const Ce = /* @__PURE__ */ ue({
164
171
  childCount: Array.isArray(e.childNodes) ? e.childNodes.length : 0
165
172
  });
166
173
  }
167
- function G(e, t, l) {
174
+ function J(e, t, l) {
168
175
  const o = s(l);
169
- return !o || !c(t) ? !1 : n.filterNodeMethod ? n.filterNodeMethod(e, t, o) : String(o.label).toLocaleLowerCase().includes(String(e ?? "").toLocaleLowerCase());
176
+ return !o || !i(t) ? !1 : n.filterNodeMethod ? n.filterNodeMethod(e, t, o) : String(o.label).toLocaleLowerCase().includes(String(e ?? "").toLocaleLowerCase());
170
177
  }
171
- function H(e, t, l) {
178
+ function X(e, t, l) {
172
179
  if (!n.load) return t([]);
173
- const o = e.level === 0 || e.data === void 0 || e.data === null, d = b.value, u = s(e) ?? (o ? Q(e) : null);
180
+ const o = e.level === 0 || e.data === void 0 || e.data === null, d = S, u = s(e) ?? (o ? H(e) : null);
174
181
  if (!u) return l();
175
- n.load(u, (M) => {
176
- (o ? b.value !== d : !c(u.data)) || (V(M), t(M));
182
+ n.load(u, (E) => {
183
+ (o ? S !== d : !i(u.data)) || (f.set(o ? null : u.data, E), K(E), t(E));
177
184
  }, l);
178
185
  }
179
- function J(e) {
180
- const t = S(A(e));
181
- t !== i && r("update:modelValue", t);
186
+ function Y(e) {
187
+ const t = w(V(e));
188
+ t !== c && r("update:modelValue", t);
182
189
  }
183
- function X(e) {
184
- const t = S(A(e));
185
- t !== i && r("change", t);
190
+ function Z(e) {
191
+ const t = w(V(e));
192
+ t !== c && r("change", t);
186
193
  }
187
- function Y() {
194
+ function _() {
188
195
  r("clear");
189
196
  }
190
- function Z(e) {
197
+ function ee(e) {
191
198
  r("visible-change", e);
192
199
  }
193
- function _(e) {
200
+ function te(e) {
194
201
  r("focus", e);
195
202
  }
196
- function ee(e) {
203
+ function le(e) {
197
204
  r("blur", e);
198
205
  }
199
- function te(e, t) {
206
+ function ae(e, t) {
200
207
  const l = s(t);
201
- l && c(e) && r("node-click", e, l);
208
+ l && i(e) && r("node-click", e, l);
202
209
  }
203
- function le(e, t) {
210
+ function ne(e, t) {
204
211
  const l = s(t);
205
- l && c(e) && r("node-expand", e, l);
212
+ l && i(e) && r("node-expand", e, l);
206
213
  }
207
- function ae(e, t) {
214
+ function oe(e, t) {
208
215
  const l = s(t);
209
- l && c(e) && r("node-collapse", e, l);
216
+ l && i(e) && r("node-collapse", e, l);
210
217
  }
211
- function ne(e, t, l) {
212
- c(e) && r("check-change", e, t, l);
218
+ function de(e, t, l) {
219
+ i(e) && r("check-change", e, t, l);
213
220
  }
214
- function D(e) {
215
- return (e ?? []).map(v).filter((t) => t !== null && c(t));
221
+ function O(e) {
222
+ return (e ?? []).map(C).filter((t) => t !== null && i(t));
216
223
  }
217
- function E(e) {
218
- return (e ?? []).map(K).filter((t) => t !== null);
224
+ function j(e) {
225
+ return (e ?? []).map(N).filter((t) => t !== null);
219
226
  }
220
- function oe(e, t) {
221
- c(e) && r("check", e, {
222
- checkedKeys: E(t == null ? void 0 : t.checkedKeys),
223
- checkedNodes: D(t == null ? void 0 : t.checkedNodes),
224
- halfCheckedKeys: E(t == null ? void 0 : t.halfCheckedKeys),
225
- halfCheckedNodes: D(t == null ? void 0 : t.halfCheckedNodes)
227
+ function re(e, t) {
228
+ i(e) && r("check", e, {
229
+ checkedKeys: j(t == null ? void 0 : t.checkedKeys),
230
+ checkedNodes: O(t == null ? void 0 : t.checkedNodes),
231
+ halfCheckedKeys: j(t == null ? void 0 : t.halfCheckedKeys),
232
+ halfCheckedNodes: O(t == null ? void 0 : t.halfCheckedNodes)
226
233
  });
227
234
  }
228
- function O(e) {
229
- for (const t of m)
230
- if (Object.is(f(C("value", t)), f(e))) return t;
235
+ function T(e) {
236
+ for (const t of v)
237
+ if (Object.is(h(x("value", t)), h(e))) return t;
231
238
  }
232
- function de(e) {
239
+ function ie(e) {
233
240
  if (n.nodeKey) {
234
- for (const t of m)
241
+ for (const t of v)
235
242
  if (Object.is(t[n.nodeKey], e)) return t;
236
243
  }
237
244
  }
238
- function re(e) {
245
+ function ce(e) {
239
246
  if (!n.nodeKey || e === null || e === void 0) return e;
240
247
  const t = (l) => {
241
- const o = O(l);
242
- return (o ? K(o[n.nodeKey]) : null) ?? l;
248
+ const o = T(l);
249
+ return (o ? N(o[n.nodeKey]) : null) ?? l;
243
250
  };
244
251
  return Array.isArray(e) ? e.map(t) : t(e);
245
252
  }
246
- function A(e) {
253
+ function V(e) {
247
254
  if (!n.nodeKey) return e;
248
255
  const t = (l) => {
249
- const o = de(l);
250
- return o ? C("value", o) : l;
256
+ const o = ie(l);
257
+ return o ? x("value", o) : l;
251
258
  };
252
259
  return Array.isArray(e) ? e.map(t) : t(e);
253
260
  }
254
- function ce(e, t) {
261
+ function se(e, t) {
255
262
  return (e ?? []).flatMap((l) => {
256
- const o = B(A(l.value));
257
- if (o === i) return [];
258
- const d = O(o);
263
+ const o = A(V(l.value));
264
+ if (o === c) return [];
265
+ const d = T(o);
259
266
  return [Object.freeze({
260
267
  value: o,
261
268
  label: typeof l.currentLabel == "string" ? l.currentLabel : String(l.currentLabel ?? ""),
262
- data: d ? f(d) : void 0,
269
+ data: d ? h(d) : void 0,
263
270
  closable: l.isDisabled !== !0,
264
271
  remove: () => t == null ? void 0 : t(new MouseEvent("click"), l)
265
272
  })];
266
273
  });
267
274
  }
268
- function ie() {
275
+ function ue() {
269
276
  var e, t;
270
- (t = (e = x.value) == null ? void 0 : e.focus) == null || t.call(e);
277
+ (t = (e = B.value) == null ? void 0 : e.focus) == null || t.call(e);
271
278
  }
272
- function se() {
279
+ function fe() {
273
280
  var e, t;
274
- (t = (e = x.value) == null ? void 0 : e.blur) == null || t.call(e);
281
+ (t = (e = B.value) == null ? void 0 : e.blur) == null || t.call(e);
275
282
  }
276
- return j({ focus: ie, blur: se }), (e, t) => (ye(), pe(ke(ge), be({
283
+ return z({ focus: ue, blur: fe }), (e, t) => (ke(), be(me(Ce), ve({
277
284
  ref_key: "treeSelectRef",
278
- ref: x,
285
+ ref: B,
279
286
  class: "qy-tree-select"
280
- }, W.value, {
281
- "model-value": P.value,
282
- data: b.value,
283
- props: R.value,
287
+ }, P.value, {
288
+ "model-value": q.value,
289
+ data: D.value,
290
+ props: U.value,
284
291
  "node-key": a.nodeKey,
285
292
  placeholder: a.placeholder,
286
293
  disabled: a.disabled,
294
+ "validate-event": a.validateEvent,
287
295
  clearable: a.clearable,
288
296
  filterable: a.filterable,
289
297
  "filter-method": a.filterMethod,
@@ -303,57 +311,57 @@ const Ce = /* @__PURE__ */ ue({
303
311
  "check-on-click-node": a.checkOnClickNode,
304
312
  "check-on-click-leaf": a.checkOnClickLeaf,
305
313
  "check-descendants": a.checkDescendants,
306
- "default-expanded-keys": $.value,
307
- "default-checked-keys": F.value,
314
+ "default-expanded-keys": W.value,
315
+ "default-checked-keys": I.value,
308
316
  accordion: a.accordion,
309
317
  indent: a.indent,
310
318
  "highlight-current": a.highlightCurrent,
311
319
  lazy: a.lazy,
312
- load: H,
320
+ load: X,
313
321
  "cache-data": a.cacheData,
314
- "filter-node-method": G,
322
+ "filter-node-method": J,
315
323
  size: a.size,
316
324
  teleported: a.teleported,
317
325
  "append-to": a.appendTo,
318
326
  "fit-input-width": a.fitInputWidth,
319
- "popper-class": I.value,
320
- "onUpdate:modelValue": J,
321
- onChange: X,
322
- onClear: Y,
323
- onVisibleChange: Z,
324
- onFocus: _,
325
- onBlur: ee,
326
- onNodeClick: te,
327
- onNodeExpand: le,
328
- onNodeCollapse: ae,
329
- onCheckChange: ne,
330
- onCheck: oe
331
- }), me({ _: 2 }, [
327
+ "popper-class": R.value,
328
+ "onUpdate:modelValue": Y,
329
+ onChange: Z,
330
+ onClear: _,
331
+ onVisibleChange: ee,
332
+ onFocus: te,
333
+ onBlur: le,
334
+ onNodeClick: ae,
335
+ onNodeExpand: ne,
336
+ onNodeCollapse: oe,
337
+ onCheckChange: de,
338
+ onCheck: re
339
+ }), ge({ _: 2 }, [
332
340
  e.$slots.prefix ? {
333
341
  name: "prefix",
334
- fn: p(() => [
335
- k(e.$slots, "prefix", {}, void 0, !0)
342
+ fn: b(() => [
343
+ m(e.$slots, "prefix", {}, void 0, !0)
336
344
  ]),
337
345
  key: "0"
338
346
  } : void 0,
339
347
  e.$slots.empty ? {
340
348
  name: "empty",
341
- fn: p(() => [
342
- k(e.$slots, "empty", {}, void 0, !0)
349
+ fn: b(() => [
350
+ m(e.$slots, "empty", {}, void 0, !0)
343
351
  ]),
344
352
  key: "1"
345
353
  } : void 0,
346
354
  e.$slots.loading ? {
347
355
  name: "loading",
348
- fn: p(() => [
349
- k(e.$slots, "loading", {}, void 0, !0)
356
+ fn: b(() => [
357
+ m(e.$slots, "loading", {}, void 0, !0)
350
358
  ]),
351
359
  key: "2"
352
360
  } : void 0,
353
361
  e.$slots.default ? {
354
362
  name: "default",
355
- fn: p((l) => [
356
- k(e.$slots, "default", {
363
+ fn: b((l) => [
364
+ m(e.$slots, "default", {
357
365
  data: l.data,
358
366
  node: s(l.node)
359
367
  }, void 0, !0)
@@ -362,16 +370,16 @@ const Ce = /* @__PURE__ */ ue({
362
370
  } : void 0,
363
371
  e.$slots.tag ? {
364
372
  name: "tag",
365
- fn: p((l) => [
366
- k(e.$slots, "tag", {
367
- data: ce(l.data, l.deleteTag)
373
+ fn: b((l) => [
374
+ m(e.$slots, "tag", {
375
+ data: se(l.data, l.deleteTag)
368
376
  }, void 0, !0)
369
377
  ]),
370
378
  key: "4"
371
379
  } : void 0
372
- ]), 1040, ["model-value", "data", "props", "node-key", "placeholder", "disabled", "clearable", "filterable", "filter-method", "remote", "remote-method", "remote-show-suffix", "loading", "multiple", "multiple-limit", "collapse-tags", "collapse-tags-tooltip", "check-strictly", "show-checkbox", "default-expand-all", "render-after-expand", "expand-on-click-node", "check-on-click-node", "check-on-click-leaf", "check-descendants", "default-expanded-keys", "default-checked-keys", "accordion", "indent", "highlight-current", "lazy", "cache-data", "size", "teleported", "append-to", "fit-input-width", "popper-class"]));
380
+ ]), 1040, ["model-value", "data", "props", "node-key", "placeholder", "disabled", "validate-event", "clearable", "filterable", "filter-method", "remote", "remote-method", "remote-show-suffix", "loading", "multiple", "multiple-limit", "collapse-tags", "collapse-tags-tooltip", "check-strictly", "show-checkbox", "default-expand-all", "render-after-expand", "expand-on-click-node", "check-on-click-node", "check-on-click-leaf", "check-descendants", "default-expanded-keys", "default-checked-keys", "accordion", "indent", "highlight-current", "lazy", "cache-data", "size", "teleported", "append-to", "fit-input-width", "popper-class"]));
373
381
  }
374
- }), Be = /* @__PURE__ */ ve(Ce, [["__scopeId", "data-v-daef2030"]]);
382
+ }), Ae = /* @__PURE__ */ Ke(xe, [["__scopeId", "data-v-1cee15d2"]]);
375
383
  export {
376
- Be as T
384
+ Ae as T
377
385
  };
@@ -0,0 +1 @@
1
+ "use strict";const a=require("vue"),d=require("element-plus"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C=a.defineComponent({name:"QyCheckbox",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean],default:!1},value:{type:[String,Number,Boolean]},indeterminate:{type:Boolean,default:!1},validateEvent:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{default:void 0},trueValue:{type:[String,Number,Boolean],default:!0},falseValue:{type:[String,Number,Boolean],default:!1},name:{},id:{},tabindex:{},ariaLabel:{},ariaControls:{}},emits:["update:modelValue","change","focus","blur"],setup(s,{emit:c}){const e=s,l=c,f=a.useAttrs(),m=a.computed(()=>Object.fromEntries(Object.entries(f).filter(([t])=>t==="class"||t==="style"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-")))),o=a.inject(d.checkboxGroupContextKey,void 0),u=a.computed(()=>e.modelValue===e.trueValue),p=a.computed(()=>o?e.value!==void 0&&o.modelValue.value.includes(e.value):u.value);function i(t){return t?e.trueValue:e.falseValue}function b(t){e.disabled||l("update:modelValue",i(t===!0))}function v(t,n){if(e.disabled)return;l("change",i(t===!0));const r=n==null?void 0:n.target;r instanceof HTMLInputElement&&a.nextTick(()=>{r.checked=p.value})}function h(t){l("focus",t)}function x(t){l("blur",t)}return(t,n)=>(a.openBlock(),a.createBlock(a.unref(d.ElCheckbox),a.mergeProps(m.value,{class:"qy-checkbox","model-value":u.value,value:e.value,indeterminate:e.indeterminate,disabled:e.disabled||void 0,"validate-event":e.validateEvent,size:e.size,name:e.name,id:e.id,tabindex:e.tabindex,"aria-label":e.ariaLabel,"aria-controls":e.ariaControls,"onUpdate:modelValue":b,onChange:v,onFocusin:h,onFocusout:x}),{default:a.withCtx(()=>[a.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16,["model-value","value","indeterminate","disabled","validate-event","size","name","id","tabindex","aria-label","aria-controls"]))}}),_=V._export_sfc(C,[["__scopeId","data-v-34dd31e3"]]);exports.Checkbox=_;