@xmszm/core 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,34 +1,32 @@
1
- var Re = Object.defineProperty;
2
- var Ve = (t, l, e) => l in t ? Re(t, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[l] = e;
3
- var ne = (t, l, e) => Ve(t, typeof l != "symbol" ? l + "" : l, e);
4
- import { useCssVars as je, unref as w, ref as U, watchEffect as ge, resolveComponent as E, createElementBlock as G, openBlock as q, createVNode as d, createElementVNode as fe, withCtx as B, Fragment as Z, renderList as ue, createBlock as V, createTextVNode as L, toDisplayString as re, computed as _, watch as W, onMounted as Fe, renderSlot as oe, isProxy as ze, normalizeStyle as De, mergeProps as I, isVNode as H, defineComponent as Q, withDirectives as Ke, resolveDirective as Le, isRef as We, mergeModels as ie, useModel as $e, reactive as He, onUnmounted as Je, createCommentVNode as Ge, resolveDynamicComponent as Xe } from "vue";
5
- import { useThemeVars as Ze, NTooltip as Qe, NButton as z, NCheckboxGroup as ve, NSpace as k, NCheckbox as et, NSwitch as tt, NDivider as lt, NProgress as nt, NUpload as at, NUploadDragger as ut, NIcon as Me, NText as rt, NInputNumber as ot, NInput as pe, NRadioGroup as it, NRadio as st, NDatePicker as be, NTimePicker as ft, NSelect as ct, NEllipsis as dt, NFormItem as yt, NForm as mt, NPopconfirm as ht, NPopover as gt } from "naive-ui";
6
- import { Funnel as pt, RefreshOutline as bt, SearchOutline as xt, Code as wt, ChevronDown as Ot, ChevronUp as Ct } from "@vicons/ionicons5";
7
- import { hasPermission as Nt } from "@/utils/permission";
8
- import { useRoute as Ue, useRouter as St } from "vue-router";
9
- import { BASE_URL as xe } from "@/utils/request";
10
- import T from "dayjs";
11
- import { uniqueId as we } from "lodash-es";
12
- const P = "name", Y = "id";
13
- function qe(t, { labelField: l = P, valueField: e = Y } = {}) {
14
- return Object.keys(t).reduce((u, a) => {
15
- const i = At(t[a], a), n = {
1
+ var Qe = Object.defineProperty;
2
+ var Xe = (t, l, e) => l in t ? Qe(t, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[l] = e;
3
+ var ce = (t, l, e) => Xe(t, typeof l != "symbol" ? l + "" : l, e);
4
+ import { unref as g, useCssVars as Ze, ref as P, watchEffect as Ae, resolveComponent as Y, createElementBlock as le, openBlock as T, createVNode as s, createElementVNode as we, withCtx as R, Fragment as ae, renderList as me, createBlock as H, createTextVNode as v, toDisplayString as he, getCurrentInstance as oe, computed as _, watch as ee, onMounted as Be, renderSlot as ge, isProxy as ve, normalizeStyle as Te, mergeProps as I, isVNode as te, defineComponent as re, withDirectives as et, resolveDirective as tt, isRef as lt, mergeModels as pe, useModel as Ye, reactive as nt, onUnmounted as at, createCommentVNode as rt, resolveDynamicComponent as ut } from "vue";
5
+ import { useThemeVars as it, NTooltip as ot, NButton as Q, NCheckboxGroup as st, NSpace as z, NCheckbox as ft, NSwitch as ct, NDivider as dt, NProgress as yt, NUpload as mt, NUploadDragger as ht, NIcon as _e, NText as gt, NInputNumber as pt, NInput as Se, NRadioGroup as bt, NRadio as wt, NDatePicker as Ie, NTimePicker as xt, NSelect as Ot, NEllipsis as Ct, NFormItem as Nt, NForm as Dt, useDialog as xe, createDiscreteApi as At, NPopconfirm as St, NPopover as It, NSpin as Ft, NImage as Mt } from "naive-ui";
6
+ import { Funnel as Ut, RefreshOutline as $t, SearchOutline as Pt, Code as qt, ChevronDown as Et, ChevronUp as Bt } from "@vicons/ionicons5";
7
+ import { useRoute as Re, useRouter as Tt } from "vue-router";
8
+ import L from "dayjs";
9
+ import { uniqueId as Fe } from "lodash-es";
10
+ const j = "name", k = "id";
11
+ function ke(t, { labelField: l = j, valueField: e = k } = {}) {
12
+ return Object.keys(t).reduce((r, a) => {
13
+ const i = Yt(t[a], a), n = {
16
14
  ...i
17
15
  };
18
- return n[l] = i == null ? void 0 : i[l], n[e] = i == null ? void 0 : i[e], u.concat(n);
16
+ return n[l] = i == null ? void 0 : i[l], n[e] = i == null ? void 0 : i[e], r.concat(n);
19
17
  }, []);
20
18
  }
21
- function At(t, l) {
19
+ function Yt(t, l) {
22
20
  const e = {
23
- [P]: unref(t),
24
- [Y]: Number.isNaN(Number(l)) ? l : Number(l)
21
+ [j]: g(t),
22
+ [k]: Number.isNaN(Number(l)) ? l : Number(l)
25
23
  };
26
- return typeof unref(t) == "object" ? {
27
- ...unref(t),
28
- [Y]: Number.isNaN(Number(l)) ? l : Number(l)
24
+ return typeof g(t) == "object" ? {
25
+ ...g(t),
26
+ [k]: Number.isNaN(Number(l)) ? l : Number(l)
29
27
  } : e;
30
28
  }
31
- const Oe = {
29
+ const Me = {
32
30
  style: {
33
31
  cursor: "pointer"
34
32
  },
@@ -49,12 +47,12 @@ const Oe = {
49
47
  backgroundColor: "--n-color"
50
48
  }
51
49
  }
52
- }, v = (t, l) => {
50
+ }, ue = (t, l) => {
53
51
  const e = t.__vccOpts || t;
54
- for (const [u, a] of l)
55
- e[u] = a;
52
+ for (const [r, a] of l)
53
+ e[r] = a;
56
54
  return e;
57
- }, It = { class: "filter-box" }, Ft = { class: "filter-footer" }, Dt = {
55
+ }, _t = { class: "filter-box" }, Rt = { class: "filter-footer" }, kt = {
58
56
  __name: "FilterDialog",
59
57
  props: {
60
58
  type: {
@@ -81,21 +79,21 @@ const Oe = {
81
79
  },
82
80
  emits: ["submit"],
83
81
  setup(t, { emit: l }) {
84
- var x, b;
85
- je((A) => ({
86
- e0ecc754: w(a).infoColor
82
+ var h, p;
83
+ Ze((A) => ({
84
+ e0ecc754: g(a).infoColor
87
85
  }));
88
- const e = t, u = l, a = Ze(), i = U([]);
89
- ge(() => {
86
+ const e = t, r = l, a = it(), i = P([]);
87
+ Ae(() => {
90
88
  i.value = e.selectItem;
91
89
  });
92
- const n = U([]), f = [
90
+ const n = P([]), f = [
93
91
  {
94
92
  key: "all",
95
93
  label: "全选",
96
94
  onCheck: () => {
97
95
  var A;
98
- return i.value = (A = e.filterItem) == null ? void 0 : A.map((N) => N.key);
96
+ return i.value = (A = e.filterItem) == null ? void 0 : A.map((D) => D.key);
99
97
  },
100
98
  unCheck: () => i.value = []
101
99
  },
@@ -112,39 +110,39 @@ const Oe = {
112
110
  unCheck: () => i.value = e.selectItem
113
111
  }
114
112
  ];
115
- ge(() => {
113
+ Ae(() => {
116
114
  n.value = f.filter(
117
115
  (A) => e.filterButtonKey.includes(A.key)
118
116
  ), console.log(e.filterButtonKey);
119
117
  });
120
118
  function o() {
121
- u("submit", i.value);
119
+ r("submit", i.value);
122
120
  }
123
- const c = U(
124
- ((x = e.filterItem) == null ? void 0 : x.length) === ((b = e.selectItem) == null ? void 0 : b.length) ? ["all"] : []
121
+ const d = P(
122
+ ((h = e.filterItem) == null ? void 0 : h.length) === ((p = e.selectItem) == null ? void 0 : p.length) ? ["all"] : []
125
123
  );
126
- function m(A, N) {
127
- var r, h, y, g;
128
- console.log(A), console.log(N), N.actionType === "uncheck" ? ((h = (r = n.value) == null ? void 0 : r.find((s) => (s == null ? void 0 : s.key) === N.value)) == null || h.unCheck(), c.value = []) : ((g = (y = n.value) == null ? void 0 : y.find((s) => (s == null ? void 0 : s.key) === N.value)) == null || g.onCheck(), c.value = [N.value]);
124
+ function m(A, D) {
125
+ var M, S, u, w;
126
+ console.log(A), console.log(D), D.actionType === "uncheck" ? ((S = (M = n.value) == null ? void 0 : M.find((c) => (c == null ? void 0 : c.key) === D.value)) == null || S.unCheck(), d.value = []) : ((w = (u = n.value) == null ? void 0 : u.find((c) => (c == null ? void 0 : c.key) === D.value)) == null || w.onCheck(), d.value = [D.value]);
129
127
  }
130
- return (A, N) => {
131
- const r = E("n-ellipsis"), h = E("n-checkbox"), y = E("n-checkbox-group"), g = E("n-button");
132
- return q(), G("div", It, [
133
- d(y, {
128
+ return (A, D) => {
129
+ const M = Y("n-ellipsis"), S = Y("n-checkbox"), u = Y("n-checkbox-group"), w = Y("n-button");
130
+ return T(), le("div", _t, [
131
+ s(u, {
134
132
  value: i.value,
135
- "onUpdate:value": N[0] || (N[0] = (s) => i.value = s),
133
+ "onUpdate:value": D[0] || (D[0] = (c) => i.value = c),
136
134
  class: "filter-main"
137
135
  }, {
138
- default: B(() => [
139
- (q(!0), G(Z, null, ue(t.filterItem, (s) => (q(), V(h, {
140
- key: s.key,
141
- value: s.key,
136
+ default: R(() => [
137
+ (T(!0), le(ae, null, me(t.filterItem, (c) => (T(), H(S, {
138
+ key: c.key,
139
+ value: c.key,
142
140
  class: "filter-item"
143
141
  }, {
144
- default: B(() => [
145
- d(r, { style: { "max-width": "100px" } }, {
146
- default: B(() => [
147
- L(re(s.title), 1)
142
+ default: R(() => [
143
+ s(M, { style: { "max-width": "100px" } }, {
144
+ default: R(() => [
145
+ v(he(c.title), 1)
148
146
  ]),
149
147
  _: 2
150
148
  }, 1024)
@@ -154,32 +152,32 @@ const Oe = {
154
152
  ]),
155
153
  _: 1
156
154
  }, 8, ["value"]),
157
- fe("div", Ft, [
158
- d(y, {
155
+ we("div", Rt, [
156
+ s(u, {
159
157
  type: e.type,
160
- value: c.value,
158
+ value: d.value,
161
159
  "onUpdate:value": m
162
160
  }, {
163
- default: B(() => [
164
- (q(!0), G(Z, null, ue(n.value, (s) => (q(), V(h, {
165
- key: s.key,
166
- value: s.key
161
+ default: R(() => [
162
+ (T(!0), le(ae, null, me(n.value, (c) => (T(), H(S, {
163
+ key: c.key,
164
+ value: c.key
167
165
  }, {
168
- default: B(() => [
169
- L(re(s.label), 1)
166
+ default: R(() => [
167
+ v(he(c.label), 1)
170
168
  ]),
171
169
  _: 2
172
170
  }, 1032, ["value"]))), 128))
173
171
  ]),
174
172
  _: 1
175
173
  }, 8, ["type", "value"]),
176
- d(g, {
174
+ s(w, {
177
175
  class: "submit-btn",
178
176
  type: e.type,
179
177
  onClick: o
180
178
  }, {
181
- default: B(() => [...N[1] || (N[1] = [
182
- L(" 保存 ", -1)
179
+ default: R(() => [...D[1] || (D[1] = [
180
+ v(" 保存 ", -1)
183
181
  ])]),
184
182
  _: 1
185
183
  }, 8, ["type"])
@@ -187,7 +185,105 @@ const Oe = {
187
185
  ]);
188
186
  };
189
187
  }
190
- }, $t = /* @__PURE__ */ v(Dt, [["__scopeId", "data-v-2aba8b9e"]]), Ce = "filter_key", Mt = {
188
+ }, Lt = /* @__PURE__ */ ue(kt, [["__scopeId", "data-v-2aba8b9e"]]), E = {
189
+ // API 基础地址
190
+ baseURL: "",
191
+ // 权限检查函数
192
+ hasPermission: null,
193
+ // 上传方法
194
+ uploadMethod: null,
195
+ // Dialog 配置
196
+ dialog: {
197
+ // Dialog 实例(可通过 setupConfig 注册,或内部自动获取)
198
+ instance: null,
199
+ // 是否继承外部定义的主题色(默认 true)
200
+ inheritTheme: !0,
201
+ // 主题色覆盖(当 inheritTheme 为 false 时使用)
202
+ themeOverrides: null
203
+ }
204
+ };
205
+ function jt(t = {}) {
206
+ if (t.baseURL !== void 0 && (E.baseURL = t.baseURL), t.hasPermission !== void 0) {
207
+ if (typeof t.hasPermission != "function")
208
+ throw new TypeError("hasPermission 必须是一个函数");
209
+ E.hasPermission = t.hasPermission;
210
+ }
211
+ if (t.uploadMethod !== void 0) {
212
+ if (typeof t.uploadMethod != "function")
213
+ throw new TypeError("uploadMethod 必须是一个函数");
214
+ E.uploadMethod = t.uploadMethod;
215
+ }
216
+ if (t.dialog !== void 0) {
217
+ if (typeof t.dialog != "object")
218
+ throw new TypeError("dialog 必须是一个对象");
219
+ t.dialog.instance !== void 0 && (E.dialog.instance = t.dialog.instance), t.dialog.inheritTheme !== void 0 && (E.dialog.inheritTheme = t.dialog.inheritTheme), t.dialog.themeOverrides !== void 0 && (E.dialog.themeOverrides = t.dialog.themeOverrides);
220
+ }
221
+ return E;
222
+ }
223
+ function Ml() {
224
+ return { ...E };
225
+ }
226
+ function Vt() {
227
+ return E.baseURL;
228
+ }
229
+ function Ul() {
230
+ return E.hasPermission;
231
+ }
232
+ function zt() {
233
+ return E.uploadMethod;
234
+ }
235
+ function Kt() {
236
+ return { ...E.dialog };
237
+ }
238
+ function Le(t) {
239
+ E.dialog.instance = t;
240
+ }
241
+ function $l() {
242
+ return E.dialog.instance;
243
+ }
244
+ function be(t) {
245
+ return E.hasPermission ? E.hasPermission(t) : (console.warn("hasPermission 未配置,默认返回 true。请使用 setupConfig 配置权限检查函数。"), !0);
246
+ }
247
+ const Wt = {
248
+ mounted(t, l) {
249
+ const e = l.value;
250
+ if (!e)
251
+ return;
252
+ (Array.isArray(e) ? e : [e]).some((i) => be(i)) || (t.style.display = "none", t._originalDisplay = t.style.display || "");
253
+ },
254
+ updated(t, l) {
255
+ const e = l.value;
256
+ if (!e) {
257
+ t._originalDisplay !== void 0 ? t.style.display = t._originalDisplay || "" : t.style.display = "";
258
+ return;
259
+ }
260
+ (Array.isArray(e) ? e : [e]).some((i) => be(i)) ? t._originalDisplay !== void 0 ? t.style.display = t._originalDisplay || "" : t.style.display = "" : t.style.display = "none";
261
+ },
262
+ unmounted(t) {
263
+ delete t._originalDisplay;
264
+ }
265
+ };
266
+ let je = null;
267
+ function X(t) {
268
+ var l;
269
+ t && (je = t, (l = t._context.directives) != null && l.corePermission || t.directive("corePermission", Wt));
270
+ }
271
+ function Pl() {
272
+ var t;
273
+ try {
274
+ const l = typeof require < "u" ? require("vue") : null;
275
+ if (!l) return !1;
276
+ const { getCurrentInstance: e } = l, r = e == null ? void 0 : e();
277
+ if ((t = r == null ? void 0 : r.appContext) != null && t.app)
278
+ return X(r.appContext.app), !0;
279
+ } catch {
280
+ }
281
+ return !1;
282
+ }
283
+ function Ht() {
284
+ return je;
285
+ }
286
+ const Ue = "filter_key", Gt = {
191
287
  __name: "DataTable",
192
288
  props: {
193
289
  data: {
@@ -252,110 +348,120 @@ const Oe = {
252
348
  expose: l,
253
349
  emit: e
254
350
  }) {
255
- const u = t, a = Ue(), i = e, n = _(() => (console.log("table -data", u.data), u.data));
256
- function f(g) {
257
- window.localStorage.setItem(Ce, JSON.stringify(g));
351
+ var x;
352
+ const r = oe();
353
+ (x = r == null ? void 0 : r.appContext) != null && x.app && X(r.appContext.app);
354
+ const a = t, i = Re(), n = e, f = () => {
355
+ try {
356
+ return (i == null ? void 0 : i.fullPath) || (i == null ? void 0 : i.path) || "";
357
+ } catch {
358
+ return "";
359
+ }
360
+ }, o = _(() => (console.log("table -data", a.data), a.data));
361
+ function d(y) {
362
+ window.localStorage.setItem(Ue, JSON.stringify(y));
258
363
  }
259
- function o() {
260
- return JSON.parse(window.localStorage.getItem(Ce)) || {};
364
+ function m() {
365
+ return JSON.parse(window.localStorage.getItem(Ue)) || {};
261
366
  }
262
- const c = U(o()), m = U([]), x = U(0);
263
- function b(g) {
264
- if (u.summaryColumns)
265
- return [u.selectColumns, ...w(u.columns), u.oprColumns].reduce((s, p) => {
266
- var S, F;
267
- return p != null && p.key ? s[p.key] = ((F = (S = u.summaryColumns) == null ? void 0 : S.call(u, g)) == null ? void 0 : F[p.key]) || {
367
+ const h = P(m()), p = P([]), A = P(0);
368
+ function D(y) {
369
+ if (a.summaryColumns)
370
+ return [a.selectColumns, ...g(a.columns), a.oprColumns].reduce((b, C) => {
371
+ var $, B;
372
+ return C != null && C.key ? b[C.key] = ((B = ($ = a.summaryColumns) == null ? void 0 : $.call(a, y)) == null ? void 0 : B[C.key]) || {
268
373
  value: null
269
- } : s[we("table")] = {
374
+ } : b[Fe("table")] = {
270
375
  value: null
271
- }, s;
376
+ }, b;
272
377
  }, {});
273
378
  }
274
- const A = U([]);
275
- W(() => w(u.columns), () => {
276
- N();
379
+ const M = P([]);
380
+ ee(() => g(a.columns), () => {
381
+ S();
277
382
  }, {
278
383
  immediate: !0
279
- }), W(() => u.oprColumns, (g) => {
280
- console.log("oprColumns", g);
384
+ }), ee(() => a.oprColumns, (y) => {
385
+ console.log("oprColumns", y);
281
386
  });
282
- function N() {
283
- var S;
284
- const g = w(u.columns);
285
- m.value = ((S = c.value) == null ? void 0 : S[a.fullPath]) || (g == null ? void 0 : g.map((F, C) => (F == null ? void 0 : F.key) || T().valueOf() + C));
286
- const s = u.isFilter ? g.filter((F) => {
287
- var C;
288
- return (C = m.value) == null ? void 0 : C.includes(F.key);
289
- }) : [...g];
290
- u.selectColumns && s.unshift({
387
+ function S() {
388
+ var B;
389
+ const y = g(a.columns), b = f();
390
+ p.value = b && ((B = h.value) == null ? void 0 : B[b]) || (y == null ? void 0 : y.map((q, N) => (q == null ? void 0 : q.key) || L().valueOf() + N));
391
+ const C = a.isFilter ? y.filter((q) => {
392
+ var N;
393
+ return (N = p.value) == null ? void 0 : N.includes(q.key);
394
+ }) : [...y];
395
+ a.selectColumns && C.unshift({
291
396
  key: "selectKey",
292
- ...u.selectColumns
293
- }), u.oprColumns && s.push(u.oprColumns);
294
- let p = 0;
295
- A.value = s.reduce((F, C) => {
397
+ ...a.selectColumns
398
+ }), a.oprColumns && C.push(a.oprColumns);
399
+ let $ = 0;
400
+ M.value = C.reduce((q, N) => {
296
401
  var K;
297
- if (C != null && C.display && console.log("display", C == null ? void 0 : C.display), !((C == null ? void 0 : C.display) ?? !0)) return F;
298
- const $ = {
402
+ if (N != null && N.display && console.log("display", N == null ? void 0 : N.display), !((N == null ? void 0 : N.display) ?? !0)) return q;
403
+ const U = {
299
404
  align: "center",
300
405
  width: 120,
301
- ...C,
302
- key: (C == null ? void 0 : C.key) || we("table"),
303
- ellipsis: C != null && C.ellipsis || u.isEllipsis ? C != null && C.ellipsisProp ? C == null ? void 0 : C.ellipsisProp(Oe) : Oe : !1,
406
+ ...N,
407
+ key: (N == null ? void 0 : N.key) || Fe("table"),
408
+ ellipsis: N != null && N.ellipsis || a.isEllipsis ? N != null && N.ellipsisProp ? N == null ? void 0 : N.ellipsisProp(Me) : Me : !1,
304
409
  "ellipsis-component": "ellipsis",
305
410
  title: () => {
306
- const M = (C == null ? void 0 : C.label) || (C == null ? void 0 : C.title) || "";
307
- return d("div", {
411
+ const V = (N == null ? void 0 : N.label) || (N == null ? void 0 : N.title) || "";
412
+ return s("div", {
308
413
  style: {
309
414
  width: "100%",
310
415
  whiteSpace: "pre-wrap"
311
416
  }
312
- }, [typeof M == "string" ? M : M == null ? void 0 : M()]);
417
+ }, [typeof V == "string" ? V : V == null ? void 0 : V()]);
313
418
  }
314
419
  };
315
- return C != null && C.sorter && ($.renderSorterIcon = ({
316
- order: M
420
+ return N != null && N.sorter && (U.renderSorterIcon = ({
421
+ order: V
317
422
  }) => {
318
423
  const {
319
- Icon: J,
320
- title: ee
321
- } = ae[M];
322
- return d(Qe, null, {
323
- trigger: () => J,
324
- default: () => ee
424
+ Icon: ie,
425
+ title: F
426
+ } = ye[V];
427
+ return s(ot, null, {
428
+ trigger: () => ie,
429
+ default: () => F
325
430
  });
326
- }, $.sorter = {
431
+ }, U.sorter = {
327
432
  multiple: 1,
328
- fn: C.sorter
329
- }), p += $ != null && $.width ? Number.parseInt($ == null ? void 0 : $.width) : ((K = $ == null ? void 0 : $.title) == null ? void 0 : K.length) * $.length + 30 || 0, F.push($), F;
330
- }, []), x.value = p, console.log("计算");
433
+ fn: N.sorter
434
+ }), $ += U != null && U.width ? Number.parseInt(U == null ? void 0 : U.width) : ((K = U == null ? void 0 : U.title) == null ? void 0 : K.length) * U.length + 30 || 0, q.push(U), q;
435
+ }, []), A.value = $, console.log("计算");
331
436
  }
332
- function r() {
333
- return d(z, {
437
+ function u() {
438
+ return s(Q, {
334
439
  type: "info",
335
- onClick: () => h()
440
+ onClick: () => w()
336
441
  }, {
337
442
  default: () => "筛选字段",
338
- icon: () => d(pt, null, null)
443
+ icon: () => s(Ut, null, null)
339
444
  });
340
445
  }
341
- function h() {
446
+ function w() {
342
447
  const {
343
- cancel: g
344
- } = Ht({
448
+ cancel: y
449
+ } = Ke({
345
450
  title: "筛选字段",
346
451
  read: !0,
347
452
  options: [{
348
- render: () => d($t, {
453
+ render: () => s(Lt, {
349
454
  style: {
350
455
  width: "100%",
351
456
  margin: "0",
352
457
  padding: 0
353
458
  },
354
- filterItem: w(u.columns),
355
- selectItem: m.value,
356
- defaultItem: u.defaultColumns,
357
- onSubmit: (s) => {
358
- c.value[a.fullPath] = s, f(c.value), N(), g();
459
+ filterItem: g(a.columns),
460
+ selectItem: p.value,
461
+ defaultItem: a.defaultColumns,
462
+ onSubmit: (b) => {
463
+ const C = f();
464
+ C && (h.value[C] = b, d(h.value)), S(), y();
359
465
  }
360
466
  }, null)
361
467
  }]
@@ -366,35 +472,35 @@ const Oe = {
366
472
  }
367
473
  });
368
474
  }
369
- function y(g) {
370
- if (console.log("onSorter", g), !g) return;
371
- ce(g).forEach((p) => {
372
- var S, F;
373
- console.log("v", p), p != null && p.sorter && ((F = p == null ? void 0 : p.sorter) == null || F.fn((C, $, K) => {
374
- var M;
375
- (M = ae[p.order]) == null || M.fn(C, K), $.fetchData();
475
+ function c(y) {
476
+ if (console.log("onSorter", y), !y) return;
477
+ Oe(y).forEach((C) => {
478
+ var $, B;
479
+ console.log("v", C), C != null && C.sorter && ((B = C == null ? void 0 : C.sorter) == null || B.fn((q, N, U) => {
480
+ var K;
481
+ (K = ye[C.order]) == null || K.fn(q, U), N.fetchData();
376
482
  }, {
377
- field: p == null ? void 0 : p.columnKey,
378
- value: (S = ae[p == null ? void 0 : p.order]) == null ? void 0 : S.value,
379
- isClick: !ze(p)
483
+ field: C == null ? void 0 : C.columnKey,
484
+ value: ($ = ye[C == null ? void 0 : C.order]) == null ? void 0 : $.value,
485
+ isClick: !ve(C)
380
486
  }));
381
- }), i("sorted");
487
+ }), n("sorted");
382
488
  }
383
489
  return l({
384
- filterHandle: h,
385
- filterButton: r,
386
- initColumns: N
387
- }), Fe(() => {
388
- }), (g, s) => {
389
- const p = E("n-empty"), S = E("n-data-table");
390
- return q(), V(S, {
391
- data: n.value,
392
- columns: A.value,
393
- "scroll-x": x.value,
394
- "single-column": u.singleColumn,
395
- summary: u.summaryColumns ? b : void 0,
490
+ filterHandle: w,
491
+ filterButton: u,
492
+ initColumns: S
493
+ }), Be(() => {
494
+ }), (y, b) => {
495
+ const C = Y("n-empty"), $ = Y("n-data-table");
496
+ return T(), H($, {
497
+ data: o.value,
498
+ columns: M.value,
499
+ "scroll-x": A.value,
500
+ "single-column": a.singleColumn,
501
+ summary: a.summaryColumns ? D : void 0,
396
502
  "summary-placement": "bottom",
397
- pagination: u.pagination,
503
+ pagination: a.pagination,
398
504
  "row-props": () => ({
399
505
  style: {
400
506
  height: "60px"
@@ -402,34 +508,38 @@ const Oe = {
402
508
  }),
403
509
  "flex-height": "",
404
510
  remote: "",
405
- "virtual-scroll": u.virtual ?? u.data.length > 1e3,
511
+ "virtual-scroll": a.virtual ?? a.data.length > 1e3,
406
512
  style: {
407
513
  flex: "1"
408
514
  },
409
- "onUpdate:sorter": y
515
+ "onUpdate:sorter": c
410
516
  }, {
411
- empty: B(() => [oe(g.$slots, "empty", {}, () => [d(p, null, {
412
- default: B(() => [L(re(t.emptyText), 1)]),
517
+ empty: R(() => [ge(y.$slots, "empty", {}, () => [s(C, null, {
518
+ default: R(() => [v(he(t.emptyText), 1)]),
413
519
  _: 1
414
520
  })], !0)]),
415
521
  _: 3
416
522
  }, 8, ["data", "columns", "scroll-x", "single-column", "summary", "pagination", "virtual-scroll"]);
417
523
  };
418
524
  }
419
- }, Ut = /* @__PURE__ */ v(Mt, [["__scopeId", "data-v-8fbdfcbb"]]);
420
- let se = null;
421
- function cl(t) {
422
- se = t;
525
+ }, Jt = /* @__PURE__ */ ue(Gt, [["__scopeId", "data-v-d6710561"]]);
526
+ function ql(t) {
527
+ jt({ uploadMethod: t });
423
528
  }
424
- function qt(...t) {
425
- if (typeof se != "function")
426
- throw new TypeError("请先通过 registryUpload(fn) 注册上传实现");
427
- return se(...t);
529
+ function Qt(...t) {
530
+ const l = zt();
531
+ if (typeof l != "function")
532
+ throw new TypeError("请先通过 setupConfig({ uploadMethod: fn }) 或 registryUpload(fn) 注册上传实现");
533
+ return l(...t);
428
534
  }
429
- function R(t, l = null) {
430
- return t && !(t != null && t.startsWith("http")) ? l ? `${xe}${t}?x-oss-process=style/w${l}` : `${xe}${t}` : t;
535
+ function W(t, l = null) {
536
+ if (t && !(t != null && t.startsWith("http"))) {
537
+ const e = Vt();
538
+ return e ? l ? `${e}${t}?x-oss-process=style/w${l}` : `${e}${t}` : (console.warn('BASE_URL 未配置,返回原始 URL。请使用 setupConfig({ baseURL: "..." }) 配置。'), t);
539
+ }
540
+ return t;
431
541
  }
432
- const Et = "/admin/file", Bt = {
542
+ const Xt = "/admin/file", Zt = {
433
543
  __name: "ImagesUpload",
434
544
  props: {
435
545
  value: {
@@ -478,28 +588,28 @@ const Et = "/admin/file", Bt = {
478
588
  setup(t, {
479
589
  emit: l
480
590
  }) {
481
- const e = t, u = l, a = U([]);
482
- W(() => e.value, (o) => {
591
+ const e = t, r = l, a = P([]);
592
+ ee(() => e.value, (o) => {
483
593
  console.log("props.value", o), a.value = e.max === 1 ? o ? typeof o != "string" ? o != null && o.length ? [{
484
- id: T().valueOf(),
485
- name: `img${T().valueOf()}`,
486
- url: R(o[0]),
487
- thumbnailUrl: R(o[0]),
594
+ id: L().valueOf(),
595
+ name: `img${L().valueOf()}`,
596
+ url: W(o[0]),
597
+ thumbnailUrl: W(o[0]),
488
598
  fullPath: o[0],
489
599
  status: "finished"
490
600
  }] : [] : [{
491
- id: T().valueOf(),
492
- name: `img${T().valueOf()}`,
493
- url: R(o),
601
+ id: L().valueOf(),
602
+ name: `img${L().valueOf()}`,
603
+ url: W(o),
494
604
  fullPath: o,
495
- thumbnailUrl: R(o),
605
+ thumbnailUrl: W(o),
496
606
  status: "finished"
497
- }] : [] : (o == null ? void 0 : o.map((c, m) => ({
498
- id: T().valueOf() + m,
499
- name: `img${T().valueOf()}`,
500
- url: R(c),
501
- fullPath: c,
502
- thumbnailUrl: R(c),
607
+ }] : [] : (o == null ? void 0 : o.map((d, m) => ({
608
+ id: L().valueOf() + m,
609
+ name: `img${L().valueOf()}`,
610
+ url: W(d),
611
+ fullPath: d,
612
+ thumbnailUrl: W(d),
503
613
  status: "finished"
504
614
  }))) || [], console.log("1", a.value);
505
615
  }, {
@@ -510,27 +620,27 @@ const Et = "/admin/file", Bt = {
510
620
  }
511
621
  async function n({
512
622
  file: o,
513
- onFinish: c,
623
+ onFinish: d,
514
624
  onError: m,
515
- onProgress: x
516
- }, b) {
625
+ onProgress: h
626
+ }, p) {
517
627
  const A = new FormData();
518
- o.status === "pending" && (A.append("file", o.file), e.formData && Object.keys(e.formData).length && Object.keys(e.formData).forEach((N) => {
519
- A.append(N, e.formData[N]);
520
- }), qt({
521
- url: Et,
628
+ o.status === "pending" && (A.append("file", o.file), e.formData && Object.keys(e.formData).length && Object.keys(e.formData).forEach((D) => {
629
+ A.append(D, e.formData[D]);
630
+ }), Qt({
631
+ url: Xt,
522
632
  data: A,
523
633
  method: "post",
524
634
  onUploadProgress: ({
525
- percent: N
526
- }) => x({
527
- percent: N
635
+ percent: D
636
+ }) => h({
637
+ percent: D
528
638
  })
529
- }).then((N) => {
639
+ }).then((D) => {
530
640
  const {
531
- url: r
532
- } = N.data;
533
- o.url = R(r), o.fullPath = r, o.thumbnailUrl = R(r), c(), f();
641
+ url: M
642
+ } = D.data;
643
+ o.url = W(M), o.fullPath = M, o.thumbnailUrl = W(M), d(), f();
534
644
  }).catch(() => {
535
645
  o = null, m();
536
646
  }).finally(() => {
@@ -538,18 +648,18 @@ const Et = "/admin/file", Bt = {
538
648
  }
539
649
  function f() {
540
650
  console.log("onSubmit", a.value);
541
- const o = a.value.reduce((c, m) => (m.status === "finished" && (m != null && m.fullPath) && c.push(m.fullPath), c), []);
542
- e.max === 1 && o.length === 1 ? u("update:value", o[0]) : o.length ? u("update:value", o) : u("update:value", e.max === 1 ? null : []);
651
+ const o = a.value.reduce((d, m) => (m.status === "finished" && (m != null && m.fullPath) && d.push(m.fullPath), d), []);
652
+ e.max === 1 && o.length === 1 ? r("update:value", o[0]) : o.length ? r("update:value", o) : r("update:value", e.max === 1 ? null : []);
543
653
  }
544
- return (o, c) => {
545
- const m = E("n-upload"), x = E("n-space");
546
- return q(), V(x, {
654
+ return (o, d) => {
655
+ const m = Y("n-upload"), h = Y("n-space");
656
+ return T(), H(h, {
547
657
  align: "end",
548
658
  "wrap-item": !1
549
659
  }, {
550
- default: B(() => [d(m, {
660
+ default: R(() => [s(m, {
551
661
  "file-list": a.value,
552
- "onUpdate:fileList": c[0] || (c[0] = (b) => a.value = b),
662
+ "onUpdate:fileList": d[0] || (d[0] = (p) => a.value = p),
553
663
  accept: ".jpeg,.jpg,.png",
554
664
  "list-type": "image-card",
555
665
  "custom-request": i,
@@ -557,7 +667,7 @@ const Et = "/admin/file", Bt = {
557
667
  "show-retry-button": !1,
558
668
  "show-remove-button": !e.read,
559
669
  class: "upload-box",
560
- style: De({
670
+ style: Te({
561
671
  ...e.size ? {
562
672
  "--image-w": `${e.size}px`,
563
673
  "--image-h": `${e.size}px`
@@ -567,53 +677,53 @@ const Et = "/admin/file", Bt = {
567
677
  },
568
678
  "--image-mode": e.mode
569
679
  }),
570
- onFinish: c[1] || (c[1] = () => {
571
- f(), u("complete");
680
+ onFinish: d[1] || (d[1] = () => {
681
+ f(), r("complete");
572
682
  }),
573
- onRemove: c[2] || (c[2] = (b, A) => (a.value.splice(A, 1), f(), !1))
683
+ onRemove: d[2] || (d[2] = (p, A) => (a.value.splice(A, 1), f(), !1))
574
684
  }, null, 8, ["file-list", "max", "show-remove-button", "style"])]),
575
685
  _: 1
576
686
  });
577
687
  };
578
688
  }
579
- }, Yt = /* @__PURE__ */ v(Bt, [["__scopeId", "data-v-54e2cc87"]]);
580
- function Ne(t = [], { labelField: l = P, valueField: e = Y } = {
581
- labelField: P,
582
- valueField: Y
689
+ }, vt = /* @__PURE__ */ ue(Zt, [["__scopeId", "data-v-54e2cc87"]]);
690
+ function $e(t = [], { labelField: l = j, valueField: e = k } = {
691
+ labelField: j,
692
+ valueField: k
583
693
  }) {
584
- return w(t).reduce((u, a) => (u[a[e]] = {
694
+ return g(t).reduce((r, a) => (r[a[e]] = {
585
695
  ...a,
586
696
  [l]: a[l],
587
697
  [e]: a[e]
588
- }, u), {});
698
+ }, r), {});
589
699
  }
590
- function ce(t) {
700
+ function Oe(t) {
591
701
  return Array.isArray(t) ? t : [t];
592
702
  }
593
- function Se(t, l = "YYYY-MM-DD", e = { emptyText: "" }) {
594
- return t ? T(Number.isNaN(Number(t)) ? t : Number(t)).format(l) : (e == null ? void 0 : e.emptyText) || "";
703
+ function Pe(t, l = "YYYY-MM-DD", e = { emptyText: "" }) {
704
+ return t ? L(Number.isNaN(Number(t)) ? t : Number(t)).format(l) : (e == null ? void 0 : e.emptyText) || "";
595
705
  }
596
- function Tt(t) {
597
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !H(t);
706
+ function el(t) {
707
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !te(t);
598
708
  }
599
- const Pt = {
709
+ const tl = {
600
710
  input: ({
601
711
  label: t,
602
712
  key: l,
603
713
  props: e,
604
- readProps: u,
714
+ readProps: r,
605
715
  format: a = null,
606
716
  read: i
607
717
  }, {
608
718
  _value: n,
609
719
  _isRead: f
610
- }) => i ?? f ? d(dt, u, {
611
- default: () => [a ? a == null ? void 0 : a(w(n)[l], w(n)) : w(n)[l]]
612
- }) : d(pe, I({
720
+ }) => i ?? f ? s(Ct, r, {
721
+ default: () => [a ? a == null ? void 0 : a(g(n)[l], g(n)) : g(n)[l]]
722
+ }) : s(Se, I({
613
723
  value: n[l],
614
724
  "onUpdate:value": (o) => n[l] = o,
615
725
  clearable: !0,
616
- placeholder: `请输入${w(t)}`
726
+ placeholder: `请输入${g(t)}`
617
727
  }, e), {
618
728
  ...(e == null ? void 0 : e.slots) || {}
619
729
  }),
@@ -621,7 +731,7 @@ const Pt = {
621
731
  label: t,
622
732
  key: l,
623
733
  props: e,
624
- options: u = [],
734
+ options: r = [],
625
735
  loading: a = !1,
626
736
  format: i = null,
627
737
  read: n
@@ -629,19 +739,19 @@ const Pt = {
629
739
  _value: f,
630
740
  _isRead: o
631
741
  }) => {
632
- var m, x;
633
- const c = (Array.isArray(w(u)) ? w(u) : u == null ? void 0 : u(f[l])) || [];
634
- return n ?? o ? d("div", null, [i ? i == null ? void 0 : i(f[l], c) : (x = (m = Ne(c, (e == null ? void 0 : e.labelField) || P, (e == null ? void 0 : e.valueField) || Y)) == null ? void 0 : m[f[l]]) == null ? void 0 : x[(e == null ? void 0 : e.labelField) || P]]) : d(ct, I({
742
+ var m, h;
743
+ const d = (Array.isArray(g(r)) ? g(r) : r == null ? void 0 : r(f[l])) || [];
744
+ return n ?? o ? s("div", null, [i ? i == null ? void 0 : i(f[l], d) : (h = (m = $e(d, (e == null ? void 0 : e.labelField) || j, (e == null ? void 0 : e.valueField) || k)) == null ? void 0 : m[f[l]]) == null ? void 0 : h[(e == null ? void 0 : e.labelField) || j]]) : s(Ot, I({
635
745
  value: f[l],
636
- "onUpdate:value": (b) => f[l] = b,
637
- options: c,
638
- loading: w(a),
746
+ "onUpdate:value": (p) => f[l] = p,
747
+ options: d,
748
+ loading: g(a),
639
749
  clearable: !0,
640
750
  filterable: !0,
641
751
  "fallback-option": () => (e != null && e.asyncFallback || (f[l] = null), !1),
642
- labelField: (e == null ? void 0 : e.labelField) || P,
643
- valueField: (e == null ? void 0 : e.valueField) || Y,
644
- placeholder: `请选择${w(t)}`,
752
+ labelField: (e == null ? void 0 : e.labelField) || j,
753
+ valueField: (e == null ? void 0 : e.valueField) || k,
754
+ placeholder: `请选择${g(t)}`,
645
755
  style: "width:100%",
646
756
  "max-tag-count": "responsive"
647
757
  }, e), {
@@ -652,21 +762,21 @@ const Pt = {
652
762
  label: t,
653
763
  key: l,
654
764
  props: e,
655
- formatTime: u = "YYYY-MM-DD",
765
+ formatTime: r = "YYYY-MM-DD",
656
766
  type: a = "date",
657
767
  format: i,
658
768
  read: n
659
769
  }, {
660
770
  _value: f,
661
771
  _isRead: o
662
- }) => n ?? o ? d("div", null, [i ? i == null ? void 0 : i(f[l]) : Se(f[l], u)]) : d(be, I({
772
+ }) => n ?? o ? s("div", null, [i ? i == null ? void 0 : i(f[l]) : Pe(f[l], r)]) : s(Ie, I({
663
773
  "formatted-value": f[l],
664
- "onUpdate:formatted-value": (c) => {
665
- f[l] = c;
774
+ "onUpdate:formatted-value": (d) => {
775
+ f[l] = d;
666
776
  },
667
777
  type: a,
668
778
  clearable: !0,
669
- placeholder: `请选择${w(t)}`,
779
+ placeholder: `请选择${g(t)}`,
670
780
  "update-value-on-close": !["year"].includes(e == null ? void 0 : e.type),
671
781
  style: "width:100%"
672
782
  }, e), {
@@ -676,21 +786,21 @@ const Pt = {
676
786
  label: t,
677
787
  key: l,
678
788
  props: e,
679
- format: u,
789
+ format: r,
680
790
  formatTime: a = "YYYY-MM-DD",
681
791
  read: i
682
792
  }, {
683
793
  _value: n,
684
794
  _isRead: f
685
- }) => i ?? f ? d("div", null, [u ? u == null ? void 0 : u(n[l]) : Se(n[l], a)]) : d(ft, I({
795
+ }) => i ?? f ? s("div", null, [r ? r == null ? void 0 : r(n[l]) : Pe(n[l], a)]) : s(xt, I({
686
796
  "formatted-value": n[l],
687
- "onUpdate:value": (o, c) => {
688
- console.log("v", c), n[l] = c;
797
+ "onUpdate:value": (o, d) => {
798
+ console.log("v", d), n[l] = d;
689
799
  },
690
800
  clearable: !0,
691
801
  format: "HH:mm:ss",
692
802
  style: "width:100%",
693
- placeholder: `请选择${w(t)}`
803
+ placeholder: `请选择${g(t)}`
694
804
  }, e), {
695
805
  ...(e == null ? void 0 : e.slots) || {}
696
806
  }),
@@ -698,23 +808,23 @@ const Pt = {
698
808
  key: t,
699
809
  props: l,
700
810
  type: e = "datetimerange",
701
- read: u
811
+ read: r
702
812
  }, {
703
813
  _value: a,
704
814
  _isRead: i
705
815
  }) => {
706
- var o, c;
816
+ var o, d;
707
817
  const n = {
708
818
  date: "YYYY-MM-DD",
709
819
  datetime: "YYYY-MM-DD HH:mm:ss",
710
820
  time: "HH:mm:ss",
711
821
  datetimerange: "YYYY-MM-DD HH:mm:ss",
712
822
  daterange: "YYYY-MM-DD"
713
- }, f = l != null && l.format ? (c = (o = l == null ? void 0 : l.format) == null ? void 0 : o.replace("yyyy", "YYYY")) == null ? void 0 : c.replace("dd", "DD") : n[(l == null ? void 0 : l.type) || e];
714
- return console.log("formatStr type", e), console.log("formatStr", f), u ?? i ? d("div", null, [Array.isArray(t) ? `${a == null ? void 0 : a[t == null ? void 0 : t[0]]} - ${a == null ? void 0 : a[t == null ? void 0 : t[1]]}` : a == null ? void 0 : a[t]]) : d(be, I({
715
- "formatted-value": Array.isArray(t) ? a != null && a[t == null ? void 0 : t[0]] && (a != null && a[t == null ? void 0 : t[1]]) ? [T(a == null ? void 0 : a[t == null ? void 0 : t[0]]).format(f), T(a == null ? void 0 : a[t == null ? void 0 : t[1]]).format(f)] : null : (a == null ? void 0 : a[t]) || null,
823
+ }, f = l != null && l.format ? (d = (o = l == null ? void 0 : l.format) == null ? void 0 : o.replace("yyyy", "YYYY")) == null ? void 0 : d.replace("dd", "DD") : n[(l == null ? void 0 : l.type) || e];
824
+ return console.log("formatStr type", e), console.log("formatStr", f), r ?? i ? s("div", null, [Array.isArray(t) ? `${a == null ? void 0 : a[t == null ? void 0 : t[0]]} - ${a == null ? void 0 : a[t == null ? void 0 : t[1]]}` : a == null ? void 0 : a[t]]) : s(Ie, I({
825
+ "formatted-value": Array.isArray(t) ? a != null && a[t == null ? void 0 : t[0]] && (a != null && a[t == null ? void 0 : t[1]]) ? [L(a == null ? void 0 : a[t == null ? void 0 : t[0]]).format(f), L(a == null ? void 0 : a[t == null ? void 0 : t[1]]).format(f)] : null : (a == null ? void 0 : a[t]) || null,
716
826
  "onUpdate:formatted-value": (m) => {
717
- console.log(m), m && ![n.datetime, n.datetimerange].includes(f) && (m = m.map((x, b) => T(x, f)[b ? "endOf" : "startOf"]("day").format(f))), Array.isArray(t) ? (a[t == null ? void 0 : t[0]] = m == null ? void 0 : m[0], a[t == null ? void 0 : t[1]] = m == null ? void 0 : m[1]) : a[t] = m;
827
+ console.log(m), m && ![n.datetime, n.datetimerange].includes(f) && (m = m.map((h, p) => L(h, f)[p ? "endOf" : "startOf"]("day").format(f))), Array.isArray(t) ? (a[t == null ? void 0 : t[0]] = m == null ? void 0 : m[0], a[t == null ? void 0 : t[1]] = m == null ? void 0 : m[1]) : a[t] = m;
718
828
  },
719
829
  "update-value-on-close": !["year", "month"].includes(l == null ? void 0 : l.type),
720
830
  type: e,
@@ -728,7 +838,7 @@ const Pt = {
728
838
  key: t,
729
839
  options: l = [],
730
840
  props: e,
731
- radioLabelProps: u,
841
+ radioLabelProps: r,
732
842
  read: a
733
843
  }, {
734
844
  _value: i,
@@ -736,24 +846,24 @@ const Pt = {
736
846
  labelField: f,
737
847
  valueField: o
738
848
  }) => {
739
- var c, m;
740
- return a ?? n ? d("div", null, [(m = (c = Ne(l, (e == null ? void 0 : e.labelField) || f, (e == null ? void 0 : e.valueField) || o)) == null ? void 0 : c[i[t]]) == null ? void 0 : m[(e == null ? void 0 : e.labelField) || f]]) : d(it, I({
849
+ var d, m;
850
+ return a ?? n ? s("div", null, [(m = (d = $e(l, (e == null ? void 0 : e.labelField) || f, (e == null ? void 0 : e.valueField) || o)) == null ? void 0 : d[i[t]]) == null ? void 0 : m[(e == null ? void 0 : e.labelField) || f]]) : s(bt, I({
741
851
  style: {
742
852
  width: "100%"
743
853
  },
744
854
  value: i[t],
745
- "onUpdate:value": (x) => i[t] = x
855
+ "onUpdate:value": (h) => i[t] = h
746
856
  }, e), {
747
857
  ...(e == null ? void 0 : e.slots) || {},
748
- default: () => d(k, I({
858
+ default: () => s(z, I({
749
859
  "item-wrap": !1
750
860
  }, (e == null ? void 0 : e.radioProps) || {}), {
751
- default: () => [l == null ? void 0 : l.map((x) => d(st, {
752
- key: x.value,
753
- value: x == null ? void 0 : x[(e == null ? void 0 : e.valueField) || o],
861
+ default: () => [l == null ? void 0 : l.map((h) => s(wt, {
862
+ key: h.value,
863
+ value: h == null ? void 0 : h[(e == null ? void 0 : e.valueField) || o],
754
864
  class: "items-center"
755
865
  }, {
756
- default: () => [d("div", (u == null ? void 0 : u(x)) || {}, [x == null ? void 0 : x[(e == null ? void 0 : e.labelField) || f]])]
866
+ default: () => [s("div", (r == null ? void 0 : r(h)) || {}, [h == null ? void 0 : h[(e == null ? void 0 : e.labelField) || f]])]
757
867
  }))]
758
868
  })
759
869
  });
@@ -762,17 +872,17 @@ const Pt = {
762
872
  label: t,
763
873
  key: l,
764
874
  props: e,
765
- read: u
875
+ read: r
766
876
  }, {
767
877
  _value: a,
768
878
  _isRead: i
769
- }) => u ?? i ? d("div", null, [a[l]]) : d(pe, I({
879
+ }) => r ?? i ? s("div", null, [a[l]]) : s(Se, I({
770
880
  value: a[l],
771
881
  "onUpdate:value": (n) => a[l] = n,
772
882
  clearable: !0,
773
883
  style: "width:100%",
774
884
  "allow-input": (n) => !n || /^\d$/.test(n) || n.length <= 11,
775
- placeholder: `请输入${w(t)}`
885
+ placeholder: `请输入${g(t)}`
776
886
  }, e), {
777
887
  ...e == null ? void 0 : e.slots
778
888
  }),
@@ -780,11 +890,11 @@ const Pt = {
780
890
  label: t,
781
891
  key: l,
782
892
  props: e,
783
- read: u
893
+ read: r
784
894
  }, {
785
895
  _value: a,
786
896
  _isRead: i
787
- }) => u ?? i ? d("div", null, [a[l]]) : d(ot, I({
897
+ }) => r ?? i ? s("div", null, [a[l]]) : s(pt, I({
788
898
  value: typeof a[l] == "string" && a[l] ? Number(a[l]) : a[l],
789
899
  "onUpdate:value": (n) => {
790
900
  a[l] = n;
@@ -792,7 +902,7 @@ const Pt = {
792
902
  showButton: !1,
793
903
  clearable: !0,
794
904
  style: "width:100%",
795
- placeholder: `请输入${w(t)}`,
905
+ placeholder: `请输入${g(t)}`,
796
906
  min: 0
797
907
  }, e), {
798
908
  ...(e == null ? void 0 : e.slots) || {}
@@ -802,25 +912,25 @@ const Pt = {
802
912
  props: l
803
913
  }, {
804
914
  _value: e
805
- }) => d(at, I({
915
+ }) => s(mt, I({
806
916
  multiple: !0,
807
917
  max: 1,
808
918
  accept: ".xls,.xlsx",
809
919
  "file-list": e[t],
810
- "onUpdate:file-list": (u) => e[t] = u
920
+ "onUpdate:file-list": (r) => e[t] = r
811
921
  }, l), {
812
- default: () => [d(ut, null, {
813
- default: () => [d("div", {
922
+ default: () => [s(ht, null, {
923
+ default: () => [s("div", {
814
924
  style: "margin-bottom: 12px"
815
- }, [d(Me, {
925
+ }, [s(_e, {
816
926
  size: "48",
817
927
  depth: 3
818
928
  }, {
819
- default: () => [d(E("ArchiveOutline"), null, null)]
820
- })]), d(rt, {
929
+ default: () => [s(Y("ArchiveOutline"), null, null)]
930
+ })]), s(gt, {
821
931
  style: "font-size: 16px"
822
932
  }, {
823
- default: () => [L("点击或者拖动文件到该区域来上传")]
933
+ default: () => [v("点击或者拖动文件到该区域来上传")]
824
934
  })]
825
935
  })]
826
936
  }),
@@ -828,7 +938,7 @@ const Pt = {
828
938
  key: t,
829
939
  loading: l = !1,
830
940
  props: e,
831
- options: u,
941
+ options: r,
832
942
  opr: a,
833
943
  pageState: i
834
944
  }, {
@@ -836,9 +946,9 @@ const Pt = {
836
946
  _isRead: f
837
947
  }) => {
838
948
  var o;
839
- return console.log(l), console.log(i), d(Ut, I({
949
+ return console.log(l), console.log(i), s(Jt, I({
840
950
  data: (o = i == null ? void 0 : i.data) != null && o.length ? i.data : n[t],
841
- columns: w(u),
951
+ columns: g(r),
842
952
  maxHeight: 200,
843
953
  minHeight: 200,
844
954
  "is-ellipsis": !1,
@@ -851,35 +961,35 @@ const Pt = {
851
961
  props: l
852
962
  }, {
853
963
  _value: e
854
- }) => d(nt, I({
964
+ }) => s(yt, I({
855
965
  percentage: e[t]
856
966
  }, l), null),
857
- line: () => d(lt, null, null),
967
+ line: () => s(dt, null, null),
858
968
  image: ({
859
969
  key: t,
860
970
  props: l,
861
971
  read: e
862
972
  }, {
863
- _isRead: u,
973
+ _isRead: r,
864
974
  _value: a
865
- }) => d(Yt, I({
975
+ }) => s(vt, I({
866
976
  value: a[t],
867
977
  "onUpdate:value": (i) => a[t] = i,
868
978
  max: 1
869
979
  }, l, {
870
- read: e ?? u
980
+ read: e ?? r
871
981
  }), null),
872
982
  button: ({
873
983
  onClick: t,
874
984
  props: l,
875
985
  text: e
876
986
  }, {
877
- _value: u
878
- }) => d(z, I({
987
+ _value: r
988
+ }) => s(Q, I({
879
989
  type: "info"
880
990
  }, l, {
881
- onClick: () => l != null && l.onClick ? l == null ? void 0 : l.onClick(w(u)) : t(w(u))
882
- }), Tt(e) ? e : {
991
+ onClick: () => l != null && l.onClick ? l == null ? void 0 : l.onClick(g(r)) : t(g(r))
992
+ }), el(e) ? e : {
883
993
  default: () => [e]
884
994
  }),
885
995
  switch: ({
@@ -887,9 +997,9 @@ const Pt = {
887
997
  props: l,
888
998
  read: e
889
999
  }, {
890
- _isRead: u,
1000
+ _isRead: r,
891
1001
  _value: a
892
- }) => e ?? u ? d("div", null, [a[t] ? "是" : "否"]) : d(tt, I({
1002
+ }) => e ?? r ? s("div", null, [a[t] ? "是" : "否"]) : s(ct, I({
893
1003
  value: a[t],
894
1004
  "onUpdate:value": (i) => a[t] = i
895
1005
  }, l), {
@@ -899,33 +1009,33 @@ const Pt = {
899
1009
  key: t,
900
1010
  options: l = [],
901
1011
  props: e,
902
- read: u
1012
+ read: r
903
1013
  }, {
904
1014
  _value: a,
905
1015
  _isRead: i,
906
1016
  labelField: n,
907
1017
  valueField: f
908
1018
  }) => {
909
- var o, c, m;
910
- return u ?? i ? d("div", null, [(m = (c = (o = w(l)) == null ? void 0 : o.filter((x) => {
911
- var b;
912
- return (b = w(a)[t]) == null ? void 0 : b.includes(x[(e == null ? void 0 : e.valueField) || f || Y]);
913
- })) == null ? void 0 : c.map((x) => x[[(e == null ? void 0 : e.labelField) || n || P]])) == null ? void 0 : m.join("、")]) : d(ve, I({
1019
+ var o, d, m;
1020
+ return r ?? i ? s("div", null, [(m = (d = (o = g(l)) == null ? void 0 : o.filter((h) => {
1021
+ var p;
1022
+ return (p = g(a)[t]) == null ? void 0 : p.includes(h[(e == null ? void 0 : e.valueField) || f || k]);
1023
+ })) == null ? void 0 : d.map((h) => h[[(e == null ? void 0 : e.labelField) || n || j]])) == null ? void 0 : m.join("、")]) : s(st, I({
914
1024
  value: a[t],
915
- "onUpdate:value": (x) => a[t] = x,
1025
+ "onUpdate:value": (h) => a[t] = h,
916
1026
  style: {
917
1027
  width: "100%"
918
1028
  }
919
1029
  }, e), {
920
1030
  ...(e == null ? void 0 : e.slots) || {},
921
- default: () => d(k, (e == null ? void 0 : e.checkBoxProps) || {}, {
1031
+ default: () => s(z, (e == null ? void 0 : e.checkBoxProps) || {}, {
922
1032
  default: () => {
923
- var x;
924
- return [(x = w(l)) == null ? void 0 : x.map((b) => d(et, {
925
- key: b == null ? void 0 : b[(e == null ? void 0 : e.valueField) || f || Y],
926
- value: b == null ? void 0 : b[(e == null ? void 0 : e.valueField) || f || Y]
1033
+ var h;
1034
+ return [(h = g(l)) == null ? void 0 : h.map((p) => s(ft, {
1035
+ key: p == null ? void 0 : p[(e == null ? void 0 : e.valueField) || f || k],
1036
+ value: p == null ? void 0 : p[(e == null ? void 0 : e.valueField) || f || k]
927
1037
  }, {
928
- default: () => [b == null ? void 0 : b[(e == null ? void 0 : e.labelField) || n || P]]
1038
+ default: () => [p == null ? void 0 : p[(e == null ? void 0 : e.labelField) || n || j]]
929
1039
  }))];
930
1040
  }
931
1041
  })
@@ -936,20 +1046,20 @@ const Pt = {
936
1046
  props: l,
937
1047
  options: e
938
1048
  }, {
939
- _value: u
940
- }) => d(E("FilterSelect"), I({
941
- value: u[t],
942
- "onUpdate:value": (a) => u[t] = a,
1049
+ _value: r
1050
+ }) => s(Y("FilterSelect"), I({
1051
+ value: r[t],
1052
+ "onUpdate:value": (a) => r[t] = a,
943
1053
  option: e,
944
1054
  clearable: !0,
945
1055
  filterButtonKey: ["all", "selectDefault"]
946
1056
  }, l), null)
947
1057
  };
948
- let j = {};
949
- class _t {
1058
+ let G = {};
1059
+ class ll {
950
1060
  constructor() {
951
- ne(this, "defaultMap", null);
952
- ne(this, "extendOptions", null);
1061
+ ce(this, "defaultMap", null);
1062
+ ce(this, "extendOptions", null);
953
1063
  console.log("DefaultOptions init"), this.defaultMap = null, this.init();
954
1064
  }
955
1065
  set(l, e) {
@@ -962,21 +1072,21 @@ class _t {
962
1072
  this.defaultMap.clear();
963
1073
  }
964
1074
  setupOptions(l, e) {
965
- const u = this.defaultMap.size > 0 ? [...this.defaultMap.keys()] : [];
966
- if (this.defaultMap.has(l)) return console.error(`${l} 已存在,不能使用${u == null ? void 0 : u.join("、")}`);
1075
+ const r = this.defaultMap.size > 0 ? [...this.defaultMap.keys()] : [];
1076
+ if (this.defaultMap.has(l)) return console.error(`${l} 已存在,不能使用${r == null ? void 0 : r.join("、")}`);
967
1077
  this.defaultMap.set(l, e);
968
1078
  }
969
1079
  setupExtendOptions(l, e) {
970
- j || (j = {}), j != null && j[l] || (j[l] = e);
1080
+ G || (G = {}), G != null && G[l] || (G[l] = e);
971
1081
  }
972
1082
  getAllOptions() {
973
1083
  const l = {};
974
- return this.defaultMap.forEach((e, u) => {
975
- l[u] = e;
1084
+ return this.defaultMap.forEach((e, r) => {
1085
+ l[r] = e;
976
1086
  }), l;
977
1087
  }
978
1088
  getOptions(l = []) {
979
- return console.log("getOptions", this.defaultMap), l.reduce((u, a) => (this.defaultMap.has(a) && (u[a] = this.defaultMap.get(a)), u), {});
1089
+ return console.log("getOptions", this.defaultMap), l.reduce((r, a) => (this.defaultMap.has(a) && (r[a] = this.defaultMap.get(a)), r), {});
980
1090
  }
981
1091
  initOptions(l = []) {
982
1092
  Object.keys(l).forEach((e) => {
@@ -984,20 +1094,20 @@ class _t {
984
1094
  });
985
1095
  }
986
1096
  initSetup(l) {
987
- this.defaultMap && this.clear(), this.defaultMap = /* @__PURE__ */ new Map(), this.initOptions(Pt), l && l(), this.initOptions(j);
1097
+ this.defaultMap && this.clear(), this.defaultMap = /* @__PURE__ */ new Map(), this.initOptions(tl), l && l(), this.initOptions(G);
988
1098
  }
989
1099
  init(l) {
990
1100
  this.initSetup(l);
991
1101
  }
992
1102
  }
993
- const de = new _t(), Ee = (...t) => de.getOptions(...t);
994
- function dl(...t) {
995
- return de.getAllOptions(...t);
1103
+ const Ce = new ll(), Ve = (...t) => Ce.getOptions(...t);
1104
+ function El(...t) {
1105
+ return Ce.getAllOptions(...t);
996
1106
  }
997
- function yl(...t) {
998
- return de.setupExtendOptions(...t);
1107
+ function Bl(...t) {
1108
+ return Ce.setupExtendOptions(...t);
999
1109
  }
1000
- const kt = ["xlink:href", "fill"], Rt = /* @__PURE__ */ Q({
1110
+ const nl = ["xlink:href", "fill"], al = /* @__PURE__ */ re({
1001
1111
  __name: "SvgIcon",
1002
1112
  props: {
1003
1113
  name: {
@@ -1011,150 +1121,158 @@ const kt = ["xlink:href", "fill"], Rt = /* @__PURE__ */ Q({
1011
1121
  },
1012
1122
  setup(t) {
1013
1123
  const l = t, e = _(() => `#svg-${l.name}`);
1014
- return (u, a) => (q(), G("svg", I({ class: "svg-icon" }, u.$attrs, {
1124
+ return (r, a) => (T(), le("svg", I({ class: "svg-icon" }, r.$attrs, {
1015
1125
  style: { color: t.color },
1016
1126
  "aria-hidden": ""
1017
1127
  }), [
1018
- fe("use", {
1128
+ we("use", {
1019
1129
  "xlink:href": e.value,
1020
1130
  fill: t.color
1021
- }, null, 8, kt)
1131
+ }, null, 8, nl)
1022
1132
  ], 16));
1023
1133
  }
1024
- }), Vt = /* @__PURE__ */ v(Rt, [["__scopeId", "data-v-9dbe5f10"]]);
1025
- function jt(t) {
1026
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !H(t);
1134
+ }), rl = /* @__PURE__ */ ue(al, [["__scopeId", "data-v-9dbe5f10"]]);
1135
+ function ul(t) {
1136
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !te(t);
1027
1137
  }
1028
- const zt = /* @__PURE__ */ Q((t, {
1138
+ const il = /* @__PURE__ */ re((t, {
1029
1139
  emit: l
1030
1140
  }) => {
1031
- const e = U(t.value), u = _(() => t.read || !1);
1032
- let a = t.formRef;
1033
- W(() => t.formRef, (r) => a = r);
1034
- const i = _(() => t.option);
1035
- function n(r) {
1036
- return r.reduce((h, y) => {
1037
- h.push((y == null ? void 0 : y.way) ?? "input");
1038
- const g = [y == null ? void 0 : y.default, y == null ? void 0 : y.suffix, y == null ? void 0 : y.prefix].reduce((s, p) => {
1039
- var S;
1040
- return Array.isArray(p) ? s = s.concat(p) : p && ((S = Object.keys(p)) != null && S.length) && s.push(p), s;
1141
+ var S;
1142
+ const e = oe();
1143
+ if ((S = e == null ? void 0 : e.appContext) != null && S.app)
1144
+ X(e.appContext.app);
1145
+ else {
1146
+ const u = Ht();
1147
+ u && X(u);
1148
+ }
1149
+ const r = P(t.value), a = _(() => t.read || !1);
1150
+ let i = t.formRef;
1151
+ ee(() => t.formRef, (u) => i = u);
1152
+ const n = _(() => t.option);
1153
+ function f(u) {
1154
+ return u.reduce((w, c) => {
1155
+ w.push((c == null ? void 0 : c.way) ?? "input");
1156
+ const x = [c == null ? void 0 : c.default, c == null ? void 0 : c.suffix, c == null ? void 0 : c.prefix].reduce((y, b) => {
1157
+ var C;
1158
+ return Array.isArray(b) ? y = y.concat(b) : b && ((C = Object.keys(b)) != null && C.length) && y.push(b), y;
1041
1159
  }, []);
1042
- return console.log(g), g.length && g.forEach((s) => h.push((s == null ? void 0 : s.way) ?? "input")), h;
1160
+ return console.log(x), x.length && x.forEach((y) => w.push((y == null ? void 0 : y.way) ?? "input")), w;
1043
1161
  }, []);
1044
1162
  }
1045
- const f = _(() => [...new Set(n(t.option))]), o = Ee(f.value);
1046
- console.log(t.option), console.log("defaultOption", o, f.value), W(() => e.value, (r) => {
1047
- l("update:value", r);
1163
+ const o = _(() => [...new Set(f(t.option))]), d = Ve(o.value);
1164
+ console.log(t.option), console.log("defaultOption", d, o.value), ee(() => r.value, (u) => {
1165
+ l("update:value", u);
1048
1166
  }, {
1049
1167
  immediate: !0
1050
1168
  });
1051
- function c(r) {
1052
- let h = {};
1053
- const y = typeof r;
1054
- let g = null;
1169
+ function m(u) {
1170
+ let w = {};
1171
+ const c = typeof u;
1172
+ let x = null;
1055
1173
  try {
1056
- return r ? y === "string" || y === "object" ? g = r : y === "function" && (g = r(w(e), {
1057
- formRef: a,
1174
+ return u ? c === "string" || c === "object" ? x = u : c === "function" && (x = u(g(r), {
1175
+ formRef: i,
1058
1176
  resetForm: () => {
1059
- var s;
1060
- return (s = a == null ? void 0 : a.value) == null ? void 0 : s.restoreValidation();
1177
+ var y;
1178
+ return (y = i == null ? void 0 : i.value) == null ? void 0 : y.restoreValidation();
1061
1179
  },
1062
1180
  close: () => t.cancel(),
1063
- setValue: m
1064
- })) : g = r, typeof g == "object" && !Array.isArray(g) ? Object.keys(g).forEach((s) => {
1065
- const p = g[s];
1066
- We(p) ? h[s] = w(p) : h[s] = p;
1067
- }) : h = g, h;
1181
+ setValue: h
1182
+ })) : x = u, typeof x == "object" && !Array.isArray(x) ? Object.keys(x).forEach((y) => {
1183
+ const b = x[y];
1184
+ lt(b) ? w[y] = g(b) : w[y] = b;
1185
+ }) : w = x, w;
1068
1186
  } catch {
1069
1187
  return {};
1070
1188
  }
1071
1189
  }
1072
- W(() => t.value, (r) => {
1073
- console.log(r), e.value = r;
1190
+ ee(() => t.value, (u) => {
1191
+ console.log(u), r.value = u;
1074
1192
  }, {
1075
1193
  immediate: !0
1076
1194
  });
1077
- function m(r) {
1078
- e.value = r;
1195
+ function h(u) {
1196
+ r.value = u;
1079
1197
  }
1080
- function x(r) {
1081
- return d(k, I({
1198
+ function p(u) {
1199
+ return s(z, I({
1082
1200
  "wrap-item": !1,
1083
- wrap: !!(r != null && r.isWrap),
1201
+ wrap: !!(u != null && u.isWrap),
1084
1202
  align: "center",
1085
1203
  style: {
1086
1204
  width: "100%"
1087
1205
  }
1088
- }, (r == null ? void 0 : r.contentProps) || {}), {
1089
- default: () => [b(r == null ? void 0 : r.prefix), b((r == null ? void 0 : r.default) || r), b(r == null ? void 0 : r.suffix)]
1206
+ }, (u == null ? void 0 : u.contentProps) || {}), {
1207
+ default: () => [A(u == null ? void 0 : u.prefix), A((u == null ? void 0 : u.default) || u), A(u == null ? void 0 : u.suffix)]
1090
1208
  });
1091
1209
  }
1092
- function b(r) {
1093
- if (!r) return;
1094
- let h = r;
1095
- if (typeof r == "function" && (h = c(r)), h = c(h), H(h))
1096
- return console.log("??? isVNode"), h;
1097
- if (typeof h == "string")
1098
- return console.log("??? string"), h;
1099
- if (Array.isArray(h))
1100
- return console.log("???"), d(Z, null, [h.map((y, g) => d(N, {
1101
- item: y,
1102
- index: g
1210
+ function A(u) {
1211
+ if (!u) return;
1212
+ let w = u;
1213
+ if (typeof u == "function" && (w = m(u)), w = m(w), te(w))
1214
+ return console.log("??? isVNode"), w;
1215
+ if (typeof w == "string")
1216
+ return console.log("??? string"), w;
1217
+ if (Array.isArray(w))
1218
+ return console.log("???"), s(ae, null, [w.map((c, x) => s(M, {
1219
+ item: c,
1220
+ index: x
1103
1221
  }, null))]);
1104
- if (typeof h == "object")
1105
- return console.log("??? object"), h.props = c((h == null ? void 0 : h.props) ?? {}), w(_(() => {
1106
- var y;
1107
- return (y = o == null ? void 0 : o[(h == null ? void 0 : h.way) || "input"]) == null ? void 0 : y.call(o, A(h), {
1108
- _value: h != null && h.queryType ? w(e)[h == null ? void 0 : h.queryType] : w(e),
1109
- _formRef: w(a),
1110
- _isRead: w(u),
1111
- labelField: P,
1112
- valueField: Y
1222
+ if (typeof w == "object")
1223
+ return console.log("??? object"), w.props = m((w == null ? void 0 : w.props) ?? {}), g(_(() => {
1224
+ var c;
1225
+ return (c = d == null ? void 0 : d[(w == null ? void 0 : w.way) || "input"]) == null ? void 0 : c.call(d, D(w), {
1226
+ _value: w != null && w.queryType ? g(r)[w == null ? void 0 : w.queryType] : g(r),
1227
+ _formRef: g(i),
1228
+ _isRead: g(a),
1229
+ labelField: j,
1230
+ valueField: k
1113
1231
  });
1114
1232
  }));
1115
1233
  }
1116
- function A(r) {
1117
- return w(r.enum) && (r.options = qe(w(r.enum))), r;
1234
+ function D(u) {
1235
+ return g(u.enum) && (u.options = ke(g(u.enum))), u;
1118
1236
  }
1119
- function N({
1120
- item: r,
1121
- index: h
1237
+ function M({
1238
+ item: u,
1239
+ index: w
1122
1240
  }) {
1123
- var y, g, s, p, S, F;
1124
- return r.formItemProps = c(r == null ? void 0 : r.formItemProps), r.formItemProps || (r.formItemProps = {}), !((y = r == null ? void 0 : r.formItemProps) != null && y.labelWidth) && ((g = t.formProps) != null && g.labelWidth) && (r.formItemProps.labelWidth = (s = t.formProps) == null ? void 0 : s.labelWidth), Ke(d(yt, I({
1125
- key: h,
1126
- showLabel: !(r != null && r.noLabel)
1127
- }, r == null ? void 0 : r.formItemProps, {
1128
- labelWidth: ((p = r == null ? void 0 : r.formItemProps) == null ? void 0 : p.labelWidth) || "auto",
1129
- feedback: c((S = r == null ? void 0 : r.formItemProps) == null ? void 0 : S.feedback),
1241
+ var c, x, y, b, C, $;
1242
+ return u.formItemProps = m(u == null ? void 0 : u.formItemProps), u.formItemProps || (u.formItemProps = {}), !((c = u == null ? void 0 : u.formItemProps) != null && c.labelWidth) && ((x = t.formProps) != null && x.labelWidth) && (u.formItemProps.labelWidth = (y = t.formProps) == null ? void 0 : y.labelWidth), et(s(Nt, I({
1243
+ key: w,
1244
+ showLabel: !(u != null && u.noLabel)
1245
+ }, u == null ? void 0 : u.formItemProps, {
1246
+ labelWidth: ((b = u == null ? void 0 : u.formItemProps) == null ? void 0 : b.labelWidth) || "auto",
1247
+ feedback: m((C = u == null ? void 0 : u.formItemProps) == null ? void 0 : C.feedback),
1130
1248
  style: {
1131
1249
  padding: "0 15px",
1132
1250
  boxSizing: "border-box",
1133
1251
  width: "100%",
1134
- ...((F = r == null ? void 0 : r.formItemProps) == null ? void 0 : F.style) || {}
1252
+ ...(($ = u == null ? void 0 : u.formItemProps) == null ? void 0 : $.style) || {}
1135
1253
  },
1136
- path: String(r.key)
1254
+ path: String(u.key)
1137
1255
  }), {
1138
- default: () => x(r),
1256
+ default: () => p(u),
1139
1257
  label: () => {
1140
- var C, $;
1141
- return d("div", {
1142
- class: r != null && r.labelClass || r != null && r.labelSuffix ? ` ${r == null ? void 0 : r.labelClass} flex items-center gap-col-9px` : ""
1143
- }, [r != null && r.labelSuffix ? typeof (r == null ? void 0 : r.labelSuffix) == "string" ? d(Me, {
1258
+ var B, q;
1259
+ return s("div", {
1260
+ class: u != null && u.labelClass || u != null && u.labelSuffix ? ` ${u == null ? void 0 : u.labelClass} flex items-center gap-col-9px` : ""
1261
+ }, [u != null && u.labelSuffix ? typeof (u == null ? void 0 : u.labelSuffix) == "string" ? s(_e, {
1144
1262
  class: "wh-20px c-inherit",
1145
- ...r == null ? void 0 : r.labelSuffixProps
1263
+ ...u == null ? void 0 : u.labelSuffixProps
1146
1264
  }, {
1147
- default: () => [d(Vt, {
1148
- name: r == null ? void 0 : r.labelSuffix
1265
+ default: () => [s(rl, {
1266
+ name: u == null ? void 0 : u.labelSuffix
1149
1267
  }, null)]
1150
- }) : (C = r == null ? void 0 : r.labelSuffix) == null ? void 0 : C.call(r) : d(Z, null, null), `${w(typeof (r == null ? void 0 : r[t.labelField]) == "function" ? ($ = r == null ? void 0 : r[t.labelField]) == null ? void 0 : $.call(r) : r == null ? void 0 : r[t.labelField]) || ""} ${u.value || r.read, " "}
1268
+ }) : (B = u == null ? void 0 : u.labelSuffix) == null ? void 0 : B.call(u) : s(ae, null, null), `${g(typeof (u == null ? void 0 : u[t.labelField]) == "function" ? (q = u == null ? void 0 : u[t.labelField]) == null ? void 0 : q.call(u) : u == null ? void 0 : u[t.labelField]) || ""} ${a.value || u.read, " "}
1151
1269
  `]);
1152
1270
  }
1153
- }), [[Le("permission"), r == null ? void 0 : r.permission]]);
1271
+ }), [[tt("corePermission"), u == null ? void 0 : u.permission]]);
1154
1272
  }
1155
1273
  return () => {
1156
- let r;
1157
- return d(k, {
1274
+ let u;
1275
+ return s(z, {
1158
1276
  "wrap-item": !1,
1159
1277
  size: [0, 8],
1160
1278
  style: {
@@ -1163,17 +1281,17 @@ const zt = /* @__PURE__ */ Q((t, {
1163
1281
  alignContent: "baseline",
1164
1282
  ...t.style
1165
1283
  }
1166
- }, jt(r = i.value.map(({
1167
- isRender: h = !0,
1168
- ...y
1169
- }, g) => (typeof w(h) != "boolean" ? h != null && h(w(e)) : w(h)) ? y != null && y.render ? y == null ? void 0 : y.render(w(e), g, {
1170
- setValue: m,
1171
- value: w(e)
1172
- }) : d(N, {
1173
- item: y,
1174
- index: g
1175
- }, null) : null)) ? r : {
1176
- default: () => [r]
1284
+ }, ul(u = n.value.map(({
1285
+ isRender: w = !0,
1286
+ ...c
1287
+ }, x) => (typeof g(w) != "boolean" ? w != null && w(g(r)) : g(w)) ? c != null && c.render ? c == null ? void 0 : c.render(g(r), x, {
1288
+ setValue: h,
1289
+ value: g(r)
1290
+ }) : s(M, {
1291
+ item: c,
1292
+ index: x
1293
+ }, null) : null)) ? u : {
1294
+ default: () => [u]
1177
1295
  });
1178
1296
  };
1179
1297
  }, {
@@ -1192,11 +1310,11 @@ const zt = /* @__PURE__ */ Q((t, {
1192
1310
  },
1193
1311
  labelField: {
1194
1312
  type: String,
1195
- default: () => P
1313
+ default: () => j
1196
1314
  },
1197
1315
  valueField: {
1198
1316
  type: String,
1199
- default: () => Y
1317
+ default: () => k
1200
1318
  },
1201
1319
  style: {
1202
1320
  type: Object,
@@ -1212,50 +1330,50 @@ const zt = /* @__PURE__ */ Q((t, {
1212
1330
  }
1213
1331
  },
1214
1332
  emits: ["update:value"]
1215
- }), Kt = {
1333
+ }), ol = {
1216
1334
  showIcon: !1,
1217
1335
  autoFocus: !1
1218
1336
  };
1219
- function Lt({
1337
+ function sl({
1220
1338
  options: t = [],
1221
1339
  model: l,
1222
1340
  labelField: e = "label",
1223
- formOpr: u = {}
1341
+ formOpr: r = {}
1224
1342
  }) {
1225
- return computed(
1343
+ return _(
1226
1344
  () => (t == null ? void 0 : t.reduce((a, { fields: i, ...n }) => {
1227
- var o, c;
1345
+ var o, d;
1228
1346
  Array.isArray(n == null ? void 0 : n.key) && n.key.forEach((m) => {
1229
1347
  n != null && n.required && (a[String(m)] = {
1230
1348
  key: m,
1231
1349
  type: "any",
1232
- required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(unref(l), { ...u }) : n == null ? void 0 : n.required : !1,
1350
+ required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(g(l), { ...r }) : n == null ? void 0 : n.required : !1,
1233
1351
  message: (n == null ? void 0 : n.message) || `请选择${n == null ? void 0 : n[e]}`,
1234
1352
  fields: i
1235
1353
  });
1236
1354
  });
1237
- const f = n != null && n.rule ? typeof (n == null ? void 0 : n.rule) != "function" ? n == null ? void 0 : n.rule : n == null ? void 0 : n.rule(unref(l), { ...u }) : i ? {
1355
+ const f = n != null && n.rule ? typeof (n == null ? void 0 : n.rule) != "function" ? n == null ? void 0 : n.rule : n == null ? void 0 : n.rule(g(l), { ...r }) : i ? {
1238
1356
  key: n == null ? void 0 : n.key,
1239
1357
  type: "any",
1240
- required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(unref(l), { ...u }) : n == null ? void 0 : n.required : !1,
1358
+ required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(g(l), { ...r }) : n == null ? void 0 : n.required : !1,
1241
1359
  message: (n == null ? void 0 : n.message) || `请${(o = n == null ? void 0 : n.options) != null && o.length ? "选择" : "输入"}${n == null ? void 0 : n[e]}`,
1242
1360
  fields: i
1243
1361
  } : {
1244
1362
  key: n == null ? void 0 : n.key,
1245
1363
  type: "any",
1246
- required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(unref(l), { ...u }) : n == null ? void 0 : n.required : !1,
1247
- message: (n == null ? void 0 : n.message) || `请${(c = n == null ? void 0 : n.options) != null && c.length ? "选择" : "输入"}${n == null ? void 0 : n[e]}`,
1364
+ required: n != null && n.required ? typeof (n == null ? void 0 : n.required) == "function" ? n == null ? void 0 : n.required(g(l), { ...r }) : n == null ? void 0 : n.required : !1,
1365
+ message: (n == null ? void 0 : n.message) || `请${(d = n == null ? void 0 : n.options) != null && d.length ? "选择" : "输入"}${n == null ? void 0 : n[e]}`,
1248
1366
  ...Array.isArray(n == null ? void 0 : n.key) ? {
1249
- validator: (m) => (console.log(m), !(n == null ? void 0 : n.key.every((b) => unref(l)[b])) && (n != null && n.required) ? new Error(m == null ? void 0 : m.message) : !0)
1367
+ validator: (m) => (console.log(m), !(n == null ? void 0 : n.key.every((p) => g(l)[p])) && (n != null && n.required) ? new Error(m == null ? void 0 : m.message) : !0)
1250
1368
  } : {}
1251
1369
  };
1252
1370
  return f != null && f.required && (a[String(n == null ? void 0 : n.key)] = f), a;
1253
1371
  }, {})) || {}
1254
1372
  );
1255
1373
  }
1256
- const Be = {
1374
+ const ze = {
1257
1375
  __name: "DataForm",
1258
- props: /* @__PURE__ */ ie({
1376
+ props: /* @__PURE__ */ pe({
1259
1377
  isNo: {
1260
1378
  type: Boolean,
1261
1379
  default: () => !0
@@ -1301,80 +1419,102 @@ const Be = {
1301
1419
  }),
1302
1420
  emits: ["update:value"],
1303
1421
  setup(t, { expose: l }) {
1304
- const e = t, u = computed(() => e.options), a = U(), i = $e(t, "value"), n = computed(() => w(
1305
- u.value ? Lt({
1306
- options: u.value,
1307
- model: i,
1308
- labelField: e.labelField,
1309
- formOpr: { formRef: a }
1422
+ var o;
1423
+ const e = oe();
1424
+ (o = e == null ? void 0 : e.appContext) != null && o.app && X(e.appContext.app);
1425
+ const r = t, a = _(() => r.options), i = P(), n = Ye(t, "value"), f = _(() => g(
1426
+ a.value ? sl({
1427
+ options: a.value,
1428
+ model: n,
1429
+ labelField: r.labelField,
1430
+ formOpr: { formRef: i }
1310
1431
  }) : {}
1311
1432
  ));
1312
- return console.log(n.value), l({
1313
- formRef: a,
1314
- getRule: () => n.value,
1315
- valid: (f = []) => (console.log("?? valid", f), new Promise((o, c) => {
1316
- var x;
1317
- const m = ce(f);
1318
- (x = a.value) == null || x.validate((b) => {
1319
- if (b) return c(b);
1320
- o();
1321
- }, (b) => m.length ? m.includes(b == null ? void 0 : b.key) : !0);
1433
+ return console.log(f.value), l({
1434
+ formRef: i,
1435
+ getRule: () => f.value,
1436
+ valid: (d = []) => (console.log("?? valid", d), new Promise((m, h) => {
1437
+ var A;
1438
+ const p = Oe(d);
1439
+ (A = i.value) == null || A.validate((D) => {
1440
+ if (D) return h(D);
1441
+ m();
1442
+ }, (D) => p.length ? p.includes(D == null ? void 0 : D.key) : !0);
1322
1443
  })),
1323
- confirm: (f) => new Promise((o, c) => {
1324
- var m;
1325
- (m = a.value) == null || m.validate((x) => {
1326
- if (x) return c(x);
1327
- f && f(w(i)), o(w(i));
1444
+ confirm: (d) => new Promise((m, h) => {
1445
+ var p;
1446
+ (p = i.value) == null || p.validate((A) => {
1447
+ if (A) return h(A);
1448
+ d && d(g(n)), m(g(n));
1328
1449
  });
1329
1450
  })
1330
- }), (f, o) => (q(), V(w(mt), I({
1451
+ }), (d, m) => (T(), H(g(Dt), I({
1331
1452
  ref_key: "formRef",
1332
- ref: a,
1333
- model: i.value,
1334
- rules: e.read ? {} : w(n),
1453
+ ref: i,
1454
+ model: n.value,
1455
+ rules: r.read ? {} : g(f),
1335
1456
  "label-placement": "left",
1336
1457
  "label-width": "100px",
1337
1458
  "require-mark-placement": "right-hanging",
1338
- class: e.dialog ? e.read ? "core-dialog-content" : "core-dialog-main" : "",
1339
- style: { minHeight: e.isNo ? "unset" : null }
1340
- }, e.formProps), {
1341
- default: B(() => [
1342
- d(w(zt), {
1343
- value: i.value,
1344
- "onUpdate:value": o[0] || (o[0] = (c) => i.value = c),
1345
- "form-ref": a.value,
1346
- option: e.options,
1347
- "label-field": e.labelField,
1348
- read: e.read,
1349
- style: De(e.contentStyle),
1350
- "form-props": e.formProps
1459
+ class: r.dialog ? r.read ? "core-dialog-content" : "core-dialog-main" : "",
1460
+ style: { minHeight: r.isNo ? "unset" : null }
1461
+ }, r.formProps), {
1462
+ default: R(() => [
1463
+ s(g(il), {
1464
+ value: n.value,
1465
+ "onUpdate:value": m[0] || (m[0] = (h) => n.value = h),
1466
+ "form-ref": i.value,
1467
+ option: r.options,
1468
+ "label-field": r.labelField,
1469
+ read: r.read,
1470
+ style: Te(r.contentStyle),
1471
+ "form-props": r.formProps
1351
1472
  }, null, 8, ["value", "form-ref", "option", "label-field", "read", "style", "form-props"])
1352
1473
  ]),
1353
1474
  _: 1
1354
1475
  }, 16, ["model", "rules", "class", "style"]));
1355
1476
  }
1356
1477
  };
1357
- function Wt(t) {
1358
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !H(t);
1478
+ function fl(t) {
1479
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !te(t);
1480
+ }
1481
+ let Z = typeof $dialog < "u" ? $dialog : null, de = null;
1482
+ function cl() {
1483
+ if (Z) return Z;
1484
+ try {
1485
+ const t = xe();
1486
+ if (t)
1487
+ return Z = t, Z;
1488
+ } catch {
1489
+ }
1490
+ if (!de) {
1491
+ const {
1492
+ dialog: t
1493
+ } = At(["dialog"]);
1494
+ de = {
1495
+ dialog: t
1496
+ };
1497
+ }
1498
+ return Z = de.dialog, Z;
1359
1499
  }
1360
- function Ht({
1500
+ function Ke({
1361
1501
  title: t = "",
1362
1502
  noTitle: l = !1,
1363
1503
  titleFull: e = null,
1364
- options: u = [],
1504
+ options: r = [],
1365
1505
  mode: a = "add",
1366
1506
  modeEnum: i = {},
1367
1507
  labelField: n = "label",
1368
1508
  isNo: f = !0,
1369
1509
  formProps: o = {},
1370
- interfaceFn: c = null,
1510
+ interfaceFn: d = null,
1371
1511
  interfaceFnCancel: m = null,
1372
- valueData: x,
1373
- read: b,
1512
+ valueData: h,
1513
+ read: p,
1374
1514
  isRead: A,
1375
- action: N = null,
1376
- contentStyle: r = {},
1377
- actionProps: h = {}
1515
+ action: D = null,
1516
+ contentStyle: M = {},
1517
+ actionProps: S = {}
1378
1518
  } = {
1379
1519
  title: "自定义弹窗",
1380
1520
  noTitle: !1,
@@ -1383,9 +1523,9 @@ function Ht({
1383
1523
  read: !1,
1384
1524
  isRead: !1,
1385
1525
  valueData: {}
1386
- }, y = null) {
1387
- var ye;
1388
- const g = {
1526
+ }, u = null) {
1527
+ var ie;
1528
+ const w = cl(), c = {
1389
1529
  none: {
1390
1530
  sub: "",
1391
1531
  read: !1
@@ -1423,153 +1563,157 @@ function Ht({
1423
1563
  read: !1
1424
1564
  },
1425
1565
  ...i
1426
- }, s = U(), p = He([]), S = U({
1427
- ...x
1428
- }), F = {
1566
+ }, x = P(), y = nt([]), b = P({
1567
+ ...h
1568
+ }), C = {
1429
1569
  justify: "end",
1430
1570
  wrapItem: !1,
1431
1571
  style: {
1432
1572
  width: "100%"
1433
1573
  }
1434
- }, C = {
1574
+ }, $ = {
1435
1575
  width: "120px"
1436
- }, $ = [{
1576
+ }, B = [{
1437
1577
  label: "取消",
1438
1578
  props: {
1439
1579
  type: "primary",
1440
1580
  ghost: !0
1441
1581
  },
1442
1582
  onClick: ({
1443
- cancel: D
1583
+ cancel: F
1444
1584
  }) => {
1445
- m ? m(w(S), {
1446
- close: D
1447
- }) : D();
1585
+ m ? m(g(b), {
1586
+ close: F
1587
+ }) : F();
1448
1588
  }
1449
1589
  }, {
1450
1590
  label: "确定",
1451
1591
  valid: !0,
1452
1592
  onClick: async ({
1453
- cancel: D,
1593
+ cancel: F,
1454
1594
  hideLoading: O
1455
- }) => c ? await c(w(S), {
1456
- close: D,
1595
+ }) => d ? await d(g(b), {
1596
+ close: F,
1457
1597
  hideLoading: O
1458
- }) : D()
1598
+ }) : F()
1459
1599
  }];
1460
- N || $.forEach((D, O) => {
1461
- p[O] = !1;
1600
+ D || B.forEach((F, O) => {
1601
+ y[O] = !1;
1462
1602
  });
1463
- const K = typeof e == "function" ? () => {
1464
- var D;
1465
- return e((D = g[a]) == null ? void 0 : D.sub);
1466
- } : e, M = $dialog.create({
1603
+ const q = typeof e == "function" ? () => {
1604
+ var F;
1605
+ return e((F = c[a]) == null ? void 0 : F.sub);
1606
+ } : e, N = w.create({
1467
1607
  type: "info",
1468
- ...Kt,
1608
+ ...ol,
1469
1609
  ...l ? {} : {
1470
- title: K || (((ye = g[a]) == null ? void 0 : ye.sub) ?? "") + t
1610
+ title: q || (((ie = c[a]) == null ? void 0 : ie.sub) ?? "") + t
1471
1611
  },
1472
1612
  style: {
1473
1613
  width: "500px"
1474
1614
  },
1475
- content: () => d(Be, {
1476
- ref: (D) => {
1477
- s.value = D;
1615
+ content: () => s(ze, {
1616
+ ref: (F) => {
1617
+ x.value = F;
1478
1618
  },
1479
- options: u,
1480
- value: S.value,
1481
- "onUpdate:value": (D) => S.value = D,
1619
+ options: r,
1620
+ value: b.value,
1621
+ "onUpdate:value": (F) => b.value = F,
1482
1622
  isNo: f,
1483
- read: b ?? A,
1623
+ read: p ?? A,
1484
1624
  labelField: n,
1485
1625
  formProps: o,
1486
- contentStyle: r,
1626
+ contentStyle: M,
1487
1627
  dialog: !0
1488
1628
  }, null),
1489
- action: b ?? A ? null : typeof N == "function" ? () => N({
1490
- formRef: s,
1491
- data: w(S),
1492
- d: M,
1493
- close: J
1629
+ action: p ?? A ? null : typeof D == "function" ? () => D({
1630
+ formRef: x,
1631
+ data: g(b),
1632
+ d: N,
1633
+ close: U
1494
1634
  }) : () => {
1495
- let D;
1496
- return d(k, I(F, h, {
1635
+ let F;
1636
+ return s(z, I(C, S, {
1497
1637
  style: {
1498
- ...F == null ? void 0 : F.style,
1499
- ...(h == null ? void 0 : h.style) || {}
1638
+ ...C == null ? void 0 : C.style,
1639
+ ...(S == null ? void 0 : S.style) || {}
1500
1640
  }
1501
- }), Wt(D = (N || $).map((O, te) => {
1502
- var me;
1503
- return O != null && O.render ? (me = O == null ? void 0 : O.render) == null ? void 0 : me.call(O) : d(z, I({
1641
+ }), fl(F = (D || B).map((O, se) => {
1642
+ var Ne;
1643
+ return O != null && O.render ? (Ne = O == null ? void 0 : O.render) == null ? void 0 : Ne.call(O) : s(Q, I({
1504
1644
  type: "primary",
1505
1645
  ghost: O.mode === "cancel"
1506
1646
  }, {
1507
1647
  ...O == null ? void 0 : O.props,
1508
- ...h == null ? void 0 : h.buttonProps
1648
+ ...S == null ? void 0 : S.buttonProps
1509
1649
  }, {
1510
1650
  style: {
1511
- ...C,
1651
+ ...$,
1512
1652
  ...(O == null ? void 0 : O.style) || {}
1513
1653
  },
1514
- loading: p[te],
1654
+ loading: y[se],
1515
1655
  onClick: async () => {
1516
1656
  if (O.mode === "cancel")
1517
- M.destroy();
1657
+ N.destroy();
1518
1658
  else {
1519
- const le = () => p[te] = !0, he = () => p[te] = !1;
1520
- O != null && O.loading && le();
1659
+ const fe = () => y[se] = !0, De = () => y[se] = !1;
1660
+ O != null && O.loading && fe();
1521
1661
  try {
1522
- console.log("model", w(S)), O != null && O.valid && await ee(), console.log(O == null ? void 0 : O.valid), (O != null && O.valid || O != null && O.loading) && le(), await (O == null ? void 0 : O.onClick({
1523
- model: w(S),
1524
- comfirm: _e,
1525
- cancel: J,
1526
- validate: ee,
1527
- showLoading: le,
1528
- hideLoading: he
1662
+ console.log("model", g(b)), O != null && O.valid && await K(), console.log(O == null ? void 0 : O.valid), (O != null && O.valid || O != null && O.loading) && fe(), await (O == null ? void 0 : O.onClick({
1663
+ model: g(b),
1664
+ comfirm: V,
1665
+ cancel: U,
1666
+ validate: K,
1667
+ showLoading: fe,
1668
+ hideLoading: De
1529
1669
  }));
1530
- } catch (ke) {
1531
- console.log(ke);
1670
+ } catch (Je) {
1671
+ console.log(Je);
1532
1672
  } finally {
1533
- (O != null && O.valid || O != null && O.loading) && he();
1673
+ (O != null && O.valid || O != null && O.loading) && De();
1534
1674
  }
1535
1675
  }
1536
1676
  }
1537
1677
  }), {
1538
1678
  default: () => [O.label || ""]
1539
1679
  });
1540
- })) ? D : {
1541
- default: () => [D]
1680
+ })) ? F : {
1681
+ default: () => [F]
1542
1682
  });
1543
1683
  },
1544
1684
  // ...readButton.value,
1545
- ...y,
1546
- class: `core-dialog ${w(b) ? "core-dialog-read" : ""} ${(y == null ? void 0 : y.class) || ""}`
1685
+ ...u,
1686
+ class: `core-dialog ${g(p) ? "core-dialog-read" : ""} ${(u == null ? void 0 : u.class) || ""}`
1547
1687
  });
1548
- function J() {
1549
- console.log("取消", S.value), M == null || M.destroy();
1688
+ function U() {
1689
+ console.log("取消", b.value), N == null || N.destroy();
1550
1690
  }
1551
- async function ee(D = []) {
1691
+ async function K(F = []) {
1552
1692
  var O;
1553
- console.log("开启验证"), await ((O = s.value) == null ? void 0 : O.valid());
1693
+ console.log("开启验证"), await ((O = x.value) == null ? void 0 : O.valid());
1554
1694
  }
1555
- async function _e(D) {
1556
- return D && D();
1695
+ async function V(F) {
1696
+ return F && F();
1557
1697
  }
1558
1698
  return {
1559
- cancel: J,
1560
- setValue: (D, O) => O ? S.value[O] = D : S.value = {
1561
- ...S.value,
1562
- ...D
1699
+ cancel: U,
1700
+ setValue: (F, O) => O ? b.value[O] = F : b.value = {
1701
+ ...b.value,
1702
+ ...F
1563
1703
  },
1564
- model: w(S),
1565
- modeEnum: g
1704
+ model: g(b),
1705
+ modeEnum: c
1566
1706
  };
1567
1707
  }
1568
- const Jt = {
1708
+ function Tl() {
1709
+ const t = xe();
1710
+ return Le(t), (l, e) => Ke(l, e);
1711
+ }
1712
+ const dl = {
1569
1713
  class: "flex-1"
1570
- }, Gt = {
1714
+ }, yl = {
1571
1715
  __name: "CommonQuery",
1572
- props: /* @__PURE__ */ ie({
1716
+ props: /* @__PURE__ */ pe({
1573
1717
  inlineText: {
1574
1718
  type: Boolean,
1575
1719
  default: () => !0
@@ -1613,178 +1757,181 @@ const Jt = {
1613
1757
  },
1614
1758
  queryModifiers: {}
1615
1759
  }),
1616
- emits: /* @__PURE__ */ ie(["update:query", "submit", "reset"], ["update:query"]),
1760
+ emits: /* @__PURE__ */ pe(["update:query", "submit", "reset"], ["update:query"]),
1617
1761
  setup(t, {
1618
1762
  emit: l
1619
1763
  }) {
1620
- function e(y, g) {
1621
- let s;
1622
- return function(...p) {
1623
- clearTimeout(s), s = setTimeout(() => {
1624
- y.apply(this, p);
1625
- }, g);
1764
+ var w;
1765
+ const e = oe();
1766
+ (w = e == null ? void 0 : e.appContext) != null && w.app && X(e.appContext.app);
1767
+ function r(c, x) {
1768
+ let y;
1769
+ return function(...b) {
1770
+ clearTimeout(y), y = setTimeout(() => {
1771
+ c.apply(this, b);
1772
+ }, x);
1626
1773
  };
1627
1774
  }
1628
- const u = l, a = t;
1629
- function i(y) {
1630
- return y.map((g) => ({
1631
- ...g,
1775
+ const a = l, i = t;
1776
+ function n(c) {
1777
+ return c.map((x) => ({
1778
+ ...x,
1632
1779
  props: {
1633
- ...g.props,
1634
- ...!g.way || g.way === "input" ? {
1635
- onUpdateValue: (...s) => {
1636
- var p, S;
1637
- (S = (p = s.props) == null ? void 0 : p.onUpdateValue) == null || S.call(p, ...s), n();
1780
+ ...x.props,
1781
+ ...!x.way || x.way === "input" ? {
1782
+ onUpdateValue: (...y) => {
1783
+ var b, C;
1784
+ (C = (b = y.props) == null ? void 0 : b.onUpdateValue) == null || C.call(b, ...y), f();
1638
1785
  }
1639
1786
  } : {},
1640
- ...(g == null ? void 0 : g.way) === "select" ? {
1641
- onUpdateValue: (...s) => {
1642
- var p, S;
1643
- (S = (p = s.props) == null ? void 0 : p.onUpdateValue) == null || S.call(p, ...s), n();
1787
+ ...(x == null ? void 0 : x.way) === "select" ? {
1788
+ onUpdateValue: (...y) => {
1789
+ var b, C;
1790
+ (C = (b = y.props) == null ? void 0 : b.onUpdateValue) == null || C.call(b, ...y), f();
1644
1791
  }
1645
1792
  } : {}
1646
1793
  }
1647
1794
  }));
1648
1795
  }
1649
- const n = e(() => {
1650
- u("submit");
1796
+ const f = r(() => {
1797
+ a("submit");
1651
1798
  }, 500);
1652
- function f() {
1653
- n();
1799
+ function o() {
1800
+ f();
1654
1801
  }
1655
- const o = U(!1), c = $e(t, "query"), m = {
1802
+ const d = P(!1), m = Ye(t, "query"), h = {
1656
1803
  style: {
1657
1804
  width: "33%"
1658
1805
  }
1659
- }, x = _(() => {
1660
- var y;
1661
- return (y = a.options) == null ? void 0 : y.map((g) => (g == null ? void 0 : g.way) || "input");
1806
+ }, p = _(() => {
1807
+ var c;
1808
+ return (c = i.options) == null ? void 0 : c.map((x) => (x == null ? void 0 : x.way) || "input");
1662
1809
  });
1663
- Ee(x.value);
1664
- const b = _(() => {
1810
+ Ve(p.value);
1811
+ const A = _(() => {
1665
1812
  try {
1666
- const y = [];
1667
- for (let g = 0; g < a.options.length; g++) {
1668
- const s = a.options[g];
1669
- s != null && s.enum && !(s != null && s.options) && (s.options = qe(s.enum)), s != null && s.props || (s.props = {
1670
- size: a.size
1671
- }), s != null && s.formItemProps ? s.formItemProps = {
1672
- ...m,
1673
- ...s.formItemProps,
1813
+ const c = [];
1814
+ for (let x = 0; x < i.options.length; x++) {
1815
+ const y = i.options[x];
1816
+ y != null && y.enum && !(y != null && y.options) && (y.options = ke(y.enum)), y != null && y.props || (y.props = {
1817
+ size: i.size
1818
+ }), y != null && y.formItemProps ? y.formItemProps = {
1819
+ ...h,
1820
+ ...y.formItemProps,
1674
1821
  style: {
1675
- ...m.style,
1676
- ...s.formItemProps.style
1822
+ ...h.style,
1823
+ ...y.formItemProps.style
1677
1824
  }
1678
- } : s.formItemProps = {
1679
- ...m
1825
+ } : y.formItemProps = {
1826
+ ...h
1680
1827
  };
1681
- const p = (s == null ? void 0 : s.key) || (s == null ? void 0 : s.value);
1682
- if (!p) throw new Error("key no set");
1683
- y.push({
1684
- ...s,
1685
- key: p
1828
+ const b = (y == null ? void 0 : y.key) || (y == null ? void 0 : y.value);
1829
+ if (!b) throw new Error("key no set");
1830
+ c.push({
1831
+ ...y,
1832
+ key: b
1686
1833
  });
1687
1834
  }
1688
- return i(y);
1689
- } catch (y) {
1690
- return console.warn("error", y), [];
1835
+ return n(c);
1836
+ } catch (c) {
1837
+ return console.warn("error", c), [];
1691
1838
  }
1692
- }), A = {
1839
+ }), D = {
1693
1840
  style: {
1694
1841
  borderRadius: "3px"
1695
1842
  }
1696
- }, N = {
1697
- search: () => d(E("NButton"), I({
1698
- type: a.type,
1699
- loading: o.value,
1843
+ }, M = {
1844
+ search: () => s(Y("NButton"), I({
1845
+ type: i.type,
1846
+ loading: d.value,
1700
1847
  "default-props": {
1701
1848
  attrType: "submit"
1702
1849
  },
1703
- onClick: () => f()
1704
- }, A), {
1850
+ onClick: () => o()
1851
+ }, D), {
1705
1852
  default: () => "搜索",
1706
- icon: () => d(xt, null, null)
1853
+ icon: () => s(Pt, null, null)
1707
1854
  }),
1708
- reset: () => d(E("NButton"), I({
1855
+ reset: () => s(Y("NButton"), I({
1709
1856
  type: "default",
1710
1857
  onClick: () => {
1711
- r();
1858
+ S();
1712
1859
  }
1713
- }, A), {
1860
+ }, D), {
1714
1861
  default: () => "重置",
1715
- icon: () => d(bt, null, null)
1862
+ icon: () => s($t, null, null)
1716
1863
  })
1717
1864
  };
1718
- function r() {
1719
- a.options.forEach((y) => {
1720
- const g = (y == null ? void 0 : y.key) || (y == null ? void 0 : y.value);
1721
- g && (y != null && y.queryType ? c.value[y.queryType][g] = null : c.value[g] = null);
1722
- }), u("reset");
1865
+ function S() {
1866
+ i.options.forEach((c) => {
1867
+ const x = (c == null ? void 0 : c.key) || (c == null ? void 0 : c.value);
1868
+ x && (c != null && c.queryType ? m.value[c.queryType][x] = null : m.value[x] = null);
1869
+ }), a("reset");
1723
1870
  }
1724
- function h(y) {
1725
- y.key === "Enter" && f();
1871
+ function u(c) {
1872
+ c.key === "Enter" && o();
1726
1873
  }
1727
- return Fe(() => {
1728
- document.addEventListener("keydown", h);
1729
- }), Je(() => {
1730
- document.removeEventListener("keydown", h);
1731
- }), (y, g) => {
1732
- const s = E("n-space");
1733
- return q(), V(s, {
1874
+ return Be(() => {
1875
+ document.addEventListener("keydown", u);
1876
+ }), at(() => {
1877
+ document.removeEventListener("keydown", u);
1878
+ }), (c, x) => {
1879
+ const y = Y("n-space");
1880
+ return T(), H(y, {
1734
1881
  "wrap-item": !1,
1735
1882
  justify: "space-between",
1736
1883
  align: "center",
1737
1884
  wrap: !1
1738
1885
  }, {
1739
- default: B(() => [fe("div", Jt, [d(w(Be), {
1740
- value: c.value,
1741
- "onUpdate:value": g[0] || (g[0] = (p) => c.value = p),
1742
- options: b.value,
1886
+ default: R(() => [we("div", dl, [s(g(ze), {
1887
+ value: m.value,
1888
+ "onUpdate:value": x[0] || (x[0] = (b) => m.value = b),
1889
+ options: A.value,
1743
1890
  "form-props": {
1744
1891
  showFeedback: !1
1745
1892
  }
1746
- }, null, 8, ["value", "options"])]), a.noButton ? Ge("", !0) : (q(), V(s, {
1893
+ }, null, 8, ["value", "options"])]), i.noButton ? rt("", !0) : (T(), H(y, {
1747
1894
  key: 0,
1748
1895
  align: "center",
1749
1896
  wrap: !1
1750
1897
  }, {
1751
- default: B(() => [oe(y.$slots, "left-btn", {}, void 0, !0), (q(!0), G(Z, null, ue(a.btn, (p, S) => {
1752
- var F;
1753
- return q(), V(Xe((F = N == null ? void 0 : N[p]) == null ? void 0 : F.call(N)), {
1754
- key: S
1898
+ default: R(() => [ge(c.$slots, "left-btn", {}, void 0, !0), (T(!0), le(ae, null, me(i.btn, (b, C) => {
1899
+ var $;
1900
+ return T(), H(ut(($ = M == null ? void 0 : M[b]) == null ? void 0 : $.call(M)), {
1901
+ key: C
1755
1902
  });
1756
- }), 128)), oe(y.$slots, "right-btn", {}, void 0, !0)]),
1903
+ }), 128)), ge(c.$slots, "right-btn", {}, void 0, !0)]),
1757
1904
  _: 3
1758
1905
  }))]),
1759
1906
  _: 3
1760
1907
  });
1761
1908
  };
1762
1909
  }
1763
- }, ml = /* @__PURE__ */ v(Gt, [["__scopeId", "data-v-a0acb8e2"]]), Ye = /* @__PURE__ */ Q(({
1910
+ }, Yl = /* @__PURE__ */ ue(yl, [["__scopeId", "data-v-6ef17b7a"]]), We = /* @__PURE__ */ re(({
1764
1911
  action: t,
1765
1912
  row: l,
1766
1913
  index: e
1767
1914
  }) => {
1768
1915
  const {
1769
- onClick: u,
1916
+ onClick: r,
1770
1917
  disabled: a,
1771
1918
  type: i = "primary",
1772
1919
  loading: n = !1,
1773
1920
  label: f = null,
1774
1921
  ...o
1775
- } = t, c = U(!1);
1776
- return () => d(z, I({
1922
+ } = t, d = P(!1);
1923
+ return () => s(Q, I({
1777
1924
  text: !0,
1778
1925
  onClick: async () => {
1779
- if (u)
1926
+ if (r)
1780
1927
  try {
1781
- n && (c.value = !0), await u(l, e);
1928
+ n && (d.value = !0), await r(l, e);
1782
1929
  } finally {
1783
- setTimeout(() => c.value = !1, 500);
1930
+ setTimeout(() => d.value = !1, 500);
1784
1931
  }
1785
1932
  },
1786
1933
  disabled: a && a(l),
1787
- loading: c.value,
1934
+ loading: d.value,
1788
1935
  type: a && a(l) ? "default" : i
1789
1936
  }, o), {
1790
1937
  default: () => [typeof f == "function" ? f == null ? void 0 : f(l) : f]
@@ -1804,16 +1951,16 @@ const Jt = {
1804
1951
  default: 0
1805
1952
  }
1806
1953
  }
1807
- }), Te = /* @__PURE__ */ Q(({
1954
+ }), He = /* @__PURE__ */ re(({
1808
1955
  onClick: t,
1809
1956
  row: l,
1810
1957
  index: e,
1811
- action: u
1958
+ action: r
1812
1959
  }, {
1813
1960
  slots: a
1814
1961
  }) => {
1815
- const i = U(!1);
1816
- return () => d(ht, {
1962
+ const i = P(!1);
1963
+ return () => s(St, {
1817
1964
  "positive-button-props": {
1818
1965
  type: "warning",
1819
1966
  loading: i.value
@@ -1831,7 +1978,7 @@ const Jt = {
1831
1978
  trigger: a.default,
1832
1979
  default: () => {
1833
1980
  var n;
1834
- return ((n = u == null ? void 0 : u.popProps) == null ? void 0 : n.content) || (u == null ? void 0 : u.content) || "确定删除该记录?";
1981
+ return ((n = r == null ? void 0 : r.popProps) == null ? void 0 : n.content) || (r == null ? void 0 : r.content) || "确定删除该记录?";
1835
1982
  }
1836
1983
  });
1837
1984
  }, {
@@ -1854,46 +2001,46 @@ const Jt = {
1854
2001
  }
1855
2002
  }
1856
2003
  });
1857
- function Ae(t) {
1858
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !H(t);
2004
+ function qe(t) {
2005
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !te(t);
1859
2006
  }
1860
- const Xt = /* @__PURE__ */ Q((t) => {
1861
- const l = t.options.length, e = U(!1), u = _(() => t.options.slice(0, e.value ? l : t.max)), a = _(() => t.options.slice(t.max));
2007
+ const ml = /* @__PURE__ */ re((t) => {
2008
+ const l = t.options.length, e = P(!1), r = _(() => t.options.slice(0, e.value ? l : t.max)), a = _(() => t.options.slice(t.max));
1862
2009
  function i(n) {
1863
2010
  return n == null ? void 0 : n.map(({
1864
2011
  isRender: f = () => !0,
1865
2012
  onClick: o = null,
1866
- mode: c = null,
2013
+ mode: d = null,
1867
2014
  disabled: m = !1,
1868
- type: x = "primary",
1869
- ...b
1870
- }, A) => f != null && f(t.data) ? c === "pop" ? d(Te, {
2015
+ type: h = "primary",
2016
+ ...p
2017
+ }, A) => f != null && f(t.data) ? d === "pop" ? s(He, {
1871
2018
  onClick: o,
1872
2019
  row: t.data,
1873
- action: b,
1874
- key: X(t.data, t.index) + A
2020
+ action: p,
2021
+ key: ne(t.data, t.index) + A
1875
2022
  }, {
1876
- default: () => [d(z, I({
2023
+ default: () => [s(Q, I({
1877
2024
  text: !0,
1878
2025
  disabled: m && m(t.data),
1879
- type: m && m(t.data) ? "default" : x
1880
- }, b), {
1881
- default: () => [typeof (b == null ? void 0 : b.label) == "function" ? b == null ? void 0 : b.label(t.data) : b == null ? void 0 : b.label]
2026
+ type: m && m(t.data) ? "default" : h
2027
+ }, p), {
2028
+ default: () => [typeof (p == null ? void 0 : p.label) == "function" ? p == null ? void 0 : p.label(t.data) : p == null ? void 0 : p.label]
1882
2029
  })]
1883
- }) : d(Ye, {
2030
+ }) : s(We, {
1884
2031
  row: t.data,
1885
2032
  action: {
1886
- ...b,
2033
+ ...p,
1887
2034
  disabled: m,
1888
2035
  onClick: o,
1889
- type: x
2036
+ type: h
1890
2037
  },
1891
- key: X(t.data, t.index) + A
2038
+ key: ne(t.data, t.index) + A
1892
2039
  }, null) : void 0).filter((f) => f);
1893
2040
  }
1894
2041
  return () => {
1895
2042
  let n;
1896
- return d(k, {
2043
+ return s(z, {
1897
2044
  style: {
1898
2045
  width: "100%"
1899
2046
  },
@@ -1901,30 +2048,30 @@ const Xt = /* @__PURE__ */ Q((t) => {
1901
2048
  justify: "center",
1902
2049
  align: "center"
1903
2050
  }, {
1904
- default: () => [d(k, {
2051
+ default: () => [s(z, {
1905
2052
  "wrap-item": !1,
1906
2053
  align: "center"
1907
- }, Ae(n = i(u.value)) ? n : {
2054
+ }, qe(n = i(r.value)) ? n : {
1908
2055
  default: () => [n]
1909
- }), d(gt, {
2056
+ }), s(It, {
1910
2057
  trigger: "click"
1911
2058
  }, {
1912
- trigger: () => d(z, {
2059
+ trigger: () => s(Q, {
1913
2060
  text: !0,
1914
2061
  type: "info"
1915
2062
  }, {
1916
- default: () => [L("更多")]
2063
+ default: () => [v("更多")]
1917
2064
  }),
1918
2065
  default: () => {
1919
2066
  let f;
1920
- return d(k, {
2067
+ return s(z, {
1921
2068
  "wrap-item": !1,
1922
2069
  align: "center",
1923
2070
  style: {
1924
2071
  width: "250px",
1925
2072
  padding: "5px"
1926
2073
  }
1927
- }, Ae(f = i(a.value)) ? f : {
2074
+ }, qe(f = i(a.value)) ? f : {
1928
2075
  default: () => [f]
1929
2076
  });
1930
2077
  }
@@ -1953,27 +2100,69 @@ const Xt = /* @__PURE__ */ Q((t) => {
1953
2100
  }
1954
2101
  }
1955
2102
  });
1956
- function Zt(t) {
1957
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !H(t);
2103
+ function J(t = {}, l = null) {
2104
+ const e = Kt();
2105
+ return !e.inheritTheme && e.themeOverrides ? {
2106
+ ...t,
2107
+ themeOverrides: {
2108
+ ...e.themeOverrides,
2109
+ ...t.themeOverrides || {}
2110
+ }
2111
+ } : t;
2112
+ }
2113
+ function _l(t, l = {}) {
2114
+ if (!t)
2115
+ throw new Error("dialogInstance 是必需的。请在组件中使用 useDialog() 获取实例,然后传递给此函数。");
2116
+ const e = J(l, t);
2117
+ return t.create(e);
1958
2118
  }
1959
- const X = (t, l) => t ? JSON.stringify(t) : l;
1960
- function hl(t, l = null, e) {
1961
- const u = {
2119
+ function Rl(t) {
2120
+ if (!t)
2121
+ throw new Error("dialogInstance 是必需的。请在组件中使用 useDialog() 获取实例。");
2122
+ return {
2123
+ info: (l) => {
2124
+ const e = J({ type: "info", ...l }, t);
2125
+ return t.info(e);
2126
+ },
2127
+ success: (l) => {
2128
+ const e = J({ type: "success", ...l }, t);
2129
+ return t.success(e);
2130
+ },
2131
+ warning: (l) => {
2132
+ const e = J({ type: "warning", ...l }, t);
2133
+ return t.warning(e);
2134
+ },
2135
+ error: (l) => {
2136
+ const e = J({ type: "error", ...l }, t);
2137
+ return t.error(e);
2138
+ },
2139
+ create: (l) => {
2140
+ const e = J(l, t);
2141
+ return t.create(e);
2142
+ }
2143
+ };
2144
+ }
2145
+ function hl(t) {
2146
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !te(t);
2147
+ }
2148
+ const ne = (t, l) => t ? JSON.stringify(t) : l;
2149
+ function kl(t, l = null, e) {
2150
+ const r = {
1962
2151
  max: 4,
1963
2152
  width: 80
1964
2153
  };
1965
2154
  let a = !1;
1966
- if (typeof e == "boolean" ? a = u : typeof e == "object" && (a = {
1967
- ...u,
2155
+ if (typeof e == "boolean" ? a = r : typeof e == "object" && (a = {
2156
+ ...r,
1968
2157
  ...e
1969
2158
  }), console.log("collect", a), console.log(Array.isArray(t)), !Array.isArray(t))
1970
2159
  throw new TypeError("需要配置数组");
1971
2160
  console.log("ddd");
1972
2161
  let i = [], n = 0;
1973
2162
  const f = [];
1974
- return Array.isArray(t) && (i = t, i.forEach((o, c) => {
1975
- var m, x;
1976
- o.permission ? Nt(o.permission) && ((!e || c < a.max) && (n += ((m = o == null ? void 0 : o.label) == null ? void 0 : m.length) * 12 + 36), f.push(o)) : ((!e || c < a.max) && (n += ((x = o == null ? void 0 : o.label) == null ? void 0 : x.length) * 12 + 36), f.push(o));
2163
+ return Array.isArray(t) && (i = t, i.forEach((o, d) => {
2164
+ var m, h;
2165
+ o.permission ? be(o.permission) && ((!e || d < a.max) && (n += ((m = o == null ? void 0 : o.label) == null ? void 0 : m.length) * 12 + 36), f.push(o)) : ((!e || d < a.max) && (n += ((h = o == null ? void 0 : o.label) == null ? void 0 : h.length) * 12 + 36), f.push(o));
1977
2166
  })), n = Math.max(80, n), n += 0, a && (n += 2), f.length ? {
1978
2167
  title: "操作",
1979
2168
  key: "opr",
@@ -1981,118 +2170,151 @@ function hl(t, l = null, e) {
1981
2170
  align: "left",
1982
2171
  width: n,
1983
2172
  ...l,
1984
- render(o, c) {
1985
- const m = a ? d(Xt, {
2173
+ render(o, d) {
2174
+ const m = a ? s(ml, {
1986
2175
  data: o,
1987
- index: c,
2176
+ index: d,
1988
2177
  max: a.max,
1989
2178
  options: f
1990
2179
  }, null) : f.map(({
1991
- isRender: x = () => !0,
1992
- onClick: b = null,
2180
+ isRender: h = () => !0,
2181
+ onClick: p = null,
1993
2182
  mode: A = null,
1994
- disabled: N = !1,
1995
- type: r = "primary",
1996
- ...h
1997
- }, y) => x != null && x(o) ? A === "pop" ? d(Te, {
1998
- onClick: b,
2183
+ disabled: D = !1,
2184
+ type: M = "primary",
2185
+ ...S
2186
+ }, u) => h != null && h(o) ? A === "pop" ? s(He, {
2187
+ onClick: p,
1999
2188
  row: o,
2000
- index: c,
2001
- action: h,
2002
- key: X(o, c) + y
2189
+ index: d,
2190
+ action: S,
2191
+ key: ne(o, d) + u
2003
2192
  }, {
2004
- default: () => [d(z, I({
2193
+ default: () => [s(Q, I({
2005
2194
  text: !0,
2006
- disabled: N && N(o),
2007
- type: N && N(o) ? "default" : r
2008
- }, h), {
2009
- default: () => [typeof (h == null ? void 0 : h.label) == "function" ? h == null ? void 0 : h.label(o) : h == null ? void 0 : h.label]
2195
+ disabled: D && D(o),
2196
+ type: D && D(o) ? "default" : M
2197
+ }, S), {
2198
+ default: () => [typeof (S == null ? void 0 : S.label) == "function" ? S == null ? void 0 : S.label(o) : S == null ? void 0 : S.label]
2010
2199
  })]
2011
- }) : d(Ye, {
2200
+ }) : s(We, {
2012
2201
  row: o,
2013
2202
  action: {
2014
- ...h,
2015
- disabled: N,
2016
- onClick: b,
2017
- type: r
2203
+ ...S,
2204
+ disabled: D,
2205
+ onClick: p,
2206
+ type: M
2018
2207
  },
2019
- index: c,
2020
- key: X(o, c) + y
2021
- }, null) : void 0).filter((x) => x);
2022
- return l != null && l.isRender ? l == null ? void 0 : l.render(o) : d(k, {
2208
+ index: d,
2209
+ key: ne(o, d) + u
2210
+ }, null) : void 0).filter((h) => h);
2211
+ return l != null && l.isRender ? l == null ? void 0 : l.render(o) : s(z, {
2023
2212
  align: "center",
2024
2213
  "wrap-item": !1,
2025
2214
  size: 18,
2026
- key: X(o, c)
2027
- }, Zt(m) ? m : {
2215
+ key: ne(o, d)
2216
+ }, hl(m) ? m : {
2028
2217
  default: () => [m]
2029
2218
  });
2030
2219
  }
2031
2220
  } : void 0;
2032
2221
  }
2033
- function Qt(t) {
2222
+ async function gl(t, l = null) {
2223
+ const e = getDialogInstance();
2224
+ if (!e)
2225
+ throw new Error("无法获取 dialog 实例。请使用 useQRCode hook 或在组件中通过 setupConfig 注册 dialog 实例。");
2226
+ const r = P(null), a = P(!1), i = J({
2227
+ type: "info",
2228
+ showIcon: !1,
2229
+ style: {
2230
+ width: "350px",
2231
+ height: "350px"
2232
+ },
2233
+ content: () => s("div", {
2234
+ className: "qr-box"
2235
+ }, [a.value ? s(Ft, {
2236
+ class: "qr-spin",
2237
+ show: !0
2238
+ }, null) : "", s("div", {
2239
+ className: "qr-img"
2240
+ }, [s(Mt, {
2241
+ src: r.value,
2242
+ style: {
2243
+ width: "100%"
2244
+ }
2245
+ }, null)]), s("div", {
2246
+ className: "qr-title"
2247
+ }, [a.value ? "" : t.name])])
2248
+ }, e);
2249
+ return e.info(i), l && (a.value = !0, r.value = await l(), a.value = !1), !0;
2250
+ }
2251
+ function Ll() {
2252
+ const t = xe();
2253
+ return Le(t), (l, e) => gl(l, e);
2254
+ }
2255
+ function pl(t) {
2034
2256
  var l, e;
2035
2257
  if ((l = t == null ? void 0 : t.children) != null && l.length) {
2036
- const u = [];
2258
+ const r = [];
2037
2259
  t.children.forEach((a) => {
2038
- var n, f, o, c;
2039
- Qt(a);
2260
+ var n, f, o, d;
2261
+ pl(a);
2040
2262
  let i = [];
2041
- typeof ((n = a == null ? void 0 : a.meta) == null ? void 0 : n.permission) == "string" ? i = [a.meta.permission] : Array.isArray((f = a.meta) == null ? void 0 : f.permission) ? i.push(...a.meta.permission) : typeof ((o = a.meta) == null ? void 0 : o.permission) == "object" ? i.push(...vt(Pe(a.meta.permission))) : (c = a == null ? void 0 : a.meta) != null && c.permission || (i = null), a.meta.permission = i, u.push(...new Set(i));
2042
- }), (e = t == null ? void 0 : t.meta) != null && e.permission ? t.meta.permission = [...new Set(t.meta.permission.concat(u))] : t.meta.permission = u;
2263
+ typeof ((n = a == null ? void 0 : a.meta) == null ? void 0 : n.permission) == "string" ? i = [a.meta.permission] : Array.isArray((f = a.meta) == null ? void 0 : f.permission) ? i.push(...a.meta.permission) : typeof ((o = a.meta) == null ? void 0 : o.permission) == "object" ? i.push(...bl(Ge(a.meta.permission))) : (d = a == null ? void 0 : a.meta) != null && d.permission || (i = null), a.meta.permission = i, r.push(...new Set(i));
2264
+ }), (e = t == null ? void 0 : t.meta) != null && e.permission ? t.meta.permission = [...new Set(t.meta.permission.concat(r))] : t.meta.permission = r;
2043
2265
  }
2044
2266
  return t;
2045
2267
  }
2046
- function vt(...t) {
2268
+ function bl(...t) {
2047
2269
  const l = t == null ? void 0 : t.map((e) => Array.isArray(e) ? e : e == null ? void 0 : e.ALL);
2048
2270
  return [].concat(...l);
2049
2271
  }
2050
- function Pe(t) {
2051
- return t ? Object.keys(t).reduce((l, e) => (typeof t[e] != "string" ? l.concat(Pe(t[e])) : l.push(t[e]), l), []) : [];
2272
+ function Ge(t) {
2273
+ return t ? Object.keys(t).reduce((l, e) => (typeof t[e] != "string" ? l.concat(Ge(t[e])) : l.push(t[e]), l), []) : [];
2052
2274
  }
2053
- function gl(...t) {
2275
+ function jl(...t) {
2054
2276
  return {
2055
- ...el("api", t)
2277
+ ...wl("api", t)
2056
2278
  };
2057
2279
  }
2058
- function pl(t, l = {}) {
2280
+ function Vl(t, l = {}) {
2059
2281
  const e = Object.keys(l);
2060
- return e.length && e.forEach((u) => {
2061
- const a = new RegExp(`${u}`, "g");
2062
- t = t == null ? void 0 : t.replace(a, l[u]);
2282
+ return e.length && e.forEach((r) => {
2283
+ const a = new RegExp(`${r}`, "g");
2284
+ t = t == null ? void 0 : t.replace(a, l[r]);
2063
2285
  }), t;
2064
2286
  }
2065
- function el(t, l) {
2287
+ function wl(t, l) {
2066
2288
  var n;
2067
- const e = Ue(), u = St(), a = Ie(((n = e == null ? void 0 : e.meta) == null ? void 0 : n[t]) ?? {}), i = ce(l[0]);
2068
- return i != null && i.length && u.getRoutes().filter((o) => i.includes(o.name)).forEach((o) => {
2069
- var c;
2070
- (c = o.meta) != null && c[t] && (a[o.name] = Ie(o.meta[t]));
2289
+ const e = Re(), r = Tt(), a = Ee(((n = e == null ? void 0 : e.meta) == null ? void 0 : n[t]) ?? {}), i = Oe(l[0]);
2290
+ return i != null && i.length && r.getRoutes().filter((o) => i.includes(o.name)).forEach((o) => {
2291
+ var d;
2292
+ (d = o.meta) != null && d[t] && (a[o.name] = Ee(o.meta[t]));
2071
2293
  }), {
2072
2294
  ...a
2073
2295
  };
2074
2296
  }
2075
- function Ie(t = {}) {
2297
+ function Ee(t = {}) {
2076
2298
  return Object.keys(t).reduce((l, e) => {
2077
- const u = t[e];
2078
- return typeof u == "object" ? l[e] = u == null ? void 0 : u.key : typeof u == "string" && (l[e] = String(u)), l;
2299
+ const r = t[e];
2300
+ return typeof r == "object" ? l[e] = r == null ? void 0 : r.key : typeof r == "string" && (l[e] = String(r)), l;
2079
2301
  }, {});
2080
2302
  }
2081
- function tl(t, l = "") {
2303
+ function xl(t, l = "") {
2082
2304
  return t.length ? (t.forEach((e) => {
2083
2305
  var i;
2084
- e.children && tl(e.children, e == null ? void 0 : e.path), e.path && (e.sourceFullPath = `${l ? `${l}/`.replace(/^\/\//, "/") : ""}${e.path}`), e.meta || (e.meta = {});
2085
- const u = (e == null ? void 0 : e.title) ?? ((i = e == null ? void 0 : e.meta) == null ? void 0 : i.title) ?? "未命名页面";
2086
- e != null && e.api && (e.meta.api = e.api), u && (e.meta.title = u, e.title = u), e != null && e.hidden && (e.meta.hidden = e.hidden);
2306
+ e.children && xl(e.children, e == null ? void 0 : e.path), e.path && (e.sourceFullPath = `${l ? `${l}/`.replace(/^\/\//, "/") : ""}${e.path}`), e.meta || (e.meta = {});
2307
+ const r = (e == null ? void 0 : e.title) ?? ((i = e == null ? void 0 : e.meta) == null ? void 0 : i.title) ?? "未命名页面";
2308
+ e != null && e.api && (e.meta.api = e.api), r && (e.meta.title = r, e.title = r), e != null && e.hidden && (e.meta.hidden = e.hidden);
2087
2309
  let a = [];
2088
2310
  e != null && e.auth && (e.meta.auth = e.auth, a = Object.keys(e.auth).reduce((n, f) => (typeof e.auth[f] == "string" ? n.push(e.auth[f]) : typeof e.auth[f] == "boolean" && n.push(f), n), [])), e != null && e.permission && (e.meta.permission = e.permission), e.meta.permission && Array.isArray(e.meta.permission) ? e.meta.permission = e.meta.permission.concat(a) : a.length && (e.meta.permission = a);
2089
2311
  }), t) : [];
2090
2312
  }
2091
- const ae = {
2313
+ const ye = {
2092
2314
  ascend: {
2093
2315
  title: "升序",
2094
2316
  value: !0,
2095
- Icon: d(Ct, null, null),
2317
+ Icon: s(Bt, null, null),
2096
2318
  fn: (t, l) => {
2097
2319
  t.desc = !0, t.sortFieldName = l;
2098
2320
  }
@@ -2100,7 +2322,7 @@ const ae = {
2100
2322
  descend: {
2101
2323
  title: "降序",
2102
2324
  value: !1,
2103
- Icon: d(Ot, null, null),
2325
+ Icon: s(Et, null, null),
2104
2326
  fn: (t) => {
2105
2327
  t.sortFieldName = "", t.desc = !0;
2106
2328
  }
@@ -2108,7 +2330,7 @@ const ae = {
2108
2330
  false: {
2109
2331
  title: "默认",
2110
2332
  value: null,
2111
- Icon: d(wt, {
2333
+ Icon: s(qt, {
2112
2334
  style: "transform:rotateZ(90deg)"
2113
2335
  }, null),
2114
2336
  fn: (t) => {
@@ -2116,30 +2338,58 @@ const ae = {
2116
2338
  }
2117
2339
  }
2118
2340
  };
2341
+ function Ol(t, l = {}) {
2342
+ X(t);
2343
+ }
2344
+ const zl = {
2345
+ install: Ol
2346
+ };
2119
2347
  export {
2120
- Ne as ArrayToObject,
2121
- ml as CommonQuery,
2122
- Be as DataForm,
2123
- Ut as DataTable,
2124
- qe as ObjectToArray,
2125
- Ye as OprButton,
2126
- zt as Options,
2127
- Te as Pop,
2128
- Qt as cellectChildenPermission,
2129
- Ht as commonDialogMethod,
2130
- hl as createActionColumnJsx,
2131
- qt as customUpload,
2132
- Oe as ellipsis,
2133
- dl as getAllOptions,
2134
- Ee as getOptions,
2135
- P as globalLabelField,
2136
- Y as globalValueField,
2137
- pl as handleParams,
2138
- tl as initRouteMeta,
2139
- Lt as initRules,
2140
- ae as orderEnum,
2141
- cl as registryUpload,
2142
- yl as setupOptions,
2143
- ce as toArray,
2144
- gl as useApiConfig
2348
+ $e as ArrayToObject,
2349
+ Yl as CommonQuery,
2350
+ zl as CorePlugin,
2351
+ ze as DataForm,
2352
+ Jt as DataTable,
2353
+ ke as ObjectToArray,
2354
+ We as OprButton,
2355
+ il as Options,
2356
+ He as Pop,
2357
+ Pl as autoRegisterDirectives,
2358
+ pl as cellectChildenPermission,
2359
+ be as checkPermission,
2360
+ Ke as commonDialogMethod,
2361
+ kl as createActionColumnJsx,
2362
+ _l as createDialog,
2363
+ Rl as createDialogMethods,
2364
+ J as createDialogOptions,
2365
+ gl as createQRCode,
2366
+ Qt as customUpload,
2367
+ Me as ellipsis,
2368
+ El as getAllOptions,
2369
+ Vt as getBaseURL,
2370
+ Ml as getConfig,
2371
+ Kt as getDialogConfig,
2372
+ $l as getDialogInstance,
2373
+ W as getFileUrl,
2374
+ Ht as getGlobalApp,
2375
+ Ul as getHasPermission,
2376
+ Ve as getOptions,
2377
+ zt as getUploadMethod,
2378
+ j as globalLabelField,
2379
+ k as globalValueField,
2380
+ Vl as handleParams,
2381
+ xl as initRouteMeta,
2382
+ sl as initRules,
2383
+ Ol as install,
2384
+ ye as orderEnum,
2385
+ Wt as permissionDirective,
2386
+ Le as registerDialogInstance,
2387
+ X as registerDirectives,
2388
+ ql as registryUpload,
2389
+ jt as setupConfig,
2390
+ Bl as setupOptions,
2391
+ Oe as toArray,
2392
+ jl as useApiConfig,
2393
+ Tl as useCommonDialog,
2394
+ Ll as useQRCode
2145
2395
  };