@vtj/ui 0.6.21 → 0.6.22
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/cdn/index.js +1 -1
- package/cdn/style.css +1 -1
- package/lib/index.js +805 -691
- package/lib/style.css +1 -1
- package/package.json +5 -5
- package/types/components/dialog-form/DialogForm.d.ts +90 -0
- package/types/components/dialog-form/index.d.ts +3 -0
- package/types/components/dialog-form/types.d.ts +46 -0
- package/types/components/field/Field.d.ts +1 -0
- package/types/components/form/Form.d.ts +1 -0
- package/types/components/index.d.ts +1 -0
- package/types/list.d.ts +2 -2
- package/types/version.d.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElDivider as
|
|
3
|
-
import { VideoPlay as
|
|
4
|
-
import { useRouter as
|
|
5
|
-
import { Minimize as
|
|
6
|
-
import { useDraggable as
|
|
7
|
-
import { isEqual as He, isObject as We, uid as
|
|
1
|
+
import { defineComponent as T, openBlock as u, createElementBlock as I, renderSlot as w, createElementVNode as R, unref as n, toDisplayString as j, createVNode as _, withCtx as p, createTextVNode as N, createBlock as m, createCommentVNode as v, useAttrs as it, getCurrentInstance as pe, computed as h, markRaw as ve, normalizeClass as W, resolveDynamicComponent as L, mergeProps as X, Fragment as Q, renderList as ie, isVNode as Dt, h as q, toRef as Se, useSlots as Pt, normalizeStyle as Ce, ref as P, normalizeProps as Ee, guardReactiveProps as Be, effectScope as rt, watch as H, reactive as Ne, onMounted as Rt, onUnmounted as Ft, watchEffect as ct, nextTick as ce, Teleport as ut, withDirectives as K, createSlots as de, render as Je, vShow as Y, isRef as xe, withModifiers as Ot, KeepAlive as jt, shallowRef as Ge, provide as he, toRaw as ze, inject as ge } from "vue";
|
|
2
|
+
import { ElDivider as ye, ElButton as le, ElIcon as Nt, ElSubMenu as Xt, ElBadge as Re, ElMenuItem as Ut, ElMenu as Ht, ElContainer as Ye, ElHeader as Wt, ElAside as Lt, ElMain as Kt, ElFooter as Qt, ElDropdown as Zt, ElDropdownMenu as Jt, ElDropdownItem as Gt, ElTooltip as dt, ElSwitch as Xe, ElInput as Fe, ElEmpty as Yt, ElTabs as qt, ElTabPane as qe, ElPopover as pt, ElAvatar as eo, ElMessageBox as De, ElSelect as to, ElOption as oo, ElCheckboxButton as no, ElCheckbox as ao, ElCheckboxGroup as so, ElRadioButton as lo, ElRadio as io, ElRadioGroup as ro, ElInputNumber as co, ElDatePicker as et, ElTimePicker as uo, ElRate as po, ElSlider as fo, ElCascader as mo, formContextKey as go, ElFormItem as yo, ElForm as ho } from "element-plus";
|
|
3
|
+
import { VideoPlay as vo, Document as se, Menu as ft, ArrowRight as bo, StarFilled as mt, Search as Oe, Close as gt, Expand as _o, Fold as ko, Star as yt, Refresh as wo, CopyDocument as xo, Moon as zo, Sunny as So, MoreFilled as Co, UserFilled as To, HomeFilled as Mo, WarningFilled as Eo } from "@element-plus/icons-vue";
|
|
4
|
+
import { useRouter as $e, useRoute as Ue, RouterView as ht, routeLocationKey as Bo } from "vue-router";
|
|
5
|
+
import { Minimize as $o, Popup as Io, Maximize as Ao, RawClose as Vo } from "@vtj/icons";
|
|
6
|
+
import { useDraggable as Do, useMouseInElement as Po, useEventListener as Te, useElementSize as vt, useDark as Ro } from "@vueuse/core";
|
|
7
|
+
import { isEqual as He, isObject as We, uid as bt, arrayToMap as Fo, isUrl as Oo, upperFirstCamelCase as _t, toArray as jo, merge as No, set as tt } from "@vtj/utils";
|
|
8
8
|
function je(a) {
|
|
9
9
|
return typeof a == "string" ? a : `${a}px`;
|
|
10
10
|
}
|
|
@@ -17,32 +17,32 @@ function _e(a = 0, t) {
|
|
|
17
17
|
}
|
|
18
18
|
return Number.parseInt(a);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function va(a, t) {
|
|
21
21
|
const e = {};
|
|
22
22
|
return Object.keys(a).forEach((o) => {
|
|
23
23
|
t.includes(o) || (e[o] = a[o]);
|
|
24
24
|
}), e;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function ba(a, t) {
|
|
27
27
|
const e = {};
|
|
28
28
|
return Object.keys(a).forEach((o) => {
|
|
29
29
|
t.includes(o) && (e[o] = a[o]);
|
|
30
30
|
}), e;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
},
|
|
32
|
+
const _a = () => {
|
|
33
|
+
}, ot = Symbol("INSTALLED_KEY"), Xo = (a = []) => ({
|
|
34
34
|
install: (e) => {
|
|
35
|
-
e[
|
|
35
|
+
e[ot] || (e[ot] = !0, a.forEach((o) => {
|
|
36
36
|
o.name && e.component(o.name, o);
|
|
37
37
|
}));
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), kt = "data:image/png;base64,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", Uo = { class: "x-startup" }, Ho = { class: "brand" }, Wo = ["src"], Lo = /* @__PURE__ */ R("h3", null, [
|
|
40
40
|
/* @__PURE__ */ N("基于 "),
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ R("span", null, "Vue3 + TypeScript"),
|
|
42
42
|
/* @__PURE__ */ N(" 的低代码设计器引擎")
|
|
43
|
-
], -1),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
], -1),
|
|
43
|
+
], -1), Ko = { class: "btn" }, Qo = /* @__PURE__ */ R("div", { class: "ba" }, [
|
|
44
|
+
/* @__PURE__ */ R("a", { href: "http://beian.miit.gov.cn/" }, "粤ICP备2023104074号")
|
|
45
|
+
], -1), Zo = /* @__PURE__ */ T({
|
|
46
46
|
name: "XStartup",
|
|
47
47
|
__name: "Startup",
|
|
48
48
|
props: {
|
|
@@ -56,29 +56,29 @@ const ga = () => {
|
|
|
56
56
|
}, o = () => {
|
|
57
57
|
t.example && t.example(t.link);
|
|
58
58
|
};
|
|
59
|
-
return (s, i) => (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
return (s, i) => (u(), I("div", Uo, [
|
|
60
|
+
w(s.$slots, "default", {}, () => [
|
|
61
|
+
R("div", null, [
|
|
62
|
+
R("div", Ho, [
|
|
63
|
+
R("img", { src: n(kt) }, null, 8, Wo),
|
|
64
|
+
R("h1", null, j(t.text), 1)
|
|
65
65
|
]),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
_(n(ye)),
|
|
67
|
+
Lo,
|
|
68
|
+
R("div", Ko, [
|
|
69
|
+
_(n(le), {
|
|
70
70
|
onClick: e,
|
|
71
71
|
type: "primary",
|
|
72
72
|
round: "",
|
|
73
73
|
size: "large",
|
|
74
|
-
icon: n(
|
|
74
|
+
icon: n(vo)
|
|
75
75
|
}, {
|
|
76
76
|
default: p(() => [
|
|
77
77
|
N(" 立即开始体验 ")
|
|
78
78
|
]),
|
|
79
79
|
_: 1
|
|
80
80
|
}, 8, ["icon"]),
|
|
81
|
-
t.example ? (
|
|
81
|
+
t.example ? (u(), m(n(le), {
|
|
82
82
|
key: 0,
|
|
83
83
|
onClick: o,
|
|
84
84
|
type: "default",
|
|
@@ -94,15 +94,15 @@ const ga = () => {
|
|
|
94
94
|
])
|
|
95
95
|
])
|
|
96
96
|
]),
|
|
97
|
-
|
|
97
|
+
Qo
|
|
98
98
|
]));
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
|
-
const
|
|
101
|
+
const Jo = {
|
|
102
102
|
default: 14,
|
|
103
103
|
small: 12,
|
|
104
104
|
large: 18
|
|
105
|
-
},
|
|
105
|
+
}, Go = {
|
|
106
106
|
icon: {
|
|
107
107
|
type: [String, Object]
|
|
108
108
|
},
|
|
@@ -116,46 +116,46 @@ const Qo = {
|
|
|
116
116
|
src: {
|
|
117
117
|
type: String
|
|
118
118
|
}
|
|
119
|
-
},
|
|
119
|
+
}, Yo = ["src"], te = /* @__PURE__ */ T({
|
|
120
120
|
name: "XIcon",
|
|
121
121
|
__name: "Icon",
|
|
122
|
-
props:
|
|
122
|
+
props: Go,
|
|
123
123
|
setup(a) {
|
|
124
|
-
const t = a, e =
|
|
124
|
+
const t = a, e = it(), o = pe(), s = h(() => {
|
|
125
125
|
if (!t.icon)
|
|
126
126
|
return null;
|
|
127
|
-
const
|
|
128
|
-
return typeof t.icon == "object" ? ve(t.icon) :
|
|
127
|
+
const c = o?.appContext.app;
|
|
128
|
+
return typeof t.icon == "object" ? ve(t.icon) : c?.component(t.icon) || t.icon;
|
|
129
129
|
}), i = h(() => {
|
|
130
|
-
const
|
|
130
|
+
const c = {
|
|
131
131
|
"is-pointer": !!e.onClick
|
|
132
132
|
};
|
|
133
|
-
return !s.value && t.icon && (
|
|
134
|
-
}), l = h(() => typeof t.size == "number" ? t.size :
|
|
135
|
-
return (
|
|
133
|
+
return !s.value && t.icon && (c[t.icon] = !0), c;
|
|
134
|
+
}), l = h(() => typeof t.size == "number" ? t.size : Jo[t.size] ?? void 0);
|
|
135
|
+
return (c, r) => (u(), m(n(Nt), {
|
|
136
136
|
class: W(["x-icon", i.value]),
|
|
137
137
|
color: t.color,
|
|
138
138
|
size: l.value
|
|
139
139
|
}, {
|
|
140
140
|
default: p(() => [
|
|
141
|
-
|
|
142
|
-
s.value ? (
|
|
143
|
-
t.src ? (
|
|
141
|
+
w(c.$slots, "default", {}, () => [
|
|
142
|
+
s.value ? (u(), m(L(s.value), { key: 0 })) : v("", !0),
|
|
143
|
+
t.src ? (u(), I("img", {
|
|
144
144
|
key: 1,
|
|
145
145
|
src: t.src
|
|
146
|
-
}, null, 8,
|
|
146
|
+
}, null, 8, Yo)) : v("", !0)
|
|
147
147
|
])
|
|
148
148
|
]),
|
|
149
149
|
_: 3
|
|
150
150
|
}, 8, ["class", "color", "size"]));
|
|
151
151
|
}
|
|
152
|
-
}),
|
|
152
|
+
}), qo = { class: "x-menu__wrapper" }, en = {
|
|
153
153
|
key: 1,
|
|
154
154
|
class: "x-menu__title"
|
|
155
|
-
},
|
|
155
|
+
}, tn = /* @__PURE__ */ R("i", null, null, -1), on = {
|
|
156
156
|
key: 0,
|
|
157
157
|
class: "x-menu__title"
|
|
158
|
-
},
|
|
158
|
+
}, nn = /* @__PURE__ */ R("i", null, null, -1), wt = /* @__PURE__ */ T({
|
|
159
159
|
inheritAttrs: !1,
|
|
160
160
|
name: "XMenuItem",
|
|
161
161
|
__name: "MenuItem",
|
|
@@ -165,36 +165,36 @@ const Qo = {
|
|
|
165
165
|
defaultIcon: { type: [Object, Function] }
|
|
166
166
|
},
|
|
167
167
|
setup(a) {
|
|
168
|
-
const t = a, e =
|
|
168
|
+
const t = a, e = pe(), o = (l) => {
|
|
169
169
|
if (l)
|
|
170
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((
|
|
172
|
-
return (l,
|
|
171
|
+
}, s = (l) => typeof l == "object" ? l : { value: l }, i = (l = []) => l.filter((c) => !c.hidden);
|
|
172
|
+
return (l, c) => t.item.children ? (u(), m(n(Xt), X({
|
|
173
173
|
key: 0,
|
|
174
174
|
disabled: t.item.disabled
|
|
175
175
|
}, t.subMenu, {
|
|
176
176
|
index: String(t.item.id)
|
|
177
177
|
}), {
|
|
178
178
|
title: p(() => [
|
|
179
|
-
|
|
180
|
-
t.item.icon ? (
|
|
179
|
+
R("div", qo, [
|
|
180
|
+
t.item.icon ? (u(), m(n(te), {
|
|
181
181
|
key: 0,
|
|
182
182
|
icon: o(t.item.icon)
|
|
183
183
|
}, null, 8, ["icon"])) : v("", !0),
|
|
184
|
-
t.item.title ? (
|
|
185
|
-
t.item.badge ? (
|
|
184
|
+
t.item.title ? (u(), I("span", en, j(t.item.title), 1)) : v("", !0),
|
|
185
|
+
t.item.badge ? (u(), m(n(Re), X({
|
|
186
186
|
key: 2,
|
|
187
187
|
class: "x-menu__badge"
|
|
188
188
|
}, s(t.item.badge)), {
|
|
189
189
|
default: p(() => [
|
|
190
|
-
|
|
190
|
+
tn
|
|
191
191
|
]),
|
|
192
192
|
_: 1
|
|
193
193
|
}, 16)) : v("", !0)
|
|
194
194
|
])
|
|
195
195
|
]),
|
|
196
196
|
default: p(() => [
|
|
197
|
-
(
|
|
197
|
+
(u(!0), I(Q, null, ie(i(t.item.children), (r) => (u(), m(n(wt), {
|
|
198
198
|
key: r.id,
|
|
199
199
|
item: r,
|
|
200
200
|
subMenu: t.subMenu,
|
|
@@ -202,25 +202,25 @@ const Qo = {
|
|
|
202
202
|
}, null, 8, ["item", "subMenu", "defaultIcon"]))), 128))
|
|
203
203
|
]),
|
|
204
204
|
_: 1
|
|
205
|
-
}, 16, ["disabled", "index"])) : (
|
|
205
|
+
}, 16, ["disabled", "index"])) : (u(), m(n(Ut), {
|
|
206
206
|
key: 1,
|
|
207
207
|
index: String(t.item.id),
|
|
208
208
|
disabled: t.item.disabled
|
|
209
209
|
}, {
|
|
210
210
|
title: p(() => [
|
|
211
|
-
t.item.title ? (
|
|
212
|
-
t.item.badge ? (
|
|
211
|
+
t.item.title ? (u(), I("span", on, j(t.item.title), 1)) : v("", !0),
|
|
212
|
+
t.item.badge ? (u(), m(n(Re), X({
|
|
213
213
|
key: 1,
|
|
214
214
|
class: "x-menu__badge"
|
|
215
215
|
}, s(t.item.badge)), {
|
|
216
216
|
default: p(() => [
|
|
217
|
-
|
|
217
|
+
nn
|
|
218
218
|
]),
|
|
219
219
|
_: 1
|
|
220
220
|
}, 16)) : v("", !0)
|
|
221
221
|
]),
|
|
222
222
|
default: p(() => [
|
|
223
|
-
t.item.icon ? (
|
|
223
|
+
t.item.icon ? (u(), m(n(te), {
|
|
224
224
|
key: 0,
|
|
225
225
|
icon: o(t.item.icon)
|
|
226
226
|
}, null, 8, ["icon"])) : v("", !0)
|
|
@@ -228,7 +228,7 @@ const Qo = {
|
|
|
228
228
|
_: 1
|
|
229
229
|
}, 8, ["index", "disabled"]));
|
|
230
230
|
}
|
|
231
|
-
}), ee = /* @__PURE__ */
|
|
231
|
+
}), ee = /* @__PURE__ */ T({
|
|
232
232
|
inheritAttrs: !1,
|
|
233
233
|
name: "XMenu",
|
|
234
234
|
__name: "Menu",
|
|
@@ -239,7 +239,7 @@ const Qo = {
|
|
|
239
239
|
},
|
|
240
240
|
emits: ["select"],
|
|
241
241
|
setup(a, { emit: t }) {
|
|
242
|
-
const e = a, o = h(() => e.data.filter((l) => !l.hidden)), s = (l,
|
|
242
|
+
const e = a, o = h(() => e.data.filter((l) => !l.hidden)), s = (l, c) => {
|
|
243
243
|
const r = (d, f = []) => {
|
|
244
244
|
for (const g of f) {
|
|
245
245
|
if (g.id.toString() === d.toString())
|
|
@@ -251,15 +251,15 @@ const Qo = {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
|
-
return r(
|
|
254
|
+
return r(c, l);
|
|
255
255
|
}, i = (l) => {
|
|
256
|
-
const
|
|
257
|
-
|
|
256
|
+
const c = s(o.value, l);
|
|
257
|
+
c && t("select", c);
|
|
258
258
|
};
|
|
259
|
-
return (l,
|
|
259
|
+
return (l, c) => (u(), m(n(Ht), X({ class: "x-menu" }, l.$attrs, { onSelect: i }), {
|
|
260
260
|
default: p(() => [
|
|
261
|
-
(
|
|
262
|
-
item: { ...r, icon: r.icon || n(
|
|
261
|
+
(u(!0), I(Q, null, ie(o.value, (r) => (u(), m(n(wt), {
|
|
262
|
+
item: { ...r, icon: r.icon || n(ft) },
|
|
263
263
|
defaultIcon: e.defaultIcon,
|
|
264
264
|
subMenu: e.subMenu
|
|
265
265
|
}, null, 8, ["item", "defaultIcon", "subMenu"]))), 256))
|
|
@@ -267,7 +267,7 @@ const Qo = {
|
|
|
267
267
|
_: 1
|
|
268
268
|
}, 16));
|
|
269
269
|
}
|
|
270
|
-
}),
|
|
270
|
+
}), an = { class: "x-simple-mask__brand" }, sn = { class: "x-simple-mask__aciton" }, ln = /* @__PURE__ */ T({
|
|
271
271
|
name: "XSimpleMask",
|
|
272
272
|
__name: "SimpleMask",
|
|
273
273
|
props: {
|
|
@@ -279,10 +279,10 @@ const Qo = {
|
|
|
279
279
|
menu: {}
|
|
280
280
|
},
|
|
281
281
|
setup(a, { expose: t }) {
|
|
282
|
-
const e = a, o =
|
|
282
|
+
const e = a, o = $e(), s = Ue(), i = h(() => s.params.id), l = () => {
|
|
283
283
|
const r = e.project.home;
|
|
284
284
|
r && o.push(r);
|
|
285
|
-
},
|
|
285
|
+
}, c = (r) => {
|
|
286
286
|
const d = r?.id;
|
|
287
287
|
if (d) {
|
|
288
288
|
const g = `${e.preview ? "/preview" : e.project.page}/${d}`;
|
|
@@ -291,41 +291,41 @@ const Qo = {
|
|
|
291
291
|
};
|
|
292
292
|
return t({
|
|
293
293
|
goHome: l
|
|
294
|
-
}), (r, d) => (
|
|
294
|
+
}), (r, d) => (u(), m(n(Ye), { class: "x-simple-mask" }, {
|
|
295
295
|
default: p(() => [
|
|
296
|
-
|
|
296
|
+
_(n(Wt), { class: "x-simple-mask__header" }, {
|
|
297
297
|
default: p(() => [
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
R("div", an, [
|
|
299
|
+
R("span", {
|
|
300
300
|
class: "x-simple-mask__logo",
|
|
301
301
|
onClick: l
|
|
302
302
|
}, [
|
|
303
|
-
|
|
303
|
+
w(r.$slots, "logo", {}, () => [
|
|
304
304
|
N(j(e.project.name), 1)
|
|
305
305
|
])
|
|
306
306
|
])
|
|
307
307
|
]),
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
R("div", sn, [
|
|
309
|
+
w(r.$slots, "action")
|
|
310
310
|
])
|
|
311
311
|
]),
|
|
312
312
|
_: 3
|
|
313
313
|
}),
|
|
314
|
-
|
|
314
|
+
_(n(Ye), null, {
|
|
315
315
|
default: p(() => [
|
|
316
|
-
|
|
316
|
+
_(n(Lt), { class: "x-simple-mask__aside" }, {
|
|
317
317
|
default: p(() => [
|
|
318
|
-
|
|
318
|
+
_(n(ee), X(e.menu, {
|
|
319
319
|
"default-active": i.value,
|
|
320
|
-
onSelect:
|
|
320
|
+
onSelect: c
|
|
321
321
|
}), null, 16, ["default-active"])
|
|
322
322
|
]),
|
|
323
323
|
_: 1
|
|
324
324
|
}),
|
|
325
|
-
|
|
325
|
+
_(n(Kt), { class: "x-simple-mask__main" }, {
|
|
326
326
|
default: p(() => [
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
w(r.$slots, "default", {}, () => [
|
|
328
|
+
_(n(ht))
|
|
329
329
|
])
|
|
330
330
|
]),
|
|
331
331
|
_: 3
|
|
@@ -333,13 +333,13 @@ const Qo = {
|
|
|
333
333
|
]),
|
|
334
334
|
_: 3
|
|
335
335
|
}),
|
|
336
|
-
r.$slots.footer ? (
|
|
336
|
+
r.$slots.footer ? (u(), m(n(Qt), {
|
|
337
337
|
key: 0,
|
|
338
338
|
class: "x-simple-mask__footer",
|
|
339
339
|
height: "40px"
|
|
340
340
|
}, {
|
|
341
341
|
default: p(() => [
|
|
342
|
-
|
|
342
|
+
w(r.$slots, "footer")
|
|
343
343
|
]),
|
|
344
344
|
_: 3
|
|
345
345
|
})) : v("", !0)
|
|
@@ -347,7 +347,7 @@ const Qo = {
|
|
|
347
347
|
_: 3
|
|
348
348
|
}));
|
|
349
349
|
}
|
|
350
|
-
}),
|
|
350
|
+
}), xt = {
|
|
351
351
|
/**
|
|
352
352
|
* 动作名称标识
|
|
353
353
|
*/
|
|
@@ -443,21 +443,21 @@ const Qo = {
|
|
|
443
443
|
type: Boolean
|
|
444
444
|
}
|
|
445
445
|
};
|
|
446
|
-
function
|
|
446
|
+
function rn(a) {
|
|
447
447
|
return h(() => {
|
|
448
448
|
const t = a.tooltip;
|
|
449
449
|
if (t)
|
|
450
450
|
return typeof t == "string" ? { content: t } : t;
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function cn(a) {
|
|
454
454
|
return h(() => {
|
|
455
455
|
const t = a.badge;
|
|
456
456
|
if (t)
|
|
457
457
|
return typeof t == "object" ? t : { value: t };
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function un(a) {
|
|
461
461
|
return h(() => {
|
|
462
462
|
const { dropdown: t, menus: e } = a;
|
|
463
463
|
if (e && e.length > 0)
|
|
@@ -467,12 +467,12 @@ function rn(a) {
|
|
|
467
467
|
);
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
const t =
|
|
470
|
+
function dn(a) {
|
|
471
|
+
const t = pe();
|
|
472
472
|
return h(() => {
|
|
473
473
|
const e = n(a);
|
|
474
474
|
if (e)
|
|
475
|
-
if (typeof e == "string" || e.setup || e.render ||
|
|
475
|
+
if (typeof e == "string" || e.setup || e.render || Dt(e)) {
|
|
476
476
|
const o = t?.appContext.app;
|
|
477
477
|
return {
|
|
478
478
|
icon: typeof e == "string" && o?.component(e) || e
|
|
@@ -482,9 +482,9 @@ function cn(a) {
|
|
|
482
482
|
return null;
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
const t =
|
|
487
|
-
return t.value ? ve(
|
|
485
|
+
function Me(a) {
|
|
486
|
+
const t = dn(a);
|
|
487
|
+
return t.value ? ve(T({ render: () => q(te, t.value) })) : null;
|
|
488
488
|
}
|
|
489
489
|
function Le(a, t) {
|
|
490
490
|
return h(() => {
|
|
@@ -492,12 +492,12 @@ function Le(a, t) {
|
|
|
492
492
|
return typeof e == "function" ? e(t) : !!e;
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
|
-
const
|
|
495
|
+
const pn = { key: 0 }, fn = /* @__PURE__ */ T({
|
|
496
496
|
__name: "Trigger",
|
|
497
|
-
props:
|
|
497
|
+
props: xt,
|
|
498
498
|
emits: ["click"],
|
|
499
499
|
setup(a, { emit: t }) {
|
|
500
|
-
const e = a, o =
|
|
500
|
+
const e = a, o = Me(Se(e, "icon")), s = Le(Se(e, "disabled")), i = h(() => ({
|
|
501
501
|
[`is-${e.mode}`]: !!e.mode,
|
|
502
502
|
[`is-${e.type}`]: !!e.type,
|
|
503
503
|
[`is-${e.size}`]: !!e.size && e.size !== "default",
|
|
@@ -507,7 +507,7 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
507
507
|
})), l = () => {
|
|
508
508
|
t("click");
|
|
509
509
|
};
|
|
510
|
-
return (
|
|
510
|
+
return (c, r) => e.mode === "button" ? (u(), m(n(le), X({
|
|
511
511
|
key: 0,
|
|
512
512
|
icon: n(o),
|
|
513
513
|
type: e.type,
|
|
@@ -515,60 +515,60 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
515
515
|
disabled: n(s)
|
|
516
516
|
}, e.button, { onClick: l }), {
|
|
517
517
|
default: p(() => [
|
|
518
|
-
N(j(
|
|
518
|
+
N(j(c.label), 1)
|
|
519
519
|
]),
|
|
520
520
|
_: 1
|
|
521
|
-
}, 16, ["icon", "type", "size", "disabled"])) : (
|
|
521
|
+
}, 16, ["icon", "type", "size", "disabled"])) : (u(), I("div", {
|
|
522
522
|
key: 1,
|
|
523
523
|
class: W(["x-action__inner", i.value]),
|
|
524
524
|
onClick: l
|
|
525
525
|
}, [
|
|
526
|
-
(
|
|
527
|
-
|
|
526
|
+
(u(), m(L(n(o)))),
|
|
527
|
+
c.label ? (u(), I("span", pn, j(c.label), 1)) : v("", !0)
|
|
528
528
|
], 2));
|
|
529
529
|
}
|
|
530
|
-
}), J = /* @__PURE__ */
|
|
530
|
+
}), J = /* @__PURE__ */ T({
|
|
531
531
|
name: "XAction",
|
|
532
532
|
__name: "Action",
|
|
533
|
-
props:
|
|
533
|
+
props: xt,
|
|
534
534
|
emits: ["click", "command"],
|
|
535
535
|
setup(a, { emit: t }) {
|
|
536
|
-
const e = a, o =
|
|
536
|
+
const e = a, o = Pt(), s = rn(e), i = cn(e), l = un(e), c = Le(Se(e, "disabled")), r = h(() => ({
|
|
537
537
|
[`x-action--${e.mode}`]: !!e.mode
|
|
538
538
|
})), d = () => {
|
|
539
539
|
t("click", e);
|
|
540
|
-
}, f = (
|
|
541
|
-
const
|
|
542
|
-
|
|
543
|
-
}, g = (
|
|
544
|
-
|
|
545
|
-
{ ...l.value, disabled:
|
|
540
|
+
}, f = (k) => {
|
|
541
|
+
const M = e.menus?.find((V) => V.command === k);
|
|
542
|
+
M && t("command", M);
|
|
543
|
+
}, g = (k) => q(Re, i.value, () => [].concat(k)), S = (k) => q(
|
|
544
|
+
Zt,
|
|
545
|
+
{ ...l.value, disabled: c.value, onCommand: f },
|
|
546
546
|
{
|
|
547
|
-
default: () => [
|
|
547
|
+
default: () => [k],
|
|
548
548
|
dropdown: () => [
|
|
549
549
|
q(
|
|
550
|
-
|
|
551
|
-
() => (e.menus || []).map((
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
() => o.item ? o.item({ item:
|
|
550
|
+
Jt,
|
|
551
|
+
() => (e.menus || []).map((M) => q(
|
|
552
|
+
Gt,
|
|
553
|
+
M,
|
|
554
|
+
() => o.item ? o.item({ item: M }) : M.label
|
|
555
555
|
))
|
|
556
556
|
)
|
|
557
557
|
]
|
|
558
558
|
}
|
|
559
|
-
),
|
|
560
|
-
|
|
561
|
-
]),
|
|
562
|
-
let
|
|
563
|
-
return i.value && (
|
|
559
|
+
), A = (k) => q(dt, { ...s.value, disabled: c.value }, () => [
|
|
560
|
+
k
|
|
561
|
+
]), x = h(() => {
|
|
562
|
+
let k = o.default ? o.default()[0] : q(ve(fn), { ...e, onClick: d });
|
|
563
|
+
return i.value && (k = g(k)), l.value && (k = S(k)), s.value && (k = A(k)), k;
|
|
564
564
|
});
|
|
565
|
-
return (
|
|
565
|
+
return (k, M) => (u(), I("div", {
|
|
566
566
|
class: W(["x-action", r.value])
|
|
567
567
|
}, [
|
|
568
|
-
(
|
|
568
|
+
(u(), m(L(x.value)))
|
|
569
569
|
], 2));
|
|
570
570
|
}
|
|
571
|
-
}),
|
|
571
|
+
}), mn = {
|
|
572
572
|
/**
|
|
573
573
|
* 动作项
|
|
574
574
|
*/
|
|
@@ -639,10 +639,10 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
639
639
|
button: {
|
|
640
640
|
type: Object
|
|
641
641
|
}
|
|
642
|
-
}, Ke = /* @__PURE__ */
|
|
642
|
+
}, Ke = /* @__PURE__ */ T({
|
|
643
643
|
name: "XActionBar",
|
|
644
644
|
__name: "ActionBar",
|
|
645
|
-
props:
|
|
645
|
+
props: mn,
|
|
646
646
|
emits: ["click", "command"],
|
|
647
647
|
setup(a, { emit: t }) {
|
|
648
648
|
const e = a, o = h(() => (e.items || []).map((l) => l === "|" ? l : {
|
|
@@ -657,20 +657,20 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
657
657
|
} : void 0
|
|
658
658
|
})), s = (l) => {
|
|
659
659
|
t("click", l);
|
|
660
|
-
}, i = (l,
|
|
661
|
-
t("command", l,
|
|
660
|
+
}, i = (l, c) => {
|
|
661
|
+
t("command", l, c);
|
|
662
662
|
};
|
|
663
|
-
return (l,
|
|
663
|
+
return (l, c) => (u(), m(n($), {
|
|
664
664
|
class: "x-action-bar",
|
|
665
665
|
align: "center"
|
|
666
666
|
}, {
|
|
667
667
|
default: p(() => [
|
|
668
|
-
(
|
|
669
|
-
r === "|" ? (
|
|
668
|
+
(u(!0), I(Q, null, ie(o.value, (r) => (u(), I(Q, null, [
|
|
669
|
+
r === "|" ? (u(), m(n(ye), {
|
|
670
670
|
key: 0,
|
|
671
671
|
direction: "vertical",
|
|
672
672
|
class: "x-action-bar__divider"
|
|
673
|
-
})) : (
|
|
673
|
+
})) : (u(), m(n(J), X({
|
|
674
674
|
key: 1,
|
|
675
675
|
mode: e.mode,
|
|
676
676
|
size: e.size,
|
|
@@ -689,7 +689,7 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
689
689
|
_: 1
|
|
690
690
|
}));
|
|
691
691
|
}
|
|
692
|
-
}),
|
|
692
|
+
}), gn = {
|
|
693
693
|
/**
|
|
694
694
|
* 组件渲染html标签
|
|
695
695
|
*/
|
|
@@ -798,17 +798,17 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
798
798
|
type: Boolean,
|
|
799
799
|
default: !1
|
|
800
800
|
}
|
|
801
|
-
},
|
|
801
|
+
}, $ = /* @__PURE__ */ T({
|
|
802
802
|
name: "XContainer",
|
|
803
803
|
__name: "Container",
|
|
804
|
-
props:
|
|
804
|
+
props: gn,
|
|
805
805
|
setup(a) {
|
|
806
|
-
const t = a, e =
|
|
806
|
+
const t = a, e = pe(), o = h(() => {
|
|
807
807
|
const l = e?.parent;
|
|
808
808
|
if (!l)
|
|
809
809
|
return !1;
|
|
810
|
-
const
|
|
811
|
-
return
|
|
810
|
+
const c = l.proxy;
|
|
811
|
+
return c.$options.name === "XContainer" || !!c.flex;
|
|
812
812
|
}), s = h(() => ({
|
|
813
813
|
"is-fit": t.fit,
|
|
814
814
|
"is-flex": t.flex && !t.inline,
|
|
@@ -824,23 +824,23 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
824
824
|
[`is-overflow-${t.overflow}`]: !!t.overflow,
|
|
825
825
|
"is-padding": !!t.padding
|
|
826
826
|
})), i = h(() => {
|
|
827
|
-
const { width: l, height:
|
|
827
|
+
const { width: l, height: c, fit: r } = t;
|
|
828
828
|
return r ? null : {
|
|
829
829
|
width: l ? je(l) : void 0,
|
|
830
|
-
height:
|
|
830
|
+
height: c ? je(c) : void 0
|
|
831
831
|
};
|
|
832
832
|
});
|
|
833
|
-
return (l,
|
|
833
|
+
return (l, c) => (u(), m(L(t.tag), {
|
|
834
834
|
class: W(["x-container", s.value]),
|
|
835
835
|
style: Ce(i.value)
|
|
836
836
|
}, {
|
|
837
837
|
default: p(() => [
|
|
838
|
-
|
|
838
|
+
w(l.$slots, "default")
|
|
839
839
|
]),
|
|
840
840
|
_: 3
|
|
841
841
|
}, 8, ["class", "style"]));
|
|
842
842
|
}
|
|
843
|
-
}),
|
|
843
|
+
}), yn = {
|
|
844
844
|
size: {
|
|
845
845
|
type: String,
|
|
846
846
|
default: "default"
|
|
@@ -861,65 +861,65 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
861
861
|
more: {
|
|
862
862
|
type: Boolean
|
|
863
863
|
}
|
|
864
|
-
},
|
|
864
|
+
}, hn = {
|
|
865
865
|
key: 2,
|
|
866
866
|
class: "x-header__subtitle"
|
|
867
|
-
},
|
|
867
|
+
}, vn = {
|
|
868
868
|
key: 0,
|
|
869
869
|
class: "x-header__actions"
|
|
870
|
-
},
|
|
870
|
+
}, zt = /* @__PURE__ */ T({
|
|
871
871
|
name: "XHeader",
|
|
872
872
|
inheritAttrs: !1,
|
|
873
873
|
__name: "Header",
|
|
874
|
-
props:
|
|
874
|
+
props: yn,
|
|
875
875
|
setup(a) {
|
|
876
|
-
const t = a, e =
|
|
876
|
+
const t = a, e = it(), o = Me(Se(t, "icon")), s = h(() => ({
|
|
877
877
|
[`is-size-${t.size}`]: !!t.size && t.size !== "default",
|
|
878
878
|
"is-border": t.border,
|
|
879
879
|
"is-pointer": !!e.onClick
|
|
880
880
|
}));
|
|
881
|
-
return (i, l) => (
|
|
881
|
+
return (i, l) => (u(), m(n($), {
|
|
882
882
|
class: W(["x-header", s.value]),
|
|
883
883
|
justify: "space-between",
|
|
884
884
|
align: "center"
|
|
885
885
|
}, {
|
|
886
886
|
default: p(() => [
|
|
887
|
-
|
|
887
|
+
_(n($), {
|
|
888
888
|
align: "center",
|
|
889
889
|
class: W(["x-header__wrapper", s.value]),
|
|
890
890
|
grow: ""
|
|
891
891
|
}, {
|
|
892
892
|
default: p(() => [
|
|
893
|
-
n(o) ? (
|
|
893
|
+
n(o) ? (u(), m(L(n(o)), {
|
|
894
894
|
key: 0,
|
|
895
895
|
class: "x-header__icon"
|
|
896
896
|
})) : v("", !0),
|
|
897
|
-
|
|
898
|
-
|
|
897
|
+
R("span", X({ class: "x-header__content" }, i.$attrs), [
|
|
898
|
+
w(i.$slots, "default", {}, () => [
|
|
899
899
|
N(j(t.content), 1)
|
|
900
900
|
])
|
|
901
901
|
], 16),
|
|
902
|
-
t.more ? (
|
|
902
|
+
t.more ? (u(), m(n(te), {
|
|
903
903
|
key: 1,
|
|
904
904
|
class: "x-header__more",
|
|
905
|
-
icon: n(
|
|
905
|
+
icon: n(bo)
|
|
906
906
|
}, null, 8, ["icon"])) : v("", !0),
|
|
907
|
-
t.subtitle || i.$slots.subtitle ? (
|
|
908
|
-
|
|
907
|
+
t.subtitle || i.$slots.subtitle ? (u(), I("span", hn, [
|
|
908
|
+
w(i.$slots, "subtitle", {}, () => [
|
|
909
909
|
N(j(t.subtitle), 1)
|
|
910
910
|
])
|
|
911
911
|
])) : v("", !0)
|
|
912
912
|
]),
|
|
913
913
|
_: 3
|
|
914
914
|
}, 8, ["class"]),
|
|
915
|
-
i.$slots.actions ? (
|
|
916
|
-
|
|
915
|
+
i.$slots.actions ? (u(), I("div", vn, [
|
|
916
|
+
w(i.$slots, "actions")
|
|
917
917
|
])) : v("", !0)
|
|
918
918
|
]),
|
|
919
919
|
_: 3
|
|
920
920
|
}, 8, ["class"]));
|
|
921
921
|
}
|
|
922
|
-
}),
|
|
922
|
+
}), bn = {
|
|
923
923
|
/**
|
|
924
924
|
* 宽高自适应
|
|
925
925
|
*/
|
|
@@ -991,10 +991,10 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
991
991
|
footer: {
|
|
992
992
|
type: Object
|
|
993
993
|
}
|
|
994
|
-
},
|
|
994
|
+
}, St = /* @__PURE__ */ T({
|
|
995
995
|
name: "XPanel",
|
|
996
996
|
__name: "Panel",
|
|
997
|
-
props:
|
|
997
|
+
props: bn,
|
|
998
998
|
setup(a, { expose: t }) {
|
|
999
999
|
const e = a, o = P(), s = h(() => ({
|
|
1000
1000
|
"x-panel--card": !!e.card,
|
|
@@ -1012,7 +1012,7 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
1012
1012
|
}), l = h(() => e.fit || e.height ? "auto" : void 0);
|
|
1013
1013
|
return t({
|
|
1014
1014
|
bodyRef: o
|
|
1015
|
-
}), (
|
|
1015
|
+
}), (c, r) => (u(), m(n($), {
|
|
1016
1016
|
class: W(["x-panel", s.value]),
|
|
1017
1017
|
direction: "column",
|
|
1018
1018
|
fit: e.fit,
|
|
@@ -1020,19 +1020,19 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
1020
1020
|
height: e.height
|
|
1021
1021
|
}, {
|
|
1022
1022
|
default: p(() => [
|
|
1023
|
-
i.value ? (
|
|
1023
|
+
i.value ? (u(), m(n($), {
|
|
1024
1024
|
key: 0,
|
|
1025
1025
|
flex: !1,
|
|
1026
1026
|
class: "x-panel__header"
|
|
1027
1027
|
}, {
|
|
1028
1028
|
default: p(() => [
|
|
1029
|
-
|
|
1030
|
-
|
|
1029
|
+
w(c.$slots, "header", {}, () => [
|
|
1030
|
+
_(n(zt), Ee(Be(i.value)), {
|
|
1031
1031
|
default: p(() => [
|
|
1032
|
-
|
|
1032
|
+
w(c.$slots, "title")
|
|
1033
1033
|
]),
|
|
1034
1034
|
actions: p(() => [
|
|
1035
|
-
|
|
1035
|
+
w(c.$slots, "actions")
|
|
1036
1036
|
]),
|
|
1037
1037
|
_: 3
|
|
1038
1038
|
}, 16)
|
|
@@ -1040,7 +1040,7 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
1040
1040
|
]),
|
|
1041
1041
|
_: 3
|
|
1042
1042
|
})) : v("", !0),
|
|
1043
|
-
|
|
1043
|
+
_(n($), X({
|
|
1044
1044
|
ref_key: "bodyRef",
|
|
1045
1045
|
ref: o,
|
|
1046
1046
|
flex: !1,
|
|
@@ -1050,18 +1050,18 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
1050
1050
|
class: "x-panel__body"
|
|
1051
1051
|
}, e.body), {
|
|
1052
1052
|
default: p(() => [
|
|
1053
|
-
|
|
1053
|
+
w(c.$slots, "default")
|
|
1054
1054
|
]),
|
|
1055
1055
|
_: 3
|
|
1056
1056
|
}, 16, ["overflow"]),
|
|
1057
|
-
|
|
1057
|
+
c.$slots.footer ? (u(), m(n($), X({
|
|
1058
1058
|
key: 1,
|
|
1059
1059
|
flex: !1,
|
|
1060
1060
|
padding: "",
|
|
1061
1061
|
class: "x-panel__footer"
|
|
1062
1062
|
}, e.footer), {
|
|
1063
1063
|
default: p(() => [
|
|
1064
|
-
|
|
1064
|
+
w(c.$slots, "footer")
|
|
1065
1065
|
]),
|
|
1066
1066
|
_: 3
|
|
1067
1067
|
}, 16)) : v("", !0)
|
|
@@ -1069,10 +1069,10 @@ const un = { key: 0 }, dn = /* @__PURE__ */ E({
|
|
|
1069
1069
|
_: 3
|
|
1070
1070
|
}, 8, ["class", "fit", "width", "height"]));
|
|
1071
1071
|
}
|
|
1072
|
-
}),
|
|
1073
|
-
class
|
|
1072
|
+
}), nt = "user-select-none";
|
|
1073
|
+
class at {
|
|
1074
1074
|
constructor(t, e = {}) {
|
|
1075
|
-
this.el = t, this.options = e, this.scope =
|
|
1075
|
+
this.el = t, this.options = e, this.scope = rt(), this.scope.run(() => {
|
|
1076
1076
|
this.init();
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
@@ -1090,35 +1090,35 @@ class ot {
|
|
|
1090
1090
|
const { el: t, options: e } = this, { disabled: o, delay: s = 150, onStart: i, onEnd: l } = e;
|
|
1091
1091
|
if (o)
|
|
1092
1092
|
return;
|
|
1093
|
-
let
|
|
1093
|
+
let c = null;
|
|
1094
1094
|
const r = this.getHandle(), d = this.getTarget();
|
|
1095
1095
|
let f = t.getBoundingClientRect(), g = null;
|
|
1096
|
-
const { x: S, y:
|
|
1096
|
+
const { x: S, y: A } = Do(t, {
|
|
1097
1097
|
initialValue: { x: f.x, y: f.y },
|
|
1098
1098
|
...e,
|
|
1099
1099
|
handle: r,
|
|
1100
|
-
onStart: (
|
|
1101
|
-
document.body.classList.add(
|
|
1102
|
-
this.dragging = !0, f = t.getBoundingClientRect(), g = d?.getBoundingClientRect(), i && i(
|
|
1100
|
+
onStart: (x, k) => {
|
|
1101
|
+
document.body.classList.add(nt), clearTimeout(c), c = setTimeout(() => {
|
|
1102
|
+
this.dragging = !0, f = t.getBoundingClientRect(), g = d?.getBoundingClientRect(), i && i(x, k);
|
|
1103
1103
|
}, s);
|
|
1104
1104
|
},
|
|
1105
|
-
onEnd: (
|
|
1106
|
-
if (clearTimeout(
|
|
1105
|
+
onEnd: (x, k) => {
|
|
1106
|
+
if (clearTimeout(c), document.body.classList.remove(nt), this.dragging && g) {
|
|
1107
1107
|
this.dragging = !1;
|
|
1108
|
-
const { x:
|
|
1109
|
-
l && l(y,
|
|
1108
|
+
const { x: M, y: V } = x, y = this.getPosition(g, f, M, V);
|
|
1109
|
+
l && l(y, k), g = null;
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
1112
|
});
|
|
1113
|
-
H([S,
|
|
1113
|
+
H([S, A], () => {
|
|
1114
1114
|
if (this.dragging && g) {
|
|
1115
|
-
const
|
|
1116
|
-
t.style.left = `${
|
|
1115
|
+
const x = this.getPosition(g, f, S.value, A.value);
|
|
1116
|
+
t.style.left = `${x.x}px`, t.style.top = `${x.y}px`;
|
|
1117
1117
|
}
|
|
1118
1118
|
});
|
|
1119
1119
|
}
|
|
1120
1120
|
getPosition(t, e, o, s) {
|
|
1121
|
-
const { edge: i = 50 } = this.options, l = -e.width + i,
|
|
1121
|
+
const { edge: i = 50 } = this.options, l = -e.width + i, c = t.width - i, r = 0, d = t.height - i, f = Math.min(c, Math.max(o, l)), g = Math.min(d, Math.max(s, r));
|
|
1122
1122
|
return {
|
|
1123
1123
|
x: f,
|
|
1124
1124
|
y: g
|
|
@@ -1128,24 +1128,24 @@ class ot {
|
|
|
1128
1128
|
this.scope.stop();
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
|
-
const
|
|
1131
|
+
const _n = {
|
|
1132
1132
|
mounted(a, t) {
|
|
1133
|
-
const e = t.value || {}, o = new
|
|
1133
|
+
const e = t.value || {}, o = new at(a, e);
|
|
1134
1134
|
a.__draggable__ = o;
|
|
1135
1135
|
},
|
|
1136
1136
|
updated(a, t) {
|
|
1137
1137
|
const e = t.value || {};
|
|
1138
1138
|
let o = a.__draggable__;
|
|
1139
|
-
o && !He(o.options, e) && (o.destory(), a.__draggable__ = new
|
|
1139
|
+
o && !He(o.options, e) && (o.destory(), a.__draggable__ = new at(a, e));
|
|
1140
1140
|
},
|
|
1141
1141
|
unmounted(a) {
|
|
1142
1142
|
const t = a.__draggable__;
|
|
1143
1143
|
t && (t.destory(), a.__draggable__ = null);
|
|
1144
1144
|
}
|
|
1145
1145
|
}, Pe = "user-select-none";
|
|
1146
|
-
class
|
|
1146
|
+
class st {
|
|
1147
1147
|
constructor(t, e = {}) {
|
|
1148
|
-
this.el = t, this.options = e, this.scope =
|
|
1148
|
+
this.el = t, this.options = e, this.scope = rt(), this.scope.run(() => {
|
|
1149
1149
|
this.init();
|
|
1150
1150
|
});
|
|
1151
1151
|
}
|
|
@@ -1159,7 +1159,7 @@ class nt {
|
|
|
1159
1159
|
const { el: t, options: e } = this, { disabled: o, onStart: s, onEnd: i } = e;
|
|
1160
1160
|
if (o)
|
|
1161
1161
|
return;
|
|
1162
|
-
this.MIE =
|
|
1162
|
+
this.MIE = Po(t), this.cleanMousedown = Te(document, "mousedown", () => {
|
|
1163
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
1164
|
}), this.cleanMouseup = Te(document, "mouseup", () => {
|
|
1165
1165
|
this.resizing.value && this.direction?.value && this.MIE && (t.classList.remove(
|
|
@@ -1170,8 +1170,8 @@ class nt {
|
|
|
1170
1170
|
const d = document.body;
|
|
1171
1171
|
d.style.cursor = r ? `${r}-resize` : "", r ? d.classList.add(Pe) : d.classList.remove(Pe);
|
|
1172
1172
|
});
|
|
1173
|
-
const { x: l, y:
|
|
1174
|
-
H([l,
|
|
1173
|
+
const { x: l, y: c } = this.MIE;
|
|
1174
|
+
H([l, c], () => {
|
|
1175
1175
|
this.resizing.value ? this.resize() : this.direction.value = this.getDirection();
|
|
1176
1176
|
});
|
|
1177
1177
|
}
|
|
@@ -1179,35 +1179,35 @@ class nt {
|
|
|
1179
1179
|
const { MIE: t, direction: e, resizing: o, options: s, el: i } = this, l = e?.value || "";
|
|
1180
1180
|
if (!t || !o.value || !l)
|
|
1181
1181
|
return;
|
|
1182
|
-
const { x:
|
|
1183
|
-
minWidth:
|
|
1184
|
-
minHeight:
|
|
1185
|
-
maxWidth:
|
|
1182
|
+
const { x: c, y: r, elementX: d, elementY: f, elementHeight: g, elementWidth: S } = t, { onResizing: A } = s, {
|
|
1183
|
+
minWidth: x = 0,
|
|
1184
|
+
minHeight: k = 0,
|
|
1185
|
+
maxWidth: M = 99999,
|
|
1186
1186
|
maxHeight: V = 99999
|
|
1187
1187
|
} = s;
|
|
1188
1188
|
if (l.includes("e")) {
|
|
1189
|
-
const y = Math.min(Math.max(d.value,
|
|
1189
|
+
const y = Math.min(Math.max(d.value, x), M);
|
|
1190
1190
|
i.style.width = `${y}px`;
|
|
1191
1191
|
}
|
|
1192
1192
|
if (l.includes("s")) {
|
|
1193
|
-
const y = Math.min(Math.max(f.value,
|
|
1193
|
+
const y = Math.min(Math.max(f.value, k), V);
|
|
1194
1194
|
i.style.height = `${y}px`;
|
|
1195
1195
|
}
|
|
1196
1196
|
if (l.includes("w")) {
|
|
1197
1197
|
const y = Math.min(
|
|
1198
|
-
Math.max(S.value - d.value,
|
|
1199
|
-
|
|
1198
|
+
Math.max(S.value - d.value, x),
|
|
1199
|
+
M
|
|
1200
1200
|
);
|
|
1201
|
-
i.style.width = `${y}px`, i.style.left = `${
|
|
1201
|
+
i.style.width = `${y}px`, i.style.left = `${c.value}px`;
|
|
1202
1202
|
}
|
|
1203
1203
|
if (l.includes("n")) {
|
|
1204
1204
|
const y = Math.min(
|
|
1205
|
-
Math.max(g.value - f.value,
|
|
1205
|
+
Math.max(g.value - f.value, k),
|
|
1206
1206
|
V
|
|
1207
1207
|
);
|
|
1208
1208
|
this.el.style.height = `${y}px`, this.el.style.top = `${r.value}px`;
|
|
1209
1209
|
}
|
|
1210
|
-
|
|
1210
|
+
A && A(l, t);
|
|
1211
1211
|
}
|
|
1212
1212
|
getDirection() {
|
|
1213
1213
|
if (!this.MIE)
|
|
@@ -1215,30 +1215,30 @@ class nt {
|
|
|
1215
1215
|
const { elementX: t, elementY: e, elementHeight: o, elementWidth: s, isOutside: i } = this.MIE;
|
|
1216
1216
|
if (i.value)
|
|
1217
1217
|
return "";
|
|
1218
|
-
const { dirs: l = ["n", "s", "w", "e"], edge:
|
|
1218
|
+
const { dirs: l = ["n", "s", "w", "e"], edge: c = 5 } = this.options;
|
|
1219
1219
|
let r = "";
|
|
1220
|
-
return l.includes("n") && e.value <=
|
|
1220
|
+
return l.includes("n") && e.value <= c ? r += "n" : l.includes("s") && e.value > o.value - c && (r += "s"), l.includes("w") && t.value <= c ? r += "w" : l.includes("e") && t.value > s.value - c && (r += "e"), r;
|
|
1221
1221
|
}
|
|
1222
1222
|
destory() {
|
|
1223
1223
|
const t = document.body;
|
|
1224
1224
|
t.style.cursor = "", t.classList.remove(Pe), this.cleanMousedown && this.cleanMousedown(), this.cleanMouseup && this.cleanMouseup(), this.MIE?.stop(), this.scope.stop();
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
|
-
const
|
|
1227
|
+
const Ct = {
|
|
1228
1228
|
mounted(a, t) {
|
|
1229
|
-
const e = t.value || {}, o = new
|
|
1229
|
+
const e = t.value || {}, o = new st(a, e);
|
|
1230
1230
|
a.__resizable__ = o;
|
|
1231
1231
|
},
|
|
1232
1232
|
updated(a, t) {
|
|
1233
1233
|
const e = t.value || {};
|
|
1234
1234
|
let o = a.__resizable__;
|
|
1235
|
-
o && !He(o.options, e) && (o.destory(), a.__resizable__ = new
|
|
1235
|
+
o && !He(o.options, e) && (o.destory(), a.__resizable__ = new st(a, e));
|
|
1236
1236
|
},
|
|
1237
1237
|
unmounted(a) {
|
|
1238
1238
|
const t = a.__resizable__;
|
|
1239
1239
|
t && (t.destory(), a.__resizable__ = null);
|
|
1240
1240
|
}
|
|
1241
|
-
},
|
|
1241
|
+
}, kn = {
|
|
1242
1242
|
modelValue: {
|
|
1243
1243
|
type: Boolean,
|
|
1244
1244
|
default: !0
|
|
@@ -1324,8 +1324,8 @@ const St = {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
};
|
|
1326
1326
|
let ue = 1e3;
|
|
1327
|
-
function
|
|
1328
|
-
const { width: e, height: o } =
|
|
1327
|
+
function wn(a, t) {
|
|
1328
|
+
const { width: e, height: o } = vt(t), s = Ne({
|
|
1329
1329
|
mode: a.mode || "normal",
|
|
1330
1330
|
wrapperWidth: 0,
|
|
1331
1331
|
wrapperHeight: 0,
|
|
@@ -1348,12 +1348,12 @@ function _n(a, t) {
|
|
|
1348
1348
|
minimized: h(() => s.mode === "minimized")
|
|
1349
1349
|
};
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function xn(a, t) {
|
|
1352
1352
|
const e = h(() => {
|
|
1353
|
-
const { width: l, height:
|
|
1353
|
+
const { width: l, height: c, top: r, left: d, zIndex: f } = t;
|
|
1354
1354
|
return {
|
|
1355
1355
|
width: `${l}px`,
|
|
1356
|
-
height: `${
|
|
1356
|
+
height: `${c}px`,
|
|
1357
1357
|
top: `${r}px`,
|
|
1358
1358
|
left: `${d}px`,
|
|
1359
1359
|
zIndex: f
|
|
@@ -1377,7 +1377,7 @@ function kn(a, t) {
|
|
|
1377
1377
|
modalStyle: i
|
|
1378
1378
|
};
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1380
|
+
function zn(a, t, e) {
|
|
1381
1381
|
const o = (f) => {
|
|
1382
1382
|
t.mode = f, ["maximized", "minimized", "normal"].includes(f) && e(f), e("modeChange", f);
|
|
1383
1383
|
}, s = async () => {
|
|
@@ -1397,7 +1397,7 @@ function wn(a, t, e) {
|
|
|
1397
1397
|
}
|
|
1398
1398
|
};
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Sn(a, t, e, o) {
|
|
1401
1401
|
return h(() => {
|
|
1402
1402
|
const s = typeof a.draggable == "boolean" ? !a.draggable : !!a.draggable?.disabled;
|
|
1403
1403
|
return {
|
|
@@ -1414,13 +1414,13 @@ function xn(a, t, e, o) {
|
|
|
1414
1414
|
onEnd(i) {
|
|
1415
1415
|
if (t.mode === "maximized")
|
|
1416
1416
|
return;
|
|
1417
|
-
const { x: l, y:
|
|
1418
|
-
t.left = l, t.top =
|
|
1417
|
+
const { x: l, y: c } = i;
|
|
1418
|
+
t.left = l, t.top = c, t.dragging = !1, e("dragEnd", i);
|
|
1419
1419
|
}
|
|
1420
1420
|
};
|
|
1421
1421
|
});
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function Cn(a, t, e) {
|
|
1424
1424
|
return h(() => {
|
|
1425
1425
|
const o = typeof a.resizable == "boolean" ? !a.resizable : !!a.resizable?.disabled;
|
|
1426
1426
|
return {
|
|
@@ -1441,62 +1441,62 @@ function Sn(a, t, e) {
|
|
|
1441
1441
|
};
|
|
1442
1442
|
});
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1444
|
+
function Tn(a, t) {
|
|
1445
1445
|
const e = a.componentInstance;
|
|
1446
1446
|
if (!e)
|
|
1447
1447
|
return;
|
|
1448
1448
|
let o = null;
|
|
1449
|
-
return
|
|
1449
|
+
return Rt(() => {
|
|
1450
1450
|
const s = n(t), i = n(s?.bodyRef);
|
|
1451
1451
|
o = e.$el, i && i.$el && i.$el.appendChild(o);
|
|
1452
|
-
}),
|
|
1452
|
+
}), Ft(() => {
|
|
1453
1453
|
o && o.parentNode && o.parentNode.removeChild(o);
|
|
1454
1454
|
}), {
|
|
1455
1455
|
componentInstance: e
|
|
1456
1456
|
};
|
|
1457
1457
|
}
|
|
1458
|
-
const
|
|
1458
|
+
const Mn = ["src"], Qe = /* @__PURE__ */ T({
|
|
1459
1459
|
name: "XDialog",
|
|
1460
1460
|
__name: "Dialog",
|
|
1461
|
-
props:
|
|
1461
|
+
props: kn,
|
|
1462
1462
|
emits: ["update:modelValue", "open", "close", "destroy", "maximized", "minimized", "normal", "modeChange", "dragStart", "dragging", "dragEnd", "resizeStart", "resizeEnd", "resizing", "submit", "cancel"],
|
|
1463
1463
|
setup(a, { expose: t, emit: e }) {
|
|
1464
|
-
const o = a, s =
|
|
1464
|
+
const o = a, s = pe(), i = P(), l = P(), { state: c, maximized: r, minimized: d, normal: f } = wn(o, i), { styles: g, classes: S, wrapperClass: A, modalStyle: x } = xn(o, c), { changeMode: k, active: M, close: V, show: y, hide: E, submit: b, cancel: D } = zn(
|
|
1465
1465
|
o,
|
|
1466
|
-
|
|
1466
|
+
c,
|
|
1467
1467
|
e
|
|
1468
|
-
),
|
|
1469
|
-
|
|
1468
|
+
), F = Sn(o, c, e, i), oe = Cn(o, c, e), ne = Tn(o, l);
|
|
1469
|
+
ct(async () => {
|
|
1470
1470
|
o.modelValue && (await ce(), s && e("open", s));
|
|
1471
1471
|
});
|
|
1472
1472
|
const ae = h(() => l.value?.$el);
|
|
1473
1473
|
return t({
|
|
1474
1474
|
$vtjEl: ae,
|
|
1475
1475
|
panelRef: l,
|
|
1476
|
-
state:
|
|
1476
|
+
state: c,
|
|
1477
1477
|
maximized: r,
|
|
1478
1478
|
minimized: d,
|
|
1479
|
-
changeMode:
|
|
1479
|
+
changeMode: k,
|
|
1480
1480
|
show: y,
|
|
1481
|
-
hide:
|
|
1481
|
+
hide: E,
|
|
1482
1482
|
submit: b,
|
|
1483
1483
|
cancel: D,
|
|
1484
1484
|
componentInstance: ne
|
|
1485
|
-
}), (U, Z) => o.modelValue ? (
|
|
1485
|
+
}), (U, Z) => o.modelValue ? (u(), m(ut, {
|
|
1486
1486
|
key: 0,
|
|
1487
1487
|
to: "body"
|
|
1488
1488
|
}, [
|
|
1489
|
-
|
|
1489
|
+
R("div", {
|
|
1490
1490
|
ref_key: "wrapper",
|
|
1491
1491
|
ref: i,
|
|
1492
|
-
class: W(["x-dialog__wrapper", n(
|
|
1492
|
+
class: W(["x-dialog__wrapper", n(A)])
|
|
1493
1493
|
}, [
|
|
1494
|
-
o.modal ? (
|
|
1494
|
+
o.modal ? (u(), I("div", {
|
|
1495
1495
|
key: 0,
|
|
1496
1496
|
class: "x-dialog__modal",
|
|
1497
|
-
style: Ce(n(
|
|
1497
|
+
style: Ce(n(x))
|
|
1498
1498
|
}, null, 4)) : v("", !0),
|
|
1499
|
-
K((
|
|
1499
|
+
K((u(), m(n(St), {
|
|
1500
1500
|
ref_key: "panelRef",
|
|
1501
1501
|
ref: l,
|
|
1502
1502
|
class: W(["x-dialog", n(S)]),
|
|
@@ -1509,44 +1509,44 @@ const Cn = ["src"], zt = /* @__PURE__ */ E({
|
|
|
1509
1509
|
style: Ce(n(g)),
|
|
1510
1510
|
size: o.size,
|
|
1511
1511
|
body: { padding: o.bodyPadding },
|
|
1512
|
-
onClick: n(
|
|
1513
|
-
},
|
|
1512
|
+
onClick: n(M)
|
|
1513
|
+
}, de({
|
|
1514
1514
|
title: p(() => [
|
|
1515
1515
|
N(j(o.title), 1)
|
|
1516
1516
|
]),
|
|
1517
1517
|
actions: p(() => [
|
|
1518
|
-
|
|
1519
|
-
o.minimizable ? (
|
|
1518
|
+
w(U.$slots, "actions"),
|
|
1519
|
+
o.minimizable ? (u(), m(n(J), {
|
|
1520
1520
|
key: 0,
|
|
1521
|
-
icon: n(
|
|
1521
|
+
icon: n($o),
|
|
1522
1522
|
size: o.size,
|
|
1523
1523
|
mode: "icon",
|
|
1524
1524
|
type: "primary",
|
|
1525
1525
|
background: "hover",
|
|
1526
|
-
onClick: Z[0] || (Z[0] = (re) => n(
|
|
1526
|
+
onClick: Z[0] || (Z[0] = (re) => n(k)("minimized"))
|
|
1527
1527
|
}, null, 8, ["icon", "size"])) : v("", !0),
|
|
1528
|
-
o.maximizable ? (
|
|
1529
|
-
n(f) ? (
|
|
1528
|
+
o.maximizable ? (u(), I(Q, { key: 1 }, [
|
|
1529
|
+
n(f) ? (u(), m(n(J), {
|
|
1530
1530
|
key: 1,
|
|
1531
|
-
icon: n(
|
|
1531
|
+
icon: n(Ao),
|
|
1532
1532
|
size: o.size,
|
|
1533
1533
|
mode: "icon",
|
|
1534
1534
|
type: "primary",
|
|
1535
1535
|
background: "hover",
|
|
1536
|
-
onClick: Z[2] || (Z[2] = (re) => n(
|
|
1537
|
-
}, null, 8, ["icon", "size"])) : (
|
|
1536
|
+
onClick: Z[2] || (Z[2] = (re) => n(k)("maximized"))
|
|
1537
|
+
}, null, 8, ["icon", "size"])) : (u(), m(n(J), {
|
|
1538
1538
|
key: 0,
|
|
1539
|
-
icon: n(
|
|
1539
|
+
icon: n(Io),
|
|
1540
1540
|
size: o.size,
|
|
1541
1541
|
mode: "icon",
|
|
1542
1542
|
type: "primary",
|
|
1543
1543
|
background: "hover",
|
|
1544
|
-
onClick: Z[1] || (Z[1] = (re) => n(
|
|
1544
|
+
onClick: Z[1] || (Z[1] = (re) => n(k)("normal"))
|
|
1545
1545
|
}, null, 8, ["icon", "size"]))
|
|
1546
1546
|
], 64)) : v("", !0),
|
|
1547
|
-
o.closable ? (
|
|
1547
|
+
o.closable ? (u(), m(n(J), {
|
|
1548
1548
|
key: 2,
|
|
1549
|
-
icon: n(
|
|
1549
|
+
icon: n(Vo),
|
|
1550
1550
|
size: o.size,
|
|
1551
1551
|
mode: "icon",
|
|
1552
1552
|
type: "danger",
|
|
@@ -1555,13 +1555,13 @@ const Cn = ["src"], zt = /* @__PURE__ */ E({
|
|
|
1555
1555
|
}, null, 8, ["icon", "size", "onClick"])) : v("", !0)
|
|
1556
1556
|
]),
|
|
1557
1557
|
default: p(() => [
|
|
1558
|
-
|
|
1559
|
-
o.content ? (
|
|
1560
|
-
o.src ? (
|
|
1558
|
+
w(U.$slots, "default", {}, () => [
|
|
1559
|
+
o.content ? (u(), m(L(o.content), { key: 0 })) : v("", !0),
|
|
1560
|
+
o.src ? (u(), I("iframe", {
|
|
1561
1561
|
key: 1,
|
|
1562
1562
|
src: o.src,
|
|
1563
1563
|
class: "x-dialog__frame"
|
|
1564
|
-
}, null, 8,
|
|
1564
|
+
}, null, 8, Mn)) : v("", !0)
|
|
1565
1565
|
])
|
|
1566
1566
|
]),
|
|
1567
1567
|
_: 2
|
|
@@ -1569,17 +1569,17 @@ const Cn = ["src"], zt = /* @__PURE__ */ E({
|
|
|
1569
1569
|
o.cancel || o.submit || U.$slots.footer || U.$slots.extra || U.$slots.handle ? {
|
|
1570
1570
|
name: "footer",
|
|
1571
1571
|
fn: p(() => [
|
|
1572
|
-
|
|
1573
|
-
|
|
1572
|
+
w(U.$slots, "footer", {}, () => [
|
|
1573
|
+
_(n($), { align: "center" }, {
|
|
1574
1574
|
default: p(() => [
|
|
1575
|
-
|
|
1575
|
+
w(U.$slots, "extra")
|
|
1576
1576
|
]),
|
|
1577
1577
|
_: 3
|
|
1578
1578
|
}),
|
|
1579
|
-
|
|
1579
|
+
_(n($), { align: "center" }, {
|
|
1580
1580
|
default: p(() => [
|
|
1581
|
-
|
|
1582
|
-
o.cancel ? (
|
|
1581
|
+
w(U.$slots, "handle"),
|
|
1582
|
+
o.cancel ? (u(), m(n(le), {
|
|
1583
1583
|
key: 0,
|
|
1584
1584
|
type: "default",
|
|
1585
1585
|
size: o.size,
|
|
@@ -1590,14 +1590,14 @@ const Cn = ["src"], zt = /* @__PURE__ */ E({
|
|
|
1590
1590
|
]),
|
|
1591
1591
|
_: 1
|
|
1592
1592
|
}, 8, ["size", "onClick"])) : v("", !0),
|
|
1593
|
-
o.submit ? (
|
|
1593
|
+
o.submit ? (u(), m(n(le), {
|
|
1594
1594
|
key: 1,
|
|
1595
1595
|
type: "primary",
|
|
1596
1596
|
size: o.size,
|
|
1597
1597
|
onClick: n(b)
|
|
1598
1598
|
}, {
|
|
1599
1599
|
default: p(() => [
|
|
1600
|
-
N(j(typeof o.submit == "string" ? o.
|
|
1600
|
+
N(j(typeof o.submit == "string" ? o.submit : "确定"), 1)
|
|
1601
1601
|
]),
|
|
1602
1602
|
_: 1
|
|
1603
1603
|
}, 8, ["size", "onClick"])) : v("", !0)
|
|
@@ -1609,18 +1609,18 @@ const Cn = ["src"], zt = /* @__PURE__ */ E({
|
|
|
1609
1609
|
key: "0"
|
|
1610
1610
|
} : void 0
|
|
1611
1611
|
]), 1032, ["header", "class", "style", "size", "body", "onClick"])), [
|
|
1612
|
-
[n(
|
|
1613
|
-
[n(
|
|
1612
|
+
[n(_n), n(F)],
|
|
1613
|
+
[n(Ct), n(oe)]
|
|
1614
1614
|
])
|
|
1615
1615
|
], 2)
|
|
1616
1616
|
])) : v("", !0);
|
|
1617
1617
|
}
|
|
1618
1618
|
});
|
|
1619
|
-
function
|
|
1620
|
-
const e = document.createElement("div"), o =
|
|
1621
|
-
o.appContext = t ??
|
|
1619
|
+
function Ze(a, t) {
|
|
1620
|
+
const e = document.createElement("div"), o = _(Qe, a);
|
|
1621
|
+
o.appContext = t ?? Ze._context, Je(o, e);
|
|
1622
1622
|
const s = () => {
|
|
1623
|
-
|
|
1623
|
+
Je(null, e), e.parentNode?.removeChild(e);
|
|
1624
1624
|
};
|
|
1625
1625
|
return o.props.onDestroy = () => {
|
|
1626
1626
|
s();
|
|
@@ -1629,22 +1629,22 @@ function Qe(a, t) {
|
|
|
1629
1629
|
destroy: s
|
|
1630
1630
|
};
|
|
1631
1631
|
}
|
|
1632
|
-
const
|
|
1632
|
+
const En = /* @__PURE__ */ R("div", { class: "x-mask-sidebar__helper" }, null, -1), Bn = /* @__PURE__ */ T({
|
|
1633
1633
|
__name: "Sidebar",
|
|
1634
1634
|
props: {
|
|
1635
1635
|
collapsed: { type: Boolean }
|
|
1636
1636
|
},
|
|
1637
1637
|
setup(a) {
|
|
1638
1638
|
const t = a;
|
|
1639
|
-
return (e, o) => K((
|
|
1639
|
+
return (e, o) => K((u(), m(n($), {
|
|
1640
1640
|
class: W(["x-mask-sidebar", { "is-collapsed": t.collapsed }]),
|
|
1641
1641
|
grow: !1,
|
|
1642
1642
|
flex: "",
|
|
1643
1643
|
direction: "column"
|
|
1644
1644
|
}, {
|
|
1645
1645
|
default: p(() => [
|
|
1646
|
-
|
|
1647
|
-
|
|
1646
|
+
w(e.$slots, "brand"),
|
|
1647
|
+
_(n($), {
|
|
1648
1648
|
class: "x-mask-sidebar__wrapper",
|
|
1649
1649
|
flex: "",
|
|
1650
1650
|
grow: "",
|
|
@@ -1653,15 +1653,15 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1653
1653
|
align: "center"
|
|
1654
1654
|
}, {
|
|
1655
1655
|
default: p(() => [
|
|
1656
|
-
|
|
1657
|
-
|
|
1656
|
+
w(e.$slots, "default"),
|
|
1657
|
+
En
|
|
1658
1658
|
]),
|
|
1659
1659
|
_: 3
|
|
1660
1660
|
})
|
|
1661
1661
|
]),
|
|
1662
1662
|
_: 3
|
|
1663
1663
|
}, 8, ["class"])), [
|
|
1664
|
-
[n(
|
|
1664
|
+
[n(Ct), {
|
|
1665
1665
|
dirs: ["e"],
|
|
1666
1666
|
disabled: t.collapsed,
|
|
1667
1667
|
maxWidth: 500,
|
|
@@ -1669,7 +1669,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1669
1669
|
}]
|
|
1670
1670
|
]);
|
|
1671
1671
|
}
|
|
1672
|
-
}),
|
|
1672
|
+
}), $n = /* @__PURE__ */ T({
|
|
1673
1673
|
__name: "SwitchBar",
|
|
1674
1674
|
props: {
|
|
1675
1675
|
collasped: { type: Boolean, default: !1 },
|
|
@@ -1684,7 +1684,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1684
1684
|
setup(a, { emit: t }) {
|
|
1685
1685
|
const e = a, o = P(!1), s = P(""), i = P(!1), l = () => {
|
|
1686
1686
|
o.value = !0;
|
|
1687
|
-
},
|
|
1687
|
+
}, c = () => {
|
|
1688
1688
|
s.value = "", o.value = !1, t("update:keyword", s.value);
|
|
1689
1689
|
}, r = () => {
|
|
1690
1690
|
t("update:collasped", !e.collasped);
|
|
@@ -1693,31 +1693,31 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1693
1693
|
}, f = () => {
|
|
1694
1694
|
t("update:favorite", i.value);
|
|
1695
1695
|
};
|
|
1696
|
-
return (g, S) => (
|
|
1696
|
+
return (g, S) => (u(), m(n($), {
|
|
1697
1697
|
class: "x-mask-switch-bar",
|
|
1698
1698
|
justify: "space-between",
|
|
1699
1699
|
align: "center"
|
|
1700
1700
|
}, {
|
|
1701
1701
|
default: p(() => [
|
|
1702
|
-
e.collasped ? v("", !0) : (
|
|
1702
|
+
e.collasped ? v("", !0) : (u(), m(n($), {
|
|
1703
1703
|
key: 0,
|
|
1704
1704
|
class: "x-mask-switch-bar__left",
|
|
1705
1705
|
grow: ""
|
|
1706
1706
|
}, {
|
|
1707
1707
|
default: p(() => [
|
|
1708
|
-
o.value ? v("", !0) : (
|
|
1708
|
+
o.value ? v("", !0) : (u(), m(n(Xe), {
|
|
1709
1709
|
key: 0,
|
|
1710
1710
|
modelValue: i.value,
|
|
1711
|
-
"onUpdate:modelValue": S[0] || (S[0] = (
|
|
1711
|
+
"onUpdate:modelValue": S[0] || (S[0] = (A) => i.value = A),
|
|
1712
1712
|
class: "x-mask-switch-bar__switch",
|
|
1713
|
-
"active-icon": n(
|
|
1714
|
-
"inactive-icon": n(
|
|
1713
|
+
"active-icon": n(mt),
|
|
1714
|
+
"inactive-icon": n(ft),
|
|
1715
1715
|
onChange: f
|
|
1716
1716
|
}, null, 8, ["modelValue", "active-icon", "inactive-icon"])),
|
|
1717
|
-
o.value ? (
|
|
1717
|
+
o.value ? (u(), m(n(Fe), {
|
|
1718
1718
|
key: 1,
|
|
1719
1719
|
modelValue: s.value,
|
|
1720
|
-
"onUpdate:modelValue": S[1] || (S[1] = (
|
|
1720
|
+
"onUpdate:modelValue": S[1] || (S[1] = (A) => s.value = A),
|
|
1721
1721
|
class: "x-mask-switch-bar__input",
|
|
1722
1722
|
size: "small",
|
|
1723
1723
|
placeholder: "请输入查询关键字",
|
|
@@ -1725,9 +1725,9 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1725
1725
|
"prefix-icon": n(Oe)
|
|
1726
1726
|
}, {
|
|
1727
1727
|
suffix: p(() => [
|
|
1728
|
-
|
|
1729
|
-
icon: n(
|
|
1730
|
-
onClick:
|
|
1728
|
+
_(n(te), {
|
|
1729
|
+
icon: n(gt),
|
|
1730
|
+
onClick: c
|
|
1731
1731
|
}, null, 8, ["icon"])
|
|
1732
1732
|
]),
|
|
1733
1733
|
_: 1
|
|
@@ -1735,14 +1735,14 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1735
1735
|
]),
|
|
1736
1736
|
_: 1
|
|
1737
1737
|
})),
|
|
1738
|
-
|
|
1738
|
+
_(n($), {
|
|
1739
1739
|
class: W(["x-mask-switch-bar__right", { "is-collasped": e.collasped }]),
|
|
1740
1740
|
flex: "",
|
|
1741
1741
|
align: "center",
|
|
1742
1742
|
justify: "center"
|
|
1743
1743
|
}, {
|
|
1744
1744
|
default: p(() => [
|
|
1745
|
-
!o.value && !e.collasped ? (
|
|
1745
|
+
!o.value && !e.collasped ? (u(), m(n(J), {
|
|
1746
1746
|
key: 0,
|
|
1747
1747
|
icon: n(Oe),
|
|
1748
1748
|
mode: "icon",
|
|
@@ -1751,18 +1751,18 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1751
1751
|
circle: "",
|
|
1752
1752
|
onClick: l
|
|
1753
1753
|
}, null, 8, ["icon"])) : v("", !0),
|
|
1754
|
-
e.collasped ? (
|
|
1754
|
+
e.collasped ? (u(), m(n(J), {
|
|
1755
1755
|
key: 1,
|
|
1756
|
-
icon: n(
|
|
1756
|
+
icon: n(_o),
|
|
1757
1757
|
mode: "icon",
|
|
1758
1758
|
size: "default",
|
|
1759
1759
|
background: "hover",
|
|
1760
1760
|
onClick: r,
|
|
1761
1761
|
circle: ""
|
|
1762
1762
|
}, null, 8, ["icon"])) : v("", !0),
|
|
1763
|
-
e.collasped ? v("", !0) : (
|
|
1763
|
+
e.collasped ? v("", !0) : (u(), m(n(J), {
|
|
1764
1764
|
key: 2,
|
|
1765
|
-
icon: n(
|
|
1765
|
+
icon: n(ko),
|
|
1766
1766
|
mode: "icon",
|
|
1767
1767
|
size: "default",
|
|
1768
1768
|
background: "hover",
|
|
@@ -1776,7 +1776,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1776
1776
|
_: 1
|
|
1777
1777
|
}));
|
|
1778
1778
|
}
|
|
1779
|
-
}),
|
|
1779
|
+
}), In = ["src"], An = { key: 0 }, Vn = /* @__PURE__ */ T({
|
|
1780
1780
|
__name: "Brand",
|
|
1781
1781
|
props: {
|
|
1782
1782
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -1785,15 +1785,15 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1785
1785
|
url: {}
|
|
1786
1786
|
},
|
|
1787
1787
|
setup(a) {
|
|
1788
|
-
const t = a, e =
|
|
1788
|
+
const t = a, e = $e(), o = () => {
|
|
1789
1789
|
t.url && e.push(t.url);
|
|
1790
1790
|
};
|
|
1791
|
-
return (s, i) => (
|
|
1791
|
+
return (s, i) => (u(), m(n($), {
|
|
1792
1792
|
class: W(["x-mask-brand", { "is-collapsed": t.collapsed }]),
|
|
1793
1793
|
align: "center"
|
|
1794
1794
|
}, {
|
|
1795
1795
|
default: p(() => [
|
|
1796
|
-
|
|
1796
|
+
_(n($), {
|
|
1797
1797
|
class: "x-mask-brand__logo",
|
|
1798
1798
|
flex: "",
|
|
1799
1799
|
justify: "center",
|
|
@@ -1801,23 +1801,23 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1801
1801
|
onClick: o
|
|
1802
1802
|
}, {
|
|
1803
1803
|
default: p(() => [
|
|
1804
|
-
|
|
1805
|
-
t.logo ? (
|
|
1804
|
+
w(s.$slots, "logo", {}, () => [
|
|
1805
|
+
t.logo ? (u(), I("img", {
|
|
1806
1806
|
key: 0,
|
|
1807
1807
|
src: t.logo
|
|
1808
|
-
}, null, 8,
|
|
1808
|
+
}, null, 8, In)) : v("", !0)
|
|
1809
1809
|
])
|
|
1810
1810
|
]),
|
|
1811
1811
|
_: 3
|
|
1812
1812
|
}),
|
|
1813
|
-
|
|
1813
|
+
_(n($), {
|
|
1814
1814
|
class: "x-mask-brand__title",
|
|
1815
1815
|
flex: "",
|
|
1816
1816
|
align: "center"
|
|
1817
1817
|
}, {
|
|
1818
1818
|
default: p(() => [
|
|
1819
|
-
t.title ? (
|
|
1820
|
-
|
|
1819
|
+
t.title ? (u(), I("span", An, [
|
|
1820
|
+
w(s.$slots, "title", {}, () => [
|
|
1821
1821
|
N(j(t.title), 1)
|
|
1822
1822
|
])
|
|
1823
1823
|
])) : v("", !0)
|
|
@@ -1828,7 +1828,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1828
1828
|
_: 3
|
|
1829
1829
|
}, 8, ["class"]));
|
|
1830
1830
|
}
|
|
1831
|
-
}), ke = "__favorites__", we = "__search__",
|
|
1831
|
+
}), ke = "__favorites__", we = "__search__", Dn = /* @__PURE__ */ T({
|
|
1832
1832
|
__name: "Menu",
|
|
1833
1833
|
props: {
|
|
1834
1834
|
collapse: { type: Boolean, default: !1 },
|
|
@@ -1845,7 +1845,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1845
1845
|
{
|
|
1846
1846
|
id: ke,
|
|
1847
1847
|
title: "收藏",
|
|
1848
|
-
icon:
|
|
1848
|
+
icon: yt,
|
|
1849
1849
|
children: e.favorites?.length ? e.favorites : [
|
|
1850
1850
|
{
|
|
1851
1851
|
id: ke + "empty",
|
|
@@ -1870,18 +1870,18 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1870
1870
|
]
|
|
1871
1871
|
}
|
|
1872
1872
|
];
|
|
1873
|
-
}),
|
|
1873
|
+
}), c = (r) => {
|
|
1874
1874
|
t("select", r);
|
|
1875
1875
|
};
|
|
1876
|
-
return (r, d) => (
|
|
1877
|
-
K(
|
|
1876
|
+
return (r, d) => (u(), I(Q, null, [
|
|
1877
|
+
K(_(n($), {
|
|
1878
1878
|
class: "x-mask-menu",
|
|
1879
1879
|
grow: "",
|
|
1880
1880
|
flex: !1,
|
|
1881
1881
|
overflow: "auto"
|
|
1882
1882
|
}, {
|
|
1883
1883
|
default: p(() => [
|
|
1884
|
-
K(
|
|
1884
|
+
K(_(n(ee), {
|
|
1885
1885
|
subMenu: {
|
|
1886
1886
|
popperClass: "x-mask-menu-popper",
|
|
1887
1887
|
teleported: !0,
|
|
@@ -1893,11 +1893,11 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1893
1893
|
collapse: !0,
|
|
1894
1894
|
"collapse-transition": !1,
|
|
1895
1895
|
"default-active": s.value,
|
|
1896
|
-
onSelect:
|
|
1896
|
+
onSelect: c
|
|
1897
1897
|
}, null, 8, ["data", "default-icon", "default-active"]), [
|
|
1898
1898
|
[Y, e.collapse]
|
|
1899
1899
|
]),
|
|
1900
|
-
K(
|
|
1900
|
+
K(_(n(ee), {
|
|
1901
1901
|
subMenu: {
|
|
1902
1902
|
popperClass: "x-mask-menu-popper",
|
|
1903
1903
|
teleported: !0
|
|
@@ -1907,11 +1907,11 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1907
1907
|
collapse: !1,
|
|
1908
1908
|
"collapse-transition": !1,
|
|
1909
1909
|
"default-active": s.value,
|
|
1910
|
-
onSelect:
|
|
1910
|
+
onSelect: c
|
|
1911
1911
|
}, null, 8, ["data", "default-icon", "default-active"]), [
|
|
1912
1912
|
[Y, !e.collapse]
|
|
1913
1913
|
]),
|
|
1914
|
-
o.value.length ? v("", !0) : (
|
|
1914
|
+
o.value.length ? v("", !0) : (u(), m(n(Yt), {
|
|
1915
1915
|
key: 0,
|
|
1916
1916
|
description: "暂无菜单数据"
|
|
1917
1917
|
}))
|
|
@@ -1920,14 +1920,14 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1920
1920
|
}, 512), [
|
|
1921
1921
|
[Y, !e.favorite && !e.keyword]
|
|
1922
1922
|
]),
|
|
1923
|
-
K(
|
|
1923
|
+
K(_(n($), {
|
|
1924
1924
|
class: "x-mask-menu",
|
|
1925
1925
|
grow: "",
|
|
1926
1926
|
flex: !1,
|
|
1927
1927
|
overflow: "auto"
|
|
1928
1928
|
}, {
|
|
1929
1929
|
default: p(() => [
|
|
1930
|
-
K(
|
|
1930
|
+
K(_(n(ee), {
|
|
1931
1931
|
class: "x-mask-menu__favorites",
|
|
1932
1932
|
subMenu: {
|
|
1933
1933
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1941,11 +1941,11 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1941
1941
|
"collapse-transition": !1,
|
|
1942
1942
|
"default-active": s.value,
|
|
1943
1943
|
"default-openeds": [ke],
|
|
1944
|
-
onSelect:
|
|
1944
|
+
onSelect: c
|
|
1945
1945
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1946
1946
|
[Y, e.collapse]
|
|
1947
1947
|
]),
|
|
1948
|
-
K(
|
|
1948
|
+
K(_(n(ee), {
|
|
1949
1949
|
class: "x-mask-menu__favorites",
|
|
1950
1950
|
subMenu: {
|
|
1951
1951
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1959,7 +1959,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1959
1959
|
"collapse-transition": !1,
|
|
1960
1960
|
"default-active": s.value,
|
|
1961
1961
|
"default-openeds": [ke],
|
|
1962
|
-
onSelect:
|
|
1962
|
+
onSelect: c
|
|
1963
1963
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1964
1964
|
[Y, !e.collapse]
|
|
1965
1965
|
])
|
|
@@ -1968,7 +1968,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1968
1968
|
}, 512), [
|
|
1969
1969
|
[Y, e.favorite && !e.keyword]
|
|
1970
1970
|
]),
|
|
1971
|
-
e.keyword ? K((
|
|
1971
|
+
e.keyword ? K((u(), m(n($), {
|
|
1972
1972
|
key: 0,
|
|
1973
1973
|
class: "x-mask-menu",
|
|
1974
1974
|
grow: "",
|
|
@@ -1976,7 +1976,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1976
1976
|
overflow: "auto"
|
|
1977
1977
|
}, {
|
|
1978
1978
|
default: p(() => [
|
|
1979
|
-
K(
|
|
1979
|
+
K(_(n(ee), {
|
|
1980
1980
|
class: "x-mask-menu__search",
|
|
1981
1981
|
subMenu: {
|
|
1982
1982
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1990,11 +1990,11 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1990
1990
|
"collapse-transition": !1,
|
|
1991
1991
|
"default-active": s.value,
|
|
1992
1992
|
"default-openeds": [we],
|
|
1993
|
-
onSelect:
|
|
1993
|
+
onSelect: c
|
|
1994
1994
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1995
1995
|
[Y, e.collapse]
|
|
1996
1996
|
]),
|
|
1997
|
-
K(
|
|
1997
|
+
K(_(n(ee), {
|
|
1998
1998
|
class: "x-mask-menu__search",
|
|
1999
1999
|
subMenu: {
|
|
2000
2000
|
popperClass: "x-mask-menu-popper",
|
|
@@ -2008,7 +2008,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2008
2008
|
"collapse-transition": !1,
|
|
2009
2009
|
"default-active": s.value,
|
|
2010
2010
|
"default-openeds": [we],
|
|
2011
|
-
onSelect:
|
|
2011
|
+
onSelect: c
|
|
2012
2012
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
2013
2013
|
[Y, !e.collapse]
|
|
2014
2014
|
])
|
|
@@ -2019,7 +2019,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2019
2019
|
]) : v("", !0)
|
|
2020
2020
|
], 64));
|
|
2021
2021
|
}
|
|
2022
|
-
}),
|
|
2022
|
+
}), Pn = { class: "x-mask-tabs__trigger" }, Rn = { key: 1 }, Fn = ["onDragstart", "onDragend"], On = { key: 1 }, jn = /* @__PURE__ */ T({
|
|
2023
2023
|
__name: "Tabs",
|
|
2024
2024
|
props: {
|
|
2025
2025
|
tabs: {},
|
|
@@ -2036,14 +2036,14 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2036
2036
|
);
|
|
2037
2037
|
return [
|
|
2038
2038
|
{
|
|
2039
|
-
icon:
|
|
2039
|
+
icon: wo,
|
|
2040
2040
|
label: "刷新",
|
|
2041
2041
|
name: "refresh",
|
|
2042
2042
|
value: d
|
|
2043
2043
|
},
|
|
2044
2044
|
"|",
|
|
2045
2045
|
{
|
|
2046
|
-
icon: f ?
|
|
2046
|
+
icon: f ? mt : yt,
|
|
2047
2047
|
label: "收藏",
|
|
2048
2048
|
name: "favorite",
|
|
2049
2049
|
value: d.menu,
|
|
@@ -2051,7 +2051,7 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2051
2051
|
},
|
|
2052
2052
|
"|",
|
|
2053
2053
|
{
|
|
2054
|
-
icon:
|
|
2054
|
+
icon: xo,
|
|
2055
2055
|
label: "弹窗",
|
|
2056
2056
|
name: "dialog",
|
|
2057
2057
|
value: d
|
|
@@ -2080,12 +2080,12 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2080
2080
|
t("dialog", d.value);
|
|
2081
2081
|
break;
|
|
2082
2082
|
}
|
|
2083
|
-
},
|
|
2083
|
+
}, c = (d, f) => {
|
|
2084
2084
|
f.dataTransfer && (f.dataTransfer.setData("tab", d.id), f.target && f.target.classList.add("is-dagging"));
|
|
2085
2085
|
}, r = (d, f) => {
|
|
2086
2086
|
f.target && f.target.classList.remove("is-dagging");
|
|
2087
2087
|
};
|
|
2088
|
-
return (d, f) => (
|
|
2088
|
+
return (d, f) => (u(), m(n($), {
|
|
2089
2089
|
ref: "tabsRef",
|
|
2090
2090
|
class: "x-mask-tabs",
|
|
2091
2091
|
height: "100%",
|
|
@@ -2095,33 +2095,33 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2095
2095
|
direction: "column"
|
|
2096
2096
|
}, {
|
|
2097
2097
|
default: p(() => [
|
|
2098
|
-
|
|
2098
|
+
_(n(qt), {
|
|
2099
2099
|
type: "card",
|
|
2100
2100
|
"model-value": e.value,
|
|
2101
2101
|
onTabRemove: i,
|
|
2102
2102
|
onTabClick: s
|
|
2103
2103
|
}, {
|
|
2104
2104
|
default: p(() => [
|
|
2105
|
-
e.home ? (
|
|
2105
|
+
e.home ? (u(), m(n(qe), {
|
|
2106
2106
|
key: 0,
|
|
2107
2107
|
name: e.home.id
|
|
2108
2108
|
}, {
|
|
2109
2109
|
label: p(() => [
|
|
2110
|
-
|
|
2111
|
-
e.home.icon ? (
|
|
2112
|
-
e.home.title ? (
|
|
2110
|
+
R("div", Pn, [
|
|
2111
|
+
e.home.icon ? (u(), m(L(n(Me)(e.home.icon)), { key: 0 })) : v("", !0),
|
|
2112
|
+
e.home.title ? (u(), I("span", Rn, j(e.home.title), 1)) : v("", !0)
|
|
2113
2113
|
])
|
|
2114
2114
|
]),
|
|
2115
2115
|
_: 1
|
|
2116
2116
|
}, 8, ["name"])) : v("", !0),
|
|
2117
|
-
(
|
|
2117
|
+
(u(!0), I(Q, null, ie(e.tabs, (g) => (u(), m(n(qe), {
|
|
2118
2118
|
key: g.id,
|
|
2119
2119
|
name: g.id,
|
|
2120
2120
|
lazy: "",
|
|
2121
2121
|
closable: ""
|
|
2122
2122
|
}, {
|
|
2123
2123
|
label: p(() => [
|
|
2124
|
-
|
|
2124
|
+
_(n(pt), {
|
|
2125
2125
|
"open-delay": 500,
|
|
2126
2126
|
placement: "bottom",
|
|
2127
2127
|
trigger: "hover",
|
|
@@ -2129,18 +2129,18 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2129
2129
|
disabled: g.id !== e.value
|
|
2130
2130
|
}, {
|
|
2131
2131
|
reference: p(() => [
|
|
2132
|
-
|
|
2132
|
+
R("div", {
|
|
2133
2133
|
class: "x-mask-tabs__trigger",
|
|
2134
2134
|
draggable: "true",
|
|
2135
|
-
onDragstart: (S) =>
|
|
2135
|
+
onDragstart: (S) => c(g, S),
|
|
2136
2136
|
onDragend: (S) => r(g, S)
|
|
2137
2137
|
}, [
|
|
2138
|
-
g.icon ? (
|
|
2139
|
-
g.title ? (
|
|
2140
|
-
], 40,
|
|
2138
|
+
g.icon ? (u(), m(L(n(Me)(g.icon)), { key: 0 })) : v("", !0),
|
|
2139
|
+
g.title ? (u(), I("span", On, j(g.title), 1)) : v("", !0)
|
|
2140
|
+
], 40, Fn)
|
|
2141
2141
|
]),
|
|
2142
2142
|
default: p(() => [
|
|
2143
|
-
|
|
2143
|
+
_(n(Ke), {
|
|
2144
2144
|
items: o(g),
|
|
2145
2145
|
mode: "text",
|
|
2146
2146
|
size: "small",
|
|
@@ -2160,20 +2160,20 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2160
2160
|
_: 1
|
|
2161
2161
|
}, 512));
|
|
2162
2162
|
}
|
|
2163
|
-
}),
|
|
2163
|
+
}), Nn = /* @__PURE__ */ T({
|
|
2164
2164
|
__name: "ThemeSwitch",
|
|
2165
2165
|
setup(a) {
|
|
2166
|
-
const t =
|
|
2167
|
-
return (e, o) => (
|
|
2166
|
+
const t = Ro();
|
|
2167
|
+
return (e, o) => (u(), m(n(Xe), {
|
|
2168
2168
|
class: "x-mask-theme-switch",
|
|
2169
2169
|
modelValue: n(t),
|
|
2170
2170
|
"onUpdate:modelValue": o[0] || (o[0] = (s) => xe(t) ? t.value = s : null),
|
|
2171
2171
|
size: "default",
|
|
2172
|
-
"active-action-icon": n(
|
|
2173
|
-
"inactive-action-icon": n(
|
|
2172
|
+
"active-action-icon": n(zo),
|
|
2173
|
+
"inactive-action-icon": n(So)
|
|
2174
2174
|
}, null, 8, ["modelValue", "active-action-icon", "inactive-action-icon"]));
|
|
2175
2175
|
}
|
|
2176
|
-
}),
|
|
2176
|
+
}), Xn = { class: "x-mask-toolbar__menu-item" }, Un = /* @__PURE__ */ T({
|
|
2177
2177
|
__name: "Toolbar",
|
|
2178
2178
|
props: {
|
|
2179
2179
|
tabs: { default: () => [] },
|
|
@@ -2222,16 +2222,16 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2222
2222
|
}
|
|
2223
2223
|
}, l = (r) => {
|
|
2224
2224
|
t("actionClick", r);
|
|
2225
|
-
},
|
|
2225
|
+
}, c = (r, d) => {
|
|
2226
2226
|
t("actionCommand", r, d);
|
|
2227
2227
|
};
|
|
2228
|
-
return (r, d) => (
|
|
2228
|
+
return (r, d) => (u(), m(n($), {
|
|
2229
2229
|
class: "x-mask-toolbar",
|
|
2230
2230
|
align: "center"
|
|
2231
2231
|
}, {
|
|
2232
2232
|
default: p(() => [
|
|
2233
|
-
|
|
2234
|
-
icon: n(
|
|
2233
|
+
_(n(J), {
|
|
2234
|
+
icon: n(Co),
|
|
2235
2235
|
menus: o.value,
|
|
2236
2236
|
dropdown: { size: "small" },
|
|
2237
2237
|
mode: "icon",
|
|
@@ -2240,19 +2240,19 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2240
2240
|
onCommand: i
|
|
2241
2241
|
}, {
|
|
2242
2242
|
item: p(({ item: f }) => [
|
|
2243
|
-
|
|
2243
|
+
R("span", Xn, [
|
|
2244
2244
|
N(j(f.label) + " ", 1),
|
|
2245
|
-
["other", "all"].includes(f.command) ? v("", !0) : (
|
|
2245
|
+
["other", "all"].includes(f.command) ? v("", !0) : (u(), m(n(te), {
|
|
2246
2246
|
key: 0,
|
|
2247
|
-
onClick:
|
|
2248
|
-
icon: n(
|
|
2247
|
+
onClick: Ot((g) => s(f), ["stop"]),
|
|
2248
|
+
icon: n(gt)
|
|
2249
2249
|
}, null, 8, ["onClick", "icon"]))
|
|
2250
2250
|
])
|
|
2251
2251
|
]),
|
|
2252
2252
|
_: 1
|
|
2253
2253
|
}, 8, ["icon", "menus"]),
|
|
2254
|
-
|
|
2255
|
-
e.actions ? (
|
|
2254
|
+
_(n(ye), { direction: "vertical" }),
|
|
2255
|
+
e.actions ? (u(), m(n(Ke), {
|
|
2256
2256
|
key: 0,
|
|
2257
2257
|
circle: "",
|
|
2258
2258
|
mode: "icon",
|
|
@@ -2260,50 +2260,50 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2260
2260
|
background: "hover",
|
|
2261
2261
|
items: r.actions,
|
|
2262
2262
|
onClick: l,
|
|
2263
|
-
onCommand:
|
|
2263
|
+
onCommand: c
|
|
2264
2264
|
}, null, 8, ["items"])) : v("", !0),
|
|
2265
|
-
e.actions ? (
|
|
2265
|
+
e.actions ? (u(), m(n(ye), {
|
|
2266
2266
|
key: 1,
|
|
2267
2267
|
direction: "vertical"
|
|
2268
2268
|
})) : v("", !0),
|
|
2269
|
-
e.theme ? (
|
|
2270
|
-
e.theme ? (
|
|
2269
|
+
e.theme ? (u(), m(Nn, { key: 2 })) : v("", !0),
|
|
2270
|
+
e.theme ? (u(), m(n(ye), {
|
|
2271
2271
|
key: 3,
|
|
2272
2272
|
direction: "vertical"
|
|
2273
2273
|
})) : v("", !0),
|
|
2274
|
-
|
|
2274
|
+
w(r.$slots, "default")
|
|
2275
2275
|
]),
|
|
2276
2276
|
_: 3
|
|
2277
2277
|
}));
|
|
2278
2278
|
}
|
|
2279
|
-
}),
|
|
2279
|
+
}), Hn = /* @__PURE__ */ T({
|
|
2280
2280
|
__name: "Avatar",
|
|
2281
2281
|
props: {
|
|
2282
2282
|
avatar: {}
|
|
2283
2283
|
},
|
|
2284
2284
|
setup(a) {
|
|
2285
2285
|
const t = a;
|
|
2286
|
-
return (e, o) => (
|
|
2286
|
+
return (e, o) => (u(), m(n(pt), {
|
|
2287
2287
|
width: 200,
|
|
2288
2288
|
"popper-class": "x-mask-avatar__popper",
|
|
2289
2289
|
disabled: !e.$slots.default
|
|
2290
2290
|
}, {
|
|
2291
2291
|
reference: p(() => [
|
|
2292
|
-
|
|
2292
|
+
_(n(eo), {
|
|
2293
2293
|
class: "x-mask-avatar",
|
|
2294
2294
|
shape: "circle",
|
|
2295
|
-
icon: n(
|
|
2295
|
+
icon: n(To),
|
|
2296
2296
|
src: t.avatar,
|
|
2297
2297
|
size: 26
|
|
2298
2298
|
}, null, 8, ["icon", "src"])
|
|
2299
2299
|
]),
|
|
2300
2300
|
default: p(() => [
|
|
2301
|
-
e.$slots.default ?
|
|
2301
|
+
e.$slots.default ? w(e.$slots, "default", { key: 0 }) : v("", !0)
|
|
2302
2302
|
]),
|
|
2303
2303
|
_: 3
|
|
2304
2304
|
}, 8, ["disabled"]));
|
|
2305
2305
|
}
|
|
2306
|
-
}),
|
|
2306
|
+
}), lt = /* @__PURE__ */ T({
|
|
2307
2307
|
__name: "Content",
|
|
2308
2308
|
props: {
|
|
2309
2309
|
createView: { type: Function },
|
|
@@ -2311,20 +2311,20 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2311
2311
|
},
|
|
2312
2312
|
setup(a) {
|
|
2313
2313
|
const t = a;
|
|
2314
|
-
return (e, o) => (
|
|
2314
|
+
return (e, o) => (u(), m(n($), {
|
|
2315
2315
|
class: "x-mask__content",
|
|
2316
2316
|
flex: !1,
|
|
2317
2317
|
grow: "",
|
|
2318
2318
|
padding: !1
|
|
2319
2319
|
}, {
|
|
2320
2320
|
default: p(() => [
|
|
2321
|
-
|
|
2322
|
-
|
|
2321
|
+
w(e.$slots, "default"),
|
|
2322
|
+
_(n(ht), null, {
|
|
2323
2323
|
default: p(({ Component: s, route: i }) => [
|
|
2324
|
-
(
|
|
2324
|
+
(u(), m(jt, {
|
|
2325
2325
|
exclude: t.exclude
|
|
2326
2326
|
}, [
|
|
2327
|
-
s ? (
|
|
2327
|
+
s ? (u(), m(L(t.createView(s, i)), {
|
|
2328
2328
|
key: i.fullPath
|
|
2329
2329
|
})) : v("", !0)
|
|
2330
2330
|
], 1032, ["exclude"]))
|
|
@@ -2335,13 +2335,13 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2335
2335
|
_: 3
|
|
2336
2336
|
}));
|
|
2337
2337
|
}
|
|
2338
|
-
}),
|
|
2338
|
+
}), Wn = 140, Ln = {
|
|
2339
2339
|
/**
|
|
2340
2340
|
* 系统logo
|
|
2341
2341
|
*/
|
|
2342
2342
|
logo: {
|
|
2343
2343
|
type: String,
|
|
2344
|
-
default:
|
|
2344
|
+
default: kt
|
|
2345
2345
|
},
|
|
2346
2346
|
/**
|
|
2347
2347
|
* 系统标题
|
|
@@ -2418,8 +2418,8 @@ const Tn = /* @__PURE__ */ O("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2418
2418
|
removeFavorite: {
|
|
2419
2419
|
type: Function
|
|
2420
2420
|
}
|
|
2421
|
-
},
|
|
2422
|
-
function
|
|
2421
|
+
}, Tt = Symbol(), Mt = Symbol();
|
|
2422
|
+
function Kn(a) {
|
|
2423
2423
|
const t = P(!1), e = P(""), o = P(!1);
|
|
2424
2424
|
return {
|
|
2425
2425
|
collapsed: t,
|
|
@@ -2427,12 +2427,12 @@ function Wn(a) {
|
|
|
2427
2427
|
favorite: o
|
|
2428
2428
|
};
|
|
2429
2429
|
}
|
|
2430
|
-
function
|
|
2431
|
-
const t =
|
|
2430
|
+
function Qn(a) {
|
|
2431
|
+
const t = bt();
|
|
2432
2432
|
return h(() => {
|
|
2433
2433
|
const e = a.home;
|
|
2434
2434
|
return Object.assign(
|
|
2435
|
-
{ id: t, url: "/", name: "MaskHome", icon:
|
|
2435
|
+
{ id: t, url: "/", name: "MaskHome", icon: Mo, closable: !1 },
|
|
2436
2436
|
typeof e == "string" ? { url: e } : e || {}
|
|
2437
2437
|
);
|
|
2438
2438
|
});
|
|
@@ -2443,92 +2443,92 @@ function Et(a, t) {
|
|
|
2443
2443
|
o = t ? t(o) : o, o.children ? e = e.concat(Et(o.children, t)) : e.push(o);
|
|
2444
2444
|
}), e;
|
|
2445
2445
|
}
|
|
2446
|
-
function
|
|
2447
|
-
const e =
|
|
2448
|
-
const
|
|
2449
|
-
if (!
|
|
2450
|
-
console.warn("找不到菜单",
|
|
2446
|
+
function Zn(a, t) {
|
|
2447
|
+
const e = $e(), o = Ge([]), s = Ge([]), i = h(() => Et(o.value, a.menuAdapter)), l = h(() => Fo(i.value, "id")), c = P(null), r = (x) => {
|
|
2448
|
+
const k = typeof x == "object" ? x.id : x, M = l.value.get(k);
|
|
2449
|
+
if (!M) {
|
|
2450
|
+
console.warn("找不到菜单", x);
|
|
2451
2451
|
return;
|
|
2452
2452
|
}
|
|
2453
|
-
const { type: V = "route", url: y, title:
|
|
2453
|
+
const { type: V = "route", url: y, title: E, icon: b } = M;
|
|
2454
2454
|
if (!y) {
|
|
2455
|
-
|
|
2455
|
+
c.value = M, t("select", M);
|
|
2456
2456
|
return;
|
|
2457
2457
|
}
|
|
2458
2458
|
if (V === "route") {
|
|
2459
|
-
|
|
2459
|
+
Oo(y) || y.startsWith("//") ? window.open(y) : (c.value = M, e.push(y).catch((D) => D));
|
|
2460
2460
|
return;
|
|
2461
2461
|
}
|
|
2462
2462
|
if (V === "window") {
|
|
2463
2463
|
window.open(y);
|
|
2464
2464
|
return;
|
|
2465
2465
|
}
|
|
2466
|
-
V === "dialog" &&
|
|
2466
|
+
V === "dialog" && Ze({
|
|
2467
2467
|
resizable: !0,
|
|
2468
2468
|
bodyPadding: !1,
|
|
2469
2469
|
width: "80%",
|
|
2470
2470
|
height: "80%",
|
|
2471
|
-
title:
|
|
2471
|
+
title: E,
|
|
2472
2472
|
icon: b,
|
|
2473
2473
|
src: y
|
|
2474
2474
|
});
|
|
2475
2475
|
}, d = async () => {
|
|
2476
2476
|
o.value = typeof a.menus == "function" ? await a.menus() || [] : a.menus ?? [], s.value = typeof a.favorites == "function" ? await a.favorites() || [] : a.favorites ?? [];
|
|
2477
|
-
}, f = (
|
|
2478
|
-
s.value = [
|
|
2479
|
-
}, g = (
|
|
2480
|
-
s.value = s.value.filter((
|
|
2481
|
-
}, S = (
|
|
2482
|
-
S(
|
|
2477
|
+
}, f = (x) => {
|
|
2478
|
+
s.value = [x, ...s.value], a.addFavorite && a.addFavorite(x);
|
|
2479
|
+
}, g = (x) => {
|
|
2480
|
+
s.value = s.value.filter((k) => k.id !== x.id), a.removeFavorite && a.removeFavorite(x);
|
|
2481
|
+
}, S = (x) => !!s.value.find((k) => k === x || k.id === x.id), A = (x) => {
|
|
2482
|
+
S(x) ? g(x) : f(x);
|
|
2483
2483
|
};
|
|
2484
|
-
return
|
|
2484
|
+
return ct(d), {
|
|
2485
2485
|
menus: o,
|
|
2486
2486
|
favorites: s,
|
|
2487
2487
|
flatMenus: i,
|
|
2488
|
-
active:
|
|
2488
|
+
active: c,
|
|
2489
2489
|
select: r,
|
|
2490
|
-
toggleFavorite:
|
|
2490
|
+
toggleFavorite: A
|
|
2491
2491
|
};
|
|
2492
2492
|
}
|
|
2493
|
-
function
|
|
2494
|
-
const i = Ue(), l =
|
|
2495
|
-
() => r.value.slice(0, g.value).filter((
|
|
2496
|
-
),
|
|
2497
|
-
l.push(
|
|
2498
|
-
}, b = (
|
|
2499
|
-
V.value =
|
|
2493
|
+
function Jn(a, t, e, o, s) {
|
|
2494
|
+
const i = Ue(), l = $e(), c = {}, r = P([]), d = P(), { width: f } = vt(d), g = h(() => Math.floor(f.value / Wn)), S = h(
|
|
2495
|
+
() => r.value.slice(0, g.value).filter((z) => !z.dialog)
|
|
2496
|
+
), A = h(() => r.value.slice(g.value)), x = (z) => e.value.find((C) => C.url === z), k = (z) => i.fullPath === z.url, M = (z) => s.value.id === z ? s.value : r.value.find((C) => C.id === z), V = P(""), y = h(() => M(V.value)), E = (z) => {
|
|
2497
|
+
l.push(z.url).catch((C) => C);
|
|
2498
|
+
}, b = (z) => {
|
|
2499
|
+
V.value = z.id, i.fullPath !== z.url && E(z);
|
|
2500
2500
|
}, D = () => {
|
|
2501
|
-
|
|
2502
|
-
},
|
|
2503
|
-
const C = r.value.find((B) => B.url ===
|
|
2504
|
-
C ? b(C) : (r.value.unshift(
|
|
2505
|
-
}, oe = async (
|
|
2506
|
-
const { url: C = i.fullPath, icon: B, title:
|
|
2501
|
+
E(s.value);
|
|
2502
|
+
}, F = (z) => {
|
|
2503
|
+
const C = r.value.find((B) => B.url === z.url || B.id === z.id);
|
|
2504
|
+
C ? b(C) : (r.value.unshift(z), b(z));
|
|
2505
|
+
}, oe = async (z) => {
|
|
2506
|
+
const { url: C = i.fullPath, icon: B, title: Ie = "新建标签页" } = z || {}, be = c[C], Ae = bt(), Ve = _t(C);
|
|
2507
2507
|
return {
|
|
2508
|
-
id:
|
|
2508
|
+
id: Ae,
|
|
2509
2509
|
name: Ve,
|
|
2510
2510
|
url: C,
|
|
2511
2511
|
icon: B,
|
|
2512
|
-
title:
|
|
2512
|
+
title: Ie,
|
|
2513
2513
|
closable: !0,
|
|
2514
|
-
menu:
|
|
2514
|
+
menu: z,
|
|
2515
2515
|
...be ? await be() : {}
|
|
2516
2516
|
};
|
|
2517
|
-
}, ne = async (
|
|
2517
|
+
}, ne = async (z) => {
|
|
2518
2518
|
if (await De.confirm("是否关闭页签", "提示", {
|
|
2519
2519
|
type: "warning"
|
|
2520
2520
|
}).catch((B) => !1)) {
|
|
2521
|
-
if (r.value = r.value.filter((B) => B.id !==
|
|
2521
|
+
if (r.value = r.value.filter((B) => B.id !== z.id), V.value === z.id) {
|
|
2522
2522
|
const B = r.value[0];
|
|
2523
|
-
|
|
2523
|
+
E(B || s.value);
|
|
2524
2524
|
}
|
|
2525
|
-
return
|
|
2525
|
+
return z;
|
|
2526
2526
|
}
|
|
2527
|
-
}, ae = (
|
|
2528
|
-
const C = r.value.findIndex((B) => B.id ===
|
|
2527
|
+
}, ae = (z) => {
|
|
2528
|
+
const C = r.value.findIndex((B) => B.id === z.id);
|
|
2529
2529
|
if (C >= 0) {
|
|
2530
2530
|
const B = r.value[C];
|
|
2531
|
-
r.value.splice(C, 1, Object.assign(B,
|
|
2531
|
+
r.value.splice(C, 1, Object.assign(B, z));
|
|
2532
2532
|
}
|
|
2533
2533
|
}, U = async () => {
|
|
2534
2534
|
if (!await De.confirm("是否关闭全部页签", "提示", {
|
|
@@ -2544,55 +2544,55 @@ function Qn(a, t, e, o, s) {
|
|
|
2544
2544
|
return;
|
|
2545
2545
|
const C = r.value.filter((B) => B.id !== V.value);
|
|
2546
2546
|
return r.value = r.value.filter((B) => B.id === V.value), C;
|
|
2547
|
-
}, re = (
|
|
2548
|
-
const C = r.value.filter((B) => B.id !==
|
|
2549
|
-
r.value = [
|
|
2550
|
-
},
|
|
2547
|
+
}, re = (z) => {
|
|
2548
|
+
const C = r.value.filter((B) => B.id !== z.id);
|
|
2549
|
+
r.value = [z, ...C], b(z);
|
|
2550
|
+
}, fe = async () => {
|
|
2551
2551
|
await ce();
|
|
2552
|
-
const
|
|
2553
|
-
if (
|
|
2552
|
+
const z = s.value.url === i.fullPath, C = x(i.fullPath);
|
|
2553
|
+
if (z)
|
|
2554
2554
|
V.value = s.value.id;
|
|
2555
2555
|
else {
|
|
2556
2556
|
const B = await oe(C);
|
|
2557
|
-
|
|
2557
|
+
F(B);
|
|
2558
2558
|
}
|
|
2559
2559
|
await ce(), o.value = C || null;
|
|
2560
2560
|
};
|
|
2561
|
-
return H(e,
|
|
2561
|
+
return H(e, fe), H(i, fe, { immediate: !0 }), he(Tt, c), {
|
|
2562
2562
|
tabRef: d,
|
|
2563
2563
|
tabs: r,
|
|
2564
2564
|
showTabs: S,
|
|
2565
2565
|
currentTab: y,
|
|
2566
|
-
changeTab:
|
|
2566
|
+
changeTab: E,
|
|
2567
2567
|
removeTab: ne,
|
|
2568
2568
|
updateTab: ae,
|
|
2569
|
-
addTab:
|
|
2569
|
+
addTab: F,
|
|
2570
2570
|
home: s,
|
|
2571
2571
|
tabValue: V,
|
|
2572
|
-
isCurrentTab:
|
|
2572
|
+
isCurrentTab: k,
|
|
2573
2573
|
activeHome: D,
|
|
2574
2574
|
activeTab: b,
|
|
2575
|
-
dropdownTabs:
|
|
2575
|
+
dropdownTabs: A,
|
|
2576
2576
|
removeAllTabs: U,
|
|
2577
2577
|
removeOtherTabs: Z,
|
|
2578
2578
|
moveToShow: re
|
|
2579
2579
|
};
|
|
2580
2580
|
}
|
|
2581
|
-
function
|
|
2582
|
-
const t = /* @__PURE__ */ new Map(), e = P([]), o = Ne({}), s = {}, { updateTab: i, isCurrentTab: l, activeHome:
|
|
2583
|
-
const b =
|
|
2581
|
+
function Gn(a) {
|
|
2582
|
+
const t = /* @__PURE__ */ new Map(), e = P([]), o = Ne({}), s = {}, { updateTab: i, isCurrentTab: l, activeHome: c, tabs: r } = a, d = (y, E) => {
|
|
2583
|
+
const b = E.fullPath;
|
|
2584
2584
|
if (t.has(b))
|
|
2585
2585
|
return t.get(b);
|
|
2586
2586
|
{
|
|
2587
|
-
const D =
|
|
2587
|
+
const D = _t(b), F = {
|
|
2588
2588
|
name: D,
|
|
2589
2589
|
setup() {
|
|
2590
2590
|
const oe = h(() => o[b] || document.body), ne = h(() => !o[b]), ae = h(() => !e.value.includes(D));
|
|
2591
2591
|
return he(
|
|
2592
|
-
|
|
2593
|
-
|
|
2592
|
+
Bo,
|
|
2593
|
+
ze({ ...E })
|
|
2594
2594
|
), () => ae.value ? q(
|
|
2595
|
-
|
|
2595
|
+
ut,
|
|
2596
2596
|
{
|
|
2597
2597
|
to: oe.value,
|
|
2598
2598
|
disabled: ne.value
|
|
@@ -2601,15 +2601,15 @@ function Zn(a) {
|
|
|
2601
2601
|
) : null;
|
|
2602
2602
|
}
|
|
2603
2603
|
};
|
|
2604
|
-
return t.set(b,
|
|
2604
|
+
return t.set(b, F), F;
|
|
2605
2605
|
}
|
|
2606
2606
|
}, f = (y) => {
|
|
2607
2607
|
y.dialog = void 0, delete o[y.url];
|
|
2608
|
-
const
|
|
2609
|
-
|
|
2608
|
+
const E = s[y.id];
|
|
2609
|
+
E && (E.destroy(), delete s[y.id], i(y));
|
|
2610
2610
|
}, g = (y = []) => {
|
|
2611
|
-
y.forEach((
|
|
2612
|
-
f(
|
|
2611
|
+
y.forEach((E) => {
|
|
2612
|
+
f(E);
|
|
2613
2613
|
});
|
|
2614
2614
|
}, S = async (y) => {
|
|
2615
2615
|
y.dialog = {
|
|
@@ -2621,7 +2621,7 @@ function Zn(a) {
|
|
|
2621
2621
|
f(y), r.value = r.value.filter((b) => b.id !== y.id);
|
|
2622
2622
|
}
|
|
2623
2623
|
}, i(y);
|
|
2624
|
-
const
|
|
2624
|
+
const E = Ze({
|
|
2625
2625
|
title: y.title,
|
|
2626
2626
|
icon: y.icon,
|
|
2627
2627
|
modal: !1,
|
|
@@ -2632,94 +2632,94 @@ function Zn(a) {
|
|
|
2632
2632
|
o[y.url] = b.refs.panelRef?.bodyRef?.$el;
|
|
2633
2633
|
}
|
|
2634
2634
|
});
|
|
2635
|
-
return await ce(), l(y) &&
|
|
2636
|
-
},
|
|
2635
|
+
return await ce(), l(y) && c(), s[y.id] = E, E;
|
|
2636
|
+
}, A = async (y) => {
|
|
2637
2637
|
e.value = [y.name], await ce(), e.value = [];
|
|
2638
|
-
},
|
|
2639
|
-
e.value = y.map((
|
|
2640
|
-
},
|
|
2638
|
+
}, x = async (y) => {
|
|
2639
|
+
e.value = y.map((E) => E.name), await ce(), e.value = [];
|
|
2640
|
+
}, k = (y) => (y.preventDefault(), !1), M = (y) => {
|
|
2641
2641
|
if (y.dataTransfer) {
|
|
2642
|
-
const
|
|
2642
|
+
const E = y.dataTransfer.getData("tab"), b = r.value.find((D) => D.id === E);
|
|
2643
2643
|
if (b) {
|
|
2644
|
-
const { clientX: D, clientY:
|
|
2644
|
+
const { clientX: D, clientY: F } = y;
|
|
2645
2645
|
b.dialog = {
|
|
2646
2646
|
left: D,
|
|
2647
|
-
top:
|
|
2647
|
+
top: F
|
|
2648
2648
|
}, S(b);
|
|
2649
2649
|
}
|
|
2650
2650
|
}
|
|
2651
2651
|
}, V = (y) => !!o[y];
|
|
2652
|
-
return Te(document, "dragover",
|
|
2652
|
+
return Te(document, "dragover", k), Te(document, "drop", M), {
|
|
2653
2653
|
createView: d,
|
|
2654
2654
|
openDialog: S,
|
|
2655
|
-
refresh:
|
|
2655
|
+
refresh: A,
|
|
2656
2656
|
exclude: e,
|
|
2657
|
-
cleanCache:
|
|
2657
|
+
cleanCache: x,
|
|
2658
2658
|
hasDialog: V,
|
|
2659
2659
|
closeDialog: f,
|
|
2660
2660
|
closeDialogs: g
|
|
2661
2661
|
};
|
|
2662
2662
|
}
|
|
2663
|
-
const
|
|
2663
|
+
const Yn = /* @__PURE__ */ T({
|
|
2664
2664
|
name: "XMask",
|
|
2665
2665
|
__name: "Mask",
|
|
2666
|
-
props:
|
|
2666
|
+
props: Ln,
|
|
2667
2667
|
emits: ["select", "actionClick", "actionCommand"],
|
|
2668
2668
|
setup(a, { emit: t }) {
|
|
2669
|
-
const e = a, o =
|
|
2670
|
-
tabRef:
|
|
2671
|
-
showTabs:
|
|
2672
|
-
currentTab:
|
|
2673
|
-
changeTab:
|
|
2669
|
+
const e = a, o = Qn(e), { collapsed: s, keyword: i, favorite: l } = Kn(), { menus: c, favorites: r, flatMenus: d, active: f, select: g, toggleFavorite: S } = Zn(e, t), {
|
|
2670
|
+
tabRef: A,
|
|
2671
|
+
showTabs: x,
|
|
2672
|
+
currentTab: k,
|
|
2673
|
+
changeTab: M,
|
|
2674
2674
|
removeTab: V,
|
|
2675
2675
|
tabs: y,
|
|
2676
|
-
updateTab:
|
|
2676
|
+
updateTab: E,
|
|
2677
2677
|
isCurrentTab: b,
|
|
2678
2678
|
activeHome: D,
|
|
2679
|
-
removeAllTabs:
|
|
2679
|
+
removeAllTabs: F,
|
|
2680
2680
|
removeOtherTabs: oe,
|
|
2681
2681
|
dropdownTabs: ne,
|
|
2682
2682
|
moveToShow: ae
|
|
2683
|
-
} =
|
|
2683
|
+
} = Jn(e, t, d, f, o), { createView: U, openDialog: Z, refresh: re, exclude: fe, cleanCache: z, closeDialogs: C } = Gn({
|
|
2684
2684
|
tabs: y,
|
|
2685
|
-
updateTab:
|
|
2685
|
+
updateTab: E,
|
|
2686
2686
|
isCurrentTab: b,
|
|
2687
2687
|
activeHome: D
|
|
2688
|
-
}), B = async (
|
|
2689
|
-
await V(
|
|
2690
|
-
},
|
|
2691
|
-
const
|
|
2692
|
-
|
|
2688
|
+
}), B = async (O) => {
|
|
2689
|
+
await V(O) && await z([O]);
|
|
2690
|
+
}, Ie = async () => {
|
|
2691
|
+
const O = await F();
|
|
2692
|
+
O && (C(O), await z(O));
|
|
2693
2693
|
}, be = async () => {
|
|
2694
|
-
const
|
|
2695
|
-
|
|
2696
|
-
},
|
|
2697
|
-
t("actionClick",
|
|
2698
|
-
}, Ve = (
|
|
2699
|
-
t("actionCommand",
|
|
2694
|
+
const O = await oe();
|
|
2695
|
+
O && (C(O), await z(O));
|
|
2696
|
+
}, Ae = (O) => {
|
|
2697
|
+
t("actionClick", O);
|
|
2698
|
+
}, Ve = (O, G) => {
|
|
2699
|
+
t("actionCommand", O, G);
|
|
2700
2700
|
};
|
|
2701
|
-
return he(
|
|
2701
|
+
return he(Mt, {
|
|
2702
2702
|
tabs: y,
|
|
2703
2703
|
flatMenus: d,
|
|
2704
2704
|
favorites: r,
|
|
2705
|
-
updateTab:
|
|
2705
|
+
updateTab: E,
|
|
2706
2706
|
active: f,
|
|
2707
|
-
currentTab:
|
|
2708
|
-
}), (
|
|
2707
|
+
currentTab: k
|
|
2708
|
+
}), (O, G) => (u(), m(n($), { class: "x-mask" }, {
|
|
2709
2709
|
default: p(() => [
|
|
2710
|
-
e.disabled ? (
|
|
2710
|
+
e.disabled ? (u(), m(lt, {
|
|
2711
2711
|
key: 1,
|
|
2712
2712
|
createView: n(U),
|
|
2713
|
-
exclude: n(
|
|
2713
|
+
exclude: n(fe)
|
|
2714
2714
|
}, {
|
|
2715
2715
|
default: p(() => [
|
|
2716
|
-
|
|
2716
|
+
O.$slots.default ? w(O.$slots, "default", { key: 0 }) : v("", !0)
|
|
2717
2717
|
]),
|
|
2718
2718
|
_: 3
|
|
2719
|
-
}, 8, ["createView", "exclude"])) : (
|
|
2720
|
-
|
|
2719
|
+
}, 8, ["createView", "exclude"])) : (u(), I(Q, { key: 0 }, [
|
|
2720
|
+
_(Bn, { collapsed: n(s) }, {
|
|
2721
2721
|
brand: p(() => [
|
|
2722
|
-
|
|
2722
|
+
_(Vn, {
|
|
2723
2723
|
logo: e.logo,
|
|
2724
2724
|
title: e.title,
|
|
2725
2725
|
url: n(o).url,
|
|
@@ -2727,28 +2727,28 @@ const Jn = /* @__PURE__ */ E({
|
|
|
2727
2727
|
}, null, 8, ["logo", "title", "url", "collapsed"])
|
|
2728
2728
|
]),
|
|
2729
2729
|
default: p(() => [
|
|
2730
|
-
|
|
2730
|
+
_($n, {
|
|
2731
2731
|
collasped: n(s),
|
|
2732
|
-
"onUpdate:collasped": G[0] || (G[0] = (
|
|
2732
|
+
"onUpdate:collasped": G[0] || (G[0] = (me) => xe(s) ? s.value = me : null),
|
|
2733
2733
|
favorite: n(l),
|
|
2734
|
-
"onUpdate:favorite": G[1] || (G[1] = (
|
|
2734
|
+
"onUpdate:favorite": G[1] || (G[1] = (me) => xe(l) ? l.value = me : null),
|
|
2735
2735
|
keyword: n(i),
|
|
2736
|
-
"onUpdate:keyword": G[2] || (G[2] = (
|
|
2736
|
+
"onUpdate:keyword": G[2] || (G[2] = (me) => xe(i) ? i.value = me : null)
|
|
2737
2737
|
}, null, 8, ["collasped", "favorite", "keyword"]),
|
|
2738
|
-
|
|
2738
|
+
_(Dn, {
|
|
2739
2739
|
collapse: n(s),
|
|
2740
2740
|
keyword: n(i),
|
|
2741
2741
|
favorite: n(l),
|
|
2742
2742
|
favorites: n(r),
|
|
2743
2743
|
flatMenus: n(d),
|
|
2744
|
-
menus: n(
|
|
2744
|
+
menus: n(c),
|
|
2745
2745
|
active: n(f),
|
|
2746
2746
|
onSelect: n(g)
|
|
2747
2747
|
}, null, 8, ["collapse", "keyword", "favorite", "favorites", "flatMenus", "menus", "active", "onSelect"])
|
|
2748
2748
|
]),
|
|
2749
2749
|
_: 1
|
|
2750
2750
|
}, 8, ["collapsed"]),
|
|
2751
|
-
|
|
2751
|
+
_(n($), {
|
|
2752
2752
|
class: "x-mask__main",
|
|
2753
2753
|
grow: "",
|
|
2754
2754
|
shrink: "",
|
|
@@ -2756,44 +2756,44 @@ const Jn = /* @__PURE__ */ E({
|
|
|
2756
2756
|
direction: "column"
|
|
2757
2757
|
}, {
|
|
2758
2758
|
default: p(() => [
|
|
2759
|
-
|
|
2759
|
+
_(n($), {
|
|
2760
2760
|
class: "x-mask-topbar",
|
|
2761
2761
|
justify: "space-between",
|
|
2762
2762
|
align: "center"
|
|
2763
2763
|
}, {
|
|
2764
2764
|
default: p(() => [
|
|
2765
|
-
|
|
2765
|
+
_(jn, {
|
|
2766
2766
|
ref_key: "tabRef",
|
|
2767
|
-
ref:
|
|
2767
|
+
ref: A,
|
|
2768
2768
|
favorites: n(r),
|
|
2769
|
-
tabs: n(
|
|
2769
|
+
tabs: n(x),
|
|
2770
2770
|
home: n(o),
|
|
2771
|
-
value: n(
|
|
2772
|
-
onClick: n(
|
|
2771
|
+
value: n(k)?.id,
|
|
2772
|
+
onClick: n(M),
|
|
2773
2773
|
onToggleFavorite: n(S),
|
|
2774
2774
|
onRemove: B,
|
|
2775
2775
|
onDialog: n(Z),
|
|
2776
2776
|
onRefresh: n(re)
|
|
2777
2777
|
}, null, 8, ["favorites", "tabs", "home", "value", "onClick", "onToggleFavorite", "onDialog", "onRefresh"]),
|
|
2778
|
-
|
|
2778
|
+
_(Un, {
|
|
2779
2779
|
tabs: n(ne),
|
|
2780
2780
|
actions: e.actions,
|
|
2781
2781
|
theme: e.theme,
|
|
2782
2782
|
onCloseOtherTabs: be,
|
|
2783
|
-
onCloseAllTabs:
|
|
2783
|
+
onCloseAllTabs: Ie,
|
|
2784
2784
|
onCloseTab: B,
|
|
2785
2785
|
onClickTab: n(ae),
|
|
2786
|
-
onActionClick:
|
|
2786
|
+
onActionClick: Ae,
|
|
2787
2787
|
onActionCommand: Ve
|
|
2788
2788
|
}, {
|
|
2789
2789
|
default: p(() => [
|
|
2790
|
-
|
|
2790
|
+
_(Hn, {
|
|
2791
2791
|
avatar: e.avatar
|
|
2792
|
-
},
|
|
2793
|
-
|
|
2792
|
+
}, de({ _: 2 }, [
|
|
2793
|
+
O.$slots.user ? {
|
|
2794
2794
|
name: "default",
|
|
2795
2795
|
fn: p(() => [
|
|
2796
|
-
|
|
2796
|
+
w(O.$slots, "user")
|
|
2797
2797
|
]),
|
|
2798
2798
|
key: "0"
|
|
2799
2799
|
} : void 0
|
|
@@ -2804,12 +2804,12 @@ const Jn = /* @__PURE__ */ E({
|
|
|
2804
2804
|
]),
|
|
2805
2805
|
_: 3
|
|
2806
2806
|
}),
|
|
2807
|
-
|
|
2807
|
+
_(lt, {
|
|
2808
2808
|
createView: n(U),
|
|
2809
|
-
exclude: n(
|
|
2809
|
+
exclude: n(fe)
|
|
2810
2810
|
}, {
|
|
2811
2811
|
default: p(() => [
|
|
2812
|
-
|
|
2812
|
+
O.$slots.default ? w(O.$slots, "default", { key: 0 }) : v("", !0)
|
|
2813
2813
|
]),
|
|
2814
2814
|
_: 3
|
|
2815
2815
|
}, 8, ["createView", "exclude"])
|
|
@@ -2822,8 +2822,8 @@ const Jn = /* @__PURE__ */ E({
|
|
|
2822
2822
|
}));
|
|
2823
2823
|
}
|
|
2824
2824
|
});
|
|
2825
|
-
function
|
|
2826
|
-
const t = Ue(), e =
|
|
2825
|
+
function ka(a = {}) {
|
|
2826
|
+
const t = Ue(), e = ge(Tt, null), o = ge(Mt, null);
|
|
2827
2827
|
if (e) {
|
|
2828
2828
|
const i = typeof a == "function" ? a : async () => a;
|
|
2829
2829
|
e[t.fullPath] = i;
|
|
@@ -2833,22 +2833,22 @@ function ya(a = {}) {
|
|
|
2833
2833
|
mask: o
|
|
2834
2834
|
};
|
|
2835
2835
|
}
|
|
2836
|
-
const
|
|
2836
|
+
const qn = /* @__PURE__ */ T({
|
|
2837
2837
|
__name: "SelectEditor",
|
|
2838
2838
|
props: {
|
|
2839
2839
|
options: { default: () => [] }
|
|
2840
2840
|
},
|
|
2841
2841
|
setup(a) {
|
|
2842
2842
|
const t = a;
|
|
2843
|
-
return (e, o) => (
|
|
2843
|
+
return (e, o) => (u(), m(n(to), Ee(Be(e.$attrs)), {
|
|
2844
2844
|
default: p(() => [
|
|
2845
|
-
(
|
|
2845
|
+
(u(!0), I(Q, null, ie(t.options, (s, i) => (u(), m(n(oo), X({
|
|
2846
2846
|
key: `item_${i}_${s.value}`
|
|
2847
|
-
}, s),
|
|
2847
|
+
}, s), de({ _: 2 }, [
|
|
2848
2848
|
e.$slots.option ? {
|
|
2849
2849
|
name: "default",
|
|
2850
2850
|
fn: p(() => [
|
|
2851
|
-
|
|
2851
|
+
w(e.$slots, "option", { option: s })
|
|
2852
2852
|
]),
|
|
2853
2853
|
key: "0"
|
|
2854
2854
|
} : void 0
|
|
@@ -2857,7 +2857,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2857
2857
|
_: 3
|
|
2858
2858
|
}, 16));
|
|
2859
2859
|
}
|
|
2860
|
-
}),
|
|
2860
|
+
}), ea = /* @__PURE__ */ T({
|
|
2861
2861
|
__name: "CheckboxEditor",
|
|
2862
2862
|
props: {
|
|
2863
2863
|
options: { default: () => [] },
|
|
@@ -2865,11 +2865,11 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2865
2865
|
},
|
|
2866
2866
|
setup(a) {
|
|
2867
2867
|
const t = a, e = h(
|
|
2868
|
-
() => ve(t.button ?
|
|
2868
|
+
() => ve(t.button ? no : ao)
|
|
2869
2869
|
);
|
|
2870
|
-
return (o, s) => (
|
|
2870
|
+
return (o, s) => (u(), m(n(so), Ee(Be(o.$attrs)), {
|
|
2871
2871
|
default: p(() => [
|
|
2872
|
-
(
|
|
2872
|
+
(u(!0), I(Q, null, ie(t.options, (i, l) => (u(), m(L(e.value), {
|
|
2873
2873
|
key: `item_${l}_${i.value}`,
|
|
2874
2874
|
label: i.value
|
|
2875
2875
|
}, {
|
|
@@ -2882,7 +2882,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2882
2882
|
_: 1
|
|
2883
2883
|
}, 16));
|
|
2884
2884
|
}
|
|
2885
|
-
}),
|
|
2885
|
+
}), ta = /* @__PURE__ */ T({
|
|
2886
2886
|
__name: "RadioEditor",
|
|
2887
2887
|
props: {
|
|
2888
2888
|
options: { default: () => [] },
|
|
@@ -2890,11 +2890,11 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2890
2890
|
},
|
|
2891
2891
|
setup(a) {
|
|
2892
2892
|
const t = a, e = h(
|
|
2893
|
-
() => ve(t.button ?
|
|
2893
|
+
() => ve(t.button ? lo : io)
|
|
2894
2894
|
);
|
|
2895
|
-
return (o, s) => (
|
|
2895
|
+
return (o, s) => (u(), m(n(ro), Ee(Be(o.$attrs)), {
|
|
2896
2896
|
default: p(() => [
|
|
2897
|
-
(
|
|
2897
|
+
(u(!0), I(Q, null, ie(t.options, (i, l) => (u(), m(L(e.value), {
|
|
2898
2898
|
key: `item_${l}_${i.value}`,
|
|
2899
2899
|
label: i.value
|
|
2900
2900
|
}, {
|
|
@@ -2907,7 +2907,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2907
2907
|
_: 1
|
|
2908
2908
|
}, 16));
|
|
2909
2909
|
}
|
|
2910
|
-
}),
|
|
2910
|
+
}), Bt = {
|
|
2911
2911
|
none: {
|
|
2912
2912
|
component: "div",
|
|
2913
2913
|
props: {
|
|
@@ -2930,34 +2930,34 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2930
2930
|
defaultValue: ""
|
|
2931
2931
|
},
|
|
2932
2932
|
select: {
|
|
2933
|
-
component:
|
|
2933
|
+
component: qn,
|
|
2934
2934
|
props: {
|
|
2935
2935
|
clearable: !0
|
|
2936
2936
|
}
|
|
2937
2937
|
},
|
|
2938
2938
|
checkbox: {
|
|
2939
|
-
component:
|
|
2939
|
+
component: ea,
|
|
2940
2940
|
props: {},
|
|
2941
2941
|
defaultValue: []
|
|
2942
2942
|
},
|
|
2943
2943
|
radio: {
|
|
2944
|
-
component:
|
|
2944
|
+
component: ta,
|
|
2945
2945
|
props: {}
|
|
2946
2946
|
},
|
|
2947
2947
|
number: {
|
|
2948
|
-
component:
|
|
2948
|
+
component: co,
|
|
2949
2949
|
props: {}
|
|
2950
2950
|
},
|
|
2951
2951
|
date: {
|
|
2952
|
-
component:
|
|
2952
|
+
component: et,
|
|
2953
2953
|
props: {}
|
|
2954
2954
|
},
|
|
2955
2955
|
time: {
|
|
2956
|
-
component:
|
|
2956
|
+
component: uo,
|
|
2957
2957
|
props: {}
|
|
2958
2958
|
},
|
|
2959
2959
|
datetime: {
|
|
2960
|
-
component:
|
|
2960
|
+
component: et,
|
|
2961
2961
|
props: {
|
|
2962
2962
|
type: "datetime"
|
|
2963
2963
|
}
|
|
@@ -2967,18 +2967,18 @@ const Gn = /* @__PURE__ */ E({
|
|
|
2967
2967
|
props: {}
|
|
2968
2968
|
},
|
|
2969
2969
|
rate: {
|
|
2970
|
-
component:
|
|
2970
|
+
component: po,
|
|
2971
2971
|
props: {}
|
|
2972
2972
|
},
|
|
2973
2973
|
slider: {
|
|
2974
|
-
component:
|
|
2974
|
+
component: fo,
|
|
2975
2975
|
props: {}
|
|
2976
2976
|
},
|
|
2977
2977
|
cascader: {
|
|
2978
|
-
component:
|
|
2978
|
+
component: mo,
|
|
2979
2979
|
props: {}
|
|
2980
2980
|
}
|
|
2981
|
-
},
|
|
2981
|
+
}, oa = {
|
|
2982
2982
|
/**
|
|
2983
2983
|
* 字段名称
|
|
2984
2984
|
*/
|
|
@@ -3010,7 +3010,7 @@ const Gn = /* @__PURE__ */ E({
|
|
|
3010
3010
|
modelValue: {
|
|
3011
3011
|
type: [String, Number, Boolean, Object, Array],
|
|
3012
3012
|
default(a) {
|
|
3013
|
-
return
|
|
3013
|
+
return Bt[a.editor]?.defaultValue;
|
|
3014
3014
|
}
|
|
3015
3015
|
},
|
|
3016
3016
|
/**
|
|
@@ -3074,17 +3074,17 @@ const Gn = /* @__PURE__ */ E({
|
|
|
3074
3074
|
type: [String, Array]
|
|
3075
3075
|
}
|
|
3076
3076
|
};
|
|
3077
|
-
async function
|
|
3077
|
+
async function na(a, t) {
|
|
3078
3078
|
const e = a.options;
|
|
3079
3079
|
return e ? typeof e == "function" ? await e(t) || [] : e : [];
|
|
3080
3080
|
}
|
|
3081
|
-
function
|
|
3082
|
-
const i = P([]), l = h(() => !o || !s ? {} :
|
|
3081
|
+
function aa(a, t, e, o, s) {
|
|
3082
|
+
const i = P([]), l = h(() => !o || !s ? {} : jo(a.cascader).reduce((d, f) => (d[f] = s[f], d), {}));
|
|
3083
3083
|
return H(
|
|
3084
3084
|
l,
|
|
3085
3085
|
async (r) => {
|
|
3086
3086
|
if (e.value) {
|
|
3087
|
-
i.value = await
|
|
3087
|
+
i.value = await na(a, r);
|
|
3088
3088
|
const d = o?.exposed?.reset;
|
|
3089
3089
|
d && a.name && d(a.name);
|
|
3090
3090
|
}
|
|
@@ -3100,7 +3100,7 @@ function oa(a, t, e, o, s) {
|
|
|
3100
3100
|
label: f = "...",
|
|
3101
3101
|
disabled: g,
|
|
3102
3102
|
readonly: S
|
|
3103
|
-
} = a,
|
|
3103
|
+
} = a, A = {
|
|
3104
3104
|
...a.props,
|
|
3105
3105
|
placeholder: d || (d === null ? void 0 : `请输入${f}`),
|
|
3106
3106
|
disabled: g,
|
|
@@ -3108,39 +3108,39 @@ function oa(a, t, e, o, s) {
|
|
|
3108
3108
|
options: i.value,
|
|
3109
3109
|
onFocus: () => t("focus"),
|
|
3110
3110
|
onBlur: () => t("blur"),
|
|
3111
|
-
onChange: (
|
|
3112
|
-
},
|
|
3111
|
+
onChange: (k) => t("change", k)
|
|
3112
|
+
}, x = typeof r == "string" ? Bt[r] : {
|
|
3113
3113
|
component: r,
|
|
3114
3114
|
props: {}
|
|
3115
3115
|
};
|
|
3116
|
-
return
|
|
3117
|
-
props:
|
|
3116
|
+
return No({}, x, {
|
|
3117
|
+
props: A
|
|
3118
3118
|
});
|
|
3119
3119
|
})
|
|
3120
3120
|
};
|
|
3121
3121
|
}
|
|
3122
|
-
const
|
|
3122
|
+
const sa = { class: "x-field__editor_wrap" }, $t = /* @__PURE__ */ T({
|
|
3123
3123
|
name: "XField",
|
|
3124
3124
|
__name: "Field",
|
|
3125
|
-
props:
|
|
3125
|
+
props: oa,
|
|
3126
3126
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
3127
3127
|
setup(a, { expose: t, emit: e }) {
|
|
3128
|
-
const o = a, s =
|
|
3128
|
+
const o = a, s = ge(It, null), i = ge(go, null), l = ge(At, null), c = h(() => !s?.proxy || !l ? o.visible : typeof o.visible == "function" ? o.visible(l) : We(o.visible) ? Object.entries(o.visible).every(([D, F]) => l[D] === F) : o.visible), r = () => s?.proxy && l && o.name ? l[o.name] ?? o.modelValue : o.modelValue, d = P(r()), { editor: f } = aa(
|
|
3129
3129
|
o,
|
|
3130
3130
|
e,
|
|
3131
|
-
|
|
3131
|
+
c,
|
|
3132
3132
|
s,
|
|
3133
3133
|
l
|
|
3134
|
-
), g = P(), S = P(),
|
|
3134
|
+
), g = P(), S = P(), A = h(
|
|
3135
3135
|
() => o.size || i?.size || "default"
|
|
3136
|
-
),
|
|
3136
|
+
), x = h(() => ({
|
|
3137
3137
|
[`is-tooltip-${o.tooltipPosition}`]: !!o.tooltipPosition
|
|
3138
|
-
})),
|
|
3138
|
+
})), k = h(() => {
|
|
3139
3139
|
const b = s?.proxy;
|
|
3140
3140
|
return {
|
|
3141
3141
|
width: o.width ? je(o.width) : b && b.inline && b.inlineColumns ? `${100 / b.inlineColumns}%` : null
|
|
3142
3142
|
};
|
|
3143
|
-
}),
|
|
3143
|
+
}), M = h(() => ({
|
|
3144
3144
|
right: typeof o.tooltipPosition == "number" ? `${o.tooltipPosition}px` : void 0
|
|
3145
3145
|
})), V = h(() => ({
|
|
3146
3146
|
...f.value.props,
|
|
@@ -3150,19 +3150,19 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3150
3150
|
}
|
|
3151
3151
|
}));
|
|
3152
3152
|
return H(d, (b, D) => {
|
|
3153
|
-
|
|
3153
|
+
c.value && !He(b, D) && (e("update:modelValue", b), s?.proxy && l && o.name && tt(l, o.name, b));
|
|
3154
3154
|
}), H(
|
|
3155
3155
|
() => !s?.proxy || !o.name || !l ? o.modelValue : l[o.name] ?? o.modelValue,
|
|
3156
3156
|
(b) => {
|
|
3157
|
-
|
|
3157
|
+
c.value && (d.value = b);
|
|
3158
3158
|
},
|
|
3159
3159
|
{
|
|
3160
3160
|
immediate: !0
|
|
3161
3161
|
}
|
|
3162
3162
|
), H(
|
|
3163
|
-
|
|
3163
|
+
c,
|
|
3164
3164
|
(b) => {
|
|
3165
|
-
s?.proxy && l && o.name && (b ? (d.value = r(), l
|
|
3165
|
+
s?.proxy && l && o.name && (b ? (d.value = r(), tt(l, o.name, d.value)) : (d.value = void 0, delete l[o.name]));
|
|
3166
3166
|
},
|
|
3167
3167
|
{
|
|
3168
3168
|
immediate: !0
|
|
@@ -3177,29 +3177,29 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3177
3177
|
blur: () => {
|
|
3178
3178
|
S.value?.foucs && S.value.blur();
|
|
3179
3179
|
}
|
|
3180
|
-
}), (b, D) =>
|
|
3180
|
+
}), (b, D) => c.value ? (u(), m(n(yo), X({
|
|
3181
3181
|
key: 0,
|
|
3182
|
-
class: ["x-field",
|
|
3182
|
+
class: ["x-field", x.value],
|
|
3183
3183
|
ref_key: "itemRef",
|
|
3184
3184
|
ref: g,
|
|
3185
3185
|
prop: o.name,
|
|
3186
3186
|
label: b.label,
|
|
3187
|
-
size:
|
|
3188
|
-
style:
|
|
3189
|
-
}, b.$attrs),
|
|
3190
|
-
error: p(({ error:
|
|
3191
|
-
|
|
3192
|
-
o.tooltipMessage ? (
|
|
3187
|
+
size: A.value,
|
|
3188
|
+
style: k.value
|
|
3189
|
+
}, b.$attrs), de({
|
|
3190
|
+
error: p(({ error: F }) => [
|
|
3191
|
+
w(b.$slots, "error", { error: F }, () => [
|
|
3192
|
+
o.tooltipMessage ? (u(), I("div", {
|
|
3193
3193
|
key: 0,
|
|
3194
3194
|
class: "x-field__info",
|
|
3195
|
-
style: Ce(
|
|
3195
|
+
style: Ce(M.value)
|
|
3196
3196
|
}, [
|
|
3197
|
-
|
|
3197
|
+
_(n(dt), X({ content: F }, o.tooltipMessage), {
|
|
3198
3198
|
default: p(() => [
|
|
3199
|
-
|
|
3199
|
+
_(n(te), {
|
|
3200
3200
|
class: "x-field__trigger",
|
|
3201
|
-
icon: n(
|
|
3202
|
-
size:
|
|
3201
|
+
icon: n(Eo),
|
|
3202
|
+
size: A.value
|
|
3203
3203
|
}, null, 8, ["icon", "size"])
|
|
3204
3204
|
]),
|
|
3205
3205
|
_: 2
|
|
@@ -3208,37 +3208,40 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3208
3208
|
])
|
|
3209
3209
|
]),
|
|
3210
3210
|
default: p(() => [
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3211
|
+
R("div", sa, [
|
|
3212
|
+
w(b.$slots, "editor", { editor: V.value }, () => [
|
|
3213
|
+
n(f).component ? (u(), m(L(n(f).component), X({
|
|
3214
|
+
key: 0,
|
|
3215
|
+
class: "x-field__editor",
|
|
3216
|
+
ref_key: "editorRef",
|
|
3217
|
+
ref: S,
|
|
3218
|
+
modelValue: d.value,
|
|
3219
|
+
"onUpdate:modelValue": D[0] || (D[0] = (F) => d.value = F)
|
|
3220
|
+
}, n(f).props), de({ _: 2 }, [
|
|
3221
|
+
b.$slots.option ? {
|
|
3222
|
+
name: "option",
|
|
3223
|
+
fn: p(({ option: F }) => [
|
|
3224
|
+
w(b.$slots, "option", { option: F })
|
|
3225
|
+
]),
|
|
3226
|
+
key: "0"
|
|
3227
|
+
} : void 0
|
|
3228
|
+
]), 1040, ["modelValue"])) : v("", !0)
|
|
3229
|
+
])
|
|
3230
|
+
]),
|
|
3231
|
+
w(b.$slots, "default")
|
|
3229
3232
|
]),
|
|
3230
3233
|
_: 2
|
|
3231
3234
|
}, [
|
|
3232
3235
|
b.$slots.label ? {
|
|
3233
3236
|
name: "label",
|
|
3234
3237
|
fn: p(() => [
|
|
3235
|
-
|
|
3238
|
+
w(b.$slots, "label")
|
|
3236
3239
|
]),
|
|
3237
3240
|
key: "0"
|
|
3238
3241
|
} : void 0
|
|
3239
3242
|
]), 1040, ["prop", "label", "size", "class", "style"])) : v("", !0);
|
|
3240
3243
|
}
|
|
3241
|
-
}),
|
|
3244
|
+
}), la = {
|
|
3242
3245
|
/**
|
|
3243
3246
|
* 表单模型
|
|
3244
3247
|
*/
|
|
@@ -3287,15 +3290,15 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3287
3290
|
submitMethod: {
|
|
3288
3291
|
type: Function
|
|
3289
3292
|
}
|
|
3290
|
-
}, It = Symbol("formInstanceKey"), At = Symbol("formModelKey"),
|
|
3293
|
+
}, It = Symbol("formInstanceKey"), At = Symbol("formModelKey"), Vt = /* @__PURE__ */ T({
|
|
3291
3294
|
name: "XForm",
|
|
3292
3295
|
__name: "Form",
|
|
3293
|
-
props:
|
|
3296
|
+
props: la,
|
|
3294
3297
|
emits: ["change", "submit", "reset"],
|
|
3295
3298
|
setup(a, { expose: t, emit: e }) {
|
|
3296
|
-
const o = a, s =
|
|
3299
|
+
const o = a, s = pe(), i = P(), l = Ne(o.model || {}), c = P(!1);
|
|
3297
3300
|
he(It, s), he(At, l), H(l, () => {
|
|
3298
|
-
e("change",
|
|
3301
|
+
e("change", ze(l));
|
|
3299
3302
|
}), H(
|
|
3300
3303
|
() => o.model,
|
|
3301
3304
|
(f) => {
|
|
@@ -3304,7 +3307,7 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3304
3307
|
{ deep: !0 }
|
|
3305
3308
|
);
|
|
3306
3309
|
const r = async () => {
|
|
3307
|
-
await i.value.validate().catch((g) => g) && o.model && (e("submit",
|
|
3310
|
+
await i.value.validate().catch((g) => g) && o.model && (e("submit", ze(l)), o.submitMethod && (c.value = !0, await o.submitMethod(ze(l)), c.value = !1));
|
|
3308
3311
|
}, d = (f) => {
|
|
3309
3312
|
i.value.resetFields(f), e("reset");
|
|
3310
3313
|
};
|
|
@@ -3313,7 +3316,7 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3313
3316
|
model: l,
|
|
3314
3317
|
submit: r,
|
|
3315
3318
|
reset: d
|
|
3316
|
-
}), (f, g) => (
|
|
3319
|
+
}), (f, g) => (u(), m(n(ho), X({
|
|
3317
3320
|
ref_key: "formRef",
|
|
3318
3321
|
ref: i,
|
|
3319
3322
|
class: "x-form",
|
|
@@ -3321,38 +3324,38 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3321
3324
|
model: l
|
|
3322
3325
|
}, f.$attrs), {
|
|
3323
3326
|
default: p(() => [
|
|
3324
|
-
|
|
3325
|
-
o.footer ? (
|
|
3327
|
+
w(f.$slots, "default"),
|
|
3328
|
+
o.footer ? (u(), m(n($t), {
|
|
3326
3329
|
key: 0,
|
|
3327
3330
|
editor: "none",
|
|
3328
3331
|
class: "x-form__footer",
|
|
3329
3332
|
label: " "
|
|
3330
3333
|
}, {
|
|
3331
3334
|
editor: p(() => [
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3335
|
+
w(f.$slots, "footer", {}, () => [
|
|
3336
|
+
o.submitText ? (u(), m(n(le), {
|
|
3337
|
+
key: 0,
|
|
3338
|
+
loading: c.value,
|
|
3339
|
+
type: "primary",
|
|
3340
|
+
onClick: r
|
|
3341
|
+
}, {
|
|
3342
|
+
default: p(() => [
|
|
3343
|
+
N(j(o.submitText), 1)
|
|
3344
|
+
]),
|
|
3345
|
+
_: 1
|
|
3346
|
+
}, 8, ["loading"])) : v("", !0),
|
|
3347
|
+
o.resetText ? (u(), m(n(le), {
|
|
3348
|
+
key: 1,
|
|
3349
|
+
type: "default",
|
|
3350
|
+
onClick: g[0] || (g[0] = () => d())
|
|
3351
|
+
}, {
|
|
3352
|
+
default: p(() => [
|
|
3353
|
+
N(j(o.resetText), 1)
|
|
3354
|
+
]),
|
|
3355
|
+
_: 1
|
|
3356
|
+
})) : v("", !0),
|
|
3357
|
+
w(f.$slots, "action")
|
|
3358
|
+
])
|
|
3356
3359
|
]),
|
|
3357
3360
|
_: 3
|
|
3358
3361
|
})) : v("", !0)
|
|
@@ -3360,69 +3363,180 @@ const Bt = /* @__PURE__ */ E({
|
|
|
3360
3363
|
_: 3
|
|
3361
3364
|
}, 16, ["inline", "model"]));
|
|
3362
3365
|
}
|
|
3363
|
-
}),
|
|
3364
|
-
|
|
3366
|
+
}), ia = {
|
|
3367
|
+
modelValue: {
|
|
3368
|
+
type: Boolean,
|
|
3369
|
+
default: !0
|
|
3370
|
+
},
|
|
3371
|
+
size: {
|
|
3372
|
+
type: String
|
|
3373
|
+
},
|
|
3374
|
+
formProps: {
|
|
3375
|
+
type: Object
|
|
3376
|
+
},
|
|
3377
|
+
submit: {
|
|
3378
|
+
type: [Boolean, String],
|
|
3379
|
+
default: "确定"
|
|
3380
|
+
},
|
|
3381
|
+
cancel: {
|
|
3382
|
+
type: [Boolean, String],
|
|
3383
|
+
default: "取消"
|
|
3384
|
+
},
|
|
3385
|
+
/**
|
|
3386
|
+
* 表单模型
|
|
3387
|
+
*/
|
|
3388
|
+
model: {
|
|
3389
|
+
type: Object,
|
|
3390
|
+
default() {
|
|
3391
|
+
return /* @__PURE__ */ Object.create(null);
|
|
3392
|
+
}
|
|
3393
|
+
},
|
|
3394
|
+
rules: {
|
|
3395
|
+
type: Object
|
|
3396
|
+
},
|
|
3397
|
+
/**
|
|
3398
|
+
* 表单提交处理方法, return true 关闭弹窗
|
|
3399
|
+
*/
|
|
3400
|
+
submitMethod: {
|
|
3401
|
+
type: Function
|
|
3402
|
+
}
|
|
3403
|
+
}, ra = /* @__PURE__ */ T({
|
|
3404
|
+
name: "XDialogForm",
|
|
3405
|
+
__name: "DialogForm",
|
|
3406
|
+
props: ia,
|
|
3407
|
+
emits: ["update:modelValue", "submit", "close"],
|
|
3408
|
+
setup(a, { expose: t, emit: e }) {
|
|
3409
|
+
const o = a, s = P(), i = P(), l = () => {
|
|
3410
|
+
s.value?.submit();
|
|
3411
|
+
}, c = () => {
|
|
3412
|
+
e("update:modelValue", !1), e("close");
|
|
3413
|
+
}, r = async (d) => {
|
|
3414
|
+
e("submit", d), o.submitMethod ? await o.submitMethod(d) && c() : c();
|
|
3415
|
+
};
|
|
3416
|
+
return t({
|
|
3417
|
+
formRef: s,
|
|
3418
|
+
dialogRef: i
|
|
3419
|
+
}), (d, f) => (u(), m(n(Qe), X({
|
|
3420
|
+
ref_key: "dialogRef",
|
|
3421
|
+
ref: i,
|
|
3422
|
+
"model-value": o.modelValue,
|
|
3423
|
+
submit: o.submit,
|
|
3424
|
+
cancel: o.cancel,
|
|
3425
|
+
size: o.size,
|
|
3426
|
+
onSubmit: l,
|
|
3427
|
+
onClose: c,
|
|
3428
|
+
minimizable: !1,
|
|
3429
|
+
maximizable: !1
|
|
3430
|
+
}, d.$attrs), de({
|
|
3431
|
+
default: p(() => [
|
|
3432
|
+
_(n(Vt), X({
|
|
3433
|
+
ref_key: "formRef",
|
|
3434
|
+
ref: s,
|
|
3435
|
+
footer: !1,
|
|
3436
|
+
"label-width": "80px",
|
|
3437
|
+
size: o.size,
|
|
3438
|
+
model: o.model,
|
|
3439
|
+
rules: o.rules,
|
|
3440
|
+
"submit-method": r
|
|
3441
|
+
}, o.formProps), {
|
|
3442
|
+
default: p(() => [
|
|
3443
|
+
w(d.$slots, "default")
|
|
3444
|
+
]),
|
|
3445
|
+
_: 3
|
|
3446
|
+
}, 16, ["size", "model", "rules"])
|
|
3447
|
+
]),
|
|
3448
|
+
_: 2
|
|
3449
|
+
}, [
|
|
3450
|
+
d.$slots.extra ? {
|
|
3451
|
+
name: "extra",
|
|
3452
|
+
fn: p(() => [
|
|
3453
|
+
w(d.$slots, "extra")
|
|
3454
|
+
]),
|
|
3455
|
+
key: "0"
|
|
3456
|
+
} : void 0,
|
|
3457
|
+
d.$slots.handle ? {
|
|
3458
|
+
name: "handle",
|
|
3459
|
+
fn: p(() => [
|
|
3460
|
+
w(d.$slots, "handle")
|
|
3461
|
+
]),
|
|
3462
|
+
key: "1"
|
|
3463
|
+
} : void 0,
|
|
3464
|
+
d.$slots.footer ? {
|
|
3465
|
+
name: "footer",
|
|
3466
|
+
fn: p(() => [
|
|
3467
|
+
w(d.$slots, "footer")
|
|
3468
|
+
]),
|
|
3469
|
+
key: "2"
|
|
3470
|
+
} : void 0
|
|
3471
|
+
]), 1040, ["model-value", "submit", "cancel", "size"]));
|
|
3472
|
+
}
|
|
3473
|
+
}), ca = [
|
|
3474
|
+
Zo,
|
|
3365
3475
|
te,
|
|
3366
3476
|
ee,
|
|
3367
|
-
|
|
3477
|
+
ln,
|
|
3368
3478
|
J,
|
|
3369
3479
|
Ke,
|
|
3370
|
-
|
|
3371
|
-
wt,
|
|
3372
|
-
xt,
|
|
3480
|
+
$,
|
|
3373
3481
|
zt,
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3482
|
+
St,
|
|
3483
|
+
Qe,
|
|
3484
|
+
Yn,
|
|
3485
|
+
$t,
|
|
3486
|
+
Vt,
|
|
3487
|
+
ra
|
|
3488
|
+
], wa = "0.6.22", ua = Xo(ca), xa = ua.install;
|
|
3377
3489
|
export {
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3490
|
+
at as Draggable,
|
|
3491
|
+
ot as INSTALLED_KEY,
|
|
3492
|
+
Mt as MASK_KEY,
|
|
3493
|
+
_a as NOOP,
|
|
3494
|
+
st as Resizable,
|
|
3495
|
+
Tt as TAB_CREATORS_KEY,
|
|
3496
|
+
Wn as TAB_ITEM_WIDTH,
|
|
3385
3497
|
J as XAction,
|
|
3386
3498
|
Ke as XActionBar,
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3499
|
+
$ as XContainer,
|
|
3500
|
+
Qe as XDialog,
|
|
3501
|
+
ra as XDialogForm,
|
|
3502
|
+
$t as XField,
|
|
3503
|
+
Vt as XForm,
|
|
3504
|
+
zt as XHeader,
|
|
3392
3505
|
te as XIcon,
|
|
3393
|
-
|
|
3506
|
+
Yn as XMask,
|
|
3394
3507
|
ee as XMenu,
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3508
|
+
St as XPanel,
|
|
3509
|
+
ln as XSimpleMask,
|
|
3510
|
+
Zo as XStartup,
|
|
3511
|
+
mn as actionBarProps,
|
|
3512
|
+
xt as actionProps,
|
|
3513
|
+
Bt as builtinFieldEditors,
|
|
3514
|
+
ca as components,
|
|
3515
|
+
gn as containerProps,
|
|
3516
|
+
Ze as createDialog,
|
|
3517
|
+
xa as default,
|
|
3518
|
+
ka as defineTab,
|
|
3519
|
+
ia as dialogFormProps,
|
|
3520
|
+
kn as dialogProps,
|
|
3521
|
+
oa as fieldProps,
|
|
3408
3522
|
It as formInstanceKey,
|
|
3409
3523
|
At as formModelKey,
|
|
3410
|
-
|
|
3524
|
+
la as formProps,
|
|
3411
3525
|
je as getSizeValue,
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3526
|
+
yn as headerProps,
|
|
3527
|
+
Go as iconProps,
|
|
3528
|
+
Jo as iconSizeMap,
|
|
3529
|
+
xa as install,
|
|
3530
|
+
Xo as makeInstaller,
|
|
3531
|
+
Ln as maskProps,
|
|
3532
|
+
va as omit,
|
|
3533
|
+
bn as panelProps,
|
|
3420
3534
|
_e as parseSize,
|
|
3421
|
-
|
|
3535
|
+
ba as pick,
|
|
3422
3536
|
Le as useDisabled,
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3537
|
+
Me as useIcon,
|
|
3538
|
+
dn as useIconProps,
|
|
3539
|
+
_n as vDraggable,
|
|
3540
|
+
Ct as vResizable,
|
|
3541
|
+
wa as version
|
|
3428
3542
|
};
|