@chewel611/naive-ui-plus 0.0.1 → 0.0.3

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,5 +1,5 @@
1
- import { useDialog as xe, useMessage as ne, NCard as Ue, NDataTable as qe, NModal as $e, NSpace as Oe, NButton as V, NTooltip as Me, NIcon as D, NDropdown as X, NAvatar as Ne, NBreadcrumb as Ve, NBreadcrumbItem as je, NDivider as Ke, useThemeVars as Ye, NMenu as Xe, NLayout as Pe, NLayoutSider as Ge, NFlex as Je, NLayoutHeader as Ze, NLayoutContent as Qe, NBackTop as et, NConfigProvider as tt, dateZhCN as ot, zhCN as at, NDialogProvider as lt, NNotificationProvider as nt, NMessageProvider as st } from "naive-ui";
2
- import { defineComponent as F, ref as M, computed as H, unref as t, onMounted as ee, createBlock as N, openBlock as y, withCtx as l, createElementVNode as b, createElementBlock as I, createCommentVNode as W, createVNode as n, renderSlot as Y, normalizeStyle as he, createTextVNode as K, h as B, toRaw as Se, reactive as Ee, withDirectives as rt, normalizeClass as Q, toDisplayString as q, vShow as it, inject as Re, Fragment as Le, renderList as ct, resolveDynamicComponent as me, withModifiers as ve, resolveComponent as dt, KeepAlive as ut, useCssVars as ft, watch as De, nextTick as _e, provide as pt, mergeProps as gt, createSlots as ht } from "vue";
1
+ import { useDialog as xe, useMessage as se, NCard as Fe, NDataTable as qe, NModal as $e, NSpace as Oe, NButton as V, NTooltip as Me, NIcon as D, NDropdown as X, NAvatar as Ne, NBreadcrumb as Ve, NBreadcrumbItem as je, NDivider as Ke, useThemeVars as Ye, NMenu as Xe, NLayout as Pe, NLayoutSider as Ge, NFlex as Je, NLayoutHeader as Ze, NLayoutContent as Qe, NBackTop as et, NConfigProvider as tt, dateZhCN as at, zhCN as ot, NDialogProvider as lt, NNotificationProvider as nt, NMessageProvider as st } from "naive-ui";
2
+ import { defineComponent as H, ref as M, computed as U, unref as t, onMounted as ee, createBlock as N, openBlock as w, withCtx as l, createElementVNode as y, createElementBlock as I, createCommentVNode as W, createVNode as n, renderSlot as Y, normalizeStyle as me, createTextVNode as K, h as B, toRaw as Se, reactive as Ee, withDirectives as it, normalizeClass as Q, toDisplayString as q, vShow as rt, nextTick as ne, inject as Re, Fragment as Le, renderList as ct, resolveDynamicComponent as ve, withModifiers as _e, resolveComponent as dt, KeepAlive as ut, useCssVars as ft, watch as De, provide as pt, mergeProps as gt, createSlots as ht } from "vue";
3
3
  import { PlusSquareOutlined as mt, DeleteOutlined as vt, ReloadOutlined as be, MoreOutlined as _t, MenuUnfoldOutlined as bt, MenuFoldOutlined as yt, FullscreenOutlined as wt, FullscreenExitOutlined as kt, CloseOutlined as Te, ColumnWidthOutlined as Ct, MinusOutlined as Pt, LeftOutlined as St, RightOutlined as Lt, DownOutlined as Tt } from "@vicons/antd";
4
4
  import { defineStore as ze } from "pinia";
5
5
  import { useRouter as ye, useRoute as we } from "vue-router";
