dydx-naive-ui-for-vue 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as Xn } from "./resolver-BDxomgBZ.js";
|
|
2
|
-
import { NAutoComplete as bt, NButton as E, NCascader as _t, NCheckbox as
|
|
3
|
-
import { Fragment as J, computed as I, createBlock as
|
|
4
|
-
import * as
|
|
5
|
-
import { AddOutline as
|
|
2
|
+
import { NAutoComplete as bt, NButton as E, NCascader as _t, NCheckbox as Ke, NCheckboxGroup as Ne, NColorPicker as Ct, NDataTable as wt, NDatePicker as xt, NDrawer as kt, NDrawerContent as St, NDropdown as Tt, NDynamicInput as Nt, NDynamicTags as Pt, NForm as Dt, NFormItem as Ft, NGrid as zt, NGridItem as Ot, NIcon as A, NImage as Rt, NInput as It, NInputNumber as $t, NMention as Bt, NModal as Ut, NPopconfirm as At, NPopover as Mt, NRadio as Et, NRadioGroup as Le, NRate as Vt, NSelect as We, NSlider as Gt, NSpace as q, NSpin as Pe, NSwitch as jt, NTag as we, NText as Ht, NTimePicker as Kt, NTooltip as Se, NTreeSelect as Lt, NUpload as qe, NUploadDragger as Wt, useMessage as qt } from "naive-ui";
|
|
3
|
+
import { Fragment as J, computed as I, createBlock as T, createCommentVNode as L, createElementBlock as W, createElementVNode as pe, createSlots as de, createTextVNode as R, createVNode as y, defineComponent as ne, guardReactiveProps as Jt, h, isRef as Qt, mergeProps as K, nextTick as Yt, normalizeProps as Xt, onMounted as Zt, onUnmounted as ea, openBlock as m, ref as Y, renderList as ee, renderSlot as V, resolveDynamicComponent as ae, toDisplayString as j, toHandlers as ta, unref as u, useAttrs as De, watch as Je, withCtx as o } from "vue";
|
|
4
|
+
import * as me from "@vicons/ionicons5";
|
|
5
|
+
import { AddOutline as Qe, CheckmarkOutline as Ye, CloseOutline as Xe, CloudUploadOutline as Ue, CreateOutline as aa, DownloadOutline as ra, EyeOutline as na, OpenOutline as la, RefreshOutline as Ze, SearchCircleOutline as oa, SettingsOutline as ia, TrashOutline as sa } from "@vicons/ionicons5";
|
|
6
6
|
var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
7
7
|
name: "DydxUpload",
|
|
8
8
|
__name: "DydxUpload",
|
|
@@ -43,44 +43,44 @@ var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
|
43
43
|
"beforeUpload"
|
|
44
44
|
],
|
|
45
45
|
setup(e, { expose: t, emit: r }) {
|
|
46
|
-
const a = e, l = r, c = qt(), i = Y(),
|
|
47
|
-
...
|
|
48
|
-
url:
|
|
49
|
-
})) : a.fileList),
|
|
50
|
-
const
|
|
51
|
-
return a.acceptTypes?.length &&
|
|
52
|
-
}),
|
|
46
|
+
const a = e, l = r, c = qt(), i = Y(), x = I(() => a.listType ? a.listType : a.uploadType === "image" ? "image-card" : "text"), v = I(() => a.urlPrefix ? a.fileList.map((N) => ({
|
|
47
|
+
...N,
|
|
48
|
+
url: N.url && !N.url.startsWith("http") ? a.urlPrefix + N.url : N.url
|
|
49
|
+
})) : a.fileList), g = I(() => {
|
|
50
|
+
const N = [];
|
|
51
|
+
return a.acceptTypes?.length && N.push(`支持格式:${a.acceptTypes.join(", ")}`), a.maxSize && N.push(`单个文件不超过 ${a.maxSize}MB`), a.maxCount && N.push(`最多 ${a.maxCount} 个文件`), N.join(";");
|
|
52
|
+
}), b = I(() => {
|
|
53
53
|
if (a.accept) return a.accept;
|
|
54
54
|
if (a.acceptTypes?.length) return a.acceptTypes.join(",");
|
|
55
55
|
if (a.uploadType === "image") return "image/*";
|
|
56
|
-
}),
|
|
57
|
-
const { uploadType:
|
|
56
|
+
}), P = I(() => {
|
|
57
|
+
const { uploadType: N, fileList: F, customUpload: z, acceptTypes: d, maxSize: s, maxCount: p, multiple: S, autoUpload: G, disabled: X, urlPrefix: B, showTip: Z, showDragger: _e, ...se } = a;
|
|
58
58
|
return se;
|
|
59
|
-
}),
|
|
60
|
-
l("update:fileList", a.urlPrefix ?
|
|
59
|
+
}), D = (N) => {
|
|
60
|
+
l("update:fileList", a.urlPrefix ? N.map((F) => ({
|
|
61
61
|
...F,
|
|
62
62
|
url: F.url?.startsWith(a.urlPrefix) ? F.url.slice(a.urlPrefix.length) : F.url
|
|
63
|
-
})) :
|
|
64
|
-
}, k = async ({ file:
|
|
65
|
-
l("beforeUpload",
|
|
66
|
-
const F =
|
|
67
|
-
return F ? a.maxSize && F.size > a.maxSize * 1024 * 1024 ? (c.error(`文件大小不能超过 ${a.maxSize}MB`), !1) : a.acceptTypes?.length && !a.acceptTypes.some((
|
|
68
|
-
if (
|
|
69
|
-
if (
|
|
70
|
-
const [d] =
|
|
63
|
+
})) : N);
|
|
64
|
+
}, k = async ({ file: N }) => {
|
|
65
|
+
l("beforeUpload", N);
|
|
66
|
+
const F = N.file;
|
|
67
|
+
return F ? a.maxSize && F.size > a.maxSize * 1024 * 1024 ? (c.error(`文件大小不能超过 ${a.maxSize}MB`), !1) : a.acceptTypes?.length && !a.acceptTypes.some((z) => {
|
|
68
|
+
if (z.startsWith(".")) return F.name.toLowerCase().endsWith(z.toLowerCase());
|
|
69
|
+
if (z.includes("*")) {
|
|
70
|
+
const [d] = z.split("/");
|
|
71
71
|
return F.type.startsWith(d);
|
|
72
72
|
}
|
|
73
|
-
return F.type ===
|
|
73
|
+
return F.type === z;
|
|
74
74
|
}) ? (c.error(`只支持 ${a.acceptTypes.join(", ")} 格式`), !1) : a.maxCount && a.fileList.length >= a.maxCount ? (l("exceed", [F]), c.error(`最多上传 ${a.maxCount} 个文件`), !1) : !0 : !0;
|
|
75
|
-
}, M = async (
|
|
76
|
-
const { file: F, onProgress:
|
|
75
|
+
}, M = async (N) => {
|
|
76
|
+
const { file: F, onProgress: z, onFinish: d, onError: s } = N;
|
|
77
77
|
if (!a.customUpload) {
|
|
78
78
|
console.warn("DydxUpload: customUpload 方法未提供"), s();
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
try {
|
|
82
82
|
F.url = await a.customUpload(F.file, (p) => {
|
|
83
|
-
|
|
83
|
+
z({ percent: p });
|
|
84
84
|
}), F.status = "finished", d(), l("success", F);
|
|
85
85
|
} catch (p) {
|
|
86
86
|
s(), l("error", F, p);
|
|
@@ -92,38 +92,38 @@ var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
|
92
92
|
submit: () => i.value?.submit(),
|
|
93
93
|
openDialog: () => i.value?.openOpenFileDialog(),
|
|
94
94
|
clear: () => i.value?.clear()
|
|
95
|
-
}), (
|
|
96
|
-
const
|
|
95
|
+
}), (N, F) => {
|
|
96
|
+
const z = A, d = Ht, s = Wt, p = E, S = qe;
|
|
97
97
|
return m(), W("div", null, [
|
|
98
98
|
y(S, K({
|
|
99
99
|
ref_key: "uploadRef",
|
|
100
100
|
ref: i
|
|
101
|
-
},
|
|
102
|
-
"file-list":
|
|
101
|
+
}, P.value, {
|
|
102
|
+
"file-list": v.value,
|
|
103
103
|
"custom-request": M,
|
|
104
|
-
accept:
|
|
104
|
+
accept: b.value,
|
|
105
105
|
max: e.maxCount,
|
|
106
106
|
multiple: e.multiple,
|
|
107
107
|
disabled: e.disabled,
|
|
108
108
|
"default-upload": e.autoUpload,
|
|
109
|
-
"list-type":
|
|
110
|
-
"onUpdate:fileList":
|
|
109
|
+
"list-type": x.value,
|
|
110
|
+
"onUpdate:fileList": D,
|
|
111
111
|
onBeforeUpload: k
|
|
112
112
|
}), {
|
|
113
|
-
default: o(() => [e.showDragger && e.uploadType !== "image" ? (m(),
|
|
113
|
+
default: o(() => [e.showDragger && e.uploadType !== "image" ? (m(), T(s, { key: 0 }, {
|
|
114
114
|
default: o(() => [
|
|
115
|
-
pe("div", ua, [y(
|
|
115
|
+
pe("div", ua, [y(z, {
|
|
116
116
|
size: "48",
|
|
117
117
|
depth: 3
|
|
118
118
|
}, {
|
|
119
|
-
default: o(() => [y(u(
|
|
119
|
+
default: o(() => [y(u(Ue))]),
|
|
120
120
|
_: 1
|
|
121
121
|
})]),
|
|
122
122
|
y(d, { style: { "font-size": "16px" } }, {
|
|
123
123
|
default: o(() => [...F[0] || (F[0] = [R(" 点击或拖拽文件到此区域上传 ", -1)])]),
|
|
124
124
|
_: 1
|
|
125
125
|
}),
|
|
126
|
-
e.showTip ? (m(),
|
|
126
|
+
e.showTip ? (m(), T(d, {
|
|
127
127
|
key: 0,
|
|
128
128
|
depth: "3",
|
|
129
129
|
style: {
|
|
@@ -132,20 +132,20 @@ var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
|
132
132
|
display: "block"
|
|
133
133
|
}
|
|
134
134
|
}, {
|
|
135
|
-
default: o(() => [R(j(
|
|
135
|
+
default: o(() => [R(j(g.value), 1)]),
|
|
136
136
|
_: 1
|
|
137
137
|
})) : L("", !0)
|
|
138
138
|
]),
|
|
139
139
|
_: 1
|
|
140
|
-
})) : V(
|
|
140
|
+
})) : V(N.$slots, "default", { key: 1 }, () => [e.uploadType === "image" && x.value === "image-card" ? (m(), T(z, {
|
|
141
141
|
key: 0,
|
|
142
142
|
size: 28
|
|
143
143
|
}, {
|
|
144
|
-
default: o(() => [y(u(
|
|
144
|
+
default: o(() => [y(u(Qe))]),
|
|
145
145
|
_: 1
|
|
146
|
-
})) : (m(),
|
|
147
|
-
icon: o(() => [y(
|
|
148
|
-
default: o(() => [y(u(
|
|
146
|
+
})) : (m(), T(p, { key: 1 }, {
|
|
147
|
+
icon: o(() => [y(z, null, {
|
|
148
|
+
default: o(() => [y(u(Ue))]),
|
|
149
149
|
_: 1
|
|
150
150
|
})]),
|
|
151
151
|
default: o(() => [R(" " + j(e.uploadType === "image" ? "上传图片" : "上传文件"), 1)]),
|
|
@@ -161,7 +161,7 @@ var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
|
161
161
|
"default-upload",
|
|
162
162
|
"list-type"
|
|
163
163
|
]),
|
|
164
|
-
!e.autoUpload &&
|
|
164
|
+
!e.autoUpload && v.value.length > 0 ? (m(), T(p, {
|
|
165
165
|
key: 0,
|
|
166
166
|
type: "primary",
|
|
167
167
|
onClick: Q,
|
|
@@ -170,7 +170,7 @@ var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
|
170
170
|
default: o(() => [...F[1] || (F[1] = [R(" 开始上传 ", -1)])]),
|
|
171
171
|
_: 1
|
|
172
172
|
})) : L("", !0),
|
|
173
|
-
e.showTip && !(e.showDragger && e.uploadType !== "image") ? (m(),
|
|
173
|
+
e.showTip && !(e.showDragger && e.uploadType !== "image") ? (m(), T(d, {
|
|
174
174
|
key: 1,
|
|
175
175
|
depth: "3",
|
|
176
176
|
style: {
|
|
@@ -179,13 +179,13 @@ var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
|
179
179
|
display: "block"
|
|
180
180
|
}
|
|
181
181
|
}, {
|
|
182
|
-
default: o(() => [R(j(
|
|
182
|
+
default: o(() => [R(j(g.value), 1)]),
|
|
183
183
|
_: 1
|
|
184
184
|
})) : L("", !0)
|
|
185
185
|
]);
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
}),
|
|
188
|
+
}), ye = da, fa = /* @__PURE__ */ ne({
|
|
189
189
|
name: "DydxIconSelect",
|
|
190
190
|
__name: "DydxIconSelect",
|
|
191
191
|
props: {
|
|
@@ -204,22 +204,22 @@ var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
|
204
204
|
},
|
|
205
205
|
emits: ["update:value"],
|
|
206
206
|
setup(e, { emit: t }) {
|
|
207
|
-
const r = e, a = t, l = Object.keys(
|
|
208
|
-
let
|
|
209
|
-
return r.iconStyle === "outline" ?
|
|
210
|
-
label:
|
|
211
|
-
value:
|
|
207
|
+
const r = e, a = t, l = Object.keys(me), c = I(() => {
|
|
208
|
+
let g = l;
|
|
209
|
+
return r.iconStyle === "outline" ? g = l.filter((b) => b.endsWith("Outline")) : r.iconStyle === "sharp" ? g = l.filter((b) => b.endsWith("Sharp")) : r.iconStyle === "filled" && (g = l.filter((b) => !b.endsWith("Outline") && !b.endsWith("Sharp"))), g.map((b) => ({
|
|
210
|
+
label: b,
|
|
211
|
+
value: b
|
|
212
212
|
}));
|
|
213
|
-
}), i = (
|
|
214
|
-
const
|
|
215
|
-
return
|
|
216
|
-
},
|
|
217
|
-
const
|
|
218
|
-
return
|
|
219
|
-
},
|
|
220
|
-
a("update:value",
|
|
213
|
+
}), i = (g) => {
|
|
214
|
+
const b = me[g.value];
|
|
215
|
+
return h("div", { style: "display: flex; align-items: center; gap: 8px;" }, [h(A, { size: 18 }, () => h(b)), h("span", { style: "flex: 1; overflow: hidden; text-overflow: ellipsis;" }, g.label)]);
|
|
216
|
+
}, x = ({ option: g }) => {
|
|
217
|
+
const b = me[g.value];
|
|
218
|
+
return h("div", { style: "display: flex; align-items: center; gap: 4px;" }, [h(A, { size: 16 }, () => h(b)), g.label]);
|
|
219
|
+
}, v = (g) => {
|
|
220
|
+
a("update:value", g);
|
|
221
221
|
};
|
|
222
|
-
return (
|
|
222
|
+
return (g, b) => (m(), T(u(We), {
|
|
223
223
|
value: e.value,
|
|
224
224
|
options: c.value,
|
|
225
225
|
placeholder: e.placeholder,
|
|
@@ -227,9 +227,9 @@ var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
|
227
227
|
clearable: e.clearable,
|
|
228
228
|
filterable: e.filterable,
|
|
229
229
|
"render-label": i,
|
|
230
|
-
"render-tag":
|
|
230
|
+
"render-tag": x,
|
|
231
231
|
"virtual-scroll": "",
|
|
232
|
-
"onUpdate:value":
|
|
232
|
+
"onUpdate:value": v
|
|
233
233
|
}, null, 8, [
|
|
234
234
|
"value",
|
|
235
235
|
"options",
|
|
@@ -239,31 +239,31 @@ var ua = { style: { "margin-bottom": "12px" } }, da = /* @__PURE__ */ ne({
|
|
|
239
239
|
"filterable"
|
|
240
240
|
]));
|
|
241
241
|
}
|
|
242
|
-
}),
|
|
242
|
+
}), Fe = fa;
|
|
243
243
|
const ca = {
|
|
244
244
|
input: It,
|
|
245
245
|
"input-number": $t,
|
|
246
|
-
select:
|
|
247
|
-
"date-picker":
|
|
246
|
+
select: We,
|
|
247
|
+
"date-picker": xt,
|
|
248
248
|
"time-picker": Kt,
|
|
249
249
|
switch: jt,
|
|
250
250
|
slider: Gt,
|
|
251
|
-
"radio-group":
|
|
252
|
-
"checkbox-group":
|
|
251
|
+
"radio-group": Le,
|
|
252
|
+
"checkbox-group": Ne,
|
|
253
253
|
cascader: _t,
|
|
254
254
|
"tree-select": Lt,
|
|
255
|
-
upload:
|
|
255
|
+
upload: qe,
|
|
256
256
|
rate: Vt,
|
|
257
|
-
"color-picker":
|
|
257
|
+
"color-picker": Ct,
|
|
258
258
|
"auto-complete": bt,
|
|
259
|
-
"dynamic-input":
|
|
260
|
-
"dynamic-tags":
|
|
259
|
+
"dynamic-input": Nt,
|
|
260
|
+
"dynamic-tags": Pt,
|
|
261
261
|
mention: Bt,
|
|
262
|
-
"image-upload":
|
|
263
|
-
"file-upload":
|
|
264
|
-
"icon-select":
|
|
262
|
+
"image-upload": ye,
|
|
263
|
+
"file-upload": ye,
|
|
264
|
+
"icon-select": Fe
|
|
265
265
|
};
|
|
266
|
-
var pa = typeof global == "object" && global && global.Object === Object && global, ma = pa, ya = typeof self == "object" && self && self.Object === Object && self, ga = ma || ya || Function("return this")(),
|
|
266
|
+
var pa = typeof global == "object" && global && global.Object === Object && global, ma = pa, ya = typeof self == "object" && self && self.Object === Object && self, ga = ma || ya || Function("return this")(), ze = ga, ha = ze.Symbol, re = ha, et = Object.prototype, va = et.hasOwnProperty, ba = et.toString, ue = re ? re.toStringTag : void 0;
|
|
267
267
|
function _a(e) {
|
|
268
268
|
var t = va.call(e, ue), r = e[ue];
|
|
269
269
|
try {
|
|
@@ -274,32 +274,32 @@ function _a(e) {
|
|
|
274
274
|
var l = ba.call(e);
|
|
275
275
|
return a && (t ? e[ue] = r : delete e[ue]), l;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
function
|
|
279
|
-
return
|
|
277
|
+
var Ca = _a, wa = Object.prototype.toString;
|
|
278
|
+
function xa(e) {
|
|
279
|
+
return wa.call(e);
|
|
280
280
|
}
|
|
281
|
-
var ka =
|
|
282
|
-
function
|
|
283
|
-
return e == null ? e === void 0 ?
|
|
281
|
+
var ka = xa, Sa = "[object Null]", Ta = "[object Undefined]", Ae = re ? re.toStringTag : void 0;
|
|
282
|
+
function Na(e) {
|
|
283
|
+
return e == null ? e === void 0 ? Ta : Sa : Ae && Ae in Object(e) ? Ca(e) : ka(e);
|
|
284
284
|
}
|
|
285
|
-
var tt =
|
|
286
|
-
function
|
|
285
|
+
var tt = Na;
|
|
286
|
+
function Pa(e) {
|
|
287
287
|
return e != null && typeof e == "object";
|
|
288
288
|
}
|
|
289
|
-
var
|
|
290
|
-
function
|
|
291
|
-
return typeof e == "symbol" ||
|
|
289
|
+
var Da = Pa, Fa = "[object Symbol]";
|
|
290
|
+
function za(e) {
|
|
291
|
+
return typeof e == "symbol" || Da(e) && tt(e) == Fa;
|
|
292
292
|
}
|
|
293
|
-
var
|
|
294
|
-
function
|
|
293
|
+
var Oe = za;
|
|
294
|
+
function Oa(e, t) {
|
|
295
295
|
for (var r = -1, a = e == null ? 0 : e.length, l = Array(a); ++r < a; ) l[r] = t(e[r], r, e);
|
|
296
296
|
return l;
|
|
297
297
|
}
|
|
298
|
-
var Ra =
|
|
298
|
+
var Ra = Oa, Ia = Array.isArray, Re = Ia, $a = 1 / 0, Me = re ? re.prototype : void 0, Ee = Me ? Me.toString : void 0;
|
|
299
299
|
function at(e) {
|
|
300
300
|
if (typeof e == "string") return e;
|
|
301
|
-
if (
|
|
302
|
-
if (
|
|
301
|
+
if (Re(e)) return Ra(e, at) + "";
|
|
302
|
+
if (Oe(e)) return Ee ? Ee.call(e) : "";
|
|
303
303
|
var t = e + "";
|
|
304
304
|
return t == "0" && 1 / e == -$a ? "-0" : t;
|
|
305
305
|
}
|
|
@@ -308,18 +308,18 @@ function Ua(e) {
|
|
|
308
308
|
var t = typeof e;
|
|
309
309
|
return e != null && (t == "object" || t == "function");
|
|
310
310
|
}
|
|
311
|
-
var
|
|
311
|
+
var ge = Ua, Aa = "[object AsyncFunction]", Ma = "[object Function]", Ea = "[object GeneratorFunction]", Va = "[object Proxy]";
|
|
312
312
|
function Ga(e) {
|
|
313
|
-
if (!
|
|
313
|
+
if (!ge(e)) return !1;
|
|
314
314
|
var t = tt(e);
|
|
315
315
|
return t == Ma || t == Ea || t == Aa || t == Va;
|
|
316
316
|
}
|
|
317
|
-
var ja = Ga, Ha =
|
|
318
|
-
var e = /[^.]+$/.exec(
|
|
317
|
+
var ja = Ga, Ha = ze["__core-js_shared__"], xe = Ha, Ve = (function() {
|
|
318
|
+
var e = /[^.]+$/.exec(xe && xe.keys && xe.keys.IE_PROTO || "");
|
|
319
319
|
return e ? "Symbol(src)_1." + e : "";
|
|
320
320
|
})();
|
|
321
321
|
function Ka(e) {
|
|
322
|
-
return !!
|
|
322
|
+
return !!Ve && Ve in e;
|
|
323
323
|
}
|
|
324
324
|
var La = Ka, Wa = Function.prototype.toString;
|
|
325
325
|
function qa(e) {
|
|
@@ -337,7 +337,7 @@ function qa(e) {
|
|
|
337
337
|
}
|
|
338
338
|
var Ja = qa, Qa = /[\\^$.*+?()[\]{}|]/g, Ya = /^\[object .+?Constructor\]$/, Xa = Function.prototype, Za = Object.prototype, er = Xa.toString, tr = Za.hasOwnProperty, ar = RegExp("^" + er.call(tr).replace(Qa, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
339
339
|
function rr(e) {
|
|
340
|
-
return !
|
|
340
|
+
return !ge(e) || La(e) ? !1 : (ja(e) ? ar : Ya).test(Ja(e));
|
|
341
341
|
}
|
|
342
342
|
var nr = rr;
|
|
343
343
|
function lr(e, t) {
|
|
@@ -348,20 +348,20 @@ function ir(e, t) {
|
|
|
348
348
|
var r = or(e, t);
|
|
349
349
|
return nr(r) ? r : void 0;
|
|
350
350
|
}
|
|
351
|
-
var
|
|
351
|
+
var Ie = ir, sr = (function() {
|
|
352
352
|
try {
|
|
353
|
-
var e =
|
|
353
|
+
var e = Ie(Object, "defineProperty");
|
|
354
354
|
return e({}, "", {}), e;
|
|
355
355
|
} catch {
|
|
356
356
|
}
|
|
357
|
-
})(),
|
|
357
|
+
})(), Ge = sr, ur = 9007199254740991, dr = /^(?:0|[1-9]\d*)$/;
|
|
358
358
|
function fr(e, t) {
|
|
359
359
|
var r = typeof e;
|
|
360
360
|
return t = t ?? ur, !!t && (r == "number" || r != "symbol" && dr.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
361
361
|
}
|
|
362
362
|
var cr = fr;
|
|
363
363
|
function pr(e, t, r) {
|
|
364
|
-
t == "__proto__" &&
|
|
364
|
+
t == "__proto__" && Ge ? Ge(e, t, {
|
|
365
365
|
configurable: !0,
|
|
366
366
|
enumerable: !0,
|
|
367
367
|
value: r,
|
|
@@ -378,33 +378,33 @@ function hr(e, t, r) {
|
|
|
378
378
|
(!(gr.call(e, t) && rt(a, r)) || r === void 0 && !(t in e)) && mr(e, t, r);
|
|
379
379
|
}
|
|
380
380
|
var vr = hr, br = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, _r = /^\w*$/;
|
|
381
|
-
function
|
|
382
|
-
if (
|
|
381
|
+
function Cr(e, t) {
|
|
382
|
+
if (Re(e)) return !1;
|
|
383
383
|
var r = typeof e;
|
|
384
|
-
return r == "number" || r == "symbol" || r == "boolean" || e == null ||
|
|
384
|
+
return r == "number" || r == "symbol" || r == "boolean" || e == null || Oe(e) ? !0 : _r.test(e) || !br.test(e) || t != null && e in Object(t);
|
|
385
385
|
}
|
|
386
|
-
var
|
|
386
|
+
var wr = Cr, xr = Ie(Object, "create"), fe = xr;
|
|
387
387
|
function kr() {
|
|
388
388
|
this.__data__ = fe ? fe(null) : {}, this.size = 0;
|
|
389
389
|
}
|
|
390
390
|
var Sr = kr;
|
|
391
|
-
function
|
|
391
|
+
function Tr(e) {
|
|
392
392
|
var t = this.has(e) && delete this.__data__[e];
|
|
393
393
|
return this.size -= t ? 1 : 0, t;
|
|
394
394
|
}
|
|
395
|
-
var
|
|
395
|
+
var Nr = Tr, Pr = "__lodash_hash_undefined__", Dr = Object.prototype.hasOwnProperty;
|
|
396
396
|
function Fr(e) {
|
|
397
397
|
var t = this.__data__;
|
|
398
398
|
if (fe) {
|
|
399
399
|
var r = t[e];
|
|
400
|
-
return r ===
|
|
400
|
+
return r === Pr ? void 0 : r;
|
|
401
401
|
}
|
|
402
|
-
return
|
|
402
|
+
return Dr.call(t, e) ? t[e] : void 0;
|
|
403
403
|
}
|
|
404
|
-
var
|
|
404
|
+
var zr = Fr, Or = Object.prototype.hasOwnProperty;
|
|
405
405
|
function Rr(e) {
|
|
406
406
|
var t = this.__data__;
|
|
407
|
-
return fe ? t[e] !== void 0 :
|
|
407
|
+
return fe ? t[e] !== void 0 : Or.call(t, e);
|
|
408
408
|
}
|
|
409
409
|
var Ir = Rr, $r = "__lodash_hash_undefined__";
|
|
410
410
|
function Br(e, t) {
|
|
@@ -420,11 +420,11 @@ function le(e) {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
le.prototype.clear = Sr;
|
|
423
|
-
le.prototype.delete =
|
|
424
|
-
le.prototype.get =
|
|
423
|
+
le.prototype.delete = Nr;
|
|
424
|
+
le.prototype.get = zr;
|
|
425
425
|
le.prototype.has = Ir;
|
|
426
426
|
le.prototype.set = Ur;
|
|
427
|
-
var
|
|
427
|
+
var je = le;
|
|
428
428
|
function Ar() {
|
|
429
429
|
this.__data__ = [], this.size = 0;
|
|
430
430
|
}
|
|
@@ -433,23 +433,23 @@ function Er(e, t) {
|
|
|
433
433
|
for (var r = e.length; r--; ) if (rt(e[r][0], t)) return r;
|
|
434
434
|
return -1;
|
|
435
435
|
}
|
|
436
|
-
var
|
|
436
|
+
var he = Er, Vr = Array.prototype.splice;
|
|
437
437
|
function Gr(e) {
|
|
438
|
-
var t = this.__data__, r =
|
|
438
|
+
var t = this.__data__, r = he(t, e);
|
|
439
439
|
return r < 0 ? !1 : (r == t.length - 1 ? t.pop() : Vr.call(t, r, 1), --this.size, !0);
|
|
440
440
|
}
|
|
441
441
|
var jr = Gr;
|
|
442
442
|
function Hr(e) {
|
|
443
|
-
var t = this.__data__, r =
|
|
443
|
+
var t = this.__data__, r = he(t, e);
|
|
444
444
|
return r < 0 ? void 0 : t[r][1];
|
|
445
445
|
}
|
|
446
446
|
var Kr = Hr;
|
|
447
447
|
function Lr(e) {
|
|
448
|
-
return
|
|
448
|
+
return he(this.__data__, e) > -1;
|
|
449
449
|
}
|
|
450
450
|
var Wr = Lr;
|
|
451
451
|
function qr(e, t) {
|
|
452
|
-
var r = this.__data__, a =
|
|
452
|
+
var r = this.__data__, a = he(r, e);
|
|
453
453
|
return a < 0 ? (++this.size, r.push([e, t])) : r[a][1] = t, this;
|
|
454
454
|
}
|
|
455
455
|
var Jr = qr;
|
|
@@ -465,12 +465,12 @@ oe.prototype.delete = jr;
|
|
|
465
465
|
oe.prototype.get = Kr;
|
|
466
466
|
oe.prototype.has = Wr;
|
|
467
467
|
oe.prototype.set = Jr;
|
|
468
|
-
var Qr = oe, Yr =
|
|
468
|
+
var Qr = oe, Yr = Ie(ze, "Map"), Xr = Yr;
|
|
469
469
|
function Zr() {
|
|
470
470
|
this.size = 0, this.__data__ = {
|
|
471
|
-
hash: new
|
|
471
|
+
hash: new je(),
|
|
472
472
|
map: new (Xr || Qr)(),
|
|
473
|
-
string: new
|
|
473
|
+
string: new je()
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
476
|
var en = Zr;
|
|
@@ -483,22 +483,22 @@ function rn(e, t) {
|
|
|
483
483
|
var r = e.__data__;
|
|
484
484
|
return an(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
|
|
485
485
|
}
|
|
486
|
-
var
|
|
486
|
+
var ve = rn;
|
|
487
487
|
function nn(e) {
|
|
488
|
-
var t =
|
|
488
|
+
var t = ve(this, e).delete(e);
|
|
489
489
|
return this.size -= t ? 1 : 0, t;
|
|
490
490
|
}
|
|
491
491
|
var ln = nn;
|
|
492
492
|
function on(e) {
|
|
493
|
-
return
|
|
493
|
+
return ve(this, e).get(e);
|
|
494
494
|
}
|
|
495
495
|
var sn = on;
|
|
496
496
|
function un(e) {
|
|
497
|
-
return
|
|
497
|
+
return ve(this, e).has(e);
|
|
498
498
|
}
|
|
499
499
|
var dn = un;
|
|
500
500
|
function fn(e, t) {
|
|
501
|
-
var r =
|
|
501
|
+
var r = ve(this, e), a = r.size;
|
|
502
502
|
return r.set(e, t), this.size += r.size == a ? 0 : 1, this;
|
|
503
503
|
}
|
|
504
504
|
var cn = fn;
|
|
@@ -515,7 +515,7 @@ ie.prototype.get = sn;
|
|
|
515
515
|
ie.prototype.has = dn;
|
|
516
516
|
ie.prototype.set = cn;
|
|
517
517
|
var nt = ie, pn = "Expected a function";
|
|
518
|
-
function
|
|
518
|
+
function $e(e, t) {
|
|
519
519
|
if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(pn);
|
|
520
520
|
var r = function() {
|
|
521
521
|
var a = arguments, l = t ? t.apply(this, a) : a[0], c = r.cache;
|
|
@@ -523,10 +523,10 @@ function Ue(e, t) {
|
|
|
523
523
|
var i = e.apply(this, a);
|
|
524
524
|
return r.cache = c.set(l, i) || c, i;
|
|
525
525
|
};
|
|
526
|
-
return r.cache = new (
|
|
526
|
+
return r.cache = new ($e.Cache || nt)(), r;
|
|
527
527
|
}
|
|
528
|
-
|
|
529
|
-
var mn =
|
|
528
|
+
$e.Cache = nt;
|
|
529
|
+
var mn = $e, yn = 500;
|
|
530
530
|
function gn(e) {
|
|
531
531
|
var t = mn(e, function(a) {
|
|
532
532
|
return r.size === yn && r.clear(), a;
|
|
@@ -538,52 +538,52 @@ var hn = gn, vn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)
|
|
|
538
538
|
return e.charCodeAt(0) === 46 && t.push(""), e.replace(vn, function(r, a, l, c) {
|
|
539
539
|
t.push(l ? c.replace(bn, "$1") : a || r);
|
|
540
540
|
}), t;
|
|
541
|
-
}),
|
|
542
|
-
function
|
|
541
|
+
}), Cn = _n;
|
|
542
|
+
function wn(e) {
|
|
543
543
|
return e == null ? "" : Ba(e);
|
|
544
544
|
}
|
|
545
|
-
var
|
|
545
|
+
var xn = wn;
|
|
546
546
|
function kn(e, t) {
|
|
547
|
-
return
|
|
547
|
+
return Re(e) ? e : wr(e, t) ? [e] : Cn(xn(e));
|
|
548
548
|
}
|
|
549
549
|
var lt = kn, Sn = 1 / 0;
|
|
550
|
-
function
|
|
551
|
-
if (typeof e == "string" ||
|
|
550
|
+
function Tn(e) {
|
|
551
|
+
if (typeof e == "string" || Oe(e)) return e;
|
|
552
552
|
var t = e + "";
|
|
553
553
|
return t == "0" && 1 / e == -Sn ? "-0" : t;
|
|
554
554
|
}
|
|
555
|
-
var ot =
|
|
556
|
-
function
|
|
555
|
+
var ot = Tn;
|
|
556
|
+
function Nn(e, t) {
|
|
557
557
|
t = lt(t, e);
|
|
558
558
|
for (var r = 0, a = t.length; e != null && r < a; ) e = e[ot(t[r++])];
|
|
559
559
|
return r && r == a ? e : void 0;
|
|
560
560
|
}
|
|
561
|
-
var
|
|
562
|
-
function
|
|
563
|
-
var a = e == null ? void 0 :
|
|
561
|
+
var Pn = Nn;
|
|
562
|
+
function Dn(e, t, r) {
|
|
563
|
+
var a = e == null ? void 0 : Pn(e, t);
|
|
564
564
|
return a === void 0 ? r : a;
|
|
565
565
|
}
|
|
566
|
-
var Fn =
|
|
567
|
-
function
|
|
568
|
-
if (!
|
|
566
|
+
var Fn = Dn;
|
|
567
|
+
function zn(e, t, r, a) {
|
|
568
|
+
if (!ge(e)) return e;
|
|
569
569
|
t = lt(t, e);
|
|
570
|
-
for (var l = -1, c = t.length, i = c - 1,
|
|
571
|
-
var
|
|
572
|
-
if (
|
|
570
|
+
for (var l = -1, c = t.length, i = c - 1, x = e; x != null && ++l < c; ) {
|
|
571
|
+
var v = ot(t[l]), g = r;
|
|
572
|
+
if (v === "__proto__" || v === "constructor" || v === "prototype") return e;
|
|
573
573
|
if (l != i) {
|
|
574
|
-
var
|
|
575
|
-
|
|
574
|
+
var b = x[v];
|
|
575
|
+
g = a ? a(b, v, x) : void 0, g === void 0 && (g = ge(b) ? b : cr(t[l + 1]) ? [] : {});
|
|
576
576
|
}
|
|
577
|
-
vr(
|
|
577
|
+
vr(x, v, g), x = x[v];
|
|
578
578
|
}
|
|
579
579
|
return e;
|
|
580
580
|
}
|
|
581
|
-
var
|
|
581
|
+
var On = zn;
|
|
582
582
|
function Rn(e, t, r) {
|
|
583
|
-
return e == null ? e :
|
|
583
|
+
return e == null ? e : On(e, t, r);
|
|
584
584
|
}
|
|
585
585
|
var In = Rn;
|
|
586
|
-
const
|
|
586
|
+
const He = (e, t) => Fn(e, t), $n = (e, t, r) => {
|
|
587
587
|
In(e, t, r);
|
|
588
588
|
};
|
|
589
589
|
var Bn = /* @__PURE__ */ ne({
|
|
@@ -644,24 +644,26 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
644
644
|
"validate"
|
|
645
645
|
],
|
|
646
646
|
setup(e, { expose: t, emit: r }) {
|
|
647
|
-
const a = e, l = r, c = Y(), i = Y(
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
647
|
+
const a = e, l = r, c = Y(), i = Y();
|
|
648
|
+
let x = !1;
|
|
649
|
+
Je(() => a.model, (n) => {
|
|
650
|
+
!x && n && (i.value = JSON.parse(JSON.stringify(n)), x = !0);
|
|
651
|
+
}, {
|
|
652
|
+
immediate: !0,
|
|
653
|
+
deep: !1
|
|
652
654
|
});
|
|
653
|
-
const
|
|
655
|
+
const v = I(() => ({
|
|
654
656
|
type: "primary",
|
|
655
|
-
text: "
|
|
657
|
+
text: "搜索",
|
|
656
658
|
loading: a.loading,
|
|
657
|
-
renderIcon: () =>
|
|
659
|
+
renderIcon: () => h(A, null, { default: () => h(oa) }),
|
|
658
660
|
...a.submitButton
|
|
659
|
-
})),
|
|
661
|
+
})), g = I(() => ({
|
|
660
662
|
type: "default",
|
|
661
663
|
text: "重置",
|
|
662
|
-
renderIcon: () =>
|
|
664
|
+
renderIcon: () => h(A, null, { default: () => h(Ze) }),
|
|
663
665
|
...a.resetButton
|
|
664
|
-
})),
|
|
666
|
+
})), b = I(() => a.schemas.filter((n) => !(typeof n.hidden == "function" ? n.hidden(a.model) : n.hidden))), P = I(() => ({
|
|
665
667
|
labelWidth: a.labelWidth,
|
|
666
668
|
labelAlign: a.labelAlign,
|
|
667
669
|
labelPlacement: a.labelPlacement,
|
|
@@ -670,7 +672,7 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
670
672
|
showRequireMark: a.showRequireMark,
|
|
671
673
|
requireMarkPlacement: a.requireMarkPlacement,
|
|
672
674
|
...a.formProps
|
|
673
|
-
})),
|
|
675
|
+
})), D = I(() => ({
|
|
674
676
|
cols: 24,
|
|
675
677
|
xGap: a.xGap,
|
|
676
678
|
yGap: a.yGap,
|
|
@@ -678,13 +680,13 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
678
680
|
...a.gridProps,
|
|
679
681
|
responsive: "self"
|
|
680
682
|
})), k = (n) => {
|
|
681
|
-
const
|
|
682
|
-
return
|
|
683
|
+
const _ = n.type || "input";
|
|
684
|
+
return _ === "custom" ? n.component : ca[_];
|
|
683
685
|
}, M = (n) => typeof n.disabled == "function" ? n.disabled(a.model) : n.disabled, Q = (n) => {
|
|
684
|
-
const
|
|
685
|
-
if (
|
|
686
|
+
const _ = { ...n.props };
|
|
687
|
+
if (_.placeholder !== void 0) return _;
|
|
686
688
|
const $ = typeof n.label == "string" ? n.label : "";
|
|
687
|
-
if (!$) return
|
|
689
|
+
if (!$) return _;
|
|
688
690
|
const U = n.type || "input", H = [
|
|
689
691
|
"input",
|
|
690
692
|
"textarea",
|
|
@@ -698,31 +700,29 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
698
700
|
"time-picker",
|
|
699
701
|
"color-picker"
|
|
700
702
|
];
|
|
701
|
-
return H.includes(U) ?
|
|
702
|
-
},
|
|
703
|
-
const
|
|
703
|
+
return H.includes(U) ? _.placeholder = `请输入${$}` : te.includes(U) && (_.placeholder = `请选择${$}`), _;
|
|
704
|
+
}, N = (n) => {
|
|
705
|
+
const _ = n.type === "custom" ? "modelValue" : "value";
|
|
704
706
|
return {
|
|
705
|
-
[n.modelPropName ||
|
|
707
|
+
[n.modelPropName || _]: s(n.name),
|
|
706
708
|
...Q(n),
|
|
707
709
|
disabled: M(n)
|
|
708
710
|
};
|
|
709
711
|
}, F = (n) => {
|
|
710
|
-
const
|
|
712
|
+
const _ = n.type === "custom" ? "modelValue" : "value", $ = n.modelPropName || _;
|
|
711
713
|
return { [n.modelEventName || `update:${$}`]: (U) => p(n.name, U) };
|
|
712
|
-
},
|
|
714
|
+
}, z = (n) => {
|
|
713
715
|
if (!n) return {};
|
|
714
|
-
const { options:
|
|
716
|
+
const { options: _, labelField: $, valueField: U, ...H } = n;
|
|
715
717
|
return H;
|
|
716
718
|
}, d = (n) => {
|
|
717
719
|
if (!n) return {};
|
|
718
|
-
const { text:
|
|
720
|
+
const { text: _, ...$ } = n;
|
|
719
721
|
return $;
|
|
720
|
-
}, s = (n) =>
|
|
721
|
-
|
|
722
|
-
g = !1;
|
|
723
|
-
});
|
|
722
|
+
}, s = (n) => He(a.model, n), p = (n, _) => {
|
|
723
|
+
$n(a.model, n, _), l("update:model", a.model);
|
|
724
724
|
}, S = (n) => {
|
|
725
|
-
let
|
|
725
|
+
let _ = typeof n.rule == "function" ? n.rule(a.model) : n.rule;
|
|
726
726
|
const $ = !n.noRequired && !a.disableDefaultRequired;
|
|
727
727
|
if ($) {
|
|
728
728
|
const U = {
|
|
@@ -730,11 +730,11 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
730
730
|
message: `${typeof n.label == "string" ? n.label : "此项"}不能为空`,
|
|
731
731
|
trigger: "blur"
|
|
732
732
|
};
|
|
733
|
-
|
|
733
|
+
_ ? _ = Array.isArray(_) ? [U, ..._] : [U, _] : _ = U;
|
|
734
734
|
}
|
|
735
735
|
return {
|
|
736
736
|
label: typeof n.label == "string" ? n.label : void 0,
|
|
737
|
-
rule:
|
|
737
|
+
rule: _,
|
|
738
738
|
showRequireMark: $ ? void 0 : !1,
|
|
739
739
|
...n.formItemProps
|
|
740
740
|
};
|
|
@@ -748,11 +748,11 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
748
748
|
}, X = (n) => {
|
|
749
749
|
if (typeof n == "number" || typeof n == "string") return n;
|
|
750
750
|
if (typeof n == "object") {
|
|
751
|
-
const
|
|
751
|
+
const _ = [];
|
|
752
752
|
return Object.entries(G).forEach(([$, U]) => {
|
|
753
753
|
const H = n[$];
|
|
754
|
-
H !== void 0 &&
|
|
755
|
-
}),
|
|
754
|
+
H !== void 0 && _.push(`${U}:${H}`);
|
|
755
|
+
}), _.length === 0 ? 24 : _.join(" ");
|
|
756
756
|
}
|
|
757
757
|
return 24;
|
|
758
758
|
}, B = (n) => ({
|
|
@@ -760,54 +760,50 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
760
760
|
offset: n.offset
|
|
761
761
|
}), Z = async (...n) => {
|
|
762
762
|
await c.value.validate(...n);
|
|
763
|
-
},
|
|
763
|
+
}, _e = async (n, _) => {
|
|
764
764
|
const $ = Array.isArray(n) ? n : [n];
|
|
765
|
-
await c.value.validate(
|
|
765
|
+
await c.value.validate(_, (U) => $.some((H) => U.key === H));
|
|
766
766
|
}, se = () => c.value?.restoreValidation(), ce = () => {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
})) : console.warn("[DydxNaiveForm] 警告: 初始状态为空,无法重置"), l("reset");
|
|
770
|
-
}, C = async () => {
|
|
767
|
+
se(), i.value && (Object.assign(a.model, JSON.parse(JSON.stringify(i.value))), l("update:model", a.model)), l("reset");
|
|
768
|
+
}, w = async () => {
|
|
771
769
|
try {
|
|
772
770
|
await Z(), l("submit", a.model);
|
|
773
771
|
} catch (n) {
|
|
774
772
|
l("validate", n);
|
|
775
773
|
}
|
|
776
|
-
},
|
|
774
|
+
}, C = () => {
|
|
777
775
|
ce();
|
|
778
776
|
};
|
|
779
777
|
return t({
|
|
780
778
|
formRef: c.value,
|
|
781
779
|
validate: Z,
|
|
782
|
-
validateField:
|
|
780
|
+
validateField: _e,
|
|
783
781
|
restoreValidation: se,
|
|
784
782
|
getFormData: () => a.model,
|
|
785
783
|
setFormData: (n) => {
|
|
786
|
-
|
|
787
|
-
l("update:model", a.model), g = !1;
|
|
788
|
-
});
|
|
784
|
+
Object.assign(a.model, n), l("update:model", a.model);
|
|
789
785
|
},
|
|
790
|
-
getFieldValue: (n) =>
|
|
791
|
-
setFieldValue: (n,
|
|
786
|
+
getFieldValue: (n) => He(a.model, n),
|
|
787
|
+
setFieldValue: (n, _) => p(n, _),
|
|
792
788
|
resetFields: ce,
|
|
793
789
|
getFormItemInst: (n) => c.value?.getFormItemInst?.(n)
|
|
794
|
-
}), (n,
|
|
795
|
-
const $ = Ft, U =
|
|
790
|
+
}), (n, _) => {
|
|
791
|
+
const $ = Ft, U = Ot, H = E, te = zt, Ce = Dt;
|
|
796
792
|
return m(), W(J, null, [
|
|
797
793
|
V(n.$slots, "header", { model: a.model }),
|
|
798
794
|
y(u(Pe), { show: a.loading }, {
|
|
799
|
-
default: o(() => [y(
|
|
795
|
+
default: o(() => [y(Ce, K({
|
|
800
796
|
ref_key: "formRef",
|
|
801
797
|
ref: c,
|
|
802
798
|
model: a.model
|
|
803
|
-
},
|
|
804
|
-
default: o(() => [y(te,
|
|
805
|
-
default: o(() => [(m(!0), W(J, null, ee(
|
|
799
|
+
}, P.value), {
|
|
800
|
+
default: o(() => [y(te, Xt(Jt(D.value)), {
|
|
801
|
+
default: o(() => [(m(!0), W(J, null, ee(b.value, (f) => (m(), T(U, K({ key: f.name }, { ref_for: !0 }, B(f)), {
|
|
806
802
|
default: o(() => [f.type === "slot" ? V(n.$slots, f.slot || f.name, {
|
|
807
803
|
key: 0,
|
|
808
804
|
model: a.model,
|
|
809
805
|
schema: f
|
|
810
|
-
}) : (m(),
|
|
806
|
+
}) : (m(), T($, K({
|
|
811
807
|
key: 1,
|
|
812
808
|
path: f.name
|
|
813
809
|
}, { ref_for: !0 }, S(f)), de({
|
|
@@ -815,71 +811,71 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
815
811
|
model: a.model,
|
|
816
812
|
schema: f,
|
|
817
813
|
value: s(f.name),
|
|
818
|
-
setValue: (
|
|
819
|
-
}, () => [f.type === "radio-group" && f.props?.options ? (m(),
|
|
814
|
+
setValue: (O) => p(f.name, O)
|
|
815
|
+
}, () => [f.type === "radio-group" && f.props?.options ? (m(), T(u(Le), K({
|
|
820
816
|
key: 0,
|
|
821
817
|
value: s(f.name),
|
|
822
|
-
"onUpdate:value": (
|
|
823
|
-
}, { ref_for: !0 },
|
|
818
|
+
"onUpdate:value": (O) => p(f.name, O)
|
|
819
|
+
}, { ref_for: !0 }, z(f.props)), {
|
|
824
820
|
default: o(() => [y(u(q), null, {
|
|
825
|
-
default: o(() => [(m(!0), W(J, null, ee(f.props.options, (
|
|
826
|
-
key:
|
|
827
|
-
value:
|
|
828
|
-
disabled:
|
|
821
|
+
default: o(() => [(m(!0), W(J, null, ee(f.props.options, (O) => (m(), T(u(Et), {
|
|
822
|
+
key: O[f.props.valueField || "value"],
|
|
823
|
+
value: O[f.props.valueField || "value"],
|
|
824
|
+
disabled: O.disabled
|
|
829
825
|
}, {
|
|
830
|
-
default: o(() => [R(j(
|
|
826
|
+
default: o(() => [R(j(O[f.props.labelField || "label"]), 1)]),
|
|
831
827
|
_: 2
|
|
832
828
|
}, 1032, ["value", "disabled"]))), 128))]),
|
|
833
829
|
_: 2
|
|
834
830
|
}, 1024)]),
|
|
835
831
|
_: 2
|
|
836
|
-
}, 1040, ["value", "onUpdate:value"])) : f.type === "checkbox-group" && f.props?.options ? (m(),
|
|
832
|
+
}, 1040, ["value", "onUpdate:value"])) : f.type === "checkbox-group" && f.props?.options ? (m(), T(u(Ne), K({
|
|
837
833
|
key: 1,
|
|
838
834
|
value: s(f.name),
|
|
839
|
-
"onUpdate:value": (
|
|
840
|
-
}, { ref_for: !0 },
|
|
835
|
+
"onUpdate:value": (O) => p(f.name, O)
|
|
836
|
+
}, { ref_for: !0 }, z(f.props)), {
|
|
841
837
|
default: o(() => [y(u(q), null, {
|
|
842
|
-
default: o(() => [(m(!0), W(J, null, ee(f.props.options, (
|
|
843
|
-
key:
|
|
844
|
-
value:
|
|
845
|
-
disabled:
|
|
838
|
+
default: o(() => [(m(!0), W(J, null, ee(f.props.options, (O) => (m(), T(u(Ke), {
|
|
839
|
+
key: O[f.props.valueField || "value"],
|
|
840
|
+
value: O[f.props.valueField || "value"],
|
|
841
|
+
disabled: O.disabled
|
|
846
842
|
}, {
|
|
847
|
-
default: o(() => [R(j(
|
|
843
|
+
default: o(() => [R(j(O[f.props.labelField || "label"]), 1)]),
|
|
848
844
|
_: 2
|
|
849
845
|
}, 1032, ["value", "disabled"]))), 128))]),
|
|
850
846
|
_: 2
|
|
851
847
|
}, 1024)]),
|
|
852
848
|
_: 2
|
|
853
|
-
}, 1040, ["value", "onUpdate:value"])) : f.type === "switch" ? (m(),
|
|
849
|
+
}, 1040, ["value", "onUpdate:value"])) : f.type === "switch" ? (m(), T(ae(k(f)), K({
|
|
854
850
|
key: 2,
|
|
855
851
|
value: s(f.name),
|
|
856
|
-
"onUpdate:value": (
|
|
852
|
+
"onUpdate:value": (O) => p(f.name, O)
|
|
857
853
|
}, { ref_for: !0 }, f.props, { disabled: M(f) }), null, 16, [
|
|
858
854
|
"value",
|
|
859
855
|
"onUpdate:value",
|
|
860
856
|
"disabled"
|
|
861
|
-
])) : f.type === "image-upload" || f.type === "file-upload" ? (m(),
|
|
857
|
+
])) : f.type === "image-upload" || f.type === "file-upload" ? (m(), T(ae(k(f)), K({
|
|
862
858
|
key: 3,
|
|
863
859
|
"file-list": s(f.name) || [],
|
|
864
|
-
"onUpdate:fileList": (
|
|
860
|
+
"onUpdate:fileList": (O) => p(f.name, O),
|
|
865
861
|
"upload-type": f.type === "image-upload" ? "image" : "file"
|
|
866
862
|
}, { ref_for: !0 }, f.props, { disabled: M(f) }), null, 16, [
|
|
867
863
|
"file-list",
|
|
868
864
|
"onUpdate:fileList",
|
|
869
865
|
"upload-type",
|
|
870
866
|
"disabled"
|
|
871
|
-
])) : (m(),
|
|
867
|
+
])) : (m(), T(ae(k(f)), K({
|
|
872
868
|
key: 4,
|
|
873
869
|
ref_for: !0
|
|
874
|
-
},
|
|
870
|
+
}, N(f), ta(F(f))), null, 16))])]),
|
|
875
871
|
_: 2
|
|
876
872
|
}, [typeof f.label == "function" ? {
|
|
877
873
|
name: "label",
|
|
878
|
-
fn: o(() => [(m(),
|
|
874
|
+
fn: o(() => [(m(), T(ae(f.label)))]),
|
|
879
875
|
key: "0"
|
|
880
876
|
} : void 0]), 1040, ["path"]))]),
|
|
881
877
|
_: 2
|
|
882
|
-
}, 1040))), 128)), a.showFooter ? (m(),
|
|
878
|
+
}, 1040))), 128)), a.showFooter ? (m(), T(U, {
|
|
883
879
|
key: 0,
|
|
884
880
|
span: a.footerSpan
|
|
885
881
|
}, {
|
|
@@ -889,15 +885,15 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
889
885
|
reset: ce
|
|
890
886
|
}, () => [y(u(q), { justify: a.footerAlign }, {
|
|
891
887
|
default: o(() => [
|
|
892
|
-
|
|
893
|
-
default: o(() => [R(j(
|
|
888
|
+
g.value.hidden ? L("", !0) : (m(), T(H, K({ key: 0 }, d(g.value), { onClick: C }), {
|
|
889
|
+
default: o(() => [R(j(g.value.text), 1)]),
|
|
894
890
|
_: 1
|
|
895
891
|
}, 16)),
|
|
896
|
-
|
|
897
|
-
default: o(() => [R(j(
|
|
892
|
+
v.value.hidden ? L("", !0) : (m(), T(H, K({ key: 1 }, d(v.value), { onClick: w }), {
|
|
893
|
+
default: o(() => [R(j(v.value.text), 1)]),
|
|
898
894
|
_: 1
|
|
899
895
|
}, 16)),
|
|
900
|
-
(m(!0), W(J, null, ee(a.extraButtons, (f) => (m(),
|
|
896
|
+
(m(!0), W(J, null, ee(a.extraButtons, (f) => (m(), T(H, {
|
|
901
897
|
key: f.text,
|
|
902
898
|
type: f.type,
|
|
903
899
|
size: f.size,
|
|
@@ -927,65 +923,65 @@ var Bn = /* @__PURE__ */ ne({
|
|
|
927
923
|
], 64);
|
|
928
924
|
};
|
|
929
925
|
}
|
|
930
|
-
}),
|
|
926
|
+
}), be = Bn;
|
|
931
927
|
function Un(e) {
|
|
932
|
-
const { maxVisible: t = -1, buttons: r = [], showView: a = !0, showEdit: l = !0, showDelete: c = !0, viewConfig: i, editConfig:
|
|
933
|
-
const p =
|
|
928
|
+
const { maxVisible: t = -1, buttons: r = [], showView: a = !0, showEdit: l = !0, showDelete: c = !0, viewConfig: i, editConfig: x, deleteConfig: v, onView: g, onEdit: b, onDelete: P } = e, D = (s, p, S, G) => p ? s ? typeof s.show == "function" ? s.show(S, G) : s.show !== !1 : !0 : !1, k = (s, p, S) => s ? typeof s.disabled == "function" ? s.disabled(p, S) : s.disabled === !0 : !1, M = (s, p, S) => typeof s.show == "function" ? s.show(p, S) : s.show !== !1, Q = (s, p, S) => typeof s.disabled == "function" ? s.disabled(p, S) : s.disabled === !0, N = (s, p, S) => typeof s == "function" ? s(p) : s || S, F = (s) => {
|
|
929
|
+
const p = h(E, {
|
|
934
930
|
type: s.type,
|
|
935
931
|
size: "small",
|
|
936
932
|
disabled: s.disabled,
|
|
937
933
|
onClick: s.confirm ? void 0 : s.onClick,
|
|
938
934
|
renderIcon: s.icon
|
|
939
935
|
}, { default: () => s.label });
|
|
940
|
-
return s.confirm ?
|
|
936
|
+
return s.confirm ? h(At, { onPositiveClick: s.onClick }, {
|
|
941
937
|
trigger: () => p,
|
|
942
938
|
default: () => s.confirm
|
|
943
939
|
}) : p;
|
|
944
|
-
},
|
|
940
|
+
}, z = (s) => {
|
|
945
941
|
const p = s.map((G) => ({
|
|
946
942
|
label: G.label,
|
|
947
943
|
key: G.key,
|
|
948
944
|
disabled: G.disabled
|
|
949
945
|
}));
|
|
950
|
-
return
|
|
946
|
+
return h(Tt, {
|
|
951
947
|
options: p,
|
|
952
948
|
trigger: "click",
|
|
953
949
|
onSelect: (G) => {
|
|
954
950
|
s.find((X) => X.key === G)?.onClick();
|
|
955
951
|
}
|
|
956
|
-
}, { default: () =>
|
|
952
|
+
}, { default: () => h(E, { size: "small" }, { default: () => "更多" }) });
|
|
957
953
|
};
|
|
958
954
|
return {
|
|
959
955
|
renderActions: (s, p) => {
|
|
960
956
|
const S = [];
|
|
961
|
-
if (
|
|
957
|
+
if (D(i, a, s, p) && S.push({
|
|
962
958
|
key: "__view__",
|
|
963
959
|
label: i?.label || "查看",
|
|
964
960
|
type: "info",
|
|
965
961
|
disabled: k(i, s, p),
|
|
966
|
-
icon: () =>
|
|
967
|
-
onClick: () =>
|
|
962
|
+
icon: () => h(A, null, { default: () => h(na) }),
|
|
963
|
+
onClick: () => g?.({
|
|
968
964
|
row: s,
|
|
969
965
|
index: p
|
|
970
966
|
})
|
|
971
|
-
}),
|
|
967
|
+
}), D(x, l, s, p) && S.push({
|
|
972
968
|
key: "__edit__",
|
|
973
|
-
label:
|
|
969
|
+
label: x?.label || "编辑",
|
|
974
970
|
type: "primary",
|
|
975
|
-
disabled: k(
|
|
976
|
-
icon: () =>
|
|
977
|
-
onClick: () =>
|
|
971
|
+
disabled: k(x, s, p),
|
|
972
|
+
icon: () => h(A, null, { default: () => h(aa) }),
|
|
973
|
+
onClick: () => b?.({
|
|
978
974
|
row: s,
|
|
979
975
|
index: p
|
|
980
976
|
})
|
|
981
|
-
}),
|
|
977
|
+
}), D(v, c, s, p) && S.push({
|
|
982
978
|
key: "__delete__",
|
|
983
|
-
label:
|
|
979
|
+
label: v?.label || "删除",
|
|
984
980
|
type: "error",
|
|
985
|
-
disabled: k(
|
|
986
|
-
confirm:
|
|
987
|
-
icon: () =>
|
|
988
|
-
onClick: () =>
|
|
981
|
+
disabled: k(v, s, p),
|
|
982
|
+
confirm: N(v?.confirm, s, "确定删除此记录吗?"),
|
|
983
|
+
icon: () => h(A, null, { default: () => h(sa) }),
|
|
984
|
+
onClick: () => P?.({
|
|
989
985
|
row: s,
|
|
990
986
|
index: p
|
|
991
987
|
})
|
|
@@ -995,20 +991,20 @@ function Un(e) {
|
|
|
995
991
|
label: B.label,
|
|
996
992
|
type: B.type || "default",
|
|
997
993
|
disabled: Q(B, s, p),
|
|
998
|
-
confirm: B.confirm ?
|
|
994
|
+
confirm: B.confirm ? N(B.confirm, s, "确定执行此操作吗?") : void 0,
|
|
999
995
|
icon: B.icon,
|
|
1000
996
|
onClick: () => B.onClick?.(s, p)
|
|
1001
997
|
});
|
|
1002
|
-
}), t === -1 || S.length <= t) return
|
|
998
|
+
}), t === -1 || S.length <= t) return h(q, {
|
|
1003
999
|
size: "small",
|
|
1004
1000
|
wrap: !1
|
|
1005
1001
|
}, () => S.map((B) => F(B)));
|
|
1006
|
-
if (t === 0) return
|
|
1002
|
+
if (t === 0) return z(S);
|
|
1007
1003
|
const G = S.slice(0, t), X = S.slice(t);
|
|
1008
|
-
return
|
|
1004
|
+
return h(q, {
|
|
1009
1005
|
size: "small",
|
|
1010
1006
|
wrap: !1
|
|
1011
|
-
}, () => [...G.map((B) => F(B)),
|
|
1007
|
+
}, () => [...G.map((B) => F(B)), z(X)]);
|
|
1012
1008
|
},
|
|
1013
1009
|
isButtonVisible: M,
|
|
1014
1010
|
isButtonDisabled: Q
|
|
@@ -1027,7 +1023,7 @@ var An = (e) => {
|
|
|
1027
1023
|
if (!e) return "-";
|
|
1028
1024
|
const a = String(e), l = r?.newWindow !== !1;
|
|
1029
1025
|
let c;
|
|
1030
|
-
return r?.text ? c = typeof r.text == "function" ? r.text(t) : r.text : c = a,
|
|
1026
|
+
return r?.text ? c = typeof r.text == "function" ? r.text(t) : r.text : c = a, h(E, {
|
|
1031
1027
|
text: !0,
|
|
1032
1028
|
type: "primary",
|
|
1033
1029
|
onClick: () => {
|
|
@@ -1035,12 +1031,12 @@ var An = (e) => {
|
|
|
1035
1031
|
}
|
|
1036
1032
|
}, {
|
|
1037
1033
|
default: () => c,
|
|
1038
|
-
icon: () =>
|
|
1034
|
+
icon: () => h(A, { size: 14 }, () => h(la))
|
|
1039
1035
|
});
|
|
1040
1036
|
}, ut = (e, t) => {
|
|
1041
1037
|
if (!e) return "-";
|
|
1042
1038
|
const r = String(e), a = t?.width ?? 60, l = t?.height ?? 60, c = t?.radius ?? 4, i = t?.fallback;
|
|
1043
|
-
return
|
|
1039
|
+
return h(Rt, {
|
|
1044
1040
|
src: r,
|
|
1045
1041
|
width: typeof a == "number" ? a : void 0,
|
|
1046
1042
|
height: typeof l == "number" ? l : void 0,
|
|
@@ -1060,13 +1056,13 @@ var An = (e) => {
|
|
|
1060
1056
|
const i = document.createElement("a");
|
|
1061
1057
|
i.href = a, i.download = l, i.target = "_blank", i.rel = "noopener noreferrer", document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
1062
1058
|
};
|
|
1063
|
-
return
|
|
1064
|
-
trigger: () =>
|
|
1059
|
+
return h(Se, { trigger: "hover" }, {
|
|
1060
|
+
trigger: () => h(E, {
|
|
1065
1061
|
text: !0,
|
|
1066
1062
|
type: "primary",
|
|
1067
1063
|
onClick: c
|
|
1068
1064
|
}, {
|
|
1069
|
-
default: () =>
|
|
1065
|
+
default: () => h("span", { style: {
|
|
1070
1066
|
maxWidth: "150px",
|
|
1071
1067
|
overflow: "hidden",
|
|
1072
1068
|
textOverflow: "ellipsis",
|
|
@@ -1074,38 +1070,38 @@ var An = (e) => {
|
|
|
1074
1070
|
display: "inline-block",
|
|
1075
1071
|
verticalAlign: "middle"
|
|
1076
1072
|
} }, l),
|
|
1077
|
-
icon: () =>
|
|
1073
|
+
icon: () => h(A, { size: 14 }, () => h(ra))
|
|
1078
1074
|
}),
|
|
1079
1075
|
default: () => l
|
|
1080
1076
|
});
|
|
1081
1077
|
}, ft = (e, t) => {
|
|
1082
1078
|
if (!e) return "-";
|
|
1083
|
-
const r = String(e), a =
|
|
1084
|
-
return a ?
|
|
1079
|
+
const r = String(e), a = me[r];
|
|
1080
|
+
return a ? h(A, {
|
|
1085
1081
|
size: t?.size ?? 20,
|
|
1086
1082
|
color: t?.color
|
|
1087
|
-
}, () =>
|
|
1083
|
+
}, () => h(a)) : r;
|
|
1088
1084
|
}, Te = (e, t, r = "label", a = "value") => {
|
|
1089
1085
|
if (e == null) return "-";
|
|
1090
|
-
if (!t || t.length === 0) return
|
|
1086
|
+
if (!t || t.length === 0) return h(we, { size: "small" }, () => String(e));
|
|
1091
1087
|
const l = t.find((c) => {
|
|
1092
1088
|
const i = c[a];
|
|
1093
1089
|
return i === e || String(i) === String(e) ? !0 : typeof i == "number" && !isNaN(Number(e)) ? i === Number(e) : typeof e == "number" && !isNaN(Number(i)) ? Number(i) === e : typeof i == "boolean" ? i === (e === "true" || e === !0) : typeof e == "boolean" ? (i === "true" || i === !0) === e : !1;
|
|
1094
1090
|
});
|
|
1095
1091
|
if (l) {
|
|
1096
1092
|
const c = l, i = c[r];
|
|
1097
|
-
return
|
|
1093
|
+
return h(we, {
|
|
1098
1094
|
size: "small",
|
|
1099
|
-
...Object.keys(l).reduce((
|
|
1095
|
+
...Object.keys(l).reduce((x, v) => (v !== r && v !== a && (x[v] = c[v]), x), {})
|
|
1100
1096
|
}, () => i);
|
|
1101
1097
|
}
|
|
1102
|
-
return
|
|
1103
|
-
}, ct = (e, t, r = "label", a = "value") => e == null ? "-" : Array.isArray(e) ?
|
|
1098
|
+
return h(we, { size: "small" }, () => String(e));
|
|
1099
|
+
}, ct = (e, t, r = "label", a = "value") => e == null ? "-" : Array.isArray(e) ? h(q, {
|
|
1104
1100
|
size: "small",
|
|
1105
1101
|
wrap: !0
|
|
1106
1102
|
}, () => e.map((l, c) => {
|
|
1107
1103
|
const i = Te(l, t, r, a);
|
|
1108
|
-
return typeof i == "string" ?
|
|
1104
|
+
return typeof i == "string" ? h("span", { key: c }, i) : i;
|
|
1109
1105
|
})) : Te(e, t, r, a);
|
|
1110
1106
|
const pt = (e, t, r) => {
|
|
1111
1107
|
switch (r.columnType || "text") {
|
|
@@ -1138,17 +1134,17 @@ function al() {
|
|
|
1138
1134
|
};
|
|
1139
1135
|
}
|
|
1140
1136
|
function Mn(e) {
|
|
1141
|
-
const { columns: t, actionColumn: r, onView: a, onEdit: l, onDelete: c } = e, i = (d) => "key" in d && d.key ? String(d.key) : "type" in d ? `__${d.type}__` : "",
|
|
1137
|
+
const { columns: t, actionColumn: r, onView: a, onEdit: l, onDelete: c } = e, i = (d) => "key" in d && d.key ? String(d.key) : "type" in d ? `__${d.type}__` : "", x = (d) => {
|
|
1142
1138
|
if ("title" in d) {
|
|
1143
1139
|
if (typeof d.title == "string") return d.title;
|
|
1144
1140
|
if (typeof d.title == "function") return "自定义列";
|
|
1145
1141
|
}
|
|
1146
1142
|
return i(d);
|
|
1147
|
-
},
|
|
1143
|
+
}, v = (d) => "defaultVisible" in d ? d.defaultVisible !== !1 : !0, g = (d) => "type" in d && (d.type === "selection" || d.type === "expand") ? !1 : "configurable" in d ? d.configurable !== !1 : !0, b = () => t.filter((d) => v(d)).map((d) => i(d)).filter(Boolean), P = Y(b()), D = I(() => t.filter((d) => i(d) && g(d)).map((d) => ({
|
|
1148
1144
|
key: i(d),
|
|
1149
|
-
title:
|
|
1150
|
-
visible:
|
|
1151
|
-
configurable:
|
|
1145
|
+
title: x(d),
|
|
1146
|
+
visible: P.value.includes(i(d)),
|
|
1147
|
+
configurable: g(d)
|
|
1152
1148
|
}))), k = () => {
|
|
1153
1149
|
if (r?.show === !1) return null;
|
|
1154
1150
|
const { renderActions: d } = Un({
|
|
@@ -1184,26 +1180,26 @@ function Mn(e) {
|
|
|
1184
1180
|
mergedColumns: I(() => {
|
|
1185
1181
|
const d = t.filter((p) => {
|
|
1186
1182
|
const S = i(p);
|
|
1187
|
-
return "type" in p && (p.type === "selection" || p.type === "expand") || !S ? !0 :
|
|
1183
|
+
return "type" in p && (p.type === "selection" || p.type === "expand") || !S ? !0 : P.value.includes(S);
|
|
1188
1184
|
}).map((p) => M(p)), s = k();
|
|
1189
1185
|
return s && d.push(s), d;
|
|
1190
1186
|
}),
|
|
1191
|
-
configurableColumns:
|
|
1192
|
-
visibleColumnKeys:
|
|
1187
|
+
configurableColumns: D,
|
|
1188
|
+
visibleColumnKeys: P,
|
|
1193
1189
|
setVisibleColumnKeys: (d) => {
|
|
1194
|
-
|
|
1190
|
+
P.value = d;
|
|
1195
1191
|
},
|
|
1196
1192
|
resetColumnSetting: () => {
|
|
1197
|
-
|
|
1193
|
+
P.value = b();
|
|
1198
1194
|
},
|
|
1199
|
-
getVisibleColumnKeys: () => [...
|
|
1195
|
+
getVisibleColumnKeys: () => [...P.value]
|
|
1200
1196
|
};
|
|
1201
1197
|
}
|
|
1202
1198
|
var En = {
|
|
1203
1199
|
page: "page",
|
|
1204
1200
|
pageSize: "pageSize",
|
|
1205
1201
|
itemCount: "itemCount"
|
|
1206
|
-
},
|
|
1202
|
+
}, ke = {
|
|
1207
1203
|
pageSizes: [
|
|
1208
1204
|
10,
|
|
1209
1205
|
20,
|
|
@@ -1217,42 +1213,42 @@ function Vn(e) {
|
|
|
1217
1213
|
const { pagination: t, fieldNames: r, onUpdatePagination: a, onPageChange: l } = e, c = () => ({
|
|
1218
1214
|
...En,
|
|
1219
1215
|
...r
|
|
1220
|
-
}), i = (
|
|
1216
|
+
}), i = (D) => {
|
|
1221
1217
|
if (!(t === !1 || !t))
|
|
1222
|
-
return t[c()[
|
|
1223
|
-
},
|
|
1218
|
+
return t[c()[D]];
|
|
1219
|
+
}, x = I(() => t === !1 || !t ? !1 : {
|
|
1224
1220
|
page: i("page") ?? 1,
|
|
1225
1221
|
pageSize: i("pageSize") ?? 10,
|
|
1226
1222
|
itemCount: i("itemCount"),
|
|
1227
|
-
pageSizes: t.pageSizes ??
|
|
1228
|
-
showSizePicker: t.showSizePicker ??
|
|
1229
|
-
showQuickJumper: t.showQuickJumper ??
|
|
1223
|
+
pageSizes: t.pageSizes ?? ke.pageSizes,
|
|
1224
|
+
showSizePicker: t.showSizePicker ?? ke.showSizePicker,
|
|
1225
|
+
showQuickJumper: t.showQuickJumper ?? ke.showQuickJumper,
|
|
1230
1226
|
prefix: t.prefix,
|
|
1231
1227
|
suffix: t.suffix
|
|
1232
|
-
}),
|
|
1228
|
+
}), v = (D) => {
|
|
1233
1229
|
if (t === !1 || !t) return {};
|
|
1234
1230
|
const k = c(), M = { ...t };
|
|
1235
|
-
return
|
|
1236
|
-
},
|
|
1231
|
+
return D.page !== void 0 && (M[k.page] = D.page), D.pageSize !== void 0 && (M[k.pageSize] = D.pageSize), M;
|
|
1232
|
+
}, g = (D) => {
|
|
1237
1233
|
const k = c();
|
|
1238
1234
|
return {
|
|
1239
|
-
[k.page]:
|
|
1240
|
-
[k.pageSize]:
|
|
1241
|
-
[k.itemCount]:
|
|
1235
|
+
[k.page]: D[k.page],
|
|
1236
|
+
[k.pageSize]: D[k.pageSize],
|
|
1237
|
+
[k.itemCount]: D[k.itemCount]
|
|
1242
1238
|
};
|
|
1243
1239
|
};
|
|
1244
1240
|
return {
|
|
1245
|
-
paginationConfig:
|
|
1246
|
-
handlePageChange: (
|
|
1247
|
-
const k =
|
|
1248
|
-
a?.(k), l?.(
|
|
1241
|
+
paginationConfig: x,
|
|
1242
|
+
handlePageChange: (D) => {
|
|
1243
|
+
const k = v({ page: D });
|
|
1244
|
+
a?.(k), l?.(g(k));
|
|
1249
1245
|
},
|
|
1250
|
-
handlePageSizeChange: (
|
|
1251
|
-
const k =
|
|
1246
|
+
handlePageSizeChange: (D) => {
|
|
1247
|
+
const k = v({
|
|
1252
1248
|
page: 1,
|
|
1253
|
-
pageSize:
|
|
1249
|
+
pageSize: D
|
|
1254
1250
|
});
|
|
1255
|
-
a?.(k), l?.(
|
|
1251
|
+
a?.(k), l?.(g(k));
|
|
1256
1252
|
},
|
|
1257
1253
|
getFieldNames: c
|
|
1258
1254
|
};
|
|
@@ -1311,40 +1307,40 @@ var Gn = {
|
|
|
1311
1307
|
"delete"
|
|
1312
1308
|
],
|
|
1313
1309
|
setup(e, { expose: t, emit: r }) {
|
|
1314
|
-
const a = e, l = r, c =
|
|
1315
|
-
const
|
|
1316
|
-
return
|
|
1317
|
-
},
|
|
1318
|
-
let
|
|
1319
|
-
for (;
|
|
1320
|
-
if (
|
|
1321
|
-
|
|
1310
|
+
const a = e, l = r, c = De(), i = Y(null), x = Y(void 0), v = I(() => !c.maxHeight), g = (w) => {
|
|
1311
|
+
const C = getComputedStyle(w);
|
|
1312
|
+
return w.clientHeight <= 0 ? !1 : !!(parseFloat(C.flexGrow) > 0 || C.height && C.height !== "auto" && C.height !== "0px" || C.maxHeight && C.maxHeight !== "none" && C.maxHeight !== "0px" || C.overflowY === "auto" || C.overflowY === "scroll");
|
|
1313
|
+
}, b = (w) => {
|
|
1314
|
+
let C = w.parentElement;
|
|
1315
|
+
for (; C && C !== document.body; ) {
|
|
1316
|
+
if (g(C)) return C;
|
|
1317
|
+
C = C.parentElement;
|
|
1322
1318
|
}
|
|
1323
1319
|
return null;
|
|
1324
|
-
},
|
|
1325
|
-
|
|
1326
|
-
const
|
|
1327
|
-
if (!
|
|
1328
|
-
const
|
|
1329
|
-
if (!
|
|
1330
|
-
|
|
1320
|
+
}, P = () => {
|
|
1321
|
+
v.value && Yt(() => {
|
|
1322
|
+
const w = i.value;
|
|
1323
|
+
if (!w) return;
|
|
1324
|
+
const C = b(w);
|
|
1325
|
+
if (!C) {
|
|
1326
|
+
x.value = void 0;
|
|
1331
1327
|
return;
|
|
1332
1328
|
}
|
|
1333
|
-
const n = getComputedStyle(
|
|
1334
|
-
|
|
1329
|
+
const n = getComputedStyle(C), _ = parseFloat(n.paddingTop), $ = parseFloat(n.paddingBottom), U = C.getBoundingClientRect(), H = w.getBoundingClientRect(), te = w.querySelector(".dydx-table__toolbar"), Ce = te ? te.offsetHeight + 16 : 0, f = w.querySelector(".n-data-table-thead"), O = f ? f.offsetHeight : 40, vt = H.top - (U.top + _), Be = C.clientHeight - _ - $ - vt - Ce - O;
|
|
1330
|
+
Be > 200 ? x.value = Be : x.value = void 0;
|
|
1335
1331
|
});
|
|
1336
|
-
},
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
}),
|
|
1340
|
-
window.removeEventListener("resize",
|
|
1332
|
+
}, D = I(() => c.maxHeight ? c.maxHeight : x.value);
|
|
1333
|
+
Zt(() => {
|
|
1334
|
+
P(), window.addEventListener("resize", P);
|
|
1335
|
+
}), ea(() => {
|
|
1336
|
+
window.removeEventListener("resize", P);
|
|
1341
1337
|
});
|
|
1342
|
-
const k = Y(null), { mergedColumns: M, configurableColumns: Q, visibleColumnKeys:
|
|
1338
|
+
const k = Y(null), { mergedColumns: M, configurableColumns: Q, visibleColumnKeys: N, setVisibleColumnKeys: F, resetColumnSetting: z, getVisibleColumnKeys: d } = Mn({
|
|
1343
1339
|
columns: a.columns,
|
|
1344
1340
|
actionColumn: a.actionColumn,
|
|
1345
|
-
onView: (
|
|
1346
|
-
onEdit: (
|
|
1347
|
-
onDelete: (
|
|
1341
|
+
onView: (w) => l("view", w),
|
|
1342
|
+
onEdit: (w) => l("edit", w),
|
|
1343
|
+
onDelete: (w) => l("delete", w)
|
|
1348
1344
|
}), { paginationConfig: s, handlePageChange: p, handlePageSizeChange: S } = Vn({
|
|
1349
1345
|
get pagination() {
|
|
1350
1346
|
return a.pagination;
|
|
@@ -1352,14 +1348,14 @@ var Gn = {
|
|
|
1352
1348
|
get fieldNames() {
|
|
1353
1349
|
return a.paginationFieldNames;
|
|
1354
1350
|
},
|
|
1355
|
-
onUpdatePagination: (
|
|
1356
|
-
onPageChange: (
|
|
1351
|
+
onUpdatePagination: (w) => l("update:pagination", w),
|
|
1352
|
+
onPageChange: (w) => l("pageChange", w)
|
|
1357
1353
|
});
|
|
1358
|
-
|
|
1359
|
-
l("update:visibleColumns",
|
|
1354
|
+
Je(N, (w) => {
|
|
1355
|
+
l("update:visibleColumns", w);
|
|
1360
1356
|
});
|
|
1361
|
-
const G = I(() => typeof a.rowKey == "function" ? a.rowKey : (
|
|
1362
|
-
l("update:checkedRowKeys",
|
|
1357
|
+
const G = I(() => typeof a.rowKey == "function" ? a.rowKey : (w) => w[a.rowKey]), X = (w) => {
|
|
1358
|
+
l("update:checkedRowKeys", w, a.data.filter((C) => w.includes(G.value(C))));
|
|
1363
1359
|
}, B = () => {
|
|
1364
1360
|
a.onAdd?.();
|
|
1365
1361
|
}, Z = () => {
|
|
@@ -1375,11 +1371,11 @@ var Gn = {
|
|
|
1375
1371
|
},
|
|
1376
1372
|
getVisibleColumnKeys: d,
|
|
1377
1373
|
setVisibleColumnKeys: F,
|
|
1378
|
-
resetColumnSetting:
|
|
1379
|
-
scrollTo: (
|
|
1380
|
-
k.value?.scrollTo(
|
|
1374
|
+
resetColumnSetting: z,
|
|
1375
|
+
scrollTo: (w) => {
|
|
1376
|
+
k.value?.scrollTo(w);
|
|
1381
1377
|
}
|
|
1382
|
-
}), (
|
|
1378
|
+
}), (w, C) => (m(), W("div", {
|
|
1383
1379
|
ref_key: "containerRef",
|
|
1384
1380
|
ref: i,
|
|
1385
1381
|
class: "dydx-table"
|
|
@@ -1388,19 +1384,19 @@ var Gn = {
|
|
|
1388
1384
|
size: 12
|
|
1389
1385
|
}, {
|
|
1390
1386
|
default: o(() => [
|
|
1391
|
-
e.showAdd ? (m(),
|
|
1387
|
+
e.showAdd ? (m(), T(u(E), {
|
|
1392
1388
|
key: 0,
|
|
1393
1389
|
type: "primary",
|
|
1394
1390
|
onClick: B
|
|
1395
1391
|
}, {
|
|
1396
|
-
icon: o(() => [V(
|
|
1397
|
-
default: o(() => [y(u(
|
|
1392
|
+
icon: o(() => [V(w.$slots, "add-icon", {}, () => [y(u(A), null, {
|
|
1393
|
+
default: o(() => [y(u(Qe))]),
|
|
1398
1394
|
_: 1
|
|
1399
1395
|
})], !0)]),
|
|
1400
1396
|
default: o(() => [R(" " + j(e.addButtonText), 1)]),
|
|
1401
1397
|
_: 3
|
|
1402
1398
|
})) : L("", !0),
|
|
1403
|
-
(m(!0), W(J, null, ee(e.leftButtons, (n) => (m(), W(J, { key: n.key }, [n.show !== !1 ? (m(),
|
|
1399
|
+
(m(!0), W(J, null, ee(e.leftButtons, (n) => (m(), W(J, { key: n.key }, [n.show !== !1 ? (m(), T(u(E), {
|
|
1404
1400
|
key: 0,
|
|
1405
1401
|
type: n.type,
|
|
1406
1402
|
disabled: n.disabled,
|
|
@@ -1410,14 +1406,14 @@ var Gn = {
|
|
|
1410
1406
|
_: 2
|
|
1411
1407
|
}, [n.icon ? {
|
|
1412
1408
|
name: "icon",
|
|
1413
|
-
fn: o(() => [(m(),
|
|
1409
|
+
fn: o(() => [(m(), T(ae(n.icon)))]),
|
|
1414
1410
|
key: "0"
|
|
1415
1411
|
} : void 0]), 1032, [
|
|
1416
1412
|
"type",
|
|
1417
1413
|
"disabled",
|
|
1418
1414
|
"onClick"
|
|
1419
1415
|
])) : L("", !0)], 64))), 128)),
|
|
1420
|
-
V(
|
|
1416
|
+
V(w.$slots, "toolbar-left", {}, void 0, !0)
|
|
1421
1417
|
]),
|
|
1422
1418
|
_: 3
|
|
1423
1419
|
}), y(u(q), {
|
|
@@ -1425,8 +1421,8 @@ var Gn = {
|
|
|
1425
1421
|
size: 8
|
|
1426
1422
|
}, {
|
|
1427
1423
|
default: o(() => [
|
|
1428
|
-
V(
|
|
1429
|
-
(m(!0), W(J, null, ee(e.rightButtons, (n) => (m(), W(J, { key: n.key }, [n.show !== !1 ? (m(),
|
|
1424
|
+
V(w.$slots, "toolbar-right", {}, void 0, !0),
|
|
1425
|
+
(m(!0), W(J, null, ee(e.rightButtons, (n) => (m(), W(J, { key: n.key }, [n.show !== !1 ? (m(), T(u(E), {
|
|
1430
1426
|
key: 0,
|
|
1431
1427
|
type: n.type,
|
|
1432
1428
|
disabled: n.disabled,
|
|
@@ -1436,14 +1432,14 @@ var Gn = {
|
|
|
1436
1432
|
_: 2
|
|
1437
1433
|
}, [n.icon ? {
|
|
1438
1434
|
name: "icon",
|
|
1439
|
-
fn: o(() => [(m(),
|
|
1435
|
+
fn: o(() => [(m(), T(ae(n.icon)))]),
|
|
1440
1436
|
key: "0"
|
|
1441
1437
|
} : void 0]), 1032, [
|
|
1442
1438
|
"type",
|
|
1443
1439
|
"disabled",
|
|
1444
1440
|
"onClick"
|
|
1445
1441
|
])) : L("", !0)], 64))), 128)),
|
|
1446
|
-
e.showRefresh ? (m(),
|
|
1442
|
+
e.showRefresh ? (m(), T(u(Se), {
|
|
1447
1443
|
key: 0,
|
|
1448
1444
|
trigger: "hover"
|
|
1449
1445
|
}, {
|
|
@@ -1458,15 +1454,15 @@ var Gn = {
|
|
|
1458
1454
|
})]),
|
|
1459
1455
|
_: 1
|
|
1460
1456
|
})]),
|
|
1461
|
-
default: o(() => [
|
|
1457
|
+
default: o(() => [C[1] || (C[1] = R(" 刷新 ", -1))]),
|
|
1462
1458
|
_: 1
|
|
1463
1459
|
})) : L("", !0),
|
|
1464
|
-
e.showColumnSetting ? (m(),
|
|
1460
|
+
e.showColumnSetting ? (m(), T(u(Mt), {
|
|
1465
1461
|
key: 1,
|
|
1466
1462
|
trigger: "click",
|
|
1467
1463
|
placement: "bottom-end"
|
|
1468
1464
|
}, {
|
|
1469
|
-
trigger: o(() => [y(u(
|
|
1465
|
+
trigger: o(() => [y(u(Se), { trigger: "hover" }, {
|
|
1470
1466
|
trigger: o(() => [y(u(E), {
|
|
1471
1467
|
circle: "",
|
|
1472
1468
|
class: "dydx-table__icon-btn"
|
|
@@ -1477,26 +1473,26 @@ var Gn = {
|
|
|
1477
1473
|
})]),
|
|
1478
1474
|
_: 1
|
|
1479
1475
|
})]),
|
|
1480
|
-
default: o(() => [
|
|
1476
|
+
default: o(() => [C[2] || (C[2] = R(" 列设置 ", -1))]),
|
|
1481
1477
|
_: 1
|
|
1482
1478
|
})]),
|
|
1483
|
-
default: o(() => [pe("div", jn, [pe("div", Hn, [
|
|
1479
|
+
default: o(() => [pe("div", jn, [pe("div", Hn, [C[4] || (C[4] = pe("span", null, "列设置", -1)), y(u(E), {
|
|
1484
1480
|
text: "",
|
|
1485
1481
|
size: "small",
|
|
1486
1482
|
type: "primary",
|
|
1487
|
-
onClick: u(
|
|
1483
|
+
onClick: u(z)
|
|
1488
1484
|
}, {
|
|
1489
|
-
default: o(() => [...
|
|
1485
|
+
default: o(() => [...C[3] || (C[3] = [R(" 重置 ", -1)])]),
|
|
1490
1486
|
_: 1
|
|
1491
|
-
}, 8, ["onClick"])]), y(u(
|
|
1492
|
-
value: u(
|
|
1493
|
-
"onUpdate:value":
|
|
1487
|
+
}, 8, ["onClick"])]), y(u(Ne), {
|
|
1488
|
+
value: u(N),
|
|
1489
|
+
"onUpdate:value": C[0] || (C[0] = (n) => Qt(N) ? N.value = n : null)
|
|
1494
1490
|
}, {
|
|
1495
1491
|
default: o(() => [y(u(q), {
|
|
1496
1492
|
vertical: "",
|
|
1497
1493
|
size: 8
|
|
1498
1494
|
}, {
|
|
1499
|
-
default: o(() => [(m(!0), W(J, null, ee(u(Q), (n) => (m(),
|
|
1495
|
+
default: o(() => [(m(!0), W(J, null, ee(u(Q), (n) => (m(), T(u(Ke), {
|
|
1500
1496
|
key: n.key,
|
|
1501
1497
|
value: n.key,
|
|
1502
1498
|
label: n.title
|
|
@@ -1509,7 +1505,7 @@ var Gn = {
|
|
|
1509
1505
|
})) : L("", !0)
|
|
1510
1506
|
]),
|
|
1511
1507
|
_: 3
|
|
1512
|
-
})])) : L("", !0), y(u(
|
|
1508
|
+
})])) : L("", !0), y(u(wt), K({
|
|
1513
1509
|
ref_key: "dataTableRef",
|
|
1514
1510
|
ref: k,
|
|
1515
1511
|
data: e.data,
|
|
@@ -1519,7 +1515,7 @@ var Gn = {
|
|
|
1519
1515
|
pagination: u(s),
|
|
1520
1516
|
remote: e.remote,
|
|
1521
1517
|
"checked-row-keys": e.checkedRowKeys,
|
|
1522
|
-
"max-height":
|
|
1518
|
+
"max-height": D.value
|
|
1523
1519
|
}, u(c), {
|
|
1524
1520
|
"onUpdate:page": u(p),
|
|
1525
1521
|
"onUpdate:pageSize": u(S),
|
|
@@ -1575,9 +1571,9 @@ var Gn = {
|
|
|
1575
1571
|
"cancel"
|
|
1576
1572
|
],
|
|
1577
1573
|
setup(e, { expose: t, emit: r }) {
|
|
1578
|
-
const a = e, l = r, c =
|
|
1574
|
+
const a = e, l = r, c = De(), i = Y(), x = I(() => a.title ? a.title : `${a.model[a.rowKey] ? "编辑" : "新增"}${a.subtitle}`), v = I(() => ({ width: typeof a.width == "number" ? `${a.width}px` : a.width })), g = () => {
|
|
1579
1575
|
l("update:show", !1), l("cancel");
|
|
1580
|
-
},
|
|
1576
|
+
}, b = async () => {
|
|
1581
1577
|
try {
|
|
1582
1578
|
await i.value?.validate(), l("confirm", a.model);
|
|
1583
1579
|
} catch {
|
|
@@ -1587,31 +1583,31 @@ var Gn = {
|
|
|
1587
1583
|
getFormRef: () => i.value,
|
|
1588
1584
|
validate: () => i.value?.validate(),
|
|
1589
1585
|
resetFields: () => i.value?.resetFields()
|
|
1590
|
-
}), (
|
|
1586
|
+
}), (P, D) => (m(), T(u(Ut), K({
|
|
1591
1587
|
show: e.show,
|
|
1592
1588
|
preset: "card",
|
|
1593
|
-
title:
|
|
1594
|
-
style:
|
|
1589
|
+
title: x.value,
|
|
1590
|
+
style: v.value,
|
|
1595
1591
|
"mask-closable": !1
|
|
1596
|
-
}, u(c), { "onUpdate:show":
|
|
1597
|
-
|
|
1592
|
+
}, u(c), { "onUpdate:show": D[0] || (D[0] = (k) => l("update:show", k)) }), de({ _: 2 }, [
|
|
1593
|
+
P.$slots.header ? {
|
|
1598
1594
|
name: "header",
|
|
1599
|
-
fn: o(() => [V(
|
|
1595
|
+
fn: o(() => [V(P.$slots, "header")]),
|
|
1600
1596
|
key: "0"
|
|
1601
1597
|
} : void 0,
|
|
1602
|
-
|
|
1598
|
+
P.$slots["header-extra"] ? {
|
|
1603
1599
|
name: "header-extra",
|
|
1604
|
-
fn: o(() => [V(
|
|
1600
|
+
fn: o(() => [V(P.$slots, "header-extra")]),
|
|
1605
1601
|
key: "1"
|
|
1606
1602
|
} : void 0,
|
|
1607
|
-
|
|
1603
|
+
P.$slots.default ? {
|
|
1608
1604
|
name: "default",
|
|
1609
|
-
fn: o(() => [V(
|
|
1605
|
+
fn: o(() => [V(P.$slots, "default")]),
|
|
1610
1606
|
key: "2"
|
|
1611
1607
|
} : {
|
|
1612
1608
|
name: "default",
|
|
1613
1609
|
fn: o(() => [y(u(Pe), { show: e.loading }, {
|
|
1614
|
-
default: o(() => [y(u(
|
|
1610
|
+
default: o(() => [y(u(be), {
|
|
1615
1611
|
ref_key: "formRef",
|
|
1616
1612
|
ref: i,
|
|
1617
1613
|
schemas: e.schemas,
|
|
@@ -1635,16 +1631,16 @@ var Gn = {
|
|
|
1635
1631
|
}, 8, ["show"])]),
|
|
1636
1632
|
key: "3"
|
|
1637
1633
|
},
|
|
1638
|
-
|
|
1634
|
+
P.$slots.footer ? {
|
|
1639
1635
|
name: "footer",
|
|
1640
|
-
fn: o(() => [V(
|
|
1636
|
+
fn: o(() => [V(P.$slots, "footer")]),
|
|
1641
1637
|
key: "4"
|
|
1642
1638
|
} : {
|
|
1643
1639
|
name: "footer",
|
|
1644
1640
|
fn: o(() => [y(u(q), { justify: "end" }, {
|
|
1645
|
-
default: o(() => [e.showCancel ? (m(),
|
|
1641
|
+
default: o(() => [e.showCancel ? (m(), T(u(E), {
|
|
1646
1642
|
key: 0,
|
|
1647
|
-
onClick:
|
|
1643
|
+
onClick: g
|
|
1648
1644
|
}, {
|
|
1649
1645
|
icon: o(() => [y(u(A), null, {
|
|
1650
1646
|
default: o(() => [y(u(Xe))]),
|
|
@@ -1655,10 +1651,10 @@ var Gn = {
|
|
|
1655
1651
|
})) : L("", !0), y(u(E), {
|
|
1656
1652
|
type: "primary",
|
|
1657
1653
|
loading: e.loading,
|
|
1658
|
-
onClick:
|
|
1654
|
+
onClick: b
|
|
1659
1655
|
}, {
|
|
1660
1656
|
icon: o(() => [y(u(A), null, {
|
|
1661
|
-
default: o(() => [y(u(
|
|
1657
|
+
default: o(() => [y(u(Ye))]),
|
|
1662
1658
|
_: 1
|
|
1663
1659
|
})]),
|
|
1664
1660
|
default: o(() => [R(" " + j(e.confirmText), 1)]),
|
|
@@ -1668,9 +1664,9 @@ var Gn = {
|
|
|
1668
1664
|
})]),
|
|
1669
1665
|
key: "5"
|
|
1670
1666
|
},
|
|
1671
|
-
|
|
1667
|
+
P.$slots.action ? {
|
|
1672
1668
|
name: "action",
|
|
1673
|
-
fn: o(() => [V(
|
|
1669
|
+
fn: o(() => [V(P.$slots, "action")]),
|
|
1674
1670
|
key: "6"
|
|
1675
1671
|
} : void 0
|
|
1676
1672
|
]), 1040, [
|
|
@@ -1714,9 +1710,9 @@ var Gn = {
|
|
|
1714
1710
|
"cancel"
|
|
1715
1711
|
],
|
|
1716
1712
|
setup(e, { expose: t, emit: r }) {
|
|
1717
|
-
const a = e, l = r, c =
|
|
1713
|
+
const a = e, l = r, c = De(), i = Y(), x = I(() => a.title ? a.title : `${a.model[a.rowKey] ? "编辑" : "新增"}${a.subtitle}`), v = () => {
|
|
1718
1714
|
l("update:show", !1), l("cancel");
|
|
1719
|
-
},
|
|
1715
|
+
}, g = async () => {
|
|
1720
1716
|
try {
|
|
1721
1717
|
await i.value?.validate(), l("confirm", a.model);
|
|
1722
1718
|
} catch {
|
|
@@ -1726,24 +1722,24 @@ var Gn = {
|
|
|
1726
1722
|
getFormRef: () => i.value,
|
|
1727
1723
|
validate: () => i.value?.validate(),
|
|
1728
1724
|
resetFields: () => i.value?.resetFields()
|
|
1729
|
-
}), (
|
|
1725
|
+
}), (b, P) => (m(), T(u(kt), K({
|
|
1730
1726
|
show: e.show,
|
|
1731
1727
|
width: e.width,
|
|
1732
1728
|
placement: e.placement,
|
|
1733
1729
|
"mask-closable": !1
|
|
1734
|
-
}, u(c), { "onUpdate:show":
|
|
1730
|
+
}, u(c), { "onUpdate:show": P[0] || (P[0] = (D) => l("update:show", D)) }), {
|
|
1735
1731
|
default: o(() => [y(u(St), {
|
|
1736
|
-
title:
|
|
1732
|
+
title: x.value,
|
|
1737
1733
|
closable: "",
|
|
1738
|
-
onClose:
|
|
1739
|
-
}, de({ _: 2 }, [
|
|
1734
|
+
onClose: v
|
|
1735
|
+
}, de({ _: 2 }, [b.$slots.default ? {
|
|
1740
1736
|
name: "default",
|
|
1741
|
-
fn: o(() => [V(
|
|
1737
|
+
fn: o(() => [V(b.$slots, "default")]),
|
|
1742
1738
|
key: "0"
|
|
1743
1739
|
} : {
|
|
1744
1740
|
name: "default",
|
|
1745
1741
|
fn: o(() => [y(u(Pe), { show: e.loading }, {
|
|
1746
|
-
default: o(() => [y(u(
|
|
1742
|
+
default: o(() => [y(u(be), {
|
|
1747
1743
|
ref_key: "formRef",
|
|
1748
1744
|
ref: i,
|
|
1749
1745
|
schemas: e.schemas,
|
|
@@ -1766,16 +1762,16 @@ var Gn = {
|
|
|
1766
1762
|
_: 1
|
|
1767
1763
|
}, 8, ["show"])]),
|
|
1768
1764
|
key: "1"
|
|
1769
|
-
},
|
|
1765
|
+
}, b.$slots.footer ? {
|
|
1770
1766
|
name: "footer",
|
|
1771
|
-
fn: o(() => [V(
|
|
1767
|
+
fn: o(() => [V(b.$slots, "footer")]),
|
|
1772
1768
|
key: "2"
|
|
1773
1769
|
} : {
|
|
1774
1770
|
name: "footer",
|
|
1775
1771
|
fn: o(() => [y(u(q), { justify: "end" }, {
|
|
1776
|
-
default: o(() => [e.showCancel ? (m(),
|
|
1772
|
+
default: o(() => [e.showCancel ? (m(), T(u(E), {
|
|
1777
1773
|
key: 0,
|
|
1778
|
-
onClick:
|
|
1774
|
+
onClick: v
|
|
1779
1775
|
}, {
|
|
1780
1776
|
icon: o(() => [y(u(A), null, {
|
|
1781
1777
|
default: o(() => [y(u(Xe))]),
|
|
@@ -1786,10 +1782,10 @@ var Gn = {
|
|
|
1786
1782
|
})) : L("", !0), y(u(E), {
|
|
1787
1783
|
type: "primary",
|
|
1788
1784
|
loading: e.loading,
|
|
1789
|
-
onClick:
|
|
1785
|
+
onClick: g
|
|
1790
1786
|
}, {
|
|
1791
1787
|
icon: o(() => [y(u(A), null, {
|
|
1792
|
-
default: o(() => [y(u(
|
|
1788
|
+
default: o(() => [y(u(Ye))]),
|
|
1793
1789
|
_: 1
|
|
1794
1790
|
})]),
|
|
1795
1791
|
default: o(() => [R(" " + j(e.confirmText), 1)]),
|
|
@@ -1807,33 +1803,33 @@ var Gn = {
|
|
|
1807
1803
|
]));
|
|
1808
1804
|
}
|
|
1809
1805
|
}), ht = qn, Jn = [
|
|
1810
|
-
|
|
1806
|
+
be,
|
|
1811
1807
|
yt,
|
|
1812
1808
|
gt,
|
|
1813
1809
|
ht,
|
|
1814
|
-
|
|
1815
|
-
|
|
1810
|
+
ye,
|
|
1811
|
+
Fe
|
|
1816
1812
|
], Qn = (e) => {
|
|
1817
1813
|
Jn.forEach((t) => {
|
|
1818
1814
|
t.name && e.component(t.name, t);
|
|
1819
1815
|
});
|
|
1820
1816
|
}, rl = {
|
|
1821
1817
|
install: Qn,
|
|
1822
|
-
DydxNaiveForm:
|
|
1818
|
+
DydxNaiveForm: be,
|
|
1823
1819
|
DydxNaiveTable: yt,
|
|
1824
1820
|
DydxFormModal: gt,
|
|
1825
1821
|
DydxFormDrawer: ht,
|
|
1826
|
-
DydxUpload:
|
|
1827
|
-
DydxIconSelect:
|
|
1822
|
+
DydxUpload: ye,
|
|
1823
|
+
DydxIconSelect: Fe
|
|
1828
1824
|
};
|
|
1829
1825
|
export {
|
|
1830
1826
|
ht as DydxFormDrawer,
|
|
1831
1827
|
gt as DydxFormModal,
|
|
1832
|
-
|
|
1833
|
-
|
|
1828
|
+
Fe as DydxIconSelect,
|
|
1829
|
+
be as DydxNaiveForm,
|
|
1834
1830
|
yt as DydxNaiveTable,
|
|
1835
1831
|
Xn as DydxNaiveUIResolver,
|
|
1836
|
-
|
|
1832
|
+
ye as DydxUpload,
|
|
1837
1833
|
rl as default,
|
|
1838
1834
|
al as useColumnRender,
|
|
1839
1835
|
Mn as useColumns,
|