@yeepay/yee-boss-ui 0.1.11 → 0.1.13

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,48 +1,48 @@
1
- import { inject as Ee, defineComponent as te, computed as u, provide as Je, openBlock as n, createBlock as R, unref as i, withCtx as S, createElementVNode as B, normalizeStyle as be, renderSlot as H, reactive as Qe, onBeforeUnmount as Se, mergeProps as X, createElementBlock as v, Fragment as ge, renderList as ke, createTextVNode as ae, toDisplayString as A, normalizeClass as me, createCommentVNode as O, useTemplateRef as Ce, shallowRef as z, onMounted as Me, onUpdated as mt, watch as _e, nextTick as De, ref as vt, createVNode as Z, withModifiers as yt, useSlots as ze, onUnmounted as ht, withDirectives as gt, vShow as bt, toHandlers as _t, createSlots as Re, normalizeProps as fe, guardReactiveProps as pe, h as Xe, useModel as Ae, useAttrs as Ze, useId as wt, mergeModels as Ue } from "vue";
2
- import { ConfigProvider as kt, message as Pe, Descriptions as We, Tooltip as ue, Upload as xt, Image as Ct, DatePicker as St, Input as $t, Select as Oe, Button as ne, Modal as et, Drawer as Tt } from "ant-design-vue";
3
- import { r as Ft, t as Bt, a as Et } from "./tokens-Dw6w0SSs.js";
1
+ import { inject as Me, defineComponent as ae, computed as u, provide as Qe, openBlock as a, createBlock as M, unref as s, withCtx as $, createElementVNode as F, normalizeStyle as he, renderSlot as L, reactive as De, onBeforeUnmount as Ce, mergeProps as ee, createElementBlock as h, Fragment as _e, renderList as $e, createTextVNode as ie, toDisplayString as j, normalizeClass as ye, createCommentVNode as z, useTemplateRef as xe, shallowRef as O, onMounted as Re, onUpdated as vt, watch as ke, nextTick as Te, ref as mt, createVNode as ne, withModifiers as yt, useSlots as Oe, onUnmounted as ht, withDirectives as gt, vShow as bt, toHandlers as wt, createSlots as Ve, normalizeProps as ve, guardReactiveProps as me, h as Xe, useModel as Ue, useAttrs as Ze, useId as _t, mergeModels as je } from "vue";
2
+ import { ConfigProvider as xt, message as He, Descriptions as qe, Tooltip as ue, Upload as kt, Image as Ct, DatePicker as St, Input as $t, Select as ze, Button as re, Modal as et, Drawer as Tt } from "ant-design-vue";
3
+ import { r as Bt, t as Ft, a as Et } from "./tokens-Dw6w0SSs.js";
4
4
  import { d as qn, l as Gn } from "./tokens-Dw6w0SSs.js";
