@yeepay/yee-boss-ui 0.1.3 → 0.1.5

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,43 +1,317 @@
1
- import { inject as I, defineComponent as P, computed as c, provide as K, openBlock as i, createBlock as b, unref as g, withCtx as v, createElementVNode as V, normalizeStyle as j, renderSlot as f, shallowRef as w, createElementBlock as d, withModifiers as Q, Fragment as J, renderList as E, toDisplayString as T, mergeProps as $, createVNode as N, createTextVNode as x, createCommentVNode as h, reactive as W, useSlots as U, useTemplateRef as X, watch as Z, onMounted as ee, onUnmounted as te, withDirectives as oe, vShow as ae, toHandlers as se, createSlots as ie, normalizeProps as R, guardReactiveProps as H, onBeforeUnmount as le, h as re, normalizeClass as S } from "vue";
2
- import { ConfigProvider as ne, DatePicker as ue, Input as ce, Select as me, Button as F, Tooltip as de } from "ant-design-vue";
3
- import { r as pe, t as fe, a as he } from "./tokens-Dj_CxJpe.js";
4
- import { d as rt, l as nt } from "./tokens-Dj_CxJpe.js";
5
- import { VxeTable as ge, VxeColumn as ve, VxeColgroup as ye, VxeGrid as D, VxeToolbar as be, VxeUI as M } from "vxe-table";
6
- import { VxeButton as Ve, VxeCheckbox as _e, VxeIcon as Te, VxeInput as Ce, VxeLoading as ke, VxeModal as xe, VxeNumberInput as Pe, VxePager as Se, VxeRadioGroup as $e, VxeSelect as Fe, VxeTooltip as we } from "vxe-pc-ui";
7
- const z = /* @__PURE__ */ Symbol("platform-theme");
8
- function tt() {
9
- const t = I(z);
10
- if (!t)
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)
11
11
  throw new Error("usePlatformTheme 必须在 PlatformConfigProvider 内使用。");
12
- return t;
12
+ return s;
13
13
  }
