@vtj/ui 0.7.6 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.iife.js +2 -2
- package/dist/index.mjs +728 -747
- package/dist/index.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/types/components/action/types.d.ts +2 -4
- package/types/hooks/useLoader.d.ts +7 -0
- package/types/index.d.ts +0 -2
- package/types/list.d.ts +1 -2
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElIcon as
|
|
3
|
-
import { ArrowRight as
|
|
4
|
-
import { useDraggable as
|
|
5
|
-
import { isEqual as
|
|
6
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as V, useAttrs as We, getCurrentInstance as de, computed as y, markRaw as ke, openBlock as u, createBlock as g, unref as n, normalizeClass as W, normalizeStyle as pe, withCtx as d, renderSlot as x, resolveDynamicComponent as J, createCommentVNode as v, createElementBlock as C, mergeProps as F, createElementVNode as X, toDisplayString as A, Fragment as Q, renderList as Y, isVNode as jt, h as ne, shallowRef as Ve, ref as O, watch as L, toRef as Ae, createTextVNode as R, useSlots as Nt, toRaw as ge, createVNode as _, normalizeProps as le, guardReactiveProps as he, effectScope as ft, reactive as Re, onMounted as mt, onUnmounted as gt, watchEffect as Je, nextTick as ye, Teleport as yt, withDirectives as G, createSlots as be, render as ot, vShow as oe, isRef as Ie, withModifiers as vt, KeepAlive as Xt, provide as Se, inject as xe, withKeys as Ut } from "vue";
|
|
2
|
+
import { ElIcon as Ht, ElSubMenu as Kt, ElBadge as He, ElMenuItem as Lt, ElMenu as Wt, ElButton as ie, ElDropdown as Jt, ElDropdownMenu as Qt, ElDropdownItem as Zt, ElTooltip as ht, ElDivider as ae, ElSwitch as Qe, ElInput as ze, ElEmpty as bt, ElTabs as _t, ElTabPane as Ke, ElPopover as kt, ElAvatar as Gt, ElMessageBox as je, ElSelect as Yt, ElOption as qt, ElCheckboxButton as eo, ElCheckbox as to, ElCheckboxGroup as oo, ElRadioButton as no, ElRadio as ao, ElRadioGroup as so, ElInputNumber as lo, ElDatePicker as nt, ElTimePicker as io, ElRate as ro, ElSlider as co, ElCascader as uo, formContextKey as po, ElFormItem as fo, ElForm as mo, ElImage as go, ElInfiniteScroll as at, ElPagination as yo, ElDescriptions as st, ElDescriptionsItem as Ne, ElMessage as lt } from "element-plus";
|
|
3
|
+
import { ArrowRight as vo, Minimize as ho, Popup as bo, Maximize as _o, RawClose as ko, StarFilled as wt, Menu as wo, Search as Le, Close as xt, Expand as xo, Fold as So, Star as St, Document as fe, Refresh as zo, CopyDocument as Co, Moon as To, Sunny as $o, MoreFilled as Eo, UserFilled as Mo, HomeFilled as Io, WarningFilled as Bo, EditPen as Po } from "@vtj/icons";
|
|
4
|
+
import { useDraggable as Vo, useMouseInElement as Ao, useEventListener as De, useElementSize as zt, useDark as Do, useResizeObserver as Ro, useVirtualList as Oo } from "@vueuse/core";
|
|
5
|
+
import { isEqual as Ze, isObject as Ge, uid as Ct, arrayToMap as Fo, isUrl as jo, upperFirstCamelCase as Tt, toArray as No, get as Be, merge as Xo, set as Xe, debounce as Uo } from "@vtj/utils";
|
|
6
|
+
import { useRouter as Ye, RouterView as Ho, useRoute as $t, routeLocationKey as Ko } 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.9
|
|
12
12
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
13
13
|
*/
|
|
14
|
-
const
|
|
14
|
+
const Da = "0.7.9", Lo = {
|
|
15
15
|
default: 14,
|
|
16
16
|
small: 12,
|
|
17
17
|
large: 18
|
|
18
|
-
},
|
|
18
|
+
}, Wo = {
|
|
19
19
|
icon: {
|
|
20
20
|
type: [String, Object]
|
|
21
21
|
},
|
|
@@ -42,7 +42,7 @@ const Ha = "0.7.6", Qo = {
|
|
|
42
42
|
function q(a) {
|
|
43
43
|
return typeof a == "string" ? a : `${a}px`;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function $e(a = 0, o) {
|
|
46
46
|
if (typeof a == "number")
|
|
47
47
|
return a;
|
|
48
48
|
if (/(%|vh|vw)$/i.test(a)) {
|
|
@@ -51,22 +51,22 @@ function Ee(a = 0, o) {
|
|
|
51
51
|
}
|
|
52
52
|
return Number.parseInt(a);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function it(a, o = {}) {
|
|
55
55
|
const e = { ...o };
|
|
56
56
|
return typeof a == "boolean" ? e : Object.assign(e, a || {});
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const rt = Symbol("INSTALLED_KEY"), Ra = (a = []) => ({
|
|
59
59
|
install: (e) => {
|
|
60
|
-
e[
|
|
60
|
+
e[rt] || (e[rt] = !0, a.forEach((t) => {
|
|
61
61
|
t.name && e.component(t.name, t);
|
|
62
62
|
}));
|
|
63
63
|
}
|
|
64
|
-
}),
|
|
64
|
+
}), Jo = ["src"], ue = /* @__PURE__ */ V({
|
|
65
65
|
name: "XIcon",
|
|
66
66
|
__name: "Icon",
|
|
67
|
-
props:
|
|
67
|
+
props: Wo,
|
|
68
68
|
setup(a) {
|
|
69
|
-
const o = a, e =
|
|
69
|
+
const o = a, e = We(), t = de(), l = y(() => {
|
|
70
70
|
if (!o.icon)
|
|
71
71
|
return null;
|
|
72
72
|
const r = t?.appContext.app;
|
|
@@ -80,12 +80,12 @@ const ct = Symbol("INSTALLED_KEY"), Ka = (a = []) => ({
|
|
|
80
80
|
"background-color": o.background,
|
|
81
81
|
"border-radius": o.radius ? q(o.radius) : void 0,
|
|
82
82
|
padding: o.padding ? q(o.padding) : void 0
|
|
83
|
-
})), i = y(() => typeof o.size == "number" ? o.size :
|
|
84
|
-
return (r, p) => (u(), g(n(
|
|
83
|
+
})), i = y(() => typeof o.size == "number" ? o.size : Lo[o.size] ?? void 0);
|
|
84
|
+
return (r, p) => (u(), g(n(Ht), {
|
|
85
85
|
class: W(["x-icon", s.value]),
|
|
86
86
|
color: o.color,
|
|
87
87
|
size: i.value,
|
|
88
|
-
style:
|
|
88
|
+
style: pe(c.value)
|
|
89
89
|
}, {
|
|
90
90
|
default: d(() => [
|
|
91
91
|
x(r.$slots, "default", {}, () => [
|
|
@@ -93,19 +93,19 @@ const ct = Symbol("INSTALLED_KEY"), Ka = (a = []) => ({
|
|
|
93
93
|
o.src ? (u(), C("img", {
|
|
94
94
|
key: 1,
|
|
95
95
|
src: o.src
|
|
96
|
-
}, null, 8,
|
|
96
|
+
}, null, 8, Jo)) : v("", !0)
|
|
97
97
|
])
|
|
98
98
|
]),
|
|
99
99
|
_: 3
|
|
100
100
|
}, 8, ["class", "color", "size", "style"]));
|
|
101
101
|
}
|
|
102
|
-
}),
|
|
102
|
+
}), Qo = { class: "x-menu__wrapper" }, Zo = {
|
|
103
103
|
key: 1,
|
|
104
104
|
class: "x-menu__title"
|
|
105
|
-
},
|
|
105
|
+
}, Go = /* @__PURE__ */ X("i", null, null, -1), Yo = {
|
|
106
106
|
key: 0,
|
|
107
107
|
class: "x-menu__title"
|
|
108
|
-
},
|
|
108
|
+
}, qo = /* @__PURE__ */ X("i", null, null, -1), Et = /* @__PURE__ */ V({
|
|
109
109
|
inheritAttrs: !1,
|
|
110
110
|
name: "XMenuItem",
|
|
111
111
|
__name: "MenuItem",
|
|
@@ -115,36 +115,36 @@ const ct = Symbol("INSTALLED_KEY"), Ka = (a = []) => ({
|
|
|
115
115
|
defaultIcon: {}
|
|
116
116
|
},
|
|
117
117
|
setup(a) {
|
|
118
|
-
const o = a, e =
|
|
118
|
+
const o = a, e = de(), t = (c) => {
|
|
119
119
|
if (c)
|
|
120
120
|
return typeof c == "string" && (e?.appContext.app?.component(c) || o.defaultIcon) || c;
|
|
121
121
|
}, l = (c) => typeof c == "object" ? c : { value: c }, s = (c = []) => c.filter((i) => !i.hidden);
|
|
122
|
-
return (c, i) => o.item.children ? (u(), g(n(
|
|
122
|
+
return (c, i) => o.item.children ? (u(), g(n(Kt), F({
|
|
123
123
|
key: 0,
|
|
124
124
|
disabled: o.item.disabled
|
|
125
125
|
}, o.subMenu, {
|
|
126
126
|
index: String(o.item.id)
|
|
127
127
|
}), {
|
|
128
128
|
title: d(() => [
|
|
129
|
-
X("div",
|
|
130
|
-
o.item.icon ? (u(), g(n(
|
|
129
|
+
X("div", Qo, [
|
|
130
|
+
o.item.icon ? (u(), g(n(ue), {
|
|
131
131
|
key: 0,
|
|
132
132
|
icon: t(o.item.icon)
|
|
133
133
|
}, null, 8, ["icon"])) : v("", !0),
|
|
134
|
-
o.item.title ? (u(), C("span",
|
|
135
|
-
o.item.badge ? (u(), g(n(
|
|
134
|
+
o.item.title ? (u(), C("span", Zo, A(o.item.title), 1)) : v("", !0),
|
|
135
|
+
o.item.badge ? (u(), g(n(He), F({
|
|
136
136
|
key: 2,
|
|
137
137
|
class: "x-menu__badge"
|
|
138
138
|
}, l(o.item.badge)), {
|
|
139
139
|
default: d(() => [
|
|
140
|
-
|
|
140
|
+
Go
|
|
141
141
|
]),
|
|
142
142
|
_: 1
|
|
143
143
|
}, 16)) : v("", !0)
|
|
144
144
|
])
|
|
145
145
|
]),
|
|
146
146
|
default: d(() => [
|
|
147
|
-
(u(!0), C(Q, null, Y(s(o.item.children), (r) => (u(), g(n(
|
|
147
|
+
(u(!0), C(Q, null, Y(s(o.item.children), (r) => (u(), g(n(Et), {
|
|
148
148
|
key: r.id,
|
|
149
149
|
item: r,
|
|
150
150
|
subMenu: o.subMenu,
|
|
@@ -152,25 +152,25 @@ const ct = Symbol("INSTALLED_KEY"), Ka = (a = []) => ({
|
|
|
152
152
|
}, null, 8, ["item", "subMenu", "defaultIcon"]))), 128))
|
|
153
153
|
]),
|
|
154
154
|
_: 1
|
|
155
|
-
}, 16, ["disabled", "index"])) : (u(), g(n(
|
|
155
|
+
}, 16, ["disabled", "index"])) : (u(), g(n(Lt), {
|
|
156
156
|
key: 1,
|
|
157
157
|
index: String(o.item.id),
|
|
158
158
|
disabled: o.item.disabled
|
|
159
159
|
}, {
|
|
160
160
|
title: d(() => [
|
|
161
|
-
o.item.title ? (u(), C("span",
|
|
162
|
-
o.item.badge ? (u(), g(n(
|
|
161
|
+
o.item.title ? (u(), C("span", Yo, A(o.item.title), 1)) : v("", !0),
|
|
162
|
+
o.item.badge ? (u(), g(n(He), F({
|
|
163
163
|
key: 1,
|
|
164
164
|
class: "x-menu__badge"
|
|
165
165
|
}, l(o.item.badge)), {
|
|
166
166
|
default: d(() => [
|
|
167
|
-
|
|
167
|
+
qo
|
|
168
168
|
]),
|
|
169
169
|
_: 1
|
|
170
170
|
}, 16)) : v("", !0)
|
|
171
171
|
]),
|
|
172
172
|
default: d(() => [
|
|
173
|
-
o.item.icon ? (u(), g(n(
|
|
173
|
+
o.item.icon ? (u(), g(n(ue), {
|
|
174
174
|
key: 0,
|
|
175
175
|
icon: t(o.item.icon)
|
|
176
176
|
}, null, 8, ["icon"])) : v("", !0)
|
|
@@ -178,7 +178,7 @@ const ct = Symbol("INSTALLED_KEY"), Ka = (a = []) => ({
|
|
|
178
178
|
_: 1
|
|
179
179
|
}, 8, ["index", "disabled"]));
|
|
180
180
|
}
|
|
181
|
-
}),
|
|
181
|
+
}), me = /* @__PURE__ */ V({
|
|
182
182
|
inheritAttrs: !1,
|
|
183
183
|
name: "XMenu",
|
|
184
184
|
__name: "Menu",
|
|
@@ -191,13 +191,13 @@ const ct = Symbol("INSTALLED_KEY"), Ka = (a = []) => ({
|
|
|
191
191
|
setup(a, { emit: o }) {
|
|
192
192
|
const e = a, t = o, l = y(() => e.data.filter((i) => !i.hidden)), s = (i, r) => {
|
|
193
193
|
const p = (f, m = []) => {
|
|
194
|
-
for (const
|
|
195
|
-
if (
|
|
196
|
-
return
|
|
197
|
-
if (
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
return
|
|
194
|
+
for (const b of m) {
|
|
195
|
+
if (b.id.toString() === f.toString())
|
|
196
|
+
return b;
|
|
197
|
+
if (b.children?.length) {
|
|
198
|
+
const h = p(f, b.children);
|
|
199
|
+
if (h)
|
|
200
|
+
return h;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
};
|
|
@@ -206,9 +206,9 @@ const ct = Symbol("INSTALLED_KEY"), Ka = (a = []) => ({
|
|
|
206
206
|
const r = s(l.value, i);
|
|
207
207
|
r && t("select", r);
|
|
208
208
|
};
|
|
209
|
-
return (i, r) => (u(), g(n(
|
|
209
|
+
return (i, r) => (u(), g(n(Wt), F({ class: "x-menu" }, i.$attrs, { onSelect: c }), {
|
|
210
210
|
default: d(() => [
|
|
211
|
-
(u(!0), C(Q, null, Y(l.value, (p) => (u(), g(n(
|
|
211
|
+
(u(!0), C(Q, null, Y(l.value, (p) => (u(), g(n(Et), {
|
|
212
212
|
item: { ...p, icon: p.icon },
|
|
213
213
|
defaultIcon: e.defaultIcon,
|
|
214
214
|
subMenu: e.subMenu
|
|
@@ -217,7 +217,7 @@ const ct = Symbol("INSTALLED_KEY"), Ka = (a = []) => ({
|
|
|
217
217
|
_: 1
|
|
218
218
|
}, 16));
|
|
219
219
|
}
|
|
220
|
-
}),
|
|
220
|
+
}), Mt = {
|
|
221
221
|
/**
|
|
222
222
|
* 动作名称标识
|
|
223
223
|
*/
|
|
@@ -313,21 +313,21 @@ const ct = Symbol("INSTALLED_KEY"), Ka = (a = []) => ({
|
|
|
313
313
|
type: Boolean
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
function
|
|
316
|
+
function en(a) {
|
|
317
317
|
return y(() => {
|
|
318
318
|
const o = a.tooltip;
|
|
319
319
|
if (o)
|
|
320
320
|
return typeof o == "string" ? { content: o } : o;
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function tn(a) {
|
|
324
324
|
return y(() => {
|
|
325
325
|
const o = a.badge;
|
|
326
326
|
if (o)
|
|
327
327
|
return typeof o == "object" ? o : { value: o };
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function on(a) {
|
|
331
331
|
return y(() => {
|
|
332
332
|
const { dropdown: o, menus: e } = a;
|
|
333
333
|
if (e && e.length > 0)
|
|
@@ -337,12 +337,12 @@ function sn(a) {
|
|
|
337
337
|
);
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
const o =
|
|
340
|
+
function nn(a) {
|
|
341
|
+
const o = de();
|
|
342
342
|
return y(() => {
|
|
343
343
|
const e = n(a);
|
|
344
344
|
if (e)
|
|
345
|
-
if (typeof e == "string" || e.setup || e.render ||
|
|
345
|
+
if (typeof e == "string" || e.setup || e.render || jt(e)) {
|
|
346
346
|
const t = o?.appContext.app;
|
|
347
347
|
return {
|
|
348
348
|
icon: typeof e == "string" && t?.component(e) || e
|
|
@@ -353,20 +353,20 @@ function ln(a) {
|
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
function _e(a) {
|
|
356
|
-
const o =
|
|
357
|
-
return o.value ? ke(
|
|
356
|
+
const o = nn(a);
|
|
357
|
+
return o.value ? ke(V({ render: () => ne(ue, o.value) })) : void 0;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function qe(a, o) {
|
|
360
360
|
return y(() => {
|
|
361
361
|
const e = n(a);
|
|
362
362
|
return typeof e == "function" ? e(o) : !!e;
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function an(a, o, e) {
|
|
366
366
|
const t = Ve(o), l = O(!1), s = async (i) => {
|
|
367
367
|
const r = n(a);
|
|
368
368
|
return r ? typeof r == "function" ? await r(i) : r : o;
|
|
369
|
-
}, c = async (i) => (l.value = !0, await s(i).then((r) => (t.value = r || o, l.value = !1, t)));
|
|
369
|
+
}, c = async (i) => (l.value = !0, await s(i).then((r) => (t.value = r || o, l.value = !1, n(t))));
|
|
370
370
|
return L(
|
|
371
371
|
() => a,
|
|
372
372
|
() => {
|
|
@@ -381,12 +381,12 @@ function rn(a, o, e) {
|
|
|
381
381
|
loader: c
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
|
-
const
|
|
384
|
+
const sn = { key: 0 }, ln = /* @__PURE__ */ V({
|
|
385
385
|
__name: "Trigger",
|
|
386
|
-
props:
|
|
386
|
+
props: Mt,
|
|
387
387
|
emits: ["click"],
|
|
388
388
|
setup(a, { emit: o }) {
|
|
389
|
-
const e = a, t = o, l = _e(Ae(e, "icon")), s =
|
|
389
|
+
const e = a, t = o, l = _e(Ae(e, "icon")), s = qe(Ae(e, "disabled")), c = y(() => ({
|
|
390
390
|
[`is-${e.mode}`]: !!e.mode,
|
|
391
391
|
[`is-${e.type}`]: !!e.type,
|
|
392
392
|
[`is-${e.size}`]: !!e.size && e.size !== "default",
|
|
@@ -394,7 +394,7 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
394
394
|
"is-disabled": !!e.disabled,
|
|
395
395
|
"is-circle": !!e.circle
|
|
396
396
|
})), i = (r) => {
|
|
397
|
-
if (r.
|
|
397
|
+
if (r.preventDefault(), !s.value)
|
|
398
398
|
return t("click"), !1;
|
|
399
399
|
};
|
|
400
400
|
return (r, p) => e.mode === "button" ? (u(), g(n(ie), F({
|
|
@@ -414,53 +414,54 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
414
414
|
onClick: i
|
|
415
415
|
}, [
|
|
416
416
|
(u(), g(J(n(l)))),
|
|
417
|
-
r.label ? (u(), C("span",
|
|
417
|
+
r.label ? (u(), C("span", sn, A(r.label), 1)) : v("", !0)
|
|
418
418
|
], 2));
|
|
419
419
|
}
|
|
420
|
-
}),
|
|
420
|
+
}), se = /* @__PURE__ */ V({
|
|
421
421
|
name: "XAction",
|
|
422
422
|
__name: "Action",
|
|
423
|
-
props:
|
|
423
|
+
props: Mt,
|
|
424
424
|
emits: ["click", "command"],
|
|
425
425
|
setup(a, { emit: o }) {
|
|
426
|
-
const e = a, t =
|
|
426
|
+
const e = a, t = Nt(), l = o, s = en(e), c = tn(e), i = on(e), r = qe(Ae(e, "disabled")), p = y(() => ({
|
|
427
427
|
[`x-action--${e.mode}`]: !!e.mode
|
|
428
428
|
})), f = () => {
|
|
429
429
|
r.value || l("click", ge(e));
|
|
430
430
|
}, m = (z) => {
|
|
431
431
|
if (r.value)
|
|
432
432
|
return;
|
|
433
|
-
const
|
|
434
|
-
|
|
435
|
-
},
|
|
436
|
-
|
|
433
|
+
const E = e.menus?.find((B) => B.command === z);
|
|
434
|
+
E && l("command", ge(E));
|
|
435
|
+
}, b = (z) => ne(He, c.value, () => [].concat(z)), h = (z) => ne(
|
|
436
|
+
Jt,
|
|
437
437
|
{ ...i.value, disabled: r.value, onCommand: m },
|
|
438
438
|
{
|
|
439
439
|
default: () => [z],
|
|
440
440
|
dropdown: () => [
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
() => (e.menus || []).map((
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
() => t.item ? t.item({ item:
|
|
441
|
+
ne(
|
|
442
|
+
Qt,
|
|
443
|
+
() => (e.menus || []).map((E, B) => ne(
|
|
444
|
+
Zt,
|
|
445
|
+
E,
|
|
446
|
+
() => t.item ? t.item({ item: E, index: B }) : E.label
|
|
447
447
|
))
|
|
448
448
|
)
|
|
449
449
|
]
|
|
450
450
|
}
|
|
451
|
-
), w = (z) =>
|
|
451
|
+
), w = (z) => ne(ht, { ...s.value, disabled: r.value }, () => [
|
|
452
452
|
z
|
|
453
|
-
]),
|
|
454
|
-
let z =
|
|
455
|
-
|
|
453
|
+
]), M = y(() => {
|
|
454
|
+
let z = ne(ke(ln), { ...e, onClick: f });
|
|
455
|
+
const E = t.default?.();
|
|
456
|
+
return E && E.length && (z = E[0]), c.value && (z = b(z)), i.value && (z = h(z)), s.value && (z = w(z)), z;
|
|
456
457
|
});
|
|
457
|
-
return (z,
|
|
458
|
+
return (z, E) => (u(), C("div", {
|
|
458
459
|
class: W(["x-action", p.value])
|
|
459
460
|
}, [
|
|
460
|
-
(u(), g(J(
|
|
461
|
+
(u(), g(J(M.value)))
|
|
461
462
|
], 2));
|
|
462
463
|
}
|
|
463
|
-
}),
|
|
464
|
+
}), rn = {
|
|
464
465
|
/**
|
|
465
466
|
* 动作项
|
|
466
467
|
*/
|
|
@@ -531,10 +532,10 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
531
532
|
button: {
|
|
532
533
|
type: Object
|
|
533
534
|
}
|
|
534
|
-
},
|
|
535
|
+
}, et = /* @__PURE__ */ V({
|
|
535
536
|
name: "XActionBar",
|
|
536
537
|
__name: "ActionBar",
|
|
537
|
-
props:
|
|
538
|
+
props: rn,
|
|
538
539
|
emits: ["click", "command"],
|
|
539
540
|
setup(a, { emit: o }) {
|
|
540
541
|
const e = a, t = o, l = y(() => (e.items || []).map((i) => i === "|" ? i : {
|
|
@@ -552,17 +553,17 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
552
553
|
}, c = (i, r) => {
|
|
553
554
|
t("command", i, r);
|
|
554
555
|
};
|
|
555
|
-
return (i, r) => (u(), g(n(
|
|
556
|
+
return (i, r) => (u(), g(n(I), {
|
|
556
557
|
class: "x-action-bar",
|
|
557
558
|
align: "center"
|
|
558
559
|
}, {
|
|
559
560
|
default: d(() => [
|
|
560
561
|
(u(!0), C(Q, null, Y(l.value, (p) => (u(), C(Q, null, [
|
|
561
|
-
p === "|" ? (u(), g(n(
|
|
562
|
+
p === "|" ? (u(), g(n(ae), {
|
|
562
563
|
key: 0,
|
|
563
564
|
direction: "vertical",
|
|
564
565
|
class: "x-action-bar__divider"
|
|
565
|
-
})) : (u(), g(n(
|
|
566
|
+
})) : (u(), g(n(se), F({
|
|
566
567
|
key: 1,
|
|
567
568
|
mode: e.mode,
|
|
568
569
|
size: e.size,
|
|
@@ -571,7 +572,7 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
571
572
|
background: e.background,
|
|
572
573
|
button: e.button,
|
|
573
574
|
dropdown: e.dropdown,
|
|
574
|
-
disabled: n(
|
|
575
|
+
disabled: n(qe)(e.disabled, p).value
|
|
575
576
|
}, p, {
|
|
576
577
|
onClick: s,
|
|
577
578
|
onCommand: (f) => c(p, f)
|
|
@@ -581,7 +582,7 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
581
582
|
_: 1
|
|
582
583
|
}));
|
|
583
584
|
}
|
|
584
|
-
}),
|
|
585
|
+
}), cn = {
|
|
585
586
|
/**
|
|
586
587
|
* 组件渲染html标签
|
|
587
588
|
*/
|
|
@@ -697,12 +698,12 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
697
698
|
autoPointer: {
|
|
698
699
|
type: Boolean
|
|
699
700
|
}
|
|
700
|
-
},
|
|
701
|
+
}, I = /* @__PURE__ */ V({
|
|
701
702
|
name: "XContainer",
|
|
702
703
|
__name: "Container",
|
|
703
|
-
props:
|
|
704
|
+
props: cn,
|
|
704
705
|
setup(a) {
|
|
705
|
-
const o = a, e =
|
|
706
|
+
const o = a, e = We(), t = de(), l = y(() => {
|
|
706
707
|
const i = t?.parent;
|
|
707
708
|
if (!i)
|
|
708
709
|
return !1;
|
|
@@ -733,7 +734,7 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
733
734
|
});
|
|
734
735
|
return (i, r) => (u(), g(J(o.tag), {
|
|
735
736
|
class: W(["x-container", s.value]),
|
|
736
|
-
style:
|
|
737
|
+
style: pe(c.value)
|
|
737
738
|
}, {
|
|
738
739
|
default: d(() => [
|
|
739
740
|
x(i.$slots, "default")
|
|
@@ -741,7 +742,7 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
741
742
|
_: 3
|
|
742
743
|
}, 8, ["class", "style"]));
|
|
743
744
|
}
|
|
744
|
-
}),
|
|
745
|
+
}), un = {
|
|
745
746
|
size: {
|
|
746
747
|
type: String,
|
|
747
748
|
default: "default"
|
|
@@ -762,27 +763,27 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
762
763
|
more: {
|
|
763
764
|
type: Boolean
|
|
764
765
|
}
|
|
765
|
-
},
|
|
766
|
+
}, dn = {
|
|
766
767
|
key: 0,
|
|
767
768
|
class: "x-header__actions"
|
|
768
|
-
},
|
|
769
|
+
}, pn = /* @__PURE__ */ V({
|
|
769
770
|
name: "XHeader",
|
|
770
771
|
inheritAttrs: !1,
|
|
771
772
|
__name: "Header",
|
|
772
|
-
props:
|
|
773
|
+
props: un,
|
|
773
774
|
setup(a) {
|
|
774
|
-
const o = a, e = _e(Ae(o, "icon")), t =
|
|
775
|
+
const o = a, e = _e(Ae(o, "icon")), t = We(), l = y(() => ({
|
|
775
776
|
[`is-size-${o.size}`]: !!o.size && o.size !== "default",
|
|
776
777
|
"is-border": o.border,
|
|
777
778
|
"is-pointer": !!t.onClick
|
|
778
779
|
}));
|
|
779
|
-
return (s, c) => (u(), g(n(
|
|
780
|
+
return (s, c) => (u(), g(n(I), {
|
|
780
781
|
class: W(["x-header", l.value]),
|
|
781
782
|
justify: "space-between",
|
|
782
783
|
align: "center"
|
|
783
784
|
}, {
|
|
784
785
|
default: d(() => [
|
|
785
|
-
_(n(
|
|
786
|
+
_(n(I), {
|
|
786
787
|
align: "center",
|
|
787
788
|
class: W(["x-header__wrapper", l.value]),
|
|
788
789
|
grow: ""
|
|
@@ -802,10 +803,10 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
802
803
|
R(A(o.content), 1)
|
|
803
804
|
])
|
|
804
805
|
]),
|
|
805
|
-
o.more ? (u(), g(n(
|
|
806
|
+
o.more ? (u(), g(n(ue), {
|
|
806
807
|
key: 1,
|
|
807
808
|
class: "x-header__more",
|
|
808
|
-
icon: n(
|
|
809
|
+
icon: n(vo)
|
|
809
810
|
}, null, 8, ["icon"])) : v("", !0),
|
|
810
811
|
o.subtitle || s.$slots.subtitle ? (u(), C("span", {
|
|
811
812
|
key: 2,
|
|
@@ -820,14 +821,14 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
820
821
|
]),
|
|
821
822
|
_: 3
|
|
822
823
|
}, 8, ["class"]),
|
|
823
|
-
s.$slots.actions ? (u(), C("div",
|
|
824
|
+
s.$slots.actions ? (u(), C("div", dn, [
|
|
824
825
|
x(s.$slots, "actions")
|
|
825
826
|
])) : v("", !0)
|
|
826
827
|
]),
|
|
827
828
|
_: 3
|
|
828
829
|
}, 8, ["class"]));
|
|
829
830
|
}
|
|
830
|
-
}),
|
|
831
|
+
}), fn = {
|
|
831
832
|
/**
|
|
832
833
|
* 宽高自适应
|
|
833
834
|
*/
|
|
@@ -891,10 +892,10 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
891
892
|
footer: {
|
|
892
893
|
type: Object
|
|
893
894
|
}
|
|
894
|
-
},
|
|
895
|
+
}, Pe = /* @__PURE__ */ V({
|
|
895
896
|
name: "XPanel",
|
|
896
897
|
__name: "Panel",
|
|
897
|
-
props:
|
|
898
|
+
props: fn,
|
|
898
899
|
setup(a, { expose: o }) {
|
|
899
900
|
const e = a, t = O(), l = y(() => ({
|
|
900
901
|
"x-panel--card": !!e.card,
|
|
@@ -912,7 +913,7 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
912
913
|
}), c = y(() => e.fit || e.height ? "auto" : void 0);
|
|
913
914
|
return o({
|
|
914
915
|
bodyRef: t
|
|
915
|
-
}), (i, r) => (u(), g(n(
|
|
916
|
+
}), (i, r) => (u(), g(n(I), {
|
|
916
917
|
class: W(["x-panel", l.value]),
|
|
917
918
|
direction: "column",
|
|
918
919
|
fit: e.fit,
|
|
@@ -920,14 +921,14 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
920
921
|
height: e.height
|
|
921
922
|
}, {
|
|
922
923
|
default: d(() => [
|
|
923
|
-
s.value ? (u(), g(n(
|
|
924
|
+
s.value ? (u(), g(n(I), {
|
|
924
925
|
key: 0,
|
|
925
926
|
flex: !1,
|
|
926
927
|
class: "x-panel__header"
|
|
927
928
|
}, {
|
|
928
929
|
default: d(() => [
|
|
929
930
|
x(i.$slots, "header", {}, () => [
|
|
930
|
-
_(n(
|
|
931
|
+
_(n(pn), le(he(s.value)), {
|
|
931
932
|
default: d(() => [
|
|
932
933
|
x(i.$slots, "title")
|
|
933
934
|
]),
|
|
@@ -940,7 +941,7 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
940
941
|
]),
|
|
941
942
|
_: 3
|
|
942
943
|
})) : v("", !0),
|
|
943
|
-
_(n(
|
|
944
|
+
_(n(I), F({
|
|
944
945
|
ref_key: "bodyRef",
|
|
945
946
|
ref: t,
|
|
946
947
|
flex: !1,
|
|
@@ -954,7 +955,7 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
954
955
|
]),
|
|
955
956
|
_: 3
|
|
956
957
|
}, 16, ["overflow"]),
|
|
957
|
-
i.$slots.footer ? (u(), g(n(
|
|
958
|
+
i.$slots.footer ? (u(), g(n(I), F({
|
|
958
959
|
key: 1,
|
|
959
960
|
flex: !1,
|
|
960
961
|
padding: "",
|
|
@@ -969,10 +970,10 @@ const cn = { key: 0 }, un = /* @__PURE__ */ P({
|
|
|
969
970
|
_: 3
|
|
970
971
|
}, 8, ["class", "fit", "width", "height"]));
|
|
971
972
|
}
|
|
972
|
-
}),
|
|
973
|
-
class
|
|
973
|
+
}), ct = "user-select-none";
|
|
974
|
+
class ut {
|
|
974
975
|
constructor(o, e = {}) {
|
|
975
|
-
this.el = o, this.options = e, this.scope =
|
|
976
|
+
this.el = o, this.options = e, this.scope = ft(), this.scope.run(() => {
|
|
976
977
|
this.init();
|
|
977
978
|
});
|
|
978
979
|
}
|
|
@@ -993,26 +994,26 @@ class dt {
|
|
|
993
994
|
let i = null;
|
|
994
995
|
const r = this.getHandle(), p = this.getTarget();
|
|
995
996
|
let f = o.getBoundingClientRect(), m = null;
|
|
996
|
-
const { x:
|
|
997
|
+
const { x: b, y: h } = Vo(o, {
|
|
997
998
|
initialValue: { x: f.x, y: f.y },
|
|
998
999
|
...e,
|
|
999
1000
|
handle: r,
|
|
1000
|
-
onStart: (w,
|
|
1001
|
-
document.body.classList.add(
|
|
1002
|
-
this.dragging = !0, f = o.getBoundingClientRect(), m = p?.getBoundingClientRect(), s && s(w,
|
|
1001
|
+
onStart: (w, M) => {
|
|
1002
|
+
document.body.classList.add(ct), clearTimeout(i), i = setTimeout(() => {
|
|
1003
|
+
this.dragging = !0, f = o.getBoundingClientRect(), m = p?.getBoundingClientRect(), s && s(w, M);
|
|
1003
1004
|
}, l);
|
|
1004
1005
|
},
|
|
1005
|
-
onEnd: (w,
|
|
1006
|
-
if (clearTimeout(i), document.body.classList.remove(
|
|
1006
|
+
onEnd: (w, M) => {
|
|
1007
|
+
if (clearTimeout(i), document.body.classList.remove(ct), this.dragging && m) {
|
|
1007
1008
|
this.dragging = !1;
|
|
1008
|
-
const { x: z, y:
|
|
1009
|
-
c && c(
|
|
1009
|
+
const { x: z, y: E } = w, B = this.getPosition(m, f, z, E);
|
|
1010
|
+
c && c(B, M), m = null;
|
|
1010
1011
|
}
|
|
1011
1012
|
}
|
|
1012
1013
|
});
|
|
1013
|
-
L([
|
|
1014
|
+
L([b, h], () => {
|
|
1014
1015
|
if (this.dragging && m) {
|
|
1015
|
-
const w = this.getPosition(m, f,
|
|
1016
|
+
const w = this.getPosition(m, f, b.value, h.value);
|
|
1016
1017
|
o.style.left = `${w.x}px`, o.style.top = `${w.y}px`;
|
|
1017
1018
|
}
|
|
1018
1019
|
});
|
|
@@ -1028,24 +1029,24 @@ class dt {
|
|
|
1028
1029
|
this.scope.stop();
|
|
1029
1030
|
}
|
|
1030
1031
|
}
|
|
1031
|
-
const
|
|
1032
|
+
const mn = {
|
|
1032
1033
|
mounted(a, o) {
|
|
1033
|
-
const e = o.value || {}, t = new
|
|
1034
|
+
const e = o.value || {}, t = new ut(a, e);
|
|
1034
1035
|
a.__draggable__ = t;
|
|
1035
1036
|
},
|
|
1036
1037
|
updated(a, o) {
|
|
1037
1038
|
const e = o.value || {};
|
|
1038
1039
|
let t = a.__draggable__;
|
|
1039
|
-
t && !
|
|
1040
|
+
t && !Ze(t.options, e) && (t.destory(), a.__draggable__ = new ut(a, e));
|
|
1040
1041
|
},
|
|
1041
1042
|
unmounted(a) {
|
|
1042
1043
|
const o = a.__draggable__;
|
|
1043
1044
|
o && (o.destory(), a.__draggable__ = null);
|
|
1044
1045
|
}
|
|
1045
|
-
},
|
|
1046
|
-
class
|
|
1046
|
+
}, Ue = "user-select-none";
|
|
1047
|
+
class dt {
|
|
1047
1048
|
constructor(o, e = {}) {
|
|
1048
|
-
this.el = o, this.options = e, this.scope =
|
|
1049
|
+
this.el = o, this.options = e, this.scope = ft(), this.scope.run(() => {
|
|
1049
1050
|
this.init();
|
|
1050
1051
|
});
|
|
1051
1052
|
}
|
|
@@ -1059,7 +1060,7 @@ class pt {
|
|
|
1059
1060
|
const { el: o, options: e } = this, { disabled: t, onStart: l, onEnd: s } = e;
|
|
1060
1061
|
if (t)
|
|
1061
1062
|
return;
|
|
1062
|
-
this.MIE =
|
|
1063
|
+
this.MIE = Ao(o), this.cleanMousedown = De(document, "mousedown", () => {
|
|
1063
1064
|
this.direction?.value && this.MIE && (this.resizing.value = !0, o.classList.add("is-resizing", `is-${this.direction.value}-resizing`), l && l(this.direction.value, this.MIE));
|
|
1064
1065
|
}), this.cleanMouseup = De(document, "mouseup", () => {
|
|
1065
1066
|
this.resizing.value && this.direction?.value && this.MIE && (o.classList.remove(
|
|
@@ -1068,7 +1069,7 @@ class pt {
|
|
|
1068
1069
|
), s && s(this.direction.value, this.MIE)), this.resizing.value = !1;
|
|
1069
1070
|
}), L(this.direction, (r) => {
|
|
1070
1071
|
const p = document.body;
|
|
1071
|
-
p.style.cursor = r ? `${r}-resize` : "", r ? p.classList.add(
|
|
1072
|
+
p.style.cursor = r ? `${r}-resize` : "", r ? p.classList.add(Ue) : p.classList.remove(Ue);
|
|
1072
1073
|
});
|
|
1073
1074
|
const { x: c, y: i } = this.MIE;
|
|
1074
1075
|
L([c, i], () => {
|
|
@@ -1079,35 +1080,35 @@ class pt {
|
|
|
1079
1080
|
const { MIE: o, direction: e, resizing: t, options: l, el: s } = this, c = e?.value || "";
|
|
1080
1081
|
if (!o || !t.value || !c)
|
|
1081
1082
|
return;
|
|
1082
|
-
const { x: i, y: r, elementX: p, elementY: f, elementHeight: m, elementWidth:
|
|
1083
|
+
const { x: i, y: r, elementX: p, elementY: f, elementHeight: m, elementWidth: b } = o, { onResizing: h } = l, {
|
|
1083
1084
|
minWidth: w = 0,
|
|
1084
|
-
minHeight:
|
|
1085
|
+
minHeight: M = 0,
|
|
1085
1086
|
maxWidth: z = 99999,
|
|
1086
|
-
maxHeight:
|
|
1087
|
+
maxHeight: E = 99999
|
|
1087
1088
|
} = l;
|
|
1088
1089
|
if (c.includes("e")) {
|
|
1089
|
-
const
|
|
1090
|
-
s.style.width = `${
|
|
1090
|
+
const B = Math.min(Math.max(p.value, w), z);
|
|
1091
|
+
s.style.width = `${B}px`;
|
|
1091
1092
|
}
|
|
1092
1093
|
if (c.includes("s")) {
|
|
1093
|
-
const
|
|
1094
|
-
s.style.height = `${
|
|
1094
|
+
const B = Math.min(Math.max(f.value, M), E);
|
|
1095
|
+
s.style.height = `${B}px`;
|
|
1095
1096
|
}
|
|
1096
1097
|
if (c.includes("w")) {
|
|
1097
|
-
const
|
|
1098
|
-
Math.max(
|
|
1098
|
+
const B = Math.min(
|
|
1099
|
+
Math.max(b.value - p.value, w),
|
|
1099
1100
|
z
|
|
1100
1101
|
);
|
|
1101
|
-
s.style.width = `${
|
|
1102
|
+
s.style.width = `${B}px`, s.style.left = `${i.value}px`;
|
|
1102
1103
|
}
|
|
1103
1104
|
if (c.includes("n")) {
|
|
1104
|
-
const
|
|
1105
|
-
Math.max(m.value - f.value,
|
|
1106
|
-
|
|
1105
|
+
const B = Math.min(
|
|
1106
|
+
Math.max(m.value - f.value, M),
|
|
1107
|
+
E
|
|
1107
1108
|
);
|
|
1108
|
-
this.el.style.height = `${
|
|
1109
|
+
this.el.style.height = `${B}px`, this.el.style.top = `${r.value}px`;
|
|
1109
1110
|
}
|
|
1110
|
-
|
|
1111
|
+
h && h(c, o);
|
|
1111
1112
|
}
|
|
1112
1113
|
getDirection() {
|
|
1113
1114
|
if (!this.MIE)
|
|
@@ -1121,24 +1122,24 @@ class pt {
|
|
|
1121
1122
|
}
|
|
1122
1123
|
destory() {
|
|
1123
1124
|
const o = document.body;
|
|
1124
|
-
o.style.cursor = "", o.classList.remove(
|
|
1125
|
+
o.style.cursor = "", o.classList.remove(Ue), this.cleanMousedown && this.cleanMousedown(), this.cleanMouseup && this.cleanMouseup(), this.MIE?.stop(), this.scope.stop();
|
|
1125
1126
|
}
|
|
1126
1127
|
}
|
|
1127
|
-
const
|
|
1128
|
+
const It = {
|
|
1128
1129
|
mounted(a, o) {
|
|
1129
|
-
const e = o.value || {}, t = new
|
|
1130
|
+
const e = o.value || {}, t = new dt(a, e);
|
|
1130
1131
|
a.__resizable__ = t;
|
|
1131
1132
|
},
|
|
1132
1133
|
updated(a, o) {
|
|
1133
1134
|
const e = o.value || {};
|
|
1134
1135
|
let t = a.__resizable__;
|
|
1135
|
-
t && !
|
|
1136
|
+
t && !Ze(t.options, e) && (t.destory(), a.__resizable__ = new dt(a, e));
|
|
1136
1137
|
},
|
|
1137
1138
|
unmounted(a) {
|
|
1138
1139
|
const o = a.__resizable__;
|
|
1139
1140
|
o && (o.destory(), a.__resizable__ = null);
|
|
1140
1141
|
}
|
|
1141
|
-
},
|
|
1142
|
+
}, gn = {
|
|
1142
1143
|
modelValue: {
|
|
1143
1144
|
type: Boolean,
|
|
1144
1145
|
default: !0
|
|
@@ -1224,8 +1225,8 @@ const Pt = {
|
|
|
1224
1225
|
}
|
|
1225
1226
|
};
|
|
1226
1227
|
let ve = 1e3;
|
|
1227
|
-
function
|
|
1228
|
-
const { width: e, height: t } =
|
|
1228
|
+
function yn(a, o) {
|
|
1229
|
+
const { width: e, height: t } = zt(o), l = Re({
|
|
1229
1230
|
mode: a.mode || "normal",
|
|
1230
1231
|
wrapperWidth: 0,
|
|
1231
1232
|
wrapperHeight: 0,
|
|
@@ -1238,7 +1239,7 @@ function bn(a, o) {
|
|
|
1238
1239
|
resizing: !1
|
|
1239
1240
|
});
|
|
1240
1241
|
return L([e, t], ([s, c]) => {
|
|
1241
|
-
l.wrapperWidth = s, l.wrapperHeight = c, l.width =
|
|
1242
|
+
l.wrapperWidth = s, l.wrapperHeight = c, l.width = $e(a.width, s), l.height = $e(a.height, c), l.left = a.left ? $e(a.left, s) - l.width / 2 : Math.max(Math.floor((s - l.width) / 2), 0), l.top = a.top ? $e(a.top, c) : Math.max(Math.floor((c - l.height) / 2), 0);
|
|
1242
1243
|
}), L(l, (s) => {
|
|
1243
1244
|
ve = Math.max(s.zIndex, ve);
|
|
1244
1245
|
}), {
|
|
@@ -1248,7 +1249,7 @@ function bn(a, o) {
|
|
|
1248
1249
|
minimized: y(() => l.mode === "minimized")
|
|
1249
1250
|
};
|
|
1250
1251
|
}
|
|
1251
|
-
function
|
|
1252
|
+
function vn(a, o) {
|
|
1252
1253
|
const e = y(() => {
|
|
1253
1254
|
const { width: c, height: i, top: r, left: p, zIndex: f } = o;
|
|
1254
1255
|
return {
|
|
@@ -1277,7 +1278,7 @@ function hn(a, o) {
|
|
|
1277
1278
|
modalStyle: s
|
|
1278
1279
|
};
|
|
1279
1280
|
}
|
|
1280
|
-
function
|
|
1281
|
+
function hn(a, o, e) {
|
|
1281
1282
|
const t = (f) => {
|
|
1282
1283
|
o.mode = f, ["maximized", "minimized", "normal"].includes(f) && e(f), e("modeChange", f);
|
|
1283
1284
|
}, l = async () => {
|
|
@@ -1300,11 +1301,11 @@ function _n(a, o, e) {
|
|
|
1300
1301
|
}
|
|
1301
1302
|
};
|
|
1302
1303
|
}
|
|
1303
|
-
function
|
|
1304
|
+
function bn(a, o, e, t) {
|
|
1304
1305
|
return y(() => {
|
|
1305
1306
|
const l = typeof a.draggable == "boolean" ? !a.draggable : !!a.draggable?.disabled;
|
|
1306
1307
|
return {
|
|
1307
|
-
...
|
|
1308
|
+
...Ge(a.draggable) ? a.draggable : {},
|
|
1308
1309
|
disabled: l,
|
|
1309
1310
|
target: t,
|
|
1310
1311
|
selector: ".x-panel__header",
|
|
@@ -1323,13 +1324,13 @@ function kn(a, o, e, t) {
|
|
|
1323
1324
|
};
|
|
1324
1325
|
});
|
|
1325
1326
|
}
|
|
1326
|
-
function
|
|
1327
|
+
function _n(a, o, e) {
|
|
1327
1328
|
return y(() => {
|
|
1328
1329
|
const t = typeof a.resizable == "boolean" ? !a.resizable : !!a.resizable?.disabled;
|
|
1329
1330
|
return {
|
|
1330
1331
|
minWidth: 200,
|
|
1331
1332
|
minHeight: 150,
|
|
1332
|
-
...
|
|
1333
|
+
...Ge(a.resizable) ? a.resizable : {},
|
|
1333
1334
|
disabled: t,
|
|
1334
1335
|
dirs: ["e", "s", "w"],
|
|
1335
1336
|
onStart(l, s) {
|
|
@@ -1344,48 +1345,48 @@ function wn(a, o, e) {
|
|
|
1344
1345
|
};
|
|
1345
1346
|
});
|
|
1346
1347
|
}
|
|
1347
|
-
function
|
|
1348
|
+
function kn(a, o) {
|
|
1348
1349
|
const e = a.componentInstance;
|
|
1349
1350
|
if (!e)
|
|
1350
1351
|
return;
|
|
1351
1352
|
let t = null;
|
|
1352
|
-
return
|
|
1353
|
+
return mt(() => {
|
|
1353
1354
|
const l = n(o), s = n(l?.bodyRef);
|
|
1354
1355
|
t = e.$el, s && s.$el && s.$el.appendChild(t);
|
|
1355
|
-
}),
|
|
1356
|
+
}), gt(() => {
|
|
1356
1357
|
t && t.parentNode && t.parentNode.removeChild(t);
|
|
1357
1358
|
}), {
|
|
1358
1359
|
componentInstance: e
|
|
1359
1360
|
};
|
|
1360
1361
|
}
|
|
1361
|
-
const
|
|
1362
|
+
const wn = ["src"], Bt = /* @__PURE__ */ V({
|
|
1362
1363
|
name: "XDialog",
|
|
1363
1364
|
__name: "Dialog",
|
|
1364
|
-
props:
|
|
1365
|
+
props: gn,
|
|
1365
1366
|
emits: ["update:modelValue", "open", "close", "destroy", "maximized", "minimized", "normal", "modeChange", "dragStart", "dragging", "dragEnd", "resizeStart", "resizeEnd", "resizing", "submit", "cancel"],
|
|
1366
1367
|
setup(a, { expose: o, emit: e }) {
|
|
1367
|
-
const t = a, l = e, s =
|
|
1368
|
+
const t = a, l = e, s = de(), c = O(), i = O(), { state: r, maximized: p, minimized: f, normal: m } = yn(t, c), { styles: b, classes: h, wrapperClass: w, modalStyle: M } = vn(t, r), { changeMode: z, active: E, close: B, show: S, hide: P, submit: T, cancel: j } = hn(
|
|
1368
1369
|
t,
|
|
1369
1370
|
r,
|
|
1370
1371
|
l
|
|
1371
|
-
), k =
|
|
1372
|
-
|
|
1372
|
+
), k = bn(t, r, l, c), H = _n(t, r, l), K = kn(t, i);
|
|
1373
|
+
Je(async () => {
|
|
1373
1374
|
t.modelValue && (await ye(), s && l("open", s));
|
|
1374
1375
|
});
|
|
1375
|
-
const
|
|
1376
|
+
const re = y(() => i.value?.$el);
|
|
1376
1377
|
return o({
|
|
1377
|
-
$vtjEl:
|
|
1378
|
+
$vtjEl: re,
|
|
1378
1379
|
panelRef: i,
|
|
1379
1380
|
state: r,
|
|
1380
1381
|
maximized: p,
|
|
1381
1382
|
minimized: f,
|
|
1382
1383
|
changeMode: z,
|
|
1383
1384
|
show: S,
|
|
1384
|
-
hide:
|
|
1385
|
+
hide: P,
|
|
1385
1386
|
submit: T,
|
|
1386
1387
|
cancel: j,
|
|
1387
1388
|
componentInstance: K
|
|
1388
|
-
}), (Z, ee) => t.modelValue ? (u(), g(
|
|
1389
|
+
}), (Z, ee) => t.modelValue ? (u(), g(yt, {
|
|
1389
1390
|
key: 0,
|
|
1390
1391
|
to: "body"
|
|
1391
1392
|
}, [
|
|
@@ -1397,64 +1398,64 @@ const Sn = ["src"], tt = /* @__PURE__ */ P({
|
|
|
1397
1398
|
t.modal ? (u(), C("div", {
|
|
1398
1399
|
key: 0,
|
|
1399
1400
|
class: "x-dialog__modal",
|
|
1400
|
-
style:
|
|
1401
|
+
style: pe(n(M))
|
|
1401
1402
|
}, null, 4)) : v("", !0),
|
|
1402
|
-
G((u(), g(n(
|
|
1403
|
+
G((u(), g(n(Pe), F({
|
|
1403
1404
|
ref_key: "panelRef",
|
|
1404
1405
|
ref: i,
|
|
1405
|
-
class: ["x-dialog", n(
|
|
1406
|
+
class: ["x-dialog", n(h)],
|
|
1406
1407
|
card: "",
|
|
1407
1408
|
shadow: "always",
|
|
1408
1409
|
header: { icon: t.icon, subtitle: t.subtitle },
|
|
1409
1410
|
width: "800px",
|
|
1410
1411
|
height: "600px",
|
|
1411
1412
|
footer: { justify: "space-between", flex: !0, align: "center" },
|
|
1412
|
-
style: n(
|
|
1413
|
+
style: n(b),
|
|
1413
1414
|
size: t.size,
|
|
1414
1415
|
body: { padding: t.bodyPadding },
|
|
1415
|
-
onClick: n(
|
|
1416
|
-
}, Z.$attrs),
|
|
1416
|
+
onClick: n(E)
|
|
1417
|
+
}, Z.$attrs), be({
|
|
1417
1418
|
title: d(() => [
|
|
1418
1419
|
R(A(t.title), 1)
|
|
1419
1420
|
]),
|
|
1420
1421
|
actions: d(() => [
|
|
1421
1422
|
x(Z.$slots, "actions"),
|
|
1422
|
-
t.minimizable ? (u(), g(n(
|
|
1423
|
+
t.minimizable ? (u(), g(n(se), {
|
|
1423
1424
|
key: 0,
|
|
1424
|
-
icon: n(
|
|
1425
|
+
icon: n(ho),
|
|
1425
1426
|
size: t.size,
|
|
1426
1427
|
mode: "icon",
|
|
1427
1428
|
type: "primary",
|
|
1428
1429
|
background: "hover",
|
|
1429
|
-
onClick: ee[0] || (ee[0] = (
|
|
1430
|
+
onClick: ee[0] || (ee[0] = (ce) => n(z)("minimized"))
|
|
1430
1431
|
}, null, 8, ["icon", "size"])) : v("", !0),
|
|
1431
1432
|
t.maximizable ? (u(), C(Q, { key: 1 }, [
|
|
1432
|
-
n(m) ? (u(), g(n(
|
|
1433
|
+
n(m) ? (u(), g(n(se), {
|
|
1433
1434
|
key: 1,
|
|
1434
|
-
icon: n(
|
|
1435
|
+
icon: n(_o),
|
|
1435
1436
|
size: t.size,
|
|
1436
1437
|
mode: "icon",
|
|
1437
1438
|
type: "primary",
|
|
1438
1439
|
background: "hover",
|
|
1439
|
-
onClick: ee[2] || (ee[2] = (
|
|
1440
|
-
}, null, 8, ["icon", "size"])) : (u(), g(n(
|
|
1440
|
+
onClick: ee[2] || (ee[2] = (ce) => n(z)("maximized"))
|
|
1441
|
+
}, null, 8, ["icon", "size"])) : (u(), g(n(se), {
|
|
1441
1442
|
key: 0,
|
|
1442
|
-
icon: n(
|
|
1443
|
+
icon: n(bo),
|
|
1443
1444
|
size: t.size,
|
|
1444
1445
|
mode: "icon",
|
|
1445
1446
|
type: "primary",
|
|
1446
1447
|
background: "hover",
|
|
1447
|
-
onClick: ee[1] || (ee[1] = (
|
|
1448
|
+
onClick: ee[1] || (ee[1] = (ce) => n(z)("normal"))
|
|
1448
1449
|
}, null, 8, ["icon", "size"]))
|
|
1449
1450
|
], 64)) : v("", !0),
|
|
1450
|
-
t.closable ? (u(), g(n(
|
|
1451
|
+
t.closable ? (u(), g(n(se), {
|
|
1451
1452
|
key: 2,
|
|
1452
|
-
icon: n(
|
|
1453
|
+
icon: n(ko),
|
|
1453
1454
|
size: t.size,
|
|
1454
1455
|
mode: "icon",
|
|
1455
1456
|
type: "danger",
|
|
1456
1457
|
background: "hover",
|
|
1457
|
-
onClick: n(
|
|
1458
|
+
onClick: n(B)
|
|
1458
1459
|
}, null, 8, ["icon", "size", "onClick"])) : v("", !0)
|
|
1459
1460
|
]),
|
|
1460
1461
|
default: d(() => [
|
|
@@ -1464,7 +1465,7 @@ const Sn = ["src"], tt = /* @__PURE__ */ P({
|
|
|
1464
1465
|
key: 1,
|
|
1465
1466
|
src: t.src,
|
|
1466
1467
|
class: "x-dialog__frame"
|
|
1467
|
-
}, null, 8,
|
|
1468
|
+
}, null, 8, wn)) : v("", !0)
|
|
1468
1469
|
])
|
|
1469
1470
|
]),
|
|
1470
1471
|
_: 2
|
|
@@ -1473,13 +1474,13 @@ const Sn = ["src"], tt = /* @__PURE__ */ P({
|
|
|
1473
1474
|
name: "footer",
|
|
1474
1475
|
fn: d(() => [
|
|
1475
1476
|
x(Z.$slots, "footer", {}, () => [
|
|
1476
|
-
_(n(
|
|
1477
|
+
_(n(I), { align: "center" }, {
|
|
1477
1478
|
default: d(() => [
|
|
1478
1479
|
x(Z.$slots, "extra")
|
|
1479
1480
|
]),
|
|
1480
1481
|
_: 3
|
|
1481
1482
|
}),
|
|
1482
|
-
_(n(
|
|
1483
|
+
_(n(I), { align: "center" }, {
|
|
1483
1484
|
default: d(() => [
|
|
1484
1485
|
x(Z.$slots, "handle"),
|
|
1485
1486
|
t.cancel ? (u(), g(n(ie), {
|
|
@@ -1512,18 +1513,18 @@ const Sn = ["src"], tt = /* @__PURE__ */ P({
|
|
|
1512
1513
|
key: "0"
|
|
1513
1514
|
} : void 0
|
|
1514
1515
|
]), 1040, ["header", "class", "style", "size", "body", "onClick"])), [
|
|
1515
|
-
[n(
|
|
1516
|
-
[n(
|
|
1516
|
+
[n(mn), n(k)],
|
|
1517
|
+
[n(It), n(H)]
|
|
1517
1518
|
])
|
|
1518
1519
|
], 2)
|
|
1519
1520
|
])) : v("", !0);
|
|
1520
1521
|
}
|
|
1521
1522
|
});
|
|
1522
|
-
function
|
|
1523
|
-
const e = document.createElement("div"), t = _(
|
|
1524
|
-
t.appContext = o ??
|
|
1523
|
+
function tt(a, o) {
|
|
1524
|
+
const e = document.createElement("div"), t = _(Bt, a);
|
|
1525
|
+
t.appContext = o ?? tt._context, ot(t, e);
|
|
1525
1526
|
const l = () => {
|
|
1526
|
-
|
|
1527
|
+
ot(null, e), e.parentNode?.removeChild(e);
|
|
1527
1528
|
};
|
|
1528
1529
|
return t.props.onDestroy = () => {
|
|
1529
1530
|
l();
|
|
@@ -1532,14 +1533,14 @@ function ot(a, o) {
|
|
|
1532
1533
|
destroy: l
|
|
1533
1534
|
};
|
|
1534
1535
|
}
|
|
1535
|
-
const
|
|
1536
|
+
const xn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -1), Sn = /* @__PURE__ */ V({
|
|
1536
1537
|
__name: "Sidebar",
|
|
1537
1538
|
props: {
|
|
1538
1539
|
collapsed: { type: Boolean }
|
|
1539
1540
|
},
|
|
1540
1541
|
setup(a) {
|
|
1541
1542
|
const o = a;
|
|
1542
|
-
return (e, t) => G((u(), g(n(
|
|
1543
|
+
return (e, t) => G((u(), g(n(I), {
|
|
1543
1544
|
class: W(["x-mask-sidebar", { "is-collapsed": o.collapsed }]),
|
|
1544
1545
|
grow: !1,
|
|
1545
1546
|
flex: "",
|
|
@@ -1547,7 +1548,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1547
1548
|
}, {
|
|
1548
1549
|
default: d(() => [
|
|
1549
1550
|
x(e.$slots, "brand"),
|
|
1550
|
-
_(n(
|
|
1551
|
+
_(n(I), {
|
|
1551
1552
|
class: "x-mask-sidebar__wrapper",
|
|
1552
1553
|
flex: "",
|
|
1553
1554
|
grow: "",
|
|
@@ -1557,14 +1558,14 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1557
1558
|
}, {
|
|
1558
1559
|
default: d(() => [
|
|
1559
1560
|
x(e.$slots, "default"),
|
|
1560
|
-
|
|
1561
|
+
xn
|
|
1561
1562
|
]),
|
|
1562
1563
|
_: 3
|
|
1563
1564
|
})
|
|
1564
1565
|
]),
|
|
1565
1566
|
_: 3
|
|
1566
1567
|
}, 8, ["class"])), [
|
|
1567
|
-
[n(
|
|
1568
|
+
[n(It), {
|
|
1568
1569
|
dirs: ["e"],
|
|
1569
1570
|
disabled: o.collapsed,
|
|
1570
1571
|
maxWidth: 500,
|
|
@@ -1572,7 +1573,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1572
1573
|
}]
|
|
1573
1574
|
]);
|
|
1574
1575
|
}
|
|
1575
|
-
}),
|
|
1576
|
+
}), zn = /* @__PURE__ */ V({
|
|
1576
1577
|
__name: "SwitchBar",
|
|
1577
1578
|
props: {
|
|
1578
1579
|
collasped: { type: Boolean, default: !1 },
|
|
@@ -1596,40 +1597,40 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1596
1597
|
}, m = () => {
|
|
1597
1598
|
t("update:favorite", c.value);
|
|
1598
1599
|
};
|
|
1599
|
-
return (
|
|
1600
|
+
return (b, h) => (u(), g(n(I), {
|
|
1600
1601
|
class: "x-mask-switch-bar",
|
|
1601
1602
|
justify: "space-between",
|
|
1602
1603
|
align: "center"
|
|
1603
1604
|
}, {
|
|
1604
1605
|
default: d(() => [
|
|
1605
|
-
e.collasped ? v("", !0) : (u(), g(n(
|
|
1606
|
+
e.collasped ? v("", !0) : (u(), g(n(I), {
|
|
1606
1607
|
key: 0,
|
|
1607
1608
|
class: "x-mask-switch-bar__left",
|
|
1608
1609
|
grow: ""
|
|
1609
1610
|
}, {
|
|
1610
1611
|
default: d(() => [
|
|
1611
|
-
l.value ? v("", !0) : (u(), g(n(
|
|
1612
|
+
l.value ? v("", !0) : (u(), g(n(Qe), {
|
|
1612
1613
|
key: 0,
|
|
1613
1614
|
modelValue: c.value,
|
|
1614
|
-
"onUpdate:modelValue":
|
|
1615
|
+
"onUpdate:modelValue": h[0] || (h[0] = (w) => c.value = w),
|
|
1615
1616
|
class: "x-mask-switch-bar__switch",
|
|
1616
|
-
"active-icon": n(
|
|
1617
|
-
"inactive-icon": n(
|
|
1617
|
+
"active-icon": n(wt),
|
|
1618
|
+
"inactive-icon": n(wo),
|
|
1618
1619
|
onChange: m
|
|
1619
1620
|
}, null, 8, ["modelValue", "active-icon", "inactive-icon"])),
|
|
1620
|
-
l.value ? (u(), g(n(
|
|
1621
|
+
l.value ? (u(), g(n(ze), {
|
|
1621
1622
|
key: 1,
|
|
1622
1623
|
modelValue: s.value,
|
|
1623
|
-
"onUpdate:modelValue":
|
|
1624
|
+
"onUpdate:modelValue": h[1] || (h[1] = (w) => s.value = w),
|
|
1624
1625
|
class: "x-mask-switch-bar__input",
|
|
1625
1626
|
size: "small",
|
|
1626
1627
|
placeholder: "请输入查询关键字",
|
|
1627
1628
|
onInput: f,
|
|
1628
|
-
"prefix-icon": n(
|
|
1629
|
+
"prefix-icon": n(Le)
|
|
1629
1630
|
}, {
|
|
1630
1631
|
suffix: d(() => [
|
|
1631
|
-
_(n(
|
|
1632
|
-
icon: n(
|
|
1632
|
+
_(n(ue), {
|
|
1633
|
+
icon: n(xt),
|
|
1633
1634
|
onClick: r
|
|
1634
1635
|
}, null, 8, ["icon"])
|
|
1635
1636
|
]),
|
|
@@ -1638,34 +1639,34 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1638
1639
|
]),
|
|
1639
1640
|
_: 1
|
|
1640
1641
|
})),
|
|
1641
|
-
_(n(
|
|
1642
|
+
_(n(I), {
|
|
1642
1643
|
class: W(["x-mask-switch-bar__right", { "is-collasped": e.collasped }]),
|
|
1643
1644
|
flex: "",
|
|
1644
1645
|
align: "center",
|
|
1645
1646
|
justify: "center"
|
|
1646
1647
|
}, {
|
|
1647
1648
|
default: d(() => [
|
|
1648
|
-
!l.value && !e.collasped ? (u(), g(n(
|
|
1649
|
+
!l.value && !e.collasped ? (u(), g(n(se), {
|
|
1649
1650
|
key: 0,
|
|
1650
|
-
icon: n(
|
|
1651
|
+
icon: n(Le),
|
|
1651
1652
|
mode: "icon",
|
|
1652
1653
|
background: "hover",
|
|
1653
1654
|
size: "default",
|
|
1654
1655
|
circle: "",
|
|
1655
1656
|
onClick: i
|
|
1656
1657
|
}, null, 8, ["icon"])) : v("", !0),
|
|
1657
|
-
e.collasped ? (u(), g(n(
|
|
1658
|
+
e.collasped ? (u(), g(n(se), {
|
|
1658
1659
|
key: 1,
|
|
1659
|
-
icon: n(
|
|
1660
|
+
icon: n(xo),
|
|
1660
1661
|
mode: "icon",
|
|
1661
1662
|
size: "default",
|
|
1662
1663
|
background: "hover",
|
|
1663
1664
|
onClick: p,
|
|
1664
1665
|
circle: ""
|
|
1665
1666
|
}, null, 8, ["icon"])) : v("", !0),
|
|
1666
|
-
e.collasped ? v("", !0) : (u(), g(n(
|
|
1667
|
+
e.collasped ? v("", !0) : (u(), g(n(se), {
|
|
1667
1668
|
key: 2,
|
|
1668
|
-
icon: n(
|
|
1669
|
+
icon: n(So),
|
|
1669
1670
|
mode: "icon",
|
|
1670
1671
|
size: "default",
|
|
1671
1672
|
background: "hover",
|
|
@@ -1679,7 +1680,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1679
1680
|
_: 1
|
|
1680
1681
|
}));
|
|
1681
1682
|
}
|
|
1682
|
-
}),
|
|
1683
|
+
}), Cn = ["src"], Tn = { key: 0 }, $n = /* @__PURE__ */ V({
|
|
1683
1684
|
__name: "Brand",
|
|
1684
1685
|
props: {
|
|
1685
1686
|
collapsed: { type: Boolean, default: !1 },
|
|
@@ -1688,15 +1689,15 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1688
1689
|
url: {}
|
|
1689
1690
|
},
|
|
1690
1691
|
setup(a) {
|
|
1691
|
-
const o = a, e =
|
|
1692
|
+
const o = a, e = Ye(), t = () => {
|
|
1692
1693
|
o.url && e.push(o.url);
|
|
1693
1694
|
};
|
|
1694
|
-
return (l, s) => (u(), g(n(
|
|
1695
|
+
return (l, s) => (u(), g(n(I), {
|
|
1695
1696
|
class: W(["x-mask-brand", { "is-collapsed": o.collapsed }]),
|
|
1696
1697
|
align: "center"
|
|
1697
1698
|
}, {
|
|
1698
1699
|
default: d(() => [
|
|
1699
|
-
_(n(
|
|
1700
|
+
_(n(I), {
|
|
1700
1701
|
class: "x-mask-brand__logo",
|
|
1701
1702
|
flex: "",
|
|
1702
1703
|
justify: "center",
|
|
@@ -1708,18 +1709,18 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1708
1709
|
o.logo ? (u(), C("img", {
|
|
1709
1710
|
key: 0,
|
|
1710
1711
|
src: o.logo
|
|
1711
|
-
}, null, 8,
|
|
1712
|
+
}, null, 8, Cn)) : v("", !0)
|
|
1712
1713
|
])
|
|
1713
1714
|
]),
|
|
1714
1715
|
_: 3
|
|
1715
1716
|
}),
|
|
1716
|
-
_(n(
|
|
1717
|
+
_(n(I), {
|
|
1717
1718
|
class: "x-mask-brand__title",
|
|
1718
1719
|
flex: "",
|
|
1719
1720
|
align: "center"
|
|
1720
1721
|
}, {
|
|
1721
1722
|
default: d(() => [
|
|
1722
|
-
o.title ? (u(), C("span",
|
|
1723
|
+
o.title ? (u(), C("span", Tn, [
|
|
1723
1724
|
x(l.$slots, "title", {}, () => [
|
|
1724
1725
|
R(A(o.title), 1)
|
|
1725
1726
|
])
|
|
@@ -1731,7 +1732,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1731
1732
|
_: 3
|
|
1732
1733
|
}, 8, ["class"]));
|
|
1733
1734
|
}
|
|
1734
|
-
}),
|
|
1735
|
+
}), Ee = "__favorites__", Me = "__search__", En = /* @__PURE__ */ V({
|
|
1735
1736
|
__name: "Menu",
|
|
1736
1737
|
props: {
|
|
1737
1738
|
collapse: { type: Boolean, default: !1 },
|
|
@@ -1746,12 +1747,12 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1746
1747
|
setup(a, { emit: o }) {
|
|
1747
1748
|
const e = a, t = y(() => e.menus || []), l = o, s = y(() => String(e.active?.id)), c = y(() => [
|
|
1748
1749
|
{
|
|
1749
|
-
id:
|
|
1750
|
+
id: Ee,
|
|
1750
1751
|
title: "收藏",
|
|
1751
|
-
icon:
|
|
1752
|
+
icon: St,
|
|
1752
1753
|
children: e.favorites?.length ? e.favorites : [
|
|
1753
1754
|
{
|
|
1754
|
-
id:
|
|
1755
|
+
id: Ee + "empty",
|
|
1755
1756
|
disabled: !0,
|
|
1756
1757
|
title: "暂无收藏菜单"
|
|
1757
1758
|
}
|
|
@@ -1761,12 +1762,12 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1761
1762
|
const p = (e.keyword || "").trim(), f = p ? (e.flatMenus || []).filter((m) => m.title?.includes(p)) : [];
|
|
1762
1763
|
return [
|
|
1763
1764
|
{
|
|
1764
|
-
id:
|
|
1765
|
+
id: Me,
|
|
1765
1766
|
title: "搜索",
|
|
1766
|
-
icon:
|
|
1767
|
+
icon: Le,
|
|
1767
1768
|
children: f?.length ? f : [
|
|
1768
1769
|
{
|
|
1769
|
-
id:
|
|
1770
|
+
id: Me + "empty",
|
|
1770
1771
|
disabled: !0,
|
|
1771
1772
|
title: "查询匹配不到菜单项"
|
|
1772
1773
|
}
|
|
@@ -1777,14 +1778,14 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1777
1778
|
l("select", p);
|
|
1778
1779
|
};
|
|
1779
1780
|
return (p, f) => (u(), C(Q, null, [
|
|
1780
|
-
G(_(n(
|
|
1781
|
+
G(_(n(I), {
|
|
1781
1782
|
class: "x-mask-menu",
|
|
1782
1783
|
grow: "",
|
|
1783
1784
|
flex: !1,
|
|
1784
1785
|
overflow: "auto"
|
|
1785
1786
|
}, {
|
|
1786
1787
|
default: d(() => [
|
|
1787
|
-
G(_(n(
|
|
1788
|
+
G(_(n(me), {
|
|
1788
1789
|
subMenu: {
|
|
1789
1790
|
popperClass: "x-mask-menu-popper",
|
|
1790
1791
|
teleported: !0,
|
|
@@ -1792,45 +1793,45 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1792
1793
|
hideTimeout: 200
|
|
1793
1794
|
},
|
|
1794
1795
|
data: t.value,
|
|
1795
|
-
"default-icon": n(
|
|
1796
|
+
"default-icon": n(fe),
|
|
1796
1797
|
collapse: !0,
|
|
1797
1798
|
"collapse-transition": !1,
|
|
1798
1799
|
"default-active": s.value,
|
|
1799
1800
|
onSelect: r
|
|
1800
1801
|
}, null, 8, ["data", "default-icon", "default-active"]), [
|
|
1801
|
-
[
|
|
1802
|
+
[oe, e.collapse]
|
|
1802
1803
|
]),
|
|
1803
|
-
G(_(n(
|
|
1804
|
+
G(_(n(me), {
|
|
1804
1805
|
subMenu: {
|
|
1805
1806
|
popperClass: "x-mask-menu-popper",
|
|
1806
1807
|
teleported: !0
|
|
1807
1808
|
},
|
|
1808
1809
|
data: t.value,
|
|
1809
|
-
"default-icon": n(
|
|
1810
|
+
"default-icon": n(fe),
|
|
1810
1811
|
collapse: !1,
|
|
1811
1812
|
"collapse-transition": !1,
|
|
1812
1813
|
"default-active": s.value,
|
|
1813
1814
|
onSelect: r
|
|
1814
1815
|
}, null, 8, ["data", "default-icon", "default-active"]), [
|
|
1815
|
-
[
|
|
1816
|
+
[oe, !e.collapse]
|
|
1816
1817
|
]),
|
|
1817
|
-
t.value.length ? v("", !0) : (u(), g(n(
|
|
1818
|
+
t.value.length ? v("", !0) : (u(), g(n(bt), {
|
|
1818
1819
|
key: 0,
|
|
1819
1820
|
description: "暂无菜单数据"
|
|
1820
1821
|
}))
|
|
1821
1822
|
]),
|
|
1822
1823
|
_: 1
|
|
1823
1824
|
}, 512), [
|
|
1824
|
-
[
|
|
1825
|
+
[oe, !e.favorite && !e.keyword]
|
|
1825
1826
|
]),
|
|
1826
|
-
G(_(n(
|
|
1827
|
+
G(_(n(I), {
|
|
1827
1828
|
class: "x-mask-menu",
|
|
1828
1829
|
grow: "",
|
|
1829
1830
|
flex: !1,
|
|
1830
1831
|
overflow: "auto"
|
|
1831
1832
|
}, {
|
|
1832
1833
|
default: d(() => [
|
|
1833
|
-
G(_(n(
|
|
1834
|
+
G(_(n(me), {
|
|
1834
1835
|
class: "x-mask-menu__favorites",
|
|
1835
1836
|
subMenu: {
|
|
1836
1837
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1839,16 +1840,16 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1839
1840
|
hideTimeout: 200
|
|
1840
1841
|
},
|
|
1841
1842
|
data: c.value,
|
|
1842
|
-
"default-icon": n(
|
|
1843
|
+
"default-icon": n(fe),
|
|
1843
1844
|
collapse: !0,
|
|
1844
1845
|
"collapse-transition": !1,
|
|
1845
1846
|
"default-active": s.value,
|
|
1846
|
-
"default-openeds": [
|
|
1847
|
+
"default-openeds": [Ee],
|
|
1847
1848
|
onSelect: r
|
|
1848
1849
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1849
|
-
[
|
|
1850
|
+
[oe, e.collapse]
|
|
1850
1851
|
]),
|
|
1851
|
-
G(_(n(
|
|
1852
|
+
G(_(n(me), {
|
|
1852
1853
|
class: "x-mask-menu__favorites",
|
|
1853
1854
|
subMenu: {
|
|
1854
1855
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1857,21 +1858,21 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1857
1858
|
hideTimeout: 200
|
|
1858
1859
|
},
|
|
1859
1860
|
data: c.value,
|
|
1860
|
-
"default-icon": n(
|
|
1861
|
+
"default-icon": n(fe),
|
|
1861
1862
|
collapse: !1,
|
|
1862
1863
|
"collapse-transition": !1,
|
|
1863
1864
|
"default-active": s.value,
|
|
1864
|
-
"default-openeds": [
|
|
1865
|
+
"default-openeds": [Ee],
|
|
1865
1866
|
onSelect: r
|
|
1866
1867
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1867
|
-
[
|
|
1868
|
+
[oe, !e.collapse]
|
|
1868
1869
|
])
|
|
1869
1870
|
]),
|
|
1870
1871
|
_: 1
|
|
1871
1872
|
}, 512), [
|
|
1872
|
-
[
|
|
1873
|
+
[oe, e.favorite && !e.keyword]
|
|
1873
1874
|
]),
|
|
1874
|
-
e.keyword ? G((u(), g(n(
|
|
1875
|
+
e.keyword ? G((u(), g(n(I), {
|
|
1875
1876
|
key: 0,
|
|
1876
1877
|
class: "x-mask-menu",
|
|
1877
1878
|
grow: "",
|
|
@@ -1879,7 +1880,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1879
1880
|
overflow: "auto"
|
|
1880
1881
|
}, {
|
|
1881
1882
|
default: d(() => [
|
|
1882
|
-
G(_(n(
|
|
1883
|
+
G(_(n(me), {
|
|
1883
1884
|
class: "x-mask-menu__search",
|
|
1884
1885
|
subMenu: {
|
|
1885
1886
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1888,16 +1889,16 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1888
1889
|
hideTimeout: 200
|
|
1889
1890
|
},
|
|
1890
1891
|
data: i.value,
|
|
1891
|
-
"default-icon": n(
|
|
1892
|
+
"default-icon": n(fe),
|
|
1892
1893
|
collapse: !0,
|
|
1893
1894
|
"collapse-transition": !1,
|
|
1894
1895
|
"default-active": s.value,
|
|
1895
|
-
"default-openeds": [
|
|
1896
|
+
"default-openeds": [Me],
|
|
1896
1897
|
onSelect: r
|
|
1897
1898
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1898
|
-
[
|
|
1899
|
+
[oe, e.collapse]
|
|
1899
1900
|
]),
|
|
1900
|
-
G(_(n(
|
|
1901
|
+
G(_(n(me), {
|
|
1901
1902
|
class: "x-mask-menu__search",
|
|
1902
1903
|
subMenu: {
|
|
1903
1904
|
popperClass: "x-mask-menu-popper",
|
|
@@ -1906,29 +1907,29 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
1906
1907
|
hideTimeout: 200
|
|
1907
1908
|
},
|
|
1908
1909
|
data: i.value,
|
|
1909
|
-
"default-icon": n(
|
|
1910
|
+
"default-icon": n(fe),
|
|
1910
1911
|
collapse: !1,
|
|
1911
1912
|
"collapse-transition": !1,
|
|
1912
1913
|
"default-active": s.value,
|
|
1913
|
-
"default-openeds": [
|
|
1914
|
+
"default-openeds": [Me],
|
|
1914
1915
|
onSelect: r
|
|
1915
1916
|
}, null, 8, ["data", "default-icon", "default-active", "default-openeds"]), [
|
|
1916
|
-
[
|
|
1917
|
+
[oe, !e.collapse]
|
|
1917
1918
|
])
|
|
1918
1919
|
]),
|
|
1919
1920
|
_: 1
|
|
1920
1921
|
}, 512)), [
|
|
1921
|
-
[
|
|
1922
|
+
[oe, !!e.keyword]
|
|
1922
1923
|
]) : v("", !0)
|
|
1923
1924
|
], 64));
|
|
1924
1925
|
}
|
|
1925
|
-
}),
|
|
1926
|
+
}), Mn = "data:image/png;base64,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", In = 140, Bn = {
|
|
1926
1927
|
/**
|
|
1927
1928
|
* 系统logo
|
|
1928
1929
|
*/
|
|
1929
1930
|
logo: {
|
|
1930
1931
|
type: String,
|
|
1931
|
-
default:
|
|
1932
|
+
default: Mn
|
|
1932
1933
|
},
|
|
1933
1934
|
/**
|
|
1934
1935
|
* 系统标题
|
|
@@ -2005,7 +2006,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2005
2006
|
removeFavorite: {
|
|
2006
2007
|
type: Function
|
|
2007
2008
|
}
|
|
2008
|
-
},
|
|
2009
|
+
}, Pt = Symbol(), Vt = Symbol(), Pn = { class: "x-mask-tabs__trigger" }, Vn = { key: 1 }, An = ["onDragstart", "onDragend"], Dn = { key: 1 }, Rn = /* @__PURE__ */ V({
|
|
2009
2010
|
__name: "Tabs",
|
|
2010
2011
|
props: {
|
|
2011
2012
|
tabs: {},
|
|
@@ -2018,18 +2019,18 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2018
2019
|
setup(a, { emit: o }) {
|
|
2019
2020
|
const e = a, t = o, l = (f) => {
|
|
2020
2021
|
const m = !!e.favorites.find(
|
|
2021
|
-
(
|
|
2022
|
+
(b) => b === f.menu || b.id === f.menu?.id
|
|
2022
2023
|
);
|
|
2023
2024
|
return [
|
|
2024
2025
|
{
|
|
2025
|
-
icon:
|
|
2026
|
+
icon: zo,
|
|
2026
2027
|
label: "刷新",
|
|
2027
2028
|
name: "refresh",
|
|
2028
2029
|
value: f
|
|
2029
2030
|
},
|
|
2030
2031
|
"|",
|
|
2031
2032
|
{
|
|
2032
|
-
icon: m ?
|
|
2033
|
+
icon: m ? wt : St,
|
|
2033
2034
|
label: "收藏",
|
|
2034
2035
|
name: "favorite",
|
|
2035
2036
|
value: f.menu,
|
|
@@ -2037,7 +2038,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2037
2038
|
},
|
|
2038
2039
|
"|",
|
|
2039
2040
|
{
|
|
2040
|
-
icon:
|
|
2041
|
+
icon: Co,
|
|
2041
2042
|
label: "弹窗",
|
|
2042
2043
|
name: "dialog",
|
|
2043
2044
|
value: f
|
|
@@ -2049,10 +2050,10 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2049
2050
|
t("click", e.home);
|
|
2050
2051
|
return;
|
|
2051
2052
|
}
|
|
2052
|
-
const
|
|
2053
|
-
|
|
2053
|
+
const b = e.tabs.find((h) => h.id === m);
|
|
2054
|
+
b && t("click", b);
|
|
2054
2055
|
}, c = (f) => {
|
|
2055
|
-
const m = e.tabs.find((
|
|
2056
|
+
const m = e.tabs.find((b) => b.id === f);
|
|
2056
2057
|
m && t("remove", m);
|
|
2057
2058
|
}, i = (f) => {
|
|
2058
2059
|
switch (f.name) {
|
|
@@ -2071,7 +2072,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2071
2072
|
}, p = (f, m) => {
|
|
2072
2073
|
m.target && m.target.classList.remove("is-dagging");
|
|
2073
2074
|
};
|
|
2074
|
-
return (f, m) => (u(), g(n(
|
|
2075
|
+
return (f, m) => (u(), g(n(I), {
|
|
2075
2076
|
ref: "tabsRef",
|
|
2076
2077
|
class: "x-mask-tabs",
|
|
2077
2078
|
height: "100%",
|
|
@@ -2081,53 +2082,53 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2081
2082
|
direction: "column"
|
|
2082
2083
|
}, {
|
|
2083
2084
|
default: d(() => [
|
|
2084
|
-
_(n(
|
|
2085
|
+
_(n(_t), {
|
|
2085
2086
|
type: "card",
|
|
2086
2087
|
"model-value": e.value,
|
|
2087
2088
|
onTabRemove: c,
|
|
2088
2089
|
onTabClick: s
|
|
2089
2090
|
}, {
|
|
2090
2091
|
default: d(() => [
|
|
2091
|
-
e.home ? (u(), g(n(
|
|
2092
|
+
e.home ? (u(), g(n(Ke), {
|
|
2092
2093
|
key: 0,
|
|
2093
2094
|
name: e.home.id
|
|
2094
2095
|
}, {
|
|
2095
2096
|
label: d(() => [
|
|
2096
|
-
X("div",
|
|
2097
|
+
X("div", Pn, [
|
|
2097
2098
|
e.home.icon ? (u(), g(J(n(_e)(e.home.icon)), { key: 0 })) : v("", !0),
|
|
2098
|
-
e.home.title ? (u(), C("span",
|
|
2099
|
+
e.home.title ? (u(), C("span", Vn, A(e.home.title), 1)) : v("", !0)
|
|
2099
2100
|
])
|
|
2100
2101
|
]),
|
|
2101
2102
|
_: 1
|
|
2102
2103
|
}, 8, ["name"])) : v("", !0),
|
|
2103
|
-
(u(!0), C(Q, null, Y(e.tabs, (
|
|
2104
|
-
key:
|
|
2105
|
-
name:
|
|
2104
|
+
(u(!0), C(Q, null, Y(e.tabs, (b) => (u(), g(n(Ke), {
|
|
2105
|
+
key: b.id,
|
|
2106
|
+
name: b.id,
|
|
2106
2107
|
lazy: "",
|
|
2107
2108
|
closable: ""
|
|
2108
2109
|
}, {
|
|
2109
2110
|
label: d(() => [
|
|
2110
|
-
_(n(
|
|
2111
|
+
_(n(kt), {
|
|
2111
2112
|
"open-delay": 500,
|
|
2112
2113
|
placement: "bottom",
|
|
2113
2114
|
trigger: "hover",
|
|
2114
2115
|
width: "200px",
|
|
2115
|
-
disabled:
|
|
2116
|
+
disabled: b.id !== e.value
|
|
2116
2117
|
}, {
|
|
2117
2118
|
reference: d(() => [
|
|
2118
2119
|
X("div", {
|
|
2119
2120
|
class: "x-mask-tabs__trigger",
|
|
2120
2121
|
draggable: "true",
|
|
2121
|
-
onDragstart: (
|
|
2122
|
-
onDragend: (
|
|
2122
|
+
onDragstart: (h) => r(b, h),
|
|
2123
|
+
onDragend: (h) => p(b, h)
|
|
2123
2124
|
}, [
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
], 40,
|
|
2125
|
+
b.icon ? (u(), g(J(n(_e)(b.icon)), { key: 0 })) : v("", !0),
|
|
2126
|
+
b.title ? (u(), C("span", Dn, A(b.title), 1)) : v("", !0)
|
|
2127
|
+
], 40, An)
|
|
2127
2128
|
]),
|
|
2128
2129
|
default: d(() => [
|
|
2129
|
-
_(n(
|
|
2130
|
-
items: l(
|
|
2130
|
+
_(n(et), {
|
|
2131
|
+
items: l(b),
|
|
2131
2132
|
mode: "text",
|
|
2132
2133
|
size: "small",
|
|
2133
2134
|
type: "info",
|
|
@@ -2146,20 +2147,20 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2146
2147
|
_: 1
|
|
2147
2148
|
}, 512));
|
|
2148
2149
|
}
|
|
2149
|
-
}),
|
|
2150
|
+
}), On = /* @__PURE__ */ V({
|
|
2150
2151
|
__name: "ThemeSwitch",
|
|
2151
2152
|
setup(a) {
|
|
2152
|
-
const o =
|
|
2153
|
-
return (e, t) => (u(), g(n(
|
|
2153
|
+
const o = Do();
|
|
2154
|
+
return (e, t) => (u(), g(n(Qe), {
|
|
2154
2155
|
class: "x-mask-theme-switch",
|
|
2155
2156
|
modelValue: n(o),
|
|
2156
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) =>
|
|
2157
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => Ie(o) ? o.value = l : null),
|
|
2157
2158
|
size: "default",
|
|
2158
|
-
"active-action-icon": n(
|
|
2159
|
-
"inactive-action-icon": n(
|
|
2159
|
+
"active-action-icon": n(To),
|
|
2160
|
+
"inactive-action-icon": n($o)
|
|
2160
2161
|
}, null, 8, ["modelValue", "active-action-icon", "inactive-action-icon"]));
|
|
2161
2162
|
}
|
|
2162
|
-
}),
|
|
2163
|
+
}), Fn = { class: "x-mask-toolbar__menu-item" }, jn = /* @__PURE__ */ V({
|
|
2163
2164
|
__name: "Toolbar",
|
|
2164
2165
|
props: {
|
|
2165
2166
|
tabs: { default: () => [] },
|
|
@@ -2211,13 +2212,13 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2211
2212
|
}, r = (p, f) => {
|
|
2212
2213
|
t("actionCommand", p, f);
|
|
2213
2214
|
};
|
|
2214
|
-
return (p, f) => (u(), g(n(
|
|
2215
|
+
return (p, f) => (u(), g(n(I), {
|
|
2215
2216
|
class: "x-mask-toolbar",
|
|
2216
2217
|
align: "center"
|
|
2217
2218
|
}, {
|
|
2218
2219
|
default: d(() => [
|
|
2219
|
-
_(n(
|
|
2220
|
-
icon: n(
|
|
2220
|
+
_(n(se), {
|
|
2221
|
+
icon: n(Eo),
|
|
2221
2222
|
menus: l.value,
|
|
2222
2223
|
dropdown: { size: "small" },
|
|
2223
2224
|
mode: "icon",
|
|
@@ -2226,19 +2227,19 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2226
2227
|
onCommand: c
|
|
2227
2228
|
}, {
|
|
2228
2229
|
item: d(({ item: m }) => [
|
|
2229
|
-
X("span",
|
|
2230
|
+
X("span", Fn, [
|
|
2230
2231
|
R(A(m.label) + " ", 1),
|
|
2231
|
-
["other", "all"].includes(m.command) ? v("", !0) : (u(), g(n(
|
|
2232
|
+
["other", "all"].includes(m.command) ? v("", !0) : (u(), g(n(ue), {
|
|
2232
2233
|
key: 0,
|
|
2233
|
-
onClick:
|
|
2234
|
-
icon: n(
|
|
2234
|
+
onClick: vt((b) => s(m), ["stop"]),
|
|
2235
|
+
icon: n(xt)
|
|
2235
2236
|
}, null, 8, ["onClick", "icon"]))
|
|
2236
2237
|
])
|
|
2237
2238
|
]),
|
|
2238
2239
|
_: 1
|
|
2239
2240
|
}, 8, ["icon", "menus"]),
|
|
2240
|
-
_(n(
|
|
2241
|
-
e.actions ? (u(), g(n(
|
|
2241
|
+
_(n(ae), { direction: "vertical" }),
|
|
2242
|
+
e.actions ? (u(), g(n(et), {
|
|
2242
2243
|
key: 0,
|
|
2243
2244
|
circle: "",
|
|
2244
2245
|
mode: "icon",
|
|
@@ -2248,12 +2249,12 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2248
2249
|
onClick: i,
|
|
2249
2250
|
onCommand: r
|
|
2250
2251
|
}, null, 8, ["items"])) : v("", !0),
|
|
2251
|
-
e.actions ? (u(), g(n(
|
|
2252
|
+
e.actions ? (u(), g(n(ae), {
|
|
2252
2253
|
key: 1,
|
|
2253
2254
|
direction: "vertical"
|
|
2254
2255
|
})) : v("", !0),
|
|
2255
|
-
e.theme ? (u(), g(
|
|
2256
|
-
e.theme ? (u(), g(n(
|
|
2256
|
+
e.theme ? (u(), g(On, { key: 2 })) : v("", !0),
|
|
2257
|
+
e.theme ? (u(), g(n(ae), {
|
|
2257
2258
|
key: 3,
|
|
2258
2259
|
direction: "vertical"
|
|
2259
2260
|
})) : v("", !0),
|
|
@@ -2262,23 +2263,23 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2262
2263
|
_: 3
|
|
2263
2264
|
}));
|
|
2264
2265
|
}
|
|
2265
|
-
}),
|
|
2266
|
+
}), Nn = /* @__PURE__ */ V({
|
|
2266
2267
|
__name: "Avatar",
|
|
2267
2268
|
props: {
|
|
2268
2269
|
avatar: {}
|
|
2269
2270
|
},
|
|
2270
2271
|
setup(a) {
|
|
2271
2272
|
const o = a;
|
|
2272
|
-
return (e, t) => (u(), g(n(
|
|
2273
|
+
return (e, t) => (u(), g(n(kt), {
|
|
2273
2274
|
width: 200,
|
|
2274
2275
|
"popper-class": "x-mask-avatar__popper",
|
|
2275
2276
|
disabled: !e.$slots.default
|
|
2276
2277
|
}, {
|
|
2277
2278
|
reference: d(() => [
|
|
2278
|
-
_(n(
|
|
2279
|
+
_(n(Gt), {
|
|
2279
2280
|
class: "x-mask-avatar",
|
|
2280
2281
|
shape: "circle",
|
|
2281
|
-
icon: n(
|
|
2282
|
+
icon: n(Mo),
|
|
2282
2283
|
src: o.avatar,
|
|
2283
2284
|
size: 26
|
|
2284
2285
|
}, null, 8, ["icon", "src"])
|
|
@@ -2289,7 +2290,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2289
2290
|
_: 3
|
|
2290
2291
|
}, 8, ["disabled"]));
|
|
2291
2292
|
}
|
|
2292
|
-
}),
|
|
2293
|
+
}), pt = /* @__PURE__ */ V({
|
|
2293
2294
|
__name: "Content",
|
|
2294
2295
|
props: {
|
|
2295
2296
|
createView: { type: Function },
|
|
@@ -2297,7 +2298,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2297
2298
|
},
|
|
2298
2299
|
setup(a) {
|
|
2299
2300
|
const o = a;
|
|
2300
|
-
return (e, t) => (u(), g(n(
|
|
2301
|
+
return (e, t) => (u(), g(n(I), {
|
|
2301
2302
|
class: "x-mask__content",
|
|
2302
2303
|
flex: !1,
|
|
2303
2304
|
grow: "",
|
|
@@ -2305,9 +2306,9 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2305
2306
|
}, {
|
|
2306
2307
|
default: d(() => [
|
|
2307
2308
|
x(e.$slots, "default"),
|
|
2308
|
-
_(n(
|
|
2309
|
+
_(n(Ho), null, {
|
|
2309
2310
|
default: d(({ Component: l, route: s }) => [
|
|
2310
|
-
(u(), g(
|
|
2311
|
+
(u(), g(Xt, {
|
|
2311
2312
|
exclude: o.exclude
|
|
2312
2313
|
}, [
|
|
2313
2314
|
l ? (u(), g(J(o.createView(l, s)), {
|
|
@@ -2322,7 +2323,7 @@ const zn = /* @__PURE__ */ X("div", { class: "x-mask-sidebar__helper" }, null, -
|
|
|
2322
2323
|
}));
|
|
2323
2324
|
}
|
|
2324
2325
|
});
|
|
2325
|
-
function
|
|
2326
|
+
function Xn() {
|
|
2326
2327
|
const a = O(!1), o = O(""), e = O(!1);
|
|
2327
2328
|
return {
|
|
2328
2329
|
collapsed: a,
|
|
@@ -2330,98 +2331,98 @@ function Hn() {
|
|
|
2330
2331
|
favorite: e
|
|
2331
2332
|
};
|
|
2332
2333
|
}
|
|
2333
|
-
function
|
|
2334
|
-
const o =
|
|
2334
|
+
function Un(a) {
|
|
2335
|
+
const o = Ct();
|
|
2335
2336
|
return y(() => {
|
|
2336
2337
|
const e = a.home;
|
|
2337
2338
|
return Object.assign(
|
|
2338
|
-
{ id: o, url: "/", name: "MaskHome", icon:
|
|
2339
|
+
{ id: o, url: "/", name: "MaskHome", icon: Io, closable: !1 },
|
|
2339
2340
|
typeof e == "string" ? { url: e } : e || {}
|
|
2340
2341
|
);
|
|
2341
2342
|
});
|
|
2342
2343
|
}
|
|
2343
|
-
function
|
|
2344
|
+
function At(a, o) {
|
|
2344
2345
|
let e = [];
|
|
2345
2346
|
return a.forEach((t) => {
|
|
2346
|
-
t = o ? o(t) : t, t.children ? e = e.concat(
|
|
2347
|
+
t = o ? o(t) : t, t.children ? e = e.concat(At(t.children, o)) : e.push(t);
|
|
2347
2348
|
}), e;
|
|
2348
2349
|
}
|
|
2349
|
-
function
|
|
2350
|
-
const e =
|
|
2351
|
-
const
|
|
2350
|
+
function Hn(a, o) {
|
|
2351
|
+
const e = Ye(), t = Ve([]), l = Ve([]), s = y(() => At(t.value, a.menuAdapter)), c = y(() => Fo(s.value, "id")), i = O(null), r = (w) => {
|
|
2352
|
+
const M = typeof w == "object" ? w.id : w, z = c.value.get(M);
|
|
2352
2353
|
if (!z) {
|
|
2353
2354
|
console.warn("找不到菜单", w);
|
|
2354
2355
|
return;
|
|
2355
2356
|
}
|
|
2356
|
-
const { type:
|
|
2357
|
-
if (!
|
|
2357
|
+
const { type: E = "route", url: B, title: S, icon: P } = z;
|
|
2358
|
+
if (!B) {
|
|
2358
2359
|
i.value = z, o("select", z);
|
|
2359
2360
|
return;
|
|
2360
2361
|
}
|
|
2361
|
-
if (
|
|
2362
|
-
|
|
2362
|
+
if (E === "route") {
|
|
2363
|
+
jo(B) || B.startsWith("//") ? window.open(B) : (i.value = z, e.push(B).catch((T) => T));
|
|
2363
2364
|
return;
|
|
2364
2365
|
}
|
|
2365
|
-
if (
|
|
2366
|
-
window.open(
|
|
2366
|
+
if (E === "window") {
|
|
2367
|
+
window.open(B);
|
|
2367
2368
|
return;
|
|
2368
2369
|
}
|
|
2369
|
-
|
|
2370
|
+
E === "dialog" && tt({
|
|
2370
2371
|
resizable: !0,
|
|
2371
2372
|
bodyPadding: !1,
|
|
2372
2373
|
width: "80%",
|
|
2373
2374
|
height: "80%",
|
|
2374
2375
|
title: S,
|
|
2375
|
-
icon:
|
|
2376
|
-
src:
|
|
2376
|
+
icon: P,
|
|
2377
|
+
src: B
|
|
2377
2378
|
});
|
|
2378
2379
|
}, p = async () => {
|
|
2379
2380
|
t.value = typeof a.menus == "function" ? await a.menus() || [] : a.menus ?? [], l.value = typeof a.favorites == "function" ? await a.favorites() || [] : a.favorites ?? [];
|
|
2380
2381
|
}, f = (w) => {
|
|
2381
2382
|
l.value = [w, ...l.value], a.addFavorite && a.addFavorite(w);
|
|
2382
2383
|
}, m = (w) => {
|
|
2383
|
-
l.value = l.value.filter((
|
|
2384
|
-
},
|
|
2385
|
-
|
|
2384
|
+
l.value = l.value.filter((M) => M.id !== w.id), a.removeFavorite && a.removeFavorite(w);
|
|
2385
|
+
}, b = (w) => !!l.value.find((M) => M === w || M.id === w.id), h = (w) => {
|
|
2386
|
+
b(w) ? m(w) : f(w);
|
|
2386
2387
|
};
|
|
2387
|
-
return
|
|
2388
|
+
return Je(p), {
|
|
2388
2389
|
menus: t,
|
|
2389
2390
|
favorites: l,
|
|
2390
2391
|
flatMenus: s,
|
|
2391
2392
|
active: i,
|
|
2392
2393
|
select: r,
|
|
2393
|
-
toggleFavorite:
|
|
2394
|
+
toggleFavorite: h
|
|
2394
2395
|
};
|
|
2395
2396
|
}
|
|
2396
|
-
function
|
|
2397
|
-
const s =
|
|
2397
|
+
function Kn(a, o, e, t, l) {
|
|
2398
|
+
const s = $t(), c = Ye(), i = {}, r = O([]), p = O(), { width: f } = zt(p), m = y(() => Math.floor(f.value / In)), b = y(
|
|
2398
2399
|
() => r.value.slice(0, m.value).filter(($) => !$.dialog)
|
|
2399
|
-
),
|
|
2400
|
+
), h = y(() => r.value.slice(m.value)), w = ($) => e.value.find((D) => D.url === $), M = ($) => s.fullPath === $.url, z = ($) => l.value.id === $ ? l.value : r.value.find((D) => D.id === $), E = O(""), B = y(() => z(E.value)), S = ($) => {
|
|
2400
2401
|
c.push($.url).catch((D) => D);
|
|
2401
|
-
},
|
|
2402
|
-
|
|
2402
|
+
}, P = ($) => {
|
|
2403
|
+
E.value = $.id, s.fullPath !== $.url && S($);
|
|
2403
2404
|
}, T = () => {
|
|
2404
2405
|
S(l.value);
|
|
2405
2406
|
}, j = ($) => {
|
|
2406
2407
|
const D = r.value.find((N) => N.url === $.url || N.id === $.id);
|
|
2407
|
-
D ?
|
|
2408
|
+
D ? P(D) : (r.value.unshift($), P($));
|
|
2408
2409
|
}, k = async ($) => {
|
|
2409
|
-
const { url: D = s.fullPath, icon: N, title:
|
|
2410
|
+
const { url: D = s.fullPath, icon: N, title: Ce = "新建标签页" } = $ || {}, Te = i[D], Oe = Ct(), Fe = Tt(D);
|
|
2410
2411
|
return {
|
|
2411
|
-
id:
|
|
2412
|
-
name:
|
|
2412
|
+
id: Oe,
|
|
2413
|
+
name: Fe,
|
|
2413
2414
|
url: D,
|
|
2414
2415
|
icon: N,
|
|
2415
|
-
title:
|
|
2416
|
+
title: Ce,
|
|
2416
2417
|
closable: !0,
|
|
2417
2418
|
menu: $,
|
|
2418
|
-
|
|
2419
|
+
...Te ? await Te() : {}
|
|
2419
2420
|
};
|
|
2420
2421
|
}, H = async ($) => {
|
|
2421
|
-
if (await
|
|
2422
|
+
if (await je.confirm("是否关闭页签", "提示", {
|
|
2422
2423
|
type: "warning"
|
|
2423
2424
|
}).catch(() => !1)) {
|
|
2424
|
-
if (r.value = r.value.filter((N) => N.id !== $.id),
|
|
2425
|
+
if (r.value = r.value.filter((N) => N.id !== $.id), E.value === $.id) {
|
|
2425
2426
|
const N = r.value[0];
|
|
2426
2427
|
S(N || l.value);
|
|
2427
2428
|
}
|
|
@@ -2433,74 +2434,74 @@ function Wn(a, o, e, t, l) {
|
|
|
2433
2434
|
const N = r.value[D];
|
|
2434
2435
|
r.value.splice(D, 1, Object.assign(N, $));
|
|
2435
2436
|
}
|
|
2436
|
-
},
|
|
2437
|
-
if (!await
|
|
2437
|
+
}, re = async () => {
|
|
2438
|
+
if (!await je.confirm("是否关闭全部页签", "提示", {
|
|
2438
2439
|
type: "warning"
|
|
2439
2440
|
}).catch(() => !1))
|
|
2440
2441
|
return;
|
|
2441
2442
|
const D = r.value;
|
|
2442
|
-
return r.value = [],
|
|
2443
|
+
return r.value = [], P(l.value), D;
|
|
2443
2444
|
}, Z = async () => {
|
|
2444
|
-
if (!await
|
|
2445
|
+
if (!await je.confirm("是否关闭其他页签", "提示", {
|
|
2445
2446
|
type: "warning"
|
|
2446
2447
|
}).catch(() => !1))
|
|
2447
2448
|
return;
|
|
2448
|
-
const D = r.value.filter((N) => N.id !==
|
|
2449
|
-
return r.value = r.value.filter((N) => N.id ===
|
|
2449
|
+
const D = r.value.filter((N) => N.id !== E.value);
|
|
2450
|
+
return r.value = r.value.filter((N) => N.id === E.value), D;
|
|
2450
2451
|
}, ee = ($) => {
|
|
2451
2452
|
const D = r.value.filter((N) => N.id !== $.id);
|
|
2452
|
-
r.value = [$, ...D],
|
|
2453
|
-
},
|
|
2453
|
+
r.value = [$, ...D], P($);
|
|
2454
|
+
}, ce = async () => {
|
|
2454
2455
|
await ye();
|
|
2455
2456
|
const $ = l.value.url === s.fullPath, D = w(s.fullPath);
|
|
2456
2457
|
if ($)
|
|
2457
|
-
|
|
2458
|
+
E.value = l.value.id;
|
|
2458
2459
|
else {
|
|
2459
2460
|
const N = await k(D);
|
|
2460
2461
|
j(N);
|
|
2461
2462
|
}
|
|
2462
2463
|
await ye(), t.value = D || null;
|
|
2463
2464
|
};
|
|
2464
|
-
return L(e,
|
|
2465
|
+
return L(e, ce), L(s, ce, { immediate: !0 }), Se(Pt, i), {
|
|
2465
2466
|
tabRef: p,
|
|
2466
2467
|
tabs: r,
|
|
2467
|
-
showTabs:
|
|
2468
|
-
currentTab:
|
|
2468
|
+
showTabs: b,
|
|
2469
|
+
currentTab: B,
|
|
2469
2470
|
changeTab: S,
|
|
2470
2471
|
removeTab: H,
|
|
2471
2472
|
updateTab: K,
|
|
2472
2473
|
addTab: j,
|
|
2473
2474
|
home: l,
|
|
2474
|
-
tabValue:
|
|
2475
|
-
isCurrentTab:
|
|
2475
|
+
tabValue: E,
|
|
2476
|
+
isCurrentTab: M,
|
|
2476
2477
|
activeHome: T,
|
|
2477
|
-
activeTab:
|
|
2478
|
-
dropdownTabs:
|
|
2479
|
-
removeAllTabs:
|
|
2478
|
+
activeTab: P,
|
|
2479
|
+
dropdownTabs: h,
|
|
2480
|
+
removeAllTabs: re,
|
|
2480
2481
|
removeOtherTabs: Z,
|
|
2481
2482
|
moveToShow: ee
|
|
2482
2483
|
};
|
|
2483
2484
|
}
|
|
2484
|
-
function
|
|
2485
|
-
const o = /* @__PURE__ */ new Map(), e = O([]), t = Re({}), l =
|
|
2486
|
-
const T =
|
|
2485
|
+
function Ln(a) {
|
|
2486
|
+
const o = /* @__PURE__ */ new Map(), e = O([]), t = Re({}), l = de(), s = {}, { updateTab: c, isCurrentTab: i, activeHome: r, tabs: p } = a, f = (S, P) => {
|
|
2487
|
+
const T = P.fullPath;
|
|
2487
2488
|
if (o.has(T))
|
|
2488
2489
|
return o.get(T);
|
|
2489
2490
|
{
|
|
2490
|
-
const j =
|
|
2491
|
+
const j = Tt(T), k = {
|
|
2491
2492
|
name: j,
|
|
2492
2493
|
setup() {
|
|
2493
|
-
const H = y(() => t[T] || document.body), K = y(() => !t[T]),
|
|
2494
|
-
return
|
|
2495
|
-
|
|
2496
|
-
ge({ ...
|
|
2497
|
-
), () =>
|
|
2498
|
-
|
|
2494
|
+
const H = y(() => t[T] || document.body), K = y(() => !t[T]), re = y(() => !e.value.includes(j));
|
|
2495
|
+
return Se(
|
|
2496
|
+
Ko,
|
|
2497
|
+
ge({ ...P })
|
|
2498
|
+
), () => re.value ? ne(
|
|
2499
|
+
yt,
|
|
2499
2500
|
{
|
|
2500
2501
|
to: H.value,
|
|
2501
2502
|
disabled: K.value
|
|
2502
2503
|
},
|
|
2503
|
-
[
|
|
2504
|
+
[ne(S)]
|
|
2504
2505
|
) : null;
|
|
2505
2506
|
}
|
|
2506
2507
|
};
|
|
@@ -2508,13 +2509,13 @@ function Jn(a) {
|
|
|
2508
2509
|
}
|
|
2509
2510
|
}, m = (S) => {
|
|
2510
2511
|
S.dialog = void 0, delete t[S.url];
|
|
2511
|
-
const
|
|
2512
|
-
|
|
2513
|
-
},
|
|
2514
|
-
S.forEach((
|
|
2515
|
-
m(
|
|
2512
|
+
const P = s[S.id];
|
|
2513
|
+
P && (P.destroy(), delete s[S.id], c(S));
|
|
2514
|
+
}, b = (S = []) => {
|
|
2515
|
+
S.forEach((P) => {
|
|
2516
|
+
m(P);
|
|
2516
2517
|
});
|
|
2517
|
-
},
|
|
2518
|
+
}, h = async (S) => {
|
|
2518
2519
|
S.dialog = {
|
|
2519
2520
|
...S.dialog,
|
|
2520
2521
|
onMinimized: () => {
|
|
@@ -2524,7 +2525,7 @@ function Jn(a) {
|
|
|
2524
2525
|
m(S), p.value = p.value.filter((T) => T.id !== S.id);
|
|
2525
2526
|
}
|
|
2526
2527
|
}, c(S);
|
|
2527
|
-
const
|
|
2528
|
+
const P = tt(
|
|
2528
2529
|
{
|
|
2529
2530
|
title: S.title,
|
|
2530
2531
|
icon: S.icon,
|
|
@@ -2540,85 +2541,85 @@ function Jn(a) {
|
|
|
2540
2541
|
},
|
|
2541
2542
|
l?.appContext
|
|
2542
2543
|
);
|
|
2543
|
-
return await ye(), i(S) && r(), s[S.id] =
|
|
2544
|
+
return await ye(), i(S) && r(), s[S.id] = P, P;
|
|
2544
2545
|
}, w = async (S) => {
|
|
2545
2546
|
e.value = [S.name], await ye(), e.value = [];
|
|
2546
|
-
},
|
|
2547
|
-
e.value = S.map((
|
|
2548
|
-
}, z = (S) => (S.preventDefault(), !1),
|
|
2547
|
+
}, M = async (S) => {
|
|
2548
|
+
e.value = S.map((P) => P.name), await ye(), e.value = [];
|
|
2549
|
+
}, z = (S) => (S.preventDefault(), !1), E = (S) => {
|
|
2549
2550
|
if (S.dataTransfer) {
|
|
2550
|
-
const
|
|
2551
|
+
const P = S.dataTransfer.getData("tab"), T = p.value.find((j) => j.id === P);
|
|
2551
2552
|
if (T) {
|
|
2552
2553
|
const { clientX: j, clientY: k } = S;
|
|
2553
2554
|
T.dialog = {
|
|
2554
2555
|
left: j,
|
|
2555
2556
|
top: k
|
|
2556
|
-
},
|
|
2557
|
+
}, h(T);
|
|
2557
2558
|
}
|
|
2558
2559
|
}
|
|
2559
|
-
},
|
|
2560
|
-
return De(document, "dragover", z), De(document, "drop",
|
|
2560
|
+
}, B = (S) => !!t[S];
|
|
2561
|
+
return De(document, "dragover", z), De(document, "drop", E), {
|
|
2561
2562
|
createView: f,
|
|
2562
|
-
openDialog:
|
|
2563
|
+
openDialog: h,
|
|
2563
2564
|
refresh: w,
|
|
2564
2565
|
exclude: e,
|
|
2565
|
-
cleanCache:
|
|
2566
|
-
hasDialog:
|
|
2566
|
+
cleanCache: M,
|
|
2567
|
+
hasDialog: B,
|
|
2567
2568
|
closeDialog: m,
|
|
2568
|
-
closeDialogs:
|
|
2569
|
+
closeDialogs: b
|
|
2569
2570
|
};
|
|
2570
2571
|
}
|
|
2571
|
-
const
|
|
2572
|
+
const Oa = /* @__PURE__ */ V({
|
|
2572
2573
|
name: "XMask",
|
|
2573
2574
|
__name: "Mask",
|
|
2574
|
-
props:
|
|
2575
|
+
props: Bn,
|
|
2575
2576
|
emits: ["select", "actionClick", "actionCommand"],
|
|
2576
2577
|
setup(a, { emit: o }) {
|
|
2577
|
-
const e = a, t = o, l =
|
|
2578
|
+
const e = a, t = o, l = Un(e), { collapsed: s, keyword: c, favorite: i } = Xn(), { menus: r, favorites: p, flatMenus: f, active: m, select: b, toggleFavorite: h } = Hn(e, t), {
|
|
2578
2579
|
tabRef: w,
|
|
2579
|
-
showTabs:
|
|
2580
|
+
showTabs: M,
|
|
2580
2581
|
currentTab: z,
|
|
2581
|
-
changeTab:
|
|
2582
|
-
removeTab:
|
|
2582
|
+
changeTab: E,
|
|
2583
|
+
removeTab: B,
|
|
2583
2584
|
tabs: S,
|
|
2584
|
-
updateTab:
|
|
2585
|
+
updateTab: P,
|
|
2585
2586
|
isCurrentTab: T,
|
|
2586
2587
|
activeHome: j,
|
|
2587
2588
|
removeAllTabs: k,
|
|
2588
2589
|
removeOtherTabs: H,
|
|
2589
2590
|
dropdownTabs: K,
|
|
2590
|
-
moveToShow:
|
|
2591
|
-
} =
|
|
2591
|
+
moveToShow: re
|
|
2592
|
+
} = Kn(e, t, f, m, l), { createView: Z, openDialog: ee, refresh: ce, exclude: $, cleanCache: D, closeDialogs: N } = Ln({
|
|
2592
2593
|
tabs: S,
|
|
2593
|
-
updateTab:
|
|
2594
|
+
updateTab: P,
|
|
2594
2595
|
isCurrentTab: T,
|
|
2595
2596
|
activeHome: j
|
|
2596
|
-
}),
|
|
2597
|
-
await
|
|
2598
|
-
},
|
|
2597
|
+
}), Ce = async (U) => {
|
|
2598
|
+
await B(U) && await D([U]);
|
|
2599
|
+
}, Te = async () => {
|
|
2599
2600
|
const U = await k();
|
|
2600
2601
|
U && (N(U), await D(U));
|
|
2601
|
-
},
|
|
2602
|
+
}, Oe = async () => {
|
|
2602
2603
|
const U = await H();
|
|
2603
2604
|
U && (N(U), await D(U));
|
|
2604
|
-
},
|
|
2605
|
+
}, Fe = (U) => {
|
|
2605
2606
|
t("actionClick", U);
|
|
2606
|
-
},
|
|
2607
|
-
t("actionCommand", U,
|
|
2607
|
+
}, Ft = (U, te) => {
|
|
2608
|
+
t("actionCommand", U, te);
|
|
2608
2609
|
};
|
|
2609
|
-
return
|
|
2610
|
+
return Se(Vt, {
|
|
2610
2611
|
tabs: S,
|
|
2611
2612
|
flatMenus: f,
|
|
2612
2613
|
favorites: p,
|
|
2613
|
-
updateTab:
|
|
2614
|
+
updateTab: P,
|
|
2614
2615
|
active: m,
|
|
2615
2616
|
currentTab: z
|
|
2616
|
-
}), (U,
|
|
2617
|
+
}), (U, te) => (u(), g(n(I), {
|
|
2617
2618
|
class: W(["x-mask", { "is-disabled": e.disabled }]),
|
|
2618
2619
|
fit: ""
|
|
2619
2620
|
}, {
|
|
2620
2621
|
default: d(() => [
|
|
2621
|
-
e.disabled ? (u(), g(
|
|
2622
|
+
e.disabled ? (u(), g(pt, {
|
|
2622
2623
|
key: 1,
|
|
2623
2624
|
createView: n(Z),
|
|
2624
2625
|
exclude: n($)
|
|
@@ -2628,9 +2629,9 @@ const Qn = /* @__PURE__ */ P({
|
|
|
2628
2629
|
]),
|
|
2629
2630
|
_: 3
|
|
2630
2631
|
}, 8, ["createView", "exclude"])) : (u(), C(Q, { key: 0 }, [
|
|
2631
|
-
_(
|
|
2632
|
+
_(Sn, { collapsed: n(s) }, {
|
|
2632
2633
|
brand: d(() => [
|
|
2633
|
-
_(
|
|
2634
|
+
_($n, {
|
|
2634
2635
|
logo: e.logo,
|
|
2635
2636
|
title: e.title,
|
|
2636
2637
|
url: n(l).url,
|
|
@@ -2638,15 +2639,15 @@ const Qn = /* @__PURE__ */ P({
|
|
|
2638
2639
|
}, null, 8, ["logo", "title", "url", "collapsed"])
|
|
2639
2640
|
]),
|
|
2640
2641
|
default: d(() => [
|
|
2641
|
-
_(
|
|
2642
|
+
_(zn, {
|
|
2642
2643
|
collasped: n(s),
|
|
2643
|
-
"onUpdate:collasped":
|
|
2644
|
+
"onUpdate:collasped": te[0] || (te[0] = (we) => Ie(s) ? s.value = we : null),
|
|
2644
2645
|
favorite: n(i),
|
|
2645
|
-
"onUpdate:favorite":
|
|
2646
|
+
"onUpdate:favorite": te[1] || (te[1] = (we) => Ie(i) ? i.value = we : null),
|
|
2646
2647
|
keyword: n(c),
|
|
2647
|
-
"onUpdate:keyword":
|
|
2648
|
+
"onUpdate:keyword": te[2] || (te[2] = (we) => Ie(c) ? c.value = we : null)
|
|
2648
2649
|
}, null, 8, ["collasped", "favorite", "keyword"]),
|
|
2649
|
-
_(
|
|
2650
|
+
_(En, {
|
|
2650
2651
|
collapse: n(s),
|
|
2651
2652
|
keyword: n(c),
|
|
2652
2653
|
favorite: n(i),
|
|
@@ -2654,12 +2655,12 @@ const Qn = /* @__PURE__ */ P({
|
|
|
2654
2655
|
flatMenus: n(f),
|
|
2655
2656
|
menus: n(r),
|
|
2656
2657
|
active: n(m),
|
|
2657
|
-
onSelect: n(
|
|
2658
|
+
onSelect: n(b)
|
|
2658
2659
|
}, null, 8, ["collapse", "keyword", "favorite", "favorites", "flatMenus", "menus", "active", "onSelect"])
|
|
2659
2660
|
]),
|
|
2660
2661
|
_: 1
|
|
2661
2662
|
}, 8, ["collapsed"]),
|
|
2662
|
-
_(n(
|
|
2663
|
+
_(n(I), {
|
|
2663
2664
|
class: "x-mask__main",
|
|
2664
2665
|
grow: "",
|
|
2665
2666
|
shrink: "",
|
|
@@ -2667,40 +2668,40 @@ const Qn = /* @__PURE__ */ P({
|
|
|
2667
2668
|
direction: "column"
|
|
2668
2669
|
}, {
|
|
2669
2670
|
default: d(() => [
|
|
2670
|
-
_(n(
|
|
2671
|
+
_(n(I), {
|
|
2671
2672
|
class: "x-mask-topbar",
|
|
2672
2673
|
justify: "space-between",
|
|
2673
2674
|
align: "center"
|
|
2674
2675
|
}, {
|
|
2675
2676
|
default: d(() => [
|
|
2676
|
-
_(
|
|
2677
|
+
_(Rn, {
|
|
2677
2678
|
ref_key: "tabRef",
|
|
2678
2679
|
ref: w,
|
|
2679
2680
|
favorites: n(p),
|
|
2680
|
-
tabs: n(
|
|
2681
|
+
tabs: n(M),
|
|
2681
2682
|
home: n(l),
|
|
2682
2683
|
value: n(z)?.id,
|
|
2683
|
-
onClick: n(
|
|
2684
|
-
onToggleFavorite: n(
|
|
2685
|
-
onRemove:
|
|
2684
|
+
onClick: n(E),
|
|
2685
|
+
onToggleFavorite: n(h),
|
|
2686
|
+
onRemove: Ce,
|
|
2686
2687
|
onDialog: n(ee),
|
|
2687
|
-
onRefresh: n(
|
|
2688
|
+
onRefresh: n(ce)
|
|
2688
2689
|
}, null, 8, ["favorites", "tabs", "home", "value", "onClick", "onToggleFavorite", "onDialog", "onRefresh"]),
|
|
2689
|
-
_(
|
|
2690
|
+
_(jn, {
|
|
2690
2691
|
tabs: n(K),
|
|
2691
2692
|
actions: e.actions,
|
|
2692
2693
|
theme: e.theme,
|
|
2693
|
-
onCloseOtherTabs:
|
|
2694
|
-
onCloseAllTabs:
|
|
2695
|
-
onCloseTab:
|
|
2696
|
-
onClickTab: n(
|
|
2697
|
-
onActionClick:
|
|
2698
|
-
onActionCommand:
|
|
2694
|
+
onCloseOtherTabs: Oe,
|
|
2695
|
+
onCloseAllTabs: Te,
|
|
2696
|
+
onCloseTab: Ce,
|
|
2697
|
+
onClickTab: n(re),
|
|
2698
|
+
onActionClick: Fe,
|
|
2699
|
+
onActionCommand: Ft
|
|
2699
2700
|
}, {
|
|
2700
2701
|
default: d(() => [
|
|
2701
|
-
_(
|
|
2702
|
+
_(Nn, {
|
|
2702
2703
|
avatar: e.avatar
|
|
2703
|
-
},
|
|
2704
|
+
}, be({ _: 2 }, [
|
|
2704
2705
|
U.$slots.user ? {
|
|
2705
2706
|
name: "default",
|
|
2706
2707
|
fn: d(() => [
|
|
@@ -2715,7 +2716,7 @@ const Qn = /* @__PURE__ */ P({
|
|
|
2715
2716
|
]),
|
|
2716
2717
|
_: 3
|
|
2717
2718
|
}),
|
|
2718
|
-
_(
|
|
2719
|
+
_(pt, {
|
|
2719
2720
|
createView: n(Z),
|
|
2720
2721
|
exclude: n($)
|
|
2721
2722
|
}, {
|
|
@@ -2733,8 +2734,8 @@ const Qn = /* @__PURE__ */ P({
|
|
|
2733
2734
|
}, 8, ["class"]));
|
|
2734
2735
|
}
|
|
2735
2736
|
});
|
|
2736
|
-
function
|
|
2737
|
-
const o =
|
|
2737
|
+
function Fa(a = {}) {
|
|
2738
|
+
const o = $t(), e = xe(Pt, null), t = xe(Vt, null);
|
|
2738
2739
|
if (e) {
|
|
2739
2740
|
const s = typeof a == "function" ? a : async () => a;
|
|
2740
2741
|
e[o.fullPath] = s;
|
|
@@ -2744,18 +2745,18 @@ function La(a = {}) {
|
|
|
2744
2745
|
mask: t
|
|
2745
2746
|
};
|
|
2746
2747
|
}
|
|
2747
|
-
const
|
|
2748
|
+
const Wn = /* @__PURE__ */ V({
|
|
2748
2749
|
__name: "SelectEditor",
|
|
2749
2750
|
props: {
|
|
2750
2751
|
options: { default: () => [] }
|
|
2751
2752
|
},
|
|
2752
2753
|
setup(a) {
|
|
2753
2754
|
const o = a;
|
|
2754
|
-
return (e, t) => (u(), g(n(
|
|
2755
|
+
return (e, t) => (u(), g(n(Yt), le(he(e.$attrs)), {
|
|
2755
2756
|
default: d(() => [
|
|
2756
|
-
(u(!0), C(Q, null, Y(o.options, (l, s) => (u(), g(n(
|
|
2757
|
+
(u(!0), C(Q, null, Y(o.options, (l, s) => (u(), g(n(qt), F({
|
|
2757
2758
|
key: `item_${s}_${l.value}`
|
|
2758
|
-
}, l),
|
|
2759
|
+
}, l), be({ _: 2 }, [
|
|
2759
2760
|
e.$slots.option ? {
|
|
2760
2761
|
name: "default",
|
|
2761
2762
|
fn: d(() => [
|
|
@@ -2768,7 +2769,7 @@ const Zn = /* @__PURE__ */ P({
|
|
|
2768
2769
|
_: 3
|
|
2769
2770
|
}, 16));
|
|
2770
2771
|
}
|
|
2771
|
-
}),
|
|
2772
|
+
}), Jn = /* @__PURE__ */ V({
|
|
2772
2773
|
__name: "CheckboxEditor",
|
|
2773
2774
|
props: {
|
|
2774
2775
|
options: { default: () => [] },
|
|
@@ -2776,9 +2777,9 @@ const Zn = /* @__PURE__ */ P({
|
|
|
2776
2777
|
},
|
|
2777
2778
|
setup(a) {
|
|
2778
2779
|
const o = a, e = y(
|
|
2779
|
-
() => ke(o.button ?
|
|
2780
|
+
() => ke(o.button ? eo : to)
|
|
2780
2781
|
);
|
|
2781
|
-
return (t, l) => (u(), g(n(
|
|
2782
|
+
return (t, l) => (u(), g(n(oo), le(he(t.$attrs)), {
|
|
2782
2783
|
default: d(() => [
|
|
2783
2784
|
(u(!0), C(Q, null, Y(o.options, (s, c) => (u(), g(J(e.value), {
|
|
2784
2785
|
key: `item_${c}_${s.value}`,
|
|
@@ -2793,7 +2794,7 @@ const Zn = /* @__PURE__ */ P({
|
|
|
2793
2794
|
_: 1
|
|
2794
2795
|
}, 16));
|
|
2795
2796
|
}
|
|
2796
|
-
}),
|
|
2797
|
+
}), Qn = /* @__PURE__ */ V({
|
|
2797
2798
|
__name: "RadioEditor",
|
|
2798
2799
|
props: {
|
|
2799
2800
|
options: { default: () => [] },
|
|
@@ -2801,9 +2802,9 @@ const Zn = /* @__PURE__ */ P({
|
|
|
2801
2802
|
},
|
|
2802
2803
|
setup(a) {
|
|
2803
2804
|
const o = a, e = y(
|
|
2804
|
-
() => ke(o.button ?
|
|
2805
|
+
() => ke(o.button ? no : ao)
|
|
2805
2806
|
);
|
|
2806
|
-
return (t, l) => (u(), g(n(
|
|
2807
|
+
return (t, l) => (u(), g(n(so), le(he(t.$attrs)), {
|
|
2807
2808
|
default: d(() => [
|
|
2808
2809
|
(u(!0), C(Q, null, Y(o.options, (s, c) => (u(), g(J(e.value), {
|
|
2809
2810
|
key: `item_${c}_${s.value}`,
|
|
@@ -2818,7 +2819,7 @@ const Zn = /* @__PURE__ */ P({
|
|
|
2818
2819
|
_: 1
|
|
2819
2820
|
}, 16));
|
|
2820
2821
|
}
|
|
2821
|
-
}),
|
|
2822
|
+
}), Dt = {
|
|
2822
2823
|
none: {
|
|
2823
2824
|
component: "div",
|
|
2824
2825
|
props: {
|
|
@@ -2826,14 +2827,14 @@ const Zn = /* @__PURE__ */ P({
|
|
|
2826
2827
|
}
|
|
2827
2828
|
},
|
|
2828
2829
|
text: {
|
|
2829
|
-
component:
|
|
2830
|
+
component: ze,
|
|
2830
2831
|
props: {
|
|
2831
2832
|
clearable: !0
|
|
2832
2833
|
},
|
|
2833
2834
|
defaultValue: ""
|
|
2834
2835
|
},
|
|
2835
2836
|
textarea: {
|
|
2836
|
-
component:
|
|
2837
|
+
component: ze,
|
|
2837
2838
|
props: {
|
|
2838
2839
|
type: "textarea",
|
|
2839
2840
|
rows: 2
|
|
@@ -2841,55 +2842,55 @@ const Zn = /* @__PURE__ */ P({
|
|
|
2841
2842
|
defaultValue: ""
|
|
2842
2843
|
},
|
|
2843
2844
|
select: {
|
|
2844
|
-
component:
|
|
2845
|
+
component: Wn,
|
|
2845
2846
|
props: {
|
|
2846
2847
|
clearable: !0
|
|
2847
2848
|
}
|
|
2848
2849
|
},
|
|
2849
2850
|
checkbox: {
|
|
2850
|
-
component:
|
|
2851
|
+
component: Jn,
|
|
2851
2852
|
props: {},
|
|
2852
2853
|
defaultValue: []
|
|
2853
2854
|
},
|
|
2854
2855
|
radio: {
|
|
2855
|
-
component:
|
|
2856
|
+
component: Qn,
|
|
2856
2857
|
props: {}
|
|
2857
2858
|
},
|
|
2858
2859
|
number: {
|
|
2859
|
-
component:
|
|
2860
|
+
component: lo,
|
|
2860
2861
|
props: {}
|
|
2861
2862
|
},
|
|
2862
2863
|
date: {
|
|
2863
|
-
component:
|
|
2864
|
+
component: nt,
|
|
2864
2865
|
props: {}
|
|
2865
2866
|
},
|
|
2866
2867
|
time: {
|
|
2867
|
-
component:
|
|
2868
|
+
component: io,
|
|
2868
2869
|
props: {}
|
|
2869
2870
|
},
|
|
2870
2871
|
datetime: {
|
|
2871
|
-
component:
|
|
2872
|
+
component: nt,
|
|
2872
2873
|
props: {
|
|
2873
2874
|
type: "datetime"
|
|
2874
2875
|
}
|
|
2875
2876
|
},
|
|
2876
2877
|
switch: {
|
|
2877
|
-
component:
|
|
2878
|
+
component: Qe,
|
|
2878
2879
|
props: {}
|
|
2879
2880
|
},
|
|
2880
2881
|
rate: {
|
|
2881
|
-
component:
|
|
2882
|
+
component: ro,
|
|
2882
2883
|
props: {}
|
|
2883
2884
|
},
|
|
2884
2885
|
slider: {
|
|
2885
|
-
component:
|
|
2886
|
+
component: co,
|
|
2886
2887
|
props: {}
|
|
2887
2888
|
},
|
|
2888
2889
|
cascader: {
|
|
2889
|
-
component:
|
|
2890
|
+
component: uo,
|
|
2890
2891
|
props: {}
|
|
2891
2892
|
}
|
|
2892
|
-
},
|
|
2893
|
+
}, Zn = {
|
|
2893
2894
|
/**
|
|
2894
2895
|
* 字段名称
|
|
2895
2896
|
*/
|
|
@@ -2921,7 +2922,7 @@ const Zn = /* @__PURE__ */ P({
|
|
|
2921
2922
|
modelValue: {
|
|
2922
2923
|
type: [String, Number, Boolean, Object, Array],
|
|
2923
2924
|
default(a) {
|
|
2924
|
-
return
|
|
2925
|
+
return Dt[a.editor]?.defaultValue;
|
|
2925
2926
|
}
|
|
2926
2927
|
},
|
|
2927
2928
|
/**
|
|
@@ -3003,17 +3004,17 @@ const Zn = /* @__PURE__ */ P({
|
|
|
3003
3004
|
type: Boolean
|
|
3004
3005
|
}
|
|
3005
3006
|
};
|
|
3006
|
-
async function
|
|
3007
|
+
async function Gn(a, o) {
|
|
3007
3008
|
const e = a.options;
|
|
3008
3009
|
return e ? typeof e == "function" ? await e(o) || [] : e : [];
|
|
3009
3010
|
}
|
|
3010
|
-
function
|
|
3011
|
-
const s = O([]), c = y(() => !t || !l ? {} :
|
|
3011
|
+
function Yn(a, o, e, t, l) {
|
|
3012
|
+
const s = O([]), c = y(() => !t || !l ? {} : No(a.cascader).reduce((p, f) => (p[f] = Be(l, f), p), {}));
|
|
3012
3013
|
return L(
|
|
3013
3014
|
c,
|
|
3014
3015
|
async (r) => {
|
|
3015
3016
|
if (e.value) {
|
|
3016
|
-
s.value = await
|
|
3017
|
+
s.value = await Gn(a, r);
|
|
3017
3018
|
const p = t?.exposed?.reset;
|
|
3018
3019
|
p && a.name && p(a.name);
|
|
3019
3020
|
}
|
|
@@ -3028,63 +3029,63 @@ function ta(a, o, e, t, l) {
|
|
|
3028
3029
|
placeholder: p,
|
|
3029
3030
|
label: f = "...",
|
|
3030
3031
|
disabled: m,
|
|
3031
|
-
readonly:
|
|
3032
|
-
} = a,
|
|
3032
|
+
readonly: b
|
|
3033
|
+
} = a, h = {
|
|
3033
3034
|
...a.props,
|
|
3034
3035
|
placeholder: p || (p === null ? void 0 : `请输入${f}`),
|
|
3035
3036
|
disabled: m,
|
|
3036
|
-
readonly:
|
|
3037
|
+
readonly: b,
|
|
3037
3038
|
options: s.value,
|
|
3038
3039
|
onFocus: () => o("focus"),
|
|
3039
3040
|
onBlur: () => o("blur"),
|
|
3040
|
-
onChange: (
|
|
3041
|
-
}, w = typeof r == "string" ?
|
|
3041
|
+
onChange: (M) => o("change", M)
|
|
3042
|
+
}, w = typeof r == "string" ? Dt[r] : {
|
|
3042
3043
|
component: r,
|
|
3043
3044
|
props: {}
|
|
3044
3045
|
};
|
|
3045
|
-
return
|
|
3046
|
-
props:
|
|
3046
|
+
return Xo({}, w, {
|
|
3047
|
+
props: h
|
|
3047
3048
|
});
|
|
3048
3049
|
})
|
|
3049
3050
|
};
|
|
3050
3051
|
}
|
|
3051
|
-
const
|
|
3052
|
+
const qn = {
|
|
3052
3053
|
key: 1,
|
|
3053
3054
|
class: "el-form-item__error"
|
|
3054
|
-
},
|
|
3055
|
+
}, ea = {
|
|
3055
3056
|
key: 0,
|
|
3056
3057
|
class: "x-field__tip"
|
|
3057
|
-
},
|
|
3058
|
+
}, ta = /* @__PURE__ */ V({
|
|
3058
3059
|
name: "XField",
|
|
3059
3060
|
__name: "Field",
|
|
3060
|
-
props:
|
|
3061
|
+
props: Zn,
|
|
3061
3062
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
3062
3063
|
setup(a, { expose: o, emit: e }) {
|
|
3063
|
-
const t = a, l = e, s = xe(
|
|
3064
|
+
const t = a, l = e, s = xe(Rt, null), c = xe(po, null), i = xe(Ot, null), r = y(() => !s?.proxy || !i ? t.visible : typeof t.visible == "function" ? t.visible(i) : Ge(t.visible) ? Object.entries(t.visible).every(([H, K]) => Be(i, H) === K) : t.visible), p = () => s?.proxy && i && t.name ? Be(i, t.name) ?? t.modelValue : t.modelValue, f = O(p()), { editor: m } = Yn(
|
|
3064
3065
|
t,
|
|
3065
3066
|
l,
|
|
3066
3067
|
r,
|
|
3067
3068
|
s,
|
|
3068
3069
|
i
|
|
3069
|
-
),
|
|
3070
|
+
), b = O(), h = O(), w = y(
|
|
3070
3071
|
() => t.size || c?.size || "default"
|
|
3071
|
-
),
|
|
3072
|
+
), M = y(() => Object.assign(
|
|
3072
3073
|
{},
|
|
3073
3074
|
s?.props.tooltipMessage || {},
|
|
3074
3075
|
typeof t.tooltipMessage == "boolean" ? {} : t.tooltipMessage
|
|
3075
|
-
)), z = (k = "") => t.error ? t.error : k.includes("is required") ? `${t.label || t.name}是必填项!` : k,
|
|
3076
|
+
)), z = (k = "") => t.error ? t.error : k.includes("is required") ? `${t.label || t.name}是必填项!` : k, E = y(() => {
|
|
3076
3077
|
const k = s?.props.tooltipMessage ?? t.tooltipMessage;
|
|
3077
3078
|
return {
|
|
3078
3079
|
[`is-tooltip-${t.tooltipPosition}`]: !!k && !!t.tooltipPosition
|
|
3079
3080
|
};
|
|
3080
|
-
}),
|
|
3081
|
+
}), B = y(() => {
|
|
3081
3082
|
const k = s?.proxy;
|
|
3082
3083
|
return {
|
|
3083
3084
|
width: t.width ? q(t.width) : k && k.inline && k.inlineColumns ? `${100 / k.inlineColumns}%` : null
|
|
3084
3085
|
};
|
|
3085
3086
|
}), S = y(() => ({
|
|
3086
3087
|
right: typeof t.tooltipPosition == "number" ? `${t.tooltipPosition}px` : void 0
|
|
3087
|
-
})),
|
|
3088
|
+
})), P = y(() => ({
|
|
3088
3089
|
...m.value.props,
|
|
3089
3090
|
modelValue: f.value,
|
|
3090
3091
|
"onUpdate:modelValue": (k) => {
|
|
@@ -3092,9 +3093,9 @@ const oa = {
|
|
|
3092
3093
|
}
|
|
3093
3094
|
}));
|
|
3094
3095
|
return L(f, (k, H) => {
|
|
3095
|
-
r.value && !
|
|
3096
|
+
r.value && !Ze(k, H) && (l("update:modelValue", k), s?.proxy && i && t.name && Xe(i, t.name, k));
|
|
3096
3097
|
}), L(
|
|
3097
|
-
() => !s?.proxy || !t.name || !i ? t.modelValue :
|
|
3098
|
+
() => !s?.proxy || !t.name || !i ? t.modelValue : Be(i, t.name) ?? t.modelValue,
|
|
3098
3099
|
(k) => {
|
|
3099
3100
|
r.value && (f.value = k);
|
|
3100
3101
|
},
|
|
@@ -3104,66 +3105,66 @@ const oa = {
|
|
|
3104
3105
|
), L(
|
|
3105
3106
|
r,
|
|
3106
3107
|
(k) => {
|
|
3107
|
-
s?.proxy && i && t.name && (k ? (f.value = p(),
|
|
3108
|
+
s?.proxy && i && t.name && (k ? (f.value = p(), Xe(i, t.name, f.value)) : (f.value = void 0, Xe(i, t.name, void 0)));
|
|
3108
3109
|
},
|
|
3109
3110
|
{
|
|
3110
3111
|
immediate: !0
|
|
3111
3112
|
}
|
|
3112
3113
|
), o({
|
|
3113
3114
|
fieldValue: f,
|
|
3114
|
-
itemRef:
|
|
3115
|
-
editorRef:
|
|
3115
|
+
itemRef: b,
|
|
3116
|
+
editorRef: h,
|
|
3116
3117
|
focus: () => {
|
|
3117
|
-
|
|
3118
|
+
h.value?.focus && h.value.focus();
|
|
3118
3119
|
},
|
|
3119
3120
|
blur: () => {
|
|
3120
|
-
|
|
3121
|
+
h.value?.foucs && h.value.blur();
|
|
3121
3122
|
}
|
|
3122
|
-
}), (k, H) => r.value ? (u(), g(n(
|
|
3123
|
+
}), (k, H) => r.value ? (u(), g(n(fo), F({
|
|
3123
3124
|
key: 0,
|
|
3124
|
-
class: ["x-field",
|
|
3125
|
+
class: ["x-field", E.value],
|
|
3125
3126
|
ref_key: "itemRef",
|
|
3126
|
-
ref:
|
|
3127
|
+
ref: b,
|
|
3127
3128
|
prop: t.name,
|
|
3128
3129
|
label: k.label,
|
|
3129
3130
|
size: w.value,
|
|
3130
|
-
style:
|
|
3131
|
-
}, k.$attrs),
|
|
3131
|
+
style: B.value
|
|
3132
|
+
}, k.$attrs), be({
|
|
3132
3133
|
error: d(({ error: K }) => [
|
|
3133
3134
|
x(k.$slots, "error", { error: K }, () => [
|
|
3134
3135
|
n(s)?.props.tooltipMessage ?? t.tooltipMessage ? (u(), C("div", {
|
|
3135
3136
|
key: 0,
|
|
3136
3137
|
class: "x-field__info",
|
|
3137
|
-
style:
|
|
3138
|
+
style: pe(S.value)
|
|
3138
3139
|
}, [
|
|
3139
3140
|
_(n(ht), F({
|
|
3140
3141
|
content: z(K)
|
|
3141
|
-
},
|
|
3142
|
+
}, M.value), {
|
|
3142
3143
|
default: d(() => [
|
|
3143
|
-
_(n(
|
|
3144
|
+
_(n(ue), {
|
|
3144
3145
|
class: "x-field__trigger",
|
|
3145
|
-
icon: n(
|
|
3146
|
+
icon: n(Bo),
|
|
3146
3147
|
size: w.value
|
|
3147
3148
|
}, null, 8, ["icon", "size"])
|
|
3148
3149
|
]),
|
|
3149
3150
|
_: 2
|
|
3150
3151
|
}, 1040, ["content"])
|
|
3151
|
-
], 4)) : (u(), C("div",
|
|
3152
|
+
], 4)) : (u(), C("div", qn, A(z(K)), 1))
|
|
3152
3153
|
])
|
|
3153
3154
|
]),
|
|
3154
3155
|
default: d(() => [
|
|
3155
3156
|
X("div", {
|
|
3156
3157
|
class: W(["x-field__editor_wrap", { "is-inline": t.inline }])
|
|
3157
3158
|
}, [
|
|
3158
|
-
x(k.$slots, "editor", { editor:
|
|
3159
|
+
x(k.$slots, "editor", { editor: P.value }, () => [
|
|
3159
3160
|
n(m).component ? (u(), g(J(n(m).component), F({
|
|
3160
3161
|
key: 0,
|
|
3161
3162
|
class: "x-field__editor",
|
|
3162
3163
|
ref_key: "editorRef",
|
|
3163
|
-
ref:
|
|
3164
|
+
ref: h,
|
|
3164
3165
|
modelValue: f.value,
|
|
3165
3166
|
"onUpdate:modelValue": H[0] || (H[0] = (K) => f.value = K)
|
|
3166
|
-
}, n(m).props),
|
|
3167
|
+
}, n(m).props), be({ _: 2 }, [
|
|
3167
3168
|
k.$slots.option ? {
|
|
3168
3169
|
name: "option",
|
|
3169
3170
|
fn: d(({ option: K }) => [
|
|
@@ -3173,7 +3174,7 @@ const oa = {
|
|
|
3173
3174
|
} : void 0
|
|
3174
3175
|
]), 1040, ["modelValue"])) : v("", !0)
|
|
3175
3176
|
]),
|
|
3176
|
-
t.tip || k.$slots.tip ? (u(), C("div",
|
|
3177
|
+
t.tip || k.$slots.tip ? (u(), C("div", ea, [
|
|
3177
3178
|
x(k.$slots, "tip", {}, () => [
|
|
3178
3179
|
R(A(t.tip), 1)
|
|
3179
3180
|
])
|
|
@@ -3192,7 +3193,7 @@ const oa = {
|
|
|
3192
3193
|
} : void 0
|
|
3193
3194
|
]), 1040, ["prop", "label", "size", "class", "style"])) : v("", !0);
|
|
3194
3195
|
}
|
|
3195
|
-
}),
|
|
3196
|
+
}), oa = {
|
|
3196
3197
|
/**
|
|
3197
3198
|
* 表单模型
|
|
3198
3199
|
*/
|
|
@@ -3248,14 +3249,14 @@ const oa = {
|
|
|
3248
3249
|
type: [Object, Boolean],
|
|
3249
3250
|
default: void 0
|
|
3250
3251
|
}
|
|
3251
|
-
},
|
|
3252
|
+
}, Rt = Symbol("formInstanceKey"), Ot = Symbol("formModelKey"), na = /* @__PURE__ */ V({
|
|
3252
3253
|
name: "XForm",
|
|
3253
3254
|
__name: "Form",
|
|
3254
|
-
props:
|
|
3255
|
+
props: oa,
|
|
3255
3256
|
emits: ["change", "submit", "reset"],
|
|
3256
3257
|
setup(a, { expose: o, emit: e }) {
|
|
3257
|
-
const t = a, l = e, s =
|
|
3258
|
-
|
|
3258
|
+
const t = a, l = e, s = de(), c = O(), i = Re(t.model || {}), r = O(!1);
|
|
3259
|
+
Se(Rt, s), Se(Ot, i), L(i, () => {
|
|
3259
3260
|
l("change", ge(i));
|
|
3260
3261
|
}), L(
|
|
3261
3262
|
() => t.model,
|
|
@@ -3274,19 +3275,19 @@ const oa = {
|
|
|
3274
3275
|
model: i,
|
|
3275
3276
|
submit: p,
|
|
3276
3277
|
reset: f
|
|
3277
|
-
}), (m,
|
|
3278
|
+
}), (m, b) => (u(), g(n(mo), F({
|
|
3278
3279
|
ref_key: "formRef",
|
|
3279
3280
|
ref: c,
|
|
3280
3281
|
class: "x-form",
|
|
3281
3282
|
inline: t.inline,
|
|
3282
3283
|
model: i,
|
|
3283
|
-
onKeyup:
|
|
3284
|
-
onSubmit:
|
|
3284
|
+
onKeyup: Ut(p, ["enter"]),
|
|
3285
|
+
onSubmit: b[1] || (b[1] = vt(() => {
|
|
3285
3286
|
}, ["stop", "prevent"]))
|
|
3286
3287
|
}, m.$attrs), {
|
|
3287
3288
|
default: d(() => [
|
|
3288
3289
|
x(m.$slots, "default"),
|
|
3289
|
-
t.footer ? (u(), g(n(
|
|
3290
|
+
t.footer ? (u(), g(n(ta), {
|
|
3290
3291
|
key: 0,
|
|
3291
3292
|
editor: "none",
|
|
3292
3293
|
class: "x-form__footer",
|
|
@@ -3308,7 +3309,7 @@ const oa = {
|
|
|
3308
3309
|
t.resetText ? (u(), g(n(ie), {
|
|
3309
3310
|
key: 1,
|
|
3310
3311
|
type: "default",
|
|
3311
|
-
onClick:
|
|
3312
|
+
onClick: b[0] || (b[0] = () => f())
|
|
3312
3313
|
}, {
|
|
3313
3314
|
default: d(() => [
|
|
3314
3315
|
R(A(t.resetText), 1)
|
|
@@ -3324,7 +3325,7 @@ const oa = {
|
|
|
3324
3325
|
_: 3
|
|
3325
3326
|
}, 16, ["inline", "model"]));
|
|
3326
3327
|
}
|
|
3327
|
-
}),
|
|
3328
|
+
}), aa = {
|
|
3328
3329
|
modelValue: {
|
|
3329
3330
|
type: Boolean,
|
|
3330
3331
|
default: !0
|
|
@@ -3361,42 +3362,42 @@ const oa = {
|
|
|
3361
3362
|
submitMethod: {
|
|
3362
3363
|
type: Function
|
|
3363
3364
|
}
|
|
3364
|
-
},
|
|
3365
|
+
}, ja = /* @__PURE__ */ V({
|
|
3365
3366
|
name: "XDialogForm",
|
|
3366
3367
|
__name: "DialogForm",
|
|
3367
|
-
props:
|
|
3368
|
+
props: aa,
|
|
3368
3369
|
emits: ["update:modelValue", "submit", "close"],
|
|
3369
3370
|
setup(a, { expose: o, emit: e }) {
|
|
3370
3371
|
const t = a, l = e, s = O(), c = O(), i = y(() => c.value?.$vtjEl), r = () => {
|
|
3371
3372
|
s.value?.submit();
|
|
3372
3373
|
}, p = () => {
|
|
3373
3374
|
l("update:modelValue", !1), l("close");
|
|
3374
|
-
}, f = async (
|
|
3375
|
-
l("submit",
|
|
3375
|
+
}, f = async (h) => {
|
|
3376
|
+
l("submit", h), t.submitMethod ? await t.submitMethod(h) && p() : p();
|
|
3376
3377
|
}, m = y(
|
|
3377
3378
|
() => t.formProps?.disabled ? !1 : t.submit
|
|
3378
|
-
),
|
|
3379
|
+
), b = y(
|
|
3379
3380
|
() => t.formProps?.disabled ? !1 : t.cancel
|
|
3380
3381
|
);
|
|
3381
3382
|
return o({
|
|
3382
3383
|
$vtjEl: i,
|
|
3383
3384
|
formRef: s,
|
|
3384
3385
|
dialogRef: c
|
|
3385
|
-
}), (
|
|
3386
|
+
}), (h, w) => (u(), g(n(Bt), F({
|
|
3386
3387
|
ref_key: "dialogRef",
|
|
3387
3388
|
ref: c,
|
|
3388
3389
|
class: "x-dialog-form",
|
|
3389
3390
|
"model-value": t.modelValue,
|
|
3390
3391
|
submit: m.value,
|
|
3391
|
-
cancel:
|
|
3392
|
+
cancel: b.value,
|
|
3392
3393
|
size: t.size,
|
|
3393
3394
|
onSubmit: r,
|
|
3394
3395
|
onClose: p,
|
|
3395
3396
|
minimizable: !1,
|
|
3396
3397
|
maximizable: !1
|
|
3397
|
-
},
|
|
3398
|
+
}, h.$attrs), be({
|
|
3398
3399
|
default: d(() => [
|
|
3399
|
-
_(n(
|
|
3400
|
+
_(n(na), F({
|
|
3400
3401
|
ref_key: "formRef",
|
|
3401
3402
|
ref: s,
|
|
3402
3403
|
class: "x-dialog-form__form",
|
|
@@ -3408,37 +3409,37 @@ const oa = {
|
|
|
3408
3409
|
"submit-method": f
|
|
3409
3410
|
}, t.formProps), {
|
|
3410
3411
|
default: d(() => [
|
|
3411
|
-
x(
|
|
3412
|
+
x(h.$slots, "default")
|
|
3412
3413
|
]),
|
|
3413
3414
|
_: 3
|
|
3414
3415
|
}, 16, ["size", "model", "rules"])
|
|
3415
3416
|
]),
|
|
3416
3417
|
_: 2
|
|
3417
3418
|
}, [
|
|
3418
|
-
|
|
3419
|
+
h.$slots.extra ? {
|
|
3419
3420
|
name: "extra",
|
|
3420
3421
|
fn: d(() => [
|
|
3421
|
-
x(
|
|
3422
|
+
x(h.$slots, "extra")
|
|
3422
3423
|
]),
|
|
3423
3424
|
key: "0"
|
|
3424
3425
|
} : void 0,
|
|
3425
|
-
|
|
3426
|
+
h.$slots.handle ? {
|
|
3426
3427
|
name: "handle",
|
|
3427
3428
|
fn: d(() => [
|
|
3428
|
-
x(
|
|
3429
|
+
x(h.$slots, "handle")
|
|
3429
3430
|
]),
|
|
3430
3431
|
key: "1"
|
|
3431
3432
|
} : void 0,
|
|
3432
|
-
|
|
3433
|
+
h.$slots.footer ? {
|
|
3433
3434
|
name: "footer",
|
|
3434
3435
|
fn: d(() => [
|
|
3435
|
-
x(
|
|
3436
|
+
x(h.$slots, "footer")
|
|
3436
3437
|
]),
|
|
3437
3438
|
key: "2"
|
|
3438
3439
|
} : void 0
|
|
3439
3440
|
]), 1040, ["model-value", "submit", "cancel", "size"]));
|
|
3440
3441
|
}
|
|
3441
|
-
}),
|
|
3442
|
+
}), sa = {
|
|
3442
3443
|
items: {
|
|
3443
3444
|
type: Array,
|
|
3444
3445
|
default() {
|
|
@@ -3448,10 +3449,10 @@ const oa = {
|
|
|
3448
3449
|
border: {
|
|
3449
3450
|
type: Boolean
|
|
3450
3451
|
}
|
|
3451
|
-
},
|
|
3452
|
+
}, Na = /* @__PURE__ */ V({
|
|
3452
3453
|
name: "XTabs",
|
|
3453
3454
|
__name: "Tabs",
|
|
3454
|
-
props:
|
|
3455
|
+
props: sa,
|
|
3455
3456
|
setup(a) {
|
|
3456
3457
|
const o = a, e = (l) => {
|
|
3457
3458
|
const { label: s, name: c, value: i, disabled: r, closable: p, lazy: f } = l;
|
|
@@ -3465,15 +3466,15 @@ const oa = {
|
|
|
3465
3466
|
}, t = y(() => ({
|
|
3466
3467
|
"is-no-border": !o.border
|
|
3467
3468
|
}));
|
|
3468
|
-
return (l, s) => (u(), g(n(
|
|
3469
|
+
return (l, s) => (u(), g(n(_t), F({
|
|
3469
3470
|
class: ["x-tabs", t.value]
|
|
3470
3471
|
}, l.$attrs), {
|
|
3471
3472
|
default: d(() => [
|
|
3472
|
-
(u(!0), C(Q, null, Y(o.items, (c) => (u(), g(n(
|
|
3473
|
+
(u(!0), C(Q, null, Y(o.items, (c) => (u(), g(n(Ke), F({
|
|
3473
3474
|
key: c.value ?? c.name
|
|
3474
3475
|
}, e(c)), {
|
|
3475
3476
|
label: d(() => [
|
|
3476
|
-
x(l.$slots, "label", le(
|
|
3477
|
+
x(l.$slots, "label", le(he(c)), () => [
|
|
3477
3478
|
c.icon ? (u(), g(J(n(_e)(c.icon)), {
|
|
3478
3479
|
key: 0,
|
|
3479
3480
|
class: "x-tabs__icon"
|
|
@@ -3482,7 +3483,7 @@ const oa = {
|
|
|
3482
3483
|
])
|
|
3483
3484
|
]),
|
|
3484
3485
|
default: d(() => [
|
|
3485
|
-
x(l.$slots, "default", le(
|
|
3486
|
+
x(l.$slots, "default", le(he(c)), () => [
|
|
3486
3487
|
c.component ? (u(), g(J(c.component), le(F({ key: 0 }, c.props)), null, 16)) : v("", !0)
|
|
3487
3488
|
])
|
|
3488
3489
|
]),
|
|
@@ -3492,7 +3493,7 @@ const oa = {
|
|
|
3492
3493
|
_: 3
|
|
3493
3494
|
}, 16, ["class"]));
|
|
3494
3495
|
}
|
|
3495
|
-
}),
|
|
3496
|
+
}), la = {
|
|
3496
3497
|
direction: {
|
|
3497
3498
|
type: String,
|
|
3498
3499
|
default: "column"
|
|
@@ -3530,26 +3531,26 @@ const oa = {
|
|
|
3530
3531
|
onTitleClick: {
|
|
3531
3532
|
type: Function
|
|
3532
3533
|
}
|
|
3533
|
-
},
|
|
3534
|
+
}, ia = { class: "x-data-item__title" }, ra = {
|
|
3534
3535
|
key: 1,
|
|
3535
3536
|
class: "x-data-item__section x-data-item__desc"
|
|
3536
|
-
},
|
|
3537
|
+
}, ca = {
|
|
3537
3538
|
key: 2,
|
|
3538
3539
|
class: "x-data-item__section x-data-item__extra"
|
|
3539
|
-
},
|
|
3540
|
+
}, ua = {
|
|
3540
3541
|
key: 3,
|
|
3541
3542
|
class: "x-data-item__section x-data-item__actions"
|
|
3542
|
-
},
|
|
3543
|
+
}, Xa = /* @__PURE__ */ V({
|
|
3543
3544
|
name: "XDataItem",
|
|
3544
3545
|
__name: "DataItem",
|
|
3545
|
-
props:
|
|
3546
|
+
props: la,
|
|
3546
3547
|
emits: ["imageClick", "titleClick", "actionClick", "actionCommand"],
|
|
3547
3548
|
setup(a, { emit: o }) {
|
|
3548
3549
|
const e = a, t = o, l = y(() => {
|
|
3549
|
-
const { imageWidth: m, imageHeight:
|
|
3550
|
+
const { imageWidth: m, imageHeight: b } = e;
|
|
3550
3551
|
return {
|
|
3551
3552
|
width: m ? q(m) : void 0,
|
|
3552
|
-
height:
|
|
3553
|
+
height: b ? q(b) : void 0
|
|
3553
3554
|
};
|
|
3554
3555
|
}), s = y(() => ({
|
|
3555
3556
|
[`is-image-${e.direction}`]: !!e.direction,
|
|
@@ -3561,13 +3562,13 @@ const oa = {
|
|
|
3561
3562
|
type: "info",
|
|
3562
3563
|
items: e.actions,
|
|
3563
3564
|
...e.actionBarProps
|
|
3564
|
-
})), i = () => t("imageClick"), r = () => t("titleClick"), p = (m) => t("actionClick", m), f = (m,
|
|
3565
|
-
return (m,
|
|
3565
|
+
})), i = () => t("imageClick"), r = () => t("titleClick"), p = (m) => t("actionClick", m), f = (m, b) => t("actionCommand", m, b);
|
|
3566
|
+
return (m, b) => (u(), g(n(I), {
|
|
3566
3567
|
class: W(["x-data-item", s.value]),
|
|
3567
3568
|
direction: e.direction
|
|
3568
3569
|
}, {
|
|
3569
3570
|
default: d(() => [
|
|
3570
|
-
e.imageSrc || m.$slots.image ? (u(), g(n(
|
|
3571
|
+
e.imageSrc || m.$slots.image ? (u(), g(n(I), {
|
|
3571
3572
|
key: 0,
|
|
3572
3573
|
class: "x-data-item__img",
|
|
3573
3574
|
autoPointer: !0,
|
|
@@ -3575,23 +3576,23 @@ const oa = {
|
|
|
3575
3576
|
}, {
|
|
3576
3577
|
default: d(() => [
|
|
3577
3578
|
x(m.$slots, "image", {}, () => [
|
|
3578
|
-
e.imageSrc ? (u(), g(n(
|
|
3579
|
+
e.imageSrc ? (u(), g(n(go), {
|
|
3579
3580
|
key: 0,
|
|
3580
|
-
style:
|
|
3581
|
+
style: pe(l.value),
|
|
3581
3582
|
src: e.imageSrc
|
|
3582
3583
|
}, null, 8, ["style", "src"])) : v("", !0)
|
|
3583
3584
|
])
|
|
3584
3585
|
]),
|
|
3585
3586
|
_: 3
|
|
3586
3587
|
}, 8, ["onClick"])) : v("", !0),
|
|
3587
|
-
_(n(
|
|
3588
|
+
_(n(I), {
|
|
3588
3589
|
class: "x-data-item__content",
|
|
3589
3590
|
direction: "column",
|
|
3590
3591
|
grow: "",
|
|
3591
3592
|
shrink: ""
|
|
3592
3593
|
}, {
|
|
3593
3594
|
default: d(() => [
|
|
3594
|
-
e.title || m.$slots.title ? (u(), g(n(
|
|
3595
|
+
e.title || m.$slots.title ? (u(), g(n(I), {
|
|
3595
3596
|
key: 0,
|
|
3596
3597
|
class: "x-data-item__section x-data-item__wrapper",
|
|
3597
3598
|
align: "center",
|
|
@@ -3603,7 +3604,7 @@ const oa = {
|
|
|
3603
3604
|
key: 0,
|
|
3604
3605
|
class: "x-data-item__icon"
|
|
3605
3606
|
})) : v("", !0),
|
|
3606
|
-
X("span",
|
|
3607
|
+
X("span", ia, [
|
|
3607
3608
|
x(m.$slots, "title", {}, () => [
|
|
3608
3609
|
R(A(e.title), 1)
|
|
3609
3610
|
])
|
|
@@ -3611,17 +3612,17 @@ const oa = {
|
|
|
3611
3612
|
]),
|
|
3612
3613
|
_: 3
|
|
3613
3614
|
}, 8, ["onClick"])) : v("", !0),
|
|
3614
|
-
e.description || m.$slots.description ? (u(), C("div",
|
|
3615
|
+
e.description || m.$slots.description ? (u(), C("div", ra, [
|
|
3615
3616
|
x(m.$slots, "description", {}, () => [
|
|
3616
3617
|
R(A(e.description), 1)
|
|
3617
3618
|
])
|
|
3618
3619
|
])) : v("", !0),
|
|
3619
|
-
m.$slots.default ? (u(), C("div",
|
|
3620
|
+
m.$slots.default ? (u(), C("div", ca, [
|
|
3620
3621
|
x(m.$slots, "default")
|
|
3621
3622
|
])) : v("", !0),
|
|
3622
|
-
e.actions || e.actionBarProps || m.$slots.actions ? (u(), C("div",
|
|
3623
|
+
e.actions || e.actionBarProps || m.$slots.actions ? (u(), C("div", ua, [
|
|
3623
3624
|
x(m.$slots, "actions", {}, () => [
|
|
3624
|
-
_(n(
|
|
3625
|
+
_(n(et), F(c.value, {
|
|
3625
3626
|
onClick: p,
|
|
3626
3627
|
onCommand: f
|
|
3627
3628
|
}), null, 16)
|
|
@@ -3634,7 +3635,7 @@ const oa = {
|
|
|
3634
3635
|
_: 3
|
|
3635
3636
|
}, 8, ["direction", "class"]));
|
|
3636
3637
|
}
|
|
3637
|
-
}),
|
|
3638
|
+
}), da = {
|
|
3638
3639
|
option: {
|
|
3639
3640
|
type: Object
|
|
3640
3641
|
},
|
|
@@ -3647,16 +3648,16 @@ const oa = {
|
|
|
3647
3648
|
default: "400px"
|
|
3648
3649
|
}
|
|
3649
3650
|
};
|
|
3650
|
-
function
|
|
3651
|
+
function pa() {
|
|
3651
3652
|
return import("echarts");
|
|
3652
3653
|
}
|
|
3653
|
-
function
|
|
3654
|
+
function fa(a, o) {
|
|
3654
3655
|
const e = O(), t = Ve();
|
|
3655
|
-
return
|
|
3656
|
-
t.value = await
|
|
3656
|
+
return mt(async () => {
|
|
3657
|
+
t.value = await pa();
|
|
3657
3658
|
const l = n(a);
|
|
3658
3659
|
l && (e.value || (e.value = ke(t.value.init(l))), e.value && e.value.setOption(o.option || {}));
|
|
3659
|
-
}),
|
|
3660
|
+
}), gt(() => {
|
|
3660
3661
|
e.value && e.value.dispose();
|
|
3661
3662
|
}), L(
|
|
3662
3663
|
() => o.option,
|
|
@@ -3664,9 +3665,9 @@ function va(a, o) {
|
|
|
3664
3665
|
e.value && e.value.setOption(l || {});
|
|
3665
3666
|
},
|
|
3666
3667
|
{ deep: !0 }
|
|
3667
|
-
),
|
|
3668
|
+
), Ro(
|
|
3668
3669
|
a,
|
|
3669
|
-
|
|
3670
|
+
Uo(() => {
|
|
3670
3671
|
e.value && e.value.resize();
|
|
3671
3672
|
}, 150)
|
|
3672
3673
|
), {
|
|
@@ -3674,12 +3675,12 @@ function va(a, o) {
|
|
|
3674
3675
|
echarts: t
|
|
3675
3676
|
};
|
|
3676
3677
|
}
|
|
3677
|
-
const
|
|
3678
|
+
const Ua = /* @__PURE__ */ V({
|
|
3678
3679
|
name: "XChart",
|
|
3679
3680
|
__name: "Chart",
|
|
3680
|
-
props:
|
|
3681
|
+
props: da,
|
|
3681
3682
|
setup(a, { expose: o }) {
|
|
3682
|
-
const e = a, t = O(), { echartsInstance: l, echarts: s } =
|
|
3683
|
+
const e = a, t = O(), { echartsInstance: l, echarts: s } = fa(t, e), c = y(() => ({
|
|
3683
3684
|
width: q(e.width),
|
|
3684
3685
|
height: q(e.height)
|
|
3685
3686
|
}));
|
|
@@ -3690,10 +3691,10 @@ const ba = /* @__PURE__ */ P({
|
|
|
3690
3691
|
}), (i, r) => (u(), C("div", {
|
|
3691
3692
|
ref_key: "chartRef",
|
|
3692
3693
|
ref: t,
|
|
3693
|
-
style:
|
|
3694
|
+
style: pe(c.value)
|
|
3694
3695
|
}, null, 4));
|
|
3695
3696
|
}
|
|
3696
|
-
}),
|
|
3697
|
+
}), ma = {
|
|
3697
3698
|
data: {
|
|
3698
3699
|
type: [Object, Function],
|
|
3699
3700
|
default() {
|
|
@@ -3731,36 +3732,36 @@ const ba = /* @__PURE__ */ P({
|
|
|
3731
3732
|
infiniteScroll: {
|
|
3732
3733
|
type: [Boolean, Object]
|
|
3733
3734
|
}
|
|
3734
|
-
},
|
|
3735
|
+
}, ga = {
|
|
3735
3736
|
key: 0,
|
|
3736
3737
|
class: "x-list__loading"
|
|
3737
|
-
},
|
|
3738
|
+
}, ya = {
|
|
3738
3739
|
key: 1,
|
|
3739
3740
|
class: "x-list__nomore"
|
|
3740
|
-
},
|
|
3741
|
+
}, va = {
|
|
3741
3742
|
key: 0,
|
|
3742
3743
|
class: "x-list__loading"
|
|
3743
|
-
},
|
|
3744
|
+
}, ha = {
|
|
3744
3745
|
key: 1,
|
|
3745
3746
|
class: "x-list__nomore"
|
|
3746
|
-
},
|
|
3747
|
+
}, ba = {
|
|
3747
3748
|
key: 1,
|
|
3748
3749
|
class: "x-list__pager"
|
|
3749
|
-
},
|
|
3750
|
+
}, Ha = /* @__PURE__ */ V({
|
|
3750
3751
|
name: "XList",
|
|
3751
3752
|
__name: "List",
|
|
3752
|
-
props:
|
|
3753
|
+
props: ma,
|
|
3753
3754
|
emits: ["load"],
|
|
3754
3755
|
setup(a, { expose: o, emit: e }) {
|
|
3755
3756
|
const t = a, l = e, s = Re({
|
|
3756
3757
|
page: t.page,
|
|
3757
3758
|
pageSize: t.pageSize
|
|
3758
3759
|
});
|
|
3759
|
-
|
|
3760
|
+
Je(() => {
|
|
3760
3761
|
const { page: T, pageSize: j } = t;
|
|
3761
3762
|
Object.assign(s, { page: T, pageSize: j });
|
|
3762
3763
|
});
|
|
3763
|
-
const { data: c, loading: i } =
|
|
3764
|
+
const { data: c, loading: i } = an(
|
|
3764
3765
|
t.data,
|
|
3765
3766
|
{
|
|
3766
3767
|
list: [],
|
|
@@ -3770,39 +3771,39 @@ const ba = /* @__PURE__ */ P({
|
|
|
3770
3771
|
), r = y(() => Math.ceil((c.value.total || 0) / s.pageSize)), p = O(!1), f = O(), m = y(() => ({
|
|
3771
3772
|
width: q(t.width),
|
|
3772
3773
|
height: q(t.height)
|
|
3773
|
-
})),
|
|
3774
|
+
})), b = y(() => ({
|
|
3774
3775
|
"is-virtual": !!t.itemHeight
|
|
3775
|
-
})),
|
|
3776
|
+
})), h = y(() => {
|
|
3776
3777
|
const T = {};
|
|
3777
3778
|
for (let [j, k] of Object.entries(
|
|
3778
|
-
|
|
3779
|
+
it(t.infiniteScroll)
|
|
3779
3780
|
))
|
|
3780
3781
|
T[`infinite-scroll-${j}`] = k;
|
|
3781
3782
|
return (i.value || p.value) && (T["infinite-scroll-disabled"] = !0), T;
|
|
3782
|
-
}), w = y(() =>
|
|
3783
|
+
}), w = y(() => it(t.pager, {})), { list: M, containerProps: z, wrapperProps: E, scrollTo: B } = Oo(
|
|
3783
3784
|
y(() => c.value.list),
|
|
3784
3785
|
{
|
|
3785
3786
|
itemHeight: t.itemHeight || 0
|
|
3786
3787
|
}
|
|
3787
3788
|
), S = () => {
|
|
3788
3789
|
!t.infiniteScroll || p.value || (s.page < r.value ? (++s.page, l("load", s)) : p.value = !0);
|
|
3789
|
-
},
|
|
3790
|
+
}, P = (T) => t.dataKey ? T[t.dataKey] : void 0;
|
|
3790
3791
|
return o({
|
|
3791
|
-
list:
|
|
3792
|
-
scrollTo:
|
|
3792
|
+
list: M,
|
|
3793
|
+
scrollTo: B,
|
|
3793
3794
|
wrapperRef: f,
|
|
3794
3795
|
loading: i,
|
|
3795
3796
|
state: s,
|
|
3796
3797
|
pageCount: r,
|
|
3797
3798
|
nomore: p,
|
|
3798
3799
|
data: c,
|
|
3799
|
-
getKey:
|
|
3800
|
+
getKey: P
|
|
3800
3801
|
}), (T, j) => (u(), C("div", {
|
|
3801
|
-
class: W(["x-list",
|
|
3802
|
-
style:
|
|
3802
|
+
class: W(["x-list", b.value]),
|
|
3803
|
+
style: pe(m.value)
|
|
3803
3804
|
}, [
|
|
3804
3805
|
!n(c).total && !n(i) ? x(T.$slots, "empty", { key: 0 }, () => [
|
|
3805
|
-
_(n(
|
|
3806
|
+
_(n(bt))
|
|
3806
3807
|
]) : v("", !0),
|
|
3807
3808
|
X("div", F({ class: "x-list__content" }, n(z)), [
|
|
3808
3809
|
t.itemHeight ? G((u(), C("div", F({
|
|
@@ -3810,49 +3811,49 @@ const ba = /* @__PURE__ */ P({
|
|
|
3810
3811
|
class: "x-list__wrapper",
|
|
3811
3812
|
ref_key: "wrapperRef",
|
|
3812
3813
|
ref: f
|
|
3813
|
-
}, { ...n(
|
|
3814
|
-
(u(!0), C(Q, null, Y(n(
|
|
3815
|
-
key:
|
|
3814
|
+
}, { ...n(E), ...h.value }), [
|
|
3815
|
+
(u(!0), C(Q, null, Y(n(M), (k, H) => x(T.$slots, "default", le(F({
|
|
3816
|
+
key: P(k.data)
|
|
3816
3817
|
}, { item: k.data, index: H })), () => [
|
|
3817
3818
|
X("div", null, A(k), 1)
|
|
3818
3819
|
])), 128)),
|
|
3819
|
-
n(i) ? (u(), C("div",
|
|
3820
|
+
n(i) ? (u(), C("div", ga, [
|
|
3820
3821
|
x(T.$slots, "loading", {}, () => [
|
|
3821
3822
|
R(" 正在加载数据... ")
|
|
3822
3823
|
])
|
|
3823
3824
|
])) : v("", !0),
|
|
3824
|
-
p.value ? (u(), C("div",
|
|
3825
|
+
p.value ? (u(), C("div", ya, [
|
|
3825
3826
|
x(T.$slots, "nomore", {}, () => [
|
|
3826
3827
|
R(" 没有更多数据 ")
|
|
3827
3828
|
])
|
|
3828
3829
|
])) : v("", !0)
|
|
3829
3830
|
], 16)), [
|
|
3830
|
-
[n(
|
|
3831
|
+
[n(at), S]
|
|
3831
3832
|
]) : G((u(), C("div", F({
|
|
3832
3833
|
key: 1,
|
|
3833
3834
|
class: "x-list__wrapper"
|
|
3834
|
-
},
|
|
3835
|
+
}, h.value), [
|
|
3835
3836
|
(u(!0), C(Q, null, Y(n(c).list, (k, H) => x(T.$slots, "default", le(F({
|
|
3836
|
-
key:
|
|
3837
|
+
key: P(k)
|
|
3837
3838
|
}, { item: k, index: H })), () => [
|
|
3838
3839
|
X("div", null, A(k), 1)
|
|
3839
3840
|
])), 128)),
|
|
3840
|
-
n(i) ? (u(), C("div",
|
|
3841
|
+
n(i) ? (u(), C("div", va, [
|
|
3841
3842
|
x(T.$slots, "loading", {}, () => [
|
|
3842
3843
|
R(" 正在加载数据... ")
|
|
3843
3844
|
])
|
|
3844
3845
|
])) : v("", !0),
|
|
3845
|
-
p.value ? (u(), C("div",
|
|
3846
|
+
p.value ? (u(), C("div", ha, [
|
|
3846
3847
|
x(T.$slots, "nomore", {}, () => [
|
|
3847
3848
|
R(" 没有更多数据 ")
|
|
3848
3849
|
])
|
|
3849
3850
|
])) : v("", !0)
|
|
3850
3851
|
], 16)), [
|
|
3851
|
-
[n(
|
|
3852
|
+
[n(at), S]
|
|
3852
3853
|
])
|
|
3853
3854
|
], 16),
|
|
3854
|
-
t.pager ? (u(), C("div",
|
|
3855
|
-
_(n(
|
|
3855
|
+
t.pager ? (u(), C("div", ba, [
|
|
3856
|
+
_(n(yo), F({
|
|
3856
3857
|
small: "",
|
|
3857
3858
|
background: "",
|
|
3858
3859
|
layout: "prev, pager, next",
|
|
@@ -3867,7 +3868,7 @@ const ba = /* @__PURE__ */ P({
|
|
|
3867
3868
|
])) : v("", !0)
|
|
3868
3869
|
], 6));
|
|
3869
3870
|
}
|
|
3870
|
-
}),
|
|
3871
|
+
}), _a = {
|
|
3871
3872
|
name: {
|
|
3872
3873
|
type: String,
|
|
3873
3874
|
default: "VTJ.PRO"
|
|
@@ -3884,26 +3885,26 @@ const ba = /* @__PURE__ */ P({
|
|
|
3884
3885
|
type: String,
|
|
3885
3886
|
default: "/@vtj/pro/"
|
|
3886
3887
|
}
|
|
3887
|
-
},
|
|
3888
|
+
}, ka = { class: "x-startup" }, wa = { class: "x-startup__wrapper" }, xa = { class: "x-startup__name" }, Sa = { class: "clip" }, za = { class: "x-startup__tagline" }, Ca = { class: "x-startup__actions" }, Ka = /* @__PURE__ */ V({
|
|
3888
3889
|
__name: "Startup",
|
|
3889
|
-
props:
|
|
3890
|
+
props: _a,
|
|
3890
3891
|
setup(a) {
|
|
3891
3892
|
const o = a, e = () => {
|
|
3892
3893
|
let l = (window.__VTJ_LINK__ || {}).href || window.location.pathname + "@vtj/pro/#/";
|
|
3893
3894
|
location.href = l;
|
|
3894
3895
|
};
|
|
3895
|
-
return (t, l) => (u(), C("div",
|
|
3896
|
-
X("div",
|
|
3897
|
-
X("div",
|
|
3898
|
-
X("span",
|
|
3896
|
+
return (t, l) => (u(), C("div", ka, [
|
|
3897
|
+
X("div", wa, [
|
|
3898
|
+
X("div", xa, [
|
|
3899
|
+
X("span", Sa, A(o.name), 1)
|
|
3899
3900
|
]),
|
|
3900
|
-
X("div",
|
|
3901
|
-
X("div",
|
|
3901
|
+
X("div", za, A(o.tagline), 1),
|
|
3902
|
+
X("div", Ca, [
|
|
3902
3903
|
_(n(ie), {
|
|
3903
3904
|
type: "primary",
|
|
3904
3905
|
size: "large",
|
|
3905
3906
|
round: "",
|
|
3906
|
-
icon: n(
|
|
3907
|
+
icon: n(Po),
|
|
3907
3908
|
onClick: e
|
|
3908
3909
|
}, {
|
|
3909
3910
|
default: d(() => [
|
|
@@ -3915,7 +3916,7 @@ const ba = /* @__PURE__ */ P({
|
|
|
3915
3916
|
])
|
|
3916
3917
|
]));
|
|
3917
3918
|
}
|
|
3918
|
-
}),
|
|
3919
|
+
}), Ta = {
|
|
3919
3920
|
stringProp: {
|
|
3920
3921
|
type: String
|
|
3921
3922
|
},
|
|
@@ -3946,37 +3947,37 @@ const ba = /* @__PURE__ */ P({
|
|
|
3946
3947
|
syncProp: {
|
|
3947
3948
|
type: String
|
|
3948
3949
|
}
|
|
3949
|
-
},
|
|
3950
|
+
}, $a = { class: "x-test__slot" }, Ea = { class: "x-test__slot" }, La = /* @__PURE__ */ V({
|
|
3950
3951
|
name: "XTest",
|
|
3951
3952
|
__name: "Test",
|
|
3952
|
-
props:
|
|
3953
|
+
props: Ta,
|
|
3953
3954
|
emits: ["click", "submit", "change", "update:modelValue", "update:syncProp"],
|
|
3954
3955
|
setup(a, { expose: o, emit: e }) {
|
|
3955
3956
|
const t = a, l = e, s = y(() => Object.entries(t)), c = y({
|
|
3956
3957
|
get() {
|
|
3957
3958
|
return t.modelValue;
|
|
3958
3959
|
},
|
|
3959
|
-
set(
|
|
3960
|
-
l("update:modelValue",
|
|
3960
|
+
set(h) {
|
|
3961
|
+
l("update:modelValue", h);
|
|
3961
3962
|
}
|
|
3962
3963
|
}), i = y({
|
|
3963
3964
|
get() {
|
|
3964
3965
|
return t.syncProp;
|
|
3965
3966
|
},
|
|
3966
|
-
set(
|
|
3967
|
-
l("update:syncProp",
|
|
3967
|
+
set(h) {
|
|
3968
|
+
l("update:syncProp", h);
|
|
3968
3969
|
}
|
|
3969
3970
|
}), r = O("default inner data"), p = () => {
|
|
3970
|
-
|
|
3971
|
+
lt.info({
|
|
3971
3972
|
message: "触发click事件"
|
|
3972
3973
|
}), l("click", t);
|
|
3973
3974
|
}, f = () => {
|
|
3974
|
-
|
|
3975
|
+
lt.info({
|
|
3975
3976
|
message: "触发submit事件"
|
|
3976
3977
|
}), l("submit", t);
|
|
3977
|
-
}, m = (
|
|
3978
|
-
r.value =
|
|
3979
|
-
},
|
|
3978
|
+
}, m = (h) => {
|
|
3979
|
+
r.value = h, l("change", r.value);
|
|
3980
|
+
}, b = () => {
|
|
3980
3981
|
m("user click change:" + Date.now());
|
|
3981
3982
|
};
|
|
3982
3983
|
return o({
|
|
@@ -3984,36 +3985,36 @@ const ba = /* @__PURE__ */ P({
|
|
|
3984
3985
|
submit: f,
|
|
3985
3986
|
data: r,
|
|
3986
3987
|
change: m
|
|
3987
|
-
}), (
|
|
3988
|
+
}), (h, w) => (u(), g(n(Pe), {
|
|
3988
3989
|
class: "x-test",
|
|
3989
3990
|
header: "VTJ 低代码测试组件",
|
|
3990
3991
|
border: ""
|
|
3991
3992
|
}, {
|
|
3992
3993
|
default: d(() => [
|
|
3993
|
-
_(n(
|
|
3994
|
+
_(n(ae), null, {
|
|
3994
3995
|
default: d(() => [
|
|
3995
3996
|
R("内部数据")
|
|
3996
3997
|
]),
|
|
3997
3998
|
_: 1
|
|
3998
3999
|
}),
|
|
3999
|
-
_(n(
|
|
4000
|
+
_(n(I), null, {
|
|
4000
4001
|
default: d(() => [
|
|
4001
4002
|
R(A(r.value), 1)
|
|
4002
4003
|
]),
|
|
4003
4004
|
_: 1
|
|
4004
4005
|
}),
|
|
4005
|
-
_(n(
|
|
4006
|
+
_(n(ae), null, {
|
|
4006
4007
|
default: d(() => [
|
|
4007
4008
|
R("属性")
|
|
4008
4009
|
]),
|
|
4009
4010
|
_: 1
|
|
4010
4011
|
}),
|
|
4011
|
-
_(n(
|
|
4012
|
+
_(n(st), {
|
|
4012
4013
|
column: 3,
|
|
4013
4014
|
border: ""
|
|
4014
4015
|
}, {
|
|
4015
4016
|
default: d(() => [
|
|
4016
|
-
(u(!0), C(Q, null, Y(s.value, ([
|
|
4017
|
+
(u(!0), C(Q, null, Y(s.value, ([M, z]) => (u(), g(n(Ne), { label: M }, {
|
|
4017
4018
|
default: d(() => [
|
|
4018
4019
|
X("pre", null, A(JSON.stringify(z, null, 2)), 1)
|
|
4019
4020
|
]),
|
|
@@ -4022,26 +4023,26 @@ const ba = /* @__PURE__ */ P({
|
|
|
4022
4023
|
]),
|
|
4023
4024
|
_: 1
|
|
4024
4025
|
}),
|
|
4025
|
-
_(n(
|
|
4026
|
+
_(n(ae), null, {
|
|
4026
4027
|
default: d(() => [
|
|
4027
4028
|
R("插槽")
|
|
4028
4029
|
]),
|
|
4029
4030
|
_: 1
|
|
4030
4031
|
}),
|
|
4031
|
-
_(n(
|
|
4032
|
+
_(n(I), {
|
|
4032
4033
|
justify: "space-around",
|
|
4033
4034
|
flex: "",
|
|
4034
4035
|
gap: ""
|
|
4035
4036
|
}, {
|
|
4036
4037
|
default: d(() => [
|
|
4037
|
-
_(n(
|
|
4038
|
+
_(n(Pe), {
|
|
4038
4039
|
header: "default",
|
|
4039
4040
|
grow: "",
|
|
4040
4041
|
card: ""
|
|
4041
4042
|
}, {
|
|
4042
4043
|
default: d(() => [
|
|
4043
|
-
X("div",
|
|
4044
|
-
x(
|
|
4044
|
+
X("div", $a, [
|
|
4045
|
+
x(h.$slots, "default", {
|
|
4045
4046
|
props: t,
|
|
4046
4047
|
data: r.value
|
|
4047
4048
|
}, () => [
|
|
@@ -4051,14 +4052,14 @@ const ba = /* @__PURE__ */ P({
|
|
|
4051
4052
|
]),
|
|
4052
4053
|
_: 3
|
|
4053
4054
|
}),
|
|
4054
|
-
_(n(
|
|
4055
|
+
_(n(Pe), {
|
|
4055
4056
|
header: "extra",
|
|
4056
4057
|
grow: "",
|
|
4057
4058
|
card: ""
|
|
4058
4059
|
}, {
|
|
4059
4060
|
default: d(() => [
|
|
4060
|
-
X("div",
|
|
4061
|
-
x(
|
|
4061
|
+
X("div", Ea, [
|
|
4062
|
+
x(h.$slots, "extra", {
|
|
4062
4063
|
props: t,
|
|
4063
4064
|
data: r.value
|
|
4064
4065
|
}, () => [
|
|
@@ -4071,33 +4072,33 @@ const ba = /* @__PURE__ */ P({
|
|
|
4071
4072
|
]),
|
|
4072
4073
|
_: 3
|
|
4073
4074
|
}),
|
|
4074
|
-
_(n(
|
|
4075
|
+
_(n(ae), null, {
|
|
4075
4076
|
default: d(() => [
|
|
4076
4077
|
R("双向绑定")
|
|
4077
4078
|
]),
|
|
4078
4079
|
_: 1
|
|
4079
4080
|
}),
|
|
4080
|
-
_(n(
|
|
4081
|
+
_(n(I), null, {
|
|
4081
4082
|
default: d(() => [
|
|
4082
|
-
_(n(
|
|
4083
|
+
_(n(st), {
|
|
4083
4084
|
column: 2,
|
|
4084
4085
|
border: ""
|
|
4085
4086
|
}, {
|
|
4086
4087
|
default: d(() => [
|
|
4087
|
-
_(n(
|
|
4088
|
+
_(n(Ne), { label: "modelValue" }, {
|
|
4088
4089
|
default: d(() => [
|
|
4089
|
-
_(n(
|
|
4090
|
+
_(n(ze), {
|
|
4090
4091
|
modelValue: c.value,
|
|
4091
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
4092
|
+
"onUpdate:modelValue": w[0] || (w[0] = (M) => c.value = M)
|
|
4092
4093
|
}, null, 8, ["modelValue"])
|
|
4093
4094
|
]),
|
|
4094
4095
|
_: 1
|
|
4095
4096
|
}),
|
|
4096
|
-
_(n(
|
|
4097
|
+
_(n(Ne), { label: "syncProp" }, {
|
|
4097
4098
|
default: d(() => [
|
|
4098
|
-
_(n(
|
|
4099
|
+
_(n(ze), {
|
|
4099
4100
|
modelValue: i.value,
|
|
4100
|
-
"onUpdate:modelValue": w[1] || (w[1] = (
|
|
4101
|
+
"onUpdate:modelValue": w[1] || (w[1] = (M) => i.value = M)
|
|
4101
4102
|
}, null, 8, ["modelValue"])
|
|
4102
4103
|
]),
|
|
4103
4104
|
_: 1
|
|
@@ -4108,13 +4109,13 @@ const ba = /* @__PURE__ */ P({
|
|
|
4108
4109
|
]),
|
|
4109
4110
|
_: 1
|
|
4110
4111
|
}),
|
|
4111
|
-
_(n(
|
|
4112
|
+
_(n(ae), null, {
|
|
4112
4113
|
default: d(() => [
|
|
4113
4114
|
R("事件和方法")
|
|
4114
4115
|
]),
|
|
4115
4116
|
_: 1
|
|
4116
4117
|
}),
|
|
4117
|
-
_(n(
|
|
4118
|
+
_(n(I), null, {
|
|
4118
4119
|
default: d(() => [
|
|
4119
4120
|
_(n(ie), { onClick: p }, {
|
|
4120
4121
|
default: d(() => [
|
|
@@ -4128,7 +4129,7 @@ const ba = /* @__PURE__ */ P({
|
|
|
4128
4129
|
]),
|
|
4129
4130
|
_: 1
|
|
4130
4131
|
}),
|
|
4131
|
-
_(n(ie), { onClick:
|
|
4132
|
+
_(n(ie), { onClick: b }, {
|
|
4132
4133
|
default: d(() => [
|
|
4133
4134
|
R("change")
|
|
4134
4135
|
]),
|
|
@@ -4141,84 +4142,64 @@ const ba = /* @__PURE__ */ P({
|
|
|
4141
4142
|
_: 3
|
|
4142
4143
|
}));
|
|
4143
4144
|
}
|
|
4144
|
-
})
|
|
4145
|
-
re,
|
|
4146
|
-
de,
|
|
4147
|
-
te,
|
|
4148
|
-
Oe,
|
|
4149
|
-
M,
|
|
4150
|
-
Bt,
|
|
4151
|
-
Se,
|
|
4152
|
-
tt,
|
|
4153
|
-
Qn,
|
|
4154
|
-
Ot,
|
|
4155
|
-
Nt,
|
|
4156
|
-
la,
|
|
4157
|
-
ra,
|
|
4158
|
-
ma,
|
|
4159
|
-
ba,
|
|
4160
|
-
za,
|
|
4161
|
-
Pa,
|
|
4162
|
-
Ra
|
|
4163
|
-
];
|
|
4145
|
+
});
|
|
4164
4146
|
export {
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
aa as formProps,
|
|
4147
|
+
ut as Draggable,
|
|
4148
|
+
rt as INSTALLED_KEY,
|
|
4149
|
+
Vt as MASK_KEY,
|
|
4150
|
+
dt as Resizable,
|
|
4151
|
+
Pt as TAB_CREATORS_KEY,
|
|
4152
|
+
In as TAB_ITEM_WIDTH,
|
|
4153
|
+
Da as VTJ_UI_VERSION,
|
|
4154
|
+
se as XAction,
|
|
4155
|
+
et as XActionBar,
|
|
4156
|
+
Ua as XChart,
|
|
4157
|
+
I as XContainer,
|
|
4158
|
+
Xa as XDataItem,
|
|
4159
|
+
Bt as XDialog,
|
|
4160
|
+
ja as XDialogForm,
|
|
4161
|
+
ta as XField,
|
|
4162
|
+
na as XForm,
|
|
4163
|
+
pn as XHeader,
|
|
4164
|
+
ue as XIcon,
|
|
4165
|
+
Ha as XList,
|
|
4166
|
+
Oa as XMask,
|
|
4167
|
+
me as XMenu,
|
|
4168
|
+
Pe as XPanel,
|
|
4169
|
+
Ka as XStartup,
|
|
4170
|
+
Na as XTabs,
|
|
4171
|
+
La as XTest,
|
|
4172
|
+
rn as actionBarProps,
|
|
4173
|
+
Mt as actionProps,
|
|
4174
|
+
Dt as builtinFieldEditors,
|
|
4175
|
+
da as chartProps,
|
|
4176
|
+
cn as containerProps,
|
|
4177
|
+
tt as createDialog,
|
|
4178
|
+
la as dataItemProps,
|
|
4179
|
+
Fa as defineTab,
|
|
4180
|
+
aa as dialogFormProps,
|
|
4181
|
+
gn as dialogProps,
|
|
4182
|
+
Zn as fieldProps,
|
|
4183
|
+
Rt as formInstanceKey,
|
|
4184
|
+
Ot as formModelKey,
|
|
4185
|
+
oa as formProps,
|
|
4205
4186
|
q as getSizeValue,
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4187
|
+
un as headerProps,
|
|
4188
|
+
Wo as iconProps,
|
|
4189
|
+
Lo as iconSizeMap,
|
|
4190
|
+
ma as listProps,
|
|
4191
|
+
Ra as makeInstaller,
|
|
4192
|
+
Bn as maskProps,
|
|
4193
|
+
fn as panelProps,
|
|
4194
|
+
$e as parseSize,
|
|
4195
|
+
_a as startupProps,
|
|
4196
|
+
sa as tabsProps,
|
|
4197
|
+
Ta as testProps,
|
|
4198
|
+
it as toObjectProps,
|
|
4199
|
+
qe as useDisabled,
|
|
4219
4200
|
_e as useIcon,
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4201
|
+
nn as useIconProps,
|
|
4202
|
+
an as useLoader,
|
|
4203
|
+
mn as vDraggable,
|
|
4204
|
+
It as vResizable
|
|
4224
4205
|
};
|