@qynpm/ui 1.0.22 → 1.0.24

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 (137) hide show
  1. package/README.md +230 -54
  2. package/dist/index.cjs +16 -5
  3. package/dist/index.mjs +53 -34
  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 +4 -2
  8. package/dist/qy-button/index.cjs +1 -1
  9. package/dist/qy-button/index.mjs +1 -1
  10. package/dist/qy-checkbox/index.cjs +1 -1
  11. package/dist/qy-checkbox/index.mjs +5 -2
  12. package/dist/qy-checkbox-group/index.cjs +1 -0
  13. package/dist/qy-checkbox-group/index.mjs +7 -0
  14. package/dist/qy-date-picker/index.cjs +1 -1
  15. package/dist/qy-date-picker/index.mjs +5 -2
  16. package/dist/qy-dialog/index.cjs +1 -1
  17. package/dist/qy-dialog/index.mjs +2 -2
  18. package/dist/qy-dropdown/index.cjs +1 -1
  19. package/dist/qy-dropdown/index.mjs +1 -1
  20. package/dist/qy-file-picker/index.cjs +1 -0
  21. package/dist/qy-file-picker/index.mjs +7 -0
  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 +4 -2
  26. package/dist/qy-image-preview/index.cjs +1 -1
  27. package/dist/qy-image-preview/index.mjs +6 -3
  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/index.cjs +2 -2
  31. package/dist/qy-input/index.mjs +6 -3
  32. package/dist/qy-input-number/index.cjs +1 -1
  33. package/dist/qy-input-number/index.mjs +5 -2
  34. package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
  35. package/dist/qy-legacy-selection-dialog/index.mjs +2 -2
  36. package/dist/qy-menu-actions/index.cjs +1 -1
  37. package/dist/qy-menu-actions/index.mjs +1 -1
  38. package/dist/qy-money-input/index.cjs +1 -1
  39. package/dist/qy-money-input/index.mjs +2 -2
  40. package/dist/qy-popover/index.cjs +2 -0
  41. package/dist/qy-popover/index.mjs +8 -0
  42. package/dist/qy-radio/index.cjs +1 -0
  43. package/dist/qy-radio/index.mjs +7 -0
  44. package/dist/qy-radio-group/index.cjs +1 -1
  45. package/dist/qy-radio-group/index.mjs +5 -2
  46. package/dist/qy-record-quote-search/index.cjs +1 -1
  47. package/dist/qy-record-quote-search/index.mjs +1 -1
  48. package/dist/qy-remark-image/index.cjs +1 -1
  49. package/dist/qy-remark-image/index.mjs +2 -2
  50. package/dist/qy-remote-select/index.cjs +1 -1
  51. package/dist/qy-remote-select/index.mjs +1 -1
  52. package/dist/qy-search-input/index.cjs +1 -1
  53. package/dist/qy-search-input/index.mjs +2 -2
  54. package/dist/qy-select/index.cjs +1 -1
  55. package/dist/qy-select/index.mjs +5 -2
  56. package/dist/qy-selection-dialog/index.cjs +1 -1
  57. package/dist/qy-selection-dialog/index.mjs +1 -1
  58. package/dist/qy-switch/index.cjs +1 -0
  59. package/dist/qy-switch/index.mjs +7 -0
  60. package/dist/qy-table-column-settings/index.cjs +1 -1
  61. package/dist/qy-table-column-settings/index.mjs +1 -1
  62. package/dist/qy-tag/index.cjs +1 -0
  63. package/dist/qy-tag/index.mjs +7 -0
  64. package/dist/qy-tooltip/index.cjs +2 -0
  65. package/dist/qy-tooltip/index.mjs +8 -0
  66. package/dist/qy-tree-select/index.cjs +1 -1
  67. package/dist/qy-tree-select/index.mjs +4 -2
  68. package/dist/qy-upload/index.cjs +1 -1
  69. package/dist/qy-upload/index.mjs +1 -1
  70. package/dist/shared/index-8u4DJZwd.mjs +90 -0
  71. package/dist/shared/index-9WJeVamR.cjs +1 -0
  72. package/dist/shared/index-BDFscU3G.mjs +72 -0
  73. package/dist/shared/index-BYme5QGm.cjs +1 -0
  74. package/dist/shared/index-B_mI-37S.cjs +1 -0
  75. package/dist/shared/index-BrV6CR4H.mjs +54 -0
  76. package/dist/shared/index-C8CA7nkO.cjs +1 -0
  77. package/dist/shared/index-CTtAQ1LD.cjs +1 -0
  78. package/dist/shared/index-CczrP1H7.mjs +149 -0
  79. package/dist/shared/index-ClmefDi6.cjs +1 -0
  80. package/dist/shared/{index-DaqN69ii.mjs → index-DJnmpqCc.mjs} +63 -63
  81. package/dist/shared/index-DMGXEAyl.mjs +119 -0
  82. package/dist/shared/index-DYohs_aV.mjs +225 -0
  83. package/dist/shared/index-DixSXWJj.mjs +68 -0
  84. package/dist/shared/index-M4vEHYZ_.cjs +1 -0
  85. package/dist/shared/index-aiJ7R6G-.cjs +1 -0
  86. package/dist/shared/index-c7lnX4vT.mjs +3356 -0
  87. package/dist/shared/index-dEWJKTS-.cjs +1 -0
  88. package/dist/shared/index-fBuu4V3A.mjs +129 -0
  89. package/dist/shared/index-wIXCDvwC.cjs +1 -0
  90. package/dist/shared/index.vue_vue_type_script_setup_true_lang-5gku7Zwv.cjs +1 -0
  91. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BF82tses.cjs +1 -0
  92. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BNjoxcAR.mjs +61 -0
  93. package/dist/shared/index.vue_vue_type_script_setup_true_lang-C-Pf9TJ0.mjs +152 -0
  94. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs +1 -0
  95. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DWS8bsiP.cjs +1 -0
  96. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DmmW8UUK.mjs +106 -0
  97. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DoL8xnpo.mjs +48 -0
  98. package/dist/shared/index.vue_vue_type_script_setup_true_lang-EiHoQBXt.mjs +94 -0
  99. package/dist/shared/index.vue_vue_type_script_setup_true_lang-tyM4_aoa.cjs +1 -0
  100. package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +1 -0
  101. package/dist/shared/index.vue_vue_type_style_index_0_lang-BZQLyvw8.cjs +1 -0
  102. package/dist/shared/index.vue_vue_type_style_index_0_lang-BtbAft4t.cjs +1 -0
  103. package/dist/shared/index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs +166 -0
  104. package/dist/shared/index.vue_vue_type_style_index_0_lang-DSur831A.mjs +68 -0
  105. package/dist/shared/index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs +132 -0
  106. package/dist/shared/index.vue_vue_type_style_index_0_lang-Dm1r1WBK.cjs +1 -0
  107. package/dist/shared/index.vue_vue_type_style_index_0_lang-Q2gFF0PP.cjs +1 -0
  108. package/dist/shared/index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs +140 -0
  109. package/dist/shared/index.vue_vue_type_style_index_0_lang-ztD-It-2.mjs +121 -0
  110. package/dist/shared/utils-D2KAQCCB.cjs +1 -0
  111. package/dist/shared/utils-DUntDntI.mjs +112 -0
  112. package/index.d.ts +155 -17
  113. package/package.json +260 -218
  114. package/qy-checkbox/index.d.ts +42 -2
  115. package/qy-checkbox-group/index.d.ts +48 -0
  116. package/qy-date-picker/index.d.ts +140 -5
  117. package/qy-file-picker/index.d.ts +49 -0
  118. package/qy-input/index.d.ts +50 -5
  119. package/qy-input-number/index.d.ts +45 -5
  120. package/qy-popover/index.d.ts +63 -0
  121. package/qy-radio/index.d.ts +44 -0
  122. package/qy-radio-group/index.d.ts +60 -12
  123. package/qy-select/index.d.ts +67 -5
  124. package/qy-switch/index.d.ts +46 -0
  125. package/qy-tag/index.d.ts +44 -0
  126. package/qy-tooltip/index.d.ts +54 -0
  127. package/dist/shared/index-BMqHC4GE.mjs +0 -4239
  128. package/dist/shared/index-BZ2L7Rch.cjs +0 -1
  129. package/dist/shared/index-BnMUdIAd.cjs +0 -1
  130. package/dist/shared/index-Cuw6WFH3.cjs +0 -1
  131. package/dist/shared/index-D8iNLsjJ.mjs +0 -153
  132. package/dist/shared/index.vue_vue_type_style_index_0_lang-B_A4Nq6v.cjs +0 -1
  133. package/dist/shared/index.vue_vue_type_style_index_0_lang-DKFiK2fQ.mjs +0 -152
  134. /package/dist/shared/{index-CagHZ25z.mjs → index-BYLXkIxS.mjs} +0 -0
  135. /package/dist/shared/{index-CRZsiNVW.cjs → index-C1p86ezL.cjs} +0 -0
  136. /package/dist/shared/{index-BO5aWk3f.cjs → index-ClUqUsAv.cjs} +0 -0
  137. /package/dist/shared/{index-CSxCewXP.mjs → index-Cy_Glkc-.mjs} +0 -0
