@yeepay/yee-boss-ui 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/YeeGrid-DABX_NBF.js +643 -0
- package/dist/components/grid/form-api.d.ts +3 -1
- package/dist/grid.js +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{use-yee-grid-CRwLOXbk.js → use-yee-grid-Dgxtn240.js} +31 -20
- package/package.json +1 -1
- package/dist/YeeGrid-DxwdKAd2.js +0 -629
package/dist/YeeGrid-DxwdKAd2.js
DELETED
|
@@ -1,629 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ge, reactive as Ae, useTemplateRef as ne, shallowRef as R, computed as g, onMounted as re, onBeforeUnmount as he, openBlock as v, createBlock as H, unref as b, mergeProps as ae, withCtx as p, createElementVNode as _, normalizeStyle as ye, renderSlot as z, createTextVNode as G, toDisplayString as W, nextTick as D, useSlots as Me, inject as de, watch as me, onUnmounted as Be, createElementBlock as I, normalizeClass as Z, withDirectives as Fe, withModifiers as Ie, Fragment as pe, renderList as fe, createCommentVNode as P, resolveDynamicComponent as $e, createVNode as $, vShow as He, toHandlers as Oe, createSlots as De, normalizeProps as ee, guardReactiveProps as te } from "vue";
|
|
2
|
-
import { TreeSelect as Le, TimeRangePicker as qe, TimePicker as Ge, Textarea as We, Switch as je, Slider as Ue, Select as be, Segmented as Ye, Rate as Ke, RangePicker as Qe, RadioGroup as Je, Radio as Xe, Mentions as Ze, InputPassword as et, InputNumber as tt, Input as ot, DatePicker as nt, CheckboxGroup as rt, Checkbox as at, Cascader as it, AutoComplete as lt, Tooltip as Ce, Modal as st, Form as ut, FormItem as ct, Button as oe } from "ant-design-vue";
|
|
3
|
-
import { ChevronDown as dt } from "lucide-vue-next";
|
|
4
|
-
import xe from "vxe-table/es/grid";
|
|
5
|
-
import T from "vxe-table/es/ui";
|
|
6
|
-
import { p as mt } from "./context-DJQ4f46a.js";
|
|
7
|
-
import { Y as pt } from "./YeeFileUpload-BUFoWs8x.js";
|
|
8
|
-
import { p as ft } from "./context-C5gszWl6.js";
|
|
9
|
-
import vt from "vxe-pc-ui/es/button";
|
|
10
|
-
import gt from "vxe-pc-ui/es/checkbox";
|
|
11
|
-
import ht from "vxe-pc-ui/es/icon";
|
|
12
|
-
import yt from "vxe-pc-ui/es/input";
|
|
13
|
-
import bt from "vxe-pc-ui/es/loading";
|
|
14
|
-
import Ct from "vxe-pc-ui/es/modal";
|
|
15
|
-
import xt from "vxe-pc-ui/es/number-input";
|
|
16
|
-
import wt from "vxe-pc-ui/es/pager";
|
|
17
|
-
import _t from "vxe-pc-ui/es/radio-group";
|
|
18
|
-
import Tt from "vxe-pc-ui/es/select";
|
|
19
|
-
import St from "vxe-table/es/colgroup";
|
|
20
|
-
import kt from "vxe-table/es/column";
|
|
21
|
-
import Nt from "vxe-table/es/locale/lang/zh-CN";
|
|
22
|
-
import Vt from "vxe-table/es/table";
|
|
23
|
-
import Pt from "vxe-table/es/toolbar";
|
|
24
|
-
import { _ as zt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
25
|
-
const Rt = {
|
|
26
|
-
AutoComplete: lt,
|
|
27
|
-
Cascader: it,
|
|
28
|
-
Checkbox: at,
|
|
29
|
-
CheckboxGroup: rt,
|
|
30
|
-
DatePicker: nt,
|
|
31
|
-
Input: ot,
|
|
32
|
-
InputNumber: tt,
|
|
33
|
-
InputPassword: et,
|
|
34
|
-
Mentions: Ze,
|
|
35
|
-
Radio: Xe,
|
|
36
|
-
RadioGroup: Je,
|
|
37
|
-
RangePicker: Qe,
|
|
38
|
-
Rate: Ke,
|
|
39
|
-
Segmented: Ye,
|
|
40
|
-
Select: be,
|
|
41
|
-
Slider: Ue,
|
|
42
|
-
Switch: je,
|
|
43
|
-
Textarea: We,
|
|
44
|
-
TimePicker: Ge,
|
|
45
|
-
TimeRangePicker: qe,
|
|
46
|
-
TreeSelect: Le,
|
|
47
|
-
Upload: pt
|
|
48
|
-
}, Et = {
|
|
49
|
-
Checkbox: "checked",
|
|
50
|
-
Radio: "checked",
|
|
51
|
-
Switch: "checked",
|
|
52
|
-
Upload: "fileList"
|
|
53
|
-
}, At = /* @__PURE__ */ ge({
|
|
54
|
-
inheritAttrs: !1,
|
|
55
|
-
name: "VxeTooltip",
|
|
56
|
-
__name: "YeeGridTooltip",
|
|
57
|
-
props: {
|
|
58
|
-
content: {},
|
|
59
|
-
enterDelay: {},
|
|
60
|
-
enterable: { type: Boolean },
|
|
61
|
-
height: {},
|
|
62
|
-
isArrow: { type: Boolean, default: !0 },
|
|
63
|
-
leaveDelay: {},
|
|
64
|
-
maxHeight: {},
|
|
65
|
-
maxWidth: {},
|
|
66
|
-
minHeight: {},
|
|
67
|
-
minWidth: {},
|
|
68
|
-
modelValue: { type: Boolean },
|
|
69
|
-
popupClassName: {},
|
|
70
|
-
selector: {},
|
|
71
|
-
theme: {},
|
|
72
|
-
trigger: {},
|
|
73
|
-
useHTML: { type: Boolean },
|
|
74
|
-
width: {},
|
|
75
|
-
zIndex: {}
|
|
76
|
-
},
|
|
77
|
-
emits: ["update:modelValue"],
|
|
78
|
-
setup(l, { expose: a, emit: f }) {
|
|
79
|
-
const r = l, C = f, L = Ce, h = Ae({ visible: !1 }), E = ne("tooltip"), S = R(), k = R(""), i = R(), u = R(!1);
|
|
80
|
-
let y;
|
|
81
|
-
function x(n) {
|
|
82
|
-
if (!(n === void 0 || n === ""))
|
|
83
|
-
return typeof n == "number" ? `${n}px` : n;
|
|
84
|
-
}
|
|
85
|
-
const d = g(() => {
|
|
86
|
-
const n = S.value;
|
|
87
|
-
return !n || !h.visible ? { display: "none" } : {
|
|
88
|
-
height: `${Math.max(n.height, 1)}px`,
|
|
89
|
-
left: `${n.left}px`,
|
|
90
|
-
pointerEvents: "none",
|
|
91
|
-
position: "fixed",
|
|
92
|
-
top: `${n.top}px`,
|
|
93
|
-
width: `${Math.max(n.width, 1)}px`
|
|
94
|
-
};
|
|
95
|
-
}), O = g(() => ({
|
|
96
|
-
cursor: r.enterable ? "text" : void 0,
|
|
97
|
-
height: x(r.height),
|
|
98
|
-
maxHeight: x(r.maxHeight),
|
|
99
|
-
maxWidth: x(r.maxWidth),
|
|
100
|
-
minHeight: x(r.minHeight),
|
|
101
|
-
minWidth: x(r.minWidth),
|
|
102
|
-
userSelect: r.enterable ? "text" : void 0,
|
|
103
|
-
width: x(r.width)
|
|
104
|
-
})), j = g(() => ({
|
|
105
|
-
...r.popupClassName ? { overlayClassName: r.popupClassName } : {},
|
|
106
|
-
...r.zIndex === void 0 ? {} : { zIndex: Number(r.zIndex) }
|
|
107
|
-
}));
|
|
108
|
-
function U(n) {
|
|
109
|
-
return n.closest("body") ?? document.body;
|
|
110
|
-
}
|
|
111
|
-
function Y(n) {
|
|
112
|
-
return n || (typeof r.selector == "string" ? document.querySelector(r.selector) ?? void 0 : r.selector);
|
|
113
|
-
}
|
|
114
|
-
function A() {
|
|
115
|
-
const n = i.value;
|
|
116
|
-
if (!n?.isConnected)
|
|
117
|
-
return N();
|
|
118
|
-
const m = n.getBoundingClientRect();
|
|
119
|
-
return S.value = {
|
|
120
|
-
height: m.height,
|
|
121
|
-
left: m.left,
|
|
122
|
-
top: m.top,
|
|
123
|
-
width: m.width
|
|
124
|
-
}, D(() => E.value?.forcePopupAlign?.());
|
|
125
|
-
}
|
|
126
|
-
function w(n, m) {
|
|
127
|
-
const V = Y(n);
|
|
128
|
-
return V ? (i.value = V, k.value = m ?? r.content ?? "", u.value = !0, h.visible = !0, C("update:modelValue", !0), A()) : D();
|
|
129
|
-
}
|
|
130
|
-
function q(n, m, V) {
|
|
131
|
-
const J = n.currentTarget instanceof HTMLElement ? n.currentTarget : void 0;
|
|
132
|
-
return w(m ?? J, V);
|
|
133
|
-
}
|
|
134
|
-
function N() {
|
|
135
|
-
return u.value = !1, i.value = void 0, S.value = void 0, h.visible = !1, C("update:modelValue", !1), D();
|
|
136
|
-
}
|
|
137
|
-
function M(n) {
|
|
138
|
-
n && y && (clearTimeout(y), y = void 0), u.value = n;
|
|
139
|
-
}
|
|
140
|
-
function K() {
|
|
141
|
-
return u.value;
|
|
142
|
-
}
|
|
143
|
-
function B() {
|
|
144
|
-
h.visible && A();
|
|
145
|
-
}
|
|
146
|
-
function Q() {
|
|
147
|
-
M(!1), r.enterable && (y = setTimeout(() => {
|
|
148
|
-
y = void 0, u.value || N();
|
|
149
|
-
}, r.leaveDelay ?? 0));
|
|
150
|
-
}
|
|
151
|
-
return re(() => {
|
|
152
|
-
window.addEventListener("resize", B), window.addEventListener("scroll", B, !0), r.modelValue && w(void 0, r.content);
|
|
153
|
-
}), he(() => {
|
|
154
|
-
y && clearTimeout(y), window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0);
|
|
155
|
-
}), a({
|
|
156
|
-
close: N,
|
|
157
|
-
isActived: K,
|
|
158
|
-
open: w,
|
|
159
|
-
openByEvent: q,
|
|
160
|
-
reactData: h,
|
|
161
|
-
setActived: M,
|
|
162
|
-
toVisible: w,
|
|
163
|
-
updatePlacement: A
|
|
164
|
-
}), (n, m) => (v(), H(b(L), ae({ ref: "tooltip" }, j.value, {
|
|
165
|
-
arrow: r.isArrow !== !1,
|
|
166
|
-
"get-popup-container": U,
|
|
167
|
-
open: h.visible,
|
|
168
|
-
"overlay-inner-style": O.value,
|
|
169
|
-
placement: "top"
|
|
170
|
-
}), {
|
|
171
|
-
title: p(() => [
|
|
172
|
-
_("div", {
|
|
173
|
-
class: "yee-ui-grid-tooltip-content",
|
|
174
|
-
onMouseenter: m[0] || (m[0] = (V) => r.enterable && M(!0)),
|
|
175
|
-
onMouseleave: Q
|
|
176
|
-
}, [
|
|
177
|
-
z(n.$slots, "content", {}, () => [
|
|
178
|
-
G(W(k.value), 1)
|
|
179
|
-
])
|
|
180
|
-
], 32)
|
|
181
|
-
]),
|
|
182
|
-
default: p(() => [
|
|
183
|
-
_("span", {
|
|
184
|
-
"aria-hidden": "true",
|
|
185
|
-
class: "yee-ui-grid-tooltip-anchor",
|
|
186
|
-
style: ye(d.value)
|
|
187
|
-
}, null, 4)
|
|
188
|
-
]),
|
|
189
|
-
_: 3
|
|
190
|
-
}, 16, ["arrow", "open", "overlay-inner-style"]));
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
let ve = !1;
|
|
194
|
-
const ie = /* @__PURE__ */ new Set();
|
|
195
|
-
function Mt() {
|
|
196
|
-
const l = T.modal.confirm.bind(T.modal);
|
|
197
|
-
T.modal.confirm = ((a, f, r) => {
|
|
198
|
-
const C = typeof a == "object" && a !== null ? a : typeof r == "object" && r !== null ? r : void 0;
|
|
199
|
-
if ((typeof C?.className == "string" ? C.className.split(/\s+/) : []).includes("vxe-table--ignore-clear")) {
|
|
200
|
-
const h = [...ie], E = h[h.length - 1];
|
|
201
|
-
if (E) {
|
|
202
|
-
const S = typeof C?.content == "string" ? C.content : String(C?.content ?? a);
|
|
203
|
-
return E(S);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return l(a, f, r);
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
function Bt(l) {
|
|
210
|
-
return ie.add(l), () => ie.delete(l);
|
|
211
|
-
}
|
|
212
|
-
function Ft() {
|
|
213
|
-
if (ve) return;
|
|
214
|
-
T.hasLanguage("zh-CN") || (T.setI18n("zh-CN", Nt), T.setLanguage("zh-CN")), [
|
|
215
|
-
Vt,
|
|
216
|
-
kt,
|
|
217
|
-
St,
|
|
218
|
-
xe,
|
|
219
|
-
Pt,
|
|
220
|
-
vt,
|
|
221
|
-
gt,
|
|
222
|
-
ht,
|
|
223
|
-
yt,
|
|
224
|
-
bt,
|
|
225
|
-
Ct,
|
|
226
|
-
xt,
|
|
227
|
-
wt,
|
|
228
|
-
_t,
|
|
229
|
-
Tt,
|
|
230
|
-
At
|
|
231
|
-
].forEach((a) => T.component(a)), Mt(), ve = !0;
|
|
232
|
-
}
|
|
233
|
-
const It = {
|
|
234
|
-
key: 0,
|
|
235
|
-
class: "yee-ui-grid__label"
|
|
236
|
-
}, $t = { class: "yee-ui-grid__control" }, Ht = { class: "yee-ui-grid__form-actions" }, Ot = {
|
|
237
|
-
key: 1,
|
|
238
|
-
class: "yee-ui-grid__separator"
|
|
239
|
-
}, Dt = { class: "yee-ui-grid__table-container" }, Lt = {
|
|
240
|
-
key: 0,
|
|
241
|
-
class: "yee-ui-grid__title"
|
|
242
|
-
}, qt = /* @__PURE__ */ ge({
|
|
243
|
-
name: "YeeGrid",
|
|
244
|
-
__name: "YeeGrid",
|
|
245
|
-
props: {
|
|
246
|
-
api: {},
|
|
247
|
-
tableTitle: {},
|
|
248
|
-
tableTitleHelp: {}
|
|
249
|
-
},
|
|
250
|
-
setup(l) {
|
|
251
|
-
const a = l, f = Me(), r = ne("gridRef"), C = de(mt), L = de(ft, void 0), [h, E] = st.useModal();
|
|
252
|
-
Ft();
|
|
253
|
-
const S = Bt((e) => new Promise((t) => {
|
|
254
|
-
h.confirm({
|
|
255
|
-
title: "恢复默认列配置",
|
|
256
|
-
content: e,
|
|
257
|
-
centered: !0,
|
|
258
|
-
okText: "确认",
|
|
259
|
-
cancelText: "取消",
|
|
260
|
-
keyboard: !0,
|
|
261
|
-
wrapClassName: "vxe-table--ignore-clear",
|
|
262
|
-
onOk: () => t("confirm"),
|
|
263
|
-
onCancel: () => t("cancel")
|
|
264
|
-
});
|
|
265
|
-
})), k = g(() => a.api.state.value), i = g(() => k.value.formOptions), u = R(i.value?.collapsed ?? !0), y = R(3), x = ne("formElement"), d = R(/* @__PURE__ */ new Set());
|
|
266
|
-
let O;
|
|
267
|
-
const j = /* @__PURE__ */ new Set([
|
|
268
|
-
"AutoComplete",
|
|
269
|
-
"Cascader",
|
|
270
|
-
"DatePicker",
|
|
271
|
-
"Input",
|
|
272
|
-
"InputNumber",
|
|
273
|
-
"InputPassword",
|
|
274
|
-
"Mentions",
|
|
275
|
-
"RangePicker",
|
|
276
|
-
"Select",
|
|
277
|
-
"Textarea",
|
|
278
|
-
"TimePicker",
|
|
279
|
-
"TimeRangePicker",
|
|
280
|
-
"TreeSelect"
|
|
281
|
-
]), U = g(() => !!(a.tableTitle || f["table-title"] || f["toolbar-actions"] || f["toolbar-tools"])), Y = g(() => Object.keys(f).filter((e) => ![
|
|
282
|
-
"empty",
|
|
283
|
-
"loading",
|
|
284
|
-
"table-title",
|
|
285
|
-
"toolbar-actions",
|
|
286
|
-
"toolbar-tools"
|
|
287
|
-
].includes(e) && !e.startsWith("form-"))), A = g(() => L?.value ?? !1), w = g(() => a.api.formApi.schema.value.filter((e) => !e.hide)), q = g(() => {
|
|
288
|
-
if (!i.value?.showCollapseButton || !u.value) return w.value;
|
|
289
|
-
const e = Math.max(1, i.value.collapsedRows ?? 1), t = y.value, o = [];
|
|
290
|
-
let s = 1, c = 0;
|
|
291
|
-
for (const F of w.value) {
|
|
292
|
-
const ce = K(F, t);
|
|
293
|
-
if (c > 0 && c + ce > t && (s += 1, c = 0), s > e) break;
|
|
294
|
-
o.push(F), c += ce, c === t && (s += 1, c = 0);
|
|
295
|
-
}
|
|
296
|
-
return o;
|
|
297
|
-
});
|
|
298
|
-
function N() {
|
|
299
|
-
const e = x.value?.$el;
|
|
300
|
-
if (!e) return;
|
|
301
|
-
const t = getComputedStyle(e).gridTemplateColumns.split(" ").map((o) => o.trim()).filter(Boolean);
|
|
302
|
-
t.length > 0 && (y.value = t.length);
|
|
303
|
-
}
|
|
304
|
-
function M(e) {
|
|
305
|
-
return a.api.formApi.getFieldValue(e.fieldName);
|
|
306
|
-
}
|
|
307
|
-
function K(e, t = y.value) {
|
|
308
|
-
const o = e.span ?? 1;
|
|
309
|
-
return Math.min(o, t);
|
|
310
|
-
}
|
|
311
|
-
function B(e) {
|
|
312
|
-
const t = e.span ?? 1;
|
|
313
|
-
return {
|
|
314
|
-
"yee-ui-grid__field--error": d.value.has(e.fieldName),
|
|
315
|
-
"yee-ui-grid__field--no-label": !e.label,
|
|
316
|
-
"yee-ui-grid__field--required": !!(e.required && e.label),
|
|
317
|
-
"yee-ui-grid__field--span-2": t === 2,
|
|
318
|
-
"yee-ui-grid__field--span-3": t === 3,
|
|
319
|
-
"yee-ui-grid__field--vertical": i.value?.layout === "vertical"
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
function Q(e) {
|
|
323
|
-
if (i.value?.layout === "vertical" || !e.label) return;
|
|
324
|
-
const t = i.value?.labelWidth ?? "auto";
|
|
325
|
-
return {
|
|
326
|
-
"--yee-grid-label-width": t === "auto" ? "max-content" : `${t}px`
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
function n(e) {
|
|
330
|
-
return e !== "Custom";
|
|
331
|
-
}
|
|
332
|
-
function m(e) {
|
|
333
|
-
return n(e.component) ? Rt[e.component] : void 0;
|
|
334
|
-
}
|
|
335
|
-
function V(e) {
|
|
336
|
-
return n(e.component) ? Et[e.component] ?? "value" : "value";
|
|
337
|
-
}
|
|
338
|
-
function J(e) {
|
|
339
|
-
const t = M(e), o = V(e), s = d.value.has(e.fieldName);
|
|
340
|
-
return {
|
|
341
|
-
...e.componentProps,
|
|
342
|
-
...t === void 0 ? {} : { [o]: t },
|
|
343
|
-
...s ? { "aria-invalid": !0 } : {},
|
|
344
|
-
...s && n(e.component) && j.has(e.component) ? { status: "error" } : {},
|
|
345
|
-
[`onUpdate:${o}`]: (c) => le(e, c)
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
function le(e, t) {
|
|
349
|
-
a.api.formApi.setFieldValue(e.fieldName, t), d.value.has(e.fieldName) && a.api.formApi.validateField(e.fieldName) && (d.value = new Set([...d.value].filter((o) => o !== e.fieldName))), i.value?.submitOnChange && X();
|
|
350
|
-
}
|
|
351
|
-
function we() {
|
|
352
|
-
const e = /* @__PURE__ */ new Set();
|
|
353
|
-
for (const t of w.value)
|
|
354
|
-
t.required && !a.api.formApi.validateField(t.fieldName) && e.add(t.fieldName);
|
|
355
|
-
return d.value = e, e.size === 0;
|
|
356
|
-
}
|
|
357
|
-
async function _e() {
|
|
358
|
-
a.api.formApi.resetForm(), d.value = /* @__PURE__ */ new Set(), await Re();
|
|
359
|
-
}
|
|
360
|
-
async function X() {
|
|
361
|
-
if (!we()) {
|
|
362
|
-
Se();
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
await ze();
|
|
366
|
-
}
|
|
367
|
-
function Te(e) {
|
|
368
|
-
e.key === "Enter" && i.value?.submitOnEnter && (e.preventDefault(), X());
|
|
369
|
-
}
|
|
370
|
-
function se(e) {
|
|
371
|
-
u.value !== e && (u.value = e, i.value?.handleCollapsedChange?.(e));
|
|
372
|
-
}
|
|
373
|
-
function Se() {
|
|
374
|
-
if (!u.value) return;
|
|
375
|
-
const e = new Set(q.value.map((o) => o.fieldName));
|
|
376
|
-
w.value.some((o) => !e.has(o.fieldName) && d.value.has(o.fieldName)) && se(!1);
|
|
377
|
-
}
|
|
378
|
-
function ke() {
|
|
379
|
-
se(!u.value);
|
|
380
|
-
}
|
|
381
|
-
function ue(e) {
|
|
382
|
-
return `form-${e.fieldName}`;
|
|
383
|
-
}
|
|
384
|
-
function Ne(e) {
|
|
385
|
-
return !!f[ue(e)];
|
|
386
|
-
}
|
|
387
|
-
me(i, (e) => {
|
|
388
|
-
if (!e) {
|
|
389
|
-
d.value = /* @__PURE__ */ new Set();
|
|
390
|
-
return;
|
|
391
|
-
}
|
|
392
|
-
a.api.formApi.configure(e), u.value = e.collapsed ?? !0, d.value = /* @__PURE__ */ new Set(), D(N);
|
|
393
|
-
}, { immediate: !0 }), re(async () => {
|
|
394
|
-
await D(), N();
|
|
395
|
-
const e = x.value?.$el;
|
|
396
|
-
typeof ResizeObserver < "u" && e && (O = new ResizeObserver(N), O.observe(e));
|
|
397
|
-
}), he(() => {
|
|
398
|
-
O?.disconnect();
|
|
399
|
-
});
|
|
400
|
-
const Ve = g(() => {
|
|
401
|
-
const e = k.value.gridOptions, t = e.proxyConfig, o = t?.ajax?.query, s = e.toolbarConfig, c = e.pagerConfig;
|
|
402
|
-
return {
|
|
403
|
-
align: "left",
|
|
404
|
-
border: "inner",
|
|
405
|
-
minHeight: 180,
|
|
406
|
-
showHeaderOverflow: "tooltip",
|
|
407
|
-
showOverflow: "tooltip",
|
|
408
|
-
size: "medium",
|
|
409
|
-
...A.value ? { height: "auto" } : {},
|
|
410
|
-
...e,
|
|
411
|
-
columnConfig: {
|
|
412
|
-
resizable: !0,
|
|
413
|
-
...e.columnConfig
|
|
414
|
-
},
|
|
415
|
-
tooltipConfig: {
|
|
416
|
-
enterable: !0,
|
|
417
|
-
leaveDelay: 300,
|
|
418
|
-
...e.tooltipConfig
|
|
419
|
-
},
|
|
420
|
-
...c ? {
|
|
421
|
-
pagerConfig: {
|
|
422
|
-
pageSize: 20,
|
|
423
|
-
pageSizes: [10, 20, 30, 50, 100, 200],
|
|
424
|
-
layouts: ["Total", "Sizes", "Home", "PrevPage", "Number", "NextPage", "End"],
|
|
425
|
-
...c,
|
|
426
|
-
slots: {
|
|
427
|
-
sizes: "pagerSizes",
|
|
428
|
-
...c.slots
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
} : {},
|
|
432
|
-
...t ? {
|
|
433
|
-
proxyConfig: {
|
|
434
|
-
autoLoad: !0,
|
|
435
|
-
showResponseMsg: !1,
|
|
436
|
-
...t,
|
|
437
|
-
response: {
|
|
438
|
-
list: "items",
|
|
439
|
-
result: "items",
|
|
440
|
-
total: "total",
|
|
441
|
-
...t.response
|
|
442
|
-
},
|
|
443
|
-
...t.ajax ? {
|
|
444
|
-
ajax: {
|
|
445
|
-
...t.ajax,
|
|
446
|
-
...o ? {
|
|
447
|
-
query: (F) => o(F, a.api.formApi.getValues())
|
|
448
|
-
} : {}
|
|
449
|
-
}
|
|
450
|
-
} : {}
|
|
451
|
-
}
|
|
452
|
-
} : {},
|
|
453
|
-
...s || U.value ? {
|
|
454
|
-
toolbarConfig: {
|
|
455
|
-
custom: !0,
|
|
456
|
-
refresh: !0,
|
|
457
|
-
zoom: !0,
|
|
458
|
-
...s,
|
|
459
|
-
slots: {
|
|
460
|
-
...a.tableTitle || f["table-title"] || f["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
|
|
461
|
-
...f["toolbar-tools"] ? { tools: "toolbarTools" } : {}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
} : {}
|
|
465
|
-
};
|
|
466
|
-
}), Pe = g(() => k.value.gridEvents ?? {});
|
|
467
|
-
me(
|
|
468
|
-
() => C?.value.mode ?? "light",
|
|
469
|
-
(e) => T.setTheme(e),
|
|
470
|
-
{ immediate: !0 }
|
|
471
|
-
);
|
|
472
|
-
async function ze() {
|
|
473
|
-
await a.api.reload();
|
|
474
|
-
}
|
|
475
|
-
async function Re() {
|
|
476
|
-
await a.api.reload();
|
|
477
|
-
}
|
|
478
|
-
function Ee(e, t) {
|
|
479
|
-
typeof t != "number" && typeof t != "string" || e.setPageSizeByEvent(new Event("change"), t);
|
|
480
|
-
}
|
|
481
|
-
return re(() => {
|
|
482
|
-
r.value && a.api.mount(r.value);
|
|
483
|
-
}), Be(() => {
|
|
484
|
-
S(), a.api.unmount();
|
|
485
|
-
}), (e, t) => (v(), I("section", {
|
|
486
|
-
class: Z(["yee-ui-grid", { "yee-ui-grid--fill-page-content": A.value }])
|
|
487
|
-
}, [
|
|
488
|
-
i.value ? Fe((v(), H(b(ut), {
|
|
489
|
-
key: 0,
|
|
490
|
-
ref: "formElement",
|
|
491
|
-
class: "yee-ui-grid__search-form",
|
|
492
|
-
layout: i.value.layout ?? "horizontal",
|
|
493
|
-
model: l.api.formApi.getModel(),
|
|
494
|
-
onKeydown: Te,
|
|
495
|
-
onSubmit: Ie(X, ["prevent"])
|
|
496
|
-
}, {
|
|
497
|
-
default: p(() => [
|
|
498
|
-
(v(!0), I(pe, null, fe(q.value, (o) => (v(), H(b(ct), {
|
|
499
|
-
key: o.fieldName,
|
|
500
|
-
"no-style": "",
|
|
501
|
-
name: o.fieldName,
|
|
502
|
-
required: !!o.required,
|
|
503
|
-
"validate-status": d.value.has(o.fieldName) ? "error" : ""
|
|
504
|
-
}, {
|
|
505
|
-
default: p(() => [
|
|
506
|
-
_("label", {
|
|
507
|
-
class: Z(["yee-ui-grid__field", B(o)]),
|
|
508
|
-
style: ye(Q(o))
|
|
509
|
-
}, [
|
|
510
|
-
o.label ? (v(), I("span", It, W(o.label), 1)) : P("", !0),
|
|
511
|
-
_("div", $t, [
|
|
512
|
-
Ne(o) ? z(e.$slots, ue(o), {
|
|
513
|
-
key: 0,
|
|
514
|
-
field: o,
|
|
515
|
-
setValue: (s) => le(o, s),
|
|
516
|
-
value: M(o),
|
|
517
|
-
values: l.api.formApi.getValues()
|
|
518
|
-
}, void 0, !0) : (v(), I(pe, { key: 1 }, [
|
|
519
|
-
o.component !== "Custom" ? (v(), H($e(m(o)), ae({
|
|
520
|
-
key: 0,
|
|
521
|
-
ref_for: !0
|
|
522
|
-
}, J(o)), null, 16)) : P("", !0)
|
|
523
|
-
], 64))
|
|
524
|
-
])
|
|
525
|
-
], 6)
|
|
526
|
-
]),
|
|
527
|
-
_: 2
|
|
528
|
-
}, 1032, ["name", "required", "validate-status"]))), 128)),
|
|
529
|
-
_("div", Ht, [
|
|
530
|
-
$(b(oe), {
|
|
531
|
-
"html-type": "button",
|
|
532
|
-
onClick: _e
|
|
533
|
-
}, {
|
|
534
|
-
default: p(() => [...t[0] || (t[0] = [
|
|
535
|
-
G(" 重置 ", -1)
|
|
536
|
-
])]),
|
|
537
|
-
_: 1
|
|
538
|
-
}),
|
|
539
|
-
$(b(oe), {
|
|
540
|
-
type: "primary",
|
|
541
|
-
"html-type": "submit"
|
|
542
|
-
}, {
|
|
543
|
-
default: p(() => [...t[1] || (t[1] = [
|
|
544
|
-
G(" 查询 ", -1)
|
|
545
|
-
])]),
|
|
546
|
-
_: 1
|
|
547
|
-
}),
|
|
548
|
-
i.value.showCollapseButton ? (v(), H(b(oe), {
|
|
549
|
-
key: 0,
|
|
550
|
-
class: "yee-ui-grid__collapse-button",
|
|
551
|
-
type: "link",
|
|
552
|
-
"html-type": "button",
|
|
553
|
-
onClick: ke
|
|
554
|
-
}, {
|
|
555
|
-
default: p(() => [
|
|
556
|
-
_("span", null, W(u.value ? "展开" : "收起"), 1),
|
|
557
|
-
$(b(dt), {
|
|
558
|
-
"aria-hidden": "true",
|
|
559
|
-
class: Z(["yee-ui-grid__collapse-icon", { "yee-ui-grid__collapse-icon--expanded": !u.value }])
|
|
560
|
-
}, null, 8, ["class"])
|
|
561
|
-
]),
|
|
562
|
-
_: 1
|
|
563
|
-
})) : P("", !0)
|
|
564
|
-
])
|
|
565
|
-
]),
|
|
566
|
-
_: 3
|
|
567
|
-
}, 8, ["layout", "model"])), [
|
|
568
|
-
[He, l.api.searchFormVisible.value]
|
|
569
|
-
]) : P("", !0),
|
|
570
|
-
i.value && k.value.separator !== !1 ? (v(), I("div", Ot)) : P("", !0),
|
|
571
|
-
_("div", Dt, [
|
|
572
|
-
$(b(xe), ae({
|
|
573
|
-
ref_key: "gridRef",
|
|
574
|
-
ref: r,
|
|
575
|
-
class: "yee-ui-grid__table"
|
|
576
|
-
}, Ve.value, Oe(Pe.value)), De({
|
|
577
|
-
toolbarActions: p((o) => [
|
|
578
|
-
z(e.$slots, "table-title", {}, () => [
|
|
579
|
-
l.tableTitle ? (v(), I("div", Lt, [
|
|
580
|
-
G(W(l.tableTitle) + " ", 1),
|
|
581
|
-
l.tableTitleHelp ? (v(), H(b(Ce), {
|
|
582
|
-
key: 0,
|
|
583
|
-
title: l.tableTitleHelp
|
|
584
|
-
}, {
|
|
585
|
-
default: p(() => [...t[2] || (t[2] = [
|
|
586
|
-
_("span", {
|
|
587
|
-
class: "yee-ui-grid__help",
|
|
588
|
-
tabindex: "0"
|
|
589
|
-
}, "?", -1)
|
|
590
|
-
])]),
|
|
591
|
-
_: 1
|
|
592
|
-
}, 8, ["title"])) : P("", !0)
|
|
593
|
-
])) : P("", !0)
|
|
594
|
-
], !0),
|
|
595
|
-
z(e.$slots, "toolbar-actions", ee(te(o)), void 0, !0)
|
|
596
|
-
]),
|
|
597
|
-
toolbarTools: p((o) => [
|
|
598
|
-
z(e.$slots, "toolbar-tools", ee(te(o)), void 0, !0)
|
|
599
|
-
]),
|
|
600
|
-
pagerSizes: p(({ $pager: o, options: s, pageSize: c }) => [
|
|
601
|
-
$(b(be), {
|
|
602
|
-
class: "yee-ui-grid__page-size",
|
|
603
|
-
options: s,
|
|
604
|
-
value: c,
|
|
605
|
-
onChange: (F) => Ee(o, F)
|
|
606
|
-
}, null, 8, ["options", "value", "onChange"])
|
|
607
|
-
]),
|
|
608
|
-
empty: p(() => [
|
|
609
|
-
z(e.$slots, "empty", {}, () => [
|
|
610
|
-
t[3] || (t[3] = _("div", { class: "yee-ui-grid__empty" }, "暂无数据", -1))
|
|
611
|
-
], !0)
|
|
612
|
-
]),
|
|
613
|
-
_: 2
|
|
614
|
-
}, [
|
|
615
|
-
fe(Y.value, (o) => ({
|
|
616
|
-
name: o,
|
|
617
|
-
fn: p((s) => [
|
|
618
|
-
z(e.$slots, o, ee(te(s)), void 0, !0)
|
|
619
|
-
])
|
|
620
|
-
}))
|
|
621
|
-
]), 1040)
|
|
622
|
-
]),
|
|
623
|
-
$(b(E))
|
|
624
|
-
], 2));
|
|
625
|
-
}
|
|
626
|
-
}), vo = /* @__PURE__ */ zt(qt, [["__scopeId", "data-v-73071c91"]]);
|
|
627
|
-
export {
|
|
628
|
-
vo as default
|
|
629
|
-
};
|