dydx-naive-ui-for-vue 0.1.47 → 0.1.48
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/dydx-naive-ui-for-vue.js +165 -165
- package/dist/dydx-naive-ui-for-vue.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Mu } from "./resolver-BDxomgBZ.js";
|
|
2
|
-
import { NAutoComplete as Er, NButton as X, NCascader as Lr, NCheckbox as Ht, NCheckboxGroup as et, NColorPicker as Kr, NDataTable as Gr, NDatePicker as Vr, NDrawer as Hr, NDrawerContent as qr, NDropdown as Wr, NDynamicInput as Yr, NDynamicTags as Jr, NForm as Qr, NFormItem as Xr, NGrid as Zr, NGridItem as ea, NIcon as H, NImage as ta, NInput as ra, NInputNumber as aa, NMention as na, NModal as oa, NPopconfirm as la, NPopover as ia, NRadio as sa, NRadioButton as ua, NRadioGroup as
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import * as
|
|
2
|
+
import { NAutoComplete as Er, NButton as X, NCascader as Lr, NCheckbox as Ht, NCheckboxGroup as et, NColorPicker as Kr, NDataTable as Gr, NDatePicker as Vr, NDrawer as Hr, NDrawerContent as qr, NDropdown as Wr, NDynamicInput as Yr, NDynamicTags as Jr, NForm as Qr, NFormItem as Xr, NGrid as Zr, NGridItem as ea, NIcon as H, NImage as ta, NInput as ra, NInputNumber as aa, NMention as na, NModal as oa, NPopconfirm as la, NPopover as ia, NRadio as sa, NRadioButton as ua, NRadioGroup as Ne, NRate as da, NSelect as qt, NSlider as fa, NSpace as re, NSpin as tt, NSwitch as Wt, NTag as Ve, NText as ca, NTimePicker as pa, NTooltip as Be, NTreeSelect as ya, NUpload as Yt, NUploadDragger as ga, createDiscreteApi as va, useMessage as ma } from "naive-ui";
|
|
3
|
+
import { Fragment as te, computed as K, createBlock as P, createCommentVNode as Y, createElementBlock as Q, createElementVNode as Fe, createSlots as de, createTextVNode as E, createVNode as C, defineComponent as he, guardReactiveProps as ue, h as k, isRef as ba, mergeModels as vt, mergeProps as J, nextTick as ha, normalizeProps as le, onMounted as Jt, onUnmounted as _a, openBlock as h, ref as ae, renderList as ne, renderSlot as U, resolveDynamicComponent as me, toDisplayString as W, toHandlers as wa, unref as c, useAttrs as rt, useModel as Ca, watch as Qt, withCtx as s } from "vue";
|
|
4
|
+
import * as je from "@vicons/ionicons5";
|
|
5
5
|
import { AddOutline as Xt, CheckmarkOutline as Zt, CloseOutline as er, CloudUploadOutline as mt, CreateOutline as Ta, DownloadOutline as xa, EyeOutline as ka, HelpCircleOutline as Sa, OpenOutline as $a, RefreshOutline as tr, SearchOutline as Aa, SettingsOutline as Pa, TrashOutline as Oa } from "@vicons/ionicons5";
|
|
6
6
|
var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
7
7
|
name: "DydxUpload",
|
|
@@ -43,7 +43,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
43
43
|
"beforeUpload"
|
|
44
44
|
],
|
|
45
45
|
setup(e, { expose: t, emit: a }) {
|
|
46
|
-
const r = e, l = a, i = ma(), o =
|
|
46
|
+
const r = e, l = a, i = ma(), o = ae(), g = K(() => r.listType ? r.listType : r.uploadType === "image" ? "image-card" : "text"), v = K(() => r.urlPrefix ? r.fileList.map((x) => ({
|
|
47
47
|
...x,
|
|
48
48
|
url: x.url && !x.url.startsWith("http") ? r.urlPrefix + x.url : x.url
|
|
49
49
|
})) : r.fileList), p = K(() => {
|
|
@@ -54,7 +54,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
54
54
|
if (r.acceptTypes?.length) return r.acceptTypes.join(",");
|
|
55
55
|
if (r.uploadType === "image") return "image/*";
|
|
56
56
|
}), w = K(() => {
|
|
57
|
-
const { uploadType: x, fileList: D, customUpload: G, acceptTypes: f, maxSize:
|
|
57
|
+
const { uploadType: x, fileList: D, customUpload: G, acceptTypes: f, maxSize: N, maxCount: u, multiple: _, autoUpload: m, disabled: F, urlPrefix: V, showTip: O, showDragger: ye, ...ge } = r;
|
|
58
58
|
return ge;
|
|
59
59
|
}), S = (x) => {
|
|
60
60
|
l("update:fileList", r.urlPrefix ? x.map((D) => ({
|
|
@@ -73,9 +73,9 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
73
73
|
return D.type === G;
|
|
74
74
|
}) ? (i.error(`只支持 ${r.acceptTypes.join(", ")} 格式`), !1) : r.maxCount && r.fileList.length >= r.maxCount ? (l("exceed", [D]), i.error(`最多上传 ${r.maxCount} 个文件`), !1) : !0 : !0;
|
|
75
75
|
}, M = async (x) => {
|
|
76
|
-
const { file: D, onProgress: G, onFinish: f, onError:
|
|
76
|
+
const { file: D, onProgress: G, onFinish: f, onError: N } = x;
|
|
77
77
|
if (!r.customUpload) {
|
|
78
|
-
console.warn("DydxUpload: customUpload 方法未提供"),
|
|
78
|
+
console.warn("DydxUpload: customUpload 方法未提供"), N();
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
try {
|
|
@@ -83,7 +83,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
83
83
|
G({ percent: u });
|
|
84
84
|
}), D.status = "finished", f(), l("success", D);
|
|
85
85
|
} catch (u) {
|
|
86
|
-
|
|
86
|
+
N(), l("error", D, u);
|
|
87
87
|
}
|
|
88
88
|
}, L = () => {
|
|
89
89
|
o.value?.submit();
|
|
@@ -93,7 +93,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
93
93
|
openDialog: () => o.value?.openOpenFileDialog(),
|
|
94
94
|
clear: () => o.value?.clear()
|
|
95
95
|
}), (x, D) => {
|
|
96
|
-
const G = H, f = ca,
|
|
96
|
+
const G = H, f = ca, N = ga, u = X, _ = Yt;
|
|
97
97
|
return h(), Q("div", null, [
|
|
98
98
|
C(_, J({
|
|
99
99
|
ref_key: "uploadRef",
|
|
@@ -110,7 +110,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
110
110
|
"onUpdate:fileList": S,
|
|
111
111
|
onBeforeUpload: T
|
|
112
112
|
}), {
|
|
113
|
-
default: s(() => [e.showDragger && e.uploadType !== "image" ? (h(), P(
|
|
113
|
+
default: s(() => [e.showDragger && e.uploadType !== "image" ? (h(), P(N, { key: 0 }, {
|
|
114
114
|
default: s(() => [
|
|
115
115
|
Fe("div", Da, [C(G, {
|
|
116
116
|
size: "48",
|
|
@@ -185,7 +185,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
185
185
|
]);
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
}), ze = Fa,
|
|
188
|
+
}), ze = Fa, ja = /* @__PURE__ */ he({
|
|
189
189
|
name: "DydxIconSelect",
|
|
190
190
|
__name: "DydxIconSelect",
|
|
191
191
|
props: {
|
|
@@ -204,17 +204,17 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
204
204
|
},
|
|
205
205
|
emits: ["update:value"],
|
|
206
206
|
setup(e, { emit: t }) {
|
|
207
|
-
const a = e, r = t, l = Object.keys(
|
|
207
|
+
const a = e, r = t, l = Object.keys(je), i = K(() => {
|
|
208
208
|
let p = l;
|
|
209
209
|
return a.iconStyle === "outline" ? p = l.filter((y) => y.endsWith("Outline")) : a.iconStyle === "sharp" ? p = l.filter((y) => y.endsWith("Sharp")) : a.iconStyle === "filled" && (p = l.filter((y) => !y.endsWith("Outline") && !y.endsWith("Sharp"))), p.map((y) => ({
|
|
210
210
|
label: y,
|
|
211
211
|
value: y
|
|
212
212
|
}));
|
|
213
213
|
}), o = (p) => {
|
|
214
|
-
const y =
|
|
214
|
+
const y = je[p.value];
|
|
215
215
|
return y ? k("div", { style: "display: flex; align-items: center; gap: 8px;" }, [k(H, { size: 18 }, () => k(y)), k("span", { style: "flex: 1; overflow: hidden; text-overflow: ellipsis;" }, p.label)]) : k("span", p.label);
|
|
216
216
|
}, g = ({ option: p }) => {
|
|
217
|
-
const y =
|
|
217
|
+
const y = je[p.value];
|
|
218
218
|
return y ? k("div", { style: "display: flex; align-items: center; gap: 4px;" }, [k(H, { size: 16 }, () => k(y)), p.label]) : k("span", p.label);
|
|
219
219
|
}, v = (p) => {
|
|
220
220
|
r("update:value", p);
|
|
@@ -239,8 +239,8 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
239
239
|
"filterable"
|
|
240
240
|
]));
|
|
241
241
|
}
|
|
242
|
-
}), at =
|
|
243
|
-
const
|
|
242
|
+
}), at = ja;
|
|
243
|
+
const Ia = {
|
|
244
244
|
input: ra,
|
|
245
245
|
"input-number": aa,
|
|
246
246
|
select: qt,
|
|
@@ -248,8 +248,8 @@ const Na = {
|
|
|
248
248
|
"time-picker": pa,
|
|
249
249
|
switch: Wt,
|
|
250
250
|
slider: fa,
|
|
251
|
-
"radio-group":
|
|
252
|
-
"radio-button-group":
|
|
251
|
+
"radio-group": Ne,
|
|
252
|
+
"radio-button-group": Ne,
|
|
253
253
|
"checkbox-group": et,
|
|
254
254
|
cascader: Lr,
|
|
255
255
|
"tree-select": ya,
|
|
@@ -264,7 +264,7 @@ const Na = {
|
|
|
264
264
|
"file-upload": ze,
|
|
265
265
|
"icon-select": at
|
|
266
266
|
};
|
|
267
|
-
var
|
|
267
|
+
var Na = typeof global == "object" && global && global.Object === Object && global, rr = Na, Ba = typeof self == "object" && self && self.Object === Object && self, za = rr || Ba || Function("return this")(), oe = za, Ra = oe.Symbol, ie = Ra, ar = Object.prototype, Ua = ar.hasOwnProperty, Ma = ar.toString, $e = ie ? ie.toStringTag : void 0;
|
|
268
268
|
function Ea(e) {
|
|
269
269
|
var t = Ua.call(e, $e), a = e[$e];
|
|
270
270
|
try {
|
|
@@ -315,7 +315,7 @@ function un(e) {
|
|
|
315
315
|
var t = _e(e);
|
|
316
316
|
return t == on || t == ln || t == nn || t == sn;
|
|
317
317
|
}
|
|
318
|
-
var or = un, dn =
|
|
318
|
+
var or = un, dn = oe["__core-js_shared__"], He = dn, wt = (function() {
|
|
319
319
|
var e = /[^.]+$/.exec(He && He.keys && He.keys.IE_PROTO || "");
|
|
320
320
|
return e ? "Symbol(src)_1." + e : "";
|
|
321
321
|
})();
|
|
@@ -349,7 +349,7 @@ function Sn(e, t) {
|
|
|
349
349
|
var a = kn(e, t);
|
|
350
350
|
return Tn(a) ? a : void 0;
|
|
351
351
|
}
|
|
352
|
-
var pe = Sn, $n = pe(
|
|
352
|
+
var pe = Sn, $n = pe(oe, "WeakMap"), Ye = $n, Ct = Object.create, An = /* @__PURE__ */ (function() {
|
|
353
353
|
function e() {
|
|
354
354
|
}
|
|
355
355
|
return function(t) {
|
|
@@ -372,14 +372,14 @@ var Dn = On, Fn = (function() {
|
|
|
372
372
|
} catch {
|
|
373
373
|
}
|
|
374
374
|
})(), Tt = Fn;
|
|
375
|
-
function
|
|
375
|
+
function jn(e, t) {
|
|
376
376
|
for (var a = -1, r = e == null ? 0 : e.length; ++a < r && t(e[a], a, e) !== !1; ) ;
|
|
377
377
|
return e;
|
|
378
378
|
}
|
|
379
|
-
var
|
|
379
|
+
var In = jn, Nn = 9007199254740991, Bn = /^(?:0|[1-9]\d*)$/;
|
|
380
380
|
function zn(e, t) {
|
|
381
381
|
var a = typeof e;
|
|
382
|
-
return t = t ??
|
|
382
|
+
return t = t ?? Nn, !!t && (a == "number" || a != "symbol" && Bn.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
383
383
|
}
|
|
384
384
|
var lr = zn;
|
|
385
385
|
function Rn(e, t, a) {
|
|
@@ -439,7 +439,7 @@ var xt = Qn, fr = Object.prototype, Xn = fr.hasOwnProperty, Zn = fr.propertyIsEn
|
|
|
439
439
|
function ro() {
|
|
440
440
|
return !1;
|
|
441
441
|
}
|
|
442
|
-
var ao = ro, cr = typeof exports == "object" && exports && !exports.nodeType && exports, kt = cr && typeof module == "object" && module && !module.nodeType && module, St = kt && kt.exports === cr ?
|
|
442
|
+
var ao = ro, cr = typeof exports == "object" && exports && !exports.nodeType && exports, kt = cr && typeof module == "object" && module && !module.nodeType && module, St = kt && kt.exports === cr ? oe.Buffer : void 0, no = (St ? St.isBuffer : void 0) || ao, pr = no, oo = "[object Arguments]", lo = "[object Array]", io = "[object Boolean]", so = "[object Date]", uo = "[object Error]", fo = "[object Function]", co = "[object Map]", po = "[object Number]", yo = "[object Object]", go = "[object RegExp]", vo = "[object Set]", mo = "[object String]", bo = "[object WeakMap]", ho = "[object ArrayBuffer]", _o = "[object DataView]", wo = "[object Float32Array]", Co = "[object Float64Array]", To = "[object Int8Array]", xo = "[object Int16Array]", ko = "[object Int32Array]", So = "[object Uint8Array]", $o = "[object Uint8ClampedArray]", Ao = "[object Uint16Array]", Po = "[object Uint32Array]", R = {};
|
|
443
443
|
R[wo] = R[Co] = R[To] = R[xo] = R[ko] = R[So] = R[$o] = R[Ao] = R[Po] = !0;
|
|
444
444
|
R[oo] = R[lo] = R[ho] = R[io] = R[_o] = R[so] = R[uo] = R[fo] = R[co] = R[po] = R[yo] = R[go] = R[vo] = R[mo] = R[bo] = !1;
|
|
445
445
|
function Oo(e) {
|
|
@@ -451,15 +451,15 @@ function Fo(e) {
|
|
|
451
451
|
return e(t);
|
|
452
452
|
};
|
|
453
453
|
}
|
|
454
|
-
var it = Fo, yr = typeof exports == "object" && exports && !exports.nodeType && exports, Ae = yr && typeof module == "object" && module && !module.nodeType && module, qe = Ae && Ae.exports === yr && rr.process,
|
|
454
|
+
var it = Fo, yr = typeof exports == "object" && exports && !exports.nodeType && exports, Ae = yr && typeof module == "object" && module && !module.nodeType && module, qe = Ae && Ae.exports === yr && rr.process, jo = (function() {
|
|
455
455
|
try {
|
|
456
456
|
var e = Ae && Ae.require && Ae.require("util").types;
|
|
457
457
|
return e || qe && qe.binding && qe.binding("util");
|
|
458
458
|
} catch {
|
|
459
459
|
}
|
|
460
|
-
})(), be =
|
|
460
|
+
})(), be = jo, $t = be && be.isTypedArray, Io = $t ? it($t) : Do, No = Io, Bo = Object.prototype.hasOwnProperty;
|
|
461
461
|
function zo(e, t) {
|
|
462
|
-
var a = Ce(e), r = !a && to(e), l = !a && !r && pr(e), i = !a && !r && !l &&
|
|
462
|
+
var a = Ce(e), r = !a && to(e), l = !a && !r && pr(e), i = !a && !r && !l && No(e), o = a || r || l || i, g = o ? Yn(e.length, String) : [], v = g.length;
|
|
463
463
|
for (var p in e) (t || Bo.call(e, p)) && !(o && (p == "length" || l && (p == "offset" || p == "parent") || i && (p == "buffer" || p == "byteLength" || p == "byteOffset") || lr(p, v))) && g.push(p);
|
|
464
464
|
return g;
|
|
465
465
|
}
|
|
@@ -585,7 +585,7 @@ xe.prototype.delete = wl;
|
|
|
585
585
|
xe.prototype.get = Tl;
|
|
586
586
|
xe.prototype.has = kl;
|
|
587
587
|
xe.prototype.set = $l;
|
|
588
|
-
var Me = xe, Al = pe(
|
|
588
|
+
var Me = xe, Al = pe(oe, "Map"), Oe = Al;
|
|
589
589
|
function Pl() {
|
|
590
590
|
this.size = 0, this.__data__ = {
|
|
591
591
|
hash: new At(),
|
|
@@ -599,16 +599,16 @@ function Dl(e) {
|
|
|
599
599
|
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
600
600
|
}
|
|
601
601
|
var Fl = Dl;
|
|
602
|
-
function
|
|
602
|
+
function jl(e, t) {
|
|
603
603
|
var a = e.__data__;
|
|
604
604
|
return Fl(t) ? a[typeof t == "string" ? "string" : "hash"] : a.map;
|
|
605
605
|
}
|
|
606
|
-
var Ee =
|
|
607
|
-
function
|
|
606
|
+
var Ee = jl;
|
|
607
|
+
function Il(e) {
|
|
608
608
|
var t = Ee(this, e).delete(e);
|
|
609
609
|
return this.size -= t ? 1 : 0, t;
|
|
610
610
|
}
|
|
611
|
-
var
|
|
611
|
+
var Nl = Il;
|
|
612
612
|
function Bl(e) {
|
|
613
613
|
return Ee(this, e).get(e);
|
|
614
614
|
}
|
|
@@ -630,7 +630,7 @@ function ke(e) {
|
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
ke.prototype.clear = Ol;
|
|
633
|
-
ke.prototype.delete =
|
|
633
|
+
ke.prototype.delete = Nl;
|
|
634
634
|
ke.prototype.get = zl;
|
|
635
635
|
ke.prototype.has = Ul;
|
|
636
636
|
ke.prototype.set = El;
|
|
@@ -733,7 +733,7 @@ var wi = _i;
|
|
|
733
733
|
function Ci(e, t) {
|
|
734
734
|
return e && Re(t, ut(t), e);
|
|
735
735
|
}
|
|
736
|
-
var Ti = Ci, wr = typeof exports == "object" && exports && !exports.nodeType && exports, Pt = wr && typeof module == "object" && module && !module.nodeType && module, Ot = Pt && Pt.exports === wr ?
|
|
736
|
+
var Ti = Ci, wr = typeof exports == "object" && exports && !exports.nodeType && exports, Pt = wr && typeof module == "object" && module && !module.nodeType && module, Ot = Pt && Pt.exports === wr ? oe.Buffer : void 0, Dt = Ot ? Ot.allocUnsafe : void 0;
|
|
737
737
|
function xi(e, t) {
|
|
738
738
|
if (t) return e.slice();
|
|
739
739
|
var a = e.length, r = Dt ? Dt(a) : new e.constructor(a);
|
|
@@ -759,15 +759,15 @@ var Cr = Ai, Pi = Object.prototype.propertyIsEnumerable, Ft = Object.getOwnPrope
|
|
|
759
759
|
function Di(e, t) {
|
|
760
760
|
return Re(e, ct(e), t);
|
|
761
761
|
}
|
|
762
|
-
var Fi = Di,
|
|
762
|
+
var Fi = Di, ji = Object.getOwnPropertySymbols ? function(e) {
|
|
763
763
|
for (var t = []; e; )
|
|
764
764
|
hr(t, ct(e)), e = _r(e);
|
|
765
765
|
return t;
|
|
766
|
-
} : Cr, Tr =
|
|
767
|
-
function
|
|
766
|
+
} : Cr, Tr = ji;
|
|
767
|
+
function Ii(e, t) {
|
|
768
768
|
return Re(e, Tr(e), t);
|
|
769
769
|
}
|
|
770
|
-
var
|
|
770
|
+
var Ni = Ii;
|
|
771
771
|
function Bi(e, t, a) {
|
|
772
772
|
var r = t(e);
|
|
773
773
|
return Ce(e) ? r : hr(r, a(e));
|
|
@@ -780,18 +780,18 @@ var Ri = zi;
|
|
|
780
780
|
function Ui(e) {
|
|
781
781
|
return xr(e, ut, Tr);
|
|
782
782
|
}
|
|
783
|
-
var Mi = Ui, Ei = pe(
|
|
784
|
-
(Je && se(new Je(/* @__PURE__ */ new ArrayBuffer(1))) != zt || Oe && se(new Oe()) !=
|
|
783
|
+
var Mi = Ui, Ei = pe(oe, "DataView"), Je = Ei, Li = pe(oe, "Promise"), Qe = Li, Ki = pe(oe, "Set"), Xe = Ki, jt = "[object Map]", Gi = "[object Object]", It = "[object Promise]", Nt = "[object Set]", Bt = "[object WeakMap]", zt = "[object DataView]", Vi = ce(Je), Hi = ce(Oe), qi = ce(Qe), Wi = ce(Xe), Yi = ce(Ye), se = _e;
|
|
784
|
+
(Je && se(new Je(/* @__PURE__ */ new ArrayBuffer(1))) != zt || Oe && se(new Oe()) != jt || Qe && se(Qe.resolve()) != It || Xe && se(new Xe()) != Nt || Ye && se(new Ye()) != Bt) && (se = function(e) {
|
|
785
785
|
var t = _e(e), a = t == Gi ? e.constructor : void 0, r = a ? ce(a) : "";
|
|
786
786
|
if (r) switch (r) {
|
|
787
787
|
case Vi:
|
|
788
788
|
return zt;
|
|
789
789
|
case Hi:
|
|
790
|
-
return
|
|
790
|
+
return jt;
|
|
791
791
|
case qi:
|
|
792
|
-
return
|
|
792
|
+
return It;
|
|
793
793
|
case Wi:
|
|
794
|
-
return
|
|
794
|
+
return Nt;
|
|
795
795
|
case Yi:
|
|
796
796
|
return Bt;
|
|
797
797
|
}
|
|
@@ -802,7 +802,7 @@ function Qi(e) {
|
|
|
802
802
|
var t = e.length, a = new e.constructor(t);
|
|
803
803
|
return t && typeof e[0] == "string" && Ji.call(e, "index") && (a.index = e.index, a.input = e.input), a;
|
|
804
804
|
}
|
|
805
|
-
var Xi = Qi, Zi =
|
|
805
|
+
var Xi = Qi, Zi = oe.Uint8Array, Rt = Zi;
|
|
806
806
|
function es(e) {
|
|
807
807
|
var t = new e.constructor(e.byteLength);
|
|
808
808
|
return new Rt(t).set(new Rt(e)), t;
|
|
@@ -864,18 +864,18 @@ var Os = Ps;
|
|
|
864
864
|
function Ds(e) {
|
|
865
865
|
return typeof e.constructor == "function" && !lt(e) ? Pn(_r(e)) : {};
|
|
866
866
|
}
|
|
867
|
-
var Fs = Ds,
|
|
868
|
-
function
|
|
869
|
-
return we(e) && pt(e) ==
|
|
867
|
+
var Fs = Ds, js = "[object Map]";
|
|
868
|
+
function Is(e) {
|
|
869
|
+
return we(e) && pt(e) == js;
|
|
870
870
|
}
|
|
871
|
-
var
|
|
871
|
+
var Ns = Is, Et = be && be.isMap, Bs = Et ? it(Et) : Ns, zs = Bs, Rs = "[object Set]";
|
|
872
872
|
function Us(e) {
|
|
873
873
|
return we(e) && pt(e) == Rs;
|
|
874
874
|
}
|
|
875
875
|
var Ms = Us, Lt = be && be.isSet, Es = Lt ? it(Lt) : Ms, Ls = Es, Ks = 1, Gs = 2, Vs = 4, kr = "[object Arguments]", Hs = "[object Array]", qs = "[object Boolean]", Ws = "[object Date]", Ys = "[object Error]", Sr = "[object Function]", Js = "[object GeneratorFunction]", Qs = "[object Map]", Xs = "[object Number]", $r = "[object Object]", Zs = "[object RegExp]", eu = "[object Set]", tu = "[object String]", ru = "[object Symbol]", au = "[object WeakMap]", nu = "[object ArrayBuffer]", ou = "[object DataView]", lu = "[object Float32Array]", iu = "[object Float64Array]", su = "[object Int8Array]", uu = "[object Int16Array]", du = "[object Int32Array]", fu = "[object Uint8Array]", cu = "[object Uint8ClampedArray]", pu = "[object Uint16Array]", yu = "[object Uint32Array]", z = {};
|
|
876
876
|
z[kr] = z[Hs] = z[nu] = z[ou] = z[qs] = z[Ws] = z[lu] = z[iu] = z[su] = z[uu] = z[du] = z[Qs] = z[Xs] = z[$r] = z[Zs] = z[eu] = z[tu] = z[ru] = z[fu] = z[cu] = z[pu] = z[yu] = !0;
|
|
877
877
|
z[Ys] = z[Sr] = z[au] = !1;
|
|
878
|
-
function
|
|
878
|
+
function Ie(e, t, a, r, l, i) {
|
|
879
879
|
var o, g = t & Ks, v = t & Gs, p = t & Vs;
|
|
880
880
|
if (a && (o = l ? a(e, r, l, i) : a(e)), o !== void 0) return o;
|
|
881
881
|
if (!fe(e)) return e;
|
|
@@ -886,7 +886,7 @@ function Ne(e, t, a, r, l, i) {
|
|
|
886
886
|
var w = pt(e), S = w == Sr || w == Js;
|
|
887
887
|
if (pr(e)) return ki(e, g);
|
|
888
888
|
if (w == $r || w == kr || S && !l) {
|
|
889
|
-
if (o = v || S ? {} : Fs(e), !g) return v ?
|
|
889
|
+
if (o = v || S ? {} : Fs(e), !g) return v ? Ni(e, Ti(o, e)) : Fi(e, wi(o, e));
|
|
890
890
|
} else {
|
|
891
891
|
if (!z[w]) return l ? e : {};
|
|
892
892
|
o = Os(e, w, g);
|
|
@@ -896,16 +896,16 @@ function Ne(e, t, a, r, l, i) {
|
|
|
896
896
|
var T = i.get(e);
|
|
897
897
|
if (T) return T;
|
|
898
898
|
i.set(e, o), Ls(e) ? e.forEach(function(L) {
|
|
899
|
-
o.add(
|
|
899
|
+
o.add(Ie(L, t, a, L, e, i));
|
|
900
900
|
}) : zs(e) && e.forEach(function(L, x) {
|
|
901
|
-
o.set(x,
|
|
901
|
+
o.set(x, Ie(L, t, a, x, e, i));
|
|
902
902
|
});
|
|
903
903
|
var M = y ? void 0 : (p ? v ? Mi : Ri : v ? ut : st)(e);
|
|
904
|
-
return
|
|
905
|
-
M && (x = L, L = e[x]), ot(o, x,
|
|
904
|
+
return In(M || e, function(L, x) {
|
|
905
|
+
M && (x = L, L = e[x]), ot(o, x, Ie(L, t, a, x, e, i));
|
|
906
906
|
}), o;
|
|
907
907
|
}
|
|
908
|
-
var gu =
|
|
908
|
+
var gu = Ie, vu = 1, mu = 4;
|
|
909
909
|
function bu(e) {
|
|
910
910
|
return gu(e, vu | mu);
|
|
911
911
|
}
|
|
@@ -988,7 +988,7 @@ var xu = /* @__PURE__ */ he({
|
|
|
988
988
|
"validate"
|
|
989
989
|
], ["update:model"]),
|
|
990
990
|
setup(e, { expose: t, emit: a }) {
|
|
991
|
-
const r = e, l = a, i = Ca(e, "model"), o =
|
|
991
|
+
const r = e, l = a, i = Ca(e, "model"), o = ae(), g = ae({}), v = ae();
|
|
992
992
|
let p = !1;
|
|
993
993
|
Jt(() => {
|
|
994
994
|
!p && i.value && (v.value = Kt(i.value), p = !0);
|
|
@@ -1026,18 +1026,18 @@ var xu = /* @__PURE__ */ he({
|
|
|
1026
1026
|
responsive: "self"
|
|
1027
1027
|
})), L = (n) => {
|
|
1028
1028
|
const b = n.type || "input";
|
|
1029
|
-
return b === "custom" ? n.component :
|
|
1029
|
+
return b === "custom" ? n.component : Ia[b];
|
|
1030
1030
|
}, x = (n) => typeof n.disabled == "function" ? n.disabled(i.value) : n.disabled, D = (n) => {
|
|
1031
1031
|
const b = { ...n.props };
|
|
1032
1032
|
if (b.placeholder !== void 0) return b;
|
|
1033
|
-
const
|
|
1034
|
-
if (!
|
|
1035
|
-
const q = n.type || "input",
|
|
1033
|
+
const I = typeof n.label == "string" ? n.label : "";
|
|
1034
|
+
if (!I) return b;
|
|
1035
|
+
const q = n.type || "input", ee = [
|
|
1036
1036
|
"input",
|
|
1037
1037
|
"textarea",
|
|
1038
1038
|
"input-number",
|
|
1039
1039
|
"dynamic-input"
|
|
1040
|
-
],
|
|
1040
|
+
], Z = [
|
|
1041
1041
|
"select",
|
|
1042
1042
|
"cascader",
|
|
1043
1043
|
"tree-select",
|
|
@@ -1045,7 +1045,7 @@ var xu = /* @__PURE__ */ he({
|
|
|
1045
1045
|
"time-picker",
|
|
1046
1046
|
"color-picker"
|
|
1047
1047
|
];
|
|
1048
|
-
return
|
|
1048
|
+
return ee.includes(q) ? b.placeholder = `请输入${I}` : Z.includes(q) && (b.placeholder = `请选择${I}`), b;
|
|
1049
1049
|
}, G = (n) => {
|
|
1050
1050
|
const b = n.type === "custom" ? "modelValue" : "value";
|
|
1051
1051
|
return {
|
|
@@ -1055,9 +1055,9 @@ var xu = /* @__PURE__ */ he({
|
|
|
1055
1055
|
ref: V(n)
|
|
1056
1056
|
};
|
|
1057
1057
|
}, f = (n) => {
|
|
1058
|
-
const b = n.type === "custom" ? "modelValue" : "value",
|
|
1059
|
-
return { [n.modelEventName || `update:${
|
|
1060
|
-
},
|
|
1058
|
+
const b = n.type === "custom" ? "modelValue" : "value", I = n.modelPropName || b;
|
|
1059
|
+
return { [n.modelEventName || `update:${I}`]: (q) => m(n.name, q) };
|
|
1060
|
+
}, N = (n) => {
|
|
1061
1061
|
if (!n) return {};
|
|
1062
1062
|
const b = { ...n };
|
|
1063
1063
|
return delete b.options, delete b.labelField, delete b.valueField, b;
|
|
@@ -1071,17 +1071,17 @@ var xu = /* @__PURE__ */ he({
|
|
|
1071
1071
|
b ? g.value[n] = b : delete g.value[n];
|
|
1072
1072
|
}, V = (n) => {
|
|
1073
1073
|
const b = n.name;
|
|
1074
|
-
return n.ref ? typeof n.ref == "function" ? (
|
|
1075
|
-
F(b,
|
|
1076
|
-
} : (
|
|
1077
|
-
F(b,
|
|
1078
|
-
} : (
|
|
1074
|
+
return n.ref ? typeof n.ref == "function" ? (I) => {
|
|
1075
|
+
F(b, I), n.ref(I);
|
|
1076
|
+
} : (I) => {
|
|
1077
|
+
F(b, I), n.ref.value = I;
|
|
1078
|
+
} : (I) => F(b, I);
|
|
1079
1079
|
}, O = (n) => {
|
|
1080
1080
|
let b = typeof n.rule == "function" ? n.rule(i.value) : n.rule;
|
|
1081
|
-
const
|
|
1082
|
-
if (
|
|
1081
|
+
const I = !n.noRequired && !r.disableDefaultRequired;
|
|
1082
|
+
if (I) {
|
|
1083
1083
|
const q = {
|
|
1084
|
-
validator: (
|
|
1084
|
+
validator: (ee, Z) => Z == null || Z === "" ? /* @__PURE__ */ new Error(`${typeof n.label == "string" ? n.label : "此项"}不能为空`) : Array.isArray(Z) && Z.length === 0 ? /* @__PURE__ */ new Error(`${typeof n.label == "string" ? n.label : "此项"}不能为空`) : typeof Z == "object" && Z !== null && !Array.isArray(Z) && Object.keys(Z).length === 0 ? /* @__PURE__ */ new Error(`${typeof n.label == "string" ? n.label : "此项"}不能为空`) : !0,
|
|
1085
1085
|
trigger: "blur"
|
|
1086
1086
|
};
|
|
1087
1087
|
b ? b = Array.isArray(b) ? [q, ...b] : [q, b] : b = q;
|
|
@@ -1089,7 +1089,7 @@ var xu = /* @__PURE__ */ he({
|
|
|
1089
1089
|
return {
|
|
1090
1090
|
label: typeof n.label == "string" ? n.label : void 0,
|
|
1091
1091
|
rule: b,
|
|
1092
|
-
showRequireMark:
|
|
1092
|
+
showRequireMark: I,
|
|
1093
1093
|
contentClass: n.contentClass,
|
|
1094
1094
|
contentStyle: n.contentStyle,
|
|
1095
1095
|
feedback: n.feedback,
|
|
@@ -1121,9 +1121,9 @@ var xu = /* @__PURE__ */ he({
|
|
|
1121
1121
|
if (typeof n == "number" || typeof n == "string") return n;
|
|
1122
1122
|
if (typeof n == "object") {
|
|
1123
1123
|
const b = [];
|
|
1124
|
-
return Object.entries(ye).forEach(([
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1124
|
+
return Object.entries(ye).forEach(([I, q]) => {
|
|
1125
|
+
const ee = n[I];
|
|
1126
|
+
ee !== void 0 && b.push(`${q}:${ee}`);
|
|
1127
1127
|
}), b.length === 0 ? 24 : b.join(" ");
|
|
1128
1128
|
}
|
|
1129
1129
|
return 24;
|
|
@@ -1133,13 +1133,13 @@ var xu = /* @__PURE__ */ he({
|
|
|
1133
1133
|
}), $ = async (...n) => {
|
|
1134
1134
|
await o.value.validate(...n);
|
|
1135
1135
|
}, A = async (n, b) => {
|
|
1136
|
-
const
|
|
1137
|
-
await o.value.validate(b, (q) =>
|
|
1138
|
-
},
|
|
1139
|
-
if (
|
|
1136
|
+
const I = Array.isArray(n) ? n : [n];
|
|
1137
|
+
await o.value.validate(b, (q) => I.some((ee) => q.key === ee));
|
|
1138
|
+
}, j = () => o.value?.restoreValidation(), ve = () => {
|
|
1139
|
+
if (j(), v.value !== void 0) {
|
|
1140
1140
|
const n = Kt(v.value), b = i.value;
|
|
1141
|
-
(/* @__PURE__ */ new Set([...Object.keys(b), ...Object.keys(n)])).forEach((
|
|
1142
|
-
b[
|
|
1141
|
+
(/* @__PURE__ */ new Set([...Object.keys(b), ...Object.keys(n)])).forEach((I) => {
|
|
1142
|
+
b[I] = I in n ? n[I] : null;
|
|
1143
1143
|
});
|
|
1144
1144
|
}
|
|
1145
1145
|
l("reset");
|
|
@@ -1156,7 +1156,7 @@ var xu = /* @__PURE__ */ he({
|
|
|
1156
1156
|
formRef: o.value,
|
|
1157
1157
|
validate: $,
|
|
1158
1158
|
validateField: A,
|
|
1159
|
-
restoreValidation:
|
|
1159
|
+
restoreValidation: j,
|
|
1160
1160
|
getFormData: () => i.value,
|
|
1161
1161
|
setFormData: (n) => {
|
|
1162
1162
|
i.value = {
|
|
@@ -1171,8 +1171,8 @@ var xu = /* @__PURE__ */ he({
|
|
|
1171
1171
|
getFieldComponentRef: (n) => g.value[n],
|
|
1172
1172
|
getFieldComponentRefs: () => ({ ...g.value })
|
|
1173
1173
|
}), (n, b) => {
|
|
1174
|
-
const
|
|
1175
|
-
return h(), Q(
|
|
1174
|
+
const I = Xr, q = ea, ee = X, Z = Zr, De = Qr;
|
|
1175
|
+
return h(), Q(te, null, [
|
|
1176
1176
|
U(n.$slots, "header", { model: i.value }, void 0, !0),
|
|
1177
1177
|
C(c(tt), { show: r.loading }, {
|
|
1178
1178
|
default: s(() => [C(De, J({
|
|
@@ -1180,13 +1180,13 @@ var xu = /* @__PURE__ */ he({
|
|
|
1180
1180
|
ref: o,
|
|
1181
1181
|
model: i.value
|
|
1182
1182
|
}, T.value), {
|
|
1183
|
-
default: s(() => [C(
|
|
1184
|
-
default: s(() => [(h(!0), Q(
|
|
1183
|
+
default: s(() => [C(Z, le(ue(M.value)), {
|
|
1184
|
+
default: s(() => [(h(!0), Q(te, null, ne(S.value, (d) => (h(), P(q, J({ key: d.name }, { ref_for: !0 }, gt(d)), {
|
|
1185
1185
|
default: s(() => [d.type === "slot" ? U(n.$slots, d.slot || d.name, {
|
|
1186
1186
|
key: 0,
|
|
1187
1187
|
model: i.value,
|
|
1188
1188
|
schema: d
|
|
1189
|
-
}, void 0, !0) : (h(), P(
|
|
1189
|
+
}, void 0, !0) : (h(), P(I, J({
|
|
1190
1190
|
key: 1,
|
|
1191
1191
|
path: d.name
|
|
1192
1192
|
}, { ref_for: !0 }, O(d)), de({
|
|
@@ -1195,16 +1195,16 @@ var xu = /* @__PURE__ */ he({
|
|
|
1195
1195
|
schema: d,
|
|
1196
1196
|
value: _(d.name),
|
|
1197
1197
|
setValue: (B) => m(d.name, B)
|
|
1198
|
-
}, () => [d.type === "radio-group" && d.props?.options ? (h(), P(c(
|
|
1198
|
+
}, () => [d.type === "radio-group" && d.props?.options ? (h(), P(c(Ne), J({
|
|
1199
1199
|
key: 0,
|
|
1200
1200
|
value: _(d.name),
|
|
1201
1201
|
"onUpdate:value": (B) => m(d.name, B)
|
|
1202
|
-
}, { ref_for: !0 },
|
|
1202
|
+
}, { ref_for: !0 }, N(d.props), {
|
|
1203
1203
|
ref_for: !0,
|
|
1204
1204
|
ref: V(d)
|
|
1205
1205
|
}), {
|
|
1206
|
-
default: s(() => [C(c(
|
|
1207
|
-
default: s(() => [(h(!0), Q(
|
|
1206
|
+
default: s(() => [C(c(re), null, {
|
|
1207
|
+
default: s(() => [(h(!0), Q(te, null, ne(d.props.options, (B) => (h(), P(c(sa), {
|
|
1208
1208
|
key: B[d.props.valueField || "value"],
|
|
1209
1209
|
value: B[d.props.valueField || "value"],
|
|
1210
1210
|
disabled: B.disabled
|
|
@@ -1215,15 +1215,15 @@ var xu = /* @__PURE__ */ he({
|
|
|
1215
1215
|
_: 2
|
|
1216
1216
|
}, 1024)]),
|
|
1217
1217
|
_: 2
|
|
1218
|
-
}, 1040, ["value", "onUpdate:value"])) : d.type === "radio-button-group" && d.props?.options ? (h(), P(c(
|
|
1218
|
+
}, 1040, ["value", "onUpdate:value"])) : d.type === "radio-button-group" && d.props?.options ? (h(), P(c(Ne), J({
|
|
1219
1219
|
key: 1,
|
|
1220
1220
|
value: _(d.name),
|
|
1221
1221
|
"onUpdate:value": (B) => m(d.name, B)
|
|
1222
|
-
}, { ref_for: !0 },
|
|
1222
|
+
}, { ref_for: !0 }, N(d.props), {
|
|
1223
1223
|
ref_for: !0,
|
|
1224
1224
|
ref: V(d)
|
|
1225
1225
|
}), {
|
|
1226
|
-
default: s(() => [(h(!0), Q(
|
|
1226
|
+
default: s(() => [(h(!0), Q(te, null, ne(d.props.options, (B) => (h(), P(c(ua), {
|
|
1227
1227
|
key: B[d.props.valueField || "value"],
|
|
1228
1228
|
value: B[d.props.valueField || "value"],
|
|
1229
1229
|
disabled: B.disabled
|
|
@@ -1236,12 +1236,12 @@ var xu = /* @__PURE__ */ he({
|
|
|
1236
1236
|
key: 2,
|
|
1237
1237
|
value: _(d.name),
|
|
1238
1238
|
"onUpdate:value": (B) => m(d.name, B)
|
|
1239
|
-
}, { ref_for: !0 },
|
|
1239
|
+
}, { ref_for: !0 }, N(d.props), {
|
|
1240
1240
|
ref_for: !0,
|
|
1241
1241
|
ref: V(d)
|
|
1242
1242
|
}), {
|
|
1243
|
-
default: s(() => [C(c(
|
|
1244
|
-
default: s(() => [(h(!0), Q(
|
|
1243
|
+
default: s(() => [C(c(re), null, {
|
|
1244
|
+
default: s(() => [(h(!0), Q(te, null, ne(d.props.options, (B) => (h(), P(c(Ht), {
|
|
1245
1245
|
key: B[d.props.valueField || "value"],
|
|
1246
1246
|
value: B[d.props.valueField || "value"],
|
|
1247
1247
|
disabled: B.disabled
|
|
@@ -1285,7 +1285,7 @@ var xu = /* @__PURE__ */ he({
|
|
|
1285
1285
|
_: 2
|
|
1286
1286
|
}, [typeof d.label == "function" || d.help ? {
|
|
1287
1287
|
name: "label",
|
|
1288
|
-
fn: s(() => [typeof d.label == "function" ? (h(), P(me(d.label), { key: 0 })) : (h(), Q(
|
|
1288
|
+
fn: s(() => [typeof d.label == "function" ? (h(), P(me(d.label), { key: 0 })) : (h(), Q(te, { key: 1 }, [E(W(d.label), 1)], 64)), d.help ? (h(), P(c(Be), {
|
|
1289
1289
|
key: 2,
|
|
1290
1290
|
trigger: "hover"
|
|
1291
1291
|
}, {
|
|
@@ -1310,17 +1310,17 @@ var xu = /* @__PURE__ */ he({
|
|
|
1310
1310
|
model: i.value,
|
|
1311
1311
|
validate: $,
|
|
1312
1312
|
reset: ve
|
|
1313
|
-
}, () => [C(c(
|
|
1313
|
+
}, () => [C(c(re), { justify: r.footerAlign }, {
|
|
1314
1314
|
default: s(() => [
|
|
1315
|
-
w.value.hidden ? Y("", !0) : (h(), P(
|
|
1315
|
+
w.value.hidden ? Y("", !0) : (h(), P(ee, J({ key: 0 }, u(w.value), { onClick: Ge }), {
|
|
1316
1316
|
default: s(() => [E(W(w.value.text), 1)]),
|
|
1317
1317
|
_: 1
|
|
1318
1318
|
}, 16)),
|
|
1319
|
-
y.value.hidden ? Y("", !0) : (h(), P(
|
|
1319
|
+
y.value.hidden ? Y("", !0) : (h(), P(ee, J({ key: 1 }, u(y.value), { onClick: Ke }), {
|
|
1320
1320
|
default: s(() => [E(W(y.value.text), 1)]),
|
|
1321
1321
|
_: 1
|
|
1322
1322
|
}, 16)),
|
|
1323
|
-
(h(!0), Q(
|
|
1323
|
+
(h(!0), Q(te, null, ne(r.extraButtons, (d) => (h(), P(ee, {
|
|
1324
1324
|
key: d.text,
|
|
1325
1325
|
type: d.type,
|
|
1326
1326
|
size: d.size,
|
|
@@ -1354,7 +1354,7 @@ var xu = /* @__PURE__ */ he({
|
|
|
1354
1354
|
const a = e.__vccOpts || e;
|
|
1355
1355
|
for (const [r, l] of t) a[r] = l;
|
|
1356
1356
|
return a;
|
|
1357
|
-
}, Le = /* @__PURE__ */ Ar(xu, [["__scopeId", "data-v-
|
|
1357
|
+
}, Le = /* @__PURE__ */ Ar(xu, [["__scopeId", "data-v-685aaa7c"]]);
|
|
1358
1358
|
function ku(e) {
|
|
1359
1359
|
const { maxVisible: t = -1, buttons: a = [], showView: r = !1, showEdit: l = !0, showDelete: i = !0, viewConfig: o, editConfig: g, deleteConfig: v, onView: p, onEdit: y, onDelete: w } = e, S = (u, _, m, F) => _ ? u ? typeof u.show == "function" ? u.show(m, F) : u.show !== !1 : !0 : !1, T = (u, _, m) => u ? typeof u.disabled == "function" ? u.disabled(_, m) : u.disabled === !0 : !1, M = (u, _, m) => typeof u.show == "function" ? u.show(_, m) : u.show !== !1, L = (u, _, m) => typeof u.disabled == "function" ? u.disabled(_, m) : u.disabled === !0, x = (u, _, m = "确认操作") => {
|
|
1360
1360
|
if (u) {
|
|
@@ -1485,13 +1485,13 @@ function ku(e) {
|
|
|
1485
1485
|
icon: O.icon,
|
|
1486
1486
|
onClick: () => O.onClick?.(u, _)
|
|
1487
1487
|
});
|
|
1488
|
-
}), t === -1 || m.length <= t) return k(
|
|
1488
|
+
}), t === -1 || m.length <= t) return k(re, {
|
|
1489
1489
|
size: "small",
|
|
1490
1490
|
wrap: !1
|
|
1491
1491
|
}, () => m.map((O) => G(O)));
|
|
1492
1492
|
if (t === 0) return f(m);
|
|
1493
1493
|
const F = m.slice(0, t), V = m.slice(t);
|
|
1494
|
-
return k(
|
|
1494
|
+
return k(re, {
|
|
1495
1495
|
size: "small",
|
|
1496
1496
|
wrap: !1
|
|
1497
1497
|
}, () => [...F.map((O) => G(O)), f(V)]);
|
|
@@ -1564,9 +1564,9 @@ var Su = (e) => {
|
|
|
1564
1564
|
}),
|
|
1565
1565
|
default: () => l
|
|
1566
1566
|
});
|
|
1567
|
-
},
|
|
1567
|
+
}, jr = (e, t) => {
|
|
1568
1568
|
if (!e) return "-";
|
|
1569
|
-
const a = String(e), r =
|
|
1569
|
+
const a = String(e), r = je[a];
|
|
1570
1570
|
return r ? k(H, {
|
|
1571
1571
|
size: t?.size ?? 20,
|
|
1572
1572
|
color: t?.color
|
|
@@ -1586,13 +1586,13 @@ var Su = (e) => {
|
|
|
1586
1586
|
}, () => o);
|
|
1587
1587
|
}
|
|
1588
1588
|
return k(Ve, { size: "small" }, () => String(e));
|
|
1589
|
-
},
|
|
1589
|
+
}, Ir = (e, t, a, r) => {
|
|
1590
1590
|
if (!r?.onChange)
|
|
1591
1591
|
return console.warn("Switch column requires onChange function"), "-";
|
|
1592
1592
|
const l = e === (r.valueMap || {
|
|
1593
1593
|
checked: !0,
|
|
1594
1594
|
unchecked: !1
|
|
1595
|
-
}).checked, i =
|
|
1595
|
+
}).checked, i = ae(!1), o = typeof r.disabled == "function" ? r.disabled(t, a) : r.disabled || !1, g = async (p) => {
|
|
1596
1596
|
if (!(i.value || o))
|
|
1597
1597
|
try {
|
|
1598
1598
|
i.value = !0, await r.onChange(p, t, a);
|
|
@@ -1620,7 +1620,7 @@ var Su = (e) => {
|
|
|
1620
1620
|
});
|
|
1621
1621
|
}
|
|
1622
1622
|
return v;
|
|
1623
|
-
},
|
|
1623
|
+
}, Nr = (e, t, a = "label", r = "value") => e == null ? "-" : Array.isArray(e) ? k(re, {
|
|
1624
1624
|
size: "small",
|
|
1625
1625
|
wrap: !0
|
|
1626
1626
|
}, () => e.map((l, i) => {
|
|
@@ -1636,11 +1636,11 @@ const Br = (e, t, a, r) => {
|
|
|
1636
1636
|
case "file":
|
|
1637
1637
|
return Fr(e, t, a.fileConfig);
|
|
1638
1638
|
case "tag":
|
|
1639
|
-
return
|
|
1639
|
+
return Nr(e, a.tagOptions || [], a.tagLabelField || "label", a.tagValueField || "value");
|
|
1640
1640
|
case "icon":
|
|
1641
|
-
return
|
|
1641
|
+
return jr(e, a.iconConfig);
|
|
1642
1642
|
case "switch":
|
|
1643
|
-
return
|
|
1643
|
+
return Ir(e, t, r || 0, a.switchConfig);
|
|
1644
1644
|
case "text":
|
|
1645
1645
|
default:
|
|
1646
1646
|
return Pr(e);
|
|
@@ -1655,9 +1655,9 @@ function Gu() {
|
|
|
1655
1655
|
renderImage: Dr,
|
|
1656
1656
|
renderFile: Fr,
|
|
1657
1657
|
renderTag: Ze,
|
|
1658
|
-
renderTags:
|
|
1659
|
-
renderIcon:
|
|
1660
|
-
renderSwitch:
|
|
1658
|
+
renderTags: Nr,
|
|
1659
|
+
renderIcon: jr,
|
|
1660
|
+
renderSwitch: Ir
|
|
1661
1661
|
};
|
|
1662
1662
|
}
|
|
1663
1663
|
function Vt(e) {
|
|
@@ -1670,9 +1670,9 @@ function $u(e) {
|
|
|
1670
1670
|
if (typeof f.title == "function") return "自定义列";
|
|
1671
1671
|
}
|
|
1672
1672
|
return o(f);
|
|
1673
|
-
}, v = (f) => "defaultVisible" in f ? f.defaultVisible !== !1 : !0, p = (f) => "type" in f && (f.type === "selection" || f.type === "expand") ? !1 : "configurable" in f ? f.configurable !== !1 : !0, y = (f) => f.filter((
|
|
1674
|
-
Qt(l, (f,
|
|
1675
|
-
const u = f.map((O) => o(O)).filter(Boolean), _ =
|
|
1673
|
+
}, v = (f) => "defaultVisible" in f ? f.defaultVisible !== !1 : !0, p = (f) => "type" in f && (f.type === "selection" || f.type === "expand") ? !1 : "configurable" in f ? f.configurable !== !1 : !0, y = (f) => f.filter((N) => v(N)).map((N) => o(N)).filter(Boolean), w = ae(y(l.value));
|
|
1674
|
+
Qt(l, (f, N) => {
|
|
1675
|
+
const u = f.map((O) => o(O)).filter(Boolean), _ = N?.map((O) => o(O)).filter(Boolean) || [], m = u.filter((O) => !_.includes(O)), F = _.filter((O) => !u.includes(O)), V = w.value.filter((O) => !F.includes(O));
|
|
1676
1676
|
m.forEach((O) => {
|
|
1677
1677
|
const ye = f.find((ge) => o(ge) === O);
|
|
1678
1678
|
ye && v(ye) && V.push(O);
|
|
@@ -1685,7 +1685,7 @@ function $u(e) {
|
|
|
1685
1685
|
configurable: p(f)
|
|
1686
1686
|
}))), T = (f) => {
|
|
1687
1687
|
if (f?.show === !1) return null;
|
|
1688
|
-
const { renderActions:
|
|
1688
|
+
const { renderActions: N } = ku({
|
|
1689
1689
|
...f,
|
|
1690
1690
|
onView: t,
|
|
1691
1691
|
onEdit: a,
|
|
@@ -1698,15 +1698,15 @@ function $u(e) {
|
|
|
1698
1698
|
minWidth: f?.minWidth,
|
|
1699
1699
|
fixed: f?.fixed !== !1 ? f?.fixed || "right" : void 0,
|
|
1700
1700
|
align: "center",
|
|
1701
|
-
render: (u, _) =>
|
|
1701
|
+
render: (u, _) => N(u, _)
|
|
1702
1702
|
};
|
|
1703
1703
|
}, M = (f) => {
|
|
1704
1704
|
if ("columnType" in f && zr(f)) {
|
|
1705
|
-
const
|
|
1705
|
+
const N = f.key;
|
|
1706
1706
|
return {
|
|
1707
1707
|
...f,
|
|
1708
1708
|
align: f.align || "center",
|
|
1709
|
-
render: (u, _) => Br(
|
|
1709
|
+
render: (u, _) => Br(N ? u[N] : void 0, u, l.value.find((m) => "key" in m && m.key === N) || f, _)
|
|
1710
1710
|
};
|
|
1711
1711
|
}
|
|
1712
1712
|
return {
|
|
@@ -1716,10 +1716,10 @@ function $u(e) {
|
|
|
1716
1716
|
};
|
|
1717
1717
|
return {
|
|
1718
1718
|
mergedColumns: K(() => {
|
|
1719
|
-
const f = l.value,
|
|
1719
|
+
const f = l.value, N = i.value, u = f.filter((m) => {
|
|
1720
1720
|
const F = o(m);
|
|
1721
1721
|
return "type" in m && (m.type === "selection" || m.type === "expand") || !F ? !0 : w.value.includes(F);
|
|
1722
|
-
}).map((m) => M(m)), _ = T(
|
|
1722
|
+
}).map((m) => M(m)), _ = T(N);
|
|
1723
1723
|
return _ && u.push(_), u;
|
|
1724
1724
|
}),
|
|
1725
1725
|
configurableColumns: S,
|
|
@@ -1794,7 +1794,7 @@ function Pu(e) {
|
|
|
1794
1794
|
var Ou = {
|
|
1795
1795
|
key: 0,
|
|
1796
1796
|
class: "dydx-table__toolbar"
|
|
1797
|
-
}, Du = { class: "dydx-table__column-setting" }, Fu = { class: "dydx-table__column-setting-header" },
|
|
1797
|
+
}, Du = { class: "dydx-table__column-setting" }, Fu = { class: "dydx-table__column-setting-header" }, ju = /* @__PURE__ */ he({
|
|
1798
1798
|
inheritAttrs: !1,
|
|
1799
1799
|
__name: "DydxNaiveTable",
|
|
1800
1800
|
props: {
|
|
@@ -1845,7 +1845,7 @@ var Ou = {
|
|
|
1845
1845
|
"delete"
|
|
1846
1846
|
],
|
|
1847
1847
|
setup(e, { expose: t, emit: a }) {
|
|
1848
|
-
const r = e, l = a, i = rt(), o =
|
|
1848
|
+
const r = e, l = a, i = rt(), o = ae(null), g = ae(void 0), v = K(() => !i.maxHeight), p = ($) => {
|
|
1849
1849
|
const A = getComputedStyle($);
|
|
1850
1850
|
return $.clientHeight <= 0 ? !1 : !!(parseFloat(A.flexGrow) > 0 || A.height && A.height !== "auto" && A.height !== "0px" || A.maxHeight && A.maxHeight !== "none" && A.maxHeight !== "0px" || A.overflowY === "auto" || A.overflowY === "scroll");
|
|
1851
1851
|
}, y = ($) => {
|
|
@@ -1864,7 +1864,7 @@ var Ou = {
|
|
|
1864
1864
|
g.value = void 0;
|
|
1865
1865
|
return;
|
|
1866
1866
|
}
|
|
1867
|
-
const
|
|
1867
|
+
const j = getComputedStyle(A), ve = parseFloat(j.paddingTop), Ke = parseFloat(j.paddingBottom), Ge = A.getBoundingClientRect(), n = $.getBoundingClientRect(), b = $.querySelector(".dydx-table__toolbar"), I = b ? b.offsetHeight + 16 : 0, q = $.querySelector(".n-data-table-thead"), ee = q ? q.offsetHeight : 40, Z = n.top - (Ge.top + ve), De = A.clientHeight - ve - Ke - Z - I - ee;
|
|
1868
1868
|
De > 200 ? g.value = De : g.value = void 0;
|
|
1869
1869
|
});
|
|
1870
1870
|
}, S = K(() => i.maxHeight ? i.maxHeight : g.value);
|
|
@@ -1873,13 +1873,13 @@ var Ou = {
|
|
|
1873
1873
|
}), _a(() => {
|
|
1874
1874
|
window.removeEventListener("resize", w);
|
|
1875
1875
|
});
|
|
1876
|
-
const T =
|
|
1876
|
+
const T = ae(null), { mergedColumns: M, configurableColumns: L, visibleColumnKeys: x, setVisibleColumnKeys: D, resetColumnSetting: G, getVisibleColumnKeys: f } = $u({
|
|
1877
1877
|
columns: () => r.columns,
|
|
1878
1878
|
actionColumn: () => r.actionColumn,
|
|
1879
1879
|
onView: ($) => l("view", $),
|
|
1880
1880
|
onEdit: ($) => l("edit", $),
|
|
1881
1881
|
onDelete: ($) => l("delete", $)
|
|
1882
|
-
}), { paginationConfig:
|
|
1882
|
+
}), { paginationConfig: N, handlePageChange: u, handlePageSizeChange: _ } = Pu({
|
|
1883
1883
|
get pagination() {
|
|
1884
1884
|
return r.pagination;
|
|
1885
1885
|
},
|
|
@@ -1917,7 +1917,7 @@ var Ou = {
|
|
|
1917
1917
|
ref_key: "containerRef",
|
|
1918
1918
|
ref: o,
|
|
1919
1919
|
class: "dydx-table"
|
|
1920
|
-
}, [r.showToolbar ? (h(), Q("div", Ou, [C(c(
|
|
1920
|
+
}, [r.showToolbar ? (h(), Q("div", Ou, [C(c(re), {
|
|
1921
1921
|
class: "dydx-table__toolbar-left",
|
|
1922
1922
|
size: 12
|
|
1923
1923
|
}, {
|
|
@@ -1934,17 +1934,17 @@ var Ou = {
|
|
|
1934
1934
|
default: s(() => [E(" " + W(e.addButtonText), 1)]),
|
|
1935
1935
|
_: 3
|
|
1936
1936
|
})) : Y("", !0),
|
|
1937
|
-
(h(!0), Q(
|
|
1937
|
+
(h(!0), Q(te, null, ne(e.leftButtons, (j) => (h(), Q(te, { key: j.key }, [j.show !== !1 ? (h(), P(c(X), {
|
|
1938
1938
|
key: 0,
|
|
1939
|
-
type:
|
|
1940
|
-
disabled:
|
|
1941
|
-
onClick:
|
|
1939
|
+
type: j.type,
|
|
1940
|
+
disabled: j.disabled,
|
|
1941
|
+
onClick: j.onClick
|
|
1942
1942
|
}, de({
|
|
1943
|
-
default: s(() => [E(" " + W(
|
|
1943
|
+
default: s(() => [E(" " + W(j.label), 1)]),
|
|
1944
1944
|
_: 2
|
|
1945
|
-
}, [
|
|
1945
|
+
}, [j.icon ? {
|
|
1946
1946
|
name: "icon",
|
|
1947
|
-
fn: s(() => [(h(), P(me(
|
|
1947
|
+
fn: s(() => [(h(), P(me(j.icon)))]),
|
|
1948
1948
|
key: "0"
|
|
1949
1949
|
} : void 0]), 1032, [
|
|
1950
1950
|
"type",
|
|
@@ -1954,23 +1954,23 @@ var Ou = {
|
|
|
1954
1954
|
U($.$slots, "toolbar-left", {}, void 0, !0)
|
|
1955
1955
|
]),
|
|
1956
1956
|
_: 3
|
|
1957
|
-
}), C(c(
|
|
1957
|
+
}), C(c(re), {
|
|
1958
1958
|
class: "dydx-table__toolbar-right",
|
|
1959
1959
|
size: 8
|
|
1960
1960
|
}, {
|
|
1961
1961
|
default: s(() => [
|
|
1962
1962
|
U($.$slots, "toolbar-right", {}, void 0, !0),
|
|
1963
|
-
(h(!0), Q(
|
|
1963
|
+
(h(!0), Q(te, null, ne(e.rightButtons, (j) => (h(), Q(te, { key: j.key }, [j.show !== !1 ? (h(), P(c(X), {
|
|
1964
1964
|
key: 0,
|
|
1965
|
-
type:
|
|
1966
|
-
disabled:
|
|
1967
|
-
onClick:
|
|
1965
|
+
type: j.type,
|
|
1966
|
+
disabled: j.disabled,
|
|
1967
|
+
onClick: j.onClick
|
|
1968
1968
|
}, de({
|
|
1969
|
-
default: s(() => [E(" " + W(
|
|
1969
|
+
default: s(() => [E(" " + W(j.label), 1)]),
|
|
1970
1970
|
_: 2
|
|
1971
|
-
}, [
|
|
1971
|
+
}, [j.icon ? {
|
|
1972
1972
|
name: "icon",
|
|
1973
|
-
fn: s(() => [(h(), P(me(
|
|
1973
|
+
fn: s(() => [(h(), P(me(j.icon)))]),
|
|
1974
1974
|
key: "0"
|
|
1975
1975
|
} : void 0]), 1032, [
|
|
1976
1976
|
"type",
|
|
@@ -2024,16 +2024,16 @@ var Ou = {
|
|
|
2024
2024
|
_: 1
|
|
2025
2025
|
}, 8, ["onClick"])]), C(c(et), {
|
|
2026
2026
|
value: c(x),
|
|
2027
|
-
"onUpdate:value": A[0] || (A[0] = (
|
|
2027
|
+
"onUpdate:value": A[0] || (A[0] = (j) => ba(x) ? x.value = j : null)
|
|
2028
2028
|
}, {
|
|
2029
|
-
default: s(() => [C(c(
|
|
2029
|
+
default: s(() => [C(c(re), {
|
|
2030
2030
|
vertical: "",
|
|
2031
2031
|
size: 8
|
|
2032
2032
|
}, {
|
|
2033
|
-
default: s(() => [(h(!0), Q(
|
|
2034
|
-
key:
|
|
2035
|
-
value:
|
|
2036
|
-
label:
|
|
2033
|
+
default: s(() => [(h(!0), Q(te, null, ne(c(L), (j) => (h(), P(c(Ht), {
|
|
2034
|
+
key: j.key,
|
|
2035
|
+
value: j.key,
|
|
2036
|
+
label: j.title
|
|
2037
2037
|
}, null, 8, ["value", "label"]))), 128))]),
|
|
2038
2038
|
_: 1
|
|
2039
2039
|
})]),
|
|
@@ -2050,7 +2050,7 @@ var Ou = {
|
|
|
2050
2050
|
columns: c(M),
|
|
2051
2051
|
"row-key": m.value,
|
|
2052
2052
|
loading: e.loading,
|
|
2053
|
-
pagination: c(
|
|
2053
|
+
pagination: c(N),
|
|
2054
2054
|
remote: e.remote,
|
|
2055
2055
|
"checked-row-keys": e.checkedRowKeys,
|
|
2056
2056
|
"max-height": S.value
|
|
@@ -2071,7 +2071,7 @@ var Ou = {
|
|
|
2071
2071
|
"onUpdate:pageSize"
|
|
2072
2072
|
])], 512));
|
|
2073
2073
|
}
|
|
2074
|
-
}), Rr = /* @__PURE__ */ Ar(
|
|
2074
|
+
}), Rr = /* @__PURE__ */ Ar(ju, [["__scopeId", "data-v-082aaa9d"]]), Iu = /* @__PURE__ */ he({
|
|
2075
2075
|
name: "DydxFormModal",
|
|
2076
2076
|
inheritAttrs: !1,
|
|
2077
2077
|
__name: "DydxFormModal",
|
|
@@ -2106,7 +2106,7 @@ var Ou = {
|
|
|
2106
2106
|
"cancel"
|
|
2107
2107
|
],
|
|
2108
2108
|
setup(e, { expose: t, emit: a }) {
|
|
2109
|
-
const r = e, l = a, i = rt(), o =
|
|
2109
|
+
const r = e, l = a, i = rt(), o = ae(), g = K(() => r.title ? r.title : `${r.model[r.rowKey] ? "编辑" : "新增"}${r.subtitle}`), v = K(() => ({ width: typeof r.width == "number" ? `${r.width}px` : r.width })), p = () => {
|
|
2110
2110
|
l("update:show", !1), l("cancel");
|
|
2111
2111
|
}, y = async () => {
|
|
2112
2112
|
try {
|
|
@@ -2170,7 +2170,7 @@ var Ou = {
|
|
|
2170
2170
|
fn: s((T) => [U(w.$slots, "form-append", le(ue(T)))]),
|
|
2171
2171
|
key: "2"
|
|
2172
2172
|
} : void 0,
|
|
2173
|
-
|
|
2173
|
+
ne(w.$slots, (T, M) => ({
|
|
2174
2174
|
name: M,
|
|
2175
2175
|
fn: s((L) => [typeof M == "string" && M.startsWith("field-") ? U(w.$slots, M, le(J({ key: 0 }, L))) : Y("", !0)])
|
|
2176
2176
|
}))
|
|
@@ -2194,7 +2194,7 @@ var Ou = {
|
|
|
2194
2194
|
key: "4"
|
|
2195
2195
|
} : {
|
|
2196
2196
|
name: "footer",
|
|
2197
|
-
fn: s(() => [C(c(
|
|
2197
|
+
fn: s(() => [C(c(re), { justify: "end" }, {
|
|
2198
2198
|
default: s(() => [e.showCancel ? (h(), P(c(X), {
|
|
2199
2199
|
key: 0,
|
|
2200
2200
|
onClick: p
|
|
@@ -2232,7 +2232,7 @@ var Ou = {
|
|
|
2232
2232
|
"style"
|
|
2233
2233
|
]));
|
|
2234
2234
|
}
|
|
2235
|
-
}), Ur =
|
|
2235
|
+
}), Ur = Iu, Nu = {
|
|
2236
2236
|
key: 0,
|
|
2237
2237
|
style: {
|
|
2238
2238
|
"margin-bottom": "16px",
|
|
@@ -2274,7 +2274,7 @@ var Ou = {
|
|
|
2274
2274
|
"cancel"
|
|
2275
2275
|
],
|
|
2276
2276
|
setup(e, { expose: t, emit: a }) {
|
|
2277
|
-
const r = e, l = a, i = rt(), o =
|
|
2277
|
+
const r = e, l = a, i = rt(), o = ae(), g = K(() => r.title ? r.title : `${r.model[r.rowKey] ? "编辑" : "新增"}${r.subtitle}`), v = () => {
|
|
2278
2278
|
l("update:show", !1), l("cancel");
|
|
2279
2279
|
}, p = async () => {
|
|
2280
2280
|
try {
|
|
@@ -2302,7 +2302,7 @@ var Ou = {
|
|
|
2302
2302
|
key: "0"
|
|
2303
2303
|
} : {
|
|
2304
2304
|
name: "default",
|
|
2305
|
-
fn: s(() => [y.$slots["header-extra"] ? (h(), Q("div",
|
|
2305
|
+
fn: s(() => [y.$slots["header-extra"] ? (h(), Q("div", Nu, [U(y.$slots, "header-extra")])) : Y("", !0), C(c(tt), { show: e.loading }, {
|
|
2306
2306
|
default: s(() => [C(c(Le), {
|
|
2307
2307
|
ref_key: "formRef",
|
|
2308
2308
|
ref: o,
|
|
@@ -2331,7 +2331,7 @@ var Ou = {
|
|
|
2331
2331
|
fn: s((S) => [U(y.$slots, "form-append", le(ue(S)))]),
|
|
2332
2332
|
key: "2"
|
|
2333
2333
|
} : void 0,
|
|
2334
|
-
|
|
2334
|
+
ne(y.$slots, (S, T) => ({
|
|
2335
2335
|
name: T,
|
|
2336
2336
|
fn: s((M) => [typeof T == "string" && T.startsWith("field-") ? U(y.$slots, T, le(J({ key: 0 }, M))) : Y("", !0)])
|
|
2337
2337
|
}))
|
|
@@ -2354,7 +2354,7 @@ var Ou = {
|
|
|
2354
2354
|
key: "2"
|
|
2355
2355
|
} : {
|
|
2356
2356
|
name: "footer",
|
|
2357
|
-
fn: s(() => [C(c(
|
|
2357
|
+
fn: s(() => [C(c(re), { justify: "end" }, {
|
|
2358
2358
|
default: s(() => [e.showCancel ? (h(), P(c(X), {
|
|
2359
2359
|
key: 0,
|
|
2360
2360
|
onClick: v
|