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

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";
1
+ import { t as Xn } from "./resolver-BDxomgBZ.js";
2
+ import { NAutoComplete as bt, NButton as E, NCascader as _t, NCheckbox as Ke, NCheckboxGroup as Ne, NColorPicker as Ct, NDataTable as wt, 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 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 Le, NRate as Vt, NSelect as We, NSlider as Gt, NSpace as q, NSpin as Pe, NSwitch as jt, NTag as we, NText as Ht, NTimePicker as Kt, NTooltip as Se, 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 T, 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, isRef as Qt, mergeProps as K, nextTick as Yt, normalizeProps as Xt, onMounted as Zt, onUnmounted as ea, openBlock as m, ref as Y, renderList as ee, renderSlot as V, resolveDynamicComponent as ae, toDisplayString as j, toHandlers as ta, unref as u, useAttrs as De, watch as Je, withCtx as o } from "vue";
4
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({
5
+ import { AddOutline as Qe, CheckmarkOutline as Ye, CloseOutline as Xe, CloudUploadOutline as Ue, CreateOutline as aa, DownloadOutline as ra, EyeOutline as na, OpenOutline as la, RefreshOutline as Ze, SearchCircleOutline as oa, 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) => ({
46
+ const a = e, l = r, c = qt(), i = Y(), x = I(() => a.listType ? a.listType : a.uploadType === "image" ? "image-card" : "text"), v = I(() => a.urlPrefix ? a.fileList.map((N) => ({
47
47
  ...N,
48
48
  url: N.url && !N.url.startsWith("http") ? a.urlPrefix + N.url : N.url
49
- })) : a.fileList), b = I(() => {
49
+ })) : a.fileList), g = I(() => {
50
50
  const N = [];
51
51
  return a.acceptTypes?.length && N.push(`支持格式:${a.acceptTypes.join(", ")}`), a.maxSize && N.push(`单个文件不超过 ${a.maxSize}MB`), a.maxCount && N.push(`最多 ${a.maxCount} 个文件`), N.join(";");
52
- }), _ = I(() => {
52
+ }), b = 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
- }), 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
56
+ }), P = I(() => {
57
+ const { uploadType: N, fileList: F, customUpload: z, acceptTypes: d, maxSize: s, maxCount: p, multiple: S, autoUpload: G, disabled: X, urlPrefix: B, showTip: Z, showDragger: _e, ...se } = a;
58
+ return se;
59
+ }), D = (N) => {
60
+ l("update:fileList", a.urlPrefix ? N.map((F) => ({
61
+ ...F,
62
+ url: F.url?.startsWith(a.urlPrefix) ? F.url.slice(a.urlPrefix.length) : F.url
63
63
  })) : N);
64
64
  }, k = async ({ file: N }) => {
65
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);
66
+ const F = N.file;
67
+ return F ? a.maxSize && F.size > a.maxSize * 1024 * 1024 ? (c.error(`文件大小不能超过 ${a.maxSize}MB`), !1) : a.acceptTypes?.length && !a.acceptTypes.some((z) => {
68
+ if (z.startsWith(".")) return F.name.toLowerCase().endsWith(z.toLowerCase());
69
+ if (z.includes("*")) {
70
+ const [d] = z.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 === z;
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 (N) => {
76
+ const { file: F, onProgress: z, onFinish: d, onError: s } = N;
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
+ z({ 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
+ }), (N, F) => {
96
+ const z = 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
- }, D.value, {
101
+ }, P.value, {
102
102
  "file-list": v.value,
103
- "custom-request": G,
104
- accept: _.value,
103
+ "custom-request": M,
104
+ accept: b.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": x.value,
110
+ "onUpdate:fileList": D,
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(), T(s, { key: 0 }, {
114
114
  default: o(() => [
115
- pe("div", sa, [g(F, {
115
+ pe("div", ua, [y(z, {
116
116
  size: "48",
117
117
  depth: 3
118
118
  }, {
119
- default: o(() => [g(d(Ue))]),
119
+ default: o(() => [y(u(Ue))]),
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(), T(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(g.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(N.$slots, "default", { key: 1 }, () => [e.uploadType === "image" && x.value === "image-card" ? (m(), T(z, {
141
141
  key: 0,
142
142
  size: 28
143
143
  }, {
144
- default: o(() => [g(d(Qe))]),
144
+ default: o(() => [y(u(Qe))]),
145
145
  _: 1
146
- })) : (y(), T(m, { key: 1 }, {
147
- icon: o(() => [g(F, null, {
148
- default: o(() => [g(d(Ue))]),
146
+ })) : (m(), T(p, { key: 1 }, {
147
+ icon: o(() => [y(z, null, {
148
+ default: o(() => [y(u(Ue))]),
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 && v.value.length > 0 ? (m(), T(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(), T(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(g.value), 1)]),
183
183
  _: 1
184
- })) : K("", !0)
184
+ })) : L("", !0)
185
185
  ]);
186
186
  };
187
187
  }
188
- }), ye = ua, da = /* @__PURE__ */ ae({
188
+ }), ye = da, fa = /* @__PURE__ */ ne({
189
189
  name: "DydxIconSelect",
190
190
  __name: "DydxIconSelect",
191
191
  props: {
@@ -205,21 +205,21 @@ var sa = { style: { "margin-bottom": "12px" } }, ua = /* @__PURE__ */ ae({
205
205
  emits: ["update:value"],
206
206
  setup(e, { emit: t }) {
207
207
  const r = e, a = t, l = Object.keys(me), c = I(() => {
208
- let b = l;
209
- return r.iconStyle === "outline" ? b = l.filter((_) => _.endsWith("Outline")) : r.iconStyle === "sharp" ? b = l.filter((_) => _.endsWith("Sharp")) : r.iconStyle === "filled" && (b = l.filter((_) => !_.endsWith("Outline") && !_.endsWith("Sharp"))), b.map((_) => ({
210
- label: _,
211
- value: _
208
+ let g = l;
209
+ return r.iconStyle === "outline" ? g = l.filter((b) => b.endsWith("Outline")) : r.iconStyle === "sharp" ? g = l.filter((b) => b.endsWith("Sharp")) : r.iconStyle === "filled" && (g = l.filter((b) => !b.endsWith("Outline") && !b.endsWith("Sharp"))), g.map((b) => ({
210
+ label: b,
211
+ value: b
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 = (g) => {
214
+ const b = me[g.value];
215
+ return h("div", { style: "display: flex; align-items: center; gap: 8px;" }, [h(A, { size: 18 }, () => h(b)), h("span", { style: "flex: 1; overflow: hidden; text-overflow: ellipsis;" }, g.label)]);
216
+ }, x = ({ option: g }) => {
217
+ const b = me[g.value];
218
+ return h("div", { style: "display: flex; align-items: center; gap: 4px;" }, [h(A, { size: 16 }, () => h(b)), g.label]);
219
+ }, v = (g) => {
220
+ a("update:value", g);
221
221
  };
222
- return (b, _) => (y(), T(d(We), {
222
+ return (g, b) => (m(), T(u(We), {
223
223
  value: e.value,
224
224
  options: c.value,
225
225
  placeholder: e.placeholder,
@@ -227,7 +227,7 @@ 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": x,
231
231
  "virtual-scroll": "",
232
232
  "onUpdate:value": v
233
233
  }, null, 8, [
@@ -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,
242
+ }), Fe = fa;
243
+ const ca = {
244
+ input: It,
245
+ "input-number": $t,
246
246
  select: We,
247
247
  "date-picker": xt,
248
248
  "time-picker": Kt,
249
249
  switch: jt,
250
250
  slider: Gt,
251
251
  "radio-group": Le,
252
- "checkbox-group": Se,
252
+ "checkbox-group": Ne,
253
253
  cascader: _t,
254
254
  "tree-select": Lt,
255
255
  upload: qe,
256
256
  rate: Vt,
257
- "color-picker": wt,
257
+ "color-picker": Ct,
258
258
  "auto-complete": bt,
259
259
  "dynamic-input": Nt,
260
260
  "dynamic-tags": Pt,
261
261
  mention: Bt,
262
262
  "image-upload": ye,
263
263
  "file-upload": ye,
264
- "icon-select": De
264
+ "icon-select": Fe
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")(), ze = ga, ha = ze.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;
278
- function Ca(e) {
277
+ var Ca = _a, wa = Object.prototype.toString;
278
+ function xa(e) {
279
279
  return wa.call(e);
280
280
  }
281
- var xa = Ca, ka = "[object Null]", Sa = "[object Undefined]", Ae = te ? te.toStringTag : void 0;
282
- function Ta(e) {
283
- return e == null ? e === void 0 ? Sa : ka : Ae && Ae in Object(e) ? _a(e) : xa(e);
284
- }
285
- var et = Ta;
281
+ var ka = xa, Sa = "[object Null]", Ta = "[object Undefined]", Ae = re ? re.toStringTag : void 0;
286
282
  function Na(e) {
283
+ return e == null ? e === void 0 ? Ta : Sa : Ae && Ae in Object(e) ? Ca(e) : ka(e);
284
+ }
285
+ var tt = Na;
286
+ function Pa(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 Da = Pa, Fa = "[object Symbol]";
290
+ function za(e) {
291
+ return typeof e == "symbol" || Da(e) && tt(e) == Fa;
292
292
  }
293
- var ze = Fa;
294
- function za(e, t) {
293
+ var Oe = za;
294
+ function Oa(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 = Oa, Ia = Array.isArray, Re = Ia, $a = 1 / 0, Me = re ? re.prototype : void 0, Ee = Me ? Me.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 (Re(e)) return Ra(e, at) + "";
302
+ if (Oe(e)) return Ee ? Ee.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) {
311
+ var ge = Ua, Aa = "[object AsyncFunction]", Ma = "[object Function]", Ea = "[object GeneratorFunction]", Va = "[object Proxy]";
312
+ function Ga(e) {
313
313
  if (!ge(e)) return !1;
314
- var t = et(e);
315
- return t == Aa || t == Ma || t == Ua || t == Ea;
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 = ze["__core-js_shared__"], xe = Ha, Ve = (function() {
318
+ var e = /[^.]+$/.exec(xe && xe.keys && xe.keys.IE_PROTO || "");
319
319
  return e ? "Symbol(src)_1." + e : "";
320
320
  })();
321
- function Ha(e) {
321
+ function Ka(e) {
322
322
  return !!Ve && Ve 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,32 +335,32 @@ 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 !ge(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 Ie = ir, sr = (function() {
352
352
  try {
353
- var e = Re(Object, "defineProperty");
353
+ var e = Ie(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
+ })(), Ge = 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) {
362
+ var cr = fr;
363
+ function pr(e, t, r) {
364
364
  t == "__proto__" && Ge ? Ge(e, t, {
365
365
  configurable: !0,
366
366
  enumerable: !0,
@@ -368,225 +368,225 @@ function cr(e, t, 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 Cr(e, t) {
382
+ if (Re(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 || Oe(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 wr = Cr, xr = Ie(Object, "create"), fe = xr;
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 Tr(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 Nr = Tr, Pr = "__lodash_hash_undefined__", Dr = 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 === Pr ? void 0 : r;
401
401
  }
402
- return Pr.call(t, e) ? t[e] : void 0;
402
+ return Dr.call(t, e) ? t[e] : void 0;
403
403
  }
404
- var Fr = Dr, zr = Object.prototype.hasOwnProperty;
405
- function Or(e) {
404
+ var zr = Fr, Or = 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 : Or.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 = Nr;
424
+ le.prototype.get = zr;
425
+ le.prototype.has = Ir;
426
+ le.prototype.set = Ur;
427
+ var je = 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) {
436
+ var he = Er, Vr = Array.prototype.splice;
437
+ function Gr(e) {
438
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);
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) {
441
+ var jr = Gr;
442
+ function Hr(e) {
443
443
  var t = this.__data__, r = he(t, e);
444
444
  return r < 0 ? void 0 : t[r][1];
445
445
  }
446
- var Hr = jr;
447
- function Kr(e) {
446
+ var Kr = Hr;
447
+ function Lr(e) {
448
448
  return he(this.__data__, e) > -1;
449
449
  }
450
- var Lr = Kr;
451
- function Wr(e, t) {
450
+ var Wr = Lr;
451
+ function qr(e, t) {
452
452
  var r = this.__data__, a = he(r, e);
453
453
  return a < 0 ? (++this.size, r.push([e, t])) : r[a][1] = t, this;
454
454
  }
455
- var 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 = Ie(ze, "Map"), Xr = Yr;
469
+ function Zr() {
470
470
  this.size = 0, this.__data__ = {
471
471
  hash: new je(),
472
- map: new (Yr || Jr)(),
472
+ map: new (Xr || Qr)(),
473
473
  string: new je()
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) {
486
+ var ve = rn;
487
+ function nn(e) {
488
488
  var t = ve(this, e).delete(e);
489
489
  return this.size -= t ? 1 : 0, t;
490
490
  }
491
- var nn = rn;
492
- function ln(e) {
491
+ var ln = nn;
492
+ function on(e) {
493
493
  return ve(this, e).get(e);
494
494
  }
495
- var on = ln;
496
- function sn(e) {
495
+ var sn = on;
496
+ function un(e) {
497
497
  return ve(this, e).has(e);
498
498
  }
499
- var un = sn;
500
- function dn(e, t) {
499
+ var dn = un;
500
+ function fn(e, t) {
501
501
  var r = ve(this, e), a = r.size;
502
502
  return r.set(e, t), this.size += r.size == a ? 0 : 1, this;
503
503
  }
504
- var 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";
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
518
  function $e(e, t) {
519
- if (typeof e != "function" || t != null && typeof t != "function") throw new TypeError(cn);
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 ($e.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
+ $e.Cache = nt;
529
+ var mn = $e, 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;
541
+ }), Cn = _n;
542
542
  function wn(e) {
543
- return e == null ? "" : Ia(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 xn = wn;
546
+ function kn(e, t) {
547
+ return Re(e) ? e : wr(e, t) ? [e] : Cn(xn(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 Tn(e) {
551
+ if (typeof e == "string" || Oe(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;
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++])];
555
+ var ot = Tn;
556
+ function Nn(e, t) {
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;
562
- function Pn(e, t, r) {
563
- var a = e == null ? void 0 : Nn(e, t);
561
+ var Pn = Nn;
562
+ function Dn(e, t, r) {
563
+ var a = e == null ? void 0 : Pn(e, t);
564
564
  return a === void 0 ? r : a;
565
565
  }
566
- var Dn = Pn;
567
- function Fn(e, t, r, a) {
566
+ var Fn = Dn;
567
+ function zn(e, t, r, a) {
568
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;
569
+ t = lt(t, e);
570
+ for (var l = -1, c = t.length, i = c - 1, x = e; x != null && ++l < c; ) {
571
+ var v = ot(t[l]), g = r;
572
572
  if (v === "__proto__" || v === "constructor" || v === "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 b = x[v];
575
+ g = a ? a(b, v, x) : void 0, g === void 0 && (g = ge(b) ? b : cr(t[l + 1]) ? [] : {});
576
576
  }
577
- hr(w, v, b), w = w[v];
577
+ vr(x, v, g), x = x[v];
578
578
  }
579
579
  return e;
580
580
  }
581
- var zn = Fn;
582
- function On(e, t, r) {
583
- return e == null ? e : zn(e, t, r);
581
+ var On = zn;
582
+ function Rn(e, t, r) {
583
+ return e == null ? e : On(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 He = (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,26 @@ 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();
648
+ let x = !1;
649
+ Je(() => a.model, (n) => {
650
+ !x && n && (i.value = JSON.parse(JSON.stringify(n)), x = !0);
651
+ }, {
652
+ immediate: !0,
653
+ deep: !1
646
654
  });
647
- const w = I(() => ({
655
+ const v = I(() => ({
648
656
  type: "primary",
649
- text: "提交",
657
+ text: "搜索",
650
658
  loading: a.loading,
651
- renderIcon: () => h(U, null, { default: () => h(Pe) }),
659
+ renderIcon: () => h(A, null, { default: () => h(oa) }),
652
660
  ...a.submitButton
653
- })), v = I(() => ({
661
+ })), g = I(() => ({
654
662
  type: "default",
655
663
  text: "重置",
656
- renderIcon: () => h(U, null, { default: () => h(Xe) }),
664
+ renderIcon: () => h(A, null, { default: () => h(Ze) }),
657
665
  ...a.resetButton
658
- })), b = I(() => a.schemas.filter((n) => !(typeof n.hidden == "function" ? n.hidden(a.model) : n.hidden))), _ = I(() => ({
666
+ })), b = I(() => a.schemas.filter((n) => !(typeof n.hidden == "function" ? n.hidden(a.model) : n.hidden))), P = I(() => ({
659
667
  labelWidth: a.labelWidth,
660
668
  labelAlign: a.labelAlign,
661
669
  labelPlacement: a.labelPlacement,
@@ -671,20 +679,20 @@ var In = /* @__PURE__ */ ae({
671
679
  itemResponsive: !0,
672
680
  ...a.gridProps,
673
681
  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 = [
682
+ })), k = (n) => {
683
+ const _ = n.type || "input";
684
+ return _ === "custom" ? n.component : ca[_];
685
+ }, M = (n) => typeof n.disabled == "function" ? n.disabled(a.model) : n.disabled, Q = (n) => {
686
+ const _ = { ...n.props };
687
+ if (_.placeholder !== void 0) return _;
688
+ const $ = typeof n.label == "string" ? n.label : "";
689
+ if (!$) return _;
690
+ const U = n.type || "input", H = [
683
691
  "input",
684
692
  "textarea",
685
693
  "input-number",
686
694
  "dynamic-input"
687
- ], ie = [
695
+ ], te = [
688
696
  "select",
689
697
  "cascader",
690
698
  "tree-select",
@@ -692,205 +700,207 @@ var In = /* @__PURE__ */ ae({
692
700
  "time-picker",
693
701
  "color-picker"
694
702
  ];
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";
703
+ return H.includes(U) ? _.placeholder = `请输入${$}` : te.includes(U) && (_.placeholder = `请选择${$}`), _;
704
+ }, N = (n) => {
705
+ const _ = n.type === "custom" ? "modelValue" : "value";
698
706
  return {
699
- [n.modelPropName || f]: u(n.name),
700
- ...G(n),
701
- disabled: k(n)
707
+ [n.modelPropName || _]: s(n.name),
708
+ ...Q(n),
709
+ disabled: M(n)
702
710
  };
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
711
  }, F = (n) => {
712
+ const _ = n.type === "custom" ? "modelValue" : "value", $ = n.modelPropName || _;
713
+ return { [n.modelEventName || `update:${$}`]: (U) => p(n.name, U) };
714
+ }, z = (n) => {
715
+ if (!n) return {};
716
+ const { options: _, labelField: $, valueField: U, ...H } = n;
717
+ return H;
718
+ }, d = (n) => {
711
719
  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 = {
720
+ const { text: _, ...$ } = n;
721
+ return $;
722
+ }, s = (n) => He(a.model, n), p = (n, _) => {
723
+ $n(a.model, n, _), l("update:model", a.model);
724
+ }, S = (n) => {
725
+ let _ = 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
+ _ ? _ = Array.isArray(_) ? [U, ..._] : [U, _] : _ = 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: _,
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 _ = [];
752
+ return Object.entries(G).forEach(([$, U]) => {
753
+ const H = n[$];
754
+ H !== void 0 && _.push(`${U}:${H}`);
755
+ }), _.length === 0 ? 24 : _.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
+ }, _e = async (n, _) => {
764
+ const $ = Array.isArray(n) ? n : [n];
765
+ await c.value.validate(_, (U) => $.some((H) => U.key === H));
766
+ }, se = () => c.value?.restoreValidation(), ce = () => {
767
+ se(), i.value && (Object.assign(a.model, JSON.parse(JSON.stringify(i.value))), l("update:model", a.model)), l("reset");
768
+ }, w = async () => {
761
769
  try {
762
- await O(), l("submit", a.model);
770
+ await Z(), l("submit", a.model);
763
771
  } catch (n) {
764
772
  l("validate", n);
765
773
  }
766
774
  }, C = () => {
767
- Z();
775
+ ce();
768
776
  };
769
777
  return t({
770
778
  formRef: c.value,
771
- validate: O,
772
- validateField: oe,
773
- restoreValidation: fe,
779
+ validate: Z,
780
+ validateField: _e,
781
+ restoreValidation: se,
774
782
  getFormData: () => a.model,
775
- setFormData: (n) => Object.assign(a.model, n),
783
+ setFormData: (n) => {
784
+ Object.assign(a.model, n), l("update:model", a.model);
785
+ },
776
786
  getFieldValue: (n) => He(a.model, n),
777
- setFieldValue: (n, f) => s(n, f),
778
- resetFields: Z,
787
+ setFieldValue: (n, _) => p(n, _),
788
+ resetFields: ce,
779
789
  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({
790
+ }), (n, _) => {
791
+ const $ = Ft, U = Ot, H = E, te = zt, Ce = Dt;
792
+ return m(), W(J, null, [
793
+ V(n.$slots, "header", { model: a.model }),
794
+ y(u(Pe), { show: a.loading }, {
795
+ default: o(() => [y(Ce, K({
786
796
  ref_key: "formRef",
787
797
  ref: c,
788
798
  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, {
799
+ }, P.value), {
800
+ default: o(() => [y(te, Xt(Jt(D.value)), {
801
+ default: o(() => [(m(!0), W(J, null, ee(b.value, (f) => (m(), T(U, K({ key: f.name }, { ref_for: !0 }, B(f)), {
802
+ default: o(() => [f.type === "slot" ? V(n.$slots, f.slot || f.name, {
793
803
  key: 0,
794
804
  model: a.model,
795
- schema: p
796
- }) : (y(), T(R, H({
805
+ schema: f
806
+ }) : (m(), T($, K({
797
807
  key: 1,
798
- path: p.name
799
- }, { ref_for: !0 }, m(p)), ue({
800
- default: o(() => [M(n.$slots, `field-${p.name}`, {
808
+ path: f.name
809
+ }, { ref_for: !0 }, S(f)), de({
810
+ default: o(() => [V(n.$slots, `field-${f.name}`, {
801
811
  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({
812
+ schema: f,
813
+ value: s(f.name),
814
+ setValue: (O) => p(f.name, O)
815
+ }, () => [f.type === "radio-group" && f.props?.options ? (m(), T(u(Le), K({
806
816
  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"],
814
- disabled: z.disabled
817
+ value: s(f.name),
818
+ "onUpdate:value": (O) => p(f.name, O)
819
+ }, { ref_for: !0 }, z(f.props)), {
820
+ default: o(() => [y(u(q), null, {
821
+ default: o(() => [(m(!0), W(J, null, ee(f.props.options, (O) => (m(), T(u(Et), {
822
+ key: O[f.props.valueField || "value"],
823
+ value: O[f.props.valueField || "value"],
824
+ disabled: O.disabled
815
825
  }, {
816
- default: o(() => [$(V(z[p.props.labelField || "label"]), 1)]),
826
+ default: o(() => [R(j(O[f.props.labelField || "label"]), 1)]),
817
827
  _: 2
818
828
  }, 1032, ["value", "disabled"]))), 128))]),
819
829
  _: 2
820
830
  }, 1024)]),
821
831
  _: 2
822
- }, 1040, ["value", "onUpdate:value"])) : p.type === "checkbox-group" && p.props?.options ? (y(), T(d(Se), H({
832
+ }, 1040, ["value", "onUpdate:value"])) : f.type === "checkbox-group" && f.props?.options ? (m(), T(u(Ne), K({
823
833
  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"],
831
- disabled: z.disabled
834
+ value: s(f.name),
835
+ "onUpdate:value": (O) => p(f.name, O)
836
+ }, { ref_for: !0 }, z(f.props)), {
837
+ default: o(() => [y(u(q), null, {
838
+ default: o(() => [(m(!0), W(J, null, ee(f.props.options, (O) => (m(), T(u(Ke), {
839
+ key: O[f.props.valueField || "value"],
840
+ value: O[f.props.valueField || "value"],
841
+ disabled: O.disabled
832
842
  }, {
833
- default: o(() => [$(V(z[p.props.labelField || "label"]), 1)]),
843
+ default: o(() => [R(j(O[f.props.labelField || "label"]), 1)]),
834
844
  _: 2
835
845
  }, 1032, ["value", "disabled"]))), 128))]),
836
846
  _: 2
837
847
  }, 1024)]),
838
848
  _: 2
839
- }, 1040, ["value", "onUpdate:value"])) : p.type === "switch" ? (y(), T(ee(x(p)), H({
849
+ }, 1040, ["value", "onUpdate:value"])) : f.type === "switch" ? (m(), T(ae(k(f)), K({
840
850
  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, [
851
+ value: s(f.name),
852
+ "onUpdate:value": (O) => p(f.name, O)
853
+ }, { ref_for: !0 }, f.props, { disabled: M(f) }), null, 16, [
844
854
  "value",
845
855
  "onUpdate:value",
846
856
  "disabled"
847
- ])) : p.type === "image-upload" || p.type === "file-upload" ? (y(), T(ee(x(p)), H({
857
+ ])) : f.type === "image-upload" || f.type === "file-upload" ? (m(), T(ae(k(f)), K({
848
858
  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, [
859
+ "file-list": s(f.name) || [],
860
+ "onUpdate:fileList": (O) => p(f.name, O),
861
+ "upload-type": f.type === "image-upload" ? "image" : "file"
862
+ }, { ref_for: !0 }, f.props, { disabled: M(f) }), null, 16, [
853
863
  "file-list",
854
864
  "onUpdate:fileList",
855
865
  "upload-type",
856
866
  "disabled"
857
- ])) : (y(), T(ee(x(p)), H({
867
+ ])) : (m(), T(ae(k(f)), K({
858
868
  key: 4,
859
869
  ref_for: !0
860
- }, J(p), ea(N(p))), null, 16))])]),
870
+ }, N(f), ta(F(f))), null, 16))])]),
861
871
  _: 2
862
- }, [typeof p.label == "function" ? {
872
+ }, [typeof f.label == "function" ? {
863
873
  name: "label",
864
- fn: o(() => [(y(), T(ee(p.label)))]),
874
+ fn: o(() => [(m(), T(ae(f.label)))]),
865
875
  key: "0"
866
876
  } : void 0]), 1040, ["path"]))]),
867
877
  _: 2
868
- }, 1040))), 128)), a.showFooter ? (y(), T(B, {
878
+ }, 1040))), 128)), a.showFooter ? (m(), T(U, {
869
879
  key: 0,
870
880
  span: a.footerSpan
871
881
  }, {
872
- default: o(() => [M(n.$slots, "footer", {
882
+ default: o(() => [V(n.$slots, "footer", {
873
883
  model: a.model,
874
- validate: O,
875
- reset: Z
876
- }, () => [g(d(W), { justify: a.footerAlign }, {
884
+ validate: Z,
885
+ reset: ce
886
+ }, () => [y(u(q), { justify: a.footerAlign }, {
877
887
  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)]),
888
+ g.value.hidden ? L("", !0) : (m(), T(H, K({ key: 0 }, d(g.value), { onClick: C }), {
889
+ default: o(() => [R(j(g.value.text), 1)]),
880
890
  _: 1
881
891
  }, 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)]),
892
+ v.value.hidden ? L("", !0) : (m(), T(H, K({ key: 1 }, d(v.value), { onClick: w }), {
893
+ default: o(() => [R(j(v.value.text), 1)]),
884
894
  _: 1
885
895
  }, 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
896
+ (m(!0), W(J, null, ee(a.extraButtons, (f) => (m(), T(H, {
897
+ key: f.text,
898
+ type: f.type,
899
+ size: f.size,
900
+ disabled: f.disabled,
901
+ onClick: f.onClick
892
902
  }, {
893
- default: o(() => [$(V(p.text), 1)]),
903
+ default: o(() => [R(j(f.text), 1)]),
894
904
  _: 2
895
905
  }, 1032, [
896
906
  "type",
@@ -902,21 +912,21 @@ var In = /* @__PURE__ */ ae({
902
912
  _: 1
903
913
  }, 8, ["justify"])])]),
904
914
  _: 3
905
- }, 8, ["span"])) : K("", !0)]),
915
+ }, 8, ["span"])) : L("", !0)]),
906
916
  _: 3
907
917
  }, 16)]),
908
918
  _: 3
909
919
  }, 16, ["model"])]),
910
920
  _: 3
911
921
  }, 8, ["show"]),
912
- M(n.$slots, "append", { model: a.model })
922
+ V(n.$slots, "append", { model: a.model })
913
923
  ], 64);
914
924
  };
915
925
  }
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, {
926
+ }), be = Bn;
927
+ function Un(e) {
928
+ const { maxVisible: t = -1, buttons: r = [], showView: a = !0, showEdit: l = !0, showDelete: c = !0, viewConfig: i, editConfig: x, deleteConfig: v, onView: g, onEdit: b, onDelete: P } = e, D = (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, N = (s, p, S) => typeof s == "function" ? s(p) : s || S, F = (s) => {
929
+ const p = h(E, {
920
930
  type: s.type,
921
931
  size: "small",
922
932
  disabled: s.disabled,
@@ -924,83 +934,83 @@ function Bn(e) {
924
934
  renderIcon: s.icon
925
935
  }, { default: () => s.label });
926
936
  return s.confirm ? h(At, { onPositiveClick: s.onClick }, {
927
- trigger: () => m,
937
+ trigger: () => p,
928
938
  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
939
+ }) : p;
940
+ }, z = (s) => {
941
+ const p = s.map((G) => ({
942
+ label: G.label,
943
+ key: G.key,
944
+ disabled: G.disabled
935
945
  }));
936
946
  return h(Tt, {
937
- options: m,
947
+ options: p,
938
948
  trigger: "click",
939
- onSelect: (E) => {
940
- s.find((Y) => Y.key === E)?.onClick();
949
+ onSelect: (G) => {
950
+ s.find((X) => X.key === G)?.onClick();
941
951
  }
942
- }, { default: () => h(A, { size: "small" }, { default: () => "更多" }) });
952
+ }, { default: () => h(E, { size: "small" }, { default: () => "更多" }) });
943
953
  };
944
954
  return {
945
- renderActions: (s, m) => {
955
+ renderActions: (s, p) => {
946
956
  const S = [];
947
- if (x(i, a, s, m) && S.push({
957
+ if (D(i, a, s, p) && S.push({
948
958
  key: "__view__",
949
959
  label: i?.label || "查看",
950
960
  type: "info",
951
- disabled: k(i, s, m),
952
- icon: () => h(U, null, { default: () => h(na) }),
953
- onClick: () => b?.({
961
+ disabled: k(i, s, p),
962
+ icon: () => h(A, null, { default: () => h(na) }),
963
+ onClick: () => g?.({
954
964
  row: s,
955
- index: m
965
+ index: p
956
966
  })
957
- }), x(w, l, s, m) && S.push({
967
+ }), D(x, l, s, p) && S.push({
958
968
  key: "__edit__",
959
- label: w?.label || "编辑",
969
+ label: x?.label || "编辑",
960
970
  type: "primary",
961
- disabled: k(w, s, m),
962
- icon: () => h(U, null, { default: () => h(aa) }),
963
- onClick: () => _?.({
971
+ disabled: k(x, s, p),
972
+ icon: () => h(A, null, { default: () => h(aa) }),
973
+ onClick: () => b?.({
964
974
  row: s,
965
- index: m
975
+ index: p
966
976
  })
967
- }), x(v, c, s, m) && S.push({
977
+ }), D(v, c, s, p) && S.push({
968
978
  key: "__delete__",
969
979
  label: v?.label || "删除",
970
980
  type: "error",
971
- disabled: k(v, s, m),
981
+ disabled: k(v, s, p),
972
982
  confirm: N(v?.confirm, s, "确定删除此记录吗?"),
973
- icon: () => h(U, null, { default: () => h(ia) }),
974
- onClick: () => D?.({
983
+ icon: () => h(A, null, { default: () => h(sa) }),
984
+ onClick: () => P?.({
975
985
  row: s,
976
- index: m
986
+ index: p
977
987
  })
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)
988
+ }), r.forEach((B) => {
989
+ M(B, s, p) && S.push({
990
+ key: B.key,
991
+ label: B.label,
992
+ type: B.type || "default",
993
+ disabled: Q(B, s, p),
994
+ confirm: B.confirm ? N(B.confirm, s, "确定执行此操作吗?") : void 0,
995
+ icon: B.icon,
996
+ onClick: () => B.onClick?.(s, p)
987
997
  });
988
- }), t === -1 || S.length <= t) return h(W, {
998
+ }), t === -1 || S.length <= t) return h(q, {
989
999
  size: "small",
990
1000
  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, {
1001
+ }, () => S.map((B) => F(B)));
1002
+ if (t === 0) return z(S);
1003
+ const G = S.slice(0, t), X = S.slice(t);
1004
+ return h(q, {
995
1005
  size: "small",
996
1006
  wrap: !1
997
- }, () => [...E.map((O) => P(O)), F(Y)]);
1007
+ }, () => [...G.map((B) => F(B)), z(X)]);
998
1008
  },
999
- isButtonVisible: G,
1000
- isButtonDisabled: J
1009
+ isButtonVisible: M,
1010
+ isButtonDisabled: Q
1001
1011
  };
1002
1012
  }
1003
- var Un = (e) => {
1013
+ var An = (e) => {
1004
1014
  if (!e) return "";
1005
1015
  try {
1006
1016
  const t = new URL(e).pathname.split("/").pop() || "";
@@ -1009,11 +1019,11 @@ var Un = (e) => {
1009
1019
  const t = e.split("/");
1010
1020
  return t[t.length - 1] || e;
1011
1021
  }
1012
- }, ot = (e) => e == null ? "-" : String(e), it = (e, t, r) => {
1022
+ }, it = (e) => e == null ? "-" : String(e), st = (e, t, r) => {
1013
1023
  if (!e) return "-";
1014
1024
  const a = String(e), l = r?.newWindow !== !1;
1015
1025
  let c;
1016
- return r?.text ? c = typeof r.text == "function" ? r.text(t) : r.text : c = a, h(A, {
1026
+ return r?.text ? c = typeof r.text == "function" ? r.text(t) : r.text : c = a, h(E, {
1017
1027
  text: !0,
1018
1028
  type: "primary",
1019
1029
  onClick: () => {
@@ -1021,9 +1031,9 @@ var Un = (e) => {
1021
1031
  }
1022
1032
  }, {
1023
1033
  default: () => c,
1024
- icon: () => h(U, { size: 14 }, () => h(la))
1034
+ icon: () => h(A, { size: 14 }, () => h(la))
1025
1035
  });
1026
- }, st = (e, t) => {
1036
+ }, ut = (e, t) => {
1027
1037
  if (!e) return "-";
1028
1038
  const r = String(e), a = t?.width ?? 60, l = t?.height ?? 60, c = t?.radius ?? 4, i = t?.fallback;
1029
1039
  return h(Rt, {
@@ -1040,14 +1050,14 @@ var Un = (e) => {
1040
1050
  cursor: "pointer"
1041
1051
  }
1042
1052
  });
1043
- }, ut = (e, t, r) => {
1053
+ }, dt = (e, t, r) => {
1044
1054
  if (!e) return "-";
1045
- const a = String(e), l = r?.getFileName ? r.getFileName(a, t) : Un(a), c = () => {
1055
+ const a = String(e), l = r?.getFileName ? r.getFileName(a, t) : An(a), c = () => {
1046
1056
  const i = document.createElement("a");
1047
1057
  i.href = a, i.download = l, i.target = "_blank", i.rel = "noopener noreferrer", document.body.appendChild(i), i.click(), document.body.removeChild(i);
1048
1058
  };
1049
- return h(xe, { trigger: "hover" }, {
1050
- trigger: () => h(A, {
1059
+ return h(Se, { trigger: "hover" }, {
1060
+ trigger: () => h(E, {
1051
1061
  text: !0,
1052
1062
  type: "primary",
1053
1063
  onClick: c
@@ -1060,84 +1070,84 @@ var Un = (e) => {
1060
1070
  display: "inline-block",
1061
1071
  verticalAlign: "middle"
1062
1072
  } }, l),
1063
- icon: () => h(U, { size: 14 }, () => h(ra))
1073
+ icon: () => h(A, { size: 14 }, () => h(ra))
1064
1074
  }),
1065
1075
  default: () => l
1066
1076
  });
1067
- }, dt = (e, t) => {
1077
+ }, ft = (e, t) => {
1068
1078
  if (!e) return "-";
1069
1079
  const r = String(e), a = me[r];
1070
- return a ? h(U, {
1080
+ return a ? h(A, {
1071
1081
  size: t?.size ?? 20,
1072
1082
  color: t?.color
1073
1083
  }, () => h(a)) : r;
1074
- }, ke = (e, t, r = "label", a = "value") => {
1084
+ }, Te = (e, t, r = "label", a = "value") => {
1075
1085
  if (e == null) return "-";
1076
- if (!t || t.length === 0) return h(_e, { size: "small" }, () => String(e));
1086
+ if (!t || t.length === 0) return h(we, { size: "small" }, () => String(e));
1077
1087
  const l = t.find((c) => {
1078
1088
  const i = c[a];
1079
1089
  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
1090
  });
1081
1091
  if (l) {
1082
1092
  const c = l, i = c[r];
1083
- return h(_e, {
1093
+ return h(we, {
1084
1094
  size: "small",
1085
- ...Object.keys(l).reduce((w, v) => (v !== r && v !== a && (w[v] = c[v]), w), {})
1095
+ ...Object.keys(l).reduce((x, v) => (v !== r && v !== a && (x[v] = c[v]), x), {})
1086
1096
  }, () => i);
1087
1097
  }
1088
- return h(_e, { size: "small" }, () => String(e));
1089
- }, ft = (e, t, r = "label", a = "value") => e == null ? "-" : Array.isArray(e) ? h(W, {
1098
+ return h(we, { size: "small" }, () => String(e));
1099
+ }, ct = (e, t, r = "label", a = "value") => e == null ? "-" : Array.isArray(e) ? h(q, {
1090
1100
  size: "small",
1091
1101
  wrap: !0
1092
1102
  }, () => e.map((l, c) => {
1093
- const i = ke(l, t, r, a);
1103
+ const i = Te(l, t, r, a);
1094
1104
  return typeof i == "string" ? h("span", { key: c }, i) : i;
1095
- })) : ke(e, t, r, a);
1096
- const ct = (e, t, r) => {
1105
+ })) : Te(e, t, r, a);
1106
+ const pt = (e, t, r) => {
1097
1107
  switch (r.columnType || "text") {
1098
1108
  case "link":
1099
- return it(e, t, r.linkConfig);
1109
+ return st(e, t, r.linkConfig);
1100
1110
  case "image":
1101
- return st(e, r.imageConfig);
1111
+ return ut(e, r.imageConfig);
1102
1112
  case "file":
1103
- return ut(e, t, r.fileConfig);
1113
+ return dt(e, t, r.fileConfig);
1104
1114
  case "tag":
1105
- return ft(e, r.tagOptions, r.tagLabelField || "label", r.tagValueField || "value");
1115
+ return ct(e, r.tagOptions, r.tagLabelField || "label", r.tagValueField || "value");
1106
1116
  case "icon":
1107
- return dt(e, r.iconConfig);
1117
+ return ft(e, r.iconConfig);
1108
1118
  case "text":
1109
1119
  default:
1110
- return ot(e);
1120
+ return it(e);
1111
1121
  }
1112
- }, pt = (e) => e.render ? !1 : !!(e.columnType && e.columnType !== "text");
1113
- function tl() {
1122
+ }, mt = (e) => e.render ? !1 : !!(e.columnType && e.columnType !== "text");
1123
+ function al() {
1114
1124
  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
1125
+ renderColumnContent: pt,
1126
+ shouldAutoRender: mt,
1127
+ renderText: it,
1128
+ renderLink: st,
1129
+ renderImage: ut,
1130
+ renderFile: dt,
1131
+ renderTag: Te,
1132
+ renderTags: ct,
1133
+ renderIcon: ft
1124
1134
  };
1125
1135
  }
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 "自定义列";
1136
+ function Mn(e) {
1137
+ 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}__` : "", x = (d) => {
1138
+ if ("title" in d) {
1139
+ if (typeof d.title == "string") return d.title;
1140
+ if (typeof d.title == "function") return "自定义列";
1131
1141
  }
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)
1142
+ return i(d);
1143
+ }, v = (d) => "defaultVisible" in d ? d.defaultVisible !== !1 : !0, g = (d) => "type" in d && (d.type === "selection" || d.type === "expand") ? !1 : "configurable" in d ? d.configurable !== !1 : !0, b = () => t.filter((d) => v(d)).map((d) => i(d)).filter(Boolean), P = Y(b()), D = I(() => t.filter((d) => i(d) && g(d)).map((d) => ({
1144
+ key: i(d),
1145
+ title: x(d),
1146
+ visible: P.value.includes(i(d)),
1147
+ configurable: g(d)
1138
1148
  }))), k = () => {
1139
1149
  if (r?.show === !1) return null;
1140
- const { renderActions: u } = Bn({
1150
+ const { renderActions: d } = Un({
1141
1151
  ...r,
1142
1152
  onView: a,
1143
1153
  onEdit: l,
@@ -1150,46 +1160,46 @@ function An(e) {
1150
1160
  minWidth: r?.minWidth,
1151
1161
  fixed: r?.fixed !== !1 ? r?.fixed || "right" : void 0,
1152
1162
  align: "center",
1153
- render: (s, m) => u(s, m)
1163
+ render: (s, p) => d(s, p)
1154
1164
  };
1155
- }, G = (u) => {
1156
- if ("columnType" in u && pt(u)) {
1157
- const s = u, m = s.key;
1165
+ }, M = (d) => {
1166
+ if ("columnType" in d && mt(d)) {
1167
+ const s = d, p = s.key;
1158
1168
  return {
1159
- ...u,
1160
- align: u.align || "center",
1161
- render: (S) => ct(m ? S[m] : void 0, S, s)
1169
+ ...d,
1170
+ align: d.align || "center",
1171
+ render: (S) => pt(p ? S[p] : void 0, S, s)
1162
1172
  };
1163
1173
  }
1164
1174
  return {
1165
- ...u,
1166
- align: u.align || "center"
1175
+ ...d,
1176
+ align: d.align || "center"
1167
1177
  };
1168
1178
  };
1169
1179
  return {
1170
1180
  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;
1181
+ const d = t.filter((p) => {
1182
+ const S = i(p);
1183
+ return "type" in p && (p.type === "selection" || p.type === "expand") || !S ? !0 : P.value.includes(S);
1184
+ }).map((p) => M(p)), s = k();
1185
+ return s && d.push(s), d;
1176
1186
  }),
1177
- configurableColumns: x,
1178
- visibleColumnKeys: D,
1179
- setVisibleColumnKeys: (u) => {
1180
- D.value = u;
1187
+ configurableColumns: D,
1188
+ visibleColumnKeys: P,
1189
+ setVisibleColumnKeys: (d) => {
1190
+ P.value = d;
1181
1191
  },
1182
1192
  resetColumnSetting: () => {
1183
- D.value = _();
1193
+ P.value = b();
1184
1194
  },
1185
- getVisibleColumnKeys: () => [...D.value]
1195
+ getVisibleColumnKeys: () => [...P.value]
1186
1196
  };
1187
1197
  }
1188
- var Mn = {
1198
+ var En = {
1189
1199
  page: "page",
1190
1200
  pageSize: "pageSize",
1191
1201
  itemCount: "itemCount"
1192
- }, Ce = {
1202
+ }, ke = {
1193
1203
  pageSizes: [
1194
1204
  10,
1195
1205
  20,
@@ -1199,54 +1209,54 @@ var Mn = {
1199
1209
  showSizePicker: !0,
1200
1210
  showQuickJumper: !0
1201
1211
  };
1202
- function En(e) {
1212
+ function Vn(e) {
1203
1213
  const { pagination: t, fieldNames: r, onUpdatePagination: a, onPageChange: l } = e, c = () => ({
1204
- ...Mn,
1214
+ ...En,
1205
1215
  ...r
1206
- }), i = (x) => {
1216
+ }), i = (D) => {
1207
1217
  if (!(t === !1 || !t))
1208
- return t[c()[x]];
1209
- }, w = I(() => t === !1 || !t ? !1 : {
1218
+ return t[c()[D]];
1219
+ }, x = I(() => t === !1 || !t ? !1 : {
1210
1220
  page: i("page") ?? 1,
1211
1221
  pageSize: i("pageSize") ?? 10,
1212
1222
  itemCount: i("itemCount"),
1213
- pageSizes: t.pageSizes ?? Ce.pageSizes,
1214
- showSizePicker: t.showSizePicker ?? Ce.showSizePicker,
1215
- showQuickJumper: t.showQuickJumper ?? Ce.showQuickJumper,
1223
+ pageSizes: t.pageSizes ?? ke.pageSizes,
1224
+ showSizePicker: t.showSizePicker ?? ke.showSizePicker,
1225
+ showQuickJumper: t.showQuickJumper ?? ke.showQuickJumper,
1216
1226
  prefix: t.prefix,
1217
1227
  suffix: t.suffix
1218
- }), v = (x) => {
1228
+ }), v = (D) => {
1219
1229
  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) => {
1230
+ const k = c(), M = { ...t };
1231
+ return D.page !== void 0 && (M[k.page] = D.page), D.pageSize !== void 0 && (M[k.pageSize] = D.pageSize), M;
1232
+ }, g = (D) => {
1223
1233
  const k = c();
1224
1234
  return {
1225
- [k.page]: x[k.page],
1226
- [k.pageSize]: x[k.pageSize],
1227
- [k.itemCount]: x[k.itemCount]
1235
+ [k.page]: D[k.page],
1236
+ [k.pageSize]: D[k.pageSize],
1237
+ [k.itemCount]: D[k.itemCount]
1228
1238
  };
1229
1239
  };
1230
1240
  return {
1231
- paginationConfig: w,
1232
- handlePageChange: (x) => {
1233
- const k = v({ page: x });
1234
- a?.(k), l?.(b(k));
1241
+ paginationConfig: x,
1242
+ handlePageChange: (D) => {
1243
+ const k = v({ page: D });
1244
+ a?.(k), l?.(g(k));
1235
1245
  },
1236
- handlePageSizeChange: (x) => {
1246
+ handlePageSizeChange: (D) => {
1237
1247
  const k = v({
1238
1248
  page: 1,
1239
- pageSize: x
1249
+ pageSize: D
1240
1250
  });
1241
- a?.(k), l?.(b(k));
1251
+ a?.(k), l?.(g(k));
1242
1252
  },
1243
1253
  getFieldNames: c
1244
1254
  };
1245
1255
  }
1246
- var Vn = {
1256
+ var Gn = {
1247
1257
  key: 0,
1248
1258
  class: "dydx-table__toolbar"
1249
- }, Gn = { class: "dydx-table__column-setting" }, jn = { class: "dydx-table__column-setting-header" }, Hn = /* @__PURE__ */ ae({
1259
+ }, jn = { class: "dydx-table__column-setting" }, Hn = { class: "dydx-table__column-setting-header" }, Kn = /* @__PURE__ */ ne({
1250
1260
  inheritAttrs: !1,
1251
1261
  __name: "DydxNaiveTable",
1252
1262
  props: {
@@ -1297,58 +1307,58 @@ var Vn = {
1297
1307
  "delete"
1298
1308
  ],
1299
1309
  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");
1303
- }, _ = (C) => {
1304
- let n = C.parentElement;
1305
- for (; n && n !== document.body; ) {
1306
- if (b(n)) return n;
1307
- n = n.parentElement;
1310
+ const a = e, l = r, c = De(), i = Y(null), x = Y(void 0), v = I(() => !c.maxHeight), g = (w) => {
1311
+ const C = getComputedStyle(w);
1312
+ return w.clientHeight <= 0 ? !1 : !!(parseFloat(C.flexGrow) > 0 || C.height && C.height !== "auto" && C.height !== "0px" || C.maxHeight && C.maxHeight !== "none" && C.maxHeight !== "0px" || C.overflowY === "auto" || C.overflowY === "scroll");
1313
+ }, b = (w) => {
1314
+ let C = w.parentElement;
1315
+ for (; C && C !== document.body; ) {
1316
+ if (g(C)) return C;
1317
+ C = C.parentElement;
1308
1318
  }
1309
1319
  return null;
1310
- }, D = () => {
1320
+ }, P = () => {
1311
1321
  v.value && Yt(() => {
1312
- const C = i.value;
1313
- if (!C) return;
1314
- const n = _(C);
1315
- if (!n) {
1316
- w.value = void 0;
1322
+ const w = i.value;
1323
+ if (!w) return;
1324
+ const C = b(w);
1325
+ if (!C) {
1326
+ x.value = void 0;
1317
1327
  return;
1318
1328
  }
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;
1329
+ const n = getComputedStyle(C), _ = parseFloat(n.paddingTop), $ = parseFloat(n.paddingBottom), U = C.getBoundingClientRect(), H = w.getBoundingClientRect(), te = w.querySelector(".dydx-table__toolbar"), Ce = te ? te.offsetHeight + 16 : 0, f = w.querySelector(".n-data-table-thead"), O = f ? f.offsetHeight : 40, vt = H.top - (U.top + _), Be = C.clientHeight - _ - $ - vt - Ce - O;
1330
+ Be > 200 ? x.value = Be : x.value = void 0;
1321
1331
  });
1322
- }, x = I(() => c.maxHeight ? c.maxHeight : w.value);
1323
- Je(() => {
1324
- D(), window.addEventListener("resize", D);
1325
- }), Zt(() => {
1326
- window.removeEventListener("resize", D);
1332
+ }, D = I(() => c.maxHeight ? c.maxHeight : x.value);
1333
+ Zt(() => {
1334
+ P(), window.addEventListener("resize", P);
1335
+ }), ea(() => {
1336
+ window.removeEventListener("resize", P);
1327
1337
  });
1328
- const k = Q(null), { mergedColumns: G, configurableColumns: J, visibleColumnKeys: N, setVisibleColumnKeys: P, resetColumnSetting: F, getVisibleColumnKeys: u } = An({
1338
+ const k = Y(null), { mergedColumns: M, configurableColumns: Q, visibleColumnKeys: N, setVisibleColumnKeys: F, resetColumnSetting: z, getVisibleColumnKeys: d } = Mn({
1329
1339
  columns: a.columns,
1330
1340
  actionColumn: a.actionColumn,
1331
- onView: (C) => l("view", C),
1332
- onEdit: (C) => l("edit", C),
1333
- onDelete: (C) => l("delete", C)
1334
- }), { paginationConfig: s, handlePageChange: m, handlePageSizeChange: S } = En({
1341
+ onView: (w) => l("view", w),
1342
+ onEdit: (w) => l("edit", w),
1343
+ onDelete: (w) => l("delete", w)
1344
+ }), { paginationConfig: s, handlePageChange: p, handlePageSizeChange: S } = Vn({
1335
1345
  get pagination() {
1336
1346
  return a.pagination;
1337
1347
  },
1338
1348
  get fieldNames() {
1339
1349
  return a.paginationFieldNames;
1340
1350
  },
1341
- onUpdatePagination: (C) => l("update:pagination", C),
1342
- onPageChange: (C) => l("pageChange", C)
1351
+ onUpdatePagination: (w) => l("update:pagination", w),
1352
+ onPageChange: (w) => l("pageChange", w)
1343
1353
  });
1344
- ta(N, (C) => {
1345
- l("update:visibleColumns", C);
1354
+ Je(N, (w) => {
1355
+ l("update:visibleColumns", w);
1346
1356
  });
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 = () => {
1357
+ const G = I(() => typeof a.rowKey == "function" ? a.rowKey : (w) => w[a.rowKey]), X = (w) => {
1358
+ l("update:checkedRowKeys", w, a.data.filter((C) => w.includes(G.value(C))));
1359
+ }, B = () => {
1350
1360
  a.onAdd?.();
1351
- }, oe = () => {
1361
+ }, Z = () => {
1352
1362
  a.onRefresh?.();
1353
1363
  };
1354
1364
  return t({
@@ -1357,159 +1367,159 @@ var Vn = {
1357
1367
  l("update:checkedRowKeys", [], []);
1358
1368
  },
1359
1369
  refresh: () => {
1360
- oe();
1370
+ Z();
1361
1371
  },
1362
- getVisibleColumnKeys: u,
1363
- setVisibleColumnKeys: P,
1364
- resetColumnSetting: F,
1365
- scrollTo: (C) => {
1366
- k.value?.scrollTo(C);
1372
+ getVisibleColumnKeys: d,
1373
+ setVisibleColumnKeys: F,
1374
+ resetColumnSetting: z,
1375
+ scrollTo: (w) => {
1376
+ k.value?.scrollTo(w);
1367
1377
  }
1368
- }), (C, n) => (y(), L("div", {
1378
+ }), (w, C) => (m(), W("div", {
1369
1379
  ref_key: "containerRef",
1370
1380
  ref: i,
1371
1381
  class: "dydx-table"
1372
- }, [a.showToolbar ? (y(), L("div", Vn, [g(d(W), {
1382
+ }, [a.showToolbar ? (m(), W("div", Gn, [y(u(q), {
1373
1383
  class: "dydx-table__toolbar-left",
1374
1384
  size: 12
1375
1385
  }, {
1376
1386
  default: o(() => [
1377
- e.showAdd ? (y(), T(d(A), {
1387
+ e.showAdd ? (m(), T(u(E), {
1378
1388
  key: 0,
1379
1389
  type: "primary",
1380
- onClick: O
1390
+ onClick: B
1381
1391
  }, {
1382
- icon: o(() => [M(C.$slots, "add-icon", {}, () => [g(d(U), null, {
1383
- default: o(() => [g(d(Qe))]),
1392
+ icon: o(() => [V(w.$slots, "add-icon", {}, () => [y(u(A), null, {
1393
+ default: o(() => [y(u(Qe))]),
1384
1394
  _: 1
1385
1395
  })], !0)]),
1386
- default: o(() => [$(" " + V(e.addButtonText), 1)]),
1396
+ default: o(() => [R(" " + j(e.addButtonText), 1)]),
1387
1397
  _: 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), {
1398
+ })) : L("", !0),
1399
+ (m(!0), W(J, null, ee(e.leftButtons, (n) => (m(), W(J, { key: n.key }, [n.show !== !1 ? (m(), T(u(E), {
1390
1400
  key: 0,
1391
- type: f.type,
1392
- disabled: f.disabled,
1393
- onClick: f.onClick
1394
- }, ue({
1395
- default: o(() => [$(" " + V(f.label), 1)]),
1401
+ type: n.type,
1402
+ disabled: n.disabled,
1403
+ onClick: n.onClick
1404
+ }, de({
1405
+ default: o(() => [R(" " + j(n.label), 1)]),
1396
1406
  _: 2
1397
- }, [f.icon ? {
1407
+ }, [n.icon ? {
1398
1408
  name: "icon",
1399
- fn: o(() => [(y(), T(ee(f.icon)))]),
1409
+ fn: o(() => [(m(), T(ae(n.icon)))]),
1400
1410
  key: "0"
1401
1411
  } : void 0]), 1032, [
1402
1412
  "type",
1403
1413
  "disabled",
1404
1414
  "onClick"
1405
- ])) : K("", !0)], 64))), 128)),
1406
- M(C.$slots, "toolbar-left", {}, void 0, !0)
1415
+ ])) : L("", !0)], 64))), 128)),
1416
+ V(w.$slots, "toolbar-left", {}, void 0, !0)
1407
1417
  ]),
1408
1418
  _: 3
1409
- }), g(d(W), {
1419
+ }), y(u(q), {
1410
1420
  class: "dydx-table__toolbar-right",
1411
1421
  size: 8
1412
1422
  }, {
1413
1423
  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), {
1424
+ V(w.$slots, "toolbar-right", {}, void 0, !0),
1425
+ (m(!0), W(J, null, ee(e.rightButtons, (n) => (m(), W(J, { key: n.key }, [n.show !== !1 ? (m(), T(u(E), {
1416
1426
  key: 0,
1417
- type: f.type,
1418
- disabled: f.disabled,
1419
- onClick: f.onClick
1420
- }, ue({
1421
- default: o(() => [$(" " + V(f.label), 1)]),
1427
+ type: n.type,
1428
+ disabled: n.disabled,
1429
+ onClick: n.onClick
1430
+ }, de({
1431
+ default: o(() => [R(" " + j(n.label), 1)]),
1422
1432
  _: 2
1423
- }, [f.icon ? {
1433
+ }, [n.icon ? {
1424
1434
  name: "icon",
1425
- fn: o(() => [(y(), T(ee(f.icon)))]),
1435
+ fn: o(() => [(m(), T(ae(n.icon)))]),
1426
1436
  key: "0"
1427
1437
  } : void 0]), 1032, [
1428
1438
  "type",
1429
1439
  "disabled",
1430
1440
  "onClick"
1431
- ])) : K("", !0)], 64))), 128)),
1432
- e.showRefresh ? (y(), T(d(xe), {
1441
+ ])) : L("", !0)], 64))), 128)),
1442
+ e.showRefresh ? (m(), T(u(Se), {
1433
1443
  key: 0,
1434
1444
  trigger: "hover"
1435
1445
  }, {
1436
- trigger: o(() => [g(d(A), {
1446
+ trigger: o(() => [y(u(E), {
1437
1447
  circle: "",
1438
1448
  class: "dydx-table__icon-btn",
1439
- onClick: oe
1449
+ onClick: Z
1440
1450
  }, {
1441
- icon: o(() => [g(d(U), null, {
1442
- default: o(() => [g(d(Xe))]),
1451
+ icon: o(() => [y(u(A), null, {
1452
+ default: o(() => [y(u(Ze))]),
1443
1453
  _: 1
1444
1454
  })]),
1445
1455
  _: 1
1446
1456
  })]),
1447
- default: o(() => [n[1] || (n[1] = $(" 刷新 ", -1))]),
1457
+ default: o(() => [C[1] || (C[1] = R(" 刷新 ", -1))]),
1448
1458
  _: 1
1449
- })) : K("", !0),
1450
- e.showColumnSetting ? (y(), T(d(Mt), {
1459
+ })) : L("", !0),
1460
+ e.showColumnSetting ? (m(), T(u(Mt), {
1451
1461
  key: 1,
1452
1462
  trigger: "click",
1453
1463
  placement: "bottom-end"
1454
1464
  }, {
1455
- trigger: o(() => [g(d(xe), { trigger: "hover" }, {
1456
- trigger: o(() => [g(d(A), {
1465
+ trigger: o(() => [y(u(Se), { trigger: "hover" }, {
1466
+ trigger: o(() => [y(u(E), {
1457
1467
  circle: "",
1458
1468
  class: "dydx-table__icon-btn"
1459
1469
  }, {
1460
- icon: o(() => [g(d(U), null, {
1461
- default: o(() => [g(d(oa))]),
1470
+ icon: o(() => [y(u(A), null, {
1471
+ default: o(() => [y(u(ia))]),
1462
1472
  _: 1
1463
1473
  })]),
1464
1474
  _: 1
1465
1475
  })]),
1466
- default: o(() => [n[2] || (n[2] = $(" 列设置 ", -1))]),
1476
+ default: o(() => [C[2] || (C[2] = R(" 列设置 ", -1))]),
1467
1477
  _: 1
1468
1478
  })]),
1469
- default: o(() => [pe("div", Gn, [pe("div", jn, [n[4] || (n[4] = pe("span", null, "列设置", -1)), g(d(A), {
1479
+ default: o(() => [pe("div", jn, [pe("div", Hn, [C[4] || (C[4] = pe("span", null, "列设置", -1)), y(u(E), {
1470
1480
  text: "",
1471
1481
  size: "small",
1472
1482
  type: "primary",
1473
- onClick: d(F)
1483
+ onClick: u(z)
1474
1484
  }, {
1475
- default: o(() => [...n[3] || (n[3] = [$(" 重置 ", -1)])]),
1485
+ default: o(() => [...C[3] || (C[3] = [R(" 重置 ", -1)])]),
1476
1486
  _: 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)
1487
+ }, 8, ["onClick"])]), y(u(Ne), {
1488
+ value: u(N),
1489
+ "onUpdate:value": C[0] || (C[0] = (n) => Qt(N) ? N.value = n : null)
1480
1490
  }, {
1481
- default: o(() => [g(d(W), {
1491
+ default: o(() => [y(u(q), {
1482
1492
  vertical: "",
1483
1493
  size: 8
1484
1494
  }, {
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
1495
+ default: o(() => [(m(!0), W(J, null, ee(u(Q), (n) => (m(), T(u(Ke), {
1496
+ key: n.key,
1497
+ value: n.key,
1498
+ label: n.title
1489
1499
  }, null, 8, ["value", "label"]))), 128))]),
1490
1500
  _: 1
1491
1501
  })]),
1492
1502
  _: 1
1493
1503
  }, 8, ["value"])])]),
1494
1504
  _: 1
1495
- })) : K("", !0)
1505
+ })) : L("", !0)
1496
1506
  ]),
1497
1507
  _: 3
1498
- })])) : K("", !0), g(d(Ct), H({
1508
+ })])) : L("", !0), y(u(wt), K({
1499
1509
  ref_key: "dataTableRef",
1500
1510
  ref: k,
1501
1511
  data: e.data,
1502
- columns: d(G),
1503
- "row-key": E.value,
1512
+ columns: u(M),
1513
+ "row-key": G.value,
1504
1514
  loading: e.loading,
1505
- pagination: d(s),
1515
+ pagination: u(s),
1506
1516
  remote: e.remote,
1507
1517
  "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
1518
+ "max-height": D.value
1519
+ }, u(c), {
1520
+ "onUpdate:page": u(p),
1521
+ "onUpdate:pageSize": u(S),
1522
+ "onUpdate:checkedRowKeys": X
1513
1523
  }), null, 16, [
1514
1524
  "data",
1515
1525
  "columns",
@@ -1523,11 +1533,11 @@ var Vn = {
1523
1533
  "onUpdate:pageSize"
1524
1534
  ])], 512));
1525
1535
  }
1526
- }), Kn = (e, t) => {
1536
+ }), Ln = (e, t) => {
1527
1537
  const r = e.__vccOpts || e;
1528
1538
  for (const [a, l] of t) r[a] = l;
1529
1539
  return r;
1530
- }, mt = /* @__PURE__ */ Kn(Hn, [["__scopeId", "data-v-41718586"]]), Ln = /* @__PURE__ */ ae({
1540
+ }, yt = /* @__PURE__ */ Ln(Kn, [["__scopeId", "data-v-41718586"]]), Wn = /* @__PURE__ */ ne({
1531
1541
  name: "DydxFormModal",
1532
1542
  inheritAttrs: !1,
1533
1543
  __name: "DydxFormModal",
@@ -1561,9 +1571,9 @@ var Vn = {
1561
1571
  "cancel"
1562
1572
  ],
1563
1573
  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 = () => {
1574
+ const a = e, l = r, c = De(), i = Y(), x = I(() => a.title ? a.title : `${a.model[a.rowKey] ? "编辑" : "新增"}${a.subtitle}`), v = I(() => ({ width: typeof a.width == "number" ? `${a.width}px` : a.width })), g = () => {
1565
1575
  l("update:show", !1), l("cancel");
1566
- }, _ = async () => {
1576
+ }, b = async () => {
1567
1577
  try {
1568
1578
  await i.value?.validate(), l("confirm", a.model);
1569
1579
  } catch {
@@ -1573,31 +1583,31 @@ var Vn = {
1573
1583
  getFormRef: () => i.value,
1574
1584
  validate: () => i.value?.validate(),
1575
1585
  resetFields: () => i.value?.resetFields()
1576
- }), (D, x) => (y(), T(d(Ut), H({
1586
+ }), (P, D) => (m(), T(u(Ut), K({
1577
1587
  show: e.show,
1578
1588
  preset: "card",
1579
- title: w.value,
1589
+ title: x.value,
1580
1590
  style: v.value,
1581
1591
  "mask-closable": !1
1582
- }, d(c), { "onUpdate:show": x[0] || (x[0] = (k) => l("update:show", k)) }), ue({ _: 2 }, [
1583
- D.$slots.header ? {
1592
+ }, u(c), { "onUpdate:show": D[0] || (D[0] = (k) => l("update:show", k)) }), de({ _: 2 }, [
1593
+ P.$slots.header ? {
1584
1594
  name: "header",
1585
- fn: o(() => [M(D.$slots, "header")]),
1595
+ fn: o(() => [V(P.$slots, "header")]),
1586
1596
  key: "0"
1587
1597
  } : void 0,
1588
- D.$slots["header-extra"] ? {
1598
+ P.$slots["header-extra"] ? {
1589
1599
  name: "header-extra",
1590
- fn: o(() => [M(D.$slots, "header-extra")]),
1600
+ fn: o(() => [V(P.$slots, "header-extra")]),
1591
1601
  key: "1"
1592
1602
  } : void 0,
1593
- D.$slots.default ? {
1603
+ P.$slots.default ? {
1594
1604
  name: "default",
1595
- fn: o(() => [M(D.$slots, "default")]),
1605
+ fn: o(() => [V(P.$slots, "default")]),
1596
1606
  key: "2"
1597
1607
  } : {
1598
1608
  name: "default",
1599
- fn: o(() => [g(d(Te), { show: e.loading }, {
1600
- default: o(() => [g(d(be), {
1609
+ fn: o(() => [y(u(Pe), { show: e.loading }, {
1610
+ default: o(() => [y(u(be), {
1601
1611
  ref_key: "formRef",
1602
1612
  ref: i,
1603
1613
  schemas: e.schemas,
@@ -1621,42 +1631,42 @@ var Vn = {
1621
1631
  }, 8, ["show"])]),
1622
1632
  key: "3"
1623
1633
  },
1624
- D.$slots.footer ? {
1634
+ P.$slots.footer ? {
1625
1635
  name: "footer",
1626
- fn: o(() => [M(D.$slots, "footer")]),
1636
+ fn: o(() => [V(P.$slots, "footer")]),
1627
1637
  key: "4"
1628
1638
  } : {
1629
1639
  name: "footer",
1630
- fn: o(() => [g(d(W), { justify: "end" }, {
1631
- default: o(() => [e.showCancel ? (y(), T(d(A), {
1640
+ fn: o(() => [y(u(q), { justify: "end" }, {
1641
+ default: o(() => [e.showCancel ? (m(), T(u(E), {
1632
1642
  key: 0,
1633
- onClick: b
1643
+ onClick: g
1634
1644
  }, {
1635
- icon: o(() => [g(d(U), null, {
1636
- default: o(() => [g(d(Ye))]),
1645
+ icon: o(() => [y(u(A), null, {
1646
+ default: o(() => [y(u(Xe))]),
1637
1647
  _: 1
1638
1648
  })]),
1639
- default: o(() => [$(" " + V(e.cancelText), 1)]),
1649
+ default: o(() => [R(" " + j(e.cancelText), 1)]),
1640
1650
  _: 1
1641
- })) : K("", !0), g(d(A), {
1651
+ })) : L("", !0), y(u(E), {
1642
1652
  type: "primary",
1643
1653
  loading: e.loading,
1644
- onClick: _
1654
+ onClick: b
1645
1655
  }, {
1646
- icon: o(() => [g(d(U), null, {
1647
- default: o(() => [g(d(Pe))]),
1656
+ icon: o(() => [y(u(A), null, {
1657
+ default: o(() => [y(u(Ye))]),
1648
1658
  _: 1
1649
1659
  })]),
1650
- default: o(() => [$(" " + V(e.confirmText), 1)]),
1660
+ default: o(() => [R(" " + j(e.confirmText), 1)]),
1651
1661
  _: 1
1652
1662
  }, 8, ["loading"])]),
1653
1663
  _: 1
1654
1664
  })]),
1655
1665
  key: "5"
1656
1666
  },
1657
- D.$slots.action ? {
1667
+ P.$slots.action ? {
1658
1668
  name: "action",
1659
- fn: o(() => [M(D.$slots, "action")]),
1669
+ fn: o(() => [V(P.$slots, "action")]),
1660
1670
  key: "6"
1661
1671
  } : void 0
1662
1672
  ]), 1040, [
@@ -1665,7 +1675,7 @@ var Vn = {
1665
1675
  "style"
1666
1676
  ]));
1667
1677
  }
1668
- }), yt = Ln, Wn = /* @__PURE__ */ ae({
1678
+ }), gt = Wn, qn = /* @__PURE__ */ ne({
1669
1679
  name: "DydxFormDrawer",
1670
1680
  inheritAttrs: !1,
1671
1681
  __name: "DydxFormDrawer",
@@ -1700,9 +1710,9 @@ var Vn = {
1700
1710
  "cancel"
1701
1711
  ],
1702
1712
  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 = () => {
1713
+ const a = e, l = r, c = De(), i = Y(), x = I(() => a.title ? a.title : `${a.model[a.rowKey] ? "编辑" : "新增"}${a.subtitle}`), v = () => {
1704
1714
  l("update:show", !1), l("cancel");
1705
- }, b = async () => {
1715
+ }, g = async () => {
1706
1716
  try {
1707
1717
  await i.value?.validate(), l("confirm", a.model);
1708
1718
  } catch {
@@ -1712,24 +1722,24 @@ var Vn = {
1712
1722
  getFormRef: () => i.value,
1713
1723
  validate: () => i.value?.validate(),
1714
1724
  resetFields: () => i.value?.resetFields()
1715
- }), (_, D) => (y(), T(d(kt), H({
1725
+ }), (b, P) => (m(), T(u(kt), K({
1716
1726
  show: e.show,
1717
1727
  width: e.width,
1718
1728
  placement: e.placement,
1719
1729
  "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,
1730
+ }, u(c), { "onUpdate:show": P[0] || (P[0] = (D) => l("update:show", D)) }), {
1731
+ default: o(() => [y(u(St), {
1732
+ title: x.value,
1723
1733
  closable: "",
1724
1734
  onClose: v
1725
- }, ue({ _: 2 }, [_.$slots.default ? {
1735
+ }, de({ _: 2 }, [b.$slots.default ? {
1726
1736
  name: "default",
1727
- fn: o(() => [M(_.$slots, "default")]),
1737
+ fn: o(() => [V(b.$slots, "default")]),
1728
1738
  key: "0"
1729
1739
  } : {
1730
1740
  name: "default",
1731
- fn: o(() => [g(d(Te), { show: e.loading }, {
1732
- default: o(() => [g(d(be), {
1741
+ fn: o(() => [y(u(Pe), { show: e.loading }, {
1742
+ default: o(() => [y(u(be), {
1733
1743
  ref_key: "formRef",
1734
1744
  ref: i,
1735
1745
  schemas: e.schemas,
@@ -1752,33 +1762,33 @@ var Vn = {
1752
1762
  _: 1
1753
1763
  }, 8, ["show"])]),
1754
1764
  key: "1"
1755
- }, _.$slots.footer ? {
1765
+ }, b.$slots.footer ? {
1756
1766
  name: "footer",
1757
- fn: o(() => [M(_.$slots, "footer")]),
1767
+ fn: o(() => [V(b.$slots, "footer")]),
1758
1768
  key: "2"
1759
1769
  } : {
1760
1770
  name: "footer",
1761
- fn: o(() => [g(d(W), { justify: "end" }, {
1762
- default: o(() => [e.showCancel ? (y(), T(d(A), {
1771
+ fn: o(() => [y(u(q), { justify: "end" }, {
1772
+ default: o(() => [e.showCancel ? (m(), T(u(E), {
1763
1773
  key: 0,
1764
1774
  onClick: v
1765
1775
  }, {
1766
- icon: o(() => [g(d(U), null, {
1767
- default: o(() => [g(d(Ye))]),
1776
+ icon: o(() => [y(u(A), null, {
1777
+ default: o(() => [y(u(Xe))]),
1768
1778
  _: 1
1769
1779
  })]),
1770
- default: o(() => [$(" " + V(e.cancelText), 1)]),
1780
+ default: o(() => [R(" " + j(e.cancelText), 1)]),
1771
1781
  _: 1
1772
- })) : K("", !0), g(d(A), {
1782
+ })) : L("", !0), y(u(E), {
1773
1783
  type: "primary",
1774
1784
  loading: e.loading,
1775
- onClick: b
1785
+ onClick: g
1776
1786
  }, {
1777
- icon: o(() => [g(d(U), null, {
1778
- default: o(() => [g(d(Pe))]),
1787
+ icon: o(() => [y(u(A), null, {
1788
+ default: o(() => [y(u(Ye))]),
1779
1789
  _: 1
1780
1790
  })]),
1781
- default: o(() => [$(" " + V(e.confirmText), 1)]),
1791
+ default: o(() => [R(" " + j(e.confirmText), 1)]),
1782
1792
  _: 1
1783
1793
  }, 8, ["loading"])]),
1784
1794
  _: 1
@@ -1792,37 +1802,37 @@ var Vn = {
1792
1802
  "placement"
1793
1803
  ]));
1794
1804
  }
1795
- }), gt = Wn, qn = [
1805
+ }), ht = qn, Jn = [
1796
1806
  be,
1797
- mt,
1798
1807
  yt,
1799
1808
  gt,
1809
+ ht,
1800
1810
  ye,
1801
- De
1802
- ], Jn = (e) => {
1803
- qn.forEach((t) => {
1811
+ Fe
1812
+ ], Qn = (e) => {
1813
+ Jn.forEach((t) => {
1804
1814
  t.name && e.component(t.name, t);
1805
1815
  });
1806
- }, al = {
1807
- install: Jn,
1816
+ }, rl = {
1817
+ install: Qn,
1808
1818
  DydxNaiveForm: be,
1809
- DydxNaiveTable: mt,
1810
- DydxFormModal: yt,
1811
- DydxFormDrawer: gt,
1819
+ DydxNaiveTable: yt,
1820
+ DydxFormModal: gt,
1821
+ DydxFormDrawer: ht,
1812
1822
  DydxUpload: ye,
1813
- DydxIconSelect: De
1823
+ DydxIconSelect: Fe
1814
1824
  };
1815
1825
  export {
1816
- gt as DydxFormDrawer,
1817
- yt as DydxFormModal,
1818
- De as DydxIconSelect,
1826
+ ht as DydxFormDrawer,
1827
+ gt as DydxFormModal,
1828
+ Fe as DydxIconSelect,
1819
1829
  be as DydxNaiveForm,
1820
- mt as DydxNaiveTable,
1821
- Yn as DydxNaiveUIResolver,
1830
+ yt as DydxNaiveTable,
1831
+ Xn as DydxNaiveUIResolver,
1822
1832
  ye as DydxUpload,
1823
- al as default,
1824
- tl as useColumnRender,
1825
- An as useColumns,
1826
- En as usePagination,
1827
- Bn as useTableActions
1833
+ rl as default,
1834
+ al as useColumnRender,
1835
+ Mn as useColumns,
1836
+ Vn as usePagination,
1837
+ Un as useTableActions
1828
1838
  };