@yeepay/yee-boss-ui 0.1.5 → 0.1.6

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