@chewel611/naive-ui-plus 0.0.32 → 0.0.34

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
1
  import { useDialog as Oe, useMessage as ue, NCard as Ee, NDataTable as Me, NSpace as _e, NTooltip as Re, NIcon as N, NDropdown as G, NButton as ve, NAvatar as be, NBreadcrumb as Ie, NBreadcrumbItem as He, NDivider as We, useThemeVars as Ue, NMenu as je, NLayout as Le, NLayoutSider as qe, NFlex as Fe, NLayoutHeader as Ve, NLayoutContent as Ke, NBackTop as Ye, NConfigProvider as Xe, dateZhCN as Je, zhCN as Ze, NDialogProvider as Ge, NNotificationProvider as Qe, NMessageProvider as et, NModal as tt, NText as at, NEmpty as nt, NSpin as ot, NResult as ye } from "naive-ui";
2
- import { defineComponent as W, ref as z, computed as K, unref as a, onMounted as Q, openBlock as f, createBlock as L, withCtx as o, createElementVNode as b, createElementBlock as H, renderSlot as Y, createCommentVNode as A, createVNode as c, toDisplayString as j, h as D, toRaw as Ce, reactive as we, normalizeClass as oe, withDirectives as lt, vShow as st, nextTick as le, inject as Ne, Fragment as Se, renderList as ct, resolveDynamicComponent as he, withModifiers as me, resolveComponent as ze, KeepAlive as rt, useCssVars as it, watch as Be, normalizeStyle as De, provide as ut, mergeProps as dt, createTextVNode as pe, onBeforeMount as ft } from "vue";
2
+ import { defineComponent as W, ref as z, computed as K, unref as a, onMounted as Q, openBlock as g, createBlock as L, withCtx as o, createElementVNode as b, createElementBlock as H, renderSlot as Y, createCommentVNode as A, createVNode as c, toDisplayString as j, h as D, toRaw as Ce, reactive as we, normalizeClass as oe, withDirectives as lt, vShow as st, nextTick as le, inject as Ne, Fragment as Se, renderList as ct, resolveDynamicComponent as he, withModifiers as me, resolveComponent as ze, KeepAlive as rt, useCssVars as it, watch as Be, normalizeStyle as De, provide as ut, mergeProps as dt, createTextVNode as pe, onBeforeMount as ft } from "vue";
3
3
  import { PlusSquareOutlined as gt, DeleteOutlined as Te, ReloadOutlined as Pe, MoreOutlined as pt, EditOutlined as ht, MenuUnfoldOutlined as mt, MenuFoldOutlined as _t, FullscreenOutlined as vt, FullscreenExitOutlined as bt, CloseOutlined as $e, ColumnWidthOutlined as yt, MinusOutlined as wt, LeftOutlined as Pt, RightOutlined as kt, DownOutlined as xt, AlertOutlined as Lt } from "@vicons/antd";
4
4
  import { defineStore as ke } from "pinia";
5
5
  import { useRouter as se, useRoute as ce } from "vue-router";
@@ -134,7 +134,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
134
134
  const w = a(r);
135
135
  if (!w) return;
136
136
  const k = w?.$el, C = k.querySelector(".n-data-table-thead "), { bottomIncludeBody: E } = de(C), I = 48;
137
- let q = 12, Z = 24;
137
+ let q = 12, Z = 25;
138
138
  const X = k.querySelector(
139
139
  ".n-data-table__pagination"
140
140
  );
@@ -150,7 +150,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
150
150
  top: fe,
151
151
  width: ge,
152
152
  height: t
153
- } = te, g = (Z || C) - (I || 0), p = (X || E) - (q || 0), R = J + Z, V = fe + X, ae = R - g, ne = V - p, ie = window.document.documentElement.clientWidth, xe = window.document.documentElement.clientHeight;
153
+ } = te, f = (Z || C) - (I || 0), p = (X || E) - (q || 0), R = J + Z, V = fe + X, ae = R - f, ne = V - p, ie = window.document.documentElement.clientWidth, xe = window.document.documentElement.clientHeight;
154
154
  return {
155
155
  left: ae,
156
156
  top: ne,
@@ -170,7 +170,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
170
170
  }
