@vtj/ui 0.7.13 → 0.7.15
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 +3 -3
- package/dist/index.mjs +1524 -1392
- package/dist/index.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +9 -9
- package/types/components/chart/Chart.d.ts +1 -1
- package/types/components/icon/types.d.ts +1 -1
- package/types/components/index.d.ts +1 -0
- package/types/components/input-unit/InputUnit.d.ts +71 -0
- package/types/components/input-unit/index.d.ts +3 -0
- package/types/components/input-unit/types.d.ts +38 -0
- package/types/components/tabs/Tabs.d.ts +362 -6
- package/types/components/tabs/types.d.ts +7 -2
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as V, useAttrs as We, getCurrentInstance as
|
|
2
|
-
import { ElIcon as
|
|
3
|
-
import { ArrowRight as
|
|
4
|
-
import { useDraggable as
|
|
5
|
-
import { isEqual as Ze, isObject as Ge, uid as
|
|
6
|
-
import { useRouter as Ye, RouterView as
|
|
1
|
+
import { defineComponent as V, useAttrs as We, getCurrentInstance as pe, computed as v, markRaw as we, openBlock as u, createBlock as g, unref as o, normalizeClass as J, normalizeStyle as fe, withCtx as f, renderSlot as C, resolveDynamicComponent as Q, createCommentVNode as h, createElementBlock as $, mergeProps as F, createElementVNode as j, toDisplayString as A, Fragment as W, renderList as Y, isVNode as Xt, h as ae, shallowRef as Pe, ref as D, watch as L, toRef as Ae, createTextVNode as R, useSlots as Ht, toRaw as ye, createVNode as k, normalizeProps as le, guardReactiveProps as be, effectScope as ft, reactive as Oe, onMounted as mt, onUnmounted as gt, watchEffect as Je, nextTick as ve, Teleport as yt, withDirectives as G, createSlots as ce, render as nt, vShow as oe, isRef as Ie, withModifiers as vt, KeepAlive as Kt, provide as Ce, inject as Se, withKeys as Lt } from "vue";
|
|
2
|
+
import { ElIcon as Wt, ElSubMenu as Jt, ElBadge as He, ElMenuItem as Qt, ElMenu as Zt, ElButton as ie, ElDropdown as Gt, ElDropdownMenu as Yt, ElDropdownItem as qt, ElTooltip as ht, ElDivider as se, ElSwitch as Qe, ElInput as _e, ElEmpty as bt, ElTabs as _t, ElTabPane as Ke, ElPopover as kt, ElAvatar as en, ElMessageBox as je, 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 un, ElRate as cn, 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 hn, Minimize as bn, Popup as _n, Maximize as kn, RawClose as wn, StarFilled as St, Menu as xn, Search as Le, Close as Ct, Expand as Sn, Fold as Cn, Star as zt, Document as me, Refresh as zn, CopyDocument as $n, Moon as Tn, Sunny as En, MoreFilled as Mn, UserFilled as In, HomeFilled as Vn, WarningFilled as Bn, EditPen as Pn } from "@vtj/icons";
|
|
4
|
+
import { useDraggable as An, useMouseInElement as Dn, useEventListener as De, useElementSize as $t, useDark as On, useResizeObserver as Rn, useVirtualList as Fn } from "@vueuse/core";
|
|
5
|
+
import { isEqual as Ze, isObject as Ge, uid as Tt, arrayToMap as jn, isUrl as Nn, upperFirstCamelCase as Et, toArray as Mt, get as Ve, merge as Un, set as Ue, debounce as Xn, dedupArray as Hn, numberFormat as Kn } from "@vtj/utils";
|
|
6
|
+
import { useRouter as Ye, RouterView as Ln, useRoute as It, 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.15
|
|
12
12
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
13
13
|
*/
|
|
14
|
-
const
|
|
14
|
+
const Ua = "0.7.15", Jn = {
|
|
15
15
|
default: 14,
|
|
16
16
|
small: 12,
|
|
17
17
|
large: 18
|
|
18
|
-
},
|
|
18
|
+
}, Qn = {
|
|
19
19
|
icon: {
|
|
20
20
|
type: [String, Object]
|
|
21
21
|
},
|
|
@@ -42,70 +42,70 @@ const Da = "0.7.13", Lo = {
|
|
|
42
42
|
function q(a) {
|
|
43
43
|
return typeof a == "string" ? a : `${a}px`;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Te(a = 0, n) {
|
|
46
46
|
if (typeof a == "number")
|
|
47
47
|
return a;
|
|
48
48
|
if (/(%|vh|vw)$/i.test(a)) {
|
|
49
49
|
const t = Number.parseInt(a);
|
|
50
|
-
return Math.floor(
|
|
50
|
+
return Math.floor(n * t / 100);
|
|
51
51
|
}
|
|
52
52
|
return Number.parseInt(a);
|
|
53
53
|
}
|
|
54
|
-
function it(a,
|
|
55
|
-
const e = { ...
|
|
54
|
+
function it(a, n = {}) {
|
|
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"), Xa = (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
|
+
}), Zn = ["src"], de = /* @__PURE__ */ V({
|
|
65
65
|
name: "XIcon",
|
|
66
66
|
__name: "Icon",
|
|
67
|
-
props:
|
|
67
|
+
props: Qn,
|
|
68
68
|
setup(a) {
|
|
69
|
-
const
|
|
70
|
-
if (!
|
|
69
|
+
const n = a, e = We(), t = pe(), l = v(() => {
|
|
70
|
+
if (!n.icon)
|
|
71
71
|
return null;
|
|
72
|
-
const
|
|
73
|
-
return typeof
|
|
74
|
-
}), s =
|
|
75
|
-
const
|
|
72
|
+
const i = t?.appContext.app;
|
|
73
|
+
return typeof n.icon == "object" ? we(n.icon) : i?.component(n.icon) || n.icon;
|
|
74
|
+
}), s = v(() => {
|
|
75
|
+
const i = {
|
|
76
76
|
"is-pointer": !!e.onClick
|
|
77
77
|
};
|
|
78
|
-
return !l.value &&
|
|
79
|
-
}), c =
|
|
80
|
-
"background-color":
|
|
81
|
-
"border-radius":
|
|
82
|
-
padding:
|
|
83
|
-
})),
|
|
84
|
-
return (
|
|
85
|
-
class:
|
|
86
|
-
color:
|
|
87
|
-
size:
|
|
88
|
-
style:
|
|
78
|
+
return !l.value && n.icon && (i[n.icon] = !0), i;
|
|
79
|
+
}), c = v(() => ({
|
|
80
|
+
"background-color": n.background,
|
|
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 : Jn[n.size] ?? void 0);
|
|
84
|
+
return (i, p) => (u(), g(o(Wt), {
|
|
85
|
+
class: J(["x-icon", s.value]),
|
|
86
|
+
color: n.color,
|
|
87
|
+
size: r.value,
|
|
88
|
+
style: fe(c.value)
|
|
89
89
|
}, {
|
|
90
|
-
default:
|
|
91
|
-
|
|
92
|
-
l.value ? (u(), g(
|
|
93
|
-
|
|
90
|
+
default: f(() => [
|
|
91
|
+
C(i.$slots, "default", {}, () => [
|
|
92
|
+
l.value ? (u(), g(Q(l.value), { key: 0 })) : h("", !0),
|
|
93
|
+
n.src ? (u(), $("img", {
|
|
94
94
|
key: 1,
|
|
95
|
-
src:
|
|
96
|
-
}, null, 8,
|
|
95
|
+
src: n.src
|
|
96
|
+
}, null, 8, Zn)) : h("", !0)
|
|
97
97
|
])
|
|
98
98
|
]),
|
|
99
99
|
_: 3
|
|
100
100
|
}, 8, ["class", "color", "size", "style"]));
|
|
101
101
|
}
|
|
102
|
-
}),
|
|
102
|
+
}), Gn = { class: "x-menu__wrapper" }, Yn = {
|
|
103
103
|
key: 1,
|
|
104
104
|
class: "x-menu__title"
|
|
105
|
-
},
|
|
105
|
+
}, qn = /* @__PURE__ */ j("i", null, null, -1), eo = {
|
|
106
106
|
key: 0,
|
|
107
107
|
class: "x-menu__title"
|
|
108
|
-
},
|
|
108
|
+
}, to = /* @__PURE__ */ j("i", null, null, -1), Vt = /* @__PURE__ */ V({
|
|
109
109
|
inheritAttrs: !1,
|
|
110
110
|
name: "XMenuItem",
|
|
111
111
|
__name: "MenuItem",
|
|
@@ -115,70 +115,70 @@ const rt = Symbol("INSTALLED_KEY"), Ra = (a = []) => ({
|
|
|
115
115
|
defaultIcon: {}
|
|
116
116
|
},
|
|
117
117
|
setup(a) {
|
|
118
|
-
const
|
|
118
|
+
const n = a, e = pe(), t = (c) => {
|
|
119
119
|
if (c)
|
|
120
|
-
return typeof c == "string" && (e?.appContext.app?.component(c) ||
|
|
121
|
-
}, l = (c) => typeof c == "object" ? c : { value: c }, s = (c = []) => c.filter((
|
|
122
|
-
return (c,
|
|
120
|
+
return typeof c == "string" && (e?.appContext.app?.component(c) || n.defaultIcon) || c;
|
|
121
|
+
}, l = (c) => typeof c == "object" ? c : { value: c }, s = (c = []) => c.filter((r) => !r.hidden);
|
|
122
|
+
return (c, r) => n.item.children ? (u(), g(o(Jt), F({
|
|
123
123
|
key: 0,
|
|
124
|
-
disabled:
|
|
125
|
-
},
|
|
126
|
-
index: String(
|
|
124
|
+
disabled: n.item.disabled
|
|
125
|
+
}, n.subMenu, {
|
|
126
|
+
index: String(n.item.id)
|
|
127
127
|
}), {
|
|
128
|
-
title:
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
title: f(() => [
|
|
129
|
+
j("div", Gn, [
|
|
130
|
+
n.item.icon ? (u(), g(o(de), {
|
|
131
131
|
key: 0,
|
|
132
|
-
icon: t(
|
|
133
|
-
}, null, 8, ["icon"])) :
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
icon: t(n.item.icon)
|
|
133
|
+
}, null, 8, ["icon"])) : h("", !0),
|
|
134
|
+
n.item.title ? (u(), $("span", Yn, A(n.item.title), 1)) : h("", !0),
|
|
135
|
+
n.item.badge ? (u(), g(o(He), F({
|
|
136
136
|
key: 2,
|
|
137
137
|
class: "x-menu__badge"
|
|
138
|
-
}, l(
|
|
139
|
-
default:
|
|
140
|
-
|
|
138
|
+
}, l(n.item.badge)), {
|
|
139
|
+
default: f(() => [
|
|
140
|
+
qn
|
|
141
141
|
]),
|
|
142
142
|
_: 1
|
|
143
|
-
}, 16)) :
|
|
143
|
+
}, 16)) : h("", !0)
|
|
144
144
|
])
|
|
145
145
|
]),
|
|
146
|
-
default:
|
|
147
|
-
(u(!0),
|
|
148
|
-
key:
|
|
149
|
-
item:
|
|
150
|
-
subMenu:
|
|
151
|
-
defaultIcon:
|
|
146
|
+
default: f(() => [
|
|
147
|
+
(u(!0), $(W, null, Y(s(n.item.children), (i) => (u(), g(o(Vt), {
|
|
148
|
+
key: i.id,
|
|
149
|
+
item: i,
|
|
150
|
+
subMenu: n.subMenu,
|
|
151
|
+
defaultIcon: n.defaultIcon
|
|
152
152
|
}, null, 8, ["item", "subMenu", "defaultIcon"]))), 128))
|
|
153
153
|
]),
|
|
154
154
|
_: 1
|
|
155
|
-
}, 16, ["disabled", "index"])) : (u(), g(
|
|
155
|
+
}, 16, ["disabled", "index"])) : (u(), g(o(Qt), {
|
|
156
156
|
key: 1,
|
|
157
|
-
index: String(
|
|
158
|
-
disabled:
|
|
157
|
+
index: String(n.item.id),
|
|
158
|
+
disabled: n.item.disabled
|
|
159
159
|
}, {
|
|
160
|
-
title:
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
title: f(() => [
|
|
161
|
+
n.item.title ? (u(), $("span", eo, A(n.item.title), 1)) : h("", !0),
|
|
162
|
+
n.item.badge ? (u(), g(o(He), F({
|
|
163
163
|
key: 1,
|
|
164
164
|
class: "x-menu__badge"
|
|
165
|
-
}, l(
|
|
166
|
-
default:
|
|
167
|
-
|
|
165
|
+
}, l(n.item.badge)), {
|
|
166
|
+
default: f(() => [
|
|
167
|
+
to
|
|
168
168
|
]),
|
|
169
169
|
_: 1
|
|
170
|
-
}, 16)) :
|
|
170
|
+
}, 16)) : h("", !0)
|
|
171
171
|
]),
|
|
172
|
-
default:
|
|
173
|
-
|
|
172
|
+
default: f(() => [
|
|
173
|
+
n.item.icon ? (u(), g(o(de), {
|
|
174
174
|
key: 0,
|
|
175
|
-
icon: t(
|
|
176
|
-
}, null, 8, ["icon"])) :
|
|
175
|
+
icon: t(n.item.icon)
|
|
176
|
+
}, null, 8, ["icon"])) : h("", !0)
|
|
177
177
|
]),
|
|
178
178
|
_: 1
|
|
179
179
|
}, 8, ["index", "disabled"]));
|
|
180
180
|
}
|
|
181
|
-
}),
|
|
181
|
+
}), ge = /* @__PURE__ */ V({
|
|
182
182
|
inheritAttrs: !1,
|
|
183
183
|
name: "XMenu",
|
|
184
184
|
__name: "Menu",
|
|
@@ -188,27 +188,27 @@ const rt = Symbol("INSTALLED_KEY"), Ra = (a = []) => ({
|
|
|
188
188
|
defaultIcon: {}
|
|
189
189
|
},
|
|
190
190
|
emits: ["select"],
|
|
191
|
-
setup(a, { emit:
|
|
192
|
-
const e = a, t =
|
|
193
|
-
const p = (
|
|
191
|
+
setup(a, { emit: n }) {
|
|
192
|
+
const e = a, t = n, l = v(() => e.data.filter((r) => !r.hidden)), s = (r, i) => {
|
|
193
|
+
const p = (d, m = []) => {
|
|
194
194
|
for (const b of m) {
|
|
195
|
-
if (b.id.toString() ===
|
|
195
|
+
if (b.id.toString() === d.toString())
|
|
196
196
|
return b;
|
|
197
197
|
if (b.children?.length) {
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
return
|
|
198
|
+
const _ = p(d, b.children);
|
|
199
|
+
if (_)
|
|
200
|
+
return _;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
-
return p(
|
|
205
|
-
}, c = (
|
|
206
|
-
const
|
|
207
|
-
|
|
204
|
+
return p(i, r);
|
|
205
|
+
}, c = (r) => {
|
|
206
|
+
const i = s(l.value, r);
|
|
207
|
+
i && t("select", i);
|
|
208
208
|
};
|
|
209
|
-
return (
|
|
210
|
-
default:
|
|
211
|
-
(u(!0),
|
|
209
|
+
return (r, i) => (u(), g(o(Zt), F({ class: "x-menu" }, r.$attrs, { onSelect: c }), {
|
|
210
|
+
default: f(() => [
|
|
211
|
+
(u(!0), $(W, null, Y(l.value, (p) => (u(), g(o(Vt), {
|
|
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"), Ra = (a = []) => ({
|
|
|
217
217
|
_: 1
|
|
218
218
|
}, 16));
|
|
219
219
|
}
|
|
220
|
-
}),
|
|
220
|
+
}), Bt = {
|
|
221
221
|
/**
|
|
222
222
|
* 动作名称标识
|
|
223
223
|
*/
|
|
@@ -313,37 +313,37 @@ const rt = Symbol("INSTALLED_KEY"), Ra = (a = []) => ({
|
|
|
313
313
|
type: Boolean
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
function
|
|
317
|
-
return
|
|
318
|
-
const
|
|
319
|
-
if (
|
|
320
|
-
return typeof
|
|
316
|
+
function no(a) {
|
|
317
|
+
return v(() => {
|
|
318
|
+
const n = a.tooltip;
|
|
319
|
+
if (n)
|
|
320
|
+
return typeof n == "string" ? { content: n } : n;
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
|
-
function
|
|
324
|
-
return
|
|
325
|
-
const
|
|
326
|
-
if (
|
|
327
|
-
return typeof
|
|
323
|
+
function oo(a) {
|
|
324
|
+
return v(() => {
|
|
325
|
+
const n = a.badge;
|
|
326
|
+
if (n)
|
|
327
|
+
return typeof n == "object" ? n : { value: n };
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
return
|
|
332
|
-
const { dropdown:
|
|
330
|
+
function ao(a) {
|
|
331
|
+
return v(() => {
|
|
332
|
+
const { dropdown: n, menus: e } = a;
|
|
333
333
|
if (e && e.length > 0)
|
|
334
334
|
return Object.assign(
|
|
335
335
|
{ popperClass: "x-action__menus", size: a.size },
|
|
336
|
-
|
|
336
|
+
n || {}
|
|
337
337
|
);
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
const
|
|
342
|
-
return
|
|
343
|
-
const e =
|
|
340
|
+
function so(a) {
|
|
341
|
+
const n = pe();
|
|
342
|
+
return v(() => {
|
|
343
|
+
const e = o(a);
|
|
344
344
|
if (e)
|
|
345
|
-
if (typeof e == "string" || e.setup || e.render ||
|
|
346
|
-
const t =
|
|
345
|
+
if (typeof e == "string" || e.setup || e.render || Xt(e)) {
|
|
346
|
+
const t = n?.appContext.app;
|
|
347
347
|
return {
|
|
348
348
|
icon: typeof e == "string" && t?.component(e) || e
|
|
349
349
|
};
|
|
@@ -352,21 +352,21 @@ function nn(a) {
|
|
|
352
352
|
return null;
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
const
|
|
357
|
-
return
|
|
355
|
+
function ke(a) {
|
|
356
|
+
const n = so(a);
|
|
357
|
+
return n.value ? we(V({ render: () => ae(de, n.value) })) : void 0;
|
|
358
358
|
}
|
|
359
|
-
function qe(a,
|
|
360
|
-
return
|
|
361
|
-
const e =
|
|
362
|
-
return typeof e == "function" ? e(
|
|
359
|
+
function qe(a, n) {
|
|
360
|
+
return v(() => {
|
|
361
|
+
const e = o(a);
|
|
362
|
+
return typeof e == "function" ? e(n) : !!e;
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
const t =
|
|
367
|
-
const
|
|
368
|
-
return
|
|
369
|
-
}, c = async (
|
|
365
|
+
function lo(a, n, e) {
|
|
366
|
+
const t = Pe(n), l = D(!1), s = async (r) => {
|
|
367
|
+
const i = o(a);
|
|
368
|
+
return i ? typeof i == "function" ? await i(r) : i : n;
|
|
369
|
+
}, c = async (r) => (l.value = !0, await s(r).then((i) => (t.value = i || n, l.value = !1, o(t))));
|
|
370
370
|
return L(
|
|
371
371
|
() => a,
|
|
372
372
|
() => {
|
|
@@ -381,87 +381,87 @@ function an(a, o, e) {
|
|
|
381
381
|
loader: c
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
|
-
const
|
|
384
|
+
const io = { key: 0 }, ro = /* @__PURE__ */ V({
|
|
385
385
|
__name: "Trigger",
|
|
386
|
-
props:
|
|
386
|
+
props: Bt,
|
|
387
387
|
emits: ["click"],
|
|
388
|
-
setup(a, { emit:
|
|
389
|
-
const e = a, t =
|
|
388
|
+
setup(a, { emit: n }) {
|
|
389
|
+
const e = a, t = n, l = ke(Ae(e, "icon")), s = qe(Ae(e, "disabled")), c = 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",
|
|
393
393
|
[`is-background-${e.background}`]: e.mode === "icon" && !!e.background,
|
|
394
394
|
"is-disabled": !!e.disabled,
|
|
395
395
|
"is-circle": !!e.circle
|
|
396
|
-
})),
|
|
397
|
-
if (
|
|
396
|
+
})), r = (i) => {
|
|
397
|
+
if (i.preventDefault(), !s.value)
|
|
398
398
|
return t("click"), !1;
|
|
399
399
|
};
|
|
400
|
-
return (
|
|
400
|
+
return (i, p) => e.mode === "button" ? (u(), g(o(ie), F({
|
|
401
401
|
key: 0,
|
|
402
|
-
icon:
|
|
402
|
+
icon: o(l),
|
|
403
403
|
type: e.type,
|
|
404
404
|
size: e.size,
|
|
405
|
-
disabled:
|
|
406
|
-
}, e.button, { onClick:
|
|
407
|
-
default:
|
|
408
|
-
R(A(
|
|
405
|
+
disabled: o(s)
|
|
406
|
+
}, e.button, { onClick: r }), {
|
|
407
|
+
default: f(() => [
|
|
408
|
+
R(A(i.label), 1)
|
|
409
409
|
]),
|
|
410
410
|
_: 1
|
|
411
|
-
}, 16, ["icon", "type", "size", "disabled"])) : (u(),
|
|
411
|
+
}, 16, ["icon", "type", "size", "disabled"])) : (u(), $("div", {
|
|
412
412
|
key: 1,
|
|
413
|
-
class:
|
|
414
|
-
onClick:
|
|
413
|
+
class: J(["x-action__inner", c.value]),
|
|
414
|
+
onClick: r
|
|
415
415
|
}, [
|
|
416
|
-
(u(), g(
|
|
417
|
-
|
|
416
|
+
(u(), g(Q(o(l)))),
|
|
417
|
+
i.label ? (u(), $("span", io, A(i.label), 1)) : h("", !0)
|
|
418
418
|
], 2));
|
|
419
419
|
}
|
|
420
|
-
}),
|
|
420
|
+
}), te = /* @__PURE__ */ V({
|
|
421
421
|
name: "XAction",
|
|
422
422
|
__name: "Action",
|
|
423
|
-
props:
|
|
423
|
+
props: Bt,
|
|
424
424
|
emits: ["click", "command"],
|
|
425
|
-
setup(a, { emit:
|
|
426
|
-
const e = a, t =
|
|
425
|
+
setup(a, { emit: n }) {
|
|
426
|
+
const e = a, t = Ht(), l = n, s = no(e), c = oo(e), r = ao(e), i = qe(Ae(e, "disabled")), p = v(() => ({
|
|
427
427
|
[`x-action--${e.mode}`]: !!e.mode
|
|
428
|
-
})),
|
|
429
|
-
|
|
430
|
-
}, m = (
|
|
431
|
-
if (
|
|
428
|
+
})), d = () => {
|
|
429
|
+
i.value || l("click", ye(e));
|
|
430
|
+
}, m = (w) => {
|
|
431
|
+
if (i.value)
|
|
432
432
|
return;
|
|
433
|
-
const
|
|
434
|
-
|
|
435
|
-
}, b = (
|
|
436
|
-
|
|
437
|
-
{ ...
|
|
433
|
+
const M = e.menus?.find((B) => B.command === w);
|
|
434
|
+
M && l("command", ye(M));
|
|
435
|
+
}, b = (w) => ae(He, c.value, () => [].concat(w)), _ = (w) => ae(
|
|
436
|
+
Gt,
|
|
437
|
+
{ ...r.value, disabled: i.value, onCommand: m },
|
|
438
438
|
{
|
|
439
|
-
default: () => [
|
|
439
|
+
default: () => [w],
|
|
440
440
|
dropdown: () => [
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
() => (e.menus || []).map((
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
() => t.item ? t.item({ item:
|
|
441
|
+
ae(
|
|
442
|
+
Yt,
|
|
443
|
+
() => (e.menus || []).map((M, B) => ae(
|
|
444
|
+
qt,
|
|
445
|
+
M,
|
|
446
|
+
() => t.item ? t.item({ item: M, index: B }) : M.label
|
|
447
447
|
))
|
|
448
448
|
)
|
|
449
449
|
]
|
|
450
450
|
}
|
|
451
|
-
),
|
|
452
|
-
|
|
453
|
-
]),
|
|
454
|
-
let
|
|
455
|
-
const
|
|
456
|
-
return
|
|
451
|
+
), y = (w) => ae(ht, { ...s.value, disabled: i.value }, () => [
|
|
452
|
+
w
|
|
453
|
+
]), S = v(() => {
|
|
454
|
+
let w = ae(we(ro), { ...e, onClick: d });
|
|
455
|
+
const M = t.default?.();
|
|
456
|
+
return M && M.length && (w = M[0]), c.value && (w = b(w)), r.value && (w = _(w)), s.value && (w = y(w)), w;
|
|
457
457
|
});
|
|
458
|
-
return (
|
|
459
|
-
class:
|
|
458
|
+
return (w, M) => (u(), $("div", {
|
|
459
|
+
class: J(["x-action", p.value])
|
|
460
460
|
}, [
|
|
461
|
-
(u(), g(
|
|
461
|
+
(u(), g(Q(S.value)))
|
|
462
462
|
], 2));
|
|
463
463
|
}
|
|
464
|
-
}),
|
|
464
|
+
}), uo = {
|
|
465
465
|
/**
|
|
466
466
|
* 动作项
|
|
467
467
|
*/
|
|
@@ -535,35 +535,35 @@ const sn = { key: 0 }, ln = /* @__PURE__ */ V({
|
|
|
535
535
|
}, et = /* @__PURE__ */ V({
|
|
536
536
|
name: "XActionBar",
|
|
537
537
|
__name: "ActionBar",
|
|
538
|
-
props:
|
|
538
|
+
props: uo,
|
|
539
539
|
emits: ["click", "command"],
|
|
540
|
-
setup(a, { emit:
|
|
541
|
-
const e = a, t =
|
|
542
|
-
...
|
|
543
|
-
badge:
|
|
540
|
+
setup(a, { emit: n }) {
|
|
541
|
+
const e = a, t = n, l = v(() => (e.items || []).map((r) => r === "|" ? r : {
|
|
542
|
+
...r,
|
|
543
|
+
badge: r.badge ? {
|
|
544
544
|
...e.badge,
|
|
545
|
-
...typeof
|
|
545
|
+
...typeof r.badge == "object" ? r.badge || {} : { value: r.badge }
|
|
546
546
|
} : void 0,
|
|
547
|
-
tooltip:
|
|
547
|
+
tooltip: r.tooltip ? {
|
|
548
548
|
...e.tooltip,
|
|
549
|
-
...typeof
|
|
549
|
+
...typeof r.tooltip == "object" ? r.tooltip || {} : { content: r.tooltip }
|
|
550
550
|
} : void 0
|
|
551
|
-
})), s = (
|
|
552
|
-
t("click",
|
|
553
|
-
}, c = (
|
|
554
|
-
t("command",
|
|
551
|
+
})), s = (r) => {
|
|
552
|
+
t("click", r);
|
|
553
|
+
}, c = (r, i) => {
|
|
554
|
+
t("command", r, i);
|
|
555
555
|
};
|
|
556
|
-
return (
|
|
556
|
+
return (r, i) => (u(), g(o(I), {
|
|
557
557
|
class: "x-action-bar",
|
|
558
558
|
align: "center"
|
|
559
559
|
}, {
|
|
560
|
-
default:
|
|
561
|
-
(u(!0),
|
|
562
|
-
p === "|" ? (u(), g(
|
|
560
|
+
default: f(() => [
|
|
561
|
+
(u(!0), $(W, null, Y(l.value, (p) => (u(), $(W, null, [
|
|
562
|
+
p === "|" ? (u(), g(o(se), {
|
|
563
563
|
key: 0,
|
|
564
564
|
direction: "vertical",
|
|
565
565
|
class: "x-action-bar__divider"
|
|
566
|
-
})) : (u(), g(
|
|
566
|
+
})) : (u(), g(o(te), F({
|
|
567
567
|
key: 1,
|
|
568
568
|
mode: e.mode,
|
|
569
569
|
size: e.size,
|
|
@@ -572,17 +572,17 @@ const sn = { key: 0 }, ln = /* @__PURE__ */ V({
|
|
|
572
572
|
background: e.background,
|
|
573
573
|
button: e.button,
|
|
574
574
|
dropdown: e.dropdown,
|
|
575
|
-
disabled:
|
|
575
|
+
disabled: o(qe)(e.disabled, p).value
|
|
576
576
|
}, p, {
|
|
577
577
|
onClick: s,
|
|
578
|
-
onCommand: (
|
|
578
|
+
onCommand: (d) => c(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
|
+
}), co = {
|
|
586
586
|
/**
|
|
587
587
|
* 组件渲染html标签
|
|
588
588
|
*/
|
|
@@ -701,48 +701,48 @@ const sn = { key: 0 }, ln = /* @__PURE__ */ V({
|
|
|
701
701
|
}, I = /* @__PURE__ */ V({
|
|
702
702
|
name: "XContainer",
|
|
703
703
|
__name: "Container",
|
|
704
|
-
props:
|
|
704
|
+
props: co,
|
|
705
705
|
setup(a) {
|
|
706
|
-
const
|
|
707
|
-
const
|
|
708
|
-
if (!
|
|
706
|
+
const n = a, e = We(), t = pe(), l = v(() => {
|
|
707
|
+
const r = t?.parent;
|
|
708
|
+
if (!r)
|
|
709
709
|
return !1;
|
|
710
|
-
const
|
|
711
|
-
return
|
|
712
|
-
}), s =
|
|
713
|
-
"is-fit":
|
|
714
|
-
"is-flex":
|
|
715
|
-
"is-inline-flex":
|
|
716
|
-
[`is-direction-${
|
|
717
|
-
[`is-wrap-${
|
|
718
|
-
[`is-justify-${
|
|
719
|
-
[`is-align-${
|
|
720
|
-
[`is-align-content-${
|
|
721
|
-
"is-grow":
|
|
722
|
-
"is-shrink": l.value &&
|
|
723
|
-
[`is-align-self-${
|
|
724
|
-
[`is-overflow-${
|
|
725
|
-
"is-padding": !!
|
|
726
|
-
"is-pointer":
|
|
727
|
-
"is-gap": !!
|
|
728
|
-
})), c =
|
|
729
|
-
const { width:
|
|
710
|
+
const i = r.proxy;
|
|
711
|
+
return i.$options.name === "XContainer" || !!i.flex;
|
|
712
|
+
}), s = v(() => ({
|
|
713
|
+
"is-fit": n.fit,
|
|
714
|
+
"is-flex": n.flex && !n.inline,
|
|
715
|
+
"is-inline-flex": n.flex && n.inline,
|
|
716
|
+
[`is-direction-${n.direction}`]: n.flex && n.direction !== "row",
|
|
717
|
+
[`is-wrap-${n.wrap}`]: n.flex && n.wrap !== "nowrap",
|
|
718
|
+
[`is-justify-${n.justify}`]: n.flex && n.justify !== "flex-start",
|
|
719
|
+
[`is-align-${n.align}`]: n.flex && n.align !== "flex-start",
|
|
720
|
+
[`is-align-content-${n.alignContent}`]: n.flex && n.alignContent !== "stretch",
|
|
721
|
+
"is-grow": n.grow ?? l.value,
|
|
722
|
+
"is-shrink": l.value && n.shrink,
|
|
723
|
+
[`is-align-self-${n.alignSelf}`]: l.value && n.alignSelf !== "auto",
|
|
724
|
+
[`is-overflow-${n.overflow}`]: !!n.overflow,
|
|
725
|
+
"is-padding": !!n.padding,
|
|
726
|
+
"is-pointer": n.autoPointer && !!e.onClick,
|
|
727
|
+
"is-gap": !!n.gap
|
|
728
|
+
})), c = v(() => {
|
|
729
|
+
const { width: r, height: i, fit: p } = n;
|
|
730
730
|
return p ? null : {
|
|
731
|
-
width:
|
|
732
|
-
height:
|
|
731
|
+
width: r ? q(r) : void 0,
|
|
732
|
+
height: i ? q(i) : void 0
|
|
733
733
|
};
|
|
734
734
|
});
|
|
735
|
-
return (
|
|
736
|
-
class:
|
|
737
|
-
style:
|
|
735
|
+
return (r, i) => (u(), g(Q(n.tag), {
|
|
736
|
+
class: J(["x-container", s.value]),
|
|
737
|
+
style: fe(c.value)
|
|
738
738
|
}, {
|
|
739
|
-
default:
|
|
740
|
-
|
|
739
|
+
default: f(() => [
|
|
740
|
+
C(r.$slots, "default")
|
|
741
741
|
]),
|
|
742
742
|
_: 3
|
|
743
743
|
}, 8, ["class", "style"]));
|
|
744
744
|
}
|
|
745
|
-
}),
|
|
745
|
+
}), po = {
|
|
746
746
|
size: {
|
|
747
747
|
type: String,
|
|
748
748
|
default: "default"
|
|
@@ -763,72 +763,69 @@ const sn = { key: 0 }, ln = /* @__PURE__ */ V({
|
|
|
763
763
|
more: {
|
|
764
764
|
type: Boolean
|
|
765
765
|
}
|
|
766
|
-
},
|
|
766
|
+
}, fo = { class: "x-header__content" }, mo = {
|
|
767
767
|
key: 0,
|
|
768
768
|
class: "x-header__actions"
|
|
769
|
-
},
|
|
769
|
+
}, go = /* @__PURE__ */ V({
|
|
770
770
|
name: "XHeader",
|
|
771
771
|
inheritAttrs: !1,
|
|
772
772
|
__name: "Header",
|
|
773
|
-
props:
|
|
773
|
+
props: po,
|
|
774
774
|
setup(a) {
|
|
775
|
-
const
|
|
776
|
-
[`is-size-${
|
|
777
|
-
"is-border":
|
|
775
|
+
const n = a, e = ke(Ae(n, "icon")), t = We(), l = v(() => ({
|
|
776
|
+
[`is-size-${n.size}`]: !!n.size && n.size !== "default",
|
|
777
|
+
"is-border": n.border,
|
|
778
778
|
"is-pointer": !!t.onClick
|
|
779
779
|
}));
|
|
780
|
-
return (s, c) => (u(), g(
|
|
781
|
-
class:
|
|
780
|
+
return (s, c) => (u(), g(o(I), {
|
|
781
|
+
class: J(["x-header", l.value]),
|
|
782
782
|
justify: "space-between",
|
|
783
783
|
align: "center"
|
|
784
784
|
}, {
|
|
785
|
-
default:
|
|
786
|
-
|
|
785
|
+
default: f(() => [
|
|
786
|
+
k(o(I), {
|
|
787
787
|
align: "center",
|
|
788
|
-
class:
|
|
789
|
-
grow: ""
|
|
788
|
+
class: J(["x-header__wrapper", l.value]),
|
|
789
|
+
grow: "",
|
|
790
|
+
onClick: o(t).onClick
|
|
790
791
|
}, {
|
|
791
|
-
default:
|
|
792
|
-
|
|
792
|
+
default: f(() => [
|
|
793
|
+
o(e) ? (u(), g(Q(o(e)), {
|
|
793
794
|
key: 0,
|
|
794
795
|
class: "x-header__icon",
|
|
795
|
-
onClick:
|
|
796
|
-
}, null, 8, ["onClick"])) :
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
(...i) => n(t).onClick && n(t).onClick(...i))
|
|
801
|
-
}, [
|
|
802
|
-
x(s.$slots, "default", {}, () => [
|
|
803
|
-
R(A(o.content), 1)
|
|
796
|
+
onClick: o(t).onClickIcon || o(t).onClick
|
|
797
|
+
}, null, 8, ["onClick"])) : h("", !0),
|
|
798
|
+
j("span", fo, [
|
|
799
|
+
C(s.$slots, "default", {}, () => [
|
|
800
|
+
R(A(n.content), 1)
|
|
804
801
|
])
|
|
805
802
|
]),
|
|
806
|
-
|
|
803
|
+
n.more ? (u(), g(o(de), {
|
|
807
804
|
key: 1,
|
|
808
805
|
class: "x-header__more",
|
|
809
|
-
icon:
|
|
810
|
-
}, null, 8, ["icon"])) :
|
|
811
|
-
|
|
806
|
+
icon: o(hn)
|
|
807
|
+
}, null, 8, ["icon"])) : h("", !0),
|
|
808
|
+
n.subtitle || s.$slots.subtitle ? (u(), $("span", {
|
|
812
809
|
key: 2,
|
|
813
810
|
class: "x-header__subtitle",
|
|
814
|
-
onClick: c[
|
|
815
|
-
(...
|
|
811
|
+
onClick: c[0] || (c[0] = //@ts-ignore
|
|
812
|
+
(...r) => o(t).onClick && o(t).onClick(...r))
|
|
816
813
|
}, [
|
|
817
|
-
|
|
818
|
-
R(A(
|
|
814
|
+
C(s.$slots, "subtitle", {}, () => [
|
|
815
|
+
R(A(n.subtitle), 1)
|
|
819
816
|
])
|
|
820
|
-
])) :
|
|
817
|
+
])) : h("", !0)
|
|
821
818
|
]),
|
|
822
819
|
_: 3
|
|
823
|
-
}, 8, ["class"]),
|
|
824
|
-
s.$slots.actions ? (u(),
|
|
825
|
-
|
|
826
|
-
])) :
|
|
820
|
+
}, 8, ["class", "onClick"]),
|
|
821
|
+
s.$slots.actions ? (u(), $("div", mo, [
|
|
822
|
+
C(s.$slots, "actions")
|
|
823
|
+
])) : h("", !0)
|
|
827
824
|
]),
|
|
828
825
|
_: 3
|
|
829
826
|
}, 8, ["class"]));
|
|
830
827
|
}
|
|
831
|
-
}),
|
|
828
|
+
}), yo = {
|
|
832
829
|
/**
|
|
833
830
|
* 宽高自适应
|
|
834
831
|
*/
|
|
@@ -892,56 +889,56 @@ const sn = { key: 0 }, ln = /* @__PURE__ */ V({
|
|
|
892
889
|
footer: {
|
|
893
890
|
type: Object
|
|
894
891
|
}
|
|
895
|
-
},
|
|
892
|
+
}, Be = /* @__PURE__ */ V({
|
|
896
893
|
name: "XPanel",
|
|
897
894
|
__name: "Panel",
|
|
898
|
-
props:
|
|
899
|
-
setup(a, { expose:
|
|
900
|
-
const e = a, t =
|
|
895
|
+
props: yo,
|
|
896
|
+
setup(a, { expose: n }) {
|
|
897
|
+
const e = a, t = D(), l = v(() => ({
|
|
901
898
|
"x-panel--card": !!e.card,
|
|
902
899
|
"x-panel--default": !e.card,
|
|
903
900
|
[`is-${e.size}`]: !!e.size && e.size !== "default",
|
|
904
901
|
"is-border": !!e.border,
|
|
905
902
|
"is-radius": !!e.radius,
|
|
906
903
|
[`is-shadow-${e.shadow}`]: !!e.shadow && e.shadow !== "none"
|
|
907
|
-
})), s =
|
|
904
|
+
})), s = v(() => e.header === null ? null : typeof e.header == "string" ? {
|
|
908
905
|
content: e.header,
|
|
909
906
|
size: e.size
|
|
910
907
|
} : {
|
|
911
908
|
...e.header,
|
|
912
909
|
size: e.size
|
|
913
|
-
}), c =
|
|
914
|
-
return
|
|
910
|
+
}), c = v(() => e.fit || e.height ? "auto" : void 0);
|
|
911
|
+
return n({
|
|
915
912
|
bodyRef: t
|
|
916
|
-
}), (
|
|
917
|
-
class:
|
|
913
|
+
}), (r, i) => (u(), g(o(I), {
|
|
914
|
+
class: J(["x-panel", l.value]),
|
|
918
915
|
direction: "column",
|
|
919
916
|
fit: e.fit,
|
|
920
917
|
width: e.width,
|
|
921
918
|
height: e.height
|
|
922
919
|
}, {
|
|
923
|
-
default:
|
|
924
|
-
s.value ? (u(), g(
|
|
920
|
+
default: f(() => [
|
|
921
|
+
s.value ? (u(), g(o(I), {
|
|
925
922
|
key: 0,
|
|
926
923
|
flex: !1,
|
|
927
924
|
class: "x-panel__header"
|
|
928
925
|
}, {
|
|
929
|
-
default:
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
default:
|
|
933
|
-
|
|
926
|
+
default: f(() => [
|
|
927
|
+
C(r.$slots, "header", {}, () => [
|
|
928
|
+
k(o(go), le(be(s.value)), {
|
|
929
|
+
default: f(() => [
|
|
930
|
+
C(r.$slots, "title")
|
|
934
931
|
]),
|
|
935
|
-
actions:
|
|
936
|
-
|
|
932
|
+
actions: f(() => [
|
|
933
|
+
C(r.$slots, "actions")
|
|
937
934
|
]),
|
|
938
935
|
_: 3
|
|
939
936
|
}, 16)
|
|
940
937
|
])
|
|
941
938
|
]),
|
|
942
939
|
_: 3
|
|
943
|
-
})) :
|
|
944
|
-
|
|
940
|
+
})) : h("", !0),
|
|
941
|
+
k(o(I), F({
|
|
945
942
|
ref_key: "bodyRef",
|
|
946
943
|
ref: t,
|
|
947
944
|
flex: !1,
|
|
@@ -950,78 +947,78 @@ const sn = { key: 0 }, ln = /* @__PURE__ */ V({
|
|
|
950
947
|
padding: "",
|
|
951
948
|
class: "x-panel__body"
|
|
952
949
|
}, e.body), {
|
|
953
|
-
default:
|
|
954
|
-
|
|
950
|
+
default: f(() => [
|
|
951
|
+
C(r.$slots, "default")
|
|
955
952
|
]),
|
|
956
953
|
_: 3
|
|
957
954
|
}, 16, ["overflow"]),
|
|
958
|
-
|
|
955
|
+
r.$slots.footer ? (u(), g(o(I), F({
|
|
959
956
|
key: 1,
|
|
960
957
|
flex: !1,
|
|
961
958
|
padding: "",
|
|
962
959
|
class: "x-panel__footer"
|
|
963
960
|
}, e.footer), {
|
|
964
|
-
default:
|
|
965
|
-
|
|
961
|
+
default: f(() => [
|
|
962
|
+
C(r.$slots, "footer")
|
|
966
963
|
]),
|
|
967
964
|
_: 3
|
|
968
|
-
}, 16)) :
|
|
965
|
+
}, 16)) : h("", !0)
|
|
969
966
|
]),
|
|
970
967
|
_: 3
|
|
971
968
|
}, 8, ["class", "fit", "width", "height"]));
|
|
972
969
|
}
|
|
973
|
-
}),
|
|
974
|
-
class
|
|
975
|
-
constructor(
|
|
976
|
-
this.el =
|
|
970
|
+
}), ut = "user-select-none";
|
|
971
|
+
class ct {
|
|
972
|
+
constructor(n, e = {}) {
|
|
973
|
+
this.el = n, this.options = e, this.scope = ft(), this.scope.run(() => {
|
|
977
974
|
this.init();
|
|
978
975
|
});
|
|
979
976
|
}
|
|
980
977
|
scope;
|
|
981
978
|
dragging = !1;
|
|
982
979
|
getHandle() {
|
|
983
|
-
const { selector:
|
|
984
|
-
return
|
|
980
|
+
const { selector: n, handle: e } = this.options;
|
|
981
|
+
return n ? this.el.querySelector(n) : e;
|
|
985
982
|
}
|
|
986
983
|
getTarget() {
|
|
987
|
-
const { target:
|
|
988
|
-
return typeof
|
|
984
|
+
const { target: n = "body" } = this.options;
|
|
985
|
+
return typeof n == "string" ? document.querySelector(n) : o(n) || document.body;
|
|
989
986
|
}
|
|
990
987
|
init() {
|
|
991
|
-
const { el:
|
|
988
|
+
const { el: n, options: e } = this, { disabled: t, delay: l = 150, onStart: s, onEnd: c } = e;
|
|
992
989
|
if (t)
|
|
993
990
|
return;
|
|
994
|
-
let
|
|
995
|
-
const
|
|
996
|
-
let
|
|
997
|
-
const { x: b, y:
|
|
998
|
-
initialValue: { x:
|
|
991
|
+
let r = null;
|
|
992
|
+
const i = this.getHandle(), p = this.getTarget();
|
|
993
|
+
let d = n.getBoundingClientRect(), m = null;
|
|
994
|
+
const { x: b, y: _ } = An(n, {
|
|
995
|
+
initialValue: { x: d.x, y: d.y },
|
|
999
996
|
...e,
|
|
1000
|
-
handle:
|
|
1001
|
-
onStart: (
|
|
1002
|
-
document.body.classList.add(
|
|
1003
|
-
this.dragging = !0,
|
|
997
|
+
handle: i,
|
|
998
|
+
onStart: (y, S) => {
|
|
999
|
+
document.body.classList.add(ut), clearTimeout(r), r = setTimeout(() => {
|
|
1000
|
+
this.dragging = !0, d = n.getBoundingClientRect(), m = p?.getBoundingClientRect(), s && s(y, S);
|
|
1004
1001
|
}, l);
|
|
1005
1002
|
},
|
|
1006
|
-
onEnd: (
|
|
1007
|
-
if (clearTimeout(
|
|
1003
|
+
onEnd: (y, S) => {
|
|
1004
|
+
if (clearTimeout(r), document.body.classList.remove(ut), this.dragging && m) {
|
|
1008
1005
|
this.dragging = !1;
|
|
1009
|
-
const { x:
|
|
1010
|
-
c && c(B,
|
|
1006
|
+
const { x: w, y: M } = y, B = this.getPosition(m, d, w, M);
|
|
1007
|
+
c && c(B, S), m = null;
|
|
1011
1008
|
}
|
|
1012
1009
|
}
|
|
1013
1010
|
});
|
|
1014
|
-
L([b,
|
|
1011
|
+
L([b, _], () => {
|
|
1015
1012
|
if (this.dragging && m) {
|
|
1016
|
-
const
|
|
1017
|
-
|
|
1013
|
+
const y = this.getPosition(m, d, b.value, _.value);
|
|
1014
|
+
n.style.left = `${y.x}px`, n.style.top = `${y.y}px`;
|
|
1018
1015
|
}
|
|
1019
1016
|
});
|
|
1020
1017
|
}
|
|
1021
|
-
getPosition(
|
|
1022
|
-
const { edge: s = 50 } = this.options, c = -e.width + s,
|
|
1018
|
+
getPosition(n, e, t, l) {
|
|
1019
|
+
const { edge: s = 50 } = this.options, c = -e.width + s, r = n.width - s, i = 0, p = n.height - s, d = Math.min(r, Math.max(t, c)), m = Math.min(p, Math.max(l, i));
|
|
1023
1020
|
return {
|
|
1024
|
-
x:
|
|
1021
|
+
x: d,
|
|
1025
1022
|
y: m
|
|
1026
1023
|
};
|
|
1027
1024
|
}
|
|
@@ -1029,117 +1026,117 @@ class ut {
|
|
|
1029
1026
|
this.scope.stop();
|
|
1030
1027
|
}
|
|
1031
1028
|
}
|
|
1032
|
-
const
|
|
1033
|
-
mounted(a,
|
|
1034
|
-
const e =
|
|
1029
|
+
const vo = {
|
|
1030
|
+
mounted(a, n) {
|
|
1031
|
+
const e = n.value || {}, t = new ct(a, e);
|
|
1035
1032
|
a.__draggable__ = t;
|
|
1036
1033
|
},
|
|
1037
|
-
updated(a,
|
|
1038
|
-
const e =
|
|
1034
|
+
updated(a, n) {
|
|
1035
|
+
const e = n.value || {};
|
|
1039
1036
|
let t = a.__draggable__;
|
|
1040
|
-
t && !Ze(t.options, e) && (t.destory(), a.__draggable__ = new
|
|
1037
|
+
t && !Ze(t.options, e) && (t.destory(), a.__draggable__ = new ct(a, e));
|
|
1041
1038
|
},
|
|
1042
1039
|
unmounted(a) {
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1040
|
+
const n = a.__draggable__;
|
|
1041
|
+
n && (n.destory(), a.__draggable__ = null);
|
|
1045
1042
|
}
|
|
1046
|
-
},
|
|
1043
|
+
}, Xe = "user-select-none";
|
|
1047
1044
|
class dt {
|
|
1048
|
-
constructor(
|
|
1049
|
-
this.el =
|
|
1045
|
+
constructor(n, e = {}) {
|
|
1046
|
+
this.el = n, this.options = e, this.scope = ft(), this.scope.run(() => {
|
|
1050
1047
|
this.init();
|
|
1051
1048
|
});
|
|
1052
1049
|
}
|
|
1053
1050
|
scope;
|
|
1054
|
-
resizing =
|
|
1055
|
-
direction =
|
|
1051
|
+
resizing = D(!1);
|
|
1052
|
+
direction = D("");
|
|
1056
1053
|
MIE = null;
|
|
1057
1054
|
cleanMousedown;
|
|
1058
1055
|
cleanMouseup;
|
|
1059
1056
|
init() {
|
|
1060
|
-
const { el:
|
|
1057
|
+
const { el: n, options: e } = this, { disabled: t, onStart: l, onEnd: s } = e;
|
|
1061
1058
|
if (t)
|
|
1062
1059
|
return;
|
|
1063
|
-
this.MIE =
|
|
1064
|
-
this.direction?.value && this.MIE && (this.resizing.value = !0,
|
|
1060
|
+
this.MIE = Dn(n), this.cleanMousedown = De(document, "mousedown", () => {
|
|
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));
|
|
1065
1062
|
}), this.cleanMouseup = De(document, "mouseup", () => {
|
|
1066
|
-
this.resizing.value && this.direction?.value && this.MIE && (
|
|
1063
|
+
this.resizing.value && this.direction?.value && this.MIE && (n.classList.remove(
|
|
1067
1064
|
"is-resizing",
|
|
1068
1065
|
`is-${this.direction.value}-resizing`
|
|
1069
1066
|
), s && s(this.direction.value, this.MIE)), this.resizing.value = !1;
|
|
1070
|
-
}), L(this.direction, (
|
|
1067
|
+
}), L(this.direction, (i) => {
|
|
1071
1068
|
const p = document.body;
|
|
1072
|
-
p.style.cursor =
|
|
1069
|
+
p.style.cursor = i ? `${i}-resize` : "", i ? p.classList.add(Xe) : p.classList.remove(Xe);
|
|
1073
1070
|
});
|
|
1074
|
-
const { x: c, y:
|
|
1075
|
-
L([c,
|
|
1071
|
+
const { x: c, y: r } = this.MIE;
|
|
1072
|
+
L([c, r], () => {
|
|
1076
1073
|
this.resizing.value ? this.resize() : this.direction.value = this.getDirection();
|
|
1077
1074
|
});
|
|
1078
1075
|
}
|
|
1079
1076
|
resize() {
|
|
1080
|
-
const { MIE:
|
|
1081
|
-
if (!
|
|
1077
|
+
const { MIE: n, direction: e, resizing: t, options: l, el: s } = this, c = e?.value || "";
|
|
1078
|
+
if (!n || !t.value || !c)
|
|
1082
1079
|
return;
|
|
1083
|
-
const { x:
|
|
1084
|
-
minWidth:
|
|
1085
|
-
minHeight:
|
|
1086
|
-
maxWidth:
|
|
1087
|
-
maxHeight:
|
|
1080
|
+
const { x: r, y: i, elementX: p, elementY: d, elementHeight: m, elementWidth: b } = n, { onResizing: _ } = l, {
|
|
1081
|
+
minWidth: y = 0,
|
|
1082
|
+
minHeight: S = 0,
|
|
1083
|
+
maxWidth: w = 99999,
|
|
1084
|
+
maxHeight: M = 99999
|
|
1088
1085
|
} = l;
|
|
1089
1086
|
if (c.includes("e")) {
|
|
1090
|
-
const B = Math.min(Math.max(p.value,
|
|
1087
|
+
const B = Math.min(Math.max(p.value, y), w);
|
|
1091
1088
|
s.style.width = `${B}px`;
|
|
1092
1089
|
}
|
|
1093
1090
|
if (c.includes("s")) {
|
|
1094
|
-
const B = Math.min(Math.max(
|
|
1091
|
+
const B = Math.min(Math.max(d.value, S), M);
|
|
1095
1092
|
s.style.height = `${B}px`;
|
|
1096
1093
|
}
|
|
1097
1094
|
if (c.includes("w")) {
|
|
1098
1095
|
const B = Math.min(
|
|
1099
|
-
Math.max(b.value - p.value,
|
|
1100
|
-
|
|
1096
|
+
Math.max(b.value - p.value, y),
|
|
1097
|
+
w
|
|
1101
1098
|
);
|
|
1102
|
-
s.style.width = `${B}px`, s.style.left = `${
|
|
1099
|
+
s.style.width = `${B}px`, s.style.left = `${r.value}px`;
|
|
1103
1100
|
}
|
|
1104
1101
|
if (c.includes("n")) {
|
|
1105
1102
|
const B = Math.min(
|
|
1106
|
-
Math.max(m.value -
|
|
1107
|
-
|
|
1103
|
+
Math.max(m.value - d.value, S),
|
|
1104
|
+
M
|
|
1108
1105
|
);
|
|
1109
|
-
this.el.style.height = `${B}px`, this.el.style.top = `${
|
|
1106
|
+
this.el.style.height = `${B}px`, this.el.style.top = `${i.value}px`;
|
|
1110
1107
|
}
|
|
1111
|
-
|
|
1108
|
+
_ && _(c, n);
|
|
1112
1109
|
}
|
|
1113
1110
|
getDirection() {
|
|
1114
1111
|
if (!this.MIE)
|
|
1115
1112
|
return "";
|
|
1116
|
-
const { elementX:
|
|
1113
|
+
const { elementX: n, elementY: e, elementHeight: t, elementWidth: l, isOutside: s } = this.MIE;
|
|
1117
1114
|
if (s.value)
|
|
1118
1115
|
return "";
|
|
1119
|
-
const { dirs: c = ["n", "s", "w", "e"], edge:
|
|
1120
|
-
let
|
|
1121
|
-
return c.includes("n") && e.value <=
|
|
1116
|
+
const { dirs: c = ["n", "s", "w", "e"], edge: r = 5 } = this.options;
|
|
1117
|
+
let i = "";
|
|
1118
|
+
return c.includes("n") && e.value <= r ? i += "n" : c.includes("s") && e.value > t.value - r && (i += "s"), c.includes("w") && n.value <= r ? i += "w" : c.includes("e") && n.value > l.value - r && (i += "e"), i;
|
|
1122
1119
|
}
|
|
1123
1120
|
destory() {
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1121
|
+
const n = document.body;
|
|
1122
|
+
n.style.cursor = "", n.classList.remove(Xe), this.cleanMousedown && this.cleanMousedown(), this.cleanMouseup && this.cleanMouseup(), this.MIE?.stop(), this.scope.stop();
|
|
1126
1123
|
}
|
|
1127
1124
|
}
|
|
1128
|
-
const
|
|
1129
|
-
mounted(a,
|
|
1130
|
-
const e =
|
|
1125
|
+
const Pt = {
|
|
1126
|
+
mounted(a, n) {
|
|
1127
|
+
const e = n.value || {}, t = new dt(a, e);
|
|
1131
1128
|
a.__resizable__ = t;
|
|
1132
1129
|
},
|
|
1133
|
-
updated(a,
|
|
1134
|
-
const e =
|
|
1130
|
+
updated(a, n) {
|
|
1131
|
+
const e = n.value || {};
|
|
1135
1132
|
let t = a.__resizable__;
|
|
1136
1133
|
t && !Ze(t.options, e) && (t.destory(), a.__resizable__ = new dt(a, e));
|
|
1137
1134
|
},
|
|
1138
1135
|
unmounted(a) {
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1136
|
+
const n = a.__resizable__;
|
|
1137
|
+
n && (n.destory(), a.__resizable__ = null);
|
|
1141
1138
|
}
|
|
1142
|
-
},
|
|
1139
|
+
}, ho = {
|
|
1143
1140
|
modelValue: {
|
|
1144
1141
|
type: Boolean,
|
|
1145
1142
|
default: !0
|
|
@@ -1224,9 +1221,9 @@ const It = {
|
|
|
1224
1221
|
type: Boolean
|
|
1225
1222
|
}
|
|
1226
1223
|
};
|
|
1227
|
-
let
|
|
1228
|
-
function
|
|
1229
|
-
const { width: e, height: t } =
|
|
1224
|
+
let he = 1e3;
|
|
1225
|
+
function bo(a, n) {
|
|
1226
|
+
const { width: e, height: t } = $t(n), l = Oe({
|
|
1230
1227
|
mode: a.mode || "normal",
|
|
1231
1228
|
wrapperWidth: 0,
|
|
1232
1229
|
wrapperHeight: 0,
|
|
@@ -1234,42 +1231,42 @@ function yn(a, o) {
|
|
|
1234
1231
|
height: 0,
|
|
1235
1232
|
top: 0,
|
|
1236
1233
|
left: 0,
|
|
1237
|
-
zIndex: ++
|
|
1234
|
+
zIndex: ++he,
|
|
1238
1235
|
dragging: !1,
|
|
1239
1236
|
resizing: !1
|
|
1240
1237
|
});
|
|
1241
1238
|
return L([e, t], ([s, c]) => {
|
|
1242
|
-
l.wrapperWidth = s, l.wrapperHeight = c, l.width =
|
|
1239
|
+
l.wrapperWidth = s, l.wrapperHeight = c, l.width = Te(a.width, s), l.height = Te(a.height, c), l.left = a.left ? Te(a.left, s) - l.width / 2 : Math.max(Math.floor((s - l.width) / 2), 0), l.top = a.top ? Te(a.top, c) : Math.max(Math.floor((c - l.height) / 2), 0);
|
|
1243
1240
|
}), L(l, (s) => {
|
|
1244
|
-
|
|
1241
|
+
he = Math.max(s.zIndex, he);
|
|
1245
1242
|
}), {
|
|
1246
1243
|
state: l,
|
|
1247
|
-
normal:
|
|
1248
|
-
maximized:
|
|
1249
|
-
minimized:
|
|
1244
|
+
normal: v(() => l.mode === "normal"),
|
|
1245
|
+
maximized: v(() => l.mode === "maximized"),
|
|
1246
|
+
minimized: v(() => l.mode === "minimized")
|
|
1250
1247
|
};
|
|
1251
1248
|
}
|
|
1252
|
-
function
|
|
1253
|
-
const e =
|
|
1254
|
-
const { width: c, height:
|
|
1249
|
+
function _o(a, n) {
|
|
1250
|
+
const e = v(() => {
|
|
1251
|
+
const { width: c, height: r, top: i, left: p, zIndex: d } = n;
|
|
1255
1252
|
return {
|
|
1256
1253
|
width: `${c}px`,
|
|
1257
|
-
height: `${
|
|
1258
|
-
top: `${
|
|
1254
|
+
height: `${r}px`,
|
|
1255
|
+
top: `${i}px`,
|
|
1259
1256
|
left: `${p}px`,
|
|
1260
|
-
zIndex:
|
|
1257
|
+
zIndex: d
|
|
1261
1258
|
};
|
|
1262
|
-
}), t =
|
|
1263
|
-
[`is-${
|
|
1259
|
+
}), t = v(() => ({
|
|
1260
|
+
[`is-${n.mode}`]: !!n.mode,
|
|
1264
1261
|
"is-draggable": !!a.draggable,
|
|
1265
1262
|
"is-resizable": !!a.resizable,
|
|
1266
1263
|
"is-primary": !!a.primary
|
|
1267
|
-
})), l =
|
|
1268
|
-
[`is-${
|
|
1269
|
-
"is-dragging":
|
|
1270
|
-
"is-resizing":
|
|
1271
|
-
})), s =
|
|
1272
|
-
zIndex:
|
|
1264
|
+
})), l = v(() => ({
|
|
1265
|
+
[`is-${n.mode}`]: !!n.mode,
|
|
1266
|
+
"is-dragging": n.dragging,
|
|
1267
|
+
"is-resizing": n.resizing
|
|
1268
|
+
})), s = v(() => ({
|
|
1269
|
+
zIndex: n.zIndex
|
|
1273
1270
|
}));
|
|
1274
1271
|
return {
|
|
1275
1272
|
styles: e,
|
|
@@ -1278,9 +1275,9 @@ function vn(a, o) {
|
|
|
1278
1275
|
modalStyle: s
|
|
1279
1276
|
};
|
|
1280
1277
|
}
|
|
1281
|
-
function
|
|
1282
|
-
const t = (
|
|
1283
|
-
|
|
1278
|
+
function ko(a, n, e) {
|
|
1279
|
+
const t = (d) => {
|
|
1280
|
+
n.mode = d, ["maximized", "minimized", "normal"].includes(d) && e(d), e("modeChange", d);
|
|
1284
1281
|
}, l = async () => {
|
|
1285
1282
|
(!a.beforeClose || await a.beforeClose()) && (e("update:modelValue", !1), e("close"), e("destroy"));
|
|
1286
1283
|
};
|
|
@@ -1289,11 +1286,11 @@ function hn(a, o, e) {
|
|
|
1289
1286
|
changeMode: t,
|
|
1290
1287
|
show: () => t("normal"),
|
|
1291
1288
|
hide: () => t("minimized"),
|
|
1292
|
-
active: (
|
|
1293
|
-
const m =
|
|
1289
|
+
active: (d) => {
|
|
1290
|
+
const m = d.target.nodeName || "";
|
|
1294
1291
|
["INPUT", "TEXTAREA", "RADIO", "CHECKBOX"].includes(
|
|
1295
1292
|
m.toUpperCase()
|
|
1296
|
-
) || (
|
|
1293
|
+
) || (n.zIndex = Math.max(n.zIndex, ++he));
|
|
1297
1294
|
},
|
|
1298
1295
|
submit: () => e("submit"),
|
|
1299
1296
|
cancel: () => {
|
|
@@ -1301,8 +1298,8 @@ function hn(a, o, e) {
|
|
|
1301
1298
|
}
|
|
1302
1299
|
};
|
|
1303
1300
|
}
|
|
1304
|
-
function
|
|
1305
|
-
return
|
|
1301
|
+
function wo(a, n, e, t) {
|
|
1302
|
+
return v(() => {
|
|
1306
1303
|
const l = typeof a.draggable == "boolean" ? !a.draggable : !!a.draggable?.disabled;
|
|
1307
1304
|
return {
|
|
1308
1305
|
...Ge(a.draggable) ? a.draggable : {},
|
|
@@ -1310,22 +1307,22 @@ function bn(a, o, e, t) {
|
|
|
1310
1307
|
target: t,
|
|
1311
1308
|
selector: ".x-panel__header",
|
|
1312
1309
|
onStart(s) {
|
|
1313
|
-
|
|
1310
|
+
n.dragging = !0, n.zIndex = Math.max(n.zIndex, ++he), e("dragStart", s);
|
|
1314
1311
|
},
|
|
1315
1312
|
onMove(s) {
|
|
1316
1313
|
e("dragging", s);
|
|
1317
1314
|
},
|
|
1318
1315
|
onEnd(s) {
|
|
1319
|
-
if (
|
|
1316
|
+
if (n.mode === "maximized")
|
|
1320
1317
|
return;
|
|
1321
|
-
const { x: c, y:
|
|
1322
|
-
|
|
1318
|
+
const { x: c, y: r } = s;
|
|
1319
|
+
n.left = c, n.top = r, n.dragging = !1, e("dragEnd", s);
|
|
1323
1320
|
}
|
|
1324
1321
|
};
|
|
1325
1322
|
});
|
|
1326
1323
|
}
|
|
1327
|
-
function
|
|
1328
|
-
return
|
|
1324
|
+
function xo(a, n, e) {
|
|
1325
|
+
return v(() => {
|
|
1329
1326
|
const t = typeof a.resizable == "boolean" ? !a.resizable : !!a.resizable?.disabled;
|
|
1330
1327
|
return {
|
|
1331
1328
|
minWidth: 200,
|
|
@@ -1334,24 +1331,24 @@ function _n(a, o, e) {
|
|
|
1334
1331
|
disabled: t,
|
|
1335
1332
|
dirs: ["e", "s", "w"],
|
|
1336
1333
|
onStart(l, s) {
|
|
1337
|
-
|
|
1334
|
+
n.resizing = !0, n.zIndex = Math.max(n.zIndex, ++he), e("resizeStart", l, s);
|
|
1338
1335
|
},
|
|
1339
1336
|
onResizing(l, s) {
|
|
1340
1337
|
e("resizing", l, s);
|
|
1341
1338
|
},
|
|
1342
1339
|
onEnd(l, s) {
|
|
1343
|
-
|
|
1340
|
+
n.left = s.elementPositionX.value, n.top = s.elementPositionY.value, n.width = s.elementWidth.value, n.height = s.elementHeight.value, n.resizing = !1, e("resizeEnd", l, s);
|
|
1344
1341
|
}
|
|
1345
1342
|
};
|
|
1346
1343
|
});
|
|
1347
1344
|
}
|
|
1348
|
-
function
|
|
1345
|
+
function So(a, n) {
|
|
1349
1346
|
const e = a.componentInstance;
|
|
1350
1347
|
if (!e)
|
|
1351
1348
|
return;
|
|
1352
1349
|
let t = null;
|
|
1353
1350
|
return mt(() => {
|
|
1354
|
-
const l = n
|
|
1351
|
+
const l = o(n), s = o(l?.bodyRef);
|
|
1355
1352
|
t = e.$el, s && s.$el && s.$el.appendChild(t);
|
|
1356
1353
|
}), gt(() => {
|
|
1357
1354
|
t && t.parentNode && t.parentNode.removeChild(t);
|
|
@@ -1359,152 +1356,152 @@ function kn(a, o) {
|
|
|
1359
1356
|
componentInstance: e
|
|
1360
1357
|
};
|
|
1361
1358
|
}
|
|
1362
|
-
const
|
|
1359
|
+
const Co = ["src"], At = /* @__PURE__ */ V({
|
|
1363
1360
|
name: "XDialog",
|
|
1364
1361
|
__name: "Dialog",
|
|
1365
|
-
props:
|
|
1362
|
+
props: ho,
|
|
1366
1363
|
emits: ["update:modelValue", "open", "close", "destroy", "maximized", "minimized", "normal", "modeChange", "dragStart", "dragging", "dragEnd", "resizeStart", "resizeEnd", "resizing", "submit", "cancel"],
|
|
1367
|
-
setup(a, { expose:
|
|
1368
|
-
const t = a, l = e, s =
|
|
1364
|
+
setup(a, { expose: n, emit: e }) {
|
|
1365
|
+
const t = a, l = e, s = pe(), c = D(), r = D(), { state: i, maximized: p, minimized: d, normal: m } = bo(t, c), { styles: b, classes: _, wrapperClass: y, modalStyle: S } = _o(t, i), { changeMode: w, active: M, close: B, show: z, hide: P, submit: T, cancel: N } = ko(
|
|
1369
1366
|
t,
|
|
1370
|
-
|
|
1367
|
+
i,
|
|
1371
1368
|
l
|
|
1372
|
-
),
|
|
1369
|
+
), x = wo(t, i, l, c), H = xo(t, i, l), K = So(t, r);
|
|
1373
1370
|
Je(async () => {
|
|
1374
|
-
t.modelValue && (await
|
|
1371
|
+
t.modelValue && (await ve(), s && l("open", s));
|
|
1375
1372
|
});
|
|
1376
|
-
const re =
|
|
1377
|
-
return
|
|
1373
|
+
const re = v(() => r.value?.$el);
|
|
1374
|
+
return n({
|
|
1378
1375
|
$vtjEl: re,
|
|
1379
|
-
panelRef:
|
|
1380
|
-
state:
|
|
1376
|
+
panelRef: r,
|
|
1377
|
+
state: i,
|
|
1381
1378
|
maximized: p,
|
|
1382
|
-
minimized:
|
|
1383
|
-
changeMode:
|
|
1384
|
-
show:
|
|
1379
|
+
minimized: d,
|
|
1380
|
+
changeMode: w,
|
|
1381
|
+
show: z,
|
|
1385
1382
|
hide: P,
|
|
1386
1383
|
submit: T,
|
|
1387
|
-
cancel:
|
|
1384
|
+
cancel: N,
|
|
1388
1385
|
componentInstance: K
|
|
1389
1386
|
}), (Z, ee) => t.modelValue ? (u(), g(yt, {
|
|
1390
1387
|
key: 0,
|
|
1391
1388
|
to: "body"
|
|
1392
1389
|
}, [
|
|
1393
|
-
|
|
1390
|
+
j("div", {
|
|
1394
1391
|
ref_key: "wrapper",
|
|
1395
1392
|
ref: c,
|
|
1396
|
-
class:
|
|
1393
|
+
class: J(["x-dialog__wrapper", o(y)])
|
|
1397
1394
|
}, [
|
|
1398
|
-
t.modal ? (u(),
|
|
1395
|
+
t.modal ? (u(), $("div", {
|
|
1399
1396
|
key: 0,
|
|
1400
1397
|
class: "x-dialog__modal",
|
|
1401
|
-
style:
|
|
1402
|
-
}, null, 4)) :
|
|
1403
|
-
G((u(), g(
|
|
1398
|
+
style: fe(o(S))
|
|
1399
|
+
}, null, 4)) : h("", !0),
|
|
1400
|
+
G((u(), g(o(Be), F({
|
|
1404
1401
|
ref_key: "panelRef",
|
|
1405
|
-
ref:
|
|
1406
|
-
class: ["x-dialog",
|
|
1402
|
+
ref: r,
|
|
1403
|
+
class: ["x-dialog", o(_)],
|
|
1407
1404
|
card: "",
|
|
1408
1405
|
shadow: "always",
|
|
1409
1406
|
header: { icon: t.icon, subtitle: t.subtitle },
|
|
1410
1407
|
width: "800px",
|
|
1411
1408
|
height: "600px",
|
|
1412
1409
|
footer: { justify: "space-between", flex: !0, align: "center" },
|
|
1413
|
-
style:
|
|
1410
|
+
style: o(b),
|
|
1414
1411
|
size: t.size,
|
|
1415
1412
|
body: { padding: t.bodyPadding },
|
|
1416
|
-
onClick:
|
|
1417
|
-
}, Z.$attrs),
|
|
1418
|
-
title:
|
|
1413
|
+
onClick: o(M)
|
|
1414
|
+
}, Z.$attrs), ce({
|
|
1415
|
+
title: f(() => [
|
|
1419
1416
|
R(A(t.title), 1)
|
|
1420
1417
|
]),
|
|
1421
|
-
actions:
|
|
1422
|
-
|
|
1423
|
-
t.minimizable ? (u(), g(
|
|
1418
|
+
actions: f(() => [
|
|
1419
|
+
C(Z.$slots, "actions"),
|
|
1420
|
+
t.minimizable ? (u(), g(o(te), {
|
|
1424
1421
|
key: 0,
|
|
1425
|
-
icon:
|
|
1422
|
+
icon: o(bn),
|
|
1426
1423
|
size: t.size,
|
|
1427
1424
|
mode: "icon",
|
|
1428
1425
|
type: "primary",
|
|
1429
1426
|
background: "hover",
|
|
1430
|
-
onClick: ee[0] || (ee[0] = (
|
|
1431
|
-
}, null, 8, ["icon", "size"])) :
|
|
1432
|
-
t.maximizable ? (u(),
|
|
1433
|
-
|
|
1427
|
+
onClick: ee[0] || (ee[0] = (ue) => o(w)("minimized"))
|
|
1428
|
+
}, null, 8, ["icon", "size"])) : h("", !0),
|
|
1429
|
+
t.maximizable ? (u(), $(W, { key: 1 }, [
|
|
1430
|
+
o(m) ? (u(), g(o(te), {
|
|
1434
1431
|
key: 1,
|
|
1435
|
-
icon:
|
|
1432
|
+
icon: o(kn),
|
|
1436
1433
|
size: t.size,
|
|
1437
1434
|
mode: "icon",
|
|
1438
1435
|
type: "primary",
|
|
1439
1436
|
background: "hover",
|
|
1440
|
-
onClick: ee[2] || (ee[2] = (
|
|
1441
|
-
}, null, 8, ["icon", "size"])) : (u(), g(
|
|
1437
|
+
onClick: ee[2] || (ee[2] = (ue) => o(w)("maximized"))
|
|
1438
|
+
}, null, 8, ["icon", "size"])) : (u(), g(o(te), {
|
|
1442
1439
|
key: 0,
|
|
1443
|
-
icon:
|
|
1440
|
+
icon: o(_n),
|
|
1444
1441
|
size: t.size,
|
|
1445
1442
|
mode: "icon",
|
|
1446
1443
|
type: "primary",
|
|
1447
1444
|
background: "hover",
|
|
1448
|
-
onClick: ee[1] || (ee[1] = (
|
|
1445
|
+
onClick: ee[1] || (ee[1] = (ue) => o(w)("normal"))
|
|
1449
1446
|
}, null, 8, ["icon", "size"]))
|
|
1450
|
-
], 64)) :
|
|
1451
|
-
t.closable ? (u(), g(
|
|
1447
|
+
], 64)) : h("", !0),
|
|
1448
|
+
t.closable ? (u(), g(o(te), {
|
|
1452
1449
|
key: 2,
|
|
1453
|
-
icon:
|
|
1450
|
+
icon: o(wn),
|
|
1454
1451
|
size: t.size,
|
|
1455
1452
|
mode: "icon",
|
|
1456
1453
|
type: "danger",
|
|
1457
1454
|
background: "hover",
|
|
1458
|
-
onClick:
|
|
1459
|
-
}, null, 8, ["icon", "size", "onClick"])) :
|
|
1455
|
+
onClick: o(B)
|
|
1456
|
+
}, null, 8, ["icon", "size", "onClick"])) : h("", !0)
|
|
1460
1457
|
]),
|
|
1461
|
-
default:
|
|
1462
|
-
|
|
1463
|
-
t.content ? (u(), g(
|
|
1464
|
-
t.src ? (u(),
|
|
1458
|
+
default: f(() => [
|
|
1459
|
+
C(Z.$slots, "default", {}, () => [
|
|
1460
|
+
t.content ? (u(), g(Q(t.content), { key: 0 })) : h("", !0),
|
|
1461
|
+
t.src ? (u(), $("iframe", {
|
|
1465
1462
|
key: 1,
|
|
1466
1463
|
src: t.src,
|
|
1467
1464
|
class: "x-dialog__frame"
|
|
1468
|
-
}, null, 8,
|
|
1465
|
+
}, null, 8, Co)) : h("", !0)
|
|
1469
1466
|
])
|
|
1470
1467
|
]),
|
|
1471
1468
|
_: 2
|
|
1472
1469
|
}, [
|
|
1473
1470
|
t.cancel || t.submit || Z.$slots.footer || Z.$slots.extra || Z.$slots.handle ? {
|
|
1474
1471
|
name: "footer",
|
|
1475
|
-
fn:
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
default:
|
|
1479
|
-
|
|
1472
|
+
fn: f(() => [
|
|
1473
|
+
C(Z.$slots, "footer", {}, () => [
|
|
1474
|
+
k(o(I), { align: "center" }, {
|
|
1475
|
+
default: f(() => [
|
|
1476
|
+
C(Z.$slots, "extra")
|
|
1480
1477
|
]),
|
|
1481
1478
|
_: 3
|
|
1482
1479
|
}),
|
|
1483
|
-
|
|
1484
|
-
default:
|
|
1485
|
-
|
|
1486
|
-
t.cancel ? (u(), g(
|
|
1480
|
+
k(o(I), { align: "center" }, {
|
|
1481
|
+
default: f(() => [
|
|
1482
|
+
C(Z.$slots, "handle"),
|
|
1483
|
+
t.cancel ? (u(), g(o(ie), {
|
|
1487
1484
|
key: 0,
|
|
1488
1485
|
type: "default",
|
|
1489
1486
|
size: t.size,
|
|
1490
|
-
onClick:
|
|
1487
|
+
onClick: o(N)
|
|
1491
1488
|
}, {
|
|
1492
|
-
default:
|
|
1489
|
+
default: f(() => [
|
|
1493
1490
|
R(A(typeof t.cancel == "string" ? t.cancel : "取消"), 1)
|
|
1494
1491
|
]),
|
|
1495
1492
|
_: 1
|
|
1496
|
-
}, 8, ["size", "onClick"])) :
|
|
1497
|
-
t.submit ? (u(), g(
|
|
1493
|
+
}, 8, ["size", "onClick"])) : h("", !0),
|
|
1494
|
+
t.submit ? (u(), g(o(ie), {
|
|
1498
1495
|
key: 1,
|
|
1499
1496
|
type: "primary",
|
|
1500
1497
|
size: t.size,
|
|
1501
|
-
onClick:
|
|
1498
|
+
onClick: o(T)
|
|
1502
1499
|
}, {
|
|
1503
|
-
default:
|
|
1500
|
+
default: f(() => [
|
|
1504
1501
|
R(A(typeof t.submit == "string" ? t.submit : "确定"), 1)
|
|
1505
1502
|
]),
|
|
1506
1503
|
_: 1
|
|
1507
|
-
}, 8, ["size", "onClick"])) :
|
|
1504
|
+
}, 8, ["size", "onClick"])) : h("", !0)
|
|
1508
1505
|
]),
|
|
1509
1506
|
_: 3
|
|
1510
1507
|
})
|
|
@@ -1513,18 +1510,18 @@ const wn = ["src"], Bt = /* @__PURE__ */ V({
|
|
|
1513
1510
|
key: "0"
|
|
1514
1511
|
} : void 0
|
|
1515
1512
|
]), 1040, ["header", "class", "style", "size", "body", "onClick"])), [
|
|
1516
|
-
[
|
|
1517
|
-
[
|
|
1513
|
+
[o(vo), o(x)],
|
|
1514
|
+
[o(Pt), o(H)]
|
|
1518
1515
|
])
|
|
1519
1516
|
], 2)
|
|
1520
|
-
])) :
|
|
1517
|
+
])) : h("", !0);
|
|
1521
1518
|
}
|
|
1522
1519
|
});
|
|
1523
|
-
function tt(a,
|
|
1524
|
-
const e = document.createElement("div"), t =
|
|
1525
|
-
t.appContext =
|
|
1520
|
+
function tt(a, n) {
|
|
1521
|
+
const e = document.createElement("div"), t = k(At, a);
|
|
1522
|
+
t.appContext = n ?? tt._context, nt(t, e);
|
|
1526
1523
|
const l = () => {
|
|
1527
|
-
|
|
1524
|
+
nt(null, e), e.parentNode?.removeChild(e);
|
|
1528
1525
|
};
|
|
1529
1526
|
return t.props.onDestroy = () => {
|
|
1530
1527
|
l();
|
|
@@ -1533,22 +1530,22 @@ function tt(a, o) {
|
|
|
1533
1530
|
destroy: l
|
|
1534
1531
|
};
|
|
1535
1532
|
}
|
|
1536
|
-
const
|
|
1533
|
+
const zo = /* @__PURE__ */ j("div", { class: "x-mask-sidebar__helper" }, null, -1), $o = /* @__PURE__ */ V({
|
|
1537
1534
|
__name: "Sidebar",
|
|
1538
1535
|
props: {
|
|
1539
1536
|
collapsed: { type: Boolean }
|
|
1540
1537
|
},
|
|
1541
1538
|
setup(a) {
|
|
1542
|
-
const
|
|
1543
|
-
return (e, t) => G((u(), g(
|
|
1544
|
-
class:
|
|
1539
|
+
const n = a;
|
|
1540
|
+
return (e, t) => G((u(), g(o(I), {
|
|
1541
|
+
class: J(["x-mask-sidebar", { "is-collapsed": n.collapsed }]),
|
|
1545
1542
|
grow: !1,
|
|
1546
1543
|
flex: "",
|
|
1547
1544
|
direction: "column"
|
|
1548
1545
|
}, {
|
|
1549
|
-
default:
|
|
1550
|
-
|
|
1551
|
-
|
|
1546
|
+
default: f(() => [
|
|
1547
|
+
C(e.$slots, "brand"),
|
|
1548
|
+
k(o(I), {
|
|
1552
1549
|
class: "x-mask-sidebar__wrapper",
|
|
1553
1550
|
flex: "",
|
|
1554
1551
|
grow: "",
|
|
@@ -1556,24 +1553,24 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1556
1553
|
justify: "space-between",
|
|
1557
1554
|
align: "center"
|
|
1558
1555
|
}, {
|
|
1559
|
-
default:
|
|
1560
|
-
|
|
1561
|
-
|
|
1556
|
+
default: f(() => [
|
|
1557
|
+
C(e.$slots, "default"),
|
|
1558
|
+
zo
|
|
1562
1559
|
]),
|
|
1563
1560
|
_: 3
|
|
1564
1561
|
})
|
|
1565
1562
|
]),
|
|
1566
1563
|
_: 3
|
|
1567
1564
|
}, 8, ["class"])), [
|
|
1568
|
-
[
|
|
1565
|
+
[o(Pt), {
|
|
1569
1566
|
dirs: ["e"],
|
|
1570
|
-
disabled:
|
|
1567
|
+
disabled: n.collapsed,
|
|
1571
1568
|
maxWidth: 500,
|
|
1572
1569
|
minWidth: 200
|
|
1573
1570
|
}]
|
|
1574
1571
|
]);
|
|
1575
1572
|
}
|
|
1576
|
-
}),
|
|
1573
|
+
}), To = /* @__PURE__ */ V({
|
|
1577
1574
|
__name: "SwitchBar",
|
|
1578
1575
|
props: {
|
|
1579
1576
|
collasped: { type: Boolean, default: !1 },
|
|
@@ -1585,88 +1582,88 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1585
1582
|
"update:keyword",
|
|
1586
1583
|
"update:favorite"
|
|
1587
1584
|
],
|
|
1588
|
-
setup(a, { emit:
|
|
1589
|
-
const e = a, t =
|
|
1585
|
+
setup(a, { emit: n }) {
|
|
1586
|
+
const e = a, t = n, l = D(!1), s = D(""), c = D(!1), r = () => {
|
|
1590
1587
|
l.value = !0;
|
|
1591
|
-
},
|
|
1588
|
+
}, i = () => {
|
|
1592
1589
|
s.value = "", l.value = !1, t("update:keyword", s.value);
|
|
1593
1590
|
}, p = () => {
|
|
1594
1591
|
t("update:collasped", !e.collasped);
|
|
1595
|
-
},
|
|
1592
|
+
}, d = () => {
|
|
1596
1593
|
t("update:keyword", s.value);
|
|
1597
1594
|
}, m = () => {
|
|
1598
1595
|
t("update:favorite", c.value);
|
|
1599
1596
|
};
|
|
1600
|
-
return (b,
|
|
1597
|
+
return (b, _) => (u(), g(o(I), {
|
|
1601
1598
|
class: "x-mask-switch-bar",
|
|
1602
1599
|
justify: "space-between",
|
|
1603
1600
|
align: "center"
|
|
1604
1601
|
}, {
|
|
1605
|
-
default:
|
|
1606
|
-
e.collasped ?
|
|
1602
|
+
default: f(() => [
|
|
1603
|
+
e.collasped ? h("", !0) : (u(), g(o(I), {
|
|
1607
1604
|
key: 0,
|
|
1608
1605
|
class: "x-mask-switch-bar__left",
|
|
1609
1606
|
grow: ""
|
|
1610
1607
|
}, {
|
|
1611
|
-
default:
|
|
1612
|
-
l.value ?
|
|
1608
|
+
default: f(() => [
|
|
1609
|
+
l.value ? h("", !0) : (u(), g(o(Qe), {
|
|
1613
1610
|
key: 0,
|
|
1614
1611
|
modelValue: c.value,
|
|
1615
|
-
"onUpdate:modelValue":
|
|
1612
|
+
"onUpdate:modelValue": _[0] || (_[0] = (y) => c.value = y),
|
|
1616
1613
|
class: "x-mask-switch-bar__switch",
|
|
1617
|
-
"active-icon":
|
|
1618
|
-
"inactive-icon":
|
|
1614
|
+
"active-icon": o(St),
|
|
1615
|
+
"inactive-icon": o(xn),
|
|
1619
1616
|
onChange: m
|
|
1620
1617
|
}, null, 8, ["modelValue", "active-icon", "inactive-icon"])),
|
|
1621
|
-
l.value ? (u(), g(
|
|
1618
|
+
l.value ? (u(), g(o(_e), {
|
|
1622
1619
|
key: 1,
|
|
1623
1620
|
modelValue: s.value,
|
|
1624
|
-
"onUpdate:modelValue":
|
|
1621
|
+
"onUpdate:modelValue": _[1] || (_[1] = (y) => s.value = y),
|
|
1625
1622
|
class: "x-mask-switch-bar__input",
|
|
1626
1623
|
size: "small",
|
|
1627
1624
|
placeholder: "请输入查询关键字",
|
|
1628
|
-
onInput:
|
|
1629
|
-
"prefix-icon":
|
|
1625
|
+
onInput: d,
|
|
1626
|
+
"prefix-icon": o(Le)
|
|
1630
1627
|
}, {
|
|
1631
|
-
suffix:
|
|
1632
|
-
|
|
1633
|
-
icon:
|
|
1634
|
-
onClick:
|
|
1628
|
+
suffix: f(() => [
|
|
1629
|
+
k(o(de), {
|
|
1630
|
+
icon: o(Ct),
|
|
1631
|
+
onClick: i
|
|
1635
1632
|
}, null, 8, ["icon"])
|
|
1636
1633
|
]),
|
|
1637
1634
|
_: 1
|
|
1638
|
-
}, 8, ["modelValue", "prefix-icon"])) :
|
|
1635
|
+
}, 8, ["modelValue", "prefix-icon"])) : h("", !0)
|
|
1639
1636
|
]),
|
|
1640
1637
|
_: 1
|
|
1641
1638
|
})),
|
|
1642
|
-
|
|
1643
|
-
class:
|
|
1639
|
+
k(o(I), {
|
|
1640
|
+
class: J(["x-mask-switch-bar__right", { "is-collasped": e.collasped }]),
|
|
1644
1641
|
flex: "",
|
|
1645
1642
|
align: "center",
|
|
1646
1643
|
justify: "center"
|
|
1647
1644
|
}, {
|
|
1648
|
-
default:
|
|
1649
|
-
!l.value && !e.collasped ? (u(), g(
|
|
1645
|
+
default: f(() => [
|
|
1646
|
+
!l.value && !e.collasped ? (u(), g(o(te), {
|
|
1650
1647
|
key: 0,
|
|
1651
|
-
icon:
|
|
1648
|
+
icon: o(Le),
|
|
1652
1649
|
mode: "icon",
|
|
1653
1650
|
background: "hover",
|
|
1654
1651
|
size: "default",
|
|
1655
1652
|
circle: "",
|
|
1656
|
-
onClick:
|
|
1657
|
-
}, null, 8, ["icon"])) :
|
|
1658
|
-
e.collasped ? (u(), g(
|
|
1653
|
+
onClick: r
|
|
1654
|
+
}, null, 8, ["icon"])) : h("", !0),
|
|
1655
|
+
e.collasped ? (u(), g(o(te), {
|
|
1659
1656
|
key: 1,
|
|
1660
|
-
icon:
|
|
1657
|
+
icon: o(Sn),
|
|
1661
1658
|
mode: "icon",
|
|
1662
1659
|
size: "default",
|
|
1663
1660
|
background: "hover",
|
|
1664
1661
|
onClick: p,
|
|
1665
1662
|
circle: ""
|
|
1666
|
-
}, null, 8, ["icon"])) :
|
|
1667
|
-
e.collasped ?
|
|
1663
|
+
}, null, 8, ["icon"])) : h("", !0),
|
|
1664
|
+
e.collasped ? h("", !0) : (u(), g(o(te), {
|
|
1668
1665
|
key: 2,
|
|
1669
|
-
icon:
|
|
1666
|
+
icon: o(Cn),
|
|
1670
1667
|
mode: "icon",
|
|
1671
1668
|
size: "default",
|
|
1672
1669
|
background: "hover",
|
|
@@ -1680,7 +1677,7 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1680
1677
|
_: 1
|
|
1681
1678
|
}));
|
|
1682
1679
|
}
|
|
1683
|
-
}),
|
|
1680
|
+
}), Eo = ["src"], Mo = { key: 0 }, Io = /* @__PURE__ */ V({
|
|
1684
1681
|
__name: "Brand",
|
|
1685
1682
|
props: {
|
|
1686
1683
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -1689,42 +1686,42 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1689
1686
|
url: {}
|
|
1690
1687
|
},
|
|
1691
1688
|
setup(a) {
|
|
1692
|
-
const
|
|
1693
|
-
|
|
1689
|
+
const n = a, e = Ye(), t = () => {
|
|
1690
|
+
n.url && e.push(n.url);
|
|
1694
1691
|
};
|
|
1695
|
-
return (l, s) => (u(), g(
|
|
1696
|
-
class:
|
|
1692
|
+
return (l, s) => (u(), g(o(I), {
|
|
1693
|
+
class: J(["x-mask-brand", { "is-collapsed": n.collapsed }]),
|
|
1697
1694
|
align: "center"
|
|
1698
1695
|
}, {
|
|
1699
|
-
default:
|
|
1700
|
-
|
|
1696
|
+
default: f(() => [
|
|
1697
|
+
k(o(I), {
|
|
1701
1698
|
class: "x-mask-brand__logo",
|
|
1702
1699
|
flex: "",
|
|
1703
1700
|
justify: "center",
|
|
1704
1701
|
align: "center",
|
|
1705
1702
|
onClick: t
|
|
1706
1703
|
}, {
|
|
1707
|
-
default:
|
|
1708
|
-
|
|
1709
|
-
|
|
1704
|
+
default: f(() => [
|
|
1705
|
+
C(l.$slots, "logo", {}, () => [
|
|
1706
|
+
n.logo ? (u(), $("img", {
|
|
1710
1707
|
key: 0,
|
|
1711
|
-
src:
|
|
1712
|
-
}, null, 8,
|
|
1708
|
+
src: n.logo
|
|
1709
|
+
}, null, 8, Eo)) : h("", !0)
|
|
1713
1710
|
])
|
|
1714
1711
|
]),
|
|
1715
1712
|
_: 3
|
|
1716
1713
|
}),
|
|
1717
|
-
|
|
1714
|
+
k(o(I), {
|
|
1718
1715
|
class: "x-mask-brand__title",
|
|
1719
1716
|
flex: "",
|
|
1720
1717
|
align: "center"
|
|
1721
1718
|
}, {
|
|
1722
|
-
default:
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
R(A(
|
|
1719
|
+
default: f(() => [
|
|
1720
|
+
n.title ? (u(), $("span", Mo, [
|
|
1721
|
+
C(l.$slots, "title", {}, () => [
|
|
1722
|
+
R(A(n.title), 1)
|
|
1726
1723
|
])
|
|
1727
|
-
])) :
|
|
1724
|
+
])) : h("", !0)
|
|
1728
1725
|
]),
|
|
1729
1726
|
_: 3
|
|
1730
1727
|
})
|
|
@@ -1732,7 +1729,7 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1732
1729
|
_: 3
|
|
1733
1730
|
}, 8, ["class"]));
|
|
1734
1731
|
}
|
|
1735
|
-
}), Ee = "__favorites__", Me = "__search__",
|
|
1732
|
+
}), Ee = "__favorites__", Me = "__search__", Vo = /* @__PURE__ */ V({
|
|
1736
1733
|
__name: "Menu",
|
|
1737
1734
|
props: {
|
|
1738
1735
|
collapse: { type: Boolean, default: !1 },
|
|
@@ -1744,12 +1741,12 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1744
1741
|
active: {}
|
|
1745
1742
|
},
|
|
1746
1743
|
emits: ["select"],
|
|
1747
|
-
setup(a, { emit:
|
|
1748
|
-
const e = a, t =
|
|
1744
|
+
setup(a, { emit: n }) {
|
|
1745
|
+
const e = a, t = v(() => e.menus || []), l = n, s = v(() => String(e.active?.id)), c = v(() => [
|
|
1749
1746
|
{
|
|
1750
1747
|
id: Ee,
|
|
1751
1748
|
title: "收藏",
|
|
1752
|
-
icon:
|
|
1749
|
+
icon: zt,
|
|
1753
1750
|
children: e.favorites?.length ? e.favorites : [
|
|
1754
1751
|
{
|
|
1755
1752
|
id: Ee + "empty",
|
|
@@ -1758,14 +1755,14 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1758
1755
|
}
|
|
1759
1756
|
]
|
|
1760
1757
|
}
|
|
1761
|
-
]),
|
|
1762
|
-
const p = (e.keyword || "").trim(),
|
|
1758
|
+
]), r = v(() => {
|
|
1759
|
+
const p = (e.keyword || "").trim(), d = p ? (e.flatMenus || []).filter((m) => m.title?.includes(p)) : [];
|
|
1763
1760
|
return [
|
|
1764
1761
|
{
|
|
1765
1762
|
id: Me,
|
|
1766
1763
|
title: "搜索",
|
|
1767
1764
|
icon: Le,
|
|
1768
|
-
children:
|
|
1765
|
+
children: d?.length ? d : [
|
|
1769
1766
|
{
|
|
1770
1767
|
id: Me + "empty",
|
|
1771
1768
|
disabled: !0,
|
|
@@ -1774,18 +1771,18 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1774
1771
|
]
|
|
1775
1772
|
}
|
|
1776
1773
|
];
|
|
1777
|
-
}),
|
|
1774
|
+
}), i = (p) => {
|
|
1778
1775
|
l("select", p);
|
|
1779
1776
|
};
|
|
1780
|
-
return (p,
|
|
1781
|
-
G(
|
|
1777
|
+
return (p, d) => (u(), $(W, null, [
|
|
1778
|
+
G(k(o(I), {
|
|
1782
1779
|
class: "x-mask-menu",
|
|
1783
1780
|
grow: "",
|
|
1784
1781
|
flex: !1,
|
|
1785
1782
|
overflow: "auto"
|
|
1786
1783
|
}, {
|
|
1787
|
-
default:
|
|
1788
|
-
G(
|
|
1784
|
+
default: f(() => [
|
|
1785
|
+
G(k(o(ge), {
|
|
1789
1786
|
subMenu: {
|
|
1790
1787
|
popperClass: "x-mask-menu-popper",
|
|
1791
1788
|
teleported: !0,
|
|
@@ -1793,29 +1790,29 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1793
1790
|
hideTimeout: 200
|
|
1794
1791
|
},
|
|
1795
1792
|
data: t.value,
|
|
1796
|
-
"default-icon":
|
|
1793
|
+
"default-icon": o(me),
|
|
1797
1794
|
collapse: !0,
|
|
1798
1795
|
"collapse-transition": !1,
|
|
1799
1796
|
"default-active": s.value,
|
|
1800
|
-
onSelect:
|
|
1797
|
+
onSelect: i
|
|
1801
1798
|
}, null, 8, ["data", "default-icon", "default-active"]), [
|
|
1802
1799
|
[oe, e.collapse]
|
|
1803
1800
|
]),
|
|
1804
|
-
G(
|
|
1801
|
+
G(k(o(ge), {
|
|
1805
1802
|
subMenu: {
|
|
1806
1803
|
popperClass: "x-mask-menu-popper",
|
|
1807
1804
|
teleported: !0
|
|
1808
1805
|
},
|
|
1809
1806
|
data: t.value,
|
|
1810
|
-
"default-icon":
|
|
1807
|
+
"default-icon": o(me),
|
|
1811
1808
|
collapse: !1,
|
|
1812
1809
|
"collapse-transition": !1,
|
|
1813
1810
|
"default-active": s.value,
|
|
1814
|
-
onSelect:
|
|
1811
|
+
onSelect: i
|
|
1815
1812
|
}, null, 8, ["data", "default-icon", "default-active"]), [
|
|
1816
1813
|
[oe, !e.collapse]
|
|
1817
1814
|
]),
|
|
1818
|
-
t.value.length ?
|
|
1815
|
+
t.value.length ? h("", !0) : (u(), g(o(bt), {
|
|
1819
1816
|
key: 0,
|
|
1820
1817
|
description: "暂无菜单数据"
|
|
1821
1818
|
}))
|
|
@@ -1824,14 +1821,14 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1824
1821
|
}, 512), [
|
|
1825
1822
|
[oe, !e.favorite && !e.keyword]
|
|
1826
1823
|
]),
|
|
1827
|
-
G(
|
|
1824
|
+
G(k(o(I), {
|
|
1828
1825
|
class: "x-mask-menu",
|
|
1829
1826
|
grow: "",
|
|
1830
1827
|
flex: !1,
|
|
1831
1828
|
overflow: "auto"
|
|
1832
1829
|
}, {
|
|
1833
|
-
default:
|
|
1834
|
-
G(
|
|
1830
|
+
default: f(() => [
|
|
1831
|
+
G(k(o(ge), {
|
|
1835
1832
|
class: "x-mask-menu__favorites",
|
|
1836
1833
|
subMenu: {
|
|
1837
1834
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1840,16 +1837,16 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1840
1837
|
hideTimeout: 200
|
|
1841
1838
|
},
|
|
1842
1839
|
data: c.value,
|
|
1843
|
-
"default-icon":
|
|
1840
|
+
"default-icon": o(me),
|
|
1844
1841
|
collapse: !0,
|
|
1845
1842
|
"collapse-transition": !1,
|
|
1846
1843
|
"default-active": s.value,
|
|
1847
1844
|
"default-openeds": [Ee],
|
|
1848
|
-
onSelect:
|
|
1845
|
+
onSelect: i
|
|
1849
1846
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1850
1847
|
[oe, e.collapse]
|
|
1851
1848
|
]),
|
|
1852
|
-
G(
|
|
1849
|
+
G(k(o(ge), {
|
|
1853
1850
|
class: "x-mask-menu__favorites",
|
|
1854
1851
|
subMenu: {
|
|
1855
1852
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1858,12 +1855,12 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1858
1855
|
hideTimeout: 200
|
|
1859
1856
|
},
|
|
1860
1857
|
data: c.value,
|
|
1861
|
-
"default-icon":
|
|
1858
|
+
"default-icon": o(me),
|
|
1862
1859
|
collapse: !1,
|
|
1863
1860
|
"collapse-transition": !1,
|
|
1864
1861
|
"default-active": s.value,
|
|
1865
1862
|
"default-openeds": [Ee],
|
|
1866
|
-
onSelect:
|
|
1863
|
+
onSelect: i
|
|
1867
1864
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1868
1865
|
[oe, !e.collapse]
|
|
1869
1866
|
])
|
|
@@ -1872,15 +1869,15 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1872
1869
|
}, 512), [
|
|
1873
1870
|
[oe, e.favorite && !e.keyword]
|
|
1874
1871
|
]),
|
|
1875
|
-
e.keyword ? G((u(), g(
|
|
1872
|
+
e.keyword ? G((u(), g(o(I), {
|
|
1876
1873
|
key: 0,
|
|
1877
1874
|
class: "x-mask-menu",
|
|
1878
1875
|
grow: "",
|
|
1879
1876
|
flex: !1,
|
|
1880
1877
|
overflow: "auto"
|
|
1881
1878
|
}, {
|
|
1882
|
-
default:
|
|
1883
|
-
G(
|
|
1879
|
+
default: f(() => [
|
|
1880
|
+
G(k(o(ge), {
|
|
1884
1881
|
class: "x-mask-menu__search",
|
|
1885
1882
|
subMenu: {
|
|
1886
1883
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1888,17 +1885,17 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1888
1885
|
showTimeout: 200,
|
|
1889
1886
|
hideTimeout: 200
|
|
1890
1887
|
},
|
|
1891
|
-
data:
|
|
1892
|
-
"default-icon":
|
|
1888
|
+
data: r.value,
|
|
1889
|
+
"default-icon": o(me),
|
|
1893
1890
|
collapse: !0,
|
|
1894
1891
|
"collapse-transition": !1,
|
|
1895
1892
|
"default-active": s.value,
|
|
1896
1893
|
"default-openeds": [Me],
|
|
1897
|
-
onSelect:
|
|
1894
|
+
onSelect: i
|
|
1898
1895
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1899
1896
|
[oe, e.collapse]
|
|
1900
1897
|
]),
|
|
1901
|
-
G(
|
|
1898
|
+
G(k(o(ge), {
|
|
1902
1899
|
class: "x-mask-menu__search",
|
|
1903
1900
|
subMenu: {
|
|
1904
1901
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1906,13 +1903,13 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1906
1903
|
showTimeout: 200,
|
|
1907
1904
|
hideTimeout: 200
|
|
1908
1905
|
},
|
|
1909
|
-
data:
|
|
1910
|
-
"default-icon":
|
|
1906
|
+
data: r.value,
|
|
1907
|
+
"default-icon": o(me),
|
|
1911
1908
|
collapse: !1,
|
|
1912
1909
|
"collapse-transition": !1,
|
|
1913
1910
|
"default-active": s.value,
|
|
1914
1911
|
"default-openeds": [Me],
|
|
1915
|
-
onSelect:
|
|
1912
|
+
onSelect: i
|
|
1916
1913
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1917
1914
|
[oe, !e.collapse]
|
|
1918
1915
|
])
|
|
@@ -1920,16 +1917,16 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1920
1917
|
_: 1
|
|
1921
1918
|
}, 512)), [
|
|
1922
1919
|
[oe, !!e.keyword]
|
|
1923
|
-
]) :
|
|
1920
|
+
]) : h("", !0)
|
|
1924
1921
|
], 64));
|
|
1925
1922
|
}
|
|
1926
|
-
}),
|
|
1923
|
+
}), Bo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAQd0lEQVR4nO2dCXRVxRnHf/clIPsekBgIS1hFdqVoZbGLFNTWWgQ3bLVurRYJcTuntbW22qooKKWl2toWquygIFa01doqmBBWWcomIkhACLIKyXvcnu/eefiSNzd57y4vAfI/553wuPfNzJ3/nW9m/t83M4Yx6iTVGOlAC6AD0Bs4F2gGtFT/lmtNgLpABDgMFAN7gCJgH3AQ2ACsAz5V91RbpFfDguUAg4EewBCgLdAQqJXAb5sD7RyuHVGfpcBy4AOgADjkc/k9obq0kP7AN4CrgK7qrQ8aJrALeAt4Q/3dV7XVULWEtAauBq5ThNSpqoIo7AReBWYA/6mqQlQFId2AW4HRwHmpzjwBSMv5N/BHYAHwRSozTyUhQsS9iohGqcrUI1YDE4GXgROpyDAVhMiIKBe4I0V9QxCQgcCvgdeCzigUcPo/BN4HHjiNyRAMBBYBs4BOQWYUFCFdgIXA80DHgPKoCowE3gHuCirvIAj5AfAmcEUAaVcHZAJTgHlqjuQr/CREJm/PAH8G2pyWVZ0crlbzl8v8TNQvQrLVGP5en9I7XdBV9S0/9qu8fhDSC1isZI6zEaKjTQYe8aM+vSZwqeq8u5+lZMTiYeA5oLaXRLwQMhSYe5b0F4niR8BUL6S4VXsvAWYCGZ6Kf2bi+8oVcDuQ9KzbTQvpqQS4GjKcIVrdU25+mCwhbZWuk+WhsGcLxgEPJvusyRAi84xpNR14UhD9a1QyP0iGkEeBQcGV/YyE1O+zwPnJ/CARSEc1NrBin9kQtftFoHEiT5kIIeLj/s3ZXqsecSHwUCJJVEZIGjAJaFXVT3QG4D7ga5U9RmWEiHI7/GyvSZ8QUkPhhhUlVxEhLZUcUAP/ILFld7slJK9GFgkEuRXEjjkSIh6/O0+fZzyt0EK5tLVwIiSvMltXA0+4yWluoiOkqwrVqUFwqA/ckygholI2SCUZZhjM4/bflOYrn1IwT4AZSW3eSlLpUP4/yxPSKtWtwyyBnPPgioHQtpX93Zd0TVXZEbviddcJQ59OMHwAZDTxL+8EIWFRN5a/tTwh31UxtymBtIrhF8GiBwwWPmDw2oMGg3t5rxghIi0NLugAbcRJUKoIiEUYbhwCrz9k57sgz6BvZ7u1pBBjlPk6hdjIRSHnXeV8ChzmF3DlJfDyWIP653yZ28ZP4dKHTfYdBCPNHRndsuGpmwwGdYNjJ2DiYpMnFtheI8OwTWPnLCh43KBR3S9/u/0z+N4Ek8KNYKQu9PvbKkDEQmwL6QP0S0UJhIxhA2D6PWXJEHTNhN7t7Tc46XQj0KQRzBhrMLwPNKgDLRvDY9cZfFOeLtrywjC0B2XIELTLgNm5Br072603RRgZm00sIcNSsSRAyBjSF6b/xIirEMHRE7D7gEtfZhiG9YGe2fGXLuwY41A1oOhzfRLtW8LMcQbnd0wZKd9UC40shGL+Xhl0zkLGwJ4w816D5g7juKlvwbqPwEhkvVRs2thPcfWFhvb62h02ERZqw+vL4e//1afVuTXMGW/QpV1KSMmIDaGKEtI+GSeKGwgZ/brZZLR08AzMWgY/e8l03TqyW8PXesRf2roH3t3w5aI46UdKwnDnVJNXC/XJiemcPd4gp03gpMhr8tXol+ijDwly7iFk9Opiv3VtmuvvmZsPtzxnWp2wm85cCBnRB5pr9IXFK2F/sXImKBjpcOQY3DTJ5LWV+iQvaGOTkp0Z+Ojr8mjoUJSQnkHlJG9X9xyYO96wOk0dFq6AHzxncvS4XVFJ52FCWh24+qJ4cxU5Ca8WmpZNK39VzOKhIzDmWZO31+nT7t0OZuUaZGYESkrbaOB2SMVmBeIrlwfo0h7mjTfo6ODikrdzzCSTw8eS7zdOIQzd28JXNCs3pO94f6PzGl6jNhQfhOsnmrz3P/09F+XAy7kGGc0CmzzWV2tQLEJaqD7EVwgZHdvA/DyDLpn6lN9aCzc/a/L5YfdkWJ15BIb1soe55TEv3+SYpF9BvySkFO2D6yeZrNyuv2dQV3hpnEHTRvZcJwB0jRIieko9X8kogQ5ZMC/PoJvDss531sMNE032H7QrxDVOQq168F2NuZIh9PyCsn2HE4xzYMduuPZpk3U79Td9vQdMG2vQqF4gpAgPTUPKi+XWWMRByDivpW13ezosZ/lgC9w4yWRvsUcysGWRAZ3UPKMclm6CDTsSD5gVUrbssEnZskd/jwwc/ibqQl3fSZGl4e1DakWQLxAyWjW3Z7v9HIygmIRRT5vs2mtXgBdE9SmZe6RpTJKYq8gJe5ibKEQyWb8NrnnS5KPP9D/6dn948W6DunV8JUVc5i1Dfi3GFDKaNYaX7zUY2Fl/z4ZdMPoZk493eyfDwklo2Bgu7x1/af8ReH1VYuaqPISUNZvhe0+ZfLJff8/Ir8Cff2xwTm3f3AZS0mYhxYwnCBkNG9id3lCH6aWYgJETTDZ97BMZ2Obqki5o+6klq2H7LveDBaMurNhoi427HWSW0RfDCz8ySE/3hRSplcyQ2lXHNaQg9evB9LEGlzvMZiwV9SmTddv8U1Etc2XYc4+QxiTN+cB0sRigLISU/HU2KZ85bFFz46Uw9Q5FijcnV3qUkBZuUzBPQnoaTLnd4CoHnViavDzQ6s0+S9oRaJkBwzXm6qO98M46f/Y6ElLeXwM3PGty4Kj+nluGwiOjDatMcX6X5HCutz6kFAb1gDEO08pPDyj/woYA/Aul8PULIEsjxSxaAcX73c36dRBS3iyAMZNNDjvsfJI7Avp2scvlAVYfohHBE0QELu+lH8KImbr2GdNq8ob7HLSw3sJaemW3NAxzlml0Eq+oA4veh9ummhQfiU+rTi3VWr2ZrXohT0mY0NbB4P1qnsl7+f6TYSEM7VrDEM0AYvUOyN/i/9Zs1tC5Dsx8A/70tv6erOae34JwyNOWdwbscNjyK3eEQe+eAUnXYfttbKFRdhcWmhw/7FIxrgzH4VuD4Iav6u/bVeytA5Hd7UJqj0J3SIf5+SZhTRvrrqSTCzra8rtfkIGEKLvXDIh/G4+VJC6VJAt5hqF9Ydo9BplN4398vNTuuzzm/VlIbRjpDrVg2Qb45Vz9myHu0Hn3++wOVcruAI2y+98N8OF2/82VkHFJT5hRgafzyYWwcpMnEUoq8dOQ2r3TFSy7mgaPzoDHFuhTyGkF8+4z6OqXOzSCNcQuHxwhmP2BaanMFSm7yULI6NvV1uacPJ3P/xMemWladZGMTFMO4m3ZJUV3EAcSg/XwafDT6SYTF+t/Ij7q+fcbdMn2RoqYqzoN4Dua0dWeg7BkjZ8yqU1Gz072C6UzU4KX3oO7nzeJRDz3WzJg3ivV6SAMJA4piGlA3l9MJr+h/5n4qOfeZ9C5rQdSSuGiTtBHI1z+60PYUeRf/2F5OjvaZc52GEnOWQa3TTEt/7wPcx5pIQdCapNhzxBSIibkvmjygsOw8PwsmDXesHwlrtyhJlzV31nZlf7Fg8n4Mpvj0Dkb5uYZlsnVQYIjbplicsyl21mD9SJshNSOzw6iQHIQUkojcPcfTaY5bLTaKxvm5CUfOCA6UcMmcEXf+Gtbimzvox/mSsjIaav6PQfHxOJVth/+8FEPbud4iMHdGfJ7+20h5UQp3PUHk9nL9Pf0aWcHo2W1SoKUsK3sdtJEHr+yHD53G1wXAylL+yw70uR8h70qpJ+6aaLJwSO+kiEQV1pJdGK41M+UpQlLBMmtk00WOsQ9DciBmbkG52YkGDhgwKiB8cqutMgFBfaw24u5EjKyzrXNVG9N5KPg3xtst3PxId/JKFVbn596p1b4mrwKsREhTpq2NfrR4OLOtkOrRdOKSRGJP7OV6Gbx11Zth8Jt3syV5enMgFnjDKv16rB0M4yaYLLvcx/czvGQAwM+JIaQpZ5lMQ2EFIkokbfqPxv19wzpDjPGGTRpXIE7NGJHJLbWDD1fKTD54rB7cyVkNG1im1AnT6fldp5gsmd/IGQIlkUVk+hjFHiZIFYEeYB9B2w/+vJt+hulsl8aa9CgfjwplrKbbo+uyuPIcZi/3B7qurFWklcD8XT+xGBwN/0963fans5Pinz0dMbj1Lg0SsghdTpAIJAH2b3XJuXDT/Q5fKt3DCmxbTUCHVrDZRplV2z6+iSiSmIhZrBeXTsKf5jGyYUavUkEytZPAl0vIkrfv6JfYhv6PwLLUgUObFNv26bd+nuu7AeTbzVID8V43kTZ7QPNNBrSPHHTliTfmVuhp2nwu9sMK4JEB/HnjJQYra2BL96ReeDa6JdYQpaoIXBgkAfbuN1+67Y5SJo3D4b+nWKWoaVLKKeDVLLWpZBYCiP6w/cH6y+LS0HKuGpTQP6cspgZ23/HElKsdhgNFEKK+NdHTzLZ6aCi1a6ltE/DLuqWong1WUJ8dha5JOSkPUHVQRYLSUhpQRBu53gcjV3OhmZsMt2zVzgByIMWrFeklPPGyIx7xRZ7GGu1i3T4wxLKBELvPwwTF6m5h5sCpMGba+wJbCyk1V03yeS9tSlbYyh9R5nxZ5rR4+ex33eqLYQc3h//IJNHiaV9ax00bWBw0oRFhTDur2UXfIqafPQYvFIIoZBhEZg3zSR/o/shqKS9cw98XAz9OthL6wq22v7yd9ekdMHneGBzmbJpzg8ZpXYdTQmsCWEte3Hm3gO2qdKJddbIy1RtOux9PmD1T6XQvb3tSFu+FfbsC2yeoUOhWvFcRjzSEVJXTVQCW8RTHlblnLQru6IRU3Tk5YeieyrNUpV3ekB+eGfcDPyt/FXd/FbGxRNSWTKpYCMBb5t1n8/hPaImyDwpxWTIUUpzdBecBIeZUbGrBoHgcYnJSIYQsWu/CELfqoGliMx2qoaKJLl/qGPjauAfpMf6WUV7wlemkcrOZw7LVmrgAhPVgMkRlRGytWYjTN8gXqHHKkssES/C8zWmyzPCamfwSiN8EiEkorY23VT1z3Xa4qfquL1KkaifbZfapTR1mxadOZiTzLwuGcfn20p7qUHiWKlOcEt4BWKynugp6tiKGlSObUoX3JtMXbkJDXhYEVMDZxSpzUQ3J1tHbkPLZMTwlxpCtNinDu0vcPNjt4SE1XHcf3L5+zMV0jKuTXREpYOX4MsSNfJ6+myt/XKQSfR3YkN63MDr0pawGnkldHrMGYxCdc6KZ4Xcr7VGv1F2M9ColWoKOfR+hF8TZz+P756htprN9zHN6oxSdU7hdZ7WaZaD3wfcS6TUN1SLOZN9KavVxpW/dXO8akXwmxBUWOpDyqauCiD9qkSJImGo187bCUEQEsUSdbz3A3426SrEEhUiJWbqQFDFCJIQgewK8oTacfN36vvpBmnl10s8uCyFD7rsujCgINFDnTl+bex+59UUMtP+vQr40AYkBIFUExKFbFl5gzqLKacqCuCAQ6pveEGZqNQe8VKFhEQhiwwuA66RXVj93JAzCRxTSwJmqWBzX5aJu0VVExILWZ4vCwQuVvY6M9EDfZNERAmABao1vKP6iWpREdWJkFjUUgHfMhjopD79Vb9TW20YWdlChOPK5JSoRflr1NLjfDVfcr8LUoDwed8c3yCzYFmUIB9BM3U6prQi+UjrkY9s4CnXZGdu0dWkD5CwJZFwxO0sw20JLJCFdPIJfKmFJwD/B4g2wB0X86iqAAAAAElFTkSuQmCC", Po = 140, Ao = {
|
|
1927
1924
|
/**
|
|
1928
1925
|
* 系统logo
|
|
1929
1926
|
*/
|
|
1930
1927
|
logo: {
|
|
1931
1928
|
type: String,
|
|
1932
|
-
default:
|
|
1929
|
+
default: Bo
|
|
1933
1930
|
},
|
|
1934
1931
|
/**
|
|
1935
1932
|
* 系统标题
|
|
@@ -2006,7 +2003,7 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2006
2003
|
removeFavorite: {
|
|
2007
2004
|
type: Function
|
|
2008
2005
|
}
|
|
2009
|
-
},
|
|
2006
|
+
}, Dt = Symbol(), Ot = Symbol(), Do = { class: "x-mask-tabs__trigger" }, Oo = { key: 1 }, Ro = ["onDragstart", "onDragend"], Fo = { key: 1 }, jo = /* @__PURE__ */ V({
|
|
2010
2007
|
__name: "Tabs",
|
|
2011
2008
|
props: {
|
|
2012
2009
|
tabs: {},
|
|
@@ -2016,63 +2013,63 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2016
2013
|
favorites: {}
|
|
2017
2014
|
},
|
|
2018
2015
|
emits: ["click", "remove", "refresh", "toggleFavorite", "dialog"],
|
|
2019
|
-
setup(a, { emit:
|
|
2020
|
-
const e = a, t =
|
|
2016
|
+
setup(a, { emit: n }) {
|
|
2017
|
+
const e = a, t = n, l = (d) => {
|
|
2021
2018
|
const m = !!e.favorites.find(
|
|
2022
|
-
(b) => b ===
|
|
2019
|
+
(b) => b === d.menu || b.id === d.menu?.id
|
|
2023
2020
|
);
|
|
2024
2021
|
return [
|
|
2025
2022
|
{
|
|
2026
|
-
icon:
|
|
2023
|
+
icon: zn,
|
|
2027
2024
|
label: "刷新",
|
|
2028
2025
|
name: "refresh",
|
|
2029
|
-
value:
|
|
2026
|
+
value: d
|
|
2030
2027
|
},
|
|
2031
2028
|
"|",
|
|
2032
2029
|
{
|
|
2033
|
-
icon: m ?
|
|
2030
|
+
icon: m ? St : zt,
|
|
2034
2031
|
label: "收藏",
|
|
2035
2032
|
name: "favorite",
|
|
2036
|
-
value:
|
|
2037
|
-
disabled: !
|
|
2033
|
+
value: d.menu,
|
|
2034
|
+
disabled: !d.menu
|
|
2038
2035
|
},
|
|
2039
2036
|
"|",
|
|
2040
2037
|
{
|
|
2041
|
-
icon:
|
|
2038
|
+
icon: $n,
|
|
2042
2039
|
label: "弹窗",
|
|
2043
2040
|
name: "dialog",
|
|
2044
|
-
value:
|
|
2041
|
+
value: d
|
|
2045
2042
|
}
|
|
2046
2043
|
];
|
|
2047
|
-
}, s = (
|
|
2048
|
-
const m =
|
|
2044
|
+
}, s = (d) => {
|
|
2045
|
+
const m = d.paneName;
|
|
2049
2046
|
if (m === e.home.id) {
|
|
2050
2047
|
t("click", e.home);
|
|
2051
2048
|
return;
|
|
2052
2049
|
}
|
|
2053
|
-
const b = e.tabs.find((
|
|
2050
|
+
const b = e.tabs.find((_) => _.id === m);
|
|
2054
2051
|
b && t("click", b);
|
|
2055
|
-
}, c = (
|
|
2056
|
-
const m = e.tabs.find((b) => b.id ===
|
|
2052
|
+
}, c = (d) => {
|
|
2053
|
+
const m = e.tabs.find((b) => b.id === d);
|
|
2057
2054
|
m && t("remove", m);
|
|
2058
|
-
},
|
|
2059
|
-
switch (
|
|
2055
|
+
}, r = (d) => {
|
|
2056
|
+
switch (d.name) {
|
|
2060
2057
|
case "refresh":
|
|
2061
|
-
t("refresh",
|
|
2058
|
+
t("refresh", d.value);
|
|
2062
2059
|
break;
|
|
2063
2060
|
case "favorite":
|
|
2064
|
-
t("toggleFavorite",
|
|
2061
|
+
t("toggleFavorite", d.value);
|
|
2065
2062
|
break;
|
|
2066
2063
|
case "dialog":
|
|
2067
|
-
t("dialog",
|
|
2064
|
+
t("dialog", d.value);
|
|
2068
2065
|
break;
|
|
2069
2066
|
}
|
|
2070
|
-
},
|
|
2071
|
-
m.dataTransfer && (m.dataTransfer.setData("tab",
|
|
2072
|
-
}, p = (
|
|
2067
|
+
}, i = (d, m) => {
|
|
2068
|
+
m.dataTransfer && (m.dataTransfer.setData("tab", d.id), m.target && m.target.classList.add("is-dagging"));
|
|
2069
|
+
}, p = (d, m) => {
|
|
2073
2070
|
m.target && m.target.classList.remove("is-dagging");
|
|
2074
2071
|
};
|
|
2075
|
-
return (
|
|
2072
|
+
return (d, m) => (u(), g(o(I), {
|
|
2076
2073
|
ref: "tabsRef",
|
|
2077
2074
|
class: "x-mask-tabs",
|
|
2078
2075
|
height: "100%",
|
|
@@ -2081,58 +2078,58 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2081
2078
|
justify: "flex-end",
|
|
2082
2079
|
direction: "column"
|
|
2083
2080
|
}, {
|
|
2084
|
-
default:
|
|
2085
|
-
|
|
2081
|
+
default: f(() => [
|
|
2082
|
+
k(o(_t), {
|
|
2086
2083
|
type: "card",
|
|
2087
2084
|
"model-value": e.value,
|
|
2088
2085
|
onTabRemove: c,
|
|
2089
2086
|
onTabClick: s
|
|
2090
2087
|
}, {
|
|
2091
|
-
default:
|
|
2092
|
-
e.home ? (u(), g(
|
|
2088
|
+
default: f(() => [
|
|
2089
|
+
e.home ? (u(), g(o(Ke), {
|
|
2093
2090
|
key: 0,
|
|
2094
2091
|
name: e.home.id
|
|
2095
2092
|
}, {
|
|
2096
|
-
label:
|
|
2097
|
-
|
|
2098
|
-
e.home.icon ? (u(), g(
|
|
2099
|
-
e.home.title ? (u(),
|
|
2093
|
+
label: f(() => [
|
|
2094
|
+
j("div", Do, [
|
|
2095
|
+
e.home.icon ? (u(), g(Q(o(ke)(e.home.icon)), { key: 0 })) : h("", !0),
|
|
2096
|
+
e.home.title ? (u(), $("span", Oo, A(e.home.title), 1)) : h("", !0)
|
|
2100
2097
|
])
|
|
2101
2098
|
]),
|
|
2102
2099
|
_: 1
|
|
2103
|
-
}, 8, ["name"])) :
|
|
2104
|
-
(u(!0),
|
|
2100
|
+
}, 8, ["name"])) : h("", !0),
|
|
2101
|
+
(u(!0), $(W, null, Y(e.tabs, (b) => (u(), g(o(Ke), {
|
|
2105
2102
|
key: b.id,
|
|
2106
2103
|
name: b.id,
|
|
2107
2104
|
lazy: "",
|
|
2108
2105
|
closable: ""
|
|
2109
2106
|
}, {
|
|
2110
|
-
label:
|
|
2111
|
-
|
|
2107
|
+
label: f(() => [
|
|
2108
|
+
k(o(kt), {
|
|
2112
2109
|
"open-delay": 500,
|
|
2113
2110
|
placement: "bottom",
|
|
2114
2111
|
trigger: "hover",
|
|
2115
2112
|
width: "200px",
|
|
2116
2113
|
disabled: b.id !== e.value
|
|
2117
2114
|
}, {
|
|
2118
|
-
reference:
|
|
2119
|
-
|
|
2115
|
+
reference: f(() => [
|
|
2116
|
+
j("div", {
|
|
2120
2117
|
class: "x-mask-tabs__trigger",
|
|
2121
2118
|
draggable: "true",
|
|
2122
|
-
onDragstart: (
|
|
2123
|
-
onDragend: (
|
|
2119
|
+
onDragstart: (_) => i(b, _),
|
|
2120
|
+
onDragend: (_) => p(b, _)
|
|
2124
2121
|
}, [
|
|
2125
|
-
b.icon ? (u(), g(
|
|
2126
|
-
b.title ? (u(),
|
|
2127
|
-
], 40,
|
|
2122
|
+
b.icon ? (u(), g(Q(o(ke)(b.icon)), { key: 0 })) : h("", !0),
|
|
2123
|
+
b.title ? (u(), $("span", Fo, A(b.title), 1)) : h("", !0)
|
|
2124
|
+
], 40, Ro)
|
|
2128
2125
|
]),
|
|
2129
|
-
default:
|
|
2130
|
-
|
|
2126
|
+
default: f(() => [
|
|
2127
|
+
k(o(et), {
|
|
2131
2128
|
items: l(b),
|
|
2132
2129
|
mode: "text",
|
|
2133
2130
|
size: "small",
|
|
2134
2131
|
type: "info",
|
|
2135
|
-
onClick:
|
|
2132
|
+
onClick: r
|
|
2136
2133
|
}, null, 8, ["items"])
|
|
2137
2134
|
]),
|
|
2138
2135
|
_: 2
|
|
@@ -2147,20 +2144,20 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2147
2144
|
_: 1
|
|
2148
2145
|
}, 512));
|
|
2149
2146
|
}
|
|
2150
|
-
}),
|
|
2147
|
+
}), No = /* @__PURE__ */ V({
|
|
2151
2148
|
__name: "ThemeSwitch",
|
|
2152
2149
|
setup(a) {
|
|
2153
|
-
const
|
|
2154
|
-
return (e, t) => (u(), g(
|
|
2150
|
+
const n = On();
|
|
2151
|
+
return (e, t) => (u(), g(o(Qe), {
|
|
2155
2152
|
class: "x-mask-theme-switch",
|
|
2156
|
-
modelValue: n
|
|
2157
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) => Ie(
|
|
2153
|
+
modelValue: o(n),
|
|
2154
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => Ie(n) ? n.value = l : null),
|
|
2158
2155
|
size: "default",
|
|
2159
|
-
"active-action-icon":
|
|
2160
|
-
"inactive-action-icon":
|
|
2156
|
+
"active-action-icon": o(Tn),
|
|
2157
|
+
"inactive-action-icon": o(En)
|
|
2161
2158
|
}, null, 8, ["modelValue", "active-action-icon", "inactive-action-icon"]));
|
|
2162
2159
|
}
|
|
2163
|
-
}),
|
|
2160
|
+
}), Uo = { class: "x-mask-toolbar__menu-item" }, Xo = /* @__PURE__ */ V({
|
|
2164
2161
|
__name: "Toolbar",
|
|
2165
2162
|
props: {
|
|
2166
2163
|
tabs: { default: () => [] },
|
|
@@ -2175,12 +2172,12 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2175
2172
|
"actionClick",
|
|
2176
2173
|
"actionCommand"
|
|
2177
2174
|
],
|
|
2178
|
-
setup(a, { emit:
|
|
2179
|
-
const e = a, t =
|
|
2180
|
-
const p = e.tabs.map((
|
|
2175
|
+
setup(a, { emit: n }) {
|
|
2176
|
+
const e = a, t = n, l = v(() => {
|
|
2177
|
+
const p = e.tabs.map((d, m) => ({
|
|
2181
2178
|
divided: m === 0,
|
|
2182
|
-
label:
|
|
2183
|
-
command:
|
|
2179
|
+
label: d.title,
|
|
2180
|
+
command: d
|
|
2184
2181
|
}));
|
|
2185
2182
|
return [
|
|
2186
2183
|
{
|
|
@@ -2207,18 +2204,18 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2207
2204
|
t("clickTab", p.command);
|
|
2208
2205
|
break;
|
|
2209
2206
|
}
|
|
2210
|
-
},
|
|
2207
|
+
}, r = (p) => {
|
|
2211
2208
|
t("actionClick", p);
|
|
2212
|
-
},
|
|
2213
|
-
t("actionCommand", p,
|
|
2209
|
+
}, i = (p, d) => {
|
|
2210
|
+
t("actionCommand", p, d);
|
|
2214
2211
|
};
|
|
2215
|
-
return (p,
|
|
2212
|
+
return (p, d) => (u(), g(o(I), {
|
|
2216
2213
|
class: "x-mask-toolbar",
|
|
2217
2214
|
align: "center"
|
|
2218
2215
|
}, {
|
|
2219
|
-
default:
|
|
2220
|
-
|
|
2221
|
-
icon:
|
|
2216
|
+
default: f(() => [
|
|
2217
|
+
k(o(te), {
|
|
2218
|
+
icon: o(Mn),
|
|
2222
2219
|
menus: l.value,
|
|
2223
2220
|
dropdown: { size: "small" },
|
|
2224
2221
|
mode: "icon",
|
|
@@ -2226,66 +2223,66 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2226
2223
|
background: "hover",
|
|
2227
2224
|
onCommand: c
|
|
2228
2225
|
}, {
|
|
2229
|
-
item:
|
|
2230
|
-
|
|
2226
|
+
item: f(({ item: m }) => [
|
|
2227
|
+
j("span", Uo, [
|
|
2231
2228
|
R(A(m.label) + " ", 1),
|
|
2232
|
-
["other", "all"].includes(m.command) ?
|
|
2229
|
+
["other", "all"].includes(m.command) ? h("", !0) : (u(), g(o(de), {
|
|
2233
2230
|
key: 0,
|
|
2234
2231
|
onClick: vt((b) => s(m), ["stop"]),
|
|
2235
|
-
icon:
|
|
2232
|
+
icon: o(Ct)
|
|
2236
2233
|
}, null, 8, ["onClick", "icon"]))
|
|
2237
2234
|
])
|
|
2238
2235
|
]),
|
|
2239
2236
|
_: 1
|
|
2240
2237
|
}, 8, ["icon", "menus"]),
|
|
2241
|
-
|
|
2242
|
-
e.actions ? (u(), g(
|
|
2238
|
+
k(o(se), { direction: "vertical" }),
|
|
2239
|
+
e.actions ? (u(), g(o(et), {
|
|
2243
2240
|
key: 0,
|
|
2244
2241
|
circle: "",
|
|
2245
2242
|
mode: "icon",
|
|
2246
2243
|
size: "default",
|
|
2247
2244
|
background: "hover",
|
|
2248
2245
|
items: p.actions,
|
|
2249
|
-
onClick:
|
|
2250
|
-
onCommand:
|
|
2251
|
-
}, null, 8, ["items"])) :
|
|
2252
|
-
e.actions ? (u(), g(
|
|
2246
|
+
onClick: r,
|
|
2247
|
+
onCommand: i
|
|
2248
|
+
}, null, 8, ["items"])) : h("", !0),
|
|
2249
|
+
e.actions ? (u(), g(o(se), {
|
|
2253
2250
|
key: 1,
|
|
2254
2251
|
direction: "vertical"
|
|
2255
|
-
})) :
|
|
2256
|
-
e.theme ? (u(), g(
|
|
2257
|
-
e.theme ? (u(), g(
|
|
2252
|
+
})) : h("", !0),
|
|
2253
|
+
e.theme ? (u(), g(No, { key: 2 })) : h("", !0),
|
|
2254
|
+
e.theme ? (u(), g(o(se), {
|
|
2258
2255
|
key: 3,
|
|
2259
2256
|
direction: "vertical"
|
|
2260
|
-
})) :
|
|
2261
|
-
|
|
2257
|
+
})) : h("", !0),
|
|
2258
|
+
C(p.$slots, "default")
|
|
2262
2259
|
]),
|
|
2263
2260
|
_: 3
|
|
2264
2261
|
}));
|
|
2265
2262
|
}
|
|
2266
|
-
}),
|
|
2263
|
+
}), Ho = /* @__PURE__ */ V({
|
|
2267
2264
|
__name: "Avatar",
|
|
2268
2265
|
props: {
|
|
2269
2266
|
avatar: {}
|
|
2270
2267
|
},
|
|
2271
2268
|
setup(a) {
|
|
2272
|
-
const
|
|
2273
|
-
return (e, t) => (u(), g(
|
|
2269
|
+
const n = a;
|
|
2270
|
+
return (e, t) => (u(), g(o(kt), {
|
|
2274
2271
|
width: 200,
|
|
2275
2272
|
"popper-class": "x-mask-avatar__popper",
|
|
2276
2273
|
disabled: !e.$slots.default
|
|
2277
2274
|
}, {
|
|
2278
|
-
reference:
|
|
2279
|
-
|
|
2275
|
+
reference: f(() => [
|
|
2276
|
+
k(o(en), {
|
|
2280
2277
|
class: "x-mask-avatar",
|
|
2281
2278
|
shape: "circle",
|
|
2282
|
-
icon:
|
|
2283
|
-
src:
|
|
2279
|
+
icon: o(In),
|
|
2280
|
+
src: n.avatar,
|
|
2284
2281
|
size: 26
|
|
2285
2282
|
}, null, 8, ["icon", "src"])
|
|
2286
2283
|
]),
|
|
2287
|
-
default:
|
|
2288
|
-
e.$slots.default ?
|
|
2284
|
+
default: f(() => [
|
|
2285
|
+
e.$slots.default ? C(e.$slots, "default", { key: 0 }) : h("", !0)
|
|
2289
2286
|
]),
|
|
2290
2287
|
_: 3
|
|
2291
2288
|
}, 8, ["disabled"]));
|
|
@@ -2297,23 +2294,23 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2297
2294
|
exclude: {}
|
|
2298
2295
|
},
|
|
2299
2296
|
setup(a) {
|
|
2300
|
-
const
|
|
2301
|
-
return (e, t) => (u(), g(
|
|
2297
|
+
const n = a;
|
|
2298
|
+
return (e, t) => (u(), g(o(I), {
|
|
2302
2299
|
class: "x-mask__content",
|
|
2303
2300
|
flex: !1,
|
|
2304
2301
|
grow: "",
|
|
2305
2302
|
padding: !1
|
|
2306
2303
|
}, {
|
|
2307
|
-
default:
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
default:
|
|
2311
|
-
(u(), g(
|
|
2312
|
-
exclude:
|
|
2304
|
+
default: f(() => [
|
|
2305
|
+
C(e.$slots, "default"),
|
|
2306
|
+
k(o(Ln), null, {
|
|
2307
|
+
default: f(({ Component: l, route: s }) => [
|
|
2308
|
+
(u(), g(Kt, {
|
|
2309
|
+
exclude: n.exclude
|
|
2313
2310
|
}, [
|
|
2314
|
-
l ? (u(), g(
|
|
2311
|
+
l ? (u(), g(Q(n.createView(l, s)), {
|
|
2315
2312
|
key: s.fullPath
|
|
2316
|
-
})) :
|
|
2313
|
+
})) : h("", !0)
|
|
2317
2314
|
], 1032, ["exclude"]))
|
|
2318
2315
|
]),
|
|
2319
2316
|
_: 1
|
|
@@ -2323,389 +2320,389 @@ const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2323
2320
|
}));
|
|
2324
2321
|
}
|
|
2325
2322
|
});
|
|
2326
|
-
function
|
|
2327
|
-
const a =
|
|
2323
|
+
function Ko() {
|
|
2324
|
+
const a = D(!1), n = D(""), e = D(!1);
|
|
2328
2325
|
return {
|
|
2329
2326
|
collapsed: a,
|
|
2330
|
-
keyword:
|
|
2327
|
+
keyword: n,
|
|
2331
2328
|
favorite: e
|
|
2332
2329
|
};
|
|
2333
2330
|
}
|
|
2334
|
-
function
|
|
2335
|
-
const
|
|
2336
|
-
return
|
|
2331
|
+
function Lo(a) {
|
|
2332
|
+
const n = Tt();
|
|
2333
|
+
return v(() => {
|
|
2337
2334
|
const e = a.home;
|
|
2338
2335
|
return Object.assign(
|
|
2339
|
-
{ id:
|
|
2336
|
+
{ id: n, url: "/", name: "MaskHome", icon: Vn, closable: !1 },
|
|
2340
2337
|
typeof e == "string" ? { url: e } : e || {}
|
|
2341
2338
|
);
|
|
2342
2339
|
});
|
|
2343
2340
|
}
|
|
2344
|
-
function
|
|
2341
|
+
function Rt(a, n) {
|
|
2345
2342
|
let e = [];
|
|
2346
2343
|
return a.forEach((t) => {
|
|
2347
|
-
t =
|
|
2344
|
+
t = n ? n(t) : t, t.children ? e = e.concat(Rt(t.children, n)) : e.push(t);
|
|
2348
2345
|
}), e;
|
|
2349
2346
|
}
|
|
2350
|
-
function
|
|
2351
|
-
const e = Ye(), t =
|
|
2352
|
-
const
|
|
2353
|
-
if (!
|
|
2354
|
-
console.warn("找不到菜单",
|
|
2347
|
+
function Wo(a, n) {
|
|
2348
|
+
const e = Ye(), t = Pe([]), l = Pe([]), s = v(() => Rt(t.value, a.menuAdapter)), c = v(() => jn(s.value, "id")), r = D(null), i = (y) => {
|
|
2349
|
+
const S = typeof y == "object" ? y.id : y, w = c.value.get(S);
|
|
2350
|
+
if (!w) {
|
|
2351
|
+
console.warn("找不到菜单", y);
|
|
2355
2352
|
return;
|
|
2356
2353
|
}
|
|
2357
|
-
const { type:
|
|
2354
|
+
const { type: M = "route", url: B, title: z, icon: P } = w;
|
|
2358
2355
|
if (!B) {
|
|
2359
|
-
|
|
2356
|
+
r.value = w, n("select", w);
|
|
2360
2357
|
return;
|
|
2361
2358
|
}
|
|
2362
|
-
if (
|
|
2363
|
-
|
|
2359
|
+
if (M === "route") {
|
|
2360
|
+
Nn(B) || B.startsWith("//") ? window.open(B) : (r.value = w, e.push(B).catch((T) => T));
|
|
2364
2361
|
return;
|
|
2365
2362
|
}
|
|
2366
|
-
if (
|
|
2363
|
+
if (M === "window") {
|
|
2367
2364
|
window.open(B);
|
|
2368
2365
|
return;
|
|
2369
2366
|
}
|
|
2370
|
-
|
|
2367
|
+
M === "dialog" && tt({
|
|
2371
2368
|
resizable: !0,
|
|
2372
2369
|
bodyPadding: !1,
|
|
2373
2370
|
width: "80%",
|
|
2374
2371
|
height: "80%",
|
|
2375
|
-
title:
|
|
2372
|
+
title: z,
|
|
2376
2373
|
icon: P,
|
|
2377
2374
|
src: B
|
|
2378
2375
|
});
|
|
2379
2376
|
}, p = async () => {
|
|
2380
2377
|
t.value = typeof a.menus == "function" ? await a.menus() || [] : a.menus ?? [], l.value = typeof a.favorites == "function" ? await a.favorites() || [] : a.favorites ?? [];
|
|
2381
|
-
},
|
|
2382
|
-
l.value = [
|
|
2383
|
-
}, m = (
|
|
2384
|
-
l.value = l.value.filter((
|
|
2385
|
-
}, b = (
|
|
2386
|
-
b(
|
|
2378
|
+
}, d = (y) => {
|
|
2379
|
+
l.value = [y, ...l.value], a.addFavorite && a.addFavorite(y);
|
|
2380
|
+
}, m = (y) => {
|
|
2381
|
+
l.value = l.value.filter((S) => S.id !== y.id), a.removeFavorite && a.removeFavorite(y);
|
|
2382
|
+
}, b = (y) => !!l.value.find((S) => S === y || S.id === y.id), _ = (y) => {
|
|
2383
|
+
b(y) ? m(y) : d(y);
|
|
2387
2384
|
};
|
|
2388
2385
|
return Je(p), {
|
|
2389
2386
|
menus: t,
|
|
2390
2387
|
favorites: l,
|
|
2391
2388
|
flatMenus: s,
|
|
2392
|
-
active:
|
|
2393
|
-
select:
|
|
2394
|
-
toggleFavorite:
|
|
2389
|
+
active: r,
|
|
2390
|
+
select: i,
|
|
2391
|
+
toggleFavorite: _
|
|
2395
2392
|
};
|
|
2396
2393
|
}
|
|
2397
|
-
function
|
|
2398
|
-
const s =
|
|
2399
|
-
() =>
|
|
2400
|
-
),
|
|
2401
|
-
c.push(
|
|
2402
|
-
}, P = (
|
|
2403
|
-
|
|
2394
|
+
function Jo(a, n, e, t, l) {
|
|
2395
|
+
const s = It(), c = Ye(), r = {}, i = D([]), p = D(), { width: d } = $t(p), m = v(() => Math.floor(d.value / Po)), b = v(
|
|
2396
|
+
() => i.value.slice(0, m.value).filter((E) => !E.dialog)
|
|
2397
|
+
), _ = v(() => i.value.slice(m.value)), y = (E) => e.value.find((O) => O.url === E), S = (E) => s.fullPath === E.url, w = (E) => l.value.id === E ? l.value : i.value.find((O) => O.id === E), M = D(""), B = v(() => w(M.value)), z = (E) => {
|
|
2398
|
+
c.push(E.url).catch((O) => O);
|
|
2399
|
+
}, P = (E) => {
|
|
2400
|
+
M.value = E.id, s.fullPath !== E.url && z(E);
|
|
2404
2401
|
}, T = () => {
|
|
2405
|
-
|
|
2406
|
-
},
|
|
2407
|
-
const
|
|
2408
|
-
|
|
2409
|
-
},
|
|
2410
|
-
const { url:
|
|
2402
|
+
z(l.value);
|
|
2403
|
+
}, N = (E) => {
|
|
2404
|
+
const O = i.value.find((U) => U.url === E.url || U.id === E.id);
|
|
2405
|
+
O ? P(O) : (i.value.unshift(E), P(E));
|
|
2406
|
+
}, x = async (E) => {
|
|
2407
|
+
const { url: O = s.fullPath, icon: U, title: ze = "新建标签页" } = E || {}, $e = r[O], Re = Tt(), Fe = Et(O);
|
|
2411
2408
|
return {
|
|
2412
|
-
id:
|
|
2409
|
+
id: Re,
|
|
2413
2410
|
name: Fe,
|
|
2414
|
-
url:
|
|
2415
|
-
icon:
|
|
2416
|
-
title:
|
|
2411
|
+
url: O,
|
|
2412
|
+
icon: U,
|
|
2413
|
+
title: ze,
|
|
2417
2414
|
closable: !0,
|
|
2418
|
-
menu:
|
|
2419
|
-
|
|
2415
|
+
menu: E,
|
|
2416
|
+
...$e ? await $e() : {}
|
|
2420
2417
|
};
|
|
2421
|
-
}, H = async (
|
|
2418
|
+
}, H = async (E) => {
|
|
2422
2419
|
if (await je.confirm("是否关闭页签", "提示", {
|
|
2423
2420
|
type: "warning"
|
|
2424
2421
|
}).catch(() => !1)) {
|
|
2425
|
-
if (
|
|
2426
|
-
const
|
|
2427
|
-
|
|
2422
|
+
if (i.value = i.value.filter((U) => U.id !== E.id), M.value === E.id) {
|
|
2423
|
+
const U = i.value[0];
|
|
2424
|
+
z(U || l.value);
|
|
2428
2425
|
}
|
|
2429
|
-
return
|
|
2426
|
+
return E;
|
|
2430
2427
|
}
|
|
2431
|
-
}, K = (
|
|
2432
|
-
const
|
|
2433
|
-
if (
|
|
2434
|
-
const
|
|
2435
|
-
|
|
2428
|
+
}, K = (E) => {
|
|
2429
|
+
const O = i.value.findIndex((U) => U.id === E.id);
|
|
2430
|
+
if (O >= 0) {
|
|
2431
|
+
const U = i.value[O];
|
|
2432
|
+
i.value.splice(O, 1, Object.assign(U, E));
|
|
2436
2433
|
}
|
|
2437
2434
|
}, re = async () => {
|
|
2438
2435
|
if (!await je.confirm("是否关闭全部页签", "提示", {
|
|
2439
2436
|
type: "warning"
|
|
2440
2437
|
}).catch(() => !1))
|
|
2441
2438
|
return;
|
|
2442
|
-
const
|
|
2443
|
-
return
|
|
2439
|
+
const O = i.value;
|
|
2440
|
+
return i.value = [], P(l.value), O;
|
|
2444
2441
|
}, Z = async () => {
|
|
2445
2442
|
if (!await je.confirm("是否关闭其他页签", "提示", {
|
|
2446
2443
|
type: "warning"
|
|
2447
2444
|
}).catch(() => !1))
|
|
2448
2445
|
return;
|
|
2449
|
-
const
|
|
2450
|
-
return
|
|
2451
|
-
}, ee = (
|
|
2452
|
-
const
|
|
2453
|
-
|
|
2454
|
-
},
|
|
2455
|
-
await
|
|
2456
|
-
const
|
|
2457
|
-
if (
|
|
2458
|
-
|
|
2446
|
+
const O = i.value.filter((U) => U.id !== M.value);
|
|
2447
|
+
return i.value = i.value.filter((U) => U.id === M.value), O;
|
|
2448
|
+
}, ee = (E) => {
|
|
2449
|
+
const O = i.value.filter((U) => U.id !== E.id);
|
|
2450
|
+
i.value = [E, ...O], P(E);
|
|
2451
|
+
}, ue = async () => {
|
|
2452
|
+
await ve();
|
|
2453
|
+
const E = l.value.url === s.fullPath, O = y(s.fullPath);
|
|
2454
|
+
if (E)
|
|
2455
|
+
M.value = l.value.id;
|
|
2459
2456
|
else {
|
|
2460
|
-
const
|
|
2461
|
-
|
|
2457
|
+
const U = await x(O);
|
|
2458
|
+
N(U);
|
|
2462
2459
|
}
|
|
2463
|
-
await
|
|
2460
|
+
await ve(), t.value = O || null;
|
|
2464
2461
|
};
|
|
2465
|
-
return L(e,
|
|
2462
|
+
return L(e, ue), L(s, ue, { immediate: !0 }), Ce(Dt, r), {
|
|
2466
2463
|
tabRef: p,
|
|
2467
|
-
tabs:
|
|
2464
|
+
tabs: i,
|
|
2468
2465
|
showTabs: b,
|
|
2469
2466
|
currentTab: B,
|
|
2470
|
-
changeTab:
|
|
2467
|
+
changeTab: z,
|
|
2471
2468
|
removeTab: H,
|
|
2472
2469
|
updateTab: K,
|
|
2473
|
-
addTab:
|
|
2470
|
+
addTab: N,
|
|
2474
2471
|
home: l,
|
|
2475
|
-
tabValue:
|
|
2476
|
-
isCurrentTab:
|
|
2472
|
+
tabValue: M,
|
|
2473
|
+
isCurrentTab: S,
|
|
2477
2474
|
activeHome: T,
|
|
2478
2475
|
activeTab: P,
|
|
2479
|
-
dropdownTabs:
|
|
2476
|
+
dropdownTabs: _,
|
|
2480
2477
|
removeAllTabs: re,
|
|
2481
2478
|
removeOtherTabs: Z,
|
|
2482
2479
|
moveToShow: ee
|
|
2483
2480
|
};
|
|
2484
2481
|
}
|
|
2485
|
-
function
|
|
2486
|
-
const
|
|
2482
|
+
function Qo(a) {
|
|
2483
|
+
const n = /* @__PURE__ */ new Map(), e = D([]), t = Oe({}), l = pe(), s = {}, { updateTab: c, isCurrentTab: r, activeHome: i, tabs: p } = a, d = (z, P) => {
|
|
2487
2484
|
const T = P.fullPath;
|
|
2488
|
-
if (
|
|
2489
|
-
return
|
|
2485
|
+
if (n.has(T))
|
|
2486
|
+
return n.get(T);
|
|
2490
2487
|
{
|
|
2491
|
-
const
|
|
2492
|
-
name:
|
|
2488
|
+
const N = Et(T), x = {
|
|
2489
|
+
name: N,
|
|
2493
2490
|
setup() {
|
|
2494
|
-
const H =
|
|
2495
|
-
return
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
), () => re.value ?
|
|
2491
|
+
const H = v(() => t[T] || document.body), K = v(() => !t[T]), re = v(() => !e.value.includes(N));
|
|
2492
|
+
return Ce(
|
|
2493
|
+
Wn,
|
|
2494
|
+
ye({ ...P })
|
|
2495
|
+
), () => re.value ? ae(
|
|
2499
2496
|
yt,
|
|
2500
2497
|
{
|
|
2501
2498
|
to: H.value,
|
|
2502
2499
|
disabled: K.value
|
|
2503
2500
|
},
|
|
2504
|
-
[
|
|
2501
|
+
[ae(z)]
|
|
2505
2502
|
) : null;
|
|
2506
2503
|
}
|
|
2507
2504
|
};
|
|
2508
|
-
return
|
|
2505
|
+
return n.set(T, x), x;
|
|
2509
2506
|
}
|
|
2510
|
-
}, m = (
|
|
2511
|
-
|
|
2512
|
-
const P = s[
|
|
2513
|
-
P && (P.destroy(), delete s[
|
|
2514
|
-
}, b = (
|
|
2515
|
-
|
|
2507
|
+
}, m = (z) => {
|
|
2508
|
+
z.dialog = void 0, delete t[z.url];
|
|
2509
|
+
const P = s[z.id];
|
|
2510
|
+
P && (P.destroy(), delete s[z.id], c(z));
|
|
2511
|
+
}, b = (z = []) => {
|
|
2512
|
+
z.forEach((P) => {
|
|
2516
2513
|
m(P);
|
|
2517
2514
|
});
|
|
2518
|
-
},
|
|
2519
|
-
|
|
2520
|
-
...
|
|
2515
|
+
}, _ = async (z) => {
|
|
2516
|
+
z.dialog = {
|
|
2517
|
+
...z.dialog,
|
|
2521
2518
|
onMinimized: () => {
|
|
2522
|
-
m(
|
|
2519
|
+
m(z);
|
|
2523
2520
|
},
|
|
2524
2521
|
onClose: async () => {
|
|
2525
|
-
m(
|
|
2522
|
+
m(z), p.value = p.value.filter((T) => T.id !== z.id);
|
|
2526
2523
|
}
|
|
2527
|
-
}, c(
|
|
2524
|
+
}, c(z);
|
|
2528
2525
|
const P = tt(
|
|
2529
2526
|
{
|
|
2530
|
-
title:
|
|
2531
|
-
icon:
|
|
2527
|
+
title: z.title,
|
|
2528
|
+
icon: z.icon,
|
|
2532
2529
|
modal: !1,
|
|
2533
2530
|
resizable: !0,
|
|
2534
2531
|
draggable: !0,
|
|
2535
2532
|
maximizable: !0,
|
|
2536
2533
|
minimizable: !0,
|
|
2537
|
-
...
|
|
2534
|
+
...z.dialog,
|
|
2538
2535
|
onOpen(T) {
|
|
2539
|
-
t[
|
|
2536
|
+
t[z.url] = T.refs.panelRef?.bodyRef?.$el;
|
|
2540
2537
|
}
|
|
2541
2538
|
},
|
|
2542
2539
|
l?.appContext
|
|
2543
2540
|
);
|
|
2544
|
-
return await
|
|
2545
|
-
},
|
|
2546
|
-
e.value = [
|
|
2547
|
-
},
|
|
2548
|
-
e.value =
|
|
2549
|
-
},
|
|
2550
|
-
if (
|
|
2551
|
-
const P =
|
|
2541
|
+
return await ve(), r(z) && i(), s[z.id] = P, P;
|
|
2542
|
+
}, y = async (z) => {
|
|
2543
|
+
e.value = [z.name], await ve(), e.value = [];
|
|
2544
|
+
}, S = async (z) => {
|
|
2545
|
+
e.value = z.map((P) => P.name), await ve(), e.value = [];
|
|
2546
|
+
}, w = (z) => (z.preventDefault(), !1), M = (z) => {
|
|
2547
|
+
if (z.dataTransfer) {
|
|
2548
|
+
const P = z.dataTransfer.getData("tab"), T = p.value.find((N) => N.id === P);
|
|
2552
2549
|
if (T) {
|
|
2553
|
-
const { clientX:
|
|
2550
|
+
const { clientX: N, clientY: x } = z;
|
|
2554
2551
|
T.dialog = {
|
|
2555
|
-
left:
|
|
2556
|
-
top:
|
|
2557
|
-
},
|
|
2552
|
+
left: N,
|
|
2553
|
+
top: x
|
|
2554
|
+
}, _(T);
|
|
2558
2555
|
}
|
|
2559
2556
|
}
|
|
2560
|
-
}, B = (
|
|
2561
|
-
return De(document, "dragover",
|
|
2562
|
-
createView:
|
|
2563
|
-
openDialog:
|
|
2564
|
-
refresh:
|
|
2557
|
+
}, B = (z) => !!t[z];
|
|
2558
|
+
return De(document, "dragover", w), De(document, "drop", M), {
|
|
2559
|
+
createView: d,
|
|
2560
|
+
openDialog: _,
|
|
2561
|
+
refresh: y,
|
|
2565
2562
|
exclude: e,
|
|
2566
|
-
cleanCache:
|
|
2563
|
+
cleanCache: S,
|
|
2567
2564
|
hasDialog: B,
|
|
2568
2565
|
closeDialog: m,
|
|
2569
2566
|
closeDialogs: b
|
|
2570
2567
|
};
|
|
2571
2568
|
}
|
|
2572
|
-
const
|
|
2569
|
+
const Ha = /* @__PURE__ */ V({
|
|
2573
2570
|
name: "XMask",
|
|
2574
2571
|
__name: "Mask",
|
|
2575
|
-
props:
|
|
2572
|
+
props: Ao,
|
|
2576
2573
|
emits: ["select", "actionClick", "actionCommand"],
|
|
2577
|
-
setup(a, { emit:
|
|
2578
|
-
const e = a, t =
|
|
2579
|
-
tabRef:
|
|
2580
|
-
showTabs:
|
|
2581
|
-
currentTab:
|
|
2582
|
-
changeTab:
|
|
2574
|
+
setup(a, { emit: n }) {
|
|
2575
|
+
const e = a, t = n, l = Lo(e), { collapsed: s, keyword: c, favorite: r } = Ko(), { menus: i, favorites: p, flatMenus: d, active: m, select: b, toggleFavorite: _ } = Wo(e, t), {
|
|
2576
|
+
tabRef: y,
|
|
2577
|
+
showTabs: S,
|
|
2578
|
+
currentTab: w,
|
|
2579
|
+
changeTab: M,
|
|
2583
2580
|
removeTab: B,
|
|
2584
|
-
tabs:
|
|
2581
|
+
tabs: z,
|
|
2585
2582
|
updateTab: P,
|
|
2586
2583
|
isCurrentTab: T,
|
|
2587
|
-
activeHome:
|
|
2588
|
-
removeAllTabs:
|
|
2584
|
+
activeHome: N,
|
|
2585
|
+
removeAllTabs: x,
|
|
2589
2586
|
removeOtherTabs: H,
|
|
2590
2587
|
dropdownTabs: K,
|
|
2591
2588
|
moveToShow: re
|
|
2592
|
-
} =
|
|
2593
|
-
tabs:
|
|
2589
|
+
} = Jo(e, t, d, m, l), { createView: Z, openDialog: ee, refresh: ue, exclude: E, cleanCache: O, closeDialogs: U } = Qo({
|
|
2590
|
+
tabs: z,
|
|
2594
2591
|
updateTab: P,
|
|
2595
2592
|
isCurrentTab: T,
|
|
2596
|
-
activeHome:
|
|
2597
|
-
}),
|
|
2598
|
-
await B(
|
|
2599
|
-
},
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2602
|
-
},
|
|
2603
|
-
const
|
|
2604
|
-
|
|
2605
|
-
}, Fe = (
|
|
2606
|
-
t("actionClick",
|
|
2607
|
-
},
|
|
2608
|
-
t("actionCommand",
|
|
2593
|
+
activeHome: N
|
|
2594
|
+
}), ze = async (X) => {
|
|
2595
|
+
await B(X) && await O([X]);
|
|
2596
|
+
}, $e = async () => {
|
|
2597
|
+
const X = await x();
|
|
2598
|
+
X && (U(X), await O(X));
|
|
2599
|
+
}, Re = async () => {
|
|
2600
|
+
const X = await H();
|
|
2601
|
+
X && (U(X), await O(X));
|
|
2602
|
+
}, Fe = (X) => {
|
|
2603
|
+
t("actionClick", X);
|
|
2604
|
+
}, Ut = (X, ne) => {
|
|
2605
|
+
t("actionCommand", X, ne);
|
|
2609
2606
|
};
|
|
2610
|
-
return
|
|
2611
|
-
tabs:
|
|
2612
|
-
flatMenus:
|
|
2607
|
+
return Ce(Ot, {
|
|
2608
|
+
tabs: z,
|
|
2609
|
+
flatMenus: d,
|
|
2613
2610
|
favorites: p,
|
|
2614
2611
|
updateTab: P,
|
|
2615
2612
|
active: m,
|
|
2616
|
-
currentTab:
|
|
2617
|
-
}), (
|
|
2618
|
-
class:
|
|
2613
|
+
currentTab: w
|
|
2614
|
+
}), (X, ne) => (u(), g(o(I), {
|
|
2615
|
+
class: J(["x-mask", { "is-disabled": e.disabled }]),
|
|
2619
2616
|
fit: ""
|
|
2620
2617
|
}, {
|
|
2621
|
-
default:
|
|
2618
|
+
default: f(() => [
|
|
2622
2619
|
e.disabled ? (u(), g(pt, {
|
|
2623
2620
|
key: 1,
|
|
2624
|
-
createView:
|
|
2625
|
-
exclude:
|
|
2621
|
+
createView: o(Z),
|
|
2622
|
+
exclude: o(E)
|
|
2626
2623
|
}, {
|
|
2627
|
-
default:
|
|
2628
|
-
|
|
2624
|
+
default: f(() => [
|
|
2625
|
+
X.$slots.default ? C(X.$slots, "default", { key: 0 }) : h("", !0)
|
|
2629
2626
|
]),
|
|
2630
2627
|
_: 3
|
|
2631
|
-
}, 8, ["createView", "exclude"])) : (u(),
|
|
2632
|
-
|
|
2633
|
-
brand:
|
|
2634
|
-
|
|
2628
|
+
}, 8, ["createView", "exclude"])) : (u(), $(W, { key: 0 }, [
|
|
2629
|
+
k($o, { collapsed: o(s) }, {
|
|
2630
|
+
brand: f(() => [
|
|
2631
|
+
k(Io, {
|
|
2635
2632
|
logo: e.logo,
|
|
2636
2633
|
title: e.title,
|
|
2637
|
-
url:
|
|
2638
|
-
collapsed:
|
|
2634
|
+
url: o(l).url,
|
|
2635
|
+
collapsed: o(s)
|
|
2639
2636
|
}, null, 8, ["logo", "title", "url", "collapsed"])
|
|
2640
2637
|
]),
|
|
2641
|
-
default:
|
|
2642
|
-
|
|
2643
|
-
collasped:
|
|
2644
|
-
"onUpdate:collasped":
|
|
2645
|
-
favorite:
|
|
2646
|
-
"onUpdate:favorite":
|
|
2647
|
-
keyword:
|
|
2648
|
-
"onUpdate:keyword":
|
|
2638
|
+
default: f(() => [
|
|
2639
|
+
k(To, {
|
|
2640
|
+
collasped: o(s),
|
|
2641
|
+
"onUpdate:collasped": ne[0] || (ne[0] = (xe) => Ie(s) ? s.value = xe : null),
|
|
2642
|
+
favorite: o(r),
|
|
2643
|
+
"onUpdate:favorite": ne[1] || (ne[1] = (xe) => Ie(r) ? r.value = xe : null),
|
|
2644
|
+
keyword: o(c),
|
|
2645
|
+
"onUpdate:keyword": ne[2] || (ne[2] = (xe) => Ie(c) ? c.value = xe : null)
|
|
2649
2646
|
}, null, 8, ["collasped", "favorite", "keyword"]),
|
|
2650
|
-
|
|
2651
|
-
collapse:
|
|
2652
|
-
keyword:
|
|
2653
|
-
favorite:
|
|
2654
|
-
favorites:
|
|
2655
|
-
flatMenus:
|
|
2656
|
-
menus:
|
|
2657
|
-
active:
|
|
2658
|
-
onSelect:
|
|
2647
|
+
k(Vo, {
|
|
2648
|
+
collapse: o(s),
|
|
2649
|
+
keyword: o(c),
|
|
2650
|
+
favorite: o(r),
|
|
2651
|
+
favorites: o(p),
|
|
2652
|
+
flatMenus: o(d),
|
|
2653
|
+
menus: o(i),
|
|
2654
|
+
active: o(m),
|
|
2655
|
+
onSelect: o(b)
|
|
2659
2656
|
}, null, 8, ["collapse", "keyword", "favorite", "favorites", "flatMenus", "menus", "active", "onSelect"])
|
|
2660
2657
|
]),
|
|
2661
2658
|
_: 1
|
|
2662
2659
|
}, 8, ["collapsed"]),
|
|
2663
|
-
|
|
2660
|
+
k(o(I), {
|
|
2664
2661
|
class: "x-mask__main",
|
|
2665
2662
|
grow: "",
|
|
2666
2663
|
shrink: "",
|
|
2667
2664
|
flex: "",
|
|
2668
2665
|
direction: "column"
|
|
2669
2666
|
}, {
|
|
2670
|
-
default:
|
|
2671
|
-
|
|
2667
|
+
default: f(() => [
|
|
2668
|
+
k(o(I), {
|
|
2672
2669
|
class: "x-mask-topbar",
|
|
2673
2670
|
justify: "space-between",
|
|
2674
2671
|
align: "center"
|
|
2675
2672
|
}, {
|
|
2676
|
-
default:
|
|
2677
|
-
|
|
2673
|
+
default: f(() => [
|
|
2674
|
+
k(jo, {
|
|
2678
2675
|
ref_key: "tabRef",
|
|
2679
|
-
ref:
|
|
2680
|
-
favorites:
|
|
2681
|
-
tabs:
|
|
2682
|
-
home:
|
|
2683
|
-
value:
|
|
2684
|
-
onClick:
|
|
2685
|
-
onToggleFavorite:
|
|
2686
|
-
onRemove:
|
|
2687
|
-
onDialog:
|
|
2688
|
-
onRefresh:
|
|
2676
|
+
ref: y,
|
|
2677
|
+
favorites: o(p),
|
|
2678
|
+
tabs: o(S),
|
|
2679
|
+
home: o(l),
|
|
2680
|
+
value: o(w)?.id,
|
|
2681
|
+
onClick: o(M),
|
|
2682
|
+
onToggleFavorite: o(_),
|
|
2683
|
+
onRemove: ze,
|
|
2684
|
+
onDialog: o(ee),
|
|
2685
|
+
onRefresh: o(ue)
|
|
2689
2686
|
}, null, 8, ["favorites", "tabs", "home", "value", "onClick", "onToggleFavorite", "onDialog", "onRefresh"]),
|
|
2690
|
-
|
|
2691
|
-
tabs:
|
|
2687
|
+
k(Xo, {
|
|
2688
|
+
tabs: o(K),
|
|
2692
2689
|
actions: e.actions,
|
|
2693
2690
|
theme: e.theme,
|
|
2694
|
-
onCloseOtherTabs:
|
|
2695
|
-
onCloseAllTabs:
|
|
2696
|
-
onCloseTab:
|
|
2697
|
-
onClickTab:
|
|
2691
|
+
onCloseOtherTabs: Re,
|
|
2692
|
+
onCloseAllTabs: $e,
|
|
2693
|
+
onCloseTab: ze,
|
|
2694
|
+
onClickTab: o(re),
|
|
2698
2695
|
onActionClick: Fe,
|
|
2699
|
-
onActionCommand:
|
|
2696
|
+
onActionCommand: Ut
|
|
2700
2697
|
}, {
|
|
2701
|
-
default:
|
|
2702
|
-
|
|
2698
|
+
default: f(() => [
|
|
2699
|
+
k(Ho, {
|
|
2703
2700
|
avatar: e.avatar
|
|
2704
|
-
},
|
|
2705
|
-
|
|
2701
|
+
}, ce({ _: 2 }, [
|
|
2702
|
+
X.$slots.user ? {
|
|
2706
2703
|
name: "default",
|
|
2707
|
-
fn:
|
|
2708
|
-
|
|
2704
|
+
fn: f(() => [
|
|
2705
|
+
C(X.$slots, "user")
|
|
2709
2706
|
]),
|
|
2710
2707
|
key: "0"
|
|
2711
2708
|
} : void 0
|
|
@@ -2716,12 +2713,12 @@ const Oa = /* @__PURE__ */ V({
|
|
|
2716
2713
|
]),
|
|
2717
2714
|
_: 3
|
|
2718
2715
|
}),
|
|
2719
|
-
|
|
2720
|
-
createView:
|
|
2721
|
-
exclude:
|
|
2716
|
+
k(pt, {
|
|
2717
|
+
createView: o(Z),
|
|
2718
|
+
exclude: o(E)
|
|
2722
2719
|
}, {
|
|
2723
|
-
default:
|
|
2724
|
-
|
|
2720
|
+
default: f(() => [
|
|
2721
|
+
X.$slots.default ? C(X.$slots, "default", { key: 0 }) : h("", !0)
|
|
2725
2722
|
]),
|
|
2726
2723
|
_: 3
|
|
2727
2724
|
}, 8, ["createView", "exclude"])
|
|
@@ -2734,33 +2731,33 @@ const Oa = /* @__PURE__ */ V({
|
|
|
2734
2731
|
}, 8, ["class"]));
|
|
2735
2732
|
}
|
|
2736
2733
|
});
|
|
2737
|
-
function
|
|
2738
|
-
const
|
|
2734
|
+
function Ka(a = {}) {
|
|
2735
|
+
const n = It(), e = Se(Dt, null), t = Se(Ot, null);
|
|
2739
2736
|
if (e) {
|
|
2740
2737
|
const s = typeof a == "function" ? a : async () => a;
|
|
2741
|
-
e[
|
|
2738
|
+
e[n.fullPath] = s;
|
|
2742
2739
|
}
|
|
2743
2740
|
return {
|
|
2744
|
-
tab:
|
|
2741
|
+
tab: v(() => t ? t.tabs.value.find((s) => s.url === n.fullPath) : null),
|
|
2745
2742
|
mask: t
|
|
2746
2743
|
};
|
|
2747
2744
|
}
|
|
2748
|
-
const
|
|
2745
|
+
const Zo = /* @__PURE__ */ V({
|
|
2749
2746
|
__name: "SelectEditor",
|
|
2750
2747
|
props: {
|
|
2751
2748
|
options: { default: () => [] }
|
|
2752
2749
|
},
|
|
2753
2750
|
setup(a) {
|
|
2754
|
-
const
|
|
2755
|
-
return (e, t) => (u(), g(
|
|
2756
|
-
default:
|
|
2757
|
-
(u(!0),
|
|
2751
|
+
const n = a;
|
|
2752
|
+
return (e, t) => (u(), g(o(wt), le(be(e.$attrs)), {
|
|
2753
|
+
default: f(() => [
|
|
2754
|
+
(u(!0), $(W, null, Y(n.options, (l, s) => (u(), g(o(xt), F({
|
|
2758
2755
|
key: `item_${s}_${l.value}`
|
|
2759
|
-
}, l),
|
|
2756
|
+
}, l), ce({ _: 2 }, [
|
|
2760
2757
|
e.$slots.option ? {
|
|
2761
2758
|
name: "default",
|
|
2762
|
-
fn:
|
|
2763
|
-
|
|
2759
|
+
fn: f(() => [
|
|
2760
|
+
C(e.$slots, "option", { option: l })
|
|
2764
2761
|
]),
|
|
2765
2762
|
key: "0"
|
|
2766
2763
|
} : void 0
|
|
@@ -2769,23 +2766,23 @@ const Wn = /* @__PURE__ */ V({
|
|
|
2769
2766
|
_: 3
|
|
2770
2767
|
}, 16));
|
|
2771
2768
|
}
|
|
2772
|
-
}),
|
|
2769
|
+
}), Go = /* @__PURE__ */ V({
|
|
2773
2770
|
__name: "CheckboxEditor",
|
|
2774
2771
|
props: {
|
|
2775
2772
|
options: { default: () => [] },
|
|
2776
2773
|
button: { type: Boolean, default: !1 }
|
|
2777
2774
|
},
|
|
2778
2775
|
setup(a) {
|
|
2779
|
-
const
|
|
2780
|
-
() =>
|
|
2776
|
+
const n = a, e = v(
|
|
2777
|
+
() => we(n.button ? tn : nn)
|
|
2781
2778
|
);
|
|
2782
|
-
return (t, l) => (u(), g(
|
|
2783
|
-
default:
|
|
2784
|
-
(u(!0),
|
|
2779
|
+
return (t, l) => (u(), g(o(on), le(be(t.$attrs)), {
|
|
2780
|
+
default: f(() => [
|
|
2781
|
+
(u(!0), $(W, null, Y(n.options, (s, c) => (u(), g(Q(e.value), {
|
|
2785
2782
|
key: `item_${c}_${s.value}`,
|
|
2786
2783
|
label: s.value
|
|
2787
2784
|
}, {
|
|
2788
|
-
default:
|
|
2785
|
+
default: f(() => [
|
|
2789
2786
|
R(A(s.label), 1)
|
|
2790
2787
|
]),
|
|
2791
2788
|
_: 2
|
|
@@ -2794,23 +2791,23 @@ const Wn = /* @__PURE__ */ V({
|
|
|
2794
2791
|
_: 1
|
|
2795
2792
|
}, 16));
|
|
2796
2793
|
}
|
|
2797
|
-
}),
|
|
2794
|
+
}), Yo = /* @__PURE__ */ V({
|
|
2798
2795
|
__name: "RadioEditor",
|
|
2799
2796
|
props: {
|
|
2800
2797
|
options: { default: () => [] },
|
|
2801
2798
|
button: { type: Boolean, default: !1 }
|
|
2802
2799
|
},
|
|
2803
2800
|
setup(a) {
|
|
2804
|
-
const
|
|
2805
|
-
() =>
|
|
2801
|
+
const n = a, e = v(
|
|
2802
|
+
() => we(n.button ? an : sn)
|
|
2806
2803
|
);
|
|
2807
|
-
return (t, l) => (u(), g(
|
|
2808
|
-
default:
|
|
2809
|
-
(u(!0),
|
|
2804
|
+
return (t, l) => (u(), g(o(ln), le(be(t.$attrs)), {
|
|
2805
|
+
default: f(() => [
|
|
2806
|
+
(u(!0), $(W, null, Y(n.options, (s, c) => (u(), g(Q(e.value), {
|
|
2810
2807
|
key: `item_${c}_${s.value}`,
|
|
2811
2808
|
label: s.value
|
|
2812
2809
|
}, {
|
|
2813
|
-
default:
|
|
2810
|
+
default: f(() => [
|
|
2814
2811
|
R(A(s.label), 1)
|
|
2815
2812
|
]),
|
|
2816
2813
|
_: 2
|
|
@@ -2819,7 +2816,7 @@ const Wn = /* @__PURE__ */ V({
|
|
|
2819
2816
|
_: 1
|
|
2820
2817
|
}, 16));
|
|
2821
2818
|
}
|
|
2822
|
-
}),
|
|
2819
|
+
}), Ft = {
|
|
2823
2820
|
none: {
|
|
2824
2821
|
component: "div",
|
|
2825
2822
|
props: {
|
|
@@ -2827,14 +2824,14 @@ const Wn = /* @__PURE__ */ V({
|
|
|
2827
2824
|
}
|
|
2828
2825
|
},
|
|
2829
2826
|
text: {
|
|
2830
|
-
component:
|
|
2827
|
+
component: _e,
|
|
2831
2828
|
props: {
|
|
2832
2829
|
clearable: !0
|
|
2833
2830
|
},
|
|
2834
2831
|
defaultValue: ""
|
|
2835
2832
|
},
|
|
2836
2833
|
textarea: {
|
|
2837
|
-
component:
|
|
2834
|
+
component: _e,
|
|
2838
2835
|
props: {
|
|
2839
2836
|
type: "textarea",
|
|
2840
2837
|
rows: 2
|
|
@@ -2842,34 +2839,34 @@ const Wn = /* @__PURE__ */ V({
|
|
|
2842
2839
|
defaultValue: ""
|
|
2843
2840
|
},
|
|
2844
2841
|
select: {
|
|
2845
|
-
component:
|
|
2842
|
+
component: Zo,
|
|
2846
2843
|
props: {
|
|
2847
2844
|
clearable: !0
|
|
2848
2845
|
}
|
|
2849
2846
|
},
|
|
2850
2847
|
checkbox: {
|
|
2851
|
-
component:
|
|
2848
|
+
component: Go,
|
|
2852
2849
|
props: {},
|
|
2853
2850
|
defaultValue: []
|
|
2854
2851
|
},
|
|
2855
2852
|
radio: {
|
|
2856
|
-
component:
|
|
2853
|
+
component: Yo,
|
|
2857
2854
|
props: {}
|
|
2858
2855
|
},
|
|
2859
2856
|
number: {
|
|
2860
|
-
component:
|
|
2857
|
+
component: rn,
|
|
2861
2858
|
props: {}
|
|
2862
2859
|
},
|
|
2863
2860
|
date: {
|
|
2864
|
-
component:
|
|
2861
|
+
component: ot,
|
|
2865
2862
|
props: {}
|
|
2866
2863
|
},
|
|
2867
2864
|
time: {
|
|
2868
|
-
component:
|
|
2865
|
+
component: un,
|
|
2869
2866
|
props: {}
|
|
2870
2867
|
},
|
|
2871
2868
|
datetime: {
|
|
2872
|
-
component:
|
|
2869
|
+
component: ot,
|
|
2873
2870
|
props: {
|
|
2874
2871
|
type: "datetime"
|
|
2875
2872
|
}
|
|
@@ -2879,18 +2876,18 @@ const Wn = /* @__PURE__ */ V({
|
|
|
2879
2876
|
props: {}
|
|
2880
2877
|
},
|
|
2881
2878
|
rate: {
|
|
2882
|
-
component:
|
|
2879
|
+
component: cn,
|
|
2883
2880
|
props: {}
|
|
2884
2881
|
},
|
|
2885
2882
|
slider: {
|
|
2886
|
-
component:
|
|
2883
|
+
component: dn,
|
|
2887
2884
|
props: {}
|
|
2888
2885
|
},
|
|
2889
2886
|
cascader: {
|
|
2890
|
-
component:
|
|
2887
|
+
component: pn,
|
|
2891
2888
|
props: {}
|
|
2892
2889
|
}
|
|
2893
|
-
},
|
|
2890
|
+
}, qo = {
|
|
2894
2891
|
/**
|
|
2895
2892
|
* 字段名称
|
|
2896
2893
|
*/
|
|
@@ -2922,7 +2919,7 @@ const Wn = /* @__PURE__ */ V({
|
|
|
2922
2919
|
modelValue: {
|
|
2923
2920
|
type: [String, Number, Boolean, Object, Array],
|
|
2924
2921
|
default(a) {
|
|
2925
|
-
return
|
|
2922
|
+
return Ft[a.editor]?.defaultValue;
|
|
2926
2923
|
}
|
|
2927
2924
|
},
|
|
2928
2925
|
/**
|
|
@@ -3004,17 +3001,17 @@ const Wn = /* @__PURE__ */ V({
|
|
|
3004
3001
|
type: Boolean
|
|
3005
3002
|
}
|
|
3006
3003
|
};
|
|
3007
|
-
async function
|
|
3004
|
+
async function ea(a, n) {
|
|
3008
3005
|
const e = a.options;
|
|
3009
|
-
return e ? typeof e == "function" ? await e(
|
|
3006
|
+
return e ? typeof e == "function" ? await e(n) || [] : e : [];
|
|
3010
3007
|
}
|
|
3011
|
-
function
|
|
3012
|
-
const s =
|
|
3008
|
+
function ta(a, n, e, t, l) {
|
|
3009
|
+
const s = D([]), c = v(() => !t || !l ? {} : Mt(a.cascader).reduce((p, d) => (p[d] = Ve(l, d), p), {}));
|
|
3013
3010
|
return L(
|
|
3014
3011
|
c,
|
|
3015
|
-
async (
|
|
3012
|
+
async (i) => {
|
|
3016
3013
|
if (e.value) {
|
|
3017
|
-
s.value = await
|
|
3014
|
+
s.value = await ea(a, i);
|
|
3018
3015
|
const p = t?.exposed?.reset;
|
|
3019
3016
|
p && a.name && p(a.name);
|
|
3020
3017
|
}
|
|
@@ -3023,177 +3020,177 @@ function Yn(a, o, e, t, l) {
|
|
|
3023
3020
|
immediate: !0
|
|
3024
3021
|
}
|
|
3025
3022
|
), {
|
|
3026
|
-
editor:
|
|
3023
|
+
editor: v(() => {
|
|
3027
3024
|
const {
|
|
3028
|
-
editor:
|
|
3025
|
+
editor: i = "text",
|
|
3029
3026
|
placeholder: p,
|
|
3030
|
-
label:
|
|
3027
|
+
label: d = "...",
|
|
3031
3028
|
disabled: m,
|
|
3032
3029
|
readonly: b
|
|
3033
|
-
} = a,
|
|
3030
|
+
} = a, _ = {
|
|
3034
3031
|
...a.props,
|
|
3035
|
-
placeholder: p || (p === null ? void 0 : `请输入${
|
|
3032
|
+
placeholder: p || (p === null ? void 0 : `请输入${d}`),
|
|
3036
3033
|
disabled: m,
|
|
3037
3034
|
readonly: b,
|
|
3038
3035
|
options: s.value,
|
|
3039
|
-
onFocus: () =>
|
|
3040
|
-
onBlur: () =>
|
|
3041
|
-
onChange: (
|
|
3042
|
-
},
|
|
3043
|
-
component:
|
|
3036
|
+
onFocus: () => n("focus"),
|
|
3037
|
+
onBlur: () => n("blur"),
|
|
3038
|
+
onChange: (S) => n("change", S)
|
|
3039
|
+
}, y = typeof i == "string" ? Ft[i] : {
|
|
3040
|
+
component: i,
|
|
3044
3041
|
props: {}
|
|
3045
3042
|
};
|
|
3046
|
-
return
|
|
3047
|
-
props:
|
|
3043
|
+
return Un({}, y, {
|
|
3044
|
+
props: _
|
|
3048
3045
|
});
|
|
3049
3046
|
})
|
|
3050
3047
|
};
|
|
3051
3048
|
}
|
|
3052
|
-
const
|
|
3049
|
+
const na = {
|
|
3053
3050
|
key: 1,
|
|
3054
3051
|
class: "el-form-item__error"
|
|
3055
|
-
},
|
|
3052
|
+
}, oa = {
|
|
3056
3053
|
key: 0,
|
|
3057
3054
|
class: "x-field__tip"
|
|
3058
|
-
},
|
|
3055
|
+
}, aa = /* @__PURE__ */ V({
|
|
3059
3056
|
name: "XField",
|
|
3060
3057
|
__name: "Field",
|
|
3061
|
-
props:
|
|
3058
|
+
props: qo,
|
|
3062
3059
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
3063
|
-
setup(a, { expose:
|
|
3064
|
-
const t = a, l = e, s =
|
|
3060
|
+
setup(a, { expose: n, emit: e }) {
|
|
3061
|
+
const t = a, l = e, s = Se(jt, null), c = Se(fn, null), r = Se(Nt, null), i = v(() => !s?.proxy || !r ? t.visible : typeof t.visible == "function" ? t.visible(r) : Ge(t.visible) ? Object.entries(t.visible).every(([H, K]) => Ve(r, H) === K) : t.visible), p = () => s?.proxy && r && t.name ? Ve(r, t.name) ?? t.modelValue : t.modelValue, d = D(p()), { editor: m } = ta(
|
|
3065
3062
|
t,
|
|
3066
3063
|
l,
|
|
3067
|
-
|
|
3064
|
+
i,
|
|
3068
3065
|
s,
|
|
3069
|
-
|
|
3070
|
-
), b =
|
|
3066
|
+
r
|
|
3067
|
+
), b = D(), _ = D(), y = v(
|
|
3071
3068
|
() => t.size || c?.size || "default"
|
|
3072
|
-
),
|
|
3069
|
+
), S = v(() => Object.assign(
|
|
3073
3070
|
{},
|
|
3074
3071
|
s?.props.tooltipMessage || {},
|
|
3075
3072
|
typeof t.tooltipMessage == "boolean" ? {} : t.tooltipMessage
|
|
3076
|
-
)),
|
|
3077
|
-
const
|
|
3073
|
+
)), w = (x = "") => t.error ? t.error : x.includes("is required") ? `${t.label || t.name}是必填项!` : x, M = v(() => {
|
|
3074
|
+
const x = s?.props.tooltipMessage ?? t.tooltipMessage;
|
|
3078
3075
|
return {
|
|
3079
|
-
[`is-tooltip-${t.tooltipPosition}`]: !!
|
|
3076
|
+
[`is-tooltip-${t.tooltipPosition}`]: !!x && !!t.tooltipPosition
|
|
3080
3077
|
};
|
|
3081
|
-
}), B =
|
|
3082
|
-
const
|
|
3078
|
+
}), B = v(() => {
|
|
3079
|
+
const x = s?.proxy;
|
|
3083
3080
|
return {
|
|
3084
|
-
width: t.width ? q(t.width) :
|
|
3081
|
+
width: t.width ? q(t.width) : x && x.inline && x.inlineColumns ? `${100 / x.inlineColumns}%` : null
|
|
3085
3082
|
};
|
|
3086
|
-
}),
|
|
3083
|
+
}), z = v(() => ({
|
|
3087
3084
|
right: typeof t.tooltipPosition == "number" ? `${t.tooltipPosition}px` : void 0
|
|
3088
|
-
})), P =
|
|
3085
|
+
})), P = v(() => ({
|
|
3089
3086
|
...m.value.props,
|
|
3090
|
-
modelValue:
|
|
3091
|
-
"onUpdate:modelValue": (
|
|
3092
|
-
|
|
3087
|
+
modelValue: d.value,
|
|
3088
|
+
"onUpdate:modelValue": (x) => {
|
|
3089
|
+
d.value = x;
|
|
3093
3090
|
}
|
|
3094
3091
|
}));
|
|
3095
|
-
return L(
|
|
3096
|
-
|
|
3092
|
+
return L(d, (x, H) => {
|
|
3093
|
+
i.value && !Ze(x, H) && (l("update:modelValue", x), s?.proxy && r && t.name && Ue(r, t.name, x));
|
|
3097
3094
|
}), L(
|
|
3098
|
-
() => !s?.proxy || !t.name || !
|
|
3099
|
-
(
|
|
3100
|
-
|
|
3095
|
+
() => !s?.proxy || !t.name || !r ? t.modelValue : Ve(r, t.name) ?? t.modelValue,
|
|
3096
|
+
(x) => {
|
|
3097
|
+
i.value && (d.value = x);
|
|
3101
3098
|
},
|
|
3102
3099
|
{
|
|
3103
3100
|
immediate: !0
|
|
3104
3101
|
}
|
|
3105
3102
|
), L(
|
|
3106
|
-
|
|
3107
|
-
(
|
|
3108
|
-
s?.proxy &&
|
|
3103
|
+
i,
|
|
3104
|
+
(x) => {
|
|
3105
|
+
s?.proxy && r && t.name && (x ? (d.value = p(), Ue(r, t.name, d.value)) : (d.value = void 0, Ue(r, t.name, void 0)));
|
|
3109
3106
|
},
|
|
3110
3107
|
{
|
|
3111
3108
|
immediate: !0
|
|
3112
3109
|
}
|
|
3113
|
-
),
|
|
3114
|
-
fieldValue:
|
|
3110
|
+
), n({
|
|
3111
|
+
fieldValue: d,
|
|
3115
3112
|
itemRef: b,
|
|
3116
|
-
editorRef:
|
|
3113
|
+
editorRef: _,
|
|
3117
3114
|
focus: () => {
|
|
3118
|
-
|
|
3115
|
+
_.value?.focus && _.value.focus();
|
|
3119
3116
|
},
|
|
3120
3117
|
blur: () => {
|
|
3121
|
-
|
|
3118
|
+
_.value?.foucs && _.value.blur();
|
|
3122
3119
|
}
|
|
3123
|
-
}), (
|
|
3120
|
+
}), (x, H) => i.value ? (u(), g(o(mn), F({
|
|
3124
3121
|
key: 0,
|
|
3125
|
-
class: ["x-field",
|
|
3122
|
+
class: ["x-field", M.value],
|
|
3126
3123
|
ref_key: "itemRef",
|
|
3127
3124
|
ref: b,
|
|
3128
3125
|
prop: t.name,
|
|
3129
|
-
label:
|
|
3130
|
-
size:
|
|
3126
|
+
label: x.label,
|
|
3127
|
+
size: y.value,
|
|
3131
3128
|
style: B.value
|
|
3132
|
-
},
|
|
3133
|
-
error:
|
|
3134
|
-
x
|
|
3135
|
-
|
|
3129
|
+
}, x.$attrs), ce({
|
|
3130
|
+
error: f(({ error: K }) => [
|
|
3131
|
+
C(x.$slots, "error", { error: K }, () => [
|
|
3132
|
+
o(s)?.props.tooltipMessage ?? t.tooltipMessage ? (u(), $("div", {
|
|
3136
3133
|
key: 0,
|
|
3137
3134
|
class: "x-field__info",
|
|
3138
|
-
style:
|
|
3135
|
+
style: fe(z.value)
|
|
3139
3136
|
}, [
|
|
3140
|
-
|
|
3141
|
-
content:
|
|
3142
|
-
},
|
|
3143
|
-
default:
|
|
3144
|
-
|
|
3137
|
+
k(o(ht), F({
|
|
3138
|
+
content: w(K)
|
|
3139
|
+
}, S.value), {
|
|
3140
|
+
default: f(() => [
|
|
3141
|
+
k(o(de), {
|
|
3145
3142
|
class: "x-field__trigger",
|
|
3146
|
-
icon:
|
|
3147
|
-
size:
|
|
3143
|
+
icon: o(Bn),
|
|
3144
|
+
size: y.value
|
|
3148
3145
|
}, null, 8, ["icon", "size"])
|
|
3149
3146
|
]),
|
|
3150
3147
|
_: 2
|
|
3151
3148
|
}, 1040, ["content"])
|
|
3152
|
-
], 4)) : (u(),
|
|
3149
|
+
], 4)) : (u(), $("div", na, A(w(K)), 1))
|
|
3153
3150
|
])
|
|
3154
3151
|
]),
|
|
3155
|
-
default:
|
|
3156
|
-
|
|
3157
|
-
class:
|
|
3152
|
+
default: f(() => [
|
|
3153
|
+
j("div", {
|
|
3154
|
+
class: J(["x-field__editor_wrap", { "is-inline": t.inline }])
|
|
3158
3155
|
}, [
|
|
3159
|
-
x
|
|
3160
|
-
|
|
3156
|
+
C(x.$slots, "editor", { editor: P.value }, () => [
|
|
3157
|
+
o(m).component ? (u(), g(Q(o(m).component), F({
|
|
3161
3158
|
key: 0,
|
|
3162
3159
|
class: "x-field__editor",
|
|
3163
3160
|
ref_key: "editorRef",
|
|
3164
|
-
ref:
|
|
3165
|
-
modelValue:
|
|
3166
|
-
"onUpdate:modelValue": H[0] || (H[0] = (K) =>
|
|
3167
|
-
},
|
|
3168
|
-
|
|
3161
|
+
ref: _,
|
|
3162
|
+
modelValue: d.value,
|
|
3163
|
+
"onUpdate:modelValue": H[0] || (H[0] = (K) => d.value = K)
|
|
3164
|
+
}, o(m).props), ce({ _: 2 }, [
|
|
3165
|
+
x.$slots.option ? {
|
|
3169
3166
|
name: "option",
|
|
3170
|
-
fn:
|
|
3171
|
-
x
|
|
3167
|
+
fn: f(({ option: K }) => [
|
|
3168
|
+
C(x.$slots, "option", { option: K })
|
|
3172
3169
|
]),
|
|
3173
3170
|
key: "0"
|
|
3174
3171
|
} : void 0
|
|
3175
|
-
]), 1040, ["modelValue"])) :
|
|
3172
|
+
]), 1040, ["modelValue"])) : h("", !0)
|
|
3176
3173
|
]),
|
|
3177
|
-
t.tip ||
|
|
3178
|
-
x
|
|
3174
|
+
t.tip || x.$slots.tip ? (u(), $("div", oa, [
|
|
3175
|
+
C(x.$slots, "tip", {}, () => [
|
|
3179
3176
|
R(A(t.tip), 1)
|
|
3180
3177
|
])
|
|
3181
|
-
])) :
|
|
3178
|
+
])) : h("", !0)
|
|
3182
3179
|
], 2),
|
|
3183
|
-
x
|
|
3180
|
+
C(x.$slots, "default")
|
|
3184
3181
|
]),
|
|
3185
3182
|
_: 2
|
|
3186
3183
|
}, [
|
|
3187
|
-
|
|
3184
|
+
x.$slots.label ? {
|
|
3188
3185
|
name: "label",
|
|
3189
|
-
fn:
|
|
3190
|
-
x
|
|
3186
|
+
fn: f(() => [
|
|
3187
|
+
C(x.$slots, "label")
|
|
3191
3188
|
]),
|
|
3192
3189
|
key: "0"
|
|
3193
3190
|
} : void 0
|
|
3194
|
-
]), 1040, ["prop", "label", "size", "class", "style"])) :
|
|
3191
|
+
]), 1040, ["prop", "label", "size", "class", "style"])) : h("", !0);
|
|
3195
3192
|
}
|
|
3196
|
-
}),
|
|
3193
|
+
}), sa = {
|
|
3197
3194
|
/**
|
|
3198
3195
|
* 表单模型
|
|
3199
3196
|
*/
|
|
@@ -3249,83 +3246,83 @@ const qn = {
|
|
|
3249
3246
|
type: [Object, Boolean],
|
|
3250
3247
|
default: void 0
|
|
3251
3248
|
}
|
|
3252
|
-
},
|
|
3249
|
+
}, jt = Symbol("formInstanceKey"), Nt = Symbol("formModelKey"), la = /* @__PURE__ */ V({
|
|
3253
3250
|
name: "XForm",
|
|
3254
3251
|
__name: "Form",
|
|
3255
|
-
props:
|
|
3252
|
+
props: sa,
|
|
3256
3253
|
emits: ["change", "submit", "reset"],
|
|
3257
|
-
setup(a, { expose:
|
|
3258
|
-
const t = a, l = e, s =
|
|
3259
|
-
|
|
3260
|
-
l("change",
|
|
3254
|
+
setup(a, { expose: n, emit: e }) {
|
|
3255
|
+
const t = a, l = e, s = pe(), c = D(), r = Oe(t.model || {}), i = D(!1);
|
|
3256
|
+
Ce(jt, s), Ce(Nt, r), L(r, () => {
|
|
3257
|
+
l("change", ye(r));
|
|
3261
3258
|
}), L(
|
|
3262
3259
|
() => t.model,
|
|
3263
3260
|
(m) => {
|
|
3264
|
-
Object.assign(
|
|
3261
|
+
Object.assign(r, m);
|
|
3265
3262
|
},
|
|
3266
3263
|
{ deep: !0 }
|
|
3267
3264
|
);
|
|
3268
3265
|
const p = async () => {
|
|
3269
|
-
await c.value.validate().catch(() => !1) && (l("submit",
|
|
3270
|
-
},
|
|
3266
|
+
await c.value.validate().catch(() => !1) && (l("submit", ye(r)), t.submitMethod && (i.value = !0, await t.submitMethod(ye(r)), i.value = !1));
|
|
3267
|
+
}, d = (m) => {
|
|
3271
3268
|
c.value.resetFields(m), l("reset");
|
|
3272
3269
|
};
|
|
3273
|
-
return
|
|
3270
|
+
return n({
|
|
3274
3271
|
formRef: c,
|
|
3275
|
-
model:
|
|
3272
|
+
model: r,
|
|
3276
3273
|
submit: p,
|
|
3277
|
-
reset:
|
|
3278
|
-
}), (m, b) => (u(), g(
|
|
3274
|
+
reset: d
|
|
3275
|
+
}), (m, b) => (u(), g(o(gn), F({
|
|
3279
3276
|
ref_key: "formRef",
|
|
3280
3277
|
ref: c,
|
|
3281
3278
|
class: "x-form",
|
|
3282
3279
|
inline: t.inline,
|
|
3283
|
-
model:
|
|
3284
|
-
onKeyup:
|
|
3280
|
+
model: r,
|
|
3281
|
+
onKeyup: Lt(p, ["enter"]),
|
|
3285
3282
|
onSubmit: b[1] || (b[1] = vt(() => {
|
|
3286
3283
|
}, ["stop", "prevent"]))
|
|
3287
3284
|
}, m.$attrs), {
|
|
3288
|
-
default:
|
|
3289
|
-
|
|
3290
|
-
t.footer ? (u(), g(
|
|
3285
|
+
default: f(() => [
|
|
3286
|
+
C(m.$slots, "default"),
|
|
3287
|
+
t.footer ? (u(), g(o(aa), {
|
|
3291
3288
|
key: 0,
|
|
3292
3289
|
editor: "none",
|
|
3293
3290
|
class: "x-form__footer",
|
|
3294
3291
|
label: " "
|
|
3295
3292
|
}, {
|
|
3296
|
-
editor:
|
|
3297
|
-
|
|
3298
|
-
t.submitText ? (u(), g(
|
|
3293
|
+
editor: f(() => [
|
|
3294
|
+
C(m.$slots, "footer", {}, () => [
|
|
3295
|
+
t.submitText ? (u(), g(o(ie), {
|
|
3299
3296
|
key: 0,
|
|
3300
|
-
loading:
|
|
3297
|
+
loading: i.value,
|
|
3301
3298
|
type: "primary",
|
|
3302
3299
|
onClick: p
|
|
3303
3300
|
}, {
|
|
3304
|
-
default:
|
|
3301
|
+
default: f(() => [
|
|
3305
3302
|
R(A(t.submitText), 1)
|
|
3306
3303
|
]),
|
|
3307
3304
|
_: 1
|
|
3308
|
-
}, 8, ["loading"])) :
|
|
3309
|
-
t.resetText ? (u(), g(
|
|
3305
|
+
}, 8, ["loading"])) : h("", !0),
|
|
3306
|
+
t.resetText ? (u(), g(o(ie), {
|
|
3310
3307
|
key: 1,
|
|
3311
3308
|
type: "default",
|
|
3312
|
-
onClick: b[0] || (b[0] = () =>
|
|
3309
|
+
onClick: b[0] || (b[0] = () => d())
|
|
3313
3310
|
}, {
|
|
3314
|
-
default:
|
|
3311
|
+
default: f(() => [
|
|
3315
3312
|
R(A(t.resetText), 1)
|
|
3316
3313
|
]),
|
|
3317
3314
|
_: 1
|
|
3318
|
-
})) :
|
|
3319
|
-
|
|
3315
|
+
})) : h("", !0),
|
|
3316
|
+
C(m.$slots, "action")
|
|
3320
3317
|
])
|
|
3321
3318
|
]),
|
|
3322
3319
|
_: 3
|
|
3323
|
-
})) :
|
|
3320
|
+
})) : h("", !0)
|
|
3324
3321
|
]),
|
|
3325
3322
|
_: 3
|
|
3326
3323
|
}, 16, ["inline", "model"]));
|
|
3327
3324
|
}
|
|
3328
|
-
}),
|
|
3325
|
+
}), ia = {
|
|
3329
3326
|
modelValue: {
|
|
3330
3327
|
type: Boolean,
|
|
3331
3328
|
default: !0
|
|
@@ -3362,28 +3359,28 @@ const qn = {
|
|
|
3362
3359
|
submitMethod: {
|
|
3363
3360
|
type: Function
|
|
3364
3361
|
}
|
|
3365
|
-
},
|
|
3362
|
+
}, La = /* @__PURE__ */ V({
|
|
3366
3363
|
name: "XDialogForm",
|
|
3367
3364
|
__name: "DialogForm",
|
|
3368
|
-
props:
|
|
3365
|
+
props: ia,
|
|
3369
3366
|
emits: ["update:modelValue", "submit", "close"],
|
|
3370
|
-
setup(a, { expose:
|
|
3371
|
-
const t = a, l = e, s =
|
|
3367
|
+
setup(a, { expose: n, emit: e }) {
|
|
3368
|
+
const t = a, l = e, s = D(), c = D(), r = v(() => c.value?.$vtjEl), i = () => {
|
|
3372
3369
|
s.value?.submit();
|
|
3373
3370
|
}, p = () => {
|
|
3374
3371
|
l("update:modelValue", !1), l("close");
|
|
3375
|
-
},
|
|
3376
|
-
l("submit",
|
|
3377
|
-
}, m =
|
|
3372
|
+
}, d = async (_) => {
|
|
3373
|
+
l("submit", _), t.submitMethod ? await t.submitMethod(_) && p() : p();
|
|
3374
|
+
}, m = v(
|
|
3378
3375
|
() => t.formProps?.disabled ? !1 : t.submit
|
|
3379
|
-
), b =
|
|
3376
|
+
), b = v(
|
|
3380
3377
|
() => t.formProps?.disabled ? !1 : t.cancel
|
|
3381
3378
|
);
|
|
3382
|
-
return
|
|
3383
|
-
$vtjEl:
|
|
3379
|
+
return n({
|
|
3380
|
+
$vtjEl: r,
|
|
3384
3381
|
formRef: s,
|
|
3385
3382
|
dialogRef: c
|
|
3386
|
-
}), (
|
|
3383
|
+
}), (_, y) => (u(), g(o(At), F({
|
|
3387
3384
|
ref_key: "dialogRef",
|
|
3388
3385
|
ref: c,
|
|
3389
3386
|
class: "x-dialog-form",
|
|
@@ -3391,13 +3388,13 @@ const qn = {
|
|
|
3391
3388
|
submit: m.value,
|
|
3392
3389
|
cancel: b.value,
|
|
3393
3390
|
size: t.size,
|
|
3394
|
-
onSubmit:
|
|
3391
|
+
onSubmit: i,
|
|
3395
3392
|
onClose: p,
|
|
3396
3393
|
minimizable: !1,
|
|
3397
3394
|
maximizable: !1
|
|
3398
|
-
},
|
|
3399
|
-
default:
|
|
3400
|
-
|
|
3395
|
+
}, _.$attrs), ce({
|
|
3396
|
+
default: f(() => [
|
|
3397
|
+
k(o(la), F({
|
|
3401
3398
|
ref_key: "formRef",
|
|
3402
3399
|
ref: s,
|
|
3403
3400
|
class: "x-dialog-form__form",
|
|
@@ -3406,40 +3403,40 @@ const qn = {
|
|
|
3406
3403
|
size: t.size,
|
|
3407
3404
|
model: t.model,
|
|
3408
3405
|
rules: t.rules,
|
|
3409
|
-
"submit-method":
|
|
3406
|
+
"submit-method": d
|
|
3410
3407
|
}, t.formProps), {
|
|
3411
|
-
default:
|
|
3412
|
-
|
|
3408
|
+
default: f(() => [
|
|
3409
|
+
C(_.$slots, "default")
|
|
3413
3410
|
]),
|
|
3414
3411
|
_: 3
|
|
3415
3412
|
}, 16, ["size", "model", "rules"])
|
|
3416
3413
|
]),
|
|
3417
3414
|
_: 2
|
|
3418
3415
|
}, [
|
|
3419
|
-
|
|
3416
|
+
_.$slots.extra ? {
|
|
3420
3417
|
name: "extra",
|
|
3421
|
-
fn:
|
|
3422
|
-
|
|
3418
|
+
fn: f(() => [
|
|
3419
|
+
C(_.$slots, "extra")
|
|
3423
3420
|
]),
|
|
3424
3421
|
key: "0"
|
|
3425
3422
|
} : void 0,
|
|
3426
|
-
|
|
3423
|
+
_.$slots.handle ? {
|
|
3427
3424
|
name: "handle",
|
|
3428
|
-
fn:
|
|
3429
|
-
|
|
3425
|
+
fn: f(() => [
|
|
3426
|
+
C(_.$slots, "handle")
|
|
3430
3427
|
]),
|
|
3431
3428
|
key: "1"
|
|
3432
3429
|
} : void 0,
|
|
3433
|
-
|
|
3430
|
+
_.$slots.footer ? {
|
|
3434
3431
|
name: "footer",
|
|
3435
|
-
fn:
|
|
3436
|
-
|
|
3432
|
+
fn: f(() => [
|
|
3433
|
+
C(_.$slots, "footer")
|
|
3437
3434
|
]),
|
|
3438
3435
|
key: "2"
|
|
3439
3436
|
} : void 0
|
|
3440
3437
|
]), 1040, ["model-value", "submit", "cancel", "size"]));
|
|
3441
3438
|
}
|
|
3442
|
-
}),
|
|
3439
|
+
}), ra = {
|
|
3443
3440
|
items: {
|
|
3444
3441
|
type: Array,
|
|
3445
3442
|
default() {
|
|
@@ -3449,42 +3446,63 @@ const qn = {
|
|
|
3449
3446
|
border: {
|
|
3450
3447
|
type: Boolean
|
|
3451
3448
|
}
|
|
3452
|
-
},
|
|
3449
|
+
}, ua = { class: "x-tabs__label-inner" }, ca = {
|
|
3450
|
+
key: 0,
|
|
3451
|
+
class: "x-tabs__actions"
|
|
3452
|
+
}, Wa = /* @__PURE__ */ V({
|
|
3453
3453
|
name: "XTabs",
|
|
3454
3454
|
__name: "Tabs",
|
|
3455
|
-
props:
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3455
|
+
props: ra,
|
|
3456
|
+
emits: ["actionClick", "actionCommand"],
|
|
3457
|
+
setup(a, { emit: n }) {
|
|
3458
|
+
const e = a, t = n, l = (i) => {
|
|
3459
|
+
const { label: p, name: d, value: m, disabled: b, closable: _, lazy: y } = i;
|
|
3459
3460
|
return {
|
|
3460
|
-
label:
|
|
3461
|
-
name:
|
|
3462
|
-
disabled:
|
|
3463
|
-
closable:
|
|
3464
|
-
lazy:
|
|
3461
|
+
label: p,
|
|
3462
|
+
name: m ?? d,
|
|
3463
|
+
disabled: b,
|
|
3464
|
+
closable: _,
|
|
3465
|
+
lazy: y
|
|
3465
3466
|
};
|
|
3466
|
-
},
|
|
3467
|
-
"is-no-border": !
|
|
3468
|
-
}))
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3467
|
+
}, s = v(() => ({
|
|
3468
|
+
"is-no-border": !e.border
|
|
3469
|
+
})), c = (i) => {
|
|
3470
|
+
t("actionClick", i);
|
|
3471
|
+
}, r = (i) => {
|
|
3472
|
+
t("actionCommand", i);
|
|
3473
|
+
};
|
|
3474
|
+
return (i, p) => (u(), g(o(_t), F({
|
|
3475
|
+
class: ["x-tabs", s.value]
|
|
3476
|
+
}, i.$attrs), {
|
|
3477
|
+
default: f(() => [
|
|
3478
|
+
(u(!0), $(W, null, Y(e.items, (d) => (u(), g(o(Ke), F({
|
|
3479
|
+
key: d.value ?? d.name
|
|
3480
|
+
}, l(d)), {
|
|
3481
|
+
label: f(() => [
|
|
3482
|
+
C(i.$slots, "label", le(be(d)), () => [
|
|
3483
|
+
d.icon ? (u(), g(Q(o(ke)(d.icon)), {
|
|
3479
3484
|
key: 0,
|
|
3480
3485
|
class: "x-tabs__icon"
|
|
3481
|
-
})) :
|
|
3482
|
-
|
|
3486
|
+
})) : h("", !0),
|
|
3487
|
+
j("div", ua, [
|
|
3488
|
+
R(A(d.label) + " ", 1),
|
|
3489
|
+
d.actions && [d.name, d.value].includes(i.$attrs.modelValue) ? (u(), $("div", ca, [
|
|
3490
|
+
(u(!0), $(W, null, Y(d.actions, (m) => (u(), g(o(te), F({
|
|
3491
|
+
mode: "icon",
|
|
3492
|
+
type: "primary",
|
|
3493
|
+
size: "small",
|
|
3494
|
+
circle: ""
|
|
3495
|
+
}, m, {
|
|
3496
|
+
onClick: c,
|
|
3497
|
+
onCommand: r
|
|
3498
|
+
}), null, 16))), 256))
|
|
3499
|
+
])) : h("", !0)
|
|
3500
|
+
])
|
|
3483
3501
|
])
|
|
3484
3502
|
]),
|
|
3485
|
-
default:
|
|
3486
|
-
|
|
3487
|
-
|
|
3503
|
+
default: f(() => [
|
|
3504
|
+
C(i.$slots, "default", le(be(d)), () => [
|
|
3505
|
+
d.component ? (u(), g(Q(d.component), le(F({ key: 0 }, d.props)), null, 16)) : h("", !0)
|
|
3488
3506
|
])
|
|
3489
3507
|
]),
|
|
3490
3508
|
_: 2
|
|
@@ -3493,7 +3511,7 @@ const qn = {
|
|
|
3493
3511
|
_: 3
|
|
3494
3512
|
}, 16, ["class"]));
|
|
3495
3513
|
}
|
|
3496
|
-
}),
|
|
3514
|
+
}), da = {
|
|
3497
3515
|
direction: {
|
|
3498
3516
|
type: String,
|
|
3499
3517
|
default: "column"
|
|
@@ -3531,103 +3549,103 @@ const qn = {
|
|
|
3531
3549
|
onTitleClick: {
|
|
3532
3550
|
type: Function
|
|
3533
3551
|
}
|
|
3534
|
-
},
|
|
3552
|
+
}, pa = { class: "x-data-item__title" }, fa = {
|
|
3535
3553
|
key: 1,
|
|
3536
3554
|
class: "x-data-item__section x-data-item__desc"
|
|
3537
|
-
},
|
|
3555
|
+
}, ma = {
|
|
3538
3556
|
key: 2,
|
|
3539
3557
|
class: "x-data-item__section x-data-item__extra"
|
|
3540
|
-
},
|
|
3558
|
+
}, ga = {
|
|
3541
3559
|
key: 3,
|
|
3542
3560
|
class: "x-data-item__section x-data-item__actions"
|
|
3543
|
-
},
|
|
3561
|
+
}, Ja = /* @__PURE__ */ V({
|
|
3544
3562
|
name: "XDataItem",
|
|
3545
3563
|
__name: "DataItem",
|
|
3546
|
-
props:
|
|
3564
|
+
props: da,
|
|
3547
3565
|
emits: ["imageClick", "titleClick", "actionClick", "actionCommand"],
|
|
3548
|
-
setup(a, { emit:
|
|
3549
|
-
const e = a, t =
|
|
3566
|
+
setup(a, { emit: n }) {
|
|
3567
|
+
const e = a, t = n, l = v(() => {
|
|
3550
3568
|
const { imageWidth: m, imageHeight: b } = e;
|
|
3551
3569
|
return {
|
|
3552
3570
|
width: m ? q(m) : void 0,
|
|
3553
3571
|
height: b ? q(b) : void 0
|
|
3554
3572
|
};
|
|
3555
|
-
}), s =
|
|
3573
|
+
}), s = v(() => ({
|
|
3556
3574
|
[`is-image-${e.direction}`]: !!e.direction,
|
|
3557
3575
|
"is-split": !!e.split
|
|
3558
|
-
})), c =
|
|
3576
|
+
})), c = v(() => ({
|
|
3559
3577
|
size: "small",
|
|
3560
3578
|
mode: "text",
|
|
3561
3579
|
justify: "flex-end",
|
|
3562
3580
|
type: "info",
|
|
3563
3581
|
items: e.actions,
|
|
3564
3582
|
...e.actionBarProps
|
|
3565
|
-
})),
|
|
3566
|
-
return (m, b) => (u(), g(
|
|
3567
|
-
class:
|
|
3583
|
+
})), r = () => t("imageClick"), i = () => t("titleClick"), p = (m) => t("actionClick", m), d = (m, b) => t("actionCommand", m, b);
|
|
3584
|
+
return (m, b) => (u(), g(o(I), {
|
|
3585
|
+
class: J(["x-data-item", s.value]),
|
|
3568
3586
|
direction: e.direction
|
|
3569
3587
|
}, {
|
|
3570
|
-
default:
|
|
3571
|
-
e.imageSrc || m.$slots.image ? (u(), g(
|
|
3588
|
+
default: f(() => [
|
|
3589
|
+
e.imageSrc || m.$slots.image ? (u(), g(o(I), {
|
|
3572
3590
|
key: 0,
|
|
3573
3591
|
class: "x-data-item__img",
|
|
3574
3592
|
autoPointer: !0,
|
|
3575
|
-
onClick: e.onImageClick ?
|
|
3593
|
+
onClick: e.onImageClick ? r : void 0
|
|
3576
3594
|
}, {
|
|
3577
|
-
default:
|
|
3578
|
-
|
|
3579
|
-
e.imageSrc ? (u(), g(
|
|
3595
|
+
default: f(() => [
|
|
3596
|
+
C(m.$slots, "image", {}, () => [
|
|
3597
|
+
e.imageSrc ? (u(), g(o(yn), {
|
|
3580
3598
|
key: 0,
|
|
3581
|
-
style:
|
|
3599
|
+
style: fe(l.value),
|
|
3582
3600
|
src: e.imageSrc
|
|
3583
|
-
}, null, 8, ["style", "src"])) :
|
|
3601
|
+
}, null, 8, ["style", "src"])) : h("", !0)
|
|
3584
3602
|
])
|
|
3585
3603
|
]),
|
|
3586
3604
|
_: 3
|
|
3587
|
-
}, 8, ["onClick"])) :
|
|
3588
|
-
|
|
3605
|
+
}, 8, ["onClick"])) : h("", !0),
|
|
3606
|
+
k(o(I), {
|
|
3589
3607
|
class: "x-data-item__content",
|
|
3590
3608
|
direction: "column",
|
|
3591
3609
|
grow: "",
|
|
3592
3610
|
shrink: ""
|
|
3593
3611
|
}, {
|
|
3594
|
-
default:
|
|
3595
|
-
e.title || m.$slots.title ? (u(), g(
|
|
3612
|
+
default: f(() => [
|
|
3613
|
+
e.title || m.$slots.title ? (u(), g(o(I), {
|
|
3596
3614
|
key: 0,
|
|
3597
3615
|
class: "x-data-item__section x-data-item__wrapper",
|
|
3598
3616
|
align: "center",
|
|
3599
3617
|
autoPointer: !0,
|
|
3600
|
-
onClick: e.onTitleClick ?
|
|
3618
|
+
onClick: e.onTitleClick ? i : void 0
|
|
3601
3619
|
}, {
|
|
3602
|
-
default:
|
|
3603
|
-
e.icon ? (u(), g(
|
|
3620
|
+
default: f(() => [
|
|
3621
|
+
e.icon ? (u(), g(Q(o(ke)(e.icon)), {
|
|
3604
3622
|
key: 0,
|
|
3605
3623
|
class: "x-data-item__icon"
|
|
3606
|
-
})) :
|
|
3607
|
-
|
|
3608
|
-
|
|
3624
|
+
})) : h("", !0),
|
|
3625
|
+
j("span", pa, [
|
|
3626
|
+
C(m.$slots, "title", {}, () => [
|
|
3609
3627
|
R(A(e.title), 1)
|
|
3610
3628
|
])
|
|
3611
3629
|
])
|
|
3612
3630
|
]),
|
|
3613
3631
|
_: 3
|
|
3614
|
-
}, 8, ["onClick"])) :
|
|
3615
|
-
e.description || m.$slots.description ? (u(),
|
|
3616
|
-
|
|
3632
|
+
}, 8, ["onClick"])) : h("", !0),
|
|
3633
|
+
e.description || m.$slots.description ? (u(), $("div", fa, [
|
|
3634
|
+
C(m.$slots, "description", {}, () => [
|
|
3617
3635
|
R(A(e.description), 1)
|
|
3618
3636
|
])
|
|
3619
|
-
])) :
|
|
3620
|
-
m.$slots.default ? (u(),
|
|
3621
|
-
|
|
3622
|
-
])) :
|
|
3623
|
-
e.actions || e.actionBarProps || m.$slots.actions ? (u(),
|
|
3624
|
-
|
|
3625
|
-
|
|
3637
|
+
])) : h("", !0),
|
|
3638
|
+
m.$slots.default ? (u(), $("div", ma, [
|
|
3639
|
+
C(m.$slots, "default")
|
|
3640
|
+
])) : h("", !0),
|
|
3641
|
+
e.actions || e.actionBarProps || m.$slots.actions ? (u(), $("div", ga, [
|
|
3642
|
+
C(m.$slots, "actions", {}, () => [
|
|
3643
|
+
k(o(et), F(c.value, {
|
|
3626
3644
|
onClick: p,
|
|
3627
|
-
onCommand:
|
|
3645
|
+
onCommand: d
|
|
3628
3646
|
}), null, 16)
|
|
3629
3647
|
])
|
|
3630
|
-
])) :
|
|
3648
|
+
])) : h("", !0)
|
|
3631
3649
|
]),
|
|
3632
3650
|
_: 3
|
|
3633
3651
|
})
|
|
@@ -3635,7 +3653,7 @@ const qn = {
|
|
|
3635
3653
|
_: 3
|
|
3636
3654
|
}, 8, ["direction", "class"]));
|
|
3637
3655
|
}
|
|
3638
|
-
}),
|
|
3656
|
+
}), ya = {
|
|
3639
3657
|
option: {
|
|
3640
3658
|
type: Object
|
|
3641
3659
|
},
|
|
@@ -3648,26 +3666,26 @@ const qn = {
|
|
|
3648
3666
|
default: "400px"
|
|
3649
3667
|
}
|
|
3650
3668
|
};
|
|
3651
|
-
function
|
|
3669
|
+
function va() {
|
|
3652
3670
|
return import("echarts");
|
|
3653
3671
|
}
|
|
3654
|
-
function
|
|
3655
|
-
const e =
|
|
3672
|
+
function ha(a, n) {
|
|
3673
|
+
const e = D(), t = Pe();
|
|
3656
3674
|
return mt(async () => {
|
|
3657
|
-
t.value = await
|
|
3658
|
-
const l =
|
|
3659
|
-
l && (e.value || (e.value =
|
|
3675
|
+
t.value = await va();
|
|
3676
|
+
const l = o(a);
|
|
3677
|
+
l && (e.value || (e.value = we(t.value.init(l))), e.value && e.value.setOption(n.option || {}));
|
|
3660
3678
|
}), gt(() => {
|
|
3661
3679
|
e.value && e.value.dispose();
|
|
3662
3680
|
}), L(
|
|
3663
|
-
() =>
|
|
3681
|
+
() => n.option,
|
|
3664
3682
|
(l) => {
|
|
3665
3683
|
e.value && e.value.setOption(l || {});
|
|
3666
3684
|
},
|
|
3667
3685
|
{ deep: !0 }
|
|
3668
|
-
),
|
|
3686
|
+
), Rn(
|
|
3669
3687
|
a,
|
|
3670
|
-
|
|
3688
|
+
Xn(() => {
|
|
3671
3689
|
e.value && e.value.resize();
|
|
3672
3690
|
}, 150)
|
|
3673
3691
|
), {
|
|
@@ -3675,26 +3693,26 @@ function fa(a, o) {
|
|
|
3675
3693
|
echarts: t
|
|
3676
3694
|
};
|
|
3677
3695
|
}
|
|
3678
|
-
const
|
|
3696
|
+
const Qa = /* @__PURE__ */ V({
|
|
3679
3697
|
name: "XChart",
|
|
3680
3698
|
__name: "Chart",
|
|
3681
|
-
props:
|
|
3682
|
-
setup(a, { expose:
|
|
3683
|
-
const e = a, t =
|
|
3699
|
+
props: ya,
|
|
3700
|
+
setup(a, { expose: n }) {
|
|
3701
|
+
const e = a, t = D(), { echartsInstance: l, echarts: s } = ha(t, e), c = v(() => ({
|
|
3684
3702
|
width: q(e.width),
|
|
3685
3703
|
height: q(e.height)
|
|
3686
3704
|
}));
|
|
3687
|
-
return
|
|
3705
|
+
return n({
|
|
3688
3706
|
chartRef: t,
|
|
3689
3707
|
echartsInstance: l,
|
|
3690
3708
|
echarts: s
|
|
3691
|
-
}), (
|
|
3709
|
+
}), (r, i) => (u(), $("div", {
|
|
3692
3710
|
ref_key: "chartRef",
|
|
3693
3711
|
ref: t,
|
|
3694
|
-
style:
|
|
3712
|
+
style: fe(c.value)
|
|
3695
3713
|
}, null, 4));
|
|
3696
3714
|
}
|
|
3697
|
-
}),
|
|
3715
|
+
}), ba = {
|
|
3698
3716
|
data: {
|
|
3699
3717
|
type: [Object, Function],
|
|
3700
3718
|
default() {
|
|
@@ -3732,143 +3750,143 @@ const Ua = /* @__PURE__ */ V({
|
|
|
3732
3750
|
infiniteScroll: {
|
|
3733
3751
|
type: [Boolean, Object]
|
|
3734
3752
|
}
|
|
3735
|
-
},
|
|
3753
|
+
}, _a = {
|
|
3736
3754
|
key: 0,
|
|
3737
3755
|
class: "x-list__loading"
|
|
3738
|
-
},
|
|
3756
|
+
}, ka = {
|
|
3739
3757
|
key: 1,
|
|
3740
3758
|
class: "x-list__nomore"
|
|
3741
|
-
},
|
|
3759
|
+
}, wa = {
|
|
3742
3760
|
key: 0,
|
|
3743
3761
|
class: "x-list__loading"
|
|
3744
|
-
},
|
|
3762
|
+
}, xa = {
|
|
3745
3763
|
key: 1,
|
|
3746
3764
|
class: "x-list__nomore"
|
|
3747
|
-
},
|
|
3765
|
+
}, Sa = {
|
|
3748
3766
|
key: 1,
|
|
3749
3767
|
class: "x-list__pager"
|
|
3750
|
-
},
|
|
3768
|
+
}, Za = /* @__PURE__ */ V({
|
|
3751
3769
|
name: "XList",
|
|
3752
3770
|
__name: "List",
|
|
3753
|
-
props:
|
|
3771
|
+
props: ba,
|
|
3754
3772
|
emits: ["load"],
|
|
3755
|
-
setup(a, { expose:
|
|
3756
|
-
const t = a, l = e, s =
|
|
3773
|
+
setup(a, { expose: n, emit: e }) {
|
|
3774
|
+
const t = a, l = e, s = Oe({
|
|
3757
3775
|
page: t.page,
|
|
3758
3776
|
pageSize: t.pageSize
|
|
3759
3777
|
});
|
|
3760
3778
|
Je(() => {
|
|
3761
|
-
const { page: T, pageSize:
|
|
3762
|
-
Object.assign(s, { page: T, pageSize:
|
|
3779
|
+
const { page: T, pageSize: N } = t;
|
|
3780
|
+
Object.assign(s, { page: T, pageSize: N });
|
|
3763
3781
|
});
|
|
3764
|
-
const { data: c, loading:
|
|
3782
|
+
const { data: c, loading: r } = lo(
|
|
3765
3783
|
t.data,
|
|
3766
3784
|
{
|
|
3767
3785
|
list: [],
|
|
3768
3786
|
total: 0
|
|
3769
3787
|
},
|
|
3770
3788
|
s
|
|
3771
|
-
),
|
|
3789
|
+
), i = v(() => Math.ceil((c.value.total || 0) / s.pageSize)), p = D(!1), d = D(), m = v(() => ({
|
|
3772
3790
|
width: q(t.width),
|
|
3773
3791
|
height: q(t.height)
|
|
3774
|
-
})), b =
|
|
3792
|
+
})), b = v(() => ({
|
|
3775
3793
|
"is-virtual": !!t.itemHeight
|
|
3776
|
-
})),
|
|
3794
|
+
})), _ = v(() => {
|
|
3777
3795
|
const T = {};
|
|
3778
|
-
for (let [
|
|
3796
|
+
for (let [N, x] of Object.entries(
|
|
3779
3797
|
it(t.infiniteScroll)
|
|
3780
3798
|
))
|
|
3781
|
-
T[`infinite-scroll-${
|
|
3782
|
-
return (
|
|
3783
|
-
}),
|
|
3784
|
-
|
|
3799
|
+
T[`infinite-scroll-${N}`] = x;
|
|
3800
|
+
return (r.value || p.value) && (T["infinite-scroll-disabled"] = !0), T;
|
|
3801
|
+
}), y = v(() => it(t.pager, {})), { list: S, containerProps: w, wrapperProps: M, scrollTo: B } = Fn(
|
|
3802
|
+
v(() => c.value.list),
|
|
3785
3803
|
{
|
|
3786
3804
|
itemHeight: t.itemHeight || 0
|
|
3787
3805
|
}
|
|
3788
|
-
),
|
|
3789
|
-
!t.infiniteScroll || p.value || (s.page <
|
|
3806
|
+
), z = () => {
|
|
3807
|
+
!t.infiniteScroll || p.value || (s.page < i.value ? (++s.page, l("load", s)) : p.value = !0);
|
|
3790
3808
|
}, P = (T) => t.dataKey ? T[t.dataKey] : void 0;
|
|
3791
|
-
return
|
|
3792
|
-
list:
|
|
3809
|
+
return n({
|
|
3810
|
+
list: S,
|
|
3793
3811
|
scrollTo: B,
|
|
3794
|
-
wrapperRef:
|
|
3795
|
-
loading:
|
|
3812
|
+
wrapperRef: d,
|
|
3813
|
+
loading: r,
|
|
3796
3814
|
state: s,
|
|
3797
|
-
pageCount:
|
|
3815
|
+
pageCount: i,
|
|
3798
3816
|
nomore: p,
|
|
3799
3817
|
data: c,
|
|
3800
3818
|
getKey: P
|
|
3801
|
-
}), (T,
|
|
3802
|
-
class:
|
|
3803
|
-
style:
|
|
3819
|
+
}), (T, N) => (u(), $("div", {
|
|
3820
|
+
class: J(["x-list", b.value]),
|
|
3821
|
+
style: fe(m.value)
|
|
3804
3822
|
}, [
|
|
3805
|
-
!
|
|
3806
|
-
|
|
3807
|
-
]) :
|
|
3808
|
-
|
|
3809
|
-
t.itemHeight ? G((u(),
|
|
3823
|
+
!o(c).total && !o(r) ? C(T.$slots, "empty", { key: 0 }, () => [
|
|
3824
|
+
k(o(bt))
|
|
3825
|
+
]) : h("", !0),
|
|
3826
|
+
j("div", F({ class: "x-list__content" }, o(w)), [
|
|
3827
|
+
t.itemHeight ? G((u(), $("div", F({
|
|
3810
3828
|
key: 0,
|
|
3811
3829
|
class: "x-list__wrapper",
|
|
3812
3830
|
ref_key: "wrapperRef",
|
|
3813
|
-
ref:
|
|
3814
|
-
}, { ...
|
|
3815
|
-
(u(!0),
|
|
3816
|
-
key: P(
|
|
3817
|
-
}, { item:
|
|
3818
|
-
|
|
3831
|
+
ref: d
|
|
3832
|
+
}, { ...o(M), ..._.value }), [
|
|
3833
|
+
(u(!0), $(W, null, Y(o(S), (x, H) => C(T.$slots, "default", le(F({
|
|
3834
|
+
key: P(x.data)
|
|
3835
|
+
}, { item: x.data, index: H })), () => [
|
|
3836
|
+
j("div", null, A(x), 1)
|
|
3819
3837
|
])), 128)),
|
|
3820
|
-
|
|
3821
|
-
|
|
3838
|
+
o(r) ? (u(), $("div", _a, [
|
|
3839
|
+
C(T.$slots, "loading", {}, () => [
|
|
3822
3840
|
R(" 正在加载数据... ")
|
|
3823
3841
|
])
|
|
3824
|
-
])) :
|
|
3825
|
-
p.value ? (u(),
|
|
3826
|
-
|
|
3842
|
+
])) : h("", !0),
|
|
3843
|
+
p.value ? (u(), $("div", ka, [
|
|
3844
|
+
C(T.$slots, "nomore", {}, () => [
|
|
3827
3845
|
R(" 没有更多数据 ")
|
|
3828
3846
|
])
|
|
3829
|
-
])) :
|
|
3847
|
+
])) : h("", !0)
|
|
3830
3848
|
], 16)), [
|
|
3831
|
-
[
|
|
3832
|
-
]) : G((u(),
|
|
3849
|
+
[o(at), z]
|
|
3850
|
+
]) : G((u(), $("div", F({
|
|
3833
3851
|
key: 1,
|
|
3834
3852
|
class: "x-list__wrapper"
|
|
3835
|
-
},
|
|
3836
|
-
(u(!0),
|
|
3837
|
-
key: P(
|
|
3838
|
-
}, { item:
|
|
3839
|
-
|
|
3853
|
+
}, _.value), [
|
|
3854
|
+
(u(!0), $(W, null, Y(o(c).list, (x, H) => C(T.$slots, "default", le(F({
|
|
3855
|
+
key: P(x)
|
|
3856
|
+
}, { item: x, index: H })), () => [
|
|
3857
|
+
j("div", null, A(x), 1)
|
|
3840
3858
|
])), 128)),
|
|
3841
|
-
|
|
3842
|
-
|
|
3859
|
+
o(r) ? (u(), $("div", wa, [
|
|
3860
|
+
C(T.$slots, "loading", {}, () => [
|
|
3843
3861
|
R(" 正在加载数据... ")
|
|
3844
3862
|
])
|
|
3845
|
-
])) :
|
|
3846
|
-
p.value ? (u(),
|
|
3847
|
-
|
|
3863
|
+
])) : h("", !0),
|
|
3864
|
+
p.value ? (u(), $("div", xa, [
|
|
3865
|
+
C(T.$slots, "nomore", {}, () => [
|
|
3848
3866
|
R(" 没有更多数据 ")
|
|
3849
3867
|
])
|
|
3850
|
-
])) :
|
|
3868
|
+
])) : h("", !0)
|
|
3851
3869
|
], 16)), [
|
|
3852
|
-
[
|
|
3870
|
+
[o(at), z]
|
|
3853
3871
|
])
|
|
3854
3872
|
], 16),
|
|
3855
|
-
t.pager ? (u(),
|
|
3856
|
-
|
|
3873
|
+
t.pager ? (u(), $("div", Sa, [
|
|
3874
|
+
k(o(vn), F({
|
|
3857
3875
|
small: "",
|
|
3858
3876
|
background: "",
|
|
3859
3877
|
layout: "prev, pager, next",
|
|
3860
|
-
total:
|
|
3878
|
+
total: o(c).total,
|
|
3861
3879
|
"default-page-size": t.pageSize,
|
|
3862
3880
|
"default-current-page": t.page,
|
|
3863
3881
|
"current-page": s.page,
|
|
3864
|
-
"onUpdate:currentPage":
|
|
3882
|
+
"onUpdate:currentPage": N[0] || (N[0] = (x) => s.page = x),
|
|
3865
3883
|
"page-size": s.pageSize,
|
|
3866
|
-
"onUpdate:pageSize":
|
|
3867
|
-
},
|
|
3868
|
-
])) :
|
|
3884
|
+
"onUpdate:pageSize": N[1] || (N[1] = (x) => s.pageSize = x)
|
|
3885
|
+
}, y.value), null, 16, ["total", "default-page-size", "default-current-page", "current-page", "page-size"])
|
|
3886
|
+
])) : h("", !0)
|
|
3869
3887
|
], 6));
|
|
3870
3888
|
}
|
|
3871
|
-
}),
|
|
3889
|
+
}), Ca = {
|
|
3872
3890
|
name: {
|
|
3873
3891
|
type: String,
|
|
3874
3892
|
default: "VTJ.PRO"
|
|
@@ -3885,32 +3903,32 @@ const Ua = /* @__PURE__ */ V({
|
|
|
3885
3903
|
type: String,
|
|
3886
3904
|
default: "/@vtj/pro/"
|
|
3887
3905
|
}
|
|
3888
|
-
},
|
|
3906
|
+
}, za = { class: "x-startup" }, $a = { class: "x-startup__wrapper" }, Ta = { class: "x-startup__name" }, Ea = { class: "clip" }, Ma = { class: "x-startup__tagline" }, Ia = { class: "x-startup__actions" }, Ga = /* @__PURE__ */ V({
|
|
3889
3907
|
__name: "Startup",
|
|
3890
|
-
props:
|
|
3908
|
+
props: Ca,
|
|
3891
3909
|
setup(a) {
|
|
3892
|
-
const
|
|
3910
|
+
const n = a, e = () => {
|
|
3893
3911
|
if (typeof window < "u") {
|
|
3894
3912
|
let l = (window.__VTJ_LINK__ || {}).href || window.location.pathname + "@vtj/pro/#/";
|
|
3895
3913
|
window.location.href = l;
|
|
3896
3914
|
}
|
|
3897
3915
|
};
|
|
3898
|
-
return (t, l) => (u(),
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3916
|
+
return (t, l) => (u(), $("div", za, [
|
|
3917
|
+
j("div", $a, [
|
|
3918
|
+
j("div", Ta, [
|
|
3919
|
+
j("span", Ea, A(n.name), 1)
|
|
3902
3920
|
]),
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3921
|
+
j("div", Ma, A(n.tagline), 1),
|
|
3922
|
+
j("div", Ia, [
|
|
3923
|
+
k(o(ie), {
|
|
3906
3924
|
type: "primary",
|
|
3907
3925
|
size: "large",
|
|
3908
3926
|
round: "",
|
|
3909
|
-
icon:
|
|
3927
|
+
icon: o(Pn),
|
|
3910
3928
|
onClick: e
|
|
3911
3929
|
}, {
|
|
3912
|
-
default:
|
|
3913
|
-
R(A(
|
|
3930
|
+
default: f(() => [
|
|
3931
|
+
R(A(n.actionText), 1)
|
|
3914
3932
|
]),
|
|
3915
3933
|
_: 1
|
|
3916
3934
|
}, 8, ["icon"])
|
|
@@ -3918,7 +3936,7 @@ const Ua = /* @__PURE__ */ V({
|
|
|
3918
3936
|
])
|
|
3919
3937
|
]));
|
|
3920
3938
|
}
|
|
3921
|
-
}),
|
|
3939
|
+
}), Va = {
|
|
3922
3940
|
stringProp: {
|
|
3923
3941
|
type: String
|
|
3924
3942
|
},
|
|
@@ -3949,123 +3967,123 @@ const Ua = /* @__PURE__ */ V({
|
|
|
3949
3967
|
syncProp: {
|
|
3950
3968
|
type: String
|
|
3951
3969
|
}
|
|
3952
|
-
},
|
|
3970
|
+
}, Ba = { class: "x-test__slot" }, Pa = { class: "x-test__slot" }, Ya = /* @__PURE__ */ V({
|
|
3953
3971
|
name: "XTest",
|
|
3954
3972
|
__name: "Test",
|
|
3955
|
-
props:
|
|
3973
|
+
props: Va,
|
|
3956
3974
|
emits: ["click", "submit", "change", "update:modelValue", "update:syncProp"],
|
|
3957
|
-
setup(a, { expose:
|
|
3958
|
-
const t = a, l = e, s =
|
|
3975
|
+
setup(a, { expose: n, emit: e }) {
|
|
3976
|
+
const t = a, l = e, s = v(() => Object.entries(t)), c = v({
|
|
3959
3977
|
get() {
|
|
3960
3978
|
return t.modelValue;
|
|
3961
3979
|
},
|
|
3962
|
-
set(
|
|
3963
|
-
l("update:modelValue",
|
|
3980
|
+
set(_) {
|
|
3981
|
+
l("update:modelValue", _);
|
|
3964
3982
|
}
|
|
3965
|
-
}),
|
|
3983
|
+
}), r = v({
|
|
3966
3984
|
get() {
|
|
3967
3985
|
return t.syncProp;
|
|
3968
3986
|
},
|
|
3969
|
-
set(
|
|
3970
|
-
l("update:syncProp",
|
|
3987
|
+
set(_) {
|
|
3988
|
+
l("update:syncProp", _);
|
|
3971
3989
|
}
|
|
3972
|
-
}),
|
|
3990
|
+
}), i = D("default inner data"), p = () => {
|
|
3973
3991
|
lt.info({
|
|
3974
3992
|
message: "触发click事件"
|
|
3975
3993
|
}), l("click", t);
|
|
3976
|
-
},
|
|
3994
|
+
}, d = () => {
|
|
3977
3995
|
lt.info({
|
|
3978
3996
|
message: "触发submit事件"
|
|
3979
3997
|
}), l("submit", t);
|
|
3980
|
-
}, m = (
|
|
3981
|
-
|
|
3998
|
+
}, m = (_) => {
|
|
3999
|
+
i.value = _, l("change", i.value);
|
|
3982
4000
|
}, b = () => {
|
|
3983
4001
|
m("user click change:" + Date.now());
|
|
3984
4002
|
};
|
|
3985
|
-
return
|
|
4003
|
+
return n({
|
|
3986
4004
|
click: p,
|
|
3987
|
-
submit:
|
|
3988
|
-
data:
|
|
4005
|
+
submit: d,
|
|
4006
|
+
data: i,
|
|
3989
4007
|
change: m
|
|
3990
|
-
}), (
|
|
4008
|
+
}), (_, y) => (u(), g(o(Be), {
|
|
3991
4009
|
class: "x-test",
|
|
3992
4010
|
header: "VTJ 低代码测试组件",
|
|
3993
4011
|
border: ""
|
|
3994
4012
|
}, {
|
|
3995
|
-
default:
|
|
3996
|
-
|
|
3997
|
-
default:
|
|
4013
|
+
default: f(() => [
|
|
4014
|
+
k(o(se), null, {
|
|
4015
|
+
default: f(() => [
|
|
3998
4016
|
R("内部数据")
|
|
3999
4017
|
]),
|
|
4000
4018
|
_: 1
|
|
4001
4019
|
}),
|
|
4002
|
-
|
|
4003
|
-
default:
|
|
4004
|
-
R(A(
|
|
4020
|
+
k(o(I), null, {
|
|
4021
|
+
default: f(() => [
|
|
4022
|
+
R(A(i.value), 1)
|
|
4005
4023
|
]),
|
|
4006
4024
|
_: 1
|
|
4007
4025
|
}),
|
|
4008
|
-
|
|
4009
|
-
default:
|
|
4026
|
+
k(o(se), null, {
|
|
4027
|
+
default: f(() => [
|
|
4010
4028
|
R("属性")
|
|
4011
4029
|
]),
|
|
4012
4030
|
_: 1
|
|
4013
4031
|
}),
|
|
4014
|
-
|
|
4032
|
+
k(o(st), {
|
|
4015
4033
|
column: 3,
|
|
4016
4034
|
border: ""
|
|
4017
4035
|
}, {
|
|
4018
|
-
default:
|
|
4019
|
-
(u(!0),
|
|
4020
|
-
default:
|
|
4021
|
-
|
|
4036
|
+
default: f(() => [
|
|
4037
|
+
(u(!0), $(W, null, Y(s.value, ([S, w]) => (u(), g(o(Ne), { label: S }, {
|
|
4038
|
+
default: f(() => [
|
|
4039
|
+
j("pre", null, A(JSON.stringify(w, null, 2)), 1)
|
|
4022
4040
|
]),
|
|
4023
4041
|
_: 2
|
|
4024
4042
|
}, 1032, ["label"]))), 256))
|
|
4025
4043
|
]),
|
|
4026
4044
|
_: 1
|
|
4027
4045
|
}),
|
|
4028
|
-
|
|
4029
|
-
default:
|
|
4046
|
+
k(o(se), null, {
|
|
4047
|
+
default: f(() => [
|
|
4030
4048
|
R("插槽")
|
|
4031
4049
|
]),
|
|
4032
4050
|
_: 1
|
|
4033
4051
|
}),
|
|
4034
|
-
|
|
4052
|
+
k(o(I), {
|
|
4035
4053
|
justify: "space-around",
|
|
4036
4054
|
flex: "",
|
|
4037
4055
|
gap: ""
|
|
4038
4056
|
}, {
|
|
4039
|
-
default:
|
|
4040
|
-
|
|
4057
|
+
default: f(() => [
|
|
4058
|
+
k(o(Be), {
|
|
4041
4059
|
header: "default",
|
|
4042
4060
|
grow: "",
|
|
4043
4061
|
card: ""
|
|
4044
4062
|
}, {
|
|
4045
|
-
default:
|
|
4046
|
-
|
|
4047
|
-
|
|
4063
|
+
default: f(() => [
|
|
4064
|
+
j("div", Ba, [
|
|
4065
|
+
C(_.$slots, "default", {
|
|
4048
4066
|
props: t,
|
|
4049
|
-
data:
|
|
4067
|
+
data: i.value
|
|
4050
4068
|
}, () => [
|
|
4051
|
-
|
|
4069
|
+
j("pre", null, A(JSON.stringify({ props: t, data: i.value }, null, 2)), 1)
|
|
4052
4070
|
])
|
|
4053
4071
|
])
|
|
4054
4072
|
]),
|
|
4055
4073
|
_: 3
|
|
4056
4074
|
}),
|
|
4057
|
-
|
|
4075
|
+
k(o(Be), {
|
|
4058
4076
|
header: "extra",
|
|
4059
4077
|
grow: "",
|
|
4060
4078
|
card: ""
|
|
4061
4079
|
}, {
|
|
4062
|
-
default:
|
|
4063
|
-
|
|
4064
|
-
|
|
4080
|
+
default: f(() => [
|
|
4081
|
+
j("div", Pa, [
|
|
4082
|
+
C(_.$slots, "extra", {
|
|
4065
4083
|
props: t,
|
|
4066
|
-
data:
|
|
4084
|
+
data: i.value
|
|
4067
4085
|
}, () => [
|
|
4068
|
-
|
|
4086
|
+
j("pre", null, A(JSON.stringify({ props: t, data: i.value }, null, 2)), 1)
|
|
4069
4087
|
])
|
|
4070
4088
|
])
|
|
4071
4089
|
]),
|
|
@@ -4074,33 +4092,33 @@ const Ua = /* @__PURE__ */ V({
|
|
|
4074
4092
|
]),
|
|
4075
4093
|
_: 3
|
|
4076
4094
|
}),
|
|
4077
|
-
|
|
4078
|
-
default:
|
|
4095
|
+
k(o(se), null, {
|
|
4096
|
+
default: f(() => [
|
|
4079
4097
|
R("双向绑定")
|
|
4080
4098
|
]),
|
|
4081
4099
|
_: 1
|
|
4082
4100
|
}),
|
|
4083
|
-
|
|
4084
|
-
default:
|
|
4085
|
-
|
|
4101
|
+
k(o(I), null, {
|
|
4102
|
+
default: f(() => [
|
|
4103
|
+
k(o(st), {
|
|
4086
4104
|
column: 2,
|
|
4087
4105
|
border: ""
|
|
4088
4106
|
}, {
|
|
4089
|
-
default:
|
|
4090
|
-
|
|
4091
|
-
default:
|
|
4092
|
-
|
|
4107
|
+
default: f(() => [
|
|
4108
|
+
k(o(Ne), { label: "modelValue" }, {
|
|
4109
|
+
default: f(() => [
|
|
4110
|
+
k(o(_e), {
|
|
4093
4111
|
modelValue: c.value,
|
|
4094
|
-
"onUpdate:modelValue":
|
|
4112
|
+
"onUpdate:modelValue": y[0] || (y[0] = (S) => c.value = S)
|
|
4095
4113
|
}, null, 8, ["modelValue"])
|
|
4096
4114
|
]),
|
|
4097
4115
|
_: 1
|
|
4098
4116
|
}),
|
|
4099
|
-
|
|
4100
|
-
default:
|
|
4101
|
-
|
|
4102
|
-
modelValue:
|
|
4103
|
-
"onUpdate:modelValue":
|
|
4117
|
+
k(o(Ne), { label: "syncProp" }, {
|
|
4118
|
+
default: f(() => [
|
|
4119
|
+
k(o(_e), {
|
|
4120
|
+
modelValue: r.value,
|
|
4121
|
+
"onUpdate:modelValue": y[1] || (y[1] = (S) => r.value = S)
|
|
4104
4122
|
}, null, 8, ["modelValue"])
|
|
4105
4123
|
]),
|
|
4106
4124
|
_: 1
|
|
@@ -4111,28 +4129,28 @@ const Ua = /* @__PURE__ */ V({
|
|
|
4111
4129
|
]),
|
|
4112
4130
|
_: 1
|
|
4113
4131
|
}),
|
|
4114
|
-
|
|
4115
|
-
default:
|
|
4132
|
+
k(o(se), null, {
|
|
4133
|
+
default: f(() => [
|
|
4116
4134
|
R("事件和方法")
|
|
4117
4135
|
]),
|
|
4118
4136
|
_: 1
|
|
4119
4137
|
}),
|
|
4120
|
-
|
|
4121
|
-
default:
|
|
4122
|
-
|
|
4123
|
-
default:
|
|
4138
|
+
k(o(I), null, {
|
|
4139
|
+
default: f(() => [
|
|
4140
|
+
k(o(ie), { onClick: p }, {
|
|
4141
|
+
default: f(() => [
|
|
4124
4142
|
R("click")
|
|
4125
4143
|
]),
|
|
4126
4144
|
_: 1
|
|
4127
4145
|
}),
|
|
4128
|
-
|
|
4129
|
-
default:
|
|
4146
|
+
k(o(ie), { onClick: d }, {
|
|
4147
|
+
default: f(() => [
|
|
4130
4148
|
R("submit")
|
|
4131
4149
|
]),
|
|
4132
4150
|
_: 1
|
|
4133
4151
|
}),
|
|
4134
|
-
|
|
4135
|
-
default:
|
|
4152
|
+
k(o(ie), { onClick: b }, {
|
|
4153
|
+
default: f(() => [
|
|
4136
4154
|
R("change")
|
|
4137
4155
|
]),
|
|
4138
4156
|
_: 1
|
|
@@ -4144,64 +4162,178 @@ const Ua = /* @__PURE__ */ V({
|
|
|
4144
4162
|
_: 3
|
|
4145
4163
|
}));
|
|
4146
4164
|
}
|
|
4165
|
+
}), Aa = {
|
|
4166
|
+
units: {
|
|
4167
|
+
type: [String, Object, Array]
|
|
4168
|
+
},
|
|
4169
|
+
unit: {
|
|
4170
|
+
type: String
|
|
4171
|
+
},
|
|
4172
|
+
appendWidth: {
|
|
4173
|
+
type: Number,
|
|
4174
|
+
default: 100
|
|
4175
|
+
},
|
|
4176
|
+
withUnit: {
|
|
4177
|
+
type: Boolean,
|
|
4178
|
+
default: !0
|
|
4179
|
+
},
|
|
4180
|
+
format: {
|
|
4181
|
+
type: String
|
|
4182
|
+
},
|
|
4183
|
+
modelValue: {
|
|
4184
|
+
type: [String, Number]
|
|
4185
|
+
},
|
|
4186
|
+
selectProps: {
|
|
4187
|
+
type: Object
|
|
4188
|
+
}
|
|
4189
|
+
}, qa = /* @__PURE__ */ V({
|
|
4190
|
+
name: "XInputUnit",
|
|
4191
|
+
__name: "InputUnit",
|
|
4192
|
+
props: Aa,
|
|
4193
|
+
emits: ["update:modelValue", "update:unit", "change", "unit-change"],
|
|
4194
|
+
setup(a, { expose: n, emit: e }) {
|
|
4195
|
+
const t = a, l = e, s = v(() => Mt(t.units).map((S) => typeof S == "string" ? { label: S, value: S } : S)), c = v(() => {
|
|
4196
|
+
const y = s.value.map((S) => S.value);
|
|
4197
|
+
return t.unit && y.push(t.unit), Hn(y);
|
|
4198
|
+
}), r = D(), i = D(), p = (y) => t.format && y ? Kn(Number(y) || 0, t.format) : y, d = (y) => {
|
|
4199
|
+
if (!t.withUnit || typeof y != "string")
|
|
4200
|
+
return { value: p(y), unit: t.unit };
|
|
4201
|
+
for (const S of c.value) {
|
|
4202
|
+
const w = new RegExp(`${S}$`);
|
|
4203
|
+
if (w.test(y))
|
|
4204
|
+
return {
|
|
4205
|
+
value: p(y.toString().replace(w, "")),
|
|
4206
|
+
unit: S
|
|
4207
|
+
};
|
|
4208
|
+
}
|
|
4209
|
+
return { value: p(y), unit: t.unit };
|
|
4210
|
+
}, m = () => {
|
|
4211
|
+
const y = p(i.value), S = r.value;
|
|
4212
|
+
return t.withUnit && y && S ? `${y}${S}` : y;
|
|
4213
|
+
};
|
|
4214
|
+
L(
|
|
4215
|
+
() => t.modelValue,
|
|
4216
|
+
(y) => {
|
|
4217
|
+
const { value: S, unit: w } = d(y);
|
|
4218
|
+
r.value = w, i.value = S;
|
|
4219
|
+
},
|
|
4220
|
+
{
|
|
4221
|
+
immediate: !0
|
|
4222
|
+
}
|
|
4223
|
+
), L(i, (y) => {
|
|
4224
|
+
l("change", y);
|
|
4225
|
+
});
|
|
4226
|
+
const b = async () => {
|
|
4227
|
+
const { value: y, unit: S } = d(m());
|
|
4228
|
+
i.value = y, r.value = S, l("update:modelValue", m());
|
|
4229
|
+
}, _ = () => {
|
|
4230
|
+
l("unit-change", r.value), b();
|
|
4231
|
+
};
|
|
4232
|
+
return n({
|
|
4233
|
+
parser: d,
|
|
4234
|
+
formatValue: p
|
|
4235
|
+
}), (y, S) => (u(), g(o(_e), {
|
|
4236
|
+
modelValue: i.value,
|
|
4237
|
+
"onUpdate:modelValue": S[1] || (S[1] = (w) => i.value = w),
|
|
4238
|
+
modelModifiers: { trim: !0 },
|
|
4239
|
+
class: "x-input-unit",
|
|
4240
|
+
onChange: b
|
|
4241
|
+
}, ce({ _: 2 }, [
|
|
4242
|
+
s.value.length ? {
|
|
4243
|
+
name: "append",
|
|
4244
|
+
fn: f(() => [
|
|
4245
|
+
k(o(wt), F({
|
|
4246
|
+
class: "x-input-unit__unit",
|
|
4247
|
+
modelValue: r.value,
|
|
4248
|
+
"onUpdate:modelValue": S[0] || (S[0] = (w) => r.value = w),
|
|
4249
|
+
size: y.$attrs.size,
|
|
4250
|
+
style: { width: `${t.appendWidth}px` }
|
|
4251
|
+
}, y.$props.selectProps, { onChange: _ }), {
|
|
4252
|
+
default: f(() => [
|
|
4253
|
+
(u(!0), $(W, null, Y(s.value, (w) => (u(), g(o(xt), {
|
|
4254
|
+
key: w.value,
|
|
4255
|
+
label: w.label,
|
|
4256
|
+
value: w.value
|
|
4257
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
4258
|
+
]),
|
|
4259
|
+
_: 1
|
|
4260
|
+
}, 16, ["modelValue", "size", "style"])
|
|
4261
|
+
]),
|
|
4262
|
+
key: "0"
|
|
4263
|
+
} : {
|
|
4264
|
+
name: "suffix",
|
|
4265
|
+
fn: f(() => [
|
|
4266
|
+
r.value ? (u(), $("div", {
|
|
4267
|
+
key: 0,
|
|
4268
|
+
class: "x-input-unit__unit"
|
|
4269
|
+
}, [
|
|
4270
|
+
j("span", null, A(r.value), 1)
|
|
4271
|
+
])) : h("", !0)
|
|
4272
|
+
]),
|
|
4273
|
+
key: "1"
|
|
4274
|
+
}
|
|
4275
|
+
]), 1032, ["modelValue"]));
|
|
4276
|
+
}
|
|
4147
4277
|
});
|
|
4148
4278
|
export {
|
|
4149
|
-
|
|
4279
|
+
ct as Draggable,
|
|
4150
4280
|
rt as INSTALLED_KEY,
|
|
4151
|
-
|
|
4281
|
+
Ot as MASK_KEY,
|
|
4152
4282
|
dt as Resizable,
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4283
|
+
Dt as TAB_CREATORS_KEY,
|
|
4284
|
+
Po as TAB_ITEM_WIDTH,
|
|
4285
|
+
Ua as VTJ_UI_VERSION,
|
|
4286
|
+
te as XAction,
|
|
4157
4287
|
et as XActionBar,
|
|
4158
|
-
|
|
4288
|
+
Qa as XChart,
|
|
4159
4289
|
I as XContainer,
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4290
|
+
Ja as XDataItem,
|
|
4291
|
+
At as XDialog,
|
|
4292
|
+
La as XDialogForm,
|
|
4293
|
+
aa as XField,
|
|
4294
|
+
la as XForm,
|
|
4295
|
+
go as XHeader,
|
|
4296
|
+
de as XIcon,
|
|
4297
|
+
qa as XInputUnit,
|
|
4298
|
+
Za as XList,
|
|
4299
|
+
Ha as XMask,
|
|
4300
|
+
ge as XMenu,
|
|
4301
|
+
Be as XPanel,
|
|
4302
|
+
Ga as XStartup,
|
|
4303
|
+
Wa as XTabs,
|
|
4304
|
+
Ya as XTest,
|
|
4305
|
+
uo as actionBarProps,
|
|
4306
|
+
Bt as actionProps,
|
|
4307
|
+
Ft as builtinFieldEditors,
|
|
4308
|
+
ya as chartProps,
|
|
4309
|
+
co as containerProps,
|
|
4179
4310
|
tt as createDialog,
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4311
|
+
da as dataItemProps,
|
|
4312
|
+
Ka as defineTab,
|
|
4313
|
+
ia as dialogFormProps,
|
|
4314
|
+
ho as dialogProps,
|
|
4315
|
+
qo as fieldProps,
|
|
4316
|
+
jt as formInstanceKey,
|
|
4317
|
+
Nt as formModelKey,
|
|
4318
|
+
sa as formProps,
|
|
4188
4319
|
q as getSizeValue,
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4320
|
+
po as headerProps,
|
|
4321
|
+
Qn as iconProps,
|
|
4322
|
+
Jn as iconSizeMap,
|
|
4323
|
+
Aa as inputUnitProps,
|
|
4324
|
+
ba as listProps,
|
|
4325
|
+
Xa as makeInstaller,
|
|
4326
|
+
Ao as maskProps,
|
|
4327
|
+
yo as panelProps,
|
|
4328
|
+
Te as parseSize,
|
|
4329
|
+
Ca as startupProps,
|
|
4330
|
+
ra as tabsProps,
|
|
4331
|
+
Va as testProps,
|
|
4200
4332
|
it as toObjectProps,
|
|
4201
4333
|
qe as useDisabled,
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4334
|
+
ke as useIcon,
|
|
4335
|
+
so as useIconProps,
|
|
4336
|
+
lo as useLoader,
|
|
4337
|
+
vo as vDraggable,
|
|
4338
|
+
Pt as vResizable
|
|
4207
4339
|
};
|