dydx-naive-ui-for-vue 0.1.20 → 0.1.21
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Gn } from "./resolver-BDxomgBZ.js";
|
|
2
|
-
import { NAutoComplete as ft, NButton as B, NCascader as ct, NCheckbox as Ge, NCheckboxGroup as ke, NColorPicker as pt, NDataTable as mt, NDatePicker as yt, NDrawer as gt, NDrawerContent as ht, NDropdown as vt, NDynamicInput as
|
|
3
|
-
import { Fragment as W, computed as $, createBlock as N, createCommentVNode as j, createElementBlock as K, createElementVNode as fe, createSlots as se, createTextVNode as I, createVNode as
|
|
2
|
+
import { NAutoComplete as ft, NButton as B, NCascader as ct, NCheckbox as Ge, NCheckboxGroup as ke, NColorPicker as pt, NDataTable as mt, NDatePicker as yt, NDrawer as gt, NDrawerContent as ht, NDropdown as vt, NDynamicInput as bt, NDynamicTags as _t, NForm as wt, NFormItem as Ct, NGrid as xt, NGridItem as kt, NIcon as J, NImage as St, NInput as Tt, NInputNumber as Nt, NMention as Pt, NModal as Dt, NPopconfirm as Ft, NPopover as zt, NRadio as Rt, NRadioGroup as je, NRate as $t, NSelect as Ke, NSlider as It, NSpace as H, NSpin as Se, NSwitch as Ot, NTag as be, NText as Bt, NTimePicker as Ut, NTooltip as Ce, NTreeSelect as At, NUpload as Le, NUploadDragger as Mt, useMessage as Et } from "naive-ui";
|
|
3
|
+
import { Fragment as W, computed as $, createBlock as N, createCommentVNode as j, createElementBlock as K, createElementVNode as fe, createSlots as se, createTextVNode as I, createVNode as _, defineComponent as ae, guardReactiveProps as Vt, h as F, isRef as Gt, mergeProps as G, nextTick as jt, normalizeProps as Kt, onMounted as Lt, onUnmounted as Ht, openBlock as g, ref as Q, renderList as X, renderSlot as U, resolveDynamicComponent as ee, toDisplayString as A, toHandlers as Wt, unref as p, useAttrs as Te, watch as qt, withCtx as i } from "vue";
|
|
4
4
|
import * as ce from "@vicons/ionicons5";
|
|
5
5
|
import { AddOutline as He, CloudUploadOutline as Ie, DownloadOutline as Jt, OpenOutline as Qt, RefreshOutline as Yt, SettingsOutline as Xt } from "@vicons/ionicons5";
|
|
6
6
|
var Zt = { style: { "margin-bottom": "12px" } }, ea = /* @__PURE__ */ ae({
|
|
@@ -43,18 +43,18 @@ var Zt = { style: { "margin-bottom": "12px" } }, ea = /* @__PURE__ */ ae({
|
|
|
43
43
|
"beforeUpload"
|
|
44
44
|
],
|
|
45
45
|
setup(e, { expose: t, emit: r }) {
|
|
46
|
-
const a = e, l = r, f = Et(),
|
|
46
|
+
const a = e, l = r, f = Et(), o = Q(), C = $(() => a.listType ? a.listType : a.uploadType === "image" ? "image-card" : "text"), w = $(() => a.urlPrefix ? a.fileList.map((S) => ({
|
|
47
47
|
...S,
|
|
48
48
|
url: S.url && !S.url.startsWith("http") ? a.urlPrefix + S.url : S.url
|
|
49
49
|
})) : a.fileList), v = $(() => {
|
|
50
50
|
const S = [];
|
|
51
51
|
return a.acceptTypes?.length && S.push(`支持格式:${a.acceptTypes.join(", ")}`), a.maxSize && S.push(`单个文件不超过 ${a.maxSize}MB`), a.maxCount && S.push(`最多 ${a.maxCount} 个文件`), S.join(";");
|
|
52
|
-
}),
|
|
52
|
+
}), b = $(() => {
|
|
53
53
|
if (a.accept) return a.accept;
|
|
54
54
|
if (a.acceptTypes?.length) return a.acceptTypes.join(",");
|
|
55
55
|
if (a.uploadType === "image") return "image/*";
|
|
56
56
|
}), x = $(() => {
|
|
57
|
-
const { uploadType: S, fileList: P, customUpload: z, acceptTypes:
|
|
57
|
+
const { uploadType: S, fileList: P, customUpload: z, acceptTypes: d, maxSize: u, maxCount: m, multiple: T, autoUpload: E, disabled: L, urlPrefix: O, showTip: oe, showDragger: Y, ...de } = a;
|
|
58
58
|
return de;
|
|
59
59
|
}), k = (S) => {
|
|
60
60
|
l("update:fileList", a.urlPrefix ? S.map((P) => ({
|
|
@@ -67,41 +67,41 @@ var Zt = { style: { "margin-bottom": "12px" } }, ea = /* @__PURE__ */ ae({
|
|
|
67
67
|
return P ? a.maxSize && P.size > a.maxSize * 1024 * 1024 ? (f.error(`文件大小不能超过 ${a.maxSize}MB`), !1) : a.acceptTypes?.length && !a.acceptTypes.some((z) => {
|
|
68
68
|
if (z.startsWith(".")) return P.name.toLowerCase().endsWith(z.toLowerCase());
|
|
69
69
|
if (z.includes("*")) {
|
|
70
|
-
const [
|
|
71
|
-
return P.type.startsWith(
|
|
70
|
+
const [d] = z.split("/");
|
|
71
|
+
return P.type.startsWith(d);
|
|
72
72
|
}
|
|
73
73
|
return P.type === z;
|
|
74
74
|
}) ? (f.error(`只支持 ${a.acceptTypes.join(", ")} 格式`), !1) : a.maxCount && a.fileList.length >= a.maxCount ? (l("exceed", [P]), f.error(`最多上传 ${a.maxCount} 个文件`), !1) : !0 : !0;
|
|
75
75
|
}, M = async (S) => {
|
|
76
|
-
const { file: P, onProgress: z, onFinish:
|
|
76
|
+
const { file: P, onProgress: z, onFinish: d, onError: u } = S;
|
|
77
77
|
if (!a.customUpload) {
|
|
78
|
-
console.warn("DydxUpload: customUpload 方法未提供"),
|
|
78
|
+
console.warn("DydxUpload: customUpload 方法未提供"), u();
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
try {
|
|
82
82
|
P.url = await a.customUpload(P.file, (m) => {
|
|
83
83
|
z({ percent: m });
|
|
84
|
-
}), P.status = "finished",
|
|
84
|
+
}), P.status = "finished", d(), l("success", P);
|
|
85
85
|
} catch (m) {
|
|
86
|
-
|
|
86
|
+
u(), l("error", P, m);
|
|
87
87
|
}
|
|
88
88
|
}, q = () => {
|
|
89
|
-
|
|
89
|
+
o.value?.submit();
|
|
90
90
|
};
|
|
91
91
|
return t({
|
|
92
|
-
submit: () =>
|
|
93
|
-
openDialog: () =>
|
|
94
|
-
clear: () =>
|
|
92
|
+
submit: () => o.value?.submit(),
|
|
93
|
+
openDialog: () => o.value?.openOpenFileDialog(),
|
|
94
|
+
clear: () => o.value?.clear()
|
|
95
95
|
}), (S, P) => {
|
|
96
|
-
const z = J,
|
|
96
|
+
const z = J, d = Bt, u = Mt, m = B, T = Le;
|
|
97
97
|
return g(), K("div", null, [
|
|
98
|
-
|
|
98
|
+
_(T, G({
|
|
99
99
|
ref_key: "uploadRef",
|
|
100
|
-
ref:
|
|
100
|
+
ref: o
|
|
101
101
|
}, x.value, {
|
|
102
102
|
"file-list": w.value,
|
|
103
103
|
"custom-request": M,
|
|
104
|
-
accept:
|
|
104
|
+
accept: b.value,
|
|
105
105
|
max: e.maxCount,
|
|
106
106
|
multiple: e.multiple,
|
|
107
107
|
disabled: e.disabled,
|
|
@@ -110,20 +110,20 @@ var Zt = { style: { "margin-bottom": "12px" } }, ea = /* @__PURE__ */ ae({
|
|
|
110
110
|
"onUpdate:fileList": k,
|
|
111
111
|
onBeforeUpload: D
|
|
112
112
|
}), {
|
|
113
|
-
default:
|
|
114
|
-
default:
|
|
115
|
-
fe("div", Zt, [
|
|
113
|
+
default: i(() => [e.showDragger && e.uploadType !== "image" ? (g(), N(u, { key: 0 }, {
|
|
114
|
+
default: i(() => [
|
|
115
|
+
fe("div", Zt, [_(z, {
|
|
116
116
|
size: "48",
|
|
117
117
|
depth: 3
|
|
118
118
|
}, {
|
|
119
|
-
default:
|
|
119
|
+
default: i(() => [_(p(Ie))]),
|
|
120
120
|
_: 1
|
|
121
121
|
})]),
|
|
122
|
-
|
|
123
|
-
default:
|
|
122
|
+
_(d, { style: { "font-size": "16px" } }, {
|
|
123
|
+
default: i(() => [...P[0] || (P[0] = [I(" 点击或拖拽文件到此区域上传 ", -1)])]),
|
|
124
124
|
_: 1
|
|
125
125
|
}),
|
|
126
|
-
e.showTip ? (g(), N(
|
|
126
|
+
e.showTip ? (g(), N(d, {
|
|
127
127
|
key: 0,
|
|
128
128
|
depth: "3",
|
|
129
129
|
style: {
|
|
@@ -132,7 +132,7 @@ var Zt = { style: { "margin-bottom": "12px" } }, ea = /* @__PURE__ */ ae({
|
|
|
132
132
|
display: "block"
|
|
133
133
|
}
|
|
134
134
|
}, {
|
|
135
|
-
default:
|
|
135
|
+
default: i(() => [I(A(v.value), 1)]),
|
|
136
136
|
_: 1
|
|
137
137
|
})) : j("", !0)
|
|
138
138
|
]),
|
|
@@ -141,14 +141,14 @@ var Zt = { style: { "margin-bottom": "12px" } }, ea = /* @__PURE__ */ ae({
|
|
|
141
141
|
key: 0,
|
|
142
142
|
size: 28
|
|
143
143
|
}, {
|
|
144
|
-
default:
|
|
144
|
+
default: i(() => [_(p(He))]),
|
|
145
145
|
_: 1
|
|
146
146
|
})) : (g(), N(m, { key: 1 }, {
|
|
147
|
-
icon:
|
|
148
|
-
default:
|
|
147
|
+
icon: i(() => [_(z, null, {
|
|
148
|
+
default: i(() => [_(p(Ie))]),
|
|
149
149
|
_: 1
|
|
150
150
|
})]),
|
|
151
|
-
default:
|
|
151
|
+
default: i(() => [I(" " + A(e.uploadType === "image" ? "上传图片" : "上传文件"), 1)]),
|
|
152
152
|
_: 1
|
|
153
153
|
}))])]),
|
|
154
154
|
_: 3
|
|
@@ -167,10 +167,10 @@ var Zt = { style: { "margin-bottom": "12px" } }, ea = /* @__PURE__ */ ae({
|
|
|
167
167
|
onClick: q,
|
|
168
168
|
style: { "margin-top": "8px" }
|
|
169
169
|
}, {
|
|
170
|
-
default:
|
|
170
|
+
default: i(() => [...P[1] || (P[1] = [I(" 开始上传 ", -1)])]),
|
|
171
171
|
_: 1
|
|
172
172
|
})) : j("", !0),
|
|
173
|
-
e.showTip && !(e.showDragger && e.uploadType !== "image") ? (g(), N(
|
|
173
|
+
e.showTip && !(e.showDragger && e.uploadType !== "image") ? (g(), N(d, {
|
|
174
174
|
key: 1,
|
|
175
175
|
depth: "3",
|
|
176
176
|
style: {
|
|
@@ -179,7 +179,7 @@ var Zt = { style: { "margin-bottom": "12px" } }, ea = /* @__PURE__ */ ae({
|
|
|
179
179
|
display: "block"
|
|
180
180
|
}
|
|
181
181
|
}, {
|
|
182
|
-
default:
|
|
182
|
+
default: i(() => [I(A(v.value), 1)]),
|
|
183
183
|
_: 1
|
|
184
184
|
})) : j("", !0)
|
|
185
185
|
]);
|
|
@@ -206,27 +206,27 @@ var Zt = { style: { "margin-bottom": "12px" } }, ea = /* @__PURE__ */ ae({
|
|
|
206
206
|
setup(e, { emit: t }) {
|
|
207
207
|
const r = e, a = t, l = Object.keys(ce), f = $(() => {
|
|
208
208
|
let v = l;
|
|
209
|
-
return r.iconStyle === "outline" ? v = l.filter((
|
|
210
|
-
label:
|
|
211
|
-
value:
|
|
209
|
+
return r.iconStyle === "outline" ? v = l.filter((b) => b.endsWith("Outline")) : r.iconStyle === "sharp" ? v = l.filter((b) => b.endsWith("Sharp")) : r.iconStyle === "filled" && (v = l.filter((b) => !b.endsWith("Outline") && !b.endsWith("Sharp"))), v.map((b) => ({
|
|
210
|
+
label: b,
|
|
211
|
+
value: b
|
|
212
212
|
}));
|
|
213
|
-
}),
|
|
214
|
-
const
|
|
215
|
-
return F("div", { style: "display: flex; align-items: center; gap: 8px;" }, [F(J, { size: 18 }, () => F(
|
|
213
|
+
}), o = (v) => {
|
|
214
|
+
const b = ce[v.value];
|
|
215
|
+
return F("div", { style: "display: flex; align-items: center; gap: 8px;" }, [F(J, { size: 18 }, () => F(b)), F("span", { style: "flex: 1; overflow: hidden; text-overflow: ellipsis;" }, v.label)]);
|
|
216
216
|
}, C = ({ option: v }) => {
|
|
217
|
-
const
|
|
218
|
-
return F("div", { style: "display: flex; align-items: center; gap: 4px;" }, [F(J, { size: 16 }, () => F(
|
|
217
|
+
const b = ce[v.value];
|
|
218
|
+
return F("div", { style: "display: flex; align-items: center; gap: 4px;" }, [F(J, { size: 16 }, () => F(b)), v.label]);
|
|
219
219
|
}, w = (v) => {
|
|
220
220
|
a("update:value", v);
|
|
221
221
|
};
|
|
222
|
-
return (v,
|
|
222
|
+
return (v, b) => (g(), N(p(Ke), {
|
|
223
223
|
value: e.value,
|
|
224
224
|
options: f.value,
|
|
225
225
|
placeholder: e.placeholder,
|
|
226
226
|
disabled: e.disabled,
|
|
227
227
|
clearable: e.clearable,
|
|
228
228
|
filterable: e.filterable,
|
|
229
|
-
"render-label":
|
|
229
|
+
"render-label": o,
|
|
230
230
|
"render-tag": C,
|
|
231
231
|
"virtual-scroll": "",
|
|
232
232
|
"onUpdate:value": w
|
|
@@ -256,8 +256,8 @@ const aa = {
|
|
|
256
256
|
rate: $t,
|
|
257
257
|
"color-picker": pt,
|
|
258
258
|
"auto-complete": ft,
|
|
259
|
-
"dynamic-input":
|
|
260
|
-
"dynamic-tags":
|
|
259
|
+
"dynamic-input": bt,
|
|
260
|
+
"dynamic-tags": _t,
|
|
261
261
|
mention: Pt,
|
|
262
262
|
"image-upload": pe,
|
|
263
263
|
"file-upload": pe,
|
|
@@ -286,9 +286,9 @@ var qe = ha;
|
|
|
286
286
|
function va(e) {
|
|
287
287
|
return e != null && typeof e == "object";
|
|
288
288
|
}
|
|
289
|
-
var
|
|
289
|
+
var ba = va, _a = "[object Symbol]";
|
|
290
290
|
function wa(e) {
|
|
291
|
-
return typeof e == "symbol" ||
|
|
291
|
+
return typeof e == "symbol" || ba(e) && qe(e) == _a;
|
|
292
292
|
}
|
|
293
293
|
var De = wa;
|
|
294
294
|
function Ca(e, t) {
|
|
@@ -314,8 +314,8 @@ function Ra(e) {
|
|
|
314
314
|
var t = qe(e);
|
|
315
315
|
return t == Da || t == Fa || t == Pa || t == za;
|
|
316
316
|
}
|
|
317
|
-
var $a = Ra, Ia = Pe["__core-js_shared__"],
|
|
318
|
-
var e = /[^.]+$/.exec(
|
|
317
|
+
var $a = Ra, Ia = Pe["__core-js_shared__"], _e = Ia, Ae = (function() {
|
|
318
|
+
var e = /[^.]+$/.exec(_e && _e.keys && _e.keys.IE_PROTO || "");
|
|
319
319
|
return e ? "Symbol(src)_1." + e : "";
|
|
320
320
|
})();
|
|
321
321
|
function Oa(e) {
|
|
@@ -392,16 +392,16 @@ function gr(e) {
|
|
|
392
392
|
var t = this.has(e) && delete this.__data__[e];
|
|
393
393
|
return this.size -= t ? 1 : 0, t;
|
|
394
394
|
}
|
|
395
|
-
var hr = gr, vr = "__lodash_hash_undefined__",
|
|
396
|
-
function
|
|
395
|
+
var hr = gr, vr = "__lodash_hash_undefined__", br = Object.prototype.hasOwnProperty;
|
|
396
|
+
function _r(e) {
|
|
397
397
|
var t = this.__data__;
|
|
398
398
|
if (ue) {
|
|
399
399
|
var r = t[e];
|
|
400
400
|
return r === vr ? void 0 : r;
|
|
401
401
|
}
|
|
402
|
-
return
|
|
402
|
+
return br.call(t, e) ? t[e] : void 0;
|
|
403
403
|
}
|
|
404
|
-
var wr =
|
|
404
|
+
var wr = _r, Cr = Object.prototype.hasOwnProperty;
|
|
405
405
|
function xr(e) {
|
|
406
406
|
var t = this.__data__;
|
|
407
407
|
return ue ? t[e] !== void 0 : Cr.call(t, e);
|
|
@@ -520,8 +520,8 @@ function Re(e, t) {
|
|
|
520
520
|
var r = function() {
|
|
521
521
|
var a = arguments, l = t ? t.apply(this, a) : a[0], f = r.cache;
|
|
522
522
|
if (f.has(l)) return f.get(l);
|
|
523
|
-
var
|
|
524
|
-
return r.cache = f.set(l,
|
|
523
|
+
var o = e.apply(this, a);
|
|
524
|
+
return r.cache = f.set(l, o) || f, o;
|
|
525
525
|
};
|
|
526
526
|
return r.cache = new (Re.Cache || Ye)(), r;
|
|
527
527
|
}
|
|
@@ -559,20 +559,20 @@ function hn(e, t) {
|
|
|
559
559
|
return r && r == a ? e : void 0;
|
|
560
560
|
}
|
|
561
561
|
var vn = hn;
|
|
562
|
-
function
|
|
562
|
+
function bn(e, t, r) {
|
|
563
563
|
var a = e == null ? void 0 : vn(e, t);
|
|
564
564
|
return a === void 0 ? r : a;
|
|
565
565
|
}
|
|
566
|
-
var
|
|
566
|
+
var _n = bn;
|
|
567
567
|
function wn(e, t, r, a) {
|
|
568
568
|
if (!me(e)) return e;
|
|
569
569
|
t = Xe(t, e);
|
|
570
|
-
for (var l = -1, f = t.length,
|
|
570
|
+
for (var l = -1, f = t.length, o = f - 1, C = e; C != null && ++l < f; ) {
|
|
571
571
|
var w = Ze(t[l]), v = r;
|
|
572
572
|
if (w === "__proto__" || w === "constructor" || w === "prototype") return e;
|
|
573
|
-
if (l !=
|
|
574
|
-
var
|
|
575
|
-
v = a ? a(
|
|
573
|
+
if (l != o) {
|
|
574
|
+
var b = C[w];
|
|
575
|
+
v = a ? a(b, w, C) : void 0, v === void 0 && (v = me(b) ? b : ar(t[l + 1]) ? [] : {});
|
|
576
576
|
}
|
|
577
577
|
sr(C, w, v), C = C[w];
|
|
578
578
|
}
|
|
@@ -583,7 +583,7 @@ function xn(e, t, r) {
|
|
|
583
583
|
return e == null ? e : Cn(e, t, r);
|
|
584
584
|
}
|
|
585
585
|
var kn = xn;
|
|
586
|
-
const Ve = (e, t) =>
|
|
586
|
+
const Ve = (e, t) => _n(e, t), Sn = (e, t, r) => {
|
|
587
587
|
kn(e, t, r);
|
|
588
588
|
};
|
|
589
589
|
var Tn = /* @__PURE__ */ ae({
|
|
@@ -640,7 +640,7 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
640
640
|
"validate"
|
|
641
641
|
],
|
|
642
642
|
setup(e, { expose: t, emit: r }) {
|
|
643
|
-
const a = e, l = r, f = Q(),
|
|
643
|
+
const a = e, l = r, f = Q(), o = $(() => ({
|
|
644
644
|
type: "primary",
|
|
645
645
|
text: "提交",
|
|
646
646
|
loading: a.loading,
|
|
@@ -658,7 +658,7 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
658
658
|
showRequireMark: a.showRequireMark,
|
|
659
659
|
requireMarkPlacement: a.requireMarkPlacement,
|
|
660
660
|
...a.formProps
|
|
661
|
-
})),
|
|
661
|
+
})), b = $(() => ({
|
|
662
662
|
cols: 24,
|
|
663
663
|
xGap: a.xGap,
|
|
664
664
|
yGap: a.yGap,
|
|
@@ -666,13 +666,13 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
666
666
|
...a.gridProps,
|
|
667
667
|
responsive: "self"
|
|
668
668
|
})), x = (n) => {
|
|
669
|
-
const
|
|
670
|
-
return
|
|
669
|
+
const s = n.type || "input";
|
|
670
|
+
return s === "custom" ? n.component : aa[s];
|
|
671
671
|
}, k = (n) => typeof n.disabled == "function" ? n.disabled(a.model) : n.disabled, D = (n) => {
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
672
|
+
const s = { ...n.props };
|
|
673
|
+
if (s.placeholder !== void 0) return s;
|
|
674
674
|
const y = typeof n.label == "string" ? n.label : "";
|
|
675
|
-
if (!y) return
|
|
675
|
+
if (!y) return s;
|
|
676
676
|
const h = n.type || "input", V = [
|
|
677
677
|
"input",
|
|
678
678
|
"textarea",
|
|
@@ -686,29 +686,29 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
686
686
|
"time-picker",
|
|
687
687
|
"color-picker"
|
|
688
688
|
];
|
|
689
|
-
return V.includes(h) ?
|
|
689
|
+
return V.includes(h) ? s.placeholder = `请输入${y}` : Z.includes(h) && (s.placeholder = `请选择${y}`), s;
|
|
690
690
|
}, M = (n) => {
|
|
691
|
-
const
|
|
691
|
+
const s = n.type === "custom" ? "modelValue" : "value";
|
|
692
692
|
return {
|
|
693
|
-
[n.modelPropName ||
|
|
693
|
+
[n.modelPropName || s]: z(n.name),
|
|
694
694
|
...D(n),
|
|
695
695
|
disabled: k(n)
|
|
696
696
|
};
|
|
697
697
|
}, q = (n) => {
|
|
698
|
-
const
|
|
699
|
-
return { [n.modelEventName || `update:${y}`]: (h) =>
|
|
698
|
+
const s = n.type === "custom" ? "modelValue" : "value", y = n.modelPropName || s;
|
|
699
|
+
return { [n.modelEventName || `update:${y}`]: (h) => d(n.name, h) };
|
|
700
700
|
}, S = (n) => {
|
|
701
701
|
if (!n) return {};
|
|
702
|
-
const { options:
|
|
702
|
+
const { options: s, labelField: y, valueField: h, ...V } = n;
|
|
703
703
|
return V;
|
|
704
704
|
}, P = (n) => {
|
|
705
705
|
if (!n) return {};
|
|
706
|
-
const { text:
|
|
706
|
+
const { text: s, ...y } = n;
|
|
707
707
|
return y;
|
|
708
|
-
}, z = (n) => Ve(a.model, n),
|
|
709
|
-
Sn(a.model, n,
|
|
710
|
-
},
|
|
711
|
-
let
|
|
708
|
+
}, z = (n) => Ve(a.model, n), d = (n, s) => {
|
|
709
|
+
Sn(a.model, n, s), l("update:model", a.model);
|
|
710
|
+
}, u = (n) => {
|
|
711
|
+
let s = typeof n.rule == "function" ? n.rule(a.model) : n.rule;
|
|
712
712
|
const y = !n.noRequired;
|
|
713
713
|
if (y) {
|
|
714
714
|
const h = {
|
|
@@ -716,11 +716,11 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
716
716
|
message: `${typeof n.label == "string" ? n.label : "此项"}不能为空`,
|
|
717
717
|
trigger: "blur"
|
|
718
718
|
};
|
|
719
|
-
|
|
719
|
+
s ? s = Array.isArray(s) ? [h, ...s] : [h, s] : s = h;
|
|
720
720
|
}
|
|
721
721
|
return {
|
|
722
722
|
label: typeof n.label == "string" ? n.label : void 0,
|
|
723
|
-
rule:
|
|
723
|
+
rule: s,
|
|
724
724
|
showRequireMark: y ? void 0 : !1,
|
|
725
725
|
...n.formItemProps
|
|
726
726
|
};
|
|
@@ -734,11 +734,11 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
734
734
|
}, T = (n) => {
|
|
735
735
|
if (typeof n == "number" || typeof n == "string") return n;
|
|
736
736
|
if (typeof n == "object") {
|
|
737
|
-
const
|
|
737
|
+
const s = [];
|
|
738
738
|
return Object.entries(m).forEach(([y, h]) => {
|
|
739
739
|
const V = n[y];
|
|
740
|
-
V !== void 0 &&
|
|
741
|
-
}),
|
|
740
|
+
V !== void 0 && s.push(`${h}:${V}`);
|
|
741
|
+
}), s.length === 0 ? 24 : s.join(" ");
|
|
742
742
|
}
|
|
743
743
|
return 24;
|
|
744
744
|
}, E = (n) => ({
|
|
@@ -746,9 +746,9 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
746
746
|
offset: n.offset
|
|
747
747
|
}), L = async (...n) => {
|
|
748
748
|
await f.value.validate(...n);
|
|
749
|
-
}, O = async (n,
|
|
749
|
+
}, O = async (n, s) => {
|
|
750
750
|
const y = Array.isArray(n) ? n : [n];
|
|
751
|
-
await f.value.validate(
|
|
751
|
+
await f.value.validate(s, (h) => y.some((V) => h.key === V));
|
|
752
752
|
}, oe = () => f.value?.restoreValidation(), Y = () => {
|
|
753
753
|
oe(), l("reset");
|
|
754
754
|
}, de = async () => {
|
|
@@ -768,46 +768,46 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
768
768
|
getFormData: () => a.model,
|
|
769
769
|
setFormData: (n) => Object.assign(a.model, n),
|
|
770
770
|
getFieldValue: (n) => Ve(a.model, n),
|
|
771
|
-
setFieldValue: (n,
|
|
771
|
+
setFieldValue: (n, s) => d(n, s),
|
|
772
772
|
resetFields: Y,
|
|
773
773
|
getFormItemInst: (n) => f.value?.getFormItemInst?.(n)
|
|
774
|
-
}), (n,
|
|
774
|
+
}), (n, s) => {
|
|
775
775
|
const y = Ct, h = kt, V = B, Z = xt, ve = wt;
|
|
776
776
|
return g(), K(W, null, [
|
|
777
777
|
U(n.$slots, "header", { model: a.model }),
|
|
778
|
-
|
|
779
|
-
default:
|
|
778
|
+
_(p(Se), { show: a.loading }, {
|
|
779
|
+
default: i(() => [_(ve, G({
|
|
780
780
|
ref_key: "formRef",
|
|
781
781
|
ref: f,
|
|
782
782
|
model: a.model
|
|
783
783
|
}, v.value), {
|
|
784
|
-
default:
|
|
785
|
-
default:
|
|
786
|
-
default:
|
|
784
|
+
default: i(() => [_(Z, Kt(Vt(b.value)), {
|
|
785
|
+
default: i(() => [(g(!0), K(W, null, X(w.value, (c) => (g(), N(h, G({ key: c.name }, { ref_for: !0 }, E(c)), {
|
|
786
|
+
default: i(() => [c.type === "slot" ? U(n.$slots, c.slot || c.name, {
|
|
787
787
|
key: 0,
|
|
788
788
|
model: a.model,
|
|
789
789
|
schema: c
|
|
790
790
|
}) : (g(), N(y, G({
|
|
791
791
|
key: 1,
|
|
792
792
|
path: c.name
|
|
793
|
-
}, { ref_for: !0 },
|
|
794
|
-
default:
|
|
793
|
+
}, { ref_for: !0 }, u(c)), se({
|
|
794
|
+
default: i(() => [U(n.$slots, `field-${c.name}`, {
|
|
795
795
|
model: a.model,
|
|
796
796
|
schema: c,
|
|
797
797
|
value: z(c.name),
|
|
798
|
-
setValue: (R) =>
|
|
798
|
+
setValue: (R) => d(c.name, R)
|
|
799
799
|
}, () => [c.type === "radio-group" && c.props?.options ? (g(), N(p(je), G({
|
|
800
800
|
key: 0,
|
|
801
801
|
value: z(c.name),
|
|
802
|
-
"onUpdate:value": (R) =>
|
|
802
|
+
"onUpdate:value": (R) => d(c.name, R)
|
|
803
803
|
}, { ref_for: !0 }, S(c.props)), {
|
|
804
|
-
default:
|
|
805
|
-
default:
|
|
804
|
+
default: i(() => [_(p(H), null, {
|
|
805
|
+
default: i(() => [(g(!0), K(W, null, X(c.props.options, (R) => (g(), N(p(Rt), {
|
|
806
806
|
key: R[c.props.valueField || "value"],
|
|
807
807
|
value: R[c.props.valueField || "value"],
|
|
808
808
|
disabled: R.disabled
|
|
809
809
|
}, {
|
|
810
|
-
default:
|
|
810
|
+
default: i(() => [I(A(R[c.props.labelField || "label"]), 1)]),
|
|
811
811
|
_: 2
|
|
812
812
|
}, 1032, ["value", "disabled"]))), 128))]),
|
|
813
813
|
_: 2
|
|
@@ -816,15 +816,15 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
816
816
|
}, 1040, ["value", "onUpdate:value"])) : c.type === "checkbox-group" && c.props?.options ? (g(), N(p(ke), G({
|
|
817
817
|
key: 1,
|
|
818
818
|
value: z(c.name),
|
|
819
|
-
"onUpdate:value": (R) =>
|
|
819
|
+
"onUpdate:value": (R) => d(c.name, R)
|
|
820
820
|
}, { ref_for: !0 }, S(c.props)), {
|
|
821
|
-
default:
|
|
822
|
-
default:
|
|
821
|
+
default: i(() => [_(p(H), null, {
|
|
822
|
+
default: i(() => [(g(!0), K(W, null, X(c.props.options, (R) => (g(), N(p(Ge), {
|
|
823
823
|
key: R[c.props.valueField || "value"],
|
|
824
824
|
value: R[c.props.valueField || "value"],
|
|
825
825
|
disabled: R.disabled
|
|
826
826
|
}, {
|
|
827
|
-
default:
|
|
827
|
+
default: i(() => [I(A(R[c.props.labelField || "label"]), 1)]),
|
|
828
828
|
_: 2
|
|
829
829
|
}, 1032, ["value", "disabled"]))), 128))]),
|
|
830
830
|
_: 2
|
|
@@ -833,7 +833,7 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
833
833
|
}, 1040, ["value", "onUpdate:value"])) : c.type === "switch" ? (g(), N(ee(x(c)), G({
|
|
834
834
|
key: 2,
|
|
835
835
|
value: z(c.name),
|
|
836
|
-
"onUpdate:value": (R) =>
|
|
836
|
+
"onUpdate:value": (R) => d(c.name, R)
|
|
837
837
|
}, { ref_for: !0 }, c.props, { disabled: k(c) }), null, 16, [
|
|
838
838
|
"value",
|
|
839
839
|
"onUpdate:value",
|
|
@@ -841,7 +841,7 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
841
841
|
])) : c.type === "image-upload" || c.type === "file-upload" ? (g(), N(ee(x(c)), G({
|
|
842
842
|
key: 3,
|
|
843
843
|
"file-list": z(c.name) || [],
|
|
844
|
-
"onUpdate:fileList": (R) =>
|
|
844
|
+
"onUpdate:fileList": (R) => d(c.name, R),
|
|
845
845
|
"upload-type": c.type === "image-upload" ? "image" : "file"
|
|
846
846
|
}, { ref_for: !0 }, c.props, { disabled: k(c) }), null, 16, [
|
|
847
847
|
"file-list",
|
|
@@ -855,7 +855,7 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
855
855
|
_: 2
|
|
856
856
|
}, [typeof c.label == "function" ? {
|
|
857
857
|
name: "label",
|
|
858
|
-
fn:
|
|
858
|
+
fn: i(() => [(g(), N(ee(c.label)))]),
|
|
859
859
|
key: "0"
|
|
860
860
|
} : void 0]), 1040, ["path"]))]),
|
|
861
861
|
_: 2
|
|
@@ -863,18 +863,18 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
863
863
|
key: 0,
|
|
864
864
|
span: a.footerSpan
|
|
865
865
|
}, {
|
|
866
|
-
default:
|
|
866
|
+
default: i(() => [U(n.$slots, "footer", {
|
|
867
867
|
model: a.model,
|
|
868
868
|
validate: L,
|
|
869
869
|
reset: Y
|
|
870
|
-
}, () => [
|
|
871
|
-
default:
|
|
870
|
+
}, () => [_(p(H), { justify: a.footerAlign }, {
|
|
871
|
+
default: i(() => [
|
|
872
872
|
C.value.hidden ? j("", !0) : (g(), N(V, G({ key: 0 }, P(C.value), { onClick: $e }), {
|
|
873
|
-
default:
|
|
873
|
+
default: i(() => [I(A(C.value.text), 1)]),
|
|
874
874
|
_: 1
|
|
875
875
|
}, 16)),
|
|
876
|
-
|
|
877
|
-
default:
|
|
876
|
+
o.value.hidden ? j("", !0) : (g(), N(V, G({ key: 1 }, P(o.value), { onClick: de }), {
|
|
877
|
+
default: i(() => [I(A(o.value.text), 1)]),
|
|
878
878
|
_: 1
|
|
879
879
|
}, 16)),
|
|
880
880
|
(g(!0), K(W, null, X(a.extraButtons, (c) => (g(), N(V, {
|
|
@@ -884,7 +884,7 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
884
884
|
disabled: c.disabled,
|
|
885
885
|
onClick: c.onClick
|
|
886
886
|
}, {
|
|
887
|
-
default:
|
|
887
|
+
default: i(() => [I(A(c.text), 1)]),
|
|
888
888
|
_: 2
|
|
889
889
|
}, 1032, [
|
|
890
890
|
"type",
|
|
@@ -909,19 +909,19 @@ var Tn = /* @__PURE__ */ ae({
|
|
|
909
909
|
}
|
|
910
910
|
}), he = Tn;
|
|
911
911
|
function Nn(e) {
|
|
912
|
-
const { maxVisible: t = -1, buttons: r = [], showView: a = !0, showEdit: l = !0, showDelete: f = !0, viewConfig:
|
|
912
|
+
const { maxVisible: t = -1, buttons: r = [], showView: a = !0, showEdit: l = !0, showDelete: f = !0, viewConfig: o, editConfig: C, deleteConfig: w, onView: v, onEdit: b, onDelete: x } = e, k = (u, m, T, E) => m ? u ? typeof u.show == "function" ? u.show(T, E) : u.show !== !1 : !0 : !1, D = (u, m, T) => u ? typeof u.disabled == "function" ? u.disabled(m, T) : u.disabled === !0 : !1, M = (u, m, T) => typeof u.show == "function" ? u.show(m, T) : u.show !== !1, q = (u, m, T) => typeof u.disabled == "function" ? u.disabled(m, T) : u.disabled === !0, S = (u, m, T) => typeof u == "function" ? u(m) : u || T, P = (u) => {
|
|
913
913
|
const m = F(B, {
|
|
914
|
-
type:
|
|
914
|
+
type: u.type,
|
|
915
915
|
size: "small",
|
|
916
|
-
disabled:
|
|
917
|
-
onClick:
|
|
918
|
-
}, { default: () =>
|
|
919
|
-
return
|
|
916
|
+
disabled: u.disabled,
|
|
917
|
+
onClick: u.confirm ? void 0 : u.onClick
|
|
918
|
+
}, { default: () => u.label });
|
|
919
|
+
return u.confirm ? F(Ft, { onPositiveClick: u.onClick }, {
|
|
920
920
|
trigger: () => m,
|
|
921
|
-
default: () =>
|
|
921
|
+
default: () => u.confirm
|
|
922
922
|
}) : m;
|
|
923
|
-
}, z = (
|
|
924
|
-
const m =
|
|
923
|
+
}, z = (u) => {
|
|
924
|
+
const m = u.map((E) => ({
|
|
925
925
|
label: E.label,
|
|
926
926
|
key: E.key,
|
|
927
927
|
disabled: E.disabled
|
|
@@ -930,49 +930,49 @@ function Nn(e) {
|
|
|
930
930
|
options: m,
|
|
931
931
|
trigger: "click",
|
|
932
932
|
onSelect: (E) => {
|
|
933
|
-
|
|
933
|
+
u.find((L) => L.key === E)?.onClick();
|
|
934
934
|
}
|
|
935
935
|
}, { default: () => F(B, { size: "small" }, { default: () => "更多" }) });
|
|
936
936
|
};
|
|
937
937
|
return {
|
|
938
|
-
renderActions: (
|
|
938
|
+
renderActions: (u, m) => {
|
|
939
939
|
const T = [];
|
|
940
|
-
if (k(
|
|
940
|
+
if (k(o, a, u, m) && T.push({
|
|
941
941
|
key: "__view__",
|
|
942
|
-
label:
|
|
942
|
+
label: o?.label || "查看",
|
|
943
943
|
type: "info",
|
|
944
|
-
disabled: D(
|
|
944
|
+
disabled: D(o, u, m),
|
|
945
945
|
onClick: () => v?.({
|
|
946
|
-
row:
|
|
946
|
+
row: u,
|
|
947
947
|
index: m
|
|
948
948
|
})
|
|
949
|
-
}), k(C, l,
|
|
949
|
+
}), k(C, l, u, m) && T.push({
|
|
950
950
|
key: "__edit__",
|
|
951
951
|
label: C?.label || "编辑",
|
|
952
952
|
type: "primary",
|
|
953
|
-
disabled: D(C,
|
|
954
|
-
onClick: () =>
|
|
955
|
-
row:
|
|
953
|
+
disabled: D(C, u, m),
|
|
954
|
+
onClick: () => b?.({
|
|
955
|
+
row: u,
|
|
956
956
|
index: m
|
|
957
957
|
})
|
|
958
|
-
}), k(w, f,
|
|
958
|
+
}), k(w, f, u, m) && T.push({
|
|
959
959
|
key: "__delete__",
|
|
960
960
|
label: w?.label || "删除",
|
|
961
961
|
type: "error",
|
|
962
|
-
disabled: D(w,
|
|
963
|
-
confirm: S(w?.confirm,
|
|
962
|
+
disabled: D(w, u, m),
|
|
963
|
+
confirm: S(w?.confirm, u, "确定删除此记录吗?"),
|
|
964
964
|
onClick: () => x?.({
|
|
965
|
-
row:
|
|
965
|
+
row: u,
|
|
966
966
|
index: m
|
|
967
967
|
})
|
|
968
968
|
}), r.forEach((O) => {
|
|
969
|
-
M(O,
|
|
969
|
+
M(O, u, m) && T.push({
|
|
970
970
|
key: O.key,
|
|
971
971
|
label: O.label,
|
|
972
972
|
type: O.type || "default",
|
|
973
|
-
disabled: q(O,
|
|
974
|
-
confirm: O.confirm ? S(O.confirm,
|
|
975
|
-
onClick: () => O.onClick?.(
|
|
973
|
+
disabled: q(O, u, m),
|
|
974
|
+
confirm: O.confirm ? S(O.confirm, u, "确定执行此操作吗?") : void 0,
|
|
975
|
+
onClick: () => O.onClick?.(u, m)
|
|
976
976
|
});
|
|
977
977
|
}), t === -1 || T.length <= t) return F(H, {
|
|
978
978
|
size: "small",
|
|
@@ -1014,14 +1014,14 @@ var Pn = (e) => {
|
|
|
1014
1014
|
});
|
|
1015
1015
|
}, at = (e, t) => {
|
|
1016
1016
|
if (!e) return "-";
|
|
1017
|
-
const r = String(e), a = t?.width ?? 60, l = t?.height ?? 60, f = t?.radius ?? 4,
|
|
1017
|
+
const r = String(e), a = t?.width ?? 60, l = t?.height ?? 60, f = t?.radius ?? 4, o = t?.fallback;
|
|
1018
1018
|
return F(St, {
|
|
1019
1019
|
src: r,
|
|
1020
1020
|
width: typeof a == "number" ? a : void 0,
|
|
1021
1021
|
height: typeof l == "number" ? l : void 0,
|
|
1022
1022
|
objectFit: "cover",
|
|
1023
1023
|
previewDisabled: !1,
|
|
1024
|
-
fallbackSrc:
|
|
1024
|
+
fallbackSrc: o,
|
|
1025
1025
|
style: {
|
|
1026
1026
|
width: typeof a == "string" ? a : `${a}px`,
|
|
1027
1027
|
height: typeof l == "string" ? l : `${l}px`,
|
|
@@ -1032,8 +1032,8 @@ var Pn = (e) => {
|
|
|
1032
1032
|
}, rt = (e, t, r) => {
|
|
1033
1033
|
if (!e) return "-";
|
|
1034
1034
|
const a = String(e), l = r?.getFileName ? r.getFileName(a, t) : Pn(a), f = () => {
|
|
1035
|
-
const
|
|
1036
|
-
|
|
1035
|
+
const o = document.createElement("a");
|
|
1036
|
+
o.href = a, o.download = l, o.target = "_blank", o.rel = "noopener noreferrer", document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
|
1037
1037
|
};
|
|
1038
1038
|
return F(Ce, { trigger: "hover" }, {
|
|
1039
1039
|
trigger: () => F(B, {
|
|
@@ -1062,22 +1062,25 @@ var Pn = (e) => {
|
|
|
1062
1062
|
}, () => F(a)) : r;
|
|
1063
1063
|
}, xe = (e, t, r = "label", a = "value") => {
|
|
1064
1064
|
if (e == null) return "-";
|
|
1065
|
-
if (!t || t.length === 0) return F(
|
|
1066
|
-
const l = t.find((f) =>
|
|
1065
|
+
if (!t || t.length === 0) return F(be, { size: "small" }, () => String(e));
|
|
1066
|
+
const l = t.find((f) => {
|
|
1067
|
+
const o = f[a];
|
|
1068
|
+
return o === e || String(o) === String(e) ? !0 : typeof o == "number" && !isNaN(Number(e)) ? o === Number(e) : typeof e == "number" && !isNaN(Number(o)) ? Number(o) === e : typeof o == "boolean" ? o === (e === "true" || e === !0) : typeof e == "boolean" ? (o === "true" || o === !0) === e : !1;
|
|
1069
|
+
});
|
|
1067
1070
|
if (l) {
|
|
1068
|
-
const f = l,
|
|
1069
|
-
return F(
|
|
1071
|
+
const f = l, o = f[r];
|
|
1072
|
+
return F(be, {
|
|
1070
1073
|
size: "small",
|
|
1071
1074
|
...Object.keys(l).reduce((C, w) => (w !== r && w !== a && (C[w] = f[w]), C), {})
|
|
1072
|
-
}, () =>
|
|
1075
|
+
}, () => o);
|
|
1073
1076
|
}
|
|
1074
|
-
return F(
|
|
1077
|
+
return F(be, { size: "small" }, () => String(e));
|
|
1075
1078
|
}, lt = (e, t, r = "label", a = "value") => e == null ? "-" : Array.isArray(e) ? F(H, {
|
|
1076
1079
|
size: "small",
|
|
1077
1080
|
wrap: !0
|
|
1078
1081
|
}, () => e.map((l, f) => {
|
|
1079
|
-
const
|
|
1080
|
-
return typeof
|
|
1082
|
+
const o = xe(l, t, r, a);
|
|
1083
|
+
return typeof o == "string" ? F("span", { key: f }, o) : o;
|
|
1081
1084
|
})) : xe(e, t, r, a);
|
|
1082
1085
|
const ot = (e, t, r) => {
|
|
1083
1086
|
switch (r.columnType || "text") {
|
|
@@ -1110,20 +1113,20 @@ function Hn() {
|
|
|
1110
1113
|
};
|
|
1111
1114
|
}
|
|
1112
1115
|
function Dn(e) {
|
|
1113
|
-
const { columns: t, actionColumn: r, onView: a, onEdit: l, onDelete: f } = e,
|
|
1114
|
-
if ("title" in
|
|
1115
|
-
if (typeof
|
|
1116
|
-
if (typeof
|
|
1116
|
+
const { columns: t, actionColumn: r, onView: a, onEdit: l, onDelete: f } = e, o = (d) => "key" in d && d.key ? String(d.key) : "type" in d ? `__${d.type}__` : "", C = (d) => {
|
|
1117
|
+
if ("title" in d) {
|
|
1118
|
+
if (typeof d.title == "string") return d.title;
|
|
1119
|
+
if (typeof d.title == "function") return "自定义列";
|
|
1117
1120
|
}
|
|
1118
|
-
return d
|
|
1119
|
-
}, w = (
|
|
1120
|
-
key: d
|
|
1121
|
-
title: C(
|
|
1122
|
-
visible: x.value.includes(d
|
|
1123
|
-
configurable: v(
|
|
1121
|
+
return o(d);
|
|
1122
|
+
}, w = (d) => "defaultVisible" in d ? d.defaultVisible !== !1 : !0, v = (d) => "type" in d && (d.type === "selection" || d.type === "expand") ? !1 : "configurable" in d ? d.configurable !== !1 : !0, b = () => t.filter((d) => w(d)).map((d) => o(d)).filter(Boolean), x = Q(b()), k = $(() => t.filter((d) => o(d) && v(d)).map((d) => ({
|
|
1123
|
+
key: o(d),
|
|
1124
|
+
title: C(d),
|
|
1125
|
+
visible: x.value.includes(o(d)),
|
|
1126
|
+
configurable: v(d)
|
|
1124
1127
|
}))), D = () => {
|
|
1125
1128
|
if (r?.show === !1) return null;
|
|
1126
|
-
const { renderActions:
|
|
1129
|
+
const { renderActions: d } = Nn({
|
|
1127
1130
|
...r,
|
|
1128
1131
|
onView: a,
|
|
1129
1132
|
onEdit: l,
|
|
@@ -1135,33 +1138,33 @@ function Dn(e) {
|
|
|
1135
1138
|
width: r?.width || 180,
|
|
1136
1139
|
minWidth: r?.minWidth,
|
|
1137
1140
|
fixed: r?.fixed !== !1 ? r?.fixed || "right" : void 0,
|
|
1138
|
-
render: (
|
|
1141
|
+
render: (u, m) => d(u, m)
|
|
1139
1142
|
};
|
|
1140
|
-
}, M = (
|
|
1141
|
-
if ("columnType" in
|
|
1142
|
-
const
|
|
1143
|
+
}, M = (d) => {
|
|
1144
|
+
if ("columnType" in d && it(d)) {
|
|
1145
|
+
const u = d, m = u.key;
|
|
1143
1146
|
return {
|
|
1144
|
-
...
|
|
1145
|
-
render: (T) => ot(m ? T[m] : void 0, T,
|
|
1147
|
+
...d,
|
|
1148
|
+
render: (T) => ot(m ? T[m] : void 0, T, u)
|
|
1146
1149
|
};
|
|
1147
1150
|
}
|
|
1148
|
-
return
|
|
1151
|
+
return d;
|
|
1149
1152
|
};
|
|
1150
1153
|
return {
|
|
1151
1154
|
mergedColumns: $(() => {
|
|
1152
|
-
const
|
|
1153
|
-
const T =
|
|
1155
|
+
const d = t.filter((m) => {
|
|
1156
|
+
const T = o(m);
|
|
1154
1157
|
return "type" in m && (m.type === "selection" || m.type === "expand") || !T ? !0 : x.value.includes(T);
|
|
1155
|
-
}).map((m) => M(m)),
|
|
1156
|
-
return
|
|
1158
|
+
}).map((m) => M(m)), u = D();
|
|
1159
|
+
return u && d.push(u), d;
|
|
1157
1160
|
}),
|
|
1158
1161
|
configurableColumns: k,
|
|
1159
1162
|
visibleColumnKeys: x,
|
|
1160
|
-
setVisibleColumnKeys: (
|
|
1161
|
-
x.value =
|
|
1163
|
+
setVisibleColumnKeys: (d) => {
|
|
1164
|
+
x.value = d;
|
|
1162
1165
|
},
|
|
1163
1166
|
resetColumnSetting: () => {
|
|
1164
|
-
x.value =
|
|
1167
|
+
x.value = b();
|
|
1165
1168
|
},
|
|
1166
1169
|
getVisibleColumnKeys: () => [...x.value]
|
|
1167
1170
|
};
|
|
@@ -1184,13 +1187,13 @@ function zn(e) {
|
|
|
1184
1187
|
const { pagination: t, fieldNames: r, onUpdatePagination: a, onPageChange: l } = e, f = () => ({
|
|
1185
1188
|
...Fn,
|
|
1186
1189
|
...r
|
|
1187
|
-
}),
|
|
1190
|
+
}), o = (k) => {
|
|
1188
1191
|
if (!(t === !1 || !t))
|
|
1189
1192
|
return t[f()[k]];
|
|
1190
1193
|
}, C = $(() => t === !1 || !t ? !1 : {
|
|
1191
|
-
page:
|
|
1192
|
-
pageSize:
|
|
1193
|
-
itemCount:
|
|
1194
|
+
page: o("page") ?? 1,
|
|
1195
|
+
pageSize: o("pageSize") ?? 10,
|
|
1196
|
+
itemCount: o("itemCount"),
|
|
1194
1197
|
pageSizes: t.pageSizes ?? we.pageSizes,
|
|
1195
1198
|
showSizePicker: t.showSizePicker ?? we.showSizePicker,
|
|
1196
1199
|
showQuickJumper: t.showQuickJumper ?? we.showQuickJumper,
|
|
@@ -1274,11 +1277,11 @@ var Rn = {
|
|
|
1274
1277
|
"delete"
|
|
1275
1278
|
],
|
|
1276
1279
|
setup(e, { expose: t, emit: r }) {
|
|
1277
|
-
const a = e, l = r, f = Te(),
|
|
1278
|
-
const y = getComputedStyle(
|
|
1279
|
-
return
|
|
1280
|
-
},
|
|
1281
|
-
let y =
|
|
1280
|
+
const a = e, l = r, f = Te(), o = Q(null), C = Q(void 0), w = $(() => !f.maxHeight), v = (s) => {
|
|
1281
|
+
const y = getComputedStyle(s);
|
|
1282
|
+
return s.clientHeight <= 0 ? !1 : !!(parseFloat(y.flexGrow) > 0 || y.height && y.height !== "auto" && y.height !== "0px" || y.maxHeight && y.maxHeight !== "none" && y.maxHeight !== "0px" || y.overflowY === "auto" || y.overflowY === "scroll");
|
|
1283
|
+
}, b = (s) => {
|
|
1284
|
+
let y = s.parentElement;
|
|
1282
1285
|
for (; y && y !== document.body; ) {
|
|
1283
1286
|
if (v(y)) return y;
|
|
1284
1287
|
y = y.parentElement;
|
|
@@ -1286,14 +1289,14 @@ var Rn = {
|
|
|
1286
1289
|
return null;
|
|
1287
1290
|
}, x = () => {
|
|
1288
1291
|
w.value && jt(() => {
|
|
1289
|
-
const
|
|
1290
|
-
if (!
|
|
1291
|
-
const y =
|
|
1292
|
+
const s = o.value;
|
|
1293
|
+
if (!s) return;
|
|
1294
|
+
const y = b(s);
|
|
1292
1295
|
if (!y) {
|
|
1293
1296
|
C.value = void 0;
|
|
1294
1297
|
return;
|
|
1295
1298
|
}
|
|
1296
|
-
const h = y.getBoundingClientRect(), V =
|
|
1299
|
+
const h = y.getBoundingClientRect(), V = s.getBoundingClientRect(), Z = s.querySelector(".dydx-table__toolbar"), ve = Z ? Z.offsetHeight + 16 : 0, c = V.top - h.top, R = y.clientHeight - c - ve;
|
|
1297
1300
|
R > 200 ? C.value = R : C.value = void 0;
|
|
1298
1301
|
});
|
|
1299
1302
|
}, k = $(() => f.maxHeight ? f.maxHeight : C.value);
|
|
@@ -1302,27 +1305,27 @@ var Rn = {
|
|
|
1302
1305
|
}), Ht(() => {
|
|
1303
1306
|
window.removeEventListener("resize", x);
|
|
1304
1307
|
});
|
|
1305
|
-
const D = Q(null), { mergedColumns: M, configurableColumns: q, visibleColumnKeys: S, setVisibleColumnKeys: P, resetColumnSetting: z, getVisibleColumnKeys:
|
|
1308
|
+
const D = Q(null), { mergedColumns: M, configurableColumns: q, visibleColumnKeys: S, setVisibleColumnKeys: P, resetColumnSetting: z, getVisibleColumnKeys: d } = Dn({
|
|
1306
1309
|
columns: a.columns,
|
|
1307
1310
|
actionColumn: a.actionColumn,
|
|
1308
|
-
onView: (
|
|
1309
|
-
onEdit: (
|
|
1310
|
-
onDelete: (
|
|
1311
|
-
}), { paginationConfig:
|
|
1311
|
+
onView: (s) => l("view", s),
|
|
1312
|
+
onEdit: (s) => l("edit", s),
|
|
1313
|
+
onDelete: (s) => l("delete", s)
|
|
1314
|
+
}), { paginationConfig: u, handlePageChange: m, handlePageSizeChange: T } = zn({
|
|
1312
1315
|
get pagination() {
|
|
1313
1316
|
return a.pagination;
|
|
1314
1317
|
},
|
|
1315
1318
|
get fieldNames() {
|
|
1316
1319
|
return a.paginationFieldNames;
|
|
1317
1320
|
},
|
|
1318
|
-
onUpdatePagination: (
|
|
1319
|
-
onPageChange: (
|
|
1321
|
+
onUpdatePagination: (s) => l("update:pagination", s),
|
|
1322
|
+
onPageChange: (s) => l("pageChange", s)
|
|
1320
1323
|
});
|
|
1321
|
-
qt(S, (
|
|
1322
|
-
l("update:visibleColumns",
|
|
1324
|
+
qt(S, (s) => {
|
|
1325
|
+
l("update:visibleColumns", s);
|
|
1323
1326
|
});
|
|
1324
|
-
const E = $(() => a.showAdd || a.leftButtons?.length || a.showRefresh || a.showColumnSetting || a.rightButtons?.length), L = $(() => typeof a.rowKey == "function" ? a.rowKey : (
|
|
1325
|
-
l("update:checkedRowKeys",
|
|
1327
|
+
const E = $(() => a.showAdd || a.leftButtons?.length || a.showRefresh || a.showColumnSetting || a.rightButtons?.length), L = $(() => typeof a.rowKey == "function" ? a.rowKey : (s) => s[a.rowKey]), O = (s) => {
|
|
1328
|
+
l("update:checkedRowKeys", s, a.data.filter((y) => s.includes(L.value(y))));
|
|
1326
1329
|
}, oe = () => {
|
|
1327
1330
|
a.onAdd?.();
|
|
1328
1331
|
}, Y = () => {
|
|
@@ -1336,31 +1339,31 @@ var Rn = {
|
|
|
1336
1339
|
refresh: () => {
|
|
1337
1340
|
Y();
|
|
1338
1341
|
},
|
|
1339
|
-
getVisibleColumnKeys:
|
|
1342
|
+
getVisibleColumnKeys: d,
|
|
1340
1343
|
setVisibleColumnKeys: P,
|
|
1341
1344
|
resetColumnSetting: z,
|
|
1342
|
-
scrollTo: (
|
|
1343
|
-
D.value?.scrollTo(
|
|
1345
|
+
scrollTo: (s) => {
|
|
1346
|
+
D.value?.scrollTo(s);
|
|
1344
1347
|
}
|
|
1345
|
-
}), (
|
|
1348
|
+
}), (s, y) => (g(), K("div", {
|
|
1346
1349
|
ref_key: "containerRef",
|
|
1347
|
-
ref:
|
|
1350
|
+
ref: o,
|
|
1348
1351
|
class: "dydx-table"
|
|
1349
|
-
}, [E.value ? (g(), K("div", Rn, [
|
|
1352
|
+
}, [E.value ? (g(), K("div", Rn, [_(p(H), {
|
|
1350
1353
|
class: "dydx-table__toolbar-left",
|
|
1351
1354
|
size: 12
|
|
1352
1355
|
}, {
|
|
1353
|
-
default:
|
|
1356
|
+
default: i(() => [
|
|
1354
1357
|
e.showAdd ? (g(), N(p(B), {
|
|
1355
1358
|
key: 0,
|
|
1356
1359
|
type: "primary",
|
|
1357
1360
|
onClick: oe
|
|
1358
1361
|
}, {
|
|
1359
|
-
icon:
|
|
1360
|
-
default:
|
|
1362
|
+
icon: i(() => [U(s.$slots, "add-icon", {}, () => [_(p(J), null, {
|
|
1363
|
+
default: i(() => [_(p(He))]),
|
|
1361
1364
|
_: 1
|
|
1362
1365
|
})], !0)]),
|
|
1363
|
-
default:
|
|
1366
|
+
default: i(() => [I(" " + A(e.addButtonText), 1)]),
|
|
1364
1367
|
_: 3
|
|
1365
1368
|
})) : j("", !0),
|
|
1366
1369
|
(g(!0), K(W, null, X(e.leftButtons, (h) => (g(), K(W, { key: h.key }, [h.show !== !1 ? (g(), N(p(B), {
|
|
@@ -1369,37 +1372,37 @@ var Rn = {
|
|
|
1369
1372
|
disabled: h.disabled,
|
|
1370
1373
|
onClick: h.onClick
|
|
1371
1374
|
}, se({
|
|
1372
|
-
default:
|
|
1375
|
+
default: i(() => [I(" " + A(h.label), 1)]),
|
|
1373
1376
|
_: 2
|
|
1374
1377
|
}, [h.icon ? {
|
|
1375
1378
|
name: "icon",
|
|
1376
|
-
fn:
|
|
1379
|
+
fn: i(() => [(g(), N(ee(h.icon)))]),
|
|
1377
1380
|
key: "0"
|
|
1378
1381
|
} : void 0]), 1032, [
|
|
1379
1382
|
"type",
|
|
1380
1383
|
"disabled",
|
|
1381
1384
|
"onClick"
|
|
1382
1385
|
])) : j("", !0)], 64))), 128)),
|
|
1383
|
-
U(
|
|
1386
|
+
U(s.$slots, "toolbar-left", {}, void 0, !0)
|
|
1384
1387
|
]),
|
|
1385
1388
|
_: 3
|
|
1386
|
-
}),
|
|
1389
|
+
}), _(p(H), {
|
|
1387
1390
|
class: "dydx-table__toolbar-right",
|
|
1388
1391
|
size: 8
|
|
1389
1392
|
}, {
|
|
1390
|
-
default:
|
|
1391
|
-
U(
|
|
1393
|
+
default: i(() => [
|
|
1394
|
+
U(s.$slots, "toolbar-right", {}, void 0, !0),
|
|
1392
1395
|
(g(!0), K(W, null, X(e.rightButtons, (h) => (g(), K(W, { key: h.key }, [h.show !== !1 ? (g(), N(p(B), {
|
|
1393
1396
|
key: 0,
|
|
1394
1397
|
type: h.type,
|
|
1395
1398
|
disabled: h.disabled,
|
|
1396
1399
|
onClick: h.onClick
|
|
1397
1400
|
}, se({
|
|
1398
|
-
default:
|
|
1401
|
+
default: i(() => [I(" " + A(h.label), 1)]),
|
|
1399
1402
|
_: 2
|
|
1400
1403
|
}, [h.icon ? {
|
|
1401
1404
|
name: "icon",
|
|
1402
|
-
fn:
|
|
1405
|
+
fn: i(() => [(g(), N(ee(h.icon)))]),
|
|
1403
1406
|
key: "0"
|
|
1404
1407
|
} : void 0]), 1032, [
|
|
1405
1408
|
"type",
|
|
@@ -1410,18 +1413,18 @@ var Rn = {
|
|
|
1410
1413
|
key: 0,
|
|
1411
1414
|
trigger: "hover"
|
|
1412
1415
|
}, {
|
|
1413
|
-
trigger:
|
|
1416
|
+
trigger: i(() => [_(p(B), {
|
|
1414
1417
|
circle: "",
|
|
1415
1418
|
class: "dydx-table__icon-btn",
|
|
1416
1419
|
onClick: Y
|
|
1417
1420
|
}, {
|
|
1418
|
-
icon:
|
|
1419
|
-
default:
|
|
1421
|
+
icon: i(() => [_(p(J), null, {
|
|
1422
|
+
default: i(() => [_(p(Yt))]),
|
|
1420
1423
|
_: 1
|
|
1421
1424
|
})]),
|
|
1422
1425
|
_: 1
|
|
1423
1426
|
})]),
|
|
1424
|
-
default:
|
|
1427
|
+
default: i(() => [y[1] || (y[1] = I(" 刷新 ", -1))]),
|
|
1425
1428
|
_: 1
|
|
1426
1429
|
})) : j("", !0),
|
|
1427
1430
|
e.showColumnSetting ? (g(), N(p(zt), {
|
|
@@ -1429,37 +1432,37 @@ var Rn = {
|
|
|
1429
1432
|
trigger: "click",
|
|
1430
1433
|
placement: "bottom-end"
|
|
1431
1434
|
}, {
|
|
1432
|
-
trigger:
|
|
1433
|
-
trigger:
|
|
1435
|
+
trigger: i(() => [_(p(Ce), { trigger: "hover" }, {
|
|
1436
|
+
trigger: i(() => [_(p(B), {
|
|
1434
1437
|
circle: "",
|
|
1435
1438
|
class: "dydx-table__icon-btn"
|
|
1436
1439
|
}, {
|
|
1437
|
-
icon:
|
|
1438
|
-
default:
|
|
1440
|
+
icon: i(() => [_(p(J), null, {
|
|
1441
|
+
default: i(() => [_(p(Xt))]),
|
|
1439
1442
|
_: 1
|
|
1440
1443
|
})]),
|
|
1441
1444
|
_: 1
|
|
1442
1445
|
})]),
|
|
1443
|
-
default:
|
|
1446
|
+
default: i(() => [y[2] || (y[2] = I(" 列设置 ", -1))]),
|
|
1444
1447
|
_: 1
|
|
1445
1448
|
})]),
|
|
1446
|
-
default:
|
|
1449
|
+
default: i(() => [fe("div", $n, [fe("div", In, [y[4] || (y[4] = fe("span", null, "列设置", -1)), _(p(B), {
|
|
1447
1450
|
text: "",
|
|
1448
1451
|
size: "small",
|
|
1449
1452
|
type: "primary",
|
|
1450
1453
|
onClick: p(z)
|
|
1451
1454
|
}, {
|
|
1452
|
-
default:
|
|
1455
|
+
default: i(() => [...y[3] || (y[3] = [I(" 重置 ", -1)])]),
|
|
1453
1456
|
_: 1
|
|
1454
|
-
}, 8, ["onClick"])]),
|
|
1457
|
+
}, 8, ["onClick"])]), _(p(ke), {
|
|
1455
1458
|
value: p(S),
|
|
1456
1459
|
"onUpdate:value": y[0] || (y[0] = (h) => Gt(S) ? S.value = h : null)
|
|
1457
1460
|
}, {
|
|
1458
|
-
default:
|
|
1461
|
+
default: i(() => [_(p(H), {
|
|
1459
1462
|
vertical: "",
|
|
1460
1463
|
size: 8
|
|
1461
1464
|
}, {
|
|
1462
|
-
default:
|
|
1465
|
+
default: i(() => [(g(!0), K(W, null, X(p(q), (h) => (g(), N(p(Ge), {
|
|
1463
1466
|
key: h.key,
|
|
1464
1467
|
value: h.key,
|
|
1465
1468
|
label: h.title
|
|
@@ -1472,14 +1475,14 @@ var Rn = {
|
|
|
1472
1475
|
})) : j("", !0)
|
|
1473
1476
|
]),
|
|
1474
1477
|
_: 3
|
|
1475
|
-
})])) : j("", !0),
|
|
1478
|
+
})])) : j("", !0), _(p(mt), G({
|
|
1476
1479
|
ref_key: "dataTableRef",
|
|
1477
1480
|
ref: D,
|
|
1478
1481
|
data: e.data,
|
|
1479
1482
|
columns: p(M),
|
|
1480
1483
|
"row-key": L.value,
|
|
1481
1484
|
loading: e.loading,
|
|
1482
|
-
pagination: p(
|
|
1485
|
+
pagination: p(u),
|
|
1483
1486
|
remote: e.remote,
|
|
1484
1487
|
"checked-row-keys": e.checkedRowKeys,
|
|
1485
1488
|
"max-height": k.value
|
|
@@ -1538,18 +1541,18 @@ var Rn = {
|
|
|
1538
1541
|
"cancel"
|
|
1539
1542
|
],
|
|
1540
1543
|
setup(e, { expose: t, emit: r }) {
|
|
1541
|
-
const a = e, l = r, f = Te(),
|
|
1544
|
+
const a = e, l = r, f = Te(), o = Q(), C = $(() => a.title ? a.title : `${a.model[a.rowKey] ? "编辑" : "新增"}${a.subtitle}`), w = $(() => ({ width: typeof a.width == "number" ? `${a.width}px` : a.width })), v = () => {
|
|
1542
1545
|
l("update:show", !1), l("cancel");
|
|
1543
|
-
},
|
|
1546
|
+
}, b = async () => {
|
|
1544
1547
|
try {
|
|
1545
|
-
await
|
|
1548
|
+
await o.value?.validate(), l("confirm", a.model);
|
|
1546
1549
|
} catch {
|
|
1547
1550
|
}
|
|
1548
1551
|
};
|
|
1549
1552
|
return t({
|
|
1550
|
-
getFormRef: () =>
|
|
1551
|
-
validate: () =>
|
|
1552
|
-
resetFields: () =>
|
|
1553
|
+
getFormRef: () => o.value,
|
|
1554
|
+
validate: () => o.value?.validate(),
|
|
1555
|
+
resetFields: () => o.value?.resetFields()
|
|
1553
1556
|
}), (x, k) => (g(), N(p(Dt), G({
|
|
1554
1557
|
show: e.show,
|
|
1555
1558
|
preset: "card",
|
|
@@ -1559,24 +1562,24 @@ var Rn = {
|
|
|
1559
1562
|
}, p(f), { "onUpdate:show": k[0] || (k[0] = (D) => l("update:show", D)) }), se({ _: 2 }, [
|
|
1560
1563
|
x.$slots.header ? {
|
|
1561
1564
|
name: "header",
|
|
1562
|
-
fn:
|
|
1565
|
+
fn: i(() => [U(x.$slots, "header")]),
|
|
1563
1566
|
key: "0"
|
|
1564
1567
|
} : void 0,
|
|
1565
1568
|
x.$slots["header-extra"] ? {
|
|
1566
1569
|
name: "header-extra",
|
|
1567
|
-
fn:
|
|
1570
|
+
fn: i(() => [U(x.$slots, "header-extra")]),
|
|
1568
1571
|
key: "1"
|
|
1569
1572
|
} : void 0,
|
|
1570
1573
|
x.$slots.default ? {
|
|
1571
1574
|
name: "default",
|
|
1572
|
-
fn:
|
|
1575
|
+
fn: i(() => [U(x.$slots, "default")]),
|
|
1573
1576
|
key: "2"
|
|
1574
1577
|
} : {
|
|
1575
1578
|
name: "default",
|
|
1576
|
-
fn:
|
|
1577
|
-
default:
|
|
1579
|
+
fn: i(() => [_(p(Se), { show: e.loading }, {
|
|
1580
|
+
default: i(() => [_(p(he), {
|
|
1578
1581
|
ref_key: "formRef",
|
|
1579
|
-
ref:
|
|
1582
|
+
ref: o,
|
|
1580
1583
|
schemas: e.schemas,
|
|
1581
1584
|
model: e.model,
|
|
1582
1585
|
cols: e.cols,
|
|
@@ -1600,23 +1603,23 @@ var Rn = {
|
|
|
1600
1603
|
},
|
|
1601
1604
|
x.$slots.footer ? {
|
|
1602
1605
|
name: "footer",
|
|
1603
|
-
fn:
|
|
1606
|
+
fn: i(() => [U(x.$slots, "footer")]),
|
|
1604
1607
|
key: "4"
|
|
1605
1608
|
} : {
|
|
1606
1609
|
name: "footer",
|
|
1607
|
-
fn:
|
|
1608
|
-
default:
|
|
1610
|
+
fn: i(() => [_(p(H), { justify: "end" }, {
|
|
1611
|
+
default: i(() => [e.showCancel ? (g(), N(p(B), {
|
|
1609
1612
|
key: 0,
|
|
1610
1613
|
onClick: v
|
|
1611
1614
|
}, {
|
|
1612
|
-
default:
|
|
1615
|
+
default: i(() => [I(A(e.cancelText), 1)]),
|
|
1613
1616
|
_: 1
|
|
1614
|
-
})) : j("", !0),
|
|
1617
|
+
})) : j("", !0), _(p(B), {
|
|
1615
1618
|
type: "primary",
|
|
1616
1619
|
loading: e.loading,
|
|
1617
|
-
onClick:
|
|
1620
|
+
onClick: b
|
|
1618
1621
|
}, {
|
|
1619
|
-
default:
|
|
1622
|
+
default: i(() => [I(A(e.confirmText), 1)]),
|
|
1620
1623
|
_: 1
|
|
1621
1624
|
}, 8, ["loading"])]),
|
|
1622
1625
|
_: 1
|
|
@@ -1625,7 +1628,7 @@ var Rn = {
|
|
|
1625
1628
|
},
|
|
1626
1629
|
x.$slots.action ? {
|
|
1627
1630
|
name: "action",
|
|
1628
|
-
fn:
|
|
1631
|
+
fn: i(() => [U(x.$slots, "action")]),
|
|
1629
1632
|
key: "6"
|
|
1630
1633
|
} : void 0
|
|
1631
1634
|
]), 1040, [
|
|
@@ -1669,38 +1672,38 @@ var Rn = {
|
|
|
1669
1672
|
"cancel"
|
|
1670
1673
|
],
|
|
1671
1674
|
setup(e, { expose: t, emit: r }) {
|
|
1672
|
-
const a = e, l = r, f = Te(),
|
|
1675
|
+
const a = e, l = r, f = Te(), o = Q(), C = $(() => a.title ? a.title : `${a.model[a.rowKey] ? "编辑" : "新增"}${a.subtitle}`), w = () => {
|
|
1673
1676
|
l("update:show", !1), l("cancel");
|
|
1674
1677
|
}, v = async () => {
|
|
1675
1678
|
try {
|
|
1676
|
-
await
|
|
1679
|
+
await o.value?.validate(), l("confirm", a.model);
|
|
1677
1680
|
} catch {
|
|
1678
1681
|
}
|
|
1679
1682
|
};
|
|
1680
1683
|
return t({
|
|
1681
|
-
getFormRef: () =>
|
|
1682
|
-
validate: () =>
|
|
1683
|
-
resetFields: () =>
|
|
1684
|
-
}), (
|
|
1684
|
+
getFormRef: () => o.value,
|
|
1685
|
+
validate: () => o.value?.validate(),
|
|
1686
|
+
resetFields: () => o.value?.resetFields()
|
|
1687
|
+
}), (b, x) => (g(), N(p(gt), G({
|
|
1685
1688
|
show: e.show,
|
|
1686
1689
|
width: e.width,
|
|
1687
1690
|
placement: e.placement,
|
|
1688
1691
|
"mask-closable": !1
|
|
1689
1692
|
}, p(f), { "onUpdate:show": x[0] || (x[0] = (k) => l("update:show", k)) }), {
|
|
1690
|
-
default:
|
|
1693
|
+
default: i(() => [_(p(ht), {
|
|
1691
1694
|
title: C.value,
|
|
1692
1695
|
closable: "",
|
|
1693
1696
|
onClose: w
|
|
1694
|
-
}, se({ _: 2 }, [
|
|
1697
|
+
}, se({ _: 2 }, [b.$slots.default ? {
|
|
1695
1698
|
name: "default",
|
|
1696
|
-
fn:
|
|
1699
|
+
fn: i(() => [U(b.$slots, "default")]),
|
|
1697
1700
|
key: "0"
|
|
1698
1701
|
} : {
|
|
1699
1702
|
name: "default",
|
|
1700
|
-
fn:
|
|
1701
|
-
default:
|
|
1703
|
+
fn: i(() => [_(p(Se), { show: e.loading }, {
|
|
1704
|
+
default: i(() => [_(p(he), {
|
|
1702
1705
|
ref_key: "formRef",
|
|
1703
|
-
ref:
|
|
1706
|
+
ref: o,
|
|
1704
1707
|
schemas: e.schemas,
|
|
1705
1708
|
model: e.model,
|
|
1706
1709
|
cols: e.cols,
|
|
@@ -1721,25 +1724,25 @@ var Rn = {
|
|
|
1721
1724
|
_: 1
|
|
1722
1725
|
}, 8, ["show"])]),
|
|
1723
1726
|
key: "1"
|
|
1724
|
-
},
|
|
1727
|
+
}, b.$slots.footer ? {
|
|
1725
1728
|
name: "footer",
|
|
1726
|
-
fn:
|
|
1729
|
+
fn: i(() => [U(b.$slots, "footer")]),
|
|
1727
1730
|
key: "2"
|
|
1728
1731
|
} : {
|
|
1729
1732
|
name: "footer",
|
|
1730
|
-
fn:
|
|
1731
|
-
default:
|
|
1733
|
+
fn: i(() => [_(p(H), { justify: "end" }, {
|
|
1734
|
+
default: i(() => [e.showCancel ? (g(), N(p(B), {
|
|
1732
1735
|
key: 0,
|
|
1733
1736
|
onClick: w
|
|
1734
1737
|
}, {
|
|
1735
|
-
default:
|
|
1738
|
+
default: i(() => [I(A(e.cancelText), 1)]),
|
|
1736
1739
|
_: 1
|
|
1737
|
-
})) : j("", !0),
|
|
1740
|
+
})) : j("", !0), _(p(B), {
|
|
1738
1741
|
type: "primary",
|
|
1739
1742
|
loading: e.loading,
|
|
1740
1743
|
onClick: v
|
|
1741
1744
|
}, {
|
|
1742
|
-
default:
|
|
1745
|
+
default: i(() => [I(A(e.confirmText), 1)]),
|
|
1743
1746
|
_: 1
|
|
1744
1747
|
}, 8, ["loading"])]),
|
|
1745
1748
|
_: 1
|