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