@chewel611/naive-ui-plus 0.0.23 → 0.0.25

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