dydx-naive-ui-for-vue 0.1.25 → 0.1.26

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