@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/README.md +32 -0
- package/dist/components/file-preview/YeeFilePreview.vue.d.ts +23 -0
- package/dist/components/file-preview/index.d.ts +2 -0
- package/dist/components/file-preview/source.d.ts +8 -0
- package/dist/components/file-preview/types.d.ts +32 -0
- package/dist/components/file-preview/useFilePreview.d.ts +31 -0
- package/dist/docx-preview.min-lCFRKxYn.js +4852 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1295 -636
- package/dist/marked.esm-DaHdfxOj.js +1563 -0
- package/dist/postal-mime-CPJ2QXsD.js +3219 -0
- package/dist/purify.es-HJ4qIUVZ.js +869 -0
- package/dist/style.css +1 -1
- package/dist/utils/platform-message.d.ts +5 -0
- package/dist/xlsx-CF422ARu.js +24728 -0
- package/package.json +7 -2
package/dist/index.js
CHANGED
|
@@ -1,51 +1,54 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { r as
|
|
4
|
-
import { d as
|
|
5
|
-
import { FullscreenExitOutlined as
|
|
6
|
-
import { VxeTable as
|
|
7
|
-
import { VxeButton as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
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
|
|
13
|
+
return o;
|
|
14
14
|
}
|
|
15
|
-
const
|
|
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(
|
|
22
|
-
const t =
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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:
|
|
31
|
+
style: xe(h.value)
|
|
29
32
|
}, [
|
|
30
|
-
|
|
31
|
-
], 12,
|
|
33
|
+
A(v.$slots, "default", {}, void 0, !0)
|
|
34
|
+
], 12, Wt)
|
|
32
35
|
]),
|
|
33
36
|
_: 3
|
|
34
37
|
}, 8, ["theme"]));
|
|
35
38
|
}
|
|
36
|
-
}),
|
|
37
|
-
const e =
|
|
38
|
-
for (const [
|
|
39
|
-
e[
|
|
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
|
-
},
|
|
42
|
-
async function
|
|
43
|
-
if (!
|
|
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(
|
|
48
|
+
return await navigator.clipboard.writeText(o), !0;
|
|
46
49
|
} catch {
|
|
47
50
|
const t = document.createElement("textarea");
|
|
48
|
-
t.value =
|
|
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
|
-
|
|
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
|
-
},
|
|
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(
|
|
74
|
-
const t =
|
|
75
|
-
function
|
|
76
|
-
return
|
|
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
|
|
79
|
-
const
|
|
80
|
-
if (!
|
|
81
|
-
|
|
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
|
|
85
|
-
|
|
104
|
+
if (!await Gt(d)) {
|
|
105
|
+
we.error("复制失败");
|
|
86
106
|
return;
|
|
87
107
|
}
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
|
|
108
|
+
_.add(S), we.success("已复制");
|
|
109
|
+
const b = setTimeout(() => {
|
|
110
|
+
_.delete(S), T.delete(b);
|
|
91
111
|
}, 1500);
|
|
92
|
-
|
|
112
|
+
T.add(b);
|
|
93
113
|
}
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
}), (
|
|
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:
|
|
100
|
-
column:
|
|
101
|
-
layout:
|
|
102
|
-
size:
|
|
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:
|
|
105
|
-
(
|
|
106
|
-
key:
|
|
107
|
-
label:
|
|
108
|
-
span:
|
|
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:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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(
|
|
135
|
+
title: String(d.value ?? "")
|
|
116
136
|
}, {
|
|
117
|
-
default:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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"])) : (
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
150
|
+
d.copyable ? (a(), p("button", {
|
|
131
151
|
key: 2,
|
|
132
|
-
class: "yee-descriptions__copy",
|
|
133
|
-
disabled:
|
|
152
|
+
class: "yee-ui-descriptions__copy",
|
|
153
|
+
disabled: _.has($(d, b)),
|
|
134
154
|
type: "button",
|
|
135
|
-
onClick: (
|
|
136
|
-
},
|
|
155
|
+
onClick: (k) => N(d, $(d, b))
|
|
156
|
+
}, L(_.has($(d, b)) ? "已复制" : "复制"), 9, Zt)) : E("", !0)
|
|
137
157
|
]),
|
|
138
|
-
|
|
158
|
+
d.info ? (a(), p("span", {
|
|
139
159
|
key: 0,
|
|
140
|
-
class: "yee-descriptions__info",
|
|
141
|
-
style:
|
|
142
|
-
},
|
|
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
|
-
}),
|
|
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(
|
|
171
|
-
const e =
|
|
172
|
-
const
|
|
173
|
-
return !
|
|
174
|
-
}),
|
|
175
|
-
"yee-ellipsis-text--expandable": e.expand,
|
|
176
|
-
"yee-ellipsis-text--expanded":
|
|
177
|
-
"yee-ellipsis-text--multi-line": !
|
|
178
|
-
"yee-ellipsis-text--single-line": !
|
|
179
|
-
})),
|
|
180
|
-
const
|
|
181
|
-
return
|
|
182
|
-
}),
|
|
183
|
-
const
|
|
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:
|
|
186
|
-
color: e.tooltipColor ||
|
|
187
|
-
fontSize: e.tooltipFontSize === void 0 ?
|
|
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
|
|
190
|
-
}),
|
|
191
|
-
let
|
|
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
|
|
194
|
-
if (!
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
|
|
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
|
|
201
|
-
|
|
220
|
+
const K = $.value === 1 ? C.scrollWidth - C.clientWidth : C.scrollHeight - C.clientHeight;
|
|
221
|
+
g.value = K > N.value;
|
|
202
222
|
}
|
|
203
|
-
function
|
|
204
|
-
e.expand && (
|
|
223
|
+
function G() {
|
|
224
|
+
e.expand && (_.value = !_.value, s("expandChange", _.value), Ge(Y));
|
|
205
225
|
}
|
|
206
|
-
function
|
|
207
|
-
!e.expand ||
|
|
226
|
+
function J(C) {
|
|
227
|
+
!e.expand || C.key !== "Enter" && C.key !== " " || (C.preventDefault(), G());
|
|
208
228
|
}
|
|
209
|
-
return
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
}),
|
|
213
|
-
|
|
214
|
-
}),
|
|
215
|
-
|
|
216
|
-
}), (
|
|
217
|
-
color:
|
|
218
|
-
"overlay-inner-style":
|
|
219
|
-
"overlay-style":
|
|
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:
|
|
223
|
-
|
|
224
|
-
|
|
242
|
+
title: w(() => [
|
|
243
|
+
A(C.$slots, "tooltip", {}, () => [
|
|
244
|
+
A(C.$slots, "default", {}, void 0, !0)
|
|
225
245
|
], !0)
|
|
226
246
|
]),
|
|
227
|
-
default:
|
|
228
|
-
|
|
229
|
-
"aria-expanded": e.expand ?
|
|
230
|
-
class: ["yee-ellipsis-text",
|
|
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:
|
|
252
|
+
style: S.value,
|
|
233
253
|
tabindex: e.expand ? 0 : void 0,
|
|
234
|
-
onClick:
|
|
235
|
-
onKeydown:
|
|
254
|
+
onClick: G,
|
|
255
|
+
onKeydown: J
|
|
236
256
|
}), [
|
|
237
|
-
|
|
238
|
-
], 16,
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
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(
|
|
264
|
-
const
|
|
265
|
-
height:
|
|
266
|
-
width:
|
|
267
|
-
})),
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
(
|
|
271
|
-
|
|
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
|
-
),
|
|
275
|
-
function
|
|
276
|
-
return typeof
|
|
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
|
|
279
|
-
|
|
298
|
+
function u() {
|
|
299
|
+
h("update:fileList", v.value.map((i) => ({ ...i })));
|
|
280
300
|
}
|
|
281
|
-
function Y(
|
|
282
|
-
return
|
|
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
|
|
285
|
-
return
|
|
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
|
|
288
|
-
return
|
|
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
|
|
291
|
-
if (
|
|
292
|
-
if (
|
|
293
|
-
|
|
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(
|
|
316
|
+
window.open(i.url, "_blank", "noopener,noreferrer");
|
|
297
317
|
}
|
|
298
318
|
}
|
|
299
|
-
function
|
|
300
|
-
|
|
319
|
+
function j(i) {
|
|
320
|
+
g.value = i;
|
|
301
321
|
}
|
|
302
|
-
function
|
|
303
|
-
|
|
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
|
|
306
|
-
|
|
325
|
+
function ae(i, f, z) {
|
|
326
|
+
i.status = "error", u(), z(f);
|
|
307
327
|
}
|
|
308
|
-
function
|
|
309
|
-
const
|
|
310
|
-
if (!
|
|
311
|
-
if (
|
|
312
|
-
const
|
|
313
|
-
|
|
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
|
|
317
|
-
const
|
|
318
|
-
file:
|
|
319
|
-
onError: (
|
|
320
|
-
|
|
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: (
|
|
323
|
-
|
|
342
|
+
onProgress: (W) => {
|
|
343
|
+
ye || (Z.percent = Math.min(100, Math.max(0, W)), u());
|
|
324
344
|
},
|
|
325
|
-
onSuccess: (
|
|
326
|
-
|
|
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(
|
|
332
|
-
|
|
351
|
+
Promise.resolve(s.customRequest(ge)).catch((W) => {
|
|
352
|
+
ge.onError(W instanceof Error ? W : new Error("上传失败"));
|
|
333
353
|
});
|
|
334
|
-
} catch (
|
|
335
|
-
|
|
354
|
+
} catch (W) {
|
|
355
|
+
ge.onError(W instanceof Error ? W : new Error("上传失败"));
|
|
336
356
|
}
|
|
337
357
|
}
|
|
338
|
-
const
|
|
339
|
-
function
|
|
340
|
-
const
|
|
341
|
-
if (!
|
|
342
|
-
|
|
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
|
|
346
|
-
|
|
347
|
-
}),
|
|
365
|
+
const z = f.uid ?? String(Date.now());
|
|
366
|
+
Ce(f, z, i.onSuccess ?? (() => {
|
|
367
|
+
}), i.onError ?? (() => {
|
|
348
368
|
}));
|
|
349
369
|
}
|
|
350
|
-
function
|
|
351
|
-
if (
|
|
352
|
-
const
|
|
353
|
-
|
|
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
|
|
356
|
-
|
|
375
|
+
function me(i) {
|
|
376
|
+
h("fileRemoved", i);
|
|
357
377
|
}
|
|
358
|
-
function
|
|
359
|
-
const
|
|
360
|
-
|
|
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
|
|
364
|
-
const
|
|
365
|
-
|
|
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
|
|
369
|
-
return
|
|
388
|
+
function H() {
|
|
389
|
+
return v.value.flatMap((i) => i.originFileObj instanceof File ? [i.originFileObj] : []);
|
|
370
390
|
}
|
|
371
|
-
return t({ addError:
|
|
372
|
-
!
|
|
373
|
-
"before-upload":
|
|
374
|
-
"custom-request":
|
|
375
|
-
"file-list":
|
|
376
|
-
"max-count":
|
|
377
|
-
multiple:
|
|
378
|
-
"show-upload-list": { showRemoveIcon: !
|
|
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:
|
|
381
|
-
onPreview:
|
|
382
|
-
onRemove:
|
|
400
|
+
onChange: ue,
|
|
401
|
+
onPreview: C,
|
|
402
|
+
onRemove: me
|
|
383
403
|
}), {
|
|
384
|
-
default:
|
|
385
|
-
!
|
|
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:
|
|
407
|
+
class: "yee-ui-file-upload__trigger",
|
|
408
|
+
style: xe(V.value)
|
|
389
409
|
}, [
|
|
390
|
-
|
|
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
|
-
|
|
395
|
-
], 4)) :
|
|
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"])) : (
|
|
399
|
-
|
|
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:
|
|
403
|
-
src:
|
|
404
|
-
}, null, 8, ["preview", "src"])) :
|
|
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
|
-
}),
|
|
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(
|
|
417
|
-
const t =
|
|
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
|
|
420
|
-
function
|
|
421
|
-
return t.api.getFieldValue(
|
|
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
|
|
424
|
-
const
|
|
1068
|
+
function g(S) {
|
|
1069
|
+
const d = v(S);
|
|
425
1070
|
return {
|
|
426
|
-
...
|
|
427
|
-
...
|
|
1071
|
+
...S.componentProps,
|
|
1072
|
+
...d === void 0 ? {} : { value: d }
|
|
428
1073
|
};
|
|
429
1074
|
}
|
|
430
|
-
function
|
|
431
|
-
t.api.setFieldValue(
|
|
1075
|
+
function _(S, d) {
|
|
1076
|
+
t.api.setFieldValue(S.fieldName, d), t.options.submitOnChange && $();
|
|
432
1077
|
}
|
|
433
|
-
async function
|
|
1078
|
+
async function T() {
|
|
434
1079
|
t.api.resetForm(), await t.onReset?.();
|
|
435
1080
|
}
|
|
436
|
-
async function
|
|
1081
|
+
async function $() {
|
|
437
1082
|
await t.onSubmit?.(t.api.getValues());
|
|
438
1083
|
}
|
|
439
|
-
function
|
|
440
|
-
|
|
1084
|
+
function N(S) {
|
|
1085
|
+
S.key === "Enter" && t.options.submitOnEnter && (S.preventDefault(), $());
|
|
441
1086
|
}
|
|
442
|
-
function
|
|
443
|
-
|
|
1087
|
+
function B() {
|
|
1088
|
+
s.value = !s.value, t.options.handleCollapsedChange?.(s.value);
|
|
444
1089
|
}
|
|
445
|
-
return (
|
|
446
|
-
class: "yee-form",
|
|
447
|
-
onKeydown:
|
|
448
|
-
onSubmit:
|
|
1090
|
+
return (S, d) => (a(), p("form", {
|
|
1091
|
+
class: "yee-ui-form",
|
|
1092
|
+
onKeydown: N,
|
|
1093
|
+
onSubmit: pt($, ["prevent"])
|
|
449
1094
|
}, [
|
|
450
|
-
|
|
451
|
-
(
|
|
452
|
-
key:
|
|
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
|
-
|
|
456
|
-
|
|
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
|
|
460
|
-
"onUpdate:value": (
|
|
461
|
-
}), null, 16, ["onUpdate:value"])) :
|
|
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
|
|
465
|
-
"onUpdate:value": (
|
|
466
|
-
}), null, 16, ["onUpdate:value"])) : (
|
|
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
|
|
470
|
-
"onUpdate:value": (
|
|
1114
|
+
}, g(b), {
|
|
1115
|
+
"onUpdate:value": (k) => _(b, k)
|
|
471
1116
|
}), null, 16, ["onUpdate:value"]))
|
|
472
1117
|
]))), 128))
|
|
473
1118
|
]),
|
|
474
|
-
|
|
475
|
-
|
|
1119
|
+
F("div", Ho, [
|
|
1120
|
+
oe(l(ee), {
|
|
476
1121
|
"html-type": "button",
|
|
477
|
-
onClick:
|
|
1122
|
+
onClick: T
|
|
478
1123
|
}, {
|
|
479
|
-
default:
|
|
480
|
-
|
|
1124
|
+
default: w(() => [...d[0] || (d[0] = [
|
|
1125
|
+
te(" 重置 ", -1)
|
|
481
1126
|
])]),
|
|
482
1127
|
_: 1
|
|
483
1128
|
}),
|
|
484
|
-
|
|
1129
|
+
oe(l(ee), {
|
|
485
1130
|
type: "primary",
|
|
486
1131
|
"html-type": "submit"
|
|
487
1132
|
}, {
|
|
488
|
-
default:
|
|
489
|
-
|
|
1133
|
+
default: w(() => [...d[1] || (d[1] = [
|
|
1134
|
+
te(" 查询 ", -1)
|
|
490
1135
|
])]),
|
|
491
1136
|
_: 1
|
|
492
1137
|
}),
|
|
493
|
-
|
|
1138
|
+
o.options.showCollapseButton ? (a(), R(l(ee), {
|
|
494
1139
|
key: 0,
|
|
495
1140
|
type: "link",
|
|
496
1141
|
"html-type": "button",
|
|
497
|
-
onClick:
|
|
1142
|
+
onClick: B
|
|
498
1143
|
}, {
|
|
499
|
-
default:
|
|
500
|
-
|
|
1144
|
+
default: w(() => [
|
|
1145
|
+
te(L(s.value ? "展开" : "收起"), 1)
|
|
501
1146
|
]),
|
|
502
1147
|
_: 1
|
|
503
|
-
})) :
|
|
1148
|
+
})) : E("", !0)
|
|
504
1149
|
])
|
|
505
1150
|
], 32));
|
|
506
1151
|
}
|
|
507
|
-
}),
|
|
508
|
-
class
|
|
509
|
-
schema =
|
|
1152
|
+
}), qo = /* @__PURE__ */ le(Wo, [["__scopeId", "data-v-92583f28"]]);
|
|
1153
|
+
class Go {
|
|
1154
|
+
schema = P([]);
|
|
510
1155
|
initialValues = {};
|
|
511
|
-
values =
|
|
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((
|
|
534
|
-
this.schema.value = this.schema.value.map((
|
|
535
|
-
...
|
|
536
|
-
...e.get(
|
|
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
|
|
541
|
-
formApi = new
|
|
1185
|
+
class Ko {
|
|
1186
|
+
formApi = new Go();
|
|
542
1187
|
searchFormVisible;
|
|
543
1188
|
state;
|
|
544
1189
|
grid;
|
|
545
1190
|
constructor(t) {
|
|
546
|
-
this.state =
|
|
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
|
|
578
|
-
function
|
|
579
|
-
if (
|
|
1222
|
+
let We = !1;
|
|
1223
|
+
function ot() {
|
|
1224
|
+
if (We) return;
|
|
580
1225
|
[
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
].forEach((t) =>
|
|
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
|
|
1244
|
+
const Jo = { class: "yee-ui-grid" }, Qo = {
|
|
600
1245
|
key: 1,
|
|
601
|
-
class: "yee-grid__separator"
|
|
602
|
-
},
|
|
1246
|
+
class: "yee-ui-grid__separator"
|
|
1247
|
+
}, Xo = {
|
|
603
1248
|
key: 0,
|
|
604
|
-
class: "yee-grid__title"
|
|
605
|
-
},
|
|
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(
|
|
614
|
-
const t =
|
|
615
|
-
|
|
616
|
-
const
|
|
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(
|
|
623
|
-
const
|
|
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
|
-
...
|
|
631
|
-
...
|
|
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
|
-
...
|
|
1281
|
+
...x,
|
|
637
1282
|
slots: {
|
|
638
1283
|
sizes: "pagerSizes",
|
|
639
|
-
...
|
|
1284
|
+
...x.slots
|
|
640
1285
|
}
|
|
641
1286
|
}
|
|
642
1287
|
} : {},
|
|
643
|
-
...
|
|
1288
|
+
...O ? {
|
|
644
1289
|
proxyConfig: {
|
|
645
1290
|
autoLoad: !0,
|
|
646
1291
|
showResponseMsg: !1,
|
|
647
|
-
...
|
|
1292
|
+
...O,
|
|
648
1293
|
response: {
|
|
649
1294
|
list: "items",
|
|
650
1295
|
result: "items",
|
|
651
1296
|
total: "total",
|
|
652
|
-
...
|
|
1297
|
+
...O.response
|
|
653
1298
|
},
|
|
654
|
-
...
|
|
1299
|
+
...O.ajax ? {
|
|
655
1300
|
ajax: {
|
|
656
|
-
...
|
|
657
|
-
...
|
|
658
|
-
query: (
|
|
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
|
-
...
|
|
1309
|
+
...c || _.value ? {
|
|
665
1310
|
toolbarConfig: {
|
|
666
1311
|
custom: !0,
|
|
667
1312
|
refresh: !0,
|
|
668
1313
|
zoom: !0,
|
|
669
|
-
...
|
|
1314
|
+
...c,
|
|
670
1315
|
slots: {
|
|
671
1316
|
...t.tableTitle || e["table-title"] || e["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
|
|
672
|
-
...e["toolbar-tools"] ||
|
|
1317
|
+
...e["toolbar-tools"] || c?.search ? { tools: "toolbarTools" } : {}
|
|
673
1318
|
}
|
|
674
1319
|
}
|
|
675
1320
|
} : {}
|
|
676
1321
|
};
|
|
677
|
-
}),
|
|
678
|
-
|
|
679
|
-
() =>
|
|
680
|
-
(
|
|
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
|
|
1328
|
+
async function S() {
|
|
684
1329
|
await t.api.reload();
|
|
685
1330
|
}
|
|
686
|
-
async function
|
|
1331
|
+
async function d() {
|
|
687
1332
|
await t.api.reload();
|
|
688
1333
|
}
|
|
689
|
-
function
|
|
690
|
-
typeof
|
|
1334
|
+
function b(k, O) {
|
|
1335
|
+
typeof O != "number" && typeof O != "string" || k.setPageSizeByEvent(new Event("change"), O);
|
|
691
1336
|
}
|
|
692
|
-
return
|
|
693
|
-
|
|
694
|
-
}),
|
|
695
|
-
|
|
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:
|
|
698
|
-
options:
|
|
699
|
-
"on-reset":
|
|
700
|
-
"on-submit":
|
|
1342
|
+
api: o.api.formApi,
|
|
1343
|
+
options: g.value,
|
|
1344
|
+
"on-reset": d,
|
|
1345
|
+
"on-submit": S
|
|
701
1346
|
}, null, 8, ["api", "options"])), [
|
|
702
|
-
[
|
|
703
|
-
]) :
|
|
704
|
-
|
|
705
|
-
|
|
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:
|
|
708
|
-
class: "yee-grid__table"
|
|
709
|
-
},
|
|
710
|
-
toolbarActions:
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
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:
|
|
1361
|
+
title: o.tableTitleHelp
|
|
717
1362
|
}, {
|
|
718
|
-
default:
|
|
719
|
-
|
|
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"])) :
|
|
726
|
-
])) :
|
|
1370
|
+
}, 8, ["title"])) : E("", !0)
|
|
1371
|
+
])) : E("", !0)
|
|
727
1372
|
], !0),
|
|
728
|
-
|
|
1373
|
+
A(k.$slots, "toolbar-actions", de(fe(V)), void 0, !0)
|
|
729
1374
|
]),
|
|
730
|
-
toolbarTools:
|
|
731
|
-
|
|
732
|
-
|
|
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:
|
|
1380
|
+
onClick: O[0] || (O[0] = (c) => o.api.toggleSearchForm())
|
|
736
1381
|
}, {
|
|
737
|
-
default:
|
|
738
|
-
|
|
1382
|
+
default: w(() => [
|
|
1383
|
+
te(L(o.api.searchFormVisible.value ? "隐藏查询" : "显示查询"), 1)
|
|
739
1384
|
]),
|
|
740
1385
|
_: 1
|
|
741
|
-
})) :
|
|
1386
|
+
})) : E("", !0)
|
|
742
1387
|
]),
|
|
743
|
-
pagerSizes:
|
|
744
|
-
|
|
745
|
-
class: "yee-grid__page-size",
|
|
746
|
-
options:
|
|
747
|
-
value:
|
|
748
|
-
onChange: (
|
|
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:
|
|
752
|
-
|
|
753
|
-
|
|
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
|
-
|
|
759
|
-
name:
|
|
760
|
-
fn:
|
|
761
|
-
|
|
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
|
-
}),
|
|
768
|
-
function
|
|
769
|
-
|
|
770
|
-
const t = new
|
|
771
|
-
return [
|
|
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(
|
|
779
|
-
return
|
|
780
|
-
...
|
|
1423
|
+
setup(h, { attrs: v, slots: g }) {
|
|
1424
|
+
return Te(() => t.unmount()), () => Ke(e, {
|
|
1425
|
+
...v,
|
|
781
1426
|
api: t,
|
|
782
|
-
...
|
|
783
|
-
...
|
|
784
|
-
},
|
|
1427
|
+
...h.tableTitle ? { tableTitle: h.tableTitle } : {},
|
|
1428
|
+
...h.tableTitleHelp ? { tableTitleHelp: h.tableTitleHelp } : {}
|
|
1429
|
+
}, g);
|
|
785
1430
|
}
|
|
786
1431
|
}), t];
|
|
787
1432
|
}
|
|
788
|
-
const
|
|
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
|
-
},
|
|
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__ */
|
|
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__ */
|
|
818
|
-
setup(
|
|
819
|
-
const e =
|
|
820
|
-
const
|
|
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":
|
|
1468
|
+
"aria-labelledby": j ? e.wrapProps?.["aria-labelledby"] : B.value ? T : void 0
|
|
824
1469
|
};
|
|
825
|
-
}),
|
|
826
|
-
if (
|
|
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
|
|
837
|
-
const { style:
|
|
838
|
-
return
|
|
1481
|
+
function V() {
|
|
1482
|
+
const { style: j, ...K } = g;
|
|
1483
|
+
return K;
|
|
839
1484
|
}
|
|
840
|
-
function
|
|
841
|
-
return [
|
|
1485
|
+
function c() {
|
|
1486
|
+
return [g.style, e.style].filter(Boolean);
|
|
842
1487
|
}
|
|
843
|
-
function
|
|
844
|
-
return [
|
|
1488
|
+
function x() {
|
|
1489
|
+
return [g.style, e.style, O.value].filter(Boolean);
|
|
845
1490
|
}
|
|
846
|
-
const
|
|
847
|
-
function Y(
|
|
848
|
-
|
|
1491
|
+
const u = () => _.closeIcon?.() ?? g.closeIcon ?? Ke(Et);
|
|
1492
|
+
function Y(j) {
|
|
1493
|
+
s("cancel", j), h.value = !1;
|
|
849
1494
|
}
|
|
850
|
-
function
|
|
851
|
-
|
|
1495
|
+
function G(j) {
|
|
1496
|
+
s("confirm", j);
|
|
852
1497
|
}
|
|
853
|
-
function
|
|
854
|
-
|
|
1498
|
+
function J() {
|
|
1499
|
+
s("close");
|
|
855
1500
|
}
|
|
856
|
-
function
|
|
857
|
-
|
|
1501
|
+
function C() {
|
|
1502
|
+
v.value = !v.value;
|
|
858
1503
|
}
|
|
859
|
-
return (
|
|
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:
|
|
866
|
-
style:
|
|
1510
|
+
open: h.value,
|
|
1511
|
+
style: c(),
|
|
867
1512
|
width: e.width,
|
|
868
|
-
onAfterOpenChange:
|
|
1513
|
+
onAfterOpenChange: K[0] || (K[0] = (ae) => !ae && J()),
|
|
869
1514
|
onClose: Y
|
|
870
|
-
}),
|
|
871
|
-
footer:
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
e.showCancelButton ? (
|
|
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:
|
|
879
|
-
|
|
1523
|
+
default: w(() => [
|
|
1524
|
+
te(L(e.cancelButtonText), 1)
|
|
880
1525
|
]),
|
|
881
1526
|
_: 1
|
|
882
|
-
})) :
|
|
883
|
-
e.showConfirmButton ? (
|
|
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:
|
|
1532
|
+
onClick: G
|
|
888
1533
|
}, {
|
|
889
|
-
default:
|
|
890
|
-
|
|
1534
|
+
default: w(() => [
|
|
1535
|
+
te(L(e.confirmButtonText), 1)
|
|
891
1536
|
]),
|
|
892
1537
|
_: 1
|
|
893
|
-
}, 8, ["loading"])) :
|
|
1538
|
+
}, 8, ["loading"])) : E("", !0)
|
|
894
1539
|
], !0)
|
|
895
1540
|
])
|
|
896
1541
|
]),
|
|
897
|
-
default:
|
|
898
|
-
|
|
899
|
-
|
|
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
|
-
|
|
1549
|
+
S.value ? {
|
|
905
1550
|
name: "title",
|
|
906
|
-
fn:
|
|
907
|
-
|
|
908
|
-
|
|
1551
|
+
fn: w(() => [
|
|
1552
|
+
F("div", tn, [
|
|
1553
|
+
B.value ? (a(), p("div", {
|
|
909
1554
|
key: 0,
|
|
910
|
-
id:
|
|
911
|
-
class: "yee-modal__heading"
|
|
1555
|
+
id: l(T),
|
|
1556
|
+
class: "yee-ui-modal__heading"
|
|
912
1557
|
}, [
|
|
913
|
-
|
|
914
|
-
|
|
1558
|
+
A(j.$slots, "header", {}, () => [
|
|
1559
|
+
F("span", nn, L(e.title), 1)
|
|
915
1560
|
], !0)
|
|
916
|
-
], 8,
|
|
917
|
-
e.closable ? (
|
|
918
|
-
|
|
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:
|
|
926
|
-
|
|
1570
|
+
default: w(() => [
|
|
1571
|
+
oe(u)
|
|
927
1572
|
]),
|
|
928
1573
|
_: 1
|
|
929
1574
|
})
|
|
930
|
-
])) :
|
|
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"])) : (
|
|
936
|
-
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":
|
|
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:
|
|
946
|
-
style:
|
|
947
|
-
width:
|
|
948
|
-
"wrap-props":
|
|
949
|
-
onAfterClose:
|
|
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
|
-
}),
|
|
952
|
-
footer:
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
e.showCancelButton ? (
|
|
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:
|
|
960
|
-
|
|
1604
|
+
default: w(() => [
|
|
1605
|
+
te(L(e.cancelButtonText), 1)
|
|
961
1606
|
]),
|
|
962
1607
|
_: 1
|
|
963
|
-
})) :
|
|
964
|
-
e.showConfirmButton ? (
|
|
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:
|
|
1613
|
+
onClick: G
|
|
969
1614
|
}, {
|
|
970
|
-
default:
|
|
971
|
-
|
|
1615
|
+
default: w(() => [
|
|
1616
|
+
te(L(e.confirmButtonText), 1)
|
|
972
1617
|
]),
|
|
973
1618
|
_: 1
|
|
974
|
-
}, 8, ["loading"])) :
|
|
1619
|
+
}, 8, ["loading"])) : E("", !0)
|
|
975
1620
|
], !0)
|
|
976
1621
|
])
|
|
977
1622
|
]),
|
|
978
|
-
default:
|
|
979
|
-
|
|
980
|
-
|
|
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
|
-
|
|
1630
|
+
d.value ? {
|
|
986
1631
|
name: "title",
|
|
987
|
-
fn:
|
|
988
|
-
|
|
989
|
-
|
|
1632
|
+
fn: w(() => [
|
|
1633
|
+
F("div", rn, [
|
|
1634
|
+
B.value ? (a(), p("div", {
|
|
990
1635
|
key: 0,
|
|
991
|
-
id:
|
|
992
|
-
class: "yee-modal__heading"
|
|
1636
|
+
id: l(T),
|
|
1637
|
+
class: "yee-ui-modal__heading"
|
|
993
1638
|
}, [
|
|
994
|
-
|
|
995
|
-
|
|
1639
|
+
A(j.$slots, "header", {}, () => [
|
|
1640
|
+
F("span", cn, L(e.title), 1)
|
|
996
1641
|
], !0)
|
|
997
|
-
], 8,
|
|
998
|
-
|
|
999
|
-
e.fullscreenButton ? (
|
|
1642
|
+
], 8, un)) : E("", !0),
|
|
1643
|
+
F("div", dn, [
|
|
1644
|
+
e.fullscreenButton ? (a(), R(l(pe), {
|
|
1000
1645
|
key: 0,
|
|
1001
|
-
title:
|
|
1646
|
+
title: b.value
|
|
1002
1647
|
}, {
|
|
1003
|
-
default:
|
|
1004
|
-
|
|
1005
|
-
"aria-label":
|
|
1006
|
-
"aria-pressed":
|
|
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:
|
|
1655
|
+
onClick: C
|
|
1011
1656
|
}, {
|
|
1012
|
-
default:
|
|
1013
|
-
|
|
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"])) :
|
|
1020
|
-
e.closable ? (
|
|
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:
|
|
1029
|
-
|
|
1673
|
+
default: w(() => [
|
|
1674
|
+
oe(u)
|
|
1030
1675
|
]),
|
|
1031
1676
|
_: 1
|
|
1032
|
-
})) :
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
1687
|
+
class: "yee-ui-page__title"
|
|
1688
|
+
}, hn = {
|
|
1044
1689
|
key: 0,
|
|
1045
|
-
class: "yee-page__description"
|
|
1046
|
-
},
|
|
1690
|
+
class: "yee-ui-page__description"
|
|
1691
|
+
}, gn = {
|
|
1047
1692
|
key: 0,
|
|
1048
|
-
class: "yee-page__extra"
|
|
1049
|
-
},
|
|
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(
|
|
1062
|
-
const t =
|
|
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 (
|
|
1066
|
-
class:
|
|
1067
|
-
style:
|
|
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
|
-
|
|
1714
|
+
s.value ? (a(), p("header", {
|
|
1070
1715
|
key: 0,
|
|
1071
|
-
class:
|
|
1716
|
+
class: be(["yee-ui-page__header", o.headerClass])
|
|
1072
1717
|
}, [
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
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
|
-
|
|
1078
|
-
|
|
1722
|
+
A(v.$slots, "description", {}, () => [
|
|
1723
|
+
o.description ? (a(), p("p", hn, L(o.description), 1)) : E("", !0)
|
|
1079
1724
|
], !0)
|
|
1080
1725
|
]),
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
])) :
|
|
1084
|
-
], 2)) :
|
|
1085
|
-
|
|
1086
|
-
class:
|
|
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
|
-
|
|
1733
|
+
A(v.$slots, "default", {}, void 0, !0)
|
|
1089
1734
|
], 2),
|
|
1090
|
-
|
|
1735
|
+
v.$slots.footer ? (a(), p("footer", {
|
|
1091
1736
|
key: 1,
|
|
1092
|
-
class:
|
|
1737
|
+
class: be(["yee-ui-page__footer", o.footerClass])
|
|
1093
1738
|
}, [
|
|
1094
|
-
|
|
1095
|
-
], 2)) :
|
|
1739
|
+
A(v.$slots, "footer", {}, void 0, !0)
|
|
1740
|
+
], 2)) : E("", !0)
|
|
1096
1741
|
], 6));
|
|
1097
1742
|
}
|
|
1098
|
-
}),
|
|
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__ */
|
|
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(
|
|
1111
|
-
const t =
|
|
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
|
-
})),
|
|
1116
|
-
const
|
|
1117
|
-
for (const [
|
|
1118
|
-
|
|
1119
|
-
return
|
|
1120
|
-
}),
|
|
1121
|
-
function
|
|
1122
|
-
|
|
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
|
|
1125
|
-
if (
|
|
1126
|
-
for (const
|
|
1127
|
-
const
|
|
1128
|
-
if (
|
|
1129
|
-
const
|
|
1130
|
-
if (
|
|
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
|
|
1134
|
-
return
|
|
1789
|
+
function k(c) {
|
|
1790
|
+
return c ? d(c[g.value.label]) || d(c.title) || d(c[g.value.value]) : "";
|
|
1135
1791
|
}
|
|
1136
|
-
const
|
|
1137
|
-
const
|
|
1138
|
-
if (!(
|
|
1139
|
-
return Array.isArray(
|
|
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
|
|
1142
|
-
return
|
|
1797
|
+
function V(c) {
|
|
1798
|
+
return k(c);
|
|
1143
1799
|
}
|
|
1144
|
-
return (
|
|
1145
|
-
default:
|
|
1146
|
-
|
|
1147
|
-
class:
|
|
1148
|
-
style:
|
|
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
|
-
|
|
1806
|
+
N.value ? (a(), R(l(Ee), X({
|
|
1151
1807
|
key: 0,
|
|
1152
1808
|
value: e.value,
|
|
1153
|
-
"onUpdate:value":
|
|
1154
|
-
},
|
|
1155
|
-
"field-names":
|
|
1156
|
-
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:
|
|
1159
|
-
|
|
1160
|
-
title:
|
|
1815
|
+
option: w((u) => [
|
|
1816
|
+
oe(l(pe), {
|
|
1817
|
+
title: V(u),
|
|
1161
1818
|
placement: "left"
|
|
1162
1819
|
}, {
|
|
1163
|
-
default:
|
|
1164
|
-
|
|
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"])) : (
|
|
1827
|
+
}, 16, ["value", "field-names", "options"])) : (a(), R(l(Ee), X({
|
|
1171
1828
|
key: 1,
|
|
1172
1829
|
value: e.value,
|
|
1173
|
-
"onUpdate:value":
|
|
1174
|
-
},
|
|
1175
|
-
"field-names":
|
|
1176
|
-
options:
|
|
1177
|
-
|
|
1178
|
-
|
|
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:
|
|
1181
|
-
|
|
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
|
-
|
|
1843
|
+
c.$slots.option ? {
|
|
1186
1844
|
name: "option",
|
|
1187
|
-
fn:
|
|
1188
|
-
|
|
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
|
-
|
|
1850
|
+
c.$slots.tagRender ? {
|
|
1193
1851
|
name: "tagRender",
|
|
1194
|
-
fn:
|
|
1195
|
-
|
|
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
|
-
|
|
1857
|
+
c.$slots.dropdownRender ? {
|
|
1200
1858
|
name: "dropdownRender",
|
|
1201
|
-
fn:
|
|
1202
|
-
|
|
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
|
-
|
|
1864
|
+
c.$slots.notFoundContent ? {
|
|
1207
1865
|
name: "notFoundContent",
|
|
1208
|
-
fn:
|
|
1209
|
-
|
|
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
|
-
},
|
|
1875
|
+
}, 16, ["title"]));
|
|
1218
1876
|
}
|
|
1219
|
-
}),
|
|
1877
|
+
}), Nn = /* @__PURE__ */ le(wn, [["__scopeId", "data-v-028e2b2a"]]);
|
|
1220
1878
|
export {
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
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
|
};
|