@vtj/ui 0.7.31 → 0.7.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.iife.js +2 -2
- package/dist/index.mjs +933 -933
- package/dist/index.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElIcon as Wt, ElSubMenu as
|
|
3
|
-
import { ArrowRight as
|
|
4
|
-
import { useDraggable as
|
|
5
|
-
import { isEqual as
|
|
6
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as I, useAttrs as We, getCurrentInstance as pe, computed as v, markRaw as we, openBlock as c, createBlock as g, unref as o, normalizeClass as Y, normalizeStyle as fe, withCtx as f, renderSlot as S, resolveDynamicComponent as J, createCommentVNode as b, createElementBlock as z, mergeProps as A, createElementVNode as F, toDisplayString as O, Fragment as W, renderList as Z, isVNode as Lt, h as ae, shallowRef as Ve, ref as j, watch as K, toRef as Oe, createTextVNode as D, useSlots as Ut, toRaw as ye, createVNode as k, normalizeProps as le, guardReactiveProps as he, effectScope as ft, reactive as Re, onMounted as mt, onUnmounted as gt, watchEffect as Ye, nextTick as ve, Teleport as yt, withDirectives as G, createSlots as ue, render as nt, vShow as oe, isRef as Pe, withModifiers as vt, KeepAlive as Ht, provide as Se, inject as $e, withKeys as Kt } from "vue";
|
|
2
|
+
import { ElIcon as Wt, ElSubMenu as Yt, ElBadge as Ue, ElMenuItem as Jt, ElMenu as qt, ElButton as ie, ElDropdown as Gt, ElDropdownMenu as Zt, ElDropdownItem as Qt, ElTooltip as bt, ElDivider as se, ElSwitch as Je, ElInput as _e, ElEmpty as ht, ElTabs as _t, ElTabPane as He, ElPopover as kt, ElAvatar as en, ElMessageBox as Fe, ElSelect as wt, ElOption as xt, ElCheckboxButton as tn, ElCheckbox as nn, ElCheckboxGroup as on, ElRadioButton as an, ElRadio as sn, ElRadioGroup as ln, ElInputNumber as rn, ElDatePicker as ot, ElTimePicker as cn, ElRate as un, ElSlider as dn, ElCascader as pn, formContextKey as fn, ElFormItem as mn, ElForm as gn, ElImage as yn, ElInfiniteScroll as at, ElPagination as vn, ElDescriptions as st, ElDescriptionsItem as Ne, ElMessage as lt } from "element-plus";
|
|
3
|
+
import { ArrowRight as bn, Minimize as hn, Popup as _n, Maximize as kn, RawClose as wn, StarFilled as $t, Menu as xn, Search as Ke, Close as St, Expand as $n, Fold as Sn, Star as Ct, Document as me, Refresh as Cn, CopyDocument as zn, Moon as Mn, Sunny as Tn, MoreFilled as En, UserFilled as Pn, HomeFilled as Bn, WarningFilled as In, EditPen as Vn } from "@vtj/icons";
|
|
4
|
+
import { useDraggable as On, useMouseInElement as jn, useEventListener as je, useElementSize as zt, useDark as Rn, useResizeObserver as Dn, useVirtualList as An } from "@vueuse/core";
|
|
5
|
+
import { isEqual as qe, isObject as Ge, uid as Mt, arrayToMap as Fn, isUrl as Nn, upperFirstCamelCase as Tt, toArray as Et, get as Be, merge as Xn, set as Xe, debounce as Ln, dedupArray as Un, numberFormat as Hn } from "@vtj/utils";
|
|
6
|
+
import { useRouter as Ze, RouterView as Kn, useRoute as Pt, routeLocationKey as Wn } from "vue-router";
|
|
7
7
|
/**!
|
|
8
8
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
9
9
|
* @name @vtj/ui
|
|
10
10
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
11
|
-
* @version 0.7.
|
|
11
|
+
* @version 0.7.32
|
|
12
12
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
13
13
|
*/
|
|
14
|
-
const
|
|
14
|
+
const Xa = "0.7.32", Yn = {
|
|
15
15
|
default: 14,
|
|
16
16
|
small: 12,
|
|
17
17
|
large: 18
|
|
18
|
-
},
|
|
18
|
+
}, Jn = {
|
|
19
19
|
icon: {
|
|
20
20
|
type: [String, Object]
|
|
21
21
|
},
|
|
@@ -39,10 +39,10 @@ const Ua = "0.7.31", Jn = {
|
|
|
39
39
|
type: Number
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
function
|
|
42
|
+
function Q(a) {
|
|
43
43
|
return typeof a == "string" ? a : `${a}px`;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Me(a = 0, n) {
|
|
46
46
|
if (typeof a == "number")
|
|
47
47
|
return a;
|
|
48
48
|
if (/(%|vh|vw)$/i.test(a)) {
|
|
@@ -55,16 +55,16 @@ function it(a, n = {}) {
|
|
|
55
55
|
const e = { ...n };
|
|
56
56
|
return typeof a == "boolean" ? e : Object.assign(e, a || {});
|
|
57
57
|
}
|
|
58
|
-
const rt = Symbol("INSTALLED_KEY"),
|
|
58
|
+
const rt = Symbol("INSTALLED_KEY"), La = (a = []) => ({
|
|
59
59
|
install: (e) => {
|
|
60
60
|
e[rt] || (e[rt] = !0, a.forEach((t) => {
|
|
61
61
|
t.name && e.component(t.name, t);
|
|
62
62
|
}));
|
|
63
63
|
}
|
|
64
|
-
}),
|
|
64
|
+
}), qn = ["src"], de = /* @__PURE__ */ I({
|
|
65
65
|
name: "XIcon",
|
|
66
66
|
__name: "Icon",
|
|
67
|
-
props:
|
|
67
|
+
props: Jn,
|
|
68
68
|
setup(a) {
|
|
69
69
|
const n = a, e = We(), t = pe(), l = v(() => {
|
|
70
70
|
if (!n.icon)
|
|
@@ -76,36 +76,36 @@ const rt = Symbol("INSTALLED_KEY"), Xa = (a = []) => ({
|
|
|
76
76
|
"is-pointer": !!e.onClick
|
|
77
77
|
};
|
|
78
78
|
return !l.value && n.icon && (i[n.icon] = !0), i;
|
|
79
|
-
}),
|
|
79
|
+
}), u = v(() => ({
|
|
80
80
|
"background-color": n.background,
|
|
81
|
-
"border-radius": n.radius ?
|
|
82
|
-
padding: n.padding ?
|
|
83
|
-
})), r = v(() => typeof n.size == "number" ? n.size :
|
|
84
|
-
return (i, p) => (
|
|
85
|
-
class:
|
|
81
|
+
"border-radius": n.radius ? Q(n.radius) : void 0,
|
|
82
|
+
padding: n.padding ? Q(n.padding) : void 0
|
|
83
|
+
})), r = v(() => typeof n.size == "number" ? n.size : Yn[n.size] ?? void 0);
|
|
84
|
+
return (i, p) => (c(), g(o(Wt), {
|
|
85
|
+
class: Y(["x-icon", s.value]),
|
|
86
86
|
color: n.color,
|
|
87
87
|
size: r.value,
|
|
88
|
-
style: fe(
|
|
88
|
+
style: fe(u.value)
|
|
89
89
|
}, {
|
|
90
90
|
default: f(() => [
|
|
91
|
-
|
|
92
|
-
l.value ? (
|
|
93
|
-
n.src ? (
|
|
91
|
+
S(i.$slots, "default", {}, () => [
|
|
92
|
+
l.value ? (c(), g(J(l.value), { key: 0 })) : b("", !0),
|
|
93
|
+
n.src ? (c(), z("img", {
|
|
94
94
|
key: 1,
|
|
95
95
|
src: n.src
|
|
96
|
-
}, null, 8,
|
|
96
|
+
}, null, 8, qn)) : b("", !0)
|
|
97
97
|
])
|
|
98
98
|
]),
|
|
99
99
|
_: 3
|
|
100
100
|
}, 8, ["class", "color", "size", "style"]));
|
|
101
101
|
}
|
|
102
|
-
}), Gn = { class: "x-menu__wrapper" },
|
|
102
|
+
}), Gn = { class: "x-menu__wrapper" }, Zn = {
|
|
103
103
|
key: 1,
|
|
104
104
|
class: "x-menu__title"
|
|
105
|
-
},
|
|
105
|
+
}, Qn = /* @__PURE__ */ F("i", null, null, -1), eo = {
|
|
106
106
|
key: 0,
|
|
107
107
|
class: "x-menu__title"
|
|
108
|
-
}, to = /* @__PURE__ */
|
|
108
|
+
}, to = /* @__PURE__ */ F("i", null, null, -1), Bt = /* @__PURE__ */ I({
|
|
109
109
|
inheritAttrs: !1,
|
|
110
110
|
name: "XMenuItem",
|
|
111
111
|
__name: "MenuItem",
|
|
@@ -115,36 +115,36 @@ const rt = Symbol("INSTALLED_KEY"), Xa = (a = []) => ({
|
|
|
115
115
|
defaultIcon: {}
|
|
116
116
|
},
|
|
117
117
|
setup(a) {
|
|
118
|
-
const n = a, e = pe(), t = (
|
|
119
|
-
if (
|
|
120
|
-
return typeof
|
|
121
|
-
}, l = (
|
|
122
|
-
return (
|
|
118
|
+
const n = a, e = pe(), t = (u) => {
|
|
119
|
+
if (u)
|
|
120
|
+
return typeof u == "string" && (e?.appContext.app?.component(u) || n.defaultIcon) || u;
|
|
121
|
+
}, l = (u) => typeof u == "object" ? u : { value: u }, s = (u = []) => u.filter((r) => !r.hidden);
|
|
122
|
+
return (u, r) => n.item.children ? (c(), g(o(Yt), A({
|
|
123
123
|
key: 0,
|
|
124
124
|
disabled: n.item.disabled
|
|
125
125
|
}, n.subMenu, {
|
|
126
126
|
index: String(n.item.id)
|
|
127
127
|
}), {
|
|
128
128
|
title: f(() => [
|
|
129
|
-
|
|
130
|
-
n.item.icon ? (
|
|
129
|
+
F("div", Gn, [
|
|
130
|
+
n.item.icon ? (c(), g(o(de), {
|
|
131
131
|
key: 0,
|
|
132
132
|
icon: t(n.item.icon)
|
|
133
|
-
}, null, 8, ["icon"])) :
|
|
134
|
-
n.item.title ? (
|
|
135
|
-
n.item.badge ? (
|
|
133
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
134
|
+
n.item.title ? (c(), z("span", Zn, O(n.item.title), 1)) : b("", !0),
|
|
135
|
+
n.item.badge ? (c(), g(o(Ue), A({
|
|
136
136
|
key: 2,
|
|
137
137
|
class: "x-menu__badge"
|
|
138
138
|
}, l(n.item.badge)), {
|
|
139
139
|
default: f(() => [
|
|
140
|
-
|
|
140
|
+
Qn
|
|
141
141
|
]),
|
|
142
142
|
_: 1
|
|
143
|
-
}, 16)) :
|
|
143
|
+
}, 16)) : b("", !0)
|
|
144
144
|
])
|
|
145
145
|
]),
|
|
146
146
|
default: f(() => [
|
|
147
|
-
(
|
|
147
|
+
(c(!0), z(W, null, Z(s(n.item.children), (i) => (c(), g(o(Bt), {
|
|
148
148
|
key: i.id,
|
|
149
149
|
item: i,
|
|
150
150
|
subMenu: n.subMenu,
|
|
@@ -152,14 +152,14 @@ const rt = Symbol("INSTALLED_KEY"), Xa = (a = []) => ({
|
|
|
152
152
|
}, null, 8, ["item", "subMenu", "defaultIcon"]))), 128))
|
|
153
153
|
]),
|
|
154
154
|
_: 1
|
|
155
|
-
}, 16, ["disabled", "index"])) : (
|
|
155
|
+
}, 16, ["disabled", "index"])) : (c(), g(o(Jt), {
|
|
156
156
|
key: 1,
|
|
157
157
|
index: String(n.item.id),
|
|
158
158
|
disabled: n.item.disabled
|
|
159
159
|
}, {
|
|
160
160
|
title: f(() => [
|
|
161
|
-
n.item.title ? (
|
|
162
|
-
n.item.badge ? (
|
|
161
|
+
n.item.title ? (c(), z("span", eo, O(n.item.title), 1)) : b("", !0),
|
|
162
|
+
n.item.badge ? (c(), g(o(Ue), A({
|
|
163
163
|
key: 1,
|
|
164
164
|
class: "x-menu__badge"
|
|
165
165
|
}, l(n.item.badge)), {
|
|
@@ -167,18 +167,18 @@ const rt = Symbol("INSTALLED_KEY"), Xa = (a = []) => ({
|
|
|
167
167
|
to
|
|
168
168
|
]),
|
|
169
169
|
_: 1
|
|
170
|
-
}, 16)) :
|
|
170
|
+
}, 16)) : b("", !0)
|
|
171
171
|
]),
|
|
172
172
|
default: f(() => [
|
|
173
|
-
n.item.icon ? (
|
|
173
|
+
n.item.icon ? (c(), g(o(de), {
|
|
174
174
|
key: 0,
|
|
175
175
|
icon: t(n.item.icon)
|
|
176
|
-
}, null, 8, ["icon"])) :
|
|
176
|
+
}, null, 8, ["icon"])) : b("", !0)
|
|
177
177
|
]),
|
|
178
178
|
_: 1
|
|
179
179
|
}, 8, ["index", "disabled"]));
|
|
180
180
|
}
|
|
181
|
-
}), ge = /* @__PURE__ */
|
|
181
|
+
}), ge = /* @__PURE__ */ I({
|
|
182
182
|
inheritAttrs: !1,
|
|
183
183
|
name: "XMenu",
|
|
184
184
|
__name: "Menu",
|
|
@@ -191,24 +191,24 @@ const rt = Symbol("INSTALLED_KEY"), Xa = (a = []) => ({
|
|
|
191
191
|
setup(a, { emit: n }) {
|
|
192
192
|
const e = a, t = n, l = v(() => e.data.filter((r) => !r.hidden)), s = (r, i) => {
|
|
193
193
|
const p = (d, m = []) => {
|
|
194
|
-
for (const
|
|
195
|
-
if (
|
|
196
|
-
return
|
|
197
|
-
if (
|
|
198
|
-
const _ = p(d,
|
|
194
|
+
for (const h of m) {
|
|
195
|
+
if (h.id.toString() === d.toString())
|
|
196
|
+
return h;
|
|
197
|
+
if (h.children?.length) {
|
|
198
|
+
const _ = p(d, h.children);
|
|
199
199
|
if (_)
|
|
200
200
|
return _;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
204
|
return p(i, r);
|
|
205
|
-
},
|
|
205
|
+
}, u = (r) => {
|
|
206
206
|
const i = s(l.value, r);
|
|
207
207
|
i && t("select", i);
|
|
208
208
|
};
|
|
209
|
-
return (r, i) => (
|
|
209
|
+
return (r, i) => (c(), g(o(qt), A({ class: "x-menu" }, r.$attrs, { onSelect: u }), {
|
|
210
210
|
default: f(() => [
|
|
211
|
-
(
|
|
211
|
+
(c(!0), z(W, null, Z(l.value, (p) => (c(), g(o(Bt), {
|
|
212
212
|
item: { ...p, icon: p.icon },
|
|
213
213
|
defaultIcon: e.defaultIcon,
|
|
214
214
|
subMenu: e.subMenu
|
|
@@ -217,7 +217,7 @@ const rt = Symbol("INSTALLED_KEY"), Xa = (a = []) => ({
|
|
|
217
217
|
_: 1
|
|
218
218
|
}, 16));
|
|
219
219
|
}
|
|
220
|
-
}),
|
|
220
|
+
}), It = {
|
|
221
221
|
/**
|
|
222
222
|
* 动作名称标识
|
|
223
223
|
*/
|
|
@@ -342,7 +342,7 @@ function so(a) {
|
|
|
342
342
|
return v(() => {
|
|
343
343
|
const e = o(a);
|
|
344
344
|
if (e)
|
|
345
|
-
if (typeof e == "string" || e.setup || e.render ||
|
|
345
|
+
if (typeof e == "string" || e.setup || e.render || Lt(e)) {
|
|
346
346
|
const t = n?.appContext.app;
|
|
347
347
|
return {
|
|
348
348
|
icon: typeof e == "string" && t?.component(e) || e
|
|
@@ -354,39 +354,39 @@ function so(a) {
|
|
|
354
354
|
}
|
|
355
355
|
function ke(a) {
|
|
356
356
|
const n = so(a);
|
|
357
|
-
return n.value ? we(
|
|
357
|
+
return n.value ? we(I({ render: () => ae(de, n.value) })) : void 0;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function Qe(a, n) {
|
|
360
360
|
return v(() => {
|
|
361
361
|
const e = o(a);
|
|
362
362
|
return typeof e == "function" ? e(n) : !!e;
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
function lo(a, n, e) {
|
|
366
|
-
const t =
|
|
366
|
+
const t = Ve(n), l = j(!1), s = async (r) => {
|
|
367
367
|
const i = o(a);
|
|
368
368
|
return i ? typeof i == "function" ? await i(r) : i : n;
|
|
369
|
-
},
|
|
370
|
-
return
|
|
369
|
+
}, u = async (r) => (l.value = !0, await s(r).then((i) => (t.value = i || n, l.value = !1, o(t))));
|
|
370
|
+
return K(
|
|
371
371
|
() => a,
|
|
372
372
|
() => {
|
|
373
|
-
|
|
373
|
+
u(e);
|
|
374
374
|
},
|
|
375
375
|
{ immediate: !0 }
|
|
376
|
-
), e &&
|
|
377
|
-
|
|
376
|
+
), e && K(e, () => {
|
|
377
|
+
u(e);
|
|
378
378
|
}), {
|
|
379
379
|
data: t,
|
|
380
380
|
loading: l,
|
|
381
|
-
loader:
|
|
381
|
+
loader: u
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
|
-
const io = { key: 0 }, ro = /* @__PURE__ */
|
|
384
|
+
const io = { key: 0 }, ro = /* @__PURE__ */ I({
|
|
385
385
|
__name: "Trigger",
|
|
386
|
-
props:
|
|
386
|
+
props: It,
|
|
387
387
|
emits: ["click"],
|
|
388
388
|
setup(a, { emit: n }) {
|
|
389
|
-
const e = a, t = n, l = ke(
|
|
389
|
+
const e = a, t = n, l = ke(Oe(e, "icon")), s = Qe(Oe(e, "disabled")), u = v(() => ({
|
|
390
390
|
[`is-${e.mode}`]: !!e.mode,
|
|
391
391
|
[`is-${e.type}`]: !!e.type,
|
|
392
392
|
[`is-${e.size}`]: !!e.size && e.size !== "default",
|
|
@@ -397,7 +397,7 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
397
397
|
if (i.preventDefault(), !s.value)
|
|
398
398
|
return t("click"), !1;
|
|
399
399
|
};
|
|
400
|
-
return (i, p) => e.mode === "button" ? (
|
|
400
|
+
return (i, p) => e.mode === "button" ? (c(), g(o(ie), A({
|
|
401
401
|
key: 0,
|
|
402
402
|
icon: o(l),
|
|
403
403
|
type: e.type,
|
|
@@ -405,63 +405,63 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
405
405
|
disabled: o(s)
|
|
406
406
|
}, e.button, { onClick: r }), {
|
|
407
407
|
default: f(() => [
|
|
408
|
-
|
|
408
|
+
D(O(i.label), 1)
|
|
409
409
|
]),
|
|
410
410
|
_: 1
|
|
411
|
-
}, 16, ["icon", "type", "size", "disabled"])) : (
|
|
411
|
+
}, 16, ["icon", "type", "size", "disabled"])) : (c(), z("div", {
|
|
412
412
|
key: 1,
|
|
413
|
-
class:
|
|
413
|
+
class: Y(["x-action__inner", u.value]),
|
|
414
414
|
onClick: r
|
|
415
415
|
}, [
|
|
416
|
-
(
|
|
417
|
-
i.label ? (
|
|
416
|
+
(c(), g(J(o(l)))),
|
|
417
|
+
i.label ? (c(), z("span", io, O(i.label), 1)) : b("", !0)
|
|
418
418
|
], 2));
|
|
419
419
|
}
|
|
420
|
-
}), te = /* @__PURE__ */
|
|
420
|
+
}), te = /* @__PURE__ */ I({
|
|
421
421
|
name: "XAction",
|
|
422
422
|
__name: "Action",
|
|
423
|
-
props:
|
|
423
|
+
props: It,
|
|
424
424
|
emits: ["click", "command"],
|
|
425
425
|
setup(a, { emit: n }) {
|
|
426
|
-
const e = a, t =
|
|
426
|
+
const e = a, t = Ut(), l = n, s = no(e), u = oo(e), r = ao(e), i = Qe(Oe(e, "disabled")), p = v(() => ({
|
|
427
427
|
[`x-action--${e.mode}`]: !!e.mode
|
|
428
428
|
})), d = () => {
|
|
429
429
|
i.value || l("click", ye(e));
|
|
430
430
|
}, m = (w) => {
|
|
431
431
|
if (i.value)
|
|
432
432
|
return;
|
|
433
|
-
const
|
|
434
|
-
|
|
435
|
-
},
|
|
433
|
+
const E = e.menus?.find((P) => P.command === w);
|
|
434
|
+
E && l("command", ye(E));
|
|
435
|
+
}, h = (w) => ae(Ue, u.value, () => [].concat(w)), _ = (w) => ae(
|
|
436
436
|
Gt,
|
|
437
437
|
{ ...r.value, disabled: i.value, onCommand: m },
|
|
438
438
|
{
|
|
439
439
|
default: () => [w],
|
|
440
440
|
dropdown: () => [
|
|
441
441
|
ae(
|
|
442
|
-
|
|
443
|
-
() => (e.menus || []).map((
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
() => t.item ? t.item({ item:
|
|
442
|
+
Zt,
|
|
443
|
+
() => (e.menus || []).map((E, P) => ae(
|
|
444
|
+
Qt,
|
|
445
|
+
E,
|
|
446
|
+
() => t.item ? t.item({ item: E, index: P }) : E.label
|
|
447
447
|
))
|
|
448
448
|
)
|
|
449
449
|
]
|
|
450
450
|
}
|
|
451
|
-
), y = (w) => ae(
|
|
451
|
+
), y = (w) => ae(bt, { ...s.value, disabled: i.value }, () => [
|
|
452
452
|
w
|
|
453
|
-
]),
|
|
453
|
+
]), $ = v(() => {
|
|
454
454
|
let w = ae(we(ro), { ...e, onClick: d });
|
|
455
|
-
const
|
|
456
|
-
return
|
|
455
|
+
const E = t.default?.();
|
|
456
|
+
return E && E.length && (w = E[0]), u.value && (w = h(w)), r.value && (w = _(w)), s.value && (w = y(w)), w;
|
|
457
457
|
});
|
|
458
|
-
return (w,
|
|
459
|
-
class:
|
|
458
|
+
return (w, E) => (c(), z("div", {
|
|
459
|
+
class: Y(["x-action", p.value])
|
|
460
460
|
}, [
|
|
461
|
-
(
|
|
461
|
+
(c(), g(J($.value)))
|
|
462
462
|
], 2));
|
|
463
463
|
}
|
|
464
|
-
}),
|
|
464
|
+
}), co = {
|
|
465
465
|
/**
|
|
466
466
|
* 动作项
|
|
467
467
|
*/
|
|
@@ -532,10 +532,10 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
532
532
|
button: {
|
|
533
533
|
type: Object
|
|
534
534
|
}
|
|
535
|
-
}, et = /* @__PURE__ */
|
|
535
|
+
}, et = /* @__PURE__ */ I({
|
|
536
536
|
name: "XActionBar",
|
|
537
537
|
__name: "ActionBar",
|
|
538
|
-
props:
|
|
538
|
+
props: co,
|
|
539
539
|
emits: ["click", "command"],
|
|
540
540
|
setup(a, { emit: n }) {
|
|
541
541
|
const e = a, t = n, l = v(() => (e.items || []).map((r) => r === "|" ? r : {
|
|
@@ -550,20 +550,20 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
550
550
|
} : void 0
|
|
551
551
|
})), s = (r) => {
|
|
552
552
|
t("click", r);
|
|
553
|
-
},
|
|
553
|
+
}, u = (r, i) => {
|
|
554
554
|
t("command", r, i);
|
|
555
555
|
};
|
|
556
|
-
return (r, i) => (
|
|
556
|
+
return (r, i) => (c(), g(o(B), {
|
|
557
557
|
class: "x-action-bar",
|
|
558
558
|
align: "center"
|
|
559
559
|
}, {
|
|
560
560
|
default: f(() => [
|
|
561
|
-
(
|
|
562
|
-
p === "|" ? (
|
|
561
|
+
(c(!0), z(W, null, Z(l.value, (p) => (c(), z(W, null, [
|
|
562
|
+
p === "|" ? (c(), g(o(se), {
|
|
563
563
|
key: 0,
|
|
564
564
|
direction: "vertical",
|
|
565
565
|
class: "x-action-bar__divider"
|
|
566
|
-
})) : (
|
|
566
|
+
})) : (c(), g(o(te), A({
|
|
567
567
|
key: 1,
|
|
568
568
|
mode: e.mode,
|
|
569
569
|
size: e.size,
|
|
@@ -572,17 +572,17 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
572
572
|
background: e.background,
|
|
573
573
|
button: e.button,
|
|
574
574
|
dropdown: e.dropdown,
|
|
575
|
-
disabled: o(
|
|
575
|
+
disabled: o(Qe)(e.disabled, p).value
|
|
576
576
|
}, p, {
|
|
577
577
|
onClick: s,
|
|
578
|
-
onCommand: (d) =>
|
|
578
|
+
onCommand: (d) => u(p, d)
|
|
579
579
|
}), null, 16, ["mode", "size", "type", "circle", "background", "button", "dropdown", "disabled", "onCommand"]))
|
|
580
580
|
], 64))), 256))
|
|
581
581
|
]),
|
|
582
582
|
_: 1
|
|
583
583
|
}));
|
|
584
584
|
}
|
|
585
|
-
}),
|
|
585
|
+
}), uo = {
|
|
586
586
|
/**
|
|
587
587
|
* 组件渲染html标签
|
|
588
588
|
*/
|
|
@@ -698,10 +698,10 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
698
698
|
autoPointer: {
|
|
699
699
|
type: Boolean
|
|
700
700
|
}
|
|
701
|
-
}, B = /* @__PURE__ */
|
|
701
|
+
}, B = /* @__PURE__ */ I({
|
|
702
702
|
name: "XContainer",
|
|
703
703
|
__name: "Container",
|
|
704
|
-
props:
|
|
704
|
+
props: uo,
|
|
705
705
|
setup(a) {
|
|
706
706
|
const n = a, e = We(), t = pe(), l = v(() => {
|
|
707
707
|
const r = t?.parent;
|
|
@@ -725,19 +725,19 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
725
725
|
"is-padding": !!n.padding,
|
|
726
726
|
"is-pointer": n.autoPointer && !!e.onClick,
|
|
727
727
|
"is-gap": !!n.gap
|
|
728
|
-
})),
|
|
728
|
+
})), u = v(() => {
|
|
729
729
|
const { width: r, height: i, fit: p } = n;
|
|
730
730
|
return p ? null : {
|
|
731
|
-
width: r ?
|
|
732
|
-
height: i ?
|
|
731
|
+
width: r ? Q(r) : void 0,
|
|
732
|
+
height: i ? Q(i) : void 0
|
|
733
733
|
};
|
|
734
734
|
});
|
|
735
|
-
return (r, i) => (
|
|
736
|
-
class:
|
|
737
|
-
style: fe(
|
|
735
|
+
return (r, i) => (c(), g(J(n.tag), {
|
|
736
|
+
class: Y(["x-container", s.value]),
|
|
737
|
+
style: fe(u.value)
|
|
738
738
|
}, {
|
|
739
739
|
default: f(() => [
|
|
740
|
-
|
|
740
|
+
S(r.$slots, "default")
|
|
741
741
|
]),
|
|
742
742
|
_: 3
|
|
743
743
|
}, 8, ["class", "style"]));
|
|
@@ -766,61 +766,61 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
766
766
|
}, fo = { class: "x-header__content" }, mo = {
|
|
767
767
|
key: 0,
|
|
768
768
|
class: "x-header__actions"
|
|
769
|
-
}, go = /* @__PURE__ */
|
|
769
|
+
}, go = /* @__PURE__ */ I({
|
|
770
770
|
name: "XHeader",
|
|
771
771
|
inheritAttrs: !1,
|
|
772
772
|
__name: "Header",
|
|
773
773
|
props: po,
|
|
774
774
|
setup(a) {
|
|
775
|
-
const n = a, e = ke(
|
|
775
|
+
const n = a, e = ke(Oe(n, "icon")), t = We(), l = v(() => ({
|
|
776
776
|
[`is-size-${n.size}`]: !!n.size && n.size !== "default",
|
|
777
777
|
"is-border": n.border,
|
|
778
778
|
"is-pointer": !!t.onClick
|
|
779
779
|
}));
|
|
780
|
-
return (s,
|
|
781
|
-
class:
|
|
780
|
+
return (s, u) => (c(), g(o(B), {
|
|
781
|
+
class: Y(["x-header", l.value]),
|
|
782
782
|
justify: "space-between",
|
|
783
783
|
align: "center"
|
|
784
784
|
}, {
|
|
785
785
|
default: f(() => [
|
|
786
786
|
k(o(B), {
|
|
787
787
|
align: "center",
|
|
788
|
-
class:
|
|
788
|
+
class: Y(["x-header__wrapper", l.value]),
|
|
789
789
|
grow: "",
|
|
790
790
|
onClick: o(t).onClick
|
|
791
791
|
}, {
|
|
792
792
|
default: f(() => [
|
|
793
|
-
o(e) ? (
|
|
793
|
+
o(e) ? (c(), g(J(o(e)), {
|
|
794
794
|
key: 0,
|
|
795
795
|
class: "x-header__icon",
|
|
796
796
|
onClick: o(t).onClickIcon || o(t).onClick
|
|
797
|
-
}, null, 8, ["onClick"])) :
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
797
|
+
}, null, 8, ["onClick"])) : b("", !0),
|
|
798
|
+
F("span", fo, [
|
|
799
|
+
S(s.$slots, "default", {}, () => [
|
|
800
|
+
D(O(n.content), 1)
|
|
801
801
|
])
|
|
802
802
|
]),
|
|
803
|
-
n.more ? (
|
|
803
|
+
n.more ? (c(), g(o(de), {
|
|
804
804
|
key: 1,
|
|
805
805
|
class: "x-header__more",
|
|
806
|
-
icon: o(
|
|
807
|
-
}, null, 8, ["icon"])) :
|
|
808
|
-
n.subtitle || s.$slots.subtitle ? (
|
|
806
|
+
icon: o(bn)
|
|
807
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
808
|
+
n.subtitle || s.$slots.subtitle ? (c(), z("span", {
|
|
809
809
|
key: 2,
|
|
810
810
|
class: "x-header__subtitle",
|
|
811
|
-
onClick:
|
|
811
|
+
onClick: u[0] || (u[0] = //@ts-ignore
|
|
812
812
|
(...r) => o(t).onClick && o(t).onClick(...r))
|
|
813
813
|
}, [
|
|
814
|
-
|
|
815
|
-
|
|
814
|
+
S(s.$slots, "subtitle", {}, () => [
|
|
815
|
+
D(O(n.subtitle), 1)
|
|
816
816
|
])
|
|
817
|
-
])) :
|
|
817
|
+
])) : b("", !0)
|
|
818
818
|
]),
|
|
819
819
|
_: 3
|
|
820
820
|
}, 8, ["class", "onClick"]),
|
|
821
|
-
s.$slots.actions ? (
|
|
822
|
-
|
|
823
|
-
])) :
|
|
821
|
+
s.$slots.actions ? (c(), z("div", mo, [
|
|
822
|
+
S(s.$slots, "actions")
|
|
823
|
+
])) : b("", !0)
|
|
824
824
|
]),
|
|
825
825
|
_: 3
|
|
826
826
|
}, 8, ["class"]));
|
|
@@ -889,12 +889,12 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
889
889
|
footer: {
|
|
890
890
|
type: Object
|
|
891
891
|
}
|
|
892
|
-
},
|
|
892
|
+
}, Ie = /* @__PURE__ */ I({
|
|
893
893
|
name: "XPanel",
|
|
894
894
|
__name: "Panel",
|
|
895
895
|
props: yo,
|
|
896
896
|
setup(a, { expose: n }) {
|
|
897
|
-
const e = a, t =
|
|
897
|
+
const e = a, t = j(), l = v(() => ({
|
|
898
898
|
"x-panel--card": !!e.card,
|
|
899
899
|
"x-panel--default": !e.card,
|
|
900
900
|
[`is-${e.size}`]: !!e.size && e.size !== "default",
|
|
@@ -907,68 +907,68 @@ const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
|
907
907
|
} : {
|
|
908
908
|
...e.header,
|
|
909
909
|
size: e.size
|
|
910
|
-
}),
|
|
910
|
+
}), u = v(() => e.fit || e.height ? "auto" : void 0);
|
|
911
911
|
return n({
|
|
912
912
|
bodyRef: t
|
|
913
|
-
}), (r, i) => (
|
|
914
|
-
class:
|
|
913
|
+
}), (r, i) => (c(), g(o(B), {
|
|
914
|
+
class: Y(["x-panel", l.value]),
|
|
915
915
|
direction: "column",
|
|
916
916
|
fit: e.fit,
|
|
917
917
|
width: e.width,
|
|
918
918
|
height: e.height
|
|
919
919
|
}, {
|
|
920
920
|
default: f(() => [
|
|
921
|
-
s.value ? (
|
|
921
|
+
s.value ? (c(), g(o(B), {
|
|
922
922
|
key: 0,
|
|
923
923
|
flex: !1,
|
|
924
924
|
class: "x-panel__header"
|
|
925
925
|
}, {
|
|
926
926
|
default: f(() => [
|
|
927
|
-
|
|
928
|
-
k(o(go), le(
|
|
927
|
+
S(r.$slots, "header", {}, () => [
|
|
928
|
+
k(o(go), le(he(s.value)), {
|
|
929
929
|
default: f(() => [
|
|
930
|
-
|
|
930
|
+
S(r.$slots, "title")
|
|
931
931
|
]),
|
|
932
932
|
actions: f(() => [
|
|
933
|
-
|
|
933
|
+
S(r.$slots, "actions")
|
|
934
934
|
]),
|
|
935
935
|
_: 3
|
|
936
936
|
}, 16)
|
|
937
937
|
])
|
|
938
938
|
]),
|
|
939
939
|
_: 3
|
|
940
|
-
})) :
|
|
941
|
-
k(o(B),
|
|
940
|
+
})) : b("", !0),
|
|
941
|
+
k(o(B), A({
|
|
942
942
|
ref_key: "bodyRef",
|
|
943
943
|
ref: t,
|
|
944
944
|
flex: !1,
|
|
945
|
-
overflow:
|
|
945
|
+
overflow: u.value,
|
|
946
946
|
grow: "",
|
|
947
947
|
padding: "",
|
|
948
948
|
class: "x-panel__body"
|
|
949
949
|
}, e.body), {
|
|
950
950
|
default: f(() => [
|
|
951
|
-
|
|
951
|
+
S(r.$slots, "default")
|
|
952
952
|
]),
|
|
953
953
|
_: 3
|
|
954
954
|
}, 16, ["overflow"]),
|
|
955
|
-
r.$slots.footer ? (
|
|
955
|
+
r.$slots.footer ? (c(), g(o(B), A({
|
|
956
956
|
key: 1,
|
|
957
957
|
flex: !1,
|
|
958
958
|
padding: "",
|
|
959
959
|
class: "x-panel__footer"
|
|
960
960
|
}, e.footer), {
|
|
961
961
|
default: f(() => [
|
|
962
|
-
|
|
962
|
+
S(r.$slots, "footer")
|
|
963
963
|
]),
|
|
964
964
|
_: 3
|
|
965
|
-
}, 16)) :
|
|
965
|
+
}, 16)) : b("", !0)
|
|
966
966
|
]),
|
|
967
967
|
_: 3
|
|
968
968
|
}, 8, ["class", "fit", "width", "height"]));
|
|
969
969
|
}
|
|
970
|
-
}),
|
|
971
|
-
class
|
|
970
|
+
}), ct = "user-select-none";
|
|
971
|
+
class ut {
|
|
972
972
|
constructor(n, e = {}) {
|
|
973
973
|
this.el = n, this.options = e, this.scope = ft(), this.scope.run(() => {
|
|
974
974
|
this.init();
|
|
@@ -985,38 +985,38 @@ class ct {
|
|
|
985
985
|
return typeof n == "string" ? document.querySelector(n) : o(n) || document.body;
|
|
986
986
|
}
|
|
987
987
|
init() {
|
|
988
|
-
const { el: n, options: e } = this, { disabled: t, delay: l = 150, onStart: s, onEnd:
|
|
988
|
+
const { el: n, options: e } = this, { disabled: t, delay: l = 150, onStart: s, onEnd: u } = e;
|
|
989
989
|
if (t)
|
|
990
990
|
return;
|
|
991
991
|
let r = null;
|
|
992
992
|
const i = this.getHandle(), p = this.getTarget();
|
|
993
993
|
let d = n.getBoundingClientRect(), m = null;
|
|
994
|
-
const { x:
|
|
994
|
+
const { x: h, y: _ } = On(n, {
|
|
995
995
|
initialValue: { x: d.x, y: d.y },
|
|
996
996
|
...e,
|
|
997
997
|
handle: i,
|
|
998
|
-
onStart: (y,
|
|
999
|
-
document.body.classList.add(
|
|
1000
|
-
this.dragging = !0, d = n.getBoundingClientRect(), m = p?.getBoundingClientRect(), s && s(y,
|
|
998
|
+
onStart: (y, $) => {
|
|
999
|
+
document.body.classList.add(ct), clearTimeout(r), r = setTimeout(() => {
|
|
1000
|
+
this.dragging = !0, d = n.getBoundingClientRect(), m = p?.getBoundingClientRect(), s && s(y, $);
|
|
1001
1001
|
}, l);
|
|
1002
1002
|
},
|
|
1003
|
-
onEnd: (y,
|
|
1004
|
-
if (clearTimeout(r), document.body.classList.remove(
|
|
1003
|
+
onEnd: (y, $) => {
|
|
1004
|
+
if (clearTimeout(r), document.body.classList.remove(ct), this.dragging && m) {
|
|
1005
1005
|
this.dragging = !1;
|
|
1006
|
-
const { x: w, y:
|
|
1007
|
-
|
|
1006
|
+
const { x: w, y: E } = y, P = this.getPosition(m, d, w, E);
|
|
1007
|
+
u && u(P, $), m = null;
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
});
|
|
1011
|
-
|
|
1011
|
+
K([h, _], () => {
|
|
1012
1012
|
if (this.dragging && m) {
|
|
1013
|
-
const y = this.getPosition(m, d,
|
|
1013
|
+
const y = this.getPosition(m, d, h.value, _.value);
|
|
1014
1014
|
n.style.left = `${y.x}px`, n.style.top = `${y.y}px`;
|
|
1015
1015
|
}
|
|
1016
1016
|
});
|
|
1017
1017
|
}
|
|
1018
1018
|
getPosition(n, e, t, l) {
|
|
1019
|
-
const { edge: s = 50 } = this.options,
|
|
1019
|
+
const { edge: s = 50 } = this.options, u = -e.width + s, r = n.width - s, i = 0, p = n.height - s, d = Math.min(r, Math.max(t, u)), m = Math.min(p, Math.max(l, i));
|
|
1020
1020
|
return {
|
|
1021
1021
|
x: d,
|
|
1022
1022
|
y: m
|
|
@@ -1028,19 +1028,19 @@ class ct {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
const vo = {
|
|
1030
1030
|
mounted(a, n) {
|
|
1031
|
-
const e = n.value || {}, t = new
|
|
1031
|
+
const e = n.value || {}, t = new ut(a, e);
|
|
1032
1032
|
a.__draggable__ = t;
|
|
1033
1033
|
},
|
|
1034
1034
|
updated(a, n) {
|
|
1035
1035
|
const e = n.value || {};
|
|
1036
1036
|
let t = a.__draggable__;
|
|
1037
|
-
t && !
|
|
1037
|
+
t && !qe(t.options, e) && (t.destory(), a.__draggable__ = new ut(a, e));
|
|
1038
1038
|
},
|
|
1039
1039
|
unmounted(a) {
|
|
1040
1040
|
const n = a.__draggable__;
|
|
1041
1041
|
n && (n.destory(), a.__draggable__ = null);
|
|
1042
1042
|
}
|
|
1043
|
-
},
|
|
1043
|
+
}, Le = "user-select-none";
|
|
1044
1044
|
class dt {
|
|
1045
1045
|
constructor(n, e = {}) {
|
|
1046
1046
|
this.el = n, this.options = e, this.scope = ft(), this.scope.run(() => {
|
|
@@ -1048,8 +1048,8 @@ class dt {
|
|
|
1048
1048
|
});
|
|
1049
1049
|
}
|
|
1050
1050
|
scope;
|
|
1051
|
-
resizing =
|
|
1052
|
-
direction =
|
|
1051
|
+
resizing = j(!1);
|
|
1052
|
+
direction = j("");
|
|
1053
1053
|
MIE = null;
|
|
1054
1054
|
cleanMousedown;
|
|
1055
1055
|
cleanMouseup;
|
|
@@ -1057,55 +1057,55 @@ class dt {
|
|
|
1057
1057
|
const { el: n, options: e } = this, { disabled: t, onStart: l, onEnd: s } = e;
|
|
1058
1058
|
if (t)
|
|
1059
1059
|
return;
|
|
1060
|
-
this.MIE =
|
|
1060
|
+
this.MIE = jn(n), this.cleanMousedown = je(document, "mousedown", () => {
|
|
1061
1061
|
this.direction?.value && this.MIE && (this.resizing.value = !0, n.classList.add("is-resizing", `is-${this.direction.value}-resizing`), l && l(this.direction.value, this.MIE));
|
|
1062
|
-
}), this.cleanMouseup =
|
|
1062
|
+
}), this.cleanMouseup = je(document, "mouseup", () => {
|
|
1063
1063
|
this.resizing.value && this.direction?.value && this.MIE && (n.classList.remove(
|
|
1064
1064
|
"is-resizing",
|
|
1065
1065
|
`is-${this.direction.value}-resizing`
|
|
1066
1066
|
), s && s(this.direction.value, this.MIE)), this.resizing.value = !1;
|
|
1067
|
-
}),
|
|
1067
|
+
}), K(this.direction, (i) => {
|
|
1068
1068
|
const p = document.body;
|
|
1069
|
-
p.style.cursor = i ? `${i}-resize` : "", i ? p.classList.add(
|
|
1069
|
+
p.style.cursor = i ? `${i}-resize` : "", i ? p.classList.add(Le) : p.classList.remove(Le);
|
|
1070
1070
|
});
|
|
1071
|
-
const { x:
|
|
1072
|
-
|
|
1071
|
+
const { x: u, y: r } = this.MIE;
|
|
1072
|
+
K([u, r], () => {
|
|
1073
1073
|
this.resizing.value ? this.resize() : this.direction.value = this.getDirection();
|
|
1074
1074
|
});
|
|
1075
1075
|
}
|
|
1076
1076
|
resize() {
|
|
1077
|
-
const { MIE: n, direction: e, resizing: t, options: l, el: s } = this,
|
|
1078
|
-
if (!n || !t.value || !
|
|
1077
|
+
const { MIE: n, direction: e, resizing: t, options: l, el: s } = this, u = e?.value || "";
|
|
1078
|
+
if (!n || !t.value || !u)
|
|
1079
1079
|
return;
|
|
1080
|
-
const { x: r, y: i, elementX: p, elementY: d, elementHeight: m, elementWidth:
|
|
1080
|
+
const { x: r, y: i, elementX: p, elementY: d, elementHeight: m, elementWidth: h } = n, { onResizing: _ } = l, {
|
|
1081
1081
|
minWidth: y = 0,
|
|
1082
|
-
minHeight:
|
|
1082
|
+
minHeight: $ = 0,
|
|
1083
1083
|
maxWidth: w = 99999,
|
|
1084
|
-
maxHeight:
|
|
1084
|
+
maxHeight: E = 99999
|
|
1085
1085
|
} = l;
|
|
1086
|
-
if (
|
|
1087
|
-
const
|
|
1088
|
-
s.style.width = `${
|
|
1086
|
+
if (u.includes("e")) {
|
|
1087
|
+
const P = Math.min(Math.max(p.value, y), w);
|
|
1088
|
+
s.style.width = `${P}px`;
|
|
1089
1089
|
}
|
|
1090
|
-
if (
|
|
1091
|
-
const
|
|
1092
|
-
s.style.height = `${
|
|
1090
|
+
if (u.includes("s")) {
|
|
1091
|
+
const P = Math.min(Math.max(d.value, $), E);
|
|
1092
|
+
s.style.height = `${P}px`;
|
|
1093
1093
|
}
|
|
1094
|
-
if (
|
|
1095
|
-
const
|
|
1096
|
-
Math.max(
|
|
1094
|
+
if (u.includes("w")) {
|
|
1095
|
+
const P = Math.min(
|
|
1096
|
+
Math.max(h.value - p.value, y),
|
|
1097
1097
|
w
|
|
1098
1098
|
);
|
|
1099
|
-
s.style.width = `${
|
|
1099
|
+
s.style.width = `${P}px`, s.style.left = `${r.value}px`;
|
|
1100
1100
|
}
|
|
1101
|
-
if (
|
|
1102
|
-
const
|
|
1103
|
-
Math.max(m.value - d.value,
|
|
1104
|
-
|
|
1101
|
+
if (u.includes("n")) {
|
|
1102
|
+
const P = Math.min(
|
|
1103
|
+
Math.max(m.value - d.value, $),
|
|
1104
|
+
E
|
|
1105
1105
|
);
|
|
1106
|
-
this.el.style.height = `${
|
|
1106
|
+
this.el.style.height = `${P}px`, this.el.style.top = `${i.value}px`;
|
|
1107
1107
|
}
|
|
1108
|
-
_ && _(
|
|
1108
|
+
_ && _(u, n);
|
|
1109
1109
|
}
|
|
1110
1110
|
getDirection() {
|
|
1111
1111
|
if (!this.MIE)
|
|
@@ -1113,16 +1113,16 @@ class dt {
|
|
|
1113
1113
|
const { elementX: n, elementY: e, elementHeight: t, elementWidth: l, isOutside: s } = this.MIE;
|
|
1114
1114
|
if (s.value)
|
|
1115
1115
|
return "";
|
|
1116
|
-
const { dirs:
|
|
1116
|
+
const { dirs: u = ["n", "s", "w", "e"], edge: r = 5 } = this.options;
|
|
1117
1117
|
let i = "";
|
|
1118
|
-
return
|
|
1118
|
+
return u.includes("n") && e.value <= r ? i += "n" : u.includes("s") && e.value > t.value - r && (i += "s"), u.includes("w") && n.value <= r ? i += "w" : u.includes("e") && n.value > l.value - r && (i += "e"), i;
|
|
1119
1119
|
}
|
|
1120
1120
|
destory() {
|
|
1121
1121
|
const n = document.body;
|
|
1122
|
-
n.style.cursor = "", n.classList.remove(
|
|
1122
|
+
n.style.cursor = "", n.classList.remove(Le), this.cleanMousedown && this.cleanMousedown(), this.cleanMouseup && this.cleanMouseup(), this.MIE?.stop(), this.scope.stop();
|
|
1123
1123
|
}
|
|
1124
1124
|
}
|
|
1125
|
-
const
|
|
1125
|
+
const Vt = {
|
|
1126
1126
|
mounted(a, n) {
|
|
1127
1127
|
const e = n.value || {}, t = new dt(a, e);
|
|
1128
1128
|
a.__resizable__ = t;
|
|
@@ -1130,13 +1130,13 @@ const Pt = {
|
|
|
1130
1130
|
updated(a, n) {
|
|
1131
1131
|
const e = n.value || {};
|
|
1132
1132
|
let t = a.__resizable__;
|
|
1133
|
-
t && !
|
|
1133
|
+
t && !qe(t.options, e) && (t.destory(), a.__resizable__ = new dt(a, e));
|
|
1134
1134
|
},
|
|
1135
1135
|
unmounted(a) {
|
|
1136
1136
|
const n = a.__resizable__;
|
|
1137
1137
|
n && (n.destory(), a.__resizable__ = null);
|
|
1138
1138
|
}
|
|
1139
|
-
},
|
|
1139
|
+
}, bo = {
|
|
1140
1140
|
modelValue: {
|
|
1141
1141
|
type: Boolean,
|
|
1142
1142
|
default: !0
|
|
@@ -1221,9 +1221,9 @@ const Pt = {
|
|
|
1221
1221
|
type: Boolean
|
|
1222
1222
|
}
|
|
1223
1223
|
};
|
|
1224
|
-
let
|
|
1225
|
-
function
|
|
1226
|
-
const { width: e, height: t } =
|
|
1224
|
+
let be = 1e3;
|
|
1225
|
+
function ho(a, n) {
|
|
1226
|
+
const { width: e, height: t } = zt(n), l = Re({
|
|
1227
1227
|
mode: a.mode || "normal",
|
|
1228
1228
|
wrapperWidth: 0,
|
|
1229
1229
|
wrapperHeight: 0,
|
|
@@ -1231,14 +1231,14 @@ function bo(a, n) {
|
|
|
1231
1231
|
height: 0,
|
|
1232
1232
|
top: 0,
|
|
1233
1233
|
left: 0,
|
|
1234
|
-
zIndex: ++
|
|
1234
|
+
zIndex: ++be,
|
|
1235
1235
|
dragging: !1,
|
|
1236
1236
|
resizing: !1
|
|
1237
1237
|
});
|
|
1238
|
-
return
|
|
1239
|
-
l.wrapperWidth = s, l.wrapperHeight =
|
|
1240
|
-
}),
|
|
1241
|
-
|
|
1238
|
+
return K([e, t], ([s, u]) => {
|
|
1239
|
+
l.wrapperWidth = s, l.wrapperHeight = u, l.width = Me(a.width, s), l.height = Me(a.height, u), l.left = a.left ? Me(a.left, s) - l.width / 2 : Math.max(Math.floor((s - l.width) / 2), 0), l.top = a.top ? Me(a.top, u) : Math.max(Math.floor((u - l.height) / 2), 0);
|
|
1240
|
+
}), K(l, (s) => {
|
|
1241
|
+
be = Math.max(s.zIndex, be);
|
|
1242
1242
|
}), {
|
|
1243
1243
|
state: l,
|
|
1244
1244
|
normal: v(() => l.mode === "normal"),
|
|
@@ -1248,9 +1248,9 @@ function bo(a, n) {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
function _o(a, n) {
|
|
1250
1250
|
const e = v(() => {
|
|
1251
|
-
const { width:
|
|
1251
|
+
const { width: u, height: r, top: i, left: p, zIndex: d } = n;
|
|
1252
1252
|
return {
|
|
1253
|
-
width: `${
|
|
1253
|
+
width: `${u}px`,
|
|
1254
1254
|
height: `${r}px`,
|
|
1255
1255
|
top: `${i}px`,
|
|
1256
1256
|
left: `${p}px`,
|
|
@@ -1290,7 +1290,7 @@ function ko(a, n, e) {
|
|
|
1290
1290
|
const m = d.target.nodeName || "";
|
|
1291
1291
|
["INPUT", "TEXTAREA", "RADIO", "CHECKBOX"].includes(
|
|
1292
1292
|
m.toUpperCase()
|
|
1293
|
-
) || (n.zIndex = Math.max(n.zIndex, ++
|
|
1293
|
+
) || (n.zIndex = Math.max(n.zIndex, ++be));
|
|
1294
1294
|
},
|
|
1295
1295
|
submit: () => e("submit"),
|
|
1296
1296
|
cancel: () => {
|
|
@@ -1307,7 +1307,7 @@ function wo(a, n, e, t) {
|
|
|
1307
1307
|
target: t,
|
|
1308
1308
|
selector: ".x-panel__header",
|
|
1309
1309
|
onStart(s) {
|
|
1310
|
-
n.dragging = !0, n.zIndex = Math.max(n.zIndex, ++
|
|
1310
|
+
n.dragging = !0, n.zIndex = Math.max(n.zIndex, ++be), e("dragStart", s);
|
|
1311
1311
|
},
|
|
1312
1312
|
onMove(s) {
|
|
1313
1313
|
e("dragging", s);
|
|
@@ -1315,8 +1315,8 @@ function wo(a, n, e, t) {
|
|
|
1315
1315
|
onEnd(s) {
|
|
1316
1316
|
if (n.mode === "maximized")
|
|
1317
1317
|
return;
|
|
1318
|
-
const { x:
|
|
1319
|
-
n.left =
|
|
1318
|
+
const { x: u, y: r } = s;
|
|
1319
|
+
n.left = u, n.top = r, n.dragging = !1, e("dragEnd", s);
|
|
1320
1320
|
}
|
|
1321
1321
|
};
|
|
1322
1322
|
});
|
|
@@ -1331,7 +1331,7 @@ function xo(a, n, e) {
|
|
|
1331
1331
|
disabled: t,
|
|
1332
1332
|
dirs: ["e", "s", "w"],
|
|
1333
1333
|
onStart(l, s) {
|
|
1334
|
-
n.resizing = !0, n.zIndex = Math.max(n.zIndex, ++
|
|
1334
|
+
n.resizing = !0, n.zIndex = Math.max(n.zIndex, ++be), e("resizeStart", l, s);
|
|
1335
1335
|
},
|
|
1336
1336
|
onResizing(l, s) {
|
|
1337
1337
|
e("resizing", l, s);
|
|
@@ -1342,7 +1342,7 @@ function xo(a, n, e) {
|
|
|
1342
1342
|
};
|
|
1343
1343
|
});
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function $o(a, n) {
|
|
1346
1346
|
const e = a.componentInstance;
|
|
1347
1347
|
if (!e)
|
|
1348
1348
|
return;
|
|
@@ -1356,18 +1356,18 @@ function So(a, n) {
|
|
|
1356
1356
|
componentInstance: e
|
|
1357
1357
|
};
|
|
1358
1358
|
}
|
|
1359
|
-
const
|
|
1359
|
+
const So = ["src"], Ot = /* @__PURE__ */ I({
|
|
1360
1360
|
name: "XDialog",
|
|
1361
1361
|
__name: "Dialog",
|
|
1362
|
-
props:
|
|
1362
|
+
props: bo,
|
|
1363
1363
|
emits: ["update:modelValue", "open", "close", "destroy", "maximized", "minimized", "normal", "modeChange", "dragStart", "dragging", "dragEnd", "resizeStart", "resizeEnd", "resizing", "submit", "cancel"],
|
|
1364
1364
|
setup(a, { expose: n, emit: e }) {
|
|
1365
|
-
const t = a, l = e, s = pe(),
|
|
1365
|
+
const t = a, l = e, s = pe(), u = j(), r = j(), { state: i, maximized: p, minimized: d, normal: m } = ho(t, u), { styles: h, classes: _, wrapperClass: y, modalStyle: $ } = _o(t, i), { changeMode: w, active: E, close: P, show: C, hide: V, submit: M, cancel: N } = ko(
|
|
1366
1366
|
t,
|
|
1367
1367
|
i,
|
|
1368
1368
|
l
|
|
1369
|
-
), x = wo(t, i, l,
|
|
1370
|
-
|
|
1369
|
+
), x = wo(t, i, l, u), U = xo(t, i, l), H = $o(t, r);
|
|
1370
|
+
Ye(async () => {
|
|
1371
1371
|
t.modelValue && (await ve(), s && l("open", s));
|
|
1372
1372
|
});
|
|
1373
1373
|
const re = v(() => r.value?.$el);
|
|
@@ -1378,27 +1378,27 @@ const Co = ["src"], At = /* @__PURE__ */ V({
|
|
|
1378
1378
|
maximized: p,
|
|
1379
1379
|
minimized: d,
|
|
1380
1380
|
changeMode: w,
|
|
1381
|
-
show:
|
|
1382
|
-
hide:
|
|
1383
|
-
submit:
|
|
1381
|
+
show: C,
|
|
1382
|
+
hide: V,
|
|
1383
|
+
submit: M,
|
|
1384
1384
|
cancel: N,
|
|
1385
|
-
close:
|
|
1386
|
-
componentInstance:
|
|
1387
|
-
}), (
|
|
1385
|
+
close: P,
|
|
1386
|
+
componentInstance: H
|
|
1387
|
+
}), (q, ee) => t.modelValue ? (c(), g(yt, {
|
|
1388
1388
|
key: 0,
|
|
1389
1389
|
to: "body"
|
|
1390
1390
|
}, [
|
|
1391
|
-
|
|
1391
|
+
F("div", {
|
|
1392
1392
|
ref_key: "wrapper",
|
|
1393
|
-
ref:
|
|
1394
|
-
class:
|
|
1393
|
+
ref: u,
|
|
1394
|
+
class: Y(["x-dialog__wrapper", o(y)])
|
|
1395
1395
|
}, [
|
|
1396
|
-
t.modal ? (
|
|
1396
|
+
t.modal ? (c(), z("div", {
|
|
1397
1397
|
key: 0,
|
|
1398
1398
|
class: "x-dialog__modal",
|
|
1399
|
-
style: fe(o(
|
|
1400
|
-
}, null, 4)) :
|
|
1401
|
-
G((
|
|
1399
|
+
style: fe(o($))
|
|
1400
|
+
}, null, 4)) : b("", !0),
|
|
1401
|
+
G((c(), g(o(Ie), A({
|
|
1402
1402
|
ref_key: "panelRef",
|
|
1403
1403
|
ref: r,
|
|
1404
1404
|
class: ["x-dialog", o(_)],
|
|
@@ -1408,101 +1408,101 @@ const Co = ["src"], At = /* @__PURE__ */ V({
|
|
|
1408
1408
|
width: "800px",
|
|
1409
1409
|
height: "600px",
|
|
1410
1410
|
footer: { justify: "space-between", flex: !0, align: "center" },
|
|
1411
|
-
style: o(
|
|
1411
|
+
style: o(h),
|
|
1412
1412
|
size: t.size,
|
|
1413
1413
|
body: { padding: t.bodyPadding },
|
|
1414
|
-
onClick: o(
|
|
1415
|
-
},
|
|
1414
|
+
onClick: o(E)
|
|
1415
|
+
}, q.$attrs), ue({
|
|
1416
1416
|
title: f(() => [
|
|
1417
|
-
|
|
1417
|
+
D(O(t.title), 1)
|
|
1418
1418
|
]),
|
|
1419
1419
|
actions: f(() => [
|
|
1420
|
-
|
|
1421
|
-
t.minimizable ? (
|
|
1420
|
+
S(q.$slots, "actions"),
|
|
1421
|
+
t.minimizable ? (c(), g(o(te), {
|
|
1422
1422
|
key: 0,
|
|
1423
|
-
icon: o(
|
|
1423
|
+
icon: o(hn),
|
|
1424
1424
|
size: t.size,
|
|
1425
1425
|
mode: "icon",
|
|
1426
1426
|
type: "primary",
|
|
1427
1427
|
background: "hover",
|
|
1428
|
-
onClick: ee[0] || (ee[0] = (
|
|
1429
|
-
}, null, 8, ["icon", "size"])) :
|
|
1430
|
-
t.maximizable ? (
|
|
1431
|
-
o(m) ? (
|
|
1428
|
+
onClick: ee[0] || (ee[0] = (ce) => o(w)("minimized"))
|
|
1429
|
+
}, null, 8, ["icon", "size"])) : b("", !0),
|
|
1430
|
+
t.maximizable ? (c(), z(W, { key: 1 }, [
|
|
1431
|
+
o(m) ? (c(), g(o(te), {
|
|
1432
1432
|
key: 1,
|
|
1433
1433
|
icon: o(kn),
|
|
1434
1434
|
size: t.size,
|
|
1435
1435
|
mode: "icon",
|
|
1436
1436
|
type: "primary",
|
|
1437
1437
|
background: "hover",
|
|
1438
|
-
onClick: ee[2] || (ee[2] = (
|
|
1439
|
-
}, null, 8, ["icon", "size"])) : (
|
|
1438
|
+
onClick: ee[2] || (ee[2] = (ce) => o(w)("maximized"))
|
|
1439
|
+
}, null, 8, ["icon", "size"])) : (c(), g(o(te), {
|
|
1440
1440
|
key: 0,
|
|
1441
1441
|
icon: o(_n),
|
|
1442
1442
|
size: t.size,
|
|
1443
1443
|
mode: "icon",
|
|
1444
1444
|
type: "primary",
|
|
1445
1445
|
background: "hover",
|
|
1446
|
-
onClick: ee[1] || (ee[1] = (
|
|
1446
|
+
onClick: ee[1] || (ee[1] = (ce) => o(w)("normal"))
|
|
1447
1447
|
}, null, 8, ["icon", "size"]))
|
|
1448
|
-
], 64)) :
|
|
1449
|
-
t.closable ? (
|
|
1448
|
+
], 64)) : b("", !0),
|
|
1449
|
+
t.closable ? (c(), g(o(te), {
|
|
1450
1450
|
key: 2,
|
|
1451
1451
|
icon: o(wn),
|
|
1452
1452
|
size: t.size,
|
|
1453
1453
|
mode: "icon",
|
|
1454
1454
|
type: "danger",
|
|
1455
1455
|
background: "hover",
|
|
1456
|
-
onClick: o(
|
|
1457
|
-
}, null, 8, ["icon", "size", "onClick"])) :
|
|
1456
|
+
onClick: o(P)
|
|
1457
|
+
}, null, 8, ["icon", "size", "onClick"])) : b("", !0)
|
|
1458
1458
|
]),
|
|
1459
1459
|
default: f(() => [
|
|
1460
|
-
|
|
1461
|
-
t.content ? (
|
|
1462
|
-
t.src ? (
|
|
1460
|
+
S(q.$slots, "default", {}, () => [
|
|
1461
|
+
t.content ? (c(), g(J(t.content), { key: 0 })) : b("", !0),
|
|
1462
|
+
t.src ? (c(), z("iframe", {
|
|
1463
1463
|
key: 1,
|
|
1464
1464
|
src: t.src,
|
|
1465
1465
|
class: "x-dialog__frame"
|
|
1466
|
-
}, null, 8,
|
|
1466
|
+
}, null, 8, So)) : b("", !0)
|
|
1467
1467
|
])
|
|
1468
1468
|
]),
|
|
1469
1469
|
_: 2
|
|
1470
1470
|
}, [
|
|
1471
|
-
t.cancel || t.submit ||
|
|
1471
|
+
t.cancel || t.submit || q.$slots.footer || q.$slots.extra || q.$slots.handle ? {
|
|
1472
1472
|
name: "footer",
|
|
1473
1473
|
fn: f(() => [
|
|
1474
|
-
|
|
1474
|
+
S(q.$slots, "footer", {}, () => [
|
|
1475
1475
|
k(o(B), { align: "center" }, {
|
|
1476
1476
|
default: f(() => [
|
|
1477
|
-
|
|
1477
|
+
S(q.$slots, "extra")
|
|
1478
1478
|
]),
|
|
1479
1479
|
_: 3
|
|
1480
1480
|
}),
|
|
1481
1481
|
k(o(B), { align: "center" }, {
|
|
1482
1482
|
default: f(() => [
|
|
1483
|
-
|
|
1484
|
-
t.cancel ? (
|
|
1483
|
+
S(q.$slots, "handle"),
|
|
1484
|
+
t.cancel ? (c(), g(o(ie), {
|
|
1485
1485
|
key: 0,
|
|
1486
1486
|
type: "default",
|
|
1487
1487
|
size: t.size,
|
|
1488
1488
|
onClick: o(N)
|
|
1489
1489
|
}, {
|
|
1490
1490
|
default: f(() => [
|
|
1491
|
-
|
|
1491
|
+
D(O(typeof t.cancel == "string" ? t.cancel : "取消"), 1)
|
|
1492
1492
|
]),
|
|
1493
1493
|
_: 1
|
|
1494
|
-
}, 8, ["size", "onClick"])) :
|
|
1495
|
-
t.submit ? (
|
|
1494
|
+
}, 8, ["size", "onClick"])) : b("", !0),
|
|
1495
|
+
t.submit ? (c(), g(o(ie), {
|
|
1496
1496
|
key: 1,
|
|
1497
1497
|
type: "primary",
|
|
1498
1498
|
size: t.size,
|
|
1499
|
-
onClick: o(
|
|
1499
|
+
onClick: o(M)
|
|
1500
1500
|
}, {
|
|
1501
1501
|
default: f(() => [
|
|
1502
|
-
|
|
1502
|
+
D(O(typeof t.submit == "string" ? t.submit : "确定"), 1)
|
|
1503
1503
|
]),
|
|
1504
1504
|
_: 1
|
|
1505
|
-
}, 8, ["size", "onClick"])) :
|
|
1505
|
+
}, 8, ["size", "onClick"])) : b("", !0)
|
|
1506
1506
|
]),
|
|
1507
1507
|
_: 3
|
|
1508
1508
|
})
|
|
@@ -1512,14 +1512,14 @@ const Co = ["src"], At = /* @__PURE__ */ V({
|
|
|
1512
1512
|
} : void 0
|
|
1513
1513
|
]), 1040, ["header", "class", "style", "size", "body", "onClick"])), [
|
|
1514
1514
|
[o(vo), o(x)],
|
|
1515
|
-
[o(
|
|
1515
|
+
[o(Vt), o(U)]
|
|
1516
1516
|
])
|
|
1517
1517
|
], 2)
|
|
1518
|
-
])) :
|
|
1518
|
+
])) : b("", !0);
|
|
1519
1519
|
}
|
|
1520
1520
|
});
|
|
1521
1521
|
function tt(a, n) {
|
|
1522
|
-
const e = document.createElement("div"), t = k(
|
|
1522
|
+
const e = document.createElement("div"), t = k(Ot, a);
|
|
1523
1523
|
t.appContext = n ?? tt._context, nt(t, e);
|
|
1524
1524
|
const l = () => {
|
|
1525
1525
|
nt(null, e), e.parentNode?.removeChild(e);
|
|
@@ -1531,21 +1531,21 @@ function tt(a, n) {
|
|
|
1531
1531
|
destroy: l
|
|
1532
1532
|
};
|
|
1533
1533
|
}
|
|
1534
|
-
const
|
|
1534
|
+
const Co = /* @__PURE__ */ F("div", { class: "x-mask-sidebar__helper" }, null, -1), zo = /* @__PURE__ */ I({
|
|
1535
1535
|
__name: "Sidebar",
|
|
1536
1536
|
props: {
|
|
1537
1537
|
collapsed: { type: Boolean }
|
|
1538
1538
|
},
|
|
1539
1539
|
setup(a) {
|
|
1540
1540
|
const n = a;
|
|
1541
|
-
return (e, t) => G((
|
|
1542
|
-
class:
|
|
1541
|
+
return (e, t) => G((c(), g(o(B), {
|
|
1542
|
+
class: Y(["x-mask-sidebar", { "is-collapsed": n.collapsed }]),
|
|
1543
1543
|
grow: !1,
|
|
1544
1544
|
flex: "",
|
|
1545
1545
|
direction: "column"
|
|
1546
1546
|
}, {
|
|
1547
1547
|
default: f(() => [
|
|
1548
|
-
|
|
1548
|
+
S(e.$slots, "brand"),
|
|
1549
1549
|
k(o(B), {
|
|
1550
1550
|
class: "x-mask-sidebar__wrapper",
|
|
1551
1551
|
flex: "",
|
|
@@ -1555,15 +1555,15 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1555
1555
|
align: "center"
|
|
1556
1556
|
}, {
|
|
1557
1557
|
default: f(() => [
|
|
1558
|
-
|
|
1559
|
-
|
|
1558
|
+
S(e.$slots, "default"),
|
|
1559
|
+
Co
|
|
1560
1560
|
]),
|
|
1561
1561
|
_: 3
|
|
1562
1562
|
})
|
|
1563
1563
|
]),
|
|
1564
1564
|
_: 3
|
|
1565
1565
|
}, 8, ["class"])), [
|
|
1566
|
-
[o(
|
|
1566
|
+
[o(Vt), {
|
|
1567
1567
|
dirs: ["e"],
|
|
1568
1568
|
disabled: n.collapsed,
|
|
1569
1569
|
maxWidth: 500,
|
|
@@ -1571,7 +1571,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1571
1571
|
}]
|
|
1572
1572
|
]);
|
|
1573
1573
|
}
|
|
1574
|
-
}),
|
|
1574
|
+
}), Mo = /* @__PURE__ */ I({
|
|
1575
1575
|
__name: "SwitchBar",
|
|
1576
1576
|
props: {
|
|
1577
1577
|
collasped: { type: Boolean, default: !1 },
|
|
@@ -1584,7 +1584,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1584
1584
|
"update:favorite"
|
|
1585
1585
|
],
|
|
1586
1586
|
setup(a, { emit: n }) {
|
|
1587
|
-
const e = a, t = n, l =
|
|
1587
|
+
const e = a, t = n, l = j(!1), s = j(""), u = j(!1), r = () => {
|
|
1588
1588
|
l.value = !0;
|
|
1589
1589
|
}, i = () => {
|
|
1590
1590
|
s.value = "", l.value = !1, t("update:keyword", s.value);
|
|
@@ -1593,30 +1593,30 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1593
1593
|
}, d = () => {
|
|
1594
1594
|
t("update:keyword", s.value);
|
|
1595
1595
|
}, m = () => {
|
|
1596
|
-
t("update:favorite",
|
|
1596
|
+
t("update:favorite", u.value);
|
|
1597
1597
|
};
|
|
1598
|
-
return (
|
|
1598
|
+
return (h, _) => (c(), g(o(B), {
|
|
1599
1599
|
class: "x-mask-switch-bar",
|
|
1600
1600
|
justify: "space-between",
|
|
1601
1601
|
align: "center"
|
|
1602
1602
|
}, {
|
|
1603
1603
|
default: f(() => [
|
|
1604
|
-
e.collasped ?
|
|
1604
|
+
e.collasped ? b("", !0) : (c(), g(o(B), {
|
|
1605
1605
|
key: 0,
|
|
1606
1606
|
class: "x-mask-switch-bar__left",
|
|
1607
1607
|
grow: ""
|
|
1608
1608
|
}, {
|
|
1609
1609
|
default: f(() => [
|
|
1610
|
-
l.value ?
|
|
1610
|
+
l.value ? b("", !0) : (c(), g(o(Je), {
|
|
1611
1611
|
key: 0,
|
|
1612
|
-
modelValue:
|
|
1613
|
-
"onUpdate:modelValue": _[0] || (_[0] = (y) =>
|
|
1612
|
+
modelValue: u.value,
|
|
1613
|
+
"onUpdate:modelValue": _[0] || (_[0] = (y) => u.value = y),
|
|
1614
1614
|
class: "x-mask-switch-bar__switch",
|
|
1615
|
-
"active-icon": o(
|
|
1615
|
+
"active-icon": o($t),
|
|
1616
1616
|
"inactive-icon": o(xn),
|
|
1617
1617
|
onChange: m
|
|
1618
1618
|
}, null, 8, ["modelValue", "active-icon", "inactive-icon"])),
|
|
1619
|
-
l.value ? (
|
|
1619
|
+
l.value ? (c(), g(o(_e), {
|
|
1620
1620
|
key: 1,
|
|
1621
1621
|
modelValue: s.value,
|
|
1622
1622
|
"onUpdate:modelValue": _[1] || (_[1] = (y) => s.value = y),
|
|
@@ -1624,47 +1624,47 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1624
1624
|
size: "small",
|
|
1625
1625
|
placeholder: "请输入查询关键字",
|
|
1626
1626
|
onInput: d,
|
|
1627
|
-
"prefix-icon": o(
|
|
1627
|
+
"prefix-icon": o(Ke)
|
|
1628
1628
|
}, {
|
|
1629
1629
|
suffix: f(() => [
|
|
1630
1630
|
k(o(de), {
|
|
1631
|
-
icon: o(
|
|
1631
|
+
icon: o(St),
|
|
1632
1632
|
onClick: i
|
|
1633
1633
|
}, null, 8, ["icon"])
|
|
1634
1634
|
]),
|
|
1635
1635
|
_: 1
|
|
1636
|
-
}, 8, ["modelValue", "prefix-icon"])) :
|
|
1636
|
+
}, 8, ["modelValue", "prefix-icon"])) : b("", !0)
|
|
1637
1637
|
]),
|
|
1638
1638
|
_: 1
|
|
1639
1639
|
})),
|
|
1640
1640
|
k(o(B), {
|
|
1641
|
-
class:
|
|
1641
|
+
class: Y(["x-mask-switch-bar__right", { "is-collasped": e.collasped }]),
|
|
1642
1642
|
flex: "",
|
|
1643
1643
|
align: "center",
|
|
1644
1644
|
justify: "center"
|
|
1645
1645
|
}, {
|
|
1646
1646
|
default: f(() => [
|
|
1647
|
-
!l.value && !e.collasped ? (
|
|
1647
|
+
!l.value && !e.collasped ? (c(), g(o(te), {
|
|
1648
1648
|
key: 0,
|
|
1649
|
-
icon: o(
|
|
1649
|
+
icon: o(Ke),
|
|
1650
1650
|
mode: "icon",
|
|
1651
1651
|
background: "hover",
|
|
1652
1652
|
size: "default",
|
|
1653
1653
|
circle: "",
|
|
1654
1654
|
onClick: r
|
|
1655
|
-
}, null, 8, ["icon"])) :
|
|
1656
|
-
e.collasped ? (
|
|
1655
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
1656
|
+
e.collasped ? (c(), g(o(te), {
|
|
1657
1657
|
key: 1,
|
|
1658
|
-
icon: o(
|
|
1658
|
+
icon: o($n),
|
|
1659
1659
|
mode: "icon",
|
|
1660
1660
|
size: "default",
|
|
1661
1661
|
background: "hover",
|
|
1662
1662
|
onClick: p,
|
|
1663
1663
|
circle: ""
|
|
1664
|
-
}, null, 8, ["icon"])) :
|
|
1665
|
-
e.collasped ?
|
|
1664
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
1665
|
+
e.collasped ? b("", !0) : (c(), g(o(te), {
|
|
1666
1666
|
key: 2,
|
|
1667
|
-
icon: o(
|
|
1667
|
+
icon: o(Sn),
|
|
1668
1668
|
mode: "icon",
|
|
1669
1669
|
size: "default",
|
|
1670
1670
|
background: "hover",
|
|
@@ -1678,7 +1678,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1678
1678
|
_: 1
|
|
1679
1679
|
}));
|
|
1680
1680
|
}
|
|
1681
|
-
}),
|
|
1681
|
+
}), To = ["src"], Eo = { key: 0 }, Po = /* @__PURE__ */ I({
|
|
1682
1682
|
__name: "Brand",
|
|
1683
1683
|
props: {
|
|
1684
1684
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -1687,11 +1687,11 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1687
1687
|
url: {}
|
|
1688
1688
|
},
|
|
1689
1689
|
setup(a) {
|
|
1690
|
-
const n = a, e =
|
|
1690
|
+
const n = a, e = Ze(), t = () => {
|
|
1691
1691
|
n.url && e.push(n.url);
|
|
1692
1692
|
};
|
|
1693
|
-
return (l, s) => (
|
|
1694
|
-
class:
|
|
1693
|
+
return (l, s) => (c(), g(o(B), {
|
|
1694
|
+
class: Y(["x-mask-brand", { "is-collapsed": n.collapsed }]),
|
|
1695
1695
|
align: "center"
|
|
1696
1696
|
}, {
|
|
1697
1697
|
default: f(() => [
|
|
@@ -1703,11 +1703,11 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1703
1703
|
onClick: t
|
|
1704
1704
|
}, {
|
|
1705
1705
|
default: f(() => [
|
|
1706
|
-
|
|
1707
|
-
n.logo ? (
|
|
1706
|
+
S(l.$slots, "logo", {}, () => [
|
|
1707
|
+
n.logo ? (c(), z("img", {
|
|
1708
1708
|
key: 0,
|
|
1709
1709
|
src: n.logo
|
|
1710
|
-
}, null, 8,
|
|
1710
|
+
}, null, 8, To)) : b("", !0)
|
|
1711
1711
|
])
|
|
1712
1712
|
]),
|
|
1713
1713
|
_: 3
|
|
@@ -1718,11 +1718,11 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1718
1718
|
align: "center"
|
|
1719
1719
|
}, {
|
|
1720
1720
|
default: f(() => [
|
|
1721
|
-
n.title ? (
|
|
1722
|
-
|
|
1723
|
-
|
|
1721
|
+
n.title ? (c(), z("span", Eo, [
|
|
1722
|
+
S(l.$slots, "title", {}, () => [
|
|
1723
|
+
D(O(n.title), 1)
|
|
1724
1724
|
])
|
|
1725
|
-
])) :
|
|
1725
|
+
])) : b("", !0)
|
|
1726
1726
|
]),
|
|
1727
1727
|
_: 3
|
|
1728
1728
|
})
|
|
@@ -1730,7 +1730,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1730
1730
|
_: 3
|
|
1731
1731
|
}, 8, ["class"]));
|
|
1732
1732
|
}
|
|
1733
|
-
}),
|
|
1733
|
+
}), Te = "__favorites__", Ee = "__search__", Bo = /* @__PURE__ */ I({
|
|
1734
1734
|
__name: "Menu",
|
|
1735
1735
|
props: {
|
|
1736
1736
|
collapse: { type: Boolean, default: !1 },
|
|
@@ -1743,14 +1743,14 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1743
1743
|
},
|
|
1744
1744
|
emits: ["select"],
|
|
1745
1745
|
setup(a, { emit: n }) {
|
|
1746
|
-
const e = a, t = v(() => e.menus || []), l = n, s = v(() => String(e.active?.id)),
|
|
1746
|
+
const e = a, t = v(() => e.menus || []), l = n, s = v(() => String(e.active?.id)), u = v(() => [
|
|
1747
1747
|
{
|
|
1748
|
-
id:
|
|
1748
|
+
id: Te,
|
|
1749
1749
|
title: "收藏",
|
|
1750
|
-
icon:
|
|
1750
|
+
icon: Ct,
|
|
1751
1751
|
children: e.favorites?.length ? e.favorites : [
|
|
1752
1752
|
{
|
|
1753
|
-
id:
|
|
1753
|
+
id: Te + "empty",
|
|
1754
1754
|
disabled: !0,
|
|
1755
1755
|
title: "暂无收藏菜单"
|
|
1756
1756
|
}
|
|
@@ -1760,12 +1760,12 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1760
1760
|
const p = (e.keyword || "").trim(), d = p ? (e.flatMenus || []).filter((m) => m.title?.includes(p)) : [];
|
|
1761
1761
|
return [
|
|
1762
1762
|
{
|
|
1763
|
-
id:
|
|
1763
|
+
id: Ee,
|
|
1764
1764
|
title: "搜索",
|
|
1765
|
-
icon:
|
|
1765
|
+
icon: Ke,
|
|
1766
1766
|
children: d?.length ? d : [
|
|
1767
1767
|
{
|
|
1768
|
-
id:
|
|
1768
|
+
id: Ee + "empty",
|
|
1769
1769
|
disabled: !0,
|
|
1770
1770
|
title: "查询匹配不到菜单项"
|
|
1771
1771
|
}
|
|
@@ -1775,7 +1775,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1775
1775
|
}), i = (p) => {
|
|
1776
1776
|
l("select", p);
|
|
1777
1777
|
};
|
|
1778
|
-
return (p, d) => (
|
|
1778
|
+
return (p, d) => (c(), z(W, null, [
|
|
1779
1779
|
G(k(o(B), {
|
|
1780
1780
|
class: "x-mask-menu",
|
|
1781
1781
|
grow: "",
|
|
@@ -1813,7 +1813,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1813
1813
|
}, null, 8, ["data", "default-icon", "default-active"]), [
|
|
1814
1814
|
[oe, !e.collapse]
|
|
1815
1815
|
]),
|
|
1816
|
-
t.value.length ?
|
|
1816
|
+
t.value.length ? b("", !0) : (c(), g(o(ht), {
|
|
1817
1817
|
key: 0,
|
|
1818
1818
|
description: "暂无菜单数据"
|
|
1819
1819
|
}))
|
|
@@ -1837,12 +1837,12 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1837
1837
|
showTimeout: 200,
|
|
1838
1838
|
hideTimeout: 200
|
|
1839
1839
|
},
|
|
1840
|
-
data:
|
|
1840
|
+
data: u.value,
|
|
1841
1841
|
"default-icon": o(me),
|
|
1842
1842
|
collapse: !0,
|
|
1843
1843
|
"collapse-transition": !1,
|
|
1844
1844
|
"default-active": s.value,
|
|
1845
|
-
"default-openeds": [
|
|
1845
|
+
"default-openeds": [Te],
|
|
1846
1846
|
onSelect: i
|
|
1847
1847
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1848
1848
|
[oe, e.collapse]
|
|
@@ -1855,12 +1855,12 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1855
1855
|
showTimeout: 200,
|
|
1856
1856
|
hideTimeout: 200
|
|
1857
1857
|
},
|
|
1858
|
-
data:
|
|
1858
|
+
data: u.value,
|
|
1859
1859
|
"default-icon": o(me),
|
|
1860
1860
|
collapse: !1,
|
|
1861
1861
|
"collapse-transition": !1,
|
|
1862
1862
|
"default-active": s.value,
|
|
1863
|
-
"default-openeds": [
|
|
1863
|
+
"default-openeds": [Te],
|
|
1864
1864
|
onSelect: i
|
|
1865
1865
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1866
1866
|
[oe, !e.collapse]
|
|
@@ -1870,7 +1870,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1870
1870
|
}, 512), [
|
|
1871
1871
|
[oe, e.favorite && !e.keyword]
|
|
1872
1872
|
]),
|
|
1873
|
-
e.keyword ? G((
|
|
1873
|
+
e.keyword ? G((c(), g(o(B), {
|
|
1874
1874
|
key: 0,
|
|
1875
1875
|
class: "x-mask-menu",
|
|
1876
1876
|
grow: "",
|
|
@@ -1891,7 +1891,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1891
1891
|
collapse: !0,
|
|
1892
1892
|
"collapse-transition": !1,
|
|
1893
1893
|
"default-active": s.value,
|
|
1894
|
-
"default-openeds": [
|
|
1894
|
+
"default-openeds": [Ee],
|
|
1895
1895
|
onSelect: i
|
|
1896
1896
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1897
1897
|
[oe, e.collapse]
|
|
@@ -1909,7 +1909,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1909
1909
|
collapse: !1,
|
|
1910
1910
|
"collapse-transition": !1,
|
|
1911
1911
|
"default-active": s.value,
|
|
1912
|
-
"default-openeds": [
|
|
1912
|
+
"default-openeds": [Ee],
|
|
1913
1913
|
onSelect: i
|
|
1914
1914
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1915
1915
|
[oe, !e.collapse]
|
|
@@ -1918,16 +1918,16 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1918
1918
|
_: 1
|
|
1919
1919
|
}, 512)), [
|
|
1920
1920
|
[oe, !!e.keyword]
|
|
1921
|
-
]) :
|
|
1921
|
+
]) : b("", !0)
|
|
1922
1922
|
], 64));
|
|
1923
1923
|
}
|
|
1924
|
-
}),
|
|
1924
|
+
}), Io = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1711803009570'%20class='icon'%20viewBox='0%200%201280%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1500'%20width='320'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M557.85%201023l-122-35.4c-12.8-3.6-20-17-16.4-29.8L692.45%2017.4c3.6-12.8%2017-20%2029.8-16.4l122%2035.4c12.8%203.6%2020%2017%2016.4%2029.8L587.65%201006.6c-3.8%2012.8-17%2020.2-29.8%2016.4z%20m-228-224.4l87-92.8c9.2-9.8%208.6-25.4-1.6-34.4L234.05%20512l181.2-159.4c10.2-9%2011-24.6%201.6-34.4l-87-92.8c-9-9.6-24.2-10.2-34-1L7.65%20494.4c-10.2%209.4-10.2%2025.6%200%2035l288.2%20270.2c9.8%209.2%2025%208.8%2034-1z%20m654.4%201.2l288.2-270.2c10.2-9.4%2010.2-25.6%200-35L984.25%20224.2c-9.6-9-24.8-8.6-34%201L863.25%20318c-9.2%209.8-8.6%2025.4%201.6%2034.4L1046.05%20512l-181.2%20159.4c-10.2%209-11%2024.6-1.6%2034.4l87%2092.8c9%209.8%2024.2%2010.2%2034%201.2z'%20fill='%230157fe'%20p-id='1501'%3e%3c/path%3e%3c/svg%3e", Vo = 140, Oo = {
|
|
1925
1925
|
/**
|
|
1926
1926
|
* 系统logo
|
|
1927
1927
|
*/
|
|
1928
1928
|
logo: {
|
|
1929
1929
|
type: String,
|
|
1930
|
-
default:
|
|
1930
|
+
default: Io
|
|
1931
1931
|
},
|
|
1932
1932
|
/**
|
|
1933
1933
|
* 系统标题
|
|
@@ -2004,7 +2004,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2004
2004
|
removeFavorite: {
|
|
2005
2005
|
type: Function
|
|
2006
2006
|
}
|
|
2007
|
-
},
|
|
2007
|
+
}, jt = Symbol(), Rt = Symbol(), jo = { class: "x-mask-tabs__trigger" }, Ro = { key: 1 }, Do = ["onDragstart", "onDragend"], Ao = { key: 1 }, Fo = /* @__PURE__ */ I({
|
|
2008
2008
|
__name: "Tabs",
|
|
2009
2009
|
props: {
|
|
2010
2010
|
tabs: {},
|
|
@@ -2017,18 +2017,18 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2017
2017
|
setup(a, { emit: n }) {
|
|
2018
2018
|
const e = a, t = n, l = (d) => {
|
|
2019
2019
|
const m = !!e.favorites.find(
|
|
2020
|
-
(
|
|
2020
|
+
(h) => h === d.menu || h.id === d.menu?.id
|
|
2021
2021
|
);
|
|
2022
2022
|
return [
|
|
2023
2023
|
{
|
|
2024
|
-
icon:
|
|
2024
|
+
icon: Cn,
|
|
2025
2025
|
label: "刷新",
|
|
2026
2026
|
name: "refresh",
|
|
2027
2027
|
value: d
|
|
2028
2028
|
},
|
|
2029
2029
|
"|",
|
|
2030
2030
|
{
|
|
2031
|
-
icon: m ?
|
|
2031
|
+
icon: m ? $t : Ct,
|
|
2032
2032
|
label: "收藏",
|
|
2033
2033
|
name: "favorite",
|
|
2034
2034
|
value: d.menu,
|
|
@@ -2036,7 +2036,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2036
2036
|
},
|
|
2037
2037
|
"|",
|
|
2038
2038
|
{
|
|
2039
|
-
icon:
|
|
2039
|
+
icon: zn,
|
|
2040
2040
|
label: "弹窗",
|
|
2041
2041
|
name: "dialog",
|
|
2042
2042
|
value: d
|
|
@@ -2048,10 +2048,10 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2048
2048
|
t("click", e.home);
|
|
2049
2049
|
return;
|
|
2050
2050
|
}
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2053
|
-
},
|
|
2054
|
-
const m = e.tabs.find((
|
|
2051
|
+
const h = e.tabs.find((_) => _.id === m);
|
|
2052
|
+
h && t("click", h);
|
|
2053
|
+
}, u = (d) => {
|
|
2054
|
+
const m = e.tabs.find((h) => h.id === d);
|
|
2055
2055
|
m && t("remove", m);
|
|
2056
2056
|
}, r = (d) => {
|
|
2057
2057
|
switch (d.name) {
|
|
@@ -2070,7 +2070,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2070
2070
|
}, p = (d, m) => {
|
|
2071
2071
|
m.target && m.target.classList.remove("is-dagging");
|
|
2072
2072
|
};
|
|
2073
|
-
return (d, m) => (
|
|
2073
|
+
return (d, m) => (c(), g(o(B), {
|
|
2074
2074
|
ref: "tabsRef",
|
|
2075
2075
|
class: "x-mask-tabs",
|
|
2076
2076
|
height: "100%",
|
|
@@ -2083,25 +2083,25 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2083
2083
|
k(o(_t), {
|
|
2084
2084
|
type: "card",
|
|
2085
2085
|
"model-value": e.value,
|
|
2086
|
-
onTabRemove:
|
|
2086
|
+
onTabRemove: u,
|
|
2087
2087
|
onTabClick: s
|
|
2088
2088
|
}, {
|
|
2089
2089
|
default: f(() => [
|
|
2090
|
-
e.home ? (
|
|
2090
|
+
e.home ? (c(), g(o(He), {
|
|
2091
2091
|
key: 0,
|
|
2092
2092
|
name: e.home.id
|
|
2093
2093
|
}, {
|
|
2094
2094
|
label: f(() => [
|
|
2095
|
-
|
|
2096
|
-
e.home.icon ? (
|
|
2097
|
-
e.home.title ? (
|
|
2095
|
+
F("div", jo, [
|
|
2096
|
+
e.home.icon ? (c(), g(J(o(ke)(e.home.icon)), { key: 0 })) : b("", !0),
|
|
2097
|
+
e.home.title ? (c(), z("span", Ro, O(e.home.title), 1)) : b("", !0)
|
|
2098
2098
|
])
|
|
2099
2099
|
]),
|
|
2100
2100
|
_: 1
|
|
2101
|
-
}, 8, ["name"])) :
|
|
2102
|
-
(
|
|
2103
|
-
key:
|
|
2104
|
-
name:
|
|
2101
|
+
}, 8, ["name"])) : b("", !0),
|
|
2102
|
+
(c(!0), z(W, null, Z(e.tabs, (h) => (c(), g(o(He), {
|
|
2103
|
+
key: h.id,
|
|
2104
|
+
name: h.id,
|
|
2105
2105
|
lazy: "",
|
|
2106
2106
|
closable: ""
|
|
2107
2107
|
}, {
|
|
@@ -2111,22 +2111,22 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2111
2111
|
placement: "bottom",
|
|
2112
2112
|
trigger: "hover",
|
|
2113
2113
|
width: "200px",
|
|
2114
|
-
disabled:
|
|
2114
|
+
disabled: h.id !== e.value
|
|
2115
2115
|
}, {
|
|
2116
2116
|
reference: f(() => [
|
|
2117
|
-
|
|
2117
|
+
F("div", {
|
|
2118
2118
|
class: "x-mask-tabs__trigger",
|
|
2119
2119
|
draggable: "true",
|
|
2120
|
-
onDragstart: (_) => i(
|
|
2121
|
-
onDragend: (_) => p(
|
|
2120
|
+
onDragstart: (_) => i(h, _),
|
|
2121
|
+
onDragend: (_) => p(h, _)
|
|
2122
2122
|
}, [
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
], 40,
|
|
2123
|
+
h.icon ? (c(), g(J(o(ke)(h.icon)), { key: 0 })) : b("", !0),
|
|
2124
|
+
h.title ? (c(), z("span", Ao, O(h.title), 1)) : b("", !0)
|
|
2125
|
+
], 40, Do)
|
|
2126
2126
|
]),
|
|
2127
2127
|
default: f(() => [
|
|
2128
2128
|
k(o(et), {
|
|
2129
|
-
items: l(
|
|
2129
|
+
items: l(h),
|
|
2130
2130
|
mode: "text",
|
|
2131
2131
|
size: "small",
|
|
2132
2132
|
type: "info",
|
|
@@ -2145,20 +2145,20 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2145
2145
|
_: 1
|
|
2146
2146
|
}, 512));
|
|
2147
2147
|
}
|
|
2148
|
-
}), No = /* @__PURE__ */
|
|
2148
|
+
}), No = /* @__PURE__ */ I({
|
|
2149
2149
|
__name: "ThemeSwitch",
|
|
2150
2150
|
setup(a) {
|
|
2151
|
-
const n =
|
|
2152
|
-
return (e, t) => (
|
|
2151
|
+
const n = Rn();
|
|
2152
|
+
return (e, t) => (c(), g(o(Je), {
|
|
2153
2153
|
class: "x-mask-theme-switch",
|
|
2154
2154
|
modelValue: o(n),
|
|
2155
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) =>
|
|
2155
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => Pe(n) ? n.value = l : null),
|
|
2156
2156
|
size: "default",
|
|
2157
|
-
"active-action-icon": o(
|
|
2158
|
-
"inactive-action-icon": o(
|
|
2157
|
+
"active-action-icon": o(Mn),
|
|
2158
|
+
"inactive-action-icon": o(Tn)
|
|
2159
2159
|
}, null, 8, ["modelValue", "active-action-icon", "inactive-action-icon"]));
|
|
2160
2160
|
}
|
|
2161
|
-
}),
|
|
2161
|
+
}), Xo = { class: "x-mask-toolbar__menu-item" }, Lo = /* @__PURE__ */ I({
|
|
2162
2162
|
__name: "Toolbar",
|
|
2163
2163
|
props: {
|
|
2164
2164
|
tabs: { default: () => [] },
|
|
@@ -2193,7 +2193,7 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2193
2193
|
];
|
|
2194
2194
|
}), s = (p) => {
|
|
2195
2195
|
t("closeTab", p.command);
|
|
2196
|
-
},
|
|
2196
|
+
}, u = (p) => {
|
|
2197
2197
|
switch (p.command) {
|
|
2198
2198
|
case "all":
|
|
2199
2199
|
t("closeAllTabs");
|
|
@@ -2210,34 +2210,34 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2210
2210
|
}, i = (p, d) => {
|
|
2211
2211
|
t("actionCommand", p, d);
|
|
2212
2212
|
};
|
|
2213
|
-
return (p, d) => (
|
|
2213
|
+
return (p, d) => (c(), g(o(B), {
|
|
2214
2214
|
class: "x-mask-toolbar",
|
|
2215
2215
|
align: "center"
|
|
2216
2216
|
}, {
|
|
2217
2217
|
default: f(() => [
|
|
2218
2218
|
k(o(te), {
|
|
2219
|
-
icon: o(
|
|
2219
|
+
icon: o(En),
|
|
2220
2220
|
menus: l.value,
|
|
2221
2221
|
dropdown: { size: "small" },
|
|
2222
2222
|
mode: "icon",
|
|
2223
2223
|
circle: "",
|
|
2224
2224
|
background: "hover",
|
|
2225
|
-
onCommand:
|
|
2225
|
+
onCommand: u
|
|
2226
2226
|
}, {
|
|
2227
2227
|
item: f(({ item: m }) => [
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
["other", "all"].includes(m.command) ?
|
|
2228
|
+
F("span", Xo, [
|
|
2229
|
+
D(O(m.label) + " ", 1),
|
|
2230
|
+
["other", "all"].includes(m.command) ? b("", !0) : (c(), g(o(de), {
|
|
2231
2231
|
key: 0,
|
|
2232
|
-
onClick: vt((
|
|
2233
|
-
icon: o(
|
|
2232
|
+
onClick: vt((h) => s(m), ["stop"]),
|
|
2233
|
+
icon: o(St)
|
|
2234
2234
|
}, null, 8, ["onClick", "icon"]))
|
|
2235
2235
|
])
|
|
2236
2236
|
]),
|
|
2237
2237
|
_: 1
|
|
2238
2238
|
}, 8, ["icon", "menus"]),
|
|
2239
2239
|
k(o(se), { direction: "vertical" }),
|
|
2240
|
-
e.actions ? (
|
|
2240
|
+
e.actions ? (c(), g(o(et), {
|
|
2241
2241
|
key: 0,
|
|
2242
2242
|
circle: "",
|
|
2243
2243
|
mode: "icon",
|
|
@@ -2246,29 +2246,29 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2246
2246
|
items: p.actions,
|
|
2247
2247
|
onClick: r,
|
|
2248
2248
|
onCommand: i
|
|
2249
|
-
}, null, 8, ["items"])) :
|
|
2250
|
-
e.actions ? (
|
|
2249
|
+
}, null, 8, ["items"])) : b("", !0),
|
|
2250
|
+
e.actions ? (c(), g(o(se), {
|
|
2251
2251
|
key: 1,
|
|
2252
2252
|
direction: "vertical"
|
|
2253
|
-
})) :
|
|
2254
|
-
e.theme ? (
|
|
2255
|
-
e.theme ? (
|
|
2253
|
+
})) : b("", !0),
|
|
2254
|
+
e.theme ? (c(), g(No, { key: 2 })) : b("", !0),
|
|
2255
|
+
e.theme ? (c(), g(o(se), {
|
|
2256
2256
|
key: 3,
|
|
2257
2257
|
direction: "vertical"
|
|
2258
|
-
})) :
|
|
2259
|
-
|
|
2258
|
+
})) : b("", !0),
|
|
2259
|
+
S(p.$slots, "default")
|
|
2260
2260
|
]),
|
|
2261
2261
|
_: 3
|
|
2262
2262
|
}));
|
|
2263
2263
|
}
|
|
2264
|
-
}),
|
|
2264
|
+
}), Uo = /* @__PURE__ */ I({
|
|
2265
2265
|
__name: "Avatar",
|
|
2266
2266
|
props: {
|
|
2267
2267
|
avatar: {}
|
|
2268
2268
|
},
|
|
2269
2269
|
setup(a) {
|
|
2270
2270
|
const n = a;
|
|
2271
|
-
return (e, t) => (
|
|
2271
|
+
return (e, t) => (c(), g(o(kt), {
|
|
2272
2272
|
width: 200,
|
|
2273
2273
|
"popper-class": "x-mask-avatar__popper",
|
|
2274
2274
|
disabled: !e.$slots.default
|
|
@@ -2277,18 +2277,18 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2277
2277
|
k(o(en), {
|
|
2278
2278
|
class: "x-mask-avatar",
|
|
2279
2279
|
shape: "circle",
|
|
2280
|
-
icon: o(
|
|
2280
|
+
icon: o(Pn),
|
|
2281
2281
|
src: n.avatar,
|
|
2282
2282
|
size: 26
|
|
2283
2283
|
}, null, 8, ["icon", "src"])
|
|
2284
2284
|
]),
|
|
2285
2285
|
default: f(() => [
|
|
2286
|
-
e.$slots.default ?
|
|
2286
|
+
e.$slots.default ? S(e.$slots, "default", { key: 0 }) : b("", !0)
|
|
2287
2287
|
]),
|
|
2288
2288
|
_: 3
|
|
2289
2289
|
}, 8, ["disabled"]));
|
|
2290
2290
|
}
|
|
2291
|
-
}), pt = /* @__PURE__ */
|
|
2291
|
+
}), pt = /* @__PURE__ */ I({
|
|
2292
2292
|
__name: "Content",
|
|
2293
2293
|
props: {
|
|
2294
2294
|
createView: { type: Function },
|
|
@@ -2296,22 +2296,22 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2296
2296
|
},
|
|
2297
2297
|
setup(a) {
|
|
2298
2298
|
const n = a;
|
|
2299
|
-
return (e, t) => (
|
|
2299
|
+
return (e, t) => (c(), g(o(B), {
|
|
2300
2300
|
class: "x-mask__content",
|
|
2301
2301
|
flex: !1,
|
|
2302
2302
|
grow: "",
|
|
2303
2303
|
padding: !1
|
|
2304
2304
|
}, {
|
|
2305
2305
|
default: f(() => [
|
|
2306
|
-
|
|
2307
|
-
k(o(
|
|
2306
|
+
S(e.$slots, "default"),
|
|
2307
|
+
k(o(Kn), null, {
|
|
2308
2308
|
default: f(({ Component: l, route: s }) => [
|
|
2309
|
-
(
|
|
2309
|
+
(c(), g(Ht, {
|
|
2310
2310
|
exclude: n.exclude
|
|
2311
2311
|
}, [
|
|
2312
|
-
l ? (
|
|
2312
|
+
l ? (c(), g(J(n.createView(l, s)), {
|
|
2313
2313
|
key: s.fullPath
|
|
2314
|
-
})) :
|
|
2314
|
+
})) : b("", !0)
|
|
2315
2315
|
], 1032, ["exclude"]))
|
|
2316
2316
|
]),
|
|
2317
2317
|
_: 1
|
|
@@ -2321,16 +2321,16 @@ const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2321
2321
|
}));
|
|
2322
2322
|
}
|
|
2323
2323
|
});
|
|
2324
|
-
function
|
|
2325
|
-
const a =
|
|
2324
|
+
function Ho() {
|
|
2325
|
+
const a = j(!1), n = j(""), e = j(!1);
|
|
2326
2326
|
return {
|
|
2327
2327
|
collapsed: a,
|
|
2328
2328
|
keyword: n,
|
|
2329
2329
|
favorite: e
|
|
2330
2330
|
};
|
|
2331
2331
|
}
|
|
2332
|
-
function
|
|
2333
|
-
const n =
|
|
2332
|
+
function Ko(a) {
|
|
2333
|
+
const n = Mt();
|
|
2334
2334
|
return v(() => {
|
|
2335
2335
|
const e = a.home;
|
|
2336
2336
|
return Object.assign(
|
|
@@ -2339,51 +2339,51 @@ function Lo(a) {
|
|
|
2339
2339
|
);
|
|
2340
2340
|
});
|
|
2341
2341
|
}
|
|
2342
|
-
function
|
|
2342
|
+
function Dt(a, n) {
|
|
2343
2343
|
let e = [];
|
|
2344
2344
|
return a.forEach((t) => {
|
|
2345
|
-
t = n ? n(t) : t, t.children ? e = e.concat(
|
|
2345
|
+
t = n ? n(t) : t, t.children ? e = e.concat(Dt(t.children, n)) : e.push(t);
|
|
2346
2346
|
}), e;
|
|
2347
2347
|
}
|
|
2348
2348
|
function Wo(a, n) {
|
|
2349
|
-
const e =
|
|
2350
|
-
const
|
|
2349
|
+
const e = Ze(), t = Ve([]), l = Ve([]), s = v(() => Dt(t.value, a.menuAdapter)), u = v(() => Fn(s.value, "id")), r = j(null), i = (y) => {
|
|
2350
|
+
const $ = typeof y == "object" ? y.id : y, w = u.value.get($);
|
|
2351
2351
|
if (!w) {
|
|
2352
2352
|
console.warn("找不到菜单", y);
|
|
2353
2353
|
return;
|
|
2354
2354
|
}
|
|
2355
|
-
const { type:
|
|
2356
|
-
if (!
|
|
2355
|
+
const { type: E = "route", url: P, title: C, icon: V } = w;
|
|
2356
|
+
if (!P) {
|
|
2357
2357
|
r.value = w, n("select", w);
|
|
2358
2358
|
return;
|
|
2359
2359
|
}
|
|
2360
|
-
if (
|
|
2361
|
-
Nn(
|
|
2360
|
+
if (E === "route") {
|
|
2361
|
+
Nn(P) || P.startsWith("//") ? window.open(P) : (r.value = w, e.push(P).catch((M) => M));
|
|
2362
2362
|
return;
|
|
2363
2363
|
}
|
|
2364
|
-
if (
|
|
2365
|
-
window.open(
|
|
2364
|
+
if (E === "window") {
|
|
2365
|
+
window.open(P);
|
|
2366
2366
|
return;
|
|
2367
2367
|
}
|
|
2368
|
-
|
|
2368
|
+
E === "dialog" && tt({
|
|
2369
2369
|
resizable: !0,
|
|
2370
2370
|
bodyPadding: !1,
|
|
2371
2371
|
width: "80%",
|
|
2372
2372
|
height: "80%",
|
|
2373
|
-
title:
|
|
2374
|
-
icon:
|
|
2375
|
-
src:
|
|
2373
|
+
title: C,
|
|
2374
|
+
icon: V,
|
|
2375
|
+
src: P
|
|
2376
2376
|
});
|
|
2377
2377
|
}, p = async () => {
|
|
2378
2378
|
t.value = typeof a.menus == "function" ? await a.menus() || [] : a.menus ?? [], l.value = typeof a.favorites == "function" ? await a.favorites() || [] : a.favorites ?? [];
|
|
2379
2379
|
}, d = (y) => {
|
|
2380
2380
|
l.value = [y, ...l.value], a.addFavorite && a.addFavorite(y);
|
|
2381
2381
|
}, m = (y) => {
|
|
2382
|
-
l.value = l.value.filter((
|
|
2383
|
-
},
|
|
2384
|
-
|
|
2382
|
+
l.value = l.value.filter(($) => $.id !== y.id), a.removeFavorite && a.removeFavorite(y);
|
|
2383
|
+
}, h = (y) => !!l.value.find(($) => $ === y || $.id === y.id), _ = (y) => {
|
|
2384
|
+
h(y) ? m(y) : d(y);
|
|
2385
2385
|
};
|
|
2386
|
-
return
|
|
2386
|
+
return Ye(p), {
|
|
2387
2387
|
menus: t,
|
|
2388
2388
|
favorites: l,
|
|
2389
2389
|
flatMenus: s,
|
|
@@ -2392,244 +2392,244 @@ function Wo(a, n) {
|
|
|
2392
2392
|
toggleFavorite: _
|
|
2393
2393
|
};
|
|
2394
2394
|
}
|
|
2395
|
-
function
|
|
2396
|
-
const s =
|
|
2397
|
-
() => i.value.slice(0, m.value).filter((
|
|
2398
|
-
), _ = v(() => i.value.slice(m.value)), y = (
|
|
2399
|
-
|
|
2400
|
-
},
|
|
2401
|
-
|
|
2402
|
-
},
|
|
2403
|
-
|
|
2404
|
-
}, N = (
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2407
|
-
}, x = async (
|
|
2408
|
-
const { url:
|
|
2395
|
+
function Yo(a, n, e, t, l) {
|
|
2396
|
+
const s = Pt(), u = Ze(), r = {}, i = j([]), p = j(), { width: d } = zt(p), m = v(() => Math.floor(d.value / Vo)), h = v(
|
|
2397
|
+
() => i.value.slice(0, m.value).filter((T) => !T.dialog)
|
|
2398
|
+
), _ = v(() => i.value.slice(m.value)), y = (T) => e.value.find((R) => R.url === T), $ = (T) => s.fullPath === T.url, w = (T) => l.value.id === T ? l.value : i.value.find((R) => R.id === T), E = j(""), P = v(() => w(E.value)), C = (T) => {
|
|
2399
|
+
u.push(T.url).catch((R) => R);
|
|
2400
|
+
}, V = (T) => {
|
|
2401
|
+
E.value = T.id, s.fullPath !== T.url && C(T);
|
|
2402
|
+
}, M = () => {
|
|
2403
|
+
C(l.value);
|
|
2404
|
+
}, N = (T) => {
|
|
2405
|
+
const R = i.value.find((X) => X.url === T.url || X.id === T.id);
|
|
2406
|
+
R ? V(R) : (i.value.unshift(T), V(T));
|
|
2407
|
+
}, x = async (T) => {
|
|
2408
|
+
const { url: R = s.fullPath, icon: X, title: Ce = "新建标签页" } = T || {}, ze = r[R], De = Mt(), Ae = Tt(R);
|
|
2409
2409
|
return {
|
|
2410
|
-
id:
|
|
2411
|
-
name:
|
|
2412
|
-
url:
|
|
2413
|
-
icon:
|
|
2414
|
-
title:
|
|
2410
|
+
id: De,
|
|
2411
|
+
name: Ae,
|
|
2412
|
+
url: R,
|
|
2413
|
+
icon: X,
|
|
2414
|
+
title: Ce,
|
|
2415
2415
|
closable: !0,
|
|
2416
|
-
menu:
|
|
2417
|
-
|
|
2416
|
+
menu: T,
|
|
2417
|
+
...ze ? await ze() : {}
|
|
2418
2418
|
};
|
|
2419
|
-
},
|
|
2420
|
-
if (await
|
|
2419
|
+
}, U = async (T) => {
|
|
2420
|
+
if (await Fe.confirm("是否关闭页签", "提示", {
|
|
2421
2421
|
type: "warning"
|
|
2422
2422
|
}).catch(() => !1)) {
|
|
2423
|
-
if (i.value = i.value.filter((
|
|
2424
|
-
const
|
|
2425
|
-
|
|
2423
|
+
if (i.value = i.value.filter((X) => X.id !== T.id), E.value === T.id) {
|
|
2424
|
+
const X = i.value[0];
|
|
2425
|
+
C(X || l.value);
|
|
2426
2426
|
}
|
|
2427
|
-
return
|
|
2427
|
+
return T;
|
|
2428
2428
|
}
|
|
2429
|
-
},
|
|
2430
|
-
const
|
|
2431
|
-
if (
|
|
2432
|
-
const
|
|
2433
|
-
i.value.splice(
|
|
2429
|
+
}, H = (T) => {
|
|
2430
|
+
const R = i.value.findIndex((X) => X.id === T.id);
|
|
2431
|
+
if (R >= 0) {
|
|
2432
|
+
const X = i.value[R];
|
|
2433
|
+
i.value.splice(R, 1, Object.assign(X, T));
|
|
2434
2434
|
}
|
|
2435
2435
|
}, re = async () => {
|
|
2436
|
-
if (!await
|
|
2436
|
+
if (!await Fe.confirm("是否关闭全部页签", "提示", {
|
|
2437
2437
|
type: "warning"
|
|
2438
2438
|
}).catch(() => !1))
|
|
2439
2439
|
return;
|
|
2440
|
-
const
|
|
2441
|
-
return i.value = [],
|
|
2442
|
-
},
|
|
2443
|
-
if (!await
|
|
2440
|
+
const R = i.value;
|
|
2441
|
+
return i.value = [], V(l.value), R;
|
|
2442
|
+
}, q = async () => {
|
|
2443
|
+
if (!await Fe.confirm("是否关闭其他页签", "提示", {
|
|
2444
2444
|
type: "warning"
|
|
2445
2445
|
}).catch(() => !1))
|
|
2446
2446
|
return;
|
|
2447
|
-
const
|
|
2448
|
-
return i.value = i.value.filter((
|
|
2449
|
-
}, ee = (
|
|
2450
|
-
const
|
|
2451
|
-
i.value = [
|
|
2452
|
-
},
|
|
2447
|
+
const R = i.value.filter((X) => X.id !== E.value);
|
|
2448
|
+
return i.value = i.value.filter((X) => X.id === E.value), R;
|
|
2449
|
+
}, ee = (T) => {
|
|
2450
|
+
const R = i.value.filter((X) => X.id !== T.id);
|
|
2451
|
+
i.value = [T, ...R], V(T);
|
|
2452
|
+
}, ce = async () => {
|
|
2453
2453
|
await ve();
|
|
2454
|
-
const
|
|
2455
|
-
if (
|
|
2456
|
-
|
|
2454
|
+
const T = l.value.url === s.fullPath, R = y(s.fullPath);
|
|
2455
|
+
if (T)
|
|
2456
|
+
E.value = l.value.id;
|
|
2457
2457
|
else {
|
|
2458
|
-
const
|
|
2459
|
-
N(
|
|
2458
|
+
const X = await x(R);
|
|
2459
|
+
N(X);
|
|
2460
2460
|
}
|
|
2461
|
-
await ve(), t.value =
|
|
2461
|
+
await ve(), t.value = R || null;
|
|
2462
2462
|
};
|
|
2463
|
-
return
|
|
2463
|
+
return K(e, ce), K(s, ce, { immediate: !0 }), Se(jt, r), {
|
|
2464
2464
|
tabRef: p,
|
|
2465
2465
|
tabs: i,
|
|
2466
|
-
showTabs:
|
|
2467
|
-
currentTab:
|
|
2468
|
-
changeTab:
|
|
2469
|
-
removeTab:
|
|
2470
|
-
updateTab:
|
|
2466
|
+
showTabs: h,
|
|
2467
|
+
currentTab: P,
|
|
2468
|
+
changeTab: C,
|
|
2469
|
+
removeTab: U,
|
|
2470
|
+
updateTab: H,
|
|
2471
2471
|
addTab: N,
|
|
2472
2472
|
home: l,
|
|
2473
|
-
tabValue:
|
|
2474
|
-
isCurrentTab:
|
|
2475
|
-
activeHome:
|
|
2476
|
-
activeTab:
|
|
2473
|
+
tabValue: E,
|
|
2474
|
+
isCurrentTab: $,
|
|
2475
|
+
activeHome: M,
|
|
2476
|
+
activeTab: V,
|
|
2477
2477
|
dropdownTabs: _,
|
|
2478
2478
|
removeAllTabs: re,
|
|
2479
|
-
removeOtherTabs:
|
|
2479
|
+
removeOtherTabs: q,
|
|
2480
2480
|
moveToShow: ee
|
|
2481
2481
|
};
|
|
2482
2482
|
}
|
|
2483
|
-
function
|
|
2484
|
-
const n = /* @__PURE__ */ new Map(), e =
|
|
2485
|
-
const
|
|
2486
|
-
if (n.has(
|
|
2487
|
-
return n.get(
|
|
2483
|
+
function Jo(a) {
|
|
2484
|
+
const n = /* @__PURE__ */ new Map(), e = j([]), t = Re({}), l = pe(), s = {}, { updateTab: u, isCurrentTab: r, activeHome: i, tabs: p } = a, d = (C, V) => {
|
|
2485
|
+
const M = V.fullPath;
|
|
2486
|
+
if (n.has(M))
|
|
2487
|
+
return n.get(M);
|
|
2488
2488
|
{
|
|
2489
|
-
const N =
|
|
2489
|
+
const N = Tt(M), x = {
|
|
2490
2490
|
name: N,
|
|
2491
2491
|
setup() {
|
|
2492
|
-
const
|
|
2493
|
-
return
|
|
2492
|
+
const U = v(() => t[M] || document.body), H = v(() => !t[M]), re = v(() => !e.value.includes(N));
|
|
2493
|
+
return Se(
|
|
2494
2494
|
Wn,
|
|
2495
|
-
ye({ ...
|
|
2495
|
+
ye({ ...V })
|
|
2496
2496
|
), () => re.value ? ae(
|
|
2497
2497
|
yt,
|
|
2498
2498
|
{
|
|
2499
|
-
to:
|
|
2500
|
-
disabled:
|
|
2499
|
+
to: U.value,
|
|
2500
|
+
disabled: H.value
|
|
2501
2501
|
},
|
|
2502
|
-
[ae(
|
|
2502
|
+
[ae(C)]
|
|
2503
2503
|
) : null;
|
|
2504
2504
|
}
|
|
2505
2505
|
};
|
|
2506
|
-
return n.set(
|
|
2506
|
+
return n.set(M, x), x;
|
|
2507
2507
|
}
|
|
2508
|
-
}, m = (
|
|
2509
|
-
|
|
2510
|
-
const
|
|
2511
|
-
|
|
2512
|
-
},
|
|
2513
|
-
|
|
2514
|
-
m(
|
|
2508
|
+
}, m = (C) => {
|
|
2509
|
+
C.dialog = void 0, delete t[C.url];
|
|
2510
|
+
const V = s[C.id];
|
|
2511
|
+
V && (V.destroy(), delete s[C.id], u(C));
|
|
2512
|
+
}, h = (C = []) => {
|
|
2513
|
+
C.forEach((V) => {
|
|
2514
|
+
m(V);
|
|
2515
2515
|
});
|
|
2516
|
-
}, _ = async (
|
|
2517
|
-
|
|
2518
|
-
...
|
|
2516
|
+
}, _ = async (C) => {
|
|
2517
|
+
C.dialog = {
|
|
2518
|
+
...C.dialog,
|
|
2519
2519
|
onMinimized: () => {
|
|
2520
|
-
m(
|
|
2520
|
+
m(C);
|
|
2521
2521
|
},
|
|
2522
2522
|
onClose: async () => {
|
|
2523
|
-
m(
|
|
2523
|
+
m(C), p.value = p.value.filter((M) => M.id !== C.id);
|
|
2524
2524
|
}
|
|
2525
|
-
},
|
|
2526
|
-
const
|
|
2525
|
+
}, u(C);
|
|
2526
|
+
const V = tt(
|
|
2527
2527
|
{
|
|
2528
|
-
title:
|
|
2529
|
-
icon:
|
|
2528
|
+
title: C.title,
|
|
2529
|
+
icon: C.icon,
|
|
2530
2530
|
modal: !1,
|
|
2531
2531
|
resizable: !0,
|
|
2532
2532
|
draggable: !0,
|
|
2533
2533
|
maximizable: !0,
|
|
2534
2534
|
minimizable: !0,
|
|
2535
|
-
...
|
|
2536
|
-
onOpen(
|
|
2537
|
-
t[
|
|
2535
|
+
...C.dialog,
|
|
2536
|
+
onOpen(M) {
|
|
2537
|
+
t[C.url] = M.refs.panelRef?.bodyRef?.$el;
|
|
2538
2538
|
}
|
|
2539
2539
|
},
|
|
2540
2540
|
l?.appContext
|
|
2541
2541
|
);
|
|
2542
|
-
return await ve(), r(
|
|
2543
|
-
}, y = async (
|
|
2544
|
-
e.value = [
|
|
2545
|
-
},
|
|
2546
|
-
e.value =
|
|
2547
|
-
}, w = (
|
|
2548
|
-
if (
|
|
2549
|
-
const
|
|
2550
|
-
if (
|
|
2551
|
-
const { clientX: N, clientY: x } =
|
|
2552
|
-
|
|
2542
|
+
return await ve(), r(C) && i(), s[C.id] = V, V;
|
|
2543
|
+
}, y = async (C) => {
|
|
2544
|
+
e.value = [C.name], await ve(), e.value = [];
|
|
2545
|
+
}, $ = async (C) => {
|
|
2546
|
+
e.value = C.map((V) => V.name), await ve(), e.value = [];
|
|
2547
|
+
}, w = (C) => (C.preventDefault(), !1), E = (C) => {
|
|
2548
|
+
if (C.dataTransfer) {
|
|
2549
|
+
const V = C.dataTransfer.getData("tab"), M = p.value.find((N) => N.id === V);
|
|
2550
|
+
if (M) {
|
|
2551
|
+
const { clientX: N, clientY: x } = C;
|
|
2552
|
+
M.dialog = {
|
|
2553
2553
|
left: N,
|
|
2554
2554
|
top: x
|
|
2555
|
-
}, _(
|
|
2555
|
+
}, _(M);
|
|
2556
2556
|
}
|
|
2557
2557
|
}
|
|
2558
|
-
},
|
|
2559
|
-
return
|
|
2558
|
+
}, P = (C) => !!t[C];
|
|
2559
|
+
return je(document, "dragover", w), je(document, "drop", E), {
|
|
2560
2560
|
createView: d,
|
|
2561
2561
|
openDialog: _,
|
|
2562
2562
|
refresh: y,
|
|
2563
2563
|
exclude: e,
|
|
2564
|
-
cleanCache:
|
|
2565
|
-
hasDialog:
|
|
2564
|
+
cleanCache: $,
|
|
2565
|
+
hasDialog: P,
|
|
2566
2566
|
closeDialog: m,
|
|
2567
|
-
closeDialogs:
|
|
2567
|
+
closeDialogs: h
|
|
2568
2568
|
};
|
|
2569
2569
|
}
|
|
2570
|
-
const
|
|
2570
|
+
const Ua = /* @__PURE__ */ I({
|
|
2571
2571
|
name: "XMask",
|
|
2572
2572
|
__name: "Mask",
|
|
2573
|
-
props:
|
|
2573
|
+
props: Oo,
|
|
2574
2574
|
emits: ["select", "actionClick", "actionCommand"],
|
|
2575
2575
|
setup(a, { emit: n }) {
|
|
2576
|
-
const e = a, t = n, l =
|
|
2576
|
+
const e = a, t = n, l = Ko(e), { collapsed: s, keyword: u, favorite: r } = Ho(), { menus: i, favorites: p, flatMenus: d, active: m, select: h, toggleFavorite: _ } = Wo(e, t), {
|
|
2577
2577
|
tabRef: y,
|
|
2578
|
-
showTabs:
|
|
2578
|
+
showTabs: $,
|
|
2579
2579
|
currentTab: w,
|
|
2580
|
-
changeTab:
|
|
2581
|
-
removeTab:
|
|
2582
|
-
tabs:
|
|
2583
|
-
updateTab:
|
|
2584
|
-
isCurrentTab:
|
|
2580
|
+
changeTab: E,
|
|
2581
|
+
removeTab: P,
|
|
2582
|
+
tabs: C,
|
|
2583
|
+
updateTab: V,
|
|
2584
|
+
isCurrentTab: M,
|
|
2585
2585
|
activeHome: N,
|
|
2586
2586
|
removeAllTabs: x,
|
|
2587
|
-
removeOtherTabs:
|
|
2588
|
-
dropdownTabs:
|
|
2587
|
+
removeOtherTabs: U,
|
|
2588
|
+
dropdownTabs: H,
|
|
2589
2589
|
moveToShow: re
|
|
2590
|
-
} =
|
|
2591
|
-
tabs:
|
|
2592
|
-
updateTab:
|
|
2593
|
-
isCurrentTab:
|
|
2590
|
+
} = Yo(e, t, d, m, l), { createView: q, openDialog: ee, refresh: ce, exclude: T, cleanCache: R, closeDialogs: X } = Jo({
|
|
2591
|
+
tabs: C,
|
|
2592
|
+
updateTab: V,
|
|
2593
|
+
isCurrentTab: M,
|
|
2594
2594
|
activeHome: N
|
|
2595
|
-
}),
|
|
2596
|
-
await
|
|
2597
|
-
},
|
|
2598
|
-
const
|
|
2599
|
-
|
|
2600
|
-
},
|
|
2601
|
-
const
|
|
2602
|
-
|
|
2603
|
-
},
|
|
2604
|
-
t("actionClick",
|
|
2605
|
-
},
|
|
2606
|
-
t("actionCommand",
|
|
2595
|
+
}), Ce = async (L) => {
|
|
2596
|
+
await P(L) && await R([L]);
|
|
2597
|
+
}, ze = async () => {
|
|
2598
|
+
const L = await x();
|
|
2599
|
+
L && (X(L), await R(L));
|
|
2600
|
+
}, De = async () => {
|
|
2601
|
+
const L = await U();
|
|
2602
|
+
L && (X(L), await R(L));
|
|
2603
|
+
}, Ae = (L) => {
|
|
2604
|
+
t("actionClick", L);
|
|
2605
|
+
}, Xt = (L, ne) => {
|
|
2606
|
+
t("actionCommand", L, ne);
|
|
2607
2607
|
};
|
|
2608
|
-
return
|
|
2609
|
-
tabs:
|
|
2608
|
+
return Se(Rt, {
|
|
2609
|
+
tabs: C,
|
|
2610
2610
|
flatMenus: d,
|
|
2611
2611
|
favorites: p,
|
|
2612
|
-
updateTab:
|
|
2612
|
+
updateTab: V,
|
|
2613
2613
|
active: m,
|
|
2614
2614
|
currentTab: w
|
|
2615
|
-
}), (
|
|
2616
|
-
class:
|
|
2615
|
+
}), (L, ne) => (c(), g(o(B), {
|
|
2616
|
+
class: Y(["x-mask", { "is-disabled": e.disabled }]),
|
|
2617
2617
|
fit: ""
|
|
2618
2618
|
}, {
|
|
2619
2619
|
default: f(() => [
|
|
2620
|
-
e.disabled ? (
|
|
2620
|
+
e.disabled ? (c(), g(pt, {
|
|
2621
2621
|
key: 1,
|
|
2622
|
-
createView: o(
|
|
2623
|
-
exclude: o(
|
|
2622
|
+
createView: o(q),
|
|
2623
|
+
exclude: o(T)
|
|
2624
2624
|
}, {
|
|
2625
2625
|
default: f(() => [
|
|
2626
|
-
|
|
2626
|
+
L.$slots.default ? S(L.$slots, "default", { key: 0 }) : b("", !0)
|
|
2627
2627
|
]),
|
|
2628
2628
|
_: 3
|
|
2629
|
-
}, 8, ["createView", "exclude"])) : (
|
|
2630
|
-
k(
|
|
2629
|
+
}, 8, ["createView", "exclude"])) : (c(), z(W, { key: 0 }, [
|
|
2630
|
+
k(zo, { collapsed: o(s) }, {
|
|
2631
2631
|
brand: f(() => [
|
|
2632
|
-
k(
|
|
2632
|
+
k(Po, {
|
|
2633
2633
|
logo: e.logo,
|
|
2634
2634
|
title: e.title,
|
|
2635
2635
|
url: o(l).url,
|
|
@@ -2637,23 +2637,23 @@ const Ha = /* @__PURE__ */ V({
|
|
|
2637
2637
|
}, null, 8, ["logo", "title", "url", "collapsed"])
|
|
2638
2638
|
]),
|
|
2639
2639
|
default: f(() => [
|
|
2640
|
-
k(
|
|
2640
|
+
k(Mo, {
|
|
2641
2641
|
collasped: o(s),
|
|
2642
|
-
"onUpdate:collasped": ne[0] || (ne[0] = (xe) =>
|
|
2642
|
+
"onUpdate:collasped": ne[0] || (ne[0] = (xe) => Pe(s) ? s.value = xe : null),
|
|
2643
2643
|
favorite: o(r),
|
|
2644
|
-
"onUpdate:favorite": ne[1] || (ne[1] = (xe) =>
|
|
2645
|
-
keyword: o(
|
|
2646
|
-
"onUpdate:keyword": ne[2] || (ne[2] = (xe) =>
|
|
2644
|
+
"onUpdate:favorite": ne[1] || (ne[1] = (xe) => Pe(r) ? r.value = xe : null),
|
|
2645
|
+
keyword: o(u),
|
|
2646
|
+
"onUpdate:keyword": ne[2] || (ne[2] = (xe) => Pe(u) ? u.value = xe : null)
|
|
2647
2647
|
}, null, 8, ["collasped", "favorite", "keyword"]),
|
|
2648
2648
|
k(Bo, {
|
|
2649
2649
|
collapse: o(s),
|
|
2650
|
-
keyword: o(
|
|
2650
|
+
keyword: o(u),
|
|
2651
2651
|
favorite: o(r),
|
|
2652
2652
|
favorites: o(p),
|
|
2653
2653
|
flatMenus: o(d),
|
|
2654
2654
|
menus: o(i),
|
|
2655
2655
|
active: o(m),
|
|
2656
|
-
onSelect: o(
|
|
2656
|
+
onSelect: o(h)
|
|
2657
2657
|
}, null, 8, ["collapse", "keyword", "favorite", "favorites", "flatMenus", "menus", "active", "onSelect"])
|
|
2658
2658
|
]),
|
|
2659
2659
|
_: 1
|
|
@@ -2672,38 +2672,38 @@ const Ha = /* @__PURE__ */ V({
|
|
|
2672
2672
|
align: "center"
|
|
2673
2673
|
}, {
|
|
2674
2674
|
default: f(() => [
|
|
2675
|
-
k(
|
|
2675
|
+
k(Fo, {
|
|
2676
2676
|
ref_key: "tabRef",
|
|
2677
2677
|
ref: y,
|
|
2678
2678
|
favorites: o(p),
|
|
2679
|
-
tabs: o(
|
|
2679
|
+
tabs: o($),
|
|
2680
2680
|
home: o(l),
|
|
2681
2681
|
value: o(w)?.id,
|
|
2682
|
-
onClick: o(
|
|
2682
|
+
onClick: o(E),
|
|
2683
2683
|
onToggleFavorite: o(_),
|
|
2684
|
-
onRemove:
|
|
2684
|
+
onRemove: Ce,
|
|
2685
2685
|
onDialog: o(ee),
|
|
2686
|
-
onRefresh: o(
|
|
2686
|
+
onRefresh: o(ce)
|
|
2687
2687
|
}, null, 8, ["favorites", "tabs", "home", "value", "onClick", "onToggleFavorite", "onDialog", "onRefresh"]),
|
|
2688
|
-
k(
|
|
2689
|
-
tabs: o(
|
|
2688
|
+
k(Lo, {
|
|
2689
|
+
tabs: o(H),
|
|
2690
2690
|
actions: e.actions,
|
|
2691
2691
|
theme: e.theme,
|
|
2692
|
-
onCloseOtherTabs:
|
|
2693
|
-
onCloseAllTabs:
|
|
2694
|
-
onCloseTab:
|
|
2692
|
+
onCloseOtherTabs: De,
|
|
2693
|
+
onCloseAllTabs: ze,
|
|
2694
|
+
onCloseTab: Ce,
|
|
2695
2695
|
onClickTab: o(re),
|
|
2696
|
-
onActionClick:
|
|
2697
|
-
onActionCommand:
|
|
2696
|
+
onActionClick: Ae,
|
|
2697
|
+
onActionCommand: Xt
|
|
2698
2698
|
}, {
|
|
2699
2699
|
default: f(() => [
|
|
2700
|
-
k(
|
|
2700
|
+
k(Uo, {
|
|
2701
2701
|
avatar: e.avatar
|
|
2702
|
-
},
|
|
2703
|
-
|
|
2702
|
+
}, ue({ _: 2 }, [
|
|
2703
|
+
L.$slots.user ? {
|
|
2704
2704
|
name: "default",
|
|
2705
2705
|
fn: f(() => [
|
|
2706
|
-
|
|
2706
|
+
S(L.$slots, "user")
|
|
2707
2707
|
]),
|
|
2708
2708
|
key: "0"
|
|
2709
2709
|
} : void 0
|
|
@@ -2715,11 +2715,11 @@ const Ha = /* @__PURE__ */ V({
|
|
|
2715
2715
|
_: 3
|
|
2716
2716
|
}),
|
|
2717
2717
|
k(pt, {
|
|
2718
|
-
createView: o(
|
|
2719
|
-
exclude: o(
|
|
2718
|
+
createView: o(q),
|
|
2719
|
+
exclude: o(T)
|
|
2720
2720
|
}, {
|
|
2721
2721
|
default: f(() => [
|
|
2722
|
-
|
|
2722
|
+
L.$slots.default ? S(L.$slots, "default", { key: 0 }) : b("", !0)
|
|
2723
2723
|
]),
|
|
2724
2724
|
_: 3
|
|
2725
2725
|
}, 8, ["createView", "exclude"])
|
|
@@ -2732,8 +2732,8 @@ const Ha = /* @__PURE__ */ V({
|
|
|
2732
2732
|
}, 8, ["class"]));
|
|
2733
2733
|
}
|
|
2734
2734
|
});
|
|
2735
|
-
function
|
|
2736
|
-
const n =
|
|
2735
|
+
function Ha(a = {}) {
|
|
2736
|
+
const n = Pt(), e = $e(jt, null), t = $e(Rt, null);
|
|
2737
2737
|
if (e) {
|
|
2738
2738
|
const s = typeof a == "function" ? a : async () => a;
|
|
2739
2739
|
e[n.fullPath] = s;
|
|
@@ -2743,22 +2743,22 @@ function Ka(a = {}) {
|
|
|
2743
2743
|
mask: t
|
|
2744
2744
|
};
|
|
2745
2745
|
}
|
|
2746
|
-
const
|
|
2746
|
+
const qo = /* @__PURE__ */ I({
|
|
2747
2747
|
__name: "SelectEditor",
|
|
2748
2748
|
props: {
|
|
2749
2749
|
options: { default: () => [] }
|
|
2750
2750
|
},
|
|
2751
2751
|
setup(a) {
|
|
2752
2752
|
const n = a;
|
|
2753
|
-
return (e, t) => (
|
|
2753
|
+
return (e, t) => (c(), g(o(wt), le(he(e.$attrs)), {
|
|
2754
2754
|
default: f(() => [
|
|
2755
|
-
(
|
|
2755
|
+
(c(!0), z(W, null, Z(n.options, (l, s) => (c(), g(o(xt), A({
|
|
2756
2756
|
key: `item_${s}_${l.value}`
|
|
2757
|
-
}, l),
|
|
2757
|
+
}, l), ue({ _: 2 }, [
|
|
2758
2758
|
e.$slots.option ? {
|
|
2759
2759
|
name: "default",
|
|
2760
2760
|
fn: f(() => [
|
|
2761
|
-
|
|
2761
|
+
S(e.$slots, "option", { option: l })
|
|
2762
2762
|
]),
|
|
2763
2763
|
key: "0"
|
|
2764
2764
|
} : void 0
|
|
@@ -2767,7 +2767,7 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2767
2767
|
_: 3
|
|
2768
2768
|
}, 16));
|
|
2769
2769
|
}
|
|
2770
|
-
}), Go = /* @__PURE__ */
|
|
2770
|
+
}), Go = /* @__PURE__ */ I({
|
|
2771
2771
|
__name: "CheckboxEditor",
|
|
2772
2772
|
props: {
|
|
2773
2773
|
options: { default: () => [] },
|
|
@@ -2777,15 +2777,15 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2777
2777
|
const n = a, e = v(
|
|
2778
2778
|
() => we(n.button ? tn : nn)
|
|
2779
2779
|
);
|
|
2780
|
-
return (t, l) => (
|
|
2780
|
+
return (t, l) => (c(), g(o(on), le(he(t.$attrs)), {
|
|
2781
2781
|
default: f(() => [
|
|
2782
|
-
(
|
|
2783
|
-
key: `item_${
|
|
2782
|
+
(c(!0), z(W, null, Z(n.options, (s, u) => (c(), g(J(e.value), {
|
|
2783
|
+
key: `item_${u}_${s.value}`,
|
|
2784
2784
|
label: s.label,
|
|
2785
2785
|
value: s.value
|
|
2786
2786
|
}, {
|
|
2787
2787
|
default: f(() => [
|
|
2788
|
-
|
|
2788
|
+
D(O(s.label), 1)
|
|
2789
2789
|
]),
|
|
2790
2790
|
_: 2
|
|
2791
2791
|
}, 1032, ["label", "value"]))), 128))
|
|
@@ -2793,7 +2793,7 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2793
2793
|
_: 1
|
|
2794
2794
|
}, 16));
|
|
2795
2795
|
}
|
|
2796
|
-
}),
|
|
2796
|
+
}), Zo = /* @__PURE__ */ I({
|
|
2797
2797
|
__name: "RadioEditor",
|
|
2798
2798
|
props: {
|
|
2799
2799
|
options: { default: () => [] },
|
|
@@ -2803,15 +2803,15 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2803
2803
|
const n = a, e = v(
|
|
2804
2804
|
() => we(n.button ? an : sn)
|
|
2805
2805
|
);
|
|
2806
|
-
return (t, l) => (
|
|
2806
|
+
return (t, l) => (c(), g(o(ln), le(he(t.$attrs)), {
|
|
2807
2807
|
default: f(() => [
|
|
2808
|
-
(
|
|
2809
|
-
key: `item_${
|
|
2808
|
+
(c(!0), z(W, null, Z(n.options, (s, u) => (c(), g(J(e.value), {
|
|
2809
|
+
key: `item_${u}_${s.value}`,
|
|
2810
2810
|
label: s.label,
|
|
2811
2811
|
value: s.value
|
|
2812
2812
|
}, {
|
|
2813
2813
|
default: f(() => [
|
|
2814
|
-
|
|
2814
|
+
D(O(s.label), 1)
|
|
2815
2815
|
]),
|
|
2816
2816
|
_: 2
|
|
2817
2817
|
}, 1032, ["label", "value"]))), 128))
|
|
@@ -2819,7 +2819,7 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2819
2819
|
_: 1
|
|
2820
2820
|
}, 16));
|
|
2821
2821
|
}
|
|
2822
|
-
}),
|
|
2822
|
+
}), At = {
|
|
2823
2823
|
none: {
|
|
2824
2824
|
component: "div",
|
|
2825
2825
|
props: {
|
|
@@ -2842,7 +2842,7 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2842
2842
|
defaultValue: ""
|
|
2843
2843
|
},
|
|
2844
2844
|
select: {
|
|
2845
|
-
component:
|
|
2845
|
+
component: qo,
|
|
2846
2846
|
props: {
|
|
2847
2847
|
clearable: !0
|
|
2848
2848
|
}
|
|
@@ -2853,7 +2853,7 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2853
2853
|
defaultValue: []
|
|
2854
2854
|
},
|
|
2855
2855
|
radio: {
|
|
2856
|
-
component:
|
|
2856
|
+
component: Zo,
|
|
2857
2857
|
props: {}
|
|
2858
2858
|
},
|
|
2859
2859
|
number: {
|
|
@@ -2865,7 +2865,7 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2865
2865
|
props: {}
|
|
2866
2866
|
},
|
|
2867
2867
|
time: {
|
|
2868
|
-
component:
|
|
2868
|
+
component: cn,
|
|
2869
2869
|
props: {}
|
|
2870
2870
|
},
|
|
2871
2871
|
datetime: {
|
|
@@ -2875,11 +2875,11 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2875
2875
|
}
|
|
2876
2876
|
},
|
|
2877
2877
|
switch: {
|
|
2878
|
-
component:
|
|
2878
|
+
component: Je,
|
|
2879
2879
|
props: {}
|
|
2880
2880
|
},
|
|
2881
2881
|
rate: {
|
|
2882
|
-
component:
|
|
2882
|
+
component: un,
|
|
2883
2883
|
props: {}
|
|
2884
2884
|
},
|
|
2885
2885
|
slider: {
|
|
@@ -2890,7 +2890,7 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2890
2890
|
component: pn,
|
|
2891
2891
|
props: {}
|
|
2892
2892
|
}
|
|
2893
|
-
},
|
|
2893
|
+
}, Qo = {
|
|
2894
2894
|
/**
|
|
2895
2895
|
* 字段名称
|
|
2896
2896
|
*/
|
|
@@ -2922,7 +2922,7 @@ const Zo = /* @__PURE__ */ V({
|
|
|
2922
2922
|
modelValue: {
|
|
2923
2923
|
type: [String, Number, Boolean, Object, Array],
|
|
2924
2924
|
default(a) {
|
|
2925
|
-
return
|
|
2925
|
+
return At[a.editor]?.defaultValue;
|
|
2926
2926
|
}
|
|
2927
2927
|
},
|
|
2928
2928
|
/**
|
|
@@ -3009,9 +3009,9 @@ async function ea(a, n) {
|
|
|
3009
3009
|
return e ? typeof e == "function" ? await e(n) || [] : e : [];
|
|
3010
3010
|
}
|
|
3011
3011
|
function ta(a, n, e, t, l) {
|
|
3012
|
-
const s =
|
|
3013
|
-
return
|
|
3014
|
-
|
|
3012
|
+
const s = j([]), u = v(() => !t || !l ? {} : Et(a.cascader).reduce((p, d) => (p[d] = Be(l, d), p), {}));
|
|
3013
|
+
return K(
|
|
3014
|
+
u,
|
|
3015
3015
|
async (i) => {
|
|
3016
3016
|
if (e.value) {
|
|
3017
3017
|
s.value = await ea(a, i);
|
|
@@ -3029,21 +3029,21 @@ function ta(a, n, e, t, l) {
|
|
|
3029
3029
|
placeholder: p,
|
|
3030
3030
|
label: d = "...",
|
|
3031
3031
|
disabled: m,
|
|
3032
|
-
readonly:
|
|
3032
|
+
readonly: h
|
|
3033
3033
|
} = a, _ = {
|
|
3034
3034
|
...a.props,
|
|
3035
3035
|
placeholder: p || (p === null ? void 0 : `请输入${d}`),
|
|
3036
3036
|
disabled: m,
|
|
3037
|
-
readonly:
|
|
3037
|
+
readonly: h,
|
|
3038
3038
|
options: s.value,
|
|
3039
3039
|
onFocus: () => n("focus"),
|
|
3040
3040
|
onBlur: () => n("blur"),
|
|
3041
|
-
onChange: (
|
|
3042
|
-
}, y = typeof i == "string" ?
|
|
3041
|
+
onChange: ($) => n("change", $)
|
|
3042
|
+
}, y = typeof i == "string" ? At[i] : {
|
|
3043
3043
|
component: i,
|
|
3044
3044
|
props: {}
|
|
3045
3045
|
};
|
|
3046
|
-
return
|
|
3046
|
+
return Xn({}, y, {
|
|
3047
3047
|
props: _
|
|
3048
3048
|
});
|
|
3049
3049
|
})
|
|
@@ -3055,46 +3055,46 @@ const na = {
|
|
|
3055
3055
|
}, oa = {
|
|
3056
3056
|
key: 0,
|
|
3057
3057
|
class: "x-field__tip"
|
|
3058
|
-
}, aa = /* @__PURE__ */
|
|
3058
|
+
}, aa = /* @__PURE__ */ I({
|
|
3059
3059
|
name: "XField",
|
|
3060
3060
|
__name: "Field",
|
|
3061
|
-
props:
|
|
3061
|
+
props: Qo,
|
|
3062
3062
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
3063
3063
|
setup(a, { expose: n, emit: e }) {
|
|
3064
|
-
const t = a, l = e, s =
|
|
3064
|
+
const t = a, l = e, s = $e(Ft, null), u = $e(fn, null), r = $e(Nt, null), i = v(() => !s?.proxy || !r ? t.visible : typeof t.visible == "function" ? t.visible(r) : Ge(t.visible) ? Object.entries(t.visible).every(([U, H]) => Be(r, U) === H) : t.visible), p = () => s?.proxy && r && t.name ? Be(r, t.name) ?? t.modelValue : t.modelValue, d = j(p()), { editor: m } = ta(
|
|
3065
3065
|
t,
|
|
3066
3066
|
l,
|
|
3067
3067
|
i,
|
|
3068
3068
|
s,
|
|
3069
3069
|
r
|
|
3070
|
-
),
|
|
3071
|
-
() => t.size ||
|
|
3072
|
-
),
|
|
3070
|
+
), h = j(), _ = j(), y = v(
|
|
3071
|
+
() => t.size || u?.size || "default"
|
|
3072
|
+
), $ = v(() => Object.assign(
|
|
3073
3073
|
{},
|
|
3074
3074
|
s?.props.tooltipMessage || {},
|
|
3075
3075
|
typeof t.tooltipMessage == "boolean" ? {} : t.tooltipMessage
|
|
3076
|
-
)), w = (x = "") => t.error ? t.error : x.includes("is required") ? `${t.label || t.name}是必填项!` : x,
|
|
3076
|
+
)), w = (x = "") => t.error ? t.error : x.includes("is required") ? `${t.label || t.name}是必填项!` : x, E = v(() => {
|
|
3077
3077
|
const x = s?.props.tooltipMessage ?? t.tooltipMessage;
|
|
3078
3078
|
return {
|
|
3079
3079
|
[`is-tooltip-${t.tooltipPosition}`]: !!x && !!t.tooltipPosition
|
|
3080
3080
|
};
|
|
3081
|
-
}),
|
|
3081
|
+
}), P = v(() => {
|
|
3082
3082
|
const x = s?.proxy;
|
|
3083
3083
|
return {
|
|
3084
|
-
width: t.width ?
|
|
3084
|
+
width: t.width ? Q(t.width) : x && x.inline && x.inlineColumns ? `${100 / x.inlineColumns}%` : null
|
|
3085
3085
|
};
|
|
3086
|
-
}),
|
|
3086
|
+
}), C = v(() => ({
|
|
3087
3087
|
right: typeof t.tooltipPosition == "number" ? `${t.tooltipPosition}px` : void 0
|
|
3088
|
-
})),
|
|
3088
|
+
})), V = v(() => ({
|
|
3089
3089
|
...m.value.props,
|
|
3090
3090
|
modelValue: d.value,
|
|
3091
3091
|
"onUpdate:modelValue": (x) => {
|
|
3092
3092
|
d.value = x;
|
|
3093
3093
|
}
|
|
3094
3094
|
}));
|
|
3095
|
-
return
|
|
3096
|
-
i.value && !
|
|
3097
|
-
}),
|
|
3095
|
+
return K(d, (x, U) => {
|
|
3096
|
+
i.value && !qe(x, U) && (l("update:modelValue", x), s?.proxy && r && t.name && Xe(r, t.name, x));
|
|
3097
|
+
}), K(
|
|
3098
3098
|
() => !s?.proxy || !t.name || !r ? t.modelValue : Be(r, t.name) ?? t.modelValue,
|
|
3099
3099
|
(x) => {
|
|
3100
3100
|
i.value && (d.value = x);
|
|
@@ -3102,17 +3102,17 @@ const na = {
|
|
|
3102
3102
|
{
|
|
3103
3103
|
immediate: !0
|
|
3104
3104
|
}
|
|
3105
|
-
),
|
|
3105
|
+
), K(
|
|
3106
3106
|
i,
|
|
3107
3107
|
(x) => {
|
|
3108
|
-
s?.proxy && r && t.name && (x ? (d.value = p(),
|
|
3108
|
+
s?.proxy && r && t.name && (x ? (d.value = p(), Xe(r, t.name, d.value)) : (d.value = void 0, Xe(r, t.name, void 0)));
|
|
3109
3109
|
},
|
|
3110
3110
|
{
|
|
3111
3111
|
immediate: !0
|
|
3112
3112
|
}
|
|
3113
3113
|
), n({
|
|
3114
3114
|
fieldValue: d,
|
|
3115
|
-
itemRef:
|
|
3115
|
+
itemRef: h,
|
|
3116
3116
|
editorRef: _,
|
|
3117
3117
|
focus: () => {
|
|
3118
3118
|
_.value?.focus && _.value.focus();
|
|
@@ -3120,78 +3120,78 @@ const na = {
|
|
|
3120
3120
|
blur: () => {
|
|
3121
3121
|
_.value?.foucs && _.value.blur();
|
|
3122
3122
|
}
|
|
3123
|
-
}), (x,
|
|
3123
|
+
}), (x, U) => i.value ? (c(), g(o(mn), A({
|
|
3124
3124
|
key: 0,
|
|
3125
|
-
class: ["x-field",
|
|
3125
|
+
class: ["x-field", E.value],
|
|
3126
3126
|
ref_key: "itemRef",
|
|
3127
|
-
ref:
|
|
3127
|
+
ref: h,
|
|
3128
3128
|
prop: t.name,
|
|
3129
3129
|
label: x.label,
|
|
3130
3130
|
size: y.value,
|
|
3131
|
-
style:
|
|
3132
|
-
}, x.$attrs),
|
|
3133
|
-
error: f(({ error:
|
|
3134
|
-
|
|
3135
|
-
o(s)?.props.tooltipMessage ?? t.tooltipMessage ? (
|
|
3131
|
+
style: P.value
|
|
3132
|
+
}, x.$attrs), ue({
|
|
3133
|
+
error: f(({ error: H }) => [
|
|
3134
|
+
S(x.$slots, "error", { error: H }, () => [
|
|
3135
|
+
o(s)?.props.tooltipMessage ?? t.tooltipMessage ? (c(), z("div", {
|
|
3136
3136
|
key: 0,
|
|
3137
3137
|
class: "x-field__info",
|
|
3138
|
-
style: fe(
|
|
3138
|
+
style: fe(C.value)
|
|
3139
3139
|
}, [
|
|
3140
|
-
k(o(
|
|
3141
|
-
content: w(
|
|
3142
|
-
},
|
|
3140
|
+
k(o(bt), A({
|
|
3141
|
+
content: w(H)
|
|
3142
|
+
}, $.value), {
|
|
3143
3143
|
default: f(() => [
|
|
3144
3144
|
k(o(de), {
|
|
3145
3145
|
class: "x-field__trigger",
|
|
3146
|
-
icon: o(
|
|
3146
|
+
icon: o(In),
|
|
3147
3147
|
size: y.value
|
|
3148
3148
|
}, null, 8, ["icon", "size"])
|
|
3149
3149
|
]),
|
|
3150
3150
|
_: 2
|
|
3151
3151
|
}, 1040, ["content"])
|
|
3152
|
-
], 4)) : (
|
|
3152
|
+
], 4)) : (c(), z("div", na, O(w(H)), 1))
|
|
3153
3153
|
])
|
|
3154
3154
|
]),
|
|
3155
3155
|
default: f(() => [
|
|
3156
|
-
|
|
3157
|
-
class:
|
|
3156
|
+
F("div", {
|
|
3157
|
+
class: Y(["x-field__editor_wrap", { "is-inline": t.inline }])
|
|
3158
3158
|
}, [
|
|
3159
|
-
|
|
3160
|
-
o(m).component ? (
|
|
3159
|
+
S(x.$slots, "editor", { editor: V.value }, () => [
|
|
3160
|
+
o(m).component ? (c(), g(J(o(m).component), A({
|
|
3161
3161
|
key: 0,
|
|
3162
3162
|
class: "x-field__editor",
|
|
3163
3163
|
ref_key: "editorRef",
|
|
3164
3164
|
ref: _,
|
|
3165
3165
|
modelValue: d.value,
|
|
3166
|
-
"onUpdate:modelValue":
|
|
3167
|
-
}, o(m).props),
|
|
3166
|
+
"onUpdate:modelValue": U[0] || (U[0] = (H) => d.value = H)
|
|
3167
|
+
}, o(m).props), ue({ _: 2 }, [
|
|
3168
3168
|
x.$slots.option ? {
|
|
3169
3169
|
name: "option",
|
|
3170
|
-
fn: f(({ option:
|
|
3171
|
-
|
|
3170
|
+
fn: f(({ option: H }) => [
|
|
3171
|
+
S(x.$slots, "option", { option: H })
|
|
3172
3172
|
]),
|
|
3173
3173
|
key: "0"
|
|
3174
3174
|
} : void 0
|
|
3175
|
-
]), 1040, ["modelValue"])) :
|
|
3175
|
+
]), 1040, ["modelValue"])) : b("", !0)
|
|
3176
3176
|
]),
|
|
3177
|
-
t.tip || x.$slots.tip ? (
|
|
3178
|
-
|
|
3179
|
-
|
|
3177
|
+
t.tip || x.$slots.tip ? (c(), z("div", oa, [
|
|
3178
|
+
S(x.$slots, "tip", {}, () => [
|
|
3179
|
+
D(O(t.tip), 1)
|
|
3180
3180
|
])
|
|
3181
|
-
])) :
|
|
3181
|
+
])) : b("", !0)
|
|
3182
3182
|
], 2),
|
|
3183
|
-
|
|
3183
|
+
S(x.$slots, "default")
|
|
3184
3184
|
]),
|
|
3185
3185
|
_: 2
|
|
3186
3186
|
}, [
|
|
3187
3187
|
x.$slots.label ? {
|
|
3188
3188
|
name: "label",
|
|
3189
3189
|
fn: f(() => [
|
|
3190
|
-
|
|
3190
|
+
S(x.$slots, "label")
|
|
3191
3191
|
]),
|
|
3192
3192
|
key: "0"
|
|
3193
3193
|
} : void 0
|
|
3194
|
-
]), 1040, ["prop", "label", "size", "class", "style"])) :
|
|
3194
|
+
]), 1040, ["prop", "label", "size", "class", "style"])) : b("", !0);
|
|
3195
3195
|
}
|
|
3196
3196
|
}), sa = {
|
|
3197
3197
|
/**
|
|
@@ -3249,78 +3249,78 @@ const na = {
|
|
|
3249
3249
|
type: [Object, Boolean],
|
|
3250
3250
|
default: void 0
|
|
3251
3251
|
}
|
|
3252
|
-
},
|
|
3252
|
+
}, Ft = Symbol("formInstanceKey"), Nt = Symbol("formModelKey"), la = /* @__PURE__ */ I({
|
|
3253
3253
|
name: "XForm",
|
|
3254
3254
|
__name: "Form",
|
|
3255
3255
|
props: sa,
|
|
3256
3256
|
emits: ["change", "submit", "reset"],
|
|
3257
3257
|
setup(a, { expose: n, emit: e }) {
|
|
3258
|
-
const t = a, l = e, s = pe(),
|
|
3259
|
-
|
|
3258
|
+
const t = a, l = e, s = pe(), u = j(), r = Re(t.model || {}), i = j(!1);
|
|
3259
|
+
Se(Ft, s), Se(Nt, r), K(
|
|
3260
3260
|
() => t.model,
|
|
3261
3261
|
(m) => {
|
|
3262
3262
|
Object.assign(r, m);
|
|
3263
3263
|
},
|
|
3264
3264
|
{ deep: !0 }
|
|
3265
|
-
),
|
|
3265
|
+
), K(r, () => {
|
|
3266
3266
|
l("change", ye(r));
|
|
3267
3267
|
});
|
|
3268
3268
|
const p = async () => {
|
|
3269
|
-
await
|
|
3269
|
+
await u.value.validate().catch(() => !1) && (l("submit", ye(r)), t.submitMethod && (i.value = !0, await t.submitMethod(ye(r)), i.value = !1));
|
|
3270
3270
|
}, d = (m) => {
|
|
3271
|
-
|
|
3271
|
+
u.value.resetFields(m), l("reset");
|
|
3272
3272
|
};
|
|
3273
3273
|
return n({
|
|
3274
|
-
formRef:
|
|
3274
|
+
formRef: u,
|
|
3275
3275
|
model: r,
|
|
3276
3276
|
submit: p,
|
|
3277
3277
|
reset: d
|
|
3278
|
-
}), (m,
|
|
3278
|
+
}), (m, h) => (c(), g(o(gn), A({
|
|
3279
3279
|
ref_key: "formRef",
|
|
3280
|
-
ref:
|
|
3280
|
+
ref: u,
|
|
3281
3281
|
class: "x-form",
|
|
3282
3282
|
inline: t.inline,
|
|
3283
3283
|
model: r,
|
|
3284
|
-
onKeyup:
|
|
3285
|
-
onSubmit:
|
|
3284
|
+
onKeyup: Kt(p, ["enter"]),
|
|
3285
|
+
onSubmit: h[1] || (h[1] = vt(() => {
|
|
3286
3286
|
}, ["stop", "prevent"]))
|
|
3287
3287
|
}, m.$attrs), {
|
|
3288
3288
|
default: f(() => [
|
|
3289
|
-
|
|
3290
|
-
t.footer ? (
|
|
3289
|
+
S(m.$slots, "default"),
|
|
3290
|
+
t.footer ? (c(), g(o(aa), {
|
|
3291
3291
|
key: 0,
|
|
3292
3292
|
editor: "none",
|
|
3293
3293
|
class: "x-form__footer",
|
|
3294
3294
|
label: " "
|
|
3295
3295
|
}, {
|
|
3296
3296
|
editor: f(() => [
|
|
3297
|
-
|
|
3298
|
-
t.submitText ? (
|
|
3297
|
+
S(m.$slots, "footer", {}, () => [
|
|
3298
|
+
t.submitText ? (c(), g(o(ie), {
|
|
3299
3299
|
key: 0,
|
|
3300
3300
|
loading: i.value,
|
|
3301
3301
|
type: "primary",
|
|
3302
3302
|
onClick: p
|
|
3303
3303
|
}, {
|
|
3304
3304
|
default: f(() => [
|
|
3305
|
-
|
|
3305
|
+
D(O(t.submitText), 1)
|
|
3306
3306
|
]),
|
|
3307
3307
|
_: 1
|
|
3308
|
-
}, 8, ["loading"])) :
|
|
3309
|
-
t.resetText ? (
|
|
3308
|
+
}, 8, ["loading"])) : b("", !0),
|
|
3309
|
+
t.resetText ? (c(), g(o(ie), {
|
|
3310
3310
|
key: 1,
|
|
3311
3311
|
type: "default",
|
|
3312
|
-
onClick:
|
|
3312
|
+
onClick: h[0] || (h[0] = () => d())
|
|
3313
3313
|
}, {
|
|
3314
3314
|
default: f(() => [
|
|
3315
|
-
|
|
3315
|
+
D(O(t.resetText), 1)
|
|
3316
3316
|
]),
|
|
3317
3317
|
_: 1
|
|
3318
|
-
})) :
|
|
3319
|
-
|
|
3318
|
+
})) : b("", !0),
|
|
3319
|
+
S(m.$slots, "action")
|
|
3320
3320
|
])
|
|
3321
3321
|
]),
|
|
3322
3322
|
_: 3
|
|
3323
|
-
})) :
|
|
3323
|
+
})) : b("", !0)
|
|
3324
3324
|
]),
|
|
3325
3325
|
_: 3
|
|
3326
3326
|
}, 16, ["inline", "model"]));
|
|
@@ -3362,13 +3362,13 @@ const na = {
|
|
|
3362
3362
|
submitMethod: {
|
|
3363
3363
|
type: Function
|
|
3364
3364
|
}
|
|
3365
|
-
},
|
|
3365
|
+
}, Ka = /* @__PURE__ */ I({
|
|
3366
3366
|
name: "XDialogForm",
|
|
3367
3367
|
__name: "DialogForm",
|
|
3368
3368
|
props: ia,
|
|
3369
3369
|
emits: ["update:modelValue", "submit", "close"],
|
|
3370
3370
|
setup(a, { expose: n, emit: e }) {
|
|
3371
|
-
const t = a, l = e, s =
|
|
3371
|
+
const t = a, l = e, s = j(), u = j(), r = v(() => u.value?.$vtjEl), i = () => {
|
|
3372
3372
|
s.value?.submit();
|
|
3373
3373
|
}, p = () => {
|
|
3374
3374
|
l("update:modelValue", !1), l("close");
|
|
@@ -3376,28 +3376,28 @@ const na = {
|
|
|
3376
3376
|
l("submit", _), t.submitMethod ? await t.submitMethod(_) && p() : p();
|
|
3377
3377
|
}, m = v(
|
|
3378
3378
|
() => t.formProps?.disabled ? !1 : t.submit
|
|
3379
|
-
),
|
|
3379
|
+
), h = v(
|
|
3380
3380
|
() => t.formProps?.disabled ? !1 : t.cancel
|
|
3381
3381
|
);
|
|
3382
3382
|
return n({
|
|
3383
3383
|
$vtjEl: r,
|
|
3384
3384
|
formRef: s,
|
|
3385
|
-
dialogRef:
|
|
3386
|
-
}), (_, y) => (
|
|
3385
|
+
dialogRef: u
|
|
3386
|
+
}), (_, y) => (c(), g(o(Ot), A({
|
|
3387
3387
|
ref_key: "dialogRef",
|
|
3388
|
-
ref:
|
|
3388
|
+
ref: u,
|
|
3389
3389
|
class: "x-dialog-form",
|
|
3390
3390
|
"model-value": t.modelValue,
|
|
3391
3391
|
submit: m.value,
|
|
3392
|
-
cancel:
|
|
3392
|
+
cancel: h.value,
|
|
3393
3393
|
size: t.size,
|
|
3394
3394
|
onSubmit: i,
|
|
3395
3395
|
onClose: p,
|
|
3396
3396
|
minimizable: !1,
|
|
3397
3397
|
maximizable: !1
|
|
3398
|
-
}, _.$attrs),
|
|
3398
|
+
}, _.$attrs), ue({
|
|
3399
3399
|
default: f(() => [
|
|
3400
|
-
k(o(la),
|
|
3400
|
+
k(o(la), A({
|
|
3401
3401
|
ref_key: "formRef",
|
|
3402
3402
|
ref: s,
|
|
3403
3403
|
class: "x-dialog-form__form",
|
|
@@ -3409,7 +3409,7 @@ const na = {
|
|
|
3409
3409
|
"submit-method": d
|
|
3410
3410
|
}, t.formProps), {
|
|
3411
3411
|
default: f(() => [
|
|
3412
|
-
|
|
3412
|
+
S(_.$slots, "default")
|
|
3413
3413
|
]),
|
|
3414
3414
|
_: 3
|
|
3415
3415
|
}, 16, ["size", "model", "rules"])
|
|
@@ -3419,21 +3419,21 @@ const na = {
|
|
|
3419
3419
|
_.$slots.extra ? {
|
|
3420
3420
|
name: "extra",
|
|
3421
3421
|
fn: f(() => [
|
|
3422
|
-
|
|
3422
|
+
S(_.$slots, "extra")
|
|
3423
3423
|
]),
|
|
3424
3424
|
key: "0"
|
|
3425
3425
|
} : void 0,
|
|
3426
3426
|
_.$slots.handle ? {
|
|
3427
3427
|
name: "handle",
|
|
3428
3428
|
fn: f(() => [
|
|
3429
|
-
|
|
3429
|
+
S(_.$slots, "handle")
|
|
3430
3430
|
]),
|
|
3431
3431
|
key: "1"
|
|
3432
3432
|
} : void 0,
|
|
3433
3433
|
_.$slots.footer ? {
|
|
3434
3434
|
name: "footer",
|
|
3435
3435
|
fn: f(() => [
|
|
3436
|
-
|
|
3436
|
+
S(_.$slots, "footer")
|
|
3437
3437
|
]),
|
|
3438
3438
|
key: "2"
|
|
3439
3439
|
} : void 0
|
|
@@ -3455,21 +3455,21 @@ const na = {
|
|
|
3455
3455
|
align: {
|
|
3456
3456
|
type: String
|
|
3457
3457
|
}
|
|
3458
|
-
},
|
|
3458
|
+
}, ca = { class: "x-tabs__label-inner" }, ua = {
|
|
3459
3459
|
key: 0,
|
|
3460
3460
|
class: "x-tabs__actions"
|
|
3461
|
-
}, Wa = /* @__PURE__ */
|
|
3461
|
+
}, Wa = /* @__PURE__ */ I({
|
|
3462
3462
|
name: "XTabs",
|
|
3463
3463
|
__name: "Tabs",
|
|
3464
3464
|
props: ra,
|
|
3465
3465
|
emits: ["actionClick", "actionCommand"],
|
|
3466
3466
|
setup(a, { emit: n }) {
|
|
3467
3467
|
const e = a, t = n, l = (i) => {
|
|
3468
|
-
const { label: p, name: d, value: m, disabled:
|
|
3468
|
+
const { label: p, name: d, value: m, disabled: h, closable: _, lazy: y } = i;
|
|
3469
3469
|
return {
|
|
3470
3470
|
label: p,
|
|
3471
3471
|
name: m ?? d,
|
|
3472
|
-
disabled:
|
|
3472
|
+
disabled: h,
|
|
3473
3473
|
closable: _,
|
|
3474
3474
|
lazy: y
|
|
3475
3475
|
};
|
|
@@ -3477,43 +3477,43 @@ const na = {
|
|
|
3477
3477
|
"is-no-border": !e.border,
|
|
3478
3478
|
"is-fit": !!e.fit,
|
|
3479
3479
|
[`is-align-${e.align}`]: !!e.align
|
|
3480
|
-
})),
|
|
3480
|
+
})), u = (i) => {
|
|
3481
3481
|
t("actionClick", i);
|
|
3482
3482
|
}, r = (i) => {
|
|
3483
3483
|
t("actionCommand", i);
|
|
3484
3484
|
};
|
|
3485
|
-
return (i, p) => (
|
|
3485
|
+
return (i, p) => (c(), g(o(_t), A({
|
|
3486
3486
|
class: ["x-tabs", s.value]
|
|
3487
3487
|
}, i.$attrs), {
|
|
3488
3488
|
default: f(() => [
|
|
3489
|
-
(
|
|
3489
|
+
(c(!0), z(W, null, Z(e.items, (d) => (c(), g(o(He), A({
|
|
3490
3490
|
key: d.value ?? d.name
|
|
3491
3491
|
}, l(d)), {
|
|
3492
3492
|
label: f(() => [
|
|
3493
|
-
|
|
3494
|
-
d.icon ? (
|
|
3493
|
+
S(i.$slots, "label", le(he(d)), () => [
|
|
3494
|
+
d.icon ? (c(), g(J(o(ke)(d.icon)), {
|
|
3495
3495
|
key: 0,
|
|
3496
3496
|
class: "x-tabs__icon"
|
|
3497
|
-
})) :
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
d.actions && [d.name, d.value].includes(i.$attrs.modelValue) ? (
|
|
3501
|
-
(
|
|
3497
|
+
})) : b("", !0),
|
|
3498
|
+
F("div", ca, [
|
|
3499
|
+
D(O(d.label) + " ", 1),
|
|
3500
|
+
d.actions && [d.name, d.value].includes(i.$attrs.modelValue) ? (c(), z("div", ua, [
|
|
3501
|
+
(c(!0), z(W, null, Z(d.actions, (m) => (c(), g(o(te), A({
|
|
3502
3502
|
mode: "icon",
|
|
3503
3503
|
type: "primary",
|
|
3504
3504
|
size: "small",
|
|
3505
3505
|
circle: ""
|
|
3506
3506
|
}, m, {
|
|
3507
|
-
onClick:
|
|
3507
|
+
onClick: u,
|
|
3508
3508
|
onCommand: r
|
|
3509
3509
|
}), null, 16))), 256))
|
|
3510
|
-
])) :
|
|
3510
|
+
])) : b("", !0)
|
|
3511
3511
|
])
|
|
3512
3512
|
])
|
|
3513
3513
|
]),
|
|
3514
3514
|
default: f(() => [
|
|
3515
|
-
|
|
3516
|
-
d.component ? (
|
|
3515
|
+
S(i.$slots, "default", le(he(d)), () => [
|
|
3516
|
+
d.component ? (c(), g(J(d.component), le(A({ key: 0 }, d.props)), null, 16)) : b("", !0)
|
|
3517
3517
|
])
|
|
3518
3518
|
]),
|
|
3519
3519
|
_: 2
|
|
@@ -3569,51 +3569,51 @@ const na = {
|
|
|
3569
3569
|
}, ga = {
|
|
3570
3570
|
key: 3,
|
|
3571
3571
|
class: "x-data-item__section x-data-item__actions"
|
|
3572
|
-
},
|
|
3572
|
+
}, Ya = /* @__PURE__ */ I({
|
|
3573
3573
|
name: "XDataItem",
|
|
3574
3574
|
__name: "DataItem",
|
|
3575
3575
|
props: da,
|
|
3576
3576
|
emits: ["imageClick", "titleClick", "actionClick", "actionCommand"],
|
|
3577
3577
|
setup(a, { emit: n }) {
|
|
3578
3578
|
const e = a, t = n, l = v(() => {
|
|
3579
|
-
const { imageWidth: m, imageHeight:
|
|
3579
|
+
const { imageWidth: m, imageHeight: h } = e;
|
|
3580
3580
|
return {
|
|
3581
|
-
width: m ?
|
|
3582
|
-
height:
|
|
3581
|
+
width: m ? Q(m) : void 0,
|
|
3582
|
+
height: h ? Q(h) : void 0
|
|
3583
3583
|
};
|
|
3584
3584
|
}), s = v(() => ({
|
|
3585
3585
|
[`is-image-${e.direction}`]: !!e.direction,
|
|
3586
3586
|
"is-split": !!e.split
|
|
3587
|
-
})),
|
|
3587
|
+
})), u = v(() => ({
|
|
3588
3588
|
size: "small",
|
|
3589
3589
|
mode: "text",
|
|
3590
3590
|
justify: "flex-end",
|
|
3591
3591
|
type: "info",
|
|
3592
3592
|
items: e.actions,
|
|
3593
3593
|
...e.actionBarProps
|
|
3594
|
-
})), r = () => t("imageClick"), i = () => t("titleClick"), p = (m) => t("actionClick", m), d = (m,
|
|
3595
|
-
return (m,
|
|
3596
|
-
class:
|
|
3594
|
+
})), r = () => t("imageClick"), i = () => t("titleClick"), p = (m) => t("actionClick", m), d = (m, h) => t("actionCommand", m, h);
|
|
3595
|
+
return (m, h) => (c(), g(o(B), {
|
|
3596
|
+
class: Y(["x-data-item", s.value]),
|
|
3597
3597
|
direction: e.direction
|
|
3598
3598
|
}, {
|
|
3599
3599
|
default: f(() => [
|
|
3600
|
-
e.imageSrc || m.$slots.image ? (
|
|
3600
|
+
e.imageSrc || m.$slots.image ? (c(), g(o(B), {
|
|
3601
3601
|
key: 0,
|
|
3602
3602
|
class: "x-data-item__img",
|
|
3603
3603
|
autoPointer: !0,
|
|
3604
3604
|
onClick: e.onImageClick ? r : void 0
|
|
3605
3605
|
}, {
|
|
3606
3606
|
default: f(() => [
|
|
3607
|
-
|
|
3608
|
-
e.imageSrc ? (
|
|
3607
|
+
S(m.$slots, "image", {}, () => [
|
|
3608
|
+
e.imageSrc ? (c(), g(o(yn), {
|
|
3609
3609
|
key: 0,
|
|
3610
3610
|
style: fe(l.value),
|
|
3611
3611
|
src: e.imageSrc
|
|
3612
|
-
}, null, 8, ["style", "src"])) :
|
|
3612
|
+
}, null, 8, ["style", "src"])) : b("", !0)
|
|
3613
3613
|
])
|
|
3614
3614
|
]),
|
|
3615
3615
|
_: 3
|
|
3616
|
-
}, 8, ["onClick"])) :
|
|
3616
|
+
}, 8, ["onClick"])) : b("", !0),
|
|
3617
3617
|
k(o(B), {
|
|
3618
3618
|
class: "x-data-item__content",
|
|
3619
3619
|
direction: "column",
|
|
@@ -3621,7 +3621,7 @@ const na = {
|
|
|
3621
3621
|
shrink: ""
|
|
3622
3622
|
}, {
|
|
3623
3623
|
default: f(() => [
|
|
3624
|
-
e.title || m.$slots.title ? (
|
|
3624
|
+
e.title || m.$slots.title ? (c(), g(o(B), {
|
|
3625
3625
|
key: 0,
|
|
3626
3626
|
class: "x-data-item__section x-data-item__wrapper",
|
|
3627
3627
|
align: "center",
|
|
@@ -3629,34 +3629,34 @@ const na = {
|
|
|
3629
3629
|
onClick: e.onTitleClick ? i : void 0
|
|
3630
3630
|
}, {
|
|
3631
3631
|
default: f(() => [
|
|
3632
|
-
e.icon ? (
|
|
3632
|
+
e.icon ? (c(), g(J(o(ke)(e.icon)), {
|
|
3633
3633
|
key: 0,
|
|
3634
3634
|
class: "x-data-item__icon"
|
|
3635
|
-
})) :
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3635
|
+
})) : b("", !0),
|
|
3636
|
+
F("span", pa, [
|
|
3637
|
+
S(m.$slots, "title", {}, () => [
|
|
3638
|
+
D(O(e.title), 1)
|
|
3639
3639
|
])
|
|
3640
3640
|
])
|
|
3641
3641
|
]),
|
|
3642
3642
|
_: 3
|
|
3643
|
-
}, 8, ["onClick"])) :
|
|
3644
|
-
e.description || m.$slots.description ? (
|
|
3645
|
-
|
|
3646
|
-
|
|
3643
|
+
}, 8, ["onClick"])) : b("", !0),
|
|
3644
|
+
e.description || m.$slots.description ? (c(), z("div", fa, [
|
|
3645
|
+
S(m.$slots, "description", {}, () => [
|
|
3646
|
+
D(O(e.description), 1)
|
|
3647
3647
|
])
|
|
3648
|
-
])) :
|
|
3649
|
-
m.$slots.default ? (
|
|
3650
|
-
|
|
3651
|
-
])) :
|
|
3652
|
-
e.actions || e.actionBarProps || m.$slots.actions ? (
|
|
3653
|
-
|
|
3654
|
-
k(o(et),
|
|
3648
|
+
])) : b("", !0),
|
|
3649
|
+
m.$slots.default ? (c(), z("div", ma, [
|
|
3650
|
+
S(m.$slots, "default")
|
|
3651
|
+
])) : b("", !0),
|
|
3652
|
+
e.actions || e.actionBarProps || m.$slots.actions ? (c(), z("div", ga, [
|
|
3653
|
+
S(m.$slots, "actions", {}, () => [
|
|
3654
|
+
k(o(et), A(u.value, {
|
|
3655
3655
|
onClick: p,
|
|
3656
3656
|
onCommand: d
|
|
3657
3657
|
}), null, 16)
|
|
3658
3658
|
])
|
|
3659
|
-
])) :
|
|
3659
|
+
])) : b("", !0)
|
|
3660
3660
|
]),
|
|
3661
3661
|
_: 3
|
|
3662
3662
|
})
|
|
@@ -3680,23 +3680,23 @@ const na = {
|
|
|
3680
3680
|
function va() {
|
|
3681
3681
|
return import("echarts");
|
|
3682
3682
|
}
|
|
3683
|
-
function
|
|
3684
|
-
const e =
|
|
3683
|
+
function ba(a, n) {
|
|
3684
|
+
const e = j(), t = Ve();
|
|
3685
3685
|
return mt(async () => {
|
|
3686
3686
|
t.value = await va();
|
|
3687
3687
|
const l = o(a);
|
|
3688
3688
|
l && (e.value || (e.value = we(t.value.init(l))), e.value && e.value.setOption(n.option || {}));
|
|
3689
3689
|
}), gt(() => {
|
|
3690
3690
|
e.value && e.value.dispose();
|
|
3691
|
-
}),
|
|
3691
|
+
}), K(
|
|
3692
3692
|
() => n.option,
|
|
3693
3693
|
(l) => {
|
|
3694
3694
|
e.value && e.value.setOption(l || {});
|
|
3695
3695
|
},
|
|
3696
3696
|
{ deep: !0 }
|
|
3697
|
-
),
|
|
3697
|
+
), Dn(
|
|
3698
3698
|
a,
|
|
3699
|
-
|
|
3699
|
+
Ln(() => {
|
|
3700
3700
|
e.value && e.value.resize();
|
|
3701
3701
|
}, 150)
|
|
3702
3702
|
), {
|
|
@@ -3704,26 +3704,26 @@ function ha(a, n) {
|
|
|
3704
3704
|
echarts: t
|
|
3705
3705
|
};
|
|
3706
3706
|
}
|
|
3707
|
-
const
|
|
3707
|
+
const Ja = /* @__PURE__ */ I({
|
|
3708
3708
|
name: "XChart",
|
|
3709
3709
|
__name: "Chart",
|
|
3710
3710
|
props: ya,
|
|
3711
3711
|
setup(a, { expose: n }) {
|
|
3712
|
-
const e = a, t =
|
|
3713
|
-
width:
|
|
3714
|
-
height:
|
|
3712
|
+
const e = a, t = j(), { echartsInstance: l, echarts: s } = ba(t, e), u = v(() => ({
|
|
3713
|
+
width: Q(e.width),
|
|
3714
|
+
height: Q(e.height)
|
|
3715
3715
|
}));
|
|
3716
3716
|
return n({
|
|
3717
3717
|
chartRef: t,
|
|
3718
3718
|
echartsInstance: l,
|
|
3719
3719
|
echarts: s
|
|
3720
|
-
}), (r, i) => (
|
|
3720
|
+
}), (r, i) => (c(), z("div", {
|
|
3721
3721
|
ref_key: "chartRef",
|
|
3722
3722
|
ref: t,
|
|
3723
|
-
style: fe(
|
|
3723
|
+
style: fe(u.value)
|
|
3724
3724
|
}, null, 4));
|
|
3725
3725
|
}
|
|
3726
|
-
}),
|
|
3726
|
+
}), ha = {
|
|
3727
3727
|
data: {
|
|
3728
3728
|
type: [Object, Function],
|
|
3729
3729
|
default() {
|
|
@@ -3773,120 +3773,120 @@ const Qa = /* @__PURE__ */ V({
|
|
|
3773
3773
|
}, xa = {
|
|
3774
3774
|
key: 1,
|
|
3775
3775
|
class: "x-list__nomore"
|
|
3776
|
-
},
|
|
3776
|
+
}, $a = {
|
|
3777
3777
|
key: 1,
|
|
3778
3778
|
class: "x-list__pager"
|
|
3779
|
-
},
|
|
3779
|
+
}, qa = /* @__PURE__ */ I({
|
|
3780
3780
|
name: "XList",
|
|
3781
3781
|
__name: "List",
|
|
3782
|
-
props:
|
|
3782
|
+
props: ha,
|
|
3783
3783
|
emits: ["load"],
|
|
3784
3784
|
setup(a, { expose: n, emit: e }) {
|
|
3785
|
-
const t = a, l = e, s =
|
|
3785
|
+
const t = a, l = e, s = Re({
|
|
3786
3786
|
page: t.page,
|
|
3787
3787
|
pageSize: t.pageSize
|
|
3788
3788
|
});
|
|
3789
|
-
|
|
3790
|
-
const { page:
|
|
3791
|
-
Object.assign(s, { page:
|
|
3789
|
+
Ye(() => {
|
|
3790
|
+
const { page: M, pageSize: N } = t;
|
|
3791
|
+
Object.assign(s, { page: M, pageSize: N });
|
|
3792
3792
|
});
|
|
3793
|
-
const { data:
|
|
3793
|
+
const { data: u, loading: r } = lo(
|
|
3794
3794
|
t.data,
|
|
3795
3795
|
{
|
|
3796
3796
|
list: [],
|
|
3797
3797
|
total: 0
|
|
3798
3798
|
},
|
|
3799
3799
|
s
|
|
3800
|
-
), i = v(() => Math.ceil((
|
|
3801
|
-
width:
|
|
3802
|
-
height:
|
|
3803
|
-
})),
|
|
3800
|
+
), i = v(() => Math.ceil((u.value.total || 0) / s.pageSize)), p = j(!1), d = j(), m = v(() => ({
|
|
3801
|
+
width: Q(t.width),
|
|
3802
|
+
height: Q(t.height)
|
|
3803
|
+
})), h = v(() => ({
|
|
3804
3804
|
"is-virtual": !!t.itemHeight
|
|
3805
3805
|
})), _ = v(() => {
|
|
3806
|
-
const
|
|
3806
|
+
const M = {};
|
|
3807
3807
|
for (let [N, x] of Object.entries(
|
|
3808
3808
|
it(t.infiniteScroll)
|
|
3809
3809
|
))
|
|
3810
|
-
|
|
3811
|
-
return (r.value || p.value) && (
|
|
3812
|
-
}), y = v(() => it(t.pager, {})), { list:
|
|
3813
|
-
v(() =>
|
|
3810
|
+
M[`infinite-scroll-${N}`] = x;
|
|
3811
|
+
return (r.value || p.value) && (M["infinite-scroll-disabled"] = !0), M;
|
|
3812
|
+
}), y = v(() => it(t.pager, {})), { list: $, containerProps: w, wrapperProps: E, scrollTo: P } = An(
|
|
3813
|
+
v(() => u.value.list),
|
|
3814
3814
|
{
|
|
3815
3815
|
itemHeight: t.itemHeight || 0
|
|
3816
3816
|
}
|
|
3817
|
-
),
|
|
3817
|
+
), C = () => {
|
|
3818
3818
|
!t.infiniteScroll || p.value || (s.page < i.value ? (++s.page, l("load", s)) : p.value = !0);
|
|
3819
|
-
},
|
|
3819
|
+
}, V = (M) => t.dataKey ? M[t.dataKey] : void 0;
|
|
3820
3820
|
return n({
|
|
3821
|
-
list:
|
|
3822
|
-
scrollTo:
|
|
3821
|
+
list: $,
|
|
3822
|
+
scrollTo: P,
|
|
3823
3823
|
wrapperRef: d,
|
|
3824
3824
|
loading: r,
|
|
3825
3825
|
state: s,
|
|
3826
3826
|
pageCount: i,
|
|
3827
3827
|
nomore: p,
|
|
3828
|
-
data:
|
|
3829
|
-
getKey:
|
|
3830
|
-
}), (
|
|
3831
|
-
class:
|
|
3828
|
+
data: u,
|
|
3829
|
+
getKey: V
|
|
3830
|
+
}), (M, N) => (c(), z("div", {
|
|
3831
|
+
class: Y(["x-list", h.value]),
|
|
3832
3832
|
style: fe(m.value)
|
|
3833
3833
|
}, [
|
|
3834
|
-
!o(
|
|
3835
|
-
k(o(
|
|
3836
|
-
]) :
|
|
3837
|
-
|
|
3838
|
-
t.itemHeight ? G((
|
|
3834
|
+
!o(u).total && !o(r) ? S(M.$slots, "empty", { key: 0 }, () => [
|
|
3835
|
+
k(o(ht))
|
|
3836
|
+
]) : b("", !0),
|
|
3837
|
+
F("div", A({ class: "x-list__content" }, o(w)), [
|
|
3838
|
+
t.itemHeight ? G((c(), z("div", A({
|
|
3839
3839
|
key: 0,
|
|
3840
3840
|
class: "x-list__wrapper",
|
|
3841
3841
|
ref_key: "wrapperRef",
|
|
3842
3842
|
ref: d
|
|
3843
|
-
}, { ...o(
|
|
3844
|
-
(
|
|
3845
|
-
key:
|
|
3846
|
-
}, { item: x.data, index:
|
|
3847
|
-
|
|
3843
|
+
}, { ...o(E), ..._.value }), [
|
|
3844
|
+
(c(!0), z(W, null, Z(o($), (x, U) => S(M.$slots, "default", le(A({
|
|
3845
|
+
key: V(x.data)
|
|
3846
|
+
}, { item: x.data, index: U })), () => [
|
|
3847
|
+
F("div", null, O(x), 1)
|
|
3848
3848
|
])), 128)),
|
|
3849
|
-
o(r) ? (
|
|
3850
|
-
|
|
3851
|
-
|
|
3849
|
+
o(r) ? (c(), z("div", _a, [
|
|
3850
|
+
S(M.$slots, "loading", {}, () => [
|
|
3851
|
+
D(" 正在加载数据... ")
|
|
3852
3852
|
])
|
|
3853
|
-
])) :
|
|
3854
|
-
p.value ? (
|
|
3855
|
-
|
|
3856
|
-
|
|
3853
|
+
])) : b("", !0),
|
|
3854
|
+
p.value ? (c(), z("div", ka, [
|
|
3855
|
+
S(M.$slots, "nomore", {}, () => [
|
|
3856
|
+
D(" 没有更多数据 ")
|
|
3857
3857
|
])
|
|
3858
|
-
])) :
|
|
3858
|
+
])) : b("", !0)
|
|
3859
3859
|
], 16)), [
|
|
3860
|
-
[o(at),
|
|
3861
|
-
]) : G((
|
|
3860
|
+
[o(at), C]
|
|
3861
|
+
]) : G((c(), z("div", A({
|
|
3862
3862
|
key: 1,
|
|
3863
3863
|
class: "x-list__wrapper"
|
|
3864
3864
|
}, _.value), [
|
|
3865
|
-
(
|
|
3866
|
-
key:
|
|
3867
|
-
}, { item: x, index:
|
|
3868
|
-
|
|
3865
|
+
(c(!0), z(W, null, Z(o(u).list, (x, U) => S(M.$slots, "default", le(A({
|
|
3866
|
+
key: V(x)
|
|
3867
|
+
}, { item: x, index: U })), () => [
|
|
3868
|
+
F("div", null, O(x), 1)
|
|
3869
3869
|
])), 128)),
|
|
3870
|
-
o(r) ? (
|
|
3871
|
-
|
|
3872
|
-
|
|
3870
|
+
o(r) ? (c(), z("div", wa, [
|
|
3871
|
+
S(M.$slots, "loading", {}, () => [
|
|
3872
|
+
D(" 正在加载数据... ")
|
|
3873
3873
|
])
|
|
3874
|
-
])) :
|
|
3875
|
-
p.value ? (
|
|
3876
|
-
|
|
3877
|
-
|
|
3874
|
+
])) : b("", !0),
|
|
3875
|
+
p.value ? (c(), z("div", xa, [
|
|
3876
|
+
S(M.$slots, "nomore", {}, () => [
|
|
3877
|
+
D(" 没有更多数据 ")
|
|
3878
3878
|
])
|
|
3879
|
-
])) :
|
|
3879
|
+
])) : b("", !0)
|
|
3880
3880
|
], 16)), [
|
|
3881
|
-
[o(at),
|
|
3881
|
+
[o(at), C]
|
|
3882
3882
|
])
|
|
3883
3883
|
], 16),
|
|
3884
|
-
t.pager ? (
|
|
3885
|
-
k(o(vn),
|
|
3884
|
+
t.pager ? (c(), z("div", $a, [
|
|
3885
|
+
k(o(vn), A({
|
|
3886
3886
|
small: "",
|
|
3887
3887
|
background: "",
|
|
3888
3888
|
layout: "prev, pager, next",
|
|
3889
|
-
total: o(
|
|
3889
|
+
total: o(u).total,
|
|
3890
3890
|
"default-page-size": t.pageSize,
|
|
3891
3891
|
"default-current-page": t.page,
|
|
3892
3892
|
"current-page": s.page,
|
|
@@ -3894,10 +3894,10 @@ const Qa = /* @__PURE__ */ V({
|
|
|
3894
3894
|
"page-size": s.pageSize,
|
|
3895
3895
|
"onUpdate:pageSize": N[1] || (N[1] = (x) => s.pageSize = x)
|
|
3896
3896
|
}, y.value), null, 16, ["total", "default-page-size", "default-current-page", "current-page", "page-size"])
|
|
3897
|
-
])) :
|
|
3897
|
+
])) : b("", !0)
|
|
3898
3898
|
], 6));
|
|
3899
3899
|
}
|
|
3900
|
-
}),
|
|
3900
|
+
}), Sa = {
|
|
3901
3901
|
name: {
|
|
3902
3902
|
type: String,
|
|
3903
3903
|
default: "VTJ.PRO"
|
|
@@ -3914,9 +3914,9 @@ const Qa = /* @__PURE__ */ V({
|
|
|
3914
3914
|
type: String,
|
|
3915
3915
|
default: "/@vtj/pro/"
|
|
3916
3916
|
}
|
|
3917
|
-
},
|
|
3917
|
+
}, Ca = { class: "x-startup" }, za = { class: "x-startup__wrapper" }, Ma = { class: "x-startup__name" }, Ta = { class: "clip" }, Ea = { class: "x-startup__tagline" }, Pa = { class: "x-startup__actions" }, Ga = /* @__PURE__ */ I({
|
|
3918
3918
|
__name: "Startup",
|
|
3919
|
-
props:
|
|
3919
|
+
props: Sa,
|
|
3920
3920
|
setup(a) {
|
|
3921
3921
|
const n = a, e = () => {
|
|
3922
3922
|
if (typeof window < "u") {
|
|
@@ -3924,22 +3924,22 @@ const Qa = /* @__PURE__ */ V({
|
|
|
3924
3924
|
window.location.href = l;
|
|
3925
3925
|
}
|
|
3926
3926
|
};
|
|
3927
|
-
return (t, l) => (
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3927
|
+
return (t, l) => (c(), z("div", Ca, [
|
|
3928
|
+
F("div", za, [
|
|
3929
|
+
F("div", Ma, [
|
|
3930
|
+
F("span", Ta, O(n.name), 1)
|
|
3931
3931
|
]),
|
|
3932
|
-
|
|
3933
|
-
|
|
3932
|
+
F("div", Ea, O(n.tagline), 1),
|
|
3933
|
+
F("div", Pa, [
|
|
3934
3934
|
k(o(ie), {
|
|
3935
3935
|
type: "primary",
|
|
3936
3936
|
size: "large",
|
|
3937
3937
|
round: "",
|
|
3938
|
-
icon: o(
|
|
3938
|
+
icon: o(Vn),
|
|
3939
3939
|
onClick: e
|
|
3940
3940
|
}, {
|
|
3941
3941
|
default: f(() => [
|
|
3942
|
-
|
|
3942
|
+
D(O(n.actionText), 1)
|
|
3943
3943
|
]),
|
|
3944
3944
|
_: 1
|
|
3945
3945
|
}, 8, ["icon"])
|
|
@@ -3978,13 +3978,13 @@ const Qa = /* @__PURE__ */ V({
|
|
|
3978
3978
|
syncProp: {
|
|
3979
3979
|
type: String
|
|
3980
3980
|
}
|
|
3981
|
-
},
|
|
3981
|
+
}, Ia = { class: "x-test__slot" }, Va = { class: "x-test__slot" }, Za = /* @__PURE__ */ I({
|
|
3982
3982
|
name: "XTest",
|
|
3983
3983
|
__name: "Test",
|
|
3984
3984
|
props: Ba,
|
|
3985
3985
|
emits: ["click", "submit", "change", "update:modelValue", "update:syncProp"],
|
|
3986
3986
|
setup(a, { expose: n, emit: e }) {
|
|
3987
|
-
const t = a, l = e, s = v(() => Object.entries(t)),
|
|
3987
|
+
const t = a, l = e, s = v(() => Object.entries(t)), u = v({
|
|
3988
3988
|
get() {
|
|
3989
3989
|
return t.modelValue;
|
|
3990
3990
|
},
|
|
@@ -3998,7 +3998,7 @@ const Qa = /* @__PURE__ */ V({
|
|
|
3998
3998
|
set(_) {
|
|
3999
3999
|
l("update:syncProp", _);
|
|
4000
4000
|
}
|
|
4001
|
-
}), i =
|
|
4001
|
+
}), i = j("default inner data"), p = () => {
|
|
4002
4002
|
lt.info({
|
|
4003
4003
|
message: "触发click事件"
|
|
4004
4004
|
}), l("click", t);
|
|
@@ -4008,7 +4008,7 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4008
4008
|
}), l("submit", t);
|
|
4009
4009
|
}, m = (_) => {
|
|
4010
4010
|
i.value = _, l("change", i.value);
|
|
4011
|
-
},
|
|
4011
|
+
}, h = () => {
|
|
4012
4012
|
m("user click change:" + Date.now());
|
|
4013
4013
|
};
|
|
4014
4014
|
return n({
|
|
@@ -4016,7 +4016,7 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4016
4016
|
submit: d,
|
|
4017
4017
|
data: i,
|
|
4018
4018
|
change: m
|
|
4019
|
-
}), (_, y) => (
|
|
4019
|
+
}), (_, y) => (c(), g(o(Ie), {
|
|
4020
4020
|
class: "x-test",
|
|
4021
4021
|
header: "VTJ 低代码测试组件",
|
|
4022
4022
|
border: ""
|
|
@@ -4024,19 +4024,19 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4024
4024
|
default: f(() => [
|
|
4025
4025
|
k(o(se), null, {
|
|
4026
4026
|
default: f(() => [
|
|
4027
|
-
|
|
4027
|
+
D("内部数据")
|
|
4028
4028
|
]),
|
|
4029
4029
|
_: 1
|
|
4030
4030
|
}),
|
|
4031
4031
|
k(o(B), null, {
|
|
4032
4032
|
default: f(() => [
|
|
4033
|
-
|
|
4033
|
+
D(O(i.value), 1)
|
|
4034
4034
|
]),
|
|
4035
4035
|
_: 1
|
|
4036
4036
|
}),
|
|
4037
4037
|
k(o(se), null, {
|
|
4038
4038
|
default: f(() => [
|
|
4039
|
-
|
|
4039
|
+
D("属性")
|
|
4040
4040
|
]),
|
|
4041
4041
|
_: 1
|
|
4042
4042
|
}),
|
|
@@ -4045,9 +4045,9 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4045
4045
|
border: ""
|
|
4046
4046
|
}, {
|
|
4047
4047
|
default: f(() => [
|
|
4048
|
-
(
|
|
4048
|
+
(c(!0), z(W, null, Z(s.value, ([$, w]) => (c(), g(o(Ne), { label: $ }, {
|
|
4049
4049
|
default: f(() => [
|
|
4050
|
-
|
|
4050
|
+
F("pre", null, O(JSON.stringify(w, null, 2)), 1)
|
|
4051
4051
|
]),
|
|
4052
4052
|
_: 2
|
|
4053
4053
|
}, 1032, ["label"]))), 256))
|
|
@@ -4056,7 +4056,7 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4056
4056
|
}),
|
|
4057
4057
|
k(o(se), null, {
|
|
4058
4058
|
default: f(() => [
|
|
4059
|
-
|
|
4059
|
+
D("插槽")
|
|
4060
4060
|
]),
|
|
4061
4061
|
_: 1
|
|
4062
4062
|
}),
|
|
@@ -4066,35 +4066,35 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4066
4066
|
gap: ""
|
|
4067
4067
|
}, {
|
|
4068
4068
|
default: f(() => [
|
|
4069
|
-
k(o(
|
|
4069
|
+
k(o(Ie), {
|
|
4070
4070
|
header: "default",
|
|
4071
4071
|
grow: "",
|
|
4072
4072
|
card: ""
|
|
4073
4073
|
}, {
|
|
4074
4074
|
default: f(() => [
|
|
4075
|
-
|
|
4076
|
-
|
|
4075
|
+
F("div", Ia, [
|
|
4076
|
+
S(_.$slots, "default", {
|
|
4077
4077
|
props: t,
|
|
4078
4078
|
data: i.value
|
|
4079
4079
|
}, () => [
|
|
4080
|
-
|
|
4080
|
+
F("pre", null, O(JSON.stringify({ props: t, data: i.value }, null, 2)), 1)
|
|
4081
4081
|
])
|
|
4082
4082
|
])
|
|
4083
4083
|
]),
|
|
4084
4084
|
_: 3
|
|
4085
4085
|
}),
|
|
4086
|
-
k(o(
|
|
4086
|
+
k(o(Ie), {
|
|
4087
4087
|
header: "extra",
|
|
4088
4088
|
grow: "",
|
|
4089
4089
|
card: ""
|
|
4090
4090
|
}, {
|
|
4091
4091
|
default: f(() => [
|
|
4092
|
-
|
|
4093
|
-
|
|
4092
|
+
F("div", Va, [
|
|
4093
|
+
S(_.$slots, "extra", {
|
|
4094
4094
|
props: t,
|
|
4095
4095
|
data: i.value
|
|
4096
4096
|
}, () => [
|
|
4097
|
-
|
|
4097
|
+
F("pre", null, O(JSON.stringify({ props: t, data: i.value }, null, 2)), 1)
|
|
4098
4098
|
])
|
|
4099
4099
|
])
|
|
4100
4100
|
]),
|
|
@@ -4105,7 +4105,7 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4105
4105
|
}),
|
|
4106
4106
|
k(o(se), null, {
|
|
4107
4107
|
default: f(() => [
|
|
4108
|
-
|
|
4108
|
+
D("双向绑定")
|
|
4109
4109
|
]),
|
|
4110
4110
|
_: 1
|
|
4111
4111
|
}),
|
|
@@ -4119,8 +4119,8 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4119
4119
|
k(o(Ne), { label: "modelValue" }, {
|
|
4120
4120
|
default: f(() => [
|
|
4121
4121
|
k(o(_e), {
|
|
4122
|
-
modelValue:
|
|
4123
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
4122
|
+
modelValue: u.value,
|
|
4123
|
+
"onUpdate:modelValue": y[0] || (y[0] = ($) => u.value = $)
|
|
4124
4124
|
}, null, 8, ["modelValue"])
|
|
4125
4125
|
]),
|
|
4126
4126
|
_: 1
|
|
@@ -4129,7 +4129,7 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4129
4129
|
default: f(() => [
|
|
4130
4130
|
k(o(_e), {
|
|
4131
4131
|
modelValue: r.value,
|
|
4132
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
4132
|
+
"onUpdate:modelValue": y[1] || (y[1] = ($) => r.value = $)
|
|
4133
4133
|
}, null, 8, ["modelValue"])
|
|
4134
4134
|
]),
|
|
4135
4135
|
_: 1
|
|
@@ -4142,7 +4142,7 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4142
4142
|
}),
|
|
4143
4143
|
k(o(se), null, {
|
|
4144
4144
|
default: f(() => [
|
|
4145
|
-
|
|
4145
|
+
D("事件和方法")
|
|
4146
4146
|
]),
|
|
4147
4147
|
_: 1
|
|
4148
4148
|
}),
|
|
@@ -4150,19 +4150,19 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4150
4150
|
default: f(() => [
|
|
4151
4151
|
k(o(ie), { onClick: p }, {
|
|
4152
4152
|
default: f(() => [
|
|
4153
|
-
|
|
4153
|
+
D("click")
|
|
4154
4154
|
]),
|
|
4155
4155
|
_: 1
|
|
4156
4156
|
}),
|
|
4157
4157
|
k(o(ie), { onClick: d }, {
|
|
4158
4158
|
default: f(() => [
|
|
4159
|
-
|
|
4159
|
+
D("submit")
|
|
4160
4160
|
]),
|
|
4161
4161
|
_: 1
|
|
4162
4162
|
}),
|
|
4163
|
-
k(o(ie), { onClick:
|
|
4163
|
+
k(o(ie), { onClick: h }, {
|
|
4164
4164
|
default: f(() => [
|
|
4165
|
-
|
|
4165
|
+
D("change")
|
|
4166
4166
|
]),
|
|
4167
4167
|
_: 1
|
|
4168
4168
|
})
|
|
@@ -4173,7 +4173,7 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4173
4173
|
_: 3
|
|
4174
4174
|
}));
|
|
4175
4175
|
}
|
|
4176
|
-
}),
|
|
4176
|
+
}), Oa = {
|
|
4177
4177
|
units: {
|
|
4178
4178
|
type: [String, Object, Array]
|
|
4179
4179
|
},
|
|
@@ -4197,71 +4197,71 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4197
4197
|
selectProps: {
|
|
4198
4198
|
type: Object
|
|
4199
4199
|
}
|
|
4200
|
-
},
|
|
4200
|
+
}, Qa = /* @__PURE__ */ I({
|
|
4201
4201
|
name: "XInputUnit",
|
|
4202
4202
|
__name: "InputUnit",
|
|
4203
|
-
props:
|
|
4203
|
+
props: Oa,
|
|
4204
4204
|
emits: ["update:modelValue", "update:unit", "change", "unit-change"],
|
|
4205
4205
|
setup(a, { expose: n, emit: e }) {
|
|
4206
|
-
const t = a, l = e, s = v(() =>
|
|
4207
|
-
const y = s.value.map((
|
|
4208
|
-
return t.unit && y.push(t.unit),
|
|
4209
|
-
}), r =
|
|
4206
|
+
const t = a, l = e, s = v(() => Et(t.units).map(($) => typeof $ == "string" ? { label: $, value: $ } : $)), u = v(() => {
|
|
4207
|
+
const y = s.value.map(($) => $.value);
|
|
4208
|
+
return t.unit && y.push(t.unit), Un(y);
|
|
4209
|
+
}), r = j(), i = j(), p = (y) => t.format && y ? Hn(Number(y) || 0, t.format) : y, d = (y) => {
|
|
4210
4210
|
if (!t.withUnit || typeof y != "string")
|
|
4211
4211
|
return { value: p(y), unit: t.unit };
|
|
4212
|
-
for (const
|
|
4213
|
-
const w = new RegExp(`${
|
|
4212
|
+
for (const $ of u.value) {
|
|
4213
|
+
const w = new RegExp(`${$}$`);
|
|
4214
4214
|
if (w.test(y))
|
|
4215
4215
|
return {
|
|
4216
4216
|
value: p(y.toString().replace(w, "")),
|
|
4217
|
-
unit:
|
|
4217
|
+
unit: $
|
|
4218
4218
|
};
|
|
4219
4219
|
}
|
|
4220
4220
|
return { value: p(y), unit: t.unit };
|
|
4221
4221
|
}, m = () => {
|
|
4222
|
-
const y = p(i.value),
|
|
4223
|
-
return t.withUnit && y &&
|
|
4222
|
+
const y = p(i.value), $ = r.value;
|
|
4223
|
+
return t.withUnit && y && $ ? `${y}${$}` : y;
|
|
4224
4224
|
};
|
|
4225
|
-
|
|
4225
|
+
K(
|
|
4226
4226
|
() => t.modelValue,
|
|
4227
4227
|
(y) => {
|
|
4228
|
-
const { value:
|
|
4229
|
-
r.value = w, i.value =
|
|
4228
|
+
const { value: $, unit: w } = d(y);
|
|
4229
|
+
r.value = w, i.value = $;
|
|
4230
4230
|
},
|
|
4231
4231
|
{
|
|
4232
4232
|
immediate: !0
|
|
4233
4233
|
}
|
|
4234
|
-
),
|
|
4234
|
+
), K(i, (y) => {
|
|
4235
4235
|
l("change", y);
|
|
4236
4236
|
});
|
|
4237
|
-
const
|
|
4238
|
-
const { value: y, unit:
|
|
4239
|
-
i.value = y, r.value =
|
|
4237
|
+
const h = async () => {
|
|
4238
|
+
const { value: y, unit: $ } = d(m());
|
|
4239
|
+
i.value = y, r.value = $, l("update:modelValue", m());
|
|
4240
4240
|
}, _ = () => {
|
|
4241
|
-
l("unit-change", r.value),
|
|
4241
|
+
l("unit-change", r.value), h();
|
|
4242
4242
|
};
|
|
4243
4243
|
return n({
|
|
4244
4244
|
parser: d,
|
|
4245
4245
|
formatValue: p
|
|
4246
|
-
}), (y,
|
|
4246
|
+
}), (y, $) => (c(), g(o(_e), {
|
|
4247
4247
|
modelValue: i.value,
|
|
4248
|
-
"onUpdate:modelValue":
|
|
4248
|
+
"onUpdate:modelValue": $[1] || ($[1] = (w) => i.value = w),
|
|
4249
4249
|
modelModifiers: { trim: !0 },
|
|
4250
4250
|
class: "x-input-unit",
|
|
4251
|
-
onChange:
|
|
4252
|
-
},
|
|
4251
|
+
onChange: h
|
|
4252
|
+
}, ue({ _: 2 }, [
|
|
4253
4253
|
s.value.length ? {
|
|
4254
4254
|
name: "append",
|
|
4255
4255
|
fn: f(() => [
|
|
4256
|
-
k(o(wt),
|
|
4256
|
+
k(o(wt), A({
|
|
4257
4257
|
class: "x-input-unit__unit",
|
|
4258
4258
|
modelValue: r.value,
|
|
4259
|
-
"onUpdate:modelValue":
|
|
4259
|
+
"onUpdate:modelValue": $[0] || ($[0] = (w) => r.value = w),
|
|
4260
4260
|
size: y.$attrs.size,
|
|
4261
4261
|
style: { width: `${t.appendWidth}px` }
|
|
4262
4262
|
}, y.$props.selectProps, { onChange: _ }), {
|
|
4263
4263
|
default: f(() => [
|
|
4264
|
-
(
|
|
4264
|
+
(c(!0), z(W, null, Z(s.value, (w) => (c(), g(o(xt), {
|
|
4265
4265
|
key: w.value,
|
|
4266
4266
|
label: w.label,
|
|
4267
4267
|
value: w.value
|
|
@@ -4274,12 +4274,12 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4274
4274
|
} : {
|
|
4275
4275
|
name: "suffix",
|
|
4276
4276
|
fn: f(() => [
|
|
4277
|
-
r.value ? (
|
|
4277
|
+
r.value ? (c(), z("div", {
|
|
4278
4278
|
key: 0,
|
|
4279
4279
|
class: "x-input-unit__unit"
|
|
4280
4280
|
}, [
|
|
4281
|
-
|
|
4282
|
-
])) :
|
|
4281
|
+
F("span", null, O(r.value), 1)
|
|
4282
|
+
])) : b("", !0)
|
|
4283
4283
|
]),
|
|
4284
4284
|
key: "1"
|
|
4285
4285
|
}
|
|
@@ -4287,64 +4287,64 @@ const Qa = /* @__PURE__ */ V({
|
|
|
4287
4287
|
}
|
|
4288
4288
|
});
|
|
4289
4289
|
export {
|
|
4290
|
-
|
|
4290
|
+
ut as Draggable,
|
|
4291
4291
|
rt as INSTALLED_KEY,
|
|
4292
|
-
|
|
4292
|
+
Rt as MASK_KEY,
|
|
4293
4293
|
dt as Resizable,
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4294
|
+
jt as TAB_CREATORS_KEY,
|
|
4295
|
+
Vo as TAB_ITEM_WIDTH,
|
|
4296
|
+
Xa as VTJ_UI_VERSION,
|
|
4297
4297
|
te as XAction,
|
|
4298
4298
|
et as XActionBar,
|
|
4299
|
-
|
|
4299
|
+
Ja as XChart,
|
|
4300
4300
|
B as XContainer,
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4301
|
+
Ya as XDataItem,
|
|
4302
|
+
Ot as XDialog,
|
|
4303
|
+
Ka as XDialogForm,
|
|
4304
4304
|
aa as XField,
|
|
4305
4305
|
la as XForm,
|
|
4306
4306
|
go as XHeader,
|
|
4307
4307
|
de as XIcon,
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4308
|
+
Qa as XInputUnit,
|
|
4309
|
+
qa as XList,
|
|
4310
|
+
Ua as XMask,
|
|
4311
4311
|
ge as XMenu,
|
|
4312
|
-
|
|
4312
|
+
Ie as XPanel,
|
|
4313
4313
|
Ga as XStartup,
|
|
4314
4314
|
Wa as XTabs,
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4315
|
+
Za as XTest,
|
|
4316
|
+
co as actionBarProps,
|
|
4317
|
+
It as actionProps,
|
|
4318
|
+
At as builtinFieldEditors,
|
|
4319
4319
|
ya as chartProps,
|
|
4320
|
-
|
|
4320
|
+
uo as containerProps,
|
|
4321
4321
|
tt as createDialog,
|
|
4322
4322
|
da as dataItemProps,
|
|
4323
|
-
|
|
4323
|
+
Ha as defineTab,
|
|
4324
4324
|
ia as dialogFormProps,
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4325
|
+
bo as dialogProps,
|
|
4326
|
+
Qo as fieldProps,
|
|
4327
|
+
Ft as formInstanceKey,
|
|
4328
4328
|
Nt as formModelKey,
|
|
4329
4329
|
sa as formProps,
|
|
4330
|
-
|
|
4330
|
+
Q as getSizeValue,
|
|
4331
4331
|
po as headerProps,
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4332
|
+
Jn as iconProps,
|
|
4333
|
+
Yn as iconSizeMap,
|
|
4334
|
+
Oa as inputUnitProps,
|
|
4335
|
+
ha as listProps,
|
|
4336
|
+
La as makeInstaller,
|
|
4337
|
+
Oo as maskProps,
|
|
4338
4338
|
yo as panelProps,
|
|
4339
|
-
|
|
4340
|
-
|
|
4339
|
+
Me as parseSize,
|
|
4340
|
+
Sa as startupProps,
|
|
4341
4341
|
ra as tabsProps,
|
|
4342
4342
|
Ba as testProps,
|
|
4343
4343
|
it as toObjectProps,
|
|
4344
|
-
|
|
4344
|
+
Qe as useDisabled,
|
|
4345
4345
|
ke as useIcon,
|
|
4346
4346
|
so as useIconProps,
|
|
4347
4347
|
lo as useLoader,
|
|
4348
4348
|
vo as vDraggable,
|
|
4349
|
-
|
|
4349
|
+
Vt as vResizable
|
|
4350
4350
|
};
|