@@ -1,16 +1,17 @@
1
- import { ElDialog as G, ElTable as H, ElTableColumn as J, ElInput as M, ElSwitch as O, ElButton as P } from "element-plus/es";
2
- import { defineComponent as X, ref as S, watch as Y, computed as $, openBlock as C, createBlock as B, withCtx as i, createElementVNode as l, createVNode as o, normalizeClass as Z, toDisplayString as E, createElementBlock as T, createCommentVNode as I, createTextVNode as D } from "vue";
3
- import { _ as ee } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
- const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column-settings__table-wrap" }, ne = ["data-testid", "onClick"], se = {
1
+ import { ElDialog as A, ElTable as G, ElTableColumn as H, ElInput as J, ElButton as M } from "element-plus/es";
2
+ import { defineComponent as O, ref as S, watch as P, computed as $, openBlock as C, createBlock as B, withCtx as i, createElementVNode as l, createVNode as o, normalizeClass as X, toDisplayString as T, createElementBlock as E, createCommentVNode as Y, createTextVNode as D } from "vue";
3
+ import { S as Z } from "./index-DixSXWJj.mjs";
4
+ import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
+ const ee = { class: "qy-table-column-settings" }, te = { class: "qy-table-column-settings__table-wrap" }, le = ["data-testid", "onClick"], ne = {
5
6
  class: "qy-table-column-settings__side",
6
7
  "data-testid": "settings-side-actions"
7
- }, ae = { class: "qy-table-column-settings__side-main" }, ie = {
8
+ }, ae = { class: "qy-table-column-settings__side-main" }, se = {
8
9
  key: 0,
9
10
  class: "qy-table-column-settings__selected is-empty"
10
- }, oe = {
11
+ }, ie = {
11
12
  key: 1,
12
13
  class: "qy-table-column-settings__selected"
13
- }, ue = { class: "qy-table-column-settings__side-footer" }, de = /* @__PURE__ */ X({
14
+ }, oe = { class: "qy-table-column-settings__side-footer" }, ue = /* @__PURE__ */ O({
14
15
  name: "QyTableColumnSettings",
15
16
  __name: "index",
16
17
  props: {
@@ -23,12 +24,12 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
23
24
  unconfigurableTypes: { default: () => ["index", "selection", "expand", "setup"] }
24
25
  },
25
26
  emits: ["update:modelValue", "confirm", "reset", "cancel", "delete-cache", "change"],
26
- setup(b, { emit: U }) {
27
- const m = b, r = U, a = S([]), p = S(""), f = (t) => t.map((e) => ({ ...e })), N = () => {
27
+ setup(f, { emit: U }) {
28
+ const m = f, r = U, s = S([]), p = S(""), b = (t) => t.map((e) => ({ ...e })), N = () => {
28
29
  var t;
29
- a.value = f(m.settings), p.value = ((t = a.value[0]) == null ? void 0 : t.key) || "";
30
+ s.value = b(m.settings), p.value = ((t = s.value[0]) == null ? void 0 : t.key) || "";
30
31
  };
31
- Y(
32
+ P(
32
33
  () => m.modelValue,
33
34
  (t) => {
34
35
  t && N();
@@ -38,41 +39,41 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
38
39
  }
39
40
  );
40
41
  const v = () => {
41
- r("change", f(a.value));
42
- }, _ = (t) => a.value.find((e) => e.key === t), u = $(() => _(p.value)), c = $(
43
- () => a.value.findIndex((t) => t.key === p.value)
42
+ r("change", b(s.value));
43
+ }, y = (t) => s.value.find((e) => e.key === t), u = $(() => y(p.value)), c = $(
44
+ () => s.value.findIndex((t) => t.key === p.value)
44
45
  ), w = (t) => !!(t.type && m.unconfigurableTypes.includes(t.type)), z = (t) => t === "left" ? "left" : t === "right" ? "right" : "none", h = (t) => t.type === "index" ? "序号" : t.type === "selection" ? "多选" : t.type === "expand" ? "展开" : t.type === "setup" ? "设置" : t.label || t.prop || t.key, q = (t) => {
45
46
  t && (p.value = t.key);
46
47
  }, x = (t) => {
47
48
  u.value && F(u.value.key, t);
48
49
  }, F = (t, e) => {
49
- const n = _(t);
50
+ const n = y(t);
50
51
  n && (n.fixed = e, v());
51
52
  }, K = (t, e) => {
52
- const n = _(t);
53
+ const n = y(t);
53
54
  !n || w(n) || (n.visible = e, v());
54
55
  }, L = (t, e) => {
55
- const n = _(t);
56
+ const n = y(t);
56
57
  n && (n.width = e, v());
57
- }, y = (t, e) => {
58
- if (t === e || t < 0 || t >= a.value.length || e < 0 || e >= a.value.length) return;
59
- const n = [...a.value], [g] = n.splice(t, 1);
60
- n.splice(e, 0, g), a.value = n, p.value = g.key, v();
58
+ }, _ = (t, e) => {
59
+ if (t === e || t < 0 || t >= s.value.length || e < 0 || e >= s.value.length) return;
60
+ const n = [...s.value], [g] = n.splice(t, 1);
61
+ n.splice(e, 0, g), s.value = n, p.value = g.key, v();
61
62
  }, Q = () => {
62
63
  var e, n;
63
64
  const t = (e = m.defaultSettings) != null && e.length ? m.defaultSettings : m.settings;
64
- a.value = f(t), p.value = ((n = a.value[0]) == null ? void 0 : n.key) || "", r("reset", f(a.value)), v();
65
+ s.value = b(t), p.value = ((n = s.value[0]) == null ? void 0 : n.key) || "", r("reset", b(s.value)), v();
65
66
  }, V = () => {
66
67
  r("cancel"), r("update:modelValue", !1);
67
68
  }, R = () => {
68
- r("confirm", f(a.value)), r("update:modelValue", !1);
69
+ r("confirm", b(s.value)), r("update:modelValue", !1);
69
70
  };
70
71
  return (t, e) => {
71
- const n = J, g = M, W = O, j = H, d = P, A = G;
72
- return C(), B(A, {
73
- "model-value": b.modelValue,
74
- title: b.title,
75
- width: b.width,
72
+ const n = H, g = J, W = G, d = M, j = A;
73
+ return C(), B(j, {
74
+ "model-value": f.modelValue,
75
+ title: f.title,
76
+ width: f.width,
76
77
  "append-to-body": "",
77
78
  onClose: V
78
79
  }, {
@@ -98,10 +99,10 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
98
99
  })
99
100
  ]),
100
101
  default: i(() => [
101
- l("div", te, [
102
- l("div", le, [
103
- o(j, {
104
- data: a.value,
102
+ l("div", ee, [
103
+ l("div", te, [
104
+ o(W, {
105
+ data: s.value,
105
106
  "row-key": "key",
106
107
  height: "400px",
107
108
  border: "",
@@ -116,18 +117,18 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
116
117
  prop: "label",
117
118
  "show-overflow-tooltip": ""
118
119
  }, {
119
- default: i(({ row: s }) => [
120
+ default: i(({ row: a }) => [
120
121
  l("div", {
121
122
  class: "qy-table-column-settings__name",
122
- "data-testid": `table-row-${s.key}`,
123
- onClick: (k) => q(s)
123
+ "data-testid": `table-row-${a.key}`,
124
+ onClick: (k) => q(a)
124
125
  }, [
125
126
  l("span", {
126
- class: Z(["qy-table-column-settings__fixed-mark", `is-${z(s.fixed)}`]),
127
+ class: X(["qy-table-column-settings__fixed-mark", `is-${z(a.fixed)}`]),
127
128
  "aria-hidden": "true"
128
129
  }, null, 2),
129
- l("span", null, E(h(s)), 1)
130
- ], 8, ne)
130
+ l("span", null, T(h(a)), 1)
131
+ ], 8, le)
131
132
  ]),
132
133
  _: 1
133
134
  }),
@@ -136,13 +137,13 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
136
137
  prop: "width",
137
138
  width: "150"
138
139
  }, {
139
- default: i(({ row: s }) => [
140
+ default: i(({ row: a }) => [
140
141
  o(g, {
141
- "model-value": s.width,
142
+ "model-value": a.width,
142
143
  size: "small",
143
144
  placeholder: "留空自动设置宽度",
144
145
  "data-testid": "width",
145
- "onUpdate:modelValue": (k) => L(s.key, k)
146
+ "onUpdate:modelValue": (k) => L(a.key, k)
146
147
  }, null, 8, ["model-value", "onUpdate:modelValue"])
147
148
  ]),
148
149
  _: 1
@@ -152,13 +153,12 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
152
153
  prop: "visible",
153
154
  width: "100"
154
155
  }, {
155
- default: i(({ row: s }) => [
156
- o(W, {
157
- "model-value": s.visible,
158
- disabled: w(s),
159
- style: { "--el-switch-on-color": "rgb(99 102 241)" },
156
+ default: i(({ row: a }) => [
157
+ o(Z, {
158
+ "model-value": a.visible,
159
+ disabled: w(a),
160
160
  "data-testid": "visible-switch",
161
- "onUpdate:modelValue": (k) => K(s.key, !!k)
161
+ "onUpdate:modelValue": (k) => K(a.key, !!k)
162
162
  }, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
163
163
  ]),
164
164
  _: 1
@@ -167,14 +167,14 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
167
167
  _: 1
168
168
  }, 8, ["data"])
169
169
  ]),
170
- l("div", se, [
170
+ l("div", ne, [
171
171
  l("div", ae, [
172
- u.value ? (C(), T("div", oe, E(h(u.value)), 1)) : (C(), T("div", ie, " 请选择列 ")),
172
+ u.value ? (C(), E("div", ie, T(h(u.value)), 1)) : (C(), E("div", se, " 请选择列 ")),
173
173
  o(d, {
174
174
  class: "qy-table-column-settings__side-button",
175
175
  disabled: !u.value || c.value === 0,
176
176
  "data-action": "top",
177
- onClick: e[0] || (e[0] = (s) => y(c.value, 0))
177
+ onClick: e[0] || (e[0] = (a) => _(c.value, 0))
178
178
  }, {
179
179
  default: i(() => [...e[8] || (e[8] = [
180
180
  l("span", { class: "qy-table-column-settings__action-icon is-top" }, null, -1),
@@ -186,7 +186,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
186
186
  class: "qy-table-column-settings__side-button",
187
187
  disabled: !u.value || c.value === 0,
188
188
  "data-action": "up",
189
- onClick: e[1] || (e[1] = (s) => y(c.value, c.value - 1))
189
+ onClick: e[1] || (e[1] = (a) => _(c.value, c.value - 1))
190
190
  }, {
191
191
  default: i(() => [...e[9] || (e[9] = [
192
192
  l("span", { class: "qy-table-column-settings__action-icon is-up" }, null, -1),
@@ -196,9 +196,9 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
196
196
  }, 8, ["disabled"]),
197
197
  o(d, {
198
198
  class: "qy-table-column-settings__side-button",
199
- disabled: !u.value || c.value === a.value.length - 1,
199
+ disabled: !u.value || c.value === s.value.length - 1,
200
200
  "data-action": "down",
201
- onClick: e[2] || (e[2] = (s) => y(c.value, c.value + 1))
201
+ onClick: e[2] || (e[2] = (a) => _(c.value, c.value + 1))
202
202
  }, {
203
203
  default: i(() => [...e[10] || (e[10] = [
204
204
  l("span", { class: "qy-table-column-settings__action-icon is-down" }, null, -1),
@@ -208,9 +208,9 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
208
208
  }, 8, ["disabled"]),
209
209
  o(d, {
210
210
  class: "qy-table-column-settings__side-button",
211
- disabled: !u.value || c.value === a.value.length - 1,
211
+ disabled: !u.value || c.value === s.value.length - 1,
212
212
  "data-action": "bottom",
213
- onClick: e[3] || (e[3] = (s) => y(c.value, a.value.length - 1))
213
+ onClick: e[3] || (e[3] = (a) => _(c.value, s.value.length - 1))
214
214
  }, {
215
215
  default: i(() => [...e[11] || (e[11] = [
216
216
  l("span", { class: "qy-table-column-settings__action-icon is-bottom" }, null, -1),
@@ -222,7 +222,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
222
222
  class: "qy-table-column-settings__side-button",
223
223
  disabled: !u.value,
224
224
  "data-action": "fixed-left",
225
- onClick: e[4] || (e[4] = (s) => x("left"))
225
+ onClick: e[4] || (e[4] = (a) => x("left"))
226
226
  }, {
227
227
  default: i(() => [...e[12] || (e[12] = [
228
228
  l("span", { class: "qy-table-column-settings__action-icon is-fixed-left" }, null, -1),
@@ -234,7 +234,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
234
234
  class: "qy-table-column-settings__side-button",
235
235
  disabled: !u.value,
236
236
  "data-action": "fixed-right",
237
- onClick: e[5] || (e[5] = (s) => x("right"))
237
+ onClick: e[5] || (e[5] = (a) => x("right"))
238
238
  }, {
239
239
  default: i(() => [...e[13] || (e[13] = [
240
240
  l("span", { class: "qy-table-column-settings__action-icon is-fixed-right" }, null, -1),
@@ -246,7 +246,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
246
246
  class: "qy-table-column-settings__side-button",
247
247
  disabled: !u.value,
248
248
  "data-action": "clear-fixed",
249
- onClick: e[6] || (e[6] = (s) => x(!1))
249
+ onClick: e[6] || (e[6] = (a) => x(!1))
250
250
  }, {
251
251
  default: i(() => [...e[14] || (e[14] = [
252
252
  l("span", { class: "qy-table-column-settings__action-icon is-clear-fixed" }, null, -1),
@@ -255,7 +255,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
255
255
  _: 1
256
256
  }, 8, ["disabled"])
257
257
  ]),
258
- l("div", ue, [
258
+ l("div", oe, [
259
259
  o(d, {
260
260
  "data-action": "reset",
261
261
  onClick: Q
@@ -266,19 +266,19 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
266
266
  ])]),
267
267
  _: 1
268
268
  }),
269
- b.showDeleteCache ? (C(), B(d, {
269
+ f.showDeleteCache ? (C(), B(d, {
270
270
  key: 0,
271
271
  type: "danger",
272
272
  plain: "",
273
273
  "data-action": "delete-cache",
274
- onClick: e[7] || (e[7] = (s) => r("delete-cache"))
274
+ onClick: e[7] || (e[7] = (a) => r("delete-cache"))
275
275
  }, {
276
276
  default: i(() => [...e[16] || (e[16] = [
277
277
  l("span", { class: "qy-table-column-settings__action-icon is-reset" }, null, -1),
278
278
  l("span", null, "删除缓存", -1)
279
279
  ])]),
280
280
  _: 1
281
- })) : I("", !0)
281
+ })) : Y("", !0)
282
282
  ])
283
283
  ])
284
284
  ])
@@ -287,7 +287,7 @@ const te = { class: "qy-table-column-settings" }, le = { class: "qy-table-column
287
287
  }, 8, ["model-value", "title", "width"]);
288
288
  };
289
289
  }
290
- }), pe = /* @__PURE__ */ ee(de, [["__scopeId", "data-v-56d579b9"]]);
290
+ }), pe = /* @__PURE__ */ I(ue, [["__scopeId", "data-v-2f2e5e90"]]);
291
291
  export {
292
292
  pe as T
293
293
  };
@@ -0,0 +1,119 @@
1
+ import { defineComponent as L, ref as g, computed as a, watch as P, openBlock as _, createElementBlock as $, normalizeStyle as N, normalizeClass as Q, createBlock as V, unref as i, withCtx as n, renderSlot as p, createElementVNode as c, createVNode as u, createCommentVNode as j } from "vue";
2
+ import { ElImage as D, ElIcon as w } from "element-plus";
3
+ import { PictureFilled as z } from "@element-plus/icons-vue";
4
+ import { n as I, r as F, o as O } from "./utils-DUntDntI.mjs";
5
+ import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
6
+ const U = { class: "qy-image__state qy-image__state--error" }, A = { class: "qy-image__state qy-image__state--empty" }, G = /* @__PURE__ */ L({
7
+ name: "QyImage",
8
+ __name: "index",
9
+ props: {
10
+ src: { default: "" },
11
+ width: {},
12
+ height: {},
13
+ size: { default: 64 },
14
+ fit: { default: "cover" },
15
+ placeholder: { type: Boolean, default: !0 },
16
+ lazy: { type: Boolean, default: !0 },
17
+ compressor: { type: [Boolean, Object], default: !0 },
18
+ preview: { type: Boolean, default: !1 },
19
+ previewList: { default: () => [] },
20
+ initialIndex: { default: 0 }
21
+ },
22
+ emits: ["load", "error", "fallback", "preview"],
23
+ setup(d, { emit: q }) {
24
+ const e = d, s = q, l = g(!1), o = g("");
25
+ let m = 0;
26
+ const f = a(() => I(e.src)), v = a(() => ({
27
+ width: e.width ?? e.size,
28
+ height: e.height ?? e.size
29
+ })), S = a(() => ({
30
+ width: h(v.value.width),
31
+ height: h(v.value.height)
32
+ })), k = a(() => e.placeholder || l.value), y = a(() => e.preview && !!f.value), B = a(() => (e.previewList.length ? e.previewList : [e.src]).map((r) => I(r)).filter(Boolean));
33
+ P(
34
+ () => [e.src, e.compressor],
35
+ E,
36
+ {
37
+ immediate: !0,
38
+ deep: !0
39
+ }
40
+ );
41
+ async function E() {
42
+ const t = ++m;
43
+ if (o.value = "", l.value = !1, !!e.src)
44
+ try {
45
+ const r = await F(e.src, {
46
+ compressor: e.compressor
47
+ });
48
+ if (t !== m) return;
49
+ o.value = r.src, r.source === "fallback" && s("fallback", r.src);
50
+ } catch {
51
+ if (t !== m) return;
52
+ l.value = !1, o.value = f.value;
53
+ }
54
+ }
55
+ function b(t) {
56
+ s("load", t);
57
+ }
58
+ function x(t) {
59
+ l.value = !0, s("error", t);
60
+ }
61
+ function C() {
62
+ y.value && (O({
63
+ urlList: B.value,
64
+ initialIndex: e.initialIndex
65
+ }), s("preview", f.value));
66
+ }
67
+ function h(t) {
68
+ return typeof t == "number" ? `${t}px` : t;
69
+ }
70
+ return (t, r) => (_(), $("div", {
71
+ class: Q(["qy-image", { "qy-image--previewable": y.value }]),
72
+ style: N(S.value),
73
+ onClick: C
74
+ }, [
75
+ o.value && !l.value ? (_(), V(i(D), {
76
+ key: 0,
77
+ class: "qy-image__inner",
78
+ src: o.value,
79
+ fit: d.fit,
80
+ lazy: d.lazy,
81
+ onLoad: b,
82
+ onError: x
83
+ }, {
84
+ placeholder: n(() => [
85
+ p(t.$slots, "placeholder", {}, () => [
86
+ r[0] || (r[0] = c("div", { class: "qy-image__state" }, [
87
+ c("span", { class: "qy-image__loading" })
88
+ ], -1))
89
+ ], !0)
90
+ ]),
91
+ error: n(() => [
92
+ p(t.$slots, "error", {}, () => [
93
+ c("div", U, [
94
+ u(i(w), { size: 20 }, {
95
+ default: n(() => [
96
+ u(i(z))
97
+ ]),
98
+ _: 1
99
+ })
100
+ ])
101
+ ], !0)
102
+ ]),
103
+ _: 3
104
+ }, 8, ["src", "fit", "lazy"])) : k.value ? p(t.$slots, "empty", {}, () => [
105
+ c("div", A, [
106
+ u(i(w), { size: 20 }, {
107
+ default: n(() => [
108
+ u(i(z))
109
+ ]),
110
+ _: 1
111
+ })
112
+ ])
113
+ ], !0, 1) : j("", !0)
114
+ ], 6));
115
+ }
116
+ }), W = /* @__PURE__ */ R(G, [["__scopeId", "data-v-02c4930c"]]);
117
+ export {
118
+ W as I
119
+ };
@@ -0,0 +1,225 @@
1
+ import { defineComponent as D, useAttrs as Q, useSlots as G, ref as J, computed as s, Comment as X, Text as Y, Fragment as A, isVNode as Z, watch as k, onMounted as _, onUpdated as ee, openBlock as h, createBlock as B, unref as K, mergeProps as te, createSlots as le, withCtx as c, renderSlot as p, createElementBlock as ae, renderList as ne, normalizeProps as oe, guardReactiveProps as re } from "vue";
2
+ import { ElSelect as ie, ElOption as ue } from "element-plus";
3
+ import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ const de = /* @__PURE__ */ D({
5
+ name: "QySelect",
6
+ inheritAttrs: !1,
7
+ __name: "index",
8
+ props: {
9
+ modelValue: { type: [String, Number, Boolean, Object, Array, null], default: void 0 },
10
+ options: { default: () => [] },
11
+ labelKey: { default: "label" },
12
+ valueKey: { default: "value" },
13
+ objectIdentityKey: { default: void 0 },
14
+ disabledKey: { default: "disabled" },
15
+ placeholder: { default: "请选择" },
16
+ disabled: { type: Boolean, default: !1 },
17
+ clearable: { type: Boolean, default: !0 },
18
+ filterable: { type: Boolean, default: !1 },
19
+ loading: { type: Boolean, default: !1 },
20
+ multiple: { type: Boolean, default: !1 },
21
+ collapseTags: { type: Boolean, default: !1 },
22
+ collapseTagsTooltip: { type: Boolean, default: !1 },
23
+ autoSelectSingle: { type: Boolean, default: !1 },
24
+ size: { default: void 0 },
25
+ teleported: { type: Boolean, default: !0 },
26
+ appendTo: { default: "body" },
27
+ fitInputWidth: { type: Boolean, default: !0 },
28
+ popperClass: { default: "" }
29
+ },
30
+ emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur"],
31
+ setup(n, { expose: j, emit: C }) {
32
+ const r = Symbol("invalid-select-value"), l = n, o = C, I = Q(), O = G(), m = J(null), $ = s(
33
+ () => Object.fromEntries(
34
+ Object.entries(I).filter(
35
+ ([e]) => e === "class" || e === "style" || e === "id" || e === "name" || e === "role" || e === "title" || e === "tabindex" || e === "remote" || e === "remoteMethod" || e === "remote-method" || e === "remoteShowSuffix" || e === "remote-show-suffix" || e.startsWith("data-") || e.startsWith("aria-")
36
+ )
37
+ )
38
+ ), T = s(
39
+ () => ["qy-select__popper", l.popperClass].filter(Boolean).join(" ")
40
+ ), S = s(() => {
41
+ const e = g(l.modelValue);
42
+ return e === r ? void 0 : e;
43
+ }), d = s(
44
+ () => l.options.map((e) => ({
45
+ raw: e,
46
+ label: x(e),
47
+ value: z(e),
48
+ disabled: !!e[l.disabledKey]
49
+ }))
50
+ ), y = s(() => {
51
+ const e = O.default;
52
+ return e ? e().some(V) : !1;
53
+ }), w = s(() => {
54
+ if (!l.objectIdentityKey) return;
55
+ const e = S.value, t = Array.isArray(e) ? e.some(f) : f(e), a = !y.value && d.value.some((u) => f(u.value));
56
+ return t || a ? l.objectIdentityKey : void 0;
57
+ });
58
+ function V(e) {
59
+ return e.type === X ? !1 : e.type === Y ? typeof e.children == "string" && e.children.trim() !== "" : e.type !== A || !Array.isArray(e.children) ? !0 : e.children.some((t) => Z(t) ? V(t) : typeof t == "string" ? t.trim() !== "" : t != null);
60
+ }
61
+ function f(e) {
62
+ return typeof e == "object" && e !== null && !Array.isArray(e);
63
+ }
64
+ function b(e) {
65
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || f(e) ? e : r;
66
+ }
67
+ function g(e) {
68
+ if (e == null) return e;
69
+ if (Array.isArray(e)) {
70
+ const t = e;
71
+ return t.every((a) => b(a) !== r) ? t : r;
72
+ }
73
+ return b(e);
74
+ }
75
+ function x(e) {
76
+ const t = e[l.labelKey] ?? e.label ?? e.value ?? "";
77
+ return typeof t == "string" || typeof t == "number" ? t : typeof t == "boolean" ? String(t) : "";
78
+ }
79
+ function z(e) {
80
+ const t = e[l.valueKey] ?? e.value ?? e.label, a = b(t);
81
+ return a === r ? void 0 : a;
82
+ }
83
+ function E(e) {
84
+ return Array.isArray(e) ? e.length === 0 : e === "" || e === null || e === void 0;
85
+ }
86
+ let i = null;
87
+ k(
88
+ [
89
+ d,
90
+ () => l.modelValue,
91
+ () => l.autoSelectSingle,
92
+ () => l.disabled,
93
+ () => l.multiple
94
+ ],
95
+ ([e]) => v(e),
96
+ { flush: "post" }
97
+ ), _(() => v(d.value)), ee(() => v(d.value));
98
+ function v(e) {
99
+ if (!E(l.modelValue)) {
100
+ i = null;
101
+ return;
102
+ }
103
+ if (!l.autoSelectSingle || l.disabled || y.value || e.length !== 1) return;
104
+ const [t] = e;
105
+ if (t.disabled || t.value === void 0) return;
106
+ const a = M(t.value);
107
+ if (i && i.identityKey === l.objectIdentityKey && i.multiple === l.multiple && Object.is(i.candidate, a))
108
+ return;
109
+ i = {
110
+ candidate: a,
111
+ identityKey: l.objectIdentityKey,
112
+ multiple: l.multiple
113
+ };
114
+ const u = l.multiple ? [t.value] : t.value;
115
+ o("update:modelValue", u), o("change", u);
116
+ }
117
+ function M(e) {
118
+ return !f(e) || !l.objectIdentityKey ? e : e[l.objectIdentityKey] ?? e;
119
+ }
120
+ function L(e, t) {
121
+ return `${String(e.value ?? e.label ?? "")}-${t}`;
122
+ }
123
+ function P(e) {
124
+ const t = g(e);
125
+ t !== r && o("update:modelValue", t);
126
+ }
127
+ function U(e) {
128
+ const t = g(e);
129
+ t !== r && o("change", t);
130
+ }
131
+ function W() {
132
+ o("clear");
133
+ }
134
+ function F(e) {
135
+ o("visible-change", e);
136
+ }
137
+ function H(e) {
138
+ o("focus", e);
139
+ }
140
+ function N(e) {
141
+ o("blur", e);
142
+ }
143
+ function R() {
144
+ var e, t;
145
+ (t = (e = m.value) == null ? void 0 : e.focus) == null || t.call(e);
146
+ }
147
+ function q() {
148
+ var e, t;
149
+ (t = (e = m.value) == null ? void 0 : e.blur) == null || t.call(e);
150
+ }
151
+ return j({
152
+ // 仅暴露业务常用焦点方法,复杂下拉行为仍交给 Element Plus 自身处理。
153
+ focus: R,
154
+ blur: q
155
+ }), (e, t) => (h(), B(K(ie), te({
156
+ ref_key: "selectRef",
157
+ ref: m,
158
+ class: "qy-select"
159
+ }, $.value, {
160
+ "model-value": S.value,
161
+ placeholder: n.placeholder,
162
+ disabled: n.disabled,
163
+ clearable: n.clearable,
164
+ filterable: n.filterable,
165
+ loading: n.loading,
166
+ multiple: n.multiple,
167
+ "collapse-tags": n.collapseTags,
168
+ "collapse-tags-tooltip": n.collapseTagsTooltip,
169
+ size: n.size,
170
+ teleported: n.teleported,
171
+ "fit-input-width": n.fitInputWidth,
172
+ "popper-class": T.value,
173
+ "append-to": n.appendTo,
174
+ "value-key": w.value,
175
+ "onUpdate:modelValue": P,
176
+ onChange: U,
177
+ onClear: W,
178
+ onVisibleChange: F,
179
+ onFocus: H,
180
+ onBlur: N
181
+ }), le({
182
+ default: c(() => [
183
+ y.value ? p(e.$slots, "default", {}, void 0, !0, 0) : (h(!0), ae(A, { key: 1 }, ne(d.value, (a, u) => (h(), B(K(ue), {
184
+ key: L(a, u),
185
+ label: a.label,
186
+ value: a.value,
187
+ disabled: a.disabled
188
+ }, null, 8, ["label", "value", "disabled"]))), 128))
189
+ ]),
190
+ _: 2
191
+ }, [
192
+ e.$slots.prefix ? {
193
+ name: "prefix",
194
+ fn: c(() => [
195
+ p(e.$slots, "prefix", {}, void 0, !0)
196
+ ]),
197
+ key: "0"
198
+ } : void 0,
199
+ e.$slots.empty ? {
200
+ name: "empty",
201
+ fn: c(() => [
202
+ p(e.$slots, "empty", {}, void 0, !0)
203
+ ]),
204
+ key: "1"
205
+ } : void 0,
206
+ e.$slots.loading ? {
207
+ name: "loading",
208
+ fn: c(() => [
209
+ p(e.$slots, "loading", {}, void 0, !0)
210
+ ]),
211
+ key: "2"
212
+ } : void 0,
213
+ e.$slots.tag ? {
214
+ name: "tag",
215
+ fn: c((a) => [
216
+ p(e.$slots, "tag", oe(re(a)), void 0, !0)
217
+ ]),
218
+ key: "3"
219
+ } : void 0
220
+ ]), 1040, ["model-value", "placeholder", "disabled", "clearable", "filterable", "loading", "multiple", "collapse-tags", "collapse-tags-tooltip", "size", "teleported", "fit-input-width", "popper-class", "append-to", "value-key"]));
221
+ }
222
+ }), me = /* @__PURE__ */ se(de, [["__scopeId", "data-v-f5464318"]]);
223
+ export {
224
+ me as S
225
+ };