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