@yeepay/yee-boss-ui 0.1.7 → 0.1.8

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