dydx-naive-ui-for-vue 0.1.47 → 0.1.49
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 +377 -375
- 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 ae, 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 _, ref as re, 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,18 +43,18 @@ 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 = re(), g = K(() => r.listType ? r.listType : r.uploadType === "image" ? "image-card" : "text"),
|
|
46
|
+
const r = e, l = a, i = ma(), o = re(), g = K(() => r.listType ? r.listType : r.uploadType === "image" ? "image-card" : "text"), m = 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
|
-
})) : r.fileList),
|
|
49
|
+
})) : r.fileList), v = K(() => {
|
|
50
50
|
const x = [];
|
|
51
51
|
return r.acceptTypes?.length && x.push(`支持格式:${r.acceptTypes.join(", ")}`), r.maxSize && x.push(`单个文件不超过 ${r.maxSize}MB`), r.maxCount && x.push(`最多 ${r.maxCount} 个文件`), x.join(";");
|
|
52
|
-
}),
|
|
52
|
+
}), p = K(() => {
|
|
53
53
|
if (r.accept) return r.accept;
|
|
54
54
|
if (r.acceptTypes?.length) return r.acceptTypes.join(",");
|
|
55
55
|
if (r.uploadType === "image") return "image/*";
|
|
56
|
-
}),
|
|
57
|
-
const { uploadType: x, fileList: D, customUpload: G, acceptTypes: f, maxSize:
|
|
56
|
+
}), y = K(() => {
|
|
57
|
+
const { uploadType: x, fileList: D, customUpload: G, acceptTypes: f, maxSize: N, maxCount: u, multiple: w, autoUpload: b, 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,15 +93,15 @@ 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,
|
|
97
|
-
return
|
|
98
|
-
C(
|
|
96
|
+
const G = H, f = ca, N = ga, u = X, w = Yt;
|
|
97
|
+
return _(), Q("div", null, [
|
|
98
|
+
C(w, J({
|
|
99
99
|
ref_key: "uploadRef",
|
|
100
100
|
ref: o
|
|
101
|
-
},
|
|
102
|
-
"file-list":
|
|
101
|
+
}, y.value, {
|
|
102
|
+
"file-list": m.value,
|
|
103
103
|
"custom-request": M,
|
|
104
|
-
accept:
|
|
104
|
+
accept: p.value,
|
|
105
105
|
max: e.maxCount,
|
|
106
106
|
multiple: e.multiple,
|
|
107
107
|
disabled: e.disabled,
|
|
@@ -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" ? (
|
|
113
|
+
default: s(() => [e.showDragger && e.uploadType !== "image" ? (_(), P(N, { key: 0 }, {
|
|
114
114
|
default: s(() => [
|
|
115
115
|
Fe("div", Da, [C(G, {
|
|
116
116
|
size: "48",
|
|
@@ -123,7 +123,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
123
123
|
default: s(() => [...D[0] || (D[0] = [E(" 点击或拖拽文件到此区域上传 ", -1)])]),
|
|
124
124
|
_: 1
|
|
125
125
|
}),
|
|
126
|
-
e.showTip ? (
|
|
126
|
+
e.showTip ? (_(), P(f, {
|
|
127
127
|
key: 0,
|
|
128
128
|
depth: "3",
|
|
129
129
|
style: {
|
|
@@ -132,18 +132,18 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
132
132
|
display: "block"
|
|
133
133
|
}
|
|
134
134
|
}, {
|
|
135
|
-
default: s(() => [E(W(
|
|
135
|
+
default: s(() => [E(W(v.value), 1)]),
|
|
136
136
|
_: 1
|
|
137
137
|
})) : Y("", !0)
|
|
138
138
|
]),
|
|
139
139
|
_: 1
|
|
140
|
-
})) : U(x.$slots, "default", { key: 1 }, () => [e.uploadType === "image" && g.value === "image-card" ? (
|
|
140
|
+
})) : U(x.$slots, "default", { key: 1 }, () => [e.uploadType === "image" && g.value === "image-card" ? (_(), P(G, {
|
|
141
141
|
key: 0,
|
|
142
142
|
size: 28
|
|
143
143
|
}, {
|
|
144
144
|
default: s(() => [C(c(Xt))]),
|
|
145
145
|
_: 1
|
|
146
|
-
})) : (
|
|
146
|
+
})) : (_(), P(u, { key: 1 }, {
|
|
147
147
|
icon: s(() => [C(G, null, {
|
|
148
148
|
default: s(() => [C(c(mt))]),
|
|
149
149
|
_: 1
|
|
@@ -161,7 +161,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
161
161
|
"default-upload",
|
|
162
162
|
"list-type"
|
|
163
163
|
]),
|
|
164
|
-
!e.autoUpload &&
|
|
164
|
+
!e.autoUpload && m.value.length > 0 ? (_(), P(u, {
|
|
165
165
|
key: 0,
|
|
166
166
|
type: "primary",
|
|
167
167
|
onClick: L,
|
|
@@ -170,7 +170,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
170
170
|
default: s(() => [...D[1] || (D[1] = [E(" 开始上传 ", -1)])]),
|
|
171
171
|
_: 1
|
|
172
172
|
})) : Y("", !0),
|
|
173
|
-
e.showTip && !(e.showDragger && e.uploadType !== "image") ? (
|
|
173
|
+
e.showTip && !(e.showDragger && e.uploadType !== "image") ? (_(), P(f, {
|
|
174
174
|
key: 1,
|
|
175
175
|
depth: "3",
|
|
176
176
|
style: {
|
|
@@ -179,13 +179,13 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
179
179
|
display: "block"
|
|
180
180
|
}
|
|
181
181
|
}, {
|
|
182
|
-
default: s(() => [E(W(
|
|
182
|
+
default: s(() => [E(W(v.value), 1)]),
|
|
183
183
|
_: 1
|
|
184
184
|
})) : Y("", !0)
|
|
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,22 +204,22 @@ 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(
|
|
208
|
-
let
|
|
209
|
-
return a.iconStyle === "outline" ?
|
|
210
|
-
label:
|
|
211
|
-
value:
|
|
207
|
+
const a = e, r = t, l = Object.keys(je), i = K(() => {
|
|
208
|
+
let v = l;
|
|
209
|
+
return a.iconStyle === "outline" ? v = l.filter((p) => p.endsWith("Outline")) : a.iconStyle === "sharp" ? v = l.filter((p) => p.endsWith("Sharp")) : a.iconStyle === "filled" && (v = l.filter((p) => !p.endsWith("Outline") && !p.endsWith("Sharp"))), v.map((p) => ({
|
|
210
|
+
label: p,
|
|
211
|
+
value: p
|
|
212
212
|
}));
|
|
213
|
-
}), o = (
|
|
214
|
-
const
|
|
215
|
-
return
|
|
216
|
-
}, g = ({ option:
|
|
217
|
-
const
|
|
218
|
-
return
|
|
219
|
-
},
|
|
220
|
-
r("update:value",
|
|
213
|
+
}), o = (v) => {
|
|
214
|
+
const p = je[v.value];
|
|
215
|
+
return p ? k("div", { style: "display: flex; align-items: center; gap: 8px;" }, [k(H, { size: 18 }, () => k(p)), k("span", { style: "flex: 1; overflow: hidden; text-overflow: ellipsis;" }, v.label)]) : k("span", v.label);
|
|
216
|
+
}, g = ({ option: v }) => {
|
|
217
|
+
const p = je[v.value];
|
|
218
|
+
return p ? k("div", { style: "display: flex; align-items: center; gap: 4px;" }, [k(H, { size: 16 }, () => k(p)), v.label]) : k("span", v.label);
|
|
219
|
+
}, m = (v) => {
|
|
220
|
+
r("update:value", v);
|
|
221
221
|
};
|
|
222
|
-
return (
|
|
222
|
+
return (v, p) => (_(), P(c(qt), {
|
|
223
223
|
value: e.value,
|
|
224
224
|
options: i.value,
|
|
225
225
|
placeholder: e.placeholder,
|
|
@@ -229,7 +229,7 @@ var Da = { style: { "margin-bottom": "12px" } }, Fa = /* @__PURE__ */ he({
|
|
|
229
229
|
"render-label": o,
|
|
230
230
|
"render-tag": g,
|
|
231
231
|
"virtual-scroll": "",
|
|
232
|
-
"onUpdate:value":
|
|
232
|
+
"onUpdate:value": m
|
|
233
233
|
}, null, 8, [
|
|
234
234
|
"value",
|
|
235
235
|
"options",
|
|
@@ -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) {
|
|
@@ -404,8 +404,8 @@ function Ln(e, t, a, r) {
|
|
|
404
404
|
var l = !a;
|
|
405
405
|
a || (a = {});
|
|
406
406
|
for (var i = -1, o = t.length; ++i < o; ) {
|
|
407
|
-
var g = t[i],
|
|
408
|
-
|
|
407
|
+
var g = t[i], m = r ? r(a[g], e[g], g, a, e) : void 0;
|
|
408
|
+
m === void 0 && (m = e[g]), l ? ir(a, g, m) : ot(a, g, m);
|
|
409
409
|
}
|
|
410
410
|
return a;
|
|
411
411
|
}
|
|
@@ -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,16 +451,16 @@ 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 &&
|
|
463
|
-
for (var
|
|
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) : [], m = g.length;
|
|
463
|
+
for (var v in e) (t || Bo.call(e, v)) && !(o && (v == "length" || l && (v == "offset" || v == "parent") || i && (v == "buffer" || v == "byteLength" || v == "byteOffset") || lr(v, m))) && g.push(v);
|
|
464
464
|
return g;
|
|
465
465
|
}
|
|
466
466
|
var gr = zo;
|
|
@@ -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,48 +864,48 @@ 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
|
|
879
|
-
var o, g = t & Ks,
|
|
878
|
+
function Ie(e, t, a, r, l, i) {
|
|
879
|
+
var o, g = t & Ks, m = t & Gs, v = 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;
|
|
882
|
-
var
|
|
883
|
-
if (
|
|
882
|
+
var p = Ce(e);
|
|
883
|
+
if (p) {
|
|
884
884
|
if (o = Xi(e), !g) return Dn(e, o);
|
|
885
885
|
} else {
|
|
886
|
-
var
|
|
886
|
+
var y = pt(e), S = y == Sr || y == Js;
|
|
887
887
|
if (pr(e)) return ki(e, g);
|
|
888
|
-
if (
|
|
889
|
-
if (o =
|
|
888
|
+
if (y == $r || y == kr || S && !l) {
|
|
889
|
+
if (o = m || S ? {} : Fs(e), !g) return m ? Ni(e, Ti(o, e)) : Fi(e, wi(o, e));
|
|
890
890
|
} else {
|
|
891
|
-
if (!z[
|
|
892
|
-
o = Os(e,
|
|
891
|
+
if (!z[y]) return l ? e : {};
|
|
892
|
+
o = Os(e, y, g);
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
895
|
i || (i = new hi());
|
|
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
|
-
var M =
|
|
904
|
-
return
|
|
905
|
-
M && (x = L, L = e[x]), ot(o, x,
|
|
903
|
+
var M = p ? void 0 : (v ? m ? Mi : Ri : m ? ut : st)(e);
|
|
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
|
}
|
|
@@ -914,13 +914,13 @@ function hu(e, t, a, r) {
|
|
|
914
914
|
if (!fe(e)) return e;
|
|
915
915
|
t = mr(t, e);
|
|
916
916
|
for (var l = -1, i = t.length, o = i - 1, g = e; g != null && ++l < i; ) {
|
|
917
|
-
var
|
|
918
|
-
if (
|
|
917
|
+
var m = br(t[l]), v = a;
|
|
918
|
+
if (m === "__proto__" || m === "constructor" || m === "prototype") return e;
|
|
919
919
|
if (l != o) {
|
|
920
|
-
var
|
|
921
|
-
|
|
920
|
+
var p = g[m];
|
|
921
|
+
v = r ? r(p, m, g) : void 0, v === void 0 && (v = fe(p) ? p : lr(t[l + 1]) ? [] : {});
|
|
922
922
|
}
|
|
923
|
-
ot(g,
|
|
923
|
+
ot(g, m, v), g = g[m];
|
|
924
924
|
}
|
|
925
925
|
return e;
|
|
926
926
|
}
|
|
@@ -988,18 +988,18 @@ 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 = re(), g = re({}),
|
|
992
|
-
let
|
|
991
|
+
const r = e, l = a, i = Ca(e, "model"), o = re(), g = re({}), m = re();
|
|
992
|
+
let v = !1;
|
|
993
993
|
Jt(() => {
|
|
994
|
-
!
|
|
994
|
+
!v && i.value && (m.value = Kt(i.value), v = !0);
|
|
995
995
|
});
|
|
996
|
-
const
|
|
996
|
+
const p = K(() => ({
|
|
997
997
|
type: "primary",
|
|
998
998
|
text: "搜索",
|
|
999
999
|
loading: r.loading,
|
|
1000
1000
|
renderIcon: () => k(H, null, { default: () => k(Aa) }),
|
|
1001
1001
|
...r.submitButton
|
|
1002
|
-
})),
|
|
1002
|
+
})), y = K(() => ({
|
|
1003
1003
|
type: "default",
|
|
1004
1004
|
text: "重置",
|
|
1005
1005
|
renderIcon: () => k(H, null, { default: () => k(tr) }),
|
|
@@ -1025,19 +1025,19 @@ var xu = /* @__PURE__ */ he({
|
|
|
1025
1025
|
...r.gridProps,
|
|
1026
1026
|
responsive: "self"
|
|
1027
1027
|
})), L = (n) => {
|
|
1028
|
-
const
|
|
1029
|
-
return
|
|
1028
|
+
const h = n.type || "input";
|
|
1029
|
+
return h === "custom" ? n.component : Ia[h];
|
|
1030
1030
|
}, x = (n) => typeof n.disabled == "function" ? n.disabled(i.value) : n.disabled, D = (n) => {
|
|
1031
|
-
const
|
|
1032
|
-
if (
|
|
1033
|
-
const
|
|
1034
|
-
if (!
|
|
1035
|
-
const q = n.type || "input",
|
|
1031
|
+
const h = { ...n.props };
|
|
1032
|
+
if (h.placeholder !== void 0) return h;
|
|
1033
|
+
const I = typeof n.label == "string" ? n.label : "";
|
|
1034
|
+
if (!I) return h;
|
|
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,51 +1045,51 @@ var xu = /* @__PURE__ */ he({
|
|
|
1045
1045
|
"time-picker",
|
|
1046
1046
|
"color-picker"
|
|
1047
1047
|
];
|
|
1048
|
-
return
|
|
1048
|
+
return ee.includes(q) ? h.placeholder = `请输入${I}` : Z.includes(q) && (h.placeholder = `请选择${I}`), h;
|
|
1049
1049
|
}, G = (n) => {
|
|
1050
|
-
const
|
|
1050
|
+
const h = n.type === "custom" ? "modelValue" : "value";
|
|
1051
1051
|
return {
|
|
1052
|
-
[n.modelPropName ||
|
|
1052
|
+
[n.modelPropName || h]: w(n.name),
|
|
1053
1053
|
...D(n),
|
|
1054
1054
|
disabled: x(n),
|
|
1055
1055
|
ref: V(n)
|
|
1056
1056
|
};
|
|
1057
1057
|
}, f = (n) => {
|
|
1058
|
-
const
|
|
1059
|
-
return { [n.modelEventName || `update:${
|
|
1060
|
-
},
|
|
1058
|
+
const h = n.type === "custom" ? "modelValue" : "value", I = n.modelPropName || h;
|
|
1059
|
+
return { [n.modelEventName || `update:${I}`]: (q) => b(n.name, q) };
|
|
1060
|
+
}, N = (n) => {
|
|
1061
1061
|
if (!n) return {};
|
|
1062
|
-
const
|
|
1063
|
-
return delete
|
|
1062
|
+
const h = { ...n };
|
|
1063
|
+
return delete h.options, delete h.labelField, delete h.valueField, h;
|
|
1064
1064
|
}, u = (n) => {
|
|
1065
1065
|
if (!n) return {};
|
|
1066
|
-
const
|
|
1067
|
-
return delete
|
|
1068
|
-
},
|
|
1069
|
-
Tu(i.value, n,
|
|
1070
|
-
}, F = (n,
|
|
1071
|
-
|
|
1066
|
+
const h = { ...n };
|
|
1067
|
+
return delete h.text, h;
|
|
1068
|
+
}, w = (n) => Gt(i.value, n), b = (n, h) => {
|
|
1069
|
+
Tu(i.value, n, h);
|
|
1070
|
+
}, F = (n, h) => {
|
|
1071
|
+
h ? g.value[n] = h : delete g.value[n];
|
|
1072
1072
|
}, V = (n) => {
|
|
1073
|
-
const
|
|
1074
|
-
return n.ref ? typeof n.ref == "function" ? (
|
|
1075
|
-
F(
|
|
1076
|
-
} : (
|
|
1077
|
-
F(
|
|
1078
|
-
} : (
|
|
1073
|
+
const h = n.name;
|
|
1074
|
+
return n.ref ? typeof n.ref == "function" ? (I) => {
|
|
1075
|
+
F(h, I), n.ref(I);
|
|
1076
|
+
} : (I) => {
|
|
1077
|
+
F(h, I), n.ref.value = I;
|
|
1078
|
+
} : (I) => F(h, I);
|
|
1079
1079
|
}, O = (n) => {
|
|
1080
|
-
let
|
|
1081
|
-
const
|
|
1082
|
-
if (
|
|
1080
|
+
let h = typeof n.rule == "function" ? n.rule(i.value) : n.rule;
|
|
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
|
+
h ? h = Array.isArray(h) ? [q, ...h] : [q, h] : h = q;
|
|
1088
1088
|
}
|
|
1089
1089
|
return {
|
|
1090
1090
|
label: typeof n.label == "string" ? n.label : void 0,
|
|
1091
|
-
rule:
|
|
1092
|
-
showRequireMark:
|
|
1091
|
+
rule: h,
|
|
1092
|
+
showRequireMark: I,
|
|
1093
1093
|
contentClass: n.contentClass,
|
|
1094
1094
|
contentStyle: n.contentStyle,
|
|
1095
1095
|
feedback: n.feedback,
|
|
@@ -1120,11 +1120,11 @@ var xu = /* @__PURE__ */ he({
|
|
|
1120
1120
|
}, ge = (n) => {
|
|
1121
1121
|
if (typeof n == "number" || typeof n == "string") return n;
|
|
1122
1122
|
if (typeof n == "object") {
|
|
1123
|
-
const
|
|
1124
|
-
return Object.entries(ye).forEach(([
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1127
|
-
}),
|
|
1123
|
+
const h = [];
|
|
1124
|
+
return Object.entries(ye).forEach(([I, q]) => {
|
|
1125
|
+
const ee = n[I];
|
|
1126
|
+
ee !== void 0 && h.push(`${q}:${ee}`);
|
|
1127
|
+
}), h.length === 0 ? 24 : h.join(" ");
|
|
1128
1128
|
}
|
|
1129
1129
|
return 24;
|
|
1130
1130
|
}, gt = (n) => ({
|
|
@@ -1132,14 +1132,14 @@ var xu = /* @__PURE__ */ he({
|
|
|
1132
1132
|
offset: n.offset
|
|
1133
1133
|
}), $ = async (...n) => {
|
|
1134
1134
|
await o.value.validate(...n);
|
|
1135
|
-
}, A = async (n,
|
|
1136
|
-
const
|
|
1137
|
-
await o.value.validate(
|
|
1138
|
-
},
|
|
1139
|
-
if (
|
|
1140
|
-
const n = Kt(
|
|
1141
|
-
(/* @__PURE__ */ new Set([...Object.keys(
|
|
1142
|
-
|
|
1135
|
+
}, A = async (n, h) => {
|
|
1136
|
+
const I = Array.isArray(n) ? n : [n];
|
|
1137
|
+
await o.value.validate(h, (q) => I.some((ee) => q.key === ee));
|
|
1138
|
+
}, j = () => o.value?.restoreValidation(), ve = () => {
|
|
1139
|
+
if (j(), m.value !== void 0) {
|
|
1140
|
+
const n = Kt(m.value), h = i.value;
|
|
1141
|
+
(/* @__PURE__ */ new Set([...Object.keys(h), ...Object.keys(n)])).forEach((I) => {
|
|
1142
|
+
h[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 = {
|
|
@@ -1165,14 +1165,14 @@ var xu = /* @__PURE__ */ he({
|
|
|
1165
1165
|
};
|
|
1166
1166
|
},
|
|
1167
1167
|
getFieldValue: (n) => Gt(i.value, n),
|
|
1168
|
-
setFieldValue: (n,
|
|
1168
|
+
setFieldValue: (n, h) => b(n, h),
|
|
1169
1169
|
resetFields: ve,
|
|
1170
1170
|
getFormItemInst: (n) => o.value?.getFormItemInst?.(n),
|
|
1171
1171
|
getFieldComponentRef: (n) => g.value[n],
|
|
1172
1172
|
getFieldComponentRefs: () => ({ ...g.value })
|
|
1173
|
-
}), (n,
|
|
1174
|
-
const
|
|
1175
|
-
return
|
|
1173
|
+
}), (n, h) => {
|
|
1174
|
+
const I = Xr, q = ea, ee = X, Z = Zr, De = Qr;
|
|
1175
|
+
return _(), 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,31 +1180,31 @@ var xu = /* @__PURE__ */ he({
|
|
|
1180
1180
|
ref: o,
|
|
1181
1181
|
model: i.value
|
|
1182
1182
|
}, T.value), {
|
|
1183
|
-
default: s(() => [C(
|
|
1184
|
-
default: s(() => [(
|
|
1183
|
+
default: s(() => [C(Z, le(ue(M.value)), {
|
|
1184
|
+
default: s(() => [(_(!0), Q(te, null, ne(S.value, (d) => (_(), 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) : (
|
|
1189
|
+
}, void 0, !0) : (_(), P(I, J({
|
|
1190
1190
|
key: 1,
|
|
1191
1191
|
path: d.name
|
|
1192
1192
|
}, { ref_for: !0 }, O(d)), de({
|
|
1193
1193
|
default: s(() => [U(n.$slots, `field-${d.name}`, {
|
|
1194
1194
|
model: i.value,
|
|
1195
1195
|
schema: d,
|
|
1196
|
-
value:
|
|
1197
|
-
setValue: (B) =>
|
|
1198
|
-
}, () => [d.type === "radio-group" && d.props?.options ? (
|
|
1196
|
+
value: w(d.name),
|
|
1197
|
+
setValue: (B) => b(d.name, B)
|
|
1198
|
+
}, () => [d.type === "radio-group" && d.props?.options ? (_(), P(c(Ne), J({
|
|
1199
1199
|
key: 0,
|
|
1200
|
-
value:
|
|
1201
|
-
"onUpdate:value": (B) =>
|
|
1202
|
-
}, { ref_for: !0 },
|
|
1200
|
+
value: w(d.name),
|
|
1201
|
+
"onUpdate:value": (B) => b(d.name, B)
|
|
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(() => [(
|
|
1206
|
+
default: s(() => [C(c(ae), null, {
|
|
1207
|
+
default: s(() => [(_(!0), Q(te, null, ne(d.props.options, (B) => (_(), 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 ? (
|
|
1218
|
+
}, 1040, ["value", "onUpdate:value"])) : d.type === "radio-button-group" && d.props?.options ? (_(), P(c(Ne), J({
|
|
1219
1219
|
key: 1,
|
|
1220
|
-
value:
|
|
1221
|
-
"onUpdate:value": (B) =>
|
|
1222
|
-
}, { ref_for: !0 },
|
|
1220
|
+
value: w(d.name),
|
|
1221
|
+
"onUpdate:value": (B) => b(d.name, B)
|
|
1222
|
+
}, { ref_for: !0 }, N(d.props), {
|
|
1223
1223
|
ref_for: !0,
|
|
1224
1224
|
ref: V(d)
|
|
1225
1225
|
}), {
|
|
1226
|
-
default: s(() => [(
|
|
1226
|
+
default: s(() => [(_(!0), Q(te, null, ne(d.props.options, (B) => (_(), P(c(ua), {
|
|
1227
1227
|
key: B[d.props.valueField || "value"],
|
|
1228
1228
|
value: B[d.props.valueField || "value"],
|
|
1229
1229
|
disabled: B.disabled
|
|
@@ -1232,16 +1232,16 @@ var xu = /* @__PURE__ */ he({
|
|
|
1232
1232
|
_: 2
|
|
1233
1233
|
}, 1032, ["value", "disabled"]))), 128))]),
|
|
1234
1234
|
_: 2
|
|
1235
|
-
}, 1040, ["value", "onUpdate:value"])) : d.type === "checkbox-group" && d.props?.options ? (
|
|
1235
|
+
}, 1040, ["value", "onUpdate:value"])) : d.type === "checkbox-group" && d.props?.options ? (_(), P(c(et), J({
|
|
1236
1236
|
key: 2,
|
|
1237
|
-
value:
|
|
1238
|
-
"onUpdate:value": (B) =>
|
|
1239
|
-
}, { ref_for: !0 },
|
|
1237
|
+
value: w(d.name),
|
|
1238
|
+
"onUpdate:value": (B) => b(d.name, B)
|
|
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(() => [(
|
|
1243
|
+
default: s(() => [C(c(ae), null, {
|
|
1244
|
+
default: s(() => [(_(!0), Q(te, null, ne(d.props.options, (B) => (_(), P(c(Ht), {
|
|
1245
1245
|
key: B[d.props.valueField || "value"],
|
|
1246
1246
|
value: B[d.props.valueField || "value"],
|
|
1247
1247
|
disabled: B.disabled
|
|
@@ -1252,10 +1252,10 @@ var xu = /* @__PURE__ */ he({
|
|
|
1252
1252
|
_: 2
|
|
1253
1253
|
}, 1024)]),
|
|
1254
1254
|
_: 2
|
|
1255
|
-
}, 1040, ["value", "onUpdate:value"])) : d.type === "switch" ? (
|
|
1255
|
+
}, 1040, ["value", "onUpdate:value"])) : d.type === "switch" ? (_(), P(me(L(d)), J({
|
|
1256
1256
|
key: 3,
|
|
1257
|
-
value:
|
|
1258
|
-
"onUpdate:value": (B) =>
|
|
1257
|
+
value: w(d.name),
|
|
1258
|
+
"onUpdate:value": (B) => b(d.name, B)
|
|
1259
1259
|
}, { ref_for: !0 }, d.props, {
|
|
1260
1260
|
disabled: x(d),
|
|
1261
1261
|
ref_for: !0,
|
|
@@ -1264,10 +1264,10 @@ var xu = /* @__PURE__ */ he({
|
|
|
1264
1264
|
"value",
|
|
1265
1265
|
"onUpdate:value",
|
|
1266
1266
|
"disabled"
|
|
1267
|
-
])) : d.type === "image-upload" || d.type === "file-upload" ? (
|
|
1267
|
+
])) : d.type === "image-upload" || d.type === "file-upload" ? (_(), P(me(L(d)), J({
|
|
1268
1268
|
key: 4,
|
|
1269
|
-
"file-list":
|
|
1270
|
-
"onUpdate:fileList": (B) =>
|
|
1269
|
+
"file-list": w(d.name) || [],
|
|
1270
|
+
"onUpdate:fileList": (B) => b(d.name, B),
|
|
1271
1271
|
"upload-type": d.type === "image-upload" ? "image" : "file"
|
|
1272
1272
|
}, { ref_for: !0 }, d.props, {
|
|
1273
1273
|
disabled: x(d),
|
|
@@ -1278,14 +1278,14 @@ var xu = /* @__PURE__ */ he({
|
|
|
1278
1278
|
"onUpdate:fileList",
|
|
1279
1279
|
"upload-type",
|
|
1280
1280
|
"disabled"
|
|
1281
|
-
])) : (
|
|
1281
|
+
])) : (_(), P(me(L(d)), J({
|
|
1282
1282
|
key: 5,
|
|
1283
1283
|
ref_for: !0
|
|
1284
1284
|
}, G(d), wa(f(d))), null, 16))], !0)]),
|
|
1285
1285
|
_: 2
|
|
1286
1286
|
}, [typeof d.label == "function" || d.help ? {
|
|
1287
1287
|
name: "label",
|
|
1288
|
-
fn: s(() => [typeof d.label == "function" ? (
|
|
1288
|
+
fn: s(() => [typeof d.label == "function" ? (_(), P(me(d.label), { key: 0 })) : (_(), Q(te, { key: 1 }, [E(W(d.label), 1)], 64)), d.help ? (_(), P(c(Be), {
|
|
1289
1289
|
key: 2,
|
|
1290
1290
|
trigger: "hover"
|
|
1291
1291
|
}, {
|
|
@@ -1302,7 +1302,7 @@ var xu = /* @__PURE__ */ he({
|
|
|
1302
1302
|
key: "0"
|
|
1303
1303
|
} : void 0]), 1040, ["path"]))]),
|
|
1304
1304
|
_: 2
|
|
1305
|
-
}, 1040))), 128)), r.showFooter ? (
|
|
1305
|
+
}, 1040))), 128)), r.showFooter ? (_(), P(q, {
|
|
1306
1306
|
key: 0,
|
|
1307
1307
|
span: r.footerSpan
|
|
1308
1308
|
}, {
|
|
@@ -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(ae), { justify: r.footerAlign }, {
|
|
1314
1314
|
default: s(() => [
|
|
1315
|
-
|
|
1316
|
-
default: s(() => [E(W(
|
|
1315
|
+
y.value.hidden ? Y("", !0) : (_(), P(ee, J({ key: 0 }, u(y.value), { onClick: Ge }), {
|
|
1316
|
+
default: s(() => [E(W(y.value.text), 1)]),
|
|
1317
1317
|
_: 1
|
|
1318
1318
|
}, 16)),
|
|
1319
|
-
|
|
1320
|
-
default: s(() => [E(W(
|
|
1319
|
+
p.value.hidden ? Y("", !0) : (_(), P(ee, J({ key: 1 }, u(p.value), { onClick: Ke }), {
|
|
1320
|
+
default: s(() => [E(W(p.value.text), 1)]),
|
|
1321
1321
|
_: 1
|
|
1322
1322
|
}, 16)),
|
|
1323
|
-
(
|
|
1323
|
+
(_(!0), Q(te, null, ne(r.extraButtons, (d) => (_(), P(ee, {
|
|
1324
1324
|
key: d.text,
|
|
1325
1325
|
type: d.type,
|
|
1326
1326
|
size: d.size,
|
|
@@ -1354,27 +1354,27 @@ 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-5f266062"]]);
|
|
1358
1358
|
function ku(e) {
|
|
1359
|
-
const { maxVisible: t = -1, buttons: a = [], showView: r = !1, showEdit: l = !0, showDelete: i = !0, viewConfig: o, editConfig: g, deleteConfig:
|
|
1359
|
+
const { maxVisible: t = -1, buttons: a = [], showView: r = !1, showEdit: l = !0, showDelete: i = !0, viewConfig: o, editConfig: g, deleteConfig: m, onView: v, onEdit: p, onDelete: y } = e, S = (u, w, b, F) => w ? u ? typeof u.show == "function" ? u.show(b, F) : u.show !== !1 : !0 : !1, T = (u, w, b) => u ? typeof u.disabled == "function" ? u.disabled(w, b) : u.disabled === !0 : !1, M = (u, w, b) => typeof u.show == "function" ? u.show(w, b) : u.show !== !1, L = (u, w, b) => typeof u.disabled == "function" ? u.disabled(w, b) : u.disabled === !0, x = (u, w, b = "确认操作") => {
|
|
1360
1360
|
if (u) {
|
|
1361
1361
|
if (typeof u == "string") return {
|
|
1362
|
-
title:
|
|
1362
|
+
title: b,
|
|
1363
1363
|
content: u,
|
|
1364
1364
|
type: "warning",
|
|
1365
1365
|
positiveText: "确定",
|
|
1366
1366
|
negativeText: "取消"
|
|
1367
1367
|
};
|
|
1368
1368
|
if (typeof u == "function") {
|
|
1369
|
-
const F = u(
|
|
1369
|
+
const F = u(w);
|
|
1370
1370
|
return typeof F == "string" ? {
|
|
1371
|
-
title:
|
|
1371
|
+
title: b,
|
|
1372
1372
|
content: F,
|
|
1373
1373
|
type: "warning",
|
|
1374
1374
|
positiveText: "确定",
|
|
1375
1375
|
negativeText: "取消"
|
|
1376
1376
|
} : {
|
|
1377
|
-
title:
|
|
1377
|
+
title: b,
|
|
1378
1378
|
type: "warning",
|
|
1379
1379
|
positiveText: "确定",
|
|
1380
1380
|
negativeText: "取消",
|
|
@@ -1382,52 +1382,52 @@ function ku(e) {
|
|
|
1382
1382
|
};
|
|
1383
1383
|
}
|
|
1384
1384
|
return {
|
|
1385
|
-
title:
|
|
1385
|
+
title: b,
|
|
1386
1386
|
type: "warning",
|
|
1387
1387
|
positiveText: "确定",
|
|
1388
1388
|
negativeText: "取消",
|
|
1389
1389
|
...u
|
|
1390
1390
|
};
|
|
1391
1391
|
}
|
|
1392
|
-
}, D = (u,
|
|
1393
|
-
const { dialog:
|
|
1392
|
+
}, D = (u, w) => {
|
|
1393
|
+
const { dialog: b } = va(["dialog"]), F = {
|
|
1394
1394
|
...u,
|
|
1395
|
-
onPositiveClick: () => (
|
|
1395
|
+
onPositiveClick: () => (w(), !0)
|
|
1396
1396
|
};
|
|
1397
1397
|
switch (u.type) {
|
|
1398
1398
|
case "info":
|
|
1399
|
-
|
|
1399
|
+
b.info(F);
|
|
1400
1400
|
break;
|
|
1401
1401
|
case "success":
|
|
1402
|
-
|
|
1402
|
+
b.success(F);
|
|
1403
1403
|
break;
|
|
1404
1404
|
case "error":
|
|
1405
|
-
|
|
1405
|
+
b.error(F);
|
|
1406
1406
|
break;
|
|
1407
1407
|
case "warning":
|
|
1408
1408
|
default:
|
|
1409
|
-
|
|
1409
|
+
b.warning(F);
|
|
1410
1410
|
break;
|
|
1411
1411
|
}
|
|
1412
1412
|
}, G = (u) => {
|
|
1413
|
-
const
|
|
1413
|
+
const w = () => {
|
|
1414
1414
|
u.confirm ? D(u.confirm, u.onClick) : u.onClick();
|
|
1415
1415
|
};
|
|
1416
1416
|
return k(X, {
|
|
1417
1417
|
type: u.type,
|
|
1418
1418
|
size: "small",
|
|
1419
1419
|
disabled: u.disabled,
|
|
1420
|
-
onClick:
|
|
1420
|
+
onClick: w,
|
|
1421
1421
|
renderIcon: u.icon
|
|
1422
1422
|
}, { default: () => u.label });
|
|
1423
1423
|
}, f = (u) => {
|
|
1424
|
-
const
|
|
1424
|
+
const w = u.map((F) => ({
|
|
1425
1425
|
label: F.label,
|
|
1426
1426
|
key: F.key,
|
|
1427
1427
|
disabled: F.disabled
|
|
1428
1428
|
}));
|
|
1429
1429
|
return k(Wr, {
|
|
1430
|
-
options:
|
|
1430
|
+
options: w,
|
|
1431
1431
|
trigger: "click",
|
|
1432
1432
|
onSelect: (F) => {
|
|
1433
1433
|
const V = u.find((O) => O.key === F);
|
|
@@ -1436,34 +1436,34 @@ function ku(e) {
|
|
|
1436
1436
|
}, { default: () => k(X, { size: "small" }, { default: () => "更多" }) });
|
|
1437
1437
|
};
|
|
1438
1438
|
return {
|
|
1439
|
-
renderActions: (u,
|
|
1440
|
-
const
|
|
1441
|
-
if (S(o, r, u,
|
|
1439
|
+
renderActions: (u, w) => {
|
|
1440
|
+
const b = [];
|
|
1441
|
+
if (S(o, r, u, w) && b.push({
|
|
1442
1442
|
key: "__view__",
|
|
1443
1443
|
label: o?.label || "查看",
|
|
1444
1444
|
type: "info",
|
|
1445
|
-
disabled: T(o, u,
|
|
1445
|
+
disabled: T(o, u, w),
|
|
1446
1446
|
icon: () => k(H, null, { default: () => k(ka) }),
|
|
1447
|
-
onClick: () =>
|
|
1447
|
+
onClick: () => v?.({
|
|
1448
1448
|
row: u,
|
|
1449
|
-
index:
|
|
1449
|
+
index: w
|
|
1450
1450
|
})
|
|
1451
|
-
}), S(g, l, u,
|
|
1451
|
+
}), S(g, l, u, w) && b.push({
|
|
1452
1452
|
key: "__edit__",
|
|
1453
1453
|
label: g?.label || "编辑",
|
|
1454
1454
|
type: "primary",
|
|
1455
|
-
disabled: T(g, u,
|
|
1455
|
+
disabled: T(g, u, w),
|
|
1456
1456
|
icon: () => k(H, null, { default: () => k(Ta) }),
|
|
1457
|
-
onClick: () =>
|
|
1457
|
+
onClick: () => p?.({
|
|
1458
1458
|
row: u,
|
|
1459
|
-
index:
|
|
1459
|
+
index: w
|
|
1460
1460
|
})
|
|
1461
|
-
}), S(
|
|
1461
|
+
}), S(m, i, u, w) && b.push({
|
|
1462
1462
|
key: "__delete__",
|
|
1463
|
-
label:
|
|
1463
|
+
label: m?.label || "删除",
|
|
1464
1464
|
type: "error",
|
|
1465
|
-
disabled: T(
|
|
1466
|
-
confirm: x(
|
|
1465
|
+
disabled: T(m, u, w),
|
|
1466
|
+
confirm: x(m?.confirm, u, "确认删除") || {
|
|
1467
1467
|
title: "确认删除",
|
|
1468
1468
|
content: "确定删除此记录吗?",
|
|
1469
1469
|
type: "warning",
|
|
@@ -1471,27 +1471,27 @@ function ku(e) {
|
|
|
1471
1471
|
negativeText: "取消"
|
|
1472
1472
|
},
|
|
1473
1473
|
icon: () => k(H, null, { default: () => k(Oa) }),
|
|
1474
|
-
onClick: () =>
|
|
1474
|
+
onClick: () => y?.({
|
|
1475
1475
|
row: u,
|
|
1476
|
-
index:
|
|
1476
|
+
index: w
|
|
1477
1477
|
})
|
|
1478
1478
|
}), a.forEach((O) => {
|
|
1479
|
-
M(O, u,
|
|
1479
|
+
M(O, u, w) && b.push({
|
|
1480
1480
|
key: O.key,
|
|
1481
1481
|
label: O.label,
|
|
1482
1482
|
type: O.type || "default",
|
|
1483
|
-
disabled: L(O, u,
|
|
1483
|
+
disabled: L(O, u, w),
|
|
1484
1484
|
confirm: x(O.confirm, u, "确认操作"),
|
|
1485
1485
|
icon: O.icon,
|
|
1486
|
-
onClick: () => O.onClick?.(u,
|
|
1486
|
+
onClick: () => O.onClick?.(u, w)
|
|
1487
1487
|
});
|
|
1488
|
-
}), t === -1 ||
|
|
1488
|
+
}), t === -1 || b.length <= t) return k(ae, {
|
|
1489
1489
|
size: "small",
|
|
1490
1490
|
wrap: !1
|
|
1491
|
-
}, () =>
|
|
1492
|
-
if (t === 0) return f(
|
|
1493
|
-
const F =
|
|
1494
|
-
return k(
|
|
1491
|
+
}, () => b.map((O) => G(O)));
|
|
1492
|
+
if (t === 0) return f(b);
|
|
1493
|
+
const F = b.slice(0, t), V = b.slice(t);
|
|
1494
|
+
return k(ae, {
|
|
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
|
|
@@ -1582,36 +1582,38 @@ var Su = (e) => {
|
|
|
1582
1582
|
const i = l, o = i[a] || i[r] || String(e);
|
|
1583
1583
|
return k(Ve, {
|
|
1584
1584
|
size: "small",
|
|
1585
|
-
...Object.keys(l).reduce((g,
|
|
1585
|
+
...Object.keys(l).reduce((g, m) => (m !== a && m !== r && (g[m] = i[m]), g), {})
|
|
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 = re(!1), o = typeof r.disabled == "function" ? r.disabled(t, a) : r.disabled || !1,
|
|
1596
|
-
if (!(i.value ||
|
|
1595
|
+
}).checked, i = re(!1), o = re(l), g = typeof r.disabled == "function" ? r.disabled(t, a) : r.disabled || !1, m = async (p) => {
|
|
1596
|
+
if (!(i.value || g))
|
|
1597
1597
|
try {
|
|
1598
|
-
i.value = !0
|
|
1598
|
+
i.value = !0;
|
|
1599
|
+
const y = r.onChange(p, t, a);
|
|
1600
|
+
y && typeof y.then == "function" && await y, o.value = p;
|
|
1599
1601
|
} catch (y) {
|
|
1600
1602
|
console.error("Switch change failed:", y);
|
|
1601
1603
|
} finally {
|
|
1602
1604
|
i.value = !1;
|
|
1603
1605
|
}
|
|
1604
1606
|
}, v = k(Wt, {
|
|
1605
|
-
value:
|
|
1607
|
+
value: o.value,
|
|
1606
1608
|
size: r.size || "medium",
|
|
1607
|
-
disabled:
|
|
1609
|
+
disabled: g,
|
|
1608
1610
|
loading: i.value,
|
|
1609
|
-
onUpdateValue: r.confirm ? void 0 :
|
|
1611
|
+
onUpdateValue: r.confirm ? void 0 : m
|
|
1610
1612
|
});
|
|
1611
1613
|
if (r.confirm) {
|
|
1612
|
-
const p = typeof r.confirm.text == "function" ? r.confirm.text(!
|
|
1614
|
+
const p = typeof r.confirm.text == "function" ? r.confirm.text(!o.value, t) : r.confirm.text;
|
|
1613
1615
|
return k(la, {
|
|
1614
|
-
onPositiveClick: () =>
|
|
1616
|
+
onPositiveClick: () => m(!o.value),
|
|
1615
1617
|
positiveText: r.confirm.okText || "确认",
|
|
1616
1618
|
negativeText: r.confirm.cancelText || "取消"
|
|
1617
1619
|
}, {
|
|
@@ -1620,7 +1622,7 @@ var Su = (e) => {
|
|
|
1620
1622
|
});
|
|
1621
1623
|
}
|
|
1622
1624
|
return v;
|
|
1623
|
-
},
|
|
1625
|
+
}, Nr = (e, t, a = "label", r = "value") => e == null ? "-" : Array.isArray(e) ? k(ae, {
|
|
1624
1626
|
size: "small",
|
|
1625
1627
|
wrap: !0
|
|
1626
1628
|
}, () => e.map((l, i) => {
|
|
@@ -1636,11 +1638,11 @@ const Br = (e, t, a, r) => {
|
|
|
1636
1638
|
case "file":
|
|
1637
1639
|
return Fr(e, t, a.fileConfig);
|
|
1638
1640
|
case "tag":
|
|
1639
|
-
return
|
|
1641
|
+
return Nr(e, a.tagOptions || [], a.tagLabelField || "label", a.tagValueField || "value");
|
|
1640
1642
|
case "icon":
|
|
1641
|
-
return
|
|
1643
|
+
return jr(e, a.iconConfig);
|
|
1642
1644
|
case "switch":
|
|
1643
|
-
return
|
|
1645
|
+
return Ir(e, t, r || 0, a.switchConfig);
|
|
1644
1646
|
case "text":
|
|
1645
1647
|
default:
|
|
1646
1648
|
return Pr(e);
|
|
@@ -1655,9 +1657,9 @@ function Gu() {
|
|
|
1655
1657
|
renderImage: Dr,
|
|
1656
1658
|
renderFile: Fr,
|
|
1657
1659
|
renderTag: Ze,
|
|
1658
|
-
renderTags:
|
|
1659
|
-
renderIcon:
|
|
1660
|
-
renderSwitch:
|
|
1660
|
+
renderTags: Nr,
|
|
1661
|
+
renderIcon: jr,
|
|
1662
|
+
renderSwitch: Ir
|
|
1661
1663
|
};
|
|
1662
1664
|
}
|
|
1663
1665
|
function Vt(e) {
|
|
@@ -1670,22 +1672,22 @@ function $u(e) {
|
|
|
1670
1672
|
if (typeof f.title == "function") return "自定义列";
|
|
1671
1673
|
}
|
|
1672
1674
|
return o(f);
|
|
1673
|
-
},
|
|
1674
|
-
Qt(l, (f,
|
|
1675
|
-
const u = f.map((O) => o(O)).filter(Boolean),
|
|
1676
|
-
|
|
1675
|
+
}, m = (f) => "defaultVisible" in f ? f.defaultVisible !== !1 : !0, v = (f) => "type" in f && (f.type === "selection" || f.type === "expand") ? !1 : "configurable" in f ? f.configurable !== !1 : !0, p = (f) => f.filter((N) => m(N)).map((N) => o(N)).filter(Boolean), y = re(p(l.value));
|
|
1676
|
+
Qt(l, (f, N) => {
|
|
1677
|
+
const u = f.map((O) => o(O)).filter(Boolean), w = N?.map((O) => o(O)).filter(Boolean) || [], b = u.filter((O) => !w.includes(O)), F = w.filter((O) => !u.includes(O)), V = y.value.filter((O) => !F.includes(O));
|
|
1678
|
+
b.forEach((O) => {
|
|
1677
1679
|
const ye = f.find((ge) => o(ge) === O);
|
|
1678
|
-
ye &&
|
|
1679
|
-
}),
|
|
1680
|
+
ye && m(ye) && V.push(O);
|
|
1681
|
+
}), y.value = V;
|
|
1680
1682
|
});
|
|
1681
|
-
const S = K(() => l.value.filter((f) => o(f) &&
|
|
1683
|
+
const S = K(() => l.value.filter((f) => o(f) && v(f)).map((f) => ({
|
|
1682
1684
|
key: o(f),
|
|
1683
1685
|
title: g(f),
|
|
1684
|
-
visible:
|
|
1685
|
-
configurable:
|
|
1686
|
+
visible: y.value.includes(o(f)),
|
|
1687
|
+
configurable: v(f)
|
|
1686
1688
|
}))), T = (f) => {
|
|
1687
1689
|
if (f?.show === !1) return null;
|
|
1688
|
-
const { renderActions:
|
|
1690
|
+
const { renderActions: N } = ku({
|
|
1689
1691
|
...f,
|
|
1690
1692
|
onView: t,
|
|
1691
1693
|
onEdit: a,
|
|
@@ -1698,15 +1700,15 @@ function $u(e) {
|
|
|
1698
1700
|
minWidth: f?.minWidth,
|
|
1699
1701
|
fixed: f?.fixed !== !1 ? f?.fixed || "right" : void 0,
|
|
1700
1702
|
align: "center",
|
|
1701
|
-
render: (u,
|
|
1703
|
+
render: (u, w) => N(u, w)
|
|
1702
1704
|
};
|
|
1703
1705
|
}, M = (f) => {
|
|
1704
1706
|
if ("columnType" in f && zr(f)) {
|
|
1705
|
-
const
|
|
1707
|
+
const N = f.key;
|
|
1706
1708
|
return {
|
|
1707
1709
|
...f,
|
|
1708
1710
|
align: f.align || "center",
|
|
1709
|
-
render: (u,
|
|
1711
|
+
render: (u, w) => Br(N ? u[N] : void 0, u, l.value.find((b) => "key" in b && b.key === N) || f, w)
|
|
1710
1712
|
};
|
|
1711
1713
|
}
|
|
1712
1714
|
return {
|
|
@@ -1716,21 +1718,21 @@ function $u(e) {
|
|
|
1716
1718
|
};
|
|
1717
1719
|
return {
|
|
1718
1720
|
mergedColumns: K(() => {
|
|
1719
|
-
const f = l.value,
|
|
1720
|
-
const F = o(
|
|
1721
|
-
return "type" in
|
|
1722
|
-
}).map((
|
|
1723
|
-
return
|
|
1721
|
+
const f = l.value, N = i.value, u = f.filter((b) => {
|
|
1722
|
+
const F = o(b);
|
|
1723
|
+
return "type" in b && (b.type === "selection" || b.type === "expand") || !F ? !0 : y.value.includes(F);
|
|
1724
|
+
}).map((b) => M(b)), w = T(N);
|
|
1725
|
+
return w && u.push(w), u;
|
|
1724
1726
|
}),
|
|
1725
1727
|
configurableColumns: S,
|
|
1726
|
-
visibleColumnKeys:
|
|
1728
|
+
visibleColumnKeys: y,
|
|
1727
1729
|
setVisibleColumnKeys: (f) => {
|
|
1728
|
-
|
|
1730
|
+
y.value = f;
|
|
1729
1731
|
},
|
|
1730
1732
|
resetColumnSetting: () => {
|
|
1731
|
-
|
|
1733
|
+
y.value = p(l.value);
|
|
1732
1734
|
},
|
|
1733
|
-
getVisibleColumnKeys: () => [...
|
|
1735
|
+
getVisibleColumnKeys: () => [...y.value]
|
|
1734
1736
|
};
|
|
1735
1737
|
}
|
|
1736
1738
|
var Au = {
|
|
@@ -1763,11 +1765,11 @@ function Pu(e) {
|
|
|
1763
1765
|
showQuickJumper: t.showQuickJumper ?? We.showQuickJumper,
|
|
1764
1766
|
prefix: t.prefix,
|
|
1765
1767
|
suffix: t.suffix
|
|
1766
|
-
}),
|
|
1768
|
+
}), m = (S) => {
|
|
1767
1769
|
if (t === !1 || !t) return {};
|
|
1768
1770
|
const T = i(), M = { ...t };
|
|
1769
1771
|
return S.page !== void 0 && (M[T.page] = S.page), S.pageSize !== void 0 && (M[T.pageSize] = S.pageSize), M;
|
|
1770
|
-
},
|
|
1772
|
+
}, v = (S) => {
|
|
1771
1773
|
const T = i();
|
|
1772
1774
|
return {
|
|
1773
1775
|
[T.page]: S[T.page],
|
|
@@ -1778,15 +1780,15 @@ function Pu(e) {
|
|
|
1778
1780
|
return {
|
|
1779
1781
|
paginationConfig: g,
|
|
1780
1782
|
handlePageChange: (S) => {
|
|
1781
|
-
const T =
|
|
1782
|
-
r?.(T), l?.(
|
|
1783
|
+
const T = m({ page: S });
|
|
1784
|
+
r?.(T), l?.(v(T));
|
|
1783
1785
|
},
|
|
1784
1786
|
handlePageSizeChange: (S) => {
|
|
1785
|
-
const T =
|
|
1787
|
+
const T = m({
|
|
1786
1788
|
page: 1,
|
|
1787
1789
|
pageSize: S
|
|
1788
1790
|
});
|
|
1789
|
-
r?.(T), l?.(
|
|
1791
|
+
r?.(T), l?.(v(T));
|
|
1790
1792
|
},
|
|
1791
1793
|
getFieldNames: i
|
|
1792
1794
|
};
|
|
@@ -1794,7 +1796,7 @@ function Pu(e) {
|
|
|
1794
1796
|
var Ou = {
|
|
1795
1797
|
key: 0,
|
|
1796
1798
|
class: "dydx-table__toolbar"
|
|
1797
|
-
}, Du = { class: "dydx-table__column-setting" }, Fu = { class: "dydx-table__column-setting-header" },
|
|
1799
|
+
}, Du = { class: "dydx-table__column-setting" }, Fu = { class: "dydx-table__column-setting-header" }, ju = /* @__PURE__ */ he({
|
|
1798
1800
|
inheritAttrs: !1,
|
|
1799
1801
|
__name: "DydxNaiveTable",
|
|
1800
1802
|
props: {
|
|
@@ -1845,33 +1847,33 @@ var Ou = {
|
|
|
1845
1847
|
"delete"
|
|
1846
1848
|
],
|
|
1847
1849
|
setup(e, { expose: t, emit: a }) {
|
|
1848
|
-
const r = e, l = a, i = rt(), o = re(null), g = re(void 0),
|
|
1850
|
+
const r = e, l = a, i = rt(), o = re(null), g = re(void 0), m = K(() => !i.maxHeight), v = ($) => {
|
|
1849
1851
|
const A = getComputedStyle($);
|
|
1850
1852
|
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
|
-
},
|
|
1853
|
+
}, p = ($) => {
|
|
1852
1854
|
let A = $.parentElement;
|
|
1853
1855
|
for (; A && A !== document.body; ) {
|
|
1854
|
-
if (
|
|
1856
|
+
if (v(A)) return A;
|
|
1855
1857
|
A = A.parentElement;
|
|
1856
1858
|
}
|
|
1857
1859
|
return null;
|
|
1858
|
-
},
|
|
1859
|
-
|
|
1860
|
+
}, y = () => {
|
|
1861
|
+
m.value && ha(() => {
|
|
1860
1862
|
const $ = o.value;
|
|
1861
1863
|
if (!$) return;
|
|
1862
|
-
const A =
|
|
1864
|
+
const A = p($);
|
|
1863
1865
|
if (!A) {
|
|
1864
1866
|
g.value = void 0;
|
|
1865
1867
|
return;
|
|
1866
1868
|
}
|
|
1867
|
-
const
|
|
1869
|
+
const j = getComputedStyle(A), ve = parseFloat(j.paddingTop), Ke = parseFloat(j.paddingBottom), Ge = A.getBoundingClientRect(), n = $.getBoundingClientRect(), h = $.querySelector(".dydx-table__toolbar"), I = h ? h.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
1870
|
De > 200 ? g.value = De : g.value = void 0;
|
|
1869
1871
|
});
|
|
1870
1872
|
}, S = K(() => i.maxHeight ? i.maxHeight : g.value);
|
|
1871
1873
|
Jt(() => {
|
|
1872
|
-
|
|
1874
|
+
y(), window.addEventListener("resize", y);
|
|
1873
1875
|
}), _a(() => {
|
|
1874
|
-
window.removeEventListener("resize",
|
|
1876
|
+
window.removeEventListener("resize", y);
|
|
1875
1877
|
});
|
|
1876
1878
|
const T = re(null), { mergedColumns: M, configurableColumns: L, visibleColumnKeys: x, setVisibleColumnKeys: D, resetColumnSetting: G, getVisibleColumnKeys: f } = $u({
|
|
1877
1879
|
columns: () => r.columns,
|
|
@@ -1879,7 +1881,7 @@ var Ou = {
|
|
|
1879
1881
|
onView: ($) => l("view", $),
|
|
1880
1882
|
onEdit: ($) => l("edit", $),
|
|
1881
1883
|
onDelete: ($) => l("delete", $)
|
|
1882
|
-
}), { paginationConfig:
|
|
1884
|
+
}), { paginationConfig: N, handlePageChange: u, handlePageSizeChange: w } = Pu({
|
|
1883
1885
|
get pagination() {
|
|
1884
1886
|
return r.pagination;
|
|
1885
1887
|
},
|
|
@@ -1892,8 +1894,8 @@ var Ou = {
|
|
|
1892
1894
|
Qt(x, ($) => {
|
|
1893
1895
|
l("update:visibleColumns", $);
|
|
1894
1896
|
});
|
|
1895
|
-
const
|
|
1896
|
-
l("update:checkedRowKeys", $, r.data.filter((A) => $.includes(
|
|
1897
|
+
const b = K(() => typeof r.rowKey == "function" ? r.rowKey : ($) => $[r.rowKey]), F = ($) => {
|
|
1898
|
+
l("update:checkedRowKeys", $, r.data.filter((A) => $.includes(b.value(A))));
|
|
1897
1899
|
}, V = () => {
|
|
1898
1900
|
r.onAdd?.();
|
|
1899
1901
|
}, O = () => {
|
|
@@ -1913,16 +1915,16 @@ var Ou = {
|
|
|
1913
1915
|
scrollTo: ($) => {
|
|
1914
1916
|
T.value?.scrollTo($);
|
|
1915
1917
|
}
|
|
1916
|
-
}), ($, A) => (
|
|
1918
|
+
}), ($, A) => (_(), Q("div", {
|
|
1917
1919
|
ref_key: "containerRef",
|
|
1918
1920
|
ref: o,
|
|
1919
1921
|
class: "dydx-table"
|
|
1920
|
-
}, [r.showToolbar ? (
|
|
1922
|
+
}, [r.showToolbar ? (_(), Q("div", Ou, [C(c(ae), {
|
|
1921
1923
|
class: "dydx-table__toolbar-left",
|
|
1922
1924
|
size: 12
|
|
1923
1925
|
}, {
|
|
1924
1926
|
default: s(() => [
|
|
1925
|
-
e.showAdd ? (
|
|
1927
|
+
e.showAdd ? (_(), P(c(X), {
|
|
1926
1928
|
key: 0,
|
|
1927
1929
|
type: "primary",
|
|
1928
1930
|
onClick: V
|
|
@@ -1934,17 +1936,17 @@ var Ou = {
|
|
|
1934
1936
|
default: s(() => [E(" " + W(e.addButtonText), 1)]),
|
|
1935
1937
|
_: 3
|
|
1936
1938
|
})) : Y("", !0),
|
|
1937
|
-
(
|
|
1939
|
+
(_(!0), Q(te, null, ne(e.leftButtons, (j) => (_(), Q(te, { key: j.key }, [j.show !== !1 ? (_(), P(c(X), {
|
|
1938
1940
|
key: 0,
|
|
1939
|
-
type:
|
|
1940
|
-
disabled:
|
|
1941
|
-
onClick:
|
|
1941
|
+
type: j.type,
|
|
1942
|
+
disabled: j.disabled,
|
|
1943
|
+
onClick: j.onClick
|
|
1942
1944
|
}, de({
|
|
1943
|
-
default: s(() => [E(" " + W(
|
|
1945
|
+
default: s(() => [E(" " + W(j.label), 1)]),
|
|
1944
1946
|
_: 2
|
|
1945
|
-
}, [
|
|
1947
|
+
}, [j.icon ? {
|
|
1946
1948
|
name: "icon",
|
|
1947
|
-
fn: s(() => [(
|
|
1949
|
+
fn: s(() => [(_(), P(me(j.icon)))]),
|
|
1948
1950
|
key: "0"
|
|
1949
1951
|
} : void 0]), 1032, [
|
|
1950
1952
|
"type",
|
|
@@ -1954,30 +1956,30 @@ var Ou = {
|
|
|
1954
1956
|
U($.$slots, "toolbar-left", {}, void 0, !0)
|
|
1955
1957
|
]),
|
|
1956
1958
|
_: 3
|
|
1957
|
-
}), C(c(
|
|
1959
|
+
}), C(c(ae), {
|
|
1958
1960
|
class: "dydx-table__toolbar-right",
|
|
1959
1961
|
size: 8
|
|
1960
1962
|
}, {
|
|
1961
1963
|
default: s(() => [
|
|
1962
1964
|
U($.$slots, "toolbar-right", {}, void 0, !0),
|
|
1963
|
-
(
|
|
1965
|
+
(_(!0), Q(te, null, ne(e.rightButtons, (j) => (_(), Q(te, { key: j.key }, [j.show !== !1 ? (_(), P(c(X), {
|
|
1964
1966
|
key: 0,
|
|
1965
|
-
type:
|
|
1966
|
-
disabled:
|
|
1967
|
-
onClick:
|
|
1967
|
+
type: j.type,
|
|
1968
|
+
disabled: j.disabled,
|
|
1969
|
+
onClick: j.onClick
|
|
1968
1970
|
}, de({
|
|
1969
|
-
default: s(() => [E(" " + W(
|
|
1971
|
+
default: s(() => [E(" " + W(j.label), 1)]),
|
|
1970
1972
|
_: 2
|
|
1971
|
-
}, [
|
|
1973
|
+
}, [j.icon ? {
|
|
1972
1974
|
name: "icon",
|
|
1973
|
-
fn: s(() => [(
|
|
1975
|
+
fn: s(() => [(_(), P(me(j.icon)))]),
|
|
1974
1976
|
key: "0"
|
|
1975
1977
|
} : void 0]), 1032, [
|
|
1976
1978
|
"type",
|
|
1977
1979
|
"disabled",
|
|
1978
1980
|
"onClick"
|
|
1979
1981
|
])) : Y("", !0)], 64))), 128)),
|
|
1980
|
-
e.showRefresh ? (
|
|
1982
|
+
e.showRefresh ? (_(), P(c(Be), {
|
|
1981
1983
|
key: 0,
|
|
1982
1984
|
trigger: "hover"
|
|
1983
1985
|
}, {
|
|
@@ -1995,7 +1997,7 @@ var Ou = {
|
|
|
1995
1997
|
default: s(() => [A[1] || (A[1] = E(" 刷新 ", -1))]),
|
|
1996
1998
|
_: 1
|
|
1997
1999
|
})) : Y("", !0),
|
|
1998
|
-
e.showColumnSetting ? (
|
|
2000
|
+
e.showColumnSetting ? (_(), P(c(ia), {
|
|
1999
2001
|
key: 1,
|
|
2000
2002
|
trigger: "click",
|
|
2001
2003
|
placement: "bottom-end"
|
|
@@ -2024,16 +2026,16 @@ var Ou = {
|
|
|
2024
2026
|
_: 1
|
|
2025
2027
|
}, 8, ["onClick"])]), C(c(et), {
|
|
2026
2028
|
value: c(x),
|
|
2027
|
-
"onUpdate:value": A[0] || (A[0] = (
|
|
2029
|
+
"onUpdate:value": A[0] || (A[0] = (j) => ba(x) ? x.value = j : null)
|
|
2028
2030
|
}, {
|
|
2029
|
-
default: s(() => [C(c(
|
|
2031
|
+
default: s(() => [C(c(ae), {
|
|
2030
2032
|
vertical: "",
|
|
2031
2033
|
size: 8
|
|
2032
2034
|
}, {
|
|
2033
|
-
default: s(() => [(
|
|
2034
|
-
key:
|
|
2035
|
-
value:
|
|
2036
|
-
label:
|
|
2035
|
+
default: s(() => [(_(!0), Q(te, null, ne(c(L), (j) => (_(), P(c(Ht), {
|
|
2036
|
+
key: j.key,
|
|
2037
|
+
value: j.key,
|
|
2038
|
+
label: j.title
|
|
2037
2039
|
}, null, 8, ["value", "label"]))), 128))]),
|
|
2038
2040
|
_: 1
|
|
2039
2041
|
})]),
|
|
@@ -2048,15 +2050,15 @@ var Ou = {
|
|
|
2048
2050
|
ref: T,
|
|
2049
2051
|
data: e.data,
|
|
2050
2052
|
columns: c(M),
|
|
2051
|
-
"row-key":
|
|
2053
|
+
"row-key": b.value,
|
|
2052
2054
|
loading: e.loading,
|
|
2053
|
-
pagination: c(
|
|
2055
|
+
pagination: c(N),
|
|
2054
2056
|
remote: e.remote,
|
|
2055
2057
|
"checked-row-keys": e.checkedRowKeys,
|
|
2056
2058
|
"max-height": S.value
|
|
2057
2059
|
}, c(i), {
|
|
2058
2060
|
"onUpdate:page": c(u),
|
|
2059
|
-
"onUpdate:pageSize": c(
|
|
2061
|
+
"onUpdate:pageSize": c(w),
|
|
2060
2062
|
"onUpdate:checkedRowKeys": F
|
|
2061
2063
|
}), null, 16, [
|
|
2062
2064
|
"data",
|
|
@@ -2071,7 +2073,7 @@ var Ou = {
|
|
|
2071
2073
|
"onUpdate:pageSize"
|
|
2072
2074
|
])], 512));
|
|
2073
2075
|
}
|
|
2074
|
-
}), Rr = /* @__PURE__ */ Ar(
|
|
2076
|
+
}), Rr = /* @__PURE__ */ Ar(ju, [["__scopeId", "data-v-082aaa9d"]]), Iu = /* @__PURE__ */ he({
|
|
2075
2077
|
name: "DydxFormModal",
|
|
2076
2078
|
inheritAttrs: !1,
|
|
2077
2079
|
__name: "DydxFormModal",
|
|
@@ -2106,9 +2108,9 @@ var Ou = {
|
|
|
2106
2108
|
"cancel"
|
|
2107
2109
|
],
|
|
2108
2110
|
setup(e, { expose: t, emit: a }) {
|
|
2109
|
-
const r = e, l = a, i = rt(), o = re(), g = K(() => r.title ? r.title : `${r.model[r.rowKey] ? "编辑" : "新增"}${r.subtitle}`),
|
|
2111
|
+
const r = e, l = a, i = rt(), o = re(), g = K(() => r.title ? r.title : `${r.model[r.rowKey] ? "编辑" : "新增"}${r.subtitle}`), m = K(() => ({ width: typeof r.width == "number" ? `${r.width}px` : r.width })), v = () => {
|
|
2110
2112
|
l("update:show", !1), l("cancel");
|
|
2111
|
-
},
|
|
2113
|
+
}, p = async () => {
|
|
2112
2114
|
try {
|
|
2113
2115
|
await o.value?.validate(), l("confirm", r.model);
|
|
2114
2116
|
} catch {
|
|
@@ -2118,26 +2120,26 @@ var Ou = {
|
|
|
2118
2120
|
getFormRef: () => o.value,
|
|
2119
2121
|
validate: () => o.value?.validate(),
|
|
2120
2122
|
resetFields: () => o.value?.resetFields()
|
|
2121
|
-
}), (
|
|
2123
|
+
}), (y, S) => (_(), P(c(oa), J({
|
|
2122
2124
|
show: e.show,
|
|
2123
2125
|
preset: "card",
|
|
2124
2126
|
title: g.value,
|
|
2125
|
-
style:
|
|
2127
|
+
style: m.value,
|
|
2126
2128
|
"mask-closable": !1
|
|
2127
2129
|
}, c(i), { "onUpdate:show": S[0] || (S[0] = (T) => l("update:show", T)) }), de({ _: 2 }, [
|
|
2128
|
-
|
|
2130
|
+
y.$slots.header ? {
|
|
2129
2131
|
name: "header",
|
|
2130
|
-
fn: s(() => [U(
|
|
2132
|
+
fn: s(() => [U(y.$slots, "header")]),
|
|
2131
2133
|
key: "0"
|
|
2132
2134
|
} : void 0,
|
|
2133
|
-
|
|
2135
|
+
y.$slots["header-extra"] ? {
|
|
2134
2136
|
name: "header-extra",
|
|
2135
|
-
fn: s(() => [U(
|
|
2137
|
+
fn: s(() => [U(y.$slots, "header-extra")]),
|
|
2136
2138
|
key: "1"
|
|
2137
2139
|
} : void 0,
|
|
2138
|
-
|
|
2140
|
+
y.$slots.default ? {
|
|
2139
2141
|
name: "default",
|
|
2140
|
-
fn: s(() => [U(
|
|
2142
|
+
fn: s(() => [U(y.$slots, "default")]),
|
|
2141
2143
|
key: "2"
|
|
2142
2144
|
} : {
|
|
2143
2145
|
name: "default",
|
|
@@ -2155,24 +2157,24 @@ var Ou = {
|
|
|
2155
2157
|
"show-footer": !1,
|
|
2156
2158
|
"disable-default-required": e.disableDefaultRequired
|
|
2157
2159
|
}, de({ _: 2 }, [
|
|
2158
|
-
|
|
2160
|
+
y.$slots["form-header"] ? {
|
|
2159
2161
|
name: "header",
|
|
2160
|
-
fn: s((T) => [U(
|
|
2162
|
+
fn: s((T) => [U(y.$slots, "form-header", le(ue(T)))]),
|
|
2161
2163
|
key: "0"
|
|
2162
2164
|
} : void 0,
|
|
2163
|
-
|
|
2165
|
+
y.$slots["form-footer"] ? {
|
|
2164
2166
|
name: "footer",
|
|
2165
|
-
fn: s((T) => [U(
|
|
2167
|
+
fn: s((T) => [U(y.$slots, "form-footer", le(ue(T)))]),
|
|
2166
2168
|
key: "1"
|
|
2167
2169
|
} : void 0,
|
|
2168
|
-
|
|
2170
|
+
y.$slots["form-append"] ? {
|
|
2169
2171
|
name: "append",
|
|
2170
|
-
fn: s((T) => [U(
|
|
2172
|
+
fn: s((T) => [U(y.$slots, "form-append", le(ue(T)))]),
|
|
2171
2173
|
key: "2"
|
|
2172
2174
|
} : void 0,
|
|
2173
|
-
|
|
2175
|
+
ne(y.$slots, (T, M) => ({
|
|
2174
2176
|
name: M,
|
|
2175
|
-
fn: s((L) => [typeof M == "string" && M.startsWith("field-") ? U(
|
|
2177
|
+
fn: s((L) => [typeof M == "string" && M.startsWith("field-") ? U(y.$slots, M, le(J({ key: 0 }, L))) : Y("", !0)])
|
|
2176
2178
|
}))
|
|
2177
2179
|
]), 1032, [
|
|
2178
2180
|
"schemas",
|
|
@@ -2188,16 +2190,16 @@ var Ou = {
|
|
|
2188
2190
|
}, 8, ["show"])]),
|
|
2189
2191
|
key: "3"
|
|
2190
2192
|
},
|
|
2191
|
-
|
|
2193
|
+
y.$slots.footer ? {
|
|
2192
2194
|
name: "footer",
|
|
2193
|
-
fn: s(() => [U(
|
|
2195
|
+
fn: s(() => [U(y.$slots, "footer")]),
|
|
2194
2196
|
key: "4"
|
|
2195
2197
|
} : {
|
|
2196
2198
|
name: "footer",
|
|
2197
|
-
fn: s(() => [C(c(
|
|
2198
|
-
default: s(() => [e.showCancel ? (
|
|
2199
|
+
fn: s(() => [C(c(ae), { justify: "end" }, {
|
|
2200
|
+
default: s(() => [e.showCancel ? (_(), P(c(X), {
|
|
2199
2201
|
key: 0,
|
|
2200
|
-
onClick:
|
|
2202
|
+
onClick: v
|
|
2201
2203
|
}, {
|
|
2202
2204
|
icon: s(() => [C(c(H), null, {
|
|
2203
2205
|
default: s(() => [C(c(er))]),
|
|
@@ -2208,7 +2210,7 @@ var Ou = {
|
|
|
2208
2210
|
})) : Y("", !0), C(c(X), {
|
|
2209
2211
|
type: "primary",
|
|
2210
2212
|
loading: e.loading,
|
|
2211
|
-
onClick:
|
|
2213
|
+
onClick: p
|
|
2212
2214
|
}, {
|
|
2213
2215
|
icon: s(() => [C(c(H), null, {
|
|
2214
2216
|
default: s(() => [C(c(Zt))]),
|
|
@@ -2221,9 +2223,9 @@ var Ou = {
|
|
|
2221
2223
|
})]),
|
|
2222
2224
|
key: "5"
|
|
2223
2225
|
},
|
|
2224
|
-
|
|
2226
|
+
y.$slots.action ? {
|
|
2225
2227
|
name: "action",
|
|
2226
|
-
fn: s(() => [U(
|
|
2228
|
+
fn: s(() => [U(y.$slots, "action")]),
|
|
2227
2229
|
key: "6"
|
|
2228
2230
|
} : void 0
|
|
2229
2231
|
]), 1040, [
|
|
@@ -2232,7 +2234,7 @@ var Ou = {
|
|
|
2232
2234
|
"style"
|
|
2233
2235
|
]));
|
|
2234
2236
|
}
|
|
2235
|
-
}), Ur =
|
|
2237
|
+
}), Ur = Iu, Nu = {
|
|
2236
2238
|
key: 0,
|
|
2237
2239
|
style: {
|
|
2238
2240
|
"margin-bottom": "16px",
|
|
@@ -2274,9 +2276,9 @@ var Ou = {
|
|
|
2274
2276
|
"cancel"
|
|
2275
2277
|
],
|
|
2276
2278
|
setup(e, { expose: t, emit: a }) {
|
|
2277
|
-
const r = e, l = a, i = rt(), o = re(), g = K(() => r.title ? r.title : `${r.model[r.rowKey] ? "编辑" : "新增"}${r.subtitle}`),
|
|
2279
|
+
const r = e, l = a, i = rt(), o = re(), g = K(() => r.title ? r.title : `${r.model[r.rowKey] ? "编辑" : "新增"}${r.subtitle}`), m = () => {
|
|
2278
2280
|
l("update:show", !1), l("cancel");
|
|
2279
|
-
},
|
|
2281
|
+
}, v = async () => {
|
|
2280
2282
|
try {
|
|
2281
2283
|
await o.value?.validate(), l("confirm", r.model);
|
|
2282
2284
|
} catch {
|
|
@@ -2286,23 +2288,23 @@ var Ou = {
|
|
|
2286
2288
|
getFormRef: () => o.value,
|
|
2287
2289
|
validate: () => o.value?.validate(),
|
|
2288
2290
|
resetFields: () => o.value?.resetFields()
|
|
2289
|
-
}), (
|
|
2291
|
+
}), (p, y) => (_(), P(c(Hr), J({
|
|
2290
2292
|
show: e.show,
|
|
2291
2293
|
width: e.width,
|
|
2292
2294
|
placement: e.placement,
|
|
2293
2295
|
"mask-closable": !1
|
|
2294
|
-
}, c(i), { "onUpdate:show":
|
|
2296
|
+
}, c(i), { "onUpdate:show": y[0] || (y[0] = (S) => l("update:show", S)) }), {
|
|
2295
2297
|
default: s(() => [C(c(qr), {
|
|
2296
2298
|
title: g.value,
|
|
2297
2299
|
closable: "",
|
|
2298
|
-
onClose:
|
|
2299
|
-
}, de({ _: 2 }, [
|
|
2300
|
+
onClose: m
|
|
2301
|
+
}, de({ _: 2 }, [p.$slots.default ? {
|
|
2300
2302
|
name: "default",
|
|
2301
|
-
fn: s(() => [U(
|
|
2303
|
+
fn: s(() => [U(p.$slots, "default")]),
|
|
2302
2304
|
key: "0"
|
|
2303
2305
|
} : {
|
|
2304
2306
|
name: "default",
|
|
2305
|
-
fn: s(() => [
|
|
2307
|
+
fn: s(() => [p.$slots["header-extra"] ? (_(), Q("div", Nu, [U(p.$slots, "header-extra")])) : Y("", !0), C(c(tt), { show: e.loading }, {
|
|
2306
2308
|
default: s(() => [C(c(Le), {
|
|
2307
2309
|
ref_key: "formRef",
|
|
2308
2310
|
ref: o,
|
|
@@ -2316,24 +2318,24 @@ var Ou = {
|
|
|
2316
2318
|
"show-footer": !1,
|
|
2317
2319
|
"disable-default-required": e.disableDefaultRequired
|
|
2318
2320
|
}, de({ _: 2 }, [
|
|
2319
|
-
|
|
2321
|
+
p.$slots["form-header"] ? {
|
|
2320
2322
|
name: "header",
|
|
2321
|
-
fn: s((S) => [U(
|
|
2323
|
+
fn: s((S) => [U(p.$slots, "form-header", le(ue(S)))]),
|
|
2322
2324
|
key: "0"
|
|
2323
2325
|
} : void 0,
|
|
2324
|
-
|
|
2326
|
+
p.$slots["form-footer"] ? {
|
|
2325
2327
|
name: "footer",
|
|
2326
|
-
fn: s((S) => [U(
|
|
2328
|
+
fn: s((S) => [U(p.$slots, "form-footer", le(ue(S)))]),
|
|
2327
2329
|
key: "1"
|
|
2328
2330
|
} : void 0,
|
|
2329
|
-
|
|
2331
|
+
p.$slots["form-append"] ? {
|
|
2330
2332
|
name: "append",
|
|
2331
|
-
fn: s((S) => [U(
|
|
2333
|
+
fn: s((S) => [U(p.$slots, "form-append", le(ue(S)))]),
|
|
2332
2334
|
key: "2"
|
|
2333
2335
|
} : void 0,
|
|
2334
|
-
|
|
2336
|
+
ne(p.$slots, (S, T) => ({
|
|
2335
2337
|
name: T,
|
|
2336
|
-
fn: s((M) => [typeof T == "string" && T.startsWith("field-") ? U(
|
|
2338
|
+
fn: s((M) => [typeof T == "string" && T.startsWith("field-") ? U(p.$slots, T, le(J({ key: 0 }, M))) : Y("", !0)])
|
|
2337
2339
|
}))
|
|
2338
2340
|
]), 1032, [
|
|
2339
2341
|
"schemas",
|
|
@@ -2348,16 +2350,16 @@ var Ou = {
|
|
|
2348
2350
|
_: 3
|
|
2349
2351
|
}, 8, ["show"])]),
|
|
2350
2352
|
key: "1"
|
|
2351
|
-
},
|
|
2353
|
+
}, p.$slots.footer ? {
|
|
2352
2354
|
name: "footer",
|
|
2353
|
-
fn: s(() => [U(
|
|
2355
|
+
fn: s(() => [U(p.$slots, "footer")]),
|
|
2354
2356
|
key: "2"
|
|
2355
2357
|
} : {
|
|
2356
2358
|
name: "footer",
|
|
2357
|
-
fn: s(() => [C(c(
|
|
2358
|
-
default: s(() => [e.showCancel ? (
|
|
2359
|
+
fn: s(() => [C(c(ae), { justify: "end" }, {
|
|
2360
|
+
default: s(() => [e.showCancel ? (_(), P(c(X), {
|
|
2359
2361
|
key: 0,
|
|
2360
|
-
onClick:
|
|
2362
|
+
onClick: m
|
|
2361
2363
|
}, {
|
|
2362
2364
|
icon: s(() => [C(c(H), null, {
|
|
2363
2365
|
default: s(() => [C(c(er))]),
|
|
@@ -2368,7 +2370,7 @@ var Ou = {
|
|
|
2368
2370
|
})) : Y("", !0), C(c(X), {
|
|
2369
2371
|
type: "primary",
|
|
2370
2372
|
loading: e.loading,
|
|
2371
|
-
onClick:
|
|
2373
|
+
onClick: v
|
|
2372
2374
|
}, {
|
|
2373
2375
|
icon: s(() => [C(c(H), null, {
|
|
2374
2376
|
default: s(() => [C(c(Zt))]),
|