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