@chewel611/naive-ui-plus 0.0.40 → 0.0.42

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