dydx-naive-ui-for-vue 0.1.20 → 0.1.23

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