171
171
  }), (w, k) => {
172
172
  const C = Re, E = _e, I = Me;
173
- return f(), L(a(Ee), { bordered: !1 }, {
173
+ return g(), L(a(Ee), { bordered: !1 }, {
174
174
  header: o(() => [
175
175
  c(E, {
176
176
  justify: "space-between",
@@ -181,7 +181,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
181
181
  b("span", Tt, j(e.title), 1),
182
182
  c(E, null, {
183
183
  default: o(() => [
184
- x.onAdd ? (f(), L(C, {
184
+ x.onAdd ? (g(), L(C, {
185
185
  key: 0,
186
186
  trigger: "hover"
187
187
  }, {
@@ -202,7 +202,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
202
202
  ]),
203
203
  _: 1
204
204
  })) : A("", !0),
205
- x.onDelete ? (f(), L(C, {
205
+ x.onDelete ? (g(), L(C, {
206
206
  key: 1,
207
207
  trigger: "hover"
208
208
  }, {
@@ -250,7 +250,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
250
250
  ]),
251
251
  default: o(() => [
252
252
  b("div", $t, [
253
- w.$slots.toolbar ? (f(), H("div", Ot, [
253
+ w.$slots.toolbar ? (g(), H("div", Ot, [
254
254
  Y(w.$slots, "toolbar")
255
255
  ])) : A("", !0),
256
256
  c(I, {
@@ -355,7 +355,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
355
355
  __name: "PLogo",
356
356
  setup(e) {
357
357
  const n = re();
358
- return (r, _) => (f(), H("div", zt, [
358
+ return (r, _) => (g(), H("div", zt, [
359
359
  c(a(be), {
360
360
  color: "var(--color-logo)",
361
361
  size: 32,
@@ -430,7 +430,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
430
430
  await le(), await x(), P.value = await _(), m.value = await r();
431
431
  }), (l, y) => {
432
432
  const u = N, $ = ve;
433
- return m.value.length > 0 ? (f(), L(a(G), {
433
+ return m.value.length > 0 ? (g(), L(a(G), {
434
434
  key: 0,
435
435
  id: "ignore-translation",
436
436
  placement: "bottom-start",
@@ -445,7 +445,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
445
445
  type: "info"
446
446
  }, {
447
447
  default: o(() => [
448
- P.value ? (f(), H("label", It, j(P.value?.label), 1)) : (f(), L(u, {
448
+ P.value ? (g(), H("label", It, j(P.value?.label), 1)) : (g(), L(u, {
449
449
  key: 0,
450
450
  size: "18"
451
451
  }, {
@@ -535,14 +535,14 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
535
535
  };
536
536
  return (i, v) => {
537
537
  const h = Re, M = We, O = be;
538
- return f(), H("div", Ht, [
538
+ return g(), H("div", Ht, [
539
539
  b("div", Wt, [
540
540
  b("div", {
541
541
  class: "ml-1 layout-header-trigger layout-header-trigger-min",
542
542
  onClick: v[0] || (v[0] = //@ts-ignore
543
543
  (...S) => a(_).collapse && a(_).collapse(...S))
544
544
  }, [
545
- a(_).state.collapsed ? (f(), L(a(N), {
545
+ a(_).state.collapsed ? (g(), L(a(N), {
546
546
  key: 0,
547
547
  size: "18"
548
548
  }, {
@@ -550,7 +550,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
550
550
  c(a(mt))
551
551
  ]),
552
552
  _: 1
553
- })) : (f(), L(a(N), {
553
+ })) : (g(), L(a(N), {
554
554
  key: 1,
555
555
  size: "18"
556
556
  }, {
@@ -574,25 +574,25 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
574
574
  ]),
575
575
  c(a(Ie), null, {
576
576
  default: o(() => [
577
- (f(!0), H(Se, null, ct(T.value, (S) => (f(), H(Se, {
577
+ (g(!0), H(Se, null, ct(T.value, (S) => (g(), H(Se, {
578
578
  key: S.label
579
579
  }, [
580
- S.label ? (f(), L(a(He), { key: 0 }, {
580
+ S.label ? (g(), L(a(He), { key: 0 }, {
581
581
  default: o(() => [
582
- S.children && S.children.length ? (f(), L(a(G), {
582
+ S.children && S.children.length ? (g(), L(a(G), {
583
583
  key: 0,
584
584
  options: S.children,
585
585
  onSelect: m
586
586
  }, {
587
587
  default: o(() => [
588
588
  b("span", Ut, [
589
- S.icon ? (f(), L(he(S.icon), { key: 0 })) : A("", !0),
589
+ S.icon ? (g(), L(he(S.icon), { key: 0 })) : A("", !0),
590
590
  b("span", null, j(S.label), 1)
591
591
  ])
592
592
  ]),
593
593
  _: 2
594
- }, 1032, ["options"])) : (f(), H("span", jt, [
595
- S.icon ? (f(), L(he(S.icon), { key: 0 })) : A("", !0),
594
+ }, 1032, ["options"])) : (g(), H("span", jt, [
595
+ S.icon ? (g(), L(he(S.icon), { key: 0 })) : A("", !0),
596
596
  b("span", null, j(S.label), 1)
597
597
  ]))
598
598
  ]),
@@ -604,7 +604,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
604
604
  })
605
605
  ]),
606
606
  b("div", qt, [
607
- a(_).state.enableLanguage ? (f(), H("div", Ft, [
607
+ a(_).state.enableLanguage ? (g(), H("div", Ft, [
608
608
  c(Ae)
609
609
  ])) : A("", !0),
610
610
  b("div", Vt, [
@@ -615,7 +615,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
615
615
  onClick: me(y, ["stop"])
616
616
  }, {
617
617
  default: o(() => [
618
- l.value ? (f(), L(a(bt), { key: 1 })) : (f(), L(a(vt), { key: 0 }))
618
+ l.value ? (g(), L(a(bt), { key: 1 })) : (g(), L(a(vt), { key: 0 }))
619
619
  ]),
620
620
  _: 1
621
621
  })
@@ -657,11 +657,11 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
657
657
  setup(e) {
658
658
  return (n, r) => {
659
659
  const _ = ze("RouterView");
660
- return f(), H("div", Zt, [
661
- e.loading ? A("", !0) : (f(), L(_, { key: 0 }, {
660
+ return g(), H("div", Zt, [
661
+ e.loading ? A("", !0) : (g(), L(_, { key: 0 }, {
662
662
  default: o(({ Component: d, route: s }) => [
663
- (f(), L(rt, null, [
664
- (f(), L(he(d), {
663
+ (g(), L(rt, null, [
664
+ (g(), L(he(d), {
665
665
  key: s.fullPath
666
666
  }))
667
667
  ], 1024))
@@ -675,8 +675,8 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
675
675
  __name: "PTabs",
676
676
  setup(e) {
677
677
  it((t) => ({
678
- v141ddb06: r.value,
679
- cf709148: _.value
678
+ v4a1a98ea: r.value,
679
+ v271d846e: _.value
680
680
  }));
681
681
  const n = Ue(), r = K(() => n.value.cardColor), _ = K(() => n.value.textColor1), d = ue(), s = ce(), P = se(), m = z(null), T = z(null), x = z(!1), l = re(), y = K(() => l.state.tabs), u = we({
682
682
  activeKey: s.fullPath,
@@ -687,8 +687,8 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
687
687
  isMultiHeaderFixed: !0,
688
688
  multiTabsSetting: !0
689
689
  }), $ = ["Login", "Redirect", "ErrorPage"], B = (t) => {
690
- const { fullPath: g, hash: p, meta: R, name: V, params: ae, path: ne, query: ie } = t;
691
- return { fullPath: g, hash: p, meta: R, name: V, params: ae, path: ne, query: ie };
690
+ const { fullPath: f, hash: p, meta: R, name: V, params: ae, path: ne, query: ie } = t;
691
+ return { fullPath: f, hash: p, meta: R, name: V, params: ae, path: ne, query: ie };
692
692
  }, i = K(() => {
693
693
  const p = l.state.collapsed ? "64px" : "272px";
694
694
  return {
@@ -724,21 +724,22 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
724
724
  ];
725
725
  }), h = () => {
726
726
  let t = [];
727
- const g = B(s);
727
+ const f = B(s);
728
728
  try {
729
729
  if (l.state.cacheTabs) {
730
730
  const p = localStorage.getItem("TABS_ROUTES");
731
- t = p ? JSON.parse(p) : [g];
732
- }
731
+ t = p ? JSON.parse(p) : [f];
732
+ } else
733
+ t = [f];
733
734
  } catch {
734
- t = [g];
735
+ t = [f];
735
736
  } finally {
736
737
  return t;
737
738
  }
738
739
  }, M = (t) => {
739
- const g = P.getRoutes();
740
+ const f = P.getRoutes();
740
741
  t.forEach((p) => {
741
- const R = g.find((V) => V.path === p.path);
742
+ const R = f.find((V) => V.path === p.path);
742
743
  R && (p.meta = R.meta || p.meta, p.name = R.name || p.name);
743
744
  }), l.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(t));
744
745
  }, O = () => {
@@ -746,27 +747,27 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
746
747
  M(t), l.initTabs(t);
747
748
  }, S = async (t) => {
748
749
  if (await le(), !m.value) return;
749
- const g = m.value.offsetWidth, p = m.value.scrollWidth;
750
- g < p ? (u.scrollable = !0, t && [...m.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((V) => {
750
+ const f = m.value.offsetWidth, p = m.value.scrollWidth;
751
+ f < p ? (u.scrollable = !0, t && [...m.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((V) => {
751
752
  V.id === `tag${u.activeKey.split("/").join("/")}` && V.scrollIntoView && V.scrollIntoView();
752
753
  })) : u.scrollable = !1;
753
754
  }, ee = (t) => !(t.draggedContext.element.meta.affix || t.relatedContext.element.meta.affix), de = () => {
754
755
  let t;
755
756
  t = Ct(), t.listenTo(T.value, () => S(!0));
756
757
  }, w = (t) => {
757
- const { fullPath: g } = t;
758
- if (g === s.fullPath || (u.activeKey = g, !t))
758
+ const { fullPath: f } = t;
759
+ if (f === s.fullPath || (u.activeKey = f, !t))
759
760
  return;
760
761
  const { replace: p } = P;
761
762
  toString.call(t), p(t).catch(console.error);
762
- }, k = (t, g) => {
763
- t.preventDefault(), x.value = g.path === "/home", u.showDropdown = !1, le().then(() => {
763
+ }, k = (t, f) => {
764
+ t.preventDefault(), x.value = f.path === "/home", u.showDropdown = !1, le().then(() => {
764
765
  u.showDropdown = !0, u.dropdownX = t.clientX, u.dropdownY = t.clientY;
765
766
  });
766
767
  }, C = () => {
767
768
  if (s.meta.keepAlive) {
768
769
  var t = P.currentRoute.value.matched.find(
769
- (g) => g.name == s.name
770
+ (f) => f.name == s.name
770
771
  );
771
772
  t && t.components?.default?.name;
772
773
  }
@@ -774,12 +775,12 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
774
775
  if (y.value.length === 1)
775
776
  return d.warning("这已经是最后一页,不能再关闭了!");
776
777
  if (C(), l.closeCurrentTab(t), u.activeKey === t.fullPath) {
777
- const g = y.value[Math.max(0, y.value.length - 1)];
778
- u.activeKey = g.fullPath, P.push(g);
778
+ const f = y.value[Math.max(0, y.value.length - 1)];
779
+ u.activeKey = f.fullPath, P.push(f);
779
780
  }
780
781
  S();
781
782
  }, I = (t) => {
782
- const { fullPath: g } = t, p = y.value.find((R) => R.fullPath == g);
783
+ const { fullPath: f } = t, p = y.value.find((R) => R.fullPath == f);
783
784
  E(p);
784
785
  }, q = (t) => {
785
786
  l.closeOtherTabs(t), u.activeKey = t.fullPath, P.replace(t.fullPath), S();
@@ -805,19 +806,19 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
805
806
  break;
806
807
  }
807
808
  S(), u.showDropdown = !1;
808
- }, J = (t, g) => {
809
- const p = m.value.scrollLeft, R = g > 0 && p + g >= t || g < 0 && p + g <= t ? t : p + g;
809
+ }, J = (t, f) => {
810
+ const p = m.value.scrollLeft, R = f > 0 && p + f >= t || f < 0 && p + f <= t ? t : p + f;
810
811
  if (m.value && m.value.scrollTo(R, 0), R !== t)
811
- return window.requestAnimationFrame(() => J(t, g));
812
+ return window.requestAnimationFrame(() => J(t, f));
812
813
  }, fe = () => {
813
- const t = m.value.offsetWidth, g = m.value.scrollLeft;
814
- if (!g) return;
815
- const p = g > t ? g - t : 0;
816
- J(p, (p - g) / 20);
814
+ const t = m.value.offsetWidth, f = m.value.scrollLeft;
815
+ if (!f) return;
816
+ const p = f > t ? f - t : 0;
817
+ J(p, (p - f) / 20);
817
818
  }, ge = () => {
818
- const t = m.value.offsetWidth, g = m.value.scrollWidth, p = m.value.scrollLeft;
819
- if (g - p <= t) return;
820
- const R = g - p > t * 2 ? p + t : g - t;
819
+ const t = m.value.offsetWidth, f = m.value.scrollWidth, p = m.value.scrollLeft;
820
+ if (f - p <= t) return;
821
+ const R = f - p > t * 2 ? p + t : f - t;
821
822
  J(R, (R - p) / 20);
822
823
  };
823
824
  return window.addEventListener("beforeunload", () => {
@@ -825,8 +826,8 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
825
826
  }), window.addEventListener(
826
827
  "scroll",
827
828
  (t) => {
828
- let g = t.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
829
- u.isMultiHeaderFixed = g >= 64;
829
+ let f = t.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
830
+ u.isMultiHeaderFixed = f >= 64;
830
831
  },
831
832
  !0
832
833
  ), Be(
@@ -835,7 +836,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
835
836
  $.includes(s.name) || (u.activeKey = t, l.addTab(B(s)), S(!0));
836
837
  },
837
838
  { immediate: !0 }
838
- ), O(), Q(() => de()), (t, g) => (f(), H("div", {
839
+ ), O(), Q(() => de()), (t, f) => (g(), H("div", {
839
840
  class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
840
841
  style: De(i.value)
841
842
  }, [
@@ -893,7 +894,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
893
894
  onContextmenu: (R) => k(R, p)
894
895
  }, [
895
896
  b("span", null, j(p.meta.title), 1),
896
- p.meta.affix ? A("", !0) : (f(), L(a(N), {
897
+ p.meta.affix ? A("", !0) : (g(), L(a(N), {
897
898
  key: 0,
898
899
  size: "14",
899
900
  onClick: me((R) => I(p), ["stop"])
@@ -936,7 +937,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
936
937
  show: u.showDropdown,
937
938
  x: u.dropdownX,
938
939
  y: u.dropdownY,
939
- onClickoutside: g[0] || (g[0] = (p) => u.showDropdown = !1),
940
+ onClickoutside: f[0] || (f[0] = (p) => u.showDropdown = !1),
940
941
  placement: "bottom-start",
941
942
  onSelect: te,
942
943
  options: v.value
@@ -944,7 +945,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
944
945
  ])
945
946
  ], 4));
946
947
  }
947
- }), oa = /* @__PURE__ */ F(na, [["__scopeId", "data-v-48b3be2d"]]), la = /* @__PURE__ */ W({
948
+ }), oa = /* @__PURE__ */ F(na, [["__scopeId", "data-v-e37d2460"]]), la = /* @__PURE__ */ W({
948
949
  __name: "PMenus",
949
950
  setup(e) {
950
951
  const n = ce(), r = se(), _ = re(), d = z(n.name), s = z(
@@ -1011,7 +1012,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
1011
1012
  }
1012
1013
  ), Q(() => {
1013
1014
  y(), x();
1014
- }), (u, $) => (f(), L(a(je), {
1015
+ }), (u, $) => (g(), L(a(je), {
1015
1016
  class: "h-full",
1016
1017
  inverted: "",
1017
1018
  mode: "vertical",
@@ -1034,7 +1035,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
1034
1035
  r.value = !0, le(() => r.value = !1);
1035
1036
  }), (d, s) => {
1036
1037
  const P = Ye;
1037
- return f(), L(a(Le), {
1038
+ return g(), L(a(Le), {
1038
1039
  "has-sider": "",
1039
1040
  class: "layout",
1040
1041
  position: "absolute"
@@ -1099,7 +1100,7 @@ const Tt = { class: "text-lg font-medium" }, $t = { id: "data-content" }, Ot = {
1099
1100
  }), ia = /* @__PURE__ */ F(ra, [["__scopeId", "data-v-0bac2e7d"]]), ua = {};
1100
1101
  function da(e, n) {
1101
1102
  const r = ze("router-view");
1102
- return f(), L(r);
1103
+ return g(), L(r);
1103
1104
  }
1104
1105
  const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha = /* @__PURE__ */ W({
1105
1106
  __name: "PApplication",
@@ -1120,7 +1121,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1120
1121
  setup(e) {
1121
1122
  return (n, r) => {
1122
1123
  const _ = Xe;
1123
- return f(), L(_, {
1124
+ return g(), L(_, {
1124
1125
  locale: a(Ze),
1125
1126
  theme: e.theme,
1126
1127
  "theme-overrides": e.themeOverrides,
@@ -1192,7 +1193,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1192
1193
  }
1193
1194
  }), (y, u) => {
1194
1195
  const $ = at, B = ve, i = _e;
1195
- return f(), L(a(tt), dt({
1196
+ return g(), L(a(tt), dt({
1196
1197
  ref: "$modal",
1197
1198
  preset: "card"
1198
1199
  }, y.$attrs, {
@@ -1207,7 +1208,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1207
1208
  onClose: m
1208
1209
  }), {
1209
1210
  header: o(() => [
1210
- y.$slots.header ? Y(y.$slots, "header", { key: 0 }) : d.title ? (f(), L($, { key: 1 }, {
1211
+ y.$slots.header ? Y(y.$slots, "header", { key: 0 }) : d.title ? (g(), L($, { key: 1 }, {
1211
1212
  default: o(() => [
1212
1213
  pe(j(e.title), 1)
1213
1214
  ]),
@@ -1231,7 +1232,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1231
1232
  action: o(() => [
1232
1233
  c(i, { justify: "end" }, {
1233
1234
  default: o(() => [
1234
- d.hideSaveBtn ? A("", !0) : (f(), L(B, {
1235
+ d.hideSaveBtn ? A("", !0) : (g(), L(B, {
1235
1236
  key: 0,
1236
1237
  type: "primary",
1237
1238
  loading: e.loading,
@@ -1243,7 +1244,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1243
1244
  _: 1
1244
1245
  }, 8, ["loading"])),
1245
1246
  Y(y.$slots, "action-extra", { loading: e.loading }),
1246
- d.hideCancelBtn ? A("", !0) : (f(), L(B, {
1247
+ d.hideCancelBtn ? A("", !0) : (g(), L(B, {
1247
1248
  key: 1,
1248
1249
  onClick: T,
1249
1250
  loading: e.loading
@@ -1297,7 +1298,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1297
1298
  r.value = !0, P();
1298
1299
  }), (m, T) => {
1299
1300
  const x = ot;
1300
- return f(), L(x, { show: r.value }, {
1301
+ return g(), L(x, { show: r.value }, {
1301
1302
  default: o(() => [
1302
1303
  b("div", Pa, [
1303
1304
  b("iframe", {
@@ -1323,8 +1324,8 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1323
1324
  const n = e;
1324
1325
  return (r, _) => {
1325
1326
  const d = N, s = be, P = _e, m = Ee;
1326
- return f(), H("div", Sa, [
1327
- n.title ? (f(), L(m, {
1327
+ return g(), H("div", Sa, [
1328
+ n.title ? (g(), L(m, {
1328
1329
  key: 0,
1329
1330
  class: "mb-4",
1330
1331
  bordered: !1,
@@ -1341,7 +1342,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1341
1342
  size: 16
1342
1343
  }, {
1343
1344
  default: o(() => [
1344
- n.icon ? (f(), L(s, {
1345
+ n.icon ? (g(), L(s, {
1345
1346
  key: 0,
1346
1347
  size: 48,
1347
1348
  class: "bg-linear-to-br from-blue-500 to-indigo-600"
@@ -1368,7 +1369,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1368
1369
  ]),
1369
1370
  _: 1
1370
1371
  })) : A("", !0),
1371
- r.$slots.search ? (f(), L(m, {
1372
+ r.$slots.search ? (g(), L(m, {
1372
1373
  key: 1,
1373
1374
  class: "mb-4",
1374
1375
  "content-class": "flex flex-row gap-2",
@@ -1379,7 +1380,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1379
1380
  ]),
1380
1381
  _: 3
1381
1382
  })) : A("", !0),
1382
- r.$slots.default ? (f(), L(m, {
1383
+ r.$slots.default ? (g(), L(m, {
1383
1384
  key: 2,
1384
1385
  "content-class": "flex flex-row gap-2 p-0!",
1385
1386
  bordered: !1
@@ -1395,7 +1396,7 @@ const fa = /* @__PURE__ */ F(ua, [["render", da]]), ga = U(fa), pa = U(ia), ha =
1395
1396
  }), Ea = U(Oa), Ra = {}, Na = { class: "flex flex-col justify-center page-container" };
1396
1397
  function za(e, n) {
1397
1398
  const r = ye;
1398
- return f(), H("div", Na, [
1399
+ return g(), H("div", Na, [
1399
1400
  c(r, {
1400
1401
  status: "500",
1401
1402
  title: "服务器错误",
@@ -1406,7 +1407,7 @@ function za(e, n) {
1406
1407
  const Ba = /* @__PURE__ */ F(Ra, [["render", za], ["__scopeId", "data-v-89cb65c7"]]), Da = {}, Aa = { class: "flex flex-col justify-center page-container" };
1407
1408
  function Ma(e, n) {
1408
1409
  const r = ye;
1409
- return f(), H("div", Aa, [
1410
+ return g(), H("div", Aa, [
1410
1411
  c(r, {
1411
1412
  status: "404",
1412
1413
  title: "资源不存在",
@@ -1417,7 +1418,7 @@ function Ma(e, n) {
1417
1418
  const Ia = /* @__PURE__ */ F(Da, [["render", Ma], ["__scopeId", "data-v-99232671"]]), Ha = {}, Wa = { class: "flex flex-col justify-center page-container" };
1418
1419
  function Ua(e, n) {
1419
1420
  const r = ye;
1420
- return f(), H("div", Wa, [
1421
+ return g(), H("div", Wa, [
1421
1422
  c(r, {
1422
1423
  status: "403",
1423
1424
  title: "禁止访问",
@@ -1443,7 +1444,7 @@ const ja = /* @__PURE__ */ F(Ha, [["render", Ua], ["__scopeId", "data-v-3baa9c16
1443
1444
  } catch (d) {
1444
1445
  await _(n, d);
1445
1446
  }
1446
- }), (d, s) => (f(), H("div", Ya, [...s[0] || (s[0] = [
1447
+ }), (d, s) => (g(), H("div", Ya, [...s[0] || (s[0] = [
1447
1448
  b("div", { class: "view-auth-callback-content" }, [
1448
1449
  b("div", { class: "view-auth-callback-spinner" }, [
1449
1450
  b("span", null, "正在处理登录回调...")
@@ -1 +1 @@
1
- (function(w,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("naive-ui"),require("vue"),require("@vicons/antd"),require("pinia"),require("vue-router"),require("element-resize-detector"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","naive-ui","vue","@vicons/antd","pinia","vue-router","element-resize-detector","vuedraggable"],o):(w=typeof globalThis<"u"?globalThis:w||self,o(w.naiveplus={},w.naiveUi,w.Vue,w.antd,w.pinia,w.vueRouter,w.elementResizeDetectorMaker,w.Draggable))})(this,(function(w,o,e,L,J,R,he,_e){"use strict";const ye={class:"text-lg font-medium"},be={id:"data-content"},ke={key:0,class:"rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-4 mb-4"},we=e.defineComponent({__name:"PTable",props:{title:{},idField:{default:"id"},columns:{},onLoad:{},onDelete:{},onAdd:{},onEdit:{}},setup(t,{expose:a}){const c=e.ref(null),g=o.useDialog(),d=o.useMessage(),s=e.ref(!1),b=e.ref([]),u=e.ref([]),P=e.ref({page:1,itemCount:0,pageSize:10,pageSizes:[10,20,30,50],showSizePicker:!0,onChange:async y=>{P.value.page=y,await V()},onUpdatePageSize:async y=>{P.value.pageSize=y,await V()}}),C=t,l=y=>{const k=N=>{const S=[];return y&&y.forEach(O=>{O.key!=="edit"&&O.key!=="delete"&&S.push({label:O.name,key:O.key,icon:O.icon&&(()=>e.h(o.NIcon,null,{default:()=>e.h(O.icon)})),props:{onClick:()=>O.action(N)}})}),S};return{title:"操作",key:"actions",width:100,fixed:"right",render:N=>{let S=[];if(C.onEdit&&S.push({label:"编辑",key:"edit",icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.EditOutlined)}),props:{onClick:async()=>await C.onEdit(N)}}),C.onDelete&&S.push({label:"删除",key:"delete",icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.DeleteOutlined)}),props:{onClick:()=>B(N)}}),S=[...S,...k(N)],!(S.length<=0))return e.h(o.NDropdown,{options:S,placement:"bottom-start"},{default:()=>e.h(o.NButton,{size:"small",type:"primary"},{default:()=>["操作",e.h(o.NIcon,()=>e.h(L.MoreOutlined))]})})}}},_=e.computed(()=>{const y=C.columns.filter(N=>N.key!="action").map(N=>({title:N.title,key:N.key,width:N.width,fixed:N.fixed??!1,render:N.render,ellipsis:N.ellipsis?{tooltip:!0}:!1})),k=C.columns.reduce((N,S)=>S.key==="action"?S:N,void 0)?.action;return k&&k?.length>0||C.onEdit||C.onDelete?[{type:"selection",fixed:"left"},...y,l(k)]:[{type:"selection",fixed:"left"},...y]}),i=async()=>await V(),B=y=>r([y]),T=()=>{const y=h();r(y)},r=y=>{y&&y.length>0&&g.warning({title:"警告",content:"删除数据不可恢复, 确认删除吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(C.onDelete)try{await C.onDelete(y)?(V(),d.success("删除成功")):d.error("删除失败")}catch(k){d.error(k.message)}}})},h=()=>b.value?u.value.filter(k=>b.value.includes(k.id)).map(k=>e.toRaw(k)):[],m=()=>h()[0],$=()=>e.toRaw(u.value),V=async()=>{if(!s.value){s.value=!0;try{if(C.onLoad){var{data:y,total:k}=await C.onLoad(P.value.page,P.value.pageSize);u.value=y,P.value.itemCount=k}}catch(N){d.error(N.message)}finally{s.value=!1}}},x=e.computed(()=>{const y=e.unref(c);if(!y)return;const k=y?.$el,N=k.querySelector(".n-data-table-thead "),{bottomIncludeBody:S}=Z(N),O=48;let I=12,H=24;const A=k.querySelector(".n-data-table__pagination");if(A){const q=A.offsetHeight;I+=q||0}else I+=28;return S-(O+I+H)}),W=y=>!y||!y.getBoundingClientRect?0:y.getBoundingClientRect(),Z=y=>{const k=document.documentElement,N=k.scrollLeft,S=k.scrollTop,O=k.clientLeft,I=k.clientTop,H=window.pageXOffset,A=window.pageYOffset,F=W(y),{left:q,top:G,width:Q,height:n}=F,f=(H||N)-(O||0),p=(A||S)-(I||0),E=q+H,z=G+A,K=E-f,Y=z-p,X=window.document.documentElement.clientWidth,ue=window.document.documentElement.clientHeight;return{left:K,top:Y,right:X-Q-K,bottom:ue-n-Y,rightIncludeBody:X-K,bottomIncludeBody:ue-Y}};return e.onMounted(async()=>await V()),a({getData:$,getSelectedRow:m,getSelectedRows:h,refreshData:V,resetPage:()=>{P.value.page=1}}),(y,k)=>{const N=o.NTooltip,S=o.NSpace,O=o.NDataTable;return e.openBlock(),e.createBlock(e.unref(o.NCard),{bordered:!1},{header:e.withCtx(()=>[e.createVNode(S,{justify:"space-between",align:"center",class:"w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",ye,e.toDisplayString(t.title),1),e.createVNode(S,null,{default:e.withCtx(()=>[C.onAdd?(e.openBlock(),e.createBlock(N,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:C.onAdd},{default:e.withCtx(()=>[e.createVNode(e.unref(L.PlusSquareOutlined))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[k[1]||(k[1]=e.createElementVNode("span",null,"新增",-1))]),_:1})):e.createCommentVNode("",!0),C.onDelete?(e.openBlock(),e.createBlock(N,{key:1,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:T},{default:e.withCtx(()=>[e.createVNode(e.unref(L.DeleteOutlined))]),_:1})]),default:e.withCtx(()=>[k[2]||(k[2]=e.createElementVNode("span",null,"删除",-1))]),_:1})):e.createCommentVNode("",!0),e.createVNode(N,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",class:"cursor-pointer hover:text-blue-600",onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ReloadOutlined))]),_:1})]),default:e.withCtx(()=>[k[3]||(k[3]=e.createElementVNode("span",null,"刷新",-1))]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",be,[y.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(y.$slots,"toolbar")])):e.createCommentVNode("",!0),e.createVNode(O,{remote:"",ref_key:"$table",ref:c,"checked-row-keys":b.value,"onUpdate:checkedRowKeys":k[0]||(k[0]=I=>b.value=I),"max-height":x.value,loading:s.value,bordered:!1,"single-line":!1,columns:_.value,data:u.value,pagination:P.value,"row-key":I=>I[t.idField]},null,8,["checked-row-keys","max-height","loading","columns","data","pagination","row-key"])])]),_:3})}}}),D=t=>{const a=t;return a.install=function(c){c.component(a.__name,t)},t},U=D(we),Ce=["Redirect","RedirectSon","login"],j=J.defineStore("p-layout",()=>{const t=e.reactive({collapsed:!1,title:"输入项目名称",logo:"https://picsum.photos/id/1/100/100",avatar:"",uid:"",uname:"",tabs:[],cacheTabs:!1,enableLanguage:!1});return{state:t,initTabs:r=>{r.sort((h,m)=>(m.meta.affix?1:0)-(h.meta.affix?1:0)),t.tabs=r},addTab:r=>Ce.includes(r.name)?!1:(t.tabs?.some(m=>m.fullPath==r.fullPath)||t.tabs?.push(r),!0),closeCurrentTab:r=>{const h=t.tabs.findIndex(m=>m.fullPath==r.fullPath);t.tabs.splice(h,1)},closeAllTabs:()=>{t.tabs=t.tabs.filter(r=>r?.meta?.affix??!1)},closeOtherTabs:r=>{t.tabs=t.tabs.filter(h=>h.fullPath==r.fullPath||(h?.meta?.affix??!1))},closeLeftTabs:r=>{const h=t.tabs.findIndex(m=>m.fullPath==r.fullPath);t.tabs=t.tabs.filter((m,$)=>$>=h||(m?.meta?.affix??!1))},closeRightTabs:r=>{const h=t.tabs.findIndex(m=>m.fullPath==r.fullPath);t.tabs=t.tabs.filter((m,$)=>$<=h||(m?.meta?.affix??!1))},collapse:()=>{t.collapsed=!t.collapsed},setTitle:r=>{t.title=r},setLogo:r=>{t.logo=r},setUser:(r,h)=>{t.uid=r,t.uname=h},setSettingPages:r=>{t.settingPages=r},setLogout:r=>{t.logout=r},enableLanguage:r=>{t.enableLanguage=r}}}),Ne={class:"logo"},xe=e.defineComponent({__name:"PLogo",setup(t){const a=j();return(c,g)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(o.NAvatar),{color:"var(--color-logo)",size:32,src:e.unref(a).state.logo,class:e.normalizeClass({"mr-2":!e.unref(a).state.collapsed})},null,8,["src","class"]),e.withDirectives(e.createElementVNode("h1",{class:"font-bold ease-in-out ml-2 logo-size"},e.toDisplayString(e.unref(a).state.title),513),[[e.vShow,!e.unref(a).state.collapsed]])]))}}),M=(t,a)=>{const c=t.__vccOpts||t;for(const[g,d]of a)c[g]=d;return c},Pe=M(xe,[["__scopeId","data-v-e48aeefa"]]),Be={translationApiUrl:"https://translate.zvo.cn/api",defaultLanguage:"chinese",currentLanguage:"",options:[],initLanguages:async()=>[],selectLanguage:async t=>{}},v=J.defineStore("language",()=>{const t=e.ref(Be),a=async()=>(t.value.options.length===0&&(t.value.options=await t.value.initLanguages()),t.value.options);return{select:async l=>{if(t.value.currentLanguage===l)return;const _=(await a()).find(i=>i.key===l);_&&(t.value.currentLanguage=_.key,t.value.selectLanguage(_))},selectLanguageCallback:async l=>{t.value.selectLanguage=l},initLanguagesCallback:async l=>{t.value.initLanguages=l},getLanguages:a,getCurrentLanguage:async()=>{if(t.value.currentLanguage)return(await a()).find(l=>l.key===t.value.currentLanguage)},setTranslationApiUrl:l=>{t.value.translationApiUrl=l},getTranslationApiUrl:()=>t.value.translationApiUrl,getDefaultLanguage:()=>t.value.defaultLanguage?t.value.defaultLanguage:"chinese_simplified",setDefaultLanguage:l=>{(l==="Chinese"||l==="chinese")&&(l="chinese_simplified"),t.value.defaultLanguage=l}}}),Ve={key:1},ee=e.defineComponent({__name:"PLanguage",setup(t){const{select:a,getLanguages:c,getCurrentLanguage:g,getDefaultLanguage:d,getTranslationApiUrl:s}=v(),b=e.ref(),u=e.ref([]),P=async l=>await a(l),C=async()=>{const l=window.translate;l&&(l.selectLanguageTag.show=!1,l.selectLanguageTag.languages=(await c()).map(_=>_.key).join(","),l.ignore.class.push("ignore-translate-flag"),l.ignore.id.push("ignore-translation"),l.language.setLocal(d()),l.request.api.translate="api/v1/translation",l.request.api.connectTest="api/v1/translation/connect-test",l.request.api.init="api/v1/translation/init",l.request.api.language="api/v1/translation/language",l.request.setHost(s()),l.request.listener.start(),l.listener.start(),l.whole.enableAll(),l.execute())};return e.onMounted(async()=>{await e.nextTick(),await C(),b.value=await g(),u.value=await c()}),(l,_)=>{const i=o.NIcon,B=o.NButton;return u.value.length>0?(e.openBlock(),e.createBlock(e.unref(o.NDropdown),{key:0,id:"ignore-translation",placement:"bottom-start",trigger:"hover",class:"flex flex-col justify-center h-full ignore",onSelect:P,options:u.value},{default:e.withCtx(()=>[e.createVNode(B,{quaternary:"",type:"info"},{default:e.withCtx(()=>[b.value?(e.openBlock(),e.createElementBlock("label",Ve,e.toDisplayString(b.value?.label),1)):(e.openBlock(),e.createBlock(i,{key:0,size:"18"},{default:e.withCtx(()=>[..._[0]||(_[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{d:"M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z",fill:"currentColor"}),e.createElementVNode("path",{d:"M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z",fill:"currentColor"})],-1)])]),_:1}))]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)}}}),Se={class:"layout-header"},Ee={class:"layout-header-left"},Le={class:"link-text"},Te={key:1,class:"link-text"},$e={class:"layout-header-right"},Oe={key:0,class:"layout-header-trigger-min"},De={class:"layout-header-trigger layout-header-trigger-min"},Ie={class:"layout-header-trigger layout-header-trigger-min"},Re={class:"avatar"},Me=M(e.defineComponent({__name:"PHeader",setup(t){const a=o.useMessage(),c=o.useDialog(),g=j(),d=R.useRouter(),s=R.useRoute(),b=e.inject("reloadPage"),u=r=>d.push({name:r}),P=e.computed(()=>C(s.matched)),C=r=>r.map(h=>{const m={key:h.name,label:h.meta.title,icon:h.meta.icon,meta:h.meta,disabled:h.path==="/",children:void 0};return h.children&&h.children.length>0&&(m.children=C(h.children)),m}),l=e.ref(!1),_=()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),l.value=!1):(document.documentElement.requestFullscreen(),l.value=!0)},i=e.computed(()=>{const r=[];return r.push({label:"退出登录",key:"logout"}),g.state.settingPages&&g.state.settingPages.length>0&&g.state.settingPages.forEach(h=>{r.push({label:h.title,key:h.route})}),r}),B=r=>{r==="logout"?T():d.push({name:r})},T=()=>{c.info({title:"提示",content:"您确定要退出登录吗",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(g.state.logout)try{await g.state.logout(),localStorage.removeItem("TABS-ROUTES"),a.error("退出成功")}catch(r){console.error(r),a.error("退出登录失败")}finally{location.reload()}else a.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法")},onNegativeClick:()=>{}})};return(r,h)=>{const m=o.NTooltip,$=o.NDivider,V=o.NAvatar;return e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Ee,[e.createElementVNode("div",{class:"ml-1 layout-header-trigger layout-header-trigger-min",onClick:h[0]||(h[0]=(...x)=>e.unref(g).collapse&&e.unref(g).collapse(...x))},[e.unref(g).state.collapsed?(e.openBlock(),e.createBlock(e.unref(o.NIcon),{key:0,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.MenuUnfoldOutlined))]),_:1})):(e.openBlock(),e.createBlock(e.unref(o.NIcon),{key:1,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.MenuFoldOutlined))]),_:1}))]),e.createElementVNode("div",{class:"mr-1 layout-header-trigger layout-header-trigger-min",onClick:h[1]||(h[1]=(...x)=>e.unref(b)&&e.unref(b)(...x))},[e.createVNode(e.unref(o.NIcon),{size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ReloadOutlined))]),_:1})]),e.createVNode(e.unref(o.NBreadcrumb),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,x=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:x.label},[x.label?(e.openBlock(),e.createBlock(e.unref(o.NBreadcrumbItem),{key:0},{default:e.withCtx(()=>[x.children&&x.children.length?(e.openBlock(),e.createBlock(e.unref(o.NDropdown),{key:0,options:x.children,onSelect:u},{default:e.withCtx(()=>[e.createElementVNode("span",Le,[x.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(x.label),1)])]),_:2},1032,["options"])):(e.openBlock(),e.createElementBlock("span",Te,[x.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(x.label),1)]))]),_:2},1024)):e.createCommentVNode("",!0)],64))),128))]),_:1})]),e.createElementVNode("div",$e,[e.unref(g).state.enableLanguage?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(ee)])):e.createCommentVNode("",!0),e.createElementVNode("div",De,[e.createVNode(m,{placement:"bottom"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",onClick:e.withModifiers(_,["stop"])},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createBlock(e.unref(L.FullscreenExitOutlined),{key:1})):(e.openBlock(),e.createBlock(e.unref(L.FullscreenOutlined),{key:0}))]),_:1})]),default:e.withCtx(()=>[h[2]||(h[2]=e.createElementVNode("span",null,"全屏",-1))]),_:1})]),e.createElementVNode("div",Ie,[e.createVNode(e.unref(o.NDropdown),{trigger:"hover",onSelect:B,options:i.value},{default:e.withCtx(()=>[e.createElementVNode("div",Re,[e.createElementVNode("span",null,e.toDisplayString(e.unref(g).state.uname),1),e.createVNode($,{vertical:""}),e.createVNode(V,{round:"",src:e.unref(g).state.avatar},null,8,["src"])])]),_:1},8,["options"])])])])}}}),[["__scopeId","data-v-563e4e55"]]),ze={class:"mt-1"},Ae=e.defineComponent({__name:"PContent",props:{loading:{type:Boolean,default:!1}},setup(t){return(a,c)=>{const g=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",ze,[t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:0},{default:e.withCtx(({Component:d,route:s})=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d),{key:s.fullPath}))],1024))]),_:1}))])}}}),qe={class:"tabs-view-main"},je=["id","onClick","onContextmenu"],He={class:"tabs-close"},We={class:"tabs-close-btn"},Fe=M(e.defineComponent({__name:"PTabs",setup(t){e.useCssVars(n=>({v141ddb06:c.value,cf709148:g.value}));const a=o.useThemeVars(),c=e.computed(()=>a.value.cardColor),g=e.computed(()=>a.value.textColor1),d=o.useMessage(),s=R.useRoute(),b=R.useRouter(),u=e.ref(null),P=e.ref(null),C=e.ref(!1),l=j(),_=e.computed(()=>l.state.tabs),i=e.reactive({activeKey:s.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),B=["Login","Redirect","ErrorPage"],T=n=>{const{fullPath:f,hash:p,meta:E,name:z,params:K,path:Y,query:X}=n;return{fullPath:f,hash:p,meta:E,name:z,params:K,path:Y,query:X}},r=e.computed(()=>{const p=l.state.collapsed?"64px":"272px";return{left:p,width:`calc(100% - ${p})`}}),h=e.computed(()=>{const n=_.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:C.value||n,icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:n,icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:n,icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.MinusOutlined)})}]}),m=()=>{let n=[];const f=T(s);try{if(l.state.cacheTabs){const p=localStorage.getItem("TABS_ROUTES");n=p?JSON.parse(p):[f]}}catch{n=[f]}finally{return n}},$=n=>{const f=b.getRoutes();n.forEach(p=>{const E=f.find(z=>z.path===p.path);E&&(p.meta=E.meta||p.meta,p.name=E.name||p.name)}),l.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(n))},V=()=>{const n=m();$(n),l.initTabs(n)},x=async n=>{if(await e.nextTick(),!u.value)return;const f=u.value.offsetWidth,p=u.value.scrollWidth;f<p?(i.scrollable=!0,n&&[...u.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(z=>{z.id===`tag${i.activeKey.split("/").join("/")}`&&z.scrollIntoView&&z.scrollIntoView()})):i.scrollable=!1},W=n=>!(n.draggedContext.element.meta.affix||n.relatedContext.element.meta.affix),Z=()=>{let n;n=he(),n.listenTo(P.value,()=>x(!0))},y=n=>{const{fullPath:f}=n;if(f===s.fullPath||(i.activeKey=f,!n))return;const{replace:p}=b;toString.call(n),p(n).catch(console.error)},k=(n,f)=>{n.preventDefault(),C.value=f.path==="/home",i.showDropdown=!1,e.nextTick().then(()=>{i.showDropdown=!0,i.dropdownX=n.clientX,i.dropdownY=n.clientY})},N=()=>{if(s.meta.keepAlive){var n=b.currentRoute.value.matched.find(f=>f.name==s.name);n&&n.components?.default?.name}},S=n=>{if(_.value.length===1)return d.warning("这已经是最后一页,不能再关闭了!");if(N(),l.closeCurrentTab(n),i.activeKey===n.fullPath){const f=_.value[Math.max(0,_.value.length-1)];i.activeKey=f.fullPath,b.push(f)}x()},O=n=>{const{fullPath:f}=n,p=_.value.find(E=>E.fullPath==f);S(p)},I=n=>{l.closeOtherTabs(n),i.activeKey=n.fullPath,b.replace(n.fullPath),x()},H=()=>{l.closeAllTabs(),x()},A=e.inject("reloadPage"),F=n=>{switch(n){case"1":A();break;case"2":S(s);break;case"3":I(s);break;case"4":H();break}x(),i.showDropdown=!1},q=(n,f)=>{const p=u.value.scrollLeft,E=f>0&&p+f>=n||f<0&&p+f<=n?n:p+f;if(u.value&&u.value.scrollTo(E,0),E!==n)return window.requestAnimationFrame(()=>q(n,f))},G=()=>{const n=u.value.offsetWidth,f=u.value.scrollLeft;if(!f)return;const p=f>n?f-n:0;q(p,(p-f)/20)},Q=()=>{const n=u.value.offsetWidth,f=u.value.scrollWidth,p=u.value.scrollLeft;if(f-p<=n)return;const E=f-p>n*2?p+n:f-n;q(E,(E-p)/20)};return window.addEventListener("beforeunload",()=>{localStorage.setItem("TABS_ROUTES",JSON.stringify(_.value))}),window.addEventListener("scroll",n=>{let f=n.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;i.isMultiHeaderFixed=f>=64},!0),e.watch(()=>s.fullPath,n=>{B.includes(s.name)||(i.activeKey=n,l.addTab(T(s)),x(!0))},{immediate:!0}),V(),e.onMounted(()=>Z()),(n,f)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",qe,[e.createElementVNode("div",{ref_key:"navWrap",ref:P,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":i.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!i.scrollable}]),onClick:G},[e.createVNode(e.unref(o.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!i.scrollable}]),onClick:Q},[e.createVNode(e.unref(o.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:u,class:"tabs-card-scroll"},[e.createVNode(e.unref(_e),{list:_.value,animation:"300","item-key":"fullPath",class:"flex",move:W},{item:e.withCtx(({element:p})=>[e.createElementVNode("div",{id:`tag${p.fullPath.split("/").join("/")}`,class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":i.activeKey===p.fullPath}]),onClick:e.withModifiers(E=>y(p),["stop"]),onContextmenu:E=>k(E,p)},[e.createElementVNode("span",null,e.toDisplayString(p.meta.title),1),p.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(o.NIcon),{key:0,size:"14",onClick:e.withModifiers(E=>O(p),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(L.CloseOutlined))]),_:1},8,["onClick"]))],42,je)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",He,[e.createVNode(e.unref(o.NDropdown),{trigger:"hover",onSelect:F,placement:"bottom-end",options:h.value},{default:e.withCtx(()=>[e.createElementVNode("div",We,[e.createVNode(e.unref(o.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(o.NDropdown),{show:i.showDropdown,x:i.dropdownX,y:i.dropdownY,onClickoutside:f[0]||(f[0]=p=>i.showDropdown=!1),placement:"bottom-start",onSelect:F,options:h.value},null,8,["show","x","y","options"])])],4))}}),[["__scopeId","data-v-48b3be2d"]]),Ke=e.defineComponent({__name:"PMenus",setup(t){const a=R.useRoute(),c=R.useRouter(),g=j(),d=e.ref(a.name),s=e.ref(a.matched&&a.matched.length?a.matched.map(i=>i.name):[]),b=e.ref([]),u=i=>{/http(s)?:/.test(i)?window.open(i):c.push({name:i})},P=i=>{if(!i)return;const B=i.find(T=>s.value.indexOf(T)===-1);s.value=B?[B]:[]},C=()=>{const i=a.matched;s.value=i.map(T=>T.name);const B=a.meta?.activeMenu||"";d.value=B||a.name},l=(i,B=[],T=!1)=>{const r=[],h=["/:path(.*)*","/redirect","/redirect/:path(.*)","/login","/oidc-callback"];if(!i||i.length===0)return r;i=i.sort((m,$)=>{let V=($.children?.length?1:0)-(m.children?.length?1:0);return V===0&&(V=(m.meta?.sort??0)-($.meta?.sort??0)),V});for(const m of i){if(T||(m.meta?.hidden||!1)==!0||h.includes(m.path)){B.push(m.name),m.children&&m.children.length>0&&l(m.children,B,!0);continue}const $=m.meta?.alwaysShow!=!0&&m?.children?.filter(W=>!W?.meta?.hidden)?.length===1,V=$?m.children[0]:m,x={key:V.name,label:V.meta?.title,affix:V.meta?.affix,sort:V.meta?.sort,path:V.path,redirect:V.redirect,icon:$?m.meta?.icon:V.meta?.icon,permissions:V.meta?.permissions,meta:V.meta,children:void 0};if(!B.includes(m.name)){if(r.push(x),B.push(m.name),$){l(m.children,B,T);continue}m.children&&m.children.length>0&&(x.children=l(m.children,B,T))}}return r},_=()=>{const i=c.getRoutes();b.value=l(i)};return e.watch(()=>a.fullPath,()=>{C()}),e.onMounted(()=>{_(),C()}),(i,B)=>(e.openBlock(),e.createBlock(e.unref(o.NMenu),{class:"h-full",inverted:"",mode:"vertical",options:b.value,collapsed:e.unref(g).state.collapsed,"collapsed-width":64,"collapsed-icon-size":20,indent:24,"expanded-keys":s.value,value:d.value,"onUpdate:value":u,"onUpdate:expandedKeys":P},null,8,["options","collapsed","expanded-keys","value"]))}}),Ye={class:"layout-content-main layout-content-main-fix"},Xe={class:"main-view main-view-fix"},Je=M(e.defineComponent({__name:"PLayout",setup(t){const a=j(),c=e.ref(!1),g=()=>{c.value=!0,e.nextTick(()=>c.value=!1)};return e.provide("reloadPage",g),(d,s)=>{const b=o.NBackTop;return e.openBlock(),e.createBlock(e.unref(o.NLayout),{"has-sider":"",class:"layout",position:"absolute"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.NLayoutSider),{class:"layout-sider",inverted:"","show-trigger":"bar",position:"absolute","collapse-mode":"width","trigger-class":"!-right-5","collapsed-trigger-class":"!-right-5",collapsed:e.unref(a).state.collapsed,"native-scrollbar":!1,"collapsed-width":64,onCollapse:e.unref(a).collapse,onExpand:e.unref(a).collapse},{default:e.withCtx(()=>[e.createVNode(e.unref(o.NFlex),{vertical:""},{default:e.withCtx(()=>[e.createVNode(Pe),e.createVNode(Ke)]),_:1})]),_:1},8,["collapsed","onCollapse","onExpand"]),e.createVNode(e.unref(o.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.NLayoutHeader),{position:"absolute"},{default:e.withCtx(()=>[e.createVNode(Me)]),_:1}),e.createVNode(e.unref(o.NLayoutContent),{class:"layout-content layout-default-background"},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(Fe),e.createElementVNode("div",Xe,[e.createVNode(Ae,{loading:c.value},null,8,["loading"])])])]),_:1}),e.createVNode(b,{right:20,class:"z-50"})]),_:1})]),_:1})}}}),[["__scopeId","data-v-0bac2e7d"]]),Ze={};function Ge(t,a){const c=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(c)}const te=D(M(Ze,[["render",Ge]])),oe=D(Je),ne=D(e.defineComponent({__name:"PApplication",props:{theme:{},themeOverrides:{default:{common:{primaryColor:"#2d8cf0",primaryColorHover:"#3c9bff",primaryColorPressed:"#3c9bff",primaryColorSuppl:"#2d8cf0"},LoadingBar:{colorLoading:"#2d8cf0"}}}},setup(t){return(a,c)=>{const g=o.NConfigProvider;return e.openBlock(),e.createBlock(g,{locale:e.unref(o.zhCN),theme:t.theme,"theme-overrides":t.themeOverrides,"date-locale":e.unref(o.dateZhCN)},{default:e.withCtx(()=>[e.createVNode(e.unref(o.NDialogProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.NNotificationProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.NMessageProvider),null,{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})]),_:3})]),_:3})]),_:3},8,["locale","theme","theme-overrides","date-locale"])}}})),ae=D(e.defineComponent({__name:"PModal",props:{saveBtnText:{default:"保存"},cancelBtnText:{default:"取消"},hideCancelBtn:{type:Boolean,default:!1},hideSaveBtn:{type:Boolean,default:!1},title:{},width:{default:800},height:{default:500},visible:{type:Boolean},loading:{type:Boolean},onSave:{},onClose:{}},emits:["update:visible","update:loading"],setup(t,{expose:a,emit:c}){const g=o.useMessage(),d=t,s=c,b=async()=>{s("update:loading",!0);try{d.onSave&&await d.onSave()&&u()}catch(_){g.error(_.message)}finally{s("update:loading",!1)}},u=()=>{s("update:visible",!1),s("update:loading",!1)},P=async()=>{try{d.onClose?await d.onClose()&&u():u()}catch(_){g.error(_.message),s("update:loading",!1)}};return a({open:()=>{s("update:visible",!0),s("update:loading",!1)},close:()=>{s("update:visible",!1),s("update:loading",!1)}}),(_,i)=>{const B=o.NText,T=o.NButton,r=o.NSpace;return e.openBlock(),e.createBlock(e.unref(o.NModal),e.mergeProps({ref:"$modal",preset:"card"},_.$attrs,{"header-class":"bg-gray-50",show:d.visible,draggable:!0,closable:!1,"close-on-esc":!1,"mask-closable":!1,bordered:!1,style:{width:`${d.width}px`},onClose:u}),{header:e.withCtx(()=>[_.$slots.header?e.renderSlot(_.$slots,"header",{key:0}):d.title?(e.openBlock(),e.createBlock(B,{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})):e.createCommentVNode("",!0)]),"header-extra":e.withCtx(()=>[e.renderSlot(_.$slots,"header-extra")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"overflow-y-auto overflow-hidden mt-5",style:e.normalizeStyle({maxHeight:`${d.height}px`})},[e.renderSlot(_.$slots,"default")],4)]),footer:e.withCtx(()=>[e.renderSlot(_.$slots,"footer")]),action:e.withCtx(()=>[e.createVNode(r,{justify:"end"},{default:e.withCtx(()=>[d.hideSaveBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T,{key:0,type:"primary",loading:t.loading,onClick:b},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.saveBtnText),1)]),_:1},8,["loading"])),e.renderSlot(_.$slots,"action-extra",{loading:t.loading}),d.hideCancelBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T,{key:1,onClick:P,loading:t.loading},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelBtnText),1)]),_:1},8,["loading"]))]),_:3})]),_:3},16,["show","style"])}}})),le=D(ee),Qe=e.defineComponent({name:"Redirect",setup(){const t=R.useRoute(),a=R.useRouter();return e.onBeforeMount(()=>{const{params:c,query:g}=t,{path:d}=c;a.replace({path:"/"+(Array.isArray(d)?d.join("/"):d),query:g})}),()=>React.createElement(o.NEmpty,null)}}),se=D(Qe),Ue={class:"frame"},ve=["src"],ce=D(M(e.defineComponent({__name:"PIframe",setup(t){const a=R.useRoute(),c=e.ref(!1),g=e.ref(null),d=e.ref("");e.unref(a.meta)?.frameSrc&&(d.value=e.unref(a.meta)?.frameSrc);function s(){c.value=!1}function b(){e.nextTick(()=>{const u=e.unref(g);if(!u)return;const P=u;P.attachEvent?P.attachEvent("onload",()=>{s()}):u.onload=()=>{s()}})}return e.onMounted(()=>{c.value=!0,b()}),(u,P)=>{const C=o.NSpin;return e.openBlock(),e.createBlock(C,{show:c.value},{default:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createElementVNode("iframe",{src:d.value,class:"frame-iframe",ref_key:"frameRef",ref:g},null,8,ve)])]),_:1},8,["show"])}}}),[["__scopeId","data-v-161a378e"]])),et={class:"border border-gray-100 rounded-lg"},tt={class:"text-xl font-semibold text-gray-800"},ot={class:"text-sm text-gray-500 mt-1"},re=D(e.defineComponent({__name:"PPage",props:{icon:{type:Object,required:!1,default:()=>L.AlertOutlined},title:{type:String,required:!0},subtitle:{type:String,required:!1}},setup(t){const a=t;return(c,g)=>{const d=o.NIcon,s=o.NAvatar,b=o.NSpace,u=o.NCard;return e.openBlock(),e.createElementBlock("div",et,[a.title?(e.openBlock(),e.createBlock(u,{key:0,class:"mb-4",bordered:!1,"content-class":"py-4"},{default:e.withCtx(()=>[e.createVNode(b,{align:"center",justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(b,{align:"center",size:16},{default:e.withCtx(()=>[a.icon?(e.openBlock(),e.createBlock(s,{key:0,size:48,class:"bg-linear-to-br from-blue-500 to-indigo-600"},{default:e.withCtx(()=>[e.createVNode(d,{size:24,component:a.icon,color:"#fff"},null,8,["component"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",tt,e.toDisplayString(a.title),1),e.createElementVNode("div",ot,e.toDisplayString(a.subtitle??a.title+"主页"),1)])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),c.$slots.search?(e.openBlock(),e.createBlock(u,{key:1,class:"mb-4","content-class":"flex flex-row gap-2",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"search")]),_:3})):e.createCommentVNode("",!0),c.$slots.default?(e.openBlock(),e.createBlock(u,{key:2,"content-class":"flex flex-row gap-2 p-0!",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3})):e.createCommentVNode("",!0)])}}})),nt={},at={class:"flex flex-col justify-center page-container"};function lt(t,a){const c=o.NResult;return e.openBlock(),e.createElementBlock("div",at,[e.createVNode(c,{status:"500",title:"服务器错误",description:"抱歉,服务器出错了"})])}const st=M(nt,[["render",lt],["__scopeId","data-v-89cb65c7"]]),ct={},rt={class:"flex flex-col justify-center page-container"};function it(t,a){const c=o.NResult;return e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(c,{status:"404",title:"资源不存在",description:"抱歉,你访问的页面不存在"})])}const dt=M(ct,[["render",it],["__scopeId","data-v-99232671"]]),ft={},pt={class:"flex flex-col justify-center page-container"};function mt(t,a){const c=o.NResult;return e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(c,{status:"403",title:"禁止访问",description:"抱歉,你无权访问该页面"})])}const gt=M(ft,[["render",mt],["__scopeId","data-v-3baa9c16"]]),ie=D(st),de=D(dt),fe=D(gt),pe=J.defineStore("app-oidc",()=>{const t=e.reactive({});return{setCallback:s=>t.callback=s,callCallback:async s=>await t.callback?.(s),setError:s=>t.error=s,callError:async(s,b)=>await t.error?.(s,b)}}),ut={class:"view-auth-callback"},me=D(M(e.defineComponent({__name:"POidc",setup(t){const a=R.useRouter(),{callCallback:c,callError:g}=pe();return e.onMounted(async()=>{try{await c(a)}catch(d){await g(a,d)}}),(d,s)=>(e.openBlock(),e.createElementBlock("div",ut,[...s[0]||(s[0]=[e.createElementVNode("div",{class:"view-auth-callback-content"},[e.createElementVNode("div",{class:"view-auth-callback-spinner"},[e.createElementVNode("span",null,"正在处理登录回调...")])],-1)])]))}}),[["__scopeId","data-v-167395ae"]])),ht=Object.freeze(Object.defineProperty({__proto__:null,P403:fe,P404:de,P500:ie,PApplication:ne,PEmptyLayout:te,PIframe:ce,PLanguage:le,PLayout:oe,PModal:ae,POidc:me,PPage:re,PRedirect:se,PTable:U},Symbol.toStringTag,{value:"Module"})),ge=(t,a)=>(Object.values(ht).forEach(c=>{c.install&&t.use(c)}),a?.(),t),_t={install:ge};w.P403=fe,w.P404=de,w.P500=ie,w.PApplication=ne,w.PEmptyLayout=te,w.PIframe=ce,w.PLanguage=le,w.PLayout=oe,w.PModal=ae,w.POidc=me,w.PPage=re,w.PRedirect=se,w.PTable=U,w.default=_t,w.install=ge,w.useLanguageStore=v,w.useLayoutStore=j,w.useOidcStore=pe,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(w,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("naive-ui"),require("vue"),require("@vicons/antd"),require("pinia"),require("vue-router"),require("element-resize-detector"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","naive-ui","vue","@vicons/antd","pinia","vue-router","element-resize-detector","vuedraggable"],o):(w=typeof globalThis<"u"?globalThis:w||self,o(w.naiveplus={},w.naiveUi,w.Vue,w.antd,w.pinia,w.vueRouter,w.elementResizeDetectorMaker,w.Draggable))})(this,(function(w,o,e,L,J,R,he,_e){"use strict";const ye={class:"text-lg font-medium"},ke={id:"data-content"},be={key:0,class:"rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-4 mb-4"},we=e.defineComponent({__name:"PTable",props:{title:{},idField:{default:"id"},columns:{},onLoad:{},onDelete:{},onAdd:{},onEdit:{}},setup(t,{expose:a}){const c=e.ref(null),g=o.useDialog(),d=o.useMessage(),s=e.ref(!1),k=e.ref([]),u=e.ref([]),P=e.ref({page:1,itemCount:0,pageSize:10,pageSizes:[10,20,30,50],showSizePicker:!0,onChange:async y=>{P.value.page=y,await V()},onUpdatePageSize:async y=>{P.value.pageSize=y,await V()}}),C=t,l=y=>{const b=N=>{const S=[];return y&&y.forEach(O=>{O.key!=="edit"&&O.key!=="delete"&&S.push({label:O.name,key:O.key,icon:O.icon&&(()=>e.h(o.NIcon,null,{default:()=>e.h(O.icon)})),props:{onClick:()=>O.action(N)}})}),S};return{title:"操作",key:"actions",width:100,fixed:"right",render:N=>{let S=[];if(C.onEdit&&S.push({label:"编辑",key:"edit",icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.EditOutlined)}),props:{onClick:async()=>await C.onEdit(N)}}),C.onDelete&&S.push({label:"删除",key:"delete",icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.DeleteOutlined)}),props:{onClick:()=>B(N)}}),S=[...S,...b(N)],!(S.length<=0))return e.h(o.NDropdown,{options:S,placement:"bottom-start"},{default:()=>e.h(o.NButton,{size:"small",type:"primary"},{default:()=>["操作",e.h(o.NIcon,()=>e.h(L.MoreOutlined))]})})}}},_=e.computed(()=>{const y=C.columns.filter(N=>N.key!="action").map(N=>({title:N.title,key:N.key,width:N.width,fixed:N.fixed??!1,render:N.render,ellipsis:N.ellipsis?{tooltip:!0}:!1})),b=C.columns.reduce((N,S)=>S.key==="action"?S:N,void 0)?.action;return b&&b?.length>0||C.onEdit||C.onDelete?[{type:"selection",fixed:"left"},...y,l(b)]:[{type:"selection",fixed:"left"},...y]}),i=async()=>await V(),B=y=>r([y]),T=()=>{const y=h();r(y)},r=y=>{y&&y.length>0&&g.warning({title:"警告",content:"删除数据不可恢复, 确认删除吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(C.onDelete)try{await C.onDelete(y)?(V(),d.success("删除成功")):d.error("删除失败")}catch(b){d.error(b.message)}}})},h=()=>k.value?u.value.filter(b=>k.value.includes(b.id)).map(b=>e.toRaw(b)):[],m=()=>h()[0],$=()=>e.toRaw(u.value),V=async()=>{if(!s.value){s.value=!0;try{if(C.onLoad){var{data:y,total:b}=await C.onLoad(P.value.page,P.value.pageSize);u.value=y,P.value.itemCount=b}}catch(N){d.error(N.message)}finally{s.value=!1}}},x=e.computed(()=>{const y=e.unref(c);if(!y)return;const b=y?.$el,N=b.querySelector(".n-data-table-thead "),{bottomIncludeBody:S}=Z(N),O=48;let I=12,H=25;const A=b.querySelector(".n-data-table__pagination");if(A){const q=A.offsetHeight;I+=q||0}else I+=28;return S-(O+I+H)}),W=y=>!y||!y.getBoundingClientRect?0:y.getBoundingClientRect(),Z=y=>{const b=document.documentElement,N=b.scrollLeft,S=b.scrollTop,O=b.clientLeft,I=b.clientTop,H=window.pageXOffset,A=window.pageYOffset,F=W(y),{left:q,top:G,width:Q,height:n}=F,f=(H||N)-(O||0),p=(A||S)-(I||0),E=q+H,z=G+A,K=E-f,Y=z-p,X=window.document.documentElement.clientWidth,ue=window.document.documentElement.clientHeight;return{left:K,top:Y,right:X-Q-K,bottom:ue-n-Y,rightIncludeBody:X-K,bottomIncludeBody:ue-Y}};return e.onMounted(async()=>await V()),a({getData:$,getSelectedRow:m,getSelectedRows:h,refreshData:V,resetPage:()=>{P.value.page=1}}),(y,b)=>{const N=o.NTooltip,S=o.NSpace,O=o.NDataTable;return e.openBlock(),e.createBlock(e.unref(o.NCard),{bordered:!1},{header:e.withCtx(()=>[e.createVNode(S,{justify:"space-between",align:"center",class:"w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",ye,e.toDisplayString(t.title),1),e.createVNode(S,null,{default:e.withCtx(()=>[C.onAdd?(e.openBlock(),e.createBlock(N,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:C.onAdd},{default:e.withCtx(()=>[e.createVNode(e.unref(L.PlusSquareOutlined))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[b[1]||(b[1]=e.createElementVNode("span",null,"新增",-1))]),_:1})):e.createCommentVNode("",!0),C.onDelete?(e.openBlock(),e.createBlock(N,{key:1,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:T},{default:e.withCtx(()=>[e.createVNode(e.unref(L.DeleteOutlined))]),_:1})]),default:e.withCtx(()=>[b[2]||(b[2]=e.createElementVNode("span",null,"删除",-1))]),_:1})):e.createCommentVNode("",!0),e.createVNode(N,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",class:"cursor-pointer hover:text-blue-600",onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ReloadOutlined))]),_:1})]),default:e.withCtx(()=>[b[3]||(b[3]=e.createElementVNode("span",null,"刷新",-1))]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",ke,[y.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",be,[e.renderSlot(y.$slots,"toolbar")])):e.createCommentVNode("",!0),e.createVNode(O,{remote:"",ref_key:"$table",ref:c,"checked-row-keys":k.value,"onUpdate:checkedRowKeys":b[0]||(b[0]=I=>k.value=I),"max-height":x.value,loading:s.value,bordered:!1,"single-line":!1,columns:_.value,data:u.value,pagination:P.value,"row-key":I=>I[t.idField]},null,8,["checked-row-keys","max-height","loading","columns","data","pagination","row-key"])])]),_:3})}}}),D=t=>{const a=t;return a.install=function(c){c.component(a.__name,t)},t},U=D(we),Ce=["Redirect","RedirectSon","login"],j=J.defineStore("p-layout",()=>{const t=e.reactive({collapsed:!1,title:"输入项目名称",logo:"https://picsum.photos/id/1/100/100",avatar:"",uid:"",uname:"",tabs:[],cacheTabs:!1,enableLanguage:!1});return{state:t,initTabs:r=>{r.sort((h,m)=>(m.meta.affix?1:0)-(h.meta.affix?1:0)),t.tabs=r},addTab:r=>Ce.includes(r.name)?!1:(t.tabs?.some(m=>m.fullPath==r.fullPath)||t.tabs?.push(r),!0),closeCurrentTab:r=>{const h=t.tabs.findIndex(m=>m.fullPath==r.fullPath);t.tabs.splice(h,1)},closeAllTabs:()=>{t.tabs=t.tabs.filter(r=>r?.meta?.affix??!1)},closeOtherTabs:r=>{t.tabs=t.tabs.filter(h=>h.fullPath==r.fullPath||(h?.meta?.affix??!1))},closeLeftTabs:r=>{const h=t.tabs.findIndex(m=>m.fullPath==r.fullPath);t.tabs=t.tabs.filter((m,$)=>$>=h||(m?.meta?.affix??!1))},closeRightTabs:r=>{const h=t.tabs.findIndex(m=>m.fullPath==r.fullPath);t.tabs=t.tabs.filter((m,$)=>$<=h||(m?.meta?.affix??!1))},collapse:()=>{t.collapsed=!t.collapsed},setTitle:r=>{t.title=r},setLogo:r=>{t.logo=r},setUser:(r,h)=>{t.uid=r,t.uname=h},setSettingPages:r=>{t.settingPages=r},setLogout:r=>{t.logout=r},enableLanguage:r=>{t.enableLanguage=r}}}),Ne={class:"logo"},xe=e.defineComponent({__name:"PLogo",setup(t){const a=j();return(c,g)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(e.unref(o.NAvatar),{color:"var(--color-logo)",size:32,src:e.unref(a).state.logo,class:e.normalizeClass({"mr-2":!e.unref(a).state.collapsed})},null,8,["src","class"]),e.withDirectives(e.createElementVNode("h1",{class:"font-bold ease-in-out ml-2 logo-size"},e.toDisplayString(e.unref(a).state.title),513),[[e.vShow,!e.unref(a).state.collapsed]])]))}}),M=(t,a)=>{const c=t.__vccOpts||t;for(const[g,d]of a)c[g]=d;return c},Pe=M(xe,[["__scopeId","data-v-e48aeefa"]]),Be={translationApiUrl:"https://translate.zvo.cn/api",defaultLanguage:"chinese",currentLanguage:"",options:[],initLanguages:async()=>[],selectLanguage:async t=>{}},v=J.defineStore("language",()=>{const t=e.ref(Be),a=async()=>(t.value.options.length===0&&(t.value.options=await t.value.initLanguages()),t.value.options);return{select:async l=>{if(t.value.currentLanguage===l)return;const _=(await a()).find(i=>i.key===l);_&&(t.value.currentLanguage=_.key,t.value.selectLanguage(_))},selectLanguageCallback:async l=>{t.value.selectLanguage=l},initLanguagesCallback:async l=>{t.value.initLanguages=l},getLanguages:a,getCurrentLanguage:async()=>{if(t.value.currentLanguage)return(await a()).find(l=>l.key===t.value.currentLanguage)},setTranslationApiUrl:l=>{t.value.translationApiUrl=l},getTranslationApiUrl:()=>t.value.translationApiUrl,getDefaultLanguage:()=>t.value.defaultLanguage?t.value.defaultLanguage:"chinese_simplified",setDefaultLanguage:l=>{(l==="Chinese"||l==="chinese")&&(l="chinese_simplified"),t.value.defaultLanguage=l}}}),Ve={key:1},ee=e.defineComponent({__name:"PLanguage",setup(t){const{select:a,getLanguages:c,getCurrentLanguage:g,getDefaultLanguage:d,getTranslationApiUrl:s}=v(),k=e.ref(),u=e.ref([]),P=async l=>await a(l),C=async()=>{const l=window.translate;l&&(l.selectLanguageTag.show=!1,l.selectLanguageTag.languages=(await c()).map(_=>_.key).join(","),l.ignore.class.push("ignore-translate-flag"),l.ignore.id.push("ignore-translation"),l.language.setLocal(d()),l.request.api.translate="api/v1/translation",l.request.api.connectTest="api/v1/translation/connect-test",l.request.api.init="api/v1/translation/init",l.request.api.language="api/v1/translation/language",l.request.setHost(s()),l.request.listener.start(),l.listener.start(),l.whole.enableAll(),l.execute())};return e.onMounted(async()=>{await e.nextTick(),await C(),k.value=await g(),u.value=await c()}),(l,_)=>{const i=o.NIcon,B=o.NButton;return u.value.length>0?(e.openBlock(),e.createBlock(e.unref(o.NDropdown),{key:0,id:"ignore-translation",placement:"bottom-start",trigger:"hover",class:"flex flex-col justify-center h-full ignore",onSelect:P,options:u.value},{default:e.withCtx(()=>[e.createVNode(B,{quaternary:"",type:"info"},{default:e.withCtx(()=>[k.value?(e.openBlock(),e.createElementBlock("label",Ve,e.toDisplayString(k.value?.label),1)):(e.openBlock(),e.createBlock(i,{key:0,size:"18"},{default:e.withCtx(()=>[..._[0]||(_[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{d:"M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z",fill:"currentColor"}),e.createElementVNode("path",{d:"M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z",fill:"currentColor"})],-1)])]),_:1}))]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)}}}),Se={class:"layout-header"},Ee={class:"layout-header-left"},Le={class:"link-text"},Te={key:1,class:"link-text"},$e={class:"layout-header-right"},Oe={key:0,class:"layout-header-trigger-min"},De={class:"layout-header-trigger layout-header-trigger-min"},Ie={class:"layout-header-trigger layout-header-trigger-min"},Re={class:"avatar"},Me=M(e.defineComponent({__name:"PHeader",setup(t){const a=o.useMessage(),c=o.useDialog(),g=j(),d=R.useRouter(),s=R.useRoute(),k=e.inject("reloadPage"),u=r=>d.push({name:r}),P=e.computed(()=>C(s.matched)),C=r=>r.map(h=>{const m={key:h.name,label:h.meta.title,icon:h.meta.icon,meta:h.meta,disabled:h.path==="/",children:void 0};return h.children&&h.children.length>0&&(m.children=C(h.children)),m}),l=e.ref(!1),_=()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),l.value=!1):(document.documentElement.requestFullscreen(),l.value=!0)},i=e.computed(()=>{const r=[];return r.push({label:"退出登录",key:"logout"}),g.state.settingPages&&g.state.settingPages.length>0&&g.state.settingPages.forEach(h=>{r.push({label:h.title,key:h.route})}),r}),B=r=>{r==="logout"?T():d.push({name:r})},T=()=>{c.info({title:"提示",content:"您确定要退出登录吗",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(g.state.logout)try{await g.state.logout(),localStorage.removeItem("TABS-ROUTES"),a.error("退出成功")}catch(r){console.error(r),a.error("退出登录失败")}finally{location.reload()}else a.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法")},onNegativeClick:()=>{}})};return(r,h)=>{const m=o.NTooltip,$=o.NDivider,V=o.NAvatar;return e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Ee,[e.createElementVNode("div",{class:"ml-1 layout-header-trigger layout-header-trigger-min",onClick:h[0]||(h[0]=(...x)=>e.unref(g).collapse&&e.unref(g).collapse(...x))},[e.unref(g).state.collapsed?(e.openBlock(),e.createBlock(e.unref(o.NIcon),{key:0,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.MenuUnfoldOutlined))]),_:1})):(e.openBlock(),e.createBlock(e.unref(o.NIcon),{key:1,size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.MenuFoldOutlined))]),_:1}))]),e.createElementVNode("div",{class:"mr-1 layout-header-trigger layout-header-trigger-min",onClick:h[1]||(h[1]=(...x)=>e.unref(k)&&e.unref(k)(...x))},[e.createVNode(e.unref(o.NIcon),{size:"18"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ReloadOutlined))]),_:1})]),e.createVNode(e.unref(o.NBreadcrumb),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,x=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:x.label},[x.label?(e.openBlock(),e.createBlock(e.unref(o.NBreadcrumbItem),{key:0},{default:e.withCtx(()=>[x.children&&x.children.length?(e.openBlock(),e.createBlock(e.unref(o.NDropdown),{key:0,options:x.children,onSelect:u},{default:e.withCtx(()=>[e.createElementVNode("span",Le,[x.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(x.label),1)])]),_:2},1032,["options"])):(e.openBlock(),e.createElementBlock("span",Te,[x.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{key:0})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(x.label),1)]))]),_:2},1024)):e.createCommentVNode("",!0)],64))),128))]),_:1})]),e.createElementVNode("div",$e,[e.unref(g).state.enableLanguage?(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(ee)])):e.createCommentVNode("",!0),e.createElementVNode("div",De,[e.createVNode(m,{placement:"bottom"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(o.NIcon),{size:"18",onClick:e.withModifiers(_,["stop"])},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createBlock(e.unref(L.FullscreenExitOutlined),{key:1})):(e.openBlock(),e.createBlock(e.unref(L.FullscreenOutlined),{key:0}))]),_:1})]),default:e.withCtx(()=>[h[2]||(h[2]=e.createElementVNode("span",null,"全屏",-1))]),_:1})]),e.createElementVNode("div",Ie,[e.createVNode(e.unref(o.NDropdown),{trigger:"hover",onSelect:B,options:i.value},{default:e.withCtx(()=>[e.createElementVNode("div",Re,[e.createElementVNode("span",null,e.toDisplayString(e.unref(g).state.uname),1),e.createVNode($,{vertical:""}),e.createVNode(V,{round:"",src:e.unref(g).state.avatar},null,8,["src"])])]),_:1},8,["options"])])])])}}}),[["__scopeId","data-v-563e4e55"]]),ze={class:"mt-1"},Ae=e.defineComponent({__name:"PContent",props:{loading:{type:Boolean,default:!1}},setup(t){return(a,c)=>{const g=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock("div",ze,[t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g,{key:0},{default:e.withCtx(({Component:d,route:s})=>[(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d),{key:s.fullPath}))],1024))]),_:1}))])}}}),qe={class:"tabs-view-main"},je=["id","onClick","onContextmenu"],He={class:"tabs-close"},We={class:"tabs-close-btn"},Fe=M(e.defineComponent({__name:"PTabs",setup(t){e.useCssVars(n=>({v4a1a98ea:c.value,v271d846e:g.value}));const a=o.useThemeVars(),c=e.computed(()=>a.value.cardColor),g=e.computed(()=>a.value.textColor1),d=o.useMessage(),s=R.useRoute(),k=R.useRouter(),u=e.ref(null),P=e.ref(null),C=e.ref(!1),l=j(),_=e.computed(()=>l.state.tabs),i=e.reactive({activeKey:s.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),B=["Login","Redirect","ErrorPage"],T=n=>{const{fullPath:f,hash:p,meta:E,name:z,params:K,path:Y,query:X}=n;return{fullPath:f,hash:p,meta:E,name:z,params:K,path:Y,query:X}},r=e.computed(()=>{const p=l.state.collapsed?"64px":"272px";return{left:p,width:`calc(100% - ${p})`}}),h=e.computed(()=>{const n=_.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:C.value||n,icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:n,icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:n,icon:()=>e.h(o.NIcon,null,{default:()=>e.h(L.MinusOutlined)})}]}),m=()=>{let n=[];const f=T(s);try{if(l.state.cacheTabs){const p=localStorage.getItem("TABS_ROUTES");n=p?JSON.parse(p):[f]}else n=[f]}catch{n=[f]}finally{return n}},$=n=>{const f=k.getRoutes();n.forEach(p=>{const E=f.find(z=>z.path===p.path);E&&(p.meta=E.meta||p.meta,p.name=E.name||p.name)}),l.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(n))},V=()=>{const n=m();$(n),l.initTabs(n)},x=async n=>{if(await e.nextTick(),!u.value)return;const f=u.value.offsetWidth,p=u.value.scrollWidth;f<p?(i.scrollable=!0,n&&[...u.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(z=>{z.id===`tag${i.activeKey.split("/").join("/")}`&&z.scrollIntoView&&z.scrollIntoView()})):i.scrollable=!1},W=n=>!(n.draggedContext.element.meta.affix||n.relatedContext.element.meta.affix),Z=()=>{let n;n=he(),n.listenTo(P.value,()=>x(!0))},y=n=>{const{fullPath:f}=n;if(f===s.fullPath||(i.activeKey=f,!n))return;const{replace:p}=k;toString.call(n),p(n).catch(console.error)},b=(n,f)=>{n.preventDefault(),C.value=f.path==="/home",i.showDropdown=!1,e.nextTick().then(()=>{i.showDropdown=!0,i.dropdownX=n.clientX,i.dropdownY=n.clientY})},N=()=>{if(s.meta.keepAlive){var n=k.currentRoute.value.matched.find(f=>f.name==s.name);n&&n.components?.default?.name}},S=n=>{if(_.value.length===1)return d.warning("这已经是最后一页,不能再关闭了!");if(N(),l.closeCurrentTab(n),i.activeKey===n.fullPath){const f=_.value[Math.max(0,_.value.length-1)];i.activeKey=f.fullPath,k.push(f)}x()},O=n=>{const{fullPath:f}=n,p=_.value.find(E=>E.fullPath==f);S(p)},I=n=>{l.closeOtherTabs(n),i.activeKey=n.fullPath,k.replace(n.fullPath),x()},H=()=>{l.closeAllTabs(),x()},A=e.inject("reloadPage"),F=n=>{switch(n){case"1":A();break;case"2":S(s);break;case"3":I(s);break;case"4":H();break}x(),i.showDropdown=!1},q=(n,f)=>{const p=u.value.scrollLeft,E=f>0&&p+f>=n||f<0&&p+f<=n?n:p+f;if(u.value&&u.value.scrollTo(E,0),E!==n)return window.requestAnimationFrame(()=>q(n,f))},G=()=>{const n=u.value.offsetWidth,f=u.value.scrollLeft;if(!f)return;const p=f>n?f-n:0;q(p,(p-f)/20)},Q=()=>{const n=u.value.offsetWidth,f=u.value.scrollWidth,p=u.value.scrollLeft;if(f-p<=n)return;const E=f-p>n*2?p+n:f-n;q(E,(E-p)/20)};return window.addEventListener("beforeunload",()=>{localStorage.setItem("TABS_ROUTES",JSON.stringify(_.value))}),window.addEventListener("scroll",n=>{let f=n.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;i.isMultiHeaderFixed=f>=64},!0),e.watch(()=>s.fullPath,n=>{B.includes(s.name)||(i.activeKey=n,l.addTab(T(s)),x(!0))},{immediate:!0}),V(),e.onMounted(()=>Z()),(n,f)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",qe,[e.createElementVNode("div",{ref_key:"navWrap",ref:P,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":i.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!i.scrollable}]),onClick:G},[e.createVNode(e.unref(o.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!i.scrollable}]),onClick:Q},[e.createVNode(e.unref(o.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:u,class:"tabs-card-scroll"},[e.createVNode(e.unref(_e),{list:_.value,animation:"300","item-key":"fullPath",class:"flex",move:W},{item:e.withCtx(({element:p})=>[e.createElementVNode("div",{id:`tag${p.fullPath.split("/").join("/")}`,class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":i.activeKey===p.fullPath}]),onClick:e.withModifiers(E=>y(p),["stop"]),onContextmenu:E=>b(E,p)},[e.createElementVNode("span",null,e.toDisplayString(p.meta.title),1),p.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(o.NIcon),{key:0,size:"14",onClick:e.withModifiers(E=>O(p),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(L.CloseOutlined))]),_:1},8,["onClick"]))],42,je)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",He,[e.createVNode(e.unref(o.NDropdown),{trigger:"hover",onSelect:F,placement:"bottom-end",options:h.value},{default:e.withCtx(()=>[e.createElementVNode("div",We,[e.createVNode(e.unref(o.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(o.NDropdown),{show:i.showDropdown,x:i.dropdownX,y:i.dropdownY,onClickoutside:f[0]||(f[0]=p=>i.showDropdown=!1),placement:"bottom-start",onSelect:F,options:h.value},null,8,["show","x","y","options"])])],4))}}),[["__scopeId","data-v-e37d2460"]]),Ke=e.defineComponent({__name:"PMenus",setup(t){const a=R.useRoute(),c=R.useRouter(),g=j(),d=e.ref(a.name),s=e.ref(a.matched&&a.matched.length?a.matched.map(i=>i.name):[]),k=e.ref([]),u=i=>{/http(s)?:/.test(i)?window.open(i):c.push({name:i})},P=i=>{if(!i)return;const B=i.find(T=>s.value.indexOf(T)===-1);s.value=B?[B]:[]},C=()=>{const i=a.matched;s.value=i.map(T=>T.name);const B=a.meta?.activeMenu||"";d.value=B||a.name},l=(i,B=[],T=!1)=>{const r=[],h=["/:path(.*)*","/redirect","/redirect/:path(.*)","/login","/oidc-callback"];if(!i||i.length===0)return r;i=i.sort((m,$)=>{let V=($.children?.length?1:0)-(m.children?.length?1:0);return V===0&&(V=(m.meta?.sort??0)-($.meta?.sort??0)),V});for(const m of i){if(T||(m.meta?.hidden||!1)==!0||h.includes(m.path)){B.push(m.name),m.children&&m.children.length>0&&l(m.children,B,!0);continue}const $=m.meta?.alwaysShow!=!0&&m?.children?.filter(W=>!W?.meta?.hidden)?.length===1,V=$?m.children[0]:m,x={key:V.name,label:V.meta?.title,affix:V.meta?.affix,sort:V.meta?.sort,path:V.path,redirect:V.redirect,icon:$?m.meta?.icon:V.meta?.icon,permissions:V.meta?.permissions,meta:V.meta,children:void 0};if(!B.includes(m.name)){if(r.push(x),B.push(m.name),$){l(m.children,B,T);continue}m.children&&m.children.length>0&&(x.children=l(m.children,B,T))}}return r},_=()=>{const i=c.getRoutes();k.value=l(i)};return e.watch(()=>a.fullPath,()=>{C()}),e.onMounted(()=>{_(),C()}),(i,B)=>(e.openBlock(),e.createBlock(e.unref(o.NMenu),{class:"h-full",inverted:"",mode:"vertical",options:k.value,collapsed:e.unref(g).state.collapsed,"collapsed-width":64,"collapsed-icon-size":20,indent:24,"expanded-keys":s.value,value:d.value,"onUpdate:value":u,"onUpdate:expandedKeys":P},null,8,["options","collapsed","expanded-keys","value"]))}}),Ye={class:"layout-content-main layout-content-main-fix"},Xe={class:"main-view main-view-fix"},Je=M(e.defineComponent({__name:"PLayout",setup(t){const a=j(),c=e.ref(!1),g=()=>{c.value=!0,e.nextTick(()=>c.value=!1)};return e.provide("reloadPage",g),(d,s)=>{const k=o.NBackTop;return e.openBlock(),e.createBlock(e.unref(o.NLayout),{"has-sider":"",class:"layout",position:"absolute"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.NLayoutSider),{class:"layout-sider",inverted:"","show-trigger":"bar",position:"absolute","collapse-mode":"width","trigger-class":"!-right-5","collapsed-trigger-class":"!-right-5",collapsed:e.unref(a).state.collapsed,"native-scrollbar":!1,"collapsed-width":64,onCollapse:e.unref(a).collapse,onExpand:e.unref(a).collapse},{default:e.withCtx(()=>[e.createVNode(e.unref(o.NFlex),{vertical:""},{default:e.withCtx(()=>[e.createVNode(Pe),e.createVNode(Ke)]),_:1})]),_:1},8,["collapsed","onCollapse","onExpand"]),e.createVNode(e.unref(o.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.NLayoutHeader),{position:"absolute"},{default:e.withCtx(()=>[e.createVNode(Me)]),_:1}),e.createVNode(e.unref(o.NLayoutContent),{class:"layout-content layout-default-background"},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(Fe),e.createElementVNode("div",Xe,[e.createVNode(Ae,{loading:c.value},null,8,["loading"])])])]),_:1}),e.createVNode(k,{right:20,class:"z-50"})]),_:1})]),_:1})}}}),[["__scopeId","data-v-0bac2e7d"]]),Ze={};function Ge(t,a){const c=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(c)}const te=D(M(Ze,[["render",Ge]])),oe=D(Je),ne=D(e.defineComponent({__name:"PApplication",props:{theme:{},themeOverrides:{default:{common:{primaryColor:"#2d8cf0",primaryColorHover:"#3c9bff",primaryColorPressed:"#3c9bff",primaryColorSuppl:"#2d8cf0"},LoadingBar:{colorLoading:"#2d8cf0"}}}},setup(t){return(a,c)=>{const g=o.NConfigProvider;return e.openBlock(),e.createBlock(g,{locale:e.unref(o.zhCN),theme:t.theme,"theme-overrides":t.themeOverrides,"date-locale":e.unref(o.dateZhCN)},{default:e.withCtx(()=>[e.createVNode(e.unref(o.NDialogProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.NNotificationProvider),null,{default:e.withCtx(()=>[e.createVNode(e.unref(o.NMessageProvider),null,{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})]),_:3})]),_:3})]),_:3},8,["locale","theme","theme-overrides","date-locale"])}}})),ae=D(e.defineComponent({__name:"PModal",props:{saveBtnText:{default:"保存"},cancelBtnText:{default:"取消"},hideCancelBtn:{type:Boolean,default:!1},hideSaveBtn:{type:Boolean,default:!1},title:{},width:{default:800},height:{default:500},visible:{type:Boolean},loading:{type:Boolean},onSave:{},onClose:{}},emits:["update:visible","update:loading"],setup(t,{expose:a,emit:c}){const g=o.useMessage(),d=t,s=c,k=async()=>{s("update:loading",!0);try{d.onSave&&await d.onSave()&&u()}catch(_){g.error(_.message)}finally{s("update:loading",!1)}},u=()=>{s("update:visible",!1),s("update:loading",!1)},P=async()=>{try{d.onClose?await d.onClose()&&u():u()}catch(_){g.error(_.message),s("update:loading",!1)}};return a({open:()=>{s("update:visible",!0),s("update:loading",!1)},close:()=>{s("update:visible",!1),s("update:loading",!1)}}),(_,i)=>{const B=o.NText,T=o.NButton,r=o.NSpace;return e.openBlock(),e.createBlock(e.unref(o.NModal),e.mergeProps({ref:"$modal",preset:"card"},_.$attrs,{"header-class":"bg-gray-50",show:d.visible,draggable:!0,closable:!1,"close-on-esc":!1,"mask-closable":!1,bordered:!1,style:{width:`${d.width}px`},onClose:u}),{header:e.withCtx(()=>[_.$slots.header?e.renderSlot(_.$slots,"header",{key:0}):d.title?(e.openBlock(),e.createBlock(B,{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})):e.createCommentVNode("",!0)]),"header-extra":e.withCtx(()=>[e.renderSlot(_.$slots,"header-extra")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"overflow-y-auto overflow-hidden mt-5",style:e.normalizeStyle({maxHeight:`${d.height}px`})},[e.renderSlot(_.$slots,"default")],4)]),footer:e.withCtx(()=>[e.renderSlot(_.$slots,"footer")]),action:e.withCtx(()=>[e.createVNode(r,{justify:"end"},{default:e.withCtx(()=>[d.hideSaveBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T,{key:0,type:"primary",loading:t.loading,onClick:k},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.saveBtnText),1)]),_:1},8,["loading"])),e.renderSlot(_.$slots,"action-extra",{loading:t.loading}),d.hideCancelBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T,{key:1,onClick:P,loading:t.loading},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelBtnText),1)]),_:1},8,["loading"]))]),_:3})]),_:3},16,["show","style"])}}})),le=D(ee),Qe=e.defineComponent({name:"Redirect",setup(){const t=R.useRoute(),a=R.useRouter();return e.onBeforeMount(()=>{const{params:c,query:g}=t,{path:d}=c;a.replace({path:"/"+(Array.isArray(d)?d.join("/"):d),query:g})}),()=>React.createElement(o.NEmpty,null)}}),se=D(Qe),Ue={class:"frame"},ve=["src"],ce=D(M(e.defineComponent({__name:"PIframe",setup(t){const a=R.useRoute(),c=e.ref(!1),g=e.ref(null),d=e.ref("");e.unref(a.meta)?.frameSrc&&(d.value=e.unref(a.meta)?.frameSrc);function s(){c.value=!1}function k(){e.nextTick(()=>{const u=e.unref(g);if(!u)return;const P=u;P.attachEvent?P.attachEvent("onload",()=>{s()}):u.onload=()=>{s()}})}return e.onMounted(()=>{c.value=!0,k()}),(u,P)=>{const C=o.NSpin;return e.openBlock(),e.createBlock(C,{show:c.value},{default:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createElementVNode("iframe",{src:d.value,class:"frame-iframe",ref_key:"frameRef",ref:g},null,8,ve)])]),_:1},8,["show"])}}}),[["__scopeId","data-v-161a378e"]])),et={class:"border border-gray-100 rounded-lg"},tt={class:"text-xl font-semibold text-gray-800"},ot={class:"text-sm text-gray-500 mt-1"},re=D(e.defineComponent({__name:"PPage",props:{icon:{type:Object,required:!1,default:()=>L.AlertOutlined},title:{type:String,required:!0},subtitle:{type:String,required:!1}},setup(t){const a=t;return(c,g)=>{const d=o.NIcon,s=o.NAvatar,k=o.NSpace,u=o.NCard;return e.openBlock(),e.createElementBlock("div",et,[a.title?(e.openBlock(),e.createBlock(u,{key:0,class:"mb-4",bordered:!1,"content-class":"py-4"},{default:e.withCtx(()=>[e.createVNode(k,{align:"center",justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(k,{align:"center",size:16},{default:e.withCtx(()=>[a.icon?(e.openBlock(),e.createBlock(s,{key:0,size:48,class:"bg-linear-to-br from-blue-500 to-indigo-600"},{default:e.withCtx(()=>[e.createVNode(d,{size:24,component:a.icon,color:"#fff"},null,8,["component"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("div",tt,e.toDisplayString(a.title),1),e.createElementVNode("div",ot,e.toDisplayString(a.subtitle??a.title+"主页"),1)])]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0),c.$slots.search?(e.openBlock(),e.createBlock(u,{key:1,class:"mb-4","content-class":"flex flex-row gap-2",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"search")]),_:3})):e.createCommentVNode("",!0),c.$slots.default?(e.openBlock(),e.createBlock(u,{key:2,"content-class":"flex flex-row gap-2 p-0!",bordered:!1},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3})):e.createCommentVNode("",!0)])}}})),nt={},at={class:"flex flex-col justify-center page-container"};function lt(t,a){const c=o.NResult;return e.openBlock(),e.createElementBlock("div",at,[e.createVNode(c,{status:"500",title:"服务器错误",description:"抱歉,服务器出错了"})])}const st=M(nt,[["render",lt],["__scopeId","data-v-89cb65c7"]]),ct={},rt={class:"flex flex-col justify-center page-container"};function it(t,a){const c=o.NResult;return e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(c,{status:"404",title:"资源不存在",description:"抱歉,你访问的页面不存在"})])}const dt=M(ct,[["render",it],["__scopeId","data-v-99232671"]]),ft={},pt={class:"flex flex-col justify-center page-container"};function mt(t,a){const c=o.NResult;return e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(c,{status:"403",title:"禁止访问",description:"抱歉,你无权访问该页面"})])}const gt=M(ft,[["render",mt],["__scopeId","data-v-3baa9c16"]]),ie=D(st),de=D(dt),fe=D(gt),pe=J.defineStore("app-oidc",()=>{const t=e.reactive({});return{setCallback:s=>t.callback=s,callCallback:async s=>await t.callback?.(s),setError:s=>t.error=s,callError:async(s,k)=>await t.error?.(s,k)}}),ut={class:"view-auth-callback"},me=D(M(e.defineComponent({__name:"POidc",setup(t){const a=R.useRouter(),{callCallback:c,callError:g}=pe();return e.onMounted(async()=>{try{await c(a)}catch(d){await g(a,d)}}),(d,s)=>(e.openBlock(),e.createElementBlock("div",ut,[...s[0]||(s[0]=[e.createElementVNode("div",{class:"view-auth-callback-content"},[e.createElementVNode("div",{class:"view-auth-callback-spinner"},[e.createElementVNode("span",null,"正在处理登录回调...")])],-1)])]))}}),[["__scopeId","data-v-167395ae"]])),ht=Object.freeze(Object.defineProperty({__proto__:null,P403:fe,P404:de,P500:ie,PApplication:ne,PEmptyLayout:te,PIframe:ce,PLanguage:le,PLayout:oe,PModal:ae,POidc:me,PPage:re,PRedirect:se,PTable:U},Symbol.toStringTag,{value:"Module"})),ge=(t,a)=>(Object.values(ht).forEach(c=>{c.install&&t.use(c)}),a?.(),t),_t={install:ge};w.P403=fe,w.P404=de,w.P500=ie,w.PApplication=ne,w.PEmptyLayout=te,w.PIframe=ce,w.PLanguage=le,w.PLayout=oe,w.PModal=ae,w.POidc=me,w.PPage=re,w.PRedirect=se,w.PTable=U,w.default=_t,w.install=ge,w.useLanguageStore=v,w.useLayoutStore=j,w.useOidcStore=pe,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .logo[data-v-e48aeefa]{display:flex;align-items:center;justify-content:start;padding-left:16px;height:64px;line-height:64px;overflow:hidden;white-space:nowrap}.logo-size[data-v-e48aeefa]{font-size:20px}.layout-header[data-v-563e4e55]{display:flex;justify-content:space-between;align-items:center;padding:0;height:64px;box-shadow:0 1px 4px #00152914;transition:all .2s ease-in-out;width:100%;z-index:11}.layout-header-left[data-v-563e4e55]{display:flex;align-items:center}.layout-header-left .logo[data-v-563e4e55]{display:flex;align-items:center;justify-content:center;height:64px;line-height:64px;overflow:hidden;white-space:nowrap;padding-left:10px}.layout-header-left .logo img[data-v-563e4e55]{width:auto;height:32px;margin-right:10px}.layout-header-left .logo .title[data-v-563e4e55]{margin-bottom:0}.layout-header-left[data-v-563e4e55] .ant-breadcrumb span:last-child .link-text{color:#515a6e}.layout-header-left .n-breadcrumb[data-v-563e4e55]{display:inline-block}.layout-header-left-menu[data-v-563e4e55]{color:var(--text-color)}.layout-header-right[data-v-563e4e55]{display:flex;align-items:center;margin-right:5px}.layout-header-right .avatar[data-v-563e4e55]{display:flex;align-items:center;height:64px}.layout-header-right[data-v-563e4e55]>*{cursor:pointer}.layout-header-trigger[data-v-563e4e55]{display:inline-block;width:64px;height:64px;text-align:center;cursor:pointer;transition:all .2s ease-in-out}.layout-header-trigger .n-icon[data-v-563e4e55]{display:flex;align-items:center;height:64px;line-height:64px}.layout-header-trigger[data-v-563e4e55]:hover{background:#ffffff14}.layout-header-trigger .anticon[data-v-563e4e55]{font-size:16px;color:#515a6e}.layout-header-trigger-min[data-v-563e4e55]{width:auto;padding:0 10px}.layout-header-light[data-v-563e4e55]{background:#fff;color:#515a6e}.layout-header-light .n-icon[data-v-563e4e55]{color:#515a6e}.layout-header-light .layout-header-left[data-v-563e4e55] .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#515a6e}.layout-header-light .layout-header-trigger[data-v-563e4e55]:hover{background:#f8f8f9}.layout-header-fix[data-v-563e4e55]{position:fixed;top:0;right:0;left:200px;z-index:11}[data-v-563e4e55] .menu-router-link{color:#515a6e}[data-v-563e4e55] .menu-router-link:hover{color:#1890ff}.tabs-view[data-v-48b3be2d]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-48b3be2d]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-48b3be2d]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-48b3be2d]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-48b3be2d]{display:none}.tabs-view-main .tabs-card-scroll[data-v-48b3be2d]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]{background:var(--v141ddb06);color:var(--cf709148);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-48b3be2d]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-48b3be2d]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-48b3be2d]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-48b3be2d]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-48b3be2d]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-48b3be2d]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-48b3be2d]{background:#f5f7f9}.tabs-view-dark-background[data-v-48b3be2d]{background:#101014}.tabs-view-fix[data-v-48b3be2d]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-48b3be2d]{top:0}.layout[data-v-0bac2e7d]{display:flex;flex-direction:row;flex:auto}.layout-default-background[data-v-0bac2e7d]{background:#f5f7f9}.layout .layout-sider[data-v-0bac2e7d]{min-height:100vh;box-shadow:2px 0 8px #1d23290d;position:relative;z-index:13;transition:all .2s ease-in-out}.layout .layout-sider-fix[data-v-0bac2e7d]{position:fixed;top:0;left:0}.layout .ant-layout[data-v-0bac2e7d]{overflow:hidden}.layout .layout-right-fix[data-v-0bac2e7d]{overflow-x:hidden;padding-left:200px;min-height:100vh;transition:all .2s ease-in-out}.layout .layout-content[data-v-0bac2e7d]{flex:auto;min-height:100vh}.layout .n-layout-header.n-layout-header--absolute-positioned[data-v-0bac2e7d]{z-index:11}.layout-content-main[data-v-0bac2e7d]{margin:0 5px 5px;position:relative;padding-top:64px}.layout-content-main-fix[data-v-0bac2e7d]{padding-top:64px}.main-view-fix[data-v-0bac2e7d]{padding-top:45px}.frame[data-v-161a378e]{width:100%;height:100vh}.frame-iframe[data-v-161a378e]{width:100%;height:100%;overflow:hidden;border:0;box-sizing:border-box}.page-container[data-v-89cb65c7],.page-container[data-v-99232671],.page-container[data-v-3baa9c16]{width:100%;border-radius:4px;padding:50px 0;height:100vh;margin-top:-128px}.view-auth-callback[data-v-167395ae]{display:flex;flex-direction:column;height:100vh;overflow:auto}.view-auth-callback-content[data-v-167395ae]{flex:1;padding:32px 12px;display:flex;justify-content:center;align-items:center}.view-auth-callback-spinner[data-v-167395ae]{display:flex;justify-content:center;align-items:center;height:100px}
1
+ .logo[data-v-e48aeefa]{display:flex;align-items:center;justify-content:start;padding-left:16px;height:64px;line-height:64px;overflow:hidden;white-space:nowrap}.logo-size[data-v-e48aeefa]{font-size:20px}.layout-header[data-v-563e4e55]{display:flex;justify-content:space-between;align-items:center;padding:0;height:64px;box-shadow:0 1px 4px #00152914;transition:all .2s ease-in-out;width:100%;z-index:11}.layout-header-left[data-v-563e4e55]{display:flex;align-items:center}.layout-header-left .logo[data-v-563e4e55]{display:flex;align-items:center;justify-content:center;height:64px;line-height:64px;overflow:hidden;white-space:nowrap;padding-left:10px}.layout-header-left .logo img[data-v-563e4e55]{width:auto;height:32px;margin-right:10px}.layout-header-left .logo .title[data-v-563e4e55]{margin-bottom:0}.layout-header-left[data-v-563e4e55] .ant-breadcrumb span:last-child .link-text{color:#515a6e}.layout-header-left .n-breadcrumb[data-v-563e4e55]{display:inline-block}.layout-header-left-menu[data-v-563e4e55]{color:var(--text-color)}.layout-header-right[data-v-563e4e55]{display:flex;align-items:center;margin-right:5px}.layout-header-right .avatar[data-v-563e4e55]{display:flex;align-items:center;height:64px}.layout-header-right[data-v-563e4e55]>*{cursor:pointer}.layout-header-trigger[data-v-563e4e55]{display:inline-block;width:64px;height:64px;text-align:center;cursor:pointer;transition:all .2s ease-in-out}.layout-header-trigger .n-icon[data-v-563e4e55]{display:flex;align-items:center;height:64px;line-height:64px}.layout-header-trigger[data-v-563e4e55]:hover{background:#ffffff14}.layout-header-trigger .anticon[data-v-563e4e55]{font-size:16px;color:#515a6e}.layout-header-trigger-min[data-v-563e4e55]{width:auto;padding:0 10px}.layout-header-light[data-v-563e4e55]{background:#fff;color:#515a6e}.layout-header-light .n-icon[data-v-563e4e55]{color:#515a6e}.layout-header-light .layout-header-left[data-v-563e4e55] .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#515a6e}.layout-header-light .layout-header-trigger[data-v-563e4e55]:hover{background:#f8f8f9}.layout-header-fix[data-v-563e4e55]{position:fixed;top:0;right:0;left:200px;z-index:11}[data-v-563e4e55] .menu-router-link{color:#515a6e}[data-v-563e4e55] .menu-router-link:hover{color:#1890ff}.tabs-view[data-v-e37d2460]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-e37d2460]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-e37d2460]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-e37d2460],.tabs-view-main .tabs-card .tabs-card-next[data-v-e37d2460]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-e37d2460],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-e37d2460]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-e37d2460]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-e37d2460]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-e37d2460],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-e37d2460]{display:none}.tabs-view-main .tabs-card-scroll[data-v-e37d2460]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-e37d2460]{background:var(--v4a1a98ea);color:var(--v271d846e);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-e37d2460]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-e37d2460]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-e37d2460]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-e37d2460]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-e37d2460]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-e37d2460]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-e37d2460]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-e37d2460]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-e37d2460]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-e37d2460]{background:#f5f7f9}.tabs-view-dark-background[data-v-e37d2460]{background:#101014}.tabs-view-fix[data-v-e37d2460]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-e37d2460]{top:0}.layout[data-v-0bac2e7d]{display:flex;flex-direction:row;flex:auto}.layout-default-background[data-v-0bac2e7d]{background:#f5f7f9}.layout .layout-sider[data-v-0bac2e7d]{min-height:100vh;box-shadow:2px 0 8px #1d23290d;position:relative;z-index:13;transition:all .2s ease-in-out}.layout .layout-sider-fix[data-v-0bac2e7d]{position:fixed;top:0;left:0}.layout .ant-layout[data-v-0bac2e7d]{overflow:hidden}.layout .layout-right-fix[data-v-0bac2e7d]{overflow-x:hidden;padding-left:200px;min-height:100vh;transition:all .2s ease-in-out}.layout .layout-content[data-v-0bac2e7d]{flex:auto;min-height:100vh}.layout .n-layout-header.n-layout-header--absolute-positioned[data-v-0bac2e7d]{z-index:11}.layout-content-main[data-v-0bac2e7d]{margin:0 5px 5px;position:relative;padding-top:64px}.layout-content-main-fix[data-v-0bac2e7d]{padding-top:64px}.main-view-fix[data-v-0bac2e7d]{padding-top:45px}.frame[data-v-161a378e]{width:100%;height:100vh}.frame-iframe[data-v-161a378e]{width:100%;height:100%;overflow:hidden;border:0;box-sizing:border-box}.page-container[data-v-89cb65c7],.page-container[data-v-99232671],.page-container[data-v-3baa9c16]{width:100%;border-radius:4px;padding:50px 0;height:100vh;margin-top:-128px}.view-auth-callback[data-v-167395ae]{display:flex;flex-direction:column;height:100vh;overflow:auto}.view-auth-callback-content[data-v-167395ae]{flex:1;padding:32px 12px;display:flex;justify-content:center;align-items:center}.view-auth-callback-spinner[data-v-167395ae]{display:flex;justify-content:center;align-items:center;height:100px}
@@ -1 +1 @@
1
- .tabs-view[data-v-48b3be2d]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-48b3be2d]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-48b3be2d]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-48b3be2d]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-48b3be2d]{display:none}.tabs-view-main .tabs-card-scroll[data-v-48b3be2d]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]{background:var(--v141ddb06);color:var(--cf709148);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-48b3be2d]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-48b3be2d]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-48b3be2d]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-48b3be2d]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-48b3be2d]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-48b3be2d]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-48b3be2d]{background:#f5f7f9}.tabs-view-dark-background[data-v-48b3be2d]{background:#101014}.tabs-view-fix[data-v-48b3be2d]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-48b3be2d]{top:0}
1
+ .tabs-view[data-v-e37d2460]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-e37d2460]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-e37d2460]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-e37d2460],.tabs-view-main .tabs-card .tabs-card-next[data-v-e37d2460]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-e37d2460],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-e37d2460]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-e37d2460]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-e37d2460]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-e37d2460],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-e37d2460]{display:none}.tabs-view-main .tabs-card-scroll[data-v-e37d2460]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-e37d2460]{background:var(--v4a1a98ea);color:var(--v271d846e);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-e37d2460]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-e37d2460]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-e37d2460]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-e37d2460]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-e37d2460]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-e37d2460]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-e37d2460]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-e37d2460]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-e37d2460]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-e37d2460]{background:#f5f7f9}.tabs-view-dark-background[data-v-e37d2460]{background:#101014}.tabs-view-fix[data-v-e37d2460]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-e37d2460]{top:0}
@@ -1,7 +1,7 @@
1
1
  import o from "./PTabs.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-48b3be2d"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e37d2460"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -9,8 +9,8 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
9
9
  __name: "PTabs",
10
10
  setup(Le) {
11
11
  le((e) => ({
12
- v141ddb06: E.value,
13
- cf709148: N.value
12
+ v4a1a98ea: E.value,
13
+ v271d846e: N.value
14
14
  }));
15
15
  const C = Te(), E = w(() => C.value.cardColor), N = w(() => C.value.textColor1), A = ke(), r = ye(), b = Ce(), s = y(null), T = y(null), k = y(!1), i = xe(), m = w(() => i.state.tabs), l = ae({
16
16
  activeKey: r.fullPath,
@@ -63,7 +63,8 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
63
63
  if (i.state.cacheTabs) {
64
64
  const o = localStorage.getItem("TABS_ROUTES");
65
65
  e = o ? JSON.parse(o) : [t];
66
- }
66
+ } else
67
+ e = [t];
67
68
  } catch {
68
69
  e = [t];
69
70
  } finally {
@@ -130,7 +130,7 @@ const we = { class: "text-lg font-medium" }, be = { id: "data-content" }, Ce = {
130
130
  const e = d(R);
131
131
  if (!e) return;
132
132
  const t = e?.$el, o = t.querySelector(".n-data-table-thead "), { bottomIncludeBody: n } = Y(o), a = 48;
133
- let c = 12, b = 24;
133
+ let c = 12, b = 25;
134
134
  const g = t.querySelector(
135
135
  ".n-data-table__pagination"
136
136
  );
@@ -1 +1 @@
1
- .tabs-view[data-v-48b3be2d]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-48b3be2d]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-48b3be2d]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-48b3be2d]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-48b3be2d]{display:none}.tabs-view-main .tabs-card-scroll[data-v-48b3be2d]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]{background:var(--v141ddb06);color:var(--cf709148);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-48b3be2d]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-48b3be2d]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-48b3be2d]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-48b3be2d]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-48b3be2d]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-48b3be2d]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-48b3be2d]{background:#f5f7f9}.tabs-view-dark-background[data-v-48b3be2d]{background:#101014}.tabs-view-fix[data-v-48b3be2d]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-48b3be2d]{top:0}
1
+ .tabs-view[data-v-e37d2460]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-e37d2460]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-e37d2460]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-e37d2460],.tabs-view-main .tabs-card .tabs-card-next[data-v-e37d2460]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-e37d2460],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-e37d2460]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-e37d2460]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-e37d2460]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-e37d2460],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-e37d2460]{display:none}.tabs-view-main .tabs-card-scroll[data-v-e37d2460]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-e37d2460]{background:var(--v4a1a98ea);color:var(--v271d846e);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-e37d2460]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-e37d2460]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-e37d2460]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-e37d2460]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-e37d2460]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-e37d2460]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-e37d2460]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-e37d2460]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-e37d2460]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-e37d2460]{background:#f5f7f9}.tabs-view-dark-background[data-v-e37d2460]{background:#101014}.tabs-view-fix[data-v-e37d2460]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-e37d2460]{top:0}
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./PTabs.vue2.cjs");;/* empty css */const t=require("../../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-48b3be2d"]]);exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./PTabs.vue2.cjs");;/* empty css */const t=require("../../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-e37d2460"]]);exports.default=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("element-resize-detector"),U=require("vuedraggable"),u=require("@vicons/antd"),y=require("vue-router"),r=require("naive-ui"),X=require("../store.cjs"),H={class:"tabs-view-main"},J=["id","onClick","onContextmenu"],G={class:"tabs-close"},Q={class:"tabs-close-btn"},Z=e.defineComponent({__name:"PTabs",setup(ee){e.useCssVars(t=>({v141ddb06:x.value,cf709148:T.value}));const p=r.useThemeVars(),x=e.computed(()=>p.value.cardColor),T=e.computed(()=>p.value.textColor1),k=r.useMessage(),c=y.useRoute(),m=y.useRouter(),s=e.ref(null),b=e.ref(null),w=e.ref(!1),i=X.useLayoutStore(),d=e.computed(()=>i.state.tabs),n=e.reactive({activeKey:c.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),_=["Login","Redirect","ErrorPage"],g=t=>{const{fullPath:o,hash:l,meta:a,name:f,params:B,path:j,query:Y}=t;return{fullPath:o,hash:l,meta:a,name:f,params:B,path:j,query:Y}},V=e.computed(()=>{const l=i.state.collapsed?"64px":"272px";return{left:l,width:`calc(100% - ${l})`}}),C=e.computed(()=>{const t=d.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:w.value||t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.MinusOutlined)})}]}),P=()=>{let t=[];const o=g(c);try{if(i.state.cacheTabs){const l=localStorage.getItem("TABS_ROUTES");t=l?JSON.parse(l):[o]}}catch{t=[o]}finally{return t}},E=t=>{const o=m.getRoutes();t.forEach(l=>{const a=o.find(f=>f.path===l.path);a&&(l.meta=a.meta||l.meta,l.name=a.name||l.name)}),i.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(t))},O=()=>{const t=P();E(t),i.initTabs(t)},h=async t=>{if(await e.nextTick(),!s.value)return;const o=s.value.offsetWidth,l=s.value.scrollWidth;o<l?(n.scrollable=!0,t&&[...s.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(f=>{f.id===`tag${n.activeKey.split("/").join("/")}`&&f.scrollIntoView&&f.scrollIntoView()})):n.scrollable=!1},W=t=>!(t.draggedContext.element.meta.affix||t.relatedContext.element.meta.affix),M=()=>{let t;t=F(),t.listenTo(b.value,()=>h(!0))},I=t=>{const{fullPath:o}=t;if(o===c.fullPath||(n.activeKey=o,!t))return;const{replace:l}=m;toString.call(t),l(t).catch(console.error)},R=(t,o)=>{t.preventDefault(),w.value=o.path==="/home",n.showDropdown=!1,e.nextTick().then(()=>{n.showDropdown=!0,n.dropdownX=t.clientX,n.dropdownY=t.clientY})},D=()=>{if(c.meta.keepAlive){var t=m.currentRoute.value.matched.find(o=>o.name==c.name);t&&t.components?.default?.name}},N=t=>{if(d.value.length===1)return k.warning("这已经是最后一页,不能再关闭了!");if(D(),i.closeCurrentTab(t),n.activeKey===t.fullPath){const o=d.value[Math.max(0,d.value.length-1)];n.activeKey=o.fullPath,m.push(o)}h()},L=t=>{const{fullPath:o}=t,l=d.value.find(a=>a.fullPath==o);N(l)},z=t=>{i.closeOtherTabs(t),n.activeKey=t.fullPath,m.replace(t.fullPath),h()},q=()=>{i.closeAllTabs(),h()},A=e.inject("reloadPage"),S=t=>{switch(t){case"1":A();break;case"2":N(c);break;case"3":z(c);break;case"4":q();break}h(),n.showDropdown=!1},v=(t,o)=>{const l=s.value.scrollLeft,a=o>0&&l+o>=t||o<0&&l+o<=t?t:l+o;if(s.value&&s.value.scrollTo(a,0),a!==t)return window.requestAnimationFrame(()=>v(t,o))},K=()=>{const t=s.value.offsetWidth,o=s.value.scrollLeft;if(!o)return;const l=o>t?o-t:0;v(l,(l-o)/20)},$=()=>{const t=s.value.offsetWidth,o=s.value.scrollWidth,l=s.value.scrollLeft;if(o-l<=t)return;const a=o-l>t*2?l+t:o-t;v(a,(a-l)/20)};return window.addEventListener("beforeunload",()=>{localStorage.setItem("TABS_ROUTES",JSON.stringify(d.value))}),window.addEventListener("scroll",t=>{let o=t.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;n.isMultiHeaderFixed=o>=64},!0),e.watch(()=>c.fullPath,t=>{_.includes(c.name)||(n.activeKey=t,i.addTab(g(c)),h(!0))},{immediate:!0}),O(),e.onMounted(()=>M()),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(V.value)},[e.createElementVNode("div",H,[e.createElementVNode("div",{ref_key:"navWrap",ref:b,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":n.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!n.scrollable}]),onClick:K},[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!n.scrollable}]),onClick:$},[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:s,class:"tabs-card-scroll"},[e.createVNode(e.unref(U),{list:d.value,animation:"300","item-key":"fullPath",class:"flex",move:W},{item:e.withCtx(({element:l})=>[e.createElementVNode("div",{id:`tag${l.fullPath.split("/").join("/")}`,class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":n.activeKey===l.fullPath}]),onClick:e.withModifiers(a=>I(l),["stop"]),onContextmenu:a=>R(a,l)},[e.createElementVNode("span",null,e.toDisplayString(l.meta.title),1),l.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r.NIcon),{key:0,size:"14",onClick:e.withModifiers(a=>L(l),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(u.CloseOutlined))]),_:1},8,["onClick"]))],42,J)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",G,[e.createVNode(e.unref(r.NDropdown),{trigger:"hover",onSelect:S,placement:"bottom-end",options:C.value},{default:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(r.NDropdown),{show:n.showDropdown,x:n.dropdownX,y:n.dropdownY,onClickoutside:o[0]||(o[0]=l=>n.showDropdown=!1),placement:"bottom-start",onSelect:S,options:C.value},null,8,["show","x","y","options"])])],4))}});exports.default=Z;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("element-resize-detector"),U=require("vuedraggable"),u=require("@vicons/antd"),y=require("vue-router"),r=require("naive-ui"),X=require("../store.cjs"),H={class:"tabs-view-main"},J=["id","onClick","onContextmenu"],G={class:"tabs-close"},Q={class:"tabs-close-btn"},Z=e.defineComponent({__name:"PTabs",setup(ee){e.useCssVars(t=>({v4a1a98ea:x.value,v271d846e:T.value}));const p=r.useThemeVars(),x=e.computed(()=>p.value.cardColor),T=e.computed(()=>p.value.textColor1),k=r.useMessage(),c=y.useRoute(),m=y.useRouter(),s=e.ref(null),b=e.ref(null),w=e.ref(!1),i=X.useLayoutStore(),d=e.computed(()=>i.state.tabs),n=e.reactive({activeKey:c.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),_=["Login","Redirect","ErrorPage"],g=t=>{const{fullPath:o,hash:l,meta:a,name:f,params:B,path:j,query:Y}=t;return{fullPath:o,hash:l,meta:a,name:f,params:B,path:j,query:Y}},V=e.computed(()=>{const l=i.state.collapsed?"64px":"272px";return{left:l,width:`calc(100% - ${l})`}}),C=e.computed(()=>{const t=d.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:w.value||t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.MinusOutlined)})}]}),P=()=>{let t=[];const o=g(c);try{if(i.state.cacheTabs){const l=localStorage.getItem("TABS_ROUTES");t=l?JSON.parse(l):[o]}else t=[o]}catch{t=[o]}finally{return t}},E=t=>{const o=m.getRoutes();t.forEach(l=>{const a=o.find(f=>f.path===l.path);a&&(l.meta=a.meta||l.meta,l.name=a.name||l.name)}),i.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(t))},O=()=>{const t=P();E(t),i.initTabs(t)},h=async t=>{if(await e.nextTick(),!s.value)return;const o=s.value.offsetWidth,l=s.value.scrollWidth;o<l?(n.scrollable=!0,t&&[...s.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(f=>{f.id===`tag${n.activeKey.split("/").join("/")}`&&f.scrollIntoView&&f.scrollIntoView()})):n.scrollable=!1},W=t=>!(t.draggedContext.element.meta.affix||t.relatedContext.element.meta.affix),M=()=>{let t;t=F(),t.listenTo(b.value,()=>h(!0))},I=t=>{const{fullPath:o}=t;if(o===c.fullPath||(n.activeKey=o,!t))return;const{replace:l}=m;toString.call(t),l(t).catch(console.error)},R=(t,o)=>{t.preventDefault(),w.value=o.path==="/home",n.showDropdown=!1,e.nextTick().then(()=>{n.showDropdown=!0,n.dropdownX=t.clientX,n.dropdownY=t.clientY})},D=()=>{if(c.meta.keepAlive){var t=m.currentRoute.value.matched.find(o=>o.name==c.name);t&&t.components?.default?.name}},N=t=>{if(d.value.length===1)return k.warning("这已经是最后一页,不能再关闭了!");if(D(),i.closeCurrentTab(t),n.activeKey===t.fullPath){const o=d.value[Math.max(0,d.value.length-1)];n.activeKey=o.fullPath,m.push(o)}h()},L=t=>{const{fullPath:o}=t,l=d.value.find(a=>a.fullPath==o);N(l)},z=t=>{i.closeOtherTabs(t),n.activeKey=t.fullPath,m.replace(t.fullPath),h()},q=()=>{i.closeAllTabs(),h()},A=e.inject("reloadPage"),S=t=>{switch(t){case"1":A();break;case"2":N(c);break;case"3":z(c);break;case"4":q();break}h(),n.showDropdown=!1},v=(t,o)=>{const l=s.value.scrollLeft,a=o>0&&l+o>=t||o<0&&l+o<=t?t:l+o;if(s.value&&s.value.scrollTo(a,0),a!==t)return window.requestAnimationFrame(()=>v(t,o))},K=()=>{const t=s.value.offsetWidth,o=s.value.scrollLeft;if(!o)return;const l=o>t?o-t:0;v(l,(l-o)/20)},$=()=>{const t=s.value.offsetWidth,o=s.value.scrollWidth,l=s.value.scrollLeft;if(o-l<=t)return;const a=o-l>t*2?l+t:o-t;v(a,(a-l)/20)};return window.addEventListener("beforeunload",()=>{localStorage.setItem("TABS_ROUTES",JSON.stringify(d.value))}),window.addEventListener("scroll",t=>{let o=t.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;n.isMultiHeaderFixed=o>=64},!0),e.watch(()=>c.fullPath,t=>{_.includes(c.name)||(n.activeKey=t,i.addTab(g(c)),h(!0))},{immediate:!0}),O(),e.onMounted(()=>M()),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(V.value)},[e.createElementVNode("div",H,[e.createElementVNode("div",{ref_key:"navWrap",ref:b,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":n.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!n.scrollable}]),onClick:K},[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!n.scrollable}]),onClick:$},[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:s,class:"tabs-card-scroll"},[e.createVNode(e.unref(U),{list:d.value,animation:"300","item-key":"fullPath",class:"flex",move:W},{item:e.withCtx(({element:l})=>[e.createElementVNode("div",{id:`tag${l.fullPath.split("/").join("/")}`,class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":n.activeKey===l.fullPath}]),onClick:e.withModifiers(a=>I(l),["stop"]),onContextmenu:a=>R(a,l)},[e.createElementVNode("span",null,e.toDisplayString(l.meta.title),1),l.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r.NIcon),{key:0,size:"14",onClick:e.withModifiers(a=>L(l),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(u.CloseOutlined))]),_:1},8,["onClick"]))],42,J)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",G,[e.createVNode(e.unref(r.NDropdown),{trigger:"hover",onSelect:S,placement:"bottom-end",options:C.value},{default:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(r.NDropdown),{show:n.showDropdown,x:n.dropdownX,y:n.dropdownY,onClickoutside:o[0]||(o[0]=l=>n.showDropdown=!1),placement:"bottom-start",onSelect:S,options:C.value},null,8,["show","x","y","options"])])],4))}});exports.default=Z;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("naive-ui"),e=require("vue"),u=require("@vicons/antd"),K={class:"text-lg font-medium"},X={id:"data-content"},Y={key:0,class:"rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-4 mb-4"},G=e.defineComponent({__name:"PTable",props:{title:{},idField:{default:"id"},columns:{},onLoad:{},onDelete:{},onAdd:{},onEdit:{}},setup(y,{expose:S}){const N=e.ref(null),D=a.useDialog(),g=a.useMessage(),p=e.ref(!1),h=e.ref([]),m=e.ref([]),c=e.ref({page:1,itemCount:0,pageSize:10,pageSizes:[10,20,30,50],showSizePicker:!0,onChange:async t=>{c.value.page=t,await d()},onUpdatePageSize:async t=>{c.value.pageSize=t,await d()}}),i=y,B=t=>{const o=n=>{const l=[];return t&&t.forEach(r=>{r.key!=="edit"&&r.key!=="delete"&&l.push({label:r.name,key:r.key,icon:r.icon&&(()=>e.h(a.NIcon,null,{default:()=>e.h(r.icon)})),props:{onClick:()=>r.action(n)}})}),l};return{title:"操作",key:"actions",width:100,fixed:"right",render:n=>{let l=[];if(i.onEdit&&l.push({label:"编辑",key:"edit",icon:()=>e.h(a.NIcon,null,{default:()=>e.h(u.EditOutlined)}),props:{onClick:async()=>await i.onEdit(n)}}),i.onDelete&&l.push({label:"删除",key:"delete",icon:()=>e.h(a.NIcon,null,{default:()=>e.h(u.DeleteOutlined)}),props:{onClick:()=>R(n)}}),l=[...l,...o(n)],!(l.length<=0))return e.h(a.NDropdown,{options:l,placement:"bottom-start"},{default:()=>e.h(a.NButton,{size:"small",type:"primary"},{default:()=>["操作",e.h(a.NIcon,()=>e.h(u.MoreOutlined))]})})}}},O=e.computed(()=>{const t=i.columns.filter(n=>n.key!="action").map(n=>({title:n.title,key:n.key,width:n.width,fixed:n.fixed??!1,render:n.render,ellipsis:n.ellipsis?{tooltip:!0}:!1})),o=i.columns.reduce((n,l)=>l.key==="action"?l:n,void 0)?.action;return o&&o?.length>0||i.onEdit||i.onDelete?[{type:"selection",fixed:"left"},...t,B(o)]:[{type:"selection",fixed:"left"},...t]}),T=async()=>await d(),R=t=>x([t]),I=()=>{const t=k();x(t)},x=t=>{t&&t.length>0&&D.warning({title:"警告",content:"删除数据不可恢复, 确认删除吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(i.onDelete)try{await i.onDelete(t)?(d(),g.success("删除成功")):g.error("删除失败")}catch(o){g.error(o.message)}}})},k=()=>h.value?m.value.filter(o=>h.value.includes(o.id)).map(o=>e.toRaw(o)):[],z=()=>k()[0],L=()=>e.toRaw(m.value),d=async()=>{if(!p.value){p.value=!0;try{if(i.onLoad){var{data:t,total:o}=await i.onLoad(c.value.page,c.value.pageSize);m.value=t,c.value.itemCount=o}}catch(n){g.error(n.message)}finally{p.value=!1}}},H=e.computed(()=>{const t=e.unref(N);if(!t)return;const o=t?.$el,n=o.querySelector(".n-data-table-thead "),{bottomIncludeBody:l}=$(n),r=48;let s=12,w=24;const f=o.querySelector(".n-data-table__pagination");if(f){const v=f.offsetHeight;s+=v||0}else s+=28;return l-(r+s+w)}),P=t=>!t||!t.getBoundingClientRect?0:t.getBoundingClientRect(),$=t=>{const o=document.documentElement,n=o.scrollLeft,l=o.scrollTop,r=o.clientLeft,s=o.clientTop,w=window.pageXOffset,f=window.pageYOffset,_=P(t),{left:v,top:q,width:M,height:A}=_,j=(w||n)-(r||0),U=(f||l)-(s||0),W=v+w,F=q+f,C=W-j,b=F-U,V=window.document.documentElement.clientWidth,E=window.document.documentElement.clientHeight;return{left:C,top:b,right:V-M-C,bottom:E-A-b,rightIncludeBody:V-C,bottomIncludeBody:E-b}};return e.onMounted(async()=>await d()),S({getData:L,getSelectedRow:z,getSelectedRows:k,refreshData:d,resetPage:()=>{c.value.page=1}}),(t,o)=>{const n=a.NTooltip,l=a.NSpace,r=a.NDataTable;return e.openBlock(),e.createBlock(e.unref(a.NCard),{bordered:!1},{header:e.withCtx(()=>[e.createVNode(l,{justify:"space-between",align:"center",class:"w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",K,e.toDisplayString(y.title),1),e.createVNode(l,null,{default:e.withCtx(()=>[i.onAdd?(e.openBlock(),e.createBlock(n,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(a.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:i.onAdd},{default:e.withCtx(()=>[e.createVNode(e.unref(u.PlusSquareOutlined))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[o[1]||(o[1]=e.createElementVNode("span",null,"新增",-1))]),_:1})):e.createCommentVNode("",!0),i.onDelete?(e.openBlock(),e.createBlock(n,{key:1,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(a.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:I},{default:e.withCtx(()=>[e.createVNode(e.unref(u.DeleteOutlined))]),_:1})]),default:e.withCtx(()=>[o[2]||(o[2]=e.createElementVNode("span",null,"删除",-1))]),_:1})):e.createCommentVNode("",!0),e.createVNode(n,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(a.NIcon),{size:"18",class:"cursor-pointer hover:text-blue-600",onClick:T},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ReloadOutlined))]),_:1})]),default:e.withCtx(()=>[o[3]||(o[3]=e.createElementVNode("span",null,"刷新",-1))]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",X,[t.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",Y,[e.renderSlot(t.$slots,"toolbar")])):e.createCommentVNode("",!0),e.createVNode(r,{remote:"",ref_key:"$table",ref:N,"checked-row-keys":h.value,"onUpdate:checkedRowKeys":o[0]||(o[0]=s=>h.value=s),"max-height":H.value,loading:p.value,bordered:!1,"single-line":!1,columns:O.value,data:m.value,pagination:c.value,"row-key":s=>s[y.idField]},null,8,["checked-row-keys","max-height","loading","columns","data","pagination","row-key"])])]),_:3})}}});exports.default=G;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("naive-ui"),e=require("vue"),u=require("@vicons/antd"),K={class:"text-lg font-medium"},X={id:"data-content"},Y={key:0,class:"rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-4 mb-4"},G=e.defineComponent({__name:"PTable",props:{title:{},idField:{default:"id"},columns:{},onLoad:{},onDelete:{},onAdd:{},onEdit:{}},setup(y,{expose:S}){const N=e.ref(null),D=a.useDialog(),g=a.useMessage(),p=e.ref(!1),h=e.ref([]),m=e.ref([]),c=e.ref({page:1,itemCount:0,pageSize:10,pageSizes:[10,20,30,50],showSizePicker:!0,onChange:async t=>{c.value.page=t,await d()},onUpdatePageSize:async t=>{c.value.pageSize=t,await d()}}),i=y,B=t=>{const o=n=>{const l=[];return t&&t.forEach(r=>{r.key!=="edit"&&r.key!=="delete"&&l.push({label:r.name,key:r.key,icon:r.icon&&(()=>e.h(a.NIcon,null,{default:()=>e.h(r.icon)})),props:{onClick:()=>r.action(n)}})}),l};return{title:"操作",key:"actions",width:100,fixed:"right",render:n=>{let l=[];if(i.onEdit&&l.push({label:"编辑",key:"edit",icon:()=>e.h(a.NIcon,null,{default:()=>e.h(u.EditOutlined)}),props:{onClick:async()=>await i.onEdit(n)}}),i.onDelete&&l.push({label:"删除",key:"delete",icon:()=>e.h(a.NIcon,null,{default:()=>e.h(u.DeleteOutlined)}),props:{onClick:()=>R(n)}}),l=[...l,...o(n)],!(l.length<=0))return e.h(a.NDropdown,{options:l,placement:"bottom-start"},{default:()=>e.h(a.NButton,{size:"small",type:"primary"},{default:()=>["操作",e.h(a.NIcon,()=>e.h(u.MoreOutlined))]})})}}},O=e.computed(()=>{const t=i.columns.filter(n=>n.key!="action").map(n=>({title:n.title,key:n.key,width:n.width,fixed:n.fixed??!1,render:n.render,ellipsis:n.ellipsis?{tooltip:!0}:!1})),o=i.columns.reduce((n,l)=>l.key==="action"?l:n,void 0)?.action;return o&&o?.length>0||i.onEdit||i.onDelete?[{type:"selection",fixed:"left"},...t,B(o)]:[{type:"selection",fixed:"left"},...t]}),T=async()=>await d(),R=t=>x([t]),I=()=>{const t=k();x(t)},x=t=>{t&&t.length>0&&D.warning({title:"警告",content:"删除数据不可恢复, 确认删除吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{if(i.onDelete)try{await i.onDelete(t)?(d(),g.success("删除成功")):g.error("删除失败")}catch(o){g.error(o.message)}}})},k=()=>h.value?m.value.filter(o=>h.value.includes(o.id)).map(o=>e.toRaw(o)):[],z=()=>k()[0],L=()=>e.toRaw(m.value),d=async()=>{if(!p.value){p.value=!0;try{if(i.onLoad){var{data:t,total:o}=await i.onLoad(c.value.page,c.value.pageSize);m.value=t,c.value.itemCount=o}}catch(n){g.error(n.message)}finally{p.value=!1}}},H=e.computed(()=>{const t=e.unref(N);if(!t)return;const o=t?.$el,n=o.querySelector(".n-data-table-thead "),{bottomIncludeBody:l}=$(n),r=48;let s=12,w=25;const f=o.querySelector(".n-data-table__pagination");if(f){const v=f.offsetHeight;s+=v||0}else s+=28;return l-(r+s+w)}),P=t=>!t||!t.getBoundingClientRect?0:t.getBoundingClientRect(),$=t=>{const o=document.documentElement,n=o.scrollLeft,l=o.scrollTop,r=o.clientLeft,s=o.clientTop,w=window.pageXOffset,f=window.pageYOffset,_=P(t),{left:v,top:q,width:M,height:A}=_,j=(w||n)-(r||0),U=(f||l)-(s||0),W=v+w,F=q+f,C=W-j,b=F-U,V=window.document.documentElement.clientWidth,E=window.document.documentElement.clientHeight;return{left:C,top:b,right:V-M-C,bottom:E-A-b,rightIncludeBody:V-C,bottomIncludeBody:E-b}};return e.onMounted(async()=>await d()),S({getData:L,getSelectedRow:z,getSelectedRows:k,refreshData:d,resetPage:()=>{c.value.page=1}}),(t,o)=>{const n=a.NTooltip,l=a.NSpace,r=a.NDataTable;return e.openBlock(),e.createBlock(e.unref(a.NCard),{bordered:!1},{header:e.withCtx(()=>[e.createVNode(l,{justify:"space-between",align:"center",class:"w-full"},{default:e.withCtx(()=>[e.createElementVNode("span",K,e.toDisplayString(y.title),1),e.createVNode(l,null,{default:e.withCtx(()=>[i.onAdd?(e.openBlock(),e.createBlock(n,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(a.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:i.onAdd},{default:e.withCtx(()=>[e.createVNode(e.unref(u.PlusSquareOutlined))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[o[1]||(o[1]=e.createElementVNode("span",null,"新增",-1))]),_:1})):e.createCommentVNode("",!0),i.onDelete?(e.openBlock(),e.createBlock(n,{key:1,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(a.NIcon),{size:"18",class:"mr-1 cursor-pointer hover:text-blue-600",onClick:I},{default:e.withCtx(()=>[e.createVNode(e.unref(u.DeleteOutlined))]),_:1})]),default:e.withCtx(()=>[o[2]||(o[2]=e.createElementVNode("span",null,"删除",-1))]),_:1})):e.createCommentVNode("",!0),e.createVNode(n,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(e.unref(a.NIcon),{size:"18",class:"cursor-pointer hover:text-blue-600",onClick:T},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ReloadOutlined))]),_:1})]),default:e.withCtx(()=>[o[3]||(o[3]=e.createElementVNode("span",null,"刷新",-1))]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",X,[t.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",Y,[e.renderSlot(t.$slots,"toolbar")])):e.createCommentVNode("",!0),e.createVNode(r,{remote:"",ref_key:"$table",ref:N,"checked-row-keys":h.value,"onUpdate:checkedRowKeys":o[0]||(o[0]=s=>h.value=s),"max-height":H.value,loading:p.value,bordered:!1,"single-line":!1,columns:O.value,data:m.value,pagination:c.value,"row-key":s=>s[y.idField]},null,8,["checked-row-keys","max-height","loading","columns","data","pagination","row-key"])])]),_:3})}}});exports.default=G;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chewel611/naive-ui-plus",
3
3
  "private": false,
4
- "version": "0.0.32",
4
+ "version": "0.0.34",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sideEffects": false,
@@ -58,7 +58,6 @@
58
58
  "naive-ui": "^2.43.2",
59
59
  "npm-run-all2": "^8.0.4",
60
60
  "oidc-client-ts": "^2.4.0",
61
- "pinia-plugin-persistedstate": "^4.7.1",
62
61
  "prettier": "^3.8.1",
63
62
  "rimraf": "^6.1.2",
64
63
  "rollup": "^4.57.1",