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