@yeepay/yee-boss-ui 0.1.10 → 0.1.11

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