@yeepay/yee-boss-ui 0.1.5 → 0.1.7

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.
package/dist/index.js CHANGED
@@ -1,63 +1,64 @@
1
- import { inject as ue, defineComponent as A, computed as c, provide as Pe, openBlock as i, createBlock as k, unref as h, withCtx as f, createElementVNode as $, normalizeStyle as K, renderSlot as _, reactive as ce, onBeforeUnmount as de, mergeProps as E, createElementBlock as T, Fragment as fe, renderList as oe, createTextVNode as z, toDisplayString as F, createCommentVNode as S, ref as Oe, shallowRef as D, watch as ee, withModifiers as Re, createVNode as q, useSlots as ae, useTemplateRef as Ye, onMounted as ze, onUnmounted as Ee, withDirectives as Ae, vShow as Me, toHandlers as Ie, createSlots as pe, normalizeProps as M, guardReactiveProps as I, h as Ue, useModel as me, useAttrs as ve, mergeModels as te, normalizeClass as H } from "vue";
2
- import { ConfigProvider as Ne, Descriptions as ie, Tooltip as W, message as L, Upload as je, Image as Le, DatePicker as De, Input as Ge, Select as J, Button as U, Drawer as He, Modal as qe } from "ant-design-vue";
3
- import { r as Ke, t as Qe, a as We } from "./tokens-CHaQtlyD.js";
4
- import { d as fo, l as po } from "./tokens-CHaQtlyD.js";
5
- import { VxeTable as Je, VxeColumn as Xe, VxeColgroup as Ze, VxeGrid as he, VxeToolbar as et, VxeUI as ye } from "vxe-table";
6
- import { VxeButton as tt, VxeCheckbox as ot, VxeIcon as at, VxeInput as st, VxeLoading as nt, VxeModal as lt, VxeNumberInput as it, VxePager as rt, VxeRadioGroup as ut, VxeSelect as ct, VxeTooltip as dt } from "vxe-pc-ui";
7
- const se = /* @__PURE__ */ Symbol("platform-theme");
8
- function to() {
9
- const s = ue(se);
10
- if (!s)
1
+ import { inject as pe, defineComponent as L, computed as s, provide as ze, openBlock as n, createBlock as k, unref as m, withCtx as p, createElementVNode as w, normalizeStyle as oe, renderSlot as x, reactive as he, onBeforeUnmount as fe, mergeProps as A, createElementBlock as B, Fragment as ge, renderList as ve, createTextVNode as W, toDisplayString as P, createCommentVNode as T, useTemplateRef as be, shallowRef as N, onMounted as _e, onUpdated as Re, watch as ae, nextTick as Me, ref as Ye, withModifiers as Ae, createVNode as H, useSlots as ie, onUnmounted as Ie, withDirectives as We, vShow as Le, toHandlers as je, createSlots as se, normalizeProps as G, guardReactiveProps as q, h as Ce, useModel as de, useAttrs as ke, useId as He, mergeModels as ce, normalizeClass as te } from "vue";
2
+ import { ConfigProvider as Ne, Descriptions as me, Tooltip as X, message as J, Upload as Ue, Image as De, DatePicker as Ge, Input as qe, Select as ne, Button as I, Drawer as Ke, Modal as Qe } from "ant-design-vue";
3
+ import { r as Je, t as Xe, a as Ze } from "./tokens-CHaQtlyD.js";
4
+ import { d as Bo, l as Fo } from "./tokens-CHaQtlyD.js";
5
+ import { FullscreenExitOutlined as et, FullscreenOutlined as tt, CloseOutlined as ot } from "@ant-design/icons-vue";
6
+ import { VxeTable as lt, VxeColumn as at, VxeColgroup as st, VxeGrid as xe, VxeToolbar as nt, VxeUI as we } from "vxe-table";
7
+ import { VxeButton as it, VxeCheckbox as rt, VxeIcon as ut, VxeInput as dt, VxeLoading as ct, VxeModal as pt, VxeNumberInput as ft, VxePager as vt, VxeRadioGroup as mt, VxeSelect as yt, VxeTooltip as ht } from "vxe-pc-ui";
8
+ const re = /* @__PURE__ */ Symbol("platform-theme");
9
+ function ho() {
10
+ const a = pe(re);
11
+ if (!a)
11
12
  throw new Error("usePlatformTheme 必须在 PlatformConfigProvider 内使用。");
12
- return s;
13
+ return a;
13
14
  }
14
- const ft = ["data-theme"], pt = /* @__PURE__ */ A({
15
+ const gt = ["data-theme"], bt = /* @__PURE__ */ L({
15
16
  name: "PlatformConfigProvider",
16
17
  __name: "PlatformConfigProvider",
17
18
  props: {
18
19
  theme: { default: () => ({}) }
19
20
  },
20
- setup(s) {
21
- const e = s, t = c(() => Ke(e.theme)), n = c(() => Qe(t.value)), p = c(() => We(t.value));
22
- return Pe(se, t), (l, C) => (i(), k(h(Ne), { theme: n.value }, {
23
- default: f(() => [
24
- $("div", {
21
+ setup(a) {
22
+ const t = a, e = s(() => Je(t.theme)), r = s(() => Xe(e.value)), y = s(() => Ze(e.value));
23
+ return ze(re, e), (i, b) => (n(), k(m(Ne), { theme: r.value }, {
24
+ default: p(() => [
25
+ w("div", {
25
26
  class: "yee-platform-theme",
26
- "data-theme": t.value.mode,
27
- style: K(p.value)
27
+ "data-theme": e.value.mode,
28
+ style: oe(y.value)
28
29
  }, [
29
- _(l.$slots, "default", {}, void 0, !0)
30
- ], 12, ft)
30
+ x(i.$slots, "default", {}, void 0, !0)
31
+ ], 12, gt)
31
32
  ]),
32
33
  _: 3
33
34
  }, 8, ["theme"]));
34
35
  }
35
- }), N = (s, e) => {
36
- const t = s.__vccOpts || s;
37
- for (const [n, p] of e)
38
- t[n] = p;
39
- return t;
40
- }, oo = /* @__PURE__ */ N(pt, [["__scopeId", "data-v-36f21f18"]]);
41
- async function mt(s) {
42
- if (!s) return !1;
36
+ }), U = (a, t) => {
37
+ const e = a.__vccOpts || a;
38
+ for (const [r, y] of t)
39
+ e[r] = y;
40
+ return e;
41
+ }, go = /* @__PURE__ */ U(bt, [["__scopeId", "data-v-36f21f18"]]);
42
+ async function _t(a) {
43
+ if (!a) return !1;
43
44
  try {
44
- return await navigator.clipboard.writeText(s), !0;
45
+ return await navigator.clipboard.writeText(a), !0;
45
46
  } catch {
46
- const e = document.createElement("textarea");
47
- e.value = s, e.style.position = "fixed", e.style.opacity = "0", document.body.append(e), e.focus(), e.select();
47
+ const t = document.createElement("textarea");
48
+ t.value = a, t.style.position = "fixed", t.style.opacity = "0", document.body.append(t), t.focus(), t.select();
48
49
  try {
49
50
  return document.execCommand("copy");
50
51
  } catch {
51
52
  return !1;
52
53
  } finally {
53
- e.remove();
54
+ t.remove();
54
55
  }
55
56
  }
56
57
  }
57
- const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions__content-row" }, yt = { class: "yee-descriptions__value yee-descriptions__value--ellipsis" }, gt = {
58
+ const Ct = { class: "yee-descriptions__item" }, kt = { class: "yee-descriptions__content-row" }, xt = { class: "yee-descriptions__value yee-descriptions__value--ellipsis" }, wt = {
58
59
  key: 1,
59
60
  class: "yee-descriptions__value"
60
- }, bt = ["disabled", "onClick"], _t = /* @__PURE__ */ A({
61
+ }, $t = ["disabled", "onClick"], Tt = /* @__PURE__ */ L({
61
62
  name: "YeeDescriptions",
62
63
  __name: "YeeDescriptions",
63
64
  props: {
@@ -69,76 +70,76 @@ const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions_
69
70
  size: {},
70
71
  title: {}
71
72
  },
72
- setup(s) {
73
- const e = s, t = c(() => e.bordered ?? !1), n = c(() => e.colon ?? !0), p = c(() => e.column ?? 3), l = c(() => e.layout ?? "horizontal"), C = c(() => e.size ?? "default"), w = ce(/* @__PURE__ */ new Set()), B = /* @__PURE__ */ new Set();
74
- function V(b, m) {
75
- return b.name ?? `${b.label}-${m}`;
76
- }
77
- async function g(b, m) {
78
- const r = String(b.value ?? "");
79
- if (!r.trim()) {
80
- L.warning("没有可复制的内容");
73
+ setup(a) {
74
+ const t = a, e = s(() => t.bordered ?? !1), r = s(() => t.colon ?? !0), y = s(() => t.column ?? 3), i = s(() => t.layout ?? "horizontal"), b = s(() => t.size ?? "default"), h = he(/* @__PURE__ */ new Set()), F = /* @__PURE__ */ new Set();
75
+ function S(C, g) {
76
+ return C.name ?? `${C.label}-${g}`;
77
+ }
78
+ async function $(C, g) {
79
+ const u = String(C.value ?? "");
80
+ if (!u.trim()) {
81
+ J.warning("没有可复制的内容");
81
82
  return;
82
83
  }
83
- if (!await mt(r)) {
84
- L.error("复制失败");
84
+ if (!await _t(u)) {
85
+ J.error("复制失败");
85
86
  return;
86
87
  }
87
- w.add(m), L.success("已复制");
88
- const y = setTimeout(() => {
89
- w.delete(m), B.delete(y);
88
+ h.add(g), J.success("已复制");
89
+ const f = setTimeout(() => {
90
+ h.delete(g), F.delete(f);
90
91
  }, 1500);
91
- B.add(y);
92
+ F.add(f);
92
93
  }
93
- return de(() => {
94
- B.forEach((b) => clearTimeout(b)), B.clear();
95
- }), (b, m) => (i(), k(h(ie), E({
94
+ return fe(() => {
95
+ F.forEach((C) => clearTimeout(C)), F.clear();
96
+ }), (C, g) => (n(), k(m(me), A({
96
97
  class: "yee-descriptions",
97
- bordered: t.value,
98
- colon: n.value,
99
- column: p.value,
100
- layout: l.value,
101
- size: C.value
102
- }, e.title === void 0 ? {} : { title: e.title }), {
103
- default: f(() => [
104
- (i(!0), T(fe, null, oe(s.items, (r, y) => (i(), k(h(ie).Item, {
105
- key: V(r, y),
106
- label: r.label,
107
- span: r.span ?? 1
98
+ bordered: e.value,
99
+ colon: r.value,
100
+ column: y.value,
101
+ layout: i.value,
102
+ size: b.value
103
+ }, t.title === void 0 ? {} : { title: t.title }), {
104
+ default: p(() => [
105
+ (n(!0), B(ge, null, ve(a.items, (u, f) => (n(), k(m(me).Item, {
106
+ key: S(u, f),
107
+ label: u.label,
108
+ span: u.span ?? 1
108
109
  }, {
109
- default: f(() => [
110
- $("div", vt, [
111
- $("div", ht, [
112
- r.ellipsis ? (i(), k(h(W), {
110
+ default: p(() => [
111
+ w("div", Ct, [
112
+ w("div", kt, [
113
+ u.ellipsis ? (n(), k(m(X), {
113
114
  key: 0,
114
- title: String(r.value ?? "")
115
+ title: String(u.value ?? "")
115
116
  }, {
116
- default: f(() => [
117
- $("span", yt, [
118
- _(b.$slots, `content-${r.name ?? r.label}`, { item: r }, () => [
119
- z(F(r.value), 1)
117
+ default: p(() => [
118
+ w("span", xt, [
119
+ x(C.$slots, `content-${u.name ?? u.label}`, { item: u }, () => [
120
+ W(P(u.value), 1)
120
121
  ], !0)
121
122
  ])
122
123
  ]),
123
124
  _: 2
124
- }, 1032, ["title"])) : (i(), T("span", gt, [
125
- _(b.$slots, `content-${r.name ?? r.label}`, { item: r }, () => [
126
- z(F(r.value), 1)
125
+ }, 1032, ["title"])) : (n(), B("span", wt, [
126
+ x(C.$slots, `content-${u.name ?? u.label}`, { item: u }, () => [
127
+ W(P(u.value), 1)
127
128
  ], !0)
128
129
  ])),
129
- r.copyable ? (i(), T("button", {
130
+ u.copyable ? (n(), B("button", {
130
131
  key: 2,
131
132
  class: "yee-descriptions__copy",
132
- disabled: w.has(V(r, y)),
133
+ disabled: h.has(S(u, f)),
133
134
  type: "button",
134
- onClick: (o) => g(r, V(r, y))
135
- }, F(w.has(V(r, y)) ? "已复制" : "复制"), 9, bt)) : S("", !0)
135
+ onClick: (o) => $(u, S(u, f))
136
+ }, P(h.has(S(u, f)) ? "已复制" : "复制"), 9, $t)) : T("", !0)
136
137
  ]),
137
- r.info ? (i(), T("span", {
138
+ u.info ? (n(), B("span", {
138
139
  key: 0,
139
140
  class: "yee-descriptions__info",
140
- style: K(r.infoStyle)
141
- }, F(r.info), 5)) : S("", !0)
141
+ style: oe(u.infoStyle)
142
+ }, P(u.info), 5)) : T("", !0)
142
143
  ])
143
144
  ]),
144
145
  _: 2
@@ -147,10 +148,102 @@ const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions_
147
148
  _: 3
148
149
  }, 16, ["bordered", "colon", "column", "layout", "size"]));
149
150
  }
150
- }), ao = /* @__PURE__ */ N(_t, [["__scopeId", "data-v-2297b86c"]]), Ct = { class: "yee-file-upload" }, kt = {
151
+ }), bo = /* @__PURE__ */ U(Tt, [["__scopeId", "data-v-2297b86c"]]), St = ["aria-expanded", "role", "tabindex"], Bt = /* @__PURE__ */ L({
152
+ inheritAttrs: !1,
153
+ name: "YeeEllipsisText",
154
+ __name: "YeeEllipsisText",
155
+ props: {
156
+ expand: { type: Boolean, default: !1 },
157
+ ellipsisThreshold: { default: 3 },
158
+ line: { default: 1 },
159
+ maxWidth: { default: "100%" },
160
+ placement: { default: "top" },
161
+ tooltip: { type: Boolean, default: !0 },
162
+ tooltipBackgroundColor: {},
163
+ tooltipColor: {},
164
+ tooltipFontSize: {},
165
+ tooltipMaxWidth: {},
166
+ tooltipOverlayStyle: { default: () => ({ textAlign: "justify" }) },
167
+ tooltipWhenEllipsis: { type: Boolean, default: !1 }
168
+ },
169
+ emits: ["expandChange"],
170
+ setup(a, { emit: t }) {
171
+ const e = a, r = t, y = pe(re, void 0), i = be("text"), b = N(!1), h = N(!1), F = N(0), S = s(() => Number.isFinite(e.line) ? Math.max(1, Math.floor(e.line)) : 1), $ = s(() => Number.isFinite(e.ellipsisThreshold) ? Math.max(0, e.ellipsisThreshold) : 3), C = s(() => typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth), g = s(() => {
172
+ const v = { maxWidth: C.value };
173
+ return !h.value && S.value > 1 && (v.webkitLineClamp = S.value), v;
174
+ }), u = s(() => ({
175
+ "yee-ellipsis-text--expandable": e.expand,
176
+ "yee-ellipsis-text--expanded": h.value,
177
+ "yee-ellipsis-text--multi-line": !h.value && S.value > 1,
178
+ "yee-ellipsis-text--single-line": !h.value && S.value === 1
179
+ })), f = s(() => e.tooltipMaxWidth !== void 0 ? e.tooltipMaxWidth : F.value > 0 ? F.value + 24 : void 0), o = s(() => {
180
+ const v = {};
181
+ return f.value !== void 0 && (v.maxWidth = `${f.value}px`), v;
182
+ }), c = s(() => {
183
+ const v = {
184
+ ...e.tooltipOverlayStyle,
185
+ backgroundColor: d.value,
186
+ color: e.tooltipColor || y?.value.tokens.popoverForeground || "var(--yee-popover-foreground)",
187
+ fontSize: e.tooltipFontSize === void 0 ? y ? `${y.value.tokens.fontSize}px` : "var(--yee-font-size)" : `${e.tooltipFontSize}px`
188
+ };
189
+ return f.value !== void 0 && (v.maxWidth = `${f.value}px`), v;
190
+ }), d = s(() => e.tooltipBackgroundColor || y?.value.tokens.popover || "var(--yee-popover)"), E = s(() => e.tooltip && !h.value && (!e.tooltipWhenEllipsis || b.value)), R = s(() => E.value ? {} : { open: !1 });
191
+ let V;
192
+ function Y() {
193
+ const v = i.value;
194
+ if (!v) return;
195
+ const O = v.getBoundingClientRect().width || v.clientWidth;
196
+ if (F.value = Math.ceil(O), !e.tooltipWhenEllipsis || h.value || !v.textContent?.trim()) {
197
+ b.value = !1;
198
+ return;
199
+ }
200
+ const j = S.value === 1 ? v.scrollWidth - v.clientWidth : v.scrollHeight - v.clientHeight;
201
+ b.value = j > $.value;
202
+ }
203
+ function D() {
204
+ e.expand && (h.value = !h.value, r("expandChange", h.value), Me(Y));
205
+ }
206
+ function Q(v) {
207
+ !e.expand || v.key !== "Enter" && v.key !== " " || (v.preventDefault(), D());
208
+ }
209
+ return _e(() => {
210
+ const v = i.value;
211
+ v && typeof ResizeObserver < "u" && (V = new ResizeObserver(Y), V.observe(v)), Y();
212
+ }), Re(Y), ae(() => e.expand, (v) => {
213
+ v || (h.value = !1);
214
+ }), fe(() => {
215
+ V?.disconnect(), V = void 0;
216
+ }), (v, O) => (n(), k(m(X), A(R.value, {
217
+ color: d.value,
218
+ "overlay-inner-style": c.value,
219
+ "overlay-style": o.value,
220
+ placement: e.placement
221
+ }), {
222
+ title: p(() => [
223
+ x(v.$slots, "tooltip", {}, () => [
224
+ x(v.$slots, "default", {}, void 0, !0)
225
+ ], !0)
226
+ ]),
227
+ default: p(() => [
228
+ w("div", A({ ref: "text" }, v.$attrs, {
229
+ "aria-expanded": e.expand ? h.value : void 0,
230
+ class: ["yee-ellipsis-text", u.value],
231
+ role: e.expand ? "button" : void 0,
232
+ style: g.value,
233
+ tabindex: e.expand ? 0 : void 0,
234
+ onClick: D,
235
+ onKeydown: Q
236
+ }), [
237
+ x(v.$slots, "default", {}, void 0, !0)
238
+ ], 16, St)
239
+ ]),
240
+ _: 3
241
+ }, 16, ["color", "overlay-inner-style", "overlay-style", "placement"]));
242
+ }
243
+ }), _o = /* @__PURE__ */ U(Bt, [["__scopeId", "data-v-0b85ad64"]]), Ft = { class: "yee-file-upload" }, Vt = {
151
244
  key: 1,
152
245
  class: "yee-file-upload__empty"
153
- }, wt = /* @__PURE__ */ A({
246
+ }, Ot = /* @__PURE__ */ L({
154
247
  name: "YeeFileUpload",
155
248
  __name: "YeeFileUpload",
156
249
  props: {
@@ -167,151 +260,151 @@ const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions_
167
260
  width: {}
168
261
  },
169
262
  emits: ["fileRemoved", "fileSelect", "update:fileList", "uploadSuccess", "uploadingChange"],
170
- setup(s, { expose: e, emit: t }) {
171
- const n = s, p = t, l = Oe([]), C = D(!1), w = D(""), B = c(() => n.fileList ?? []), V = c(() => n.height ?? 100), g = c(() => n.manual ?? !1), b = c(() => n.maxCount ?? 10), m = c(() => n.maxSize ?? 20), r = c(() => n.multiple ?? !1), y = c(() => n.readonly ?? !1), o = c(() => n.uploadText ?? "上传文件"), d = c(() => n.width ?? 100), u = c(() => ({
172
- height: Y(V.value),
173
- width: Y(d.value)
174
- })), O = c(() => l.value.some((a) => a.status === "uploading"));
175
- ee(
176
- B,
177
- (a) => {
178
- l.value = a.map((v) => ({ ...v }));
263
+ setup(a, { expose: t, emit: e }) {
264
+ const r = a, y = e, i = Ye([]), b = N(!1), h = N(""), F = s(() => r.fileList ?? []), S = s(() => r.height ?? 100), $ = s(() => r.manual ?? !1), C = s(() => r.maxCount ?? 10), g = s(() => r.maxSize ?? 20), u = s(() => r.multiple ?? !1), f = s(() => r.readonly ?? !1), o = s(() => r.uploadText ?? "上传文件"), c = s(() => r.width ?? 100), d = s(() => ({
265
+ height: R(S.value),
266
+ width: R(c.value)
267
+ })), E = s(() => i.value.some((l) => l.status === "uploading"));
268
+ ae(
269
+ F,
270
+ (l) => {
271
+ i.value = l.map((_) => ({ ..._ }));
179
272
  },
180
273
  { immediate: !0 }
181
- ), ee(O, (a) => p("uploadingChange", a), { immediate: !0 });
182
- function Y(a) {
183
- return typeof a == "number" ? `${a}px` : a;
274
+ ), ae(E, (l) => y("uploadingChange", l), { immediate: !0 });
275
+ function R(l) {
276
+ return typeof l == "number" ? `${l}px` : l;
184
277
  }
185
- function R() {
186
- p("update:fileList", l.value.map((a) => ({ ...a })));
278
+ function V() {
279
+ y("update:fileList", i.value.map((l) => ({ ...l })));
187
280
  }
188
- function be(a) {
189
- return a < 1024 ? `${a}B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(2)}KB` : `${(a / (1024 * 1024)).toFixed(2)}MB`;
281
+ function Y(l) {
282
+ return l < 1024 ? `${l}B` : l < 1024 * 1024 ? `${(l / 1024).toFixed(2)}KB` : `${(l / (1024 * 1024)).toFixed(2)}MB`;
190
283
  }
191
- function ne(a) {
192
- return a.size <= m.value * 1024 * 1024 ? !1 : (L.error(`文件大小不能超过 ${m.value}MB,当前为 ${be(a.size)}`), !0);
284
+ function D(l) {
285
+ return l.size <= g.value * 1024 * 1024 ? !1 : (J.error(`文件大小不能超过 ${g.value}MB,当前为 ${Y(l.size)}`), !0);
193
286
  }
194
- function _e(a) {
195
- return a.type?.startsWith("image/") ?? /\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(a.url ?? "");
287
+ function Q(l) {
288
+ return l.type?.startsWith("image/") ?? /\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(l.url ?? "");
196
289
  }
197
- function Ce(a) {
198
- if (a.url) {
199
- if (_e(a)) {
200
- w.value = a.url, C.value = !0;
290
+ function v(l) {
291
+ if (l.url) {
292
+ if (Q(l)) {
293
+ h.value = l.url, b.value = !0;
201
294
  return;
202
295
  }
203
- window.open(a.url, "_blank", "noopener,noreferrer");
296
+ window.open(l.url, "_blank", "noopener,noreferrer");
204
297
  }
205
298
  }
206
- function ke(a) {
207
- C.value = a;
299
+ function O(l) {
300
+ b.value = l;
208
301
  }
209
- function le(a, v, P) {
210
- a.status = "done", a.percent = 100, v?.name && (a.name = v.name), v?.url && (a.url = v.url), R(), P(v), p("uploadSuccess");
302
+ function j(l, _, M) {
303
+ l.status = "done", l.percent = 100, _?.name && (l.name = _.name), _?.url && (l.url = _.url), V(), M(_), y("uploadSuccess");
211
304
  }
212
- function X(a, v, P) {
213
- a.status = "error", R(), P(v);
305
+ function Z(l, _, M) {
306
+ l.status = "error", V(), M(_);
214
307
  }
215
- function we(a, v, P, Q) {
216
- const j = l.value.find((x) => x.uid === v);
217
- if (!j) return;
218
- if (j.status = "uploading", j.percent = 0, R(), !n.customRequest) {
219
- const x = new Error("未配置 customRequest");
220
- L.error(x.message), X(j, x, Q);
308
+ function Te(l, _, M, le) {
309
+ const K = i.value.find((z) => z.uid === _);
310
+ if (!K) return;
311
+ if (K.status = "uploading", K.percent = 0, V(), !r.customRequest) {
312
+ const z = new Error("未配置 customRequest");
313
+ J.error(z.message), Z(K, z, le);
221
314
  return;
222
315
  }
223
- let G = !1;
224
- const Z = {
225
- file: a,
226
- onError: (x) => {
227
- G || (G = !0, X(j, x, Q));
316
+ let ee = !1;
317
+ const ue = {
318
+ file: l,
319
+ onError: (z) => {
320
+ ee || (ee = !0, Z(K, z, le));
228
321
  },
229
- onProgress: (x) => {
230
- G || (j.percent = Math.min(100, Math.max(0, x)), R());
322
+ onProgress: (z) => {
323
+ ee || (K.percent = Math.min(100, Math.max(0, z)), V());
231
324
  },
232
- onSuccess: (x) => {
233
- G || (G = !0, le(j, x, P));
325
+ onSuccess: (z) => {
326
+ ee || (ee = !0, j(K, z, M));
234
327
  },
235
- uid: v
328
+ uid: _
236
329
  };
237
330
  try {
238
- Promise.resolve(n.customRequest(Z)).catch((x) => {
239
- Z.onError(x instanceof Error ? x : new Error("上传失败"));
331
+ Promise.resolve(r.customRequest(ue)).catch((z) => {
332
+ ue.onError(z instanceof Error ? z : new Error("上传失败"));
240
333
  });
241
- } catch (x) {
242
- Z.onError(x instanceof Error ? x : new Error("上传失败"));
334
+ } catch (z) {
335
+ ue.onError(z instanceof Error ? z : new Error("上传失败"));
243
336
  }
244
337
  }
245
- const $e = (a) => ne(a) || g.value ? !1 : n.customRequest ? !0 : (L.error("未配置 customRequest"), !1);
246
- function Te(a) {
247
- const v = a.file instanceof File ? a.file : void 0;
248
- if (!v || ne(v)) {
249
- a.onError?.(new Error("文件大小超过限制"));
338
+ const Se = (l) => D(l) || $.value ? !1 : r.customRequest ? !0 : (J.error("未配置 customRequest"), !1);
339
+ function Be(l) {
340
+ const _ = l.file instanceof File ? l.file : void 0;
341
+ if (!_ || D(_)) {
342
+ l.onError?.(new Error("文件大小超过限制"));
250
343
  return;
251
344
  }
252
- const P = v.uid ?? String(Date.now());
253
- we(v, P, a.onSuccess ?? (() => {
254
- }), a.onError ?? (() => {
345
+ const M = _.uid ?? String(Date.now());
346
+ Te(_, M, l.onSuccess ?? (() => {
347
+ }), l.onError ?? (() => {
255
348
  }));
256
349
  }
257
- function Se(a) {
258
- if (l.value = a.fileList.map((P) => ({ ...P })), R(), !g.value) return;
259
- const v = l.value.at(-1);
260
- v?.originFileObj instanceof File && p("fileSelect", { file: v.originFileObj, uid: v.uid });
350
+ function Fe(l) {
351
+ if (i.value = l.fileList.map((M) => ({ ...M })), V(), !$.value) return;
352
+ const _ = i.value.at(-1);
353
+ _?.originFileObj instanceof File && y("fileSelect", { file: _.originFileObj, uid: _.uid });
261
354
  }
262
- function Ve(a) {
263
- p("fileRemoved", a);
355
+ function Ve(l) {
356
+ y("fileRemoved", l);
264
357
  }
265
- function Fe(a, v) {
266
- const P = l.value.find((Q) => Q.uid === a);
267
- P && le(P, v, () => {
358
+ function Oe(l, _) {
359
+ const M = i.value.find((le) => le.uid === l);
360
+ M && j(M, _, () => {
268
361
  });
269
362
  }
270
- function Be(a) {
271
- const v = l.value.find((P) => P.uid === a);
272
- v && X(v, new Error("上传失败"), () => {
363
+ function Pe(l) {
364
+ const _ = i.value.find((M) => M.uid === l);
365
+ _ && Z(_, new Error("上传失败"), () => {
273
366
  });
274
367
  }
275
- function xe() {
276
- return l.value.flatMap((a) => a.originFileObj instanceof File ? [a.originFileObj] : []);
277
- }
278
- return e({ addError: Be, addResult: Fe, getFiles: xe }), (a, v) => (i(), T("div", Ct, [
279
- !y.value || l.value.length > 0 ? (i(), k(h(je), E({ key: 0 }, s.accept ? { accept: s.accept } : {}, {
280
- "before-upload": $e,
281
- "custom-request": Te,
282
- "file-list": l.value,
283
- "max-count": b.value,
284
- multiple: r.value,
285
- "show-upload-list": { showRemoveIcon: !y.value },
368
+ function Ee() {
369
+ return i.value.flatMap((l) => l.originFileObj instanceof File ? [l.originFileObj] : []);
370
+ }
371
+ return t({ addError: Pe, addResult: Oe, getFiles: Ee }), (l, _) => (n(), B("div", Ft, [
372
+ !f.value || i.value.length > 0 ? (n(), k(m(Ue), A({ key: 0 }, a.accept ? { accept: a.accept } : {}, {
373
+ "before-upload": Se,
374
+ "custom-request": Be,
375
+ "file-list": i.value,
376
+ "max-count": C.value,
377
+ multiple: u.value,
378
+ "show-upload-list": { showRemoveIcon: !f.value },
286
379
  "list-type": "picture-card",
287
- onChange: Se,
288
- onPreview: Ce,
380
+ onChange: Fe,
381
+ onPreview: v,
289
382
  onRemove: Ve
290
383
  }), {
291
- default: f(() => [
292
- !y.value && l.value.length < b.value ? (i(), T("div", {
384
+ default: p(() => [
385
+ !f.value && i.value.length < C.value ? (n(), B("div", {
293
386
  key: 0,
294
387
  class: "yee-file-upload__trigger",
295
- style: K(u.value)
388
+ style: oe(d.value)
296
389
  }, [
297
- v[0] || (v[0] = $("span", {
390
+ _[0] || (_[0] = w("span", {
298
391
  class: "yee-file-upload__trigger-sign",
299
392
  "aria-hidden": "true"
300
393
  }, "+", -1)),
301
- $("span", null, F(o.value), 1)
302
- ], 4)) : S("", !0)
394
+ w("span", null, P(o.value), 1)
395
+ ], 4)) : T("", !0)
303
396
  ]),
304
397
  _: 1
305
- }, 16, ["file-list", "max-count", "multiple", "show-upload-list"])) : (i(), T("span", kt, "暂无文件")),
306
- w.value ? (i(), k(h(Le), {
398
+ }, 16, ["file-list", "max-count", "multiple", "show-upload-list"])) : (n(), B("span", Vt, "暂无文件")),
399
+ h.value ? (n(), k(m(De), {
307
400
  key: 2,
308
401
  class: "yee-file-upload__preview",
309
- preview: { visible: C.value, onVisibleChange: ke },
310
- src: w.value
311
- }, null, 8, ["preview", "src"])) : S("", !0)
402
+ preview: { visible: b.value, onVisibleChange: O },
403
+ src: h.value
404
+ }, null, 8, ["preview", "src"])) : T("", !0)
312
405
  ]));
313
406
  }
314
- }), so = /* @__PURE__ */ N(wt, [["__scopeId", "data-v-9d1ac9cf"]]), $t = { class: "yee-form__fields" }, Tt = { class: "yee-form__label" }, St = { class: "yee-form__actions" }, Vt = /* @__PURE__ */ A({
407
+ }), Co = /* @__PURE__ */ U(Ot, [["__scopeId", "data-v-9d1ac9cf"]]), Pt = { class: "yee-form__fields" }, Et = { class: "yee-form__label" }, zt = { class: "yee-form__actions" }, Rt = /* @__PURE__ */ L({
315
408
  name: "YeeForm",
316
409
  __name: "YeeForm",
317
410
  props: {
@@ -320,196 +413,196 @@ const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions_
320
413
  onSubmit: { type: Function },
321
414
  options: {}
322
415
  },
323
- setup(s) {
324
- const e = s, t = De.RangePicker, n = D(e.options.collapsed ?? !0);
325
- e.api.configure(e.options);
326
- const p = c(() => e.api.schema.value.filter((m) => !m.hide));
327
- function l(m) {
328
- return e.api.getFieldValue(m.fieldName);
329
- }
330
- function C(m) {
331
- const r = l(m);
416
+ setup(a) {
417
+ const t = a, e = Ge.RangePicker, r = N(t.options.collapsed ?? !0);
418
+ t.api.configure(t.options);
419
+ const y = s(() => t.api.schema.value.filter((g) => !g.hide));
420
+ function i(g) {
421
+ return t.api.getFieldValue(g.fieldName);
422
+ }
423
+ function b(g) {
424
+ const u = i(g);
332
425
  return {
333
- ...m.componentProps,
334
- ...r === void 0 ? {} : { value: r }
426
+ ...g.componentProps,
427
+ ...u === void 0 ? {} : { value: u }
335
428
  };
336
429
  }
337
- function w(m, r) {
338
- e.api.setFieldValue(m.fieldName, r), e.options.submitOnChange && V();
430
+ function h(g, u) {
431
+ t.api.setFieldValue(g.fieldName, u), t.options.submitOnChange && S();
339
432
  }
340
- async function B() {
341
- e.api.resetForm(), await e.onReset?.();
433
+ async function F() {
434
+ t.api.resetForm(), await t.onReset?.();
342
435
  }
343
- async function V() {
344
- await e.onSubmit?.(e.api.getValues());
436
+ async function S() {
437
+ await t.onSubmit?.(t.api.getValues());
345
438
  }
346
- function g(m) {
347
- m.key === "Enter" && e.options.submitOnEnter && (m.preventDefault(), V());
439
+ function $(g) {
440
+ g.key === "Enter" && t.options.submitOnEnter && (g.preventDefault(), S());
348
441
  }
349
- function b() {
350
- n.value = !n.value, e.options.handleCollapsedChange?.(n.value);
442
+ function C() {
443
+ r.value = !r.value, t.options.handleCollapsedChange?.(r.value);
351
444
  }
352
- return (m, r) => (i(), T("form", {
445
+ return (g, u) => (n(), B("form", {
353
446
  class: "yee-form",
354
- onKeydown: g,
355
- onSubmit: Re(V, ["prevent"])
447
+ onKeydown: $,
448
+ onSubmit: Ae(S, ["prevent"])
356
449
  }, [
357
- $("div", $t, [
358
- (i(!0), T(fe, null, oe(p.value, (y) => (i(), T("label", {
359
- key: y.fieldName,
450
+ w("div", Pt, [
451
+ (n(!0), B(ge, null, ve(y.value, (f) => (n(), B("label", {
452
+ key: f.fieldName,
360
453
  class: "yee-form__field"
361
454
  }, [
362
- $("span", Tt, F(y.label), 1),
363
- y.component === "Input" ? (i(), k(h(Ge), E({
455
+ w("span", Et, P(f.label), 1),
456
+ f.component === "Input" ? (n(), k(m(qe), A({
364
457
  key: 0,
365
458
  ref_for: !0
366
- }, C(y), {
367
- "onUpdate:value": (o) => w(y, o)
368
- }), null, 16, ["onUpdate:value"])) : y.component === "Select" ? (i(), k(h(J), E({
459
+ }, b(f), {
460
+ "onUpdate:value": (o) => h(f, o)
461
+ }), null, 16, ["onUpdate:value"])) : f.component === "Select" ? (n(), k(m(ne), A({
369
462
  key: 1,
370
463
  ref_for: !0
371
- }, C(y), {
372
- "onUpdate:value": (o) => w(y, o)
373
- }), null, 16, ["onUpdate:value"])) : (i(), k(h(t), E({
464
+ }, b(f), {
465
+ "onUpdate:value": (o) => h(f, o)
466
+ }), null, 16, ["onUpdate:value"])) : (n(), k(m(e), A({
374
467
  key: 2,
375
468
  ref_for: !0
376
- }, C(y), {
377
- "onUpdate:value": (o) => w(y, o)
469
+ }, b(f), {
470
+ "onUpdate:value": (o) => h(f, o)
378
471
  }), null, 16, ["onUpdate:value"]))
379
472
  ]))), 128))
380
473
  ]),
381
- $("div", St, [
382
- q(h(U), {
474
+ w("div", zt, [
475
+ H(m(I), {
383
476
  "html-type": "button",
384
- onClick: B
477
+ onClick: F
385
478
  }, {
386
- default: f(() => [...r[0] || (r[0] = [
387
- z(" 重置 ", -1)
479
+ default: p(() => [...u[0] || (u[0] = [
480
+ W(" 重置 ", -1)
388
481
  ])]),
389
482
  _: 1
390
483
  }),
391
- q(h(U), {
484
+ H(m(I), {
392
485
  type: "primary",
393
486
  "html-type": "submit"
394
487
  }, {
395
- default: f(() => [...r[1] || (r[1] = [
396
- z(" 查询 ", -1)
488
+ default: p(() => [...u[1] || (u[1] = [
489
+ W(" 查询 ", -1)
397
490
  ])]),
398
491
  _: 1
399
492
  }),
400
- s.options.showCollapseButton ? (i(), k(h(U), {
493
+ a.options.showCollapseButton ? (n(), k(m(I), {
401
494
  key: 0,
402
495
  type: "link",
403
496
  "html-type": "button",
404
- onClick: b
497
+ onClick: C
405
498
  }, {
406
- default: f(() => [
407
- z(F(n.value ? "展开" : "收起"), 1)
499
+ default: p(() => [
500
+ W(P(r.value ? "展开" : "收起"), 1)
408
501
  ]),
409
502
  _: 1
410
- })) : S("", !0)
503
+ })) : T("", !0)
411
504
  ])
412
505
  ], 32));
413
506
  }
414
- }), Ft = /* @__PURE__ */ N(Vt, [["__scopeId", "data-v-12e77340"]]);
415
- class Bt {
416
- schema = D([]);
507
+ }), Mt = /* @__PURE__ */ U(Rt, [["__scopeId", "data-v-12e77340"]]);
508
+ class Yt {
509
+ schema = N([]);
417
510
  initialValues = {};
418
- values = ce({});
419
- configure(e) {
420
- this.schema.value = e.schema.map((t) => ({ ...t })), this.initialValues = { ...e.initialValues }, this.resetForm();
511
+ values = he({});
512
+ configure(t) {
513
+ this.schema.value = t.schema.map((e) => ({ ...e })), this.initialValues = { ...t.initialValues }, this.resetForm();
421
514
  }
422
- getFieldValue(e) {
423
- return this.values[e];
515
+ getFieldValue(t) {
516
+ return this.values[t];
424
517
  }
425
518
  getValues() {
426
519
  return { ...this.values };
427
520
  }
428
521
  resetForm() {
429
- for (const e of Object.keys(this.values))
430
- delete this.values[e];
522
+ for (const t of Object.keys(this.values))
523
+ delete this.values[t];
431
524
  Object.assign(this.values, this.initialValues);
432
525
  }
433
- setFieldValue(e, t) {
434
- this.values[e] = t;
526
+ setFieldValue(t, e) {
527
+ this.values[t] = e;
435
528
  }
436
- setValues(e) {
437
- Object.assign(this.values, e);
529
+ setValues(t) {
530
+ Object.assign(this.values, t);
438
531
  }
439
- updateSchema(e) {
440
- const t = new Map(e.map((n) => [n.fieldName, n]));
441
- this.schema.value = this.schema.value.map((n) => ({
442
- ...n,
443
- ...t.get(n.fieldName)
532
+ updateSchema(t) {
533
+ const e = new Map(t.map((r) => [r.fieldName, r]));
534
+ this.schema.value = this.schema.value.map((r) => ({
535
+ ...r,
536
+ ...e.get(r.fieldName)
444
537
  }));
445
538
  }
446
539
  }
447
- class xt {
448
- formApi = new Bt();
540
+ class At {
541
+ formApi = new Yt();
449
542
  searchFormVisible;
450
543
  state;
451
544
  grid;
452
- constructor(e) {
453
- this.state = D(e), this.searchFormVisible = D(e.showSearchForm ?? !0);
545
+ constructor(t) {
546
+ this.state = N(t), this.searchFormVisible = N(t.showSearchForm ?? !0);
454
547
  }
455
- mount(e) {
456
- this.grid = e;
548
+ mount(t) {
549
+ this.grid = t;
457
550
  }
458
- query = async (e) => (e && this.formApi.setValues(e), this.grid?.commitProxy("query"));
459
- reload = async (e) => (e && this.formApi.setValues(e), this.grid?.commitProxy("reload"));
460
- setGridOptions(e) {
551
+ query = async (t) => (t && this.formApi.setValues(t), this.grid?.commitProxy("query"));
552
+ reload = async (t) => (t && this.formApi.setValues(t), this.grid?.commitProxy("reload"));
553
+ setGridOptions(t) {
461
554
  this.setState({
462
555
  gridOptions: {
463
556
  ...this.state.value.gridOptions,
464
- ...e
557
+ ...t
465
558
  }
466
559
  });
467
560
  }
468
- setLoading(e) {
469
- this.setGridOptions({ loading: e });
561
+ setLoading(t) {
562
+ this.setGridOptions({ loading: t });
470
563
  }
471
- setState(e) {
564
+ setState(t) {
472
565
  this.state.value = {
473
566
  ...this.state.value,
474
- ...e
567
+ ...t
475
568
  };
476
569
  }
477
- toggleSearchForm(e) {
478
- return this.searchFormVisible.value = e ?? !this.searchFormVisible.value, this.searchFormVisible.value;
570
+ toggleSearchForm(t) {
571
+ return this.searchFormVisible.value = t ?? !this.searchFormVisible.value, this.searchFormVisible.value;
479
572
  }
480
573
  unmount() {
481
574
  this.grid = void 0;
482
575
  }
483
576
  }
484
- let re = !1;
485
- function ge() {
486
- if (re) return;
577
+ let ye = !1;
578
+ function $e() {
579
+ if (ye) return;
487
580
  [
488
- Je,
489
- Xe,
490
- Ze,
491
- he,
492
- et,
493
- tt,
494
- ot,
581
+ lt,
495
582
  at,
496
583
  st,
584
+ xe,
497
585
  nt,
498
- lt,
499
586
  it,
500
587
  rt,
501
588
  ut,
589
+ dt,
502
590
  ct,
503
- dt
504
- ].forEach((e) => ye.component(e)), re = !0;
591
+ pt,
592
+ ft,
593
+ vt,
594
+ mt,
595
+ yt,
596
+ ht
597
+ ].forEach((t) => we.component(t)), ye = !0;
505
598
  }
506
- const Pt = { class: "yee-grid" }, Ot = {
599
+ const It = { class: "yee-grid" }, Wt = {
507
600
  key: 1,
508
601
  class: "yee-grid__separator"
509
- }, Rt = {
602
+ }, Lt = {
510
603
  key: 0,
511
604
  class: "yee-grid__title"
512
- }, Yt = /* @__PURE__ */ A({
605
+ }, jt = /* @__PURE__ */ L({
513
606
  name: "YeeGrid",
514
607
  __name: "YeeGrid",
515
608
  props: {
@@ -517,17 +610,17 @@ const Pt = { class: "yee-grid" }, Ot = {
517
610
  tableTitle: {},
518
611
  tableTitleHelp: {}
519
612
  },
520
- setup(s) {
521
- const e = s, t = ae(), n = Ye("gridRef"), p = ue(se);
522
- ge();
523
- const l = c(() => e.api.state.value), C = c(() => l.value.formOptions), w = c(() => !!(e.tableTitle || t["table-title"] || t["toolbar-actions"] || t["toolbar-tools"])), B = c(() => Object.keys(t).filter((o) => ![
613
+ setup(a) {
614
+ const t = a, e = ie(), r = be("gridRef"), y = pe(re);
615
+ $e();
616
+ const i = s(() => t.api.state.value), b = s(() => i.value.formOptions), h = s(() => !!(t.tableTitle || e["table-title"] || e["toolbar-actions"] || e["toolbar-tools"])), F = s(() => Object.keys(e).filter((o) => ![
524
617
  "empty",
525
618
  "loading",
526
619
  "table-title",
527
620
  "toolbar-actions",
528
621
  "toolbar-tools"
529
- ].includes(o))), V = c(() => !!l.value.gridOptions.toolbarConfig?.search), g = c(() => {
530
- const o = l.value.gridOptions, d = o.proxyConfig, u = d?.ajax?.query, O = o.toolbarConfig, Y = o.pagerConfig;
622
+ ].includes(o))), S = s(() => !!i.value.gridOptions.toolbarConfig?.search), $ = s(() => {
623
+ const o = i.value.gridOptions, c = o.proxyConfig, d = c?.ajax?.query, E = o.toolbarConfig, R = o.pagerConfig;
531
624
  return {
532
625
  align: "left",
533
626
  border: "inner",
@@ -535,299 +628,425 @@ const Pt = { class: "yee-grid" }, Ot = {
535
628
  showOverflow: "tooltip",
536
629
  size: "medium",
537
630
  ...o,
538
- ...Y ? {
631
+ ...R ? {
539
632
  pagerConfig: {
540
633
  pageSize: 20,
541
634
  pageSizes: [10, 20, 30, 50, 100, 200],
542
635
  layouts: ["Total", "Sizes", "Home", "PrevPage", "Number", "NextPage", "End"],
543
- ...Y,
636
+ ...R,
544
637
  slots: {
545
638
  sizes: "pagerSizes",
546
- ...Y.slots
639
+ ...R.slots
547
640
  }
548
641
  }
549
642
  } : {},
550
- ...d ? {
643
+ ...c ? {
551
644
  proxyConfig: {
552
645
  autoLoad: !0,
553
646
  showResponseMsg: !1,
554
- ...d,
647
+ ...c,
555
648
  response: {
556
649
  list: "items",
557
650
  result: "items",
558
651
  total: "total",
559
- ...d.response
652
+ ...c.response
560
653
  },
561
- ...d.ajax ? {
654
+ ...c.ajax ? {
562
655
  ajax: {
563
- ...d.ajax,
564
- ...u ? {
565
- query: (R) => u(R, e.api.formApi.getValues())
656
+ ...c.ajax,
657
+ ...d ? {
658
+ query: (V) => d(V, t.api.formApi.getValues())
566
659
  } : {}
567
660
  }
568
661
  } : {}
569
662
  }
570
663
  } : {},
571
- ...O || w.value ? {
664
+ ...E || h.value ? {
572
665
  toolbarConfig: {
573
666
  custom: !0,
574
667
  refresh: !0,
575
668
  zoom: !0,
576
- ...O,
669
+ ...E,
577
670
  slots: {
578
- ...e.tableTitle || t["table-title"] || t["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
579
- ...t["toolbar-tools"] || O?.search ? { tools: "toolbarTools" } : {}
671
+ ...t.tableTitle || e["table-title"] || e["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
672
+ ...e["toolbar-tools"] || E?.search ? { tools: "toolbarTools" } : {}
580
673
  }
581
674
  }
582
675
  } : {}
583
676
  };
584
- }), b = c(() => l.value.gridEvents ?? {});
585
- ee(
586
- () => p?.value.mode ?? "light",
587
- (o) => ye.setTheme(o),
677
+ }), C = s(() => i.value.gridEvents ?? {});
678
+ ae(
679
+ () => y?.value.mode ?? "light",
680
+ (o) => we.setTheme(o),
588
681
  { immediate: !0 }
589
682
  );
590
- async function m() {
591
- await e.api.reload();
683
+ async function g() {
684
+ await t.api.reload();
592
685
  }
593
- async function r() {
594
- await e.api.reload();
686
+ async function u() {
687
+ await t.api.reload();
595
688
  }
596
- function y(o, d) {
597
- typeof d != "number" && typeof d != "string" || o.setPageSizeByEvent(new Event("change"), d);
689
+ function f(o, c) {
690
+ typeof c != "number" && typeof c != "string" || o.setPageSizeByEvent(new Event("change"), c);
598
691
  }
599
- return ze(() => {
600
- n.value && e.api.mount(n.value);
601
- }), Ee(() => e.api.unmount()), (o, d) => (i(), T("section", Pt, [
602
- C.value ? Ae((i(), k(Ft, {
692
+ return _e(() => {
693
+ r.value && t.api.mount(r.value);
694
+ }), Ie(() => t.api.unmount()), (o, c) => (n(), B("section", It, [
695
+ b.value ? We((n(), k(Mt, {
603
696
  key: 0,
604
- api: s.api.formApi,
605
- options: C.value,
606
- "on-reset": r,
607
- "on-submit": m
697
+ api: a.api.formApi,
698
+ options: b.value,
699
+ "on-reset": u,
700
+ "on-submit": g
608
701
  }, null, 8, ["api", "options"])), [
609
- [Me, s.api.searchFormVisible.value]
610
- ]) : S("", !0),
611
- C.value && l.value.separator !== !1 ? (i(), T("div", Ot)) : S("", !0),
612
- q(h(he), E({
702
+ [Le, a.api.searchFormVisible.value]
703
+ ]) : T("", !0),
704
+ b.value && i.value.separator !== !1 ? (n(), B("div", Wt)) : T("", !0),
705
+ H(m(xe), A({
613
706
  ref_key: "gridRef",
614
- ref: n,
707
+ ref: r,
615
708
  class: "yee-grid__table"
616
- }, g.value, Ie(b.value)), pe({
617
- toolbarActions: f((u) => [
618
- _(o.$slots, "table-title", {}, () => [
619
- s.tableTitle ? (i(), T("div", Rt, [
620
- z(F(s.tableTitle) + " ", 1),
621
- s.tableTitleHelp ? (i(), k(h(W), {
709
+ }, $.value, je(C.value)), se({
710
+ toolbarActions: p((d) => [
711
+ x(o.$slots, "table-title", {}, () => [
712
+ a.tableTitle ? (n(), B("div", Lt, [
713
+ W(P(a.tableTitle) + " ", 1),
714
+ a.tableTitleHelp ? (n(), k(m(X), {
622
715
  key: 0,
623
- title: s.tableTitleHelp
716
+ title: a.tableTitleHelp
624
717
  }, {
625
- default: f(() => [...d[1] || (d[1] = [
626
- $("span", {
718
+ default: p(() => [...c[1] || (c[1] = [
719
+ w("span", {
627
720
  class: "yee-grid__help",
628
721
  tabindex: "0"
629
722
  }, "?", -1)
630
723
  ])]),
631
724
  _: 1
632
- }, 8, ["title"])) : S("", !0)
633
- ])) : S("", !0)
725
+ }, 8, ["title"])) : T("", !0)
726
+ ])) : T("", !0)
634
727
  ], !0),
635
- _(o.$slots, "toolbar-actions", M(I(u)), void 0, !0)
728
+ x(o.$slots, "toolbar-actions", G(q(d)), void 0, !0)
636
729
  ]),
637
- toolbarTools: f((u) => [
638
- _(o.$slots, "toolbar-tools", M(I(u)), void 0, !0),
639
- V.value && C.value ? (i(), k(h(U), {
730
+ toolbarTools: p((d) => [
731
+ x(o.$slots, "toolbar-tools", G(q(d)), void 0, !0),
732
+ S.value && b.value ? (n(), k(m(I), {
640
733
  key: 0,
641
734
  size: "small",
642
- onClick: d[0] || (d[0] = (O) => s.api.toggleSearchForm())
735
+ onClick: c[0] || (c[0] = (E) => a.api.toggleSearchForm())
643
736
  }, {
644
- default: f(() => [
645
- z(F(s.api.searchFormVisible.value ? "隐藏查询" : "显示查询"), 1)
737
+ default: p(() => [
738
+ W(P(a.api.searchFormVisible.value ? "隐藏查询" : "显示查询"), 1)
646
739
  ]),
647
740
  _: 1
648
- })) : S("", !0)
741
+ })) : T("", !0)
649
742
  ]),
650
- pagerSizes: f(({ $pager: u, options: O, pageSize: Y }) => [
651
- q(h(J), {
743
+ pagerSizes: p(({ $pager: d, options: E, pageSize: R }) => [
744
+ H(m(ne), {
652
745
  class: "yee-grid__page-size",
653
- options: O,
654
- value: Y,
655
- onChange: (R) => y(u, R)
746
+ options: E,
747
+ value: R,
748
+ onChange: (V) => f(d, V)
656
749
  }, null, 8, ["options", "value", "onChange"])
657
750
  ]),
658
- empty: f(() => [
659
- _(o.$slots, "empty", {}, () => [
660
- d[2] || (d[2] = $("div", { class: "yee-grid__empty" }, "暂无数据", -1))
751
+ empty: p(() => [
752
+ x(o.$slots, "empty", {}, () => [
753
+ c[2] || (c[2] = w("div", { class: "yee-grid__empty" }, "暂无数据", -1))
661
754
  ], !0)
662
755
  ]),
663
756
  _: 2
664
757
  }, [
665
- oe(B.value, (u) => ({
666
- name: u,
667
- fn: f((O) => [
668
- _(o.$slots, u, M(I(O)), void 0, !0)
758
+ ve(F.value, (d) => ({
759
+ name: d,
760
+ fn: p((E) => [
761
+ x(o.$slots, d, G(q(E)), void 0, !0)
669
762
  ])
670
763
  }))
671
764
  ]), 1040)
672
765
  ]));
673
766
  }
674
- }), zt = /* @__PURE__ */ N(Yt, [["__scopeId", "data-v-dd189ec9"]]);
675
- function no(s) {
676
- ge();
677
- const e = new xt(s), t = zt;
678
- return [A({
767
+ }), Ht = /* @__PURE__ */ U(jt, [["__scopeId", "data-v-dd189ec9"]]);
768
+ function ko(a) {
769
+ $e();
770
+ const t = new At(a), e = Ht;
771
+ return [L({
679
772
  name: "YeeGrid",
680
773
  inheritAttrs: !1,
681
774
  props: {
682
775
  tableTitle: String,
683
776
  tableTitleHelp: String
684
777
  },
685
- setup(p, { attrs: l, slots: C }) {
686
- return de(() => e.unmount()), () => Ue(t, {
687
- ...l,
688
- api: e,
689
- ...p.tableTitle ? { tableTitle: p.tableTitle } : {},
690
- ...p.tableTitleHelp ? { tableTitleHelp: p.tableTitleHelp } : {}
691
- }, C);
692
- }
693
- }), e];
778
+ setup(y, { attrs: i, slots: b }) {
779
+ return fe(() => t.unmount()), () => Ce(e, {
780
+ ...i,
781
+ api: t,
782
+ ...y.tableTitle ? { tableTitle: y.tableTitle } : {},
783
+ ...y.tableTitleHelp ? { tableTitleHelp: y.tableTitleHelp } : {}
784
+ }, b);
785
+ }
786
+ }), t];
694
787
  }
695
- const Et = { class: "yee-modal__header" }, At = { class: "yee-modal__title" }, Mt = { class: "yee-modal__body" }, It = { class: "yee-modal__footer" }, Ut = { class: "yee-modal__body" }, Nt = { class: "yee-modal__footer" }, jt = /* @__PURE__ */ A({
788
+ const Nt = { class: "yee-modal__header" }, Ut = ["id"], Dt = { class: "yee-modal__title" }, Gt = {
789
+ key: 1,
790
+ class: "yee-modal__header-actions"
791
+ }, qt = { class: "yee-modal__body" }, Kt = { class: "yee-modal__footer" }, Qt = { class: "yee-modal__header" }, Jt = ["id"], Xt = { class: "yee-modal__title" }, Zt = { class: "yee-modal__header-actions" }, eo = { class: "yee-modal__body" }, to = { class: "yee-modal__footer" }, oo = /* @__PURE__ */ L({
696
792
  inheritAttrs: !1,
697
793
  name: "YeeModal",
698
794
  __name: "YeeModal",
699
- props: /* @__PURE__ */ te({
795
+ props: /* @__PURE__ */ ce({
700
796
  cancelButtonText: { default: "取消" },
701
797
  centered: { type: Boolean, default: !1 },
798
+ closable: { type: Boolean, default: !0 },
702
799
  confirmButtonLoading: { type: Boolean, default: !1 },
703
800
  confirmButtonText: { default: "确认" },
704
801
  destroyOnClose: { type: Boolean, default: !0 },
802
+ fullscreen: { type: Boolean, default: !1 },
803
+ fullscreenButton: { type: Boolean, default: !0 },
705
804
  keyboard: { type: Boolean, default: !1 },
706
805
  maskClosable: { type: Boolean, default: !1 },
707
806
  showCancelButton: { type: Boolean, default: !0 },
708
807
  showConfirmButton: { type: Boolean, default: !0 },
808
+ style: { type: [Boolean, null, String, Object, Array] },
709
809
  title: { default: "" },
710
810
  type: { default: "modal" },
711
- width: { default: 520 }
811
+ width: { default: 520 },
812
+ wrapProps: {}
712
813
  }, {
713
814
  open: { type: Boolean, default: !1 },
714
815
  openModifiers: {}
715
816
  }),
716
- emits: /* @__PURE__ */ te(["cancel", "close", "confirm"], ["update:open"]),
717
- setup(s, { emit: e }) {
718
- const t = s, n = e, p = me(s, "open"), l = ve(), C = c(() => t.type === "drawer");
719
- function w(g) {
720
- n("cancel", g), p.value = !1;
817
+ emits: /* @__PURE__ */ ce(["cancel", "close", "confirm", "update:fullscreen"], ["update:open"]),
818
+ setup(a, { emit: t }) {
819
+ const e = a, r = t, y = de(a, "open"), i = de(e, "fullscreen"), b = ke(), h = ie(), F = He(), S = s(() => e.type === "drawer"), $ = s(() => !S.value && i.value), C = s(() => !!(e.title || h.header)), g = s(() => C.value || e.closable), u = s(() => C.value || e.fullscreenButton || e.closable), f = s(() => $.value ? "退出全屏" : "进入全屏"), o = s(() => {
820
+ const O = Object.prototype.hasOwnProperty.call(e.wrapProps ?? {}, "aria-labelledby");
821
+ return {
822
+ ...e.wrapProps,
823
+ "aria-labelledby": O ? e.wrapProps?.["aria-labelledby"] : C.value ? F : void 0
824
+ };
825
+ }), c = s(() => {
826
+ if ($.value)
827
+ return {
828
+ height: "100%",
829
+ margin: 0,
830
+ maxWidth: "100vw",
831
+ paddingBottom: 0,
832
+ top: 0,
833
+ width: "100vw"
834
+ };
835
+ });
836
+ function d() {
837
+ const { style: O, ...j } = b;
838
+ return j;
721
839
  }
722
- function B(g) {
723
- n("confirm", g);
840
+ function E() {
841
+ return [b.style, e.style].filter(Boolean);
724
842
  }
725
- function V() {
726
- n("close");
727
- }
728
- return (g, b) => C.value ? (i(), k(h(He), E({ key: 0 }, h(l), {
729
- "destroy-on-close": t.destroyOnClose,
730
- keyboard: t.keyboard,
731
- "mask-closable": t.maskClosable,
732
- open: p.value,
733
- width: t.width,
734
- onAfterOpenChange: b[0] || (b[0] = (m) => !m && V()),
735
- onClose: w
736
- }), {
737
- title: f(() => [
738
- $("div", Et, [
739
- _(g.$slots, "header", {}, () => [
740
- $("span", At, F(t.title), 1)
741
- ], !0)
742
- ])
743
- ]),
744
- footer: f(() => [
745
- $("div", It, [
746
- _(g.$slots, "footer", {}, () => [
747
- t.showCancelButton ? (i(), k(h(U), {
843
+ function R() {
844
+ return [b.style, e.style, c.value].filter(Boolean);
845
+ }
846
+ const V = () => h.closeIcon?.() ?? b.closeIcon ?? Ce(ot);
847
+ function Y(O) {
848
+ r("cancel", O), y.value = !1;
849
+ }
850
+ function D(O) {
851
+ r("confirm", O);
852
+ }
853
+ function Q() {
854
+ r("close");
855
+ }
856
+ function v() {
857
+ i.value = !i.value;
858
+ }
859
+ return (O, j) => S.value ? (n(), k(m(Ke), A({ key: 0 }, d(), {
860
+ class: "yee-modal-drawer",
861
+ closable: !1,
862
+ "destroy-on-close": e.destroyOnClose,
863
+ keyboard: e.keyboard,
864
+ "mask-closable": e.maskClosable,
865
+ open: y.value,
866
+ style: E(),
867
+ width: e.width,
868
+ onAfterOpenChange: j[0] || (j[0] = (Z) => !Z && Q()),
869
+ onClose: Y
870
+ }), se({
871
+ footer: p(() => [
872
+ w("div", Kt, [
873
+ x(O.$slots, "footer", {}, () => [
874
+ e.showCancelButton ? (n(), k(m(I), {
748
875
  key: 0,
749
- onClick: w
876
+ onClick: Y
750
877
  }, {
751
- default: f(() => [
752
- z(F(t.cancelButtonText), 1)
878
+ default: p(() => [
879
+ W(P(e.cancelButtonText), 1)
753
880
  ]),
754
881
  _: 1
755
- })) : S("", !0),
756
- t.showConfirmButton ? (i(), k(h(U), {
882
+ })) : T("", !0),
883
+ e.showConfirmButton ? (n(), k(m(I), {
757
884
  key: 1,
758
- loading: t.confirmButtonLoading,
885
+ loading: e.confirmButtonLoading,
759
886
  type: "primary",
760
- onClick: B
887
+ onClick: D
761
888
  }, {
762
- default: f(() => [
763
- z(F(t.confirmButtonText), 1)
889
+ default: p(() => [
890
+ W(P(e.confirmButtonText), 1)
764
891
  ]),
765
892
  _: 1
766
- }, 8, ["loading"])) : S("", !0)
893
+ }, 8, ["loading"])) : T("", !0)
767
894
  ], !0)
768
895
  ])
769
896
  ]),
770
- default: f(() => [
771
- $("div", Mt, [
772
- _(g.$slots, "default", {}, void 0, !0)
897
+ default: p(() => [
898
+ w("div", qt, [
899
+ x(O.$slots, "default", {}, void 0, !0)
773
900
  ])
774
901
  ]),
775
- _: 3
776
- }, 16, ["destroy-on-close", "keyboard", "mask-closable", "open", "width"])) : (i(), k(h(qe), E({ key: 1 }, h(l), {
777
- centered: t.centered,
778
- "destroy-on-close": t.destroyOnClose,
779
- keyboard: t.keyboard,
780
- "mask-closable": t.maskClosable,
781
- open: p.value,
782
- title: t.title,
783
- width: t.width,
784
- onAfterClose: V,
785
- onCancel: w
786
- }), {
787
- footer: f(() => [
788
- $("div", Nt, [
789
- _(g.$slots, "footer", {}, () => [
790
- t.showCancelButton ? (i(), k(h(U), {
902
+ _: 2
903
+ }, [
904
+ g.value ? {
905
+ name: "title",
906
+ fn: p(() => [
907
+ w("div", Nt, [
908
+ C.value ? (n(), B("div", {
791
909
  key: 0,
792
- onClick: w
910
+ id: m(F),
911
+ class: "yee-modal__heading"
912
+ }, [
913
+ x(O.$slots, "header", {}, () => [
914
+ w("span", Dt, P(e.title), 1)
915
+ ], !0)
916
+ ], 8, Ut)) : T("", !0),
917
+ e.closable ? (n(), B("div", Gt, [
918
+ H(m(I), {
919
+ "aria-label": "关闭",
920
+ class: "yee-modal__header-action",
921
+ size: "small",
922
+ type: "text",
923
+ onClick: Y
924
+ }, {
925
+ default: p(() => [
926
+ H(V)
927
+ ]),
928
+ _: 1
929
+ })
930
+ ])) : T("", !0)
931
+ ])
932
+ ]),
933
+ key: "0"
934
+ } : void 0
935
+ ]), 1040, ["destroy-on-close", "keyboard", "mask-closable", "open", "style", "width"])) : (n(), k(m(Qe), A({ key: 1 }, d(), {
936
+ centered: $.value ? !1 : e.centered,
937
+ class: {
938
+ "yee-modal": !0,
939
+ "yee-modal--fullscreen": $.value
940
+ },
941
+ closable: !1,
942
+ "destroy-on-close": e.destroyOnClose,
943
+ keyboard: e.keyboard,
944
+ "mask-closable": e.maskClosable,
945
+ open: y.value,
946
+ style: R(),
947
+ width: $.value ? "100vw" : e.width,
948
+ "wrap-props": o.value,
949
+ onAfterClose: Q,
950
+ onCancel: Y
951
+ }), se({
952
+ footer: p(() => [
953
+ w("div", to, [
954
+ x(O.$slots, "footer", {}, () => [
955
+ e.showCancelButton ? (n(), k(m(I), {
956
+ key: 0,
957
+ onClick: Y
793
958
  }, {
794
- default: f(() => [
795
- z(F(t.cancelButtonText), 1)
959
+ default: p(() => [
960
+ W(P(e.cancelButtonText), 1)
796
961
  ]),
797
962
  _: 1
798
- })) : S("", !0),
799
- t.showConfirmButton ? (i(), k(h(U), {
963
+ })) : T("", !0),
964
+ e.showConfirmButton ? (n(), k(m(I), {
800
965
  key: 1,
801
- loading: t.confirmButtonLoading,
966
+ loading: e.confirmButtonLoading,
802
967
  type: "primary",
803
- onClick: B
968
+ onClick: D
804
969
  }, {
805
- default: f(() => [
806
- z(F(t.confirmButtonText), 1)
970
+ default: p(() => [
971
+ W(P(e.confirmButtonText), 1)
807
972
  ]),
808
973
  _: 1
809
- }, 8, ["loading"])) : S("", !0)
974
+ }, 8, ["loading"])) : T("", !0)
810
975
  ], !0)
811
976
  ])
812
977
  ]),
813
- default: f(() => [
814
- $("div", Ut, [
815
- _(g.$slots, "default", {}, void 0, !0)
978
+ default: p(() => [
979
+ w("div", eo, [
980
+ x(O.$slots, "default", {}, void 0, !0)
816
981
  ])
817
982
  ]),
818
- _: 3
819
- }, 16, ["centered", "destroy-on-close", "keyboard", "mask-closable", "open", "title", "width"]));
983
+ _: 2
984
+ }, [
985
+ u.value ? {
986
+ name: "title",
987
+ fn: p(() => [
988
+ w("div", Qt, [
989
+ C.value ? (n(), B("div", {
990
+ key: 0,
991
+ id: m(F),
992
+ class: "yee-modal__heading"
993
+ }, [
994
+ x(O.$slots, "header", {}, () => [
995
+ w("span", Xt, P(e.title), 1)
996
+ ], !0)
997
+ ], 8, Jt)) : T("", !0),
998
+ w("div", Zt, [
999
+ e.fullscreenButton ? (n(), k(m(X), {
1000
+ key: 0,
1001
+ title: f.value
1002
+ }, {
1003
+ default: p(() => [
1004
+ H(m(I), {
1005
+ "aria-label": f.value,
1006
+ "aria-pressed": $.value,
1007
+ class: "yee-modal__header-action",
1008
+ size: "small",
1009
+ type: "text",
1010
+ onClick: v
1011
+ }, {
1012
+ default: p(() => [
1013
+ $.value ? (n(), k(m(et), { key: 0 })) : (n(), k(m(tt), { key: 1 }))
1014
+ ]),
1015
+ _: 1
1016
+ }, 8, ["aria-label", "aria-pressed"])
1017
+ ]),
1018
+ _: 1
1019
+ }, 8, ["title"])) : T("", !0),
1020
+ e.closable ? (n(), k(m(I), {
1021
+ key: 1,
1022
+ "aria-label": "关闭",
1023
+ class: "yee-modal__header-action",
1024
+ size: "small",
1025
+ type: "text",
1026
+ onClick: Y
1027
+ }, {
1028
+ default: p(() => [
1029
+ H(V)
1030
+ ]),
1031
+ _: 1
1032
+ })) : T("", !0)
1033
+ ])
1034
+ ])
1035
+ ]),
1036
+ key: "0"
1037
+ } : void 0
1038
+ ]), 1040, ["centered", "class", "destroy-on-close", "keyboard", "mask-closable", "open", "style", "width", "wrap-props"]));
820
1039
  }
821
- }), lo = /* @__PURE__ */ N(jt, [["__scopeId", "data-v-45cda799"]]), Lt = { class: "yee-page__heading" }, Dt = {
1040
+ }), xo = /* @__PURE__ */ U(oo, [["__scopeId", "data-v-2419e7df"]]), lo = { class: "yee-page__heading" }, ao = {
822
1041
  key: 0,
823
1042
  class: "yee-page__title"
824
- }, Gt = {
1043
+ }, so = {
825
1044
  key: 0,
826
1045
  class: "yee-page__description"
827
- }, Ht = {
1046
+ }, no = {
828
1047
  key: 0,
829
1048
  class: "yee-page__extra"
830
- }, qt = /* @__PURE__ */ A({
1049
+ }, io = /* @__PURE__ */ L({
831
1050
  name: "YeePage",
832
1051
  __name: "YeePage",
833
1052
  props: {
@@ -839,48 +1058,48 @@ const Et = { class: "yee-modal__header" }, At = { class: "yee-modal__title" }, M
839
1058
  heightOffset: { default: 0 },
840
1059
  title: {}
841
1060
  },
842
- setup(s) {
843
- const e = s, t = ae(), n = c(() => !!(e.description || e.title || t.description || t.extra || t.title)), p = c(() => ({
844
- "--yee-page-height-offset": typeof e.heightOffset == "number" ? `${e.heightOffset}px` : e.heightOffset
1061
+ setup(a) {
1062
+ const t = a, e = ie(), r = s(() => !!(t.description || t.title || e.description || e.extra || e.title)), y = s(() => ({
1063
+ "--yee-page-height-offset": typeof t.heightOffset == "number" ? `${t.heightOffset}px` : t.heightOffset
845
1064
  }));
846
- return (l, C) => (i(), T("section", {
847
- class: H(["yee-page", { "yee-page--auto-height": s.autoContentHeight }]),
848
- style: K(p.value)
1065
+ return (i, b) => (n(), B("section", {
1066
+ class: te(["yee-page", { "yee-page--auto-height": a.autoContentHeight }]),
1067
+ style: oe(y.value)
849
1068
  }, [
850
- n.value ? (i(), T("header", {
1069
+ r.value ? (n(), B("header", {
851
1070
  key: 0,
852
- class: H(["yee-page__header", s.headerClass])
1071
+ class: te(["yee-page__header", a.headerClass])
853
1072
  }, [
854
- $("div", Lt, [
855
- _(l.$slots, "title", {}, () => [
856
- s.title ? (i(), T("h1", Dt, F(s.title), 1)) : S("", !0)
1073
+ w("div", lo, [
1074
+ x(i.$slots, "title", {}, () => [
1075
+ a.title ? (n(), B("h1", ao, P(a.title), 1)) : T("", !0)
857
1076
  ], !0),
858
- _(l.$slots, "description", {}, () => [
859
- s.description ? (i(), T("p", Gt, F(s.description), 1)) : S("", !0)
1077
+ x(i.$slots, "description", {}, () => [
1078
+ a.description ? (n(), B("p", so, P(a.description), 1)) : T("", !0)
860
1079
  ], !0)
861
1080
  ]),
862
- l.$slots.extra ? (i(), T("div", Ht, [
863
- _(l.$slots, "extra", {}, void 0, !0)
864
- ])) : S("", !0)
865
- ], 2)) : S("", !0),
866
- $("main", {
867
- class: H(["yee-page__content", s.contentClass])
1081
+ i.$slots.extra ? (n(), B("div", no, [
1082
+ x(i.$slots, "extra", {}, void 0, !0)
1083
+ ])) : T("", !0)
1084
+ ], 2)) : T("", !0),
1085
+ w("main", {
1086
+ class: te(["yee-page__content", a.contentClass])
868
1087
  }, [
869
- _(l.$slots, "default", {}, void 0, !0)
1088
+ x(i.$slots, "default", {}, void 0, !0)
870
1089
  ], 2),
871
- l.$slots.footer ? (i(), T("footer", {
1090
+ i.$slots.footer ? (n(), B("footer", {
872
1091
  key: 1,
873
- class: H(["yee-page__footer", s.footerClass])
1092
+ class: te(["yee-page__footer", a.footerClass])
874
1093
  }, [
875
- _(l.$slots, "footer", {}, void 0, !0)
876
- ], 2)) : S("", !0)
1094
+ x(i.$slots, "footer", {}, void 0, !0)
1095
+ ], 2)) : T("", !0)
877
1096
  ], 6));
878
1097
  }
879
- }), io = /* @__PURE__ */ N(qt, [["__scopeId", "data-v-23464940"]]), Kt = { class: "yee-select__option-label" }, Qt = /* @__PURE__ */ A({
1098
+ }), wo = /* @__PURE__ */ U(io, [["__scopeId", "data-v-23464940"]]), ro = { class: "yee-select__option-label" }, uo = /* @__PURE__ */ L({
880
1099
  inheritAttrs: !1,
881
1100
  name: "YeeSelect",
882
1101
  __name: "YeeSelect",
883
- props: /* @__PURE__ */ te({
1102
+ props: /* @__PURE__ */ ce({
884
1103
  fieldNames: {},
885
1104
  options: {}
886
1105
  }, {
@@ -888,106 +1107,106 @@ const Et = { class: "yee-modal__header" }, At = { class: "yee-modal__title" }, M
888
1107
  valueModifiers: {}
889
1108
  }),
890
1109
  emits: ["update:value"],
891
- setup(s) {
892
- const e = s, t = me(s, "value"), n = ve(), p = ae(), l = c(() => ({
893
- label: e.fieldNames?.label ?? "label",
894
- options: e.fieldNames?.options ?? "options",
895
- value: e.fieldNames?.value ?? "value"
896
- })), C = c(() => n.class), w = c(() => n.style), B = c(() => {
1110
+ setup(a) {
1111
+ const t = a, e = de(a, "value"), r = ke(), y = ie(), i = s(() => ({
1112
+ label: t.fieldNames?.label ?? "label",
1113
+ options: t.fieldNames?.options ?? "options",
1114
+ value: t.fieldNames?.value ?? "value"
1115
+ })), b = s(() => r.class), h = s(() => r.style), F = s(() => {
897
1116
  const o = {};
898
- for (const [d, u] of Object.entries(n))
899
- d !== "class" && d !== "style" && (o[d] = u);
1117
+ for (const [c, d] of Object.entries(r))
1118
+ c !== "class" && c !== "style" && (o[c] = d);
900
1119
  return o;
901
- }), V = c(() => !p.default && !p.option);
902
- function g(o) {
1120
+ }), S = s(() => !y.default && !y.option);
1121
+ function $(o) {
903
1122
  return typeof o == "number" || typeof o == "string" ? String(o) : "";
904
1123
  }
905
- function b(o, d) {
1124
+ function C(o, c) {
906
1125
  if (o)
907
- for (const u of o) {
908
- const O = u[l.value.options], Y = b(O, d);
909
- if (Y) return Y;
910
- const R = u[l.value.value];
911
- if (R === d || String(R) === String(d)) return u;
1126
+ for (const d of o) {
1127
+ const E = d[i.value.options], R = C(E, c);
1128
+ if (R) return R;
1129
+ const V = d[i.value.value];
1130
+ if (V === c || String(V) === String(c)) return d;
912
1131
  }
913
1132
  }
914
- function m(o) {
915
- return o ? g(o[l.value.label]) || g(o.title) || g(o[l.value.value]) : "";
1133
+ function g(o) {
1134
+ return o ? $(o[i.value.label]) || $(o.title) || $(o[i.value.value]) : "";
916
1135
  }
917
- const r = c(() => {
918
- const o = t.value;
1136
+ const u = s(() => {
1137
+ const o = e.value;
919
1138
  if (!(o == null || o === ""))
920
- return Array.isArray(o) ? o.map((d) => m(b(e.options, d)) || g(d)).filter(Boolean).join("、") || void 0 : m(b(e.options, o)) || g(o) || void 0;
1139
+ return Array.isArray(o) ? o.map((c) => g(C(t.options, c)) || $(c)).filter(Boolean).join("、") || void 0 : g(C(t.options, o)) || $(o) || void 0;
921
1140
  });
922
- function y(o) {
923
- return m(o);
924
- }
925
- return (o, d) => (i(), k(h(W), { title: r.value }, {
926
- default: f(() => [
927
- $("div", {
928
- class: H(["yee-select", C.value]),
929
- style: K(w.value)
1141
+ function f(o) {
1142
+ return g(o);
1143
+ }
1144
+ return (o, c) => (n(), k(m(X), { title: u.value }, {
1145
+ default: p(() => [
1146
+ w("div", {
1147
+ class: te(["yee-select", b.value]),
1148
+ style: oe(h.value)
930
1149
  }, [
931
- V.value ? (i(), k(h(J), E({
1150
+ S.value ? (n(), k(m(ne), A({
932
1151
  key: 0,
933
- value: t.value,
934
- "onUpdate:value": d[0] || (d[0] = (u) => t.value = u)
935
- }, B.value, {
936
- "field-names": l.value,
937
- options: s.options
1152
+ value: e.value,
1153
+ "onUpdate:value": c[0] || (c[0] = (d) => e.value = d)
1154
+ }, F.value, {
1155
+ "field-names": i.value,
1156
+ options: a.options
938
1157
  }), {
939
- option: f((u) => [
940
- q(h(W), {
941
- title: y(u),
1158
+ option: p((d) => [
1159
+ H(m(X), {
1160
+ title: f(d),
942
1161
  placement: "left"
943
1162
  }, {
944
- default: f(() => [
945
- $("span", Kt, F(y(u)), 1)
1163
+ default: p(() => [
1164
+ w("span", ro, P(f(d)), 1)
946
1165
  ]),
947
1166
  _: 2
948
1167
  }, 1032, ["title"])
949
1168
  ]),
950
1169
  _: 1
951
- }, 16, ["value", "field-names", "options"])) : (i(), k(h(J), E({
1170
+ }, 16, ["value", "field-names", "options"])) : (n(), k(m(ne), A({
952
1171
  key: 1,
953
- value: t.value,
954
- "onUpdate:value": d[1] || (d[1] = (u) => t.value = u)
955
- }, B.value, {
956
- "field-names": l.value,
957
- options: s.options
958
- }), pe({ _: 2 }, [
1172
+ value: e.value,
1173
+ "onUpdate:value": c[1] || (c[1] = (d) => e.value = d)
1174
+ }, F.value, {
1175
+ "field-names": i.value,
1176
+ options: a.options
1177
+ }), se({ _: 2 }, [
959
1178
  o.$slots.default ? {
960
1179
  name: "default",
961
- fn: f((u) => [
962
- _(o.$slots, "default", M(I(u)), void 0, !0)
1180
+ fn: p((d) => [
1181
+ x(o.$slots, "default", G(q(d)), void 0, !0)
963
1182
  ]),
964
1183
  key: "0"
965
1184
  } : void 0,
966
1185
  o.$slots.option ? {
967
1186
  name: "option",
968
- fn: f((u) => [
969
- _(o.$slots, "option", M(I(u)), void 0, !0)
1187
+ fn: p((d) => [
1188
+ x(o.$slots, "option", G(q(d)), void 0, !0)
970
1189
  ]),
971
1190
  key: "1"
972
1191
  } : void 0,
973
1192
  o.$slots.tagRender ? {
974
1193
  name: "tagRender",
975
- fn: f((u) => [
976
- _(o.$slots, "tagRender", M(I(u)), void 0, !0)
1194
+ fn: p((d) => [
1195
+ x(o.$slots, "tagRender", G(q(d)), void 0, !0)
977
1196
  ]),
978
1197
  key: "2"
979
1198
  } : void 0,
980
1199
  o.$slots.dropdownRender ? {
981
1200
  name: "dropdownRender",
982
- fn: f((u) => [
983
- _(o.$slots, "dropdownRender", M(I(u)), void 0, !0)
1201
+ fn: p((d) => [
1202
+ x(o.$slots, "dropdownRender", G(q(d)), void 0, !0)
984
1203
  ]),
985
1204
  key: "3"
986
1205
  } : void 0,
987
1206
  o.$slots.notFoundContent ? {
988
1207
  name: "notFoundContent",
989
- fn: f((u) => [
990
- _(o.$slots, "notFoundContent", M(I(u)), void 0, !0)
1208
+ fn: p((d) => [
1209
+ x(o.$slots, "notFoundContent", G(q(d)), void 0, !0)
991
1210
  ]),
992
1211
  key: "4"
993
1212
  } : void 0
@@ -997,23 +1216,24 @@ const Et = { class: "yee-modal__header" }, At = { class: "yee-modal__title" }, M
997
1216
  _: 3
998
1217
  }, 8, ["title"]));
999
1218
  }
1000
- }), ro = /* @__PURE__ */ N(Qt, [["__scopeId", "data-v-64282659"]]);
1219
+ }), $o = /* @__PURE__ */ U(uo, [["__scopeId", "data-v-64282659"]]);
1001
1220
  export {
1002
- oo as PlatformConfigProvider,
1003
- ao as YeeDescriptions,
1004
- so as YeeFileUpload,
1005
- Ft as YeeForm,
1006
- Bt as YeeFormApi,
1007
- xt as YeeGridApi,
1008
- lo as YeeModal,
1009
- io as YeePage,
1010
- ro as YeeSelect,
1011
- fo as darkThemeTokens,
1012
- po as lightThemeTokens,
1013
- se as platformThemeKey,
1014
- Ke as resolvePlatformTheme,
1015
- Qe as toAntDesignTheme,
1016
- We as toPlatformCssVariables,
1017
- to as usePlatformTheme,
1018
- no as useYeeGrid
1221
+ go as PlatformConfigProvider,
1222
+ bo as YeeDescriptions,
1223
+ _o as YeeEllipsisText,
1224
+ Co as YeeFileUpload,
1225
+ Mt as YeeForm,
1226
+ Yt as YeeFormApi,
1227
+ At as YeeGridApi,
1228
+ xo as YeeModal,
1229
+ wo as YeePage,
1230
+ $o as YeeSelect,
1231
+ Bo as darkThemeTokens,
1232
+ Fo as lightThemeTokens,
1233
+ re as platformThemeKey,
1234
+ Je as resolvePlatformTheme,
1235
+ Xe as toAntDesignTheme,
1236
+ Ze as toPlatformCssVariables,
1237
+ ho as usePlatformTheme,
1238
+ ko as useYeeGrid
1019
1239
  };