@@ -8,7 +8,7 @@ import $t from "vuedraggable";
8
8
  const Ot = { id: "data-content" }, Mt = {
9
9
  key: 0,
10
10
  class: "rounded-lg bg-gray-50 flex flex-row gap-2 items-center justify-end p-5 mb-5"
11
- }, Nt = { key: 1 }, Et = { key: 2 }, Rt = /* @__PURE__ */ F({
11
+ }, Nt = { key: 1 }, Et = { key: 2 }, Rt = /* @__PURE__ */ H({
12
12
  __name: "PTable",
13
13
  props: {
14
14
  idField: { default: "id" },
@@ -25,27 +25,27 @@ const Ot = { id: "data-content" }, Mt = {
25
25
  onSave: {},
26
26
  onDelete: {}
27
27
  },
28
- setup(a, { expose: d }) {
29
- const w = M(null), v = xe(), T = ne(), h = M(!1), k = M([]), C = M([]), $ = M(null), O = M(!1), f = M(!1), P = M(!1), o = M({
28
+ setup(o, { expose: u }) {
29
+ const _ = M(null), v = xe(), T = se(), h = M(!1), k = M([]), C = M([]), $ = M(null), O = M(!1), f = M(!1), P = M(!1), a = M({
30
30
  page: 1,
31
31
  itemCount: 0,
32
32
  pageSize: 10,
33
33
  pageSizes: [10, 20, 30, 50],
34
34
  showSizePicker: !0,
35
35
  onChange: async (s) => {
36
- o.value.page = s, await U();
36
+ a.value.page = s, await F();
37
37
  },
38
38
  onUpdatePageSize: async (s) => {
39
- o.value.pageSize = s, await U();
39
+ a.value.pageSize = s, await F();
40
40
  }
41
- }), i = a, p = (s) => {
42
- const u = (L) => {
41
+ }), r = o, p = (s) => {
42
+ const d = (S) => {
43
43
  const R = [];
44
44
  return s && s.forEach((e) => {
45
45
  e.key !== "edit" && e.key !== "delete" && R.push({
46
46
  label: e.name,
47
47
  key: e.key,
48
- props: { onClick: () => e.action(L) }
48
+ props: { onClick: () => e.action(S) }
49
49
  });
50
50
  }), R;
51
51
  };
@@ -53,18 +53,18 @@ const Ot = { id: "data-content" }, Mt = {
53
53
  title: "操作",
54
54
  key: "actions",
55
55
  width: 100,
56
- fixed: "left",
57
- render: (L) => {
56
+ fixed: "right",
57
+ render: (S) => {
58
58
  let R = [];
59
- if (i.hiddenEdit || R.push({
59
+ if (r.hiddenEdit || R.push({
60
60
  label: "编辑",
61
61
  key: "edit",
62
- props: { onClick: () => G(L) }
63
- }), i.hiddenDelete || R.push({
62
+ props: { onClick: () => G(S) }
63
+ }), r.hiddenDelete || R.push({
64
64
  label: "删除",
65
65
  key: "delete",
66
- props: { onClick: () => _(L) }
67
- }), R = [...R, ...u(L)], !(R.length <= 0))
66
+ props: { onClick: () => b(S) }
67
+ }), R = [...R, ...d(S)], !(R.length <= 0))
68
68
  return B(
69
69
  X,
70
70
  {
@@ -81,25 +81,26 @@ const Ot = { id: "data-content" }, Mt = {
81
81
  );
82
82
  }
83
83
  };
84
- }, m = H(() => {
85
- const s = i.columns.filter((L) => L.key != "action").map((L) => ({
86
- title: L.title,
87
- key: L.key,
88
- width: L.width,
89
- render: L.render,
90
- ellipsis: L.ellipsis ? { tooltip: !0 } : !1
91
- })), u = i.columns.reduce(
92
- (L, R) => R.key === "action" ? R : L,
84
+ }, m = U(() => {
85
+ const s = r.columns.filter((S) => S.key != "action").map((S) => ({
86
+ title: S.title,
87
+ key: S.key,
88
+ width: S.width,
89
+ fixed: S.fixed ?? !1,
90
+ render: S.render,
91
+ ellipsis: S.ellipsis ? { tooltip: !0 } : !1
92
+ })), d = r.columns.reduce(
93
+ (S, R) => R.key === "action" ? R : S,
93
94
  void 0
94
95
  )?.action;
95
- return u && u?.length > 0 || !i.hiddenDelete || !i.hiddenEdit ? [
96
+ return d && d?.length > 0 || !r.hiddenDelete || !r.hiddenEdit ? [
96
97
  { type: "selection", fixed: "left" },
97
98
  ...s,
98
- p(u)
99
+ p(d)
99
100
  ] : [{ type: "selection", fixed: "left" }, ...s];
100
101
  }), g = async () => {
101
- await U();
102
- }, _ = (s) => {
102
+ await F();
103
+ }, b = (s) => {
103
104
  E([s]);
104
105
  }, z = () => {
105
106
  const s = J();
@@ -111,60 +112,60 @@ const Ot = { id: "data-content" }, Mt = {
111
112
  positiveText: "确定",
112
113
  negativeText: "取消",
113
114
  onPositiveClick: async () => {
114
- if (i.onDelete)
115
+ if (r.onDelete)
115
116
  try {
116
- await i.onDelete(s) ? (U(), T.success("删除成功")) : T.error("删除失败");
117
- } catch (u) {
118
- console.error(u), T.error("删除异常,详情F12请查看控制台日志");
117
+ await r.onDelete(s) ? (F(), T.success("删除成功")) : T.error("删除失败");
118
+ } catch (d) {
119
+ T.error(d.message);
119
120
  }
120
121
  }
121
122
  });
122
- }, S = () => {
123
- if (i.onOpenModal) {
124
- i.onOpenModal();
123
+ }, L = () => {
124
+ if (r.onOpenModal) {
125
+ r.onOpenModal();
125
126
  return;
126
127
  }
127
128
  f.value = !1, O.value = !0;
128
129
  }, G = async (s) => {
129
- if (i.onOpenModal) {
130
- i.onOpenModal(s);
130
+ if (r.onOpenModal) {
131
+ r.onOpenModal(s);
131
132
  return;
132
133
  }
133
- i.onGet && (s = await i.onGet(s[i.idField])), $.value = s, Object.assign(i.item, s), O.value = !1, f.value = !0;
134
- }, ae = async () => {
135
- if (i.onSave)
134
+ r.onGet && (s = await r.onGet(s[r.idField])), $.value = s, Object.assign(r.item, s), O.value = !1, f.value = !0;
135
+ }, oe = async () => {
136
+ if (r.onSave)
136
137
  try {
137
- P.value = !0, (O.value ? await i.onSave() : await i.onSave($.value[i.idField])) && (j(), await U());
138
+ P.value = !0, (O.value ? await r.onSave() : await r.onSave($.value[r.idField])) && (j(), await F());
138
139
  } catch (s) {
139
- console.error(s), T.error("操作失败, 详情F12请查看控制台日志");
140
+ T.error(s.message);
140
141
  } finally {
141
142
  P.value = !1;
142
143
  }
143
144
  }, j = () => {
144
- i.onCloseModal && i.onCloseModal(), Object.keys(i.item).forEach((s) => i.item[s] = void 0), $.value = null, O.value = !1, f.value = !1;
145
- }, J = () => k.value ? C.value.filter((u) => k.value.includes(u.id)).map((u) => Se(u)) : [], re = () => J()[0], le = () => Se(C.value), U = async () => {
145
+ r.onCloseModal && r.onCloseModal(), Object.keys(r.item).forEach((s) => r.item[s] = void 0), $.value = null, O.value = !1, f.value = !1;
146
+ }, J = () => k.value ? C.value.filter((d) => k.value.includes(d.id)).map((d) => Se(d)) : [], re = () => J()[0], le = () => Se(C.value), F = async () => {
146
147
  if (!h.value) {
147
148
  h.value = !0;
148
149
  try {
149
- if (i.onLoad) {
150
- var { data: s, total: u } = await i.onLoad(
151
- o.value.page,
152
- o.value.pageSize
150
+ if (r.onLoad) {
151
+ var { data: s, total: d } = await r.onLoad(
152
+ a.value.page,
153
+ a.value.pageSize
153
154
  );
154
- C.value = s, o.value.itemCount = u;
155
+ C.value = s, a.value.itemCount = d;
155
156
  }
156
- } catch (L) {
157
- console.error(L), T.error("获取数据失败, 详情F12请查看控制台日志");
157
+ } catch (S) {
158
+ T.error(S.message);
158
159
  } finally {
159
160
  h.value = !1;
160
161
  }
161
162
  }
162
- }, ie = H(() => {
163
- const s = t(w);
163
+ }, ce = U(() => {
164
+ const s = t(_);
164
165
  if (!s) return;
165
- const u = s?.$el, L = u.querySelector(".n-data-table-thead "), { bottomIncludeBody: R } = de(L), e = 64;
166
- let c = 2, r = 24;
167
- const x = u.querySelector(
166
+ const d = s?.$el, S = d.querySelector(".n-data-table-thead "), { bottomIncludeBody: R } = ue(S), e = 64;
167
+ let c = 2, i = 24;
168
+ const x = d.querySelector(
168
169
  ".n-data-table__pagination"
169
170
  );
170
171
  if (x) {
@@ -172,43 +173,43 @@ const Ot = { id: "data-content" }, Mt = {
172
173
  c += Z || 0;
173
174
  } else
174
175
  c += 28;
175
- let A = R - (e + c + r);
176
+ let A = R - (e + c + i);
176
177
  return console.log("height", A), A;
177
- }), ce = (s) => !s || !s.getBoundingClientRect ? 0 : s.getBoundingClientRect(), de = (s) => {
178
- const u = document.documentElement, L = u.scrollLeft, R = u.scrollTop, e = u.clientLeft, c = u.clientTop, r = window.pageXOffset, x = window.pageYOffset, A = ce(s), {
178
+ }), de = (s) => !s || !s.getBoundingClientRect ? 0 : s.getBoundingClientRect(), ue = (s) => {
179
+ const d = document.documentElement, S = d.scrollLeft, R = d.scrollTop, e = d.clientLeft, c = d.clientTop, i = window.pageXOffset, x = window.pageYOffset, A = de(s), {
179
180
  left: Z,
180
- top: ue,
181
- width: fe,
181
+ top: fe,
182
+ width: pe,
182
183
  height: Be
183
- } = A, We = (r || L) - (e || 0), Ie = (x || R) - (c || 0), Fe = Z + r, He = ue + x, pe = Fe - We, ge = He - Ie, ke = window.document.documentElement.clientWidth, Ce = window.document.documentElement.clientHeight;
184
+ } = A, We = (i || S) - (e || 0), Ie = (x || R) - (c || 0), He = Z + i, Ue = fe + x, ge = He - We, he = Ue - Ie, ke = window.document.documentElement.clientWidth, Ce = window.document.documentElement.clientHeight;
184
185
  return {
185
- left: pe,
186
- top: ge,
187
- right: ke - fe - pe,
188
- bottom: Ce - Be - ge,
189
- rightIncludeBody: ke - pe,
190
- bottomIncludeBody: Ce - ge
186
+ left: ge,
187
+ top: he,
188
+ right: ke - pe - ge,
189
+ bottom: Ce - Be - he,
190
+ rightIncludeBody: ke - ge,
191
+ bottomIncludeBody: Ce - he
191
192
  };
192
193
  };
193
- return ee(async () => await g()), d({
194
+ return ee(async () => await g()), u({
194
195
  getData: le,
195
196
  getSelectedRow: re,
196
197
  getSelectedRows: J,
197
198
  closeModal: j,
198
- refreshData: U,
199
+ refreshData: F,
199
200
  resetPage: () => {
200
- o.value.page = 1;
201
+ a.value.page = 1;
201
202
  }
202
- }), (s, u) => {
203
- const L = Me, R = qe, e = Oe, c = $e;
204
- return y(), N(t(Ue), {
203
+ }), (s, d) => {
204
+ const S = Me, R = qe, e = Oe, c = $e;
205
+ return w(), N(t(Fe), {
205
206
  title: " ",
206
207
  "header-class": "p-4",
207
208
  "content-class": "pl-4 pr-4",
208
209
  bordered: !1
209
210
  }, {
210
211
  "header-extra": l(() => [
211
- s.hiddenAdd ? W("", !0) : (y(), N(L, {
212
+ s.hiddenAdd ? W("", !0) : (w(), N(S, {
212
213
  key: 0,
213
214
  trigger: "hover"
214
215
  }, {
@@ -216,7 +217,7 @@ const Ot = { id: "data-content" }, Mt = {
216
217
  n(t(D), {
217
218
  size: "18",
218
219
  class: "mr-1 cursor-pointer hover:text-blue-600",
219
- onClick: S
220
+ onClick: L
220
221
  }, {
221
222
  default: l(() => [
222
223
  n(t(mt))
@@ -225,12 +226,12 @@ const Ot = { id: "data-content" }, Mt = {
225
226
  })
226
227
  ]),
227
228
  default: l(() => [
228
- u[3] || (u[3] = b("span", null, "新增", -1))
229
+ d[3] || (d[3] = y("span", null, "新增", -1))
229
230
  ]),
230
231
  _: 1,
231
232
  __: [3]
232
233
  })),
233
- s.hiddenDelete ? W("", !0) : (y(), N(L, {
234
+ s.hiddenDelete ? W("", !0) : (w(), N(S, {
234
235
  key: 1,
235
236
  trigger: "hover"
236
237
  }, {
@@ -247,12 +248,12 @@ const Ot = { id: "data-content" }, Mt = {
247
248
  })
248
249
  ]),
249
250
  default: l(() => [
250
- u[4] || (u[4] = b("span", null, "删除", -1))
251
+ d[4] || (d[4] = y("span", null, "删除", -1))
251
252
  ]),
252
253
  _: 1,
253
254
  __: [4]
254
255
  })),
255
- n(L, { trigger: "hover" }, {
256
+ n(S, { trigger: "hover" }, {
256
257
  trigger: l(() => [
257
258
  n(t(D), {
258
259
  size: "18",
@@ -266,42 +267,42 @@ const Ot = { id: "data-content" }, Mt = {
266
267
  })
267
268
  ]),
268
269
  default: l(() => [
269
- u[5] || (u[5] = b("span", null, "刷新", -1))
270
+ d[5] || (d[5] = y("span", null, "刷新", -1))
270
271
  ]),
271
272
  _: 1,
272
273
  __: [5]
273
274
  })
274
275
  ]),
275
276
  default: l(() => [
276
- b("div", Ot, [
277
- s.$slots.toolbar ? (y(), I("div", Mt, [
277
+ y("div", Ot, [
278
+ s.$slots.toolbar ? (w(), I("div", Mt, [
278
279
  Y(s.$slots, "toolbar")
279
280
  ])) : W("", !0),
280
281
  n(R, {
281
282
  remote: "",
282
283
  ref_key: "$table",
283
- ref: w,
284
+ ref: _,
284
285
  "checked-row-keys": k.value,
285
- "onUpdate:checkedRowKeys": u[0] || (u[0] = (r) => k.value = r),
286
- "max-height": ie.value,
286
+ "onUpdate:checkedRowKeys": d[0] || (d[0] = (i) => k.value = i),
287
+ "max-height": ce.value,
287
288
  loading: h.value,
288
289
  bordered: !1,
289
290
  "single-line": !1,
290
291
  columns: m.value,
291
292
  data: C.value,
292
- pagination: o.value,
293
- "row-key": (r) => r[s.idField]
293
+ pagination: a.value,
294
+ "row-key": (i) => i[s.idField]
294
295
  }, null, 8, ["checked-row-keys", "max-height", "loading", "columns", "data", "pagination", "row-key"]),
295
- s.$slots.addModal ? (y(), I("div", Nt, [
296
+ s.$slots.addModal ? (w(), I("div", Nt, [
296
297
  n(c, {
297
298
  title: "新增",
298
299
  preset: "dialog",
299
300
  show: O.value,
300
- "onUpdate:show": u[1] || (u[1] = (r) => O.value = r),
301
+ "onUpdate:show": d[1] || (d[1] = (i) => O.value = i),
301
302
  closable: !1,
302
303
  "close-on-esc": !1,
303
304
  "mask-closable": !1,
304
- style: he({ width: `${s.modalWidth}px` })
305
+ style: me({ width: `${s.modalWidth}px` })
305
306
  }, {
306
307
  action: l(() => [
307
308
  n(e, null, {
@@ -309,16 +310,16 @@ const Ot = { id: "data-content" }, Mt = {
309
310
  n(t(V), {
310
311
  type: "primary",
311
312
  loading: P.value,
312
- onClick: ae
313
+ onClick: oe
313
314
  }, {
314
- default: l(() => u[6] || (u[6] = [
315
+ default: l(() => d[6] || (d[6] = [
315
316
  K("保存", -1)
316
317
  ])),
317
318
  _: 1,
318
319
  __: [6]
319
320
  }, 8, ["loading"]),
320
321
  n(t(V), { onClick: j }, {
321
- default: l(() => u[7] || (u[7] = [
322
+ default: l(() => d[7] || (d[7] = [
322
323
  K("取消", -1)
323
324
  ])),
324
325
  _: 1,
@@ -334,16 +335,16 @@ const Ot = { id: "data-content" }, Mt = {
334
335
  _: 3
335
336
  }, 8, ["show", "style"])
336
337
  ])) : W("", !0),
337
- s.$slots.editModal ? (y(), I("div", Et, [
338
+ s.$slots.editModal ? (w(), I("div", Et, [
338
339
  n(c, {
339
340
  title: "编辑",
340
341
  show: f.value,
341
- "onUpdate:show": u[2] || (u[2] = (r) => f.value = r),
342
+ "onUpdate:show": d[2] || (d[2] = (i) => f.value = i),
342
343
  preset: "dialog",
343
344
  closable: !1,
344
345
  "close-on-esc": !1,
345
346
  "mask-closable": !1,
346
- style: he({ width: `${s.modalWidth}px` })
347
+ style: me({ width: `${s.modalWidth}px` })
347
348
  }, {
348
349
  action: l(() => [
349
350
  n(e, null, {
@@ -351,16 +352,16 @@ const Ot = { id: "data-content" }, Mt = {
351
352
  n(t(V), {
352
353
  type: "primary",
353
354
  loading: P.value,
354
- onClick: ae
355
+ onClick: oe
355
356
  }, {
356
- default: l(() => u[8] || (u[8] = [
357
+ default: l(() => d[8] || (d[8] = [
357
358
  K("保存", -1)
358
359
  ])),
359
360
  _: 1,
360
361
  __: [8]
361
362
  }, 8, ["loading"]),
362
363
  n(t(V), { onClick: j }, {
363
- default: l(() => u[9] || (u[9] = [
364
+ default: l(() => d[9] || (d[9] = [
364
365
  K("取消", -1)
365
366
  ])),
366
367
  _: 1,
@@ -382,13 +383,13 @@ const Ot = { id: "data-content" }, Mt = {
382
383
  });
383
384
  };
384
385
  }
385
- }), te = (a) => {
386
- const d = a;
387
- return d.install = function(w) {
388
- w.component(d.__name, a);
389
- }, a;
390
- }, Dt = te(Rt), zt = ["Redirect", "RedirectSon", "login"], oe = ze("p-layout", () => {
391
- const a = Ee({
386
+ }), te = (o) => {
387
+ const u = o;
388
+ return u.install = function(_) {
389
+ _.component(u.__name, o);
390
+ }, o;
391
+ }, Dt = te(Rt), zt = ["Redirect", "RedirectSon", "login"], ae = ze("p-layout", () => {
392
+ const o = Ee({
392
393
  collapsed: !1,
393
394
  title: "输入项目名称",
394
395
  logo: "https://picsum.photos/id/1/100/100",
@@ -399,123 +400,123 @@ const Ot = { id: "data-content" }, Mt = {
399
400
  cacheTabs: !1
400
401
  });
401
402
  return {
402
- state: a,
403
+ state: o,
403
404
  initTabs: (p) => {
404
- p.sort((m, g) => (g.meta.affix ? 1 : 0) - (m.meta.affix ? 1 : 0)), a.tabs = p;
405
+ p.sort((m, g) => (g.meta.affix ? 1 : 0) - (m.meta.affix ? 1 : 0)), o.tabs = p;
405
406
  },
406
- addTab: (p) => zt.includes(p.name) ? !1 : (a.tabs?.some(
407
+ addTab: (p) => zt.includes(p.name) ? !1 : (o.tabs?.some(
407
408
  (g) => g.fullPath == p.fullPath
408
- ) || a.tabs?.push(p), !0),
409
+ ) || o.tabs?.push(p), !0),
409
410
  closeCurrentTab: (p) => {
410
- const m = a.tabs.findIndex(
411
+ const m = o.tabs.findIndex(
411
412
  (g) => g.fullPath == p.fullPath
412
413
  );
413
- a.tabs.splice(m, 1);
414
+ o.tabs.splice(m, 1);
414
415
  },
415
416
  closeAllTabs: () => {
416
- a.tabs = a.tabs.filter((p) => p?.meta?.affix ?? !1);
417
+ o.tabs = o.tabs.filter((p) => p?.meta?.affix ?? !1);
417
418
  },
418
419
  closeOtherTabs: (p) => {
419
- a.tabs = a.tabs.filter(
420
+ o.tabs = o.tabs.filter(
420
421
  (m) => m.fullPath == p.fullPath || (m?.meta?.affix ?? !1)
421
422
  );
422
423
  },
423
424
  closeLeftTabs: (p) => {
424
- const m = a.tabs.findIndex(
425
+ const m = o.tabs.findIndex(
425
426
  (g) => g.fullPath == p.fullPath
426
427
  );
427
- a.tabs = a.tabs.filter(
428
- (g, _) => _ >= m || (g?.meta?.affix ?? !1)
428
+ o.tabs = o.tabs.filter(
429
+ (g, b) => b >= m || (g?.meta?.affix ?? !1)
429
430
  );
430
431
  },
431
432
  closeRightTabs: (p) => {
432
- const m = a.tabs.findIndex(
433
+ const m = o.tabs.findIndex(
433
434
  (g) => g.fullPath == p.fullPath
434
435
  );
435
- a.tabs = a.tabs.filter(
436
- (g, _) => _ <= m || (g?.meta?.affix ?? !1)
436
+ o.tabs = o.tabs.filter(
437
+ (g, b) => b <= m || (g?.meta?.affix ?? !1)
437
438
  );
438
439
  },
439
440
  collapse: () => {
440
- a.collapsed = !a.collapsed;
441
+ o.collapsed = !o.collapsed;
441
442
  },
442
443
  setTitle: (p) => {
443
- a.title = p;
444
+ o.title = p;
444
445
  },
445
446
  setLogo: (p) => {
446
- a.logo = p;
447
+ o.logo = p;
447
448
  },
448
449
  setUser: (p, m) => {
449
- a.uid = p, a.uname = m;
450
+ o.uid = p, o.uname = m;
450
451
  },
451
452
  setSettingPages: (p) => {
452
- a.settingPages = p;
453
+ o.settingPages = p;
453
454
  },
454
455
  setLogout: (p) => {
455
- a.logout = p;
456
+ o.logout = p;
456
457
  }
457
458
  };
458
- }), At = { class: "logo" }, Bt = /* @__PURE__ */ F({
459
+ }), At = { class: "logo" }, Bt = /* @__PURE__ */ H({
459
460
  __name: "PLogo",
460
- setup(a) {
461
- const d = oe();
462
- return (w, v) => (y(), I("div", At, [
461
+ setup(o) {
462
+ const u = ae();
463
+ return (_, v) => (w(), I("div", At, [
463
464
  n(t(Ne), {
464
465
  color: "var(--color-logo)",
465
466
  size: 32,
466
- src: t(d).state.logo,
467
- class: Q({ "mr-2": !t(d).state.collapsed })
467
+ src: t(u).state.logo,
468
+ class: Q({ "mr-2": !t(u).state.collapsed })
468
469
  }, null, 8, ["src", "class"]),
469
- rt(b("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, q(t(d).state.title), 513), [
470
- [it, !t(d).state.collapsed]
470
+ it(y("h1", { class: "font-bold ease-in-out ml-2 logo-size" }, q(t(u).state.title), 513), [
471
+ [rt, !t(u).state.collapsed]
471
472
  ])
472
473
  ]));
473
474
  }
474
- }), se = (a, d) => {
475
- const w = a.__vccOpts || a;
476
- for (const [v, T] of d)
477
- w[v] = T;
478
- return w;
479
- }, Wt = /* @__PURE__ */ se(Bt, [["__scopeId", "data-v-c9496d2e"]]), It = {
475
+ }), ie = (o, u) => {
476
+ const _ = o.__vccOpts || o;
477
+ for (const [v, T] of u)
478
+ _[v] = T;
479
+ return _;
480
+ }, Wt = /* @__PURE__ */ ie(Bt, [["__scopeId", "data-v-c9496d2e"]]), It = {
480
481
  translationApiUrl: "https://translate.zvo.cn/api",
481
482
  defaultLanguage: "chinese",
482
483
  currentLanguage: "",
483
484
  options: [],
484
- selectCallback: (a) => {
485
+ selectCallback: (o) => {
485
486
  },
486
- initLanguage: (a) => {
487
+ initLanguage: (o) => {
487
488
  }
488
- }, Ft = ze("language", () => {
489
- const a = M(It), d = (f) => {
489
+ }, Ht = ze("language", () => {
490
+ const o = M(It), u = (f) => {
490
491
  f.forEach((P) => {
491
492
  (P.key === "Chinese" || P.key === "chinese") && (P.key = "chinese_simplified");
492
- }), a.value.options = [...f];
493
- }, w = () => a.value.options, v = (f) => {
494
- if (a.value.currentLanguage === f)
493
+ }), o.value.options = [...f];
494
+ }, _ = () => o.value.options, v = (f) => {
495
+ if (o.value.currentLanguage === f)
495
496
  return;
496
- const P = a.value.options.find(
497
- (o) => o.key === f
497
+ const P = o.value.options.find(
498
+ (a) => a.key === f
498
499
  );
499
- P && (a.value.currentLanguage = P.key, a.value.selectCallback(P));
500
+ P && (o.value.currentLanguage = P.key, o.value.selectCallback(P));
500
501
  }, T = () => {
501
- if (a.value.currentLanguage)
502
- return a.value.options.find(
503
- (f) => f.key === a.value.currentLanguage
502
+ if (o.value.currentLanguage)
503
+ return o.value.options.find(
504
+ (f) => f.key === o.value.currentLanguage
504
505
  );
505
506
  }, h = (f) => {
506
- a.value.selectCallback = f;
507
- }, k = () => a.value.translationApiUrl, C = (f) => {
508
- a.value.translationApiUrl = f;
507
+ o.value.selectCallback = f;
508
+ }, k = () => o.value.translationApiUrl, C = (f) => {
509
+ o.value.translationApiUrl = f;
509
510
  }, $ = (f) => {
510
- (f === "Chinese" || f === "chinese") && (f = "chinese_simplified"), a.value.defaultLanguage = f;
511
- }, O = () => a.value.defaultLanguage ? a.value.defaultLanguage : "chinese_simplified";
511
+ (f === "Chinese" || f === "chinese") && (f = "chinese_simplified"), o.value.defaultLanguage = f;
512
+ }, O = () => o.value.defaultLanguage ? o.value.defaultLanguage : "chinese_simplified";
512
513
  return ee(() => {
513
- a.value.initLanguage(a.value);
514
+ o.value.initLanguage(o.value);
514
515
  }), {
515
- state: a,
516
+ state: o,
516
517
  select: v,
517
- setLanguages: d,
518
- getLanguages: w,
518
+ setLanguages: u,
519
+ getLanguages: _,
519
520
  getCurrentLanguage: T,
520
521
  setSelectCallback: h,
521
522
  setTranslationApiUrl: C,
@@ -523,30 +524,28 @@ const Ot = { id: "data-content" }, Mt = {
523
524
  setDefaultLanguage: $,
524
525
  getDefaultLanguage: O
525
526
  };
526
- }), Ht = { key: 1 }, Ae = /* @__PURE__ */ F({
527
+ }), Ut = { key: 1 }, Ae = /* @__PURE__ */ H({
527
528
  __name: "PLanguage",
528
- setup(a) {
529
+ setup(o) {
529
530
  const {
530
- select: d,
531
- getLanguages: w,
531
+ select: u,
532
+ getLanguages: _,
532
533
  getCurrentLanguage: v,
533
534
  getDefaultLanguage: T,
534
535
  getTranslationApiUrl: h
535
- } = Ft(), k = ($) => d($), C = () => {
536
- window.translate.selectLanguageTag.show = !1, window.translate.selectLanguageTag.languages = w().map(($) => $.key).join(","), window.translate.ignore.class.push("ignore-translate-flag"), window.translate.ignore.id.push("ignore-translation"), window.translate.language.setLocal(T()), window.translate.request.api.translate = "api/v1/translation", window.translate.request.api.connectTest = "api/v1/translation/connect-test", window.translate.request.api.init = "api/v1/translation/init", window.translate.request.api.language = "api/v1/translation/language", window.translate.request.setHost(h()), window.translate.request.listener.start(), window.translate.listener.start(), window.translate.whole.enableAll(), window.translate.execute();
536
+ } = Ht(), k = ($) => u($), C = () => {
537
+ window.translate.selectLanguageTag.show = !1, window.translate.selectLanguageTag.languages = _().map(($) => $.key).join(","), window.translate.ignore.class.push("ignore-translate-flag"), window.translate.ignore.id.push("ignore-translation"), window.translate.language.setLocal(T()), window.translate.request.api.translate = "api/v1/translation", window.translate.request.api.connectTest = "api/v1/translation/connect-test", window.translate.request.api.init = "api/v1/translation/init", window.translate.request.api.language = "api/v1/translation/language", window.translate.request.setHost(h()), window.translate.request.listener.start(), window.translate.listener.start(), window.translate.whole.enableAll(), window.translate.execute();
537
538
  };
538
- return ee(async () => {
539
- C();
540
- }), ($, O) => {
539
+ return ee(async () => await ne(() => C())), ($, O) => {
541
540
  const f = D, P = V;
542
- return t(w)().length > 0 ? (y(), N(t(X), {
541
+ return t(_)().length > 0 ? (w(), N(t(X), {
543
542
  key: 0,
544
543
  id: "ignore-translation",
545
544
  placement: "bottom-start",
546
545
  trigger: "hover",
547
546
  class: "flex flex-col justify-center h-full ignore",
548
547
  onSelect: k,
549
- options: t(w)()
548
+ options: t(_)()
550
549
  }, {
551
550
  default: l(() => [
552
551
  n(P, {
@@ -554,21 +553,21 @@ const Ot = { id: "data-content" }, Mt = {
554
553
  type: "info"
555
554
  }, {
556
555
  default: l(() => [
557
- t(v)() ? (y(), I("label", Ht, q(t(v)()?.label), 1)) : (y(), N(f, {
556
+ t(v)() ? (w(), I("label", Ut, q(t(v)()?.label), 1)) : (w(), N(f, {
558
557
  key: 0,
559
558
  size: "18"
560
559
  }, {
561
560
  default: l(() => O[0] || (O[0] = [
562
- b("svg", {
561
+ y("svg", {
563
562
  xmlns: "http://www.w3.org/2000/svg",
564
563
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
565
564
  viewBox: "0 0 512 512"
566
565
  }, [
567
- b("path", {
566
+ y("path", {
568
567
  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",
569
568
  fill: "currentColor"
570
569
  }),
571
- b("path", {
570
+ y("path", {
572
571
  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",
573
572
  fill: "currentColor"
574
573
  })
@@ -585,14 +584,14 @@ const Ot = { id: "data-content" }, Mt = {
585
584
  }, 8, ["options"])) : W("", !0);
586
585
  };
587
586
  }
588
- }), Ut = { class: "layout-header" }, qt = { class: "layout-header-left" }, Vt = { class: "link-text" }, jt = {
587
+ }), Ft = { class: "layout-header" }, qt = { class: "layout-header-left" }, Vt = { class: "link-text" }, jt = {
589
588
  key: 1,
590
589
  class: "link-text"
591
- }, Kt = { class: "layout-header-right" }, Yt = { class: "layout-header-trigger-min" }, Xt = { class: "layout-header-trigger layout-header-trigger-min" }, Gt = { class: "layout-header-trigger layout-header-trigger-min" }, Jt = { class: "avatar" }, Zt = /* @__PURE__ */ F({
590
+ }, Kt = { class: "layout-header-right" }, Yt = { class: "layout-header-trigger-min" }, Xt = { class: "layout-header-trigger layout-header-trigger-min" }, Gt = { class: "layout-header-trigger layout-header-trigger-min" }, Jt = { class: "avatar" }, Zt = /* @__PURE__ */ H({
592
591
  __name: "PHeader",
593
- setup(a) {
594
- const d = ne(), w = xe(), v = oe(), T = ye(), h = we(), k = Re("reloadPage"), C = (m) => T.push({ name: m }), $ = H(() => O(h.matched)), O = (m) => m.map((g) => {
595
- const _ = {
592
+ setup(o) {
593
+ const u = se(), _ = xe(), v = ae(), T = ye(), h = we(), k = Re("reloadPage"), C = (m) => T.push({ name: m }), $ = U(() => O(h.matched)), O = (m) => m.map((g) => {
594
+ const b = {
596
595
  key: g.name,
597
596
  label: g.meta.title,
598
597
  icon: g.meta.icon,
@@ -600,12 +599,12 @@ const Ot = { id: "data-content" }, Mt = {
600
599
  disabled: g.path === "/",
601
600
  children: void 0
602
601
  };
603
- return g.children && g.children.length > 0 && (_.children = O(
602
+ return g.children && g.children.length > 0 && (b.children = O(
604
603
  g.children
605
- )), _;
604
+ )), b;
606
605
  }), f = M(!1), P = () => {
607
606
  document.fullscreenElement ? document.exitFullscreen && (document.exitFullscreen(), f.value = !1) : (document.documentElement.requestFullscreen(), f.value = !0);
608
- }, o = H(() => {
607
+ }, a = U(() => {
609
608
  const m = [];
610
609
  return m.push({
611
610
  label: "退出登录",
@@ -616,7 +615,7 @@ const Ot = { id: "data-content" }, Mt = {
616
615
  key: g.route
617
616
  });
618
617
  }), m;
619
- }), i = (m) => {
618
+ }), r = (m) => {
620
619
  switch (m) {
621
620
  case "logout":
622
621
  p();
@@ -625,7 +624,7 @@ const Ot = { id: "data-content" }, Mt = {
625
624
  T.push({ name: m });
626
625
  }
627
626
  }, p = () => {
628
- w.info({
627
+ _.info({
629
628
  title: "提示",
630
629
  content: "您确定要退出登录吗",
631
630
  positiveText: "确定",
@@ -633,29 +632,29 @@ const Ot = { id: "data-content" }, Mt = {
633
632
  onPositiveClick: async () => {
634
633
  if (v.state.logout)
635
634
  try {
636
- await v.state.logout(), localStorage.removeItem("TABS-ROUTES"), d.error("退出成功");
635
+ await v.state.logout(), localStorage.removeItem("TABS-ROUTES"), u.error("退出成功");
637
636
  } catch (m) {
638
- console.error(m), d.error("退出登录失败");
637
+ console.error(m), u.error("退出登录失败");
639
638
  } finally {
640
639
  location.reload();
641
640
  }
642
641
  else
643
- d.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法");
642
+ u.error("没有配置登出接口, 请配置[usePLayoutStore.logout]方法");
644
643
  },
645
644
  onNegativeClick: () => {
646
645
  }
647
646
  });
648
647
  };
649
648
  return (m, g) => {
650
- const _ = Me, z = Ke, E = Ne;
651
- return y(), I("div", Ut, [
652
- b("div", qt, [
653
- b("div", {
649
+ const b = Me, z = Ke, E = Ne;
650
+ return w(), I("div", Ft, [
651
+ y("div", qt, [
652
+ y("div", {
654
653
  class: "ml-1 layout-header-trigger layout-header-trigger-min",
655
654
  onClick: g[0] || (g[0] = //@ts-ignore
656
- (...S) => t(v).collapse && t(v).collapse(...S))
655
+ (...L) => t(v).collapse && t(v).collapse(...L))
657
656
  }, [
658
- t(v).state.collapsed ? (y(), N(t(D), {
657
+ t(v).state.collapsed ? (w(), N(t(D), {
659
658
  key: 0,
660
659
  size: "18"
661
660
  }, {
@@ -663,7 +662,7 @@ const Ot = { id: "data-content" }, Mt = {
663
662
  n(t(bt))
664
663
  ]),
665
664
  _: 1
666
- })) : (y(), N(t(D), {
665
+ })) : (w(), N(t(D), {
667
666
  key: 1,
668
667
  size: "18"
669
668
  }, {
@@ -673,10 +672,10 @@ const Ot = { id: "data-content" }, Mt = {
673
672
  _: 1
674
673
  }))
675
674
  ]),
676
- b("div", {
675
+ y("div", {
677
676
  class: "mr-1 layout-header-trigger layout-header-trigger-min",
678
677
  onClick: g[1] || (g[1] = //@ts-ignore
679
- (...S) => t(k) && t(k)(...S))
678
+ (...L) => t(k) && t(k)(...L))
680
679
  }, [
681
680
  n(t(D), { size: "18" }, {
682
681
  default: l(() => [
@@ -687,26 +686,26 @@ const Ot = { id: "data-content" }, Mt = {
687
686
  ]),
688
687
  n(t(Ve), null, {
689
688
  default: l(() => [
690
- (y(!0), I(Le, null, ct($.value, (S) => (y(), I(Le, {
691
- key: S.label
689
+ (w(!0), I(Le, null, ct($.value, (L) => (w(), I(Le, {
690
+ key: L.label
692
691
  }, [
693
- S.label ? (y(), N(t(je), { key: 0 }, {
692
+ L.label ? (w(), N(t(je), { key: 0 }, {
694
693
  default: l(() => [
695
- S.children && S.children.length ? (y(), N(t(X), {
694
+ L.children && L.children.length ? (w(), N(t(X), {
696
695
  key: 0,
697
- options: S.children,
696
+ options: L.children,
698
697
  onSelect: C
699
698
  }, {
700
699
  default: l(() => [
701
- b("span", Vt, [
702
- S.icon ? (y(), N(me(S.icon), { key: 0 })) : W("", !0),
703
- b("span", null, q(S.label), 1)
700
+ y("span", Vt, [
701
+ L.icon ? (w(), N(ve(L.icon), { key: 0 })) : W("", !0),
702
+ y("span", null, q(L.label), 1)
704
703
  ])
705
704
  ]),
706
705
  _: 2
707
- }, 1032, ["options"])) : (y(), I("span", jt, [
708
- S.icon ? (y(), N(me(S.icon), { key: 0 })) : W("", !0),
709
- b("span", null, q(S.label), 1)
706
+ }, 1032, ["options"])) : (w(), I("span", jt, [
707
+ L.icon ? (w(), N(ve(L.icon), { key: 0 })) : W("", !0),
708
+ y("span", null, q(L.label), 1)
710
709
  ]))
711
710
  ]),
712
711
  _: 2
@@ -716,39 +715,39 @@ const Ot = { id: "data-content" }, Mt = {
716
715
  _: 1
717
716
  })
718
717
  ]),
719
- b("div", Kt, [
720
- b("div", Yt, [
718
+ y("div", Kt, [
719
+ y("div", Yt, [
721
720
  n(Ae)
722
721
  ]),
723
- b("div", Xt, [
724
- n(_, { placement: "bottom" }, {
722
+ y("div", Xt, [
723
+ n(b, { placement: "bottom" }, {
725
724
  trigger: l(() => [
726
725
  n(t(D), {
727
726
  size: "18",
728
- onClick: ve(P, ["stop"])
727
+ onClick: _e(P, ["stop"])
729
728
  }, {
730
729
  default: l(() => [
731
- f.value ? (y(), N(t(kt), { key: 1 })) : (y(), N(t(wt), { key: 0 }))
730
+ f.value ? (w(), N(t(kt), { key: 1 })) : (w(), N(t(wt), { key: 0 }))
732
731
  ]),
733
732
  _: 1
734
733
  })
735
734
  ]),
736
735
  default: l(() => [
737
- g[2] || (g[2] = b("span", null, "全屏", -1))
736
+ g[2] || (g[2] = y("span", null, "全屏", -1))
738
737
  ]),
739
738
  _: 1,
740
739
  __: [2]
741
740
  })
742
741
  ]),
743
- b("div", Gt, [
742
+ y("div", Gt, [
744
743
  n(t(X), {
745
744
  trigger: "hover",
746
- onSelect: i,
747
- options: o.value
745
+ onSelect: r,
746
+ options: a.value
748
747
  }, {
749
748
  default: l(() => [
750
- b("div", Jt, [
751
- b("span", null, q(t(v).state.uname), 1),
749
+ y("div", Jt, [
750
+ y("span", null, q(t(v).state.uname), 1),
752
751
  n(z, { vertical: "" }),
753
752
  n(E, {
754
753
  round: "",
@@ -763,19 +762,19 @@ const Ot = { id: "data-content" }, Mt = {
763
762
  ]);
764
763
  };
765
764
  }
766
- }), Qt = /* @__PURE__ */ se(Zt, [["__scopeId", "data-v-93589779"]]), eo = { class: "mt-1" }, to = /* @__PURE__ */ F({
765
+ }), Qt = /* @__PURE__ */ ie(Zt, [["__scopeId", "data-v-93589779"]]), ea = { class: "mt-1" }, ta = /* @__PURE__ */ H({
767
766
  __name: "PContent",
768
767
  props: {
769
768
  loading: { type: Boolean, default: !1 }
770
769
  },
771
- setup(a) {
772
- return (d, w) => {
770
+ setup(o) {
771
+ return (u, _) => {
773
772
  const v = dt("RouterView");
774
- return y(), I("div", eo, [
775
- d.loading ? W("", !0) : (y(), N(v, { key: 0 }, {
773
+ return w(), I("div", ea, [
774
+ u.loading ? W("", !0) : (w(), N(v, { key: 0 }, {
776
775
  default: l(({ Component: T, route: h }) => [
777
- (y(), N(ut, null, [
778
- (y(), N(me(T), {
776
+ (w(), N(ut, null, [
777
+ (w(), N(ve(T), {
779
778
  key: h.fullPath
780
779
  }))
781
780
  ], 1024))
@@ -785,14 +784,14 @@ const Ot = { id: "data-content" }, Mt = {
785
784
  ]);
786
785
  };
787
786
  }
788
- }), oo = { class: "tabs-view-main" }, ao = ["id", "onClick", "onContextmenu"], lo = { class: "tabs-close" }, no = { class: "tabs-close-btn" }, so = /* @__PURE__ */ F({
787
+ }), aa = { class: "tabs-view-main" }, oa = ["id", "onClick", "onContextmenu"], la = { class: "tabs-close" }, na = { class: "tabs-close-btn" }, sa = /* @__PURE__ */ H({
789
788
  __name: "PTabs",
790
- setup(a) {
789
+ setup(o) {
791
790
  ft((e) => ({
792
- "4cb4fdc8": w.value,
791
+ "4cb4fdc8": _.value,
793
792
  "21e8bab2": v.value
794
793
  }));
795
- const d = Ye(), w = H(() => d.value.cardColor), v = H(() => d.value.textColor1), T = ne(), h = we(), k = ye(), C = M(null), $ = M(null), O = M(!1), f = oe(), P = H(() => f.state.tabs), o = Ee({
794
+ const u = Ye(), _ = U(() => u.value.cardColor), v = U(() => u.value.textColor1), T = se(), h = we(), k = ye(), C = M(null), $ = M(null), O = M(!1), f = ae(), P = U(() => f.state.tabs), a = Ee({
796
795
  activeKey: h.fullPath,
797
796
  scrollable: !0,
798
797
  dropdownX: 0,
@@ -800,16 +799,16 @@ const Ot = { id: "data-content" }, Mt = {
800
799
  showDropdown: !1,
801
800
  isMultiHeaderFixed: !0,
802
801
  multiTabsSetting: !0
803
- }), i = ["Login", "Redirect", "ErrorPage"], p = (e) => {
804
- const { fullPath: c, hash: r, meta: x, name: A, params: Z, path: ue, query: fe } = e;
805
- return { fullPath: c, hash: r, meta: x, name: A, params: Z, path: ue, query: fe };
806
- }, m = H(() => {
807
- const r = f.state.collapsed ? "64px" : "272px";
802
+ }), r = ["Login", "Redirect", "ErrorPage"], p = (e) => {
803
+ const { fullPath: c, hash: i, meta: x, name: A, params: Z, path: fe, query: pe } = e;
804
+ return { fullPath: c, hash: i, meta: x, name: A, params: Z, path: fe, query: pe };
805
+ }, m = U(() => {
806
+ const i = f.state.collapsed ? "64px" : "272px";
808
807
  return {
809
- left: r,
810
- width: `calc(100% - ${r})`
808
+ left: i,
809
+ width: `calc(100% - ${i})`
811
810
  };
812
- }), g = H(() => {
811
+ }), g = U(() => {
813
812
  const e = P.value.length <= 1;
814
813
  return [
815
814
  {
@@ -836,13 +835,13 @@ const Ot = { id: "data-content" }, Mt = {
836
835
  icon: () => B(D, null, { default: () => B(Pt) })
837
836
  }
838
837
  ];
839
- }), _ = () => {
838
+ }), b = () => {
840
839
  let e = [];
841
840
  const c = p(h);
842
841
  try {
843
842
  if (f.state.cacheTabs) {
844
- const r = localStorage.getItem("TABS_ROUTES");
845
- e = r ? JSON.parse(r) : [c];
843
+ const i = localStorage.getItem("TABS_ROUTES");
844
+ e = i ? JSON.parse(i) : [c];
846
845
  }
847
846
  } catch {
848
847
  e = [c];
@@ -851,31 +850,31 @@ const Ot = { id: "data-content" }, Mt = {
851
850
  }
852
851
  }, z = (e) => {
853
852
  const c = k.getRoutes();
854
- e.forEach((r) => {
855
- const x = c.find((A) => A.path === r.path);
856
- x && (r.meta = x.meta || r.meta, r.name = x.name || r.name);
853
+ e.forEach((i) => {
854
+ const x = c.find((A) => A.path === i.path);
855
+ x && (i.meta = x.meta || i.meta, i.name = x.name || i.name);
857
856
  }), f.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(e));
858
857
  }, E = () => {
859
- const e = _();
858
+ const e = b();
860
859
  z(e), f.initTabs(e);
861
- }, S = async (e) => {
862
- if (await _e(), !C.value) return;
863
- const c = C.value.offsetWidth, r = C.value.scrollWidth;
864
- c < r ? (o.scrollable = !0, e && [...C.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((A) => {
865
- A.id === `tag${o.activeKey.split("/").join("/")}` && A.scrollIntoView && A.scrollIntoView();
866
- })) : o.scrollable = !1;
867
- }, G = (e) => !(e.draggedContext.element.meta.affix || e.relatedContext.element.meta.affix), ae = () => {
860
+ }, L = async (e) => {
861
+ if (await ne(), !C.value) return;
862
+ const c = C.value.offsetWidth, i = C.value.scrollWidth;
863
+ c < i ? (a.scrollable = !0, e && [...C.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((A) => {
864
+ A.id === `tag${a.activeKey.split("/").join("/")}` && A.scrollIntoView && A.scrollIntoView();
865
+ })) : a.scrollable = !1;
866
+ }, G = (e) => !(e.draggedContext.element.meta.affix || e.relatedContext.element.meta.affix), oe = () => {
868
867
  let e;
869
- e = xt(), e.listenTo($.value, () => S(!0));
868
+ e = xt(), e.listenTo($.value, () => L(!0));
870
869
  }, j = (e) => {
871
870
  const { fullPath: c } = e;
872
- if (c === h.fullPath || (o.activeKey = c, !e))
871
+ if (c === h.fullPath || (a.activeKey = c, !e))
873
872
  return;
874
- const { replace: r } = k;
875
- toString.call(e), r(e).catch(console.error);
873
+ const { replace: i } = k;
874
+ toString.call(e), i(e).catch(console.error);
876
875
  }, J = (e, c) => {
877
- e.preventDefault(), O.value = c.path === "/home", o.showDropdown = !1, _e().then(() => {
878
- o.showDropdown = !0, o.dropdownX = e.clientX, o.dropdownY = e.clientY;
876
+ e.preventDefault(), O.value = c.path === "/home", a.showDropdown = !1, ne().then(() => {
877
+ a.showDropdown = !0, a.dropdownX = e.clientX, a.dropdownY = e.clientY;
879
878
  });
880
879
  }, re = () => {
881
880
  h.meta.keepAlive && k.currentRoute.value.matched.find(
@@ -884,23 +883,23 @@ const Ot = { id: "data-content" }, Mt = {
884
883
  }, le = (e) => {
885
884
  if (P.value.length === 1)
886
885
  return T.warning("这已经是最后一页,不能再关闭了!");
887
- if (re(), f.closeCurrentTab(e), o.activeKey === e.fullPath) {
886
+ if (re(), f.closeCurrentTab(e), a.activeKey === e.fullPath) {
888
887
  const c = P.value[Math.max(0, P.value.length - 1)];
889
- o.activeKey = c.fullPath, k.push(c);
888
+ a.activeKey = c.fullPath, k.push(c);
890
889
  }
891
- S();
892
- }, U = (e) => {
893
- const { fullPath: c } = e, r = P.value.find((x) => x.fullPath == c);
894
- le(r);
895
- }, ie = (e) => {
896
- f.closeOtherTabs(e), o.activeKey = e.fullPath, k.replace(e.fullPath), S();
897
- }, ce = () => {
898
- f.closeAllTabs(), S();
899
- }, de = Re("reloadPage"), s = (e) => {
890
+ L();
891
+ }, F = (e) => {
892
+ const { fullPath: c } = e, i = P.value.find((x) => x.fullPath == c);
893
+ le(i);
894
+ }, ce = (e) => {
895
+ f.closeOtherTabs(e), a.activeKey = e.fullPath, k.replace(e.fullPath), L();
896
+ }, de = () => {
897
+ f.closeAllTabs(), L();
898
+ }, ue = Re("reloadPage"), s = (e) => {
900
899
  switch (e) {
901
900
  //刷新
902
901
  case "1":
903
- de();
902
+ ue();
904
903
  break;
905
904
  //关闭
906
905
  case "2":
@@ -908,28 +907,28 @@ const Ot = { id: "data-content" }, Mt = {
908
907
  break;
909
908
  //关闭其他
910
909
  case "3":
911
- ie(h);
910
+ ce(h);
912
911
  break;
913
912
  //关闭所有
914
913
  case "4":
915
- ce();
914
+ de();
916
915
  break;
917
916
  }
918
- S(), o.showDropdown = !1;
919
- }, u = (e, c) => {
920
- const r = C.value.scrollLeft, x = c > 0 && r + c >= e || c < 0 && r + c <= e ? e : r + c;
917
+ L(), a.showDropdown = !1;
918
+ }, d = (e, c) => {
919
+ const i = C.value.scrollLeft, x = c > 0 && i + c >= e || c < 0 && i + c <= e ? e : i + c;
921
920
  if (C.value && C.value.scrollTo(x, 0), x !== e)
922
- return window.requestAnimationFrame(() => u(e, c));
923
- }, L = () => {
921
+ return window.requestAnimationFrame(() => d(e, c));
922
+ }, S = () => {
924
923
  const e = C.value.offsetWidth, c = C.value.scrollLeft;
925
924
  if (!c) return;
926
- const r = c > e ? c - e : 0;
927
- u(r, (r - c) / 20);
925
+ const i = c > e ? c - e : 0;
926
+ d(i, (i - c) / 20);
928
927
  }, R = () => {
929
- const e = C.value.offsetWidth, c = C.value.scrollWidth, r = C.value.scrollLeft;
930
- if (c - r <= e) return;
931
- const x = c - r > e * 2 ? r + e : c - e;
932
- u(x, (x - r) / 20);
928
+ const e = C.value.offsetWidth, c = C.value.scrollWidth, i = C.value.scrollLeft;
929
+ if (c - i <= e) return;
930
+ const x = c - i > e * 2 ? i + e : c - e;
931
+ d(x, (x - i) / 20);
933
932
  };
934
933
  return window.addEventListener("beforeunload", () => {
935
934
  localStorage.setItem("TABS_ROUTES", JSON.stringify(P.value));
@@ -937,28 +936,28 @@ const Ot = { id: "data-content" }, Mt = {
937
936
  "scroll",
938
937
  (e) => {
939
938
  let c = e.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
940
- o.isMultiHeaderFixed = c >= 64;
939
+ a.isMultiHeaderFixed = c >= 64;
941
940
  },
942
941
  !0
943
942
  ), De(
944
943
  () => h.fullPath,
945
944
  (e) => {
946
- i.includes(h.name) || (o.activeKey = e, f.addTab(p(h)), S(!0));
945
+ r.includes(h.name) || (a.activeKey = e, f.addTab(p(h)), L(!0));
947
946
  },
948
947
  { immediate: !0 }
949
- ), E(), ee(() => ae()), (e, c) => (y(), I("div", {
948
+ ), E(), ee(() => oe()), (e, c) => (w(), I("div", {
950
949
  class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
951
- style: he(m.value)
950
+ style: me(m.value)
952
951
  }, [
953
- b("div", oo, [
954
- b("div", {
952
+ y("div", aa, [
953
+ y("div", {
955
954
  ref_key: "navWrap",
956
955
  ref: $,
957
- class: Q(["tabs-card", { "tabs-card-scrollable": o.scrollable }])
956
+ class: Q(["tabs-card", { "tabs-card-scrollable": a.scrollable }])
958
957
  }, [
959
- b("span", {
960
- class: Q(["tabs-card-prev", { "tabs-card-prev-hide": !o.scrollable }]),
961
- onClick: L
958
+ y("span", {
959
+ class: Q(["tabs-card-prev", { "tabs-card-prev-hide": !a.scrollable }]),
960
+ onClick: S
962
961
  }, [
963
962
  n(t(D), {
964
963
  size: "16",
@@ -970,8 +969,8 @@ const Ot = { id: "data-content" }, Mt = {
970
969
  _: 1
971
970
  })
972
971
  ], 2),
973
- b("span", {
974
- class: Q(["tabs-card-next", { "tabs-card-next-hide": !o.scrollable }]),
972
+ y("span", {
973
+ class: Q(["tabs-card-next", { "tabs-card-next-hide": !a.scrollable }]),
975
974
  onClick: R
976
975
  }, [
977
976
  n(t(D), {
@@ -984,7 +983,7 @@ const Ot = { id: "data-content" }, Mt = {
984
983
  _: 1
985
984
  })
986
985
  ], 2),
987
- b("div", {
986
+ y("div", {
988
987
  ref_key: "navScroll",
989
988
  ref: C,
990
989
  class: "tabs-card-scroll"
@@ -996,31 +995,31 @@ const Ot = { id: "data-content" }, Mt = {
996
995
  class: "flex",
997
996
  move: G
998
997
  }, {
999
- item: l(({ element: r }) => [
1000
- b("div", {
1001
- id: `tag${r.fullPath.split("/").join("/")}`,
1002
- class: Q(["tabs-card-scroll-item", { "active-item": o.activeKey === r.fullPath }]),
1003
- onClick: ve((x) => j(r), ["stop"]),
1004
- onContextmenu: (x) => J(x, r)
998
+ item: l(({ element: i }) => [
999
+ y("div", {
1000
+ id: `tag${i.fullPath.split("/").join("/")}`,
1001
+ class: Q(["tabs-card-scroll-item", { "active-item": a.activeKey === i.fullPath }]),
1002
+ onClick: _e((x) => j(i), ["stop"]),
1003
+ onContextmenu: (x) => J(x, i)
1005
1004
  }, [
1006
- b("span", null, q(r.meta.title), 1),
1007
- r.meta.affix ? W("", !0) : (y(), N(t(D), {
1005
+ y("span", null, q(i.meta.title), 1),
1006
+ i.meta.affix ? W("", !0) : (w(), N(t(D), {
1008
1007
  key: 0,
1009
1008
  size: "14",
1010
- onClick: ve((x) => U(r), ["stop"])
1009
+ onClick: _e((x) => F(i), ["stop"])
1011
1010
  }, {
1012
1011
  default: l(() => [
1013
1012
  n(t(Te))
1014
1013
  ]),
1015
1014
  _: 2
1016
1015
  }, 1032, ["onClick"]))
1017
- ], 42, ao)
1016
+ ], 42, oa)
1018
1017
  ]),
1019
1018
  _: 1
1020
1019
  }, 8, ["list"])
1021
1020
  ], 512)
1022
1021
  ], 2),
1023
- b("div", lo, [
1022
+ y("div", la, [
1024
1023
  n(t(X), {
1025
1024
  trigger: "hover",
1026
1025
  onSelect: s,
@@ -1028,7 +1027,7 @@ const Ot = { id: "data-content" }, Mt = {
1028
1027
  options: g.value
1029
1028
  }, {
1030
1029
  default: l(() => [
1031
- b("div", no, [
1030
+ y("div", na, [
1032
1031
  n(t(D), {
1033
1032
  size: "16",
1034
1033
  color: "#515a6e"
@@ -1044,10 +1043,10 @@ const Ot = { id: "data-content" }, Mt = {
1044
1043
  }, 8, ["options"])
1045
1044
  ]),
1046
1045
  n(t(X), {
1047
- show: o.showDropdown,
1048
- x: o.dropdownX,
1049
- y: o.dropdownY,
1050
- onClickoutside: c[0] || (c[0] = (r) => o.showDropdown = !1),
1046
+ show: a.showDropdown,
1047
+ x: a.dropdownX,
1048
+ y: a.dropdownY,
1049
+ onClickoutside: c[0] || (c[0] = (i) => a.showDropdown = !1),
1051
1050
  placement: "bottom-start",
1052
1051
  onSelect: s,
1053
1052
  options: g.value
@@ -1055,23 +1054,23 @@ const Ot = { id: "data-content" }, Mt = {
1055
1054
  ])
1056
1055
  ], 4));
1057
1056
  }
1058
- }), ro = /* @__PURE__ */ se(so, [["__scopeId", "data-v-f0706f46"]]), io = /* @__PURE__ */ F({
1057
+ }), ia = /* @__PURE__ */ ie(sa, [["__scopeId", "data-v-f0706f46"]]), ra = /* @__PURE__ */ H({
1059
1058
  __name: "PMenus",
1060
- setup(a) {
1061
- const d = we(), w = ye(), v = oe(), T = M(d.name), h = M(
1062
- d.matched && d.matched.length ? d.matched.map((o) => o.name) : []
1063
- ), k = M([]), C = (o) => {
1064
- /http(s)?:/.test(o) ? window.open(o) : w.push({ name: o });
1065
- }, $ = (o) => {
1066
- if (!o) return;
1067
- const i = o.find((p) => h.value.indexOf(p) === -1);
1068
- h.value = i ? [i] : [];
1059
+ setup(o) {
1060
+ const u = we(), _ = ye(), v = ae(), T = M(u.name), h = M(
1061
+ u.matched && u.matched.length ? u.matched.map((a) => a.name) : []
1062
+ ), k = M([]), C = (a) => {
1063
+ /http(s)?:/.test(a) ? window.open(a) : _.push({ name: a });
1064
+ }, $ = (a) => {
1065
+ if (!a) return;
1066
+ const r = a.find((p) => h.value.indexOf(p) === -1);
1067
+ h.value = r ? [r] : [];
1069
1068
  }, O = () => {
1070
- const o = d.matched;
1071
- h.value = o.map((p) => p.name);
1072
- const i = d.meta?.activeMenu || "";
1073
- T.value = i || d.name;
1074
- }, f = (o, i = [], p = !1) => {
1069
+ const a = u.matched;
1070
+ h.value = a.map((p) => p.name);
1071
+ const r = u.meta?.activeMenu || "";
1072
+ T.value = r || u.name;
1073
+ }, f = (a, r = [], p = !1) => {
1075
1074
  const m = [], g = [
1076
1075
  "/:path(.*)*",
1077
1076
  "/redirect",
@@ -1079,50 +1078,50 @@ const Ot = { id: "data-content" }, Mt = {
1079
1078
  "/login",
1080
1079
  "/oidc-callback"
1081
1080
  ];
1082
- if (!o || o.length === 0)
1081
+ if (!a || a.length === 0)
1083
1082
  return m;
1084
- o = o.sort((_, z) => {
1085
- let E = (z.children?.length ? 1 : 0) - (_.children?.length ? 1 : 0);
1086
- return E === 0 && (E = (_.meta?.sort ?? 0) - (z.meta?.sort ?? 0)), E;
1083
+ a = a.sort((b, z) => {
1084
+ let E = (z.children?.length ? 1 : 0) - (b.children?.length ? 1 : 0);
1085
+ return E === 0 && (E = (b.meta?.sort ?? 0) - (z.meta?.sort ?? 0)), E;
1087
1086
  });
1088
- for (const _ of o) {
1089
- if (p || (_.meta?.hidden || !1) == !0 || g.includes(_.path)) {
1090
- i.push(_.name), _.children && _.children.length > 0 && f(_.children, i, !0);
1087
+ for (const b of a) {
1088
+ if (p || (b.meta?.hidden || !1) == !0 || g.includes(b.path)) {
1089
+ r.push(b.name), b.children && b.children.length > 0 && f(b.children, r, !0);
1091
1090
  continue;
1092
1091
  }
1093
- const z = _.meta?.alwaysShow != !0 && _?.children?.filter((G) => !G?.meta?.hidden)?.length === 1, E = z ? _.children[0] : _, S = {
1092
+ const z = b.meta?.alwaysShow != !0 && b?.children?.filter((G) => !G?.meta?.hidden)?.length === 1, E = z ? b.children[0] : b, L = {
1094
1093
  key: E.name,
1095
1094
  label: E.meta?.title,
1096
1095
  affix: E.meta?.affix,
1097
1096
  sort: E.meta?.sort,
1098
1097
  path: E.path,
1099
1098
  redirect: E.redirect,
1100
- icon: z ? _.meta?.icon : E.meta?.icon,
1099
+ icon: z ? b.meta?.icon : E.meta?.icon,
1101
1100
  permissions: E.meta?.permissions,
1102
1101
  meta: E.meta,
1103
1102
  children: void 0
1104
1103
  };
1105
- if (!i.includes(_.name)) {
1106
- if (m.push(S), i.push(_.name), z) {
1107
- f(_.children, i, p);
1104
+ if (!r.includes(b.name)) {
1105
+ if (m.push(L), r.push(b.name), z) {
1106
+ f(b.children, r, p);
1108
1107
  continue;
1109
1108
  }
1110
- _.children && _.children.length > 0 && (S.children = f(_.children, i, p));
1109
+ b.children && b.children.length > 0 && (L.children = f(b.children, r, p));
1111
1110
  }
1112
1111
  }
1113
1112
  return m;
1114
1113
  }, P = () => {
1115
- const o = w.getRoutes();
1116
- k.value = f(o);
1114
+ const a = _.getRoutes();
1115
+ k.value = f(a);
1117
1116
  };
1118
1117
  return De(
1119
- () => d.fullPath,
1118
+ () => u.fullPath,
1120
1119
  () => {
1121
1120
  O();
1122
1121
  }
1123
1122
  ), ee(() => {
1124
1123
  P(), O();
1125
- }), (o, i) => (y(), N(t(Xe), {
1124
+ }), (a, r) => (w(), N(t(Xe), {
1126
1125
  class: "h-full",
1127
1126
  inverted: "",
1128
1127
  mode: "vertical",
@@ -1137,15 +1136,15 @@ const Ot = { id: "data-content" }, Mt = {
1137
1136
  "onUpdate:expandedKeys": $
1138
1137
  }, null, 8, ["options", "collapsed", "expanded-keys", "value"]));
1139
1138
  }
1140
- }), co = { class: "layout-content-main layout-content-main-fix" }, uo = { class: "main-view main-view-fix" }, fo = /* @__PURE__ */ F({
1139
+ }), ca = { class: "layout-content-main layout-content-main-fix" }, da = { class: "main-view main-view-fix" }, ua = /* @__PURE__ */ H({
1141
1140
  __name: "PLayout",
1142
- setup(a) {
1143
- const d = oe(), w = M(!1);
1141
+ setup(o) {
1142
+ const u = ae(), _ = M(!1);
1144
1143
  return pt("reloadPage", () => {
1145
- w.value = !0, _e(() => w.value = !1);
1144
+ _.value = !0, ne(() => _.value = !1);
1146
1145
  }), (T, h) => {
1147
1146
  const k = et;
1148
- return y(), N(t(Pe), {
1147
+ return w(), N(t(Pe), {
1149
1148
  "has-sider": "",
1150
1149
  class: "layout",
1151
1150
  position: "absolute"
@@ -1157,17 +1156,17 @@ const Ot = { id: "data-content" }, Mt = {
1157
1156
  "show-trigger": "bar",
1158
1157
  position: "absolute",
1159
1158
  "collapse-mode": "width",
1160
- collapsed: t(d).state.collapsed,
1159
+ collapsed: t(u).state.collapsed,
1161
1160
  "native-scrollbar": !1,
1162
1161
  "collapsed-width": 64,
1163
- onCollapse: t(d).collapse,
1164
- onExpand: t(d).collapse
1162
+ onCollapse: t(u).collapse,
1163
+ onExpand: t(u).collapse
1165
1164
  }, {
1166
1165
  default: l(() => [
1167
1166
  n(t(Je), { vertical: "" }, {
1168
1167
  default: l(() => [
1169
1168
  n(Wt),
1170
- n(io)
1169
+ n(ra)
1171
1170
  ]),
1172
1171
  _: 1
1173
1172
  })
@@ -1184,10 +1183,10 @@ const Ot = { id: "data-content" }, Mt = {
1184
1183
  }),
1185
1184
  n(t(Qe), { class: "layout-content layout-default-background" }, {
1186
1185
  default: l(() => [
1187
- b("div", co, [
1188
- n(ro),
1189
- b("div", uo, [
1190
- n(to, { loading: w.value }, null, 8, ["loading"])
1186
+ y("div", ca, [
1187
+ n(ia),
1188
+ y("div", da, [
1189
+ n(ta, { loading: _.value }, null, 8, ["loading"])
1191
1190
  ])
1192
1191
  ])
1193
1192
  ]),
@@ -1205,7 +1204,7 @@ const Ot = { id: "data-content" }, Mt = {
1205
1204
  });
1206
1205
  };
1207
1206
  }
1208
- }), po = /* @__PURE__ */ se(fo, [["__scopeId", "data-v-87dcb433"]]), go = te(po), ho = /* @__PURE__ */ F({
1207
+ }), fa = /* @__PURE__ */ ie(ua, [["__scopeId", "data-v-87dcb433"]]), pa = te(fa), ga = /* @__PURE__ */ H({
1209
1208
  __name: "PApplication",
1210
1209
  props: {
1211
1210
  theme: {},
@@ -1221,14 +1220,14 @@ const Ot = { id: "data-content" }, Mt = {
1221
1220
  }
1222
1221
  } }
1223
1222
  },
1224
- setup(a) {
1225
- return (d, w) => {
1223
+ setup(o) {
1224
+ return (u, _) => {
1226
1225
  const v = tt;
1227
- return y(), N(v, {
1228
- locale: t(at),
1229
- theme: d.theme,
1230
- "theme-overrides": d.themeOverrides,
1231
- "date-locale": t(ot)
1226
+ return w(), N(v, {
1227
+ locale: t(ot),
1228
+ theme: u.theme,
1229
+ "theme-overrides": u.themeOverrides,
1230
+ "date-locale": t(at)
1232
1231
  }, {
1233
1232
  default: l(() => [
1234
1233
  n(t(lt), null, {
@@ -1237,7 +1236,7 @@ const Ot = { id: "data-content" }, Mt = {
1237
1236
  default: l(() => [
1238
1237
  n(t(st), null, {
1239
1238
  default: l(() => [
1240
- Y(d.$slots, "default")
1239
+ Y(u.$slots, "default")
1241
1240
  ]),
1242
1241
  _: 3
1243
1242
  })
@@ -1252,10 +1251,10 @@ const Ot = { id: "data-content" }, Mt = {
1252
1251
  }, 8, ["locale", "theme", "theme-overrides", "date-locale"]);
1253
1252
  };
1254
1253
  }
1255
- }), mo = te(ho), vo = {
1254
+ }), ha = te(ga), ma = {
1256
1255
  class: "w-full cursor-move",
1257
1256
  id: "basic-modal-bar"
1258
- }, _o = /* @__PURE__ */ F({
1257
+ }, va = /* @__PURE__ */ H({
1259
1258
  __name: "PModal",
1260
1259
  props: {
1261
1260
  saveBtnText: { default: "保 存" },
@@ -1265,13 +1264,13 @@ const Ot = { id: "data-content" }, Mt = {
1265
1264
  onSave: {},
1266
1265
  onClose: {}
1267
1266
  },
1268
- setup(a, { expose: d }) {
1269
- const w = ne(), v = a, T = M(null), h = M(!1), k = M(!1), C = async () => {
1267
+ setup(o, { expose: u }) {
1268
+ const _ = se(), v = o, T = M(null), h = M(!1), k = M(!1), C = async () => {
1270
1269
  h.value = !0;
1271
1270
  try {
1272
1271
  v.onSave && await v.onSave() && $();
1273
- } catch (o) {
1274
- console.error(o), w.error("操作失败, 详情F12请查看控制台日志");
1272
+ } catch (a) {
1273
+ _.error(a.message);
1275
1274
  } finally {
1276
1275
  h.value = !1;
1277
1276
  }
@@ -1280,26 +1279,26 @@ const Ot = { id: "data-content" }, Mt = {
1280
1279
  }, O = async () => {
1281
1280
  try {
1282
1281
  v.onClose ? await v.onClose() && $() : $();
1283
- } catch (o) {
1284
- console.error(o), w.error("取消失败, 详情F12请查看控制台日志");
1282
+ } catch (a) {
1283
+ _.error(a.message);
1285
1284
  }
1286
1285
  };
1287
- return d({
1286
+ return u({
1288
1287
  open: () => {
1289
1288
  h.value = !1, k.value = !0;
1290
1289
  },
1291
1290
  close: () => {
1292
1291
  k.value = !1, h.value = !1;
1293
1292
  }
1294
- }), (o, i) => {
1293
+ }), (a, r) => {
1295
1294
  const p = V, m = Oe;
1296
- return y(), N(t($e), gt({
1295
+ return w(), N(t($e), gt({
1297
1296
  ref_key: "$modal",
1298
1297
  ref: T,
1299
1298
  preset: "dialog",
1300
1299
  show: k.value,
1301
- "onUpdate:show": i[0] || (i[0] = (g) => k.value = g)
1302
- }, o.$attrs, {
1300
+ "onUpdate:show": r[0] || (r[0] = (g) => k.value = g)
1301
+ }, a.$attrs, {
1303
1302
  draggable: !0,
1304
1303
  closable: !1,
1305
1304
  "close-on-esc": !1,
@@ -1308,17 +1307,17 @@ const Ot = { id: "data-content" }, Mt = {
1308
1307
  onClose: $
1309
1308
  }), ht({
1310
1309
  header: l(() => [
1311
- b("div", vo, q(o.title), 1)
1310
+ y("div", ma, q(a.title), 1)
1312
1311
  ]),
1313
1312
  default: l(() => [
1314
- Y(o.$slots, "default")
1313
+ Y(a.$slots, "default")
1315
1314
  ]),
1316
1315
  _: 2
1317
1316
  }, [
1318
- o.$slots.action ? {
1317
+ a.$slots.action ? {
1319
1318
  name: "action",
1320
1319
  fn: l(() => [
1321
- Y(o.$slots, "action")
1320
+ Y(a.$slots, "action")
1322
1321
  ]),
1323
1322
  key: "1"
1324
1323
  } : {
@@ -1332,12 +1331,12 @@ const Ot = { id: "data-content" }, Mt = {
1332
1331
  onClick: C
1333
1332
  }, {
1334
1333
  default: l(() => [
1335
- K(q(o.saveBtnText), 1)
1334
+ K(q(a.saveBtnText), 1)
1336
1335
  ]),
1337
1336
  _: 1
1338
1337
  }, 8, ["loading"]),
1339
1338
  n(p, { onClick: O }, {
1340
- default: l(() => i[1] || (i[1] = [
1339
+ default: l(() => r[1] || (r[1] = [
1341
1340
  K("取 消", -1)
1342
1341
  ])),
1343
1342
  _: 1,
@@ -1352,26 +1351,26 @@ const Ot = { id: "data-content" }, Mt = {
1352
1351
  ]), 1040, ["show"]);
1353
1352
  };
1354
1353
  }
1355
- }), bo = te(_o), yo = te(Ae), wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1354
+ }), _a = te(va), ba = te(Ae), ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1356
1355
  __proto__: null,
1357
- PApplication: mo,
1358
- PLanguage: yo,
1359
- PLayout: go,
1360
- PModal: bo,
1356
+ PApplication: ha,
1357
+ PLanguage: ba,
1358
+ PLayout: pa,
1359
+ PModal: _a,
1361
1360
  PTable: Dt
1362
- }, Symbol.toStringTag, { value: "Module" })), ko = (a) => (Object.values(wo).forEach((d) => {
1363
- d.install && a.use(d);
1364
- }), a), Oo = {
1365
- install: ko
1361
+ }, Symbol.toStringTag, { value: "Module" })), wa = (o, u) => (Object.values(ya).forEach((_) => {
1362
+ _.install && o.use(_);
1363
+ }), u?.(), o), $a = {
1364
+ install: wa
1366
1365
  };
1367
1366
  export {
1368
- mo as PApplication,
1369
- yo as PLanguage,
1370
- go as PLayout,
1371
- bo as PModal,
1367
+ ha as PApplication,
1368
+ ba as PLanguage,
1369
+ pa as PLayout,
1370
+ _a as PModal,
1372
1371
  Dt as PTable,
1373
- Oo as default,
1374
- ko as install,
1375
- Ft as usePLanguageStore,
1376
- oe as usePLayoutStore
1372
+ $a as default,
1373
+ wa as install,
1374
+ Ht as usePLanguageStore,
1375
+ ae as usePLayoutStore
1377
1376
  };