14
- const Oe = ["data-theme"], Ye = /* @__PURE__ */ P({
14
+ const ft = ["data-theme"], pt = /* @__PURE__ */ A({
15
15
  name: "PlatformConfigProvider",
16
16
  __name: "PlatformConfigProvider",
17
17
  props: {
18
18
  theme: { default: () => ({}) }
19
19
  },
20
- setup(t) {
21
- const e = t, o = c(() => pe(e.theme)), s = c(() => fe(o.value)), n = c(() => he(o.value));
22
- return K(z, o), (l, m) => (i(), b(g(ne), { theme: s.value }, {
23
- default: v(() => [
24
- V("div", {
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", {
25
25
  class: "yee-platform-theme",
26
- "data-theme": o.value.mode,
27
- style: j(n.value)
26
+ "data-theme": t.value.mode,
27
+ style: K(p.value)
28
28
  }, [
29
- f(l.$slots, "default", {}, void 0, !0)
30
- ], 12, Oe)
29
+ _(l.$slots, "default", {}, void 0, !0)
30
+ ], 12, ft)
31
31
  ]),
32
32
  _: 3
33
33
  }, 8, ["theme"]));
34
34
  }
35
- }), O = (t, e) => {
36
- const o = t.__vccOpts || t;
37
- for (const [s, n] of e)
38
- o[s] = n;
39
- return o;
40
- }, ot = /* @__PURE__ */ O(Ye, [["__scopeId", "data-v-36f21f18"]]), Ae = { class: "yee-form__fields" }, Ge = { class: "yee-form__label" }, Re = { class: "yee-form__actions" }, He = /* @__PURE__ */ P({
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;
43
+ try {
44
+ return await navigator.clipboard.writeText(s), !0;
45
+ } 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();
48
+ try {
49
+ return document.execCommand("copy");
50
+ } catch {
51
+ return !1;
52
+ } finally {
53
+ e.remove();
54
+ }
55
+ }
56
+ }
57
+ const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions__content-row" }, yt = { class: "yee-descriptions__value yee-descriptions__value--ellipsis" }, gt = {
58
+ key: 1,
59
+ class: "yee-descriptions__value"
60
+ }, bt = ["disabled", "onClick"], _t = /* @__PURE__ */ A({
61
+ name: "YeeDescriptions",
62
+ __name: "YeeDescriptions",
63
+ props: {
64
+ bordered: { type: Boolean },
65
+ colon: { type: Boolean },
66
+ column: {},
67
+ items: {},
68
+ layout: {},
69
+ size: {},
70
+ title: {}
71
+ },
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("没有可复制的内容");
81
+ return;
82
+ }
83
+ if (!await mt(r)) {
84
+ L.error("复制失败");
85
+ return;
86
+ }
87
+ w.add(m), L.success("已复制");
88
+ const y = setTimeout(() => {
89
+ w.delete(m), B.delete(y);
90
+ }, 1500);
91
+ B.add(y);
92
+ }
93
+ return de(() => {
94
+ B.forEach((b) => clearTimeout(b)), B.clear();
95
+ }), (b, m) => (i(), k(h(ie), E({
96
+ 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
108
+ }, {
109
+ default: f(() => [
110
+ $("div", vt, [
111
+ $("div", ht, [
112
+ r.ellipsis ? (i(), k(h(W), {
113
+ key: 0,
114
+ title: String(r.value ?? "")
115
+ }, {
116
+ default: f(() => [
117
+ $("span", yt, [
118
+ _(b.$slots, `content-${r.name ?? r.label}`, { item: r }, () => [
119
+ z(F(r.value), 1)
120
+ ], !0)
121
+ ])
122
+ ]),
123
+ _: 2
124
+ }, 1032, ["title"])) : (i(), T("span", gt, [
125
+ _(b.$slots, `content-${r.name ?? r.label}`, { item: r }, () => [
126
+ z(F(r.value), 1)
127
+ ], !0)
128
+ ])),
129
+ r.copyable ? (i(), T("button", {
130
+ key: 2,
131
+ class: "yee-descriptions__copy",
132
+ disabled: w.has(V(r, y)),
133
+ type: "button",
134
+ onClick: (o) => g(r, V(r, y))
135
+ }, F(w.has(V(r, y)) ? "已复制" : "复制"), 9, bt)) : S("", !0)
136
+ ]),
137
+ r.info ? (i(), T("span", {
138
+ key: 0,
139
+ class: "yee-descriptions__info",
140
+ style: K(r.infoStyle)
141
+ }, F(r.info), 5)) : S("", !0)
142
+ ])
143
+ ]),
144
+ _: 2
145
+ }, 1032, ["label", "span"]))), 128))
146
+ ]),
147
+ _: 3
148
+ }, 16, ["bordered", "colon", "column", "layout", "size"]));
149
+ }
150
+ }), ao = /* @__PURE__ */ N(_t, [["__scopeId", "data-v-2297b86c"]]), Ct = { class: "yee-file-upload" }, kt = {
151
+ key: 1,
152
+ class: "yee-file-upload__empty"
153
+ }, wt = /* @__PURE__ */ A({
154
+ name: "YeeFileUpload",
155
+ __name: "YeeFileUpload",
156
+ props: {
157
+ accept: {},
158
+ customRequest: { type: Function },
159
+ fileList: {},
160
+ height: {},
161
+ manual: { type: Boolean },
162
+ maxCount: {},
163
+ maxSize: {},
164
+ multiple: { type: Boolean },
165
+ readonly: { type: Boolean },
166
+ uploadText: {},
167
+ width: {}
168
+ },
169
+ 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 }));
179
+ },
180
+ { immediate: !0 }
181
+ ), ee(O, (a) => p("uploadingChange", a), { immediate: !0 });
182
+ function Y(a) {
183
+ return typeof a == "number" ? `${a}px` : a;
184
+ }
185
+ function R() {
186
+ p("update:fileList", l.value.map((a) => ({ ...a })));
187
+ }
188
+ function be(a) {
189
+ return a < 1024 ? `${a}B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(2)}KB` : `${(a / (1024 * 1024)).toFixed(2)}MB`;
190
+ }
191
+ function ne(a) {
192
+ return a.size <= m.value * 1024 * 1024 ? !1 : (L.error(`文件大小不能超过 ${m.value}MB,当前为 ${be(a.size)}`), !0);
193
+ }
194
+ function _e(a) {
195
+ return a.type?.startsWith("image/") ?? /\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(a.url ?? "");
196
+ }
197
+ function Ce(a) {
198
+ if (a.url) {
199
+ if (_e(a)) {
200
+ w.value = a.url, C.value = !0;
201
+ return;
202
+ }
203
+ window.open(a.url, "_blank", "noopener,noreferrer");
204
+ }
205
+ }
206
+ function ke(a) {
207
+ C.value = a;
208
+ }
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");
211
+ }
212
+ function X(a, v, P) {
213
+ a.status = "error", R(), P(v);
214
+ }
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);
221
+ return;
222
+ }
223
+ let G = !1;
224
+ const Z = {
225
+ file: a,
226
+ onError: (x) => {
227
+ G || (G = !0, X(j, x, Q));
228
+ },
229
+ onProgress: (x) => {
230
+ G || (j.percent = Math.min(100, Math.max(0, x)), R());
231
+ },
232
+ onSuccess: (x) => {
233
+ G || (G = !0, le(j, x, P));
234
+ },
235
+ uid: v
236
+ };
237
+ try {
238
+ Promise.resolve(n.customRequest(Z)).catch((x) => {
239
+ Z.onError(x instanceof Error ? x : new Error("上传失败"));
240
+ });
241
+ } catch (x) {
242
+ Z.onError(x instanceof Error ? x : new Error("上传失败"));
243
+ }
244
+ }
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("文件大小超过限制"));
250
+ return;
251
+ }
252
+ const P = v.uid ?? String(Date.now());
253
+ we(v, P, a.onSuccess ?? (() => {
254
+ }), a.onError ?? (() => {
255
+ }));
256
+ }
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 });
261
+ }
262
+ function Ve(a) {
263
+ p("fileRemoved", a);
264
+ }
265
+ function Fe(a, v) {
266
+ const P = l.value.find((Q) => Q.uid === a);
267
+ P && le(P, v, () => {
268
+ });
269
+ }
270
+ function Be(a) {
271
+ const v = l.value.find((P) => P.uid === a);
272
+ v && X(v, new Error("上传失败"), () => {
273
+ });
274
+ }
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 },
286
+ "list-type": "picture-card",
287
+ onChange: Se,
288
+ onPreview: Ce,
289
+ onRemove: Ve
290
+ }), {
291
+ default: f(() => [
292
+ !y.value && l.value.length < b.value ? (i(), T("div", {
293
+ key: 0,
294
+ class: "yee-file-upload__trigger",
295
+ style: K(u.value)
296
+ }, [
297
+ v[0] || (v[0] = $("span", {
298
+ class: "yee-file-upload__trigger-sign",
299
+ "aria-hidden": "true"
300
+ }, "+", -1)),
301
+ $("span", null, F(o.value), 1)
302
+ ], 4)) : S("", !0)
303
+ ]),
304
+ _: 1
305
+ }, 16, ["file-list", "max-count", "multiple", "show-upload-list"])) : (i(), T("span", kt, "暂无文件")),
306
+ w.value ? (i(), k(h(Le), {
307
+ key: 2,
308
+ class: "yee-file-upload__preview",
309
+ preview: { visible: C.value, onVisibleChange: ke },
310
+ src: w.value
311
+ }, null, 8, ["preview", "src"])) : S("", !0)
312
+ ]));
313
+ }
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({
41
315
  name: "YeeForm",
42
316
  __name: "YeeForm",
43
317
  props: {
@@ -46,104 +320,104 @@ const Oe = ["data-theme"], Ye = /* @__PURE__ */ P({
46
320
  onSubmit: { type: Function },
47
321
  options: {}
48
322
  },
49
- setup(t) {
50
- const e = t, o = ue.RangePicker, s = w(e.options.collapsed ?? !0);
323
+ setup(s) {
324
+ const e = s, t = De.RangePicker, n = D(e.options.collapsed ?? !0);
51
325
  e.api.configure(e.options);
52
- const n = c(() => e.api.schema.value.filter((u) => !u.hide));
53
- function l(u) {
54
- return e.api.getFieldValue(u.fieldName);
326
+ const p = c(() => e.api.schema.value.filter((m) => !m.hide));
327
+ function l(m) {
328
+ return e.api.getFieldValue(m.fieldName);
55
329
  }
56
- function m(u) {
57
- const p = l(u);
330
+ function C(m) {
331
+ const r = l(m);
58
332
  return {
59
- ...u.componentProps,
60
- ...p === void 0 ? {} : { value: p }
333
+ ...m.componentProps,
334
+ ...r === void 0 ? {} : { value: r }
61
335
  };
62
336
  }
63
- function C(u, p) {
64
- e.api.setFieldValue(u.fieldName, p), e.options.submitOnChange && k();
337
+ function w(m, r) {
338
+ e.api.setFieldValue(m.fieldName, r), e.options.submitOnChange && V();
65
339
  }
66
- async function Y() {
340
+ async function B() {
67
341
  e.api.resetForm(), await e.onReset?.();
68
342
  }
69
- async function k() {
343
+ async function V() {
70
344
  await e.onSubmit?.(e.api.getValues());
71
345
  }
72
- function A(u) {
73
- u.key === "Enter" && e.options.submitOnEnter && (u.preventDefault(), k());
346
+ function g(m) {
347
+ m.key === "Enter" && e.options.submitOnEnter && (m.preventDefault(), V());
74
348
  }
75
- function G() {
76
- s.value = !s.value, e.options.handleCollapsedChange?.(s.value);
349
+ function b() {
350
+ n.value = !n.value, e.options.handleCollapsedChange?.(n.value);
77
351
  }
78
- return (u, p) => (i(), d("form", {
352
+ return (m, r) => (i(), T("form", {
79
353
  class: "yee-form",
80
- onKeydown: A,
81
- onSubmit: Q(k, ["prevent"])
354
+ onKeydown: g,
355
+ onSubmit: Re(V, ["prevent"])
82
356
  }, [
83
- V("div", Ae, [
84
- (i(!0), d(J, null, E(n.value, (a) => (i(), d("label", {
85
- key: a.fieldName,
357
+ $("div", $t, [
358
+ (i(!0), T(fe, null, oe(p.value, (y) => (i(), T("label", {
359
+ key: y.fieldName,
86
360
  class: "yee-form__field"
87
361
  }, [
88
- V("span", Ge, T(a.label), 1),
89
- a.component === "Input" ? (i(), b(g(ce), $({
362
+ $("span", Tt, F(y.label), 1),
363
+ y.component === "Input" ? (i(), k(h(Ge), E({
90
364
  key: 0,
91
365
  ref_for: !0
92
- }, m(a), {
93
- "onUpdate:value": (r) => C(a, r)
94
- }), null, 16, ["onUpdate:value"])) : a.component === "Select" ? (i(), b(g(me), $({
366
+ }, C(y), {
367
+ "onUpdate:value": (o) => w(y, o)
368
+ }), null, 16, ["onUpdate:value"])) : y.component === "Select" ? (i(), k(h(J), E({
95
369
  key: 1,
96
370
  ref_for: !0
97
- }, m(a), {
98
- "onUpdate:value": (r) => C(a, r)
99
- }), null, 16, ["onUpdate:value"])) : (i(), b(g(o), $({
371
+ }, C(y), {
372
+ "onUpdate:value": (o) => w(y, o)
373
+ }), null, 16, ["onUpdate:value"])) : (i(), k(h(t), E({
100
374
  key: 2,
101
375
  ref_for: !0
102
- }, m(a), {
103
- "onUpdate:value": (r) => C(a, r)
376
+ }, C(y), {
377
+ "onUpdate:value": (o) => w(y, o)
104
378
  }), null, 16, ["onUpdate:value"]))
105
379
  ]))), 128))
106
380
  ]),
107
- V("div", Re, [
108
- N(g(F), {
381
+ $("div", St, [
382
+ q(h(U), {
109
383
  "html-type": "button",
110
- onClick: Y
384
+ onClick: B
111
385
  }, {
112
- default: v(() => [...p[0] || (p[0] = [
113
- x(" 重置 ", -1)
386
+ default: f(() => [...r[0] || (r[0] = [
387
+ z(" 重置 ", -1)
114
388
  ])]),
115
389
  _: 1
116
390
  }),
117
- N(g(F), {
391
+ q(h(U), {
118
392
  type: "primary",
119
393
  "html-type": "submit"
120
394
  }, {
121
- default: v(() => [...p[1] || (p[1] = [
122
- x(" 查询 ", -1)
395
+ default: f(() => [...r[1] || (r[1] = [
396
+ z(" 查询 ", -1)
123
397
  ])]),
124
398
  _: 1
125
399
  }),
126
- t.options.showCollapseButton ? (i(), b(g(F), {
400
+ s.options.showCollapseButton ? (i(), k(h(U), {
127
401
  key: 0,
128
402
  type: "link",
129
403
  "html-type": "button",
130
- onClick: G
404
+ onClick: b
131
405
  }, {
132
- default: v(() => [
133
- x(T(s.value ? "展开" : "收起"), 1)
406
+ default: f(() => [
407
+ z(F(n.value ? "展开" : "收起"), 1)
134
408
  ]),
135
409
  _: 1
136
- })) : h("", !0)
410
+ })) : S("", !0)
137
411
  ])
138
412
  ], 32));
139
413
  }
140
- }), Ne = /* @__PURE__ */ O(He, [["__scopeId", "data-v-12e77340"]]);
141
- class ze {
142
- schema = w([]);
414
+ }), Ft = /* @__PURE__ */ N(Vt, [["__scopeId", "data-v-12e77340"]]);
415
+ class Bt {
416
+ schema = D([]);
143
417
  initialValues = {};
144
- values = W({});
418
+ values = ce({});
145
419
  configure(e) {
146
- this.schema.value = e.schema.map((o) => ({ ...o })), this.initialValues = { ...e.initialValues }, this.resetForm();
420
+ this.schema.value = e.schema.map((t) => ({ ...t })), this.initialValues = { ...e.initialValues }, this.resetForm();
147
421
  }
148
422
  getFieldValue(e) {
149
423
  return this.values[e];
@@ -156,27 +430,27 @@ class ze {
156
430
  delete this.values[e];
157
431
  Object.assign(this.values, this.initialValues);
158
432
  }
159
- setFieldValue(e, o) {
160
- this.values[e] = o;
433
+ setFieldValue(e, t) {
434
+ this.values[e] = t;
161
435
  }
162
436
  setValues(e) {
163
437
  Object.assign(this.values, e);
164
438
  }
165
439
  updateSchema(e) {
166
- const o = new Map(e.map((s) => [s.fieldName, s]));
167
- this.schema.value = this.schema.value.map((s) => ({
168
- ...s,
169
- ...o.get(s.fieldName)
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)
170
444
  }));
171
445
  }
172
446
  }
173
- class Be {
174
- formApi = new ze();
447
+ class xt {
448
+ formApi = new Bt();
175
449
  searchFormVisible;
176
450
  state;
177
451
  grid;
178
452
  constructor(e) {
179
- this.state = w(e), this.searchFormVisible = w(e.showSearchForm ?? !0);
453
+ this.state = D(e), this.searchFormVisible = D(e.showSearchForm ?? !0);
180
454
  }
181
455
  mount(e) {
182
456
  this.grid = e;
@@ -207,35 +481,35 @@ class Be {
207
481
  this.grid = void 0;
208
482
  }
209
483
  }
210
- let B = !1;
211
- function q() {
212
- if (B) return;
484
+ let re = !1;
485
+ function ge() {
486
+ if (re) return;
213
487
  [
214
- ge,
215
- ve,
216
- ye,
217
- D,
218
- be,
219
- Ve,
220
- _e,
221
- Te,
222
- Ce,
223
- ke,
224
- xe,
225
- Pe,
226
- Se,
227
- $e,
228
- Fe,
229
- we
230
- ].forEach((e) => M.component(e)), B = !0;
488
+ Je,
489
+ Xe,
490
+ Ze,
491
+ he,
492
+ et,
493
+ tt,
494
+ ot,
495
+ at,
496
+ st,
497
+ nt,
498
+ lt,
499
+ it,
500
+ rt,
501
+ ut,
502
+ ct,
503
+ dt
504
+ ].forEach((e) => ye.component(e)), re = !0;
231
505
  }
232
- const Ie = { class: "yee-grid" }, je = {
506
+ const Pt = { class: "yee-grid" }, Ot = {
233
507
  key: 1,
234
508
  class: "yee-grid__separator"
235
- }, Ee = {
509
+ }, Rt = {
236
510
  key: 0,
237
511
  class: "yee-grid__title"
238
- }, Ue = /* @__PURE__ */ P({
512
+ }, Yt = /* @__PURE__ */ A({
239
513
  name: "YeeGrid",
240
514
  __name: "YeeGrid",
241
515
  props: {
@@ -243,176 +517,317 @@ const Ie = { class: "yee-grid" }, je = {
243
517
  tableTitle: {},
244
518
  tableTitleHelp: {}
245
519
  },
246
- setup(t) {
247
- const e = t, o = U(), s = X("gridRef"), n = I(z);
248
- q();
249
- const l = c(() => e.api.state.value), m = c(() => l.value.formOptions), C = c(() => !!(e.tableTitle || o["table-title"] || o["toolbar-actions"] || o["toolbar-tools"])), Y = c(() => Object.keys(o).filter((a) => ![
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) => ![
250
524
  "empty",
251
525
  "loading",
252
526
  "table-title",
253
527
  "toolbar-actions",
254
528
  "toolbar-tools"
255
- ].includes(a))), k = c(() => !!l.value.gridOptions.toolbarConfig?.search), A = c(() => {
256
- const a = l.value.gridOptions, r = a.proxyConfig, y = r?.ajax?.query, _ = a.toolbarConfig;
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;
257
531
  return {
258
532
  align: "left",
259
533
  border: "inner",
260
534
  minHeight: 180,
261
535
  showOverflow: "tooltip",
262
536
  size: "medium",
263
- ...a,
264
- ...a.pagerConfig ? {
537
+ ...o,
538
+ ...Y ? {
265
539
  pagerConfig: {
266
540
  pageSize: 20,
267
541
  pageSizes: [10, 20, 30, 50, 100, 200],
268
- layouts: ["Total", "Sizes", "PrevPage", "Number", "NextPage"],
269
- ...a.pagerConfig
542
+ layouts: ["Total", "Sizes", "Home", "PrevPage", "Number", "NextPage", "End"],
543
+ ...Y,
544
+ slots: {
545
+ sizes: "pagerSizes",
546
+ ...Y.slots
547
+ }
270
548
  }
271
549
  } : {},
272
- ...r ? {
550
+ ...d ? {
273
551
  proxyConfig: {
274
552
  autoLoad: !0,
275
553
  showResponseMsg: !1,
276
- ...r,
554
+ ...d,
277
555
  response: {
278
556
  list: "items",
279
557
  result: "items",
280
558
  total: "total",
281
- ...r.response
559
+ ...d.response
282
560
  },
283
- ...r.ajax ? {
561
+ ...d.ajax ? {
284
562
  ajax: {
285
- ...r.ajax,
286
- ...y ? {
287
- query: (L) => y(L, e.api.formApi.getValues())
563
+ ...d.ajax,
564
+ ...u ? {
565
+ query: (R) => u(R, e.api.formApi.getValues())
288
566
  } : {}
289
567
  }
290
568
  } : {}
291
569
  }
292
570
  } : {},
293
- ..._ || C.value ? {
571
+ ...O || w.value ? {
294
572
  toolbarConfig: {
295
573
  custom: !0,
296
574
  refresh: !0,
297
575
  zoom: !0,
298
- ..._,
576
+ ...O,
299
577
  slots: {
300
- ...e.tableTitle || o["table-title"] || o["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
301
- ...o["toolbar-tools"] || _?.search ? { tools: "toolbarTools" } : {}
578
+ ...e.tableTitle || t["table-title"] || t["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
579
+ ...t["toolbar-tools"] || O?.search ? { tools: "toolbarTools" } : {}
302
580
  }
303
581
  }
304
582
  } : {}
305
583
  };
306
- }), G = c(() => l.value.gridEvents ?? {});
307
- Z(
308
- () => n?.value.mode ?? "light",
309
- (a) => M.setTheme(a),
584
+ }), b = c(() => l.value.gridEvents ?? {});
585
+ ee(
586
+ () => p?.value.mode ?? "light",
587
+ (o) => ye.setTheme(o),
310
588
  { immediate: !0 }
311
589
  );
312
- async function u() {
590
+ async function m() {
313
591
  await e.api.reload();
314
592
  }
315
- async function p() {
593
+ async function r() {
316
594
  await e.api.reload();
317
595
  }
318
- return ee(() => {
319
- s.value && e.api.mount(s.value);
320
- }), te(() => e.api.unmount()), (a, r) => (i(), d("section", Ie, [
321
- m.value ? oe((i(), b(Ne, {
596
+ function y(o, d) {
597
+ typeof d != "number" && typeof d != "string" || o.setPageSizeByEvent(new Event("change"), d);
598
+ }
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, {
322
603
  key: 0,
323
- api: t.api.formApi,
324
- options: m.value,
325
- "on-reset": p,
326
- "on-submit": u
604
+ api: s.api.formApi,
605
+ options: C.value,
606
+ "on-reset": r,
607
+ "on-submit": m
327
608
  }, null, 8, ["api", "options"])), [
328
- [ae, t.api.searchFormVisible.value]
329
- ]) : h("", !0),
330
- m.value && l.value.separator !== !1 ? (i(), d("div", je)) : h("", !0),
331
- N(g(D), $({
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({
332
613
  ref_key: "gridRef",
333
- ref: s,
614
+ ref: n,
334
615
  class: "yee-grid__table"
335
- }, A.value, se(G.value)), ie({
336
- toolbarActions: v((y) => [
337
- f(a.$slots, "table-title", {}, () => [
338
- t.tableTitle ? (i(), d("div", Ee, [
339
- x(T(t.tableTitle) + " ", 1),
340
- t.tableTitleHelp ? (i(), b(g(de), {
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), {
341
622
  key: 0,
342
- title: t.tableTitleHelp
623
+ title: s.tableTitleHelp
343
624
  }, {
344
- default: v(() => [...r[1] || (r[1] = [
345
- V("span", {
625
+ default: f(() => [...d[1] || (d[1] = [
626
+ $("span", {
346
627
  class: "yee-grid__help",
347
628
  tabindex: "0"
348
629
  }, "?", -1)
349
630
  ])]),
350
631
  _: 1
351
- }, 8, ["title"])) : h("", !0)
352
- ])) : h("", !0)
632
+ }, 8, ["title"])) : S("", !0)
633
+ ])) : S("", !0)
353
634
  ], !0),
354
- f(a.$slots, "toolbar-actions", R(H(y)), void 0, !0)
635
+ _(o.$slots, "toolbar-actions", M(I(u)), void 0, !0)
355
636
  ]),
356
- toolbarTools: v((y) => [
357
- f(a.$slots, "toolbar-tools", R(H(y)), void 0, !0),
358
- k.value && m.value ? (i(), b(g(F), {
637
+ toolbarTools: f((u) => [
638
+ _(o.$slots, "toolbar-tools", M(I(u)), void 0, !0),
639
+ V.value && C.value ? (i(), k(h(U), {
359
640
  key: 0,
360
641
  size: "small",
361
- onClick: r[0] || (r[0] = (_) => t.api.toggleSearchForm())
642
+ onClick: d[0] || (d[0] = (O) => s.api.toggleSearchForm())
362
643
  }, {
363
- default: v(() => [
364
- x(T(t.api.searchFormVisible.value ? "隐藏查询" : "显示查询"), 1)
644
+ default: f(() => [
645
+ z(F(s.api.searchFormVisible.value ? "隐藏查询" : "显示查询"), 1)
365
646
  ]),
366
647
  _: 1
367
- })) : h("", !0)
648
+ })) : S("", !0)
368
649
  ]),
369
- empty: v(() => [
370
- f(a.$slots, "empty", {}, () => [
371
- r[2] || (r[2] = V("div", { class: "yee-grid__empty" }, "暂无数据", -1))
650
+ pagerSizes: f(({ $pager: u, options: O, pageSize: Y }) => [
651
+ q(h(J), {
652
+ class: "yee-grid__page-size",
653
+ options: O,
654
+ value: Y,
655
+ onChange: (R) => y(u, R)
656
+ }, null, 8, ["options", "value", "onChange"])
657
+ ]),
658
+ empty: f(() => [
659
+ _(o.$slots, "empty", {}, () => [
660
+ d[2] || (d[2] = $("div", { class: "yee-grid__empty" }, "暂无数据", -1))
372
661
  ], !0)
373
662
  ]),
374
663
  _: 2
375
664
  }, [
376
- E(Y.value, (y) => ({
377
- name: y,
378
- fn: v((_) => [
379
- f(a.$slots, y, R(H(_)), void 0, !0)
665
+ oe(B.value, (u) => ({
666
+ name: u,
667
+ fn: f((O) => [
668
+ _(o.$slots, u, M(I(O)), void 0, !0)
380
669
  ])
381
670
  }))
382
671
  ]), 1040)
383
672
  ]));
384
673
  }
385
- }), De = /* @__PURE__ */ O(Ue, [["__scopeId", "data-v-d97be924"]]);
386
- function at(t) {
387
- q();
388
- const e = new Be(t), o = De;
389
- return [P({
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({
390
679
  name: "YeeGrid",
391
680
  inheritAttrs: !1,
392
681
  props: {
393
682
  tableTitle: String,
394
683
  tableTitleHelp: String
395
684
  },
396
- setup(n, { attrs: l, slots: m }) {
397
- return le(() => e.unmount()), () => re(o, {
685
+ setup(p, { attrs: l, slots: C }) {
686
+ return de(() => e.unmount()), () => Ue(t, {
398
687
  ...l,
399
688
  api: e,
400
- ...n.tableTitle ? { tableTitle: n.tableTitle } : {},
401
- ...n.tableTitleHelp ? { tableTitleHelp: n.tableTitleHelp } : {}
402
- }, m);
689
+ ...p.tableTitle ? { tableTitle: p.tableTitle } : {},
690
+ ...p.tableTitleHelp ? { tableTitleHelp: p.tableTitleHelp } : {}
691
+ }, C);
403
692
  }
404
693
  }), e];
405
694
  }
406
- const Me = { class: "yee-page__heading" }, qe = {
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({
696
+ inheritAttrs: !1,
697
+ name: "YeeModal",
698
+ __name: "YeeModal",
699
+ props: /* @__PURE__ */ te({
700
+ cancelButtonText: { default: "取消" },
701
+ centered: { type: Boolean, default: !1 },
702
+ confirmButtonLoading: { type: Boolean, default: !1 },
703
+ confirmButtonText: { default: "确认" },
704
+ destroyOnClose: { type: Boolean, default: !0 },
705
+ keyboard: { type: Boolean, default: !1 },
706
+ maskClosable: { type: Boolean, default: !1 },
707
+ showCancelButton: { type: Boolean, default: !0 },
708
+ showConfirmButton: { type: Boolean, default: !0 },
709
+ title: { default: "" },
710
+ type: { default: "modal" },
711
+ width: { default: 520 }
712
+ }, {
713
+ open: { type: Boolean, default: !1 },
714
+ openModifiers: {}
715
+ }),
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;
721
+ }
722
+ function B(g) {
723
+ n("confirm", g);
724
+ }
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), {
748
+ key: 0,
749
+ onClick: w
750
+ }, {
751
+ default: f(() => [
752
+ z(F(t.cancelButtonText), 1)
753
+ ]),
754
+ _: 1
755
+ })) : S("", !0),
756
+ t.showConfirmButton ? (i(), k(h(U), {
757
+ key: 1,
758
+ loading: t.confirmButtonLoading,
759
+ type: "primary",
760
+ onClick: B
761
+ }, {
762
+ default: f(() => [
763
+ z(F(t.confirmButtonText), 1)
764
+ ]),
765
+ _: 1
766
+ }, 8, ["loading"])) : S("", !0)
767
+ ], !0)
768
+ ])
769
+ ]),
770
+ default: f(() => [
771
+ $("div", Mt, [
772
+ _(g.$slots, "default", {}, void 0, !0)
773
+ ])
774
+ ]),
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), {
791
+ key: 0,
792
+ onClick: w
793
+ }, {
794
+ default: f(() => [
795
+ z(F(t.cancelButtonText), 1)
796
+ ]),
797
+ _: 1
798
+ })) : S("", !0),
799
+ t.showConfirmButton ? (i(), k(h(U), {
800
+ key: 1,
801
+ loading: t.confirmButtonLoading,
802
+ type: "primary",
803
+ onClick: B
804
+ }, {
805
+ default: f(() => [
806
+ z(F(t.confirmButtonText), 1)
807
+ ]),
808
+ _: 1
809
+ }, 8, ["loading"])) : S("", !0)
810
+ ], !0)
811
+ ])
812
+ ]),
813
+ default: f(() => [
814
+ $("div", Ut, [
815
+ _(g.$slots, "default", {}, void 0, !0)
816
+ ])
817
+ ]),
818
+ _: 3
819
+ }, 16, ["centered", "destroy-on-close", "keyboard", "mask-closable", "open", "title", "width"]));
820
+ }
821
+ }), lo = /* @__PURE__ */ N(jt, [["__scopeId", "data-v-45cda799"]]), Lt = { class: "yee-page__heading" }, Dt = {
407
822
  key: 0,
408
823
  class: "yee-page__title"
409
- }, Le = {
824
+ }, Gt = {
410
825
  key: 0,
411
826
  class: "yee-page__description"
412
- }, Ke = {
827
+ }, Ht = {
413
828
  key: 0,
414
829
  class: "yee-page__extra"
415
- }, Qe = /* @__PURE__ */ P({
830
+ }, qt = /* @__PURE__ */ A({
416
831
  name: "YeePage",
417
832
  __name: "YeePage",
418
833
  props: {
@@ -424,56 +839,181 @@ const Me = { class: "yee-page__heading" }, qe = {
424
839
  heightOffset: { default: 0 },
425
840
  title: {}
426
841
  },
427
- setup(t) {
428
- const e = t, o = U(), s = c(() => !!(e.description || e.title || o.description || o.extra || o.title)), n = c(() => ({
842
+ setup(s) {
843
+ const e = s, t = ae(), n = c(() => !!(e.description || e.title || t.description || t.extra || t.title)), p = c(() => ({
429
844
  "--yee-page-height-offset": typeof e.heightOffset == "number" ? `${e.heightOffset}px` : e.heightOffset
430
845
  }));
431
- return (l, m) => (i(), d("section", {
432
- class: S(["yee-page", { "yee-page--auto-height": t.autoContentHeight }]),
433
- style: j(n.value)
846
+ return (l, C) => (i(), T("section", {
847
+ class: H(["yee-page", { "yee-page--auto-height": s.autoContentHeight }]),
848
+ style: K(p.value)
434
849
  }, [
435
- s.value ? (i(), d("header", {
850
+ n.value ? (i(), T("header", {
436
851
  key: 0,
437
- class: S(["yee-page__header", t.headerClass])
852
+ class: H(["yee-page__header", s.headerClass])
438
853
  }, [
439
- V("div", Me, [
440
- f(l.$slots, "title", {}, () => [
441
- t.title ? (i(), d("h1", qe, T(t.title), 1)) : h("", !0)
854
+ $("div", Lt, [
855
+ _(l.$slots, "title", {}, () => [
856
+ s.title ? (i(), T("h1", Dt, F(s.title), 1)) : S("", !0)
442
857
  ], !0),
443
- f(l.$slots, "description", {}, () => [
444
- t.description ? (i(), d("p", Le, T(t.description), 1)) : h("", !0)
858
+ _(l.$slots, "description", {}, () => [
859
+ s.description ? (i(), T("p", Gt, F(s.description), 1)) : S("", !0)
445
860
  ], !0)
446
861
  ]),
447
- l.$slots.extra ? (i(), d("div", Ke, [
448
- f(l.$slots, "extra", {}, void 0, !0)
449
- ])) : h("", !0)
450
- ], 2)) : h("", !0),
451
- V("main", {
452
- class: S(["yee-page__content", t.contentClass])
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])
453
868
  }, [
454
- f(l.$slots, "default", {}, void 0, !0)
869
+ _(l.$slots, "default", {}, void 0, !0)
455
870
  ], 2),
456
- l.$slots.footer ? (i(), d("footer", {
871
+ l.$slots.footer ? (i(), T("footer", {
457
872
  key: 1,
458
- class: S(["yee-page__footer", t.footerClass])
873
+ class: H(["yee-page__footer", s.footerClass])
459
874
  }, [
460
- f(l.$slots, "footer", {}, void 0, !0)
461
- ], 2)) : h("", !0)
875
+ _(l.$slots, "footer", {}, void 0, !0)
876
+ ], 2)) : S("", !0)
462
877
  ], 6));
463
878
  }
464
- }), st = /* @__PURE__ */ O(Qe, [["__scopeId", "data-v-23464940"]]);
879
+ }), io = /* @__PURE__ */ N(qt, [["__scopeId", "data-v-23464940"]]), Kt = { class: "yee-select__option-label" }, Qt = /* @__PURE__ */ A({
880
+ inheritAttrs: !1,
881
+ name: "YeeSelect",
882
+ __name: "YeeSelect",
883
+ props: /* @__PURE__ */ te({
884
+ fieldNames: {},
885
+ options: {}
886
+ }, {
887
+ value: {},
888
+ valueModifiers: {}
889
+ }),
890
+ 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(() => {
897
+ const o = {};
898
+ for (const [d, u] of Object.entries(n))
899
+ d !== "class" && d !== "style" && (o[d] = u);
900
+ return o;
901
+ }), V = c(() => !p.default && !p.option);
902
+ function g(o) {
903
+ return typeof o == "number" || typeof o == "string" ? String(o) : "";
904
+ }
905
+ function b(o, d) {
906
+ 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;
912
+ }
913
+ }
914
+ function m(o) {
915
+ return o ? g(o[l.value.label]) || g(o.title) || g(o[l.value.value]) : "";
916
+ }
917
+ const r = c(() => {
918
+ const o = t.value;
919
+ 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;
921
+ });
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)
930
+ }, [
931
+ V.value ? (i(), k(h(J), E({
932
+ 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
938
+ }), {
939
+ option: f((u) => [
940
+ q(h(W), {
941
+ title: y(u),
942
+ placement: "left"
943
+ }, {
944
+ default: f(() => [
945
+ $("span", Kt, F(y(u)), 1)
946
+ ]),
947
+ _: 2
948
+ }, 1032, ["title"])
949
+ ]),
950
+ _: 1
951
+ }, 16, ["value", "field-names", "options"])) : (i(), k(h(J), E({
952
+ 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 }, [
959
+ o.$slots.default ? {
960
+ name: "default",
961
+ fn: f((u) => [
962
+ _(o.$slots, "default", M(I(u)), void 0, !0)
963
+ ]),
964
+ key: "0"
965
+ } : void 0,
966
+ o.$slots.option ? {
967
+ name: "option",
968
+ fn: f((u) => [
969
+ _(o.$slots, "option", M(I(u)), void 0, !0)
970
+ ]),
971
+ key: "1"
972
+ } : void 0,
973
+ o.$slots.tagRender ? {
974
+ name: "tagRender",
975
+ fn: f((u) => [
976
+ _(o.$slots, "tagRender", M(I(u)), void 0, !0)
977
+ ]),
978
+ key: "2"
979
+ } : void 0,
980
+ o.$slots.dropdownRender ? {
981
+ name: "dropdownRender",
982
+ fn: f((u) => [
983
+ _(o.$slots, "dropdownRender", M(I(u)), void 0, !0)
984
+ ]),
985
+ key: "3"
986
+ } : void 0,
987
+ o.$slots.notFoundContent ? {
988
+ name: "notFoundContent",
989
+ fn: f((u) => [
990
+ _(o.$slots, "notFoundContent", M(I(u)), void 0, !0)
991
+ ]),
992
+ key: "4"
993
+ } : void 0
994
+ ]), 1040, ["value", "field-names", "options"]))
995
+ ], 6)
996
+ ]),
997
+ _: 3
998
+ }, 8, ["title"]));
999
+ }
1000
+ }), ro = /* @__PURE__ */ N(Qt, [["__scopeId", "data-v-64282659"]]);
465
1001
  export {
466
- ot as PlatformConfigProvider,
467
- Ne as YeeForm,
468
- ze as YeeFormApi,
469
- Be as YeeGridApi,
470
- st as YeePage,
471
- rt as darkThemeTokens,
472
- nt as lightThemeTokens,
473
- z as platformThemeKey,
474
- pe as resolvePlatformTheme,
475
- fe as toAntDesignTheme,
476
- he as toPlatformCssVariables,
477
- tt as usePlatformTheme,
478
- at as useYeeGrid
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
479
1019
  };