@chewel611/naive-ui-plus 0.0.29 → 0.0.31

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