@chewel611/naive-ui-plus 0.0.50 → 0.0.52

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