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