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