@chewel611/naive-ui-plus 0.0.25 → 0.0.27

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