@chewel611/naive-ui-plus 0.0.19 → 0.0.21

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.
Files changed (153) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.js +804 -676
  3. package/dist/index.umd.cjs +1 -1
  4. package/dist/style.css +1 -1
  5. package/es/application/PApplication.vue.js +16 -16
  6. package/es/application/index.d.ts +1 -2
  7. package/es/application/index.js +4 -4
  8. package/es/components.d.ts +9 -5
  9. package/es/components.js +20 -9
  10. package/es/error/P403.css +1 -0
  11. package/es/error/P403.d.ts +2 -0
  12. package/es/error/P403.vue.js +19 -0
  13. package/es/error/P404.css +1 -0
  14. package/es/error/P404.d.ts +2 -0
  15. package/es/error/P404.vue.js +19 -0
  16. package/es/error/P500.css +1 -0
  17. package/es/error/P500.d.ts +2 -0
  18. package/es/error/P500.vue.js +19 -0
  19. package/es/error/index.d.ts +39 -0
  20. package/es/error/index.js +10 -0
  21. package/es/iframe/PIframe.css +1 -0
  22. package/es/iframe/PIframe.d.ts +4 -0
  23. package/es/iframe/PIframe.vue.js +7 -0
  24. package/es/iframe/PIframe.vue2.js +46 -0
  25. package/es/iframe/index.d.ts +15 -0
  26. package/es/iframe/index.js +6 -0
  27. package/es/index.d.ts +5 -1
  28. package/es/index.js +34 -21
  29. package/es/languages/PLanguage.vue.js +28 -28
  30. package/es/languages/index.d.ts +3 -4
  31. package/es/languages/index.js +4 -5
  32. package/es/languages/store.d.ts +1 -1
  33. package/es/languages/store.js +1 -1
  34. package/es/layout/PEmptyLayout.d.ts +2 -0
  35. package/es/layout/PEmptyLayout.vue.js +11 -0
  36. package/es/layout/PLayout.css +1 -1
  37. package/es/layout/PLayout.vue.js +1 -1
  38. package/es/layout/PLayout.vue2.js +6 -6
  39. package/es/layout/content/PContent.vue.js +10 -10
  40. package/es/layout/content/PTabs.css +1 -1
  41. package/es/layout/content/PTabs.vue.js +2 -2
  42. package/es/layout/content/PTabs.vue2.js +60 -57
  43. package/es/layout/header/PHeader.css +1 -1
  44. package/es/layout/header/PHeader.vue.js +2 -2
  45. package/es/layout/header/PHeader.vue2.js +10 -17
  46. package/es/layout/index.d.ts +16 -3
  47. package/es/layout/index.js +6 -4
  48. package/es/layout/sider/PLogo.css +1 -1
  49. package/es/layout/sider/PLogo.vue.js +2 -2
  50. package/es/layout/sider/PLogo.vue2.js +5 -5
  51. package/es/layout/sider/PMenus.vue.js +5 -5
  52. package/es/layout/{layout.d.ts → store.d.ts} +236 -251
  53. package/es/layout/{layout.js → store.js} +1 -1
  54. package/es/layout/typing.d.ts +25 -0
  55. package/es/modal/PModal.d.ts +87 -59
  56. package/es/modal/PModal.vue.js +37 -38
  57. package/es/modal/index.d.ts +47 -33
  58. package/es/modal/index.js +4 -4
  59. package/es/modal/typing.d.ts +2 -2
  60. package/es/oidc/POidc.css +1 -0
  61. package/es/oidc/POidc.d.ts +2 -0
  62. package/es/oidc/POidc.vue.js +7 -0
  63. package/es/oidc/POidc.vue2.js +25 -0
  64. package/es/oidc/index.d.ts +15 -0
  65. package/es/oidc/index.js +6 -0
  66. package/es/oidc/store.d.ts +17 -0
  67. package/es/oidc/store.js +24 -0
  68. package/es/oidc/typing.d.ts +5 -0
  69. package/es/redirect/PRedirect.d.ts +2 -0
  70. package/es/redirect/PRedirect.vue.js +19 -0
  71. package/es/redirect/PRedirect.vue2.js +4 -0
  72. package/es/redirect/index.d.ts +13 -0
  73. package/es/redirect/index.js +6 -0
  74. package/es/table/PTable.vue.js +114 -121
  75. package/es/table/index.d.ts +2 -2
  76. package/es/table/index.js +4 -4
  77. package/es/table/typing.d.ts +8 -8
  78. package/lib/application/PApplication.vue.cjs +1 -1
  79. package/lib/application/index.cjs +1 -1
  80. package/lib/application/index.d.ts +1 -2
  81. package/lib/components.cjs +1 -1
  82. package/lib/components.d.ts +9 -5
  83. package/lib/error/P403.css +1 -0
  84. package/lib/error/P403.d.ts +2 -0
  85. package/lib/error/P403.vue.cjs +1 -0
  86. package/lib/error/P404.css +1 -0
  87. package/lib/error/P404.d.ts +2 -0
  88. package/lib/error/P404.vue.cjs +1 -0
  89. package/lib/error/P500.css +1 -0
  90. package/lib/error/P500.d.ts +2 -0
  91. package/lib/error/P500.vue.cjs +1 -0
  92. package/lib/error/index.cjs +1 -0
  93. package/lib/error/index.d.ts +39 -0
  94. package/lib/iframe/PIframe.css +1 -0
  95. package/lib/iframe/PIframe.d.ts +4 -0
  96. package/lib/iframe/PIframe.vue.cjs +1 -0
  97. package/lib/iframe/PIframe.vue2.cjs +1 -0
  98. package/lib/iframe/index.cjs +1 -0
  99. package/lib/iframe/index.d.ts +15 -0
  100. package/lib/index.cjs +1 -1
  101. package/lib/index.d.ts +5 -1
  102. package/lib/languages/PLanguage.vue.cjs +1 -1
  103. package/lib/languages/index.cjs +1 -1
  104. package/lib/languages/index.d.ts +3 -4
  105. package/lib/languages/store.cjs +1 -1
  106. package/lib/languages/store.d.ts +1 -1
  107. package/lib/layout/PEmptyLayout.d.ts +2 -0
  108. package/lib/layout/PEmptyLayout.vue.cjs +1 -0
  109. package/lib/layout/PLayout.css +1 -1
  110. package/lib/layout/PLayout.vue.cjs +1 -1
  111. package/lib/layout/PLayout.vue2.cjs +1 -1
  112. package/lib/layout/content/PContent.vue.cjs +1 -1
  113. package/lib/layout/content/PTabs.css +1 -1
  114. package/lib/layout/content/PTabs.vue.cjs +1 -1
  115. package/lib/layout/content/PTabs.vue2.cjs +1 -1
  116. package/lib/layout/header/PHeader.css +1 -1
  117. package/lib/layout/header/PHeader.vue.cjs +1 -1
  118. package/lib/layout/header/PHeader.vue2.cjs +1 -1
  119. package/lib/layout/index.cjs +1 -1
  120. package/lib/layout/index.d.ts +16 -3
  121. package/lib/layout/sider/PLogo.css +1 -1
  122. package/lib/layout/sider/PLogo.vue.cjs +1 -1
  123. package/lib/layout/sider/PLogo.vue2.cjs +1 -1
  124. package/lib/layout/sider/PMenus.vue.cjs +1 -1
  125. package/lib/layout/{layout.cjs → store.cjs} +1 -1
  126. package/lib/layout/{layout.d.ts → store.d.ts} +236 -251
  127. package/lib/layout/typing.d.ts +25 -0
  128. package/lib/modal/PModal.d.ts +87 -59
  129. package/lib/modal/PModal.vue.cjs +1 -1
  130. package/lib/modal/index.cjs +1 -1
  131. package/lib/modal/index.d.ts +47 -33
  132. package/lib/modal/typing.d.ts +2 -2
  133. package/lib/oidc/POidc.css +1 -0
  134. package/lib/oidc/POidc.d.ts +2 -0
  135. package/lib/oidc/POidc.vue.cjs +1 -0
  136. package/lib/oidc/POidc.vue2.cjs +1 -0
  137. package/lib/oidc/index.cjs +1 -0
  138. package/lib/oidc/index.d.ts +15 -0
  139. package/lib/oidc/store.cjs +1 -0
  140. package/lib/oidc/store.d.ts +17 -0
  141. package/lib/oidc/typing.d.ts +5 -0
  142. package/lib/redirect/PRedirect.d.ts +2 -0
  143. package/lib/redirect/PRedirect.vue.cjs +1 -0
  144. package/lib/redirect/PRedirect.vue2.cjs +1 -0
  145. package/lib/redirect/index.cjs +1 -0
  146. package/lib/redirect/index.d.ts +13 -0
  147. package/lib/table/PTable.vue.cjs +1 -1
  148. package/lib/table/index.cjs +1 -1
  149. package/lib/table/index.d.ts +2 -2
  150. package/lib/table/typing.d.ts +8 -8
  151. package/package.json +21 -24
  152. package/es/typing.d.ts +0 -5
  153. package/lib/typing.d.ts +0 -5
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
- import { useDialog as $e, useMessage as ce, NCard as Ke, NDataTable as Ye, NModal as Oe, NSpace as Me, NButton as q, NTooltip as Ne, NIcon as N, NDropdown as G, NAvatar as Ee, NBreadcrumb as Xe, NBreadcrumbItem as Ge, NDivider as Je, useThemeVars as Ze, NMenu as Qe, NLayout as Le, NLayoutSider as et, NFlex as tt, NLayoutHeader as at, NLayoutContent as ot, NBackTop as lt, NConfigProvider as nt, dateZhCN as st, zhCN as it, NDialogProvider as rt, NNotificationProvider as ct, NMessageProvider as dt, NText as ut } from "naive-ui";
2
- import { defineComponent as I, ref as M, computed as H, unref as a, onMounted as ee, createBlock as $, openBlock as y, withCtx as s, createElementVNode as b, createElementBlock as B, createCommentVNode as A, createVNode as i, renderSlot as U, normalizeStyle as ie, createTextVNode as V, h as z, toRaw as X, reactive as Re, withDirectives as ft, normalizeClass as Q, toDisplayString as F, vShow as pt, nextTick as re, inject as De, Fragment as Te, renderList as gt, resolveDynamicComponent as be, withModifiers as ye, resolveComponent as ht, KeepAlive as mt, useCssVars as vt, watch as ze, provide as _t, mergeProps as bt } from "vue";
3
- import { PlusSquareOutlined as yt, DeleteOutlined as wt, ReloadOutlined as we, MoreOutlined as kt, MenuUnfoldOutlined as Ct, MenuFoldOutlined as Pt, FullscreenOutlined as St, FullscreenExitOutlined as Lt, CloseOutlined as xe, ColumnWidthOutlined as Tt, MinusOutlined as xt, LeftOutlined as $t, RightOutlined as Ot, DownOutlined as Mt } from "@vicons/antd";
4
- import { cloneDeep as Nt } from "lodash";
5
- import { defineStore as Ae } from "pinia";
6
- import { useRouter as ke, useRoute as Ce } from "vue-router";
7
- import Et from "element-resize-detector";
8
- import Rt from "vuedraggable";
9
- const Be = (t) => {
10
- Object.keys(t).forEach((d) => {
11
- const h = t[d];
12
- Array.isArray(h) ? t[d] = [] : h !== null && typeof h == "object" ? Be(h) : t[d] = void 0;
1
+ import { useDialog as Me, useMessage as fe, NCard as Xe, NDataTable as Ge, NModal as Re, NSpace as Ne, NButton as K, NTooltip as De, NIcon as M, NDropdown as Q, NAvatar as Ae, NBreadcrumb as Je, NBreadcrumbItem as Ze, NDivider as Qe, useThemeVars as et, NMenu as tt, NLayout as $e, NLayoutSider as at, NFlex as ot, NLayoutHeader as nt, NLayoutContent as lt, NBackTop as st, NConfigProvider as rt, dateZhCN as it, zhCN as ct, NDialogProvider as dt, NNotificationProvider as ut, NMessageProvider as ft, NText as pt, NEmpty as gt, NSpin as ht, NResult as ke } from "naive-ui";
2
+ import { defineComponent as A, ref as O, computed as U, unref as a, onMounted as X, openBlock as b, createBlock as $, withCtx as s, createElementVNode as y, createElementBlock as N, renderSlot as F, createCommentVNode as B, createVNode as i, normalizeStyle as ue, createTextVNode as Y, h as z, toRaw as Z, reactive as Ce, normalizeClass as ae, withDirectives as mt, toDisplayString as q, vShow as vt, nextTick as oe, inject as Ie, Fragment as Oe, renderList as _t, resolveDynamicComponent as we, withModifiers as Pe, resolveComponent as ze, KeepAlive as bt, useCssVars as yt, watch as Be, provide as wt, mergeProps as Pt, onBeforeMount as kt } from "vue";
3
+ import { PlusSquareOutlined as Ct, DeleteOutlined as xt, ReloadOutlined as xe, MoreOutlined as St, MenuUnfoldOutlined as Lt, MenuFoldOutlined as Tt, FullscreenOutlined as $t, FullscreenExitOutlined as Ot, CloseOutlined as Ee, ColumnWidthOutlined as Et, MinusOutlined as Mt, LeftOutlined as Rt, RightOutlined as Nt, DownOutlined as Dt } from "@vicons/antd";
4
+ import { cloneDeep as At } from "lodash";
5
+ import { defineStore as Se } from "pinia";
6
+ import { useRouter as ne, useRoute as le } from "vue-router";
7
+ import It from "element-resize-detector";
8
+ import zt from "vuedraggable";
9
+ const We = (t) => {
10
+ Object.keys(t).forEach((r) => {
11
+ const c = t[r];
12
+ Array.isArray(c) ? t[r] = [] : c !== null && typeof c == "object" ? We(c) : t[r] = void 0;
13
13
  });
14
- }, Dt = { id: "data-content" }, zt = {
14
+ }, Bt = { id: "data-content" }, Wt = {
15
15
  key: 0,
16
16
  class: "rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-5 mb-5"
17
- }, At = { key: 1 }, Bt = { key: 2 }, It = /* @__PURE__ */ I({
17
+ }, Ht = { key: 1 }, jt = { key: 2 }, Ut = /* @__PURE__ */ A({
18
18
  __name: "PTable",
19
19
  props: {
20
20
  idField: { default: "id" },
@@ -31,88 +31,88 @@ const Be = (t) => {
31
31
  onSave: {},
32
32
  onDelete: {}
33
33
  },
34
- setup(t, { expose: d }) {
35
- const h = M(null), v = $e(), w = ce(), p = M(!1), L = M([]), k = M([]), T = M(null), x = M(!1), f = M(!1), u = M(!1), r = M({}), P = M({
34
+ setup(t, { expose: r }) {
35
+ const c = O(null), h = Me(), p = fe(), u = O(!1), x = O([]), w = O([]), m = O(null), T = O(!1), g = O(!1), v = O(!1), d = O({}), S = O({
36
36
  page: 1,
37
37
  itemCount: 0,
38
38
  pageSize: 10,
39
39
  pageSizes: [10, 20, 30, 50],
40
40
  showSizePicker: !0,
41
- onChange: async (c) => {
42
- P.value.page = c, await W();
41
+ onChange: async (f) => {
42
+ S.value.page = f, await j();
43
43
  },
44
- onUpdatePageSize: async (c) => {
45
- P.value.pageSize = c, await W();
44
+ onUpdatePageSize: async (f) => {
45
+ S.value.pageSize = f, await j();
46
46
  }
47
- }), o = t, m = (c) => {
48
- const e = (l) => {
49
- const n = [];
50
- return c && c.forEach((C) => {
51
- C.key !== "edit" && C.key !== "delete" && n.push({
47
+ }), o = t, P = (f) => {
48
+ const e = (n) => {
49
+ const l = [];
50
+ return f && f.forEach((C) => {
51
+ C.key !== "edit" && C.key !== "delete" && l.push({
52
52
  label: C.name,
53
53
  key: C.key,
54
- props: { onClick: () => C.action(l) }
54
+ props: { onClick: () => C.action(n) }
55
55
  });
56
- }), n;
56
+ }), l;
57
57
  };
58
58
  return {
59
59
  title: "操作",
60
60
  key: "actions",
61
61
  width: 100,
62
62
  fixed: "right",
63
- render: (l) => {
64
- let n = [];
65
- if (o.hiddenEdit || n.push({
63
+ render: (n) => {
64
+ let l = [];
65
+ if (o.hiddenEdit || l.push({
66
66
  label: "编辑",
67
67
  key: "edit",
68
- props: { onClick: () => ue(l) }
69
- }), o.hiddenDelete || n.push({
68
+ props: { onClick: () => pe(n) }
69
+ }), o.hiddenDelete || l.push({
70
70
  label: "删除",
71
71
  key: "delete",
72
- props: { onClick: () => D(l) }
73
- }), n = [...n, ...e(l)], !(n.length <= 0))
72
+ props: { onClick: () => I(n) }
73
+ }), l = [...l, ...e(n)], !(l.length <= 0))
74
74
  return z(
75
- G,
75
+ Q,
76
76
  {
77
- options: n,
77
+ options: l,
78
78
  placement: "bottom-start"
79
79
  },
80
80
  {
81
81
  default: () => z(
82
- q,
82
+ K,
83
83
  { size: "small", type: "primary" },
84
- { default: () => ["操作", z(N, () => z(kt))] }
84
+ { default: () => ["操作", z(M, () => z(St))] }
85
85
  )
86
86
  }
87
87
  );
88
88
  }
89
89
  };
90
- }, g = H(() => {
91
- const c = o.columns.filter((l) => l.key != "action").map((l) => ({
92
- title: l.title,
93
- key: l.key,
94
- width: l.width,
95
- fixed: l.fixed ?? !1,
96
- render: l.render,
97
- ellipsis: l.ellipsis ? { tooltip: !0 } : !1
90
+ }, _ = U(() => {
91
+ const f = o.columns.filter((n) => n.key != "action").map((n) => ({
92
+ title: n.title,
93
+ key: n.key,
94
+ width: n.width,
95
+ fixed: n.fixed ?? !1,
96
+ render: n.render,
97
+ ellipsis: n.ellipsis ? { tooltip: !0 } : !1
98
98
  })), e = o.columns.reduce(
99
- (l, n) => n.key === "action" ? n : l,
99
+ (n, l) => l.key === "action" ? l : n,
100
100
  void 0
101
101
  )?.action;
102
102
  return e && e?.length > 0 || !o.hiddenDelete || !o.hiddenEdit ? [
103
103
  { type: "selection", fixed: "left" },
104
- ...c,
105
- m(e)
106
- ] : [{ type: "selection", fixed: "left" }, ...c];
107
- }), _ = async () => {
108
- await W();
109
- }, D = (c) => {
110
- S([c]);
111
- }, O = () => {
112
- const c = Y();
113
- S(c);
114
- }, S = (c) => {
115
- c && c.length > 0 && v.warning({
104
+ ...f,
105
+ P(e)
106
+ ] : [{ type: "selection", fixed: "left" }, ...f];
107
+ }), k = async () => {
108
+ await j();
109
+ }, I = (f) => {
110
+ L([f]);
111
+ }, E = () => {
112
+ const f = J();
113
+ L(f);
114
+ }, L = (f) => {
115
+ f && f.length > 0 && h.warning({
116
116
  title: "警告",
117
117
  content: "删除数据不可恢复, 确认删除吗?",
118
118
  positiveText: "确定",
@@ -120,285 +120,278 @@ const Be = (t) => {
120
120
  onPositiveClick: async () => {
121
121
  if (o.onDelete)
122
122
  try {
123
- await o.onDelete(c) ? (W(), w.success("删除成功")) : w.error("删除失败");
123
+ await o.onDelete(f) ? (j(), p.success("删除成功")) : p.error("删除失败");
124
124
  } catch (e) {
125
- w.error(e.message);
125
+ p.error(e.message);
126
126
  }
127
127
  }
128
128
  });
129
- }, J = () => {
130
- T.value = null, le();
131
- }, ue = async (c) => {
132
- T.value = Nt(c), le(T.value, async () => {
133
- o.onGet && (T.value = await o.onGet(c[o.idField])), Object.assign(o.item, T.value);
129
+ }, ee = () => {
130
+ m.value = null, ie();
131
+ }, pe = async (f) => {
132
+ m.value = At(f), ie(m.value, async () => {
133
+ o.onGet && (m.value = await o.onGet(f[o.idField])), Object.assign(o.item, m.value);
134
134
  });
135
- }, oe = async () => {
135
+ }, re = async () => {
136
136
  if (o.onSave)
137
137
  try {
138
- u.value = !0, (x.value ? await o.onSave(void 0, X(o.item)) : await o.onSave(T.value[o.idField], X(o.item))) && (K(), await W());
139
- } catch (c) {
140
- w.error(c.message);
138
+ v.value = !0, (T.value ? await o.onSave(void 0, Z(o.item)) : await o.onSave(m.value[o.idField], Z(o.item))) && (G(), await j());
139
+ } catch (f) {
140
+ p.error(f.message);
141
141
  } finally {
142
- u.value = !1;
142
+ v.value = !1;
143
143
  }
144
- }, le = async (c, e) => {
145
- o.onOpenModal?.(c), await e?.(), c ? (x.value = !1, f.value = !0) : (f.value = !1, x.value = !0);
146
- }, K = () => {
147
- T.value = null, Be(o.item), Object.assign(o.item, { ...X(r.value) }), o.onCloseModal?.(o.item), x.value = !1, f.value = !1;
148
- }, Y = () => L.value ? k.value.filter((e) => L.value.includes(e.id)).map((e) => X(e)) : [], fe = () => Y()[0], pe = () => X(k.value), W = async () => {
149
- if (!p.value) {
150
- p.value = !0;
144
+ }, ie = async (f, e) => {
145
+ o.onOpenModal?.(f), await e?.(), f ? (T.value = !1, g.value = !0) : (g.value = !1, T.value = !0);
146
+ }, G = () => {
147
+ m.value = null, We(o.item), Object.assign(o.item, { ...Z(d.value) }), o.onCloseModal?.(o.item), T.value = !1, g.value = !1;
148
+ }, J = () => x.value ? w.value.filter((e) => x.value.includes(e.id)).map((e) => Z(e)) : [], ge = () => J()[0], he = () => Z(w.value), j = async () => {
149
+ if (!u.value) {
150
+ u.value = !0;
151
151
  try {
152
152
  if (o.onLoad) {
153
- var { data: c, total: e } = await o.onLoad(
154
- P.value.page,
155
- P.value.pageSize
153
+ var { data: f, total: e } = await o.onLoad(
154
+ S.value.page,
155
+ S.value.pageSize
156
156
  );
157
- k.value = c, P.value.itemCount = e;
157
+ w.value = f, S.value.itemCount = e;
158
158
  }
159
- } catch (l) {
160
- w.error(l.message);
159
+ } catch (n) {
160
+ p.error(n.message);
161
161
  } finally {
162
- p.value = !1;
162
+ u.value = !1;
163
163
  }
164
164
  }
165
- }, ge = H(() => {
166
- const c = a(h);
167
- if (!c) return;
168
- const e = c?.$el, l = e.querySelector(".n-data-table-thead "), { bottomIncludeBody: n } = Z(l), C = 64;
169
- let E = 2, R = 24;
170
- const j = e.querySelector(
165
+ }, me = U(() => {
166
+ const f = a(c);
167
+ if (!f) return;
168
+ const e = f?.$el, n = e.querySelector(".n-data-table-thead "), { bottomIncludeBody: l } = te(n), C = 64;
169
+ let R = 2, D = 24;
170
+ const V = e.querySelector(
171
171
  ".n-data-table__pagination"
172
172
  );
173
- if (j) {
174
- const me = j.offsetHeight;
175
- E += me || 0;
173
+ if (V) {
174
+ const _e = V.offsetHeight;
175
+ R += _e || 0;
176
176
  } else
177
- E += 28;
178
- return n - (C + E + R);
179
- }), ne = (c) => !c || !c.getBoundingClientRect ? 0 : c.getBoundingClientRect(), Z = (c) => {
180
- const e = document.documentElement, l = e.scrollLeft, n = e.scrollTop, C = e.clientLeft, E = e.clientTop, R = window.pageXOffset, j = window.pageYOffset, se = ne(c), {
181
- left: me,
182
- top: We,
183
- width: He,
184
- height: Ue
185
- } = se, Fe = (R || l) - (C || 0), je = (j || n) - (E || 0), qe = me + R, Ve = We + j, ve = qe - Fe, _e = Ve - je, Pe = window.document.documentElement.clientWidth, Se = window.document.documentElement.clientHeight;
177
+ R += 28;
178
+ return l - (C + R + D);
179
+ }), ce = (f) => !f || !f.getBoundingClientRect ? 0 : f.getBoundingClientRect(), te = (f) => {
180
+ const e = document.documentElement, n = e.scrollLeft, l = e.scrollTop, C = e.clientLeft, R = e.clientTop, D = window.pageXOffset, V = window.pageYOffset, de = ce(f), {
181
+ left: _e,
182
+ top: je,
183
+ width: Ue,
184
+ height: Fe
185
+ } = de, qe = (D || n) - (C || 0), Ve = (V || l) - (R || 0), Ke = _e + D, Ye = je + V, be = Ke - qe, ye = Ye - Ve, Le = window.document.documentElement.clientWidth, Te = window.document.documentElement.clientHeight;
186
186
  return {
187
- left: ve,
188
- top: _e,
189
- right: Pe - He - ve,
190
- bottom: Se - Ue - _e,
191
- rightIncludeBody: Pe - ve,
192
- bottomIncludeBody: Se - _e
187
+ left: be,
188
+ top: ye,
189
+ right: Le - Ue - be,
190
+ bottom: Te - Fe - ye,
191
+ rightIncludeBody: Le - be,
192
+ bottomIncludeBody: Te - ye
193
193
  };
194
- }, he = () => {
195
- r.value = { ...X(o.item) };
194
+ }, ve = () => {
195
+ d.value = { ...Z(o.item) };
196
196
  };
197
- return ee(async () => {
198
- he(), await W();
199
- }), d({
200
- getData: pe,
201
- getSelectedRow: fe,
202
- getSelectedRows: Y,
203
- closeModal: K,
204
- refreshData: W,
197
+ return X(async () => {
198
+ ve(), await j();
199
+ }), r({
200
+ getData: he,
201
+ getSelectedRow: ge,
202
+ getSelectedRows: J,
203
+ closeModal: G,
204
+ refreshData: j,
205
205
  resetPage: () => {
206
- P.value.page = 1;
206
+ S.value.page = 1;
207
207
  }
208
- }), (c, e) => {
209
- const l = Ne, n = Ye, C = Me, E = Oe;
210
- return y(), $(a(Ke), {
208
+ }), (f, e) => {
209
+ const n = De, l = Ge, C = Ne, R = Re;
210
+ return b(), $(a(Xe), {
211
211
  title: " ",
212
212
  "header-class": "p-4",
213
213
  "content-class": "pl-4 pr-4",
214
214
  bordered: !1
215
215
  }, {
216
216
  "header-extra": s(() => [
217
- c.hiddenAdd ? A("", !0) : (y(), $(l, {
217
+ t.hiddenAdd ? B("", !0) : (b(), $(n, {
218
218
  key: 0,
219
219
  trigger: "hover"
220
220
  }, {
221
221
  trigger: s(() => [
222
- i(a(N), {
222
+ i(a(M), {
223
223
  size: "18",
224
224
  class: "mr-1 cursor-pointer hover:text-blue-600",
225
- onClick: J
225
+ onClick: ee
226
226
  }, {
227
227
  default: s(() => [
228
- i(a(yt))
228
+ i(a(Ct))
229
229
  ]),
230
230
  _: 1
231
231
  })
232
232
  ]),
233
233
  default: s(() => [
234
- e[3] || (e[3] = b("span", null, "新增", -1))
234
+ e[3] || (e[3] = y("span", null, "新增", -1))
235
235
  ]),
236
- _: 1,
237
- __: [3]
236
+ _: 1
238
237
  })),
239
- c.hiddenDelete ? A("", !0) : (y(), $(l, {
238
+ t.hiddenDelete ? B("", !0) : (b(), $(n, {
240
239
  key: 1,
241
240
  trigger: "hover"
242
241
  }, {
243
242
  trigger: s(() => [
244
- i(a(N), {
243
+ i(a(M), {
245
244
  size: "18",
246
245
  class: "mr-1 cursor-pointer hover:text-blue-600",
247
- onClick: O
246
+ onClick: E
248
247
  }, {
249
248
  default: s(() => [
250
- i(a(wt))
249
+ i(a(xt))
251
250
  ]),
252
251
  _: 1
253
252
  })
254
253
  ]),
255
254
  default: s(() => [
256
- e[4] || (e[4] = b("span", null, "删除", -1))
255
+ e[4] || (e[4] = y("span", null, "删除", -1))
257
256
  ]),
258
- _: 1,
259
- __: [4]
257
+ _: 1
260
258
  })),
261
- i(l, { trigger: "hover" }, {
259
+ i(n, { trigger: "hover" }, {
262
260
  trigger: s(() => [
263
- i(a(N), {
261
+ i(a(M), {
264
262
  size: "18",
265
263
  class: "cursor-pointer hover:text-blue-600",
266
- onClick: _
264
+ onClick: k
267
265
  }, {
268
266
  default: s(() => [
269
- i(a(we))
267
+ i(a(xe))
270
268
  ]),
271
269
  _: 1
272
270
  })
273
271
  ]),
274
272
  default: s(() => [
275
- e[5] || (e[5] = b("span", null, "刷新", -1))
273
+ e[5] || (e[5] = y("span", null, "刷新", -1))
276
274
  ]),
277
- _: 1,
278
- __: [5]
275
+ _: 1
279
276
  })
280
277
  ]),
281
278
  default: s(() => [
282
- b("div", Dt, [
283
- c.$slots.toolbar ? (y(), B("div", zt, [
284
- U(c.$slots, "toolbar")
285
- ])) : A("", !0),
286
- i(n, {
279
+ y("div", Bt, [
280
+ f.$slots.toolbar ? (b(), N("div", Wt, [
281
+ F(f.$slots, "toolbar")
282
+ ])) : B("", !0),
283
+ i(l, {
287
284
  remote: "",
288
285
  ref_key: "$table",
289
- ref: h,
290
- "checked-row-keys": L.value,
291
- "onUpdate:checkedRowKeys": e[0] || (e[0] = (R) => L.value = R),
292
- "max-height": ge.value,
293
- loading: p.value,
286
+ ref: c,
287
+ "checked-row-keys": x.value,
288
+ "onUpdate:checkedRowKeys": e[0] || (e[0] = (D) => x.value = D),
289
+ "max-height": me.value,
290
+ loading: u.value,
294
291
  bordered: !1,
295
292
  "single-line": !1,
296
- columns: g.value,
297
- data: k.value,
298
- pagination: P.value,
299
- "row-key": (R) => R[c.idField]
293
+ columns: _.value,
294
+ data: w.value,
295
+ pagination: S.value,
296
+ "row-key": (D) => D[t.idField]
300
297
  }, null, 8, ["checked-row-keys", "max-height", "loading", "columns", "data", "pagination", "row-key"]),
301
- c.$slots.addModal ? (y(), B("div", At, [
302
- i(E, {
298
+ f.$slots.addModal ? (b(), N("div", Ht, [
299
+ i(R, {
303
300
  title: "新增",
304
301
  preset: "card",
305
- show: x.value,
306
- "onUpdate:show": e[1] || (e[1] = (R) => x.value = R),
302
+ show: T.value,
303
+ "onUpdate:show": e[1] || (e[1] = (D) => T.value = D),
307
304
  "header-class": "bg-gray-50",
308
305
  closable: !1,
309
306
  "close-on-esc": !1,
310
307
  "mask-closable": !1,
311
308
  draggable: !0,
312
- style: ie({ width: `${c.modalWidth}px` })
309
+ style: ue({ width: `${t.modalWidth}px` })
313
310
  }, {
314
311
  action: s(() => [
315
312
  i(C, { justify: "end" }, {
316
313
  default: s(() => [
317
- i(a(q), {
314
+ i(a(K), {
318
315
  type: "primary",
319
- loading: u.value,
320
- onClick: oe
316
+ loading: v.value,
317
+ onClick: re
321
318
  }, {
322
- default: s(() => e[6] || (e[6] = [
323
- V("保存", -1)
324
- ])),
325
- _: 1,
326
- __: [6]
319
+ default: s(() => [...e[6] || (e[6] = [
320
+ Y("保存", -1)
321
+ ])]),
322
+ _: 1
327
323
  }, 8, ["loading"]),
328
- i(a(q), { onClick: K }, {
329
- default: s(() => e[7] || (e[7] = [
330
- V("取消", -1)
331
- ])),
332
- _: 1,
333
- __: [7]
324
+ i(a(K), { onClick: G }, {
325
+ default: s(() => [...e[7] || (e[7] = [
326
+ Y("取消", -1)
327
+ ])]),
328
+ _: 1
334
329
  })
335
330
  ]),
336
331
  _: 1
337
332
  })
338
333
  ]),
339
334
  default: s(() => [
340
- U(c.$slots, "addModal")
335
+ F(f.$slots, "addModal")
341
336
  ]),
342
337
  _: 3
343
338
  }, 8, ["show", "style"])
344
- ])) : A("", !0),
345
- c.$slots.editModal ? (y(), B("div", Bt, [
346
- i(E, {
339
+ ])) : B("", !0),
340
+ f.$slots.editModal ? (b(), N("div", jt, [
341
+ i(R, {
347
342
  title: "编辑",
348
- show: f.value,
349
- "onUpdate:show": e[2] || (e[2] = (R) => f.value = R),
343
+ show: g.value,
344
+ "onUpdate:show": e[2] || (e[2] = (D) => g.value = D),
350
345
  preset: "card",
351
346
  "header-class": "bg-gray-50",
352
347
  closable: !1,
353
348
  "close-on-esc": !1,
354
349
  "mask-closable": !1,
355
350
  draggable: !0,
356
- style: ie({ width: `${c.modalWidth}px` })
351
+ style: ue({ width: `${t.modalWidth}px` })
357
352
  }, {
358
353
  action: s(() => [
359
354
  i(C, { justify: "end" }, {
360
355
  default: s(() => [
361
- i(a(q), {
356
+ i(a(K), {
362
357
  type: "primary",
363
- loading: u.value,
364
- onClick: oe
358
+ loading: v.value,
359
+ onClick: re
365
360
  }, {
366
- default: s(() => e[8] || (e[8] = [
367
- V("保存", -1)
368
- ])),
369
- _: 1,
370
- __: [8]
361
+ default: s(() => [...e[8] || (e[8] = [
362
+ Y("保存", -1)
363
+ ])]),
364
+ _: 1
371
365
  }, 8, ["loading"]),
372
- i(a(q), { onClick: K }, {
373
- default: s(() => e[9] || (e[9] = [
374
- V("取消", -1)
375
- ])),
376
- _: 1,
377
- __: [9]
366
+ i(a(K), { onClick: G }, {
367
+ default: s(() => [...e[9] || (e[9] = [
368
+ Y("取消", -1)
369
+ ])]),
370
+ _: 1
378
371
  })
379
372
  ]),
380
373
  _: 1
381
374
  })
382
375
  ]),
383
376
  default: s(() => [
384
- U(c.$slots, "editModal")
377
+ F(f.$slots, "editModal")
385
378
  ]),
386
379
  _: 3
387
380
  }, 8, ["show", "style"])
388
- ])) : A("", !0)
381
+ ])) : B("", !0)
389
382
  ])
390
383
  ]),
391
384
  _: 3
392
385
  });
393
386
  };
394
387
  }
395
- }), te = (t) => {
396
- const d = t;
397
- return d.install = function(h) {
398
- h.component(d.__name, t);
388
+ }), W = (t) => {
389
+ const r = t;
390
+ return r.install = function(c) {
391
+ c.component(r.__name, t);
399
392
  }, t;
400
- }, Wt = te(It), Ht = ["Redirect", "RedirectSon", "login"], ae = Ae("p-layout", () => {
401
- const t = Re({
393
+ }, Ft = W(Ut), qt = ["Redirect", "RedirectSon", "login"], se = Se("p-layout", () => {
394
+ const t = Ce({
402
395
  collapsed: !1,
403
396
  title: "输入项目名称",
404
397
  logo: "https://picsum.photos/id/1/100/100",
@@ -411,39 +404,39 @@ const Be = (t) => {
411
404
  return {
412
405
  state: t,
413
406
  initTabs: (o) => {
414
- o.sort((m, g) => (g.meta.affix ? 1 : 0) - (m.meta.affix ? 1 : 0)), t.tabs = o;
407
+ o.sort((P, _) => (_.meta.affix ? 1 : 0) - (P.meta.affix ? 1 : 0)), t.tabs = o;
415
408
  },
416
- addTab: (o) => Ht.includes(o.name) ? !1 : (t.tabs?.some(
417
- (g) => g.fullPath == o.fullPath
409
+ addTab: (o) => qt.includes(o.name) ? !1 : (t.tabs?.some(
410
+ (_) => _.fullPath == o.fullPath
418
411
  ) || t.tabs?.push(o), !0),
419
412
  closeCurrentTab: (o) => {
420
- const m = t.tabs.findIndex(
421
- (g) => g.fullPath == o.fullPath
413
+ const P = t.tabs.findIndex(
414
+ (_) => _.fullPath == o.fullPath
422
415
  );
423
- t.tabs.splice(m, 1);
416
+ t.tabs.splice(P, 1);
424
417
  },
425
418
  closeAllTabs: () => {
426
419
  t.tabs = t.tabs.filter((o) => o?.meta?.affix ?? !1);
427
420
  },
428
421
  closeOtherTabs: (o) => {
429
422
  t.tabs = t.tabs.filter(
430
- (m) => m.fullPath == o.fullPath || (m?.meta?.affix ?? !1)
423
+ (P) => P.fullPath == o.fullPath || (P?.meta?.affix ?? !1)
431
424
  );
432
425
  },
433
426
  closeLeftTabs: (o) => {
434
- const m = t.tabs.findIndex(
435
- (g) => g.fullPath == o.fullPath
427
+ const P = t.tabs.findIndex(
428
+ (_) => _.fullPath == o.fullPath
436
429
  );
437
430
  t.tabs = t.tabs.filter(
438
- (g, _) => _ >= m || (g?.meta?.affix ?? !1)
431
+ (_, k) => k >= P || (_?.meta?.affix ?? !1)
439
432
  );
440
433
  },
441
434
  closeRightTabs: (o) => {
442
- const m = t.tabs.findIndex(
443
- (g) => g.fullPath == o.fullPath
435
+ const P = t.tabs.findIndex(
436
+ (_) => _.fullPath == o.fullPath
444
437
  );
445
438
  t.tabs = t.tabs.filter(
446
- (g, _) => _ <= m || (g?.meta?.affix ?? !1)
439
+ (_, k) => k <= P || (_?.meta?.affix ?? !1)
447
440
  );
448
441
  },
449
442
  collapse: () => {
@@ -455,8 +448,8 @@ const Be = (t) => {
455
448
  setLogo: (o) => {
456
449
  t.logo = o;
457
450
  },
458
- setUser: (o, m) => {
459
- t.uid = o, t.uname = m;
451
+ setUser: (o, P) => {
452
+ t.uid = o, t.uname = P;
460
453
  },
461
454
  setSettingPages: (o) => {
462
455
  t.settingPages = o;
@@ -465,28 +458,28 @@ const Be = (t) => {
465
458
  t.logout = o;
466
459
  }
467
460
  };
468
- }), Ut = { class: "logo" }, Ft = /* @__PURE__ */ I({
461
+ }), Vt = { class: "logo" }, Kt = /* @__PURE__ */ A({
469
462
  __name: "PLogo",
470
463
  setup(t) {
471
- const d = ae();
472
- return (h, v) => (y(), B("div", Ut, [
473
- i(a(Ee), {
464
+ const r = se();
465
+ return (c, h) => (b(), N("div", Vt, [
466
+ i(a(Ae), {
474
467
  color: "var(--color-logo)",
475
468
  size: 32,
476
- src: a(d).state.logo,
477
- class: Q({ "mr-2": !a(d).state.collapsed })
469
+ src: a(r).state.logo,
470
+ class: ae({ "mr-2": !a(r).state.collapsed })
478
471
  }, null, 8, ["src", "class"]),
479
- ft(b("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, F(a(d).state.title), 513), [
480
- [pt, !a(d).state.collapsed]
472
+ mt(y("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, q(a(r).state.title), 513), [
473
+ [vt, !a(r).state.collapsed]
481
474
  ])
482
475
  ]));
483
476
  }
484
- }), de = (t, d) => {
485
- const h = t.__vccOpts || t;
486
- for (const [v, w] of d)
487
- h[v] = w;
488
- return h;
489
- }, jt = /* @__PURE__ */ de(Ft, [["__scopeId", "data-v-c9496d2e"]]), qt = {
477
+ }), H = (t, r) => {
478
+ const c = t.__vccOpts || t;
479
+ for (const [h, p] of r)
480
+ c[h] = p;
481
+ return c;
482
+ }, Yt = /* @__PURE__ */ H(Kt, [["__scopeId", "data-v-e48aeefa"]]), Xt = {
490
483
  translationApiUrl: "https://translate.zvo.cn/api",
491
484
  defaultLanguage: "chinese",
492
485
  currentLanguage: "",
@@ -495,272 +488,265 @@ const Be = (t) => {
495
488
  },
496
489
  initLanguage: (t) => {
497
490
  }
498
- }, Vt = Ae("language", () => {
499
- const t = M(qt), d = (f) => {
500
- f.forEach((u) => {
501
- (u.key === "Chinese" || u.key === "chinese") && (u.key = "chinese_simplified");
502
- }), t.value.options = [...f];
503
- }, h = () => t.value.options, v = (f) => {
504
- if (t.value.currentLanguage === f)
491
+ }, Gt = Se("language", () => {
492
+ const t = O(Xt), r = (g) => {
493
+ g.forEach((v) => {
494
+ (v.key === "Chinese" || v.key === "chinese") && (v.key = "chinese_simplified");
495
+ }), t.value.options = [...g];
496
+ }, c = () => t.value.options, h = (g) => {
497
+ if (t.value.currentLanguage === g)
505
498
  return;
506
- const u = t.value.options.find(
507
- (r) => r.key === f
499
+ const v = t.value.options.find(
500
+ (d) => d.key === g
508
501
  );
509
- u && (t.value.currentLanguage = u.key, t.value.selectCallback(u));
510
- }, w = () => {
502
+ v && (t.value.currentLanguage = v.key, t.value.selectCallback(v));
503
+ }, p = () => {
511
504
  if (t.value.currentLanguage)
512
505
  return t.value.options.find(
513
- (f) => f.key === t.value.currentLanguage
506
+ (g) => g.key === t.value.currentLanguage
514
507
  );
515
- }, p = (f) => {
516
- t.value.selectCallback = f;
517
- }, L = () => t.value.translationApiUrl, k = (f) => {
518
- t.value.translationApiUrl = f;
519
- }, T = (f) => {
520
- (f === "Chinese" || f === "chinese") && (f = "chinese_simplified"), t.value.defaultLanguage = f;
521
- }, x = () => t.value.defaultLanguage ? t.value.defaultLanguage : "chinese_simplified";
522
- return ee(() => {
508
+ }, u = (g) => {
509
+ t.value.selectCallback = g;
510
+ }, x = () => t.value.translationApiUrl, w = (g) => {
511
+ t.value.translationApiUrl = g;
512
+ }, m = (g) => {
513
+ (g === "Chinese" || g === "chinese") && (g = "chinese_simplified"), t.value.defaultLanguage = g;
514
+ }, T = () => t.value.defaultLanguage ? t.value.defaultLanguage : "chinese_simplified";
515
+ return X(() => {
523
516
  t.value.initLanguage(t.value);
524
517
  }), {
525
518
  state: t,
526
- select: v,
527
- setLanguages: d,
528
- getLanguages: h,
529
- getCurrentLanguage: w,
530
- setSelectCallback: p,
531
- setTranslationApiUrl: k,
532
- getTranslationApiUrl: L,
533
- setDefaultLanguage: T,
534
- getDefaultLanguage: x
519
+ select: h,
520
+ setLanguages: r,
521
+ getLanguages: c,
522
+ getCurrentLanguage: p,
523
+ setSelectCallback: u,
524
+ setTranslationApiUrl: w,
525
+ getTranslationApiUrl: x,
526
+ setDefaultLanguage: m,
527
+ getDefaultLanguage: T
535
528
  };
536
- }), Kt = { key: 1 }, Ie = /* @__PURE__ */ I({
529
+ }), Jt = { key: 1 }, He = /* @__PURE__ */ A({
537
530
  __name: "PLanguage",
538
531
  setup(t) {
539
- const {
540
- select: d,
532
+ const r = (m) => c(m), {
533
+ select: c,
541
534
  getLanguages: h,
542
- getCurrentLanguage: v,
543
- getDefaultLanguage: w,
544
- getTranslationApiUrl: p
545
- } = Vt(), L = (T) => d(T), k = () => {
546
- window.translate && (window.translate.selectLanguageTag.show = !1, window.translate.selectLanguageTag.languages = h().map((T) => T.key).join(","), window.translate.ignore.class.push("ignore-translate-flag"), window.translate.ignore.id.push("ignore-translation"), window.translate.language.setLocal(w()), window.translate.request.api.translate = "api/v1/translation", window.translate.request.api.connectTest = "api/v1/translation/connect-test", window.translate.request.api.init = "api/v1/translation/init", window.translate.request.api.language = "api/v1/translation/language", window.translate.request.setHost(p()), window.translate.request.listener.start(), window.translate.listener.start(), window.translate.whole.enableAll(), window.translate.execute());
535
+ getCurrentLanguage: p,
536
+ getDefaultLanguage: u,
537
+ getTranslationApiUrl: x
538
+ } = Gt(), w = () => {
539
+ const m = window.translate;
540
+ m && (m.selectLanguageTag.show = !1, m.selectLanguageTag.languages = h().map((T) => T.key).join(","), m.ignore.class.push("ignore-translate-flag"), m.ignore.id.push("ignore-translation"), m.language.setLocal(u()), m.request.api.translate = "api/v1/translation", m.request.api.connectTest = "api/v1/translation/connect-test", m.request.api.init = "api/v1/translation/init", m.request.api.language = "api/v1/translation/language", m.request.setHost(x()), m.request.listener.start(), m.listener.start(), m.whole.enableAll(), m.execute());
547
541
  };
548
- return ee(async () => await re(() => k())), (T, x) => {
549
- const f = N, u = q;
550
- return a(h)().length > 0 ? (y(), $(a(G), {
542
+ return X(async () => await oe(() => w())), (m, T) => {
543
+ const g = M, v = K;
544
+ return a(h)().length > 0 ? (b(), $(a(Q), {
551
545
  key: 0,
552
546
  id: "ignore-translation",
553
547
  placement: "bottom-start",
554
548
  trigger: "hover",
555
549
  class: "flex flex-col justify-center h-full ignore",
556
- onSelect: L,
550
+ onSelect: r,
557
551
  options: a(h)()
558
552
  }, {
559
553
  default: s(() => [
560
- i(u, {
554
+ i(v, {
561
555
  quaternary: "",
562
556
  type: "info"
563
557
  }, {
564
558
  default: s(() => [
565
- a(v)() ? (y(), B("label", Kt, F(a(v)()?.label), 1)) : (y(), $(f, {
559
+ a(p)() ? (b(), N("label", Jt, q(a(p)()?.label), 1)) : (b(), $(g, {
566
560
  key: 0,
567
561
  size: "18"
568
562
  }, {
569
- default: s(() => x[0] || (x[0] = [
570
- b("svg", {
563
+ default: s(() => [...T[0] || (T[0] = [
564
+ y("svg", {
571
565
  xmlns: "http://www.w3.org/2000/svg",
572
566
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
573
567
  viewBox: "0 0 512 512"
574
568
  }, [
575
- b("path", {
569
+ y("path", {
576
570
  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",
577
571
  fill: "currentColor"
578
572
  }),
579
- b("path", {
573
+ y("path", {
580
574
  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",
581
575
  fill: "currentColor"
582
576
  })
583
577
  ], -1)
584
- ])),
585
- _: 1,
586
- __: [0]
578
+ ])]),
579
+ _: 1
587
580
  }))
588
581
  ]),
589
582
  _: 1
590
583
  })
591
584
  ]),
592
585
  _: 1
593
- }, 8, ["options"])) : A("", !0);
586
+ }, 8, ["options"])) : B("", !0);
594
587
  };
595
588
  }
596
- }), Yt = { class: "layout-header" }, Xt = { class: "layout-header-left" }, Gt = { class: "link-text" }, Jt = {
589
+ }), Zt = { class: "layout-header" }, Qt = { class: "layout-header-left" }, ea = { class: "link-text" }, ta = {
597
590
  key: 1,
598
591
  class: "link-text"
599
- }, Zt = { class: "layout-header-right" }, Qt = { class: "layout-header-trigger-min" }, ea = { class: "layout-header-trigger layout-header-trigger-min" }, ta = { class: "layout-header-trigger layout-header-trigger-min" }, aa = { class: "avatar" }, oa = /* @__PURE__ */ I({
592
+ }, aa = { class: "layout-header-right" }, oa = { class: "layout-header-trigger-min" }, na = { class: "layout-header-trigger layout-header-trigger-min" }, la = { class: "layout-header-trigger layout-header-trigger-min" }, sa = { class: "avatar" }, ra = /* @__PURE__ */ A({
600
593
  __name: "PHeader",
601
594
  setup(t) {
602
- const d = ce(), h = $e(), v = ae(), w = ke(), p = Ce(), L = De("reloadPage"), k = (m) => w.push({ name: m }), T = H(() => x(p.matched)), x = (m) => m.map((g) => {
603
- const _ = {
604
- key: g.name,
605
- label: g.meta.title,
606
- icon: g.meta.icon,
607
- meta: g.meta,
608
- disabled: g.path === "/",
595
+ const r = fe(), c = Me(), h = se(), p = ne(), u = le(), x = Ie("reloadPage"), w = (P) => p.push({ name: P }), m = U(() => T(u.matched)), T = (P) => P.map((_) => {
596
+ const k = {
597
+ key: _.name,
598
+ label: _.meta.title,
599
+ icon: _.meta.icon,
600
+ meta: _.meta,
601
+ disabled: _.path === "/",
609
602
  children: void 0
610
603
  };
611
- return g.children && g.children.length > 0 && (_.children = x(
612
- g.children
613
- )), _;
614
- }), f = M(!1), u = () => {
615
- document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), f.value = !1) : (document.documentElement.requestFullscreen(), f.value = !0);
616
- }, r = H(() => {
617
- const m = [];
618
- return m.push({
604
+ return _.children && _.children.length > 0 && (k.children = T(
605
+ _.children
606
+ )), k;
607
+ }), g = O(!1), v = () => {
608
+ document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), g.value = !1) : (document.documentElement.requestFullscreen(), g.value = !0);
609
+ }, d = U(() => {
610
+ const P = [];
611
+ return P.push({
619
612
  label: "退出登录",
620
613
  key: "logout"
621
- }), v.state.settingPages && v.state.settingPages.length > 0 && v.state.settingPages.forEach((g) => {
622
- m.push({
623
- label: g.title,
624
- key: g.route
614
+ }), h.state.settingPages && h.state.settingPages.length > 0 && h.state.settingPages.forEach((_) => {
615
+ P.push({
616
+ label: _.title,
617
+ key: _.route
625
618
  });
626
- }), m;
627
- }), P = (m) => {
628
- switch (m) {
629
- case "logout":
630
- o();
631
- break;
632
- default:
633
- w.push({ name: m });
634
- }
619
+ }), P;
620
+ }), S = (P) => {
621
+ P === "logout" ? o() : p.push({ name: P });
635
622
  }, o = () => {
636
- h.info({
623
+ c.info({
637
624
  title: "提示",
638
625
  content: "您确定要退出登录吗",
639
626
  positiveText: "确定",
640
627
  negativeText: "取消",
641
628
  onPositiveClick: async () => {
642
- if (v.state.logout)
629
+ if (h.state.logout)
643
630
  try {
644
- await v.state.logout(), localStorage.removeItem("TABS-ROUTES"), d.error("退出成功");
645
- } catch (m) {
646
- console.error(m), d.error("退出登录失败");
631
+ await h.state.logout(), localStorage.removeItem("TABS-ROUTES"), r.error("退出成功");
632
+ } catch (P) {
633
+ console.error(P), r.error("退出登录失败");
647
634
  } finally {
648
635
  location.reload();
649
636
  }
650
637
  else
651
- d.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法");
638
+ r.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法");
652
639
  },
653
640
  onNegativeClick: () => {
654
641
  }
655
642
  });
656
643
  };
657
- return (m, g) => {
658
- const _ = Ne, D = Je, O = Ee;
659
- return y(), B("div", Yt, [
660
- b("div", Xt, [
661
- b("div", {
644
+ return (P, _) => {
645
+ const k = De, I = Qe, E = Ae;
646
+ return b(), N("div", Zt, [
647
+ y("div", Qt, [
648
+ y("div", {
662
649
  class: "ml-1 layout-header-trigger layout-header-trigger-min",
663
- onClick: g[0] || (g[0] = //@ts-ignore
664
- (...S) => a(v).collapse && a(v).collapse(...S))
650
+ onClick: _[0] || (_[0] = //@ts-ignore
651
+ (...L) => a(h).collapse && a(h).collapse(...L))
665
652
  }, [
666
- a(v).state.collapsed ? (y(), $(a(N), {
653
+ a(h).state.collapsed ? (b(), $(a(M), {
667
654
  key: 0,
668
655
  size: "18"
669
656
  }, {
670
657
  default: s(() => [
671
- i(a(Ct))
658
+ i(a(Lt))
672
659
  ]),
673
660
  _: 1
674
- })) : (y(), $(a(N), {
661
+ })) : (b(), $(a(M), {
675
662
  key: 1,
676
663
  size: "18"
677
664
  }, {
678
665
  default: s(() => [
679
- i(a(Pt))
666
+ i(a(Tt))
680
667
  ]),
681
668
  _: 1
682
669
  }))
683
670
  ]),
684
- b("div", {
671
+ y("div", {
685
672
  class: "mr-1 layout-header-trigger layout-header-trigger-min",
686
- onClick: g[1] || (g[1] = //@ts-ignore
687
- (...S) => a(L) && a(L)(...S))
673
+ onClick: _[1] || (_[1] = //@ts-ignore
674
+ (...L) => a(x) && a(x)(...L))
688
675
  }, [
689
- i(a(N), { size: "18" }, {
676
+ i(a(M), { size: "18" }, {
690
677
  default: s(() => [
691
- i(a(we))
678
+ i(a(xe))
692
679
  ]),
693
680
  _: 1
694
681
  })
695
682
  ]),
696
- i(a(Xe), null, {
683
+ i(a(Je), null, {
697
684
  default: s(() => [
698
- (y(!0), B(Te, null, gt(T.value, (S) => (y(), B(Te, {
699
- key: S.label
685
+ (b(!0), N(Oe, null, _t(m.value, (L) => (b(), N(Oe, {
686
+ key: L.label
700
687
  }, [
701
- S.label ? (y(), $(a(Ge), { key: 0 }, {
688
+ L.label ? (b(), $(a(Ze), { key: 0 }, {
702
689
  default: s(() => [
703
- S.children && S.children.length ? (y(), $(a(G), {
690
+ L.children && L.children.length ? (b(), $(a(Q), {
704
691
  key: 0,
705
- options: S.children,
706
- onSelect: k
692
+ options: L.children,
693
+ onSelect: w
707
694
  }, {
708
695
  default: s(() => [
709
- b("span", Gt, [
710
- S.icon ? (y(), $(be(S.icon), { key: 0 })) : A("", !0),
711
- b("span", null, F(S.label), 1)
696
+ y("span", ea, [
697
+ L.icon ? (b(), $(we(L.icon), { key: 0 })) : B("", !0),
698
+ y("span", null, q(L.label), 1)
712
699
  ])
713
700
  ]),
714
701
  _: 2
715
- }, 1032, ["options"])) : (y(), B("span", Jt, [
716
- S.icon ? (y(), $(be(S.icon), { key: 0 })) : A("", !0),
717
- b("span", null, F(S.label), 1)
702
+ }, 1032, ["options"])) : (b(), N("span", ta, [
703
+ L.icon ? (b(), $(we(L.icon), { key: 0 })) : B("", !0),
704
+ y("span", null, q(L.label), 1)
718
705
  ]))
719
706
  ]),
720
707
  _: 2
721
- }, 1024)) : A("", !0)
708
+ }, 1024)) : B("", !0)
722
709
  ], 64))), 128))
723
710
  ]),
724
711
  _: 1
725
712
  })
726
713
  ]),
727
- b("div", Zt, [
728
- b("div", Qt, [
729
- i(Ie)
714
+ y("div", aa, [
715
+ y("div", oa, [
716
+ i(He)
730
717
  ]),
731
- b("div", ea, [
732
- i(_, { placement: "bottom" }, {
718
+ y("div", na, [
719
+ i(k, { placement: "bottom" }, {
733
720
  trigger: s(() => [
734
- i(a(N), {
721
+ i(a(M), {
735
722
  size: "18",
736
- onClick: ye(u, ["stop"])
723
+ onClick: Pe(v, ["stop"])
737
724
  }, {
738
725
  default: s(() => [
739
- f.value ? (y(), $(a(Lt), { key: 1 })) : (y(), $(a(St), { key: 0 }))
726
+ g.value ? (b(), $(a(Ot), { key: 1 })) : (b(), $(a($t), { key: 0 }))
740
727
  ]),
741
728
  _: 1
742
729
  })
743
730
  ]),
744
731
  default: s(() => [
745
- g[2] || (g[2] = b("span", null, "全屏", -1))
732
+ _[2] || (_[2] = y("span", null, "全屏", -1))
746
733
  ]),
747
- _: 1,
748
- __: [2]
734
+ _: 1
749
735
  })
750
736
  ]),
751
- b("div", ta, [
752
- i(a(G), {
737
+ y("div", la, [
738
+ i(a(Q), {
753
739
  trigger: "hover",
754
- onSelect: P,
755
- options: r.value
740
+ onSelect: S,
741
+ options: d.value
756
742
  }, {
757
743
  default: s(() => [
758
- b("div", aa, [
759
- b("span", null, F(a(v).state.uname), 1),
760
- i(D, { vertical: "" }),
761
- i(O, {
744
+ y("div", sa, [
745
+ y("span", null, q(a(h).state.uname), 1),
746
+ i(I, { vertical: "" }),
747
+ i(E, {
762
748
  round: "",
763
- src: a(v).state.avatar
749
+ src: a(h).state.avatar
764
750
  }, null, 8, ["src"])
765
751
  ])
766
752
  ]),
@@ -771,20 +757,20 @@ const Be = (t) => {
771
757
  ]);
772
758
  };
773
759
  }
774
- }), la = /* @__PURE__ */ de(oa, [["__scopeId", "data-v-93589779"]]), na = { class: "mt-1" }, sa = /* @__PURE__ */ I({
760
+ }), ia = /* @__PURE__ */ H(ra, [["__scopeId", "data-v-9fabccfe"]]), ca = { class: "mt-1" }, da = /* @__PURE__ */ A({
775
761
  __name: "PContent",
776
762
  props: {
777
763
  loading: { type: Boolean, default: !1 }
778
764
  },
779
765
  setup(t) {
780
- return (d, h) => {
781
- const v = ht("RouterView");
782
- return y(), B("div", na, [
783
- d.loading ? A("", !0) : (y(), $(v, { key: 0 }, {
784
- default: s(({ Component: w, route: p }) => [
785
- (y(), $(mt, null, [
786
- (y(), $(be(w), {
787
- key: p.fullPath
766
+ return (r, c) => {
767
+ const h = ze("RouterView");
768
+ return b(), N("div", ca, [
769
+ t.loading ? B("", !0) : (b(), $(h, { key: 0 }, {
770
+ default: s(({ Component: p, route: u }) => [
771
+ (b(), $(bt, null, [
772
+ (b(), $(we(p), {
773
+ key: u.fullPath
788
774
  }))
789
775
  ], 1024))
790
776
  ]),
@@ -793,256 +779,259 @@ const Be = (t) => {
793
779
  ]);
794
780
  };
795
781
  }
796
- }), ia = { class: "tabs-view-main" }, ra = ["id", "onClick", "onContextmenu"], ca = { class: "tabs-close" }, da = { class: "tabs-close-btn" }, ua = /* @__PURE__ */ I({
782
+ }), ua = { class: "tabs-view-main" }, fa = ["id", "onClick", "onContextmenu"], pa = { class: "tabs-close" }, ga = { class: "tabs-close-btn" }, ha = /* @__PURE__ */ A({
797
783
  __name: "PTabs",
798
784
  setup(t) {
799
- vt((e) => ({
800
- "4cb4fdc8": h.value,
801
- "21e8bab2": v.value
785
+ yt((e) => ({
786
+ v141ddb06: c.value,
787
+ cf709148: h.value
802
788
  }));
803
- const d = Ze(), h = H(() => d.value.cardColor), v = H(() => d.value.textColor1), w = ce(), p = Ce(), L = ke(), k = M(null), T = M(null), x = M(!1), f = ae(), u = H(() => f.state.tabs), r = Re({
804
- activeKey: p.fullPath,
789
+ const r = et(), c = U(() => r.value.cardColor), h = U(() => r.value.textColor1), p = fe(), u = le(), x = ne(), w = O(null), m = O(null), T = O(!1), g = se(), v = U(() => g.state.tabs), d = Ce({
790
+ activeKey: u.fullPath,
805
791
  scrollable: !0,
806
792
  dropdownX: 0,
807
793
  dropdownY: 0,
808
794
  showDropdown: !1,
809
795
  isMultiHeaderFixed: !0,
810
796
  multiTabsSetting: !0
811
- }), P = ["Login", "Redirect", "ErrorPage"], o = (e) => {
812
- const { fullPath: l, hash: n, meta: C, name: E, params: R, path: j, query: se } = e;
813
- return { fullPath: l, hash: n, meta: C, name: E, params: R, path: j, query: se };
814
- }, m = H(() => {
815
- const n = f.state.collapsed ? "64px" : "272px";
797
+ }), S = ["Login", "Redirect", "ErrorPage"], o = (e) => {
798
+ const { fullPath: n, hash: l, meta: C, name: R, params: D, path: V, query: de } = e;
799
+ return { fullPath: n, hash: l, meta: C, name: R, params: D, path: V, query: de };
800
+ }, P = U(() => {
801
+ const l = g.state.collapsed ? "64px" : "272px";
816
802
  return {
817
- left: n,
818
- width: `calc(100% - ${n})`
803
+ left: l,
804
+ width: `calc(100% - ${l})`
819
805
  };
820
- }), g = H(() => {
821
- const e = u.value.length <= 1;
806
+ }), _ = U(() => {
807
+ const e = v.value.length <= 1;
822
808
  return [
823
809
  {
824
810
  label: "刷新当前",
825
811
  key: "1",
826
- icon: () => z(N, null, { default: () => z(we) })
812
+ icon: () => z(M, null, { default: () => z(xe) })
827
813
  },
828
814
  {
829
815
  label: "关闭当前",
830
816
  key: "2",
831
- disabled: x.value || e,
832
- icon: () => z(N, null, { default: () => z(xe) })
817
+ disabled: T.value || e,
818
+ icon: () => z(M, null, { default: () => z(Ee) })
833
819
  },
834
820
  {
835
821
  label: "关闭其他",
836
822
  key: "3",
837
823
  disabled: e,
838
- icon: () => z(N, null, { default: () => z(Tt) })
824
+ icon: () => z(M, null, { default: () => z(Et) })
839
825
  },
840
826
  {
841
827
  label: "关闭全部",
842
828
  key: "4",
843
829
  disabled: e,
844
- icon: () => z(N, null, { default: () => z(xt) })
830
+ icon: () => z(M, null, { default: () => z(Mt) })
845
831
  }
846
832
  ];
847
- }), _ = () => {
833
+ }), k = () => {
848
834
  let e = [];
849
- const l = o(p);
835
+ const n = o(u);
850
836
  try {
851
- if (f.state.cacheTabs) {
852
- const n = localStorage.getItem("TABS_ROUTES");
853
- e = n ? JSON.parse(n) : [l];
837
+ if (g.state.cacheTabs) {
838
+ const l = localStorage.getItem("TABS_ROUTES");
839
+ e = l ? JSON.parse(l) : [n];
854
840
  }
855
841
  } catch {
856
- e = [l];
842
+ e = [n];
857
843
  } finally {
858
844
  return e;
859
845
  }
860
- }, D = (e) => {
861
- const l = L.getRoutes();
862
- e.forEach((n) => {
863
- const C = l.find((E) => E.path === n.path);
864
- C && (n.meta = C.meta || n.meta, n.name = C.name || n.name);
865
- }), f.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(e));
866
- }, O = () => {
867
- const e = _();
868
- D(e), f.initTabs(e);
869
- }, S = async (e) => {
870
- if (await re(), !k.value) return;
871
- const l = k.value.offsetWidth, n = k.value.scrollWidth;
872
- l < n ? (r.scrollable = !0, e && [...k.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((E) => {
873
- E.id === `tag${r.activeKey.split("/").join("/")}` && E.scrollIntoView && E.scrollIntoView();
874
- })) : r.scrollable = !1;
875
- }, J = (e) => !(e.draggedContext.element.meta.affix || e.relatedContext.element.meta.affix), ue = () => {
846
+ }, I = (e) => {
847
+ const n = x.getRoutes();
848
+ e.forEach((l) => {
849
+ const C = n.find((R) => R.path === l.path);
850
+ C && (l.meta = C.meta || l.meta, l.name = C.name || l.name);
851
+ }), g.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(e));
852
+ }, E = () => {
853
+ const e = k();
854
+ I(e), g.initTabs(e);
855
+ }, L = async (e) => {
856
+ if (await oe(), !w.value) return;
857
+ const n = w.value.offsetWidth, l = w.value.scrollWidth;
858
+ n < l ? (d.scrollable = !0, e && [...w.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((R) => {
859
+ R.id === `tag${d.activeKey.split("/").join("/")}` && R.scrollIntoView && R.scrollIntoView();
860
+ })) : d.scrollable = !1;
861
+ }, ee = (e) => !(e.draggedContext.element.meta.affix || e.relatedContext.element.meta.affix), pe = () => {
876
862
  let e;
877
- e = Et(), e.listenTo(T.value, () => S(!0));
878
- }, oe = (e) => {
879
- const { fullPath: l } = e;
880
- if (l === p.fullPath || (r.activeKey = l, !e))
863
+ e = It(), e.listenTo(m.value, () => L(!0));
864
+ }, re = (e) => {
865
+ const { fullPath: n } = e;
866
+ if (n === u.fullPath || (d.activeKey = n, !e))
881
867
  return;
882
- const { replace: n } = L;
883
- toString.call(e), n(e).catch(console.error);
884
- }, le = (e, l) => {
885
- e.preventDefault(), x.value = l.path === "/home", r.showDropdown = !1, re().then(() => {
886
- r.showDropdown = !0, r.dropdownX = e.clientX, r.dropdownY = e.clientY;
868
+ const { replace: l } = x;
869
+ toString.call(e), l(e).catch(console.error);
870
+ }, ie = (e, n) => {
871
+ e.preventDefault(), T.value = n.path === "/home", d.showDropdown = !1, oe().then(() => {
872
+ d.showDropdown = !0, d.dropdownX = e.clientX, d.dropdownY = e.clientY;
887
873
  });
888
- }, K = () => {
889
- p.meta.keepAlive && L.currentRoute.value.matched.find(
890
- (e) => e.name == p.name
891
- )?.components?.default.name;
892
- }, Y = (e) => {
893
- if (u.value.length === 1)
894
- return w.warning("这已经是最后一页,不能再关闭了!");
895
- if (K(), f.closeCurrentTab(e), r.activeKey === e.fullPath) {
896
- const l = u.value[Math.max(0, u.value.length - 1)];
897
- r.activeKey = l.fullPath, L.push(l);
874
+ }, G = () => {
875
+ if (u.meta.keepAlive) {
876
+ var e = x.currentRoute.value.matched.find(
877
+ (n) => n.name == u.name
878
+ );
879
+ e && e.components?.default?.name;
880
+ }
881
+ }, J = (e) => {
882
+ if (v.value.length === 1)
883
+ return p.warning("这已经是最后一页,不能再关闭了!");
884
+ if (G(), g.closeCurrentTab(e), d.activeKey === e.fullPath) {
885
+ const n = v.value[Math.max(0, v.value.length - 1)];
886
+ d.activeKey = n.fullPath, x.push(n);
898
887
  }
899
- S();
900
- }, fe = (e) => {
901
- const { fullPath: l } = e, n = u.value.find((C) => C.fullPath == l);
902
- Y(n);
903
- }, pe = (e) => {
904
- f.closeOtherTabs(e), r.activeKey = e.fullPath, L.replace(e.fullPath), S();
905
- }, W = () => {
906
- f.closeAllTabs(), S();
907
- }, ge = De("reloadPage"), ne = (e) => {
888
+ L();
889
+ }, ge = (e) => {
890
+ const { fullPath: n } = e, l = v.value.find((C) => C.fullPath == n);
891
+ J(l);
892
+ }, he = (e) => {
893
+ g.closeOtherTabs(e), d.activeKey = e.fullPath, x.replace(e.fullPath), L();
894
+ }, j = () => {
895
+ g.closeAllTabs(), L();
896
+ }, me = Ie("reloadPage"), ce = (e) => {
908
897
  switch (e) {
909
898
  //刷新
910
899
  case "1":
911
- ge();
900
+ me();
912
901
  break;
913
902
  //关闭
914
903
  case "2":
915
- Y(p);
904
+ J(u);
916
905
  break;
917
906
  //关闭其他
918
907
  case "3":
919
- pe(p);
908
+ he(u);
920
909
  break;
921
910
  //关闭所有
922
911
  case "4":
923
- W();
912
+ j();
924
913
  break;
925
914
  }
926
- S(), r.showDropdown = !1;
927
- }, Z = (e, l) => {
928
- const n = k.value.scrollLeft, C = l > 0 && n + l >= e || l < 0 && n + l <= e ? e : n + l;
929
- if (k.value && k.value.scrollTo(C, 0), C !== e)
930
- return window.requestAnimationFrame(() => Z(e, l));
931
- }, he = () => {
932
- const e = k.value.offsetWidth, l = k.value.scrollLeft;
933
- if (!l) return;
934
- const n = l > e ? l - e : 0;
935
- Z(n, (n - l) / 20);
936
- }, c = () => {
937
- const e = k.value.offsetWidth, l = k.value.scrollWidth, n = k.value.scrollLeft;
938
- if (l - n <= e) return;
939
- const C = l - n > e * 2 ? n + e : l - e;
940
- Z(C, (C - n) / 20);
915
+ L(), d.showDropdown = !1;
916
+ }, te = (e, n) => {
917
+ const l = w.value.scrollLeft, C = n > 0 && l + n >= e || n < 0 && l + n <= e ? e : l + n;
918
+ if (w.value && w.value.scrollTo(C, 0), C !== e)
919
+ return window.requestAnimationFrame(() => te(e, n));
920
+ }, ve = () => {
921
+ const e = w.value.offsetWidth, n = w.value.scrollLeft;
922
+ if (!n) return;
923
+ const l = n > e ? n - e : 0;
924
+ te(l, (l - n) / 20);
925
+ }, f = () => {
926
+ const e = w.value.offsetWidth, n = w.value.scrollWidth, l = w.value.scrollLeft;
927
+ if (n - l <= e) return;
928
+ const C = n - l > e * 2 ? l + e : n - e;
929
+ te(C, (C - l) / 20);
941
930
  };
942
931
  return window.addEventListener("beforeunload", () => {
943
- localStorage.setItem("TABS_ROUTES", JSON.stringify(u.value));
932
+ localStorage.setItem("TABS_ROUTES", JSON.stringify(v.value));
944
933
  }), window.addEventListener(
945
934
  "scroll",
946
935
  (e) => {
947
- let l = e.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
948
- r.isMultiHeaderFixed = l >= 64;
936
+ let n = e.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
937
+ d.isMultiHeaderFixed = n >= 64;
949
938
  },
950
939
  !0
951
- ), ze(
952
- () => p.fullPath,
940
+ ), Be(
941
+ () => u.fullPath,
953
942
  (e) => {
954
- P.includes(p.name) || (r.activeKey = e, f.addTab(o(p)), S(!0));
943
+ S.includes(u.name) || (d.activeKey = e, g.addTab(o(u)), L(!0));
955
944
  },
956
945
  { immediate: !0 }
957
- ), O(), ee(() => ue()), (e, l) => (y(), B("div", {
946
+ ), E(), X(() => pe()), (e, n) => (b(), N("div", {
958
947
  class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
959
- style: ie(m.value)
948
+ style: ue(P.value)
960
949
  }, [
961
- b("div", ia, [
962
- b("div", {
950
+ y("div", ua, [
951
+ y("div", {
963
952
  ref_key: "navWrap",
964
- ref: T,
965
- class: Q(["tabs-card", { "tabs-card-scrollable": r.scrollable }])
953
+ ref: m,
954
+ class: ae(["tabs-card", { "tabs-card-scrollable": d.scrollable }])
966
955
  }, [
967
- b("span", {
968
- class: Q(["tabs-card-prev", { "tabs-card-prev-hide": !r.scrollable }]),
969
- onClick: he
956
+ y("span", {
957
+ class: ae(["tabs-card-prev", { "tabs-card-prev-hide": !d.scrollable }]),
958
+ onClick: ve
970
959
  }, [
971
- i(a(N), {
960
+ i(a(M), {
972
961
  size: "16",
973
962
  color: "#515a6e"
974
963
  }, {
975
964
  default: s(() => [
976
- i(a($t))
965
+ i(a(Rt))
977
966
  ]),
978
967
  _: 1
979
968
  })
980
969
  ], 2),
981
- b("span", {
982
- class: Q(["tabs-card-next", { "tabs-card-next-hide": !r.scrollable }]),
983
- onClick: c
970
+ y("span", {
971
+ class: ae(["tabs-card-next", { "tabs-card-next-hide": !d.scrollable }]),
972
+ onClick: f
984
973
  }, [
985
- i(a(N), {
974
+ i(a(M), {
986
975
  size: "16",
987
976
  color: "#515a6e"
988
977
  }, {
989
978
  default: s(() => [
990
- i(a(Ot))
979
+ i(a(Nt))
991
980
  ]),
992
981
  _: 1
993
982
  })
994
983
  ], 2),
995
- b("div", {
984
+ y("div", {
996
985
  ref_key: "navScroll",
997
- ref: k,
986
+ ref: w,
998
987
  class: "tabs-card-scroll"
999
988
  }, [
1000
- i(a(Rt), {
1001
- list: u.value,
989
+ i(a(zt), {
990
+ list: v.value,
1002
991
  animation: "300",
1003
992
  "item-key": "fullPath",
1004
993
  class: "flex",
1005
- move: J
994
+ move: ee
1006
995
  }, {
1007
- item: s(({ element: n }) => [
1008
- b("div", {
1009
- id: `tag${n.fullPath.split("/").join("/")}`,
1010
- class: Q(["tabs-card-scroll-item", { "active-item": r.activeKey === n.fullPath }]),
1011
- onClick: ye((C) => oe(n), ["stop"]),
1012
- onContextmenu: (C) => le(C, n)
996
+ item: s(({ element: l }) => [
997
+ y("div", {
998
+ id: `tag${l.fullPath.split("/").join("/")}`,
999
+ class: ae(["tabs-card-scroll-item", { "active-item": d.activeKey === l.fullPath }]),
1000
+ onClick: Pe((C) => re(l), ["stop"]),
1001
+ onContextmenu: (C) => ie(C, l)
1013
1002
  }, [
1014
- b("span", null, F(n.meta.title), 1),
1015
- n.meta.affix ? A("", !0) : (y(), $(a(N), {
1003
+ y("span", null, q(l.meta.title), 1),
1004
+ l.meta.affix ? B("", !0) : (b(), $(a(M), {
1016
1005
  key: 0,
1017
1006
  size: "14",
1018
- onClick: ye((C) => fe(n), ["stop"])
1007
+ onClick: Pe((C) => ge(l), ["stop"])
1019
1008
  }, {
1020
1009
  default: s(() => [
1021
- i(a(xe))
1010
+ i(a(Ee))
1022
1011
  ]),
1023
- _: 2
1024
- }, 1032, ["onClick"]))
1025
- ], 42, ra)
1012
+ _: 1
1013
+ }, 8, ["onClick"]))
1014
+ ], 42, fa)
1026
1015
  ]),
1027
1016
  _: 1
1028
1017
  }, 8, ["list"])
1029
1018
  ], 512)
1030
1019
  ], 2),
1031
- b("div", ca, [
1032
- i(a(G), {
1020
+ y("div", pa, [
1021
+ i(a(Q), {
1033
1022
  trigger: "hover",
1034
- onSelect: ne,
1023
+ onSelect: ce,
1035
1024
  placement: "bottom-end",
1036
- options: g.value
1025
+ options: _.value
1037
1026
  }, {
1038
1027
  default: s(() => [
1039
- b("div", da, [
1040
- i(a(N), {
1028
+ y("div", ga, [
1029
+ i(a(M), {
1041
1030
  size: "16",
1042
1031
  color: "#515a6e"
1043
1032
  }, {
1044
1033
  default: s(() => [
1045
- i(a(Mt))
1034
+ i(a(Dt))
1046
1035
  ]),
1047
1036
  _: 1
1048
1037
  })
@@ -1051,157 +1040,157 @@ const Be = (t) => {
1051
1040
  _: 1
1052
1041
  }, 8, ["options"])
1053
1042
  ]),
1054
- i(a(G), {
1055
- show: r.showDropdown,
1056
- x: r.dropdownX,
1057
- y: r.dropdownY,
1058
- onClickoutside: l[0] || (l[0] = (n) => r.showDropdown = !1),
1043
+ i(a(Q), {
1044
+ show: d.showDropdown,
1045
+ x: d.dropdownX,
1046
+ y: d.dropdownY,
1047
+ onClickoutside: n[0] || (n[0] = (l) => d.showDropdown = !1),
1059
1048
  placement: "bottom-start",
1060
- onSelect: ne,
1061
- options: g.value
1049
+ onSelect: ce,
1050
+ options: _.value
1062
1051
  }, null, 8, ["show", "x", "y", "options"])
1063
1052
  ])
1064
1053
  ], 4));
1065
1054
  }
1066
- }), fa = /* @__PURE__ */ de(ua, [["__scopeId", "data-v-f0706f46"]]), pa = /* @__PURE__ */ I({
1055
+ }), ma = /* @__PURE__ */ H(ha, [["__scopeId", "data-v-48b3be2d"]]), va = /* @__PURE__ */ A({
1067
1056
  __name: "PMenus",
1068
1057
  setup(t) {
1069
- const d = Ce(), h = ke(), v = ae(), w = M(d.name), p = M(
1070
- d.matched && d.matched.length ? d.matched.map((r) => r.name) : []
1071
- ), L = M([]), k = (r) => {
1072
- /http(s)?:/.test(r) ? window.open(r) : h.push({ name: r });
1073
- }, T = (r) => {
1074
- if (!r) return;
1075
- const P = r.find((o) => p.value.indexOf(o) === -1);
1076
- p.value = P ? [P] : [];
1077
- }, x = () => {
1078
- const r = d.matched;
1079
- p.value = r.map((o) => o.name);
1080
- const P = d.meta?.activeMenu || "";
1081
- w.value = P || d.name;
1082
- }, f = (r, P = [], o = !1) => {
1083
- const m = [], g = [
1058
+ const r = le(), c = ne(), h = se(), p = O(r.name), u = O(
1059
+ r.matched && r.matched.length ? r.matched.map((d) => d.name) : []
1060
+ ), x = O([]), w = (d) => {
1061
+ /http(s)?:/.test(d) ? window.open(d) : c.push({ name: d });
1062
+ }, m = (d) => {
1063
+ if (!d) return;
1064
+ const S = d.find((o) => u.value.indexOf(o) === -1);
1065
+ u.value = S ? [S] : [];
1066
+ }, T = () => {
1067
+ const d = r.matched;
1068
+ u.value = d.map((o) => o.name);
1069
+ const S = r.meta?.activeMenu || "";
1070
+ p.value = S || r.name;
1071
+ }, g = (d, S = [], o = !1) => {
1072
+ const P = [], _ = [
1084
1073
  "/:path(.*)*",
1085
1074
  "/redirect",
1086
1075
  "/redirect/:path(.*)",
1087
1076
  "/login",
1088
1077
  "/oidc-callback"
1089
1078
  ];
1090
- if (!r || r.length === 0)
1091
- return m;
1092
- r = r.sort((_, D) => {
1093
- let O = (D.children?.length ? 1 : 0) - (_.children?.length ? 1 : 0);
1094
- return O === 0 && (O = (_.meta?.sort ?? 0) - (D.meta?.sort ?? 0)), O;
1079
+ if (!d || d.length === 0)
1080
+ return P;
1081
+ d = d.sort((k, I) => {
1082
+ let E = (I.children?.length ? 1 : 0) - (k.children?.length ? 1 : 0);
1083
+ return E === 0 && (E = (k.meta?.sort ?? 0) - (I.meta?.sort ?? 0)), E;
1095
1084
  });
1096
- for (const _ of r) {
1097
- if (o || (_.meta?.hidden || !1) == !0 || g.includes(_.path)) {
1098
- P.push(_.name), _.children && _.children.length > 0 && f(_.children, P, !0);
1085
+ for (const k of d) {
1086
+ if (o || (k.meta?.hidden || !1) == !0 || _.includes(k.path)) {
1087
+ S.push(k.name), k.children && k.children.length > 0 && g(k.children, S, !0);
1099
1088
  continue;
1100
1089
  }
1101
- const D = _.meta?.alwaysShow != !0 && _?.children?.filter((J) => !J?.meta?.hidden)?.length === 1, O = D ? _.children[0] : _, S = {
1102
- key: O.name,
1103
- label: O.meta?.title,
1104
- affix: O.meta?.affix,
1105
- sort: O.meta?.sort,
1106
- path: O.path,
1107
- redirect: O.redirect,
1108
- icon: D ? _.meta?.icon : O.meta?.icon,
1109
- permissions: O.meta?.permissions,
1110
- meta: O.meta,
1090
+ const I = k.meta?.alwaysShow != !0 && k?.children?.filter((ee) => !ee?.meta?.hidden)?.length === 1, E = I ? k.children[0] : k, L = {
1091
+ key: E.name,
1092
+ label: E.meta?.title,
1093
+ affix: E.meta?.affix,
1094
+ sort: E.meta?.sort,
1095
+ path: E.path,
1096
+ redirect: E.redirect,
1097
+ icon: I ? k.meta?.icon : E.meta?.icon,
1098
+ permissions: E.meta?.permissions,
1099
+ meta: E.meta,
1111
1100
  children: void 0
1112
1101
  };
1113
- if (!P.includes(_.name)) {
1114
- if (m.push(S), P.push(_.name), D) {
1115
- f(_.children, P, o);
1102
+ if (!S.includes(k.name)) {
1103
+ if (P.push(L), S.push(k.name), I) {
1104
+ g(k.children, S, o);
1116
1105
  continue;
1117
1106
  }
1118
- _.children && _.children.length > 0 && (S.children = f(_.children, P, o));
1107
+ k.children && k.children.length > 0 && (L.children = g(k.children, S, o));
1119
1108
  }
1120
1109
  }
1121
- return m;
1122
- }, u = () => {
1123
- const r = h.getRoutes();
1124
- L.value = f(r);
1110
+ return P;
1111
+ }, v = () => {
1112
+ const d = c.getRoutes();
1113
+ x.value = g(d);
1125
1114
  };
1126
- return ze(
1127
- () => d.fullPath,
1115
+ return Be(
1116
+ () => r.fullPath,
1128
1117
  () => {
1129
- x();
1118
+ T();
1130
1119
  }
1131
- ), ee(() => {
1132
- u(), x();
1133
- }), (r, P) => (y(), $(a(Qe), {
1120
+ ), X(() => {
1121
+ v(), T();
1122
+ }), (d, S) => (b(), $(a(tt), {
1134
1123
  class: "h-full",
1135
1124
  inverted: "",
1136
1125
  mode: "vertical",
1137
- options: L.value,
1138
- collapsed: a(v).state.collapsed,
1126
+ options: x.value,
1127
+ collapsed: a(h).state.collapsed,
1139
1128
  "collapsed-width": 64,
1140
1129
  "collapsed-icon-size": 20,
1141
1130
  indent: 24,
1142
- "expanded-keys": p.value,
1143
- value: w.value,
1144
- "onUpdate:value": k,
1145
- "onUpdate:expandedKeys": T
1131
+ "expanded-keys": u.value,
1132
+ value: p.value,
1133
+ "onUpdate:value": w,
1134
+ "onUpdate:expandedKeys": m
1146
1135
  }, null, 8, ["options", "collapsed", "expanded-keys", "value"]));
1147
1136
  }
1148
- }), ga = { class: "layout-content-main layout-content-main-fix" }, ha = { class: "main-view main-view-fix" }, ma = /* @__PURE__ */ I({
1137
+ }), _a = { class: "layout-content-main layout-content-main-fix" }, ba = { class: "main-view main-view-fix" }, ya = /* @__PURE__ */ A({
1149
1138
  __name: "PLayout",
1150
1139
  setup(t) {
1151
- const d = ae(), h = M(!1);
1152
- return _t("reloadPage", () => {
1153
- h.value = !0, re(() => h.value = !1);
1154
- }), (w, p) => {
1155
- const L = lt;
1156
- return y(), $(a(Le), {
1140
+ const r = se(), c = O(!1);
1141
+ return wt("reloadPage", () => {
1142
+ c.value = !0, oe(() => c.value = !1);
1143
+ }), (p, u) => {
1144
+ const x = st;
1145
+ return b(), $(a($e), {
1157
1146
  "has-sider": "",
1158
1147
  class: "layout",
1159
1148
  position: "absolute"
1160
1149
  }, {
1161
1150
  default: s(() => [
1162
- i(a(et), {
1151
+ i(a(at), {
1163
1152
  class: "layout-sider",
1164
1153
  inverted: "",
1165
1154
  "show-trigger": "bar",
1166
1155
  position: "absolute",
1167
1156
  "collapse-mode": "width",
1168
- collapsed: a(d).state.collapsed,
1157
+ collapsed: a(r).state.collapsed,
1169
1158
  "native-scrollbar": !1,
1170
1159
  "collapsed-width": 64,
1171
- onCollapse: a(d).collapse,
1172
- onExpand: a(d).collapse
1160
+ onCollapse: a(r).collapse,
1161
+ onExpand: a(r).collapse
1173
1162
  }, {
1174
1163
  default: s(() => [
1175
- i(a(tt), { vertical: "" }, {
1164
+ i(a(ot), { vertical: "" }, {
1176
1165
  default: s(() => [
1177
- i(jt),
1178
- i(pa)
1166
+ i(Yt),
1167
+ i(va)
1179
1168
  ]),
1180
1169
  _: 1
1181
1170
  })
1182
1171
  ]),
1183
1172
  _: 1
1184
1173
  }, 8, ["collapsed", "onCollapse", "onExpand"]),
1185
- i(a(Le), null, {
1174
+ i(a($e), null, {
1186
1175
  default: s(() => [
1187
- i(a(at), { position: "absolute" }, {
1176
+ i(a(nt), { position: "absolute" }, {
1188
1177
  default: s(() => [
1189
- i(la)
1178
+ i(ia)
1190
1179
  ]),
1191
1180
  _: 1
1192
1181
  }),
1193
- i(a(ot), { class: "layout-content layout-default-background" }, {
1182
+ i(a(lt), { class: "layout-content layout-default-background" }, {
1194
1183
  default: s(() => [
1195
- b("div", ga, [
1196
- i(fa),
1197
- b("div", ha, [
1198
- i(sa, { loading: h.value }, null, 8, ["loading"])
1184
+ y("div", _a, [
1185
+ i(ma),
1186
+ y("div", ba, [
1187
+ i(da, { loading: c.value }, null, 8, ["loading"])
1199
1188
  ])
1200
1189
  ])
1201
1190
  ]),
1202
1191
  _: 1
1203
1192
  }),
1204
- i(L, {
1193
+ i(x, {
1205
1194
  right: 20,
1206
1195
  class: "z-50"
1207
1196
  })
@@ -1213,7 +1202,12 @@ const Be = (t) => {
1213
1202
  });
1214
1203
  };
1215
1204
  }
1216
- }), va = /* @__PURE__ */ de(ma, [["__scopeId", "data-v-87dcb433"]]), _a = te(va), ba = /* @__PURE__ */ I({
1205
+ }), wa = /* @__PURE__ */ H(ya, [["__scopeId", "data-v-8d20e006"]]), Pa = {};
1206
+ function ka(t, r) {
1207
+ const c = ze("router-view");
1208
+ return b(), $(c);
1209
+ }
1210
+ const Ca = /* @__PURE__ */ H(Pa, [["render", ka]]), xa = W(Ca), Sa = W(wa), La = /* @__PURE__ */ A({
1217
1211
  __name: "PApplication",
1218
1212
  props: {
1219
1213
  theme: {},
@@ -1230,22 +1224,22 @@ const Be = (t) => {
1230
1224
  } }
1231
1225
  },
1232
1226
  setup(t) {
1233
- return (d, h) => {
1234
- const v = nt;
1235
- return y(), $(v, {
1236
- locale: a(it),
1237
- theme: d.theme,
1238
- "theme-overrides": d.themeOverrides,
1239
- "date-locale": a(st)
1227
+ return (r, c) => {
1228
+ const h = rt;
1229
+ return b(), $(h, {
1230
+ locale: a(ct),
1231
+ theme: t.theme,
1232
+ "theme-overrides": t.themeOverrides,
1233
+ "date-locale": a(it)
1240
1234
  }, {
1241
1235
  default: s(() => [
1242
- i(a(rt), null, {
1236
+ i(a(dt), null, {
1243
1237
  default: s(() => [
1244
- i(a(ct), null, {
1238
+ i(a(ut), null, {
1245
1239
  default: s(() => [
1246
- i(a(dt), null, {
1240
+ i(a(ft), null, {
1247
1241
  default: s(() => [
1248
- U(d.$slots, "default")
1242
+ F(r.$slots, "default")
1249
1243
  ]),
1250
1244
  _: 3
1251
1245
  })
@@ -1260,7 +1254,7 @@ const Be = (t) => {
1260
1254
  }, 8, ["locale", "theme", "theme-overrides", "date-locale"]);
1261
1255
  };
1262
1256
  }
1263
- }), ya = te(ba), wa = /* @__PURE__ */ I({
1257
+ }), Ta = W(La), $a = /* @__PURE__ */ A({
1264
1258
  __name: "PModal",
1265
1259
  props: {
1266
1260
  saveBtnText: { default: "保存" },
@@ -1274,93 +1268,92 @@ const Be = (t) => {
1274
1268
  onClose: {}
1275
1269
  },
1276
1270
  emits: ["update:visible", "update:loading"],
1277
- setup(t, { expose: d, emit: h }) {
1278
- const v = ce(), w = t, p = h, L = async () => {
1279
- p("update:loading", !0);
1271
+ setup(t, { expose: r, emit: c }) {
1272
+ const h = fe(), p = t, u = c, x = async () => {
1273
+ u("update:loading", !0);
1280
1274
  try {
1281
- w.onSave && await w.onSave() && k();
1282
- } catch (u) {
1283
- v.error(u.message);
1275
+ p.onSave && await p.onSave() && w();
1276
+ } catch (v) {
1277
+ h.error(v.message);
1284
1278
  } finally {
1285
- p("update:loading", !1);
1279
+ u("update:loading", !1);
1286
1280
  }
1287
- }, k = () => {
1288
- p("update:visible", !1), p("update:loading", !1);
1289
- }, T = async () => {
1281
+ }, w = () => {
1282
+ u("update:visible", !1), u("update:loading", !1);
1283
+ }, m = async () => {
1290
1284
  try {
1291
- w.onClose ? await w.onClose() && k() : k();
1292
- } catch (u) {
1293
- v.error(u.message), p("update:loading", !1);
1285
+ p.onClose ? await p.onClose() && w() : w();
1286
+ } catch (v) {
1287
+ h.error(v.message), u("update:loading", !1);
1294
1288
  }
1295
1289
  };
1296
- return d({
1290
+ return r({
1297
1291
  open: () => {
1298
- p("update:visible", !0), p("update:loading", !1);
1292
+ u("update:visible", !0), u("update:loading", !1);
1299
1293
  },
1300
1294
  close: () => {
1301
- p("update:visible", !1), p("update:loading", !1);
1295
+ u("update:visible", !1), u("update:loading", !1);
1302
1296
  }
1303
- }), (u, r) => {
1304
- const P = ut, o = q, m = Me;
1305
- return y(), $(a(Oe), bt({
1297
+ }), (v, d) => {
1298
+ const S = pt, o = K, P = Ne;
1299
+ return b(), $(a(Re), Pt({
1306
1300
  ref: "$modal",
1307
1301
  preset: "card"
1308
- }, u.$attrs, {
1302
+ }, v.$attrs, {
1309
1303
  "header-class": "bg-gray-50",
1310
- show: w.visible,
1304
+ show: p.visible,
1311
1305
  draggable: !0,
1312
1306
  closable: !1,
1313
1307
  "close-on-esc": !1,
1314
1308
  "mask-closable": !1,
1315
1309
  bordered: !1,
1316
- style: { width: `${w.width}px` },
1317
- onClose: k
1310
+ style: { width: `${p.width}px` },
1311
+ onClose: w
1318
1312
  }), {
1319
1313
  header: s(() => [
1320
- u.$slots.header ? U(u.$slots, "header", { key: 0 }) : w.title ? (y(), $(P, { key: 1 }, {
1314
+ v.$slots.header ? F(v.$slots, "header", { key: 0 }) : p.title ? (b(), $(S, { key: 1 }, {
1321
1315
  default: s(() => [
1322
- V(F(u.title), 1)
1316
+ Y(q(t.title), 1)
1323
1317
  ]),
1324
1318
  _: 1
1325
- })) : A("", !0)
1319
+ })) : B("", !0)
1326
1320
  ]),
1327
1321
  "header-extra": s(() => [
1328
- U(u.$slots, "header-extra")
1322
+ F(v.$slots, "header-extra")
1329
1323
  ]),
1330
1324
  default: s(() => [
1331
- b("div", {
1325
+ y("div", {
1332
1326
  class: "overflow-y-auto overflow-hidden mt-5",
1333
- style: ie({ maxHeight: `${w.height}px` })
1327
+ style: ue({ maxHeight: `${p.height}px` })
1334
1328
  }, [
1335
- U(u.$slots, "default")
1329
+ F(v.$slots, "default")
1336
1330
  ], 4)
1337
1331
  ]),
1338
1332
  footer: s(() => [
1339
- U(u.$slots, "footer")
1333
+ F(v.$slots, "footer")
1340
1334
  ]),
1341
1335
  action: s(() => [
1342
- i(m, { justify: "end" }, {
1336
+ i(P, { justify: "end" }, {
1343
1337
  default: s(() => [
1344
1338
  i(o, {
1345
1339
  type: "primary",
1346
- loading: u.loading,
1347
- onClick: L
1340
+ loading: t.loading,
1341
+ onClick: x
1348
1342
  }, {
1349
1343
  default: s(() => [
1350
- V(F(u.saveBtnText), 1)
1344
+ Y(q(t.saveBtnText), 1)
1351
1345
  ]),
1352
1346
  _: 1
1353
1347
  }, 8, ["loading"]),
1354
- U(u.$slots, "action-extra", { loading: u.loading }),
1348
+ F(v.$slots, "action-extra", { loading: t.loading }),
1355
1349
  i(o, {
1356
- onClick: T,
1357
- loading: u.loading
1350
+ onClick: m,
1351
+ loading: t.loading
1358
1352
  }, {
1359
- default: s(() => r[0] || (r[0] = [
1360
- V("取消", -1)
1361
- ])),
1362
- _: 1,
1363
- __: [0]
1353
+ default: s(() => [...d[0] || (d[0] = [
1354
+ Y("取消", -1)
1355
+ ])]),
1356
+ _: 1
1364
1357
  }, 8, ["loading"])
1365
1358
  ]),
1366
1359
  _: 3
@@ -1370,26 +1363,161 @@ const Be = (t) => {
1370
1363
  }, 16, ["show", "style"]);
1371
1364
  };
1372
1365
  }
1373
- }), ka = te(wa), Ca = te(Ie), Pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1366
+ }), Oa = W($a), Ea = W(He), Ma = A({
1367
+ name: "Redirect",
1368
+ setup() {
1369
+ const t = le(), r = ne();
1370
+ return kt(() => {
1371
+ const { params: c, query: h } = t, { path: p } = c;
1372
+ r.replace({
1373
+ path: "/" + (Array.isArray(p) ? p.join("/") : p),
1374
+ query: h
1375
+ });
1376
+ }), () => /* @__PURE__ */ React.createElement(gt, null);
1377
+ }
1378
+ }), Ra = W(Ma), Na = { class: "frame" }, Da = ["src"], Aa = /* @__PURE__ */ A({
1379
+ __name: "PIframe",
1380
+ setup(t) {
1381
+ const r = le(), c = O(!1), h = O(null), p = O("");
1382
+ a(r.meta)?.frameSrc && (p.value = a(r.meta)?.frameSrc);
1383
+ function u() {
1384
+ c.value = !1;
1385
+ }
1386
+ function x() {
1387
+ oe(() => {
1388
+ const w = a(h);
1389
+ if (!w) return;
1390
+ const m = w;
1391
+ m.attachEvent ? m.attachEvent("onload", () => {
1392
+ u();
1393
+ }) : w.onload = () => {
1394
+ u();
1395
+ };
1396
+ });
1397
+ }
1398
+ return X(() => {
1399
+ c.value = !0, x();
1400
+ }), (w, m) => {
1401
+ const T = ht;
1402
+ return b(), $(T, { show: c.value }, {
1403
+ default: s(() => [
1404
+ y("div", Na, [
1405
+ y("iframe", {
1406
+ src: p.value,
1407
+ class: "frame-iframe",
1408
+ ref_key: "frameRef",
1409
+ ref: h
1410
+ }, null, 8, Da)
1411
+ ])
1412
+ ]),
1413
+ _: 1
1414
+ }, 8, ["show"]);
1415
+ };
1416
+ }
1417
+ }), Ia = /* @__PURE__ */ H(Aa, [["__scopeId", "data-v-161a378e"]]), za = W(Ia), Ba = {}, Wa = { class: "flex flex-col justify-center page-container" };
1418
+ function Ha(t, r) {
1419
+ const c = ke;
1420
+ return b(), N("div", Wa, [
1421
+ i(c, {
1422
+ status: "500",
1423
+ title: "服务器错误",
1424
+ description: "抱歉,服务器出错了"
1425
+ })
1426
+ ]);
1427
+ }
1428
+ const ja = /* @__PURE__ */ H(Ba, [["render", Ha], ["__scopeId", "data-v-4586b61a"]]), Ua = {}, Fa = { class: "flex flex-col justify-center page-container" };
1429
+ function qa(t, r) {
1430
+ const c = ke;
1431
+ return b(), N("div", Fa, [
1432
+ i(c, {
1433
+ status: "404",
1434
+ title: "资源不存在",
1435
+ description: "抱歉,你访问的页面不存在"
1436
+ })
1437
+ ]);
1438
+ }
1439
+ const Va = /* @__PURE__ */ H(Ua, [["render", qa], ["__scopeId", "data-v-52d560c4"]]), Ka = {}, Ya = { class: "flex flex-col justify-center page-container" };
1440
+ function Xa(t, r) {
1441
+ const c = ke;
1442
+ return b(), N("div", Ya, [
1443
+ i(c, {
1444
+ status: "403",
1445
+ title: "禁止访问",
1446
+ description: "抱歉,你无权访问该页面"
1447
+ })
1448
+ ]);
1449
+ }
1450
+ const Ga = /* @__PURE__ */ H(Ka, [["render", Xa], ["__scopeId", "data-v-3a660eda"]]), Ja = W(ja), Za = W(Va), Qa = W(Ga), eo = Se("oidc", () => {
1451
+ const t = Ce({
1452
+ callback: void 0
1453
+ });
1454
+ return {
1455
+ setCallback: (u) => {
1456
+ t.callback = u;
1457
+ },
1458
+ callCallback: async () => {
1459
+ t.callback && await t.callback();
1460
+ },
1461
+ setError: (u) => {
1462
+ t.error = u;
1463
+ },
1464
+ callError: (u, x) => {
1465
+ t.error && t.error(u, x);
1466
+ }
1467
+ };
1468
+ }), to = { class: "view-auth-callback" }, ao = /* @__PURE__ */ A({
1469
+ __name: "POidc",
1470
+ setup(t) {
1471
+ const r = ne(), { callCallback: c, callError: h } = eo();
1472
+ return X(async () => {
1473
+ try {
1474
+ c();
1475
+ } catch (p) {
1476
+ console.error("OIDC回调处理失败:", p), h(r, p);
1477
+ }
1478
+ }), (p, u) => (b(), N("div", to, [...u[0] || (u[0] = [
1479
+ y("div", { class: "view-auth-callback-content" }, [
1480
+ y("div", { class: "view-auth-callback-spinner" }, [
1481
+ y("span", null, "正在处理登录回调...")
1482
+ ])
1483
+ ], -1)
1484
+ ])]));
1485
+ }
1486
+ }), oo = /* @__PURE__ */ H(ao, [["__scopeId", "data-v-71eae482"]]), no = W(oo), lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1374
1487
  __proto__: null,
1375
- PApplication: ya,
1376
- PLanguage: Ca,
1377
- PLayout: _a,
1378
- PModal: ka,
1379
- PTable: Wt
1380
- }, Symbol.toStringTag, { value: "Module" })), Sa = (t, d) => (Object.values(Pa).forEach((h) => {
1381
- h.install && t.use(h);
1382
- }), d?.(), t), Ra = {
1383
- install: Sa
1488
+ P403: Qa,
1489
+ P404: Za,
1490
+ P500: Ja,
1491
+ PApplication: Ta,
1492
+ PEmptyLayout: xa,
1493
+ PIframe: za,
1494
+ PLanguage: Ea,
1495
+ PLayout: Sa,
1496
+ PModal: Oa,
1497
+ POidc: no,
1498
+ PRedirect: Ra,
1499
+ PTable: Ft
1500
+ }, Symbol.toStringTag, { value: "Module" })), so = (t, r) => (Object.values(lo).forEach((c) => {
1501
+ c.install && t.use(c);
1502
+ }), r?.(), t), mo = {
1503
+ install: so
1384
1504
  };
1385
1505
  export {
1386
- ya as PApplication,
1387
- Ca as PLanguage,
1388
- _a as PLayout,
1389
- ka as PModal,
1390
- Wt as PTable,
1391
- Ra as default,
1392
- Sa as install,
1393
- Vt as usePLanguageStore,
1394
- ae as usePLayoutStore
1506
+ Qa as P403,
1507
+ Za as P404,
1508
+ Ja as P500,
1509
+ Ta as PApplication,
1510
+ xa as PEmptyLayout,
1511
+ za as PIframe,
1512
+ Ea as PLanguage,
1513
+ Sa as PLayout,
1514
+ Oa as PModal,
1515
+ no as POidc,
1516
+ Ra as PRedirect,
1517
+ Ft as PTable,
1518
+ mo as default,
1519
+ so as install,
1520
+ Gt as useLanguageStore,
1521
+ se as useLayoutStore,
1522
+ eo as useOidcStore
1395
1523
  };