@chewel611/naive-ui-plus 0.0.49 → 0.0.51

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