@yeepay/yee-boss-ui 0.1.12 → 0.1.14

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 Oe, defineComponent as oe, computed as u, provide as Qe, openBlock as a, createBlock as M, unref as s, withCtx as S, createElementVNode as E, normalizeStyle as he, renderSlot as U, reactive as Ie, onBeforeUnmount as Ce, mergeProps as Z, createElementBlock as h, Fragment as _e, renderList as Se, createTextVNode as ie, toDisplayString as D, normalizeClass as ye, createCommentVNode as z, useTemplateRef as xe, shallowRef as R, onMounted as Re, onUpdated as vt, watch as ke, nextTick as Te, ref as mt, createVNode as te, withModifiers as yt, useSlots as ze, onUnmounted as ht, withDirectives as gt, vShow as bt, toHandlers as wt, createSlots as Me, 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 re, Upload as kt, Image as Ct, DatePicker as $t, Input as St, Select as Ve, Button as se, 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 Dt, VxeModal as It, 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 = Oe(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__ */ oe({
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)), v = u(() => Et(e.value));
23
+ return Qe(Ne, e), (x, p) => (a(), M(s(xt), {
24
24
  "prefix-cls": "yee",
25
- theme: s.value
25
+ theme: n.value
26
26
  }, {
27
27
  default: S(() => [
28
- B("div", {
28
+ E("div", {
29
29
  class: "yee-ui-platform-theme",
30
30
  "data-theme": e.value.mode,
31
- style: be(m.value)
31
+ style: he(v.value)
32
32
  }, [
33
- H(k.$slots, "default", {}, void 0, !0)
34
- ], 12, Jt)
33
+ U(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
+ }), ue = (o, t) => {
40
40
  const e = o.__vccOpts || o;
41
- for (const [s, m] of t)
42
- e[s] = m;
41
+ for (const [n, v] of t)
42
+ e[n] = v;
43
43
  return e;
44
- }, Nn = /* @__PURE__ */ le(Qt, [["__scopeId", "data-v-0b569e8c"]]);
45
- async function Xt(o) {
44
+ }, Nn = /* @__PURE__ */ ue(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__ */ oe({
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), v = u(() => t.column ?? 3), x = u(() => t.layout ?? "horizontal"), p = u(() => t.size ?? "default"), m = Ie(/* @__PURE__ */ new Set()), C = /* @__PURE__ */ new Set();
95
+ function b(B, k) {
96
+ return B.name ?? `${B.label}-${k}`;
97
97
  }
98
- async function $(F, T) {
99
- const c = String(F.value ?? "");
98
+ async function T(B, k) {
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
+ m.add(k), Be.success("已复制");
109
+ const w = setTimeout(() => {
110
+ m.delete(k), C.delete(w);
111
111
  }, 1500);
112
- C.add(b);
112
+ C.add(w);
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
+ C.forEach((B) => clearTimeout(B)), C.clear();
116
+ }), (B, k) => (a(), M(s(qe), Z({
117
117
  class: "yee-ui-descriptions",
118
118
  bordered: e.value,
119
- colon: s.value,
120
- column: m.value,
121
- layout: k.value,
122
- size: g.value
119
+ colon: n.value,
120
+ column: v.value,
121
+ layout: x.value,
122
+ size: p.value
123
123
  }, t.title === void 0 ? {} : { title: t.title }), {
124
124
  default: S(() => [
125
- (n(!0), v(ge, null, ke(o.items, (c, b) => (n(), R(i(We).Item, {
126
- key: w(c, b),
125
+ (a(!0), h(_e, null, Se(o.items, (c, w) => (a(), M(s(qe).Item, {
126
+ key: b(c, w),
127
127
  label: c.label,
128
128
  span: c.span ?? 1
129
129
  }, {
130
130
  default: S(() => [
131
- B("div", Zt, [
132
- B("div", eo, [
133
- c.ellipsis ? (n(), R(i(ue), {
131
+ E("div", Xt, [
132
+ E("div", Zt, [
133
+ c.ellipsis ? (a(), M(s(re), {
134
134
  key: 0,
135
135
  title: String(c.value ?? "")
136
136
  }, {
137
137
  default: S(() => [
138
- B("span", to, [
139
- H(F.$slots, `content-${c.name ?? c.label}`, { item: c }, () => [
140
- ae(A(c.value), 1)
138
+ E("span", eo, [
139
+ U(B.$slots, `content-${c.name ?? c.label}`, { item: c }, () => [
140
+ ie(D(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
+ U(B.$slots, `content-${c.name ?? c.label}`, { item: c }, () => [
147
+ ie(D(c.value), 1)
148
148
  ], !0)
149
149
  ])),
150
- c.copyable ? (n(), R(i(ue), {
150
+ c.copyable ? (a(), M(s(re), {
151
151
  key: 2,
152
- title: y.has(w(c, b)) ? "已复制" : "复制"
152
+ title: m.has(b(c, w)) ? "已复制" : "复制"
153
153
  }, {
154
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)),
155
+ E("button", {
156
+ class: ye(["yee-ui-descriptions__copy", { "yee-ui-descriptions__copy--copied": m.has(b(c, w)) }]),
157
+ "aria-label": m.has(b(c, w)) ? "已复制" : "复制",
158
+ disabled: m.has(b(c, w)),
159
159
  type: "button",
160
- onClick: (N) => $(c, w(c, b))
160
+ onClick: (N) => T(c, b(c, w))
161
161
  }, [
162
- y.has(w(c, b)) ? (n(), R(i(Rt), { key: 0 })) : (n(), R(i(Ot), { key: 1 }))
163
- ], 10, no)
162
+ m.has(b(c, w)) ? (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
+ }, D(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__ */ ue(no, [["__scopeId", "data-v-91a3a5f3"]]), ao = ["aria-expanded", "role", "tabindex"], lo = /* @__PURE__ */ oe({
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, v = Oe(Ne, void 0), x = xe("text"), p = R(!1), m = R(!1), C = R(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), k = u(() => {
202
+ const $ = { maxWidth: B.value };
203
+ return !m.value && b.value > 1 && ($.webkitLineClamp = b.value), $;
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": m.value,
207
+ "yee-ui-ellipsis-text--multi-line": !m.value && b.value > 1,
208
+ "yee-ui-ellipsis-text--single-line": !m.value && b.value === 1
209
+ })), w = u(() => e.tooltipMaxWidth !== void 0 ? e.tooltipMaxWidth : C.value > 0 ? C.value + 24 : void 0), N = u(() => {
210
+ const $ = {};
211
+ return w.value !== void 0 && ($.maxWidth = `${w.value}px`), $;
212
212
  }), P = u(() => {
213
- const x = {
213
+ const $ = {
214
214
  ...e.tooltipOverlayStyle,
215
- backgroundColor: j.value,
216
- color: e.tooltipColor || m?.value.tokens.popoverForeground || "var(--yee-popover-foreground)",
217
- fontSize: e.tooltipFontSize === void 0 ? m ? `${m.value.tokens.fontSize}px` : "var(--yee-font-size)" : `${e.tooltipFontSize}px`
215
+ backgroundColor: I.value,
216
+ color: e.tooltipColor || v?.value.tokens.popoverForeground || "var(--yee-popover-foreground)",
217
+ fontSize: e.tooltipFontSize === void 0 ? v ? `${v.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 w.value !== void 0 && ($.maxWidth = `${w.value}px`), $;
220
+ }), I = u(() => e.tooltipBackgroundColor || v?.value.tokens.popover || "var(--yee-popover)"), f = u(() => e.tooltip && !m.value && (!e.tooltipWhenEllipsis || p.value)), d = 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()) {
227
- g.value = !1;
222
+ function O() {
223
+ const $ = x.value;
224
+ if (!$) return;
225
+ const L = $.getBoundingClientRect().width || $.clientWidth;
226
+ if (C.value = Math.ceil(L), !e.tooltipWhenEllipsis || m.value || !$.textContent?.trim()) {
227
+ p.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 K = b.value === 1 ? $.scrollWidth - $.clientWidth : $.scrollHeight - $.clientHeight;
231
+ p.value = K > T.value;
232
232
  }
233
- function U() {
234
- e.expand && (y.value = !y.value, s("expandChange", y.value), De(M));
233
+ function H() {
234
+ e.expand && (m.value = !m.value, n("expandChange", m.value), Te(O));
235
235
  }
236
- function W(x) {
237
- !e.expand || x.key !== "Enter" && x.key !== " " || (x.preventDefault(), U());
236
+ function Y($) {
237
+ !e.expand || $.key !== "Enter" && $.key !== " " || ($.preventDefault(), H());
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 $ = x.value;
241
+ $ && typeof ResizeObserver < "u" && (l = new ResizeObserver(O), l.observe($)), O();
242
+ }), vt(O), ke(() => e.expand, ($) => {
243
+ $ || (m.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
+ }), ($, L) => (a(), M(s(re), Z(d.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
252
  title: S(() => [
253
- H(x.$slots, "tooltip", {}, () => [
254
- H(x.$slots, "default", {}, void 0, !0)
253
+ U($.$slots, "tooltip", {}, () => [
254
+ U($.$slots, "default", {}, void 0, !0)
255
255
  ], !0)
256
256
  ]),
257
257
  default: S(() => [
258
- B("div", X({ ref: "text" }, x.$attrs, {
259
- "aria-expanded": e.expand ? y.value : void 0,
258
+ E("div", Z({ ref: "text" }, $.$attrs, {
259
+ "aria-expanded": e.expand ? m.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: k.value,
263
263
  tabindex: e.expand ? 0 : void 0,
264
- onClick: U,
265
- onKeydown: W
264
+ onClick: H,
265
+ onKeydown: Y
266
266
  }), [
267
- H(x.$slots, "default", {}, void 0, !0)
268
- ], 16, lo)
267
+ U($.$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__ */ ue(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__ */ oe({
277
277
  name: "YeeFileUpload",
278
278
  __name: "YeeFileUpload",
279
279
  props: {
@@ -291,150 +291,150 @@ 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(
294
+ const n = o, v = e, x = mt([]), p = R(!1), m = R(""), C = u(() => n.fileList ?? []), b = u(() => n.height ?? 100), T = u(() => n.manual ?? !1), B = u(() => n.maxCount ?? 10), k = u(() => n.maxSize ?? 20), c = u(() => n.multiple ?? !1), w = u(() => n.readonly ?? !1), N = u(() => n.uploadText ?? "上传文件"), P = u(() => n.width ?? 100), I = u(() => ({
295
+ height: d(b.value),
296
+ width: d(P.value)
297
+ })), f = u(() => x.value.some((r) => r.status === "uploading"));
298
+ ke(
299
299
  C,
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) => v("uploadingChange", r), { immediate: !0 });
305
+ function d(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
+ v("update:fileList", x.value.map((r) => ({ ...r })));
310
310
  }
311
- function M(r) {
311
+ function O(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 H(r) {
315
+ return r.size <= k.value * 1024 * 1024 ? !1 : (Be.error(`文件大小不能超过 ${k.value}MB,当前为 ${O(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 $(r) {
321
321
  if (r.url) {
322
- if (W(r)) {
323
- y.value = r.url, g.value = !0;
322
+ if (Y(r)) {
323
+ m.value = r.url, p.value = !0;
324
324
  return;
325
325
  }
326
326
  window.open(r.url, "_blank", "noopener,noreferrer");
327
327
  }
328
328
  }
329
- function D(r) {
330
- g.value = r;
329
+ function L(r) {
330
+ p.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 K(r, y, A) {
333
+ r.status = "done", r.percent = 100, y?.name && (r.name = y.name), y?.url && (r.url = y.url), l(), A(y), v("uploadSuccess");
334
334
  }
335
- function oe(r, p, V) {
336
- r.status = "error", l(), V(p);
335
+ function F(r, y, A) {
336
+ r.status = "error", l(), A(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 Q(r, y, A, ce) {
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), F(le, J, ce);
344
344
  return;
345
345
  }
346
- let he = !1;
347
- const we = {
346
+ let we = !1;
347
+ const $e = {
348
348
  file: r,
349
- onError: (G) => {
350
- he || (he = !0, oe(ee, G, se));
349
+ onError: (J) => {
350
+ we || (we = !0, F(le, J, ce));
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, K(le, J, A));
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($e)).catch((J) => {
362
+ $e.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
+ $e.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 ne = (r) => H(r) || T.value ? !1 : n.customRequest ? !0 : (Be.error("未配置 customRequest"), !1);
369
+ function ae(r) {
370
+ const y = r.file instanceof File ? r.file : void 0;
371
+ if (!y || H(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 A = y.uid ?? String(Date.now());
376
+ Q(y, A, 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 fe(r) {
381
+ if (x.value = r.fileList.map((A) => ({ ...A })), l(), !T.value) return;
382
+ const y = x.value.at(-1);
383
+ y?.originFileObj instanceof File && v("fileSelect", { file: y.originFileObj, uid: y.uid });
384
384
  }
385
- function ve(r) {
386
- m("fileRemoved", r);
385
+ function ge(r) {
386
+ v("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 A = x.value.find((ce) => ce.uid === r);
390
+ A && K(A, 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((A) => A.uid === r);
395
+ y && F(y, new Error("上传失败"), () => {
396
396
  });
397
397
  }
398
- function q() {
399
- return k.value.flatMap((r) => r.originFileObj instanceof File ? [r.originFileObj] : []);
398
+ function G() {
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: G }), (r, y) => (a(), h("div", io, [
402
+ !w.value || x.value.length > 0 ? (a(), M(s(kt), Z({ key: 0 }, o.accept ? { accept: o.accept } : {}, {
403
+ "before-upload": ne,
404
+ "custom-request": ae,
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: !w.value },
409
409
  "list-type": "picture-card",
410
- onChange: ce,
411
- onPreview: x,
412
- onRemove: ve
410
+ onChange: fe,
411
+ onPreview: $,
412
+ onRemove: ge
413
413
  }), {
414
414
  default: S(() => [
415
- !b.value && k.value.length < F.value ? (n(), v("div", {
415
+ !w.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] = E("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
+ E("span", null, D(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
+ m.value ? (a(), M(s(Ct), {
430
430
  key: 2,
431
431
  class: "yee-ui-file-upload__preview",
432
- preview: { visible: g.value, onVisibleChange: D },
433
- src: y.value
434
- }, null, 8, ["preview", "src"])) : O("", !0)
432
+ preview: { visible: p.value, onVisibleChange: L },
433
+ src: m.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__ */ ue(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 v = typeof File < "u" && o instanceof File || typeof Blob < "u" && o instanceof Blob ? Ae(o.type) : void 0;
515
+ return v || (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");
526
- function D() {
523
+ const mo = 50 * 1024 * 1024, yo = 200, ho = 50;
524
+ function go(o, t, e) {
525
+ const n = R("idle"), v = R(""), x = R(""), p = R(""), m = R(""), C = R(""), b = R([]), T = R([]), B = R(""), k = R(""), c = R(!1), w = R({ kind: "unsupported", fileName: "" }), N = R(), P = R(0), I = R(), f = u(() => o.source ?? o.url), d = u(() => String(o.fileName ?? "").trim() || at(f.value) || "未命名文件"), l = u(() => w.value.kind), O = u(() => n.value === "loading"), H = u(() => n.value === "ready"), Y = u(() => n.value === "error"), $ = u(() => n.value === "unsupported");
526
+ function L() {
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 K() {
530
+ I.value?.abort(), I.value = void 0;
531
531
  }
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 };
532
+ function F() {
533
+ K(), L(), n.value = "idle", v.value = "", x.value = "", p.value = "", m.value = "", C.value = "", b.value = [], T.value = [], B.value = "", k.value = "", c.value = !1, w.value = { kind: "unsupported", fileName: d.value };
534
534
  }
535
- function $e(a) {
536
- const h = URL.createObjectURL(Ge(a));
537
- return N.value = h, h;
535
+ function Q(i) {
536
+ const g = URL.createObjectURL(Ke(i));
537
+ return N.value = g, g;
538
538
  }
539
- function Te() {
540
- const a = d.value;
541
- return typeof a == "string" ? a.trim() : vo(a) ? $e(a) : "";
539
+ function ne() {
540
+ const i = f.value;
541
+ return typeof i == "string" ? i.trim() : vo(i) ? Q(i) : "";
542
542
  }
543
- function ie() {
544
- const a = Number(o.maxFileSize);
545
- return Number.isFinite(a) && a > 0 ? a : yo;
543
+ function ae() {
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 fe() {
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 > ae())
557
+ throw new Error(`文件超过 ${Math.round(ae() / 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
+ K(), 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 G(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 g = Number(i.headers.get("content-length"));
570
+ Number.isFinite(g) && be(g);
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 g = f.value;
576
+ if (g instanceof Blob || g instanceof ArrayBuffer) {
577
+ const j = Ke(g);
578
+ return be(j.size), j.arrayBuffer();
579
579
  }
580
- const _ = typeof h == "string" ? h.trim() : "";
580
+ const _ = typeof g == "string" ? g.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 A(i) {
586
+ const g = await y(i);
587
+ return new TextDecoder().decode(g).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 ce(i) {
590
+ const g = await import("./purify.es-HJ4qIUVZ.js");
591
+ return (typeof g.default == "function" ? g.default(typeof window > "u" ? void 0 : window) : g.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 g = await A(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
+ ]), j = _.marked.parse(g, { breaks: !0, gfm: !0 }), q = typeof V.default == "function" ? V.default(typeof window > "u" ? void 0 : window) : V.default;
598
+ p.value = q.sanitize(j);
599
599
  }
600
- async function he(a) {
601
- y.value = await se(await V(a));
600
+ async function we(i) {
601
+ m.value = await ce(await A(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 $e(i) {
604
+ let g = "";
605
+ for (let V = 0; V < i.length; V += 32768)
606
+ g += String.fromCharCode(...i.subarray(V, V + 32768));
607
+ return btoa(g);
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 g;
611
+ if (typeof i.content == "string")
612
+ g = i.encoding === "base64" ? i.content.replace(/\s/g, "") : $e(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
+ g = $e(_);
616
616
  }
617
- return `data:${a.mimeType || "application/octet-stream"};base64,${h}`;
617
+ return `data:${i.mimeType || "application/octet-stream"};base64,${g}`;
618
618
  }
619
- function Ne(a) {
620
- const h = a.trim().replace(/^cid:/i, "").replace(/^<|>$/g, "");
619
+ function Pe(i) {
620
+ const g = i.trim().replace(/^cid:/i, "").replace(/^<|>$/g, "");
621
621
  try {
622
- return decodeURIComponent(h).toLowerCase();
622
+ return decodeURIComponent(g).toLowerCase();
623
623
  } catch {
624
- return h.toLowerCase();
624
+ return g.toLowerCase();
625
625
  }
626
626
  }
627
- function st(a, h) {
627
+ function st(i, g) {
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 j of g) {
630
+ if (!/^image\//i.test(j.mimeType)) continue;
631
+ const q = J(j);
632
+ j.contentId && _.set(Pe(j.contentId), q), j.filename && _.set(Pe(j.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((j) => {
637
+ const q = j.getAttribute("src") ?? "", W = Pe(/^cid:/i.test(q) ? q.slice(4) : q), X = _.get(W);
638
+ X && j.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 g = i.replace(/^\uFEFF/, ""), _ = g.split(/\r?\n/, 1)[0] ?? "", j = [" ", ",", ";"].map((ee) => ({ candidate: ee, count: _.split(ee).length - 1 })).sort((ee, pe) => pe.count - ee.count)[0]?.candidate ?? ",", q = [];
650
+ let W = [], X = "", de = !1;
651
+ for (let ee = 0; ee < g.length; ee += 1) {
652
+ const pe = g[ee], We = g[ee + 1];
653
+ pe === '"' ? de && We === '"' ? (X += '"', ee += 1) : de = !de : pe === j && !de ? (W.push(X), X = "") : (pe === `
654
+ ` || pe === "\r") && !de ? (pe === "\r" && We === `
655
+ ` && (ee += 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 g = await import("./xlsx-CF422ARu.js"), _ = g.read(await y(i), { type: "array" }), V = _.SheetNames[0], j = V ? _.Sheets[V] : void 0;
661
+ if (!j) throw new Error("Excel 文件没有可展示的工作表");
662
+ const q = g.utils.sheet_to_json(j, {
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 = fe(), X = ge();
667
+ c.value = q.length > W || q.some((de) => de.length > X), b.value = q.slice(0, W).map((de) => ({
668
+ cells: de.slice(0, X).map((ee) => String(ee ?? ""))
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
+ ], k.value = _.text || "";
684
+ const j = _.attachments, q = _.html ? await ce(_.html) : "";
685
+ B.value = q ? st(q, j) : "";
686
686
  }
687
- async function ft(a, h) {
688
- if (await De(), !q(a)) return;
687
+ async function ft(i, g) {
688
+ if (await Te(), !G(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((j) => j.d);
692
+ _.replaceChildren(), await V.renderAsync(await y(g), _, 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, g, _) {
699
+ if (i === "text" && (C.value = await A(_)), i === "json" && (C.value = rt(await A(_))), i === "xml" && (C.value = await A(_)), i === "csv") {
700
+ const V = ut(await A(_)), j = fe(), q = ge();
701
+ c.value = V.length > j || V.some((W) => W.length > q), b.value = V.slice(0, j).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(g, _);
706
706
  }
707
- async function Ie() {
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,
707
+ async function Ye() {
708
+ F();
709
+ const i = f.value;
710
+ if (i === void 0 || i === "") return;
711
+ const g = po(i, o.fileName, o.fileType);
712
+ if (w.value = { kind: g, fileName: d.value }, x.value = ne(), g === "unsupported") {
713
+ n.value = "unsupported", e("unsupported", {
714
+ kind: g,
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(g))
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(g, _.token, _.signal), !G(_.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: g, fileName: d.value });
729
+ } catch (V) {
730
+ if (!G(_.token)) return;
731
+ n.value = "error", v.value = V instanceof Error ? V.message : "文件预览失败", e("error", { kind: g, message: v.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, K(), L();
742
742
  }), {
743
- displayUrl: k,
744
- emailHtml: F,
745
- emailMeta: $,
746
- emailText: T,
747
- errorMessage: m,
748
- fileName: f,
749
- htmlContent: y,
750
- isError: W,
751
- isLoading: M,
752
- isReady: U,
753
- isUnsupported: x,
743
+ displayUrl: x,
744
+ emailHtml: B,
745
+ emailMeta: T,
746
+ emailText: k,
747
+ errorMessage: v,
748
+ fileName: d,
749
+ htmlContent: m,
750
+ isError: Y,
751
+ isLoading: O,
752
+ isReady: H,
753
+ isUnsupported: $,
754
754
  kind: l,
755
- load: Ie,
756
- markdownHtml: g,
757
- status: s,
758
- tableRows: w,
755
+ load: Ye,
756
+ markdownHtml: p,
757
+ status: n,
758
+ tableRows: b,
759
759
  textContent: C,
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"], $o = {
767
767
  key: 1,
768
768
  class: "yee-ui-file-preview__download-error",
769
769
  role: "alert"
770
- }, To = {
770
+ }, So = {
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
+ }, Do = ["srcdoc", "title"], Io = {
804
804
  key: 2,
805
805
  class: "yee-ui-file-preview__text"
806
- }, Wo = /* @__PURE__ */ te({
806
+ }, Yo = /* @__PURE__ */ oe({
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, v = xe("previewContainer"), x = xe("docxContainer"), p = R(!1), m = R(""), C = R(!1), {
825
+ displayUrl: b,
826
+ emailHtml: T,
827
+ emailMeta: B,
828
+ emailText: k,
829
829
  errorMessage: c,
830
- fileName: b,
830
+ fileName: w,
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: d,
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: O,
838
+ tableRows: H,
839
+ textContent: Y,
840
+ truncated: $
841
+ } = go(e, { docxContainer: x }, n), L = 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
+ }), K = u(() => !!b.value), F = u(() => ["image", "pdf", "video", "audio"].includes(l.value)), Q = u(() => l.value === "csv" || l.value === "spreadsheet"), ne = u(() => l.value === "eml");
844
+ ke(
845
845
  () => [e.source, e.url, e.fileName, e.fileType],
846
846
  () => {
847
- y.value = "";
847
+ m.value = "";
848
848
  }
849
849
  );
850
- function ie() {
851
- s("error", {
850
+ function ae() {
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 fe() {
857
+ if (!b.value || C.value) return;
858
+ m.value = "", C.value = !0;
859
+ let G = 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(G)) {
862
+ const A = await fetch(G);
863
+ if (!A.ok) throw new Error(`文件下载失败(${A.status})`);
864
+ G = URL.createObjectURL(await A.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 = G, y.download = w.value, y.rel = "noopener noreferrer", document.body.appendChild(y), y.click(), y.remove(), r && window.setTimeout(() => URL.revokeObjectURL(G), 0), n("download");
868
+ } catch (y) {
869
+ m.value = y instanceof Error ? y.message : "文件下载失败", n("error", {
870
870
  kind: l.value,
871
- message: y.value,
872
- cause: p
871
+ message: m.value,
872
+ cause: y
873
873
  });
874
874
  } finally {
875
875
  C.value = !1;
876
876
  }
877
877
  }
878
- function ve() {
879
- g.value = document.fullscreenElement === m.value;
878
+ function ge() {
879
+ p.value = document.fullscreenElement === v.value;
880
880
  }
881
- async function ye() {
882
- const q = m.value;
883
- if (q)
881
+ async function be() {
882
+ const G = v.value;
883
+ if (G)
884
884
  try {
885
- document.fullscreenElement === q ? await document.exitFullscreen() : q.requestFullscreen ? await q.requestFullscreen() : g.value = !g.value;
885
+ document.fullscreenElement === G ? await document.exitFullscreen() : G.requestFullscreen ? await G.requestFullscreen() : p.value = !p.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(G) {
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
+ }[G];
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 === v.value && document.exitFullscreen().catch(() => {
916
916
  });
917
- }), (q, r) => (n(), v("section", {
917
+ }), (G, r) => (a(), h("section", {
918
918
  ref_key: "previewContainer",
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)
919
+ ref: v,
920
+ class: ye([{ "yee-ui-file-preview--fullscreen": p.value }, "yee-ui-file-preview"]),
921
+ style: he(L.value),
922
+ "aria-busy": s(I)
923
923
  }, [
924
- o.showHeader && J.value ? (n(), v("header", wo, [
925
- B("div", {
924
+ o.showHeader && K.value ? (a(), h("header", wo, [
925
+ E("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), {
931
- title: g.value ? "退出全屏" : "进入全屏"
927
+ title: s(w)
928
+ }, D(s(w)), 9, _o),
929
+ E("div", xo, [
930
+ te(s(re), {
931
+ title: p.value ? "退出全屏" : "进入全屏"
932
932
  }, {
933
933
  default: S(() => [
934
- B("button", {
935
- "aria-label": g.value ? "退出全屏" : "进入全屏",
936
- "aria-pressed": g.value,
934
+ E("button", {
935
+ "aria-label": p.value ? "退出全屏" : "进入全屏",
936
+ "aria-pressed": p.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
+ p.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(re), {
947
947
  key: 0,
948
948
  title: C.value ? "下载中..." : "下载"
949
949
  }, {
950
950
  default: S(() => [
951
- B("button", {
951
+ E("button", {
952
952
  "aria-label": C.value ? "下载中" : "下载",
953
953
  "aria-busy": C.value,
954
954
  class: "yee-ui-file-preview__header-action",
955
955
  disabled: C.value,
956
956
  type: "button",
957
- onClick: r[0] || (r[0] = (p) => {
958
- ce();
957
+ onClick: r[0] || (r[0] = (y) => {
958
+ fe();
959
959
  })
960
960
  }, [
961
- Z(i(Mt))
962
- ], 8, So)
961
+ te(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
+ m.value ? (a(), h("div", $o, D(m.value), 1)) : z("", !0),
969
+ K.value ? s(I) && !F.value && s(l) !== "docx" ? (a(), h("div", To, "文件加载中...")) : s(P) ? (a(), h("div", Bo, [
970
+ E("span", null, D(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
+ fe();
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(d) ? (a(), h("div", Fo, [
980
+ E("span", null, "暂不支持预览 " + D(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
+ fe();
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) || F.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: ae
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: ae
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: ae
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: ae
1016
+ }, null, 40, Mo)) : s(l) === "text" || s(l) === "json" || s(l) === "xml" ? (a(), h("pre", Vo, D(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(O)
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)) : Q.value ? (a(), h("div", Po, [
1032
+ s(H).length ? (a(), h("table", Ho, [
1033
+ E("tbody", null, [
1034
+ (a(!0), h(_e, null, Se(s(H), (y, A) => (a(), h("tr", { key: A }, [
1035
+ (a(!0), h(_e, null, Se(y.cells, (ce, le) => (a(), h("td", {
1036
+ key: `${A}-${le}`
1037
+ }, D(ce), 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($) ? (a(), h("div", Ao, "预览内容已截断,可下载查看完整文件。")) : z("", !0)
1042
+ ])) : ne.value ? (a(), h("div", Uo, [
1043
+ s(B).length ? (a(), h("dl", jo, [
1044
+ (a(!0), h(_e, null, Se(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
+ E("dt", null, D(y.label), 1),
1048
+ E("dd", null, D(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, Do)) : (a(), h("pre", Io, D(s(k) || "暂无可展示的邮件正文"), 1))
1058
+ ])) : z("", !0)
1059
+ ], 64)) : z("", !0) : (a(), h("div", So, "请选择文件"))
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__ */ ue(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__ */ oe({
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 = $t.RangePicker, n = R(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 v = u(() => t.api.schema.value.filter((k) => !k.hide));
1075
+ function x(k) {
1076
+ return t.api.getFieldValue(k.fieldName);
1077
1077
  }
1078
- function g(T) {
1079
- const c = k(T);
1078
+ function p(k) {
1079
+ const c = x(k);
1080
1080
  return {
1081
- ...T.componentProps,
1081
+ ...k.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 m(k, c) {
1086
+ t.api.setFieldValue(k.fieldName, c), t.options.submitOnChange && b();
1087
1087
  }
1088
1088
  async function C() {
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(k) {
1095
+ k.key === "Enter" && t.options.submitOnEnter && (k.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 (k, 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
+ E("div", Wo, [
1106
+ (a(!0), h(_e, null, Se(v.value, (w) => (a(), h("label", {
1107
+ key: w.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
+ E("span", qo, D(w.label), 1),
1111
+ w.component === "Input" ? (a(), M(s(St), Z({
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
+ }, p(w), {
1115
+ "onUpdate:value": (N) => m(w, N)
1116
+ }), null, 16, ["onUpdate:value"])) : w.component === "Select" ? (a(), M(s(Ve), Z({
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
+ }, p(w), {
1120
+ "onUpdate:value": (N) => m(w, N)
1121
+ }), null, 16, ["onUpdate:value"])) : (a(), M(s(e), Z({
1122
1122
  key: 2,
1123
1123
  ref_for: !0
1124
- }, g(b), {
1125
- "onUpdate:value": (N) => y(b, N)
1124
+ }, p(w), {
1125
+ "onUpdate:value": (N) => m(w, N)
1126
1126
  }), null, 16, ["onUpdate:value"]))
1127
1127
  ]))), 128))
1128
1128
  ]),
1129
- B("div", Ko, [
1130
- Z(i(ne), {
1129
+ E("div", Go, [
1130
+ te(s(se), {
1131
1131
  "html-type": "button",
1132
1132
  onClick: C
1133
1133
  }, {
1134
1134
  default: S(() => [...c[0] || (c[0] = [
1135
- ae(" 重置 ", -1)
1135
+ ie(" 重置 ", -1)
1136
1136
  ])]),
1137
1137
  _: 1
1138
1138
  }),
1139
- Z(i(ne), {
1139
+ te(s(se), {
1140
1140
  type: "primary",
1141
1141
  "html-type": "submit"
1142
1142
  }, {
1143
1143
  default: S(() => [...c[1] || (c[1] = [
1144
- ae(" 查询 ", -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(se), {
1149
1149
  key: 0,
1150
1150
  type: "link",
1151
1151
  "html-type": "button",
1152
- onClick: F
1152
+ onClick: B
1153
1153
  }, {
1154
1154
  default: S(() => [
1155
- ae(A(s.value ? "展开" : "收起"), 1)
1155
+ ie(D(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__ */ ue(Ko, [["__scopeId", "data-v-92583f28"]]);
1163
+ class Qo {
1164
+ schema = R([]);
1165
1165
  initialValues = {};
1166
- values = Qe({});
1166
+ values = Ie({});
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 = R(t), this.searchFormVisible = R(t.showSearchForm ?? !0);
1202
1202
  }
1203
1203
  mount(t) {
1204
1204
  this.grid = t;
@@ -1229,30 +1229,169 @@ 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__ */ oe({
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, v = e, x = re, p = Ie({ visible: !1 }), m = xe("tooltip"), C = R(), b = R(""), T = R(), B = R(!1);
1259
+ let k;
1260
+ function c(F) {
1261
+ if (!(F === void 0 || F === ""))
1262
+ return typeof F == "number" ? `${F}px` : F;
1263
+ }
1264
+ const w = u(() => {
1265
+ const F = C.value;
1266
+ return !F || !p.visible ? { display: "none" } : {
1267
+ height: `${Math.max(F.height, 1)}px`,
1268
+ left: `${F.left}px`,
1269
+ pointerEvents: "none",
1270
+ position: "fixed",
1271
+ top: `${F.top}px`,
1272
+ width: `${Math.max(F.width, 1)}px`
1273
+ };
1274
+ }), N = u(() => ({
1275
+ cursor: n.enterable ? "text" : void 0,
1276
+ height: c(n.height),
1277
+ maxHeight: c(n.maxHeight),
1278
+ maxWidth: c(n.maxWidth),
1279
+ minHeight: c(n.minHeight),
1280
+ minWidth: c(n.minWidth),
1281
+ userSelect: n.enterable ? "text" : void 0,
1282
+ width: c(n.width)
1283
+ })), P = u(() => ({
1284
+ ...n.popupClassName ? { overlayClassName: n.popupClassName } : {},
1285
+ ...n.zIndex === void 0 ? {} : { zIndex: Number(n.zIndex) }
1286
+ }));
1287
+ function I(F) {
1288
+ return F.closest("body") ?? document.body;
1289
+ }
1290
+ function f(F) {
1291
+ return F || (typeof n.selector == "string" ? document.querySelector(n.selector) ?? void 0 : n.selector);
1292
+ }
1293
+ function d() {
1294
+ const F = T.value;
1295
+ if (!F?.isConnected)
1296
+ return H();
1297
+ const Q = F.getBoundingClientRect();
1298
+ return C.value = {
1299
+ height: Q.height,
1300
+ left: Q.left,
1301
+ top: Q.top,
1302
+ width: Q.width
1303
+ }, Te(() => m.value?.forcePopupAlign?.());
1304
+ }
1305
+ function l(F, Q) {
1306
+ const ne = f(F);
1307
+ return ne ? (T.value = ne, b.value = Q ?? n.content ?? "", B.value = !0, p.visible = !0, v("update:modelValue", !0), d()) : Te();
1308
+ }
1309
+ function O(F, Q, ne) {
1310
+ const ae = F.currentTarget instanceof HTMLElement ? F.currentTarget : void 0;
1311
+ return l(Q ?? ae, ne);
1312
+ }
1313
+ function H() {
1314
+ return B.value = !1, T.value = void 0, C.value = void 0, p.visible = !1, v("update:modelValue", !1), Te();
1315
+ }
1316
+ function Y(F) {
1317
+ F && k && (clearTimeout(k), k = void 0), B.value = F;
1318
+ }
1319
+ function $() {
1320
+ return B.value;
1321
+ }
1322
+ function L() {
1323
+ p.visible && d();
1324
+ }
1325
+ function K() {
1326
+ Y(!1), n.enterable && (k = setTimeout(() => {
1327
+ k = void 0, B.value || H();
1328
+ }, n.leaveDelay ?? 0));
1329
+ }
1330
+ return Re(() => {
1331
+ window.addEventListener("resize", L), window.addEventListener("scroll", L, !0), n.modelValue && l(void 0, n.content);
1332
+ }), Ce(() => {
1333
+ k && clearTimeout(k), window.removeEventListener("resize", L), window.removeEventListener("scroll", L, !0);
1334
+ }), t({
1335
+ close: H,
1336
+ isActived: $,
1337
+ open: l,
1338
+ openByEvent: O,
1339
+ reactData: p,
1340
+ setActived: Y,
1341
+ toVisible: l,
1342
+ updatePlacement: d
1343
+ }), (F, Q) => (a(), M(s(x), Z({ ref: "tooltip" }, P.value, {
1344
+ arrow: n.isArrow !== !1,
1345
+ "get-popup-container": I,
1346
+ open: p.visible,
1347
+ "overlay-inner-style": N.value,
1348
+ placement: "top"
1349
+ }), {
1350
+ title: S(() => [
1351
+ E("div", {
1352
+ class: "yee-ui-grid-tooltip-content",
1353
+ onMouseenter: Q[0] || (Q[0] = (ne) => n.enterable && Y(!0)),
1354
+ onMouseleave: K
1355
+ }, [
1356
+ U(F.$slots, "content", {}, () => [
1357
+ ie(D(b.value), 1)
1358
+ ])
1359
+ ], 32)
1360
+ ]),
1361
+ default: S(() => [
1362
+ E("span", {
1363
+ "aria-hidden": "true",
1364
+ class: "yee-ui-grid-tooltip-anchor",
1365
+ style: he(w.value)
1366
+ }, null, 4)
1367
+ ]),
1368
+ _: 3
1369
+ }, 16, ["arrow", "open", "overlay-inner-style"]));
1370
+ }
1371
+ });
1372
+ let Je = !1;
1373
+ const De = /* @__PURE__ */ new Set();
1235
1374
  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;
1239
- 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);
1375
+ const o = Ee.modal.confirm.bind(Ee.modal);
1376
+ Ee.modal.confirm = ((t, e, n) => {
1377
+ const v = typeof t == "object" && t !== null ? t : typeof n == "object" && n !== null ? n : void 0;
1378
+ if ((typeof v?.className == "string" ? v.className.split(/\s+/) : []).includes("vxe-table--ignore-clear")) {
1379
+ const p = [...De], m = p[p.length - 1];
1380
+ if (m) {
1381
+ const C = typeof v?.content == "string" ? v.content : String(v?.content ?? t);
1382
+ return m(C);
1244
1383
  }
1245
1384
  }
1246
- return o(t, e, s);
1385
+ return o(t, e, n);
1247
1386
  });
1248
1387
  }
1249
1388
  function tn(o) {
1250
- return je.add(o), () => je.delete(o);
1389
+ return De.add(o), () => De.delete(o);
1251
1390
  }
1252
1391
  function it() {
1253
- if (Ke) return;
1392
+ if (Je) return;
1254
1393
  [
1255
- Vt,
1394
+ zt,
1256
1395
  Nt,
1257
1396
  Pt,
1258
1397
  nt,
@@ -1267,8 +1406,8 @@ function it() {
1267
1406
  Wt,
1268
1407
  qt,
1269
1408
  Gt,
1270
- Kt
1271
- ].forEach((t) => Be.component(t)), en(), Ke = !0;
1409
+ Zo
1410
+ ].forEach((t) => Ee.component(t)), en(), Je = !0;
1272
1411
  }
1273
1412
  const on = {
1274
1413
  key: 1,
@@ -1276,7 +1415,7 @@ const on = {
1276
1415
  }, nn = { class: "yee-ui-grid__table-container" }, an = {
1277
1416
  key: 0,
1278
1417
  class: "yee-ui-grid__title"
1279
- }, ln = /* @__PURE__ */ te({
1418
+ }, ln = /* @__PURE__ */ oe({
1280
1419
  name: "YeeGrid",
1281
1420
  __name: "YeeGrid",
1282
1421
  props: {
@@ -1285,12 +1424,12 @@ const on = {
1285
1424
  tableTitleHelp: {}
1286
1425
  },
1287
1426
  setup(o) {
1288
- const t = o, e = ze(), s = Ce("gridRef"), m = Ee(Ve), k = Ee(lt, void 0), [g, y] = et.useModal();
1427
+ const t = o, e = ze(), n = xe("gridRef"), v = Oe(Ne), x = Oe(lt, void 0), [p, m] = et.useModal();
1289
1428
  it();
1290
- const C = tn((f) => new Promise((l) => {
1291
- g.confirm({
1429
+ const C = tn((d) => new Promise((l) => {
1430
+ p.confirm({
1292
1431
  title: "恢复默认列配置",
1293
- content: f,
1432
+ content: d,
1294
1433
  centered: !0,
1295
1434
  okText: "确认",
1296
1435
  cancelText: "取消",
@@ -1299,14 +1438,14 @@ const on = {
1299
1438
  onOk: () => l("confirm"),
1300
1439
  onCancel: () => l("cancel")
1301
1440
  });
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) => ![
1441
+ })), b = u(() => t.api.state.value), T = u(() => b.value.formOptions), B = u(() => !!(t.tableTitle || e["table-title"] || e["toolbar-actions"] || e["toolbar-tools"])), k = u(() => Object.keys(e).filter((d) => ![
1303
1442
  "empty",
1304
1443
  "loading",
1305
1444
  "table-title",
1306
1445
  "toolbar-actions",
1307
1446
  "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;
1447
+ ].includes(d))), c = u(() => x?.value ?? !1), w = u(() => {
1448
+ const d = b.value.gridOptions, l = d.proxyConfig, O = l?.ajax?.query, H = d.toolbarConfig, Y = d.pagerConfig;
1310
1449
  return {
1311
1450
  align: "left",
1312
1451
  border: "inner",
@@ -1315,20 +1454,25 @@ const on = {
1315
1454
  showOverflow: "tooltip",
1316
1455
  size: "medium",
1317
1456
  ...c.value ? { height: "auto" } : {},
1318
- ...f,
1457
+ ...d,
1319
1458
  columnConfig: {
1320
1459
  resizable: !0,
1321
- ...f.columnConfig
1460
+ ...d.columnConfig
1322
1461
  },
1323
- ...W ? {
1462
+ tooltipConfig: {
1463
+ enterable: !0,
1464
+ leaveDelay: 300,
1465
+ ...d.tooltipConfig
1466
+ },
1467
+ ...Y ? {
1324
1468
  pagerConfig: {
1325
1469
  pageSize: 20,
1326
1470
  pageSizes: [10, 20, 30, 50, 100, 200],
1327
1471
  layouts: ["Total", "Sizes", "Home", "PrevPage", "Number", "NextPage", "End"],
1328
- ...W,
1472
+ ...Y,
1329
1473
  slots: {
1330
1474
  sizes: "pagerSizes",
1331
- ...W.slots
1475
+ ...Y.slots
1332
1476
  }
1333
1477
  }
1334
1478
  } : {},
@@ -1346,142 +1490,142 @@ const on = {
1346
1490
  ...l.ajax ? {
1347
1491
  ajax: {
1348
1492
  ...l.ajax,
1349
- ...M ? {
1350
- query: (x) => M(x, t.api.formApi.getValues())
1493
+ ...O ? {
1494
+ query: ($) => O($, t.api.formApi.getValues())
1351
1495
  } : {}
1352
1496
  }
1353
1497
  } : {}
1354
1498
  }
1355
1499
  } : {},
1356
- ...U || F.value ? {
1500
+ ...H || B.value ? {
1357
1501
  toolbarConfig: {
1358
1502
  custom: !0,
1359
1503
  refresh: !0,
1360
1504
  zoom: !0,
1361
- ...U,
1505
+ ...H,
1362
1506
  slots: {
1363
1507
  ...t.tableTitle || e["table-title"] || e["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
1364
- ...e["toolbar-tools"] || U?.search ? { tools: "toolbarTools" } : {}
1508
+ ...e["toolbar-tools"] || H?.search ? { tools: "toolbarTools" } : {}
1365
1509
  }
1366
1510
  }
1367
1511
  } : {}
1368
1512
  };
1369
- }), N = u(() => w.value.gridEvents ?? {});
1370
- _e(
1371
- () => m?.value.mode ?? "light",
1372
- (f) => Be.setTheme(f),
1513
+ }), N = u(() => b.value.gridEvents ?? {});
1514
+ ke(
1515
+ () => v?.value.mode ?? "light",
1516
+ (d) => Ee.setTheme(d),
1373
1517
  { immediate: !0 }
1374
1518
  );
1375
1519
  async function P() {
1376
1520
  await t.api.reload();
1377
1521
  }
1378
- async function j() {
1522
+ async function I() {
1379
1523
  await t.api.reload();
1380
1524
  }
1381
- function d(f, l) {
1382
- typeof l != "number" && typeof l != "string" || f.setPageSizeByEvent(new Event("change"), l);
1525
+ function f(d, l) {
1526
+ typeof l != "number" && typeof l != "string" || d.setPageSizeByEvent(new Event("change"), l);
1383
1527
  }
1384
- return Me(() => {
1385
- s.value && t.api.mount(s.value);
1528
+ return Re(() => {
1529
+ n.value && t.api.mount(n.value);
1386
1530
  }), ht(() => {
1387
1531
  C(), t.api.unmount();
1388
- }), (f, l) => (n(), v("section", {
1389
- class: me(["yee-ui-grid", { "yee-ui-grid--fill-page-content": c.value }])
1532
+ }), (d, l) => (a(), h("section", {
1533
+ class: ye(["yee-ui-grid", { "yee-ui-grid--fill-page-content": c.value }])
1390
1534
  }, [
1391
- $.value ? gt((n(), R(Qo, {
1535
+ T.value ? gt((a(), M(Jo, {
1392
1536
  key: 0,
1393
1537
  api: o.api.formApi,
1394
- options: $.value,
1395
- "on-reset": j,
1538
+ options: T.value,
1539
+ "on-reset": I,
1396
1540
  "on-submit": P
1397
1541
  }, null, 8, ["api", "options"])), [
1398
1542
  [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({
1543
+ ]) : z("", !0),
1544
+ T.value && b.value.separator !== !1 ? (a(), h("div", on)) : z("", !0),
1545
+ E("div", nn, [
1546
+ te(s(nt), Z({
1403
1547
  ref_key: "gridRef",
1404
- ref: s,
1548
+ ref: n,
1405
1549
  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), {
1550
+ }, w.value, wt(N.value)), Me({
1551
+ toolbarActions: S((O) => [
1552
+ U(d.$slots, "table-title", {}, () => [
1553
+ o.tableTitle ? (a(), h("div", an, [
1554
+ ie(D(o.tableTitle) + " ", 1),
1555
+ o.tableTitleHelp ? (a(), M(s(re), {
1412
1556
  key: 0,
1413
1557
  title: o.tableTitleHelp
1414
1558
  }, {
1415
1559
  default: S(() => [...l[0] || (l[0] = [
1416
- B("span", {
1560
+ E("span", {
1417
1561
  class: "yee-ui-grid__help",
1418
1562
  tabindex: "0"
1419
1563
  }, "?", -1)
1420
1564
  ])]),
1421
1565
  _: 1
1422
- }, 8, ["title"])) : O("", !0)
1423
- ])) : O("", !0)
1566
+ }, 8, ["title"])) : z("", !0)
1567
+ ])) : z("", !0)
1424
1568
  ], !0),
1425
- H(f.$slots, "toolbar-actions", fe(pe(M)), void 0, !0)
1569
+ U(d.$slots, "toolbar-actions", ve(me(O)), void 0, !0)
1426
1570
  ]),
1427
- toolbarTools: S((M) => [
1428
- H(f.$slots, "toolbar-tools", fe(pe(M)), void 0, !0)
1571
+ toolbarTools: S((O) => [
1572
+ U(d.$slots, "toolbar-tools", ve(me(O)), void 0, !0)
1429
1573
  ]),
1430
- pagerSizes: S(({ $pager: M, options: U, pageSize: W }) => [
1431
- Z(i(Oe), {
1574
+ pagerSizes: S(({ $pager: O, options: H, pageSize: Y }) => [
1575
+ te(s(Ve), {
1432
1576
  class: "yee-ui-grid__page-size",
1433
- options: U,
1434
- value: W,
1435
- onChange: (x) => d(M, x)
1577
+ options: H,
1578
+ value: Y,
1579
+ onChange: ($) => f(O, $)
1436
1580
  }, null, 8, ["options", "value", "onChange"])
1437
1581
  ]),
1438
1582
  empty: S(() => [
1439
- H(f.$slots, "empty", {}, () => [
1440
- l[1] || (l[1] = B("div", { class: "yee-ui-grid__empty" }, "暂无数据", -1))
1583
+ U(d.$slots, "empty", {}, () => [
1584
+ l[1] || (l[1] = E("div", { class: "yee-ui-grid__empty" }, "暂无数据", -1))
1441
1585
  ], !0)
1442
1586
  ]),
1443
1587
  _: 2
1444
1588
  }, [
1445
- ke(T.value, (M) => ({
1446
- name: M,
1447
- fn: S((U) => [
1448
- H(f.$slots, M, fe(pe(U)), void 0, !0)
1589
+ Se(k.value, (O) => ({
1590
+ name: O,
1591
+ fn: S((H) => [
1592
+ U(d.$slots, O, ve(me(H)), void 0, !0)
1449
1593
  ])
1450
1594
  }))
1451
1595
  ]), 1040)
1452
1596
  ]),
1453
- Z(i(y))
1597
+ te(s(m))
1454
1598
  ], 2));
1455
1599
  }
1456
- }), sn = /* @__PURE__ */ le(ln, [["__scopeId", "data-v-5645a49e"]]);
1600
+ }), sn = /* @__PURE__ */ ue(ln, [["__scopeId", "data-v-efa010c8"]]);
1457
1601
  function Un(o) {
1458
1602
  it();
1459
- const t = new Zo(o), e = sn;
1460
- return [te({
1603
+ const t = new Xo(o), e = sn;
1604
+ return [oe({
1461
1605
  name: "YeeGrid",
1462
1606
  inheritAttrs: !1,
1463
1607
  props: {
1464
1608
  tableTitle: String,
1465
1609
  tableTitleHelp: String
1466
1610
  },
1467
- setup(m, { attrs: k, slots: g }) {
1468
- return Se(() => t.unmount()), () => Xe(e, {
1469
- ...k,
1611
+ setup(v, { attrs: x, slots: p }) {
1612
+ return Ce(() => t.unmount()), () => Xe(e, {
1613
+ ...x,
1470
1614
  api: t,
1471
- ...m.tableTitle ? { tableTitle: m.tableTitle } : {},
1472
- ...m.tableTitleHelp ? { tableTitleHelp: m.tableTitleHelp } : {}
1473
- }, g);
1615
+ ...v.tableTitle ? { tableTitle: v.tableTitle } : {},
1616
+ ...v.tableTitleHelp ? { tableTitleHelp: v.tableTitleHelp } : {}
1617
+ }, p);
1474
1618
  }
1475
1619
  }), t];
1476
1620
  }
1477
1621
  const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui-modal__title" }, dn = {
1478
1622
  key: 1,
1479
1623
  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({
1624
+ }, 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__ */ oe({
1481
1625
  inheritAttrs: !1,
1482
1626
  name: "YeeModal",
1483
1627
  __name: "YeeModal",
1484
- props: /* @__PURE__ */ Ue({
1628
+ props: /* @__PURE__ */ je({
1485
1629
  cancelButtonText: { default: "取消" },
1486
1630
  centered: { type: Boolean, default: !1 },
1487
1631
  closable: { type: Boolean, default: !0 },
@@ -1503,16 +1647,16 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1503
1647
  open: { type: Boolean, default: !1 },
1504
1648
  openModifiers: {}
1505
1649
  }),
1506
- emits: /* @__PURE__ */ Ue(["cancel", "close", "confirm", "update:fullscreen"], ["update:open"]),
1650
+ emits: /* @__PURE__ */ je(["cancel", "close", "confirm", "update:fullscreen"], ["update:open"]),
1507
1651
  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(() => {
1509
- const D = Object.prototype.hasOwnProperty.call(e.wrapProps ?? {}, "aria-labelledby");
1652
+ const e = o, n = t, v = Ue(o, "open"), x = Ue(e, "fullscreen"), p = Ze(), m = ze(), C = _t(), b = u(() => e.type === "drawer"), T = u(() => !b.value && x.value), B = u(() => !!(e.title || m.header)), k = u(() => B.value || e.closable), c = u(() => B.value || e.fullscreenButton || e.closable), w = u(() => T.value ? "退出全屏" : "进入全屏"), N = u(() => {
1653
+ const L = Object.prototype.hasOwnProperty.call(e.wrapProps ?? {}, "aria-labelledby");
1510
1654
  return {
1511
1655
  ...e.wrapProps,
1512
- "aria-labelledby": D ? e.wrapProps?.["aria-labelledby"] : F.value ? C : void 0
1656
+ "aria-labelledby": L ? e.wrapProps?.["aria-labelledby"] : B.value ? C : void 0
1513
1657
  };
1514
1658
  }), P = u(() => {
1515
- if ($.value)
1659
+ if (T.value)
1516
1660
  return {
1517
1661
  height: "100%",
1518
1662
  margin: 0,
@@ -1522,151 +1666,151 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1522
1666
  width: "100vw"
1523
1667
  };
1524
1668
  });
1525
- function j() {
1526
- const { style: D, ...J } = g;
1527
- return J;
1528
- }
1529
- function d() {
1530
- return [g.style, e.style].filter(Boolean);
1669
+ function I() {
1670
+ const { style: L, ...K } = p;
1671
+ return K;
1531
1672
  }
1532
1673
  function f() {
1533
- return [g.style, e.style, P.value].filter(Boolean);
1674
+ return [p.style, e.style].filter(Boolean);
1534
1675
  }
1535
- const l = () => y.closeIcon?.() ?? g.closeIcon ?? Xe(zt);
1536
- function M(D) {
1537
- s("cancel", D), m.value = !1;
1676
+ function d() {
1677
+ return [p.style, e.style, P.value].filter(Boolean);
1678
+ }
1679
+ const l = () => m.closeIcon?.() ?? p.closeIcon ?? Xe(Vt);
1680
+ function O(L) {
1681
+ n("cancel", L), v.value = !1;
1538
1682
  }
1539
- function U(D) {
1540
- s("confirm", D);
1683
+ function H(L) {
1684
+ n("confirm", L);
1541
1685
  }
1542
- function W() {
1543
- s("close");
1686
+ function Y() {
1687
+ n("close");
1544
1688
  }
1545
- function x() {
1546
- k.value = !k.value;
1689
+ function $() {
1690
+ x.value = !x.value;
1547
1691
  }
1548
- return (D, J) => w.value ? (n(), R(i(Tt), X({ key: 0 }, j(), {
1692
+ return (L, K) => b.value ? (a(), M(s(Tt), Z({ key: 0 }, I(), {
1549
1693
  class: "yee-ui-modal-drawer",
1550
1694
  closable: !1,
1551
1695
  "destroy-on-close": e.destroyOnClose,
1552
1696
  keyboard: e.keyboard,
1553
1697
  "mask-closable": e.maskClosable,
1554
- open: m.value,
1555
- style: d(),
1698
+ open: v.value,
1699
+ style: f(),
1556
1700
  width: e.width,
1557
- onAfterOpenChange: J[0] || (J[0] = (oe) => !oe && W()),
1558
- onClose: M
1559
- }), Re({
1701
+ onAfterOpenChange: K[0] || (K[0] = (F) => !F && Y()),
1702
+ onClose: O
1703
+ }), Me({
1560
1704
  footer: S(() => [
1561
- B("div", pn, [
1562
- H(D.$slots, "footer", {}, () => [
1563
- e.showCancelButton ? (n(), R(i(ne), {
1705
+ E("div", pn, [
1706
+ U(L.$slots, "footer", {}, () => [
1707
+ e.showCancelButton ? (a(), M(s(se), {
1564
1708
  key: 0,
1565
- onClick: M
1709
+ onClick: O
1566
1710
  }, {
1567
1711
  default: S(() => [
1568
- ae(A(e.cancelButtonText), 1)
1712
+ ie(D(e.cancelButtonText), 1)
1569
1713
  ]),
1570
1714
  _: 1
1571
- })) : O("", !0),
1572
- e.showConfirmButton ? (n(), R(i(ne), {
1715
+ })) : z("", !0),
1716
+ e.showConfirmButton ? (a(), M(s(se), {
1573
1717
  key: 1,
1574
1718
  loading: e.confirmButtonLoading,
1575
1719
  type: "primary",
1576
- onClick: U
1720
+ onClick: H
1577
1721
  }, {
1578
1722
  default: S(() => [
1579
- ae(A(e.confirmButtonText), 1)
1723
+ ie(D(e.confirmButtonText), 1)
1580
1724
  ]),
1581
1725
  _: 1
1582
- }, 8, ["loading"])) : O("", !0)
1726
+ }, 8, ["loading"])) : z("", !0)
1583
1727
  ], !0)
1584
1728
  ])
1585
1729
  ]),
1586
1730
  default: S(() => [
1587
- B("div", fn, [
1588
- H(D.$slots, "default", {}, void 0, !0)
1731
+ E("div", fn, [
1732
+ U(L.$slots, "default", {}, void 0, !0)
1589
1733
  ])
1590
1734
  ]),
1591
1735
  _: 2
1592
1736
  }, [
1593
- T.value ? {
1737
+ k.value ? {
1594
1738
  name: "title",
1595
1739
  fn: S(() => [
1596
- B("div", rn, [
1597
- F.value ? (n(), v("div", {
1740
+ E("div", rn, [
1741
+ B.value ? (a(), h("div", {
1598
1742
  key: 0,
1599
- id: i(C),
1743
+ id: s(C),
1600
1744
  class: "yee-ui-modal__heading"
1601
1745
  }, [
1602
- H(D.$slots, "header", {}, () => [
1603
- B("span", cn, A(e.title), 1)
1746
+ U(L.$slots, "header", {}, () => [
1747
+ E("span", cn, D(e.title), 1)
1604
1748
  ], !0)
1605
- ], 8, un)) : O("", !0),
1606
- e.closable ? (n(), v("div", dn, [
1607
- Z(i(ne), {
1749
+ ], 8, un)) : z("", !0),
1750
+ e.closable ? (a(), h("div", dn, [
1751
+ te(s(se), {
1608
1752
  "aria-label": "关闭",
1609
1753
  class: "yee-ui-modal__header-action",
1610
1754
  size: "small",
1611
1755
  type: "text",
1612
- onClick: M
1756
+ onClick: O
1613
1757
  }, {
1614
1758
  default: S(() => [
1615
- Z(l)
1759
+ te(l)
1616
1760
  ]),
1617
1761
  _: 1
1618
1762
  })
1619
- ])) : O("", !0)
1763
+ ])) : z("", !0)
1620
1764
  ])
1621
1765
  ]),
1622
1766
  key: "0"
1623
1767
  } : 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,
1768
+ ]), 1040, ["destroy-on-close", "keyboard", "mask-closable", "open", "style", "width"])) : (a(), M(s(et), Z({ key: 1 }, I(), {
1769
+ centered: T.value ? !1 : e.centered,
1626
1770
  class: {
1627
1771
  "yee-ui-modal": !0,
1628
- "yee-ui-modal--fullscreen": $.value
1772
+ "yee-ui-modal--fullscreen": T.value
1629
1773
  },
1630
1774
  closable: !1,
1631
1775
  "destroy-on-close": e.destroyOnClose,
1632
1776
  keyboard: e.keyboard,
1633
1777
  "mask-closable": e.maskClosable,
1634
- open: m.value,
1635
- style: f(),
1636
- width: $.value ? "100vw" : e.width,
1778
+ open: v.value,
1779
+ style: d(),
1780
+ width: T.value ? "100vw" : e.width,
1637
1781
  "wrap-props": N.value,
1638
- onAfterClose: W,
1639
- onCancel: M
1640
- }), Re({
1782
+ onAfterClose: Y,
1783
+ onCancel: O
1784
+ }), Me({
1641
1785
  footer: S(() => [
1642
- B("div", bn, [
1643
- H(D.$slots, "footer", {}, () => [
1644
- e.showCancelButton ? (n(), R(i(ne), {
1786
+ E("div", bn, [
1787
+ U(L.$slots, "footer", {}, () => [
1788
+ e.showCancelButton ? (a(), M(s(se), {
1645
1789
  key: 0,
1646
- onClick: M
1790
+ onClick: O
1647
1791
  }, {
1648
1792
  default: S(() => [
1649
- ae(A(e.cancelButtonText), 1)
1793
+ ie(D(e.cancelButtonText), 1)
1650
1794
  ]),
1651
1795
  _: 1
1652
- })) : O("", !0),
1653
- e.showConfirmButton ? (n(), R(i(ne), {
1796
+ })) : z("", !0),
1797
+ e.showConfirmButton ? (a(), M(s(se), {
1654
1798
  key: 1,
1655
1799
  loading: e.confirmButtonLoading,
1656
1800
  type: "primary",
1657
- onClick: U
1801
+ onClick: H
1658
1802
  }, {
1659
1803
  default: S(() => [
1660
- ae(A(e.confirmButtonText), 1)
1804
+ ie(D(e.confirmButtonText), 1)
1661
1805
  ]),
1662
1806
  _: 1
1663
- }, 8, ["loading"])) : O("", !0)
1807
+ }, 8, ["loading"])) : z("", !0)
1664
1808
  ], !0)
1665
1809
  ])
1666
1810
  ]),
1667
1811
  default: S(() => [
1668
- B("div", gn, [
1669
- H(D.$slots, "default", {}, void 0, !0)
1812
+ E("div", gn, [
1813
+ U(L.$slots, "default", {}, void 0, !0)
1670
1814
  ])
1671
1815
  ]),
1672
1816
  _: 2
@@ -1674,51 +1818,51 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1674
1818
  c.value ? {
1675
1819
  name: "title",
1676
1820
  fn: S(() => [
1677
- B("div", mn, [
1678
- F.value ? (n(), v("div", {
1821
+ E("div", vn, [
1822
+ B.value ? (a(), h("div", {
1679
1823
  key: 0,
1680
- id: i(C),
1824
+ id: s(C),
1681
1825
  class: "yee-ui-modal__heading"
1682
1826
  }, [
1683
- H(D.$slots, "header", {}, () => [
1684
- B("span", yn, A(e.title), 1)
1827
+ U(L.$slots, "header", {}, () => [
1828
+ E("span", yn, D(e.title), 1)
1685
1829
  ], !0)
1686
- ], 8, vn)) : O("", !0),
1687
- B("div", hn, [
1688
- e.fullscreenButton ? (n(), R(i(ue), {
1830
+ ], 8, mn)) : z("", !0),
1831
+ E("div", hn, [
1832
+ e.fullscreenButton ? (a(), M(s(re), {
1689
1833
  key: 0,
1690
- title: b.value
1834
+ title: w.value
1691
1835
  }, {
1692
1836
  default: S(() => [
1693
- Z(i(ne), {
1694
- "aria-label": b.value,
1695
- "aria-pressed": $.value,
1837
+ te(s(se), {
1838
+ "aria-label": w.value,
1839
+ "aria-pressed": T.value,
1696
1840
  class: "yee-ui-modal__header-action",
1697
1841
  size: "small",
1698
1842
  type: "text",
1699
- onClick: x
1843
+ onClick: $
1700
1844
  }, {
1701
1845
  default: S(() => [
1702
- $.value ? (n(), R(i(tt), { key: 0 })) : (n(), R(i(ot), { key: 1 }))
1846
+ T.value ? (a(), M(s(tt), { key: 0 })) : (a(), M(s(ot), { key: 1 }))
1703
1847
  ]),
1704
1848
  _: 1
1705
1849
  }, 8, ["aria-label", "aria-pressed"])
1706
1850
  ]),
1707
1851
  _: 1
1708
- }, 8, ["title"])) : O("", !0),
1709
- e.closable ? (n(), R(i(ne), {
1852
+ }, 8, ["title"])) : z("", !0),
1853
+ e.closable ? (a(), M(s(se), {
1710
1854
  key: 1,
1711
1855
  "aria-label": "关闭",
1712
1856
  class: "yee-ui-modal__header-action",
1713
1857
  size: "small",
1714
1858
  type: "text",
1715
- onClick: M
1859
+ onClick: O
1716
1860
  }, {
1717
1861
  default: S(() => [
1718
- Z(l)
1862
+ te(l)
1719
1863
  ]),
1720
1864
  _: 1
1721
- })) : O("", !0)
1865
+ })) : z("", !0)
1722
1866
  ])
1723
1867
  ])
1724
1868
  ]),
@@ -1726,16 +1870,16 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1726
1870
  } : void 0
1727
1871
  ]), 1040, ["centered", "class", "destroy-on-close", "keyboard", "mask-closable", "open", "style", "width", "wrap-props"]));
1728
1872
  }
1729
- }), jn = /* @__PURE__ */ le(_n, [["__scopeId", "data-v-6cb12c49"]]), wn = { class: "yee-ui-page__heading" }, kn = {
1873
+ }), jn = /* @__PURE__ */ ue(wn, [["__scopeId", "data-v-6cb12c49"]]), _n = { class: "yee-ui-page__heading" }, xn = {
1730
1874
  key: 0,
1731
1875
  class: "yee-ui-page__title"
1732
- }, xn = {
1876
+ }, kn = {
1733
1877
  key: 0,
1734
1878
  class: "yee-ui-page__description"
1735
1879
  }, Cn = {
1736
1880
  key: 0,
1737
1881
  class: "yee-ui-page__extra"
1738
- }, Sn = /* @__PURE__ */ te({
1882
+ }, $n = /* @__PURE__ */ oe({
1739
1883
  name: "YeePage",
1740
1884
  __name: "YeePage",
1741
1885
  props: {
@@ -1748,81 +1892,81 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1748
1892
  title: {}
1749
1893
  },
1750
1894
  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);
1895
+ const t = o, e = ze(), n = u(() => !!(t.description || t.title || e.description || e.extra || e.title)), v = u(() => t.autoContentHeight);
1896
+ Qe(lt, v);
1897
+ const x = R(0), p = R(0), m = R(!1), C = xe("headerRef"), b = xe("footerRef");
1898
+ let T;
1899
+ function B() {
1900
+ const P = C.value?.offsetHeight ?? 0, I = b.value?.offsetHeight ?? 0;
1901
+ x.value !== P && (x.value = P), p.value !== I && (p.value = I);
1758
1902
  }
1759
- function T() {
1760
- $?.disconnect(), $ = void 0, !(typeof ResizeObserver > "u") && ($ = new ResizeObserver(F), C.value && $.observe(C.value), w.value && $.observe(w.value));
1903
+ function k() {
1904
+ T?.disconnect(), T = void 0, !(typeof ResizeObserver > "u") && (T = new ResizeObserver(B), C.value && T.observe(C.value), b.value && T.observe(b.value));
1761
1905
  }
1762
1906
  async function c() {
1763
- if ($?.disconnect(), $ = void 0, !t.autoContentHeight) {
1764
- y.value = !1;
1907
+ if (T?.disconnect(), T = void 0, !t.autoContentHeight) {
1908
+ m.value = !1;
1765
1909
  return;
1766
1910
  }
1767
- await De(), F(), y.value = !0, T();
1911
+ await Te(), B(), m.value = !0, k();
1768
1912
  }
1769
- const b = u(() => ({
1913
+ const w = u(() => ({
1770
1914
  "--yee-page-height-offset": typeof t.heightOffset == "number" ? `${t.heightOffset}px` : t.heightOffset
1771
1915
  })), N = u(() => t.autoContentHeight ? {
1772
- height: `calc(100% - ${k.value}px - ${g.value}px)`,
1773
- overflowY: y.value ? "auto" : "hidden"
1916
+ height: `calc(100% - ${x.value}px - ${p.value}px)`,
1917
+ overflowY: m.value ? "auto" : "hidden"
1774
1918
  } : {});
1775
- return _e(
1776
- [() => t.autoContentHeight, s, () => !!e.footer],
1919
+ return ke(
1920
+ [() => t.autoContentHeight, n, () => !!e.footer],
1777
1921
  () => {
1778
1922
  c();
1779
1923
  },
1780
1924
  { flush: "post" }
1781
- ), Me(() => {
1925
+ ), Re(() => {
1782
1926
  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)
1927
+ }), Ce(() => T?.disconnect()), (P, I) => (a(), h("section", {
1928
+ class: ye(["yee-ui-page", { "yee-ui-page--auto-height": o.autoContentHeight }]),
1929
+ style: he(w.value)
1786
1930
  }, [
1787
- s.value ? (n(), v("header", {
1931
+ n.value ? (a(), h("header", {
1788
1932
  key: 0,
1789
1933
  ref_key: "headerRef",
1790
1934
  ref: C,
1791
- class: me(["yee-ui-page__header", o.headerClass])
1935
+ class: ye(["yee-ui-page__header", o.headerClass])
1792
1936
  }, [
1793
- B("div", wn, [
1794
- H(P.$slots, "title", {}, () => [
1795
- o.title ? (n(), v("h1", kn, A(o.title), 1)) : O("", !0)
1937
+ E("div", _n, [
1938
+ U(P.$slots, "title", {}, () => [
1939
+ o.title ? (a(), h("h1", xn, D(o.title), 1)) : z("", !0)
1796
1940
  ], !0),
1797
- H(P.$slots, "description", {}, () => [
1798
- o.description ? (n(), v("p", xn, A(o.description), 1)) : O("", !0)
1941
+ U(P.$slots, "description", {}, () => [
1942
+ o.description ? (a(), h("p", kn, D(o.description), 1)) : z("", !0)
1799
1943
  ], !0)
1800
1944
  ]),
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)
1945
+ P.$slots.extra ? (a(), h("div", Cn, [
1946
+ U(P.$slots, "extra", {}, void 0, !0)
1947
+ ])) : z("", !0)
1948
+ ], 2)) : z("", !0),
1949
+ E("main", {
1950
+ class: ye(["yee-ui-page__content", o.contentClass]),
1951
+ style: he(N.value)
1808
1952
  }, [
1809
- H(P.$slots, "default", {}, void 0, !0)
1953
+ U(P.$slots, "default", {}, void 0, !0)
1810
1954
  ], 6),
1811
- P.$slots.footer ? (n(), v("footer", {
1955
+ P.$slots.footer ? (a(), h("footer", {
1812
1956
  key: 1,
1813
1957
  ref_key: "footerRef",
1814
- ref: w,
1815
- class: me(["yee-ui-page__footer", o.footerClass])
1958
+ ref: b,
1959
+ class: ye(["yee-ui-page__footer", o.footerClass])
1816
1960
  }, [
1817
- H(P.$slots, "footer", {}, void 0, !0)
1818
- ], 2)) : O("", !0)
1961
+ U(P.$slots, "footer", {}, void 0, !0)
1962
+ ], 2)) : z("", !0)
1819
1963
  ], 6));
1820
1964
  }
1821
- }), Dn = /* @__PURE__ */ le(Sn, [["__scopeId", "data-v-ff8fc3a1"]]), $n = { class: "yee-ui-select__option-label" }, Tn = /* @__PURE__ */ te({
1965
+ }), Dn = /* @__PURE__ */ ue($n, [["__scopeId", "data-v-ff8fc3a1"]]), Sn = { class: "yee-ui-select__option-label" }, Tn = /* @__PURE__ */ oe({
1822
1966
  inheritAttrs: !1,
1823
1967
  name: "YeeSelect",
1824
1968
  __name: "YeeSelect",
1825
- props: /* @__PURE__ */ Ue({
1969
+ props: /* @__PURE__ */ je({
1826
1970
  fieldNames: {},
1827
1971
  options: {}
1828
1972
  }, {
@@ -1831,118 +1975,118 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1831
1975
  }),
1832
1976
  emits: ["update:value"],
1833
1977
  setup(o) {
1834
- const t = o, e = Ae(o, "value"), s = Ze(), m = ze(), k = z(!1), g = u(() => ({
1978
+ const t = o, e = Ue(o, "value"), n = Ze(), v = ze(), x = R(!1), p = u(() => ({
1835
1979
  label: t.fieldNames?.label ?? "label",
1836
1980
  options: t.fieldNames?.options ?? "options",
1837
1981
  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);
1982
+ })), m = u(() => n.class), C = u(() => n.style), b = u(() => {
1983
+ const f = {};
1984
+ for (const [d, l] of Object.entries(n))
1985
+ d !== "class" && d !== "style" && d !== "onDropdownVisibleChange" && (f[d] = l);
1986
+ return f;
1987
+ }), T = u(() => !v.default && !v.option);
1988
+ function B(f) {
1989
+ const d = n.onDropdownVisibleChange;
1990
+ if (typeof d == "function") {
1991
+ d(f);
1848
1992
  return;
1849
1993
  }
1850
- f?.forEach((l) => l?.(d));
1994
+ d?.forEach((l) => l?.(f));
1851
1995
  }
1852
- function T(d) {
1853
- k.value = d, F(d);
1996
+ function k(f) {
1997
+ x.value = f, B(f);
1854
1998
  }
1855
- function c(d) {
1856
- return typeof d == "number" || typeof d == "string" ? String(d) : "";
1999
+ function c(f) {
2000
+ return typeof f == "number" || typeof f == "string" ? String(f) : "";
1857
2001
  }
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;
2002
+ function w(f, d) {
2003
+ if (f)
2004
+ for (const l of f) {
2005
+ const O = l[p.value.options], H = w(O, d);
2006
+ if (H) return H;
2007
+ const Y = l[p.value.value];
2008
+ if (Y === d || String(Y) === String(d)) return l;
1865
2009
  }
1866
2010
  }
1867
- function N(d) {
1868
- return d ? c(d[g.value.label]) || c(d.title) || c(d[g.value.value]) : "";
2011
+ function N(f) {
2012
+ return f ? c(f[p.value.label]) || c(f.title) || c(f[p.value.value]) : "";
1869
2013
  }
1870
2014
  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;
2015
+ const f = e.value;
2016
+ if (!(f == null || f === ""))
2017
+ return Array.isArray(f) ? f.map((d) => N(w(t.options, d)) || c(d)).filter(Boolean).join("、") || void 0 : N(w(t.options, f)) || c(f) || void 0;
1874
2018
  });
1875
- function j(d) {
1876
- return N(d);
2019
+ function I(f) {
2020
+ return N(f);
1877
2021
  }
1878
- return (d, f) => (n(), R(i(ue), X(k.value ? { open: !1 } : {}, { title: P.value }), {
2022
+ return (f, d) => (a(), M(s(re), Z(x.value ? { open: !1 } : {}, { title: P.value }), {
1879
2023
  default: S(() => [
1880
- B("div", {
1881
- class: me(["yee-ui-select", y.value]),
1882
- style: be(C.value)
2024
+ E("div", {
2025
+ class: ye(["yee-ui-select", m.value]),
2026
+ style: he(C.value)
1883
2027
  }, [
1884
- $.value ? (n(), R(i(Oe), X({
2028
+ T.value ? (a(), M(s(Ve), Z({
1885
2029
  key: 0,
1886
2030
  value: e.value,
1887
- "onUpdate:value": f[0] || (f[0] = (l) => e.value = l)
1888
- }, w.value, {
1889
- "field-names": g.value,
2031
+ "onUpdate:value": d[0] || (d[0] = (l) => e.value = l)
2032
+ }, b.value, {
2033
+ "field-names": p.value,
1890
2034
  options: o.options,
1891
- onDropdownVisibleChange: T
2035
+ onDropdownVisibleChange: k
1892
2036
  }), {
1893
2037
  option: S((l) => [
1894
- Z(i(ue), {
1895
- title: j(l),
2038
+ te(s(re), {
2039
+ title: I(l),
1896
2040
  placement: "left"
1897
2041
  }, {
1898
2042
  default: S(() => [
1899
- B("span", $n, A(j(l)), 1)
2043
+ E("span", Sn, D(I(l)), 1)
1900
2044
  ]),
1901
2045
  _: 2
1902
2046
  }, 1032, ["title"])
1903
2047
  ]),
1904
2048
  _: 1
1905
- }, 16, ["value", "field-names", "options"])) : (n(), R(i(Oe), X({
2049
+ }, 16, ["value", "field-names", "options"])) : (a(), M(s(Ve), Z({
1906
2050
  key: 1,
1907
2051
  value: e.value,
1908
- "onUpdate:value": f[1] || (f[1] = (l) => e.value = l)
1909
- }, w.value, {
1910
- "field-names": g.value,
2052
+ "onUpdate:value": d[1] || (d[1] = (l) => e.value = l)
2053
+ }, b.value, {
2054
+ "field-names": p.value,
1911
2055
  options: o.options,
1912
- onDropdownVisibleChange: T
1913
- }), Re({ _: 2 }, [
1914
- d.$slots.default ? {
2056
+ onDropdownVisibleChange: k
2057
+ }), Me({ _: 2 }, [
2058
+ f.$slots.default ? {
1915
2059
  name: "default",
1916
2060
  fn: S((l) => [
1917
- H(d.$slots, "default", fe(pe(l)), void 0, !0)
2061
+ U(f.$slots, "default", ve(me(l)), void 0, !0)
1918
2062
  ]),
1919
2063
  key: "0"
1920
2064
  } : void 0,
1921
- d.$slots.option ? {
2065
+ f.$slots.option ? {
1922
2066
  name: "option",
1923
2067
  fn: S((l) => [
1924
- H(d.$slots, "option", fe(pe(l)), void 0, !0)
2068
+ U(f.$slots, "option", ve(me(l)), void 0, !0)
1925
2069
  ]),
1926
2070
  key: "1"
1927
2071
  } : void 0,
1928
- d.$slots.tagRender ? {
2072
+ f.$slots.tagRender ? {
1929
2073
  name: "tagRender",
1930
2074
  fn: S((l) => [
1931
- H(d.$slots, "tagRender", fe(pe(l)), void 0, !0)
2075
+ U(f.$slots, "tagRender", ve(me(l)), void 0, !0)
1932
2076
  ]),
1933
2077
  key: "2"
1934
2078
  } : void 0,
1935
- d.$slots.dropdownRender ? {
2079
+ f.$slots.dropdownRender ? {
1936
2080
  name: "dropdownRender",
1937
2081
  fn: S((l) => [
1938
- H(d.$slots, "dropdownRender", fe(pe(l)), void 0, !0)
2082
+ U(f.$slots, "dropdownRender", ve(me(l)), void 0, !0)
1939
2083
  ]),
1940
2084
  key: "3"
1941
2085
  } : void 0,
1942
- d.$slots.notFoundContent ? {
2086
+ f.$slots.notFoundContent ? {
1943
2087
  name: "notFoundContent",
1944
2088
  fn: S((l) => [
1945
- H(d.$slots, "notFoundContent", fe(pe(l)), void 0, !0)
2089
+ U(f.$slots, "notFoundContent", ve(me(l)), void 0, !0)
1946
2090
  ]),
1947
2091
  key: "4"
1948
2092
  } : void 0
@@ -1952,26 +2096,26 @@ const rn = { class: "yee-ui-modal__header" }, un = ["id"], cn = { class: "yee-ui
1952
2096
  _: 3
1953
2097
  }, 16, ["title"]));
1954
2098
  }
1955
- }), In = /* @__PURE__ */ le(Tn, [["__scopeId", "data-v-028e2b2a"]]);
2099
+ }), In = /* @__PURE__ */ ue(Tn, [["__scopeId", "data-v-028e2b2a"]]);
1956
2100
  export {
1957
- zn as CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT,
2101
+ Vn as CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT,
1958
2102
  Nn as PlatformConfigProvider,
1959
2103
  Pn as YeeDescriptions,
1960
2104
  Hn as YeeEllipsisText,
1961
2105
  An as YeeFilePreview,
1962
2106
  Ln as YeeFileUpload,
1963
- Qo as YeeForm,
1964
- Xo as YeeFormApi,
1965
- Zo as YeeGridApi,
2107
+ Jo as YeeForm,
2108
+ Qo as YeeFormApi,
2109
+ Xo as YeeGridApi,
1966
2110
  jn as YeeModal,
1967
2111
  Dn as YeePage,
1968
2112
  In as YeeSelect,
1969
2113
  qn as darkThemeTokens,
1970
2114
  Gn as lightThemeTokens,
1971
- Ve as platformThemeKey,
1972
- Ft as resolvePlatformTheme,
1973
- Bt as toAntDesignTheme,
2115
+ Ne as platformThemeKey,
2116
+ Bt as resolvePlatformTheme,
2117
+ Ft as toAntDesignTheme,
1974
2118
  Et as toPlatformCssVariables,
1975
- Vn as usePlatformTheme,
2119
+ zn as usePlatformTheme,
1976
2120
  Un as useYeeGrid
1977
2121
  };