@chewel611/naive-ui-plus 0.0.16 → 0.0.18

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.js CHANGED
@@ -1,5 +1,5 @@
1
- import { useDialog as $e, useMessage as ce, NCard as Ke, NDataTable as Ye, NModal as Oe, NSpace as Me, NButton as q, NTooltip as Ne, NIcon as N, NDropdown as G, NAvatar as Ee, NBreadcrumb as Xe, NBreadcrumbItem as Ge, NDivider as Je, useThemeVars as Ze, NMenu as Qe, NLayout as Le, NLayoutSider as et, NFlex as tt, NLayoutHeader as at, NLayoutContent as ot, NBackTop as lt, NConfigProvider as nt, dateZhCN as st, zhCN as rt, NDialogProvider as it, NNotificationProvider as ct, NMessageProvider as dt, NText as ut } from "naive-ui";
2
- import { defineComponent as I, ref as O, computed as H, unref as a, onMounted as ee, createBlock as $, openBlock as y, withCtx as s, createElementVNode as b, createElementBlock as B, createCommentVNode as A, createVNode as r, renderSlot as U, normalizeStyle as re, createTextVNode as V, h as z, toRaw as X, reactive as Re, withDirectives as ft, normalizeClass as Q, toDisplayString as F, vShow as pt, nextTick as ie, inject as De, Fragment as Te, renderList as gt, resolveDynamicComponent as be, withModifiers as ye, resolveComponent as ht, KeepAlive as mt, useCssVars as vt, watch as ze, provide as _t, mergeProps as bt } from "vue";
1
+ import { useDialog as $e, useMessage as ce, NCard as Ke, NDataTable as Ye, NModal as Oe, NSpace as Me, NButton as q, NTooltip as Ne, NIcon as N, NDropdown as G, NAvatar as Ee, NBreadcrumb as Xe, NBreadcrumbItem as Ge, NDivider as Je, useThemeVars as Ze, NMenu as Qe, NLayout as Le, NLayoutSider as et, NFlex as tt, NLayoutHeader as at, NLayoutContent as ot, NBackTop as lt, NConfigProvider as nt, dateZhCN as st, zhCN as it, NDialogProvider as rt, NNotificationProvider as ct, NMessageProvider as dt, NText as ut } from "naive-ui";
2
+ import { defineComponent as I, ref as M, computed as H, unref as a, onMounted as ee, createBlock as $, openBlock as y, withCtx as s, createElementVNode as b, createElementBlock as B, createCommentVNode as A, createVNode as i, renderSlot as U, normalizeStyle as ie, createTextVNode as V, h as z, toRaw as X, reactive as Re, withDirectives as ft, normalizeClass as Q, toDisplayString as F, vShow as pt, nextTick as re, inject as De, Fragment as Te, renderList as gt, resolveDynamicComponent as be, withModifiers as ye, resolveComponent as ht, KeepAlive as mt, useCssVars as vt, watch as ze, provide as _t, mergeProps as bt } from "vue";
3
3
  import { PlusSquareOutlined as yt, DeleteOutlined as wt, ReloadOutlined as we, MoreOutlined as kt, MenuUnfoldOutlined as Ct, MenuFoldOutlined as Pt, FullscreenOutlined as St, FullscreenExitOutlined as Lt, CloseOutlined as xe, ColumnWidthOutlined as Tt, MinusOutlined as xt, LeftOutlined as $t, RightOutlined as Ot, DownOutlined as Mt } from "@vicons/antd";
4
4
  import { cloneDeep as Nt } from "lodash";
5
5
  import { defineStore as Ae } from "pinia";
@@ -8,8 +8,8 @@ import Et from "element-resize-detector";
8
8
  import Rt from "vuedraggable";
