@vtj/ui 0.6.11 → 0.6.12

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/lib/index.js CHANGED
@@ -1,48 +1,48 @@
1
- import { defineComponent as B, openBlock as u, createElementBlock as V, renderSlot as z, createElementVNode as $, unref as o, toDisplayString as O, createVNode as b, withCtx as d, createTextVNode as N, createBlock as f, createCommentVNode as y, useAttrs as Ge, getCurrentInstance as pe, computed as v, markRaw as Pe, normalizeClass as U, resolveDynamicComponent as Z, mergeProps as X, Fragment as q, renderList as ke, isVNode as Mt, h as Y, toRef as ve, useSlots as Et, normalizeStyle as be, ref as R, normalizeProps as qe, guardReactiveProps as et, effectScope as tt, watch as ee, reactive as nt, onMounted as It, onUnmounted as Bt, watchEffect as ot, nextTick as le, Teleport as at, withDirectives as W, createSlots as $e, render as Xe, vShow as K, isRef as ye, withModifiers as At, KeepAlive as Dt, shallowRef as Ue, provide as Re, toRaw as Vt, inject as Be } from "vue";
2
- import { ElDivider as ue, ElButton as de, ElIcon as Pt, ElSubMenu as $t, ElBadge as Ae, ElMenuItem as Rt, ElMenu as Ft, ElContainer as He, ElHeader as Ot, ElAside as jt, ElMain as Nt, ElFooter as Xt, ElDropdown as Ut, ElDropdownMenu as Ht, ElDropdownItem as Lt, ElTooltip as st, ElSwitch as lt, ElInput as De, ElEmpty as Wt, ElTabs as Qt, ElTabPane as Le, ElPopover as it, ElAvatar as Zt, ElMessageBox as Me, ElSelect as Jt, ElOption as Kt, formContextKey as Yt, ElFormItem as Gt, ElForm as qt } from "element-plus";
3
- import { VideoPlay as en, Document as ae, Menu as rt, ArrowRight as tn, StarFilled as ct, Search as Ve, Close as ut, Expand as nn, Fold as on, Star as dt, Refresh as an, CopyDocument as sn, Moon as ln, Sunny as rn, MoreFilled as cn, UserFilled as un, HomeFilled as dn, WarningFilled as pn } from "@element-plus/icons-vue";
4
- import { useRouter as xe, useRoute as Fe, RouterView as pt, routeLocationKey as fn } from "vue-router";
5
- import { Minimize as mn, Popup as gn, Maximize as hn, RawClose as yn } from "@vtj/icons";
6
- import { useDraggable as vn, useMouseInElement as bn, useEventListener as _e, useElementSize as ft, useDark as _n } from "@vueuse/core";
7
- import { isEqual as mt, isObject as gt, uid as ht, arrayToMap as wn, isUrl as kn, upperFirstCamelCase as yt, merge as xn } from "@vtj/utils";
8
- function We(a) {
1
+ import { defineComponent as E, openBlock as c, createElementBlock as A, renderSlot as z, createElementVNode as F, unref as n, toDisplayString as j, createVNode as k, withCtx as p, createTextVNode as N, createBlock as m, createCommentVNode as h, useAttrs as st, getCurrentInstance as ue, computed as v, markRaw as he, normalizeClass as W, resolveDynamicComponent as L, mergeProps as X, Fragment as Z, renderList as le, isVNode as $t, h as q, toRef as xe, useSlots as Vt, normalizeStyle as Se, ref as O, normalizeProps as Te, guardReactiveProps as Ee, effectScope as lt, watch as H, reactive as Ne, onMounted as Dt, onUnmounted as Pt, watchEffect as it, nextTick as re, Teleport as rt, withDirectives as Q, createSlots as ge, render as Ze, vShow as Y, isRef as we, withModifiers as Rt, KeepAlive as Ft, shallowRef as Je, provide as ye, toRaw as Pe, inject as fe } from "vue";
2
+ import { ElDivider as me, ElButton as se, ElIcon as Ot, ElSubMenu as jt, ElBadge as Re, ElMenuItem as Nt, ElMenu as Xt, ElContainer as Ge, ElHeader as Ut, ElAside as Ht, ElMain as Wt, ElFooter as Lt, ElDropdown as Kt, ElDropdownMenu as Qt, ElDropdownItem as Zt, ElTooltip as ct, ElSwitch as Xe, ElInput as Fe, ElEmpty as Jt, ElTabs as Gt, ElTabPane as Ye, ElPopover as ut, ElAvatar as Yt, ElMessageBox as Ve, ElSelect as qt, ElOption as eo, ElCheckboxButton as to, ElCheckbox as oo, ElCheckboxGroup as no, ElRadioButton as ao, ElRadio as so, ElRadioGroup as lo, ElInputNumber as io, ElDatePicker as qe, ElTimePicker as ro, ElRate as co, ElSlider as uo, ElCascader as po, formContextKey as fo, ElFormItem as mo, ElForm as go } from "element-plus";
3
+ import { VideoPlay as yo, Document as ae, Menu as dt, ArrowRight as ho, StarFilled as pt, Search as Oe, Close as ft, Expand as vo, Fold as bo, Star as mt, Refresh as _o, CopyDocument as ko, Moon as wo, Sunny as xo, MoreFilled as So, UserFilled as zo, HomeFilled as Co, WarningFilled as To } from "@element-plus/icons-vue";
4
+ import { useRouter as Me, useRoute as Ue, RouterView as gt, routeLocationKey as Eo } from "vue-router";
5
+ import { Minimize as Mo, Popup as Bo, Maximize as Io, RawClose as Ao } from "@vtj/icons";
6
+ import { useDraggable as $o, useMouseInElement as Vo, useEventListener as ze, useElementSize as yt, useDark as Do } from "@vueuse/core";
7
+ import { isEqual as He, isObject as We, uid as ht, arrayToMap as Po, isUrl as Ro, upperFirstCamelCase as vt, toArray as Fo, merge as Oo } from "@vtj/utils";
8
+ function je(a) {
9
9
  return typeof a == "string" ? a : `${a}px`;
10
10
  }
11
- function me(a = 0, e) {
11
+ function be(a = 0, t) {
12
12
  if (typeof a == "number")
13
13
  return a;
14
14
  if (/(%|vh|vw)$/i.test(a)) {
15
- const n = Number.parseInt(a);
16
- return Math.floor(e * n / 100);
15
+ const o = Number.parseInt(a);
16
+ return Math.floor(t * o / 100);
17
17
  }
18
18
  return Number.parseInt(a);
19
19
  }
20
- function Zo(a, e) {
21
- const t = {};
22
- return Object.keys(a).forEach((n) => {
23
- e.includes(n) || (t[n] = a[n]);
24
- }), t;
20
+ function fa(a, t) {
21
+ const e = {};
22
+ return Object.keys(a).forEach((o) => {
23
+ t.includes(o) || (e[o] = a[o]);
24
+ }), e;
25
25
  }
26
- function Jo(a, e) {
27
- const t = {};
28
- return Object.keys(a).forEach((n) => {
29
- e.includes(n) && (t[n] = a[n]);
30
- }), t;
26
+ function ma(a, t) {
27
+ const e = {};
28
+ return Object.keys(a).forEach((o) => {
29
+ t.includes(o) && (e[o] = a[o]);
30
+ }), e;
31
31
  }
32
- const Ko = () => {
33
- }, Qe = Symbol("INSTALLED_KEY"), zn = (a = []) => ({
34
- install: (t) => {
35
- t[Qe] || (t[Qe] = !0, a.forEach((n) => {
36
- n.name && t.component(n.name, n);
32
+ const ga = () => {
33
+ }, et = Symbol("INSTALLED_KEY"), jo = (a = []) => ({
34
+ install: (e) => {
35
+ e[et] || (e[et] = !0, a.forEach((o) => {
36
+ o.name && e.component(o.name, o);
37
37
  }));
38
38
  }
39
- }), vt = "data:image/png;base64,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", Sn = { class: "x-startup" }, Cn = { class: "brand" }, Tn = ["src"], Mn = /* @__PURE__ */ $("h3", null, [
39
+ }), bt = "data:image/png;base64,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", No = { class: "x-startup" }, Xo = { class: "brand" }, Uo = ["src"], Ho = /* @__PURE__ */ F("h3", null, [
40
40
  /* @__PURE__ */ N("基于 "),
41
- /* @__PURE__ */ $("span", null, "Vue3 + TypeScript"),
41
+ /* @__PURE__ */ F("span", null, "Vue3 + TypeScript"),
42
42
  /* @__PURE__ */ N(" 的低代码设计器引擎")
43
- ], -1), En = { class: "btn" }, In = /* @__PURE__ */ $("div", { class: "ba" }, [
44
- /* @__PURE__ */ $("a", { href: "http://beian.miit.gov.cn/" }, "粤ICP备2023104074号")
45
- ], -1), Bn = /* @__PURE__ */ B({
43
+ ], -1), Wo = { class: "btn" }, Lo = /* @__PURE__ */ F("div", { class: "ba" }, [
44
+ /* @__PURE__ */ F("a", { href: "http://beian.miit.gov.cn/" }, "粤ICP备2023104074号")
45
+ ], -1), Ko = /* @__PURE__ */ E({
46
46
  name: "XStartup",
47
47
  __name: "Startup",
48
48
  props: {
@@ -51,58 +51,58 @@ const Ko = () => {
51
51
  example: {}
52
52
  },
53
53
  setup(a) {
54
- const e = a, t = () => {
55
- location.href = e.link + "#/?startup";
56
- }, n = () => {
57
- e.example && e.example(e.link);
54
+ const t = a, e = () => {
55
+ location.href = t.link + "#/?startup";
56
+ }, o = () => {
57
+ t.example && t.example(t.link);
58
58
  };
59
- return (s, l) => (u(), V("div", Sn, [
59
+ return (s, i) => (c(), A("div", No, [
60
60
  z(s.$slots, "default", {}, () => [
61
- $("div", null, [
62
- $("div", Cn, [
63
- $("img", { src: o(vt) }, null, 8, Tn),
64
- $("h1", null, O(e.text), 1)
61
+ F("div", null, [
62
+ F("div", Xo, [
63
+ F("img", { src: n(bt) }, null, 8, Uo),
64
+ F("h1", null, j(t.text), 1)
65
65
  ]),
66
- b(o(ue)),
67
- Mn,
68
- $("div", En, [
69
- b(o(de), {
70
- onClick: t,
66
+ k(n(me)),
67
+ Ho,
68
+ F("div", Wo, [
69
+ k(n(se), {
70
+ onClick: e,
71
71
  type: "primary",
72
72
  round: "",
73
73
  size: "large",
74
- icon: o(en)
74
+ icon: n(yo)
75
75
  }, {
76
- default: d(() => [
76
+ default: p(() => [
77
77
  N(" 立即开始体验 ")
78
78
  ]),
79
79
  _: 1
80
80
  }, 8, ["icon"]),
81
- e.example ? (u(), f(o(de), {
81
+ t.example ? (c(), m(n(se), {
82
82
  key: 0,
83
- onClick: n,
83
+ onClick: o,
84
84
  type: "default",
85
85
  round: "",
86
86
  size: "large",
87
- icon: o(ae)
87
+ icon: n(ae)
88
88
  }, {
89
- default: d(() => [
89
+ default: p(() => [
90
90
  N(" 加载示例项目 ")
91
91
  ]),
92
92
  _: 1
93
- }, 8, ["icon"])) : y("", !0)
93
+ }, 8, ["icon"])) : h("", !0)
94
94
  ])
95
95
  ])
96
96
  ]),
97
- In
97
+ Lo
98
98
  ]));
99
99
  }
100
100
  });
101
- const An = {
101
+ const Qo = {
102
102
  default: 14,
103
103
  small: 12,
104
104
  large: 18
105
- }, Dn = {
105
+ }, Zo = {
106
106
  icon: {
107
107
  type: [String, Object]
108
108
  },
@@ -116,46 +116,46 @@ const An = {
116
116
  src: {
117
117
  type: String
118
118
  }
119
- }, Vn = ["src"], te = /* @__PURE__ */ B({
119
+ }, Jo = ["src"], te = /* @__PURE__ */ E({
120
120
  name: "XIcon",
121
121
  __name: "Icon",
122
- props: Dn,
122
+ props: Zo,
123
123
  setup(a) {
124
- const e = a, t = Ge(), n = pe(), s = v(() => {
125
- if (!e.icon)
124
+ const t = a, e = st(), o = ue(), s = v(() => {
125
+ if (!t.icon)
126
126
  return null;
127
- const c = n?.appContext.app;
128
- return typeof e.icon == "object" ? Pe(e.icon) : c?.component(e.icon) || e.icon;
129
- }), l = v(() => {
130
- const c = {
131
- "is-pointer": !!t.onClick
127
+ const u = o?.appContext.app;
128
+ return typeof t.icon == "object" ? he(t.icon) : u?.component(t.icon) || t.icon;
129
+ }), i = v(() => {
130
+ const u = {
131
+ "is-pointer": !!e.onClick
132
132
  };
133
- return !s.value && e.icon && (c[e.icon] = !0), c;
134
- }), i = v(() => typeof e.size == "number" ? e.size : An[e.size] ?? void 0);
135
- return (c, r) => (u(), f(o(Pt), {
136
- class: U(["x-icon", l.value]),
137
- color: e.color,
138
- size: i.value
133
+ return !s.value && t.icon && (u[t.icon] = !0), u;
134
+ }), l = v(() => typeof t.size == "number" ? t.size : Qo[t.size] ?? void 0);
135
+ return (u, r) => (c(), m(n(Ot), {
136
+ class: W(["x-icon", i.value]),
137
+ color: t.color,
138
+ size: l.value
139
139
  }, {
140
- default: d(() => [
141
- z(c.$slots, "default", {}, () => [
142
- s.value ? (u(), f(Z(s.value), { key: 0 })) : y("", !0),
143
- e.src ? (u(), V("img", {
140
+ default: p(() => [
141
+ z(u.$slots, "default", {}, () => [
142
+ s.value ? (c(), m(L(s.value), { key: 0 })) : h("", !0),
143
+ t.src ? (c(), A("img", {
144
144
  key: 1,
145
- src: e.src
146
- }, null, 8, Vn)) : y("", !0)
145
+ src: t.src
146
+ }, null, 8, Jo)) : h("", !0)
147
147
  ])
148
148
  ]),
149
149
  _: 3
150
150
  }, 8, ["class", "color", "size"]));
151
151
  }
152
- }), Pn = { class: "x-menu__wrapper" }, $n = {
152
+ }), Go = { class: "x-menu__wrapper" }, Yo = {
153
153
  key: 1,
154
154
  class: "x-menu__title"
155
- }, Rn = /* @__PURE__ */ $("i", null, null, -1), Fn = {
155
+ }, qo = /* @__PURE__ */ F("i", null, null, -1), en = {
156
156
  key: 0,
157
157
  class: "x-menu__title"
158
- }, On = /* @__PURE__ */ $("i", null, null, -1), bt = /* @__PURE__ */ B({
158
+ }, tn = /* @__PURE__ */ F("i", null, null, -1), _t = /* @__PURE__ */ E({
159
159
  inheritAttrs: !1,
160
160
  name: "XMenuItem",
161
161
  __name: "MenuItem",
@@ -165,70 +165,70 @@ const An = {
165
165
  defaultIcon: { type: [Object, Function] }
166
166
  },
167
167
  setup(a) {
168
- const e = a, t = pe(), n = (i) => {
169
- if (i)
170
- return typeof i == "string" && (t?.appContext.app?.component(i) || e.defaultIcon) || i;
171
- }, s = (i) => typeof i == "object" ? i : { value: i }, l = (i = []) => i.filter((c) => !c.hidden);
172
- return (i, c) => e.item.children ? (u(), f(o($t), X({
168
+ const t = a, e = ue(), o = (l) => {
169
+ if (l)
170
+ return typeof l == "string" && (e?.appContext.app?.component(l) || t.defaultIcon) || l;
171
+ }, s = (l) => typeof l == "object" ? l : { value: l }, i = (l = []) => l.filter((u) => !u.hidden);
172
+ return (l, u) => t.item.children ? (c(), m(n(jt), X({
173
173
  key: 0,
174
- disabled: e.item.disabled
175
- }, e.subMenu, {
176
- index: String(e.item.id)
174
+ disabled: t.item.disabled
175
+ }, t.subMenu, {
176
+ index: String(t.item.id)
177
177
  }), {
178
- title: d(() => [
179
- $("div", Pn, [
180
- e.item.icon ? (u(), f(o(te), {
178
+ title: p(() => [
179
+ F("div", Go, [
180
+ t.item.icon ? (c(), m(n(te), {
181
181
  key: 0,
182
- icon: n(e.item.icon)
183
- }, null, 8, ["icon"])) : y("", !0),
184
- e.item.title ? (u(), V("span", $n, O(e.item.title), 1)) : y("", !0),
185
- e.item.badge ? (u(), f(o(Ae), X({
182
+ icon: o(t.item.icon)
183
+ }, null, 8, ["icon"])) : h("", !0),
184
+ t.item.title ? (c(), A("span", Yo, j(t.item.title), 1)) : h("", !0),
185
+ t.item.badge ? (c(), m(n(Re), X({
186
186
  key: 2,
187
187
  class: "x-menu__badge"
188
- }, s(e.item.badge)), {
189
- default: d(() => [
190
- Rn
188
+ }, s(t.item.badge)), {
189
+ default: p(() => [
190
+ qo
191
191
  ]),
192
192
  _: 1
193
- }, 16)) : y("", !0)
193
+ }, 16)) : h("", !0)
194
194
  ])
195
195
  ]),
196
- default: d(() => [
197
- (u(!0), V(q, null, ke(l(e.item.children), (r) => (u(), f(o(bt), {
196
+ default: p(() => [
197
+ (c(!0), A(Z, null, le(i(t.item.children), (r) => (c(), m(n(_t), {
198
198
  key: r.id,
199
199
  item: r,
200
- subMenu: e.subMenu,
201
- defaultIcon: e.defaultIcon
200
+ subMenu: t.subMenu,
201
+ defaultIcon: t.defaultIcon
202
202
  }, null, 8, ["item", "subMenu", "defaultIcon"]))), 128))
203
203
  ]),
204
204
  _: 1
205
- }, 16, ["disabled", "index"])) : (u(), f(o(Rt), {
205
+ }, 16, ["disabled", "index"])) : (c(), m(n(Nt), {
206
206
  key: 1,
207
- index: String(e.item.id),
208
- disabled: e.item.disabled
207
+ index: String(t.item.id),
208
+ disabled: t.item.disabled
209
209
  }, {
210
- title: d(() => [
211
- e.item.title ? (u(), V("span", Fn, O(e.item.title), 1)) : y("", !0),
212
- e.item.badge ? (u(), f(o(Ae), X({
210
+ title: p(() => [
211
+ t.item.title ? (c(), A("span", en, j(t.item.title), 1)) : h("", !0),
212
+ t.item.badge ? (c(), m(n(Re), X({
213
213
  key: 1,
214
214
  class: "x-menu__badge"
215
- }, s(e.item.badge)), {
216
- default: d(() => [
217
- On
215
+ }, s(t.item.badge)), {
216
+ default: p(() => [
217
+ tn
218
218
  ]),
219
219
  _: 1
220
- }, 16)) : y("", !0)
220
+ }, 16)) : h("", !0)
221
221
  ]),
222
- default: d(() => [
223
- e.item.icon ? (u(), f(o(te), {
222
+ default: p(() => [
223
+ t.item.icon ? (c(), m(n(te), {
224
224
  key: 0,
225
- icon: n(e.item.icon)
226
- }, null, 8, ["icon"])) : y("", !0)
225
+ icon: o(t.item.icon)
226
+ }, null, 8, ["icon"])) : h("", !0)
227
227
  ]),
228
228
  _: 1
229
229
  }, 8, ["index", "disabled"]));
230
230
  }
231
- }), G = /* @__PURE__ */ B({
231
+ }), ee = /* @__PURE__ */ E({
232
232
  inheritAttrs: !1,
233
233
  name: "XMenu",
234
234
  __name: "Menu",
@@ -238,36 +238,36 @@ const An = {
238
238
  defaultIcon: {}
239
239
  },
240
240
  emits: ["select"],
241
- setup(a, { emit: e }) {
242
- const t = a, n = v(() => t.data.filter((i) => !i.hidden)), s = (i, c) => {
243
- const r = (p, m = []) => {
244
- for (const h of m) {
245
- if (h.id.toString() === p.toString())
246
- return h;
247
- if (h.children?.length) {
248
- const k = r(p, h.children);
249
- if (k)
250
- return k;
241
+ setup(a, { emit: t }) {
242
+ const e = a, o = v(() => e.data.filter((l) => !l.hidden)), s = (l, u) => {
243
+ const r = (d, f = []) => {
244
+ for (const y of f) {
245
+ if (y.id.toString() === d.toString())
246
+ return y;
247
+ if (y.children?.length) {
248
+ const S = r(d, y.children);
249
+ if (S)
250
+ return S;
251
251
  }
252
252
  }
253
253
  };
254
- return r(c, i);
255
- }, l = (i) => {
256
- const c = s(n.value, i);
257
- c && e("select", c);
254
+ return r(u, l);
255
+ }, i = (l) => {
256
+ const u = s(o.value, l);
257
+ u && t("select", u);
258
258
  };
259
- return (i, c) => (u(), f(o(Ft), X({ class: "x-menu" }, i.$attrs, { onSelect: l }), {
260
- default: d(() => [
261
- (u(!0), V(q, null, ke(n.value, (r) => (u(), f(o(bt), {
262
- item: { ...r, icon: r.icon || o(rt) },
263
- defaultIcon: t.defaultIcon,
264
- subMenu: t.subMenu
259
+ return (l, u) => (c(), m(n(Xt), X({ class: "x-menu" }, l.$attrs, { onSelect: i }), {
260
+ default: p(() => [
261
+ (c(!0), A(Z, null, le(o.value, (r) => (c(), m(n(_t), {
262
+ item: { ...r, icon: r.icon || n(dt) },
263
+ defaultIcon: e.defaultIcon,
264
+ subMenu: e.subMenu
265
265
  }, null, 8, ["item", "defaultIcon", "subMenu"]))), 256))
266
266
  ]),
267
267
  _: 1
268
268
  }, 16));
269
269
  }
270
- }), jn = { class: "x-simple-mask__brand" }, Nn = { class: "x-simple-mask__aciton" }, Xn = /* @__PURE__ */ B({
270
+ }), on = { class: "x-simple-mask__brand" }, nn = { class: "x-simple-mask__aciton" }, an = /* @__PURE__ */ E({
271
271
  name: "XSimpleMask",
272
272
  __name: "SimpleMask",
273
273
  props: {
@@ -278,54 +278,54 @@ const An = {
278
278
  }) },
279
279
  menu: {}
280
280
  },
281
- setup(a, { expose: e }) {
282
- const t = a, n = xe(), s = Fe(), l = v(() => s.params.id), i = () => {
283
- const r = t.project.home;
284
- r && n.push(r);
285
- }, c = (r) => {
286
- const p = r?.id;
287
- if (p) {
288
- const h = `${t.preview ? "/preview" : t.project.page}/${p}`;
289
- n.push(h);
281
+ setup(a, { expose: t }) {
282
+ const e = a, o = Me(), s = Ue(), i = v(() => s.params.id), l = () => {
283
+ const r = e.project.home;
284
+ r && o.push(r);
285
+ }, u = (r) => {
286
+ const d = r?.id;
287
+ if (d) {
288
+ const y = `${e.preview ? "/preview" : e.project.page}/${d}`;
289
+ o.push(y);
290
290
  }
291
291
  };
292
- return e({
293
- goHome: i
294
- }), (r, p) => (u(), f(o(He), { class: "x-simple-mask" }, {
295
- default: d(() => [
296
- b(o(Ot), { class: "x-simple-mask__header" }, {
297
- default: d(() => [
298
- $("div", jn, [
299
- $("span", {
292
+ return t({
293
+ goHome: l
294
+ }), (r, d) => (c(), m(n(Ge), { class: "x-simple-mask" }, {
295
+ default: p(() => [
296
+ k(n(Ut), { class: "x-simple-mask__header" }, {
297
+ default: p(() => [
298
+ F("div", on, [
299
+ F("span", {
300
300
  class: "x-simple-mask__logo",
301
- onClick: i
301
+ onClick: l
302
302
  }, [
303
303
  z(r.$slots, "logo", {}, () => [
304
- N(O(t.project.name), 1)
304
+ N(j(e.project.name), 1)
305
305
  ])
306
306
  ])
307
307
  ]),
308
- $("div", Nn, [
308
+ F("div", nn, [
309
309
  z(r.$slots, "action")
310
310
  ])
311
311
  ]),
312
312
  _: 3
313
313
  }),
314
- b(o(He), null, {
315
- default: d(() => [
316
- b(o(jt), { class: "x-simple-mask__aside" }, {
317
- default: d(() => [
318
- b(o(G), X(t.menu, {
319
- "default-active": l.value,
320
- onSelect: c
314
+ k(n(Ge), null, {
315
+ default: p(() => [
316
+ k(n(Ht), { class: "x-simple-mask__aside" }, {
317
+ default: p(() => [
318
+ k(n(ee), X(e.menu, {
319
+ "default-active": i.value,
320
+ onSelect: u
321
321
  }), null, 16, ["default-active"])
322
322
  ]),
323
323
  _: 1
324
324
  }),
325
- b(o(Nt), { class: "x-simple-mask__main" }, {
326
- default: d(() => [
325
+ k(n(Wt), { class: "x-simple-mask__main" }, {
326
+ default: p(() => [
327
327
  z(r.$slots, "default", {}, () => [
328
- b(o(pt))
328
+ k(n(gt))
329
329
  ])
330
330
  ]),
331
331
  _: 3
@@ -333,21 +333,21 @@ const An = {
333
333
  ]),
334
334
  _: 3
335
335
  }),
336
- r.$slots.footer ? (u(), f(o(Xt), {
336
+ r.$slots.footer ? (c(), m(n(Lt), {
337
337
  key: 0,
338
338
  class: "x-simple-mask__footer",
339
339
  height: "40px"
340
340
  }, {
341
- default: d(() => [
341
+ default: p(() => [
342
342
  z(r.$slots, "footer")
343
343
  ]),
344
344
  _: 3
345
- })) : y("", !0)
345
+ })) : h("", !0)
346
346
  ]),
347
347
  _: 3
348
348
  }));
349
349
  }
350
- }), _t = {
350
+ }), kt = {
351
351
  /**
352
352
  * 动作名称标识
353
353
  */
@@ -443,132 +443,132 @@ const An = {
443
443
  type: Boolean
444
444
  }
445
445
  };
446
- function Un(a) {
446
+ function sn(a) {
447
447
  return v(() => {
448
- const e = a.tooltip;
449
- if (e)
450
- return typeof e == "string" ? { content: e } : e;
448
+ const t = a.tooltip;
449
+ if (t)
450
+ return typeof t == "string" ? { content: t } : t;
451
451
  });
452
452
  }
453
- function Hn(a) {
453
+ function ln(a) {
454
454
  return v(() => {
455
- const e = a.badge;
456
- if (e)
457
- return typeof e == "object" ? e : { value: e };
455
+ const t = a.badge;
456
+ if (t)
457
+ return typeof t == "object" ? t : { value: t };
458
458
  });
459
459
  }
460
- function Ln(a) {
460
+ function rn(a) {
461
461
  return v(() => {
462
- const { dropdown: e, menus: t } = a;
463
- if (t && t.length > 0)
462
+ const { dropdown: t, menus: e } = a;
463
+ if (e && e.length > 0)
464
464
  return Object.assign(
465
465
  { popperClass: "x-action__menus", size: a.size },
466
- e || {}
466
+ t || {}
467
467
  );
468
468
  });
469
469
  }
470
- function Wn(a) {
471
- const e = pe();
470
+ function cn(a) {
471
+ const t = ue();
472
472
  return v(() => {
473
- const t = o(a);
474
- if (t)
475
- if (typeof t == "string" || t.setup || t.render || Mt(t)) {
476
- const n = e?.appContext.app;
473
+ const e = n(a);
474
+ if (e)
475
+ if (typeof e == "string" || e.setup || e.render || $t(e)) {
476
+ const o = t?.appContext.app;
477
477
  return {
478
- icon: typeof t == "string" && n?.component(t) || t
478
+ icon: typeof e == "string" && o?.component(e) || e
479
479
  };
480
480
  } else
481
- return t;
481
+ return e;
482
482
  return null;
483
483
  });
484
484
  }
485
- function we(a) {
486
- const e = Wn(a);
487
- return e.value ? Pe(B({ render: () => Y(te, e.value) })) : null;
485
+ function Ce(a) {
486
+ const t = cn(a);
487
+ return t.value ? he(E({ render: () => q(te, t.value) })) : null;
488
488
  }
489
- function Oe(a, e) {
489
+ function Le(a, t) {
490
490
  return v(() => {
491
- const t = o(a);
492
- return typeof t == "function" ? t(e) : !!t;
491
+ const e = n(a);
492
+ return typeof e == "function" ? e(t) : !!e;
493
493
  });
494
494
  }
495
- const Qn = { key: 0 }, Zn = /* @__PURE__ */ B({
495
+ const un = { key: 0 }, dn = /* @__PURE__ */ E({
496
496
  __name: "Trigger",
497
- props: _t,
497
+ props: kt,
498
498
  emits: ["click"],
499
- setup(a, { emit: e }) {
500
- const t = a, n = we(ve(t, "icon")), s = Oe(ve(t, "disabled")), l = v(() => ({
501
- [`is-${t.mode}`]: !!t.mode,
502
- [`is-${t.type}`]: !!t.type,
503
- [`is-${t.size}`]: !!t.size && t.size !== "default",
504
- [`is-background-${t.background}`]: t.mode === "icon" && !!t.background,
505
- "is-disabled": !!t.disabled,
506
- "is-circle": !!t.circle
507
- })), i = () => {
508
- e("click");
499
+ setup(a, { emit: t }) {
500
+ const e = a, o = Ce(xe(e, "icon")), s = Le(xe(e, "disabled")), i = v(() => ({
501
+ [`is-${e.mode}`]: !!e.mode,
502
+ [`is-${e.type}`]: !!e.type,
503
+ [`is-${e.size}`]: !!e.size && e.size !== "default",
504
+ [`is-background-${e.background}`]: e.mode === "icon" && !!e.background,
505
+ "is-disabled": !!e.disabled,
506
+ "is-circle": !!e.circle
507
+ })), l = () => {
508
+ t("click");
509
509
  };
510
- return (c, r) => t.mode === "button" ? (u(), f(o(de), X({
510
+ return (u, r) => e.mode === "button" ? (c(), m(n(se), X({
511
511
  key: 0,
512
- icon: o(n),
513
- type: t.type,
514
- size: t.size,
515
- disabled: o(s)
516
- }, t.button, { onClick: i }), {
517
- default: d(() => [
518
- N(O(c.label), 1)
512
+ icon: n(o),
513
+ type: e.type,
514
+ size: e.size,
515
+ disabled: n(s)
516
+ }, e.button, { onClick: l }), {
517
+ default: p(() => [
518
+ N(j(u.label), 1)
519
519
  ]),
520
520
  _: 1
521
- }, 16, ["icon", "type", "size", "disabled"])) : (u(), V("div", {
521
+ }, 16, ["icon", "type", "size", "disabled"])) : (c(), A("div", {
522
522
  key: 1,
523
- class: U(["x-action__inner", l.value]),
524
- onClick: i
523
+ class: W(["x-action__inner", i.value]),
524
+ onClick: l
525
525
  }, [
526
- (u(), f(Z(o(n)))),
527
- c.label ? (u(), V("span", Qn, O(c.label), 1)) : y("", !0)
526
+ (c(), m(L(n(o)))),
527
+ u.label ? (c(), A("span", un, j(u.label), 1)) : h("", !0)
528
528
  ], 2));
529
529
  }
530
- }), Q = /* @__PURE__ */ B({
530
+ }), J = /* @__PURE__ */ E({
531
531
  name: "XAction",
532
532
  __name: "Action",
533
- props: _t,
533
+ props: kt,
534
534
  emits: ["click", "command"],
535
- setup(a, { emit: e }) {
536
- const t = a, n = Et(), s = Un(t), l = Hn(t), i = Ln(t), c = Oe(ve(t, "disabled")), r = v(() => ({
537
- [`x-action--${t.mode}`]: !!t.mode
538
- })), p = () => {
539
- e("click", t);
540
- }, m = (w) => {
541
- const E = t.menus?.find((D) => D.command === w);
542
- E && e("command", E);
543
- }, h = (w) => Y(Ae, l.value, () => [].concat(w)), k = (w) => Y(
544
- Ut,
545
- { ...i.value, disabled: c.value, onCommand: m },
535
+ setup(a, { emit: t }) {
536
+ const e = a, o = Vt(), s = sn(e), i = ln(e), l = rn(e), u = Le(xe(e, "disabled")), r = v(() => ({
537
+ [`x-action--${e.mode}`]: !!e.mode
538
+ })), d = () => {
539
+ t("click", e);
540
+ }, f = (_) => {
541
+ const T = e.menus?.find((V) => V.command === _);
542
+ T && t("command", T);
543
+ }, y = (_) => q(Re, i.value, () => [].concat(_)), S = (_) => q(
544
+ Kt,
545
+ { ...l.value, disabled: u.value, onCommand: f },
546
546
  {
547
- default: () => [w],
547
+ default: () => [_],
548
548
  dropdown: () => [
549
- Y(
550
- Ht,
551
- () => (t.menus || []).map((E) => Y(
552
- Lt,
553
- E,
554
- () => n.item ? n.item({ item: E }) : E.label
549
+ q(
550
+ Qt,
551
+ () => (e.menus || []).map((T) => q(
552
+ Zt,
553
+ T,
554
+ () => o.item ? o.item({ item: T }) : T.label
555
555
  ))
556
556
  )
557
557
  ]
558
558
  }
559
- ), A = (w) => Y(st, { ...s.value, disabled: c.value }, () => [
560
- w
561
- ]), _ = v(() => {
562
- let w = n.default ? n.default()[0] : Y(Pe(Zn), { ...t, onClick: p });
563
- return l.value && (w = h(w)), i.value && (w = k(w)), s.value && (w = A(w)), w;
559
+ ), $ = (_) => q(ct, { ...s.value, disabled: u.value }, () => [
560
+ _
561
+ ]), w = v(() => {
562
+ let _ = o.default ? o.default()[0] : q(he(dn), { ...e, onClick: d });
563
+ return i.value && (_ = y(_)), l.value && (_ = S(_)), s.value && (_ = $(_)), _;
564
564
  });
565
- return (w, E) => (u(), V("div", {
566
- class: U(["x-action", r.value])
565
+ return (_, T) => (c(), A("div", {
566
+ class: W(["x-action", r.value])
567
567
  }, [
568
- (u(), f(Z(_.value)))
568
+ (c(), m(L(w.value)))
569
569
  ], 2));
570
570
  }
571
- }), Jn = {
571
+ }), pn = {
572
572
  /**
573
573
  * 动作项
574
574
  */
@@ -639,57 +639,57 @@ const Qn = { key: 0 }, Zn = /* @__PURE__ */ B({
639
639
  button: {
640
640
  type: Object
641
641
  }
642
- }, je = /* @__PURE__ */ B({
642
+ }, Ke = /* @__PURE__ */ E({
643
643
  name: "XActionBar",
644
644
  __name: "ActionBar",
645
- props: Jn,
645
+ props: pn,
646
646
  emits: ["click", "command"],
647
- setup(a, { emit: e }) {
648
- const t = a, n = v(() => (t.items || []).map((i) => i === "|" ? i : {
649
- ...i,
650
- badge: i.badge ? {
651
- ...t.badge,
652
- ...typeof i.badge == "object" ? i.badge || {} : { value: i.badge }
647
+ setup(a, { emit: t }) {
648
+ const e = a, o = v(() => (e.items || []).map((l) => l === "|" ? l : {
649
+ ...l,
650
+ badge: l.badge ? {
651
+ ...e.badge,
652
+ ...typeof l.badge == "object" ? l.badge || {} : { value: l.badge }
653
653
  } : void 0,
654
- tooltip: i.tooltip ? {
655
- ...t.tooltip,
656
- ...typeof i.tooltip == "object" ? i.tooltip || {} : { content: i.tooltip }
654
+ tooltip: l.tooltip ? {
655
+ ...e.tooltip,
656
+ ...typeof l.tooltip == "object" ? l.tooltip || {} : { content: l.tooltip }
657
657
  } : void 0
658
- })), s = (i) => {
659
- e("click", i);
660
- }, l = (i, c) => {
661
- e("command", i, c);
658
+ })), s = (l) => {
659
+ t("click", l);
660
+ }, i = (l, u) => {
661
+ t("command", l, u);
662
662
  };
663
- return (i, c) => (u(), f(o(M), {
663
+ return (l, u) => (c(), m(n(I), {
664
664
  class: "x-action-bar",
665
665
  align: "center"
666
666
  }, {
667
- default: d(() => [
668
- (u(!0), V(q, null, ke(n.value, (r) => (u(), V(q, null, [
669
- r === "|" ? (u(), f(o(ue), {
667
+ default: p(() => [
668
+ (c(!0), A(Z, null, le(o.value, (r) => (c(), A(Z, null, [
669
+ r === "|" ? (c(), m(n(me), {
670
670
  key: 0,
671
671
  direction: "vertical",
672
672
  class: "x-action-bar__divider"
673
- })) : (u(), f(o(Q), X({
673
+ })) : (c(), m(n(J), X({
674
674
  key: 1,
675
- mode: t.mode,
676
- size: t.size,
677
- type: t.type,
678
- circle: t.circle,
679
- background: t.background,
680
- button: t.button,
681
- dropdown: t.dropdown,
682
- disabled: o(Oe)(t.disabled, r).value
675
+ mode: e.mode,
676
+ size: e.size,
677
+ type: e.type,
678
+ circle: e.circle,
679
+ background: e.background,
680
+ button: e.button,
681
+ dropdown: e.dropdown,
682
+ disabled: n(Le)(e.disabled, r).value
683
683
  }, r, {
684
684
  onClick: s,
685
- onCommand: (p) => l(r, p)
685
+ onCommand: (d) => i(r, d)
686
686
  }), null, 16, ["mode", "size", "type", "circle", "background", "button", "dropdown", "disabled", "onCommand"]))
687
687
  ], 64))), 256))
688
688
  ]),
689
689
  _: 1
690
690
  }));
691
691
  }
692
- }), Kn = {
692
+ }), fn = {
693
693
  /**
694
694
  * 组件渲染html标签
695
695
  */
@@ -798,49 +798,49 @@ const Qn = { key: 0 }, Zn = /* @__PURE__ */ B({
798
798
  type: Boolean,
799
799
  default: !1
800
800
  }
801
- }, M = /* @__PURE__ */ B({
801
+ }, I = /* @__PURE__ */ E({
802
802
  name: "XContainer",
803
803
  __name: "Container",
804
- props: Kn,
804
+ props: fn,
805
805
  setup(a) {
806
- const e = a, t = pe(), n = v(() => {
807
- const i = t?.parent;
808
- if (!i)
806
+ const t = a, e = ue(), o = v(() => {
807
+ const l = e?.parent;
808
+ if (!l)
809
809
  return !1;
810
- const c = i.proxy;
811
- return c.$options.name === "XContainer" || !!c.flex;
810
+ const u = l.proxy;
811
+ return u.$options.name === "XContainer" || !!u.flex;
812
812
  }), s = v(() => ({
813
- "is-fit": e.fit,
814
- "is-flex": e.flex && !e.inline,
815
- "is-inline-flex": e.flex && e.inline,
816
- [`is-direction-${e.direction}`]: e.flex && e.direction !== "row",
817
- [`is-wrap-${e.wrap}`]: e.flex && e.wrap !== "nowrap",
818
- [`is-justify-${e.justify}`]: e.flex && e.justify !== "flex-start",
819
- [`is-align-${e.align}`]: e.flex && e.align !== "flex-start",
820
- [`is-align-content-${e.alignContent}`]: e.flex && e.alignContent !== "stretch",
821
- "is-grow": e.grow ?? n.value,
822
- "is-shrink": n.value && e.shrink,
823
- [`is-align-self-${e.alignSelf}`]: n.value && e.alignSelf !== "auto",
824
- [`is-overflow-${e.overflow}`]: !!e.overflow,
825
- "is-padding": !!e.padding
826
- })), l = v(() => {
827
- const { width: i, height: c, fit: r } = e;
813
+ "is-fit": t.fit,
814
+ "is-flex": t.flex && !t.inline,
815
+ "is-inline-flex": t.flex && t.inline,
816
+ [`is-direction-${t.direction}`]: t.flex && t.direction !== "row",
817
+ [`is-wrap-${t.wrap}`]: t.flex && t.wrap !== "nowrap",
818
+ [`is-justify-${t.justify}`]: t.flex && t.justify !== "flex-start",
819
+ [`is-align-${t.align}`]: t.flex && t.align !== "flex-start",
820
+ [`is-align-content-${t.alignContent}`]: t.flex && t.alignContent !== "stretch",
821
+ "is-grow": t.grow ?? o.value,
822
+ "is-shrink": o.value && t.shrink,
823
+ [`is-align-self-${t.alignSelf}`]: o.value && t.alignSelf !== "auto",
824
+ [`is-overflow-${t.overflow}`]: !!t.overflow,
825
+ "is-padding": !!t.padding
826
+ })), i = v(() => {
827
+ const { width: l, height: u, fit: r } = t;
828
828
  return r ? null : {
829
- width: i ? We(i) : void 0,
830
- height: c ? We(c) : void 0
829
+ width: l ? je(l) : void 0,
830
+ height: u ? je(u) : void 0
831
831
  };
832
832
  });
833
- return (i, c) => (u(), f(Z(e.tag), {
834
- class: U(["x-container", s.value]),
835
- style: be(l.value)
833
+ return (l, u) => (c(), m(L(t.tag), {
834
+ class: W(["x-container", s.value]),
835
+ style: Se(i.value)
836
836
  }, {
837
- default: d(() => [
838
- z(i.$slots, "default")
837
+ default: p(() => [
838
+ z(l.$slots, "default")
839
839
  ]),
840
840
  _: 3
841
841
  }, 8, ["class", "style"]));
842
842
  }
843
- }), Yn = {
843
+ }), mn = {
844
844
  size: {
845
845
  type: String,
846
846
  default: "default"
@@ -861,65 +861,65 @@ const Qn = { key: 0 }, Zn = /* @__PURE__ */ B({
861
861
  more: {
862
862
  type: Boolean
863
863
  }
864
- }, Gn = {
864
+ }, gn = {
865
865
  key: 2,
866
866
  class: "x-header__subtitle"
867
- }, qn = {
867
+ }, yn = {
868
868
  key: 0,
869
869
  class: "x-header__actions"
870
- }, wt = /* @__PURE__ */ B({
870
+ }, wt = /* @__PURE__ */ E({
871
871
  name: "XHeader",
872
872
  inheritAttrs: !1,
873
873
  __name: "Header",
874
- props: Yn,
874
+ props: mn,
875
875
  setup(a) {
876
- const e = a, t = Ge(), n = we(ve(e, "icon")), s = v(() => ({
877
- [`is-size-${e.size}`]: !!e.size && e.size !== "default",
878
- "is-border": e.border,
879
- "is-pointer": !!t.onClick
876
+ const t = a, e = st(), o = Ce(xe(t, "icon")), s = v(() => ({
877
+ [`is-size-${t.size}`]: !!t.size && t.size !== "default",
878
+ "is-border": t.border,
879
+ "is-pointer": !!e.onClick
880
880
  }));
881
- return (l, i) => (u(), f(o(M), {
882
- class: U(["x-header", s.value]),
881
+ return (i, l) => (c(), m(n(I), {
882
+ class: W(["x-header", s.value]),
883
883
  justify: "space-between",
884
884
  align: "center"
885
885
  }, {
886
- default: d(() => [
887
- b(o(M), {
886
+ default: p(() => [
887
+ k(n(I), {
888
888
  align: "center",
889
- class: U(["x-header__wrapper", s.value]),
889
+ class: W(["x-header__wrapper", s.value]),
890
890
  grow: ""
891
891
  }, {
892
- default: d(() => [
893
- o(n) ? (u(), f(Z(o(n)), {
892
+ default: p(() => [
893
+ n(o) ? (c(), m(L(n(o)), {
894
894
  key: 0,
895
895
  class: "x-header__icon"
896
- })) : y("", !0),
897
- $("span", X({ class: "x-header__content" }, l.$attrs), [
898
- z(l.$slots, "default", {}, () => [
899
- N(O(e.content), 1)
896
+ })) : h("", !0),
897
+ F("span", X({ class: "x-header__content" }, i.$attrs), [
898
+ z(i.$slots, "default", {}, () => [
899
+ N(j(t.content), 1)
900
900
  ])
901
901
  ], 16),
902
- e.more ? (u(), f(o(te), {
902
+ t.more ? (c(), m(n(te), {
903
903
  key: 1,
904
904
  class: "x-header__more",
905
- icon: o(tn)
906
- }, null, 8, ["icon"])) : y("", !0),
907
- e.subtitle || l.$slots.subtitle ? (u(), V("span", Gn, [
908
- z(l.$slots, "subtitle", {}, () => [
909
- N(O(e.subtitle), 1)
905
+ icon: n(ho)
906
+ }, null, 8, ["icon"])) : h("", !0),
907
+ t.subtitle || i.$slots.subtitle ? (c(), A("span", gn, [
908
+ z(i.$slots, "subtitle", {}, () => [
909
+ N(j(t.subtitle), 1)
910
910
  ])
911
- ])) : y("", !0)
911
+ ])) : h("", !0)
912
912
  ]),
913
913
  _: 3
914
914
  }, 8, ["class"]),
915
- l.$slots.actions ? (u(), V("div", qn, [
916
- z(l.$slots, "actions")
917
- ])) : y("", !0)
915
+ i.$slots.actions ? (c(), A("div", yn, [
916
+ z(i.$slots, "actions")
917
+ ])) : h("", !0)
918
918
  ]),
919
919
  _: 3
920
920
  }, 8, ["class"]));
921
921
  }
922
- }), eo = {
922
+ }), hn = {
923
923
  /**
924
924
  * 宽高自适应
925
925
  */
@@ -991,254 +991,254 @@ const Qn = { key: 0 }, Zn = /* @__PURE__ */ B({
991
991
  footer: {
992
992
  type: Object
993
993
  }
994
- }, kt = /* @__PURE__ */ B({
994
+ }, xt = /* @__PURE__ */ E({
995
995
  name: "XPanel",
996
996
  __name: "Panel",
997
- props: eo,
998
- setup(a, { expose: e }) {
999
- const t = a, n = R(), s = v(() => ({
1000
- "x-panel--card": !!t.card,
1001
- "x-panel--default": !t.card,
1002
- [`is-${t.size}`]: !!t.size && t.size !== "default",
1003
- "is-border": !!t.border,
1004
- "is-radius": !!t.radius,
1005
- [`is-shadow-${t.shadow}`]: !!t.shadow && t.shadow !== "none"
1006
- })), l = v(() => t.header === null ? null : typeof t.header == "string" ? {
1007
- content: t.header,
1008
- size: t.size
997
+ props: hn,
998
+ setup(a, { expose: t }) {
999
+ const e = a, o = O(), s = v(() => ({
1000
+ "x-panel--card": !!e.card,
1001
+ "x-panel--default": !e.card,
1002
+ [`is-${e.size}`]: !!e.size && e.size !== "default",
1003
+ "is-border": !!e.border,
1004
+ "is-radius": !!e.radius,
1005
+ [`is-shadow-${e.shadow}`]: !!e.shadow && e.shadow !== "none"
1006
+ })), i = v(() => e.header === null ? null : typeof e.header == "string" ? {
1007
+ content: e.header,
1008
+ size: e.size
1009
1009
  } : {
1010
- ...t.header,
1011
- size: t.size
1012
- }), i = v(() => t.fit || t.height ? "auto" : void 0);
1013
- return e({
1014
- bodyRef: n
1015
- }), (c, r) => (u(), f(o(M), {
1016
- class: U(["x-panel", s.value]),
1010
+ ...e.header,
1011
+ size: e.size
1012
+ }), l = v(() => e.fit || e.height ? "auto" : void 0);
1013
+ return t({
1014
+ bodyRef: o
1015
+ }), (u, r) => (c(), m(n(I), {
1016
+ class: W(["x-panel", s.value]),
1017
1017
  direction: "column",
1018
- fit: t.fit,
1019
- width: t.width,
1020
- height: t.height
1018
+ fit: e.fit,
1019
+ width: e.width,
1020
+ height: e.height
1021
1021
  }, {
1022
- default: d(() => [
1023
- l.value ? (u(), f(o(M), {
1022
+ default: p(() => [
1023
+ i.value ? (c(), m(n(I), {
1024
1024
  key: 0,
1025
1025
  flex: !1,
1026
1026
  class: "x-panel__header"
1027
1027
  }, {
1028
- default: d(() => [
1029
- z(c.$slots, "header", {}, () => [
1030
- b(o(wt), qe(et(l.value)), {
1031
- default: d(() => [
1032
- z(c.$slots, "title")
1028
+ default: p(() => [
1029
+ z(u.$slots, "header", {}, () => [
1030
+ k(n(wt), Te(Ee(i.value)), {
1031
+ default: p(() => [
1032
+ z(u.$slots, "title")
1033
1033
  ]),
1034
- actions: d(() => [
1035
- z(c.$slots, "actions")
1034
+ actions: p(() => [
1035
+ z(u.$slots, "actions")
1036
1036
  ]),
1037
1037
  _: 3
1038
1038
  }, 16)
1039
1039
  ])
1040
1040
  ]),
1041
1041
  _: 3
1042
- })) : y("", !0),
1043
- b(o(M), X({
1042
+ })) : h("", !0),
1043
+ k(n(I), X({
1044
1044
  ref_key: "bodyRef",
1045
- ref: n,
1045
+ ref: o,
1046
1046
  flex: !1,
1047
- overflow: i.value,
1047
+ overflow: l.value,
1048
1048
  grow: "",
1049
1049
  padding: "",
1050
1050
  class: "x-panel__body"
1051
- }, t.body), {
1052
- default: d(() => [
1053
- z(c.$slots, "default")
1051
+ }, e.body), {
1052
+ default: p(() => [
1053
+ z(u.$slots, "default")
1054
1054
  ]),
1055
1055
  _: 3
1056
1056
  }, 16, ["overflow"]),
1057
- c.$slots.footer ? (u(), f(o(M), X({
1057
+ u.$slots.footer ? (c(), m(n(I), X({
1058
1058
  key: 1,
1059
1059
  flex: !1,
1060
1060
  padding: "",
1061
1061
  class: "x-panel__footer"
1062
- }, t.footer), {
1063
- default: d(() => [
1064
- z(c.$slots, "footer")
1062
+ }, e.footer), {
1063
+ default: p(() => [
1064
+ z(u.$slots, "footer")
1065
1065
  ]),
1066
1066
  _: 3
1067
- }, 16)) : y("", !0)
1067
+ }, 16)) : h("", !0)
1068
1068
  ]),
1069
1069
  _: 3
1070
1070
  }, 8, ["class", "fit", "width", "height"]));
1071
1071
  }
1072
- }), Ze = "user-select-none";
1073
- class Je {
1074
- constructor(e, t = {}) {
1075
- this.el = e, this.options = t, this.scope = tt(), this.scope.run(() => {
1072
+ }), tt = "user-select-none";
1073
+ class ot {
1074
+ constructor(t, e = {}) {
1075
+ this.el = t, this.options = e, this.scope = lt(), this.scope.run(() => {
1076
1076
  this.init();
1077
1077
  });
1078
1078
  }
1079
1079
  scope;
1080
1080
  dragging = !1;
1081
1081
  getHandle() {
1082
- const { selector: e, handle: t } = this.options;
1083
- return e ? this.el.querySelector(e) : t;
1082
+ const { selector: t, handle: e } = this.options;
1083
+ return t ? this.el.querySelector(t) : e;
1084
1084
  }
1085
1085
  getTarget() {
1086
- const { target: e = "body" } = this.options;
1087
- return typeof e == "string" ? document.querySelector(e) : o(e) || document.body;
1086
+ const { target: t = "body" } = this.options;
1087
+ return typeof t == "string" ? document.querySelector(t) : n(t) || document.body;
1088
1088
  }
1089
1089
  init() {
1090
- const { el: e, options: t } = this, { disabled: n, delay: s = 150, onStart: l, onEnd: i } = t;
1091
- if (n)
1090
+ const { el: t, options: e } = this, { disabled: o, delay: s = 150, onStart: i, onEnd: l } = e;
1091
+ if (o)
1092
1092
  return;
1093
- let c = null;
1094
- const r = this.getHandle(), p = this.getTarget();
1095
- let m = e.getBoundingClientRect(), h = null;
1096
- const { x: k, y: A } = vn(e, {
1097
- initialValue: { x: m.x, y: m.y },
1098
- ...t,
1093
+ let u = null;
1094
+ const r = this.getHandle(), d = this.getTarget();
1095
+ let f = t.getBoundingClientRect(), y = null;
1096
+ const { x: S, y: $ } = $o(t, {
1097
+ initialValue: { x: f.x, y: f.y },
1098
+ ...e,
1099
1099
  handle: r,
1100
- onStart: (_, w) => {
1101
- document.body.classList.add(Ze), clearTimeout(c), c = setTimeout(() => {
1102
- this.dragging = !0, m = e.getBoundingClientRect(), h = p?.getBoundingClientRect(), l && l(_, w);
1100
+ onStart: (w, _) => {
1101
+ document.body.classList.add(tt), clearTimeout(u), u = setTimeout(() => {
1102
+ this.dragging = !0, f = t.getBoundingClientRect(), y = d?.getBoundingClientRect(), i && i(w, _);
1103
1103
  }, s);
1104
1104
  },
1105
- onEnd: (_, w) => {
1106
- if (clearTimeout(c), document.body.classList.remove(Ze), this.dragging && h) {
1105
+ onEnd: (w, _) => {
1106
+ if (clearTimeout(u), document.body.classList.remove(tt), this.dragging && y) {
1107
1107
  this.dragging = !1;
1108
- const { x: E, y: D } = _, g = this.getPosition(h, m, E, D);
1109
- i && i(g, w), h = null;
1108
+ const { x: T, y: V } = w, g = this.getPosition(y, f, T, V);
1109
+ l && l(g, _), y = null;
1110
1110
  }
1111
1111
  }
1112
1112
  });
1113
- ee([k, A], () => {
1114
- if (this.dragging && h) {
1115
- const _ = this.getPosition(h, m, k.value, A.value);
1116
- e.style.left = `${_.x}px`, e.style.top = `${_.y}px`;
1113
+ H([S, $], () => {
1114
+ if (this.dragging && y) {
1115
+ const w = this.getPosition(y, f, S.value, $.value);
1116
+ t.style.left = `${w.x}px`, t.style.top = `${w.y}px`;
1117
1117
  }
1118
1118
  });
1119
1119
  }
1120
- getPosition(e, t, n, s) {
1121
- const { edge: l = 50 } = this.options, i = -t.width + l, c = e.width - l, r = 0, p = e.height - l, m = Math.min(c, Math.max(n, i)), h = Math.min(p, Math.max(s, r));
1120
+ getPosition(t, e, o, s) {
1121
+ const { edge: i = 50 } = this.options, l = -e.width + i, u = t.width - i, r = 0, d = t.height - i, f = Math.min(u, Math.max(o, l)), y = Math.min(d, Math.max(s, r));
1122
1122
  return {
1123
- x: m,
1124
- y: h
1123
+ x: f,
1124
+ y
1125
1125
  };
1126
1126
  }
1127
1127
  destory() {
1128
1128
  this.scope.stop();
1129
1129
  }
1130
1130
  }
1131
- const to = {
1132
- mounted(a, e) {
1133
- const t = e.value || {}, n = new Je(a, t);
1134
- a.__draggable__ = n;
1131
+ const vn = {
1132
+ mounted(a, t) {
1133
+ const e = t.value || {}, o = new ot(a, e);
1134
+ a.__draggable__ = o;
1135
1135
  },
1136
- updated(a, e) {
1137
- const t = e.value || {};
1138
- let n = a.__draggable__;
1139
- n && !mt(n.options, t) && (n.destory(), a.__draggable__ = new Je(a, t));
1136
+ updated(a, t) {
1137
+ const e = t.value || {};
1138
+ let o = a.__draggable__;
1139
+ o && !He(o.options, e) && (o.destory(), a.__draggable__ = new ot(a, e));
1140
1140
  },
1141
1141
  unmounted(a) {
1142
- const e = a.__draggable__;
1143
- e && (e.destory(), a.__draggable__ = null);
1142
+ const t = a.__draggable__;
1143
+ t && (t.destory(), a.__draggable__ = null);
1144
1144
  }
1145
- }, Ee = "user-select-none";
1146
- class Ke {
1147
- constructor(e, t = {}) {
1148
- this.el = e, this.options = t, this.scope = tt(), this.scope.run(() => {
1145
+ }, De = "user-select-none";
1146
+ class nt {
1147
+ constructor(t, e = {}) {
1148
+ this.el = t, this.options = e, this.scope = lt(), this.scope.run(() => {
1149
1149
  this.init();
1150
1150
  });
1151
1151
  }
1152
1152
  scope;
1153
- resizing = R(!1);
1154
- direction = R("");
1153
+ resizing = O(!1);
1154
+ direction = O("");
1155
1155
  MIE = null;
1156
1156
  cleanMousedown;
1157
1157
  cleanMouseup;
1158
1158
  init() {
1159
- const { el: e, options: t } = this, { disabled: n, onStart: s, onEnd: l } = t;
1160
- if (n)
1159
+ const { el: t, options: e } = this, { disabled: o, onStart: s, onEnd: i } = e;
1160
+ if (o)
1161
1161
  return;
1162
- this.MIE = bn(e), this.cleanMousedown = _e(document, "mousedown", () => {
1163
- this.direction?.value && this.MIE && (this.resizing.value = !0, e.classList.add("is-resizing", `is-${this.direction.value}-resizing`), s && s(this.direction.value, this.MIE));
1164
- }), this.cleanMouseup = _e(document, "mouseup", () => {
1165
- this.resizing.value && this.direction?.value && this.MIE && (e.classList.remove(
1162
+ this.MIE = Vo(t), this.cleanMousedown = ze(document, "mousedown", () => {
1163
+ this.direction?.value && this.MIE && (this.resizing.value = !0, t.classList.add("is-resizing", `is-${this.direction.value}-resizing`), s && s(this.direction.value, this.MIE));
1164
+ }), this.cleanMouseup = ze(document, "mouseup", () => {
1165
+ this.resizing.value && this.direction?.value && this.MIE && (t.classList.remove(
1166
1166
  "is-resizing",
1167
1167
  `is-${this.direction.value}-resizing`
1168
- ), l && l(this.direction.value, this.MIE)), this.resizing.value = !1;
1169
- }), ee(this.direction, (r) => {
1170
- const p = document.body;
1171
- p.style.cursor = r ? `${r}-resize` : "", r ? p.classList.add(Ee) : p.classList.remove(Ee);
1168
+ ), i && i(this.direction.value, this.MIE)), this.resizing.value = !1;
1169
+ }), H(this.direction, (r) => {
1170
+ const d = document.body;
1171
+ d.style.cursor = r ? `${r}-resize` : "", r ? d.classList.add(De) : d.classList.remove(De);
1172
1172
  });
1173
- const { x: i, y: c } = this.MIE;
1174
- ee([i, c], () => {
1173
+ const { x: l, y: u } = this.MIE;
1174
+ H([l, u], () => {
1175
1175
  this.resizing.value ? this.resize() : this.direction.value = this.getDirection();
1176
1176
  });
1177
1177
  }
1178
1178
  resize() {
1179
- const { MIE: e, direction: t, resizing: n, options: s, el: l } = this, i = t?.value || "";
1180
- if (!e || !n.value || !i)
1179
+ const { MIE: t, direction: e, resizing: o, options: s, el: i } = this, l = e?.value || "";
1180
+ if (!t || !o.value || !l)
1181
1181
  return;
1182
- const { x: c, y: r, elementX: p, elementY: m, elementHeight: h, elementWidth: k } = e, { onResizing: A } = s, {
1183
- minWidth: _ = 0,
1184
- minHeight: w = 0,
1185
- maxWidth: E = 99999,
1186
- maxHeight: D = 99999
1182
+ const { x: u, y: r, elementX: d, elementY: f, elementHeight: y, elementWidth: S } = t, { onResizing: $ } = s, {
1183
+ minWidth: w = 0,
1184
+ minHeight: _ = 0,
1185
+ maxWidth: T = 99999,
1186
+ maxHeight: V = 99999
1187
1187
  } = s;
1188
- if (i.includes("e")) {
1189
- const g = Math.min(Math.max(p.value, _), E);
1190
- l.style.width = `${g}px`;
1188
+ if (l.includes("e")) {
1189
+ const g = Math.min(Math.max(d.value, w), T);
1190
+ i.style.width = `${g}px`;
1191
1191
  }
1192
- if (i.includes("s")) {
1193
- const g = Math.min(Math.max(m.value, w), D);
1194
- l.style.height = `${g}px`;
1192
+ if (l.includes("s")) {
1193
+ const g = Math.min(Math.max(f.value, _), V);
1194
+ i.style.height = `${g}px`;
1195
1195
  }
1196
- if (i.includes("w")) {
1196
+ if (l.includes("w")) {
1197
1197
  const g = Math.min(
1198
- Math.max(k.value - p.value, _),
1199
- E
1198
+ Math.max(S.value - d.value, w),
1199
+ T
1200
1200
  );
1201
- l.style.width = `${g}px`, l.style.left = `${c.value}px`;
1201
+ i.style.width = `${g}px`, i.style.left = `${u.value}px`;
1202
1202
  }
1203
- if (i.includes("n")) {
1203
+ if (l.includes("n")) {
1204
1204
  const g = Math.min(
1205
- Math.max(h.value - m.value, w),
1206
- D
1205
+ Math.max(y.value - f.value, _),
1206
+ V
1207
1207
  );
1208
1208
  this.el.style.height = `${g}px`, this.el.style.top = `${r.value}px`;
1209
1209
  }
1210
- A && A(i, e);
1210
+ $ && $(l, t);
1211
1211
  }
1212
1212
  getDirection() {
1213
1213
  if (!this.MIE)
1214
1214
  return "";
1215
- const { elementX: e, elementY: t, elementHeight: n, elementWidth: s, isOutside: l } = this.MIE;
1216
- if (l.value)
1215
+ const { elementX: t, elementY: e, elementHeight: o, elementWidth: s, isOutside: i } = this.MIE;
1216
+ if (i.value)
1217
1217
  return "";
1218
- const { dirs: i = ["n", "s", "w", "e"], edge: c = 5 } = this.options;
1218
+ const { dirs: l = ["n", "s", "w", "e"], edge: u = 5 } = this.options;
1219
1219
  let r = "";
1220
- return i.includes("n") && t.value <= c ? r += "n" : i.includes("s") && t.value > n.value - c && (r += "s"), i.includes("w") && e.value <= c ? r += "w" : i.includes("e") && e.value > s.value - c && (r += "e"), r;
1220
+ return l.includes("n") && e.value <= u ? r += "n" : l.includes("s") && e.value > o.value - u && (r += "s"), l.includes("w") && t.value <= u ? r += "w" : l.includes("e") && t.value > s.value - u && (r += "e"), r;
1221
1221
  }
1222
1222
  destory() {
1223
- const e = document.body;
1224
- e.style.cursor = "", e.classList.remove(Ee), this.cleanMousedown && this.cleanMousedown(), this.cleanMouseup && this.cleanMouseup(), this.MIE?.stop(), this.scope.stop();
1223
+ const t = document.body;
1224
+ t.style.cursor = "", t.classList.remove(De), this.cleanMousedown && this.cleanMousedown(), this.cleanMouseup && this.cleanMouseup(), this.MIE?.stop(), this.scope.stop();
1225
1225
  }
1226
1226
  }
1227
- const xt = {
1228
- mounted(a, e) {
1229
- const t = e.value || {}, n = new Ke(a, t);
1230
- a.__resizable__ = n;
1227
+ const St = {
1228
+ mounted(a, t) {
1229
+ const e = t.value || {}, o = new nt(a, e);
1230
+ a.__resizable__ = o;
1231
1231
  },
1232
- updated(a, e) {
1233
- const t = e.value || {};
1234
- let n = a.__resizable__;
1235
- n && !mt(n.options, t) && (n.destory(), a.__resizable__ = new Ke(a, t));
1232
+ updated(a, t) {
1233
+ const e = t.value || {};
1234
+ let o = a.__resizable__;
1235
+ o && !He(o.options, e) && (o.destory(), a.__resizable__ = new nt(a, e));
1236
1236
  },
1237
1237
  unmounted(a) {
1238
- const e = a.__resizable__;
1239
- e && (e.destory(), a.__resizable__ = null);
1238
+ const t = a.__resizable__;
1239
+ t && (t.destory(), a.__resizable__ = null);
1240
1240
  }
1241
- }, no = {
1241
+ }, bn = {
1242
1242
  modelValue: {
1243
1243
  type: Boolean,
1244
1244
  default: !0
@@ -1323,9 +1323,9 @@ const xt = {
1323
1323
  type: Boolean
1324
1324
  }
1325
1325
  };
1326
- let ie = 1e3;
1327
- function oo(a, e) {
1328
- const { width: t, height: n } = ft(e), s = nt({
1326
+ let ce = 1e3;
1327
+ function _n(a, t) {
1328
+ const { width: e, height: o } = yt(t), s = Ne({
1329
1329
  mode: a.mode || "normal",
1330
1330
  wrapperWidth: 0,
1331
1331
  wrapperHeight: 0,
@@ -1333,14 +1333,14 @@ function oo(a, e) {
1333
1333
  height: 0,
1334
1334
  top: 0,
1335
1335
  left: 0,
1336
- zIndex: ++ie,
1336
+ zIndex: ++ce,
1337
1337
  dragging: !1,
1338
1338
  resizing: !1
1339
1339
  });
1340
- return ee([t, n], ([l, i]) => {
1341
- s.wrapperWidth = l, s.wrapperHeight = i, s.width = me(a.width, l), s.height = me(a.height, i), s.left = a.left ? me(a.left, l) - s.width / 2 : Math.max(Math.floor((l - s.width) / 2), 0), s.top = a.top ? me(a.top, i) : Math.max(Math.floor((i - s.height) / 2), 0);
1342
- }), ee(s, (l) => {
1343
- ie = Math.max(l.zIndex, ie);
1340
+ return H([e, o], ([i, l]) => {
1341
+ s.wrapperWidth = i, s.wrapperHeight = l, s.width = be(a.width, i), s.height = be(a.height, l), s.left = a.left ? be(a.left, i) - s.width / 2 : Math.max(Math.floor((i - s.width) / 2), 0), s.top = a.top ? be(a.top, l) : Math.max(Math.floor((l - s.height) / 2), 0);
1342
+ }), H(s, (i) => {
1343
+ ce = Math.max(i.zIndex, ce);
1344
1344
  }), {
1345
1345
  state: s,
1346
1346
  normal: v(() => s.mode === "normal"),
@@ -1348,256 +1348,256 @@ function oo(a, e) {
1348
1348
  minimized: v(() => s.mode === "minimized")
1349
1349
  };
1350
1350
  }
1351
- function ao(a, e) {
1352
- const t = v(() => {
1353
- const { width: i, height: c, top: r, left: p, zIndex: m } = e;
1351
+ function kn(a, t) {
1352
+ const e = v(() => {
1353
+ const { width: l, height: u, top: r, left: d, zIndex: f } = t;
1354
1354
  return {
1355
- width: `${i}px`,
1356
- height: `${c}px`,
1355
+ width: `${l}px`,
1356
+ height: `${u}px`,
1357
1357
  top: `${r}px`,
1358
- left: `${p}px`,
1359
- zIndex: m
1358
+ left: `${d}px`,
1359
+ zIndex: f
1360
1360
  };
1361
- }), n = v(() => ({
1362
- [`is-${e.mode}`]: !!e.mode,
1361
+ }), o = v(() => ({
1362
+ [`is-${t.mode}`]: !!t.mode,
1363
1363
  "is-draggable": !!a.draggable,
1364
1364
  "is-resizable": !!a.resizable,
1365
1365
  "is-primary": !!a.primary
1366
1366
  })), s = v(() => ({
1367
- [`is-${e.mode}`]: !!e.mode,
1368
- "is-dragging": e.dragging,
1369
- "is-resizing": e.resizing
1370
- })), l = v(() => ({
1371
- zIndex: e.zIndex
1367
+ [`is-${t.mode}`]: !!t.mode,
1368
+ "is-dragging": t.dragging,
1369
+ "is-resizing": t.resizing
1370
+ })), i = v(() => ({
1371
+ zIndex: t.zIndex
1372
1372
  }));
1373
1373
  return {
1374
- styles: t,
1375
- classes: n,
1374
+ styles: e,
1375
+ classes: o,
1376
1376
  wrapperClass: s,
1377
- modalStyle: l
1377
+ modalStyle: i
1378
1378
  };
1379
1379
  }
1380
- function so(a, e, t) {
1381
- const n = (m) => {
1382
- e.mode = m, ["maximized", "minimized", "normal"].includes(m) && t(m), t("modeChange", m);
1380
+ function wn(a, t, e) {
1381
+ const o = (f) => {
1382
+ t.mode = f, ["maximized", "minimized", "normal"].includes(f) && e(f), e("modeChange", f);
1383
1383
  }, s = async () => {
1384
- (!a.beforeClose || await a.beforeClose()) && (t("update:modelValue", !1), t("close"), t("destroy"));
1384
+ (!a.beforeClose || await a.beforeClose()) && (e("update:modelValue", !1), e("close"), e("destroy"));
1385
1385
  };
1386
1386
  return {
1387
1387
  close: s,
1388
- changeMode: n,
1389
- show: () => n("normal"),
1390
- hide: () => n("minimized"),
1388
+ changeMode: o,
1389
+ show: () => o("normal"),
1390
+ hide: () => o("minimized"),
1391
1391
  active: () => {
1392
- e.zIndex = Math.max(e.zIndex, ++ie);
1392
+ t.zIndex = Math.max(t.zIndex, ++ce);
1393
1393
  },
1394
- submit: () => t("submit"),
1394
+ submit: () => e("submit"),
1395
1395
  cancel: () => {
1396
- t("cancel"), s();
1396
+ e("cancel"), s();
1397
1397
  }
1398
1398
  };
1399
1399
  }
1400
- function lo(a, e, t, n) {
1400
+ function xn(a, t, e, o) {
1401
1401
  return v(() => {
1402
1402
  const s = typeof a.draggable == "boolean" ? !a.draggable : !!a.draggable?.disabled;
1403
1403
  return {
1404
- ...gt(a.draggable) ? a.draggable : {},
1404
+ ...We(a.draggable) ? a.draggable : {},
1405
1405
  disabled: s,
1406
- target: n,
1406
+ target: o,
1407
1407
  selector: ".x-panel__header",
1408
- onStart(l) {
1409
- e.dragging = !0, e.zIndex = Math.max(e.zIndex, ++ie), t("dragStart", l);
1408
+ onStart(i) {
1409
+ t.dragging = !0, t.zIndex = Math.max(t.zIndex, ++ce), e("dragStart", i);
1410
1410
  },
1411
- onMove(l) {
1412
- t("dragging", l);
1411
+ onMove(i) {
1412
+ e("dragging", i);
1413
1413
  },
1414
- onEnd(l) {
1415
- if (e.mode === "maximized")
1414
+ onEnd(i) {
1415
+ if (t.mode === "maximized")
1416
1416
  return;
1417
- const { x: i, y: c } = l;
1418
- e.left = i, e.top = c, e.dragging = !1, t("dragEnd", l);
1417
+ const { x: l, y: u } = i;
1418
+ t.left = l, t.top = u, t.dragging = !1, e("dragEnd", i);
1419
1419
  }
1420
1420
  };
1421
1421
  });
1422
1422
  }
1423
- function io(a, e, t) {
1423
+ function Sn(a, t, e) {
1424
1424
  return v(() => {
1425
- const n = typeof a.resizable == "boolean" ? !a.resizable : !!a.resizable?.disabled;
1425
+ const o = typeof a.resizable == "boolean" ? !a.resizable : !!a.resizable?.disabled;
1426
1426
  return {
1427
1427
  minWidth: 200,
1428
1428
  minHeight: 150,
1429
- ...gt(a.resizable) ? a.resizable : {},
1430
- disabled: n,
1429
+ ...We(a.resizable) ? a.resizable : {},
1430
+ disabled: o,
1431
1431
  dirs: ["e", "s", "w"],
1432
- onStart(s, l) {
1433
- e.resizing = !0, e.zIndex = Math.max(e.zIndex, ++ie), t("resizeStart", s, l);
1432
+ onStart(s, i) {
1433
+ t.resizing = !0, t.zIndex = Math.max(t.zIndex, ++ce), e("resizeStart", s, i);
1434
1434
  },
1435
- onResizing(s, l) {
1436
- t("resizing", s, l);
1435
+ onResizing(s, i) {
1436
+ e("resizing", s, i);
1437
1437
  },
1438
- onEnd(s, l) {
1439
- e.left = l.elementPositionX.value, e.top = l.elementPositionY.value, e.width = l.elementWidth.value, e.height = l.elementHeight.value, e.resizing = !1, t("resizeEnd", s, l);
1438
+ onEnd(s, i) {
1439
+ t.left = i.elementPositionX.value, t.top = i.elementPositionY.value, t.width = i.elementWidth.value, t.height = i.elementHeight.value, t.resizing = !1, e("resizeEnd", s, i);
1440
1440
  }
1441
1441
  };
1442
1442
  });
1443
1443
  }
1444
- function ro(a, e) {
1445
- const t = a.componentInstance;
1446
- if (!t)
1444
+ function zn(a, t) {
1445
+ const e = a.componentInstance;
1446
+ if (!e)
1447
1447
  return;
1448
- let n = null;
1449
- return It(() => {
1450
- const s = o(e), l = o(s?.bodyRef);
1451
- n = t.$el, l && l.$el && l.$el.appendChild(n);
1452
- }), Bt(() => {
1453
- n && n.parentNode && n.parentNode.removeChild(n);
1448
+ let o = null;
1449
+ return Dt(() => {
1450
+ const s = n(t), i = n(s?.bodyRef);
1451
+ o = e.$el, i && i.$el && i.$el.appendChild(o);
1452
+ }), Pt(() => {
1453
+ o && o.parentNode && o.parentNode.removeChild(o);
1454
1454
  }), {
1455
- componentInstance: t
1455
+ componentInstance: e
1456
1456
  };
1457
1457
  }
1458
- const co = ["src"], zt = /* @__PURE__ */ B({
1458
+ const Cn = ["src"], zt = /* @__PURE__ */ E({
1459
1459
  name: "XDialog",
1460
1460
  __name: "Dialog",
1461
- props: no,
1461
+ props: bn,
1462
1462
  emits: ["update:modelValue", "open", "close", "destroy", "maximized", "minimized", "normal", "modeChange", "dragStart", "dragging", "dragEnd", "resizeStart", "resizeEnd", "resizing", "submit", "cancel"],
1463
- setup(a, { expose: e, emit: t }) {
1464
- const n = a, s = pe(), l = R(), i = R(), { state: c, maximized: r, minimized: p, normal: m } = oo(n, l), { styles: h, classes: k, wrapperClass: A, modalStyle: _ } = ao(n, c), { changeMode: w, active: E, close: D, show: g, hide: I, submit: C, cancel: F } = so(
1465
- n,
1466
- c,
1467
- t
1468
- ), H = lo(n, c, t, l), ne = io(n, c, t), oe = ro(n, i);
1469
- return ot(async () => {
1470
- n.modelValue && (await le(), s && t("open", s));
1471
- }), e({
1472
- panelRef: i,
1473
- state: c,
1463
+ setup(a, { expose: t, emit: e }) {
1464
+ const o = a, s = ue(), i = O(), l = O(), { state: u, maximized: r, minimized: d, normal: f } = _n(o, i), { styles: y, classes: S, wrapperClass: $, modalStyle: w } = kn(o, u), { changeMode: _, active: T, close: V, show: g, hide: M, submit: b, cancel: D } = wn(
1465
+ o,
1466
+ u,
1467
+ e
1468
+ ), P = xn(o, u, e, i), oe = Sn(o, u, e), ne = zn(o, l);
1469
+ return it(async () => {
1470
+ o.modelValue && (await re(), s && e("open", s));
1471
+ }), t({
1472
+ panelRef: l,
1473
+ state: u,
1474
1474
  maximized: r,
1475
- minimized: p,
1476
- changeMode: w,
1475
+ minimized: d,
1476
+ changeMode: _,
1477
1477
  show: g,
1478
- hide: I,
1479
- submit: C,
1480
- cancel: F,
1481
- componentInstance: oe
1482
- }), (j, L) => n.modelValue ? (u(), f(at, {
1478
+ hide: M,
1479
+ submit: b,
1480
+ cancel: D,
1481
+ componentInstance: ne
1482
+ }), (U, K) => o.modelValue ? (c(), m(rt, {
1483
1483
  key: 0,
1484
1484
  to: "body"
1485
1485
  }, [
1486
- $("div", {
1486
+ F("div", {
1487
1487
  ref_key: "wrapper",
1488
- ref: l,
1489
- class: U(["x-dialog__wrapper", o(A)])
1488
+ ref: i,
1489
+ class: W(["x-dialog__wrapper", n($)])
1490
1490
  }, [
1491
- n.modal ? (u(), V("div", {
1491
+ o.modal ? (c(), A("div", {
1492
1492
  key: 0,
1493
1493
  class: "x-dialog__modal",
1494
- style: be(o(_))
1495
- }, null, 4)) : y("", !0),
1496
- W((u(), f(o(kt), {
1494
+ style: Se(n(w))
1495
+ }, null, 4)) : h("", !0),
1496
+ Q((c(), m(n(xt), {
1497
1497
  ref_key: "panelRef",
1498
- ref: i,
1499
- class: U(["x-dialog", o(k)]),
1498
+ ref: l,
1499
+ class: W(["x-dialog", n(S)]),
1500
1500
  card: "",
1501
1501
  shadow: "always",
1502
- header: { icon: n.icon, subtitle: n.subtitle },
1502
+ header: { icon: o.icon, subtitle: o.subtitle },
1503
1503
  width: "800px",
1504
1504
  height: "600px",
1505
1505
  footer: { justify: "space-between", flex: !0, align: "center" },
1506
- style: be(o(h)),
1507
- size: n.size,
1508
- body: { padding: n.bodyPadding },
1509
- onClick: o(E)
1510
- }, $e({
1511
- title: d(() => [
1512
- N(O(n.title), 1)
1506
+ style: Se(n(y)),
1507
+ size: o.size,
1508
+ body: { padding: o.bodyPadding },
1509
+ onClick: n(T)
1510
+ }, ge({
1511
+ title: p(() => [
1512
+ N(j(o.title), 1)
1513
1513
  ]),
1514
- actions: d(() => [
1515
- z(j.$slots, "actions"),
1516
- n.minimizable ? (u(), f(o(Q), {
1514
+ actions: p(() => [
1515
+ z(U.$slots, "actions"),
1516
+ o.minimizable ? (c(), m(n(J), {
1517
1517
  key: 0,
1518
- icon: o(mn),
1519
- size: n.size,
1518
+ icon: n(Mo),
1519
+ size: o.size,
1520
1520
  mode: "icon",
1521
1521
  type: "primary",
1522
1522
  background: "hover",
1523
- onClick: L[0] || (L[0] = (se) => o(w)("minimized"))
1524
- }, null, 8, ["icon", "size"])) : y("", !0),
1525
- n.maximizable ? (u(), V(q, { key: 1 }, [
1526
- o(m) ? (u(), f(o(Q), {
1523
+ onClick: K[0] || (K[0] = (ie) => n(_)("minimized"))
1524
+ }, null, 8, ["icon", "size"])) : h("", !0),
1525
+ o.maximizable ? (c(), A(Z, { key: 1 }, [
1526
+ n(f) ? (c(), m(n(J), {
1527
1527
  key: 1,
1528
- icon: o(hn),
1529
- size: n.size,
1528
+ icon: n(Io),
1529
+ size: o.size,
1530
1530
  mode: "icon",
1531
1531
  type: "primary",
1532
1532
  background: "hover",
1533
- onClick: L[2] || (L[2] = (se) => o(w)("maximized"))
1534
- }, null, 8, ["icon", "size"])) : (u(), f(o(Q), {
1533
+ onClick: K[2] || (K[2] = (ie) => n(_)("maximized"))
1534
+ }, null, 8, ["icon", "size"])) : (c(), m(n(J), {
1535
1535
  key: 0,
1536
- icon: o(gn),
1537
- size: n.size,
1536
+ icon: n(Bo),
1537
+ size: o.size,
1538
1538
  mode: "icon",
1539
1539
  type: "primary",
1540
1540
  background: "hover",
1541
- onClick: L[1] || (L[1] = (se) => o(w)("normal"))
1541
+ onClick: K[1] || (K[1] = (ie) => n(_)("normal"))
1542
1542
  }, null, 8, ["icon", "size"]))
1543
- ], 64)) : y("", !0),
1544
- n.closable ? (u(), f(o(Q), {
1543
+ ], 64)) : h("", !0),
1544
+ o.closable ? (c(), m(n(J), {
1545
1545
  key: 2,
1546
- icon: o(yn),
1547
- size: n.size,
1546
+ icon: n(Ao),
1547
+ size: o.size,
1548
1548
  mode: "icon",
1549
1549
  type: "danger",
1550
1550
  background: "hover",
1551
- onClick: o(D)
1552
- }, null, 8, ["icon", "size", "onClick"])) : y("", !0)
1551
+ onClick: n(V)
1552
+ }, null, 8, ["icon", "size", "onClick"])) : h("", !0)
1553
1553
  ]),
1554
- default: d(() => [
1555
- z(j.$slots, "default", {}, () => [
1556
- n.content ? (u(), f(Z(n.content), { key: 0 })) : y("", !0),
1557
- n.src ? (u(), V("iframe", {
1554
+ default: p(() => [
1555
+ z(U.$slots, "default", {}, () => [
1556
+ o.content ? (c(), m(L(o.content), { key: 0 })) : h("", !0),
1557
+ o.src ? (c(), A("iframe", {
1558
1558
  key: 1,
1559
- src: n.src,
1559
+ src: o.src,
1560
1560
  class: "x-dialog__frame"
1561
- }, null, 8, co)) : y("", !0)
1561
+ }, null, 8, Cn)) : h("", !0)
1562
1562
  ])
1563
1563
  ]),
1564
1564
  _: 2
1565
1565
  }, [
1566
- n.cancel || n.submit || j.$slots.footer || j.$slots.extra || j.$slots.handle ? {
1566
+ o.cancel || o.submit || U.$slots.footer || U.$slots.extra || U.$slots.handle ? {
1567
1567
  name: "footer",
1568
- fn: d(() => [
1569
- z(j.$slots, "footer", {}, () => [
1570
- b(o(M), null, {
1571
- default: d(() => [
1572
- z(j.$slots, "extra")
1568
+ fn: p(() => [
1569
+ z(U.$slots, "footer", {}, () => [
1570
+ k(n(I), null, {
1571
+ default: p(() => [
1572
+ z(U.$slots, "extra")
1573
1573
  ]),
1574
1574
  _: 3
1575
1575
  }),
1576
- b(o(M), null, {
1577
- default: d(() => [
1578
- z(j.$slots, "handle"),
1579
- n.cancel ? (u(), f(o(de), {
1576
+ k(n(I), null, {
1577
+ default: p(() => [
1578
+ z(U.$slots, "handle"),
1579
+ o.cancel ? (c(), m(n(se), {
1580
1580
  key: 0,
1581
1581
  type: "default",
1582
- size: n.size,
1583
- onClick: o(F)
1582
+ size: o.size,
1583
+ onClick: n(D)
1584
1584
  }, {
1585
- default: d(() => [
1586
- N(O(typeof n.cancel == "string" ? n.cancel : "取消"), 1)
1585
+ default: p(() => [
1586
+ N(j(typeof o.cancel == "string" ? o.cancel : "取消"), 1)
1587
1587
  ]),
1588
1588
  _: 1
1589
- }, 8, ["size", "onClick"])) : y("", !0),
1590
- n.submit ? (u(), f(o(de), {
1589
+ }, 8, ["size", "onClick"])) : h("", !0),
1590
+ o.submit ? (c(), m(n(se), {
1591
1591
  key: 1,
1592
1592
  type: "primary",
1593
- size: n.size,
1594
- onClick: o(C)
1593
+ size: o.size,
1594
+ onClick: n(b)
1595
1595
  }, {
1596
- default: d(() => [
1597
- N(O(typeof n.submit == "string" ? n.cancel : "确定"), 1)
1596
+ default: p(() => [
1597
+ N(j(typeof o.submit == "string" ? o.cancel : "确定"), 1)
1598
1598
  ]),
1599
1599
  _: 1
1600
- }, 8, ["size", "onClick"])) : y("", !0)
1600
+ }, 8, ["size", "onClick"])) : h("", !0)
1601
1601
  ]),
1602
1602
  _: 3
1603
1603
  })
@@ -1606,42 +1606,42 @@ const co = ["src"], zt = /* @__PURE__ */ B({
1606
1606
  key: "0"
1607
1607
  } : void 0
1608
1608
  ]), 1032, ["header", "class", "style", "size", "body", "onClick"])), [
1609
- [o(to), o(H)],
1610
- [o(xt), o(ne)]
1609
+ [n(vn), n(P)],
1610
+ [n(St), n(oe)]
1611
1611
  ])
1612
1612
  ], 2)
1613
- ])) : y("", !0);
1613
+ ])) : h("", !0);
1614
1614
  }
1615
1615
  });
1616
- function Ne(a, e) {
1617
- const t = document.createElement("div"), n = b(zt, a);
1618
- n.appContext = e ?? Ne._context, Xe(n, t);
1616
+ function Qe(a, t) {
1617
+ const e = document.createElement("div"), o = k(zt, a);
1618
+ o.appContext = t ?? Qe._context, Ze(o, e);
1619
1619
  const s = () => {
1620
- Xe(null, t), t.parentNode?.removeChild(t);
1620
+ Ze(null, e), e.parentNode?.removeChild(e);
1621
1621
  };
1622
- return n.props.onDestroy = () => {
1622
+ return o.props.onDestroy = () => {
1623
1623
  s();
1624
- }, document.body.appendChild(t), {
1625
- vnode: n,
1624
+ }, document.body.appendChild(e), {
1625
+ vnode: o,
1626
1626
  destroy: s
1627
1627
  };
1628
1628
  }
1629
- const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -1), po = /* @__PURE__ */ B({
1629
+ const Tn = /* @__PURE__ */ F("div", { class: "x-mask-sidebar__helper" }, null, -1), En = /* @__PURE__ */ E({
1630
1630
  __name: "Sidebar",
1631
1631
  props: {
1632
1632
  collapsed: { type: Boolean }
1633
1633
  },
1634
1634
  setup(a) {
1635
- const e = a;
1636
- return (t, n) => W((u(), f(o(M), {
1637
- class: U(["x-mask-sidebar", { "is-collapsed": e.collapsed }]),
1635
+ const t = a;
1636
+ return (e, o) => Q((c(), m(n(I), {
1637
+ class: W(["x-mask-sidebar", { "is-collapsed": t.collapsed }]),
1638
1638
  grow: !1,
1639
1639
  flex: "",
1640
1640
  direction: "column"
1641
1641
  }, {
1642
- default: d(() => [
1643
- z(t.$slots, "brand"),
1644
- b(o(M), {
1642
+ default: p(() => [
1643
+ z(e.$slots, "brand"),
1644
+ k(n(I), {
1645
1645
  class: "x-mask-sidebar__wrapper",
1646
1646
  flex: "",
1647
1647
  grow: "",
@@ -1649,24 +1649,24 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1649
1649
  justify: "space-between",
1650
1650
  align: "center"
1651
1651
  }, {
1652
- default: d(() => [
1653
- z(t.$slots, "default"),
1654
- uo
1652
+ default: p(() => [
1653
+ z(e.$slots, "default"),
1654
+ Tn
1655
1655
  ]),
1656
1656
  _: 3
1657
1657
  })
1658
1658
  ]),
1659
1659
  _: 3
1660
1660
  }, 8, ["class"])), [
1661
- [o(xt), {
1661
+ [n(St), {
1662
1662
  dirs: ["e"],
1663
- disabled: e.collapsed,
1663
+ disabled: t.collapsed,
1664
1664
  maxWidth: 500,
1665
1665
  minWidth: 200
1666
1666
  }]
1667
1667
  ]);
1668
1668
  }
1669
- }), fo = /* @__PURE__ */ B({
1669
+ }), Mn = /* @__PURE__ */ E({
1670
1670
  __name: "SwitchBar",
1671
1671
  props: {
1672
1672
  collasped: { type: Boolean, default: !1 },
@@ -1678,88 +1678,88 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1678
1678
  "update:keyword",
1679
1679
  "update:favorite"
1680
1680
  ],
1681
- setup(a, { emit: e }) {
1682
- const t = a, n = R(!1), s = R(""), l = R(!1), i = () => {
1683
- n.value = !0;
1684
- }, c = () => {
1685
- s.value = "", n.value = !1, e("update:keyword", s.value);
1681
+ setup(a, { emit: t }) {
1682
+ const e = a, o = O(!1), s = O(""), i = O(!1), l = () => {
1683
+ o.value = !0;
1684
+ }, u = () => {
1685
+ s.value = "", o.value = !1, t("update:keyword", s.value);
1686
1686
  }, r = () => {
1687
- e("update:collasped", !t.collasped);
1688
- }, p = () => {
1689
- e("update:keyword", s.value);
1690
- }, m = () => {
1691
- e("update:favorite", l.value);
1687
+ t("update:collasped", !e.collasped);
1688
+ }, d = () => {
1689
+ t("update:keyword", s.value);
1690
+ }, f = () => {
1691
+ t("update:favorite", i.value);
1692
1692
  };
1693
- return (h, k) => (u(), f(o(M), {
1693
+ return (y, S) => (c(), m(n(I), {
1694
1694
  class: "x-mask-switch-bar",
1695
1695
  justify: "space-between",
1696
1696
  align: "center"
1697
1697
  }, {
1698
- default: d(() => [
1699
- t.collasped ? y("", !0) : (u(), f(o(M), {
1698
+ default: p(() => [
1699
+ e.collasped ? h("", !0) : (c(), m(n(I), {
1700
1700
  key: 0,
1701
1701
  class: "x-mask-switch-bar__left",
1702
1702
  grow: ""
1703
1703
  }, {
1704
- default: d(() => [
1705
- n.value ? y("", !0) : (u(), f(o(lt), {
1704
+ default: p(() => [
1705
+ o.value ? h("", !0) : (c(), m(n(Xe), {
1706
1706
  key: 0,
1707
- modelValue: l.value,
1708
- "onUpdate:modelValue": k[0] || (k[0] = (A) => l.value = A),
1707
+ modelValue: i.value,
1708
+ "onUpdate:modelValue": S[0] || (S[0] = ($) => i.value = $),
1709
1709
  class: "x-mask-switch-bar__switch",
1710
- "active-icon": o(ct),
1711
- "inactive-icon": o(rt),
1712
- onChange: m
1710
+ "active-icon": n(pt),
1711
+ "inactive-icon": n(dt),
1712
+ onChange: f
1713
1713
  }, null, 8, ["modelValue", "active-icon", "inactive-icon"])),
1714
- n.value ? (u(), f(o(De), {
1714
+ o.value ? (c(), m(n(Fe), {
1715
1715
  key: 1,
1716
1716
  modelValue: s.value,
1717
- "onUpdate:modelValue": k[1] || (k[1] = (A) => s.value = A),
1717
+ "onUpdate:modelValue": S[1] || (S[1] = ($) => s.value = $),
1718
1718
  class: "x-mask-switch-bar__input",
1719
1719
  size: "small",
1720
1720
  placeholder: "请输入查询关键字",
1721
- onInput: p,
1722
- "prefix-icon": o(Ve)
1721
+ onInput: d,
1722
+ "prefix-icon": n(Oe)
1723
1723
  }, {
1724
- suffix: d(() => [
1725
- b(o(te), {
1726
- icon: o(ut),
1727
- onClick: c
1724
+ suffix: p(() => [
1725
+ k(n(te), {
1726
+ icon: n(ft),
1727
+ onClick: u
1728
1728
  }, null, 8, ["icon"])
1729
1729
  ]),
1730
1730
  _: 1
1731
- }, 8, ["modelValue", "prefix-icon"])) : y("", !0)
1731
+ }, 8, ["modelValue", "prefix-icon"])) : h("", !0)
1732
1732
  ]),
1733
1733
  _: 1
1734
1734
  })),
1735
- b(o(M), {
1736
- class: U(["x-mask-switch-bar__right", { "is-collasped": t.collasped }]),
1735
+ k(n(I), {
1736
+ class: W(["x-mask-switch-bar__right", { "is-collasped": e.collasped }]),
1737
1737
  flex: "",
1738
1738
  align: "center",
1739
1739
  justify: "center"
1740
1740
  }, {
1741
- default: d(() => [
1742
- !n.value && !t.collasped ? (u(), f(o(Q), {
1741
+ default: p(() => [
1742
+ !o.value && !e.collasped ? (c(), m(n(J), {
1743
1743
  key: 0,
1744
- icon: o(Ve),
1744
+ icon: n(Oe),
1745
1745
  mode: "icon",
1746
1746
  background: "hover",
1747
1747
  size: "default",
1748
1748
  circle: "",
1749
- onClick: i
1750
- }, null, 8, ["icon"])) : y("", !0),
1751
- t.collasped ? (u(), f(o(Q), {
1749
+ onClick: l
1750
+ }, null, 8, ["icon"])) : h("", !0),
1751
+ e.collasped ? (c(), m(n(J), {
1752
1752
  key: 1,
1753
- icon: o(nn),
1753
+ icon: n(vo),
1754
1754
  mode: "icon",
1755
1755
  size: "default",
1756
1756
  background: "hover",
1757
1757
  onClick: r,
1758
1758
  circle: ""
1759
- }, null, 8, ["icon"])) : y("", !0),
1760
- t.collasped ? y("", !0) : (u(), f(o(Q), {
1759
+ }, null, 8, ["icon"])) : h("", !0),
1760
+ e.collasped ? h("", !0) : (c(), m(n(J), {
1761
1761
  key: 2,
1762
- icon: o(on),
1762
+ icon: n(bo),
1763
1763
  mode: "icon",
1764
1764
  size: "default",
1765
1765
  background: "hover",
@@ -1773,7 +1773,7 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1773
1773
  _: 1
1774
1774
  }));
1775
1775
  }
1776
- }), mo = ["src"], go = { key: 0 }, ho = /* @__PURE__ */ B({
1776
+ }), Bn = ["src"], In = { key: 0 }, An = /* @__PURE__ */ E({
1777
1777
  __name: "Brand",
1778
1778
  props: {
1779
1779
  collapsed: { type: Boolean, default: !1 },
@@ -1782,42 +1782,42 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1782
1782
  url: {}
1783
1783
  },
1784
1784
  setup(a) {
1785
- const e = a, t = xe(), n = () => {
1786
- e.url && t.push(e.url);
1785
+ const t = a, e = Me(), o = () => {
1786
+ t.url && e.push(t.url);
1787
1787
  };
1788
- return (s, l) => (u(), f(o(M), {
1789
- class: U(["x-mask-brand", { "is-collapsed": e.collapsed }]),
1788
+ return (s, i) => (c(), m(n(I), {
1789
+ class: W(["x-mask-brand", { "is-collapsed": t.collapsed }]),
1790
1790
  align: "center"
1791
1791
  }, {
1792
- default: d(() => [
1793
- b(o(M), {
1792
+ default: p(() => [
1793
+ k(n(I), {
1794
1794
  class: "x-mask-brand__logo",
1795
1795
  flex: "",
1796
1796
  justify: "center",
1797
1797
  align: "center",
1798
- onClick: n
1798
+ onClick: o
1799
1799
  }, {
1800
- default: d(() => [
1800
+ default: p(() => [
1801
1801
  z(s.$slots, "logo", {}, () => [
1802
- e.logo ? (u(), V("img", {
1802
+ t.logo ? (c(), A("img", {
1803
1803
  key: 0,
1804
- src: e.logo
1805
- }, null, 8, mo)) : y("", !0)
1804
+ src: t.logo
1805
+ }, null, 8, Bn)) : h("", !0)
1806
1806
  ])
1807
1807
  ]),
1808
1808
  _: 3
1809
1809
  }),
1810
- b(o(M), {
1810
+ k(n(I), {
1811
1811
  class: "x-mask-brand__title",
1812
1812
  flex: "",
1813
1813
  align: "center"
1814
1814
  }, {
1815
- default: d(() => [
1816
- e.title ? (u(), V("span", go, [
1815
+ default: p(() => [
1816
+ t.title ? (c(), A("span", In, [
1817
1817
  z(s.$slots, "title", {}, () => [
1818
- N(O(e.title), 1)
1818
+ N(j(t.title), 1)
1819
1819
  ])
1820
- ])) : y("", !0)
1820
+ ])) : h("", !0)
1821
1821
  ]),
1822
1822
  _: 3
1823
1823
  })
@@ -1825,7 +1825,7 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1825
1825
  _: 3
1826
1826
  }, 8, ["class"]));
1827
1827
  }
1828
- }), ge = "__favorites__", he = "__search__", yo = /* @__PURE__ */ B({
1828
+ }), _e = "__favorites__", ke = "__search__", $n = /* @__PURE__ */ E({
1829
1829
  __name: "Menu",
1830
1830
  props: {
1831
1831
  collapse: { type: Boolean, default: !1 },
@@ -1837,94 +1837,94 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1837
1837
  active: {}
1838
1838
  },
1839
1839
  emits: ["select"],
1840
- setup(a, { emit: e }) {
1841
- const t = a, n = v(() => t.menus || []), s = v(() => String(t.active?.id)), l = v(() => [
1840
+ setup(a, { emit: t }) {
1841
+ const e = a, o = v(() => e.menus || []), s = v(() => String(e.active?.id)), i = v(() => [
1842
1842
  {
1843
- id: ge,
1843
+ id: _e,
1844
1844
  title: "收藏",
1845
- icon: dt,
1846
- children: t.favorites?.length ? t.favorites : [
1845
+ icon: mt,
1846
+ children: e.favorites?.length ? e.favorites : [
1847
1847
  {
1848
- id: ge + "empty",
1848
+ id: _e + "empty",
1849
1849
  disabled: !0,
1850
1850
  title: "暂无收藏菜单"
1851
1851
  }
1852
1852
  ]
1853
1853
  }
1854
- ]), i = v(() => {
1855
- const r = (t.keyword || "").trim(), p = r ? (t.flatMenus || []).filter((m) => m.title?.includes(r)) : [];
1854
+ ]), l = v(() => {
1855
+ const r = (e.keyword || "").trim(), d = r ? (e.flatMenus || []).filter((f) => f.title?.includes(r)) : [];
1856
1856
  return [
1857
1857
  {
1858
- id: he,
1858
+ id: ke,
1859
1859
  title: "搜索",
1860
- icon: Ve,
1861
- children: p?.length ? p : [
1860
+ icon: Oe,
1861
+ children: d?.length ? d : [
1862
1862
  {
1863
- id: he + "empty",
1863
+ id: ke + "empty",
1864
1864
  disabled: !0,
1865
1865
  title: "查询匹配不到菜单项"
1866
1866
  }
1867
1867
  ]
1868
1868
  }
1869
1869
  ];
1870
- }), c = (r) => {
1871
- e("select", r);
1870
+ }), u = (r) => {
1871
+ t("select", r);
1872
1872
  };
1873
- return (r, p) => (u(), V(q, null, [
1874
- W(b(o(M), {
1873
+ return (r, d) => (c(), A(Z, null, [
1874
+ Q(k(n(I), {
1875
1875
  class: "x-mask-menu",
1876
1876
  grow: "",
1877
1877
  flex: !1,
1878
1878
  overflow: "auto"
1879
1879
  }, {
1880
- default: d(() => [
1881
- W(b(o(G), {
1880
+ default: p(() => [
1881
+ Q(k(n(ee), {
1882
1882
  subMenu: {
1883
1883
  popperClass: "x-mask-menu-popper",
1884
1884
  teleported: !0,
1885
1885
  showTimeout: 200,
1886
1886
  hideTimeout: 200
1887
1887
  },
1888
- data: n.value,
1889
- "default-icon": o(ae),
1888
+ data: o.value,
1889
+ "default-icon": n(ae),
1890
1890
  collapse: !0,
1891
1891
  "collapse-transition": !1,
1892
1892
  "default-active": s.value,
1893
- onSelect: c
1893
+ onSelect: u
1894
1894
  }, null, 8, ["data", "default-icon", "default-active"]), [
1895
- [K, t.collapse]
1895
+ [Y, e.collapse]
1896
1896
  ]),
1897
- W(b(o(G), {
1897
+ Q(k(n(ee), {
1898
1898
  subMenu: {
1899
1899
  popperClass: "x-mask-menu-popper",
1900
1900
  teleported: !0
1901
1901
  },
1902
- data: n.value,
1903
- "default-icon": o(ae),
1902
+ data: o.value,
1903
+ "default-icon": n(ae),
1904
1904
  collapse: !1,
1905
1905
  "collapse-transition": !1,
1906
1906
  "default-active": s.value,
1907
- onSelect: c
1907
+ onSelect: u
1908
1908
  }, null, 8, ["data", "default-icon", "default-active"]), [
1909
- [K, !t.collapse]
1909
+ [Y, !e.collapse]
1910
1910
  ]),
1911
- n.value.length ? y("", !0) : (u(), f(o(Wt), {
1911
+ o.value.length ? h("", !0) : (c(), m(n(Jt), {
1912
1912
  key: 0,
1913
1913
  description: "暂无菜单数据"
1914
1914
  }))
1915
1915
  ]),
1916
1916
  _: 1
1917
1917
  }, 512), [
1918
- [K, !t.favorite && !t.keyword]
1918
+ [Y, !e.favorite && !e.keyword]
1919
1919
  ]),
1920
- W(b(o(M), {
1920
+ Q(k(n(I), {
1921
1921
  class: "x-mask-menu",
1922
1922
  grow: "",
1923
1923
  flex: !1,
1924
1924
  overflow: "auto"
1925
1925
  }, {
1926
- default: d(() => [
1927
- W(b(o(G), {
1926
+ default: p(() => [
1927
+ Q(k(n(ee), {
1928
1928
  class: "x-mask-menu__favorites",
1929
1929
  subMenu: {
1930
1930
  popperClass: "x-mask-menu-popper",
@@ -1932,17 +1932,17 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1932
1932
  showTimeout: 200,
1933
1933
  hideTimeout: 200
1934
1934
  },
1935
- data: l.value,
1936
- "default-icon": o(ae),
1935
+ data: i.value,
1936
+ "default-icon": n(ae),
1937
1937
  collapse: !0,
1938
1938
  "collapse-transition": !1,
1939
1939
  "default-active": s.value,
1940
- "default-openeds": [ge],
1941
- onSelect: c
1940
+ "default-openeds": [_e],
1941
+ onSelect: u
1942
1942
  }, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
1943
- [K, t.collapse]
1943
+ [Y, e.collapse]
1944
1944
  ]),
1945
- W(b(o(G), {
1945
+ Q(k(n(ee), {
1946
1946
  class: "x-mask-menu__favorites",
1947
1947
  subMenu: {
1948
1948
  popperClass: "x-mask-menu-popper",
@@ -1950,30 +1950,30 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1950
1950
  showTimeout: 200,
1951
1951
  hideTimeout: 200
1952
1952
  },
1953
- data: l.value,
1954
- "default-icon": o(ae),
1953
+ data: i.value,
1954
+ "default-icon": n(ae),
1955
1955
  collapse: !1,
1956
1956
  "collapse-transition": !1,
1957
1957
  "default-active": s.value,
1958
- "default-openeds": [ge],
1959
- onSelect: c
1958
+ "default-openeds": [_e],
1959
+ onSelect: u
1960
1960
  }, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
1961
- [K, !t.collapse]
1961
+ [Y, !e.collapse]
1962
1962
  ])
1963
1963
  ]),
1964
1964
  _: 1
1965
1965
  }, 512), [
1966
- [K, t.favorite && !t.keyword]
1966
+ [Y, e.favorite && !e.keyword]
1967
1967
  ]),
1968
- t.keyword ? W((u(), f(o(M), {
1968
+ e.keyword ? Q((c(), m(n(I), {
1969
1969
  key: 0,
1970
1970
  class: "x-mask-menu",
1971
1971
  grow: "",
1972
1972
  flex: !1,
1973
1973
  overflow: "auto"
1974
1974
  }, {
1975
- default: d(() => [
1976
- W(b(o(G), {
1975
+ default: p(() => [
1976
+ Q(k(n(ee), {
1977
1977
  class: "x-mask-menu__search",
1978
1978
  subMenu: {
1979
1979
  popperClass: "x-mask-menu-popper",
@@ -1981,17 +1981,17 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1981
1981
  showTimeout: 200,
1982
1982
  hideTimeout: 200
1983
1983
  },
1984
- data: i.value,
1985
- "default-icon": o(ae),
1984
+ data: l.value,
1985
+ "default-icon": n(ae),
1986
1986
  collapse: !0,
1987
1987
  "collapse-transition": !1,
1988
1988
  "default-active": s.value,
1989
- "default-openeds": [he],
1990
- onSelect: c
1989
+ "default-openeds": [ke],
1990
+ onSelect: u
1991
1991
  }, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
1992
- [K, t.collapse]
1992
+ [Y, e.collapse]
1993
1993
  ]),
1994
- W(b(o(G), {
1994
+ Q(k(n(ee), {
1995
1995
  class: "x-mask-menu__search",
1996
1996
  subMenu: {
1997
1997
  popperClass: "x-mask-menu-popper",
@@ -1999,24 +1999,24 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
1999
1999
  showTimeout: 200,
2000
2000
  hideTimeout: 200
2001
2001
  },
2002
- data: i.value,
2003
- "default-icon": o(ae),
2002
+ data: l.value,
2003
+ "default-icon": n(ae),
2004
2004
  collapse: !1,
2005
2005
  "collapse-transition": !1,
2006
2006
  "default-active": s.value,
2007
- "default-openeds": [he],
2008
- onSelect: c
2007
+ "default-openeds": [ke],
2008
+ onSelect: u
2009
2009
  }, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
2010
- [K, !t.collapse]
2010
+ [Y, !e.collapse]
2011
2011
  ])
2012
2012
  ]),
2013
2013
  _: 1
2014
2014
  }, 512)), [
2015
- [K, !!t.keyword]
2016
- ]) : y("", !0)
2015
+ [Y, !!e.keyword]
2016
+ ]) : h("", !0)
2017
2017
  ], 64));
2018
2018
  }
2019
- }), vo = { class: "x-mask-tabs__trigger" }, bo = { key: 1 }, _o = ["onDragstart", "onDragend"], wo = { key: 1 }, ko = /* @__PURE__ */ B({
2019
+ }), Vn = { class: "x-mask-tabs__trigger" }, Dn = { key: 1 }, Pn = ["onDragstart", "onDragend"], Rn = { key: 1 }, Fn = /* @__PURE__ */ E({
2020
2020
  __name: "Tabs",
2021
2021
  props: {
2022
2022
  tabs: {},
@@ -2026,63 +2026,63 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
2026
2026
  favorites: {}
2027
2027
  },
2028
2028
  emits: ["click", "remove", "refresh", "toggleFavorite", "dialog"],
2029
- setup(a, { emit: e }) {
2030
- const t = a, n = (p) => {
2031
- const m = !!t.favorites.find(
2032
- (h) => h === p.menu || h.id === p.menu?.id
2029
+ setup(a, { emit: t }) {
2030
+ const e = a, o = (d) => {
2031
+ const f = !!e.favorites.find(
2032
+ (y) => y === d.menu || y.id === d.menu?.id
2033
2033
  );
2034
2034
  return [
2035
2035
  {
2036
- icon: an,
2036
+ icon: _o,
2037
2037
  label: "刷新",
2038
2038
  name: "refresh",
2039
- value: p
2039
+ value: d
2040
2040
  },
2041
2041
  "|",
2042
2042
  {
2043
- icon: m ? ct : dt,
2043
+ icon: f ? pt : mt,
2044
2044
  label: "收藏",
2045
2045
  name: "favorite",
2046
- value: p.menu,
2047
- disabled: !p.menu
2046
+ value: d.menu,
2047
+ disabled: !d.menu
2048
2048
  },
2049
2049
  "|",
2050
2050
  {
2051
- icon: sn,
2051
+ icon: ko,
2052
2052
  label: "弹窗",
2053
2053
  name: "dialog",
2054
- value: p
2054
+ value: d
2055
2055
  }
2056
2056
  ];
2057
- }, s = (p) => {
2058
- const m = p.paneName;
2059
- if (m === t.home.id) {
2060
- e("click", t.home);
2057
+ }, s = (d) => {
2058
+ const f = d.paneName;
2059
+ if (f === e.home.id) {
2060
+ t("click", e.home);
2061
2061
  return;
2062
2062
  }
2063
- const h = t.tabs.find((k) => k.id === m);
2064
- h && e("click", h);
2065
- }, l = (p) => {
2066
- const m = t.tabs.find((h) => h.id === p);
2067
- m && e("remove", m);
2068
- }, i = (p) => {
2069
- switch (p.name) {
2063
+ const y = e.tabs.find((S) => S.id === f);
2064
+ y && t("click", y);
2065
+ }, i = (d) => {
2066
+ const f = e.tabs.find((y) => y.id === d);
2067
+ f && t("remove", f);
2068
+ }, l = (d) => {
2069
+ switch (d.name) {
2070
2070
  case "refresh":
2071
- e("refresh", p.value);
2071
+ t("refresh", d.value);
2072
2072
  break;
2073
2073
  case "favorite":
2074
- e("toggleFavorite", p.value);
2074
+ t("toggleFavorite", d.value);
2075
2075
  break;
2076
2076
  case "dialog":
2077
- e("dialog", p.value);
2077
+ t("dialog", d.value);
2078
2078
  break;
2079
2079
  }
2080
- }, c = (p, m) => {
2081
- m.dataTransfer && (m.dataTransfer.setData("tab", p.id), m.target && m.target.classList.add("is-dagging"));
2082
- }, r = (p, m) => {
2083
- m.target && m.target.classList.remove("is-dagging");
2080
+ }, u = (d, f) => {
2081
+ f.dataTransfer && (f.dataTransfer.setData("tab", d.id), f.target && f.target.classList.add("is-dagging"));
2082
+ }, r = (d, f) => {
2083
+ f.target && f.target.classList.remove("is-dagging");
2084
2084
  };
2085
- return (p, m) => (u(), f(o(M), {
2085
+ return (d, f) => (c(), m(n(I), {
2086
2086
  ref: "tabsRef",
2087
2087
  class: "x-mask-tabs",
2088
2088
  height: "100%",
@@ -2091,58 +2091,58 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
2091
2091
  justify: "flex-end",
2092
2092
  direction: "column"
2093
2093
  }, {
2094
- default: d(() => [
2095
- b(o(Qt), {
2094
+ default: p(() => [
2095
+ k(n(Gt), {
2096
2096
  type: "card",
2097
- "model-value": t.value,
2098
- onTabRemove: l,
2097
+ "model-value": e.value,
2098
+ onTabRemove: i,
2099
2099
  onTabClick: s
2100
2100
  }, {
2101
- default: d(() => [
2102
- t.home ? (u(), f(o(Le), {
2101
+ default: p(() => [
2102
+ e.home ? (c(), m(n(Ye), {
2103
2103
  key: 0,
2104
- name: t.home.id
2104
+ name: e.home.id
2105
2105
  }, {
2106
- label: d(() => [
2107
- $("div", vo, [
2108
- t.home.icon ? (u(), f(Z(o(we)(t.home.icon)), { key: 0 })) : y("", !0),
2109
- t.home.title ? (u(), V("span", bo, O(t.home.title), 1)) : y("", !0)
2106
+ label: p(() => [
2107
+ F("div", Vn, [
2108
+ e.home.icon ? (c(), m(L(n(Ce)(e.home.icon)), { key: 0 })) : h("", !0),
2109
+ e.home.title ? (c(), A("span", Dn, j(e.home.title), 1)) : h("", !0)
2110
2110
  ])
2111
2111
  ]),
2112
2112
  _: 1
2113
- }, 8, ["name"])) : y("", !0),
2114
- (u(!0), V(q, null, ke(t.tabs, (h) => (u(), f(o(Le), {
2115
- key: h.id,
2116
- name: h.id,
2113
+ }, 8, ["name"])) : h("", !0),
2114
+ (c(!0), A(Z, null, le(e.tabs, (y) => (c(), m(n(Ye), {
2115
+ key: y.id,
2116
+ name: y.id,
2117
2117
  lazy: "",
2118
2118
  closable: ""
2119
2119
  }, {
2120
- label: d(() => [
2121
- b(o(it), {
2120
+ label: p(() => [
2121
+ k(n(ut), {
2122
2122
  "open-delay": 500,
2123
2123
  placement: "bottom",
2124
2124
  trigger: "hover",
2125
2125
  width: "200px",
2126
- disabled: h.id !== t.value
2126
+ disabled: y.id !== e.value
2127
2127
  }, {
2128
- reference: d(() => [
2129
- $("div", {
2128
+ reference: p(() => [
2129
+ F("div", {
2130
2130
  class: "x-mask-tabs__trigger",
2131
2131
  draggable: "true",
2132
- onDragstart: (k) => c(h, k),
2133
- onDragend: (k) => r(h, k)
2132
+ onDragstart: (S) => u(y, S),
2133
+ onDragend: (S) => r(y, S)
2134
2134
  }, [
2135
- h.icon ? (u(), f(Z(o(we)(h.icon)), { key: 0 })) : y("", !0),
2136
- h.title ? (u(), V("span", wo, O(h.title), 1)) : y("", !0)
2137
- ], 40, _o)
2135
+ y.icon ? (c(), m(L(n(Ce)(y.icon)), { key: 0 })) : h("", !0),
2136
+ y.title ? (c(), A("span", Rn, j(y.title), 1)) : h("", !0)
2137
+ ], 40, Pn)
2138
2138
  ]),
2139
- default: d(() => [
2140
- b(o(je), {
2141
- items: n(h),
2139
+ default: p(() => [
2140
+ k(n(Ke), {
2141
+ items: o(y),
2142
2142
  mode: "text",
2143
2143
  size: "small",
2144
2144
  type: "info",
2145
- onClick: i
2145
+ onClick: l
2146
2146
  }, null, 8, ["items"])
2147
2147
  ]),
2148
2148
  _: 2
@@ -2157,20 +2157,20 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
2157
2157
  _: 1
2158
2158
  }, 512));
2159
2159
  }
2160
- }), xo = /* @__PURE__ */ B({
2160
+ }), On = /* @__PURE__ */ E({
2161
2161
  __name: "ThemeSwitch",
2162
2162
  setup(a) {
2163
- const e = _n();
2164
- return (t, n) => (u(), f(o(lt), {
2163
+ const t = Do();
2164
+ return (e, o) => (c(), m(n(Xe), {
2165
2165
  class: "x-mask-theme-switch",
2166
- modelValue: o(e),
2167
- "onUpdate:modelValue": n[0] || (n[0] = (s) => ye(e) ? e.value = s : null),
2166
+ modelValue: n(t),
2167
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => we(t) ? t.value = s : null),
2168
2168
  size: "default",
2169
- "active-action-icon": o(ln),
2170
- "inactive-action-icon": o(rn)
2169
+ "active-action-icon": n(wo),
2170
+ "inactive-action-icon": n(xo)
2171
2171
  }, null, 8, ["modelValue", "active-action-icon", "inactive-action-icon"]));
2172
2172
  }
2173
- }), zo = { class: "x-mask-toolbar__menu-item" }, So = /* @__PURE__ */ B({
2173
+ }), jn = { class: "x-mask-toolbar__menu-item" }, Nn = /* @__PURE__ */ E({
2174
2174
  __name: "Toolbar",
2175
2175
  props: {
2176
2176
  tabs: { default: () => [] },
@@ -2185,12 +2185,12 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
2185
2185
  "actionClick",
2186
2186
  "actionCommand"
2187
2187
  ],
2188
- setup(a, { emit: e }) {
2189
- const t = a, n = v(() => {
2190
- const r = t.tabs.map((p, m) => ({
2191
- divided: m === 0,
2192
- label: p.title,
2193
- command: p
2188
+ setup(a, { emit: t }) {
2189
+ const e = a, o = v(() => {
2190
+ const r = e.tabs.map((d, f) => ({
2191
+ divided: f === 0,
2192
+ label: d.title,
2193
+ command: d
2194
2194
  }));
2195
2195
  return [
2196
2196
  {
@@ -2204,126 +2204,126 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
2204
2204
  ...r
2205
2205
  ];
2206
2206
  }), s = (r) => {
2207
- e("closeTab", r.command);
2208
- }, l = (r) => {
2207
+ t("closeTab", r.command);
2208
+ }, i = (r) => {
2209
2209
  switch (r.command) {
2210
2210
  case "all":
2211
- e("closeAllTabs");
2211
+ t("closeAllTabs");
2212
2212
  break;
2213
2213
  case "other":
2214
- e("closeOtherTabs");
2214
+ t("closeOtherTabs");
2215
2215
  break;
2216
2216
  default:
2217
- e("clickTab", r.command);
2217
+ t("clickTab", r.command);
2218
2218
  break;
2219
2219
  }
2220
- }, i = (r) => {
2221
- e("actionClick", r);
2222
- }, c = (r, p) => {
2223
- e("actionCommand", r, p);
2220
+ }, l = (r) => {
2221
+ t("actionClick", r);
2222
+ }, u = (r, d) => {
2223
+ t("actionCommand", r, d);
2224
2224
  };
2225
- return (r, p) => (u(), f(o(M), {
2225
+ return (r, d) => (c(), m(n(I), {
2226
2226
  class: "x-mask-toolbar",
2227
2227
  align: "center"
2228
2228
  }, {
2229
- default: d(() => [
2230
- b(o(Q), {
2231
- icon: o(cn),
2232
- menus: n.value,
2229
+ default: p(() => [
2230
+ k(n(J), {
2231
+ icon: n(So),
2232
+ menus: o.value,
2233
2233
  dropdown: { size: "small" },
2234
2234
  mode: "icon",
2235
2235
  circle: "",
2236
2236
  background: "hover",
2237
- onCommand: l
2237
+ onCommand: i
2238
2238
  }, {
2239
- item: d(({ item: m }) => [
2240
- $("span", zo, [
2241
- N(O(m.label) + " ", 1),
2242
- ["other", "all"].includes(m.command) ? y("", !0) : (u(), f(o(te), {
2239
+ item: p(({ item: f }) => [
2240
+ F("span", jn, [
2241
+ N(j(f.label) + " ", 1),
2242
+ ["other", "all"].includes(f.command) ? h("", !0) : (c(), m(n(te), {
2243
2243
  key: 0,
2244
- onClick: At((h) => s(m), ["stop"]),
2245
- icon: o(ut)
2244
+ onClick: Rt((y) => s(f), ["stop"]),
2245
+ icon: n(ft)
2246
2246
  }, null, 8, ["onClick", "icon"]))
2247
2247
  ])
2248
2248
  ]),
2249
2249
  _: 1
2250
2250
  }, 8, ["icon", "menus"]),
2251
- b(o(ue), { direction: "vertical" }),
2252
- t.actions ? (u(), f(o(je), {
2251
+ k(n(me), { direction: "vertical" }),
2252
+ e.actions ? (c(), m(n(Ke), {
2253
2253
  key: 0,
2254
2254
  circle: "",
2255
2255
  mode: "icon",
2256
2256
  size: "default",
2257
2257
  background: "hover",
2258
2258
  items: r.actions,
2259
- onClick: i,
2260
- onCommand: c
2261
- }, null, 8, ["items"])) : y("", !0),
2262
- t.actions ? (u(), f(o(ue), {
2259
+ onClick: l,
2260
+ onCommand: u
2261
+ }, null, 8, ["items"])) : h("", !0),
2262
+ e.actions ? (c(), m(n(me), {
2263
2263
  key: 1,
2264
2264
  direction: "vertical"
2265
- })) : y("", !0),
2266
- t.theme ? (u(), f(xo, { key: 2 })) : y("", !0),
2267
- t.theme ? (u(), f(o(ue), {
2265
+ })) : h("", !0),
2266
+ e.theme ? (c(), m(On, { key: 2 })) : h("", !0),
2267
+ e.theme ? (c(), m(n(me), {
2268
2268
  key: 3,
2269
2269
  direction: "vertical"
2270
- })) : y("", !0),
2270
+ })) : h("", !0),
2271
2271
  z(r.$slots, "default")
2272
2272
  ]),
2273
2273
  _: 3
2274
2274
  }));
2275
2275
  }
2276
- }), Co = /* @__PURE__ */ B({
2276
+ }), Xn = /* @__PURE__ */ E({
2277
2277
  __name: "Avatar",
2278
2278
  props: {
2279
2279
  avatar: {}
2280
2280
  },
2281
2281
  setup(a) {
2282
- const e = a;
2283
- return (t, n) => (u(), f(o(it), {
2282
+ const t = a;
2283
+ return (e, o) => (c(), m(n(ut), {
2284
2284
  width: 200,
2285
2285
  "popper-class": "x-mask-avatar__popper",
2286
- disabled: !t.$slots.default
2286
+ disabled: !e.$slots.default
2287
2287
  }, {
2288
- reference: d(() => [
2289
- b(o(Zt), {
2288
+ reference: p(() => [
2289
+ k(n(Yt), {
2290
2290
  class: "x-mask-avatar",
2291
2291
  shape: "circle",
2292
- icon: o(un),
2293
- src: e.avatar,
2292
+ icon: n(zo),
2293
+ src: t.avatar,
2294
2294
  size: 26
2295
2295
  }, null, 8, ["icon", "src"])
2296
2296
  ]),
2297
- default: d(() => [
2298
- t.$slots.default ? z(t.$slots, "default", { key: 0 }) : y("", !0)
2297
+ default: p(() => [
2298
+ e.$slots.default ? z(e.$slots, "default", { key: 0 }) : h("", !0)
2299
2299
  ]),
2300
2300
  _: 3
2301
2301
  }, 8, ["disabled"]));
2302
2302
  }
2303
- }), Ye = /* @__PURE__ */ B({
2303
+ }), at = /* @__PURE__ */ E({
2304
2304
  __name: "Content",
2305
2305
  props: {
2306
2306
  createView: { type: Function },
2307
2307
  exclude: {}
2308
2308
  },
2309
2309
  setup(a) {
2310
- const e = a;
2311
- return (t, n) => (u(), f(o(M), {
2310
+ const t = a;
2311
+ return (e, o) => (c(), m(n(I), {
2312
2312
  class: "x-mask__content",
2313
2313
  flex: !1,
2314
2314
  grow: "",
2315
2315
  padding: !1
2316
2316
  }, {
2317
- default: d(() => [
2318
- z(t.$slots, "default"),
2319
- b(o(pt), null, {
2320
- default: d(({ Component: s, route: l }) => [
2321
- (u(), f(Dt, {
2322
- exclude: e.exclude
2317
+ default: p(() => [
2318
+ z(e.$slots, "default"),
2319
+ k(n(gt), null, {
2320
+ default: p(({ Component: s, route: i }) => [
2321
+ (c(), m(Ft, {
2322
+ exclude: t.exclude
2323
2323
  }, [
2324
- s ? (u(), f(Z(e.createView(s, l)), {
2325
- key: l.fullPath
2326
- })) : y("", !0)
2324
+ s ? (c(), m(L(t.createView(s, i)), {
2325
+ key: i.fullPath
2326
+ })) : h("", !0)
2327
2327
  ], 1032, ["exclude"]))
2328
2328
  ]),
2329
2329
  _: 1
@@ -2332,13 +2332,13 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
2332
2332
  _: 3
2333
2333
  }));
2334
2334
  }
2335
- }), To = 140, Mo = {
2335
+ }), Un = 140, Hn = {
2336
2336
  /**
2337
2337
  * 系统logo
2338
2338
  */
2339
2339
  logo: {
2340
2340
  type: String,
2341
- default: vt
2341
+ default: bt
2342
2342
  },
2343
2343
  /**
2344
2344
  * 系统标题
@@ -2415,382 +2415,382 @@ const uo = /* @__PURE__ */ $("div", { class: "x-mask-sidebar__helper" }, null, -
2415
2415
  removeFavorite: {
2416
2416
  type: Function
2417
2417
  }
2418
- }, St = Symbol(), Ct = Symbol();
2419
- function Eo(a) {
2420
- const e = R(!1), t = R(""), n = R(!1);
2418
+ }, Ct = Symbol(), Tt = Symbol();
2419
+ function Wn(a) {
2420
+ const t = O(!1), e = O(""), o = O(!1);
2421
2421
  return {
2422
- collapsed: e,
2423
- keyword: t,
2424
- favorite: n
2422
+ collapsed: t,
2423
+ keyword: e,
2424
+ favorite: o
2425
2425
  };
2426
2426
  }
2427
- function Io(a) {
2428
- const e = ht();
2427
+ function Ln(a) {
2428
+ const t = ht();
2429
2429
  return v(() => {
2430
- const t = a.home;
2430
+ const e = a.home;
2431
2431
  return Object.assign(
2432
- { id: e, url: "/", name: "MaskHome", icon: dn, closable: !1 },
2433
- typeof t == "string" ? { url: t } : t || {}
2432
+ { id: t, url: "/", name: "MaskHome", icon: Co, closable: !1 },
2433
+ typeof e == "string" ? { url: e } : e || {}
2434
2434
  );
2435
2435
  });
2436
2436
  }
2437
- function Tt(a, e) {
2438
- let t = [];
2439
- return a.forEach((n) => {
2440
- n = e ? e(n) : n, n.children ? t = t.concat(Tt(n.children, e)) : t.push(n);
2441
- }), t;
2437
+ function Et(a, t) {
2438
+ let e = [];
2439
+ return a.forEach((o) => {
2440
+ o = t ? t(o) : o, o.children ? e = e.concat(Et(o.children, t)) : e.push(o);
2441
+ }), e;
2442
2442
  }
2443
- function Bo(a, e) {
2444
- const t = xe(), n = Ue([]), s = Ue([]), l = v(() => Tt(n.value, a.menuAdapter)), i = v(() => wn(l.value, "id")), c = R(null), r = (_) => {
2445
- const w = typeof _ == "object" ? _.id : _, E = i.value.get(w);
2446
- if (!E) {
2447
- console.warn("找不到菜单", _);
2443
+ function Kn(a, t) {
2444
+ const e = Me(), o = Je([]), s = Je([]), i = v(() => Et(o.value, a.menuAdapter)), l = v(() => Po(i.value, "id")), u = O(null), r = (w) => {
2445
+ const _ = typeof w == "object" ? w.id : w, T = l.value.get(_);
2446
+ if (!T) {
2447
+ console.warn("找不到菜单", w);
2448
2448
  return;
2449
2449
  }
2450
- const { type: D = "route", url: g, title: I, icon: C } = E;
2450
+ const { type: V = "route", url: g, title: M, icon: b } = T;
2451
2451
  if (!g) {
2452
- c.value = E, e("select", E);
2452
+ u.value = T, t("select", T);
2453
2453
  return;
2454
2454
  }
2455
- if (D === "route") {
2456
- kn(g) || g.startsWith("//") ? window.open(g) : (c.value = E, t.push(g).catch((F) => F));
2455
+ if (V === "route") {
2456
+ Ro(g) || g.startsWith("//") ? window.open(g) : (u.value = T, e.push(g).catch((D) => D));
2457
2457
  return;
2458
2458
  }
2459
- if (D === "window") {
2459
+ if (V === "window") {
2460
2460
  window.open(g);
2461
2461
  return;
2462
2462
  }
2463
- D === "dialog" && Ne({
2463
+ V === "dialog" && Qe({
2464
2464
  resizable: !0,
2465
2465
  bodyPadding: !1,
2466
2466
  width: "80%",
2467
2467
  height: "80%",
2468
- title: I,
2469
- icon: C,
2468
+ title: M,
2469
+ icon: b,
2470
2470
  src: g
2471
2471
  });
2472
- }, p = async () => {
2473
- n.value = typeof a.menus == "function" ? await a.menus() || [] : a.menus ?? [], s.value = typeof a.favorites == "function" ? await a.favorites() || [] : a.favorites ?? [];
2474
- }, m = (_) => {
2475
- s.value = [_, ...s.value], a.addFavorite && a.addFavorite(_);
2476
- }, h = (_) => {
2477
- s.value = s.value.filter((w) => w.id !== _.id), a.removeFavorite && a.removeFavorite(_);
2478
- }, k = (_) => !!s.value.find((w) => w === _ || w.id === _.id), A = (_) => {
2479
- k(_) ? h(_) : m(_);
2472
+ }, d = async () => {
2473
+ o.value = typeof a.menus == "function" ? await a.menus() || [] : a.menus ?? [], s.value = typeof a.favorites == "function" ? await a.favorites() || [] : a.favorites ?? [];
2474
+ }, f = (w) => {
2475
+ s.value = [w, ...s.value], a.addFavorite && a.addFavorite(w);
2476
+ }, y = (w) => {
2477
+ s.value = s.value.filter((_) => _.id !== w.id), a.removeFavorite && a.removeFavorite(w);
2478
+ }, S = (w) => !!s.value.find((_) => _ === w || _.id === w.id), $ = (w) => {
2479
+ S(w) ? y(w) : f(w);
2480
2480
  };
2481
- return ot(p), {
2482
- menus: n,
2481
+ return it(d), {
2482
+ menus: o,
2483
2483
  favorites: s,
2484
- flatMenus: l,
2485
- active: c,
2484
+ flatMenus: i,
2485
+ active: u,
2486
2486
  select: r,
2487
- toggleFavorite: A
2487
+ toggleFavorite: $
2488
2488
  };
2489
2489
  }
2490
- function Ao(a, e, t, n, s) {
2491
- const l = Fe(), i = xe(), c = {}, r = R([]), p = R(), { width: m } = ft(p), h = v(() => Math.floor(m.value / To)), k = v(
2492
- () => r.value.slice(0, h.value).filter((x) => !x.dialog)
2493
- ), A = v(() => r.value.slice(h.value)), _ = (x) => t.value.find((S) => S.url === x), w = (x) => l.fullPath === x.url, E = (x) => s.value.id === x ? s.value : r.value.find((S) => S.id === x), D = R(""), g = v(() => E(D.value)), I = (x) => {
2494
- i.push(x.url).catch((S) => S);
2495
- }, C = (x) => {
2496
- D.value = x.id, l.fullPath !== x.url && I(x);
2497
- }, F = () => {
2498
- I(s.value);
2499
- }, H = (x) => {
2500
- const S = r.value.find((T) => T.url === x.url || T.id === x.id);
2501
- S ? C(S) : (r.value.unshift(x), C(x));
2502
- }, ne = async (x) => {
2503
- const { url: S = l.fullPath, icon: T, title: Se = "新建标签页" } = x || {}, fe = c[S], Ce = ht(), Te = yt(S);
2490
+ function Qn(a, t, e, o, s) {
2491
+ const i = Ue(), l = Me(), u = {}, r = O([]), d = O(), { width: f } = yt(d), y = v(() => Math.floor(f.value / Un)), S = v(
2492
+ () => r.value.slice(0, y.value).filter((x) => !x.dialog)
2493
+ ), $ = v(() => r.value.slice(y.value)), w = (x) => e.value.find((C) => C.url === x), _ = (x) => i.fullPath === x.url, T = (x) => s.value.id === x ? s.value : r.value.find((C) => C.id === x), V = O(""), g = v(() => T(V.value)), M = (x) => {
2494
+ l.push(x.url).catch((C) => C);
2495
+ }, b = (x) => {
2496
+ V.value = x.id, i.fullPath !== x.url && M(x);
2497
+ }, D = () => {
2498
+ M(s.value);
2499
+ }, P = (x) => {
2500
+ const C = r.value.find((B) => B.url === x.url || B.id === x.id);
2501
+ C ? b(C) : (r.value.unshift(x), b(x));
2502
+ }, oe = async (x) => {
2503
+ const { url: C = i.fullPath, icon: B, title: Ie = "新建标签页" } = x || {}, ve = u[C], Ae = ht(), $e = vt(C);
2504
2504
  return {
2505
- id: Ce,
2506
- name: Te,
2507
- url: S,
2508
- icon: T,
2509
- title: Se,
2505
+ id: Ae,
2506
+ name: $e,
2507
+ url: C,
2508
+ icon: B,
2509
+ title: Ie,
2510
2510
  closable: !0,
2511
2511
  menu: x,
2512
- ...fe ? await fe() : {}
2512
+ ...ve ? await ve() : {}
2513
2513
  };
2514
- }, oe = async (x) => {
2515
- if (await Me.confirm("是否关闭页签", "提示", {
2514
+ }, ne = async (x) => {
2515
+ if (await Ve.confirm("是否关闭页签", "提示", {
2516
2516
  type: "warning"
2517
- }).catch((T) => !1)) {
2518
- if (r.value = r.value.filter((T) => T.id !== x.id), D.value === x.id) {
2519
- const T = r.value[0];
2520
- I(T || s.value);
2517
+ }).catch((B) => !1)) {
2518
+ if (r.value = r.value.filter((B) => B.id !== x.id), V.value === x.id) {
2519
+ const B = r.value[0];
2520
+ M(B || s.value);
2521
2521
  }
2522
2522
  return x;
2523
2523
  }
2524
- }, j = (x) => {
2525
- const S = r.value.findIndex((T) => T.id === x.id);
2526
- if (S >= 0) {
2527
- const T = r.value[S];
2528
- r.value.splice(S, 1, Object.assign(T, x));
2524
+ }, U = (x) => {
2525
+ const C = r.value.findIndex((B) => B.id === x.id);
2526
+ if (C >= 0) {
2527
+ const B = r.value[C];
2528
+ r.value.splice(C, 1, Object.assign(B, x));
2529
2529
  }
2530
- }, L = async () => {
2531
- if (!await Me.confirm("是否关闭全部页签", "提示", {
2530
+ }, K = async () => {
2531
+ if (!await Ve.confirm("是否关闭全部页签", "提示", {
2532
2532
  type: "warning"
2533
- }).catch((T) => !1))
2533
+ }).catch((B) => !1))
2534
2534
  return;
2535
- const S = r.value;
2536
- return r.value = [], C(s.value), S;
2537
- }, se = async () => {
2538
- if (!await Me.confirm("是否关闭其他页签", "提示", {
2535
+ const C = r.value;
2536
+ return r.value = [], b(s.value), C;
2537
+ }, ie = async () => {
2538
+ if (!await Ve.confirm("是否关闭其他页签", "提示", {
2539
2539
  type: "warning"
2540
- }).catch((T) => !1))
2540
+ }).catch((B) => !1))
2541
2541
  return;
2542
- const S = r.value.filter((T) => T.id !== D.value);
2543
- return r.value = r.value.filter((T) => T.id === D.value), S;
2544
- }, ze = (x) => {
2545
- const S = r.value.filter((T) => T.id !== x.id);
2546
- r.value = [x, ...S], C(x);
2547
- }, re = async () => {
2548
- await le();
2549
- const x = s.value.url === l.fullPath, S = _(l.fullPath);
2542
+ const C = r.value.filter((B) => B.id !== V.value);
2543
+ return r.value = r.value.filter((B) => B.id === V.value), C;
2544
+ }, Be = (x) => {
2545
+ const C = r.value.filter((B) => B.id !== x.id);
2546
+ r.value = [x, ...C], b(x);
2547
+ }, de = async () => {
2548
+ await re();
2549
+ const x = s.value.url === i.fullPath, C = w(i.fullPath);
2550
2550
  if (x)
2551
- D.value = s.value.id;
2551
+ V.value = s.value.id;
2552
2552
  else {
2553
- const T = await ne(S);
2554
- H(T);
2553
+ const B = await oe(C);
2554
+ P(B);
2555
2555
  }
2556
- await le(), n.value = S || null;
2556
+ await re(), o.value = C || null;
2557
2557
  };
2558
- return ee(t, re), ee(l, re, { immediate: !0 }), Re(St, c), {
2559
- tabRef: p,
2558
+ return H(e, de), H(i, de, { immediate: !0 }), ye(Ct, u), {
2559
+ tabRef: d,
2560
2560
  tabs: r,
2561
- showTabs: k,
2561
+ showTabs: S,
2562
2562
  currentTab: g,
2563
- changeTab: I,
2564
- removeTab: oe,
2565
- updateTab: j,
2566
- addTab: H,
2563
+ changeTab: M,
2564
+ removeTab: ne,
2565
+ updateTab: U,
2566
+ addTab: P,
2567
2567
  home: s,
2568
- tabValue: D,
2569
- isCurrentTab: w,
2570
- activeHome: F,
2571
- activeTab: C,
2572
- dropdownTabs: A,
2573
- removeAllTabs: L,
2574
- removeOtherTabs: se,
2575
- moveToShow: ze
2568
+ tabValue: V,
2569
+ isCurrentTab: _,
2570
+ activeHome: D,
2571
+ activeTab: b,
2572
+ dropdownTabs: $,
2573
+ removeAllTabs: K,
2574
+ removeOtherTabs: ie,
2575
+ moveToShow: Be
2576
2576
  };
2577
2577
  }
2578
- function Do(a) {
2579
- const e = /* @__PURE__ */ new Map(), t = R([]), n = nt({}), s = {}, { updateTab: l, isCurrentTab: i, activeHome: c, tabs: r } = a, p = (g, I) => {
2580
- const C = I.fullPath;
2581
- if (e.has(C))
2582
- return e.get(C);
2578
+ function Zn(a) {
2579
+ const t = /* @__PURE__ */ new Map(), e = O([]), o = Ne({}), s = {}, { updateTab: i, isCurrentTab: l, activeHome: u, tabs: r } = a, d = (g, M) => {
2580
+ const b = M.fullPath;
2581
+ if (t.has(b))
2582
+ return t.get(b);
2583
2583
  {
2584
- const F = yt(C), H = {
2585
- name: F,
2584
+ const D = vt(b), P = {
2585
+ name: D,
2586
2586
  setup() {
2587
- const ne = v(() => n[C] || document.body), oe = v(() => !n[C]), j = v(() => !t.value.includes(F));
2588
- return Re(
2589
- fn,
2590
- Vt({ ...I })
2591
- ), () => j.value ? Y(
2592
- at,
2587
+ const oe = v(() => o[b] || document.body), ne = v(() => !o[b]), U = v(() => !e.value.includes(D));
2588
+ return ye(
2589
+ Eo,
2590
+ Pe({ ...M })
2591
+ ), () => U.value ? q(
2592
+ rt,
2593
2593
  {
2594
- to: ne.value,
2595
- disabled: oe.value
2594
+ to: oe.value,
2595
+ disabled: ne.value
2596
2596
  },
2597
- [Y(g)]
2597
+ [q(g)]
2598
2598
  ) : null;
2599
2599
  }
2600
2600
  };
2601
- return e.set(C, H), H;
2601
+ return t.set(b, P), P;
2602
2602
  }
2603
- }, m = (g) => {
2604
- g.dialog = void 0, delete n[g.url];
2605
- const I = s[g.id];
2606
- I && (I.destroy(), delete s[g.id], l(g));
2607
- }, h = (g = []) => {
2608
- g.forEach((I) => {
2609
- m(I);
2603
+ }, f = (g) => {
2604
+ g.dialog = void 0, delete o[g.url];
2605
+ const M = s[g.id];
2606
+ M && (M.destroy(), delete s[g.id], i(g));
2607
+ }, y = (g = []) => {
2608
+ g.forEach((M) => {
2609
+ f(M);
2610
2610
  });
2611
- }, k = async (g) => {
2611
+ }, S = async (g) => {
2612
2612
  g.dialog = {
2613
2613
  ...g.dialog,
2614
2614
  onMinimized: () => {
2615
- m(g);
2615
+ f(g);
2616
2616
  },
2617
2617
  onClose: async () => {
2618
- m(g), r.value = r.value.filter((C) => C.id !== g.id);
2618
+ f(g), r.value = r.value.filter((b) => b.id !== g.id);
2619
2619
  }
2620
- }, l(g);
2621
- const I = Ne({
2620
+ }, i(g);
2621
+ const M = Qe({
2622
2622
  title: g.title,
2623
2623
  icon: g.icon,
2624
2624
  modal: !1,
2625
2625
  resizable: !0,
2626
2626
  draggable: !0,
2627
2627
  ...g.dialog,
2628
- onOpen(C) {
2629
- n[g.url] = C.refs.panelRef?.bodyRef?.$el;
2628
+ onOpen(b) {
2629
+ o[g.url] = b.refs.panelRef?.bodyRef?.$el;
2630
2630
  }
2631
2631
  });
2632
- return await le(), i(g) && c(), s[g.id] = I, I;
2633
- }, A = async (g) => {
2634
- t.value = [g.name], await le(), t.value = [];
2635
- }, _ = async (g) => {
2636
- t.value = g.map((I) => I.name), await le(), t.value = [];
2637
- }, w = (g) => (g.preventDefault(), !1), E = (g) => {
2632
+ return await re(), l(g) && u(), s[g.id] = M, M;
2633
+ }, $ = async (g) => {
2634
+ e.value = [g.name], await re(), e.value = [];
2635
+ }, w = async (g) => {
2636
+ e.value = g.map((M) => M.name), await re(), e.value = [];
2637
+ }, _ = (g) => (g.preventDefault(), !1), T = (g) => {
2638
2638
  if (g.dataTransfer) {
2639
- const I = g.dataTransfer.getData("tab"), C = r.value.find((F) => F.id === I);
2640
- if (C) {
2641
- const { clientX: F, clientY: H } = g;
2642
- C.dialog = {
2643
- left: F,
2644
- top: H
2645
- }, k(C);
2639
+ const M = g.dataTransfer.getData("tab"), b = r.value.find((D) => D.id === M);
2640
+ if (b) {
2641
+ const { clientX: D, clientY: P } = g;
2642
+ b.dialog = {
2643
+ left: D,
2644
+ top: P
2645
+ }, S(b);
2646
2646
  }
2647
2647
  }
2648
- }, D = (g) => !!n[g];
2649
- return _e(document, "dragover", w), _e(document, "drop", E), {
2650
- createView: p,
2651
- openDialog: k,
2652
- refresh: A,
2653
- exclude: t,
2654
- cleanCache: _,
2655
- hasDialog: D,
2656
- closeDialog: m,
2657
- closeDialogs: h
2648
+ }, V = (g) => !!o[g];
2649
+ return ze(document, "dragover", _), ze(document, "drop", T), {
2650
+ createView: d,
2651
+ openDialog: S,
2652
+ refresh: $,
2653
+ exclude: e,
2654
+ cleanCache: w,
2655
+ hasDialog: V,
2656
+ closeDialog: f,
2657
+ closeDialogs: y
2658
2658
  };
2659
2659
  }
2660
- const Vo = /* @__PURE__ */ B({
2660
+ const Jn = /* @__PURE__ */ E({
2661
2661
  name: "XMask",
2662
2662
  __name: "Mask",
2663
- props: Mo,
2663
+ props: Hn,
2664
2664
  emits: ["select", "actionClick", "actionCommand"],
2665
- setup(a, { emit: e }) {
2666
- const t = a, n = Io(t), { collapsed: s, keyword: l, favorite: i } = Eo(), { menus: c, favorites: r, flatMenus: p, active: m, select: h, toggleFavorite: k } = Bo(t, e), {
2667
- tabRef: A,
2668
- showTabs: _,
2669
- currentTab: w,
2670
- changeTab: E,
2671
- removeTab: D,
2665
+ setup(a, { emit: t }) {
2666
+ const e = a, o = Ln(e), { collapsed: s, keyword: i, favorite: l } = Wn(), { menus: u, favorites: r, flatMenus: d, active: f, select: y, toggleFavorite: S } = Kn(e, t), {
2667
+ tabRef: $,
2668
+ showTabs: w,
2669
+ currentTab: _,
2670
+ changeTab: T,
2671
+ removeTab: V,
2672
2672
  tabs: g,
2673
- updateTab: I,
2674
- isCurrentTab: C,
2675
- activeHome: F,
2676
- removeAllTabs: H,
2677
- removeOtherTabs: ne,
2678
- dropdownTabs: oe,
2679
- moveToShow: j
2680
- } = Ao(t, e, p, m, n), { createView: L, openDialog: se, refresh: ze, exclude: re, cleanCache: x, closeDialogs: S } = Do({
2673
+ updateTab: M,
2674
+ isCurrentTab: b,
2675
+ activeHome: D,
2676
+ removeAllTabs: P,
2677
+ removeOtherTabs: oe,
2678
+ dropdownTabs: ne,
2679
+ moveToShow: U
2680
+ } = Qn(e, t, d, f, o), { createView: K, openDialog: ie, refresh: Be, exclude: de, cleanCache: x, closeDialogs: C } = Zn({
2681
2681
  tabs: g,
2682
- updateTab: I,
2683
- isCurrentTab: C,
2684
- activeHome: F
2685
- }), T = async (P) => {
2686
- await D(P) && await x([P]);
2687
- }, Se = async () => {
2688
- const P = await H();
2689
- P && (S(P), await x(P));
2690
- }, fe = async () => {
2691
- const P = await ne();
2692
- P && (S(P), await x(P));
2693
- }, Ce = (P) => {
2694
- e("actionClick", P);
2695
- }, Te = (P, J) => {
2696
- e("actionCommand", P, J);
2682
+ updateTab: M,
2683
+ isCurrentTab: b,
2684
+ activeHome: D
2685
+ }), B = async (R) => {
2686
+ await V(R) && await x([R]);
2687
+ }, Ie = async () => {
2688
+ const R = await P();
2689
+ R && (C(R), await x(R));
2690
+ }, ve = async () => {
2691
+ const R = await oe();
2692
+ R && (C(R), await x(R));
2693
+ }, Ae = (R) => {
2694
+ t("actionClick", R);
2695
+ }, $e = (R, G) => {
2696
+ t("actionCommand", R, G);
2697
2697
  };
2698
- return Re(Ct, {
2698
+ return ye(Tt, {
2699
2699
  tabs: g,
2700
- flatMenus: p,
2700
+ flatMenus: d,
2701
2701
  favorites: r,
2702
- updateTab: I,
2703
- active: m,
2704
- currentTab: w
2705
- }), (P, J) => (u(), f(o(M), { class: "x-mask" }, {
2706
- default: d(() => [
2707
- t.disabled ? (u(), f(Ye, {
2702
+ updateTab: M,
2703
+ active: f,
2704
+ currentTab: _
2705
+ }), (R, G) => (c(), m(n(I), { class: "x-mask" }, {
2706
+ default: p(() => [
2707
+ e.disabled ? (c(), m(at, {
2708
2708
  key: 1,
2709
- createView: o(L),
2710
- exclude: o(re)
2709
+ createView: n(K),
2710
+ exclude: n(de)
2711
2711
  }, {
2712
- default: d(() => [
2713
- P.$slots.default ? z(P.$slots, "default", { key: 0 }) : y("", !0)
2712
+ default: p(() => [
2713
+ R.$slots.default ? z(R.$slots, "default", { key: 0 }) : h("", !0)
2714
2714
  ]),
2715
2715
  _: 3
2716
- }, 8, ["createView", "exclude"])) : (u(), V(q, { key: 0 }, [
2717
- b(po, { collapsed: o(s) }, {
2718
- brand: d(() => [
2719
- b(ho, {
2720
- logo: t.logo,
2721
- title: t.title,
2722
- url: o(n).url,
2723
- collapsed: o(s)
2716
+ }, 8, ["createView", "exclude"])) : (c(), A(Z, { key: 0 }, [
2717
+ k(En, { collapsed: n(s) }, {
2718
+ brand: p(() => [
2719
+ k(An, {
2720
+ logo: e.logo,
2721
+ title: e.title,
2722
+ url: n(o).url,
2723
+ collapsed: n(s)
2724
2724
  }, null, 8, ["logo", "title", "url", "collapsed"])
2725
2725
  ]),
2726
- default: d(() => [
2727
- b(fo, {
2728
- collasped: o(s),
2729
- "onUpdate:collasped": J[0] || (J[0] = (ce) => ye(s) ? s.value = ce : null),
2730
- favorite: o(i),
2731
- "onUpdate:favorite": J[1] || (J[1] = (ce) => ye(i) ? i.value = ce : null),
2732
- keyword: o(l),
2733
- "onUpdate:keyword": J[2] || (J[2] = (ce) => ye(l) ? l.value = ce : null)
2726
+ default: p(() => [
2727
+ k(Mn, {
2728
+ collasped: n(s),
2729
+ "onUpdate:collasped": G[0] || (G[0] = (pe) => we(s) ? s.value = pe : null),
2730
+ favorite: n(l),
2731
+ "onUpdate:favorite": G[1] || (G[1] = (pe) => we(l) ? l.value = pe : null),
2732
+ keyword: n(i),
2733
+ "onUpdate:keyword": G[2] || (G[2] = (pe) => we(i) ? i.value = pe : null)
2734
2734
  }, null, 8, ["collasped", "favorite", "keyword"]),
2735
- b(yo, {
2736
- collapse: o(s),
2737
- keyword: o(l),
2738
- favorite: o(i),
2739
- favorites: o(r),
2740
- flatMenus: o(p),
2741
- menus: o(c),
2742
- active: o(m),
2743
- onSelect: o(h)
2735
+ k($n, {
2736
+ collapse: n(s),
2737
+ keyword: n(i),
2738
+ favorite: n(l),
2739
+ favorites: n(r),
2740
+ flatMenus: n(d),
2741
+ menus: n(u),
2742
+ active: n(f),
2743
+ onSelect: n(y)
2744
2744
  }, null, 8, ["collapse", "keyword", "favorite", "favorites", "flatMenus", "menus", "active", "onSelect"])
2745
2745
  ]),
2746
2746
  _: 1
2747
2747
  }, 8, ["collapsed"]),
2748
- b(o(M), {
2748
+ k(n(I), {
2749
2749
  class: "x-mask__main",
2750
2750
  grow: "",
2751
2751
  shrink: "",
2752
2752
  flex: "",
2753
2753
  direction: "column"
2754
2754
  }, {
2755
- default: d(() => [
2756
- b(o(M), {
2755
+ default: p(() => [
2756
+ k(n(I), {
2757
2757
  class: "x-mask-topbar",
2758
2758
  justify: "space-between",
2759
2759
  align: "center"
2760
2760
  }, {
2761
- default: d(() => [
2762
- b(ko, {
2761
+ default: p(() => [
2762
+ k(Fn, {
2763
2763
  ref_key: "tabRef",
2764
- ref: A,
2765
- favorites: o(r),
2766
- tabs: o(_),
2767
- home: o(n),
2768
- value: o(w)?.id,
2769
- onClick: o(E),
2770
- onToggleFavorite: o(k),
2771
- onRemove: T,
2772
- onDialog: o(se),
2773
- onRefresh: o(ze)
2764
+ ref: $,
2765
+ favorites: n(r),
2766
+ tabs: n(w),
2767
+ home: n(o),
2768
+ value: n(_)?.id,
2769
+ onClick: n(T),
2770
+ onToggleFavorite: n(S),
2771
+ onRemove: B,
2772
+ onDialog: n(ie),
2773
+ onRefresh: n(Be)
2774
2774
  }, null, 8, ["favorites", "tabs", "home", "value", "onClick", "onToggleFavorite", "onDialog", "onRefresh"]),
2775
- b(So, {
2776
- tabs: o(oe),
2777
- actions: t.actions,
2778
- theme: t.theme,
2779
- onCloseOtherTabs: fe,
2780
- onCloseAllTabs: Se,
2781
- onCloseTab: T,
2782
- onClickTab: o(j),
2783
- onActionClick: Ce,
2784
- onActionCommand: Te
2775
+ k(Nn, {
2776
+ tabs: n(ne),
2777
+ actions: e.actions,
2778
+ theme: e.theme,
2779
+ onCloseOtherTabs: ve,
2780
+ onCloseAllTabs: Ie,
2781
+ onCloseTab: B,
2782
+ onClickTab: n(U),
2783
+ onActionClick: Ae,
2784
+ onActionCommand: $e
2785
2785
  }, {
2786
- default: d(() => [
2787
- b(Co, {
2788
- avatar: t.avatar
2789
- }, $e({ _: 2 }, [
2790
- P.$slots.user ? {
2786
+ default: p(() => [
2787
+ k(Xn, {
2788
+ avatar: e.avatar
2789
+ }, ge({ _: 2 }, [
2790
+ R.$slots.user ? {
2791
2791
  name: "default",
2792
- fn: d(() => [
2793
- z(P.$slots, "user")
2792
+ fn: p(() => [
2793
+ z(R.$slots, "user")
2794
2794
  ]),
2795
2795
  key: "0"
2796
2796
  } : void 0
@@ -2801,12 +2801,12 @@ const Vo = /* @__PURE__ */ B({
2801
2801
  ]),
2802
2802
  _: 3
2803
2803
  }),
2804
- b(Ye, {
2805
- createView: o(L),
2806
- exclude: o(re)
2804
+ k(at, {
2805
+ createView: n(K),
2806
+ exclude: n(de)
2807
2807
  }, {
2808
- default: d(() => [
2809
- P.$slots.default ? z(P.$slots, "default", { key: 0 }) : y("", !0)
2808
+ default: p(() => [
2809
+ R.$slots.default ? z(R.$slots, "default", { key: 0 }) : h("", !0)
2810
2810
  ]),
2811
2811
  _: 3
2812
2812
  }, 8, ["createView", "exclude"])
@@ -2819,240 +2819,600 @@ const Vo = /* @__PURE__ */ B({
2819
2819
  }));
2820
2820
  }
2821
2821
  });
2822
- function Yo(a = {}) {
2823
- const e = Fe(), t = Be(St, null), n = Be(Ct, null);
2824
- if (t) {
2825
- const l = typeof a == "function" ? a : async () => a;
2826
- t[e.fullPath] = l;
2822
+ function ya(a = {}) {
2823
+ const t = Ue(), e = fe(Ct, null), o = fe(Tt, null);
2824
+ if (e) {
2825
+ const i = typeof a == "function" ? a : async () => a;
2826
+ e[t.fullPath] = i;
2827
2827
  }
2828
2828
  return {
2829
- tab: v(() => n ? n.tabs.value.find((l) => l.url === e.fullPath) : null),
2830
- mask: n
2829
+ tab: v(() => o ? o.tabs.value.find((i) => i.url === t.fullPath) : null),
2830
+ mask: o
2831
2831
  };
2832
2832
  }
2833
- const Po = /* @__PURE__ */ B({
2833
+ const Gn = /* @__PURE__ */ E({
2834
2834
  __name: "SelectEditor",
2835
+ props: {
2836
+ options: { default: () => [] }
2837
+ },
2835
2838
  setup(a) {
2836
- return (e, t) => (u(), f(o(Jt), null, {
2837
- default: d(() => [
2838
- b(o(Kt), {
2839
- label: "Label",
2840
- value: "label"
2841
- })
2839
+ const t = a;
2840
+ return (e, o) => (c(), m(n(qt), Te(Ee(e.$attrs)), {
2841
+ default: p(() => [
2842
+ (c(!0), A(Z, null, le(t.options, (s, i) => (c(), m(n(eo), X({
2843
+ key: `item_${i}_${s.value}`
2844
+ }, s), ge({ _: 2 }, [
2845
+ e.$slots.option ? {
2846
+ name: "default",
2847
+ fn: p(() => [
2848
+ z(e.$slots, "option", { option: s })
2849
+ ]),
2850
+ key: "0"
2851
+ } : void 0
2852
+ ]), 1040))), 128))
2853
+ ]),
2854
+ _: 3
2855
+ }, 16));
2856
+ }
2857
+ }), Yn = /* @__PURE__ */ E({
2858
+ __name: "CheckboxEditor",
2859
+ props: {
2860
+ options: { default: () => [] },
2861
+ button: { type: Boolean, default: !1 }
2862
+ },
2863
+ setup(a) {
2864
+ const t = a, e = v(
2865
+ () => he(t.button ? to : oo)
2866
+ );
2867
+ return (o, s) => (c(), m(n(no), Te(Ee(o.$attrs)), {
2868
+ default: p(() => [
2869
+ (c(!0), A(Z, null, le(t.options, (i, l) => (c(), m(L(e.value), {
2870
+ key: `item_${l}_${i.value}`,
2871
+ label: i.value
2872
+ }, {
2873
+ default: p(() => [
2874
+ N(j(i.label), 1)
2875
+ ]),
2876
+ _: 2
2877
+ }, 1032, ["label"]))), 128))
2842
2878
  ]),
2843
2879
  _: 1
2844
- }));
2880
+ }, 16));
2881
+ }
2882
+ }), qn = /* @__PURE__ */ E({
2883
+ __name: "RadioEditor",
2884
+ props: {
2885
+ options: { default: () => [] },
2886
+ button: { type: Boolean, default: !1 }
2887
+ },
2888
+ setup(a) {
2889
+ const t = a, e = v(
2890
+ () => he(t.button ? ao : so)
2891
+ );
2892
+ return (o, s) => (c(), m(n(lo), Te(Ee(o.$attrs)), {
2893
+ default: p(() => [
2894
+ (c(!0), A(Z, null, le(t.options, (i, l) => (c(), m(L(e.value), {
2895
+ key: `item_${l}_${i.value}`,
2896
+ label: i.value
2897
+ }, {
2898
+ default: p(() => [
2899
+ N(j(i.label), 1)
2900
+ ]),
2901
+ _: 2
2902
+ }, 1032, ["label"]))), 128))
2903
+ ]),
2904
+ _: 1
2905
+ }, 16));
2845
2906
  }
2846
- }), Ie = {
2907
+ }), Mt = {
2908
+ none: {
2909
+ component: "div",
2910
+ props: {
2911
+ class: "x-field-none"
2912
+ }
2913
+ },
2847
2914
  text: {
2848
- name: De,
2915
+ component: Fe,
2849
2916
  props: {
2850
2917
  clearable: !0
2851
- }
2918
+ },
2919
+ defaultValue: ""
2852
2920
  },
2853
2921
  textarea: {
2854
- name: De,
2922
+ component: Fe,
2855
2923
  props: {
2856
2924
  type: "textarea",
2857
- rows: 2,
2858
- autosize: {
2859
- minRows: 2,
2860
- maxRows: 5
2861
- }
2862
- }
2925
+ rows: 2
2926
+ },
2927
+ defaultValue: ""
2863
2928
  },
2864
2929
  select: {
2865
- name: Po,
2930
+ component: Gn,
2866
2931
  props: {
2867
2932
  clearable: !0
2868
2933
  }
2934
+ },
2935
+ checkbox: {
2936
+ component: Yn,
2937
+ props: {},
2938
+ defaultValue: []
2939
+ },
2940
+ radio: {
2941
+ component: qn,
2942
+ props: {}
2943
+ },
2944
+ number: {
2945
+ component: io,
2946
+ props: {}
2947
+ },
2948
+ date: {
2949
+ component: qe,
2950
+ props: {}
2951
+ },
2952
+ time: {
2953
+ component: ro,
2954
+ props: {}
2955
+ },
2956
+ datetime: {
2957
+ component: qe,
2958
+ props: {
2959
+ type: "datetime"
2960
+ }
2961
+ },
2962
+ switch: {
2963
+ component: Xe,
2964
+ props: {}
2965
+ },
2966
+ rate: {
2967
+ component: co,
2968
+ props: {}
2969
+ },
2970
+ slider: {
2971
+ component: uo,
2972
+ props: {}
2973
+ },
2974
+ cascader: {
2975
+ component: po,
2976
+ props: {}
2869
2977
  }
2870
- }, $o = {
2978
+ }, ea = {
2979
+ /**
2980
+ * 字段名称
2981
+ */
2982
+ name: {
2983
+ type: String
2984
+ },
2985
+ /**
2986
+ * 字段标题文本
2987
+ */
2871
2988
  label: {
2872
2989
  type: String
2873
2990
  },
2991
+ /**
2992
+ * 编辑器组件
2993
+ */
2874
2994
  editor: {
2875
2995
  type: [String, Object],
2876
2996
  default: "text"
2877
2997
  },
2998
+ /**
2999
+ * 编辑器组件参数
3000
+ */
3001
+ props: {
3002
+ type: Object
3003
+ },
3004
+ /**
3005
+ * 字段值
3006
+ */
2878
3007
  modelValue: {
2879
3008
  type: [String, Number, Boolean, Object, Array],
2880
- default: ""
3009
+ default(a) {
3010
+ return Mt[a.editor]?.defaultValue;
3011
+ }
2881
3012
  },
3013
+ /**
3014
+ * 输入框尺寸
3015
+ */
2882
3016
  size: {
2883
3017
  type: String
2884
3018
  },
2885
- // 是否在tooltip显示校验信息
3019
+ width: {
3020
+ type: [String, Number]
3021
+ },
3022
+ /**
3023
+ * 是否在tooltip显示校验信息
3024
+ */
2886
3025
  tooltipMessage: {
2887
3026
  type: [Boolean, Object],
2888
3027
  default: !0
2889
3028
  },
2890
- // tooltip信息显示相对输入框的位置
3029
+ /**
3030
+ * tooltip信息显示相对输入框的位置
3031
+ */
2891
3032
  tooltipPosition: {
2892
3033
  type: [String, Number],
2893
3034
  default: "outer"
2894
3035
  },
2895
- // null 不显示 placeholder
3036
+ /**
3037
+ * null 不显示 placeholder
3038
+ */
2896
3039
  placeholder: {
2897
3040
  type: String
2898
3041
  },
3042
+ /**
3043
+ * 禁用
3044
+ */
2899
3045
  disabled: {
2900
3046
  type: Boolean
2901
3047
  },
3048
+ /**
3049
+ * 只读
3050
+ */
3051
+ readonly: {
3052
+ type: Boolean
3053
+ },
3054
+ /**
3055
+ * 选项数据
3056
+ */
2902
3057
  options: {
2903
3058
  type: [Array, Function]
3059
+ },
3060
+ /**
3061
+ * 是否显示控制
3062
+ */
3063
+ visible: {
3064
+ type: [Boolean, Object, Function],
3065
+ default: !0
3066
+ },
3067
+ /**
3068
+ * 级联字段,根据字段值变化刷新options
3069
+ */
3070
+ cascader: {
3071
+ type: [String, Array]
2904
3072
  }
2905
3073
  };
2906
- function Ro(a) {
2907
- return v(() => {
2908
- const { editor: e = "text", placeholder: t, label: n, disabled: s } = a, l = {
2909
- placeholder: t || (t === null ? void 0 : `请输入${n}`),
2910
- disabled: s
2911
- };
2912
- return xn(
2913
- typeof e == "string" ? Ie[e] || Ie.text : Ie[e.name] || {},
2914
- { props: l },
2915
- e
2916
- );
2917
- });
3074
+ async function ta(a, t) {
3075
+ const e = a.options;
3076
+ return e ? typeof e == "function" ? await e(t) || [] : e : [];
3077
+ }
3078
+ function oa(a, t, e, o, s) {
3079
+ const i = O([]), l = v(() => !o || !s ? {} : Fo(a.cascader).reduce((d, f) => (d[f] = s[f], d), {}));
3080
+ return H(
3081
+ l,
3082
+ async (r) => {
3083
+ if (e.value) {
3084
+ i.value = await ta(a, r);
3085
+ const d = o?.exposed?.reset;
3086
+ d && a.name && d(a.name);
3087
+ }
3088
+ },
3089
+ {
3090
+ immediate: !0
3091
+ }
3092
+ ), {
3093
+ editor: v(() => {
3094
+ const {
3095
+ editor: r = "text",
3096
+ placeholder: d,
3097
+ label: f = "...",
3098
+ disabled: y,
3099
+ readonly: S
3100
+ } = a, $ = {
3101
+ ...a.props,
3102
+ placeholder: d || (d === null ? void 0 : `请输入${f}`),
3103
+ disabled: y,
3104
+ readonly: S,
3105
+ options: i.value,
3106
+ onFocus: () => t("focus"),
3107
+ onBlur: () => t("blur"),
3108
+ onChange: (_) => t("change", _)
3109
+ }, w = typeof r == "string" ? Mt[r] : {
3110
+ component: r,
3111
+ props: {}
3112
+ };
3113
+ return Oo({}, w, {
3114
+ props: $
3115
+ });
3116
+ })
3117
+ };
2918
3118
  }
2919
- const Fo = /* @__PURE__ */ B({
3119
+ const Bt = /* @__PURE__ */ E({
2920
3120
  name: "XField",
2921
3121
  __name: "Field",
2922
- props: $o,
2923
- emits: ["update:modelValue", "change"],
2924
- setup(a, { expose: e, emit: t }) {
2925
- const n = a, s = Be(Yt, null), l = Ro(n), i = R(n.modelValue), c = R(), r = R(), p = v(
2926
- () => n.size || s?.size || "default"
2927
- ), m = v(() => ({
2928
- [`is-tooltip-${n.tooltipPosition}`]: !!n.tooltipPosition
2929
- })), h = v(() => ({
2930
- right: typeof n.tooltipPosition == "number" ? `${n.tooltipPosition}px` : void 0
3122
+ props: ea,
3123
+ emits: ["update:modelValue", "change", "focus", "blur"],
3124
+ setup(a, { expose: t, emit: e }) {
3125
+ const o = a, s = fe(It, null), i = fe(fo, null), l = fe(At, null), u = v(() => !s?.proxy || !l ? o.visible : typeof o.visible == "function" ? o.visible(l) : We(o.visible) ? Object.entries(o.visible).every(([D, P]) => l[D] === P) : o.visible), r = () => s?.proxy && l && o.name ? l[o.name] ?? o.modelValue : o.modelValue, d = O(r()), { editor: f } = oa(
3126
+ o,
3127
+ e,
3128
+ u,
3129
+ s,
3130
+ l
3131
+ ), y = O(), S = O(), $ = v(
3132
+ () => o.size || i?.size || "default"
3133
+ ), w = v(() => ({
3134
+ [`is-tooltip-${o.tooltipPosition}`]: !!o.tooltipPosition
3135
+ })), _ = v(() => {
3136
+ const b = s?.proxy;
3137
+ return {
3138
+ width: o.width ? je(o.width) : b && b.inline && b.inlineColumns ? `${100 / b.inlineColumns}%` : null
3139
+ };
3140
+ }), T = v(() => ({
3141
+ right: typeof o.tooltipPosition == "number" ? `${o.tooltipPosition}px` : void 0
3142
+ })), V = v(() => ({
3143
+ ...f.value.props,
3144
+ modelValue: d.value,
3145
+ "onUpdate:modelValue": (b) => {
3146
+ d.value = b;
3147
+ }
2931
3148
  }));
2932
- return ee(i, (k) => {
2933
- t("update:modelValue", k), t("change", k);
2934
- }), e({
2935
- fieldValue: i,
2936
- itemRef: c,
2937
- editorRef: r
2938
- }), (k, A) => (u(), f(o(Gt), X({
2939
- class: ["x-field", m.value],
3149
+ return H(d, (b, D) => {
3150
+ u.value && !He(b, D) && (e("update:modelValue", b), s?.proxy && l && o.name && (l[o.name] = b));
3151
+ }), H(
3152
+ () => !s?.proxy || !o.name || !l ? o.modelValue : l[o.name] ?? o.modelValue,
3153
+ (b) => {
3154
+ u.value && (d.value = b);
3155
+ },
3156
+ {
3157
+ immediate: !0
3158
+ }
3159
+ ), H(
3160
+ u,
3161
+ (b) => {
3162
+ s?.proxy && l && o.name && (b ? (d.value = r(), l[o.name] = d.value) : (d.value = void 0, delete l[o.name]));
3163
+ },
3164
+ {
3165
+ immediate: !0
3166
+ }
3167
+ ), t({
3168
+ fieldValue: d,
3169
+ itemRef: y,
3170
+ editorRef: S,
3171
+ focus: () => {
3172
+ S.value?.focus && S.value.focus();
3173
+ },
3174
+ blur: () => {
3175
+ S.value?.foucs && S.value.blur();
3176
+ }
3177
+ }), (b, D) => u.value ? (c(), m(n(mo), X({
3178
+ key: 0,
3179
+ class: ["x-field", w.value],
2940
3180
  ref_key: "itemRef",
2941
- ref: c,
2942
- label: k.label,
2943
- size: p.value
2944
- }, k.$attrs), $e({
2945
- error: d(({ error: _ }) => [
2946
- z(k.$slots, "error", { error: _ }, () => [
2947
- n.tooltipMessage ? (u(), V("div", {
3181
+ ref: y,
3182
+ prop: o.name,
3183
+ label: b.label,
3184
+ size: $.value,
3185
+ style: _.value
3186
+ }, b.$attrs), ge({
3187
+ error: p(({ error: P }) => [
3188
+ z(b.$slots, "error", { error: P }, () => [
3189
+ o.tooltipMessage ? (c(), A("div", {
2948
3190
  key: 0,
2949
3191
  class: "x-field__info",
2950
- style: be(h.value)
3192
+ style: Se(T.value)
2951
3193
  }, [
2952
- b(o(st), X({ content: _ }, n.tooltipMessage), {
2953
- default: d(() => [
2954
- b(o(te), {
3194
+ k(n(ct), X({ content: P }, o.tooltipMessage), {
3195
+ default: p(() => [
3196
+ k(n(te), {
2955
3197
  class: "x-field__trigger",
2956
- icon: o(pn),
2957
- size: p.value
3198
+ icon: n(To),
3199
+ size: $.value
2958
3200
  }, null, 8, ["icon", "size"])
2959
3201
  ]),
2960
3202
  _: 2
2961
3203
  }, 1040, ["content"])
2962
- ], 4)) : y("", !0)
3204
+ ], 4)) : h("", !0)
2963
3205
  ])
2964
3206
  ]),
2965
- default: d(() => [
2966
- z(k.$slots, "default"),
2967
- o(l).name ? (u(), f(Z(o(l).name), X({
2968
- key: 0,
2969
- ref_key: "editorRef",
2970
- ref: r,
2971
- modelValue: i.value,
2972
- "onUpdate:modelValue": A[0] || (A[0] = (_) => i.value = _)
2973
- }, o(l).props), null, 16, ["modelValue"])) : y("", !0)
3207
+ default: p(() => [
3208
+ z(b.$slots, "editor", { editor: V.value }, () => [
3209
+ n(f).component ? (c(), m(L(n(f).component), X({
3210
+ key: 0,
3211
+ class: "x-field__editor",
3212
+ ref_key: "editorRef",
3213
+ ref: S,
3214
+ modelValue: d.value,
3215
+ "onUpdate:modelValue": D[0] || (D[0] = (P) => d.value = P)
3216
+ }, n(f).props), ge({ _: 2 }, [
3217
+ b.$slots.option ? {
3218
+ name: "option",
3219
+ fn: p(({ option: P }) => [
3220
+ z(b.$slots, "option", { option: P })
3221
+ ]),
3222
+ key: "0"
3223
+ } : void 0
3224
+ ]), 1040, ["modelValue"])) : h("", !0)
3225
+ ])
2974
3226
  ]),
2975
3227
  _: 2
2976
3228
  }, [
2977
- k.$slots.label ? {
3229
+ b.$slots.label ? {
2978
3230
  name: "label",
2979
- fn: d(() => [
2980
- z(k.$slots, "label")
3231
+ fn: p(() => [
3232
+ z(b.$slots, "label")
2981
3233
  ]),
2982
3234
  key: "0"
2983
3235
  } : void 0
2984
- ]), 1040, ["label", "size", "class"]));
3236
+ ]), 1040, ["prop", "label", "size", "class", "style"])) : h("", !0);
2985
3237
  }
2986
- }), Go = /* @__PURE__ */ B({
3238
+ }), na = {
3239
+ /**
3240
+ * 表单模型
3241
+ */
3242
+ model: {
3243
+ type: Object,
3244
+ default() {
3245
+ return /* @__PURE__ */ Object.create(null);
3246
+ }
3247
+ },
3248
+ /**
3249
+ * inline模式
3250
+ */
3251
+ inline: {
3252
+ type: Boolean
3253
+ },
3254
+ /**
3255
+ * inline模式显示列数
3256
+ */
3257
+ inlineColumns: {
3258
+ type: Number
3259
+ },
3260
+ /**
3261
+ * 显示底部操作按钮
3262
+ */
3263
+ footer: {
3264
+ type: Boolean,
3265
+ default: !0
3266
+ },
3267
+ /**
3268
+ * 提交按钮文本
3269
+ */
3270
+ submitText: {
3271
+ type: String,
3272
+ default: "提交"
3273
+ },
3274
+ /**
3275
+ * 重置按钮文本
3276
+ */
3277
+ resetText: {
3278
+ type: String,
3279
+ default: "重置"
3280
+ }
3281
+ }, It = Symbol("formInstanceKey"), At = Symbol("formModelKey"), ha = /* @__PURE__ */ E({
3282
+ name: "XForm",
2987
3283
  __name: "Form",
2988
- setup(a) {
2989
- return (e, t) => (u(), f(o(qt), qe(et(e.$attrs)), {
2990
- default: d(() => [
2991
- z(e.$slots, "default")
3284
+ props: na,
3285
+ emits: ["change", "submit", "reset"],
3286
+ setup(a, { expose: t, emit: e }) {
3287
+ const o = a, s = ue(), i = O(), l = Ne(o.model || {});
3288
+ ye(It, s), ye(At, l), H(l, () => {
3289
+ e("change", Pe(l));
3290
+ }), H(
3291
+ () => o.model,
3292
+ (d) => {
3293
+ Object.assign(l, d);
3294
+ },
3295
+ { deep: !0 }
3296
+ );
3297
+ const u = async () => {
3298
+ await i.value.validate().catch((f) => f) && o.model && e("submit", Pe(l));
3299
+ }, r = (d) => {
3300
+ i.value.resetFields(d), e("reset");
3301
+ };
3302
+ return t({
3303
+ formRef: i,
3304
+ model: l,
3305
+ submit: u,
3306
+ reset: r
3307
+ }), (d, f) => (c(), m(n(go), X({
3308
+ ref_key: "formRef",
3309
+ ref: i,
3310
+ class: "x-form",
3311
+ inline: o.inline,
3312
+ model: l
3313
+ }, d.$attrs), {
3314
+ default: p(() => [
3315
+ z(d.$slots, "default"),
3316
+ o.footer ? (c(), m(n(Bt), {
3317
+ key: 0,
3318
+ editor: "none",
3319
+ class: "x-form__footer",
3320
+ label: " "
3321
+ }, {
3322
+ editor: p(() => [
3323
+ o.submitText ? (c(), m(n(se), {
3324
+ key: 0,
3325
+ type: "primary",
3326
+ onClick: u
3327
+ }, {
3328
+ default: p(() => [
3329
+ N(j(o.submitText), 1)
3330
+ ]),
3331
+ _: 1
3332
+ })) : h("", !0),
3333
+ o.resetText ? (c(), m(n(se), {
3334
+ key: 1,
3335
+ type: "default",
3336
+ onClick: f[0] || (f[0] = () => r())
3337
+ }, {
3338
+ default: p(() => [
3339
+ N(j(o.resetText), 1)
3340
+ ]),
3341
+ _: 1
3342
+ })) : h("", !0)
3343
+ ]),
3344
+ default: p(() => [
3345
+ z(d.$slots, "footer")
3346
+ ]),
3347
+ _: 3
3348
+ })) : h("", !0)
2992
3349
  ]),
2993
3350
  _: 3
2994
- }, 16));
3351
+ }, 16, ["inline", "model"]));
2995
3352
  }
2996
- }), Oo = [
2997
- Bn,
3353
+ }), aa = [
3354
+ Ko,
2998
3355
  te,
2999
- G,
3000
- Xn,
3001
- Q,
3002
- je,
3003
- M,
3356
+ ee,
3357
+ an,
3358
+ J,
3359
+ Ke,
3360
+ I,
3004
3361
  wt,
3005
- kt,
3362
+ xt,
3006
3363
  zt,
3007
- Vo,
3008
- Fo
3009
- ], qo = "0.6.11", jo = zn(Oo), ea = jo.install;
3364
+ Jn,
3365
+ Bt
3366
+ ], va = "0.6.12", sa = jo(aa), ba = sa.install;
3010
3367
  export {
3011
- Ie as BuiltinEditors,
3012
- Je as Draggable,
3013
- Qe as INSTALLED_KEY,
3014
- Ct as MASK_KEY,
3015
- Ko as NOOP,
3016
- Ke as Resizable,
3017
- St as TAB_CREATORS_KEY,
3018
- To as TAB_ITEM_WIDTH,
3019
- Q as XAction,
3020
- je as XActionBar,
3021
- M as XContainer,
3368
+ ot as Draggable,
3369
+ et as INSTALLED_KEY,
3370
+ Tt as MASK_KEY,
3371
+ ga as NOOP,
3372
+ nt as Resizable,
3373
+ Ct as TAB_CREATORS_KEY,
3374
+ Un as TAB_ITEM_WIDTH,
3375
+ J as XAction,
3376
+ Ke as XActionBar,
3377
+ I as XContainer,
3022
3378
  zt as XDialog,
3023
- Fo as XField,
3024
- Go as XForm,
3379
+ Bt as XField,
3380
+ ha as XForm,
3025
3381
  wt as XHeader,
3026
3382
  te as XIcon,
3027
- Vo as XMask,
3028
- G as XMenu,
3029
- kt as XPanel,
3030
- Xn as XSimpleMask,
3031
- Bn as XStartup,
3032
- Jn as actionBarProps,
3033
- _t as actionProps,
3034
- Oo as components,
3035
- Kn as containerProps,
3036
- Ne as createDialog,
3037
- ea as default,
3038
- Yo as defineTab,
3039
- no as dialogProps,
3040
- $o as fieldProps,
3041
- We as getSizeValue,
3042
- Yn as headerProps,
3043
- Dn as iconProps,
3044
- An as iconSizeMap,
3045
- ea as install,
3046
- zn as makeInstaller,
3047
- Mo as maskProps,
3048
- Zo as omit,
3049
- eo as panelProps,
3050
- me as parseSize,
3051
- Jo as pick,
3052
- Oe as useDisabled,
3053
- we as useIcon,
3054
- Wn as useIconProps,
3055
- to as vDraggable,
3056
- xt as vResizable,
3057
- qo as version
3383
+ Jn as XMask,
3384
+ ee as XMenu,
3385
+ xt as XPanel,
3386
+ an as XSimpleMask,
3387
+ Ko as XStartup,
3388
+ pn as actionBarProps,
3389
+ kt as actionProps,
3390
+ Mt as builtinFieldEditors,
3391
+ aa as components,
3392
+ fn as containerProps,
3393
+ Qe as createDialog,
3394
+ ba as default,
3395
+ ya as defineTab,
3396
+ bn as dialogProps,
3397
+ ea as fieldProps,
3398
+ It as formInstanceKey,
3399
+ At as formModelKey,
3400
+ na as formProps,
3401
+ je as getSizeValue,
3402
+ mn as headerProps,
3403
+ Zo as iconProps,
3404
+ Qo as iconSizeMap,
3405
+ ba as install,
3406
+ jo as makeInstaller,
3407
+ Hn as maskProps,
3408
+ fa as omit,
3409
+ hn as panelProps,
3410
+ be as parseSize,
3411
+ ma as pick,
3412
+ Le as useDisabled,
3413
+ Ce as useIcon,
3414
+ cn as useIconProps,
3415
+ vn as vDraggable,
3416
+ St as vResizable,
3417
+ va as version
3058
3418
  };