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