@yeepay/yee-boss-ui 0.1.5 → 0.1.7
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 +29 -2
- package/dist/components/ellipsis-text/YeeEllipsisText.vue.d.ts +40 -0
- package/dist/components/ellipsis-text/index.d.ts +2 -0
- package/dist/components/ellipsis-text/types.d.ts +31 -0
- package/dist/components/modal/YeeModal.vue.d.ts +16 -6
- package/dist/components/modal/types.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +772 -552
- package/dist/style.css +1 -1
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { ConfigProvider as Ne, Descriptions as
|
|
3
|
-
import { r as
|
|
4
|
-
import { d as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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)
|
|
11
12
|
throw new Error("usePlatformTheme 必须在 PlatformConfigProvider 内使用。");
|
|
12
|
-
return
|
|
13
|
+
return a;
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
+
const gt = ["data-theme"], bt = /* @__PURE__ */ L({
|
|
15
16
|
name: "PlatformConfigProvider",
|
|
16
17
|
__name: "PlatformConfigProvider",
|
|
17
18
|
props: {
|
|
18
19
|
theme: { default: () => ({}) }
|
|
19
20
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
return
|
|
23
|
-
default:
|
|
24
|
-
|
|
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", {
|
|
25
26
|
class: "yee-platform-theme",
|
|
26
|
-
"data-theme":
|
|
27
|
-
style:
|
|
27
|
+
"data-theme": e.value.mode,
|
|
28
|
+
style: oe(y.value)
|
|
28
29
|
}, [
|
|
29
|
-
|
|
30
|
-
], 12,
|
|
30
|
+
x(i.$slots, "default", {}, void 0, !0)
|
|
31
|
+
], 12, gt)
|
|
31
32
|
]),
|
|
32
33
|
_: 3
|
|
33
34
|
}, 8, ["theme"]));
|
|
34
35
|
}
|
|
35
|
-
}),
|
|
36
|
-
const
|
|
37
|
-
for (const [
|
|
38
|
-
|
|
39
|
-
return
|
|
40
|
-
},
|
|
41
|
-
async function
|
|
42
|
-
if (!
|
|
36
|
+
}), U = (a, t) => {
|
|
37
|
+
const e = a.__vccOpts || a;
|
|
38
|
+
for (const [r, y] of t)
|
|
39
|
+
e[r] = y;
|
|
40
|
+
return e;
|
|
41
|
+
}, go = /* @__PURE__ */ U(bt, [["__scopeId", "data-v-36f21f18"]]);
|
|
42
|
+
async function _t(a) {
|
|
43
|
+
if (!a) return !1;
|
|
43
44
|
try {
|
|
44
|
-
return await navigator.clipboard.writeText(
|
|
45
|
+
return await navigator.clipboard.writeText(a), !0;
|
|
45
46
|
} catch {
|
|
46
|
-
const
|
|
47
|
-
|
|
47
|
+
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();
|
|
48
49
|
try {
|
|
49
50
|
return document.execCommand("copy");
|
|
50
51
|
} catch {
|
|
51
52
|
return !1;
|
|
52
53
|
} finally {
|
|
53
|
-
|
|
54
|
+
t.remove();
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
const
|
|
58
|
+
const Ct = { class: "yee-descriptions__item" }, kt = { class: "yee-descriptions__content-row" }, xt = { class: "yee-descriptions__value yee-descriptions__value--ellipsis" }, wt = {
|
|
58
59
|
key: 1,
|
|
59
60
|
class: "yee-descriptions__value"
|
|
60
|
-
},
|
|
61
|
+
}, $t = ["disabled", "onClick"], Tt = /* @__PURE__ */ L({
|
|
61
62
|
name: "YeeDescriptions",
|
|
62
63
|
__name: "YeeDescriptions",
|
|
63
64
|
props: {
|
|
@@ -69,76 +70,76 @@ const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions_
|
|
|
69
70
|
size: {},
|
|
70
71
|
title: {}
|
|
71
72
|
},
|
|
72
|
-
setup(
|
|
73
|
-
const
|
|
74
|
-
function
|
|
75
|
-
return
|
|
76
|
-
}
|
|
77
|
-
async function
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
|
|
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}`;
|
|
77
|
+
}
|
|
78
|
+
async function $(C, g) {
|
|
79
|
+
const u = String(C.value ?? "");
|
|
80
|
+
if (!u.trim()) {
|
|
81
|
+
J.warning("没有可复制的内容");
|
|
81
82
|
return;
|
|
82
83
|
}
|
|
83
|
-
if (!await
|
|
84
|
-
|
|
84
|
+
if (!await _t(u)) {
|
|
85
|
+
J.error("复制失败");
|
|
85
86
|
return;
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
88
|
+
h.add(g), J.success("已复制");
|
|
89
|
+
const f = setTimeout(() => {
|
|
90
|
+
h.delete(g), F.delete(f);
|
|
90
91
|
}, 1500);
|
|
91
|
-
|
|
92
|
+
F.add(f);
|
|
92
93
|
}
|
|
93
|
-
return
|
|
94
|
-
|
|
95
|
-
}), (
|
|
94
|
+
return fe(() => {
|
|
95
|
+
F.forEach((C) => clearTimeout(C)), F.clear();
|
|
96
|
+
}), (C, g) => (n(), k(m(me), A({
|
|
96
97
|
class: "yee-descriptions",
|
|
97
|
-
bordered:
|
|
98
|
-
colon:
|
|
99
|
-
column:
|
|
100
|
-
layout:
|
|
101
|
-
size:
|
|
102
|
-
},
|
|
103
|
-
default:
|
|
104
|
-
(
|
|
105
|
-
key:
|
|
106
|
-
label:
|
|
107
|
-
span:
|
|
98
|
+
bordered: e.value,
|
|
99
|
+
colon: r.value,
|
|
100
|
+
column: y.value,
|
|
101
|
+
layout: i.value,
|
|
102
|
+
size: b.value
|
|
103
|
+
}, 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
|
|
108
109
|
}, {
|
|
109
|
-
default:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
default: p(() => [
|
|
111
|
+
w("div", Ct, [
|
|
112
|
+
w("div", kt, [
|
|
113
|
+
u.ellipsis ? (n(), k(m(X), {
|
|
113
114
|
key: 0,
|
|
114
|
-
title: String(
|
|
115
|
+
title: String(u.value ?? "")
|
|
115
116
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
default: p(() => [
|
|
118
|
+
w("span", xt, [
|
|
119
|
+
x(C.$slots, `content-${u.name ?? u.label}`, { item: u }, () => [
|
|
120
|
+
W(P(u.value), 1)
|
|
120
121
|
], !0)
|
|
121
122
|
])
|
|
122
123
|
]),
|
|
123
124
|
_: 2
|
|
124
|
-
}, 1032, ["title"])) : (
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
}, 1032, ["title"])) : (n(), B("span", wt, [
|
|
126
|
+
x(C.$slots, `content-${u.name ?? u.label}`, { item: u }, () => [
|
|
127
|
+
W(P(u.value), 1)
|
|
127
128
|
], !0)
|
|
128
129
|
])),
|
|
129
|
-
|
|
130
|
+
u.copyable ? (n(), B("button", {
|
|
130
131
|
key: 2,
|
|
131
132
|
class: "yee-descriptions__copy",
|
|
132
|
-
disabled:
|
|
133
|
+
disabled: h.has(S(u, f)),
|
|
133
134
|
type: "button",
|
|
134
|
-
onClick: (o) =>
|
|
135
|
-
},
|
|
135
|
+
onClick: (o) => $(u, S(u, f))
|
|
136
|
+
}, P(h.has(S(u, f)) ? "已复制" : "复制"), 9, $t)) : T("", !0)
|
|
136
137
|
]),
|
|
137
|
-
|
|
138
|
+
u.info ? (n(), B("span", {
|
|
138
139
|
key: 0,
|
|
139
140
|
class: "yee-descriptions__info",
|
|
140
|
-
style:
|
|
141
|
-
},
|
|
141
|
+
style: oe(u.infoStyle)
|
|
142
|
+
}, P(u.info), 5)) : T("", !0)
|
|
142
143
|
])
|
|
143
144
|
]),
|
|
144
145
|
_: 2
|
|
@@ -147,10 +148,102 @@ const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions_
|
|
|
147
148
|
_: 3
|
|
148
149
|
}, 16, ["bordered", "colon", "column", "layout", "size"]));
|
|
149
150
|
}
|
|
150
|
-
}),
|
|
151
|
+
}), bo = /* @__PURE__ */ U(Tt, [["__scopeId", "data-v-2297b86c"]]), St = ["aria-expanded", "role", "tabindex"], Bt = /* @__PURE__ */ L({
|
|
152
|
+
inheritAttrs: !1,
|
|
153
|
+
name: "YeeEllipsisText",
|
|
154
|
+
__name: "YeeEllipsisText",
|
|
155
|
+
props: {
|
|
156
|
+
expand: { type: Boolean, default: !1 },
|
|
157
|
+
ellipsisThreshold: { default: 3 },
|
|
158
|
+
line: { default: 1 },
|
|
159
|
+
maxWidth: { default: "100%" },
|
|
160
|
+
placement: { default: "top" },
|
|
161
|
+
tooltip: { type: Boolean, default: !0 },
|
|
162
|
+
tooltipBackgroundColor: {},
|
|
163
|
+
tooltipColor: {},
|
|
164
|
+
tooltipFontSize: {},
|
|
165
|
+
tooltipMaxWidth: {},
|
|
166
|
+
tooltipOverlayStyle: { default: () => ({ textAlign: "justify" }) },
|
|
167
|
+
tooltipWhenEllipsis: { type: Boolean, default: !1 }
|
|
168
|
+
},
|
|
169
|
+
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 = {
|
|
184
|
+
...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`
|
|
188
|
+
};
|
|
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;
|
|
192
|
+
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;
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
const j = S.value === 1 ? v.scrollWidth - v.clientWidth : v.scrollHeight - v.clientHeight;
|
|
201
|
+
b.value = j > $.value;
|
|
202
|
+
}
|
|
203
|
+
function D() {
|
|
204
|
+
e.expand && (h.value = !h.value, r("expandChange", h.value), Me(Y));
|
|
205
|
+
}
|
|
206
|
+
function Q(v) {
|
|
207
|
+
!e.expand || v.key !== "Enter" && v.key !== " " || (v.preventDefault(), D());
|
|
208
|
+
}
|
|
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,
|
|
220
|
+
placement: e.placement
|
|
221
|
+
}), {
|
|
222
|
+
title: p(() => [
|
|
223
|
+
x(v.$slots, "tooltip", {}, () => [
|
|
224
|
+
x(v.$slots, "default", {}, void 0, !0)
|
|
225
|
+
], !0)
|
|
226
|
+
]),
|
|
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],
|
|
231
|
+
role: e.expand ? "button" : void 0,
|
|
232
|
+
style: g.value,
|
|
233
|
+
tabindex: e.expand ? 0 : void 0,
|
|
234
|
+
onClick: D,
|
|
235
|
+
onKeydown: Q
|
|
236
|
+
}), [
|
|
237
|
+
x(v.$slots, "default", {}, void 0, !0)
|
|
238
|
+
], 16, St)
|
|
239
|
+
]),
|
|
240
|
+
_: 3
|
|
241
|
+
}, 16, ["color", "overlay-inner-style", "overlay-style", "placement"]));
|
|
242
|
+
}
|
|
243
|
+
}), _o = /* @__PURE__ */ U(Bt, [["__scopeId", "data-v-0b85ad64"]]), Ft = { class: "yee-file-upload" }, Vt = {
|
|
151
244
|
key: 1,
|
|
152
245
|
class: "yee-file-upload__empty"
|
|
153
|
-
},
|
|
246
|
+
}, Ot = /* @__PURE__ */ L({
|
|
154
247
|
name: "YeeFileUpload",
|
|
155
248
|
__name: "YeeFileUpload",
|
|
156
249
|
props: {
|
|
@@ -167,151 +260,151 @@ const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions_
|
|
|
167
260
|
width: {}
|
|
168
261
|
},
|
|
169
262
|
emits: ["fileRemoved", "fileSelect", "update:fileList", "uploadSuccess", "uploadingChange"],
|
|
170
|
-
setup(
|
|
171
|
-
const
|
|
172
|
-
height:
|
|
173
|
-
width:
|
|
174
|
-
})),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
(
|
|
178
|
-
|
|
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((_) => ({ ..._ }));
|
|
179
272
|
},
|
|
180
273
|
{ immediate: !0 }
|
|
181
|
-
),
|
|
182
|
-
function
|
|
183
|
-
return typeof
|
|
274
|
+
), ae(E, (l) => y("uploadingChange", l), { immediate: !0 });
|
|
275
|
+
function R(l) {
|
|
276
|
+
return typeof l == "number" ? `${l}px` : l;
|
|
184
277
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
278
|
+
function V() {
|
|
279
|
+
y("update:fileList", i.value.map((l) => ({ ...l })));
|
|
187
280
|
}
|
|
188
|
-
function
|
|
189
|
-
return
|
|
281
|
+
function Y(l) {
|
|
282
|
+
return l < 1024 ? `${l}B` : l < 1024 * 1024 ? `${(l / 1024).toFixed(2)}KB` : `${(l / (1024 * 1024)).toFixed(2)}MB`;
|
|
190
283
|
}
|
|
191
|
-
function
|
|
192
|
-
return
|
|
284
|
+
function D(l) {
|
|
285
|
+
return l.size <= g.value * 1024 * 1024 ? !1 : (J.error(`文件大小不能超过 ${g.value}MB,当前为 ${Y(l.size)}`), !0);
|
|
193
286
|
}
|
|
194
|
-
function
|
|
195
|
-
return
|
|
287
|
+
function Q(l) {
|
|
288
|
+
return l.type?.startsWith("image/") ?? /\.(avif|gif|jpe?g|png|svg|webp)(\?.*)?$/i.test(l.url ?? "");
|
|
196
289
|
}
|
|
197
|
-
function
|
|
198
|
-
if (
|
|
199
|
-
if (
|
|
200
|
-
|
|
290
|
+
function v(l) {
|
|
291
|
+
if (l.url) {
|
|
292
|
+
if (Q(l)) {
|
|
293
|
+
h.value = l.url, b.value = !0;
|
|
201
294
|
return;
|
|
202
295
|
}
|
|
203
|
-
window.open(
|
|
296
|
+
window.open(l.url, "_blank", "noopener,noreferrer");
|
|
204
297
|
}
|
|
205
298
|
}
|
|
206
|
-
function
|
|
207
|
-
|
|
299
|
+
function O(l) {
|
|
300
|
+
b.value = l;
|
|
208
301
|
}
|
|
209
|
-
function
|
|
210
|
-
|
|
302
|
+
function j(l, _, M) {
|
|
303
|
+
l.status = "done", l.percent = 100, _?.name && (l.name = _.name), _?.url && (l.url = _.url), V(), M(_), y("uploadSuccess");
|
|
211
304
|
}
|
|
212
|
-
function
|
|
213
|
-
|
|
305
|
+
function Z(l, _, M) {
|
|
306
|
+
l.status = "error", V(), M(_);
|
|
214
307
|
}
|
|
215
|
-
function
|
|
216
|
-
const
|
|
217
|
-
if (!
|
|
218
|
-
if (
|
|
219
|
-
const
|
|
220
|
-
|
|
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);
|
|
221
314
|
return;
|
|
222
315
|
}
|
|
223
|
-
let
|
|
224
|
-
const
|
|
225
|
-
file:
|
|
226
|
-
onError: (
|
|
227
|
-
|
|
316
|
+
let ee = !1;
|
|
317
|
+
const ue = {
|
|
318
|
+
file: l,
|
|
319
|
+
onError: (z) => {
|
|
320
|
+
ee || (ee = !0, Z(K, z, le));
|
|
228
321
|
},
|
|
229
|
-
onProgress: (
|
|
230
|
-
|
|
322
|
+
onProgress: (z) => {
|
|
323
|
+
ee || (K.percent = Math.min(100, Math.max(0, z)), V());
|
|
231
324
|
},
|
|
232
|
-
onSuccess: (
|
|
233
|
-
|
|
325
|
+
onSuccess: (z) => {
|
|
326
|
+
ee || (ee = !0, j(K, z, M));
|
|
234
327
|
},
|
|
235
|
-
uid:
|
|
328
|
+
uid: _
|
|
236
329
|
};
|
|
237
330
|
try {
|
|
238
|
-
Promise.resolve(
|
|
239
|
-
|
|
331
|
+
Promise.resolve(r.customRequest(ue)).catch((z) => {
|
|
332
|
+
ue.onError(z instanceof Error ? z : new Error("上传失败"));
|
|
240
333
|
});
|
|
241
|
-
} catch (
|
|
242
|
-
|
|
334
|
+
} catch (z) {
|
|
335
|
+
ue.onError(z instanceof Error ? z : new Error("上传失败"));
|
|
243
336
|
}
|
|
244
337
|
}
|
|
245
|
-
const
|
|
246
|
-
function
|
|
247
|
-
const
|
|
248
|
-
if (!
|
|
249
|
-
|
|
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("文件大小超过限制"));
|
|
250
343
|
return;
|
|
251
344
|
}
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
}),
|
|
345
|
+
const M = _.uid ?? String(Date.now());
|
|
346
|
+
Te(_, M, l.onSuccess ?? (() => {
|
|
347
|
+
}), l.onError ?? (() => {
|
|
255
348
|
}));
|
|
256
349
|
}
|
|
257
|
-
function
|
|
258
|
-
if (
|
|
259
|
-
const
|
|
260
|
-
|
|
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 });
|
|
261
354
|
}
|
|
262
|
-
function Ve(
|
|
263
|
-
|
|
355
|
+
function Ve(l) {
|
|
356
|
+
y("fileRemoved", l);
|
|
264
357
|
}
|
|
265
|
-
function
|
|
266
|
-
const
|
|
267
|
-
|
|
358
|
+
function Oe(l, _) {
|
|
359
|
+
const M = i.value.find((le) => le.uid === l);
|
|
360
|
+
M && j(M, _, () => {
|
|
268
361
|
});
|
|
269
362
|
}
|
|
270
|
-
function
|
|
271
|
-
const
|
|
272
|
-
|
|
363
|
+
function Pe(l) {
|
|
364
|
+
const _ = i.value.find((M) => M.uid === l);
|
|
365
|
+
_ && Z(_, new Error("上传失败"), () => {
|
|
273
366
|
});
|
|
274
367
|
}
|
|
275
|
-
function
|
|
276
|
-
return
|
|
277
|
-
}
|
|
278
|
-
return
|
|
279
|
-
!
|
|
280
|
-
"before-upload":
|
|
281
|
-
"custom-request":
|
|
282
|
-
"file-list":
|
|
283
|
-
"max-count":
|
|
284
|
-
multiple:
|
|
285
|
-
"show-upload-list": { showRemoveIcon: !
|
|
368
|
+
function Ee() {
|
|
369
|
+
return i.value.flatMap((l) => l.originFileObj instanceof File ? [l.originFileObj] : []);
|
|
370
|
+
}
|
|
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 },
|
|
286
379
|
"list-type": "picture-card",
|
|
287
|
-
onChange:
|
|
288
|
-
onPreview:
|
|
380
|
+
onChange: Fe,
|
|
381
|
+
onPreview: v,
|
|
289
382
|
onRemove: Ve
|
|
290
383
|
}), {
|
|
291
|
-
default:
|
|
292
|
-
!
|
|
384
|
+
default: p(() => [
|
|
385
|
+
!f.value && i.value.length < C.value ? (n(), B("div", {
|
|
293
386
|
key: 0,
|
|
294
387
|
class: "yee-file-upload__trigger",
|
|
295
|
-
style:
|
|
388
|
+
style: oe(d.value)
|
|
296
389
|
}, [
|
|
297
|
-
|
|
390
|
+
_[0] || (_[0] = w("span", {
|
|
298
391
|
class: "yee-file-upload__trigger-sign",
|
|
299
392
|
"aria-hidden": "true"
|
|
300
393
|
}, "+", -1)),
|
|
301
|
-
|
|
302
|
-
], 4)) :
|
|
394
|
+
w("span", null, P(o.value), 1)
|
|
395
|
+
], 4)) : T("", !0)
|
|
303
396
|
]),
|
|
304
397
|
_: 1
|
|
305
|
-
}, 16, ["file-list", "max-count", "multiple", "show-upload-list"])) : (
|
|
306
|
-
|
|
398
|
+
}, 16, ["file-list", "max-count", "multiple", "show-upload-list"])) : (n(), B("span", Vt, "暂无文件")),
|
|
399
|
+
h.value ? (n(), k(m(De), {
|
|
307
400
|
key: 2,
|
|
308
401
|
class: "yee-file-upload__preview",
|
|
309
|
-
preview: { visible:
|
|
310
|
-
src:
|
|
311
|
-
}, null, 8, ["preview", "src"])) :
|
|
402
|
+
preview: { visible: b.value, onVisibleChange: O },
|
|
403
|
+
src: h.value
|
|
404
|
+
}, null, 8, ["preview", "src"])) : T("", !0)
|
|
312
405
|
]));
|
|
313
406
|
}
|
|
314
|
-
}),
|
|
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({
|
|
315
408
|
name: "YeeForm",
|
|
316
409
|
__name: "YeeForm",
|
|
317
410
|
props: {
|
|
@@ -320,196 +413,196 @@ const vt = { class: "yee-descriptions__item" }, ht = { class: "yee-descriptions_
|
|
|
320
413
|
onSubmit: { type: Function },
|
|
321
414
|
options: {}
|
|
322
415
|
},
|
|
323
|
-
setup(
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
const
|
|
327
|
-
function
|
|
328
|
-
return
|
|
329
|
-
}
|
|
330
|
-
function
|
|
331
|
-
const
|
|
416
|
+
setup(a) {
|
|
417
|
+
const t = a, e = Ge.RangePicker, r = N(t.options.collapsed ?? !0);
|
|
418
|
+
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);
|
|
422
|
+
}
|
|
423
|
+
function b(g) {
|
|
424
|
+
const u = i(g);
|
|
332
425
|
return {
|
|
333
|
-
...
|
|
334
|
-
...
|
|
426
|
+
...g.componentProps,
|
|
427
|
+
...u === void 0 ? {} : { value: u }
|
|
335
428
|
};
|
|
336
429
|
}
|
|
337
|
-
function
|
|
338
|
-
|
|
430
|
+
function h(g, u) {
|
|
431
|
+
t.api.setFieldValue(g.fieldName, u), t.options.submitOnChange && S();
|
|
339
432
|
}
|
|
340
|
-
async function
|
|
341
|
-
|
|
433
|
+
async function F() {
|
|
434
|
+
t.api.resetForm(), await t.onReset?.();
|
|
342
435
|
}
|
|
343
|
-
async function
|
|
344
|
-
await
|
|
436
|
+
async function S() {
|
|
437
|
+
await t.onSubmit?.(t.api.getValues());
|
|
345
438
|
}
|
|
346
|
-
function g
|
|
347
|
-
|
|
439
|
+
function $(g) {
|
|
440
|
+
g.key === "Enter" && t.options.submitOnEnter && (g.preventDefault(), S());
|
|
348
441
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
442
|
+
function C() {
|
|
443
|
+
r.value = !r.value, t.options.handleCollapsedChange?.(r.value);
|
|
351
444
|
}
|
|
352
|
-
return (
|
|
445
|
+
return (g, u) => (n(), B("form", {
|
|
353
446
|
class: "yee-form",
|
|
354
|
-
onKeydown:
|
|
355
|
-
onSubmit:
|
|
447
|
+
onKeydown: $,
|
|
448
|
+
onSubmit: Ae(S, ["prevent"])
|
|
356
449
|
}, [
|
|
357
|
-
|
|
358
|
-
(
|
|
359
|
-
key:
|
|
450
|
+
w("div", Pt, [
|
|
451
|
+
(n(!0), B(ge, null, ve(y.value, (f) => (n(), B("label", {
|
|
452
|
+
key: f.fieldName,
|
|
360
453
|
class: "yee-form__field"
|
|
361
454
|
}, [
|
|
362
|
-
|
|
363
|
-
|
|
455
|
+
w("span", Et, P(f.label), 1),
|
|
456
|
+
f.component === "Input" ? (n(), k(m(qe), A({
|
|
364
457
|
key: 0,
|
|
365
458
|
ref_for: !0
|
|
366
|
-
},
|
|
367
|
-
"onUpdate:value": (o) =>
|
|
368
|
-
}), null, 16, ["onUpdate:value"])) :
|
|
459
|
+
}, b(f), {
|
|
460
|
+
"onUpdate:value": (o) => h(f, o)
|
|
461
|
+
}), null, 16, ["onUpdate:value"])) : f.component === "Select" ? (n(), k(m(ne), A({
|
|
369
462
|
key: 1,
|
|
370
463
|
ref_for: !0
|
|
371
|
-
},
|
|
372
|
-
"onUpdate:value": (o) =>
|
|
373
|
-
}), null, 16, ["onUpdate:value"])) : (
|
|
464
|
+
}, b(f), {
|
|
465
|
+
"onUpdate:value": (o) => h(f, o)
|
|
466
|
+
}), null, 16, ["onUpdate:value"])) : (n(), k(m(e), A({
|
|
374
467
|
key: 2,
|
|
375
468
|
ref_for: !0
|
|
376
|
-
},
|
|
377
|
-
"onUpdate:value": (o) =>
|
|
469
|
+
}, b(f), {
|
|
470
|
+
"onUpdate:value": (o) => h(f, o)
|
|
378
471
|
}), null, 16, ["onUpdate:value"]))
|
|
379
472
|
]))), 128))
|
|
380
473
|
]),
|
|
381
|
-
|
|
382
|
-
|
|
474
|
+
w("div", zt, [
|
|
475
|
+
H(m(I), {
|
|
383
476
|
"html-type": "button",
|
|
384
|
-
onClick:
|
|
477
|
+
onClick: F
|
|
385
478
|
}, {
|
|
386
|
-
default:
|
|
387
|
-
|
|
479
|
+
default: p(() => [...u[0] || (u[0] = [
|
|
480
|
+
W(" 重置 ", -1)
|
|
388
481
|
])]),
|
|
389
482
|
_: 1
|
|
390
483
|
}),
|
|
391
|
-
|
|
484
|
+
H(m(I), {
|
|
392
485
|
type: "primary",
|
|
393
486
|
"html-type": "submit"
|
|
394
487
|
}, {
|
|
395
|
-
default:
|
|
396
|
-
|
|
488
|
+
default: p(() => [...u[1] || (u[1] = [
|
|
489
|
+
W(" 查询 ", -1)
|
|
397
490
|
])]),
|
|
398
491
|
_: 1
|
|
399
492
|
}),
|
|
400
|
-
|
|
493
|
+
a.options.showCollapseButton ? (n(), k(m(I), {
|
|
401
494
|
key: 0,
|
|
402
495
|
type: "link",
|
|
403
496
|
"html-type": "button",
|
|
404
|
-
onClick:
|
|
497
|
+
onClick: C
|
|
405
498
|
}, {
|
|
406
|
-
default:
|
|
407
|
-
|
|
499
|
+
default: p(() => [
|
|
500
|
+
W(P(r.value ? "展开" : "收起"), 1)
|
|
408
501
|
]),
|
|
409
502
|
_: 1
|
|
410
|
-
})) :
|
|
503
|
+
})) : T("", !0)
|
|
411
504
|
])
|
|
412
505
|
], 32));
|
|
413
506
|
}
|
|
414
|
-
}),
|
|
415
|
-
class
|
|
416
|
-
schema =
|
|
507
|
+
}), Mt = /* @__PURE__ */ U(Rt, [["__scopeId", "data-v-12e77340"]]);
|
|
508
|
+
class Yt {
|
|
509
|
+
schema = N([]);
|
|
417
510
|
initialValues = {};
|
|
418
|
-
values =
|
|
419
|
-
configure(
|
|
420
|
-
this.schema.value =
|
|
511
|
+
values = he({});
|
|
512
|
+
configure(t) {
|
|
513
|
+
this.schema.value = t.schema.map((e) => ({ ...e })), this.initialValues = { ...t.initialValues }, this.resetForm();
|
|
421
514
|
}
|
|
422
|
-
getFieldValue(
|
|
423
|
-
return this.values[
|
|
515
|
+
getFieldValue(t) {
|
|
516
|
+
return this.values[t];
|
|
424
517
|
}
|
|
425
518
|
getValues() {
|
|
426
519
|
return { ...this.values };
|
|
427
520
|
}
|
|
428
521
|
resetForm() {
|
|
429
|
-
for (const
|
|
430
|
-
delete this.values[
|
|
522
|
+
for (const t of Object.keys(this.values))
|
|
523
|
+
delete this.values[t];
|
|
431
524
|
Object.assign(this.values, this.initialValues);
|
|
432
525
|
}
|
|
433
|
-
setFieldValue(
|
|
434
|
-
this.values[
|
|
526
|
+
setFieldValue(t, e) {
|
|
527
|
+
this.values[t] = e;
|
|
435
528
|
}
|
|
436
|
-
setValues(
|
|
437
|
-
Object.assign(this.values,
|
|
529
|
+
setValues(t) {
|
|
530
|
+
Object.assign(this.values, t);
|
|
438
531
|
}
|
|
439
|
-
updateSchema(
|
|
440
|
-
const
|
|
441
|
-
this.schema.value = this.schema.value.map((
|
|
442
|
-
...
|
|
443
|
-
...
|
|
532
|
+
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)
|
|
444
537
|
}));
|
|
445
538
|
}
|
|
446
539
|
}
|
|
447
|
-
class
|
|
448
|
-
formApi = new
|
|
540
|
+
class At {
|
|
541
|
+
formApi = new Yt();
|
|
449
542
|
searchFormVisible;
|
|
450
543
|
state;
|
|
451
544
|
grid;
|
|
452
|
-
constructor(
|
|
453
|
-
this.state =
|
|
545
|
+
constructor(t) {
|
|
546
|
+
this.state = N(t), this.searchFormVisible = N(t.showSearchForm ?? !0);
|
|
454
547
|
}
|
|
455
|
-
mount(
|
|
456
|
-
this.grid =
|
|
548
|
+
mount(t) {
|
|
549
|
+
this.grid = t;
|
|
457
550
|
}
|
|
458
|
-
query = async (
|
|
459
|
-
reload = async (
|
|
460
|
-
setGridOptions(
|
|
551
|
+
query = async (t) => (t && this.formApi.setValues(t), this.grid?.commitProxy("query"));
|
|
552
|
+
reload = async (t) => (t && this.formApi.setValues(t), this.grid?.commitProxy("reload"));
|
|
553
|
+
setGridOptions(t) {
|
|
461
554
|
this.setState({
|
|
462
555
|
gridOptions: {
|
|
463
556
|
...this.state.value.gridOptions,
|
|
464
|
-
...
|
|
557
|
+
...t
|
|
465
558
|
}
|
|
466
559
|
});
|
|
467
560
|
}
|
|
468
|
-
setLoading(
|
|
469
|
-
this.setGridOptions({ loading:
|
|
561
|
+
setLoading(t) {
|
|
562
|
+
this.setGridOptions({ loading: t });
|
|
470
563
|
}
|
|
471
|
-
setState(
|
|
564
|
+
setState(t) {
|
|
472
565
|
this.state.value = {
|
|
473
566
|
...this.state.value,
|
|
474
|
-
...
|
|
567
|
+
...t
|
|
475
568
|
};
|
|
476
569
|
}
|
|
477
|
-
toggleSearchForm(
|
|
478
|
-
return this.searchFormVisible.value =
|
|
570
|
+
toggleSearchForm(t) {
|
|
571
|
+
return this.searchFormVisible.value = t ?? !this.searchFormVisible.value, this.searchFormVisible.value;
|
|
479
572
|
}
|
|
480
573
|
unmount() {
|
|
481
574
|
this.grid = void 0;
|
|
482
575
|
}
|
|
483
576
|
}
|
|
484
|
-
let
|
|
485
|
-
function
|
|
486
|
-
if (
|
|
577
|
+
let ye = !1;
|
|
578
|
+
function $e() {
|
|
579
|
+
if (ye) return;
|
|
487
580
|
[
|
|
488
|
-
|
|
489
|
-
Xe,
|
|
490
|
-
Ze,
|
|
491
|
-
he,
|
|
492
|
-
et,
|
|
493
|
-
tt,
|
|
494
|
-
ot,
|
|
581
|
+
lt,
|
|
495
582
|
at,
|
|
496
583
|
st,
|
|
584
|
+
xe,
|
|
497
585
|
nt,
|
|
498
|
-
lt,
|
|
499
586
|
it,
|
|
500
587
|
rt,
|
|
501
588
|
ut,
|
|
589
|
+
dt,
|
|
502
590
|
ct,
|
|
503
|
-
|
|
504
|
-
|
|
591
|
+
pt,
|
|
592
|
+
ft,
|
|
593
|
+
vt,
|
|
594
|
+
mt,
|
|
595
|
+
yt,
|
|
596
|
+
ht
|
|
597
|
+
].forEach((t) => we.component(t)), ye = !0;
|
|
505
598
|
}
|
|
506
|
-
const
|
|
599
|
+
const It = { class: "yee-grid" }, Wt = {
|
|
507
600
|
key: 1,
|
|
508
601
|
class: "yee-grid__separator"
|
|
509
|
-
},
|
|
602
|
+
}, Lt = {
|
|
510
603
|
key: 0,
|
|
511
604
|
class: "yee-grid__title"
|
|
512
|
-
},
|
|
605
|
+
}, jt = /* @__PURE__ */ L({
|
|
513
606
|
name: "YeeGrid",
|
|
514
607
|
__name: "YeeGrid",
|
|
515
608
|
props: {
|
|
@@ -517,17 +610,17 @@ const Pt = { class: "yee-grid" }, Ot = {
|
|
|
517
610
|
tableTitle: {},
|
|
518
611
|
tableTitleHelp: {}
|
|
519
612
|
},
|
|
520
|
-
setup(
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
const
|
|
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) => ![
|
|
524
617
|
"empty",
|
|
525
618
|
"loading",
|
|
526
619
|
"table-title",
|
|
527
620
|
"toolbar-actions",
|
|
528
621
|
"toolbar-tools"
|
|
529
|
-
].includes(o))),
|
|
530
|
-
const o =
|
|
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;
|
|
531
624
|
return {
|
|
532
625
|
align: "left",
|
|
533
626
|
border: "inner",
|
|
@@ -535,299 +628,425 @@ const Pt = { class: "yee-grid" }, Ot = {
|
|
|
535
628
|
showOverflow: "tooltip",
|
|
536
629
|
size: "medium",
|
|
537
630
|
...o,
|
|
538
|
-
...
|
|
631
|
+
...R ? {
|
|
539
632
|
pagerConfig: {
|
|
540
633
|
pageSize: 20,
|
|
541
634
|
pageSizes: [10, 20, 30, 50, 100, 200],
|
|
542
635
|
layouts: ["Total", "Sizes", "Home", "PrevPage", "Number", "NextPage", "End"],
|
|
543
|
-
...
|
|
636
|
+
...R,
|
|
544
637
|
slots: {
|
|
545
638
|
sizes: "pagerSizes",
|
|
546
|
-
...
|
|
639
|
+
...R.slots
|
|
547
640
|
}
|
|
548
641
|
}
|
|
549
642
|
} : {},
|
|
550
|
-
...
|
|
643
|
+
...c ? {
|
|
551
644
|
proxyConfig: {
|
|
552
645
|
autoLoad: !0,
|
|
553
646
|
showResponseMsg: !1,
|
|
554
|
-
...
|
|
647
|
+
...c,
|
|
555
648
|
response: {
|
|
556
649
|
list: "items",
|
|
557
650
|
result: "items",
|
|
558
651
|
total: "total",
|
|
559
|
-
...
|
|
652
|
+
...c.response
|
|
560
653
|
},
|
|
561
|
-
...
|
|
654
|
+
...c.ajax ? {
|
|
562
655
|
ajax: {
|
|
563
|
-
...
|
|
564
|
-
...
|
|
565
|
-
query: (
|
|
656
|
+
...c.ajax,
|
|
657
|
+
...d ? {
|
|
658
|
+
query: (V) => d(V, t.api.formApi.getValues())
|
|
566
659
|
} : {}
|
|
567
660
|
}
|
|
568
661
|
} : {}
|
|
569
662
|
}
|
|
570
663
|
} : {},
|
|
571
|
-
...
|
|
664
|
+
...E || h.value ? {
|
|
572
665
|
toolbarConfig: {
|
|
573
666
|
custom: !0,
|
|
574
667
|
refresh: !0,
|
|
575
668
|
zoom: !0,
|
|
576
|
-
...
|
|
669
|
+
...E,
|
|
577
670
|
slots: {
|
|
578
|
-
...
|
|
579
|
-
...
|
|
671
|
+
...t.tableTitle || e["table-title"] || e["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
|
|
672
|
+
...e["toolbar-tools"] || E?.search ? { tools: "toolbarTools" } : {}
|
|
580
673
|
}
|
|
581
674
|
}
|
|
582
675
|
} : {}
|
|
583
676
|
};
|
|
584
|
-
}),
|
|
585
|
-
|
|
586
|
-
() =>
|
|
587
|
-
(o) =>
|
|
677
|
+
}), C = s(() => i.value.gridEvents ?? {});
|
|
678
|
+
ae(
|
|
679
|
+
() => y?.value.mode ?? "light",
|
|
680
|
+
(o) => we.setTheme(o),
|
|
588
681
|
{ immediate: !0 }
|
|
589
682
|
);
|
|
590
|
-
async function
|
|
591
|
-
await
|
|
683
|
+
async function g() {
|
|
684
|
+
await t.api.reload();
|
|
592
685
|
}
|
|
593
|
-
async function
|
|
594
|
-
await
|
|
686
|
+
async function u() {
|
|
687
|
+
await t.api.reload();
|
|
595
688
|
}
|
|
596
|
-
function
|
|
597
|
-
typeof
|
|
689
|
+
function f(o, c) {
|
|
690
|
+
typeof c != "number" && typeof c != "string" || o.setPageSizeByEvent(new Event("change"), c);
|
|
598
691
|
}
|
|
599
|
-
return
|
|
600
|
-
|
|
601
|
-
}),
|
|
602
|
-
|
|
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, {
|
|
603
696
|
key: 0,
|
|
604
|
-
api:
|
|
605
|
-
options:
|
|
606
|
-
"on-reset":
|
|
607
|
-
"on-submit":
|
|
697
|
+
api: a.api.formApi,
|
|
698
|
+
options: b.value,
|
|
699
|
+
"on-reset": u,
|
|
700
|
+
"on-submit": g
|
|
608
701
|
}, null, 8, ["api", "options"])), [
|
|
609
|
-
[
|
|
610
|
-
]) :
|
|
611
|
-
|
|
612
|
-
|
|
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({
|
|
613
706
|
ref_key: "gridRef",
|
|
614
|
-
ref:
|
|
707
|
+
ref: r,
|
|
615
708
|
class: "yee-grid__table"
|
|
616
|
-
},
|
|
617
|
-
toolbarActions:
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
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), {
|
|
622
715
|
key: 0,
|
|
623
|
-
title:
|
|
716
|
+
title: a.tableTitleHelp
|
|
624
717
|
}, {
|
|
625
|
-
default:
|
|
626
|
-
|
|
718
|
+
default: p(() => [...c[1] || (c[1] = [
|
|
719
|
+
w("span", {
|
|
627
720
|
class: "yee-grid__help",
|
|
628
721
|
tabindex: "0"
|
|
629
722
|
}, "?", -1)
|
|
630
723
|
])]),
|
|
631
724
|
_: 1
|
|
632
|
-
}, 8, ["title"])) :
|
|
633
|
-
])) :
|
|
725
|
+
}, 8, ["title"])) : T("", !0)
|
|
726
|
+
])) : T("", !0)
|
|
634
727
|
], !0),
|
|
635
|
-
|
|
728
|
+
x(o.$slots, "toolbar-actions", G(q(d)), void 0, !0)
|
|
636
729
|
]),
|
|
637
|
-
toolbarTools:
|
|
638
|
-
|
|
639
|
-
|
|
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), {
|
|
640
733
|
key: 0,
|
|
641
734
|
size: "small",
|
|
642
|
-
onClick:
|
|
735
|
+
onClick: c[0] || (c[0] = (E) => a.api.toggleSearchForm())
|
|
643
736
|
}, {
|
|
644
|
-
default:
|
|
645
|
-
|
|
737
|
+
default: p(() => [
|
|
738
|
+
W(P(a.api.searchFormVisible.value ? "隐藏查询" : "显示查询"), 1)
|
|
646
739
|
]),
|
|
647
740
|
_: 1
|
|
648
|
-
})) :
|
|
741
|
+
})) : T("", !0)
|
|
649
742
|
]),
|
|
650
|
-
pagerSizes:
|
|
651
|
-
|
|
743
|
+
pagerSizes: p(({ $pager: d, options: E, pageSize: R }) => [
|
|
744
|
+
H(m(ne), {
|
|
652
745
|
class: "yee-grid__page-size",
|
|
653
|
-
options:
|
|
654
|
-
value:
|
|
655
|
-
onChange: (
|
|
746
|
+
options: E,
|
|
747
|
+
value: R,
|
|
748
|
+
onChange: (V) => f(d, V)
|
|
656
749
|
}, null, 8, ["options", "value", "onChange"])
|
|
657
750
|
]),
|
|
658
|
-
empty:
|
|
659
|
-
|
|
660
|
-
|
|
751
|
+
empty: p(() => [
|
|
752
|
+
x(o.$slots, "empty", {}, () => [
|
|
753
|
+
c[2] || (c[2] = w("div", { class: "yee-grid__empty" }, "暂无数据", -1))
|
|
661
754
|
], !0)
|
|
662
755
|
]),
|
|
663
756
|
_: 2
|
|
664
757
|
}, [
|
|
665
|
-
|
|
666
|
-
name:
|
|
667
|
-
fn:
|
|
668
|
-
|
|
758
|
+
ve(F.value, (d) => ({
|
|
759
|
+
name: d,
|
|
760
|
+
fn: p((E) => [
|
|
761
|
+
x(o.$slots, d, G(q(E)), void 0, !0)
|
|
669
762
|
])
|
|
670
763
|
}))
|
|
671
764
|
]), 1040)
|
|
672
765
|
]));
|
|
673
766
|
}
|
|
674
|
-
}),
|
|
675
|
-
function
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
return [
|
|
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({
|
|
679
772
|
name: "YeeGrid",
|
|
680
773
|
inheritAttrs: !1,
|
|
681
774
|
props: {
|
|
682
775
|
tableTitle: String,
|
|
683
776
|
tableTitleHelp: String
|
|
684
777
|
},
|
|
685
|
-
setup(
|
|
686
|
-
return
|
|
687
|
-
...
|
|
688
|
-
api:
|
|
689
|
-
...
|
|
690
|
-
...
|
|
691
|
-
},
|
|
692
|
-
}
|
|
693
|
-
}),
|
|
778
|
+
setup(y, { attrs: i, slots: b }) {
|
|
779
|
+
return fe(() => t.unmount()), () => Ce(e, {
|
|
780
|
+
...i,
|
|
781
|
+
api: t,
|
|
782
|
+
...y.tableTitle ? { tableTitle: y.tableTitle } : {},
|
|
783
|
+
...y.tableTitleHelp ? { tableTitleHelp: y.tableTitleHelp } : {}
|
|
784
|
+
}, b);
|
|
785
|
+
}
|
|
786
|
+
}), t];
|
|
694
787
|
}
|
|
695
|
-
const
|
|
788
|
+
const Nt = { class: "yee-modal__header" }, Ut = ["id"], Dt = { class: "yee-modal__title" }, Gt = {
|
|
789
|
+
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({
|
|
696
792
|
inheritAttrs: !1,
|
|
697
793
|
name: "YeeModal",
|
|
698
794
|
__name: "YeeModal",
|
|
699
|
-
props: /* @__PURE__ */
|
|
795
|
+
props: /* @__PURE__ */ ce({
|
|
700
796
|
cancelButtonText: { default: "取消" },
|
|
701
797
|
centered: { type: Boolean, default: !1 },
|
|
798
|
+
closable: { type: Boolean, default: !0 },
|
|
702
799
|
confirmButtonLoading: { type: Boolean, default: !1 },
|
|
703
800
|
confirmButtonText: { default: "确认" },
|
|
704
801
|
destroyOnClose: { type: Boolean, default: !0 },
|
|
802
|
+
fullscreen: { type: Boolean, default: !1 },
|
|
803
|
+
fullscreenButton: { type: Boolean, default: !0 },
|
|
705
804
|
keyboard: { type: Boolean, default: !1 },
|
|
706
805
|
maskClosable: { type: Boolean, default: !1 },
|
|
707
806
|
showCancelButton: { type: Boolean, default: !0 },
|
|
708
807
|
showConfirmButton: { type: Boolean, default: !0 },
|
|
808
|
+
style: { type: [Boolean, null, String, Object, Array] },
|
|
709
809
|
title: { default: "" },
|
|
710
810
|
type: { default: "modal" },
|
|
711
|
-
width: { default: 520 }
|
|
811
|
+
width: { default: 520 },
|
|
812
|
+
wrapProps: {}
|
|
712
813
|
}, {
|
|
713
814
|
open: { type: Boolean, default: !1 },
|
|
714
815
|
openModifiers: {}
|
|
715
816
|
}),
|
|
716
|
-
emits: /* @__PURE__ */
|
|
717
|
-
setup(
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
|
|
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");
|
|
821
|
+
return {
|
|
822
|
+
...e.wrapProps,
|
|
823
|
+
"aria-labelledby": O ? e.wrapProps?.["aria-labelledby"] : C.value ? F : void 0
|
|
824
|
+
};
|
|
825
|
+
}), c = s(() => {
|
|
826
|
+
if ($.value)
|
|
827
|
+
return {
|
|
828
|
+
height: "100%",
|
|
829
|
+
margin: 0,
|
|
830
|
+
maxWidth: "100vw",
|
|
831
|
+
paddingBottom: 0,
|
|
832
|
+
top: 0,
|
|
833
|
+
width: "100vw"
|
|
834
|
+
};
|
|
835
|
+
});
|
|
836
|
+
function d() {
|
|
837
|
+
const { style: O, ...j } = b;
|
|
838
|
+
return j;
|
|
721
839
|
}
|
|
722
|
-
function
|
|
723
|
-
|
|
840
|
+
function E() {
|
|
841
|
+
return [b.style, e.style].filter(Boolean);
|
|
724
842
|
}
|
|
725
|
-
function
|
|
726
|
-
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
843
|
+
function R() {
|
|
844
|
+
return [b.style, e.style, c.value].filter(Boolean);
|
|
845
|
+
}
|
|
846
|
+
const V = () => h.closeIcon?.() ?? b.closeIcon ?? Ce(ot);
|
|
847
|
+
function Y(O) {
|
|
848
|
+
r("cancel", O), y.value = !1;
|
|
849
|
+
}
|
|
850
|
+
function D(O) {
|
|
851
|
+
r("confirm", O);
|
|
852
|
+
}
|
|
853
|
+
function Q() {
|
|
854
|
+
r("close");
|
|
855
|
+
}
|
|
856
|
+
function v() {
|
|
857
|
+
i.value = !i.value;
|
|
858
|
+
}
|
|
859
|
+
return (O, j) => S.value ? (n(), k(m(Ke), A({ key: 0 }, d(), {
|
|
860
|
+
class: "yee-modal-drawer",
|
|
861
|
+
closable: !1,
|
|
862
|
+
"destroy-on-close": e.destroyOnClose,
|
|
863
|
+
keyboard: e.keyboard,
|
|
864
|
+
"mask-closable": e.maskClosable,
|
|
865
|
+
open: y.value,
|
|
866
|
+
style: E(),
|
|
867
|
+
width: e.width,
|
|
868
|
+
onAfterOpenChange: j[0] || (j[0] = (Z) => !Z && Q()),
|
|
869
|
+
onClose: Y
|
|
870
|
+
}), se({
|
|
871
|
+
footer: p(() => [
|
|
872
|
+
w("div", Kt, [
|
|
873
|
+
x(O.$slots, "footer", {}, () => [
|
|
874
|
+
e.showCancelButton ? (n(), k(m(I), {
|
|
748
875
|
key: 0,
|
|
749
|
-
onClick:
|
|
876
|
+
onClick: Y
|
|
750
877
|
}, {
|
|
751
|
-
default:
|
|
752
|
-
|
|
878
|
+
default: p(() => [
|
|
879
|
+
W(P(e.cancelButtonText), 1)
|
|
753
880
|
]),
|
|
754
881
|
_: 1
|
|
755
|
-
})) :
|
|
756
|
-
|
|
882
|
+
})) : T("", !0),
|
|
883
|
+
e.showConfirmButton ? (n(), k(m(I), {
|
|
757
884
|
key: 1,
|
|
758
|
-
loading:
|
|
885
|
+
loading: e.confirmButtonLoading,
|
|
759
886
|
type: "primary",
|
|
760
|
-
onClick:
|
|
887
|
+
onClick: D
|
|
761
888
|
}, {
|
|
762
|
-
default:
|
|
763
|
-
|
|
889
|
+
default: p(() => [
|
|
890
|
+
W(P(e.confirmButtonText), 1)
|
|
764
891
|
]),
|
|
765
892
|
_: 1
|
|
766
|
-
}, 8, ["loading"])) :
|
|
893
|
+
}, 8, ["loading"])) : T("", !0)
|
|
767
894
|
], !0)
|
|
768
895
|
])
|
|
769
896
|
]),
|
|
770
|
-
default:
|
|
771
|
-
|
|
772
|
-
|
|
897
|
+
default: p(() => [
|
|
898
|
+
w("div", qt, [
|
|
899
|
+
x(O.$slots, "default", {}, void 0, !0)
|
|
773
900
|
])
|
|
774
901
|
]),
|
|
775
|
-
_:
|
|
776
|
-
},
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
title: t.title,
|
|
783
|
-
width: t.width,
|
|
784
|
-
onAfterClose: V,
|
|
785
|
-
onCancel: w
|
|
786
|
-
}), {
|
|
787
|
-
footer: f(() => [
|
|
788
|
-
$("div", Nt, [
|
|
789
|
-
_(g.$slots, "footer", {}, () => [
|
|
790
|
-
t.showCancelButton ? (i(), k(h(U), {
|
|
902
|
+
_: 2
|
|
903
|
+
}, [
|
|
904
|
+
g.value ? {
|
|
905
|
+
name: "title",
|
|
906
|
+
fn: p(() => [
|
|
907
|
+
w("div", Nt, [
|
|
908
|
+
C.value ? (n(), B("div", {
|
|
791
909
|
key: 0,
|
|
792
|
-
|
|
910
|
+
id: m(F),
|
|
911
|
+
class: "yee-modal__heading"
|
|
912
|
+
}, [
|
|
913
|
+
x(O.$slots, "header", {}, () => [
|
|
914
|
+
w("span", Dt, P(e.title), 1)
|
|
915
|
+
], !0)
|
|
916
|
+
], 8, Ut)) : T("", !0),
|
|
917
|
+
e.closable ? (n(), B("div", Gt, [
|
|
918
|
+
H(m(I), {
|
|
919
|
+
"aria-label": "关闭",
|
|
920
|
+
class: "yee-modal__header-action",
|
|
921
|
+
size: "small",
|
|
922
|
+
type: "text",
|
|
923
|
+
onClick: Y
|
|
924
|
+
}, {
|
|
925
|
+
default: p(() => [
|
|
926
|
+
H(V)
|
|
927
|
+
]),
|
|
928
|
+
_: 1
|
|
929
|
+
})
|
|
930
|
+
])) : T("", !0)
|
|
931
|
+
])
|
|
932
|
+
]),
|
|
933
|
+
key: "0"
|
|
934
|
+
} : 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,
|
|
937
|
+
class: {
|
|
938
|
+
"yee-modal": !0,
|
|
939
|
+
"yee-modal--fullscreen": $.value
|
|
940
|
+
},
|
|
941
|
+
closable: !1,
|
|
942
|
+
"destroy-on-close": e.destroyOnClose,
|
|
943
|
+
keyboard: e.keyboard,
|
|
944
|
+
"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,
|
|
950
|
+
onCancel: Y
|
|
951
|
+
}), se({
|
|
952
|
+
footer: p(() => [
|
|
953
|
+
w("div", to, [
|
|
954
|
+
x(O.$slots, "footer", {}, () => [
|
|
955
|
+
e.showCancelButton ? (n(), k(m(I), {
|
|
956
|
+
key: 0,
|
|
957
|
+
onClick: Y
|
|
793
958
|
}, {
|
|
794
|
-
default:
|
|
795
|
-
|
|
959
|
+
default: p(() => [
|
|
960
|
+
W(P(e.cancelButtonText), 1)
|
|
796
961
|
]),
|
|
797
962
|
_: 1
|
|
798
|
-
})) :
|
|
799
|
-
|
|
963
|
+
})) : T("", !0),
|
|
964
|
+
e.showConfirmButton ? (n(), k(m(I), {
|
|
800
965
|
key: 1,
|
|
801
|
-
loading:
|
|
966
|
+
loading: e.confirmButtonLoading,
|
|
802
967
|
type: "primary",
|
|
803
|
-
onClick:
|
|
968
|
+
onClick: D
|
|
804
969
|
}, {
|
|
805
|
-
default:
|
|
806
|
-
|
|
970
|
+
default: p(() => [
|
|
971
|
+
W(P(e.confirmButtonText), 1)
|
|
807
972
|
]),
|
|
808
973
|
_: 1
|
|
809
|
-
}, 8, ["loading"])) :
|
|
974
|
+
}, 8, ["loading"])) : T("", !0)
|
|
810
975
|
], !0)
|
|
811
976
|
])
|
|
812
977
|
]),
|
|
813
|
-
default:
|
|
814
|
-
|
|
815
|
-
|
|
978
|
+
default: p(() => [
|
|
979
|
+
w("div", eo, [
|
|
980
|
+
x(O.$slots, "default", {}, void 0, !0)
|
|
816
981
|
])
|
|
817
982
|
]),
|
|
818
|
-
_:
|
|
819
|
-
},
|
|
983
|
+
_: 2
|
|
984
|
+
}, [
|
|
985
|
+
u.value ? {
|
|
986
|
+
name: "title",
|
|
987
|
+
fn: p(() => [
|
|
988
|
+
w("div", Qt, [
|
|
989
|
+
C.value ? (n(), B("div", {
|
|
990
|
+
key: 0,
|
|
991
|
+
id: m(F),
|
|
992
|
+
class: "yee-modal__heading"
|
|
993
|
+
}, [
|
|
994
|
+
x(O.$slots, "header", {}, () => [
|
|
995
|
+
w("span", Xt, P(e.title), 1)
|
|
996
|
+
], !0)
|
|
997
|
+
], 8, Jt)) : T("", !0),
|
|
998
|
+
w("div", Zt, [
|
|
999
|
+
e.fullscreenButton ? (n(), k(m(X), {
|
|
1000
|
+
key: 0,
|
|
1001
|
+
title: f.value
|
|
1002
|
+
}, {
|
|
1003
|
+
default: p(() => [
|
|
1004
|
+
H(m(I), {
|
|
1005
|
+
"aria-label": f.value,
|
|
1006
|
+
"aria-pressed": $.value,
|
|
1007
|
+
class: "yee-modal__header-action",
|
|
1008
|
+
size: "small",
|
|
1009
|
+
type: "text",
|
|
1010
|
+
onClick: v
|
|
1011
|
+
}, {
|
|
1012
|
+
default: p(() => [
|
|
1013
|
+
$.value ? (n(), k(m(et), { key: 0 })) : (n(), k(m(tt), { key: 1 }))
|
|
1014
|
+
]),
|
|
1015
|
+
_: 1
|
|
1016
|
+
}, 8, ["aria-label", "aria-pressed"])
|
|
1017
|
+
]),
|
|
1018
|
+
_: 1
|
|
1019
|
+
}, 8, ["title"])) : T("", !0),
|
|
1020
|
+
e.closable ? (n(), k(m(I), {
|
|
1021
|
+
key: 1,
|
|
1022
|
+
"aria-label": "关闭",
|
|
1023
|
+
class: "yee-modal__header-action",
|
|
1024
|
+
size: "small",
|
|
1025
|
+
type: "text",
|
|
1026
|
+
onClick: Y
|
|
1027
|
+
}, {
|
|
1028
|
+
default: p(() => [
|
|
1029
|
+
H(V)
|
|
1030
|
+
]),
|
|
1031
|
+
_: 1
|
|
1032
|
+
})) : T("", !0)
|
|
1033
|
+
])
|
|
1034
|
+
])
|
|
1035
|
+
]),
|
|
1036
|
+
key: "0"
|
|
1037
|
+
} : void 0
|
|
1038
|
+
]), 1040, ["centered", "class", "destroy-on-close", "keyboard", "mask-closable", "open", "style", "width", "wrap-props"]));
|
|
820
1039
|
}
|
|
821
|
-
}),
|
|
1040
|
+
}), xo = /* @__PURE__ */ U(oo, [["__scopeId", "data-v-2419e7df"]]), lo = { class: "yee-page__heading" }, ao = {
|
|
822
1041
|
key: 0,
|
|
823
1042
|
class: "yee-page__title"
|
|
824
|
-
},
|
|
1043
|
+
}, so = {
|
|
825
1044
|
key: 0,
|
|
826
1045
|
class: "yee-page__description"
|
|
827
|
-
},
|
|
1046
|
+
}, no = {
|
|
828
1047
|
key: 0,
|
|
829
1048
|
class: "yee-page__extra"
|
|
830
|
-
},
|
|
1049
|
+
}, io = /* @__PURE__ */ L({
|
|
831
1050
|
name: "YeePage",
|
|
832
1051
|
__name: "YeePage",
|
|
833
1052
|
props: {
|
|
@@ -839,48 +1058,48 @@ const Et = { class: "yee-modal__header" }, At = { class: "yee-modal__title" }, M
|
|
|
839
1058
|
heightOffset: { default: 0 },
|
|
840
1059
|
title: {}
|
|
841
1060
|
},
|
|
842
|
-
setup(
|
|
843
|
-
const
|
|
844
|
-
"--yee-page-height-offset": typeof
|
|
1061
|
+
setup(a) {
|
|
1062
|
+
const t = a, e = ie(), r = s(() => !!(t.description || t.title || e.description || e.extra || e.title)), y = s(() => ({
|
|
1063
|
+
"--yee-page-height-offset": typeof t.heightOffset == "number" ? `${t.heightOffset}px` : t.heightOffset
|
|
845
1064
|
}));
|
|
846
|
-
return (
|
|
847
|
-
class:
|
|
848
|
-
style:
|
|
1065
|
+
return (i, b) => (n(), B("section", {
|
|
1066
|
+
class: te(["yee-page", { "yee-page--auto-height": a.autoContentHeight }]),
|
|
1067
|
+
style: oe(y.value)
|
|
849
1068
|
}, [
|
|
850
|
-
|
|
1069
|
+
r.value ? (n(), B("header", {
|
|
851
1070
|
key: 0,
|
|
852
|
-
class:
|
|
1071
|
+
class: te(["yee-page__header", a.headerClass])
|
|
853
1072
|
}, [
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
1073
|
+
w("div", lo, [
|
|
1074
|
+
x(i.$slots, "title", {}, () => [
|
|
1075
|
+
a.title ? (n(), B("h1", ao, P(a.title), 1)) : T("", !0)
|
|
857
1076
|
], !0),
|
|
858
|
-
|
|
859
|
-
|
|
1077
|
+
x(i.$slots, "description", {}, () => [
|
|
1078
|
+
a.description ? (n(), B("p", so, P(a.description), 1)) : T("", !0)
|
|
860
1079
|
], !0)
|
|
861
1080
|
]),
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
])) :
|
|
865
|
-
], 2)) :
|
|
866
|
-
|
|
867
|
-
class:
|
|
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])
|
|
868
1087
|
}, [
|
|
869
|
-
|
|
1088
|
+
x(i.$slots, "default", {}, void 0, !0)
|
|
870
1089
|
], 2),
|
|
871
|
-
|
|
1090
|
+
i.$slots.footer ? (n(), B("footer", {
|
|
872
1091
|
key: 1,
|
|
873
|
-
class:
|
|
1092
|
+
class: te(["yee-page__footer", a.footerClass])
|
|
874
1093
|
}, [
|
|
875
|
-
|
|
876
|
-
], 2)) :
|
|
1094
|
+
x(i.$slots, "footer", {}, void 0, !0)
|
|
1095
|
+
], 2)) : T("", !0)
|
|
877
1096
|
], 6));
|
|
878
1097
|
}
|
|
879
|
-
}),
|
|
1098
|
+
}), wo = /* @__PURE__ */ U(io, [["__scopeId", "data-v-23464940"]]), ro = { class: "yee-select__option-label" }, uo = /* @__PURE__ */ L({
|
|
880
1099
|
inheritAttrs: !1,
|
|
881
1100
|
name: "YeeSelect",
|
|
882
1101
|
__name: "YeeSelect",
|
|
883
|
-
props: /* @__PURE__ */
|
|
1102
|
+
props: /* @__PURE__ */ ce({
|
|
884
1103
|
fieldNames: {},
|
|
885
1104
|
options: {}
|
|
886
1105
|
}, {
|
|
@@ -888,106 +1107,106 @@ const Et = { class: "yee-modal__header" }, At = { class: "yee-modal__title" }, M
|
|
|
888
1107
|
valueModifiers: {}
|
|
889
1108
|
}),
|
|
890
1109
|
emits: ["update:value"],
|
|
891
|
-
setup(
|
|
892
|
-
const
|
|
893
|
-
label:
|
|
894
|
-
options:
|
|
895
|
-
value:
|
|
896
|
-
})),
|
|
1110
|
+
setup(a) {
|
|
1111
|
+
const t = a, e = de(a, "value"), r = ke(), y = ie(), i = s(() => ({
|
|
1112
|
+
label: t.fieldNames?.label ?? "label",
|
|
1113
|
+
options: t.fieldNames?.options ?? "options",
|
|
1114
|
+
value: t.fieldNames?.value ?? "value"
|
|
1115
|
+
})), b = s(() => r.class), h = s(() => r.style), F = s(() => {
|
|
897
1116
|
const o = {};
|
|
898
|
-
for (const [
|
|
899
|
-
|
|
1117
|
+
for (const [c, d] of Object.entries(r))
|
|
1118
|
+
c !== "class" && c !== "style" && (o[c] = d);
|
|
900
1119
|
return o;
|
|
901
|
-
}),
|
|
902
|
-
function
|
|
1120
|
+
}), S = s(() => !y.default && !y.option);
|
|
1121
|
+
function $(o) {
|
|
903
1122
|
return typeof o == "number" || typeof o == "string" ? String(o) : "";
|
|
904
1123
|
}
|
|
905
|
-
function
|
|
1124
|
+
function C(o, c) {
|
|
906
1125
|
if (o)
|
|
907
|
-
for (const
|
|
908
|
-
const
|
|
909
|
-
if (
|
|
910
|
-
const
|
|
911
|
-
if (
|
|
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;
|
|
912
1131
|
}
|
|
913
1132
|
}
|
|
914
|
-
function
|
|
915
|
-
return o ?
|
|
1133
|
+
function g(o) {
|
|
1134
|
+
return o ? $(o[i.value.label]) || $(o.title) || $(o[i.value.value]) : "";
|
|
916
1135
|
}
|
|
917
|
-
const
|
|
918
|
-
const o =
|
|
1136
|
+
const u = s(() => {
|
|
1137
|
+
const o = e.value;
|
|
919
1138
|
if (!(o == null || o === ""))
|
|
920
|
-
return Array.isArray(o) ? o.map((
|
|
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;
|
|
921
1140
|
});
|
|
922
|
-
function
|
|
923
|
-
return
|
|
924
|
-
}
|
|
925
|
-
return (o,
|
|
926
|
-
default:
|
|
927
|
-
|
|
928
|
-
class:
|
|
929
|
-
style:
|
|
1141
|
+
function f(o) {
|
|
1142
|
+
return g(o);
|
|
1143
|
+
}
|
|
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)
|
|
930
1149
|
}, [
|
|
931
|
-
|
|
1150
|
+
S.value ? (n(), k(m(ne), A({
|
|
932
1151
|
key: 0,
|
|
933
|
-
value:
|
|
934
|
-
"onUpdate:value":
|
|
935
|
-
},
|
|
936
|
-
"field-names":
|
|
937
|
-
options:
|
|
1152
|
+
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
|
|
938
1157
|
}), {
|
|
939
|
-
option:
|
|
940
|
-
|
|
941
|
-
title:
|
|
1158
|
+
option: p((d) => [
|
|
1159
|
+
H(m(X), {
|
|
1160
|
+
title: f(d),
|
|
942
1161
|
placement: "left"
|
|
943
1162
|
}, {
|
|
944
|
-
default:
|
|
945
|
-
|
|
1163
|
+
default: p(() => [
|
|
1164
|
+
w("span", ro, P(f(d)), 1)
|
|
946
1165
|
]),
|
|
947
1166
|
_: 2
|
|
948
1167
|
}, 1032, ["title"])
|
|
949
1168
|
]),
|
|
950
1169
|
_: 1
|
|
951
|
-
}, 16, ["value", "field-names", "options"])) : (
|
|
1170
|
+
}, 16, ["value", "field-names", "options"])) : (n(), k(m(ne), A({
|
|
952
1171
|
key: 1,
|
|
953
|
-
value:
|
|
954
|
-
"onUpdate:value":
|
|
955
|
-
},
|
|
956
|
-
"field-names":
|
|
957
|
-
options:
|
|
958
|
-
}),
|
|
1172
|
+
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 }, [
|
|
959
1178
|
o.$slots.default ? {
|
|
960
1179
|
name: "default",
|
|
961
|
-
fn:
|
|
962
|
-
|
|
1180
|
+
fn: p((d) => [
|
|
1181
|
+
x(o.$slots, "default", G(q(d)), void 0, !0)
|
|
963
1182
|
]),
|
|
964
1183
|
key: "0"
|
|
965
1184
|
} : void 0,
|
|
966
1185
|
o.$slots.option ? {
|
|
967
1186
|
name: "option",
|
|
968
|
-
fn:
|
|
969
|
-
|
|
1187
|
+
fn: p((d) => [
|
|
1188
|
+
x(o.$slots, "option", G(q(d)), void 0, !0)
|
|
970
1189
|
]),
|
|
971
1190
|
key: "1"
|
|
972
1191
|
} : void 0,
|
|
973
1192
|
o.$slots.tagRender ? {
|
|
974
1193
|
name: "tagRender",
|
|
975
|
-
fn:
|
|
976
|
-
|
|
1194
|
+
fn: p((d) => [
|
|
1195
|
+
x(o.$slots, "tagRender", G(q(d)), void 0, !0)
|
|
977
1196
|
]),
|
|
978
1197
|
key: "2"
|
|
979
1198
|
} : void 0,
|
|
980
1199
|
o.$slots.dropdownRender ? {
|
|
981
1200
|
name: "dropdownRender",
|
|
982
|
-
fn:
|
|
983
|
-
|
|
1201
|
+
fn: p((d) => [
|
|
1202
|
+
x(o.$slots, "dropdownRender", G(q(d)), void 0, !0)
|
|
984
1203
|
]),
|
|
985
1204
|
key: "3"
|
|
986
1205
|
} : void 0,
|
|
987
1206
|
o.$slots.notFoundContent ? {
|
|
988
1207
|
name: "notFoundContent",
|
|
989
|
-
fn:
|
|
990
|
-
|
|
1208
|
+
fn: p((d) => [
|
|
1209
|
+
x(o.$slots, "notFoundContent", G(q(d)), void 0, !0)
|
|
991
1210
|
]),
|
|
992
1211
|
key: "4"
|
|
993
1212
|
} : void 0
|
|
@@ -997,23 +1216,24 @@ const Et = { class: "yee-modal__header" }, At = { class: "yee-modal__title" }, M
|
|
|
997
1216
|
_: 3
|
|
998
1217
|
}, 8, ["title"]));
|
|
999
1218
|
}
|
|
1000
|
-
}),
|
|
1219
|
+
}), $o = /* @__PURE__ */ U(uo, [["__scopeId", "data-v-64282659"]]);
|
|
1001
1220
|
export {
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
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
|
|
1019
1239
|
};
|