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