5
- import { CheckOutlined as Rt, CopyOutlined as Ot, FullscreenExitOutlined as tt, FullscreenOutlined as ot, DownloadOutlined as Mt, CloseOutlined as zt } from "@ant-design/icons-vue";
6
- import { VxeTable as Vt, VxeColumn as Nt, VxeColgroup as Pt, VxeGrid as nt, VxeToolbar as Ht, VxeUI as Be } from "vxe-table";
7
- import { VxeButton as Lt, VxeCheckbox as At, VxeIcon as Ut, VxeInput as jt, VxeLoading as Dt, VxeModal as It, VxeNumberInput as Yt, VxePager as Wt, VxeRadioGroup as qt, VxeSelect as Gt, VxeTooltip as Kt } from "vxe-pc-ui";
8
- const zn = "--yee-content-height", Ve = /* @__PURE__ */ Symbol("platform-theme");
9
- function Vn() {
10
- const o = Ee(Ve);
5
+ import { CheckOutlined as Rt, CopyOutlined as Ot, FullscreenExitOutlined as tt, FullscreenOutlined as ot, DownloadOutlined as Mt, CloseOutlined as Vt } from "@ant-design/icons-vue";
6
+ import { VxeTable as zt, VxeColumn as Nt, VxeColgroup as Pt, VxeGrid as nt, VxeToolbar as Ht, VxeUI as Ee } from "vxe-table";
7
+ import { VxeButton as Lt, VxeCheckbox as At, VxeIcon as Ut, VxeInput as jt, VxeLoading as It, VxeModal as Dt, VxeNumberInput as Yt, VxePager as Wt, VxeRadioGroup as qt, VxeSelect as Gt } from "vxe-pc-ui";
8
+ const Vn = "--yee-content-height", Ne = /* @__PURE__ */ Symbol("platform-theme");
9
+ function zn() {
10
+ const o = Me(Ne);
11
11
  if (!o)
12
12
  throw new Error("usePlatformTheme 必须在 PlatformConfigProvider 内使用。");
13
13
  return o;
14
14
  }
15
- const Jt = ["data-theme"], Qt = /* @__PURE__ */ te({
15
+ const Kt = ["data-theme"], Jt = /* @__PURE__ */ ae({
16
16
  name: "PlatformConfigProvider",
17
17
  __name: "PlatformConfigProvider",
18
18
  props: {
19
19
  theme: { default: () => ({}) }
20
20
  },
21
21
  setup(o) {
22
- const t = o, e = u(() => Ft(t.theme)), s = u(() => Bt(e.value)), m = u(() => Et(e.value));
23
- return Je(Ve, e), (k, g) => (n(), R(i(kt), {
22
+ const t = o, e = u(() => Bt(t.theme)), n = u(() => Ft(e.value)), m = u(() => Et(e.value));
23
+ return Qe(Ne, e), (x, g) => (a(), M(s(xt), {
24
24
  "prefix-cls": "yee",
25
- theme: s.value
25
+ theme: n.value
26
26
  }, {
27
- default: S(() => [
28
- B("div", {
27
+ default: $(() => [
28
+ F("div", {
29
29
  class: "yee-ui-platform-theme",
30
30
  "data-theme": e.value.mode,
31
- style: be(m.value)
31
+ style: he(m.value)
32
32
  }, [
33
- H(k.$slots, "default", {}, void 0, !0)
34
- ], 12, Jt)
33
+ L(x.$slots, "default", {}, void 0, !0)
34
+ ], 12, Kt)
35
35
  ]),
36
36
  _: 3
37
37
  }, 8, ["theme"]));
38
38
  }
39
- }), le = (o, t) => {
39
+ }), ce = (o, t) => {
40
40
  const e = o.__vccOpts || o;
41
- for (const [s, m] of t)
42
- e[s] = m;
41
+ for (const [n, m] of t)
42
+ e[n] = m;
43
43
  return e;
44
- }, Nn = /* @__PURE__ */ le(Qt, [["__scopeId", "data-v-0b569e8c"]]);
45
- async function Xt(o) {
44
+ }, Nn = /* @__PURE__ */ ce(Jt, [["__scopeId", "data-v-0b569e8c"]]);
45
+ async function Qt(o) {
46
46
  if (!o) return !1;
47
47
  try {
48
48
  return await navigator.clipboard.writeText(o), !0;
@@ -58,27 +58,27 @@ async function Xt(o) {
58
58
  }
59
59
  }
60
60
  }
61
- function He(o) {
61
+ function Le(o) {
62
62
  return {
63
63
  content: o,
64
64
  prefixCls: "yee-message",
65
65
  rootPrefixCls: "yee"
66
66
  };
67
67
  }
68
- const xe = {
68
+ const Be = {
69
69
  error(o) {
70
- return Pe.error(He(o));
70
+ return He.error(Le(o));
71
71
  },
72
72
  success(o) {
73
- return Pe.success(He(o));
73
+ return He.success(Le(o));
74
74
  },
75
75
  warning(o) {
76
- return Pe.warning(He(o));
76
+ return He.warning(Le(o));
77
77
  }
78
- }, Zt = { class: "yee-ui-descriptions__item" }, eo = { class: "yee-ui-descriptions__content-row" }, to = { class: "yee-ui-descriptions__value yee-ui-descriptions__value--ellipsis" }, oo = {
78
+ }, Xt = { class: "yee-ui-descriptions__item" }, Zt = { class: "yee-ui-descriptions__content-row" }, eo = { class: "yee-ui-descriptions__value yee-ui-descriptions__value--ellipsis" }, to = {
79
79
  key: 1,
80
80
  class: "yee-ui-descriptions__value"
81
- }, no = ["aria-label", "disabled", "onClick"], ao = /* @__PURE__ */ te({
81
+ }, oo = ["aria-label", "disabled", "onClick"], no = /* @__PURE__ */ ae({
82
82
  name: "YeeDescriptions",
83
83
  __name: "YeeDescriptions",
84
84
  props: {
@@ -91,85 +91,85 @@ const xe = {
91
91
  title: {}
92
92
  },
93
93
  setup(o) {
94
- const t = o, e = u(() => t.bordered ?? !1), s = u(() => t.colon ?? !0), m = u(() => t.column ?? 3), k = u(() => t.layout ?? "horizontal"), g = u(() => t.size ?? "default"), y = Qe(/* @__PURE__ */ new Set()), C = /* @__PURE__ */ new Set();
95
- function w(F, T) {
96
- return F.name ?? `${F.label}-${T}`;
94
+ const t = o, e = u(() => t.bordered ?? !1), n = u(() => t.colon ?? !0), m = u(() => t.column ?? 3), x = u(() => t.layout ?? "horizontal"), g = u(() => t.size ?? "default"), d = De(/* @__PURE__ */ new Set()), S = /* @__PURE__ */ new Set();
95
+ function b(B, C) {
96
+ return B.name ?? `${B.label}-${C}`;
97
97
  }
98
- async function $(F, T) {
99
- const c = String(F.value ?? "");
98
+ async function T(B, C) {
99
+ const c = String(B.value ?? "");
100
100
  if (!c.trim()) {
101
- xe.warning("没有可复制的内容");
101
+ Be.warning("没有可复制的内容");
102
102
  return;
103
103
  }
104
- if (!await Xt(c)) {
105
- xe.error("复制失败");
104
+ if (!await Qt(c)) {
105
+ Be.error("复制失败");
106
106
  return;
107
107
  }
108
- y.add(T), xe.success("已复制");
109
- const b = setTimeout(() => {
110
- y.delete(T), C.delete(b);
108
+ d.add(C), Be.success("已复制");
109
+ const p = setTimeout(() => {
110
+ d.delete(C), S.delete(p);
111
111
  }, 1500);
112
- C.add(b);
112
+ S.add(p);
113
113
  }
114
- return Se(() => {
115
- C.forEach((F) => clearTimeout(F)), C.clear();
116
- }), (F, T) => (n(), R(i(We), X({
114
+ return Ce(() => {
115
+ S.forEach((B) => clearTimeout(B)), S.clear();
116
+ }), (B, C) => (a(), M(s(qe), ee({
117
117
  class: "yee-ui-descriptions",
118
118
  bordered: e.value,
119
- colon: s.value,
119
+ colon: n.value,
120
120
  column: m.value,
121
- layout: k.value,
121
+ layout: x.value,
122
122
  size: g.value
123
123
  }, t.title === void 0 ? {} : { title: t.title }), {
124
- default: S(() => [
125
- (n(!0), v(ge, null, ke(o.items, (c, b) => (n(), R(i(We).Item, {
126
- key: w(c, b),
124
+ default: $(() => [
125
+ (a(!0), h(_e, null, $e(o.items, (c, p) => (a(), M(s(qe).Item, {
126
+ key: b(c, p),
127
127
  label: c.label,
128
128
  span: c.span ?? 1
129
129
  }, {
130
- default: S(() => [
131
- B("div", Zt, [
132
- B("div", eo, [
133
- c.ellipsis ? (n(), R(i(ue), {
130
+ default: $(() => [
131
+ F("div", Xt, [
132
+ F("div", Zt, [
133
+ c.ellipsis ? (a(), M(s(ue), {
134
134
  key: 0,
135
135
  title: String(c.value ?? "")
136
136
  }, {
137
- default: S(() => [
138
- B("span", to, [
139
- H(F.$slots, `content-${c.name ?? c.label}`, { item: c }, () => [
140
- ae(A(c.value), 1)
137
+ default: $(() => [
138
+ F("span", eo, [
139
+ L(B.$slots, `content-${c.name ?? c.label}`, { item: c }, () => [
140
+ ie(j(c.value), 1)
141
141
  ], !0)
142
142
  ])
143
143
  ]),
144
144
  _: 2
145
- }, 1032, ["title"])) : (n(), v("span", oo, [
146
- H(F.$slots, `content-${c.name ?? c.label}`, { item: c }, () => [
147
- ae(A(c.value), 1)
145
+ }, 1032, ["title"])) : (a(), h("span", to, [
146
+ L(B.$slots, `content-${c.name ?? c.label}`, { item: c }, () => [
147
+ ie(j(c.value), 1)
148
148
  ], !0)
149
149
  ])),
150
- c.copyable ? (n(), R(i(ue), {
150
+ c.copyable ? (a(), M(s(ue), {
151
151
  key: 2,
152
- title: y.has(w(c, b)) ? "已复制" : "复制"
152
+ title: d.has(b(c, p)) ? "已复制" : "复制"
153
153
  }, {
154
- default: S(() => [
155
- B("button", {
156
- class: me(["yee-ui-descriptions__copy", { "yee-ui-descriptions__copy--copied": y.has(w(c, b)) }]),
157
- "aria-label": y.has(w(c, b)) ? "已复制" : "复制",
158
- disabled: y.has(w(c, b)),
154
+ default: $(() => [
155
+ F("button", {
156
+ class: ye(["yee-ui-descriptions__copy", { "yee-ui-descriptions__copy--copied": d.has(b(c, p)) }]),
157
+ "aria-label": d.has(b(c, p)) ? "已复制" : "复制",
158
+ disabled: d.has(b(c, p)),
159
159
  type: "button",
160
- onClick: (N) => $(c, w(c, b))
160
+ onClick: (N) => T(c, b(c, p))
161
161
  }, [
162
- y.has(w(c, b)) ? (n(), R(i(Rt), { key: 0 })) : (n(), R(i(Ot), { key: 1 }))
163
- ], 10, no)
162
+ d.has(b(c, p)) ? (a(), M(s(Rt), { key: 0 })) : (a(), M(s(Ot), { key: 1 }))
163
+ ], 10, oo)
164
164
  ]),
165
165
  _: 2
166
- }, 1032, ["title"])) : O("", !0)
166
+ }, 1032, ["title"])) : z("", !0)
167
167
  ]),
168
- c.info ? (n(), v("span", {
168
+ c.info ? (a(), h("span", {
169
169
  key: 0,
170
170
  class: "yee-ui-descriptions__info",
171
- style: be(c.infoStyle)
172
- }, A(c.info), 5)) : O("", !0)
171
+ style: he(c.infoStyle)
172
+ }, j(c.info), 5)) : z("", !0)
173
173
  ])
174
174
  ]),
175
175
  _: 2
@@ -178,7 +178,7 @@ const xe = {
178
178
  _: 3
179
179
  }, 16, ["bordered", "colon", "column", "layout", "size"]));
180
180
  }
181
- }), Pn = /* @__PURE__ */ le(ao, [["__scopeId", "data-v-91a3a5f3"]]), lo = ["aria-expanded", "role", "tabindex"], io = /* @__PURE__ */ te({
181
+ }), Pn = /* @__PURE__ */ ce(no, [["__scopeId", "data-v-91a3a5f3"]]), ao = ["aria-expanded", "role", "tabindex"], lo = /* @__PURE__ */ ae({
182
182
  inheritAttrs: !1,
183
183
  name: "YeeEllipsisText",
184
184
  __name: "YeeEllipsisText",
@@ -198,82 +198,82 @@ const xe = {
198
198
  },
199
199
  emits: ["expandChange"],
200
200
  setup(o, { emit: t }) {
201
- const e = o, s = t, m = Ee(Ve, void 0), k = Ce("text"), g = z(!1), y = z(!1), C = z(0), w = u(() => Number.isFinite(e.line) ? Math.max(1, Math.floor(e.line)) : 1), $ = u(() => Number.isFinite(e.ellipsisThreshold) ? Math.max(0, e.ellipsisThreshold) : 3), F = u(() => typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth), T = u(() => {
202
- const x = { maxWidth: F.value };
203
- return !y.value && w.value > 1 && (x.webkitLineClamp = w.value), x;
201
+ const e = o, n = t, m = Me(Ne, void 0), x = xe("text"), g = O(!1), d = O(!1), S = O(0), b = u(() => Number.isFinite(e.line) ? Math.max(1, Math.floor(e.line)) : 1), T = u(() => Number.isFinite(e.ellipsisThreshold) ? Math.max(0, e.ellipsisThreshold) : 3), B = u(() => typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth), C = u(() => {
202
+ const k = { maxWidth: B.value };
203
+ return !d.value && b.value > 1 && (k.webkitLineClamp = b.value), k;
204
204
  }), c = u(() => ({
205
205
  "yee-ui-ellipsis-text--expandable": e.expand,
206
- "yee-ui-ellipsis-text--expanded": y.value,
207
- "yee-ui-ellipsis-text--multi-line": !y.value && w.value > 1,
208
- "yee-ui-ellipsis-text--single-line": !y.value && w.value === 1
209
- })), b = u(() => e.tooltipMaxWidth !== void 0 ? e.tooltipMaxWidth : C.value > 0 ? C.value + 24 : void 0), N = u(() => {
210
- const x = {};
211
- return b.value !== void 0 && (x.maxWidth = `${b.value}px`), x;
206
+ "yee-ui-ellipsis-text--expanded": d.value,
207
+ "yee-ui-ellipsis-text--multi-line": !d.value && b.value > 1,
208
+ "yee-ui-ellipsis-text--single-line": !d.value && b.value === 1
209
+ })), p = u(() => e.tooltipMaxWidth !== void 0 ? e.tooltipMaxWidth : S.value > 0 ? S.value + 24 : void 0), N = u(() => {
210
+ const k = {};
211
+ return p.value !== void 0 && (k.maxWidth = `${p.value}px`), k;
212
212
  }), P = u(() => {
213
- const x = {
213
+ const k = {
214
214
  ...e.tooltipOverlayStyle,
215
- backgroundColor: j.value,
215
+ backgroundColor: I.value,
216
216
  color: e.tooltipColor || m?.value.tokens.popoverForeground || "var(--yee-popover-foreground)",
217
217
  fontSize: e.tooltipFontSize === void 0 ? m ? `${m.value.tokens.fontSize}px` : "var(--yee-font-size)" : `${e.tooltipFontSize}px`
218
218
  };
219
- return b.value !== void 0 && (x.maxWidth = `${b.value}px`), x;
220
- }), j = u(() => e.tooltipBackgroundColor || m?.value.tokens.popover || "var(--yee-popover)"), d = u(() => e.tooltip && !y.value && (!e.tooltipWhenEllipsis || g.value)), f = u(() => d.value ? {} : { open: !1 });
219
+ return p.value !== void 0 && (k.maxWidth = `${p.value}px`), k;
220
+ }), I = u(() => e.tooltipBackgroundColor || m?.value.tokens.popover || "var(--yee-popover)"), f = u(() => e.tooltip && !d.value && (!e.tooltipWhenEllipsis || g.value)), v = u(() => f.value ? {} : { open: !1 });
221
221
  let l;
222
- function M() {
223
- const x = k.value;
224
- if (!x) return;
225
- const D = x.getBoundingClientRect().width || x.clientWidth;
226
- if (C.value = Math.ceil(D), !e.tooltipWhenEllipsis || y.value || !x.textContent?.trim()) {
222
+ function E() {
223
+ const k = x.value;
224
+ if (!k) return;
225
+ const D = k.getBoundingClientRect().width || k.clientWidth;
226
+ if (S.value = Math.ceil(D), !e.tooltipWhenEllipsis || d.value || !k.textContent?.trim()) {
227
227
  g.value = !1;
228
228
  return;
229
229
  }
230
- const J = w.value === 1 ? x.scrollWidth - x.clientWidth : x.scrollHeight - x.clientHeight;
231
- g.value = J > $.value;
230
+ const G = b.value === 1 ? k.scrollWidth - k.clientWidth : k.scrollHeight - k.clientHeight;
231
+ g.value = G > T.value;
232
232
  }
233
- function U() {
234
- e.expand && (y.value = !y.value, s("expandChange", y.value), De(M));
233
+ function A() {
234
+ e.expand && (d.value = !d.value, n("expandChange", d.value), Te(E));
235
235
  }
236
- function W(x) {
237
- !e.expand || x.key !== "Enter" && x.key !== " " || (x.preventDefault(), U());
236
+ function Y(k) {
237
+ !e.expand || k.key !== "Enter" && k.key !== " " || (k.preventDefault(), A());
238
238
  }
239
- return Me(() => {
240
- const x = k.value;
241
- x && typeof ResizeObserver < "u" && (l = new ResizeObserver(M), l.observe(x)), M();
242
- }), mt(M), _e(() => e.expand, (x) => {
243
- x || (y.value = !1);
244
- }), Se(() => {
239
+ return Re(() => {
240
+ const k = x.value;
241
+ k && typeof ResizeObserver < "u" && (l = new ResizeObserver(E), l.observe(k)), E();
242
+ }), vt(E), ke(() => e.expand, (k) => {
243
+ k || (d.value = !1);
244
+ }), Ce(() => {
245
245
  l?.disconnect(), l = void 0;
246
- }), (x, D) => (n(), R(i(ue), X(f.value, {
247
- color: j.value,
246
+ }), (k, D) => (a(), M(s(ue), ee(v.value, {
247
+ color: I.value,
248
248
  "overlay-inner-style": P.value,
249
249
  "overlay-style": N.value,
250
250
  placement: e.placement
251
251
  }), {
252
- title: S(() => [
253
- H(x.$slots, "tooltip", {}, () => [
254
- H(x.$slots, "default", {}, void 0, !0)
252
+ title: $(() => [
253
+ L(k.$slots, "tooltip", {}, () => [
254
+ L(k.$slots, "default", {}, void 0, !0)
255
255
  ], !0)
256
256
  ]),
257
- default: S(() => [
258
- B("div", X({ ref: "text" }, x.$attrs, {
259
- "aria-expanded": e.expand ? y.value : void 0,
257
+ default: $(() => [
258
+ F("div", ee({ ref: "text" }, k.$attrs, {
259
+ "aria-expanded": e.expand ? d.value : void 0,
260
260
  class: ["yee-ui-ellipsis-text", c.value],
261
261
  role: e.expand ? "button" : void 0,
262
- style: T.value,
262
+ style: C.value,
263
263
  tabindex: e.expand ? 0 : void 0,
264
- onClick: U,
265
- onKeydown: W
264
+ onClick: A,
265
+ onKeydown: Y
266
266
  }), [
267
- H(x.$slots, "default", {}, void 0, !0)
268
- ], 16, lo)
267
+ L(k.$slots, "default", {}, void 0, !0)
268
+ ], 16, ao)
269
269
  ]),
270
270
  _: 3
271
271
  }, 16, ["color", "overlay-inner-style", "overlay-style", "placement"]));
272
272
  }
273
- }), Hn = /* @__PURE__ */ le(io, [["__scopeId", "data-v-ce34466f"]]), so = { class: "yee-ui-file-upload" }, ro = {
273
+ }), Hn = /* @__PURE__ */ ce(lo, [["__scopeId", "data-v-ce34466f"]]), io = { class: "yee-ui-file-upload" }, so = {
274
274
  key: 1,
275
275
  class: "yee-ui-file-upload__empty"
276
- }, uo = /* @__PURE__ */ te({
276
+ }, ro = /* @__PURE__ */ ae({
277
277
  name: "YeeFileUpload",
278
278
  __name: "YeeFileUpload",
279
279
  props: {
@@ -291,36 +291,36 @@ const xe = {
291
291
  },
292
292
  emits: ["fileRemoved", "fileSelect", "update:fileList", "uploadSuccess", "uploadingChange"],
293
293
  setup(o, { expose: t, emit: e }) {
294
- const s = o, m = e, k = vt([]), g = z(!1), y = z(""), C = u(() => s.fileList ?? []), w = u(() => s.height ?? 100), $ = u(() => s.manual ?? !1), F = u(() => s.maxCount ?? 10), T = u(() => s.maxSize ?? 20), c = u(() => s.multiple ?? !1), b = u(() => s.readonly ?? !1), N = u(() => s.uploadText ?? "上传文件"), P = u(() => s.width ?? 100), j = u(() => ({
295
- height: f(w.value),
296
- width: f(P.value)
297
- })), d = u(() => k.value.some((r) => r.status === "uploading"));
298
- _e(
299
- C,
294
+ const n = o, m = e, x = mt([]), g = O(!1), d = O(""), S = u(() => n.fileList ?? []), b = u(() => n.height ?? 100), T = u(() => n.manual ?? !1), B = u(() => n.maxCount ?? 10), C = u(() => n.maxSize ?? 20), c = u(() => n.multiple ?? !1), p = u(() => n.readonly ?? !1), N = u(() => n.uploadText ?? "上传文件"), P = u(() => n.width ?? 100), I = u(() => ({
295
+ height: v(b.value),
296
+ width: v(P.value)
297
+ })), f = u(() => x.value.some((r) => r.status === "uploading"));
298
+ ke(
299
+ S,
300
300
  (r) => {
301
- k.value = r.map((p) => ({ ...p }));
301
+ x.value = r.map((y) => ({ ...y }));
302
302
  },
303
303
  { immediate: !0 }
304
- ), _e(d, (r) => m("uploadingChange", r), { immediate: !0 });
305
- function f(r) {
304
+ ), ke(f, (r) => m("uploadingChange", r), { immediate: !0 });
305
+ function v(r) {
306
306
  return typeof r == "number" ? `${r}px` : r;
307
307
  }
308
308
  function l() {
309
- m("update:fileList", k.value.map((r) => ({ ...r })));
309
+ m("update:fileList", x.value.map((r) => ({ ...r })));
310
310
  }
311
- function M(r) {
311
+ function E(r) {
312
312
  return r < 1024 ? `${r}B` : r < 1024 * 1024 ? `${(r / 1024).toFixed(2)}KB` : `${(r / (1024 * 1024)).toFixed(2)}MB`;
313
313
  }
314
- function U(r) {
315
- return r.size <= T.value * 1024 * 1024 ? !1 : (xe.error(`文件大小不能超过 ${T.value}MB,当前为 ${M(r.size)}`), !0);
314
+ function A(r) {
315
+ return r.size <= C.value * 1024 * 1024 ? !1 : (Be.error(`文件大小不能超过 ${C.value}MB,当前为 ${E(r.size)}`), !0);
316
316
  }
317
- function W(r) {
317
+ function Y(r) {
318
318
  return r.type?.startsWith("image/") ?? /\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(r.url ?? "");
319
319
  }
320
- function x(r) {
320
+ function k(r) {
321
321
  if (r.url) {
322
- if (W(r)) {
323
- y.value = r.url, g.value = !0;
322
+ if (Y(r)) {
323
+ d.value = r.url, g.value = !0;
324
324
  return;
325
325
  }
326
326
  window.open(r.url, "_blank", "noopener,noreferrer");
@@ -329,112 +329,112 @@ const xe = {
329
329
  function D(r) {
330
330
  g.value = r;
331
331
  }
332
- function J(r, p, V) {
333
- r.status = "done", r.percent = 100, p?.name && (r.name = p.name), p?.url && (r.url = p.url), l(), V(p), m("uploadSuccess");
332
+ function G(r, y, H) {
333
+ r.status = "done", r.percent = 100, y?.name && (r.name = y.name), y?.url && (r.url = y.url), l(), H(y), m("uploadSuccess");
334
334
  }
335
- function oe(r, p, V) {
336
- r.status = "error", l(), V(p);
335
+ function oe(r, y, H) {
336
+ r.status = "error", l(), H(y);
337
337
  }
338
- function $e(r, p, V, se) {
339
- const ee = k.value.find((G) => G.uid === p);
340
- if (!ee) return;
341
- if (ee.status = "uploading", ee.percent = 0, l(), !s.customRequest) {
342
- const G = new Error("未配置 customRequest");
343
- xe.error(G.message), oe(ee, G, se);
338
+ function R(r, y, H, de) {
339
+ const le = x.value.find((J) => J.uid === y);
340
+ if (!le) return;
341
+ if (le.status = "uploading", le.percent = 0, l(), !n.customRequest) {
342
+ const J = new Error("未配置 customRequest");
343
+ Be.error(J.message), oe(le, J, de);
344
344
  return;
345
345
  }
346
- let he = !1;
347
- const we = {
346
+ let we = !1;
347
+ const Se = {
348
348
  file: r,
349
- onError: (G) => {
350
- he || (he = !0, oe(ee, G, se));
349
+ onError: (J) => {
350
+ we || (we = !0, oe(le, J, de));
351
351
  },
352
- onProgress: (G) => {
353
- he || (ee.percent = Math.min(100, Math.max(0, G)), l());
352
+ onProgress: (J) => {
353
+ we || (le.percent = Math.min(100, Math.max(0, J)), l());
354
354
  },
355
- onSuccess: (G) => {
356
- he || (he = !0, J(ee, G, V));
355
+ onSuccess: (J) => {
356
+ we || (we = !0, G(le, J, H));
357
357
  },
358
- uid: p
358
+ uid: y
359
359
  };
360
360
  try {
361
- Promise.resolve(s.customRequest(we)).catch((G) => {
362
- we.onError(G instanceof Error ? G : new Error("上传失败"));
361
+ Promise.resolve(n.customRequest(Se)).catch((J) => {
362
+ Se.onError(J instanceof Error ? J : new Error("上传失败"));
363
363
  });
364
- } catch (G) {
365
- we.onError(G instanceof Error ? G : new Error("上传失败"));
364
+ } catch (J) {
365
+ Se.onError(J instanceof Error ? J : new Error("上传失败"));
366
366
  }
367
367
  }
368
- const Te = (r) => U(r) || $.value ? !1 : s.customRequest ? !0 : (xe.error("未配置 customRequest"), !1);
369
- function ie(r) {
370
- const p = r.file instanceof File ? r.file : void 0;
371
- if (!p || U(p)) {
368
+ const Q = (r) => A(r) || T.value ? !1 : n.customRequest ? !0 : (Be.error("未配置 customRequest"), !1);
369
+ function Z(r) {
370
+ const y = r.file instanceof File ? r.file : void 0;
371
+ if (!y || A(y)) {
372
372
  r.onError?.(new Error("文件大小超过限制"));
373
373
  return;
374
374
  }
375
- const V = p.uid ?? String(Date.now());
376
- $e(p, V, r.onSuccess ?? (() => {
375
+ const H = y.uid ?? String(Date.now());
376
+ R(y, H, r.onSuccess ?? (() => {
377
377
  }), r.onError ?? (() => {
378
378
  }));
379
379
  }
380
- function ce(r) {
381
- if (k.value = r.fileList.map((V) => ({ ...V })), l(), !$.value) return;
382
- const p = k.value.at(-1);
383
- p?.originFileObj instanceof File && m("fileSelect", { file: p.originFileObj, uid: p.uid });
380
+ function se(r) {
381
+ if (x.value = r.fileList.map((H) => ({ ...H })), l(), !T.value) return;
382
+ const y = x.value.at(-1);
383
+ y?.originFileObj instanceof File && m("fileSelect", { file: y.originFileObj, uid: y.uid });
384
384
  }
385
- function ve(r) {
385
+ function ge(r) {
386
386
  m("fileRemoved", r);
387
387
  }
388
- function ye(r, p) {
389
- const V = k.value.find((se) => se.uid === r);
390
- V && J(V, p, () => {
388
+ function be(r, y) {
389
+ const H = x.value.find((de) => de.uid === r);
390
+ H && G(H, y, () => {
391
391
  });
392
392
  }
393
393
  function Fe(r) {
394
- const p = k.value.find((V) => V.uid === r);
395
- p && oe(p, new Error("上传失败"), () => {
394
+ const y = x.value.find((H) => H.uid === r);
395
+ y && oe(y, new Error("上传失败"), () => {
396
396
  });
397
397
  }
398
- function q() {
399
- return k.value.flatMap((r) => r.originFileObj instanceof File ? [r.originFileObj] : []);
398
+ function K() {
399
+ return x.value.flatMap((r) => r.originFileObj instanceof File ? [r.originFileObj] : []);
400
400
  }
401
- return t({ addError: Fe, addResult: ye, getFiles: q }), (r, p) => (n(), v("div", so, [
402
- !b.value || k.value.length > 0 ? (n(), R(i(xt), X({ key: 0 }, o.accept ? { accept: o.accept } : {}, {
403
- "before-upload": Te,
404
- "custom-request": ie,
405
- "file-list": k.value,
406
- "max-count": F.value,
401
+ return t({ addError: Fe, addResult: be, getFiles: K }), (r, y) => (a(), h("div", io, [
402
+ !p.value || x.value.length > 0 ? (a(), M(s(kt), ee({ key: 0 }, o.accept ? { accept: o.accept } : {}, {
403
+ "before-upload": Q,
404
+ "custom-request": Z,
405
+ "file-list": x.value,
406
+ "max-count": B.value,
407
407
  multiple: c.value,
408
- "show-upload-list": { showRemoveIcon: !b.value },
408
+ "show-upload-list": { showRemoveIcon: !p.value },
409
409
  "list-type": "picture-card",
410
- onChange: ce,
411
- onPreview: x,
412
- onRemove: ve
410
+ onChange: se,
411
+ onPreview: k,
412
+ onRemove: ge
413
413
  }), {
414
- default: S(() => [
415
- !b.value && k.value.length < F.value ? (n(), v("div", {
414
+ default: $(() => [
415
+ !p.value && x.value.length < B.value ? (a(), h("div", {
416
416
  key: 0,
417
417
  class: "yee-ui-file-upload__trigger",
418
- style: be(j.value)
418
+ style: he(I.value)
419
419
  }, [
420
- p[0] || (p[0] = B("span", {
420
+ y[0] || (y[0] = F("span", {
421
421
  class: "yee-ui-file-upload__trigger-sign",
422
422
  "aria-hidden": "true"
423
423
  }, "+", -1)),
424
- B("span", null, A(N.value), 1)
425
- ], 4)) : O("", !0)
424
+ F("span", null, j(N.value), 1)
425
+ ], 4)) : z("", !0)
426
426
  ]),
427
427
  _: 1
428
- }, 16, ["file-list", "max-count", "multiple", "show-upload-list"])) : (n(), v("span", ro, "暂无文件")),
429
- y.value ? (n(), R(i(Ct), {
428
+ }, 16, ["file-list", "max-count", "multiple", "show-upload-list"])) : (a(), h("span", so, "暂无文件")),
429
+ d.value ? (a(), M(s(Ct), {
430
430
  key: 2,
431
431
  class: "yee-ui-file-upload__preview",
432
432
  preview: { visible: g.value, onVisibleChange: D },
433
- src: y.value
434
- }, null, 8, ["preview", "src"])) : O("", !0)
433
+ src: d.value
434
+ }, null, 8, ["preview", "src"])) : z("", !0)
435
435
  ]));
436
436
  }
437
- }), Ln = /* @__PURE__ */ le(uo, [["__scopeId", "data-v-43728986"]]), qe = {
437
+ }), Ln = /* @__PURE__ */ ce(ro, [["__scopeId", "data-v-43728986"]]), Ge = {
438
438
  aac: "audio",
439
439
  avif: "image",
440
440
  bmp: "image",
@@ -470,7 +470,7 @@ const xe = {
470
470
  xls: "spreadsheet",
471
471
  xlsx: "spreadsheet",
472
472
  xml: "xml"
473
- }, co = [
473
+ }, uo = [
474
474
  [/^audio\//i, "audio"],
475
475
  [/^image\//i, "image"],
476
476
  [/^video\//i, "video"],
@@ -486,10 +486,10 @@ const xe = {
486
486
  [/text\/plain/i, "text"],
487
487
  [/text\/xml/i, "xml"]
488
488
  ];
489
- function fo(o) {
489
+ function co(o) {
490
490
  return String(o ?? "").trim().toLowerCase().split(";", 1)[0] ?? "";
491
491
  }
492
- function po(o) {
492
+ function fo(o) {
493
493
  const t = String(o ?? "").trim().split(/[?#]/, 1)[0] ?? "";
494
494
  return ((t.split("/").at(-1) ?? t).split(".").at(-1) ?? "").toLowerCase();
495
495
  }
@@ -503,307 +503,307 @@ function at(o) {
503
503
  return e;
504
504
  }
505
505
  }
506
- function Le(o) {
507
- const t = fo(o);
506
+ function Ae(o) {
507
+ const t = co(o);
508
508
  if (t)
509
- return qe[t] ? qe[t] : co.find(([e]) => e.test(t))?.[1];
509
+ return Ge[t] ? Ge[t] : uo.find(([e]) => e.test(t))?.[1];
510
510
  }
511
- function mo(o, t, e) {
512
- const s = Le(e);
513
- if (s) return s;
514
- const m = typeof File < "u" && o instanceof File || typeof Blob < "u" && o instanceof Blob ? Le(o.type) : void 0;
515
- return m || (Le(po(t || at(o))) ?? "unsupported");
511
+ function po(o, t, e) {
512
+ const n = Ae(e);
513
+ if (n) return n;
514
+ const m = typeof File < "u" && o instanceof File || typeof Blob < "u" && o instanceof Blob ? Ae(o.type) : void 0;
515
+ return m || (Ae(fo(t || at(o))) ?? "unsupported");
516
516
  }
517
517
  function vo(o) {
518
518
  return typeof Blob < "u" && o instanceof Blob || o instanceof ArrayBuffer;
519
519
  }
520
- function Ge(o) {
520
+ function Ke(o) {
521
521
  return o instanceof Blob ? o : new Blob([o]);
522
522
  }
523
- const yo = 50 * 1024 * 1024, ho = 200, go = 50;
524
- function bo(o, t, e) {
525
- const s = z("idle"), m = z(""), k = z(""), g = z(""), y = z(""), C = z(""), w = z([]), $ = z([]), F = z(""), T = z(""), c = z(!1), b = z({ kind: "unsupported", fileName: "" }), N = z(), P = z(0), j = z(), d = u(() => o.source ?? o.url), f = u(() => String(o.fileName ?? "").trim() || at(d.value) || "未命名文件"), l = u(() => b.value.kind), M = u(() => s.value === "loading"), U = u(() => s.value === "ready"), W = u(() => s.value === "error"), x = u(() => s.value === "unsupported");
523
+ const mo = 50 * 1024 * 1024, yo = 200, ho = 50;
524
+ function go(o, t, e) {
525
+ const n = O("idle"), m = O(""), x = O(""), g = O(""), d = O(""), S = O(""), b = O([]), T = O([]), B = O(""), C = O(""), c = O(!1), p = O({ kind: "unsupported", fileName: "" }), N = O(), P = O(0), I = O(), f = u(() => o.source ?? o.url), v = u(() => String(o.fileName ?? "").trim() || at(f.value) || "未命名文件"), l = u(() => p.value.kind), E = u(() => n.value === "loading"), A = u(() => n.value === "ready"), Y = u(() => n.value === "error"), k = u(() => n.value === "unsupported");
526
526
  function D() {
527
527
  N.value && (URL.revokeObjectURL(N.value), N.value = void 0);
528
528
  }
529
- function J() {
530
- j.value?.abort(), j.value = void 0;
529
+ function G() {
530
+ I.value?.abort(), I.value = void 0;
531
531
  }
532
532
  function oe() {
533
- J(), D(), s.value = "idle", m.value = "", k.value = "", g.value = "", y.value = "", C.value = "", w.value = [], $.value = [], F.value = "", T.value = "", c.value = !1, b.value = { kind: "unsupported", fileName: f.value };
533
+ G(), D(), n.value = "idle", m.value = "", x.value = "", g.value = "", d.value = "", S.value = "", b.value = [], T.value = [], B.value = "", C.value = "", c.value = !1, p.value = { kind: "unsupported", fileName: v.value };
534
534
  }
535
- function $e(a) {
536
- const h = URL.createObjectURL(Ge(a));
537
- return N.value = h, h;
535
+ function R(i) {
536
+ const w = URL.createObjectURL(Ke(i));
537
+ return N.value = w, w;
538
538
  }
539
- function Te() {
540
- const a = d.value;
541
- return typeof a == "string" ? a.trim() : vo(a) ? $e(a) : "";
539
+ function Q() {
540
+ const i = f.value;
541
+ return typeof i == "string" ? i.trim() : vo(i) ? R(i) : "";
542
542
  }
543
- function ie() {
544
- const a = Number(o.maxFileSize);
545
- return Number.isFinite(a) && a > 0 ? a : yo;
543
+ function Z() {
544
+ const i = Number(o.maxFileSize);
545
+ return Number.isFinite(i) && i > 0 ? i : mo;
546
546
  }
547
- function ce() {
548
- const a = Number(o.maxRows);
549
- return Number.isFinite(a) && a > 0 ? Math.floor(a) : ho;
547
+ function se() {
548
+ const i = Number(o.maxRows);
549
+ return Number.isFinite(i) && i > 0 ? Math.floor(i) : yo;
550
550
  }
551
- function ve() {
552
- const a = Number(o.maxColumns);
553
- return Number.isFinite(a) && a > 0 ? Math.floor(a) : go;
551
+ function ge() {
552
+ const i = Number(o.maxColumns);
553
+ return Number.isFinite(i) && i > 0 ? Math.floor(i) : ho;
554
554
  }
555
- function ye(a) {
556
- if (a > ie())
557
- throw new Error(`文件超过 ${Math.round(ie() / 1024 / 1024)}MB 限制`);
555
+ function be(i) {
556
+ if (i > Z())
557
+ throw new Error(`文件超过 ${Math.round(Z() / 1024 / 1024)}MB 限制`);
558
558
  }
559
559
  function Fe() {
560
- J(), P.value += 1;
561
- const a = typeof AbortController == "function" ? new AbortController() : void 0;
562
- return j.value = a, { token: P.value, signal: a?.signal };
560
+ G(), P.value += 1;
561
+ const i = typeof AbortController == "function" ? new AbortController() : void 0;
562
+ return I.value = i, { token: P.value, signal: i?.signal };
563
563
  }
564
- function q(a) {
565
- return a === P.value;
564
+ function K(i) {
565
+ return i === P.value;
566
566
  }
567
- async function r(a) {
568
- if (!a.ok) throw new Error(`文件加载失败(${a.status})`);
569
- const h = Number(a.headers.get("content-length"));
570
- Number.isFinite(h) && ye(h);
571
- const _ = await a.arrayBuffer();
572
- return ye(_.byteLength), _;
567
+ async function r(i) {
568
+ if (!i.ok) throw new Error(`文件加载失败(${i.status})`);
569
+ const w = Number(i.headers.get("content-length"));
570
+ Number.isFinite(w) && be(w);
571
+ const _ = await i.arrayBuffer();
572
+ return be(_.byteLength), _;
573
573
  }
574
- async function p(a) {
575
- const h = d.value;
576
- if (h instanceof Blob || h instanceof ArrayBuffer) {
577
- const L = Ge(h);
578
- return ye(L.size), L.arrayBuffer();
574
+ async function y(i) {
575
+ const w = f.value;
576
+ if (w instanceof Blob || w instanceof ArrayBuffer) {
577
+ const U = Ke(w);
578
+ return be(U.size), U.arrayBuffer();
579
579
  }
580
- const _ = typeof h == "string" ? h.trim() : "";
580
+ const _ = typeof w == "string" ? w.trim() : "";
581
581
  if (!_) throw new Error("未提供文件地址或文件内容");
582
- const E = {};
583
- return a && (E.signal = a), r(await fetch(_, E));
582
+ const V = {};
583
+ return i && (V.signal = i), r(await fetch(_, V));
584
584
  }
585
- async function V(a) {
586
- const h = await p(a);
587
- return new TextDecoder().decode(h).replace(/^\uFEFF/, "");
585
+ async function H(i) {
586
+ const w = await y(i);
587
+ return new TextDecoder().decode(w).replace(/^\uFEFF/, "");
588
588
  }
589
- async function se(a) {
590
- const h = await import("./purify.es-HJ4qIUVZ.js");
591
- return (typeof h.default == "function" ? h.default(typeof window > "u" ? void 0 : window) : h.default).sanitize(a);
589
+ async function de(i) {
590
+ const w = await import("./purify.es-HJ4qIUVZ.js");
591
+ return (typeof w.default == "function" ? w.default(typeof window > "u" ? void 0 : window) : w.default).sanitize(i);
592
592
  }
593
- async function ee(a) {
594
- const h = await V(a), [_, E] = await Promise.all([
593
+ async function le(i) {
594
+ const w = await H(i), [_, V] = await Promise.all([
595
595
  import("./marked.esm-DaHdfxOj.js"),
596
596
  import("./purify.es-HJ4qIUVZ.js")
597
- ]), L = _.marked.parse(h, { breaks: !0, gfm: !0 }), Y = typeof E.default == "function" ? E.default(typeof window > "u" ? void 0 : window) : E.default;
598
- g.value = Y.sanitize(L);
597
+ ]), U = _.marked.parse(w, { breaks: !0, gfm: !0 }), q = typeof V.default == "function" ? V.default(typeof window > "u" ? void 0 : window) : V.default;
598
+ g.value = q.sanitize(U);
599
599
  }
600
- async function he(a) {
601
- y.value = await se(await V(a));
600
+ async function we(i) {
601
+ d.value = await de(await H(i));
602
602
  }
603
- function we(a) {
604
- let h = "";
605
- for (let E = 0; E < a.length; E += 32768)
606
- h += String.fromCharCode(...a.subarray(E, E + 32768));
607
- return btoa(h);
603
+ function Se(i) {
604
+ let w = "";
605
+ for (let V = 0; V < i.length; V += 32768)
606
+ w += String.fromCharCode(...i.subarray(V, V + 32768));
607
+ return btoa(w);
608
608
  }
609
- function G(a) {
610
- let h;
611
- if (typeof a.content == "string")
612
- h = a.encoding === "base64" ? a.content.replace(/\s/g, "") : we(new TextEncoder().encode(a.content));
609
+ function J(i) {
610
+ let w;
611
+ if (typeof i.content == "string")
612
+ w = i.encoding === "base64" ? i.content.replace(/\s/g, "") : Se(new TextEncoder().encode(i.content));
613
613
  else {
614
- const _ = a.content instanceof Uint8Array ? a.content : new Uint8Array(a.content);
615
- h = we(_);
614
+ const _ = i.content instanceof Uint8Array ? i.content : new Uint8Array(i.content);
615
+ w = Se(_);
616
616
  }
617
- return `data:${a.mimeType || "application/octet-stream"};base64,${h}`;
617
+ return `data:${i.mimeType || "application/octet-stream"};base64,${w}`;
618
618
  }
619
- function Ne(a) {
620
- const h = a.trim().replace(/^cid:/i, "").replace(/^<|>$/g, "");
619
+ function Pe(i) {
620
+ const w = i.trim().replace(/^cid:/i, "").replace(/^<|>$/g, "");
621
621
  try {
622
- return decodeURIComponent(h).toLowerCase();
622
+ return decodeURIComponent(w).toLowerCase();
623
623
  } catch {
624
- return h.toLowerCase();
624
+ return w.toLowerCase();
625
625
  }
626
626
  }
627
- function st(a, h) {
627
+ function st(i, w) {
628
628
  const _ = /* @__PURE__ */ new Map();
629
- for (const L of h) {
630
- if (!/^image\//i.test(L.mimeType)) continue;
631
- const Y = G(L);
632
- L.contentId && _.set(Ne(L.contentId), Y), L.filename && _.set(Ne(L.filename), Y);
633
- }
634
- if (!_.size || typeof DOMParser > "u") return a;
635
- const E = new DOMParser().parseFromString(a, "text/html");
636
- return E.querySelectorAll("[src]").forEach((L) => {
637
- const Y = L.getAttribute("src") ?? "", I = Ne(/^cid:/i.test(Y) ? Y.slice(4) : Y), K = _.get(I);
638
- K && L.setAttribute("src", K);
639
- }), E.body.innerHTML;
629
+ for (const U of w) {
630
+ if (!/^image\//i.test(U.mimeType)) continue;
631
+ const q = J(U);
632
+ U.contentId && _.set(Pe(U.contentId), q), U.filename && _.set(Pe(U.filename), q);
633
+ }
634
+ if (!_.size || typeof DOMParser > "u") return i;
635
+ const V = new DOMParser().parseFromString(i, "text/html");
636
+ return V.querySelectorAll("[src]").forEach((U) => {
637
+ const q = U.getAttribute("src") ?? "", W = Pe(/^cid:/i.test(q) ? q.slice(4) : q), X = _.get(W);
638
+ X && U.setAttribute("src", X);
639
+ }), V.body.innerHTML;
640
640
  }
641
- function rt(a) {
641
+ function rt(i) {
642
642
  try {
643
- return JSON.stringify(JSON.parse(a), null, 2);
643
+ return JSON.stringify(JSON.parse(i), null, 2);
644
644
  } catch {
645
- return a;
645
+ return i;
646
646
  }
647
647
  }
648
- function ut(a) {
649
- const h = a.replace(/^\uFEFF/, ""), _ = h.split(/\r?\n/, 1)[0] ?? "", L = [" ", ",", ";"].map((Q) => ({ candidate: Q, count: _.split(Q).length - 1 })).sort((Q, de) => de.count - Q.count)[0]?.candidate ?? ",", Y = [];
650
- let I = [], K = "", re = !1;
651
- for (let Q = 0; Q < h.length; Q += 1) {
652
- const de = h[Q], Ye = h[Q + 1];
653
- de === '"' ? re && Ye === '"' ? (K += '"', Q += 1) : re = !re : de === L && !re ? (I.push(K), K = "") : (de === `
654
- ` || de === "\r") && !re ? (de === "\r" && Ye === `
655
- ` && (Q += 1), I.push(K), Y.push(I), I = [], K = "") : K += de;
656
- }
657
- return (K || I.length) && (I.push(K), Y.push(I)), Y;
648
+ function ut(i) {
649
+ const w = i.replace(/^\uFEFF/, ""), _ = w.split(/\r?\n/, 1)[0] ?? "", U = [" ", ",", ";"].map((te) => ({ candidate: te, count: _.split(te).length - 1 })).sort((te, pe) => pe.count - te.count)[0]?.candidate ?? ",", q = [];
650
+ let W = [], X = "", fe = !1;
651
+ for (let te = 0; te < w.length; te += 1) {
652
+ const pe = w[te], We = w[te + 1];
653
+ pe === '"' ? fe && We === '"' ? (X += '"', te += 1) : fe = !fe : pe === U && !fe ? (W.push(X), X = "") : (pe === `
654
+ ` || pe === "\r") && !fe ? (pe === "\r" && We === `
655
+ ` && (te += 1), W.push(X), q.push(W), W = [], X = "") : X += pe;
656
+ }
657
+ return (X || W.length) && (W.push(X), q.push(W)), q;
658
658
  }
659
- async function ct(a) {
660
- const h = await import("./xlsx-CF422ARu.js"), _ = h.read(await p(a), { type: "array" }), E = _.SheetNames[0], L = E ? _.Sheets[E] : void 0;
661
- if (!L) throw new Error("Excel 文件没有可展示的工作表");
662
- const Y = h.utils.sheet_to_json(L, {
659
+ async function ct(i) {
660
+ const w = await import("./xlsx-CF422ARu.js"), _ = w.read(await y(i), { type: "array" }), V = _.SheetNames[0], U = V ? _.Sheets[V] : void 0;
661
+ if (!U) throw new Error("Excel 文件没有可展示的工作表");
662
+ const q = w.utils.sheet_to_json(U, {
663
663
  defval: "",
664
664
  header: 1,
665
665
  raw: !1
666
- }), I = ce(), K = ve();
667
- c.value = Y.length > I || Y.some((re) => re.length > K), w.value = Y.slice(0, I).map((re) => ({
668
- cells: re.slice(0, K).map((Q) => String(Q ?? ""))
666
+ }), W = se(), X = ge();
667
+ c.value = q.length > W || q.some((fe) => fe.length > X), b.value = q.slice(0, W).map((fe) => ({
668
+ cells: fe.slice(0, X).map((te) => String(te ?? ""))
669
669
  }));
670
670
  }
671
- async function dt(a) {
672
- const _ = await (await import("./postal-mime-CPJ2QXsD.js")).default.parse(await p(a)), E = (I) => {
673
- if (Array.isArray(I)) return I.map(E).filter(Boolean).join("; ");
674
- if (!I || typeof I != "object") return String(I ?? "");
675
- const K = I;
676
- return [K.name, K.address].filter(Boolean).join(" ");
671
+ async function dt(i) {
672
+ const _ = await (await import("./postal-mime-CPJ2QXsD.js")).default.parse(await y(i)), V = (W) => {
673
+ if (Array.isArray(W)) return W.map(V).filter(Boolean).join("; ");
674
+ if (!W || typeof W != "object") return String(W ?? "");
675
+ const X = W;
676
+ return [X.name, X.address].filter(Boolean).join(" ");
677
677
  };
678
- $.value = [
679
- { label: "发件人", value: E(_.from) || "-" },
680
- { label: "收件人", value: E(_.to) || "-" },
678
+ T.value = [
679
+ { label: "发件人", value: V(_.from) || "-" },
680
+ { label: "收件人", value: V(_.to) || "-" },
681
681
  { label: "主题", value: _.subject || "-" },
682
682
  { label: "时间", value: _.date || "-" }
683
- ], T.value = _.text || "";
684
- const L = _.attachments, Y = _.html ? await se(_.html) : "";
685
- F.value = Y ? st(Y, L) : "";
683
+ ], C.value = _.text || "";
684
+ const U = _.attachments, q = _.html ? await de(_.html) : "";
685
+ B.value = q ? st(q, U) : "";
686
686
  }
687
- async function ft(a, h) {
688
- if (await De(), !q(a)) return;
687
+ async function ft(i, w) {
688
+ if (await Te(), !K(i)) return;
689
689
  const _ = t.docxContainer.value;
690
690
  if (!_) throw new Error("DOCX 预览容器未就绪");
691
- const E = await import("./docx-preview.min-lCFRKxYn.js").then((L) => L.d);
692
- _.replaceChildren(), await E.renderAsync(await p(h), _, void 0, {
691
+ const V = await import("./docx-preview.min-lCFRKxYn.js").then((U) => U.d);
692
+ _.replaceChildren(), await V.renderAsync(await y(w), _, void 0, {
693
693
  breakPages: !0,
694
694
  ignoreWidth: !1,
695
695
  inWrapper: !0
696
696
  });
697
697
  }
698
- async function pt(a, h, _) {
699
- if (a === "text" && (C.value = await V(_)), a === "json" && (C.value = rt(await V(_))), a === "xml" && (C.value = await V(_)), a === "csv") {
700
- const E = ut(await V(_)), L = ce(), Y = ve();
701
- c.value = E.length > L || E.some((I) => I.length > Y), w.value = E.slice(0, L).map((I) => ({
702
- cells: I.slice(0, Y)
698
+ async function pt(i, w, _) {
699
+ if (i === "text" && (S.value = await H(_)), i === "json" && (S.value = rt(await H(_))), i === "xml" && (S.value = await H(_)), i === "csv") {
700
+ const V = ut(await H(_)), U = se(), q = ge();
701
+ c.value = V.length > U || V.some((W) => W.length > q), b.value = V.slice(0, U).map((W) => ({
702
+ cells: W.slice(0, q)
703
703
  }));
704
704
  }
705
- a === "markdown" && await ee(_), a === "html" && await he(_), a === "spreadsheet" && await ct(_), a === "eml" && await dt(_), a === "docx" && await ft(h, _);
705
+ i === "markdown" && await le(_), i === "html" && await we(_), i === "spreadsheet" && await ct(_), i === "eml" && await dt(_), i === "docx" && await ft(w, _);
706
706
  }
707
- async function Ie() {
707
+ async function Ye() {
708
708
  oe();
709
- const a = d.value;
710
- if (a === void 0 || a === "") return;
711
- const h = mo(a, o.fileName, o.fileType);
712
- if (b.value = { kind: h, fileName: f.value }, k.value = Te(), h === "unsupported") {
713
- s.value = "unsupported", e("unsupported", {
714
- kind: h,
709
+ const i = f.value;
710
+ if (i === void 0 || i === "") return;
711
+ const w = po(i, o.fileName, o.fileType);
712
+ if (p.value = { kind: w, fileName: v.value }, x.value = Q(), w === "unsupported") {
713
+ n.value = "unsupported", e("unsupported", {
714
+ kind: w,
715
715
  message: "该文件类型暂不支持在线预览"
716
716
  });
717
717
  return;
718
718
  }
719
719
  const _ = Fe();
720
- s.value = "loading";
720
+ n.value = "loading";
721
721
  try {
722
- if (["image", "pdf", "video", "audio"].includes(h))
723
- s.value = "ready";
722
+ if (["image", "pdf", "video", "audio"].includes(w))
723
+ n.value = "ready";
724
724
  else {
725
- if (await pt(h, _.token, _.signal), !q(_.token)) return;
726
- s.value = "ready";
725
+ if (await pt(w, _.token, _.signal), !K(_.token)) return;
726
+ n.value = "ready";
727
727
  }
728
- e("load", { kind: h, fileName: f.value });
729
- } catch (E) {
730
- if (!q(_.token)) return;
731
- s.value = "error", m.value = E instanceof Error ? E.message : "文件预览失败", e("error", { kind: h, message: m.value, cause: E });
728
+ e("load", { kind: w, fileName: v.value });
729
+ } catch (V) {
730
+ if (!K(_.token)) return;
731
+ n.value = "error", m.value = V instanceof Error ? V.message : "文件预览失败", e("error", { kind: w, message: m.value, cause: V });
732
732
  }
733
733
  }
734
- return _e(
734
+ return ke(
735
735
  () => [o.source, o.url, o.fileName, o.fileType],
736
736
  () => {
737
- Ie();
737
+ Ye();
738
738
  },
739
739
  { immediate: !0 }
740
- ), Se(() => {
741
- P.value += 1, J(), D();
740
+ ), Ce(() => {
741
+ P.value += 1, G(), D();
742
742
  }), {
743
- displayUrl: k,
744
- emailHtml: F,
745
- emailMeta: $,
746
- emailText: T,
743
+ displayUrl: x,
744
+ emailHtml: B,
745
+ emailMeta: T,
746
+ emailText: C,
747
747
  errorMessage: m,
748
- fileName: f,
749
- htmlContent: y,
750
- isError: W,
751
- isLoading: M,
752
- isReady: U,
753
- isUnsupported: x,
748
+ fileName: v,
749
+ htmlContent: d,
750
+ isError: Y,
751
+ isLoading: E,
752
+ isReady: A,
753
+ isUnsupported: k,
754
754
  kind: l,
755
- load: Ie,
755
+ load: Ye,
756
756
  markdownHtml: g,
757
- status: s,
758
- tableRows: w,
759
- textContent: C,
757
+ status: n,
758
+ tableRows: b,
759
+ textContent: S,
760
760
  truncated: c
761
761
  };
762
762
  }
763
- const _o = ["aria-busy"], wo = {
763
+ const bo = ["aria-busy"], wo = {
764
764
  key: 0,
765
765
  class: "yee-ui-file-preview__header"
766
- }, ko = ["title"], xo = { class: "yee-ui-file-preview__header-actions" }, Co = ["aria-label", "aria-pressed"], So = ["aria-label", "aria-busy", "disabled"], $o = {
766
+ }, _o = ["title"], xo = { class: "yee-ui-file-preview__header-actions" }, ko = ["aria-label", "aria-pressed"], Co = ["aria-label", "aria-busy", "disabled"], So = {
767
767
  key: 1,
768
768
  class: "yee-ui-file-preview__download-error",
769
769
  role: "alert"
770
- }, To = {
770
+ }, $o = {
771
771
  key: 2,
772
772
  class: "yee-ui-file-preview__empty"
773
- }, Fo = {
773
+ }, To = {
774
774
  key: 3,
775
775
  class: "yee-ui-file-preview__loading"
776
776
  }, Bo = {
777
777
  key: 4,
778
778
  class: "yee-ui-file-preview__empty"
779
- }, Eo = {
779
+ }, Fo = {
780
780
  key: 5,
781
781
  class: "yee-ui-file-preview__empty"
782
- }, Ro = ["src", "alt"], Oo = ["src", "title"], Mo = ["src"], zo = ["src"], Vo = {
782
+ }, Eo = ["src", "alt"], Ro = ["src", "title"], Oo = ["src"], Mo = ["src"], Vo = {
783
783
  key: 4,
784
784
  class: "yee-ui-file-preview__text"
785
- }, No = ["innerHTML"], Po = ["srcdoc", "title"], Ho = {
785
+ }, zo = ["innerHTML"], No = ["srcdoc", "title"], Po = {
786
786
  key: 8,
787
787
  class: "yee-ui-file-preview__table-wrap"
788
- }, Lo = {
788
+ }, Ho = {
789
789
  key: 0,
790
790
  class: "yee-ui-file-preview__table"
791
- }, Ao = {
791
+ }, Lo = {
792
792
  key: 1,
793
793
  class: "yee-ui-file-preview__empty-inline"
794
- }, Uo = {
794
+ }, Ao = {
795
795
  key: 2,
796
796
  class: "yee-ui-file-preview__tip"
797
- }, jo = {
797
+ }, Uo = {
798
798
  key: 9,
799
799
  class: "yee-ui-file-preview__email"
800
- }, Do = {
800
+ }, jo = {
801
801
  key: 0,
802
802
  class: "yee-ui-file-preview__email-meta"
803
- }, Io = ["srcdoc", "title"], Yo = {
803
+ }, Io = ["srcdoc", "title"], Do = {
804
804
  key: 2,
805
805
  class: "yee-ui-file-preview__text"
806
- }, Wo = /* @__PURE__ */ te({
806
+ }, Yo = /* @__PURE__ */ ae({
807
807
  name: "YeeFilePreview",
808
808
  __name: "YeeFilePreview",
809
809
  props: {
@@ -821,77 +821,77 @@ const _o = ["aria-busy"], wo = {
821
821
  },
822
822
  emits: ["load", "error", "unsupported", "download"],
823
823
  setup(o, { emit: t }) {
824
- const e = o, s = t, m = Ce("previewContainer"), k = Ce("docxContainer"), g = z(!1), y = z(""), C = z(!1), {
825
- displayUrl: w,
826
- emailHtml: $,
827
- emailMeta: F,
828
- emailText: T,
824
+ const e = o, n = t, m = xe("previewContainer"), x = xe("docxContainer"), g = O(!1), d = O(""), S = O(!1), {
825
+ displayUrl: b,
826
+ emailHtml: T,
827
+ emailMeta: B,
828
+ emailText: C,
829
829
  errorMessage: c,
830
- fileName: b,
830
+ fileName: p,
831
831
  htmlContent: N,
832
832
  isError: P,
833
- isLoading: j,
834
- isReady: d,
835
- isUnsupported: f,
833
+ isLoading: I,
834
+ isReady: f,
835
+ isUnsupported: v,
836
836
  kind: l,
837
- markdownHtml: M,
838
- tableRows: U,
839
- textContent: W,
840
- truncated: x
841
- } = bo(e, { docxContainer: k }, s), D = u(() => e.height === void 0 || e.height === null || e.height === "" ? {} : {
837
+ markdownHtml: E,
838
+ tableRows: A,
839
+ textContent: Y,
840
+ truncated: k
841
+ } = go(e, { docxContainer: x }, n), D = u(() => e.height === void 0 || e.height === null || e.height === "" ? {} : {
842
842
  height: typeof e.height == "number" ? `${e.height}px` : e.height
843
- }), J = u(() => !!w.value), oe = u(() => ["image", "pdf", "video", "audio"].includes(l.value)), $e = u(() => l.value === "csv" || l.value === "spreadsheet"), Te = u(() => l.value === "eml");
844
- _e(
843
+ }), G = u(() => !!b.value), oe = u(() => ["image", "pdf", "video", "audio"].includes(l.value)), R = u(() => l.value === "csv" || l.value === "spreadsheet"), Q = u(() => l.value === "eml");
844
+ ke(
845
845
  () => [e.source, e.url, e.fileName, e.fileType],
846
846
  () => {
847
- y.value = "";
847
+ d.value = "";
848
848
  }
849
849
  );
850
- function ie() {
851
- s("error", {
850
+ function Z() {
851
+ n("error", {
852
852
  kind: l.value,
853
853
  message: "文件预览失败"
854
854
  });
855
855
  }
856
- async function ce() {
857
- if (!w.value || C.value) return;
858
- y.value = "", C.value = !0;
859
- let q = w.value, r = !1;
856
+ async function se() {
857
+ if (!b.value || S.value) return;
858
+ d.value = "", S.value = !0;
859
+ let K = b.value, r = !1;
860
860
  try {
861
- if (!/^(?:blob:|data:)/i.test(q)) {
862
- const V = await fetch(q);
863
- if (!V.ok) throw new Error(`文件下载失败(${V.status})`);
864
- q = URL.createObjectURL(await V.blob()), r = !0;
861
+ if (!/^(?:blob:|data:)/i.test(K)) {
862
+ const H = await fetch(K);
863
+ if (!H.ok) throw new Error(`文件下载失败(${H.status})`);
864
+ K = URL.createObjectURL(await H.blob()), r = !0;
865
865
  }
866
- const p = document.createElement("a");
867
- p.href = q, p.download = b.value, p.rel = "noopener noreferrer", document.body.appendChild(p), p.click(), p.remove(), r && window.setTimeout(() => URL.revokeObjectURL(q), 0), s("download");
868
- } catch (p) {
869
- y.value = p instanceof Error ? p.message : "文件下载失败", s("error", {
866
+ const y = document.createElement("a");
867
+ y.href = K, y.download = p.value, y.rel = "noopener noreferrer", document.body.appendChild(y), y.click(), y.remove(), r && window.setTimeout(() => URL.revokeObjectURL(K), 0), n("download");
868
+ } catch (y) {
869
+ d.value = y instanceof Error ? y.message : "文件下载失败", n("error", {
870
870
  kind: l.value,
871
- message: y.value,
872
- cause: p
871
+ message: d.value,
872
+ cause: y
873
873
  });
874
874
  } finally {
875
- C.value = !1;
875
+ S.value = !1;
876
876
  }
877
877
  }
878
- function ve() {
878
+ function ge() {
879
879
  g.value = document.fullscreenElement === m.value;
880
880
  }
881
- async function ye() {
882
- const q = m.value;
883
- if (q)
881
+ async function be() {
882
+ const K = m.value;
883
+ if (K)
884
884
  try {
885
- document.fullscreenElement === q ? await document.exitFullscreen() : q.requestFullscreen ? await q.requestFullscreen() : g.value = !g.value;
885
+ document.fullscreenElement === K ? await document.exitFullscreen() : K.requestFullscreen ? await K.requestFullscreen() : g.value = !g.value;
886
886
  } catch (r) {
887
- s("error", {
887
+ n("error", {
888
888
  kind: l.value,
889
889
  message: "无法切换全屏",
890
890
  cause: r
891
891
  });
892
892
  }
893
893
  }
894
- function Fe(q) {
894
+ function Fe(K) {
895
895
  return {
896
896
  audio: "音频",
897
897
  csv: "CSV",
@@ -907,159 +907,159 @@ const _o = ["aria-busy"], wo = {
907
907
  unsupported: "文件",
908
908
  video: "视频",
909
909
  xml: "XML"
910
- }[q];
910
+ }[K];
911
911
  }
912
- return Me(() => {
913
- document.addEventListener("fullscreenchange", ve);
914
- }), Se(() => {
915
- document.removeEventListener("fullscreenchange", ve), document.fullscreenElement === m.value && document.exitFullscreen().catch(() => {
912
+ return Re(() => {
913
+ document.addEventListener("fullscreenchange", ge);
914
+ }), Ce(() => {
915
+ document.removeEventListener("fullscreenchange", ge), document.fullscreenElement === m.value && document.exitFullscreen().catch(() => {
916
916
  });
917
- }), (q, r) => (n(), v("section", {
917
+ }), (K, r) => (a(), h("section", {
918
918
  ref_key: "previewContainer",
919
919
  ref: m,
920
- class: me([{ "yee-ui-file-preview--fullscreen": g.value }, "yee-ui-file-preview"]),
921
- style: be(D.value),
922
- "aria-busy": i(j)
920
+ class: ye([{ "yee-ui-file-preview--fullscreen": g.value }, "yee-ui-file-preview"]),
921
+ style: he(D.value),
922
+ "aria-busy": s(I)
923
923
  }, [
924
- o.showHeader && J.value ? (n(), v("header", wo, [
925
- B("div", {
924
+ o.showHeader && G.value ? (a(), h("header", wo, [
925
+ F("div", {
926
926
  class: "yee-ui-file-preview__name",
927
- title: i(b)
928
- }, A(i(b)), 9, ko),
929
- B("div", xo, [
930
- Z(i(ue), {
927
+ title: s(p)
928
+ }, j(s(p)), 9, _o),
929
+ F("div", xo, [
930
+ ne(s(ue), {
931
931
  title: g.value ? "退出全屏" : "进入全屏"
932
932
  }, {
933
- default: S(() => [
934
- B("button", {
933
+ default: $(() => [
934
+ F("button", {
935
935
  "aria-label": g.value ? "退出全屏" : "进入全屏",
936
936
  "aria-pressed": g.value,
937
937
  class: "yee-ui-file-preview__header-action",
938
938
  type: "button",
939
- onClick: ye
939
+ onClick: be
940
940
  }, [
941
- g.value ? (n(), R(i(tt), { key: 0 })) : (n(), R(i(ot), { key: 1 }))
942
- ], 8, Co)
941
+ g.value ? (a(), M(s(tt), { key: 0 })) : (a(), M(s(ot), { key: 1 }))
942
+ ], 8, ko)
943
943
  ]),
944
944
  _: 1
945
945
  }, 8, ["title"]),
946
- o.showDownload ? (n(), R(i(ue), {
946
+ o.showDownload ? (a(), M(s(ue), {
947
947
  key: 0,
948
- title: C.value ? "下载中..." : "下载"
948
+ title: S.value ? "下载中..." : "下载"
949
949
  }, {
950
- default: S(() => [
951
- B("button", {
952
- "aria-label": C.value ? "下载中" : "下载",
953
- "aria-busy": C.value,
950
+ default: $(() => [
951
+ F("button", {
952
+ "aria-label": S.value ? "下载中" : "下载",
953
+ "aria-busy": S.value,
954
954
  class: "yee-ui-file-preview__header-action",
955
- disabled: C.value,
955
+ disabled: S.value,
956
956
  type: "button",
957
- onClick: r[0] || (r[0] = (p) => {
958
- ce();
957
+ onClick: r[0] || (r[0] = (y) => {
958
+ se();
959
959
  })
960
960
  }, [
961
- Z(i(Mt))
962
- ], 8, So)
961
+ ne(s(Mt))
962
+ ], 8, Co)
963
963
  ]),
964
964
  _: 1
965
- }, 8, ["title"])) : O("", !0)
965
+ }, 8, ["title"])) : z("", !0)
966
966
  ])
967
- ])) : O("", !0),
968
- y.value ? (n(), v("div", $o, A(y.value), 1)) : O("", !0),
969
- J.value ? i(j) && !oe.value && i(l) !== "docx" ? (n(), v("div", Fo, "文件加载中...")) : i(P) ? (n(), v("div", Bo, [
970
- B("span", null, A(i(c) || "文件预览失败"), 1),
971
- o.showDownload ? (n(), v("button", {
967
+ ])) : z("", !0),
968
+ d.value ? (a(), h("div", So, j(d.value), 1)) : z("", !0),
969
+ G.value ? s(I) && !oe.value && s(l) !== "docx" ? (a(), h("div", To, "文件加载中...")) : s(P) ? (a(), h("div", Bo, [
970
+ F("span", null, j(s(c) || "文件预览失败"), 1),
971
+ o.showDownload ? (a(), h("button", {
972
972
  key: 0,
973
973
  class: "yee-ui-file-preview__retry",
974
974
  type: "button",
975
- onClick: r[1] || (r[1] = (p) => {
976
- ce();
975
+ onClick: r[1] || (r[1] = (y) => {
976
+ se();
977
977
  })
978
- }, " 下载查看 ")) : O("", !0)
979
- ])) : i(f) ? (n(), v("div", Eo, [
980
- B("span", null, "暂不支持预览 " + A(Fe(i(l))) + " 文件", 1),
981
- o.showDownload ? (n(), v("button", {
978
+ }, " 下载查看 ")) : z("", !0)
979
+ ])) : s(v) ? (a(), h("div", Fo, [
980
+ F("span", null, "暂不支持预览 " + j(Fe(s(l))) + " 文件", 1),
981
+ o.showDownload ? (a(), h("button", {
982
982
  key: 0,
983
983
  class: "yee-ui-file-preview__retry",
984
984
  type: "button",
985
- onClick: r[2] || (r[2] = (p) => {
986
- ce();
985
+ onClick: r[2] || (r[2] = (y) => {
986
+ se();
987
987
  })
988
- }, " 下载查看 ")) : O("", !0)
989
- ])) : i(d) || oe.value || i(l) === "docx" ? (n(), v(ge, { key: 6 }, [
990
- i(l) === "image" ? (n(), v("img", {
988
+ }, " 下载查看 ")) : z("", !0)
989
+ ])) : s(f) || oe.value || s(l) === "docx" ? (a(), h(_e, { key: 6 }, [
990
+ s(l) === "image" ? (a(), h("img", {
991
991
  key: 0,
992
992
  class: "yee-ui-file-preview__image",
993
- src: i(w),
993
+ src: s(b),
994
994
  alt: o.alt,
995
- onError: ie
996
- }, null, 40, Ro)) : i(l) === "pdf" ? (n(), v("iframe", {
995
+ onError: Z
996
+ }, null, 40, Eo)) : s(l) === "pdf" ? (a(), h("iframe", {
997
997
  key: 1,
998
998
  class: "yee-ui-file-preview__frame",
999
- src: i(w),
999
+ src: s(b),
1000
1000
  title: o.alt,
1001
- onError: ie
1002
- }, null, 40, Oo)) : i(l) === "video" ? (n(), v("video", {
1001
+ onError: Z
1002
+ }, null, 40, Ro)) : s(l) === "video" ? (a(), h("video", {
1003
1003
  key: 2,
1004
1004
  class: "yee-ui-file-preview__video",
1005
- src: i(w),
1005
+ src: s(b),
1006
1006
  controls: "",
1007
1007
  preload: "metadata",
1008
- onError: ie
1009
- }, " 您的浏览器不支持视频预览,请下载查看。 ", 40, Mo)) : i(l) === "audio" ? (n(), v("audio", {
1008
+ onError: Z
1009
+ }, " 您的浏览器不支持视频预览,请下载查看。 ", 40, Oo)) : s(l) === "audio" ? (a(), h("audio", {
1010
1010
  key: 3,
1011
1011
  class: "yee-ui-file-preview__audio",
1012
- src: i(w),
1012
+ src: s(b),
1013
1013
  controls: "",
1014
1014
  preload: "metadata",
1015
- onError: ie
1016
- }, null, 40, zo)) : i(l) === "text" || i(l) === "json" || i(l) === "xml" ? (n(), v("pre", Vo, A(i(W)), 1)) : i(l) === "markdown" ? (n(), v("article", {
1015
+ onError: Z
1016
+ }, null, 40, Mo)) : s(l) === "text" || s(l) === "json" || s(l) === "xml" ? (a(), h("pre", Vo, j(s(Y)), 1)) : s(l) === "markdown" ? (a(), h("article", {
1017
1017
  key: 5,
1018
1018
  class: "yee-ui-file-preview__markdown",
1019
- innerHTML: i(M)
1020
- }, null, 8, No)) : i(l) === "html" ? (n(), v("iframe", {
1019
+ innerHTML: s(E)
1020
+ }, null, 8, zo)) : s(l) === "html" ? (a(), h("iframe", {
1021
1021
  key: 6,
1022
1022
  class: "yee-ui-file-preview__frame yee-ui-file-preview__frame--html",
1023
- srcdoc: i(N),
1023
+ srcdoc: s(N),
1024
1024
  sandbox: "",
1025
1025
  title: o.alt
1026
- }, null, 8, Po)) : i(l) === "docx" ? (n(), v("div", {
1026
+ }, null, 8, No)) : s(l) === "docx" ? (a(), h("div", {
1027
1027
  key: 7,
1028
1028
  ref_key: "docxContainer",
1029
- ref: k,
1029
+ ref: x,
1030
1030
  class: "yee-ui-file-preview__docx"
1031
- }, null, 512)) : $e.value ? (n(), v("div", Ho, [
1032
- i(U).length ? (n(), v("table", Lo, [
1033
- B("tbody", null, [
1034
- (n(!0), v(ge, null, ke(i(U), (p, V) => (n(), v("tr", { key: V }, [
1035
- (n(!0), v(ge, null, ke(p.cells, (se, ee) => (n(), v("td", {
1036
- key: `${V}-${ee}`
1037
- }, A(se), 1))), 128))
1031
+ }, null, 512)) : R.value ? (a(), h("div", Po, [
1032
+ s(A).length ? (a(), h("table", Ho, [
1033
+ F("tbody", null, [
1034
+ (a(!0), h(_e, null, $e(s(A), (y, H) => (a(), h("tr", { key: H }, [
1035
+ (a(!0), h(_e, null, $e(y.cells, (de, le) => (a(), h("td", {
1036
+ key: `${H}-${le}`
1037
+ }, j(de), 1))), 128))
1038
1038
  ]))), 128))
1039
1039
  ])
1040
- ])) : (n(), v("div", Ao, "暂无可展示的数据")),
1041
- i(x) ? (n(), v("div", Uo, "预览内容已截断,可下载查看完整文件。")) : O("", !0)
1042
- ])) : Te.value ? (n(), v("div", jo, [
1043
- i(F).length ? (n(), v("dl", Do, [
1044
- (n(!0), v(ge, null, ke(i(F), (p) => (n(), v(ge, {
1045
- key: p.label
1040
+ ])) : (a(), h("div", Lo, "暂无可展示的数据")),
1041
+ s(k) ? (a(), h("div", Ao, "预览内容已截断,可下载查看完整文件。")) : z("", !0)
1042
+ ])) : Q.value ? (a(), h("div", Uo, [
1043
+ s(B).length ? (a(), h("dl", jo, [
1044
+ (a(!0), h(_e, null, $e(s(B), (y) => (a(), h(_e, {
1045
+ key: y.label
1046
1046
  }, [
1047
- B("dt", null, A(p.label), 1),
1048
- B("dd", null, A(p.value), 1)
1047
+ F("dt", null, j(y.label), 1),
1048
+ F("dd", null, j(y.value), 1)
1049
1049
  ], 64))), 128))
1050
- ])) : O("", !0),
1051
- i($) ? (n(), v("iframe", {
1050
+ ])) : z("", !0),
1051
+ s(T) ? (a(), h("iframe", {
1052
1052
  key: 1,
1053
1053
  class: "yee-ui-file-preview__frame yee-ui-file-preview__frame--email",
1054
- srcdoc: i($),
1054
+ srcdoc: s(T),
1055
1055
  sandbox: "",
1056
1056
  title: o.alt
1057
- }, null, 8, Io)) : (n(), v("pre", Yo, A(i(T) || "暂无可展示的邮件正文"), 1))
1058
- ])) : O("", !0)
1059
- ], 64)) : O("", !0) : (n(), v("div", To, "请选择文件"))
1060
- ], 14, _o));
1057
+ }, null, 8, Io)) : (a(), h("pre", Do, j(s(C) || "暂无可展示的邮件正文"), 1))
1058
+ ])) : z("", !0)
1059
+ ], 64)) : z("", !0) : (a(), h("div", $o, "请选择文件"))
1060
+ ], 14, bo));
1061
1061
  }
1062
- }), An = /* @__PURE__ */ le(Wo, [["__scopeId", "data-v-2a474289"]]), qo = { class: "yee-ui-form__fields" }, Go = { class: "yee-ui-form__label" }, Ko = { class: "yee-ui-form__actions" }, Jo = /* @__PURE__ */ te({
1062
+ }), An = /* @__PURE__ */ ce(Yo, [["__scopeId", "data-v-2a474289"]]), Wo = { class: "yee-ui-form__fields" }, qo = { class: "yee-ui-form__label" }, Go = { class: "yee-ui-form__actions" }, Ko = /* @__PURE__ */ ae({
1063
1063
  name: "YeeForm",
1064
1064
  __name: "YeeForm",
1065
1065
  props: {
@@ -1069,101 +1069,101 @@ const _o = ["aria-busy"], wo = {
1069
1069
  options: {}
1070
1070
  },
1071
1071
  setup(o) {
1072
- const t = o, e = St.RangePicker, s = z(t.options.collapsed ?? !0);
1072
+ const t = o, e = St.RangePicker, n = O(t.options.collapsed ?? !0);
1073
1073
  t.api.configure(t.options);
1074
- const m = u(() => t.api.schema.value.filter((T) => !T.hide));
1075
- function k(T) {
1076
- return t.api.getFieldValue(T.fieldName);
1074
+ const m = u(() => t.api.schema.value.filter((C) => !C.hide));
1075
+ function x(C) {
1076
+ return t.api.getFieldValue(C.fieldName);
1077
1077
  }
1078
- function g(T) {
1079
- const c = k(T);
1078
+ function g(C) {
1079
+ const c = x(C);
1080
1080
  return {
1081
- ...T.componentProps,
1081
+ ...C.componentProps,
1082
1082
  ...c === void 0 ? {} : { value: c }
1083
1083
  };
1084
1084
  }
1085
- function y(T, c) {
1086
- t.api.setFieldValue(T.fieldName, c), t.options.submitOnChange && w();
1085
+ function d(C, c) {
1086
+ t.api.setFieldValue(C.fieldName, c), t.options.submitOnChange && b();
1087
1087
  }
1088
- async function C() {
1088
+ async function S() {
1089
1089
  t.api.resetForm(), await t.onReset?.();
1090
1090
  }
1091
- async function w() {
1091
+ async function b() {
1092
1092
  await t.onSubmit?.(t.api.getValues());
1093
1093
  }
1094
- function $(T) {
1095
- T.key === "Enter" && t.options.submitOnEnter && (T.preventDefault(), w());
1094
+ function T(C) {
1095
+ C.key === "Enter" && t.options.submitOnEnter && (C.preventDefault(), b());
1096
1096
  }
1097
- function F() {
1098
- s.value = !s.value, t.options.handleCollapsedChange?.(s.value);
1097
+ function B() {
1098
+ n.value = !n.value, t.options.handleCollapsedChange?.(n.value);
1099
1099
  }
1100
- return (T, c) => (n(), v("form", {
1100
+ return (C, c) => (a(), h("form", {
1101
1101
  class: "yee-ui-form",
1102
- onKeydown: $,
1103
- onSubmit: yt(w, ["prevent"])
1102
+ onKeydown: T,
1103
+ onSubmit: yt(b, ["prevent"])
1104
1104
  }, [
1105
- B("div", qo, [
1106
- (n(!0), v(ge, null, ke(m.value, (b) => (n(), v("label", {
1107
- key: b.fieldName,
1105
+ F("div", Wo, [
1106
+ (a(!0), h(_e, null, $e(m.value, (p) => (a(), h("label", {
1107
+ key: p.fieldName,
1108
1108
  class: "yee-ui-form__field"
1109
1109
  }, [
1110
- B("span", Go, A(b.label), 1),
1111
- b.component === "Input" ? (n(), R(i($t), X({
1110
+ F("span", qo, j(p.label), 1),
1111
+ p.component === "Input" ? (a(), M(s($t), ee({
1112
1112
  key: 0,
1113
1113
  ref_for: !0
1114
- }, g(b), {
1115
- "onUpdate:value": (N) => y(b, N)
1116
- }), null, 16, ["onUpdate:value"])) : b.component === "Select" ? (n(), R(i(Oe), X({
1114
+ }, g(p), {
1115
+ "onUpdate:value": (N) => d(p, N)
1116
+ }), null, 16, ["onUpdate:value"])) : p.component === "Select" ? (a(), M(s(ze), ee({
1117
1117
  key: 1,
1118
1118
  ref_for: !0
1119
- }, g(b), {
1120
- "onUpdate:value": (N) => y(b, N)
1121
- }), null, 16, ["onUpdate:value"])) : (n(), R(i(e), X({
1119
+ }, g(p), {
1120
+ "onUpdate:value": (N) => d(p, N)
1121
+ }), null, 16, ["onUpdate:value"])) : (a(), M(s(e), ee({
1122
1122
  key: 2,
1123
1123
  ref_for: !0
1124
- }, g(b), {
1125
- "onUpdate:value": (N) => y(b, N)
1124
+ }, g(p), {
1125
+ "onUpdate:value": (N) => d(p, N)
1126
1126
  }), null, 16, ["onUpdate:value"]))
1127
1127
  ]))), 128))
1128
1128
  ]),
1129
- B("div", Ko, [
1130
- Z(i(ne), {
1129
+ F("div", Go, [
1130
+ ne(s(re), {
1131
1131
  "html-type": "button",
1132
- onClick: C
1132
+ onClick: S
1133
1133
  }, {
1134
- default: S(() => [...c[0] || (c[0] = [
1135
- ae(" 重置 ", -1)
1134
+ default: $(() => [...c[0] || (c[0] = [
1135
+ ie(" 重置 ", -1)
1136
1136
  ])]),
1137
1137
  _: 1
1138
1138
  }),
1139
- Z(i(ne), {
1139
+ ne(s(re), {
1140
1140
  type: "primary",
1141
1141
  "html-type": "submit"
1142
1142
  }, {
1143
- default: S(() => [...c[1] || (c[1] = [
1144
- ae(" 查询 ", -1)
1143
+ default: $(() => [...c[1] || (c[1] = [
1144
+ ie(" 查询 ", -1)
1145
1145
  ])]),
1146
1146
  _: 1
1147
1147
  }),
1148
- o.options.showCollapseButton ? (n(), R(i(ne), {
1148
+ o.options.showCollapseButton ? (a(), M(s(re), {
1149
1149
  key: 0,
1150
1150
  type: "link",
1151
1151
  "html-type": "button",
1152
- onClick: F
1152
+ onClick: B
1153
1153
  }, {
1154
- default: S(() => [
1155
- ae(A(s.value ? "展开" : "收起"), 1)
1154
+ default: $(() => [
1155
+ ie(j(n.value ? "展开" : "收起"), 1)
1156
1156
  ]),
1157
1157
  _: 1
1158
- })) : O("", !0)
1158
+ })) : z("", !0)
1159
1159
  ])
1160
1160
  ], 32));
1161
1161
  }
1162
- }), Qo = /* @__PURE__ */ le(Jo, [["__scopeId", "data-v-92583f28"]]);
1163
- class Xo {
1164
- schema = z([]);
1162
+ }), Jo = /* @__PURE__ */ ce(Ko, [["__scopeId", "data-v-92583f28"]]);
1163
+ class Qo {
1164
+ schema = O([]);
1165
1165
  initialValues = {};
1166
- values = Qe({});
1166
+ values = De({});
1167
1167
  configure(t) {
1168
1168
  this.schema.value = t.schema.map((e) => ({ ...e })), this.initialValues = { ...t.initialValues }, this.resetForm();
1169
1169
  }
@@ -1185,20 +1185,20 @@ class Xo {
1185
1185
  Object.assign(this.values, t);
1186
1186
  }
1187
1187
  updateSchema(t) {
1188
- const e = new Map(t.map((s) => [s.fieldName, s]));
1189
- this.schema.value = this.schema.value.map((s) => ({
1190
- ...s,
1191
- ...e.get(s.fieldName)
1188
+ const e = new Map(t.map((n) => [n.fieldName, n]));
1189
+ this.schema.value = this.schema.value.map((n) => ({
1190
+ ...n,
1191
+ ...e.get(n.fieldName)
1192
1192
  }));
1193
1193
  }
1194
1194
  }
1195
- class Zo {
1196
- formApi = new Xo();
1195
+ class Xo {
1196
+ formApi = new Qo();
1197
1197
  searchFormVisible;
1198
1198
  state;
1199
1199
  grid;
1200
1200
  constructor(t) {
1201
- this.state = z(t), this.searchFormVisible = z(t.showSearchForm ?? !0);
1201
+ this.state = O(t), this.searchFormVisible = O(t.showSearchForm ?? !0);
1202
1202
  }
1203
1203
  mount(t) {
1204
1204
  this.grid = t;
@@ -1229,30 +1229,167 @@ class Zo {
1229
1229
  this.grid = void 0;
1230
1230
  }
1231
1231
  }
1232
- const lt = /* @__PURE__ */ Symbol("yee-page-auto-content-height");
1233
- let Ke = !1;
1234
- const je = /* @__PURE__ */ new Set();
1232
+ const lt = /* @__PURE__ */ Symbol("yee-page-auto-content-height"), Zo = /* @__PURE__ */ ae({
1233
+ inheritAttrs: !1,
1234
+ name: "VxeTooltip",
1235
+ __name: "YeeGridTooltip",
1236
+ props: {
1237
+ content: {},
1238
+ enterDelay: {},
1239
+ enterable: { type: Boolean },
1240
+ height: {},
1241
+ isArrow: { type: Boolean, default: !0 },
1242
+ leaveDelay: {},
1243
+ maxHeight: {},
1244
+ maxWidth: {},
1245
+ minHeight: {},
1246
+ minWidth: {},
1247
+ modelValue: { type: Boolean },
1248
+ popupClassName: {},
1249
+ selector: {},
1250
+ theme: {},
1251
+ trigger: {},
1252
+ useHTML: { type: Boolean },
1253
+ width: {},
1254
+ zIndex: {}
1255
+ },
1256
+ emits: ["update:modelValue"],
1257
+ setup(o, { expose: t, emit: e }) {
1258
+ const n = o, m = Oe(), x = e, g = ue, d = De({ visible: !1 }), S = xe("tooltip"), b = O(), T = O(""), B = O(), C = O(!1);
1259
+ let c;
1260
+ function p(R) {
1261
+ if (!(R === void 0 || R === ""))
1262
+ return typeof R == "number" ? `${R}px` : R;
1263
+ }
1264
+ const N = u(() => {
1265
+ const R = b.value;
1266
+ return !R || !d.visible ? { display: "none" } : {
1267
+ height: `${Math.max(R.height, 1)}px`,
1268
+ left: `${R.left}px`,
1269
+ pointerEvents: "none",
1270
+ position: "fixed",
1271
+ top: `${R.top}px`,
1272
+ width: `${Math.max(R.width, 1)}px`
1273
+ };
1274
+ }), P = u(() => ({
1275
+ height: p(n.height),
1276
+ maxHeight: p(n.maxHeight),
1277
+ maxWidth: p(n.maxWidth),
1278
+ minHeight: p(n.minHeight),
1279
+ minWidth: p(n.minWidth),
1280
+ width: p(n.width)
1281
+ })), I = u(() => ({
1282
+ ...n.popupClassName ? { overlayClassName: n.popupClassName } : {},
1283
+ ...m.content ? {} : { title: String(T.value) },
1284
+ ...n.zIndex === void 0 ? {} : { zIndex: Number(n.zIndex) }
1285
+ }));
1286
+ function f(R) {
1287
+ return R.closest("body") ?? document.body;
1288
+ }
1289
+ function v(R) {
1290
+ return R || (typeof n.selector == "string" ? document.querySelector(n.selector) ?? void 0 : n.selector);
1291
+ }
1292
+ function l() {
1293
+ const R = B.value;
1294
+ if (!R?.isConnected)
1295
+ return Y();
1296
+ const Q = R.getBoundingClientRect();
1297
+ return b.value = {
1298
+ height: Q.height,
1299
+ left: Q.left,
1300
+ top: Q.top,
1301
+ width: Q.width
1302
+ }, Te(() => S.value?.forcePopupAlign?.());
1303
+ }
1304
+ function E(R, Q) {
1305
+ const Z = v(R);
1306
+ return Z ? (B.value = Z, T.value = Q ?? n.content ?? "", C.value = !0, d.visible = !0, x("update:modelValue", !0), l()) : Te();
1307
+ }
1308
+ function A(R, Q, Z) {
1309
+ const se = R.currentTarget instanceof HTMLElement ? R.currentTarget : void 0;
1310
+ return E(Q ?? se, Z);
1311
+ }
1312
+ function Y() {
1313
+ return C.value = !1, B.value = void 0, b.value = void 0, d.visible = !1, x("update:modelValue", !1), Te();
1314
+ }
1315
+ function k(R) {
1316
+ R && c && (clearTimeout(c), c = void 0), C.value = R;
1317
+ }
1318
+ function D() {
1319
+ return C.value;
1320
+ }
1321
+ function G() {
1322
+ d.visible && l();
1323
+ }
1324
+ function oe() {
1325
+ k(!1), n.enterable && (c = setTimeout(() => {
1326
+ c = void 0, C.value || Y();
1327
+ }, n.leaveDelay ?? 0));
1328
+ }
1329
+ return Re(() => {
1330
+ window.addEventListener("resize", G), window.addEventListener("scroll", G, !0), n.modelValue && E(void 0, n.content);
1331
+ }), Ce(() => {
1332
+ c && clearTimeout(c), window.removeEventListener("resize", G), window.removeEventListener("scroll", G, !0);
1333
+ }), t({
1334
+ close: Y,
1335
+ isActived: D,
1336
+ open: E,
1337
+ openByEvent: A,
1338
+ reactData: d,
1339
+ setActived: k,
1340
+ toVisible: E,
1341
+ updatePlacement: l
1342
+ }), (R, Q) => (a(), M(s(g), ee({ ref: "tooltip" }, I.value, {
1343
+ arrow: n.isArrow !== !1,
1344
+ "get-popup-container": f,
1345
+ open: d.visible,
1346
+ "overlay-inner-style": P.value,
1347
+ placement: "top"
1348
+ }), {
1349
+ title: $(() => [
1350
+ F("div", {
1351
+ onMouseenter: Q[0] || (Q[0] = (Z) => n.enterable && k(!0)),
1352
+ onMouseleave: oe
1353
+ }, [
1354
+ L(R.$slots, "content", {}, () => [
1355
+ ie(j(T.value), 1)
1356
+ ])
1357
+ ], 32)
1358
+ ]),
1359
+ default: $(() => [
1360
+ F("span", {
1361
+ "aria-hidden": "true",
1362
+ class: "yee-ui-grid-tooltip-anchor",
1363
+ style: he(N.value)
1364
+ }, null, 4)
1365
+ ]),
1366
+ _: 3
1367
+ }, 16, ["arrow", "open", "overlay-inner-style"]));
1368
+ }
1369
+ });
1370
+ let Je = !1;
1371
+ const Ie = /* @__PURE__ */ new Set();
1235
1372
  function en() {
1236
- const o = Be.modal.confirm.bind(Be.modal);
1237
- Be.modal.confirm = ((t, e, s) => {
1238
- const m = typeof t == "object" && t !== null ? t : typeof s == "object" && s !== null ? s : void 0;
1373
+ const o = Ee.modal.confirm.bind(Ee.modal);
1374
+ Ee.modal.confirm = ((t, e, n) => {
1375
+ const m = typeof t == "object" && t !== null ? t : typeof n == "object" && n !== null ? n : void 0;
1239
1376
  if ((typeof m?.className == "string" ? m.className.split(/\s+/) : []).includes("vxe-table--ignore-clear")) {
1240
- const g = [...je], y = g[g.length - 1];
1241
- if (y) {
1242
- const C = typeof m?.content == "string" ? m.content : String(m?.content ?? t);
1243
- return y(C);
1377
+ const g = [...Ie], d = g[g.length - 1];
1378
+ if (d) {
1379
+ const S = typeof m?.content == "string" ? m.content : String(m?.content ?? t);
1380
+ return d(S);
1244
1381
  }
1245
1382
  }
1246
- return o(t, e, s);
1383
+ return o(t, e, n);
1247
1384
  });
1248
1385
  }
1249
1386
  function tn(o) {
1250
- return je.add(o), () => je.delete(o);
1387
+ return Ie.add(o), () => Ie.delete(o);
1251
1388
  }
1252
1389
  function it() {
1253
- if (Ke) return;
1390
+ if (Je) return;
1254
1391
  [
1255
- Vt,
1392
+ zt,
1256
1393
  Nt,
1257
1394
  Pt,
1258
1395
  nt,
@@ -1261,14 +1398,14 @@ function it() {
1261
1398
  At,
1262
1399
  Ut,
1263
1400
  jt,
1264
- Dt,
1265
1401
  It,
1402
+ Dt,
1266
1403
  Yt,
1267
1404
  Wt,
1268
1405
  qt,
1269
1406
  Gt,
1270
- Kt
1271
- ].forEach((t) => Be.component(t)), en(), Ke = !0;
1407
+ Zo
1408
+ ].forEach((t) => Ee.component(t)), en(), Je = !0;
1272
1409
  }
1273
1410
  const on = {
1274
1411
  key: 1,
@@ -1276,7 +1413,7 @@ const on = {
1276
1413
  }, nn = { class: "yee-ui-grid__table-container" }, an = {
1277
1414
  key: 0,
1278
1415
  class: "yee-ui-grid__title"
1279
- }, ln = /* @__PURE__ */ te({
1416
+ }, ln = /* @__PURE__ */ ae({
1280
1417
  name: "YeeGrid",
1281
1418
  __name: "YeeGrid",
1282
1419
  props: {
@@ -1285,12 +1422,12 @@ const on = {
1285
1422
  tableTitleHelp: {}
1286
1423
  },
1287
1424
  setup(o) {
1288
- const t = o, e = ze(), s = Ce("gridRef"), m = Ee(Ve), k = Ee(lt, void 0), [g, y] = et.useModal();
1425
+ const t = o, e = Oe(), n = xe("gridRef"), m = Me(Ne), x = Me(lt, void 0), [g, d] = et.useModal();
1289
1426
  it();
1290
- const C = tn((f) => new Promise((l) => {
1427
+ const S = tn((v) => new Promise((l) => {
1291
1428
  g.confirm({
1292
1429
  title: "恢复默认列配置",
1293
- content: f,
1430
+ content: v,
1294
1431
  centered: !0,
1295
1432
  okText: "确认",
1296
1433
  cancelText: "取消",
@@ -1299,14 +1436,14 @@ const on = {
1299
1436
  onOk: () => l("confirm"),
1300
1437
  onCancel: () => l("cancel")
1301
1438
  });
1302
- })), w = u(() => t.api.state.value), $ = u(() => w.value.formOptions), F = u(() => !!(t.tableTitle || e["table-title"] || e["toolbar-actions"] || e["toolbar-tools"])), T = u(() => Object.keys(e).filter((f) => ![
1439
+ })), b = u(() => t.api.state.value), T = u(() => b.value.formOptions), B = u(() => !!(t.tableTitle || e["table-title"] || e["toolbar-actions"] || e["toolbar-tools"])), C = u(() => Object.keys(e).filter((v) => ![
1303
1440
  "empty",
1304
1441
  "loading",
1305
1442
  "table-title",
1306
1443
  "toolbar-actions",
1307
1444
  "toolbar-tools"
1308
- ].includes(f))), c = u(() => k?.value ?? !1), b = u(() => {
1309
- const f = w.value.gridOptions, l = f.proxyConfig, M = l?.ajax?.query, U = f.toolbarConfig, W = f.pagerConfig;
1445
+ ].includes(v))), c = u(() => x?.value ?? !1), p = u(() => {
1446
+ const v = b.value.gridOptions, l = v.proxyConfig, E = l?.ajax?.query, A = v.toolbarConfig, Y = v.pagerConfig;
1310
1447
  return {
1311
1448
  align: "left",
1312
1449
  border: "inner",
@@ -1315,20 +1452,20 @@ const on = {
1315
1452
  showOverflow: "tooltip",
1316
1453
  size: "medium",
1317
1454
  ...c.value ? { height: "auto" } : {},
1318
- ...f,
1455
+ ...v,
1319
1456
  columnConfig: {
1320
1457
  resizable: !0,
1321
- ...f.columnConfig
1458
+ ...v.columnConfig
1322
1459
  },
1323
- ...W ? {
1460
+ ...Y ? {
1324
1461
  pagerConfig: {
1325
1462
  pageSize: 20,
1326
1463
  pageSizes: [10, 20, 30, 50, 100, 200],
1327
1464
  layouts: ["Total", "Sizes", "Home", "PrevPage", "Number", "NextPage", "End"],
1328
- ...W,
1465
+ ...Y,
1329
1466
  slots: {
1330
1467
  sizes: "pagerSizes",
1331
- ...W.slots
1468
+ ...Y.slots
1332
1469
  }
1333
1470
  }
1334
1471
  } : {},
@@ -1346,127 +1483,127 @@ const on = {
1346
1483
  ...l.ajax ? {
1347
1484
  ajax: {
1348
1485
  ...l.ajax,
1349
- ...M ? {
1350
- query: (x) => M(x, t.api.formApi.getValues())
1486
+ ...E ? {
1487
+ query: (k) => E(k, t.api.formApi.getValues())
1351
1488
  } : {}
1352
1489
  }
1353
1490
  } : {}
1354
1491
  }
1355
1492
  } : {},
1356
- ...U || F.value ? {
1493
+ ...A || B.value ? {
1357
1494
  toolbarConfig: {
1358
1495
  custom: !0,
1359
1496
  refresh: !0,
1360
1497
  zoom: !0,
1361
- ...U,
1498
+ ...A,
1362
1499
  slots: {
1363
1500
  ...t.tableTitle || e["table-title"] || e["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
1364
- ...e["toolbar-tools"] || U?.search ? { tools: "toolbarTools" } : {}
1501
+ ...e["toolbar-tools"] || A?.search ? { tools: "toolbarTools" } : {}
1365
1502
  }
1366
1503
  }
1367
1504
  } : {}
1368
1505
  };
1369
- }), N = u(() => w.value.gridEvents ?? {});
1370
- _e(
1506
+ }), N = u(() => b.value.gridEvents ?? {});
1507
+ ke(
1371
1508
  () => m?.value.mode ?? "light",
1372
- (f) => Be.setTheme(f),
1509
+ (v) => Ee.setTheme(v),
1373
1510
  { immediate: !0 }
1374
1511
  );
1375
1512
  async function P() {
1376
1513
  await t.api.reload();
1377
1514
  }
1378
- async function j() {
1515
+ async function I() {
1379
1516
  await t.api.reload();
1380
1517
  }
1381
- function d(f, l) {
1382
- typeof l != "number" && typeof l != "string" || f.setPageSizeByEvent(new Event("change"), l);
1518
+ function f(v, l) {
1519
+ typeof l != "number" && typeof l != "string" || v.setPageSizeByEvent(new Event("change"), l);
1383
1520
  }
1384
- return Me(() => {
1385
- s.value && t.api.mount(s.value);
1521
+ return Re(() => {
1522
+ n.value && t.api.mount(n.value);
1386
1523
  }), ht(() => {
1387
- C(), t.api.unmount();
1388
- }), (f, l) => (n(), v("section", {
1389
- class: me(["yee-ui-grid", { "yee-ui-grid--fill-page-content": c.value }])
1524
+ S(), t.api.unmount();
1525
+ }), (v, l) => (a(), h("section", {
1526
+ class: ye(["yee-ui-grid", { "yee-ui-grid--fill-page-content": c.value }])
1390
1527
  }, [
1391
- $.value ? gt((n(), R(Qo, {
1528
+ T.value ? gt((a(), M(Jo, {
1392
1529
  key: 0,
1393
1530
  api: o.api.formApi,
1394
- options: $.value,
1395
- "on-reset": j,
1531
+ options: T.value,
1532
+ "on-reset": I,
1396
1533
  "on-submit": P
1397
1534
  }, null, 8, ["api", "options"])), [
1398
1535
  [bt, o.api.searchFormVisible.value]
1399
- ]) : O("", !0),
1400
- $.value && w.value.separator !== !1 ? (n(), v("div", on)) : O("", !0),
1401
- B("div", nn, [
1402
- Z(i(nt), X({
1536
+ ]) : z("", !0),
1537
+ T.value && b.value.separator !== !1 ? (a(), h("div", on)) : z("", !0),
1538
+ F("div", nn, [
1539
+ ne(s(nt), ee({
1403
1540
  ref_key: "gridRef",
1404
- ref: s,
1541
+ ref: n,
1405
1542
  class: "yee-ui-grid__table"
1406
- }, b.value, _t(N.value)), Re({
1407
- toolbarActions: S((M) => [
1408
- H(f.$slots, "table-title", {}, () => [
1409
- o.tableTitle ? (n(), v("div", an, [
1410
- ae(A(o.tableTitle) + " ", 1),
1411
- o.tableTitleHelp ? (n(), R(i(ue), {
1543
+ }, p.value, wt(N.value)), Ve({
1544
+ toolbarActions: $((E) => [
1545
+ L(v.$slots, "table-title", {}, () => [
1546
+ o.tableTitle ? (a(), h("div", an, [
1547
+ ie(j(o.tableTitle) + " ", 1),
1548
+ o.tableTitleHelp ? (a(), M(s(ue), {
1412
1549
  key: 0,
1413
1550
  title: o.tableTitleHelp
1414
1551
  }, {
1415
- default: S(() => [...l[0] || (l[0] = [
1416
- B("span", {
1552
+ default: $(() => [...l[0] || (l[0] = [
1553
+ F("span", {
1417
1554
  class: "yee-ui-grid__help",
1418
1555
  tabindex: "0"
1419
1556
  }, "?", -1)
1420
1557
  ])]),
1421
1558
  _: 1
1422
- }, 8, ["title"])) : O("", !0)
1423
- ])) : O("", !0)
1559
+ }, 8, ["title"])) : z("", !0)
1560
+ ])) : z("", !0)
1424
1561
  ], !0),
1425
- H(f.$slots, "toolbar-actions", fe(pe(M)), void 0, !0)
1562
+ L(v.$slots, "toolbar-actions", ve(me(E)), void 0, !0)
1426
1563
  ]),
1427
- toolbarTools: S((M) => [
1428
- H(f.$slots, "toolbar-tools", fe(pe(M)), void 0, !0)
1564
+ toolbarTools: $((E) => [
1565
+ L(v.$slots, "toolbar-tools", ve(me(E)), void 0, !0)
1429
1566
  ]),
1430
- pagerSizes: S(({ $pager: M, options: U, pageSize: W }) => [
1431
- Z(i(Oe), {
1567
+ pagerSizes: $(({ $pager: E, options: A, pageSize: Y }) => [
1568
+ ne(s(ze), {
1432
1569
  class: "yee-ui-grid__page-size",
1433
- options: U,
1434
- value: W,
1435
- onChange: (x) => d(M, x)
1570
+ options: A,
1571
+ value: Y,
1572
+ onChange: (k) => f(E, k)
1436
1573
  }, null, 8, ["options", "value", "onChange"])
1437
1574
  ]),
1438
- empty: S(() => [
1439
- H(f.$slots, "empty", {}, () => [
1440
- l[1] || (l[1] = B("div", { class: "yee-ui-grid__empty" }, "暂无数据", -1))
1575
+ empty: $(() => [
1576
+ L(v.$slots, "empty", {}, () => [
1577
+ l[1] || (l[1] = F("div", { class: "yee-ui-grid__empty" }, "暂无数据", -1))
1441
1578
  ], !0)
1442
1579
  ]),
1443
1580
  _: 2
1444
1581
  }, [
1445
- ke(T.value, (M) => ({
1446
- name: M,
1447
- fn: S((U) => [
1448
- H(f.$slots, M, fe(pe(U)), void 0, !0)
1582
+ $e(C.value, (E) => ({
1583
+ name: E,
1584
+ fn: $((A) => [
1585
+ L(v.$slots, E, ve(me(A)), void 0, !0)
1449
1586
  ])
1450
1587
  }))
1451
1588
  ]), 1040)
1452
1589
  ]),
1453
- Z(i(y))
1590
+ ne(s(d))
1454
1591
  ], 2));
1455
1592
  }
1456
- }), sn = /* @__PURE__ */ le(ln, [["__scopeId", "data-v-5645a49e"]]);
1593
+ }), sn = /* @__PURE__ */ ce(ln, [["__scopeId", "data-v-3c8e165d"]]);
1457
1594
  function Un(o) {
1458
1595
  it();
1459
- const t = new Zo(o), e = sn;
1460
- return [te({
1596
+ const t = new Xo(o), e = sn;
1597
+ return [ae({
1461
1598
  name: "YeeGrid",
1462
1599
  inheritAttrs: !1,
1463
1600
  props: {
1464
1601
  tableTitle: String,
1465
1602
  tableTitleHelp: String
1466
1603
  },
1467
- setup(m, { attrs: k, slots: g }) {
1468
- return Se(() => t.unmount()), () => Xe(e, {
1469
- ...k,
1604
+ setup(m, { attrs: x, slots: g }) {
1605
+ return Ce(() => t.unmount()), () => Xe(e, {
1606
+ ...x,
1470
1607
  api: t,
1471
1608
  ...m.tableTitle ? { tableTitle: m.tableTitle } : {},
1472
1609
  ...m.tableTitleHelp ? { tableTitleHelp: m.tableTitleHelp } : {}
@@ -1477,11 +1614,11 @@ function Un(o) {
1477
1614
  const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui-modal__title" }, dn = {
1478
1615
  key: 1,
1479
1616
  class: "yee-ui-modal__header-actions"
1480
- }, fn = { class: "yee-ui-modal__body" }, pn = { class: "yee-ui-modal__footer" }, mn = { class: "yee-ui-modal__header" }, vn = ["id"], yn = { class: "yee-ui-modal__title" }, hn = { class: "yee-ui-modal__header-actions" }, gn = { class: "yee-ui-modal__body" }, bn = { class: "yee-ui-modal__footer" }, _n = /* @__PURE__ */ te({
1617
+ }, fn = { class: "yee-ui-modal__body" }, pn = { class: "yee-ui-modal__footer" }, vn = { class: "yee-ui-modal__header" }, mn = ["id"], yn = { class: "yee-ui-modal__title" }, hn = { class: "yee-ui-modal__header-actions" }, gn = { class: "yee-ui-modal__body" }, bn = { class: "yee-ui-modal__footer" }, wn = /* @__PURE__ */ ae({
1481
1618
  inheritAttrs: !1,
1482
1619
  name: "YeeModal",
1483
1620
  __name: "YeeModal",
1484
- props: /* @__PURE__ */ Ue({
1621
+ props: /* @__PURE__ */ je({
1485
1622
  cancelButtonText: { default: "取消" },
1486
1623
  centered: { type: Boolean, default: !1 },
1487
1624
  closable: { type: Boolean, default: !0 },
@@ -1503,16 +1640,16 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1503
1640
  open: { type: Boolean, default: !1 },
1504
1641
  openModifiers: {}
1505
1642
  }),
1506
- emits: /* @__PURE__ */ Ue(["cancel", "close", "confirm", "update:fullscreen"], ["update:open"]),
1643
+ emits: /* @__PURE__ */ je(["cancel", "close", "confirm", "update:fullscreen"], ["update:open"]),
1507
1644
  setup(o, { emit: t }) {
1508
- const e = o, s = t, m = Ae(o, "open"), k = Ae(e, "fullscreen"), g = Ze(), y = ze(), C = wt(), w = u(() => e.type === "drawer"), $ = u(() => !w.value && k.value), F = u(() => !!(e.title || y.header)), T = u(() => F.value || e.closable), c = u(() => F.value || e.fullscreenButton || e.closable), b = u(() => $.value ? "退出全屏" : "进入全屏"), N = u(() => {
1645
+ const e = o, n = t, m = Ue(o, "open"), x = Ue(e, "fullscreen"), g = Ze(), d = Oe(), S = _t(), b = u(() => e.type === "drawer"), T = u(() => !b.value && x.value), B = u(() => !!(e.title || d.header)), C = u(() => B.value || e.closable), c = u(() => B.value || e.fullscreenButton || e.closable), p = u(() => T.value ? "退出全屏" : "进入全屏"), N = u(() => {
1509
1646
  const D = Object.prototype.hasOwnProperty.call(e.wrapProps ?? {}, "aria-labelledby");
1510
1647
  return {
1511
1648
  ...e.wrapProps,
1512
- "aria-labelledby": D ? e.wrapProps?.["aria-labelledby"] : F.value ? C : void 0
1649
+ "aria-labelledby": D ? e.wrapProps?.["aria-labelledby"] : B.value ? S : void 0
1513
1650
  };
1514
1651
  }), P = u(() => {
1515
- if ($.value)
1652
+ if (T.value)
1516
1653
  return {
1517
1654
  height: "100%",
1518
1655
  margin: 0,
@@ -1522,203 +1659,203 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1522
1659
  width: "100vw"
1523
1660
  };
1524
1661
  });
1525
- function j() {
1526
- const { style: D, ...J } = g;
1527
- return J;
1662
+ function I() {
1663
+ const { style: D, ...G } = g;
1664
+ return G;
1528
1665
  }
1529
- function d() {
1666
+ function f() {
1530
1667
  return [g.style, e.style].filter(Boolean);
1531
1668
  }
1532
- function f() {
1669
+ function v() {
1533
1670
  return [g.style, e.style, P.value].filter(Boolean);
1534
1671
  }
1535
- const l = () => y.closeIcon?.() ?? g.closeIcon ?? Xe(zt);
1536
- function M(D) {
1537
- s("cancel", D), m.value = !1;
1672
+ const l = () => d.closeIcon?.() ?? g.closeIcon ?? Xe(Vt);
1673
+ function E(D) {
1674
+ n("cancel", D), m.value = !1;
1538
1675
  }
1539
- function U(D) {
1540
- s("confirm", D);
1676
+ function A(D) {
1677
+ n("confirm", D);
1541
1678
  }
1542
- function W() {
1543
- s("close");
1679
+ function Y() {
1680
+ n("close");
1544
1681
  }
1545
- function x() {
1546
- k.value = !k.value;
1682
+ function k() {
1683
+ x.value = !x.value;
1547
1684
  }
1548
- return (D, J) => w.value ? (n(), R(i(Tt), X({ key: 0 }, j(), {
1685
+ return (D, G) => b.value ? (a(), M(s(Tt), ee({ key: 0 }, I(), {
1549
1686
  class: "yee-ui-modal-drawer",
1550
1687
  closable: !1,
1551
1688
  "destroy-on-close": e.destroyOnClose,
1552
1689
  keyboard: e.keyboard,
1553
1690
  "mask-closable": e.maskClosable,
1554
1691
  open: m.value,
1555
- style: d(),
1692
+ style: f(),
1556
1693
  width: e.width,
1557
- onAfterOpenChange: J[0] || (J[0] = (oe) => !oe && W()),
1558
- onClose: M
1559
- }), Re({
1560
- footer: S(() => [
1561
- B("div", pn, [
1562
- H(D.$slots, "footer", {}, () => [
1563
- e.showCancelButton ? (n(), R(i(ne), {
1694
+ onAfterOpenChange: G[0] || (G[0] = (oe) => !oe && Y()),
1695
+ onClose: E
1696
+ }), Ve({
1697
+ footer: $(() => [
1698
+ F("div", pn, [
1699
+ L(D.$slots, "footer", {}, () => [
1700
+ e.showCancelButton ? (a(), M(s(re), {
1564
1701
  key: 0,
1565
- onClick: M
1702
+ onClick: E
1566
1703
  }, {
1567
- default: S(() => [
1568
- ae(A(e.cancelButtonText), 1)
1704
+ default: $(() => [
1705
+ ie(j(e.cancelButtonText), 1)
1569
1706
  ]),
1570
1707
  _: 1
1571
- })) : O("", !0),
1572
- e.showConfirmButton ? (n(), R(i(ne), {
1708
+ })) : z("", !0),
1709
+ e.showConfirmButton ? (a(), M(s(re), {
1573
1710
  key: 1,
1574
1711
  loading: e.confirmButtonLoading,
1575
1712
  type: "primary",
1576
- onClick: U
1713
+ onClick: A
1577
1714
  }, {
1578
- default: S(() => [
1579
- ae(A(e.confirmButtonText), 1)
1715
+ default: $(() => [
1716
+ ie(j(e.confirmButtonText), 1)
1580
1717
  ]),
1581
1718
  _: 1
1582
- }, 8, ["loading"])) : O("", !0)
1719
+ }, 8, ["loading"])) : z("", !0)
1583
1720
  ], !0)
1584
1721
  ])
1585
1722
  ]),
1586
- default: S(() => [
1587
- B("div", fn, [
1588
- H(D.$slots, "default", {}, void 0, !0)
1723
+ default: $(() => [
1724
+ F("div", fn, [
1725
+ L(D.$slots, "default", {}, void 0, !0)
1589
1726
  ])
1590
1727
  ]),
1591
1728
  _: 2
1592
1729
  }, [
1593
- T.value ? {
1730
+ C.value ? {
1594
1731
  name: "title",
1595
- fn: S(() => [
1596
- B("div", rn, [
1597
- F.value ? (n(), v("div", {
1732
+ fn: $(() => [
1733
+ F("div", rn, [
1734
+ B.value ? (a(), h("div", {
1598
1735
  key: 0,
1599
- id: i(C),
1736
+ id: s(S),
1600
1737
  class: "yee-ui-modal__heading"
1601
1738
  }, [
1602
- H(D.$slots, "header", {}, () => [
1603
- B("span", cn, A(e.title), 1)
1739
+ L(D.$slots, "header", {}, () => [
1740
+ F("span", cn, j(e.title), 1)
1604
1741
  ], !0)
1605
- ], 8, un)) : O("", !0),
1606
- e.closable ? (n(), v("div", dn, [
1607
- Z(i(ne), {
1742
+ ], 8, un)) : z("", !0),
1743
+ e.closable ? (a(), h("div", dn, [
1744
+ ne(s(re), {
1608
1745
  "aria-label": "关闭",
1609
1746
  class: "yee-ui-modal__header-action",
1610
1747
  size: "small",
1611
1748
  type: "text",
1612
- onClick: M
1749
+ onClick: E
1613
1750
  }, {
1614
- default: S(() => [
1615
- Z(l)
1751
+ default: $(() => [
1752
+ ne(l)
1616
1753
  ]),
1617
1754
  _: 1
1618
1755
  })
1619
- ])) : O("", !0)
1756
+ ])) : z("", !0)
1620
1757
  ])
1621
1758
  ]),
1622
1759
  key: "0"
1623
1760
  } : void 0
1624
- ]), 1040, ["destroy-on-close", "keyboard", "mask-closable", "open", "style", "width"])) : (n(), R(i(et), X({ key: 1 }, j(), {
1625
- centered: $.value ? !1 : e.centered,
1761
+ ]), 1040, ["destroy-on-close", "keyboard", "mask-closable", "open", "style", "width"])) : (a(), M(s(et), ee({ key: 1 }, I(), {
1762
+ centered: T.value ? !1 : e.centered,
1626
1763
  class: {
1627
1764
  "yee-ui-modal": !0,
1628
- "yee-ui-modal--fullscreen": $.value
1765
+ "yee-ui-modal--fullscreen": T.value
1629
1766
  },
1630
1767
  closable: !1,
1631
1768
  "destroy-on-close": e.destroyOnClose,
1632
1769
  keyboard: e.keyboard,
1633
1770
  "mask-closable": e.maskClosable,
1634
1771
  open: m.value,
1635
- style: f(),
1636
- width: $.value ? "100vw" : e.width,
1772
+ style: v(),
1773
+ width: T.value ? "100vw" : e.width,
1637
1774
  "wrap-props": N.value,
1638
- onAfterClose: W,
1639
- onCancel: M
1640
- }), Re({
1641
- footer: S(() => [
1642
- B("div", bn, [
1643
- H(D.$slots, "footer", {}, () => [
1644
- e.showCancelButton ? (n(), R(i(ne), {
1775
+ onAfterClose: Y,
1776
+ onCancel: E
1777
+ }), Ve({
1778
+ footer: $(() => [
1779
+ F("div", bn, [
1780
+ L(D.$slots, "footer", {}, () => [
1781
+ e.showCancelButton ? (a(), M(s(re), {
1645
1782
  key: 0,
1646
- onClick: M
1783
+ onClick: E
1647
1784
  }, {
1648
- default: S(() => [
1649
- ae(A(e.cancelButtonText), 1)
1785
+ default: $(() => [
1786
+ ie(j(e.cancelButtonText), 1)
1650
1787
  ]),
1651
1788
  _: 1
1652
- })) : O("", !0),
1653
- e.showConfirmButton ? (n(), R(i(ne), {
1789
+ })) : z("", !0),
1790
+ e.showConfirmButton ? (a(), M(s(re), {
1654
1791
  key: 1,
1655
1792
  loading: e.confirmButtonLoading,
1656
1793
  type: "primary",
1657
- onClick: U
1794
+ onClick: A
1658
1795
  }, {
1659
- default: S(() => [
1660
- ae(A(e.confirmButtonText), 1)
1796
+ default: $(() => [
1797
+ ie(j(e.confirmButtonText), 1)
1661
1798
  ]),
1662
1799
  _: 1
1663
- }, 8, ["loading"])) : O("", !0)
1800
+ }, 8, ["loading"])) : z("", !0)
1664
1801
  ], !0)
1665
1802
  ])
1666
1803
  ]),
1667
- default: S(() => [
1668
- B("div", gn, [
1669
- H(D.$slots, "default", {}, void 0, !0)
1804
+ default: $(() => [
1805
+ F("div", gn, [
1806
+ L(D.$slots, "default", {}, void 0, !0)
1670
1807
  ])
1671
1808
  ]),
1672
1809
  _: 2
1673
1810
  }, [
1674
1811
  c.value ? {
1675
1812
  name: "title",
1676
- fn: S(() => [
1677
- B("div", mn, [
1678
- F.value ? (n(), v("div", {
1813
+ fn: $(() => [
1814
+ F("div", vn, [
1815
+ B.value ? (a(), h("div", {
1679
1816
  key: 0,
1680
- id: i(C),
1817
+ id: s(S),
1681
1818
  class: "yee-ui-modal__heading"
1682
1819
  }, [
1683
- H(D.$slots, "header", {}, () => [
1684
- B("span", yn, A(e.title), 1)
1820
+ L(D.$slots, "header", {}, () => [
1821
+ F("span", yn, j(e.title), 1)
1685
1822
  ], !0)
1686
- ], 8, vn)) : O("", !0),
1687
- B("div", hn, [
1688
- e.fullscreenButton ? (n(), R(i(ue), {
1823
+ ], 8, mn)) : z("", !0),
1824
+ F("div", hn, [
1825
+ e.fullscreenButton ? (a(), M(s(ue), {
1689
1826
  key: 0,
1690
- title: b.value
1827
+ title: p.value
1691
1828
  }, {
1692
- default: S(() => [
1693
- Z(i(ne), {
1694
- "aria-label": b.value,
1695
- "aria-pressed": $.value,
1829
+ default: $(() => [
1830
+ ne(s(re), {
1831
+ "aria-label": p.value,
1832
+ "aria-pressed": T.value,
1696
1833
  class: "yee-ui-modal__header-action",
1697
1834
  size: "small",
1698
1835
  type: "text",
1699
- onClick: x
1836
+ onClick: k
1700
1837
  }, {
1701
- default: S(() => [
1702
- $.value ? (n(), R(i(tt), { key: 0 })) : (n(), R(i(ot), { key: 1 }))
1838
+ default: $(() => [
1839
+ T.value ? (a(), M(s(tt), { key: 0 })) : (a(), M(s(ot), { key: 1 }))
1703
1840
  ]),
1704
1841
  _: 1
1705
1842
  }, 8, ["aria-label", "aria-pressed"])
1706
1843
  ]),
1707
1844
  _: 1
1708
- }, 8, ["title"])) : O("", !0),
1709
- e.closable ? (n(), R(i(ne), {
1845
+ }, 8, ["title"])) : z("", !0),
1846
+ e.closable ? (a(), M(s(re), {
1710
1847
  key: 1,
1711
1848
  "aria-label": "关闭",
1712
1849
  class: "yee-ui-modal__header-action",
1713
1850
  size: "small",
1714
1851
  type: "text",
1715
- onClick: M
1852
+ onClick: E
1716
1853
  }, {
1717
- default: S(() => [
1718
- Z(l)
1854
+ default: $(() => [
1855
+ ne(l)
1719
1856
  ]),
1720
1857
  _: 1
1721
- })) : O("", !0)
1858
+ })) : z("", !0)
1722
1859
  ])
1723
1860
  ])
1724
1861
  ]),
@@ -1726,16 +1863,16 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1726
1863
  } : void 0
1727
1864
  ]), 1040, ["centered", "class", "destroy-on-close", "keyboard", "mask-closable", "open", "style", "width", "wrap-props"]));
1728
1865
  }
1729
- }), jn = /* @__PURE__ */ le(_n, [["__scopeId", "data-v-6cb12c49"]]), wn = { class: "yee-ui-page__heading" }, kn = {
1866
+ }), jn = /* @__PURE__ */ ce(wn, [["__scopeId", "data-v-6cb12c49"]]), _n = { class: "yee-ui-page__heading" }, xn = {
1730
1867
  key: 0,
1731
1868
  class: "yee-ui-page__title"
1732
- }, xn = {
1869
+ }, kn = {
1733
1870
  key: 0,
1734
1871
  class: "yee-ui-page__description"
1735
1872
  }, Cn = {
1736
1873
  key: 0,
1737
1874
  class: "yee-ui-page__extra"
1738
- }, Sn = /* @__PURE__ */ te({
1875
+ }, Sn = /* @__PURE__ */ ae({
1739
1876
  name: "YeePage",
1740
1877
  __name: "YeePage",
1741
1878
  props: {
@@ -1748,81 +1885,81 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1748
1885
  title: {}
1749
1886
  },
1750
1887
  setup(o) {
1751
- const t = o, e = ze(), s = u(() => !!(t.description || t.title || e.description || e.extra || e.title)), m = u(() => t.autoContentHeight);
1752
- Je(lt, m);
1753
- const k = z(0), g = z(0), y = z(!1), C = Ce("headerRef"), w = Ce("footerRef");
1754
- let $;
1755
- function F() {
1756
- const P = C.value?.offsetHeight ?? 0, j = w.value?.offsetHeight ?? 0;
1757
- k.value !== P && (k.value = P), g.value !== j && (g.value = j);
1888
+ const t = o, e = Oe(), n = u(() => !!(t.description || t.title || e.description || e.extra || e.title)), m = u(() => t.autoContentHeight);
1889
+ Qe(lt, m);
1890
+ const x = O(0), g = O(0), d = O(!1), S = xe("headerRef"), b = xe("footerRef");
1891
+ let T;
1892
+ function B() {
1893
+ const P = S.value?.offsetHeight ?? 0, I = b.value?.offsetHeight ?? 0;
1894
+ x.value !== P && (x.value = P), g.value !== I && (g.value = I);
1758
1895
  }
1759
- function T() {
1760
- $?.disconnect(), $ = void 0, !(typeof ResizeObserver > "u") && ($ = new ResizeObserver(F), C.value && $.observe(C.value), w.value && $.observe(w.value));
1896
+ function C() {
1897
+ T?.disconnect(), T = void 0, !(typeof ResizeObserver > "u") && (T = new ResizeObserver(B), S.value && T.observe(S.value), b.value && T.observe(b.value));
1761
1898
  }
1762
1899
  async function c() {
1763
- if ($?.disconnect(), $ = void 0, !t.autoContentHeight) {
1764
- y.value = !1;
1900
+ if (T?.disconnect(), T = void 0, !t.autoContentHeight) {
1901
+ d.value = !1;
1765
1902
  return;
1766
1903
  }
1767
- await De(), F(), y.value = !0, T();
1904
+ await Te(), B(), d.value = !0, C();
1768
1905
  }
1769
- const b = u(() => ({
1906
+ const p = u(() => ({
1770
1907
  "--yee-page-height-offset": typeof t.heightOffset == "number" ? `${t.heightOffset}px` : t.heightOffset
1771
1908
  })), N = u(() => t.autoContentHeight ? {
1772
- height: `calc(100% - ${k.value}px - ${g.value}px)`,
1773
- overflowY: y.value ? "auto" : "hidden"
1909
+ height: `calc(100% - ${x.value}px - ${g.value}px)`,
1910
+ overflowY: d.value ? "auto" : "hidden"
1774
1911
  } : {});
1775
- return _e(
1776
- [() => t.autoContentHeight, s, () => !!e.footer],
1912
+ return ke(
1913
+ [() => t.autoContentHeight, n, () => !!e.footer],
1777
1914
  () => {
1778
1915
  c();
1779
1916
  },
1780
1917
  { flush: "post" }
1781
- ), Me(() => {
1918
+ ), Re(() => {
1782
1919
  c();
1783
- }), Se(() => $?.disconnect()), (P, j) => (n(), v("section", {
1784
- class: me(["yee-ui-page", { "yee-ui-page--auto-height": o.autoContentHeight }]),
1785
- style: be(b.value)
1920
+ }), Ce(() => T?.disconnect()), (P, I) => (a(), h("section", {
1921
+ class: ye(["yee-ui-page", { "yee-ui-page--auto-height": o.autoContentHeight }]),
1922
+ style: he(p.value)
1786
1923
  }, [
1787
- s.value ? (n(), v("header", {
1924
+ n.value ? (a(), h("header", {
1788
1925
  key: 0,
1789
1926
  ref_key: "headerRef",
1790
- ref: C,
1791
- class: me(["yee-ui-page__header", o.headerClass])
1927
+ ref: S,
1928
+ class: ye(["yee-ui-page__header", o.headerClass])
1792
1929
  }, [
1793
- B("div", wn, [
1794
- H(P.$slots, "title", {}, () => [
1795
- o.title ? (n(), v("h1", kn, A(o.title), 1)) : O("", !0)
1930
+ F("div", _n, [
1931
+ L(P.$slots, "title", {}, () => [
1932
+ o.title ? (a(), h("h1", xn, j(o.title), 1)) : z("", !0)
1796
1933
  ], !0),
1797
- H(P.$slots, "description", {}, () => [
1798
- o.description ? (n(), v("p", xn, A(o.description), 1)) : O("", !0)
1934
+ L(P.$slots, "description", {}, () => [
1935
+ o.description ? (a(), h("p", kn, j(o.description), 1)) : z("", !0)
1799
1936
  ], !0)
1800
1937
  ]),
1801
- P.$slots.extra ? (n(), v("div", Cn, [
1802
- H(P.$slots, "extra", {}, void 0, !0)
1803
- ])) : O("", !0)
1804
- ], 2)) : O("", !0),
1805
- B("main", {
1806
- class: me(["yee-ui-page__content", o.contentClass]),
1807
- style: be(N.value)
1938
+ P.$slots.extra ? (a(), h("div", Cn, [
1939
+ L(P.$slots, "extra", {}, void 0, !0)
1940
+ ])) : z("", !0)
1941
+ ], 2)) : z("", !0),
1942
+ F("main", {
1943
+ class: ye(["yee-ui-page__content", o.contentClass]),
1944
+ style: he(N.value)
1808
1945
  }, [
1809
- H(P.$slots, "default", {}, void 0, !0)
1946
+ L(P.$slots, "default", {}, void 0, !0)
1810
1947
  ], 6),
1811
- P.$slots.footer ? (n(), v("footer", {
1948
+ P.$slots.footer ? (a(), h("footer", {
1812
1949
  key: 1,
1813
1950
  ref_key: "footerRef",
1814
- ref: w,
1815
- class: me(["yee-ui-page__footer", o.footerClass])
1951
+ ref: b,
1952
+ class: ye(["yee-ui-page__footer", o.footerClass])
1816
1953
  }, [
1817
- H(P.$slots, "footer", {}, void 0, !0)
1818
- ], 2)) : O("", !0)
1954
+ L(P.$slots, "footer", {}, void 0, !0)
1955
+ ], 2)) : z("", !0)
1819
1956
  ], 6));
1820
1957
  }
1821
- }), Dn = /* @__PURE__ */ le(Sn, [["__scopeId", "data-v-ff8fc3a1"]]), $n = { class: "yee-ui-select__option-label" }, Tn = /* @__PURE__ */ te({
1958
+ }), In = /* @__PURE__ */ ce(Sn, [["__scopeId", "data-v-ff8fc3a1"]]), $n = { class: "yee-ui-select__option-label" }, Tn = /* @__PURE__ */ ae({
1822
1959
  inheritAttrs: !1,
1823
1960
  name: "YeeSelect",
1824
1961
  __name: "YeeSelect",
1825
- props: /* @__PURE__ */ Ue({
1962
+ props: /* @__PURE__ */ je({
1826
1963
  fieldNames: {},
1827
1964
  options: {}
1828
1965
  }, {
@@ -1831,118 +1968,118 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1831
1968
  }),
1832
1969
  emits: ["update:value"],
1833
1970
  setup(o) {
1834
- const t = o, e = Ae(o, "value"), s = Ze(), m = ze(), k = z(!1), g = u(() => ({
1971
+ const t = o, e = Ue(o, "value"), n = Ze(), m = Oe(), x = O(!1), g = u(() => ({
1835
1972
  label: t.fieldNames?.label ?? "label",
1836
1973
  options: t.fieldNames?.options ?? "options",
1837
1974
  value: t.fieldNames?.value ?? "value"
1838
- })), y = u(() => s.class), C = u(() => s.style), w = u(() => {
1839
- const d = {};
1840
- for (const [f, l] of Object.entries(s))
1841
- f !== "class" && f !== "style" && f !== "onDropdownVisibleChange" && (d[f] = l);
1842
- return d;
1843
- }), $ = u(() => !m.default && !m.option);
1844
- function F(d) {
1845
- const f = s.onDropdownVisibleChange;
1846
- if (typeof f == "function") {
1847
- f(d);
1975
+ })), d = u(() => n.class), S = u(() => n.style), b = u(() => {
1976
+ const f = {};
1977
+ for (const [v, l] of Object.entries(n))
1978
+ v !== "class" && v !== "style" && v !== "onDropdownVisibleChange" && (f[v] = l);
1979
+ return f;
1980
+ }), T = u(() => !m.default && !m.option);
1981
+ function B(f) {
1982
+ const v = n.onDropdownVisibleChange;
1983
+ if (typeof v == "function") {
1984
+ v(f);
1848
1985
  return;
1849
1986
  }
1850
- f?.forEach((l) => l?.(d));
1987
+ v?.forEach((l) => l?.(f));
1851
1988
  }
1852
- function T(d) {
1853
- k.value = d, F(d);
1989
+ function C(f) {
1990
+ x.value = f, B(f);
1854
1991
  }
1855
- function c(d) {
1856
- return typeof d == "number" || typeof d == "string" ? String(d) : "";
1992
+ function c(f) {
1993
+ return typeof f == "number" || typeof f == "string" ? String(f) : "";
1857
1994
  }
1858
- function b(d, f) {
1859
- if (d)
1860
- for (const l of d) {
1861
- const M = l[g.value.options], U = b(M, f);
1862
- if (U) return U;
1863
- const W = l[g.value.value];
1864
- if (W === f || String(W) === String(f)) return l;
1995
+ function p(f, v) {
1996
+ if (f)
1997
+ for (const l of f) {
1998
+ const E = l[g.value.options], A = p(E, v);
1999
+ if (A) return A;
2000
+ const Y = l[g.value.value];
2001
+ if (Y === v || String(Y) === String(v)) return l;
1865
2002
  }
1866
2003
  }
1867
- function N(d) {
1868
- return d ? c(d[g.value.label]) || c(d.title) || c(d[g.value.value]) : "";
2004
+ function N(f) {
2005
+ return f ? c(f[g.value.label]) || c(f.title) || c(f[g.value.value]) : "";
1869
2006
  }
1870
2007
  const P = u(() => {
1871
- const d = e.value;
1872
- if (!(d == null || d === ""))
1873
- return Array.isArray(d) ? d.map((f) => N(b(t.options, f)) || c(f)).filter(Boolean).join("、") || void 0 : N(b(t.options, d)) || c(d) || void 0;
2008
+ const f = e.value;
2009
+ if (!(f == null || f === ""))
2010
+ return Array.isArray(f) ? f.map((v) => N(p(t.options, v)) || c(v)).filter(Boolean).join("、") || void 0 : N(p(t.options, f)) || c(f) || void 0;
1874
2011
  });
1875
- function j(d) {
1876
- return N(d);
1877
- }
1878
- return (d, f) => (n(), R(i(ue), X(k.value ? { open: !1 } : {}, { title: P.value }), {
1879
- default: S(() => [
1880
- B("div", {
1881
- class: me(["yee-ui-select", y.value]),
1882
- style: be(C.value)
2012
+ function I(f) {
2013
+ return N(f);
2014
+ }
2015
+ return (f, v) => (a(), M(s(ue), ee(x.value ? { open: !1 } : {}, { title: P.value }), {
2016
+ default: $(() => [
2017
+ F("div", {
2018
+ class: ye(["yee-ui-select", d.value]),
2019
+ style: he(S.value)
1883
2020
  }, [
1884
- $.value ? (n(), R(i(Oe), X({
2021
+ T.value ? (a(), M(s(ze), ee({
1885
2022
  key: 0,
1886
2023
  value: e.value,
1887
- "onUpdate:value": f[0] || (f[0] = (l) => e.value = l)
1888
- }, w.value, {
2024
+ "onUpdate:value": v[0] || (v[0] = (l) => e.value = l)
2025
+ }, b.value, {
1889
2026
  "field-names": g.value,
1890
2027
  options: o.options,
1891
- onDropdownVisibleChange: T
2028
+ onDropdownVisibleChange: C
1892
2029
  }), {
1893
- option: S((l) => [
1894
- Z(i(ue), {
1895
- title: j(l),
2030
+ option: $((l) => [
2031
+ ne(s(ue), {
2032
+ title: I(l),
1896
2033
  placement: "left"
1897
2034
  }, {
1898
- default: S(() => [
1899
- B("span", $n, A(j(l)), 1)
2035
+ default: $(() => [
2036
+ F("span", $n, j(I(l)), 1)
1900
2037
  ]),
1901
2038
  _: 2
1902
2039
  }, 1032, ["title"])
1903
2040
  ]),
1904
2041
  _: 1
1905
- }, 16, ["value", "field-names", "options"])) : (n(), R(i(Oe), X({
2042
+ }, 16, ["value", "field-names", "options"])) : (a(), M(s(ze), ee({
1906
2043
  key: 1,
1907
2044
  value: e.value,
1908
- "onUpdate:value": f[1] || (f[1] = (l) => e.value = l)
1909
- }, w.value, {
2045
+ "onUpdate:value": v[1] || (v[1] = (l) => e.value = l)
2046
+ }, b.value, {
1910
2047
  "field-names": g.value,
1911
2048
  options: o.options,
1912
- onDropdownVisibleChange: T
1913
- }), Re({ _: 2 }, [
1914
- d.$slots.default ? {
2049
+ onDropdownVisibleChange: C
2050
+ }), Ve({ _: 2 }, [
2051
+ f.$slots.default ? {
1915
2052
  name: "default",
1916
- fn: S((l) => [
1917
- H(d.$slots, "default", fe(pe(l)), void 0, !0)
2053
+ fn: $((l) => [
2054
+ L(f.$slots, "default", ve(me(l)), void 0, !0)
1918
2055
  ]),
1919
2056
  key: "0"
1920
2057
  } : void 0,
1921
- d.$slots.option ? {
2058
+ f.$slots.option ? {
1922
2059
  name: "option",
1923
- fn: S((l) => [
1924
- H(d.$slots, "option", fe(pe(l)), void 0, !0)
2060
+ fn: $((l) => [
2061
+ L(f.$slots, "option", ve(me(l)), void 0, !0)
1925
2062
  ]),
1926
2063
  key: "1"
1927
2064
  } : void 0,
1928
- d.$slots.tagRender ? {
2065
+ f.$slots.tagRender ? {
1929
2066
  name: "tagRender",
1930
- fn: S((l) => [
1931
- H(d.$slots, "tagRender", fe(pe(l)), void 0, !0)
2067
+ fn: $((l) => [
2068
+ L(f.$slots, "tagRender", ve(me(l)), void 0, !0)
1932
2069
  ]),
1933
2070
  key: "2"
1934
2071
  } : void 0,
1935
- d.$slots.dropdownRender ? {
2072
+ f.$slots.dropdownRender ? {
1936
2073
  name: "dropdownRender",
1937
- fn: S((l) => [
1938
- H(d.$slots, "dropdownRender", fe(pe(l)), void 0, !0)
2074
+ fn: $((l) => [
2075
+ L(f.$slots, "dropdownRender", ve(me(l)), void 0, !0)
1939
2076
  ]),
1940
2077
  key: "3"
1941
2078
  } : void 0,
1942
- d.$slots.notFoundContent ? {
2079
+ f.$slots.notFoundContent ? {
1943
2080
  name: "notFoundContent",
1944
- fn: S((l) => [
1945
- H(d.$slots, "notFoundContent", fe(pe(l)), void 0, !0)
2081
+ fn: $((l) => [
2082
+ L(f.$slots, "notFoundContent", ve(me(l)), void 0, !0)
1946
2083
  ]),
1947
2084
  key: "4"
1948
2085
  } : void 0
@@ -1952,26 +2089,26 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1952
2089
  _: 3
1953
2090
  }, 16, ["title"]));
1954
2091
  }
1955
- }), In = /* @__PURE__ */ le(Tn, [["__scopeId", "data-v-028e2b2a"]]);
2092
+ }), Dn = /* @__PURE__ */ ce(Tn, [["__scopeId", "data-v-028e2b2a"]]);
1956
2093
  export {
1957
- zn as CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT,
2094
+ Vn as CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT,
1958
2095
  Nn as PlatformConfigProvider,
1959
2096
  Pn as YeeDescriptions,
1960
2097
  Hn as YeeEllipsisText,
1961
2098
  An as YeeFilePreview,
1962
2099
  Ln as YeeFileUpload,
1963
- Qo as YeeForm,
1964
- Xo as YeeFormApi,
1965
- Zo as YeeGridApi,
2100
+ Jo as YeeForm,
2101
+ Qo as YeeFormApi,
2102
+ Xo as YeeGridApi,
1966
2103
  jn as YeeModal,
1967
- Dn as YeePage,
1968
- In as YeeSelect,
2104
+ In as YeePage,
2105
+ Dn as YeeSelect,
1969
2106
  qn as darkThemeTokens,
1970
2107
  Gn as lightThemeTokens,
1971
- Ve as platformThemeKey,
1972
- Ft as resolvePlatformTheme,
1973
- Bt as toAntDesignTheme,
2108
+ Ne as platformThemeKey,
2109
+ Bt as resolvePlatformTheme,
2110
+ Ft as toAntDesignTheme,
1974
2111
  Et as toPlatformCssVariables,
1975
- Vn as usePlatformTheme,
2112
+ zn as usePlatformTheme,
1976
2113
  Un as useYeeGrid
1977
2114
  };