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