@chewel611/naive-ui-plus 0.0.4 → 0.0.5

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