@chewel611/naive-ui-plus 0.0.43 → 0.0.44

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