9
9
  const Be = (t) => {
10
10
  Object.keys(t).forEach((d) => {
11
- const g = t[d];
12
- Array.isArray(g) ? t[d] = [] : g !== null && typeof g == "object" ? Be(g) : t[d] = void 0;
11
+ const h = t[d];
12
+ Array.isArray(h) ? t[d] = [] : h !== null && typeof h == "object" ? Be(h) : t[d] = void 0;
13
13
  });
14
14
  }, Dt = { id: "data-content" }, zt = {
15
15
  key: 0,
@@ -32,7 +32,7 @@ const Be = (t) => {
32
32
  onDelete: {}
33
33
  },
34
34
  setup(t, { expose: d }) {
35
- const g = O(null), h = $e(), C = ce(), v = O(!1), L = O([]), w = O([]), T = O(null), x = O(!1), u = O(!1), f = O(!1), i = O({}), P = O({
35
+ const h = M(null), v = $e(), w = ce(), p = M(!1), L = M([]), k = M([]), T = M(null), x = M(!1), u = M(!1), f = M(!1), r = M({}), P = M({
36
36
  page: 1,
37
37
  itemCount: 0,
38
38
  pageSize: 10,
@@ -47,11 +47,11 @@ const Be = (t) => {
47
47
  }), o = t, m = (c) => {
48
48
  const e = (l) => {
49
49
  const n = [];
50
- return c && c.forEach((k) => {
51
- k.key !== "edit" && k.key !== "delete" && n.push({
52
- label: k.name,
53
- key: k.key,
54
- props: { onClick: () => k.action(l) }
50
+ return c && c.forEach((C) => {
51
+ C.key !== "edit" && C.key !== "delete" && n.push({
52
+ label: C.name,
53
+ key: C.key,
54
+ props: { onClick: () => C.action(l) }
55
55
  });
56
56
  }), n;
57
57
  };
@@ -87,7 +87,7 @@ const Be = (t) => {
87
87
  );
88
88
  }
89
89
  };
90
- }, p = H(() => {
90
+ }, g = H(() => {
91
91
  const c = o.columns.filter((l) => l.key != "action").map((l) => ({
92
92
  title: l.title,
93
93
  key: l.key,
@@ -108,11 +108,11 @@ const Be = (t) => {
108
108
  await W();
109
109
  }, D = (c) => {
110
110
  S([c]);
111
- }, M = () => {
111
+ }, O = () => {
112
112
  const c = Y();
113
113
  S(c);
114
114
  }, S = (c) => {
115
- c && c.length > 0 && h.warning({
115
+ c && c.length > 0 && v.warning({
116
116
  title: "警告",
117
117
  content: "删除数据不可恢复, 确认删除吗?",
118
118
  positiveText: "确定",
@@ -120,9 +120,9 @@ const Be = (t) => {
120
120
  onPositiveClick: async () => {
121
121
  if (o.onDelete)
122
122
  try {
123
- await o.onDelete(c) ? (W(), C.success("删除成功")) : C.error("删除失败");
123
+ await o.onDelete(c) ? (W(), w.success("删除成功")) : w.error("删除失败");
124
124
  } catch (e) {
125
- C.error(e.message);
125
+ w.error(e.message);
126
126
  }
127
127
  }
128
128
  });
@@ -137,35 +137,35 @@ const Be = (t) => {
137
137
  try {
138
138
  f.value = !0, (x.value ? await o.onSave(void 0, X(o.item)) : await o.onSave(T.value[o.idField], X(o.item))) && (K(), await W());
139
139
  } catch (c) {
140
- C.error(c.message);
140
+ w.error(c.message);
141
141
  } finally {
142
142
  f.value = !1;
143
143
  }
144
144
  }, le = async (c, e) => {
145
145
  o.onOpenModal?.(c), await e?.(), c ? (x.value = !1, u.value = !0) : (u.value = !1, x.value = !0);
146
146
  }, K = () => {
147
- T.value = null, Be(o.item), Object.assign(o.item, { ...X(i.value) }), o.onCloseModal?.(o.item), x.value = !1, u.value = !1;
148
- }, Y = () => L.value ? w.value.filter((e) => L.value.includes(e.id)).map((e) => X(e)) : [], fe = () => Y()[0], pe = () => X(w.value), W = async () => {
149
- if (!v.value) {
150
- v.value = !0;
147
+ T.value = null, Be(o.item), Object.assign(o.item, { ...X(r.value) }), o.onCloseModal?.(o.item), x.value = !1, u.value = !1;
148
+ }, Y = () => L.value ? k.value.filter((e) => L.value.includes(e.id)).map((e) => X(e)) : [], fe = () => Y()[0], pe = () => X(k.value), W = async () => {
149
+ if (!p.value) {
150
+ p.value = !0;
151
151
  try {
152
152
  if (o.onLoad) {
153
153
  var { data: c, total: e } = await o.onLoad(
154
154
  P.value.page,
155
155
  P.value.pageSize
156
156
  );
157
- w.value = c, P.value.itemCount = e;
157
+ k.value = c, P.value.itemCount = e;
158
158
  }
159
159
  } catch (l) {
160
- C.error(l.message);
160
+ w.error(l.message);
161
161
  } finally {
162
- v.value = !1;
162
+ p.value = !1;
163
163
  }
164
164
  }
165
165
  }, ge = H(() => {
166
- const c = a(g);
166
+ const c = a(h);
167
167
  if (!c) return;
168
- const e = c?.$el, l = e.querySelector(".n-data-table-thead "), { bottomIncludeBody: n } = Z(l), k = 64;
168
+ const e = c?.$el, l = e.querySelector(".n-data-table-thead "), { bottomIncludeBody: n } = Z(l), C = 64;
169
169
  let E = 2, R = 24;
170
170
  const j = e.querySelector(
171
171
  ".n-data-table__pagination"
@@ -175,14 +175,14 @@ const Be = (t) => {
175
175
  E += me || 0;
176
176
  } else
177
177
  E += 28;
178
- return n - (k + E + R);
178
+ return n - (C + E + R);
179
179
  }), ne = (c) => !c || !c.getBoundingClientRect ? 0 : c.getBoundingClientRect(), Z = (c) => {
180
- const e = document.documentElement, l = e.scrollLeft, n = e.scrollTop, k = e.clientLeft, E = e.clientTop, R = window.pageXOffset, j = window.pageYOffset, se = ne(c), {
180
+ const e = document.documentElement, l = e.scrollLeft, n = e.scrollTop, C = e.clientLeft, E = e.clientTop, R = window.pageXOffset, j = window.pageYOffset, se = ne(c), {
181
181
  left: me,
182
182
  top: We,
183
183
  width: He,
184
184
  height: Ue
185
- } = se, Fe = (R || l) - (k || 0), je = (j || n) - (E || 0), qe = me + R, Ve = We + j, ve = qe - Fe, _e = Ve - je, Pe = window.document.documentElement.clientWidth, Se = window.document.documentElement.clientHeight;
185
+ } = se, Fe = (R || l) - (C || 0), je = (j || n) - (E || 0), qe = me + R, Ve = We + j, ve = qe - Fe, _e = Ve - je, Pe = window.document.documentElement.clientWidth, Se = window.document.documentElement.clientHeight;
186
186
  return {
187
187
  left: ve,
188
188
  top: _e,
@@ -192,7 +192,7 @@ const Be = (t) => {
192
192
  bottomIncludeBody: Se - _e
193
193
  };
194
194
  }, he = () => {
195
- i.value = { ...X(o.item) };
195
+ r.value = { ...X(o.item) };
196
196
  };
197
197
  return ee(async () => {
198
198
  he(), await W();
@@ -206,7 +206,7 @@ const Be = (t) => {
206
206
  P.value.page = 1;
207
207
  }
208
208
  }), (c, e) => {
209
- const l = Ne, n = Ye, k = Me, E = Oe;
209
+ const l = Ne, n = Ye, C = Me, E = Oe;
210
210
  return y(), $(a(Ke), {
211
211
  title: " ",
212
212
  "header-class": "p-4",
@@ -219,13 +219,13 @@ const Be = (t) => {
219
219
  trigger: "hover"
220
220
  }, {
221
221
  trigger: s(() => [
222
- r(a(N), {
222
+ i(a(N), {
223
223
  size: "18",
224
224
  class: "mr-1 cursor-pointer hover:text-blue-600",
225
225
  onClick: J
226
226
  }, {
227
227
  default: s(() => [
228
- r(a(yt))
228
+ i(a(yt))
229
229
  ]),
230
230
  _: 1
231
231
  })
@@ -241,13 +241,13 @@ const Be = (t) => {
241
241
  trigger: "hover"
242
242
  }, {
243
243
  trigger: s(() => [
244
- r(a(N), {
244
+ i(a(N), {
245
245
  size: "18",
246
246
  class: "mr-1 cursor-pointer hover:text-blue-600",
247
- onClick: M
247
+ onClick: O
248
248
  }, {
249
249
  default: s(() => [
250
- r(a(wt))
250
+ i(a(wt))
251
251
  ]),
252
252
  _: 1
253
253
  })
@@ -258,15 +258,15 @@ const Be = (t) => {
258
258
  _: 1,
259
259
  __: [4]
260
260
  })),
261
- r(l, { trigger: "hover" }, {
261
+ i(l, { trigger: "hover" }, {
262
262
  trigger: s(() => [
263
- r(a(N), {
263
+ i(a(N), {
264
264
  size: "18",
265
265
  class: "cursor-pointer hover:text-blue-600",
266
266
  onClick: _
267
267
  }, {
268
268
  default: s(() => [
269
- r(a(we))
269
+ i(a(we))
270
270
  ]),
271
271
  _: 1
272
272
  })
@@ -283,23 +283,23 @@ const Be = (t) => {
283
283
  c.$slots.toolbar ? (y(), B("div", zt, [
284
284
  U(c.$slots, "toolbar")
285
285
  ])) : A("", !0),
286
- r(n, {
286
+ i(n, {
287
287
  remote: "",
288
288
  ref_key: "$table",
289
- ref: g,
289
+ ref: h,
290
290
  "checked-row-keys": L.value,
291
291
  "onUpdate:checkedRowKeys": e[0] || (e[0] = (R) => L.value = R),
292
292
  "max-height": ge.value,
293
- loading: v.value,
293
+ loading: p.value,
294
294
  bordered: !1,
295
295
  "single-line": !1,
296
- columns: p.value,
297
- data: w.value,
296
+ columns: g.value,
297
+ data: k.value,
298
298
  pagination: P.value,
299
299
  "row-key": (R) => R[c.idField]
300
300
  }, null, 8, ["checked-row-keys", "max-height", "loading", "columns", "data", "pagination", "row-key"]),
301
301
  c.$slots.addModal ? (y(), B("div", At, [
302
- r(E, {
302
+ i(E, {
303
303
  title: "新增",
304
304
  preset: "card",
305
305
  show: x.value,
@@ -308,12 +308,13 @@ const Be = (t) => {
308
308
  closable: !1,
309
309
  "close-on-esc": !1,
310
310
  "mask-closable": !1,
311
- style: re({ width: `${c.modalWidth}px` })
311
+ draggable: !0,
312
+ style: ie({ width: `${c.modalWidth}px` })
312
313
  }, {
313
314
  action: s(() => [
314
- r(k, { justify: "end" }, {
315
+ i(C, { justify: "end" }, {
315
316
  default: s(() => [
316
- r(a(q), {
317
+ i(a(q), {
317
318
  type: "primary",
318
319
  loading: f.value,
319
320
  onClick: oe
@@ -324,7 +325,7 @@ const Be = (t) => {
324
325
  _: 1,
325
326
  __: [6]
326
327
  }, 8, ["loading"]),
327
- r(a(q), { onClick: K }, {
328
+ i(a(q), { onClick: K }, {
328
329
  default: s(() => e[7] || (e[7] = [
329
330
  V("取消", -1)
330
331
  ])),
@@ -342,7 +343,7 @@ const Be = (t) => {
342
343
  }, 8, ["show", "style"])
343
344
  ])) : A("", !0),
344
345
  c.$slots.editModal ? (y(), B("div", Bt, [
345
- r(E, {
346
+ i(E, {
346
347
  title: "编辑",
347
348
  show: u.value,
348
349
  "onUpdate:show": e[2] || (e[2] = (R) => u.value = R),
@@ -351,12 +352,13 @@ const Be = (t) => {
351
352
  closable: !1,
352
353
  "close-on-esc": !1,
353
354
  "mask-closable": !1,
354
- style: re({ width: `${c.modalWidth}px` })
355
+ draggable: !0,
356
+ style: ie({ width: `${c.modalWidth}px` })
355
357
  }, {
356
358
  action: s(() => [
357
- r(k, { justify: "end" }, {
359
+ i(C, { justify: "end" }, {
358
360
  default: s(() => [
359
- r(a(q), {
361
+ i(a(q), {
360
362
  type: "primary",
361
363
  loading: f.value,
362
364
  onClick: oe
@@ -367,7 +369,7 @@ const Be = (t) => {
367
369
  _: 1,
368
370
  __: [8]
369
371
  }, 8, ["loading"]),
370
- r(a(q), { onClick: K }, {
372
+ i(a(q), { onClick: K }, {
371
373
  default: s(() => e[9] || (e[9] = [
372
374
  V("取消", -1)
373
375
  ])),
@@ -392,8 +394,8 @@ const Be = (t) => {
392
394
  }
393
395
  }), te = (t) => {
394
396
  const d = t;
395
- return d.install = function(g) {
396
- g.component(d.__name, t);
397
+ return d.install = function(h) {
398
+ h.component(d.__name, t);
397
399
  }, t;
398
400
  }, Wt = te(It), Ht = ["Redirect", "RedirectSon", "login"], ae = Ae("p-layout", () => {
399
401
  const t = Re({
@@ -409,14 +411,14 @@ const Be = (t) => {
409
411
  return {
410
412
  state: t,
411
413
  initTabs: (o) => {
412
- o.sort((m, p) => (p.meta.affix ? 1 : 0) - (m.meta.affix ? 1 : 0)), t.tabs = o;
414
+ o.sort((m, g) => (g.meta.affix ? 1 : 0) - (m.meta.affix ? 1 : 0)), t.tabs = o;
413
415
  },
414
416
  addTab: (o) => Ht.includes(o.name) ? !1 : (t.tabs?.some(
415
- (p) => p.fullPath == o.fullPath
417
+ (g) => g.fullPath == o.fullPath
416
418
  ) || t.tabs?.push(o), !0),
417
419
  closeCurrentTab: (o) => {
418
420
  const m = t.tabs.findIndex(
419
- (p) => p.fullPath == o.fullPath
421
+ (g) => g.fullPath == o.fullPath
420
422
  );
421
423
  t.tabs.splice(m, 1);
422
424
  },
@@ -430,18 +432,18 @@ const Be = (t) => {
430
432
  },
431
433
  closeLeftTabs: (o) => {
432
434
  const m = t.tabs.findIndex(
433
- (p) => p.fullPath == o.fullPath
435
+ (g) => g.fullPath == o.fullPath
434
436
  );
435
437
  t.tabs = t.tabs.filter(
436
- (p, _) => _ >= m || (p?.meta?.affix ?? !1)
438
+ (g, _) => _ >= m || (g?.meta?.affix ?? !1)
437
439
  );
438
440
  },
439
441
  closeRightTabs: (o) => {
440
442
  const m = t.tabs.findIndex(
441
- (p) => p.fullPath == o.fullPath
443
+ (g) => g.fullPath == o.fullPath
442
444
  );
443
445
  t.tabs = t.tabs.filter(
444
- (p, _) => _ <= m || (p?.meta?.affix ?? !1)
446
+ (g, _) => _ <= m || (g?.meta?.affix ?? !1)
445
447
  );
446
448
  },
447
449
  collapse: () => {
@@ -467,8 +469,8 @@ const Be = (t) => {
467
469
  __name: "PLogo",
468
470
  setup(t) {
469
471
  const d = ae();
470
- return (g, h) => (y(), B("div", Ut, [
471
- r(a(Ee), {
472
+ return (h, v) => (y(), B("div", Ut, [
473
+ i(a(Ee), {
472
474
  color: "var(--color-logo)",
473
475
  size: 32,
474
476
  src: a(d).state.logo,
@@ -480,10 +482,10 @@ const Be = (t) => {
480
482
  ]));
481
483
  }
482
484
  }), de = (t, d) => {
483
- const g = t.__vccOpts || t;
484
- for (const [h, C] of d)
485
- g[h] = C;
486
- return g;
485
+ const h = t.__vccOpts || t;
486
+ for (const [v, w] of d)
487
+ h[v] = w;
488
+ return h;
487
489
  }, jt = /* @__PURE__ */ de(Ft, [["__scopeId", "data-v-c9496d2e"]]), qt = {
488
490
  translationApiUrl: "https://translate.zvo.cn/api",
489
491
  defaultLanguage: "chinese",
@@ -494,25 +496,25 @@ const Be = (t) => {
494
496
  initLanguage: (t) => {
495
497
  }
496
498
  }, Vt = Ae("language", () => {
497
- const t = O(qt), d = (u) => {
499
+ const t = M(qt), d = (u) => {
498
500
  u.forEach((f) => {
499
501
  (f.key === "Chinese" || f.key === "chinese") && (f.key = "chinese_simplified");
500
502
  }), t.value.options = [...u];
501
- }, g = () => t.value.options, h = (u) => {
503
+ }, h = () => t.value.options, v = (u) => {
502
504
  if (t.value.currentLanguage === u)
503
505
  return;
504
506
  const f = t.value.options.find(
505
- (i) => i.key === u
507
+ (r) => r.key === u
506
508
  );
507
509
  f && (t.value.currentLanguage = f.key, t.value.selectCallback(f));
508
- }, C = () => {
510
+ }, w = () => {
509
511
  if (t.value.currentLanguage)
510
512
  return t.value.options.find(
511
513
  (u) => u.key === t.value.currentLanguage
512
514
  );
513
- }, v = (u) => {
515
+ }, p = (u) => {
514
516
  t.value.selectCallback = u;
515
- }, L = () => t.value.translationApiUrl, w = (u) => {
517
+ }, L = () => t.value.translationApiUrl, k = (u) => {
516
518
  t.value.translationApiUrl = u;
517
519
  }, T = (u) => {
518
520
  (u === "Chinese" || u === "chinese") && (u = "chinese_simplified"), t.value.defaultLanguage = u;
@@ -521,12 +523,12 @@ const Be = (t) => {
521
523
  t.value.initLanguage(t.value);
522
524
  }), {
523
525
  state: t,
524
- select: h,
526
+ select: v,
525
527
  setLanguages: d,
526
- getLanguages: g,
527
- getCurrentLanguage: C,
528
- setSelectCallback: v,
529
- setTranslationApiUrl: w,
528
+ getLanguages: h,
529
+ getCurrentLanguage: w,
530
+ setSelectCallback: p,
531
+ setTranslationApiUrl: k,
530
532
  getTranslationApiUrl: L,
531
533
  setDefaultLanguage: T,
532
534
  getDefaultLanguage: x
@@ -536,31 +538,31 @@ const Be = (t) => {
536
538
  setup(t) {
537
539
  const {
538
540
  select: d,
539
- getLanguages: g,
540
- getCurrentLanguage: h,
541
- getDefaultLanguage: C,
542
- getTranslationApiUrl: v
543
- } = Vt(), L = (T) => d(T), w = () => {
544
- window.translate && (window.translate.selectLanguageTag.show = !1, window.translate.selectLanguageTag.languages = g().map((T) => T.key).join(","), window.translate.ignore.class.push("ignore-translate-flag"), window.translate.ignore.id.push("ignore-translation"), window.translate.language.setLocal(C()), window.translate.request.api.translate = "api/v1/translation", window.translate.request.api.connectTest = "api/v1/translation/connect-test", window.translate.request.api.init = "api/v1/translation/init", window.translate.request.api.language = "api/v1/translation/language", window.translate.request.setHost(v()), window.translate.request.listener.start(), window.translate.listener.start(), window.translate.whole.enableAll(), window.translate.execute());
541
+ getLanguages: h,
542
+ getCurrentLanguage: v,
543
+ getDefaultLanguage: w,
544
+ getTranslationApiUrl: p
545
+ } = Vt(), L = (T) => d(T), k = () => {
546
+ window.translate && (window.translate.selectLanguageTag.show = !1, window.translate.selectLanguageTag.languages = h().map((T) => T.key).join(","), window.translate.ignore.class.push("ignore-translate-flag"), window.translate.ignore.id.push("ignore-translation"), window.translate.language.setLocal(w()), window.translate.request.api.translate = "api/v1/translation", window.translate.request.api.connectTest = "api/v1/translation/connect-test", window.translate.request.api.init = "api/v1/translation/init", window.translate.request.api.language = "api/v1/translation/language", window.translate.request.setHost(p()), window.translate.request.listener.start(), window.translate.listener.start(), window.translate.whole.enableAll(), window.translate.execute());
545
547
  };
546
- return ee(async () => await ie(() => w())), (T, x) => {
548
+ return ee(async () => await re(() => k())), (T, x) => {
547
549
  const u = N, f = q;
548
- return a(g)().length > 0 ? (y(), $(a(G), {
550
+ return a(h)().length > 0 ? (y(), $(a(G), {
549
551
  key: 0,
550
552
  id: "ignore-translation",
551
553
  placement: "bottom-start",
552
554
  trigger: "hover",
553
555
  class: "flex flex-col justify-center h-full ignore",
554
556
  onSelect: L,
555
- options: a(g)()
557
+ options: a(h)()
556
558
  }, {
557
559
  default: s(() => [
558
- r(f, {
560
+ i(f, {
559
561
  quaternary: "",
560
562
  type: "info"
561
563
  }, {
562
564
  default: s(() => [
563
- a(h)() ? (y(), B("label", Kt, F(a(h)()?.label), 1)) : (y(), $(u, {
565
+ a(v)() ? (y(), B("label", Kt, F(a(v)()?.label), 1)) : (y(), $(u, {
564
566
  key: 0,
565
567
  size: "18"
566
568
  }, {
@@ -597,29 +599,29 @@ const Be = (t) => {
597
599
  }, Zt = { class: "layout-header-right" }, Qt = { class: "layout-header-trigger-min" }, ea = { class: "layout-header-trigger layout-header-trigger-min" }, ta = { class: "layout-header-trigger layout-header-trigger-min" }, aa = { class: "avatar" }, oa = /* @__PURE__ */ I({
598
600
  __name: "PHeader",
599
601
  setup(t) {
600
- const d = ce(), g = $e(), h = ae(), C = ke(), v = Ce(), L = De("reloadPage"), w = (m) => C.push({ name: m }), T = H(() => x(v.matched)), x = (m) => m.map((p) => {
602
+ const d = ce(), h = $e(), v = ae(), w = ke(), p = Ce(), L = De("reloadPage"), k = (m) => w.push({ name: m }), T = H(() => x(p.matched)), x = (m) => m.map((g) => {
601
603
  const _ = {
602
- key: p.name,
603
- label: p.meta.title,
604
- icon: p.meta.icon,
605
- meta: p.meta,
606
- disabled: p.path === "/",
604
+ key: g.name,
605
+ label: g.meta.title,
606
+ icon: g.meta.icon,
607
+ meta: g.meta,
608
+ disabled: g.path === "/",
607
609
  children: void 0
608
610
  };
609
- return p.children && p.children.length > 0 && (_.children = x(
610
- p.children
611
+ return g.children && g.children.length > 0 && (_.children = x(
612
+ g.children
611
613
  )), _;
612
- }), u = O(!1), f = () => {
614
+ }), u = M(!1), f = () => {
613
615
  document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), u.value = !1) : (document.documentElement.requestFullscreen(), u.value = !0);
614
- }, i = H(() => {
616
+ }, r = H(() => {
615
617
  const m = [];
616
618
  return m.push({
617
619
  label: "退出登录",
618
620
  key: "logout"
619
- }), h.state.settingPages && h.state.settingPages.length > 0 && h.state.settingPages.forEach((p) => {
621
+ }), v.state.settingPages && v.state.settingPages.length > 0 && v.state.settingPages.forEach((g) => {
620
622
  m.push({
621
- label: p.title,
622
- key: p.route
623
+ label: g.title,
624
+ key: g.route
623
625
  });
624
626
  }), m;
625
627
  }), P = (m) => {
@@ -628,18 +630,18 @@ const Be = (t) => {
628
630
  o();
629
631
  break;
630
632
  default:
631
- C.push({ name: m });
633
+ w.push({ name: m });
632
634
  }
633
635
  }, o = () => {
634
- g.info({
636
+ h.info({
635
637
  title: "提示",
636
638
  content: "您确定要退出登录吗",
637
639
  positiveText: "确定",
638
640
  negativeText: "取消",
639
641
  onPositiveClick: async () => {
640
- if (h.state.logout)
642
+ if (v.state.logout)
641
643
  try {
642
- await h.state.logout(), localStorage.removeItem("TABS-ROUTES"), d.error("退出成功");
644
+ await v.state.logout(), localStorage.removeItem("TABS-ROUTES"), d.error("退出成功");
643
645
  } catch (m) {
644
646
  console.error(m), d.error("退出登录失败");
645
647
  } finally {
@@ -652,21 +654,21 @@ const Be = (t) => {
652
654
  }
653
655
  });
654
656
  };
655
- return (m, p) => {
656
- const _ = Ne, D = Je, M = Ee;
657
+ return (m, g) => {
658
+ const _ = Ne, D = Je, O = Ee;
657
659
  return y(), B("div", Yt, [
658
660
  b("div", Xt, [
659
661
  b("div", {
660
662
  class: "ml-1 layout-header-trigger layout-header-trigger-min",
661
- onClick: p[0] || (p[0] = //@ts-ignore
662
- (...S) => a(h).collapse && a(h).collapse(...S))
663
+ onClick: g[0] || (g[0] = //@ts-ignore
664
+ (...S) => a(v).collapse && a(v).collapse(...S))
663
665
  }, [
664
- a(h).state.collapsed ? (y(), $(a(N), {
666
+ a(v).state.collapsed ? (y(), $(a(N), {
665
667
  key: 0,
666
668
  size: "18"
667
669
  }, {
668
670
  default: s(() => [
669
- r(a(Ct))
671
+ i(a(Ct))
670
672
  ]),
671
673
  _: 1
672
674
  })) : (y(), $(a(N), {
@@ -674,24 +676,24 @@ const Be = (t) => {
674
676
  size: "18"
675
677
  }, {
676
678
  default: s(() => [
677
- r(a(Pt))
679
+ i(a(Pt))
678
680
  ]),
679
681
  _: 1
680
682
  }))
681
683
  ]),
682
684
  b("div", {
683
685
  class: "mr-1 layout-header-trigger layout-header-trigger-min",
684
- onClick: p[1] || (p[1] = //@ts-ignore
686
+ onClick: g[1] || (g[1] = //@ts-ignore
685
687
  (...S) => a(L) && a(L)(...S))
686
688
  }, [
687
- r(a(N), { size: "18" }, {
689
+ i(a(N), { size: "18" }, {
688
690
  default: s(() => [
689
- r(a(we))
691
+ i(a(we))
690
692
  ]),
691
693
  _: 1
692
694
  })
693
695
  ]),
694
- r(a(Xe), null, {
696
+ i(a(Xe), null, {
695
697
  default: s(() => [
696
698
  (y(!0), B(Te, null, gt(T.value, (S) => (y(), B(Te, {
697
699
  key: S.label
@@ -701,7 +703,7 @@ const Be = (t) => {
701
703
  S.children && S.children.length ? (y(), $(a(G), {
702
704
  key: 0,
703
705
  options: S.children,
704
- onSelect: w
706
+ onSelect: k
705
707
  }, {
706
708
  default: s(() => [
707
709
  b("span", Gt, [
@@ -724,12 +726,12 @@ const Be = (t) => {
724
726
  ]),
725
727
  b("div", Zt, [
726
728
  b("div", Qt, [
727
- r(Ie)
729
+ i(Ie)
728
730
  ]),
729
731
  b("div", ea, [
730
- r(_, { placement: "bottom" }, {
732
+ i(_, { placement: "bottom" }, {
731
733
  trigger: s(() => [
732
- r(a(N), {
734
+ i(a(N), {
733
735
  size: "18",
734
736
  onClick: ye(f, ["stop"])
735
737
  }, {
@@ -740,25 +742,25 @@ const Be = (t) => {
740
742
  })
741
743
  ]),
742
744
  default: s(() => [
743
- p[2] || (p[2] = b("span", null, "全屏", -1))
745
+ g[2] || (g[2] = b("span", null, "全屏", -1))
744
746
  ]),
745
747
  _: 1,
746
748
  __: [2]
747
749
  })
748
750
  ]),
749
751
  b("div", ta, [
750
- r(a(G), {
752
+ i(a(G), {
751
753
  trigger: "hover",
752
754
  onSelect: P,
753
- options: i.value
755
+ options: r.value
754
756
  }, {
755
757
  default: s(() => [
756
758
  b("div", aa, [
757
- b("span", null, F(a(h).state.uname), 1),
758
- r(D, { vertical: "" }),
759
- r(M, {
759
+ b("span", null, F(a(v).state.uname), 1),
760
+ i(D, { vertical: "" }),
761
+ i(O, {
760
762
  round: "",
761
- src: a(h).state.avatar
763
+ src: a(v).state.avatar
762
764
  }, null, 8, ["src"])
763
765
  ])
764
766
  ]),
@@ -775,14 +777,14 @@ const Be = (t) => {
775
777
  loading: { type: Boolean, default: !1 }
776
778
  },
777
779
  setup(t) {
778
- return (d, g) => {
779
- const h = ht("RouterView");
780
+ return (d, h) => {
781
+ const v = ht("RouterView");
780
782
  return y(), B("div", na, [
781
- d.loading ? A("", !0) : (y(), $(h, { key: 0 }, {
782
- default: s(({ Component: C, route: v }) => [
783
+ d.loading ? A("", !0) : (y(), $(v, { key: 0 }, {
784
+ default: s(({ Component: w, route: p }) => [
783
785
  (y(), $(mt, null, [
784
- (y(), $(be(C), {
785
- key: v.fullPath
786
+ (y(), $(be(w), {
787
+ key: p.fullPath
786
788
  }))
787
789
  ], 1024))
788
790
  ]),
@@ -791,15 +793,15 @@ const Be = (t) => {
791
793
  ]);
792
794
  };
793
795
  }
794
- }), ra = { class: "tabs-view-main" }, ia = ["id", "onClick", "onContextmenu"], ca = { class: "tabs-close" }, da = { class: "tabs-close-btn" }, ua = /* @__PURE__ */ I({
796
+ }), ia = { class: "tabs-view-main" }, ra = ["id", "onClick", "onContextmenu"], ca = { class: "tabs-close" }, da = { class: "tabs-close-btn" }, ua = /* @__PURE__ */ I({
795
797
  __name: "PTabs",
796
798
  setup(t) {
797
799
  vt((e) => ({
798
- "4cb4fdc8": g.value,
799
- "21e8bab2": h.value
800
+ "4cb4fdc8": h.value,
801
+ "21e8bab2": v.value
800
802
  }));
801
- const d = Ze(), g = H(() => d.value.cardColor), h = H(() => d.value.textColor1), C = ce(), v = Ce(), L = ke(), w = O(null), T = O(null), x = O(!1), u = ae(), f = H(() => u.state.tabs), i = Re({
802
- activeKey: v.fullPath,
803
+ const d = Ze(), h = H(() => d.value.cardColor), v = H(() => d.value.textColor1), w = ce(), p = Ce(), L = ke(), k = M(null), T = M(null), x = M(!1), u = ae(), f = H(() => u.state.tabs), r = Re({
804
+ activeKey: p.fullPath,
803
805
  scrollable: !0,
804
806
  dropdownX: 0,
805
807
  dropdownY: 0,
@@ -807,15 +809,15 @@ const Be = (t) => {
807
809
  isMultiHeaderFixed: !0,
808
810
  multiTabsSetting: !0
809
811
  }), P = ["Login", "Redirect", "ErrorPage"], o = (e) => {
810
- const { fullPath: l, hash: n, meta: k, name: E, params: R, path: j, query: se } = e;
811
- return { fullPath: l, hash: n, meta: k, name: E, params: R, path: j, query: se };
812
+ const { fullPath: l, hash: n, meta: C, name: E, params: R, path: j, query: se } = e;
813
+ return { fullPath: l, hash: n, meta: C, name: E, params: R, path: j, query: se };
812
814
  }, m = H(() => {
813
815
  const n = u.state.collapsed ? "64px" : "272px";
814
816
  return {
815
817
  left: n,
816
818
  width: `calc(100% - ${n})`
817
819
  };
818
- }), p = H(() => {
820
+ }), g = H(() => {
819
821
  const e = f.value.length <= 1;
820
822
  return [
821
823
  {
@@ -844,7 +846,7 @@ const Be = (t) => {
844
846
  ];
845
847
  }), _ = () => {
846
848
  let e = [];
847
- const l = o(v);
849
+ const l = o(p);
848
850
  try {
849
851
  if (u.state.cacheTabs) {
850
852
  const n = localStorage.getItem("TABS_ROUTES");
@@ -858,48 +860,48 @@ const Be = (t) => {
858
860
  }, D = (e) => {
859
861
  const l = L.getRoutes();
860
862
  e.forEach((n) => {
861
- const k = l.find((E) => E.path === n.path);
862
- k && (n.meta = k.meta || n.meta, n.name = k.name || n.name);
863
+ const C = l.find((E) => E.path === n.path);
864
+ C && (n.meta = C.meta || n.meta, n.name = C.name || n.name);
863
865
  }), u.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(e));
864
- }, M = () => {
866
+ }, O = () => {
865
867
  const e = _();
866
868
  D(e), u.initTabs(e);
867
869
  }, S = async (e) => {
868
- if (await ie(), !w.value) return;
869
- const l = w.value.offsetWidth, n = w.value.scrollWidth;
870
- l < n ? (i.scrollable = !0, e && [...w.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((E) => {
871
- E.id === `tag${i.activeKey.split("/").join("/")}` && E.scrollIntoView && E.scrollIntoView();
872
- })) : i.scrollable = !1;
870
+ if (await re(), !k.value) return;
871
+ const l = k.value.offsetWidth, n = k.value.scrollWidth;
872
+ l < n ? (r.scrollable = !0, e && [...k.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((E) => {
873
+ E.id === `tag${r.activeKey.split("/").join("/")}` && E.scrollIntoView && E.scrollIntoView();
874
+ })) : r.scrollable = !1;
873
875
  }, J = (e) => !(e.draggedContext.element.meta.affix || e.relatedContext.element.meta.affix), ue = () => {
874
876
  let e;
875
877
  e = Et(), e.listenTo(T.value, () => S(!0));
876
878
  }, oe = (e) => {
877
879
  const { fullPath: l } = e;
878
- if (l === v.fullPath || (i.activeKey = l, !e))
880
+ if (l === p.fullPath || (r.activeKey = l, !e))
879
881
  return;
880
882
  const { replace: n } = L;
881
883
  toString.call(e), n(e).catch(console.error);
882
884
  }, le = (e, l) => {
883
- e.preventDefault(), x.value = l.path === "/home", i.showDropdown = !1, ie().then(() => {
884
- i.showDropdown = !0, i.dropdownX = e.clientX, i.dropdownY = e.clientY;
885
+ e.preventDefault(), x.value = l.path === "/home", r.showDropdown = !1, re().then(() => {
886
+ r.showDropdown = !0, r.dropdownX = e.clientX, r.dropdownY = e.clientY;
885
887
  });
886
888
  }, K = () => {
887
- v.meta.keepAlive && L.currentRoute.value.matched.find(
888
- (e) => e.name == v.name
889
+ p.meta.keepAlive && L.currentRoute.value.matched.find(
890
+ (e) => e.name == p.name
889
891
  )?.components?.default.name;
890
892
  }, Y = (e) => {
891
893
  if (f.value.length === 1)
892
- return C.warning("这已经是最后一页,不能再关闭了!");
893
- if (K(), u.closeCurrentTab(e), i.activeKey === e.fullPath) {
894
+ return w.warning("这已经是最后一页,不能再关闭了!");
895
+ if (K(), u.closeCurrentTab(e), r.activeKey === e.fullPath) {
894
896
  const l = f.value[Math.max(0, f.value.length - 1)];
895
- i.activeKey = l.fullPath, L.push(l);
897
+ r.activeKey = l.fullPath, L.push(l);
896
898
  }
897
899
  S();
898
900
  }, fe = (e) => {
899
- const { fullPath: l } = e, n = f.value.find((k) => k.fullPath == l);
901
+ const { fullPath: l } = e, n = f.value.find((C) => C.fullPath == l);
900
902
  Y(n);
901
903
  }, pe = (e) => {
902
- u.closeOtherTabs(e), i.activeKey = e.fullPath, L.replace(e.fullPath), S();
904
+ u.closeOtherTabs(e), r.activeKey = e.fullPath, L.replace(e.fullPath), S();
903
905
  }, W = () => {
904
906
  u.closeAllTabs(), S();
905
907
  }, ge = De("reloadPage"), ne = (e) => {
@@ -910,32 +912,32 @@ const Be = (t) => {
910
912
  break;
911
913
  //关闭
912
914
  case "2":
913
- Y(v);
915
+ Y(p);
914
916
  break;
915
917
  //关闭其他
916
918
  case "3":
917
- pe(v);
919
+ pe(p);
918
920
  break;
919
921
  //关闭所有
920
922
  case "4":
921
923
  W();
922
924
  break;
923
925
  }
924
- S(), i.showDropdown = !1;
926
+ S(), r.showDropdown = !1;
925
927
  }, Z = (e, l) => {
926
- const n = w.value.scrollLeft, k = l > 0 && n + l >= e || l < 0 && n + l <= e ? e : n + l;
927
- if (w.value && w.value.scrollTo(k, 0), k !== e)
928
+ const n = k.value.scrollLeft, C = l > 0 && n + l >= e || l < 0 && n + l <= e ? e : n + l;
929
+ if (k.value && k.value.scrollTo(C, 0), C !== e)
928
930
  return window.requestAnimationFrame(() => Z(e, l));
929
931
  }, he = () => {
930
- const e = w.value.offsetWidth, l = w.value.scrollLeft;
932
+ const e = k.value.offsetWidth, l = k.value.scrollLeft;
931
933
  if (!l) return;
932
934
  const n = l > e ? l - e : 0;
933
935
  Z(n, (n - l) / 20);
934
936
  }, c = () => {
935
- const e = w.value.offsetWidth, l = w.value.scrollWidth, n = w.value.scrollLeft;
937
+ const e = k.value.offsetWidth, l = k.value.scrollWidth, n = k.value.scrollLeft;
936
938
  if (l - n <= e) return;
937
- const k = l - n > e * 2 ? n + e : l - e;
938
- Z(k, (k - n) / 20);
939
+ const C = l - n > e * 2 ? n + e : l - e;
940
+ Z(C, (C - n) / 20);
939
941
  };
940
942
  return window.addEventListener("beforeunload", () => {
941
943
  localStorage.setItem("TABS_ROUTES", JSON.stringify(f.value));
@@ -943,59 +945,59 @@ const Be = (t) => {
943
945
  "scroll",
944
946
  (e) => {
945
947
  let l = e.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
946
- i.isMultiHeaderFixed = l >= 64;
948
+ r.isMultiHeaderFixed = l >= 64;
947
949
  },
948
950
  !0
949
951
  ), ze(
950
- () => v.fullPath,
952
+ () => p.fullPath,
951
953
  (e) => {
952
- P.includes(v.name) || (i.activeKey = e, u.addTab(o(v)), S(!0));
954
+ P.includes(p.name) || (r.activeKey = e, u.addTab(o(p)), S(!0));
953
955
  },
954
956
  { immediate: !0 }
955
- ), M(), ee(() => ue()), (e, l) => (y(), B("div", {
957
+ ), O(), ee(() => ue()), (e, l) => (y(), B("div", {
956
958
  class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
957
- style: re(m.value)
959
+ style: ie(m.value)
958
960
  }, [
959
- b("div", ra, [
961
+ b("div", ia, [
960
962
  b("div", {
961
963
  ref_key: "navWrap",
962
964
  ref: T,
963
- class: Q(["tabs-card", { "tabs-card-scrollable": i.scrollable }])
965
+ class: Q(["tabs-card", { "tabs-card-scrollable": r.scrollable }])
964
966
  }, [
965
967
  b("span", {
966
- class: Q(["tabs-card-prev", { "tabs-card-prev-hide": !i.scrollable }]),
968
+ class: Q(["tabs-card-prev", { "tabs-card-prev-hide": !r.scrollable }]),
967
969
  onClick: he
968
970
  }, [
969
- r(a(N), {
971
+ i(a(N), {
970
972
  size: "16",
971
973
  color: "#515a6e"
972
974
  }, {
973
975
  default: s(() => [
974
- r(a($t))
976
+ i(a($t))
975
977
  ]),
976
978
  _: 1
977
979
  })
978
980
  ], 2),
979
981
  b("span", {
980
- class: Q(["tabs-card-next", { "tabs-card-next-hide": !i.scrollable }]),
982
+ class: Q(["tabs-card-next", { "tabs-card-next-hide": !r.scrollable }]),
981
983
  onClick: c
982
984
  }, [
983
- r(a(N), {
985
+ i(a(N), {
984
986
  size: "16",
985
987
  color: "#515a6e"
986
988
  }, {
987
989
  default: s(() => [
988
- r(a(Ot))
990
+ i(a(Ot))
989
991
  ]),
990
992
  _: 1
991
993
  })
992
994
  ], 2),
993
995
  b("div", {
994
996
  ref_key: "navScroll",
995
- ref: w,
997
+ ref: k,
996
998
  class: "tabs-card-scroll"
997
999
  }, [
998
- r(a(Rt), {
1000
+ i(a(Rt), {
999
1001
  list: f.value,
1000
1002
  animation: "300",
1001
1003
  "item-key": "fullPath",
@@ -1005,42 +1007,42 @@ const Be = (t) => {
1005
1007
  item: s(({ element: n }) => [
1006
1008
  b("div", {
1007
1009
  id: `tag${n.fullPath.split("/").join("/")}`,
1008
- class: Q(["tabs-card-scroll-item", { "active-item": i.activeKey === n.fullPath }]),
1009
- onClick: ye((k) => oe(n), ["stop"]),
1010
- onContextmenu: (k) => le(k, n)
1010
+ class: Q(["tabs-card-scroll-item", { "active-item": r.activeKey === n.fullPath }]),
1011
+ onClick: ye((C) => oe(n), ["stop"]),
1012
+ onContextmenu: (C) => le(C, n)
1011
1013
  }, [
1012
1014
  b("span", null, F(n.meta.title), 1),
1013
1015
  n.meta.affix ? A("", !0) : (y(), $(a(N), {
1014
1016
  key: 0,
1015
1017
  size: "14",
1016
- onClick: ye((k) => fe(n), ["stop"])
1018
+ onClick: ye((C) => fe(n), ["stop"])
1017
1019
  }, {
1018
1020
  default: s(() => [
1019
- r(a(xe))
1021
+ i(a(xe))
1020
1022
  ]),
1021
1023
  _: 2
1022
1024
  }, 1032, ["onClick"]))
1023
- ], 42, ia)
1025
+ ], 42, ra)
1024
1026
  ]),
1025
1027
  _: 1
1026
1028
  }, 8, ["list"])
1027
1029
  ], 512)
1028
1030
  ], 2),
1029
1031
  b("div", ca, [
1030
- r(a(G), {
1032
+ i(a(G), {
1031
1033
  trigger: "hover",
1032
1034
  onSelect: ne,
1033
1035
  placement: "bottom-end",
1034
- options: p.value
1036
+ options: g.value
1035
1037
  }, {
1036
1038
  default: s(() => [
1037
1039
  b("div", da, [
1038
- r(a(N), {
1040
+ i(a(N), {
1039
1041
  size: "16",
1040
1042
  color: "#515a6e"
1041
1043
  }, {
1042
1044
  default: s(() => [
1043
- r(a(Mt))
1045
+ i(a(Mt))
1044
1046
  ]),
1045
1047
  _: 1
1046
1048
  })
@@ -1049,14 +1051,14 @@ const Be = (t) => {
1049
1051
  _: 1
1050
1052
  }, 8, ["options"])
1051
1053
  ]),
1052
- r(a(G), {
1053
- show: i.showDropdown,
1054
- x: i.dropdownX,
1055
- y: i.dropdownY,
1056
- onClickoutside: l[0] || (l[0] = (n) => i.showDropdown = !1),
1054
+ i(a(G), {
1055
+ show: r.showDropdown,
1056
+ x: r.dropdownX,
1057
+ y: r.dropdownY,
1058
+ onClickoutside: l[0] || (l[0] = (n) => r.showDropdown = !1),
1057
1059
  placement: "bottom-start",
1058
1060
  onSelect: ne,
1059
- options: p.value
1061
+ options: g.value
1060
1062
  }, null, 8, ["show", "x", "y", "options"])
1061
1063
  ])
1062
1064
  ], 4));
@@ -1064,48 +1066,48 @@ const Be = (t) => {
1064
1066
  }), fa = /* @__PURE__ */ de(ua, [["__scopeId", "data-v-f0706f46"]]), pa = /* @__PURE__ */ I({
1065
1067
  __name: "PMenus",
1066
1068
  setup(t) {
1067
- const d = Ce(), g = ke(), h = ae(), C = O(d.name), v = O(
1068
- d.matched && d.matched.length ? d.matched.map((i) => i.name) : []
1069
- ), L = O([]), w = (i) => {
1070
- /http(s)?:/.test(i) ? window.open(i) : g.push({ name: i });
1071
- }, T = (i) => {
1072
- if (!i) return;
1073
- const P = i.find((o) => v.value.indexOf(o) === -1);
1074
- v.value = P ? [P] : [];
1069
+ const d = Ce(), h = ke(), v = ae(), w = M(d.name), p = M(
1070
+ d.matched && d.matched.length ? d.matched.map((r) => r.name) : []
1071
+ ), L = M([]), k = (r) => {
1072
+ /http(s)?:/.test(r) ? window.open(r) : h.push({ name: r });
1073
+ }, T = (r) => {
1074
+ if (!r) return;
1075
+ const P = r.find((o) => p.value.indexOf(o) === -1);
1076
+ p.value = P ? [P] : [];
1075
1077
  }, x = () => {
1076
- const i = d.matched;
1077
- v.value = i.map((o) => o.name);
1078
+ const r = d.matched;
1079
+ p.value = r.map((o) => o.name);
1078
1080
  const P = d.meta?.activeMenu || "";
1079
- C.value = P || d.name;
1080
- }, u = (i, P = [], o = !1) => {
1081
- const m = [], p = [
1081
+ w.value = P || d.name;
1082
+ }, u = (r, P = [], o = !1) => {
1083
+ const m = [], g = [
1082
1084
  "/:path(.*)*",
1083
1085
  "/redirect",
1084
1086
  "/redirect/:path(.*)",
1085
1087
  "/login",
1086
1088
  "/oidc-callback"
1087
1089
  ];
1088
- if (!i || i.length === 0)
1090
+ if (!r || r.length === 0)
1089
1091
  return m;
1090
- i = i.sort((_, D) => {
1091
- let M = (D.children?.length ? 1 : 0) - (_.children?.length ? 1 : 0);
1092
- return M === 0 && (M = (_.meta?.sort ?? 0) - (D.meta?.sort ?? 0)), M;
1092
+ r = r.sort((_, D) => {
1093
+ let O = (D.children?.length ? 1 : 0) - (_.children?.length ? 1 : 0);
1094
+ return O === 0 && (O = (_.meta?.sort ?? 0) - (D.meta?.sort ?? 0)), O;
1093
1095
  });
1094
- for (const _ of i) {
1095
- if (o || (_.meta?.hidden || !1) == !0 || p.includes(_.path)) {
1096
+ for (const _ of r) {
1097
+ if (o || (_.meta?.hidden || !1) == !0 || g.includes(_.path)) {
1096
1098
  P.push(_.name), _.children && _.children.length > 0 && u(_.children, P, !0);
1097
1099
  continue;
1098
1100
  }
1099
- const D = _.meta?.alwaysShow != !0 && _?.children?.filter((J) => !J?.meta?.hidden)?.length === 1, M = D ? _.children[0] : _, S = {
1100
- key: M.name,
1101
- label: M.meta?.title,
1102
- affix: M.meta?.affix,
1103
- sort: M.meta?.sort,
1104
- path: M.path,
1105
- redirect: M.redirect,
1106
- icon: D ? _.meta?.icon : M.meta?.icon,
1107
- permissions: M.meta?.permissions,
1108
- meta: M.meta,
1101
+ const D = _.meta?.alwaysShow != !0 && _?.children?.filter((J) => !J?.meta?.hidden)?.length === 1, O = D ? _.children[0] : _, S = {
1102
+ key: O.name,
1103
+ label: O.meta?.title,
1104
+ affix: O.meta?.affix,
1105
+ sort: O.meta?.sort,
1106
+ path: O.path,
1107
+ redirect: O.redirect,
1108
+ icon: D ? _.meta?.icon : O.meta?.icon,
1109
+ permissions: O.meta?.permissions,
1110
+ meta: O.meta,
1109
1111
  children: void 0
1110
1112
  };
1111
1113
  if (!P.includes(_.name)) {
@@ -1118,8 +1120,8 @@ const Be = (t) => {
1118
1120
  }
1119
1121
  return m;
1120
1122
  }, f = () => {
1121
- const i = g.getRoutes();
1122
- L.value = u(i);
1123
+ const r = h.getRoutes();
1124
+ L.value = u(r);
1123
1125
  };
1124
1126
  return ze(
1125
1127
  () => d.fullPath,
@@ -1128,28 +1130,28 @@ const Be = (t) => {
1128
1130
  }
1129
1131
  ), ee(() => {
1130
1132
  f(), x();
1131
- }), (i, P) => (y(), $(a(Qe), {
1133
+ }), (r, P) => (y(), $(a(Qe), {
1132
1134
  class: "h-full",
1133
1135
  inverted: "",
1134
1136
  mode: "vertical",
1135
1137
  options: L.value,
1136
- collapsed: a(h).state.collapsed,
1138
+ collapsed: a(v).state.collapsed,
1137
1139
  "collapsed-width": 64,
1138
1140
  "collapsed-icon-size": 20,
1139
1141
  indent: 24,
1140
- "expanded-keys": v.value,
1141
- value: C.value,
1142
- "onUpdate:value": w,
1142
+ "expanded-keys": p.value,
1143
+ value: w.value,
1144
+ "onUpdate:value": k,
1143
1145
  "onUpdate:expandedKeys": T
1144
1146
  }, null, 8, ["options", "collapsed", "expanded-keys", "value"]));
1145
1147
  }
1146
1148
  }), ga = { class: "layout-content-main layout-content-main-fix" }, ha = { class: "main-view main-view-fix" }, ma = /* @__PURE__ */ I({
1147
1149
  __name: "PLayout",
1148
1150
  setup(t) {
1149
- const d = ae(), g = O(!1);
1151
+ const d = ae(), h = M(!1);
1150
1152
  return _t("reloadPage", () => {
1151
- g.value = !0, ie(() => g.value = !1);
1152
- }), (C, v) => {
1153
+ h.value = !0, re(() => h.value = !1);
1154
+ }), (w, p) => {
1153
1155
  const L = lt;
1154
1156
  return y(), $(a(Le), {
1155
1157
  "has-sider": "",
@@ -1157,7 +1159,7 @@ const Be = (t) => {
1157
1159
  position: "absolute"
1158
1160
  }, {
1159
1161
  default: s(() => [
1160
- r(a(et), {
1162
+ i(a(et), {
1161
1163
  class: "layout-sider",
1162
1164
  inverted: "",
1163
1165
  "show-trigger": "bar",
@@ -1170,36 +1172,36 @@ const Be = (t) => {
1170
1172
  onExpand: a(d).collapse
1171
1173
  }, {
1172
1174
  default: s(() => [
1173
- r(a(tt), { vertical: "" }, {
1175
+ i(a(tt), { vertical: "" }, {
1174
1176
  default: s(() => [
1175
- r(jt),
1176
- r(pa)
1177
+ i(jt),
1178
+ i(pa)
1177
1179
  ]),
1178
1180
  _: 1
1179
1181
  })
1180
1182
  ]),
1181
1183
  _: 1
1182
1184
  }, 8, ["collapsed", "onCollapse", "onExpand"]),
1183
- r(a(Le), null, {
1185
+ i(a(Le), null, {
1184
1186
  default: s(() => [
1185
- r(a(at), { position: "absolute" }, {
1187
+ i(a(at), { position: "absolute" }, {
1186
1188
  default: s(() => [
1187
- r(la)
1189
+ i(la)
1188
1190
  ]),
1189
1191
  _: 1
1190
1192
  }),
1191
- r(a(ot), { class: "layout-content layout-default-background" }, {
1193
+ i(a(ot), { class: "layout-content layout-default-background" }, {
1192
1194
  default: s(() => [
1193
1195
  b("div", ga, [
1194
- r(fa),
1196
+ i(fa),
1195
1197
  b("div", ha, [
1196
- r(sa, { loading: g.value }, null, 8, ["loading"])
1198
+ i(sa, { loading: h.value }, null, 8, ["loading"])
1197
1199
  ])
1198
1200
  ])
1199
1201
  ]),
1200
1202
  _: 1
1201
1203
  }),
1202
- r(L, {
1204
+ i(L, {
1203
1205
  right: 20,
1204
1206
  class: "z-50"
1205
1207
  })
@@ -1228,20 +1230,20 @@ const Be = (t) => {
1228
1230
  } }
1229
1231
  },
1230
1232
  setup(t) {
1231
- return (d, g) => {
1232
- const h = nt;
1233
- return y(), $(h, {
1234
- locale: a(rt),
1233
+ return (d, h) => {
1234
+ const v = nt;
1235
+ return y(), $(v, {
1236
+ locale: a(it),
1235
1237
  theme: d.theme,
1236
1238
  "theme-overrides": d.themeOverrides,
1237
1239
  "date-locale": a(st)
1238
1240
  }, {
1239
1241
  default: s(() => [
1240
- r(a(it), null, {
1242
+ i(a(rt), null, {
1241
1243
  default: s(() => [
1242
- r(a(ct), null, {
1244
+ i(a(ct), null, {
1243
1245
  default: s(() => [
1244
- r(a(dt), null, {
1246
+ i(a(dt), null, {
1245
1247
  default: s(() => [
1246
1248
  U(d.$slots, "default")
1247
1249
  ]),
@@ -1261,59 +1263,61 @@ const Be = (t) => {
1261
1263
  }), ya = te(ba), wa = /* @__PURE__ */ I({
1262
1264
  __name: "PModal",
1263
1265
  props: {
1264
- saveBtnText: { default: "保 存" },
1266
+ saveBtnText: { default: "保存" },
1265
1267
  closable: { type: Boolean, default: !1 },
1266
1268
  title: {},
1267
1269
  width: { default: 800 },
1268
1270
  height: { default: 500 },
1271
+ visible: { type: Boolean },
1272
+ loading: { type: Boolean },
1269
1273
  onSave: {},
1270
1274
  onClose: {}
1271
1275
  },
1272
- setup(t, { expose: d }) {
1273
- const g = ce(), h = t, C = O(!1), v = O(!1), L = async () => {
1274
- C.value = !0;
1276
+ emits: ["update:visible", "update:loading"],
1277
+ setup(t, { expose: d, emit: h }) {
1278
+ const v = ce(), w = t, p = h, L = async () => {
1279
+ p("update:loading", !0);
1275
1280
  try {
1276
- h.onSave && await h.onSave() && w();
1281
+ w.onSave && await w.onSave() && k();
1277
1282
  } catch (f) {
1278
- g.error(f.message);
1283
+ v.error(f.message);
1279
1284
  } finally {
1280
- C.value = !1;
1285
+ p("update:loading", !1);
1281
1286
  }
1282
- }, w = () => {
1283
- v.value = !1, C.value = !1;
1287
+ }, k = () => {
1288
+ p("update:visible", !1), p("update:loading", !1);
1284
1289
  }, T = async () => {
1285
1290
  try {
1286
- h.onClose ? await h.onClose() && w() : w();
1291
+ w.onClose ? await w.onClose() && k() : k();
1287
1292
  } catch (f) {
1288
- g.error(f.message);
1293
+ v.error(f.message), p("update:loading", !1);
1289
1294
  }
1290
1295
  };
1291
1296
  return d({
1292
1297
  open: () => {
1293
- C.value = !1, v.value = !0;
1298
+ p("update:visible", !0), p("update:loading", !1);
1294
1299
  },
1295
1300
  close: () => {
1296
- v.value = !1, C.value = !1;
1301
+ p("update:visible", !1), p("update:loading", !1);
1297
1302
  }
1298
- }), (f, i) => {
1303
+ }), (f, r) => {
1299
1304
  const P = ut, o = q, m = Me;
1300
1305
  return y(), $(a(Oe), bt({
1301
1306
  ref: "$modal",
1302
- preset: "card",
1303
- show: v.value,
1304
- "onUpdate:show": i[0] || (i[0] = (p) => v.value = p)
1307
+ preset: "card"
1305
1308
  }, f.$attrs, {
1306
1309
  "header-class": "bg-gray-50",
1310
+ show: w.visible,
1307
1311
  draggable: !0,
1308
1312
  closable: !1,
1309
1313
  "close-on-esc": !1,
1310
1314
  "mask-closable": !1,
1311
1315
  bordered: !1,
1312
- style: { width: `${h.width}px` },
1313
- onClose: w
1316
+ style: { width: `${w.width}px` },
1317
+ onClose: k
1314
1318
  }), {
1315
1319
  header: s(() => [
1316
- f.$slots.header ? U(f.$slots, "header", { key: 0 }) : h.title ? (y(), $(P, { key: 1 }, {
1320
+ f.$slots.header ? U(f.$slots, "header", { key: 0 }) : w.title ? (y(), $(P, { key: 1 }, {
1317
1321
  default: s(() => [
1318
1322
  V(F(f.title), 1)
1319
1323
  ]),
@@ -1326,7 +1330,7 @@ const Be = (t) => {
1326
1330
  default: s(() => [
1327
1331
  b("div", {
1328
1332
  class: "overflow-y-auto overflow-hidden mt-5",
1329
- style: re({ maxHeight: `${h.height}px` })
1333
+ style: ie({ maxHeight: `${w.height}px` })
1330
1334
  }, [
1331
1335
  U(f.$slots, "default")
1332
1336
  ], 4)
@@ -1335,11 +1339,11 @@ const Be = (t) => {
1335
1339
  U(f.$slots, "footer")
1336
1340
  ]),
1337
1341
  action: s(() => [
1338
- r(m, { justify: "end" }, {
1342
+ i(m, { justify: "end" }, {
1339
1343
  default: s(() => [
1340
- r(o, {
1344
+ i(o, {
1341
1345
  type: "primary",
1342
- loading: C.value,
1346
+ loading: f.loading,
1343
1347
  onClick: L
1344
1348
  }, {
1345
1349
  default: s(() => [
@@ -1347,13 +1351,13 @@ const Be = (t) => {
1347
1351
  ]),
1348
1352
  _: 1
1349
1353
  }, 8, ["loading"]),
1350
- U(f.$slots, "action-extra"),
1351
- r(o, { onClick: T }, {
1352
- default: s(() => i[1] || (i[1] = [
1353
- V("取 消", -1)
1354
+ U(f.$slots, "action-extra", { loading: f.loading }),
1355
+ i(o, { onClick: T }, {
1356
+ default: s(() => r[0] || (r[0] = [
1357
+ V("取消", -1)
1354
1358
  ])),
1355
1359
  _: 1,
1356
- __: [1]
1360
+ __: [0]
1357
1361
  })
1358
1362
  ]),
1359
1363
  _: 3
@@ -1370,8 +1374,8 @@ const Be = (t) => {
1370
1374
  PLayout: _a,
1371
1375
  PModal: ka,
1372
1376
  PTable: Wt
1373
- }, Symbol.toStringTag, { value: "Module" })), Sa = (t, d) => (Object.values(Pa).forEach((g) => {
1374
- g.install && t.use(g);
1377
+ }, Symbol.toStringTag, { value: "Module" })), Sa = (t, d) => (Object.values(Pa).forEach((h) => {
1378
+ h.install && t.use(h);
1375
1379
  }), d?.(), t), Ra = {
1376
1380
  install: Sa
1377
1381
  };