@vtj/ui 0.8.154 → 0.8.155
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.mjs +64 -62
- package/dist/index.umd.js +2 -2
- package/package.json +3 -3
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getCurrentInstance as Ue, inject as ft, defineComponent as N, useAttrs as Mt, computed as T, markRaw as Zt, openBlock as v, createBlock as x, unref as u, normalizeClass as ge, normalizeStyle as
|
1
|
+
import { getCurrentInstance as Ue, inject as ft, defineComponent as N, useAttrs as Mt, computed as T, markRaw as Zt, openBlock as v, createBlock as x, unref as u, normalizeClass as ge, normalizeStyle as it, withCtx as b, renderSlot as A, resolveDynamicComponent as Se, createCommentVNode as z, createElementBlock as I, mergeProps as O, createElementVNode as K, toDisplayString as J, Fragment as ce, renderList as he, isVNode as Na, h as re, shallowRef as _n, ref as B, watch as Z, onMounted as Xe, onUnmounted as et, useSlots as wo, toRef as Ct, createTextVNode as U, toRaw as We, createVNode as D, normalizeProps as Pt, guardReactiveProps as $t, effectScope as Sr, reactive as It, watchEffect as _o, nextTick as De, Teleport as xr, withDirectives as Ce, createSlots as Re, render as Go, vShow as Be, withModifiers as Ae, KeepAlive as Ra, provide as St, isRef as Fe, toHandlers as Ye, withKeys as At, mergeModels as Cn, useModel as Co, onUpdated as ja } from "vue";
|
2
2
|
import { ElMessage as Je, ElMessageBox as bt, ElNotification as So, ElIcon as jt, ElSubMenu as La, ElBadge as ro, ElMenuItem as Ha, ElMenu as Ua, ElButton as Oe, ElDropdown as Xa, ElDropdownMenu as Ya, ElDropdownItem as Ga, ElTooltip as Er, ElDivider as Ie, ElSwitch as kr, ElInput as Ve, ElEmpty as xo, ElTabs as Tr, ElTabPane as ao, ElPopover as Dr, ElAvatar as Ka, ElSelect as Eo, ElOption as ko, ElCheckboxButton as Wa, ElCheckbox as Ja, ElCheckboxGroup as qa, ElRadioButton as Qa, ElRadio as Za, ElRadioGroup as ei, ElDatePicker as Sn, ElImage as io, ElLink as lo, ElTag as Ko, ElText as Wo, ElInputNumber as To, ElPagination as zr, ElTimePicker as ti, ElRate as ni, ElSlider as oi, ElCascader as ri, formContextKey as ai, ElFormItem as ii, ElForm as li, ElInfiniteScroll as Jo, ElDescriptions as qo, ElDescriptionsItem as Rn, ElUpload as Mr, vLoading as si, ElImageViewer as ui } from "element-plus";
|
3
3
|
import { storage as Qo, rAF as ci, cAF as di, isEqual as $n, isObject as Do, uid as Pr, arrayToMap as fi, isUrl as pi, upperFirstCamelCase as $r, isString as mi, isFunction as so, camelCase as Ir, delay as gi, merge as Ar, kebabCase as hi, toFixed as Zo, cloneDeep as uo, toArray as zo, dedupArray as Vr, get as mn, set as jn, numberFormat as vi, downloadRemoteFile as yi, downloadUrl as bi } from "@vtj/utils";
|
4
4
|
import { ArrowRight as wi, Minimize as _i, Popup as Ci, Maximize as Si, RawClose as xi, StarFilled as Br, Menu as Ei, Search as co, Close as Fr, Expand as ki, Fold as Ti, Star as Or, Document as pt, Refresh as Nr, CopyDocument as Di, Sunny as zi, Moon as Mi, MoreFilled as Rr, UserFilled as Pi, HomeFilled as $i, Plus as jr, Minus as Ii, EditPen as Lr, CaretBottom as Ai, CaretTop as Vi, VtjIconDatabase as Bi, VtjIconNpSearch as Fi, VtjIconNpReturn as Oi, VtjIconCheck as Ni, WarningFilled as Ri, SuccessFilled as ji, CircleCloseFilled as Li, ZoomIn as Hi, Download as Ui, Delete as Xi } from "@vtj/icons";
|
@@ -9,10 +9,10 @@ import { VXETable as Nt, VxeGrid as er, VxeTableFilterModule as qi, VxeTableEdit
|
|
9
9
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
10
10
|
* @name @vtj/ui
|
11
11
|
* @author CHC chenhuachun1549@dingtalk.com
|
12
|
-
* @version 0.8.
|
12
|
+
* @version 0.8.155
|
13
13
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
14
14
|
*/
|
15
|
-
const K2 = "0.8.
|
15
|
+
const K2 = "0.8.155", ll = {
|
16
16
|
default: 14,
|
17
17
|
small: 12,
|
18
18
|
large: 18
|
@@ -105,7 +105,7 @@ const ul = {
|
|
105
105
|
class: ge(["x-icon", a.value]),
|
106
106
|
color: e.color,
|
107
107
|
size: i.value,
|
108
|
-
style:
|
108
|
+
style: it(l.value)
|
109
109
|
}, {
|
110
110
|
default: b(() => [
|
111
111
|
A(s.$slots, "default", {}, () => [
|
@@ -411,7 +411,7 @@ function q2(o = 1e3) {
|
|
411
411
|
++e.value, e.value < o && t();
|
412
412
|
});
|
413
413
|
};
|
414
|
-
return Xe(t),
|
414
|
+
return Xe(t), et(() => {
|
415
415
|
n && di(n);
|
416
416
|
}), (r) => e.value >= r;
|
417
417
|
}
|
@@ -781,7 +781,7 @@ const wl = { key: 0 }, _l = /* @__PURE__ */ N({
|
|
781
781
|
ref_key: "elRef",
|
782
782
|
ref: a,
|
783
783
|
class: ge(["x-container", s.value]),
|
784
|
-
style:
|
784
|
+
style: it(c.value)
|
785
785
|
}, {
|
786
786
|
default: b(() => [
|
787
787
|
A(d.$slots, "default")
|
@@ -1391,7 +1391,7 @@ function Fl(o, e) {
|
|
1391
1391
|
return Xe(() => {
|
1392
1392
|
const r = u(e), a = u(r?.bodyRef);
|
1393
1393
|
t = n.$el, a && a.$el && a.$el.appendChild(t);
|
1394
|
-
}),
|
1394
|
+
}), et(() => {
|
1395
1395
|
t && t.parentNode && t.parentNode.removeChild(t);
|
1396
1396
|
}), {
|
1397
1397
|
componentInstance: n
|
@@ -1410,6 +1410,8 @@ const Ol = ["src"], In = /* @__PURE__ */ N({
|
|
1410
1410
|
), E = Vl(t, s, r, l), Y = Bl(t, s, r), j = Fl(t, i);
|
1411
1411
|
_o(async () => {
|
1412
1412
|
t.modelValue ? (await De(), a && (r("open", a), document.body.classList.add("x-dialog-visible"))) : document.body.classList.remove("x-dialog-visible");
|
1413
|
+
}), et(() => {
|
1414
|
+
document.body.classList.remove("x-dialog-visible");
|
1413
1415
|
});
|
1414
1416
|
const ae = T(() => i.value?.$el);
|
1415
1417
|
return e({
|
@@ -1437,7 +1439,7 @@ const Ol = ["src"], In = /* @__PURE__ */ N({
|
|
1437
1439
|
t.modal ? (v(), I("div", {
|
1438
1440
|
key: 0,
|
1439
1441
|
class: "x-dialog__modal",
|
1440
|
-
style:
|
1442
|
+
style: it(u(h))
|
1441
1443
|
}, null, 4)) : z("", !0),
|
1442
1444
|
Ce((v(), x(u(gn), O({
|
1443
1445
|
ref_key: "panelRef",
|
@@ -3036,15 +3038,15 @@ function qe(o) {
|
|
3036
3038
|
if (typeof window < "u" && window.navigator)
|
3037
3039
|
return !!/* @__PURE__ */ navigator.userAgent.match(o);
|
3038
3040
|
}
|
3039
|
-
var
|
3041
|
+
var tt = qe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), en = qe(/Edge/i), sr = qe(/firefox/i), Xt = qe(/safari/i) && !qe(/chrome/i) && !qe(/android/i), Qr = qe(/iP(ad|od|hone)/i), Zr = qe(/chrome/i) && qe(/android/i), ea = {
|
3040
3042
|
capture: !1,
|
3041
3043
|
passive: !1
|
3042
3044
|
};
|
3043
3045
|
function oe(o, e, n) {
|
3044
|
-
o.addEventListener(e, n, !
|
3046
|
+
o.addEventListener(e, n, !tt && ea);
|
3045
3047
|
}
|
3046
3048
|
function ne(o, e, n) {
|
3047
|
-
o.removeEventListener(e, n, !
|
3049
|
+
o.removeEventListener(e, n, !tt && ea);
|
3048
3050
|
}
|
3049
3051
|
function En(o, e) {
|
3050
3052
|
if (e) {
|
@@ -3123,7 +3125,7 @@ function Ne() {
|
|
3123
3125
|
function me(o, e, n, t, r) {
|
3124
3126
|
if (!(!o.getBoundingClientRect && o !== window)) {
|
3125
3127
|
var a, l, i, s, c, d, f;
|
3126
|
-
if (o !== window && o.parentNode && o !== Ne() ? (a = o.getBoundingClientRect(), l = a.top, i = a.left, s = a.bottom, c = a.right, d = a.height, f = a.width) : (l = 0, i = 0, s = window.innerHeight, c = window.innerWidth, d = window.innerHeight, f = window.innerWidth), (e || n) && o !== window && (r = r || o.parentNode, !
|
3128
|
+
if (o !== window && o.parentNode && o !== Ne() ? (a = o.getBoundingClientRect(), l = a.top, i = a.left, s = a.bottom, c = a.right, d = a.height, f = a.width) : (l = 0, i = 0, s = window.innerHeight, c = window.innerWidth, d = window.innerHeight, f = window.innerWidth), (e || n) && o !== window && (r = r || o.parentNode, !tt))
|
3127
3129
|
do
|
3128
3130
|
if (r && r.getBoundingClientRect && (L(r, "transform") !== "none" || n && L(r, "position") !== "static")) {
|
3129
3131
|
var m = r.getBoundingClientRect();
|
@@ -3146,11 +3148,11 @@ function me(o, e, n, t, r) {
|
|
3146
3148
|
}
|
3147
3149
|
}
|
3148
3150
|
function cr(o, e, n) {
|
3149
|
-
for (var t =
|
3151
|
+
for (var t = rt(o, !0), r = me(o)[e]; t; ) {
|
3150
3152
|
var a = me(t)[n], l = void 0;
|
3151
3153
|
if (l = r >= a, !l) return t;
|
3152
3154
|
if (t === Ne()) break;
|
3153
|
-
t =
|
3155
|
+
t = rt(t, !1);
|
3154
3156
|
}
|
3155
3157
|
return !1;
|
3156
3158
|
}
|
@@ -3195,7 +3197,7 @@ function ys(o, e) {
|
|
3195
3197
|
}
|
3196
3198
|
return -1;
|
3197
3199
|
}
|
3198
|
-
function
|
3200
|
+
function rt(o, e) {
|
3199
3201
|
if (!o || !o.getBoundingClientRect) return Ne();
|
3200
3202
|
var n = o, t = !1;
|
3201
3203
|
do
|
@@ -3371,7 +3373,7 @@ function xs(o) {
|
|
3371
3373
|
var e = o.sortable, n = o.rootEl, t = o.name, r = o.targetEl, a = o.cloneEl, l = o.toEl, i = o.fromEl, s = o.oldIndex, c = o.newIndex, d = o.oldDraggableIndex, f = o.newDraggableIndex, m = o.originalEvent, g = o.putSortable, p = o.extraEventProperties;
|
3372
3374
|
if (e = e || n && n[Ee], !!e) {
|
3373
3375
|
var h, w = e.options, _ = "on" + t.charAt(0).toUpperCase() + t.substr(1);
|
3374
|
-
window.CustomEvent && !
|
3376
|
+
window.CustomEvent && !tt && !en ? h = new CustomEvent(t, {
|
3375
3377
|
bubbles: !0,
|
3376
3378
|
cancelable: !0
|
3377
3379
|
}) : (h = document.createEvent("Event"), h.initEvent(t, !0, !0)), h.to = l || n, h.from = i || n, h.item = r || n, h.clone = a, h.oldIndex = s, h.newIndex = c, h.oldDraggableIndex = d, h.newDraggableIndex = f, h.originalEvent = m, h.pullMode = g ? g.lastPutMode : void 0;
|
@@ -3391,7 +3393,7 @@ var Es = ["evt"], xe = function(e, n) {
|
|
3391
3393
|
nextEl: ct,
|
3392
3394
|
lastDownEl: vn,
|
3393
3395
|
cloneEl: ue,
|
3394
|
-
cloneHidden:
|
3396
|
+
cloneHidden: ot,
|
3395
3397
|
dragStarted: Lt,
|
3396
3398
|
putSortable: ve,
|
3397
3399
|
activeSortable: H.active,
|
@@ -3399,14 +3401,14 @@ var Es = ["evt"], xe = function(e, n) {
|
|
3399
3401
|
oldIndex: yt,
|
3400
3402
|
oldDraggableIndex: Gt,
|
3401
3403
|
newIndex: Te,
|
3402
|
-
newDraggableIndex:
|
3404
|
+
newDraggableIndex: nt,
|
3403
3405
|
hideGhostForTarget: ca,
|
3404
3406
|
unhideGhostForTarget: da,
|
3405
3407
|
cloneNowHidden: function() {
|
3406
|
-
|
3408
|
+
ot = !0;
|
3407
3409
|
},
|
3408
3410
|
cloneNowShown: function() {
|
3409
|
-
|
3411
|
+
ot = !1;
|
3410
3412
|
},
|
3411
3413
|
dispatchSortableEvent: function(i) {
|
3412
3414
|
_e({
|
@@ -3426,12 +3428,12 @@ function _e(o) {
|
|
3426
3428
|
oldIndex: yt,
|
3427
3429
|
oldDraggableIndex: Gt,
|
3428
3430
|
newIndex: Te,
|
3429
|
-
newDraggableIndex:
|
3431
|
+
newDraggableIndex: nt
|
3430
3432
|
}, o));
|
3431
3433
|
}
|
3432
|
-
var P, de, X, se, ct, vn, ue,
|
3434
|
+
var P, de, X, se, ct, vn, ue, ot, yt, Te, Gt, nt, sn, ve, vt = !1, kn = !1, Tn = [], st, Pe, Xn, Yn, fr, pr, Lt, ht, Kt, Wt = !1, un = !1, yn, be, Gn = [], fo = !1, Dn = [], An = typeof document < "u", cn = Qr, mr = en || tt ? "cssFloat" : "float", ks = An && !Zr && !Qr && "draggable" in document.createElement("div"), la = function() {
|
3433
3435
|
if (An) {
|
3434
|
-
if (
|
3436
|
+
if (tt)
|
3435
3437
|
return !1;
|
3436
3438
|
var o = document.createElement("x");
|
3437
3439
|
return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
|
@@ -3631,7 +3633,7 @@ H.prototype = /** @lends Sortable.prototype */
|
|
3631
3633
|
na(P, d.trim(), Kn);
|
3632
3634
|
}), oe(i, "dragover", ut), oe(i, "mousemove", ut), oe(i, "touchmove", ut), oe(i, "mouseup", r._onDrop), oe(i, "touchend", r._onDrop), oe(i, "touchcancel", r._onDrop), sr && this.nativeDraggable && (this.options.touchStartThreshold = 4, P.draggable = !0), xe("delayStart", this, {
|
3633
3635
|
evt: e
|
3634
|
-
}), l.delay && (!l.delayOnTouchOnly || n) && (!this.nativeDraggable || !(en ||
|
3636
|
+
}), l.delay && (!l.delayOnTouchOnly || n) && (!this.nativeDraggable || !(en || tt))) {
|
3635
3637
|
if (H.eventCanceled) {
|
3636
3638
|
this._onDrop();
|
3637
3639
|
return;
|
@@ -3779,12 +3781,12 @@ H.prototype = /** @lends Sortable.prototype */
|
|
3779
3781
|
}), p !== m && (m.animateAll(), m._ignoreWhileAnimating = null)), (t === P && !P.animated || t === n && !t.animated) && (ht = null), !i.dragoverBubble && !e.rootEl && t !== document && (P.parentNode[Ee]._isOutsideThisEl(e.target), !$ && ut(e)), !i.dragoverBubble && e.stopPropagation && e.stopPropagation(), h = !0;
|
3780
3782
|
}
|
3781
3783
|
function y() {
|
3782
|
-
Te = Me(P),
|
3784
|
+
Te = Me(P), nt = Me(P, i.draggable), _e({
|
3783
3785
|
sortable: p,
|
3784
3786
|
name: "change",
|
3785
3787
|
toEl: n,
|
3786
3788
|
newIndex: Te,
|
3787
|
-
newDraggableIndex:
|
3789
|
+
newDraggableIndex: nt,
|
3788
3790
|
originalEvent: e
|
3789
3791
|
});
|
3790
3792
|
}
|
@@ -3842,9 +3844,9 @@ H.prototype = /** @lends Sortable.prototype */
|
|
3842
3844
|
},
|
3843
3845
|
_onDrop: function(e) {
|
3844
3846
|
var n = this.el, t = this.options;
|
3845
|
-
if (Te = Me(P),
|
3847
|
+
if (Te = Me(P), nt = Me(P, t.draggable), xe("drop", this, {
|
3846
3848
|
evt: e
|
3847
|
-
}), de = P && P.parentNode, Te = Me(P),
|
3849
|
+
}), de = P && P.parentNode, Te = Me(P), nt = Me(P, t.draggable), H.eventCanceled) {
|
3848
3850
|
this._nulling();
|
3849
3851
|
return;
|
3850
3852
|
}
|
@@ -3887,7 +3889,7 @@ H.prototype = /** @lends Sortable.prototype */
|
|
3887
3889
|
name: "sort",
|
3888
3890
|
toEl: de,
|
3889
3891
|
originalEvent: e
|
3890
|
-
})), H.active && ((Te == null || Te === -1) && (Te = yt,
|
3892
|
+
})), H.active && ((Te == null || Te === -1) && (Te = yt, nt = Gt), _e({
|
3891
3893
|
sortable: this,
|
3892
3894
|
name: "end",
|
3893
3895
|
toEl: de,
|
@@ -3895,7 +3897,7 @@ H.prototype = /** @lends Sortable.prototype */
|
|
3895
3897
|
}), this.save()))), this._nulling();
|
3896
3898
|
},
|
3897
3899
|
_nulling: function() {
|
3898
|
-
xe("nulling", this), se = P = de = X = ct = ue = vn =
|
3900
|
+
xe("nulling", this), se = P = de = X = ct = ue = vn = ot = st = Pe = Lt = Te = nt = yt = Gt = ht = Kt = ve = sn = H.dragged = H.ghost = H.clone = H.active = null, Dn.forEach(function(e) {
|
3899
3901
|
e.checked = !0;
|
3900
3902
|
}), Dn.length = Xn = Yn = 0;
|
3901
3903
|
},
|
@@ -3976,9 +3978,9 @@ H.prototype = /** @lends Sortable.prototype */
|
|
3976
3978
|
}), this._onDrop(), this._disableDelayedDragEvents(), Tn.splice(Tn.indexOf(this.el), 1), this.el = e = null;
|
3977
3979
|
},
|
3978
3980
|
_hideClone: function() {
|
3979
|
-
if (!
|
3981
|
+
if (!ot) {
|
3980
3982
|
if (xe("hideClone", this), H.eventCanceled) return;
|
3981
|
-
L(ue, "display", "none"), this.options.removeCloneOnHide && ue.parentNode && ue.parentNode.removeChild(ue),
|
3983
|
+
L(ue, "display", "none"), this.options.removeCloneOnHide && ue.parentNode && ue.parentNode.removeChild(ue), ot = !0;
|
3982
3984
|
}
|
3983
3985
|
},
|
3984
3986
|
_showClone: function(e) {
|
@@ -3986,9 +3988,9 @@ H.prototype = /** @lends Sortable.prototype */
|
|
3986
3988
|
this._hideClone();
|
3987
3989
|
return;
|
3988
3990
|
}
|
3989
|
-
if (
|
3991
|
+
if (ot) {
|
3990
3992
|
if (xe("showClone", this), H.eventCanceled) return;
|
3991
|
-
P.parentNode == se && !this.options.group.revertClone ? se.insertBefore(ue, P) : ct ? se.insertBefore(ue, ct) : se.appendChild(ue), this.options.group.revertClone && this.animate(P, ue), L(ue, "display", ""),
|
3993
|
+
P.parentNode == se && !this.options.group.revertClone ? se.insertBefore(ue, P) : ct ? se.insertBefore(ue, ct) : se.appendChild(ue), this.options.group.revertClone && this.animate(P, ue), L(ue, "display", ""), ot = !1;
|
3992
3994
|
}
|
3993
3995
|
}
|
3994
3996
|
};
|
@@ -3997,7 +3999,7 @@ function Ms(o) {
|
|
3997
3999
|
}
|
3998
4000
|
function dn(o, e, n, t, r, a, l, i) {
|
3999
4001
|
var s, c = o[Ee], d = c.options.onMove, f;
|
4000
|
-
return window.CustomEvent && !
|
4002
|
+
return window.CustomEvent && !tt && !en ? s = new CustomEvent("move", {
|
4001
4003
|
bubbles: !0,
|
4002
4004
|
cancelable: !0
|
4003
4005
|
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = o, s.dragged = n, s.draggedRect = t, s.related = r || e, s.relatedRect = a || me(e), s.willInsertAfter = i, s.originalEvent = l, o.dispatchEvent(s), d && (f = d.call(c, s, l)), f;
|
@@ -4122,19 +4124,19 @@ function Os() {
|
|
4122
4124
|
},
|
4123
4125
|
_handleAutoScroll: function(n, t) {
|
4124
4126
|
var r = this, a = (n.touches ? n.touches[0] : n).clientX, l = (n.touches ? n.touches[0] : n).clientY, i = document.elementFromPoint(a, l);
|
4125
|
-
if (zn = n, t || this.options.forceAutoScrollFallback || en ||
|
4127
|
+
if (zn = n, t || this.options.forceAutoScrollFallback || en || tt || Xt) {
|
4126
4128
|
qn(n, this.options, i, t);
|
4127
|
-
var s =
|
4129
|
+
var s = rt(i, !0);
|
4128
4130
|
go && (!Ut || a !== Wn || l !== Jn) && (Ut && gr(), Ut = setInterval(function() {
|
4129
|
-
var c =
|
4131
|
+
var c = rt(document.elementFromPoint(a, l), !0);
|
4130
4132
|
c !== s && (s = c, wn()), qn(n, r.options, c, t);
|
4131
4133
|
}, 10), Wn = a, Jn = l);
|
4132
4134
|
} else {
|
4133
|
-
if (!this.options.bubbleScroll ||
|
4135
|
+
if (!this.options.bubbleScroll || rt(i, !0) === Ne()) {
|
4134
4136
|
wn();
|
4135
4137
|
return;
|
4136
4138
|
}
|
4137
|
-
qn(n, this.options,
|
4139
|
+
qn(n, this.options, rt(i, !1), !1);
|
4138
4140
|
}
|
4139
4141
|
}
|
4140
4142
|
}, Ze(o, {
|
@@ -4153,7 +4155,7 @@ function gr() {
|
|
4153
4155
|
var qn = oa(function(o, e, n, t) {
|
4154
4156
|
if (e.scroll) {
|
4155
4157
|
var r = (o.touches ? o.touches[0] : o).clientX, a = (o.touches ? o.touches[0] : o).clientY, l = e.scrollSensitivity, i = e.scrollSpeed, s = Ne(), c = !1, d;
|
4156
|
-
mo !== n && (mo = n, wn(), Ht = e.scroll, d = e.scrollFn, Ht === !0 && (Ht =
|
4158
|
+
mo !== n && (mo = n, wn(), Ht = e.scroll, d = e.scrollFn, Ht === !0 && (Ht = rt(n, !0)));
|
4157
4159
|
var f = 0, m = Ht;
|
4158
4160
|
do {
|
4159
4161
|
var g = m, p = me(g), h = p.top, w = p.bottom, _ = p.left, C = p.right, y = p.width, S = p.height, k = void 0, M = void 0, E = g.scrollWidth, Y = g.scrollHeight, j = L(g), ae = g.scrollLeft, ee = g.scrollTop;
|
@@ -4169,7 +4171,7 @@ var qn = oa(function(o, e, n, t) {
|
|
4169
4171
|
}.bind({
|
4170
4172
|
layer: f
|
4171
4173
|
}), 24))), f++;
|
4172
|
-
} while (e.bubbleScroll && m !== s && (m =
|
4174
|
+
} while (e.bubbleScroll && m !== s && (m = rt(m, !1)));
|
4173
4175
|
go = c;
|
4174
4176
|
}
|
4175
4177
|
}, 30), fa = function(e) {
|
@@ -5036,7 +5038,7 @@ function T0(o, e, n) {
|
|
5036
5038
|
t.value = pa(l, i);
|
5037
5039
|
}
|
5038
5040
|
};
|
5039
|
-
return Xe(r),
|
5041
|
+
return Xe(r), et(() => {
|
5040
5042
|
t.value?.destroy();
|
5041
5043
|
}), ja(() => {
|
5042
5044
|
t.value?.destroy(), r();
|
@@ -5067,7 +5069,7 @@ function D0(o, e, n, t) {
|
|
5067
5069
|
}, i = async () => {
|
5068
5070
|
r.value.length > 0 && l(), e.columns && a();
|
5069
5071
|
};
|
5070
|
-
return Z(() => e.columns, i), Xe(i),
|
5072
|
+
return Z(() => e.columns, i), Xe(i), et(l), r;
|
5071
5073
|
}
|
5072
5074
|
function ga(o) {
|
5073
5075
|
const {
|
@@ -5663,7 +5665,7 @@ const B0 = {
|
|
5663
5665
|
default: b(() => [
|
5664
5666
|
K("div", {
|
5665
5667
|
class: ge(["x-query-form__inner", u(s)]),
|
5666
|
-
style:
|
5668
|
+
style: it(u(c))
|
5667
5669
|
}, [
|
5668
5670
|
A(_.$slots, "default", {}, () => [
|
5669
5671
|
(v(!0), I(ce, null, he(t.items, (y) => (v(), I(ce, null, [
|
@@ -6044,7 +6046,7 @@ const ya = /* @__PURE__ */ N({
|
|
6044
6046
|
k || (m.value = {});
|
6045
6047
|
}), Xe(() => {
|
6046
6048
|
i.value?.wrapperRef && i.value.wrapperRef.appendChild(i.value.prefixRef);
|
6047
|
-
}),
|
6049
|
+
}), et(() => {
|
6048
6050
|
i.value?.wrapperRef && i.value.wrapperRef.appendChild(i.value.prefixRef);
|
6049
6051
|
}), e({
|
6050
6052
|
focus: w,
|
@@ -6449,7 +6451,7 @@ const G0 = {
|
|
6449
6451
|
u(a)?.props.tooltipMessage ?? t.tooltipMessage ? (v(), I("div", {
|
6450
6452
|
key: 0,
|
6451
6453
|
class: "x-field__info",
|
6452
|
-
style:
|
6454
|
+
style: it(y.value)
|
6453
6455
|
}, [
|
6454
6456
|
D(u(Er), O({
|
6455
6457
|
content: w(j)
|
@@ -6805,7 +6807,7 @@ const G0 = {
|
|
6805
6807
|
};
|
6806
6808
|
return Xe(() => {
|
6807
6809
|
a.value = !0;
|
6808
|
-
}),
|
6810
|
+
}), et(() => {
|
6809
6811
|
a.value = !1;
|
6810
6812
|
}), e({
|
6811
6813
|
$vtjDynamicSlots: () => l.value
|
@@ -6946,7 +6948,7 @@ const G0 = {
|
|
6946
6948
|
A(f.$slots, "image", {}, () => [
|
6947
6949
|
n.imageSrc ? (v(), x(u(io), {
|
6948
6950
|
key: 0,
|
6949
|
-
style:
|
6951
|
+
style: it(r.value),
|
6950
6952
|
src: n.imageSrc
|
6951
6953
|
}, null, 8, ["style", "src"])) : z("", !0)
|
6952
6954
|
])
|
@@ -7109,7 +7111,7 @@ const G0 = {
|
|
7109
7111
|
getKey: S
|
7110
7112
|
}), (k, M) => (v(), I("div", {
|
7111
7113
|
class: ge(["x-list", m.value]),
|
7112
|
-
style:
|
7114
|
+
style: it(f.value)
|
7113
7115
|
}, [
|
7114
7116
|
!u(l).total && !u(i) ? A(k.$slots, "empty", { key: 0 }, () => [
|
7115
7117
|
D(u(xo))
|
@@ -7906,7 +7908,7 @@ var Ta = {};
|
|
7906
7908
|
};
|
7907
7909
|
})(Ta);
|
7908
7910
|
var Fn = {};
|
7909
|
-
const
|
7911
|
+
const at = Bn, fn = [
|
7910
7912
|
// L M Q H
|
7911
7913
|
1,
|
7912
7914
|
1,
|
@@ -8233,13 +8235,13 @@ const rt = Bn, fn = [
|
|
8233
8235
|
];
|
8234
8236
|
Fn.getBlocksCount = function(e, n) {
|
8235
8237
|
switch (n) {
|
8236
|
-
case
|
8238
|
+
case at.L:
|
8237
8239
|
return fn[(e - 1) * 4 + 0];
|
8238
|
-
case
|
8240
|
+
case at.M:
|
8239
8241
|
return fn[(e - 1) * 4 + 1];
|
8240
|
-
case
|
8242
|
+
case at.Q:
|
8241
8243
|
return fn[(e - 1) * 4 + 2];
|
8242
|
-
case
|
8244
|
+
case at.H:
|
8243
8245
|
return fn[(e - 1) * 4 + 3];
|
8244
8246
|
default:
|
8245
8247
|
return;
|
@@ -8247,13 +8249,13 @@ Fn.getBlocksCount = function(e, n) {
|
|
8247
8249
|
};
|
8248
8250
|
Fn.getTotalCodewordsCount = function(e, n) {
|
8249
8251
|
switch (n) {
|
8250
|
-
case
|
8252
|
+
case at.L:
|
8251
8253
|
return pn[(e - 1) * 4 + 0];
|
8252
|
-
case
|
8254
|
+
case at.M:
|
8253
8255
|
return pn[(e - 1) * 4 + 1];
|
8254
|
-
case
|
8256
|
+
case at.Q:
|
8255
8257
|
return pn[(e - 1) * 4 + 2];
|
8256
|
-
case
|
8258
|
+
case at.H:
|
8257
8259
|
return pn[(e - 1) * 4 + 3];
|
8258
8260
|
default:
|
8259
8261
|
return;
|
@@ -9125,13 +9127,13 @@ const d2 = ["src"], f2 = {
|
|
9125
9127
|
}, f = () => {
|
9126
9128
|
t.content && c(t.content);
|
9127
9129
|
};
|
9128
|
-
return Z(() => t.content, c, { immediate: !0 }),
|
9130
|
+
return Z(() => t.content, c, { immediate: !0 }), et(() => {
|
9129
9131
|
i && clearTimeout(i);
|
9130
9132
|
}), e({
|
9131
9133
|
refresh: f
|
9132
9134
|
}), (m, g) => (v(), I("div", {
|
9133
9135
|
class: "x-qr-code",
|
9134
|
-
style:
|
9136
|
+
style: it(s.value)
|
9135
9137
|
}, [
|
9136
9138
|
a.value ? (v(), I("img", {
|
9137
9139
|
key: 0,
|
@@ -9176,7 +9178,7 @@ const d2 = ["src"], f2 = {
|
|
9176
9178
|
}, s = () => {
|
9177
9179
|
--a.value, a.value <= 0 ? r.value = !1 : l = setTimeout(s, 1e3);
|
9178
9180
|
};
|
9179
|
-
return
|
9181
|
+
return et(() => {
|
9180
9182
|
l && clearTimeout(l);
|
9181
9183
|
}), e({
|
9182
9184
|
send: i
|
package/dist/index.umd.js
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/ui
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.8.
|
5
|
+
* @version 0.8.155
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
|
-
*/const q="0.8.154",ee={default:14,small:12,large:18},Ct={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number}};function ce(o){return typeof o=="string"?o:`${o}px`}function Ae(o=0,e){if(typeof o=="number")return o;if(/(%|vh|vw)$/i.test(o)){const t=Number.parseInt(o);return Math.floor(e*t/100)}return Number.parseInt(o)}function at(o,e={}){const n=P({},e);return typeof o=="boolean"?n:Object.assign(n,o||{})}const $e="__VTJ_UI_INSTALLED__",me=Symbol("ADAPTER_KEY");function Be(){const o=Vue.getCurrentInstance(),e=o==null?void 0:o.appContext.config.globalProperties.$adapter;return e||Vue.inject(me,{})}const Mr={getCustom:o=>N(this,null,function*(){return VtjUtils.storage.get(o,{type:"local"})}),saveCustom:o=>N(this,null,function*(){VtjUtils.storage.save(o.id,o,{type:"local"})})},Ar={install(o,e={}){const n=Object.assign(Mr,e),{components:t=[],fieldEditors:r={}}=n;Yo(r);for(const l of t)l.name&&o.component(l.name,l);[ElementPlus.ElMessage,ElementPlus.ElMessageBox,ElementPlus.ElNotification].forEach(l=>{o.use(l)}),o.config.globalProperties.$adapter=n,o.provide(me,n)}},qn=(o=[])=>({install:(n,t={})=>{n[$e]||(n[$e]=!0,o.forEach(r=>{r.name&&n.component(r.name,r)}),t.adapter&&n.provide(me,t.adapter))}}),$r=["src"],Ve=Vue.defineComponent({name:"XIcon",__name:"Icon",props:Ct,setup(o){const e=o,n=Vue.useAttrs(),t=Vue.getCurrentInstance(),r=Vue.computed(()=>{if(!e.icon)return null;const i=t==null?void 0:t.appContext.app;return typeof e.icon=="object"?Vue.markRaw(e.icon):(i==null?void 0:i.component(e.icon))||e.icon}),l=Vue.computed(()=>{const i={"is-pointer":!!n.onClick};return!r.value&&e.icon&&(i[e.icon]=!0),i}),u=Vue.computed(()=>({"background-color":e.background,"border-radius":e.radius?ce(e.radius):void 0,padding:e.padding?ce(e.padding):void 0})),a=Vue.computed(()=>{var i;return typeof e.size=="number"?e.size:(i=ee[e.size])!=null?i:void 0});return(i,s)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElIcon),{class:Vue.normalizeClass(["x-icon",l.value]),color:e.color,size:a.value,style:Vue.normalizeStyle(u.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(i.$slots,"default",{},()=>[r.value?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(r.value),{key:0})):Vue.createCommentVNode("",!0),e.src?(Vue.openBlock(),Vue.createElementBlock("img",{key:1,src:e.src},null,8,$r)):Vue.createCommentVNode("",!0)])]),_:3},8,["class","color","size","style"]))}}),Fr={class:"x-menu__wrapper"},Rr={key:1,class:"x-menu__title"},Or={key:0,class:"x-menu__title"},Jn=Vue.defineComponent({inheritAttrs:!1,name:"XMenuItem",__name:"MenuItem",props:{item:{},subMenu:{},defaultIcon:{}},setup(o){const e=o,n=Vue.getCurrentInstance(),t=u=>{if(u){if(typeof u=="string"){const a=n==null?void 0:n.appContext.app;return(a==null?void 0:a.component(u))||e.defaultIcon||u}return u}},r=u=>typeof u=="object"?u:{value:u},l=(u=[])=>u.filter(a=>!a.hidden);return(u,a)=>e.item.children?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSubMenu),Vue.mergeProps({key:0,disabled:e.item.disabled},e.subMenu,{index:String(e.item.id)}),{title:Vue.withCtx(()=>[Vue.createElementVNode("div",Fr,[e.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(Ve),{key:0,icon:t(e.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0),e.item.title?(Vue.openBlock(),Vue.createElementBlock("span",Rr,Vue.toDisplayString(e.item.title),1)):Vue.createCommentVNode("",!0),e.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:2,class:"x-menu__badge"},r(e.item.badge)),{default:Vue.withCtx(()=>a[0]||(a[0]=[Vue.createElementVNode("i",null,null,-1)])),_:1},16)):Vue.createCommentVNode("",!0)])]),default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(l(e.item.children),i=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Jn),{key:i.id,item:i,subMenu:e.subMenu,defaultIcon:e.defaultIcon},null,8,["item","subMenu","defaultIcon"]))),128))]),_:1},16,["disabled","index"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenuItem),{key:1,index:String(e.item.id),disabled:e.item.disabled},{title:Vue.withCtx(()=>[e.item.title?(Vue.openBlock(),Vue.createElementBlock("span",Or,Vue.toDisplayString(e.item.title),1)):Vue.createCommentVNode("",!0),e.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:1,class:"x-menu__badge"},r(e.item.badge)),{default:Vue.withCtx(()=>a[1]||(a[1]=[Vue.createElementVNode("i",null,null,-1)])),_:1},16)):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[e.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(Ve),{key:0,icon:t(e.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0)]),_:1},8,["index","disabled"]))}}),Pe=Vue.defineComponent({inheritAttrs:!1,name:"XMenu",__name:"Menu",props:{data:{default:()=>[]},subMenu:{},defaultIcon:{}},emits:["select"],setup(o,{emit:e}){const n=o,t=e,r=Vue.computed(()=>n.data.filter(a=>!a.hidden)),l=(a,i)=>{const s=(c,d=[])=>{var m;for(const p of d){if(p.id.toString()===c.toString())return p;if((m=p.children)!=null&&m.length){const f=s(c,p.children);if(f)return f}}};return s(i,a)},u=a=>{const i=l(r.value,a);i&&t("select",i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenu),Vue.mergeProps({class:"x-menu"},a.$attrs,{onSelect:u}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Jn),{item:K(P({},s),{icon:s.icon}),defaultIcon:n.defaultIcon,subMenu:n.subMenu},null,8,["item","defaultIcon","subMenu"]))),256))]),_:1},16))}}),nn={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},draggable:{type:Boolean}};function jr(o){return Vue.computed(()=>{const e=o.tooltip;if(e)return typeof e=="string"?{content:e}:e})}function Ur(o){return Vue.computed(()=>{const e=o.badge;if(e)return typeof e=="object"?e:{value:e}})}function Lr(o){return Vue.computed(()=>{const{dropdown:e,menus:n}=o;if(n&&n.length>0)return Object.assign({popperClass:"x-action__menus",size:o.size},e||{})})}function Qn(o){const e=Vue.getCurrentInstance();return Vue.computed(()=>{const n=Vue.unref(o);if(n)if(typeof n=="string"||n.setup||n.render||Vue.isVNode(n)){const t=e==null?void 0:e.appContext.app;return{icon:typeof n=="string"&&(t==null?void 0:t.component(n))||n}}else return n;return null})}function Fe(o){const e=Qn(o);return e.value?Vue.markRaw(Vue.defineComponent({render:()=>Vue.h(Ve,e.value)})):void 0}function _t(o,e){return Vue.computed(()=>{const n=Vue.unref(o);return typeof n=="function"?n(e):!!n})}function Zn(o,e,n){const t=Vue.shallowRef(e),r=Vue.ref(!1),l=a=>N(this,null,function*(){const i=Vue.unref(o);return i?typeof i=="function"?yield i(a):i:e}),u=a=>N(this,null,function*(){return r.value=!0,yield l(a).then(i=>(t.value=i||e,r.value=!1,Vue.unref(t)))});return Vue.watch(()=>o,()=>{u(n)},{immediate:!0}),n&&Vue.watch(n,()=>{u(n)}),{data:t,loading:r,loader:u}}function Hr(o=1e3){const e=Vue.ref(0);let n;const t=()=>{n=VtjUtils.rAF(()=>{++e.value,e.value<o&&t()})};return Vue.onMounted(t),Vue.onUnmounted(()=>{n&&VtjUtils.cAF(n)}),r=>e.value>=r}function eo(o=[]){const e=Vue.useSlots();return Object.keys(e).filter(n=>!o.includes(n))}const Xr={key:0},Yr=Vue.defineComponent({__name:"Trigger",props:nn,emits:["click"],setup(o,{emit:e}){const n=o,t=e,r=Fe(Vue.toRef(n,"icon")),l=_t(Vue.toRef(n,"disabled")),u=Vue.computed(()=>({[`is-${n.mode}`]:!!n.mode,[`is-${n.type}`]:!!n.type,[`is-${n.size}`]:!!n.size&&n.size!=="default",[`is-background-${n.background}`]:n.mode==="icon"&&!!n.background,"is-disabled":!!n.disabled,"is-circle":!!n.circle})),a=i=>{if(i.preventDefault(),!l.value)return t("click"),!1};return(i,s)=>n.mode==="button"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),Vue.mergeProps({key:0,icon:Vue.unref(r),type:n.type,size:n.size,disabled:Vue.unref(l)},n.button,{onClick:a}),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(i.label),1)]),_:1},16,["icon","type","size","disabled"])):(Vue.openBlock(),Vue.createElementBlock("div",{key:1,class:Vue.normalizeClass(["x-action__inner",u.value]),onClick:a},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(r)))),i.label?(Vue.openBlock(),Vue.createElementBlock("span",Xr,Vue.toDisplayString(i.label),1)):Vue.createCommentVNode("",!0)],2))}}),Kr=["draggable"],oe=Vue.defineComponent({name:"XAction",__name:"Action",props:nn,emits:["click","command","dragstart","dragend"],setup(o,{emit:e}){const n=o,t=Vue.useSlots(),r=e,l=jr(n),u=Ur(n),a=Lr(n),i=_t(Vue.toRef(n,"disabled")),s=Vue.computed(()=>!!n.draggable&&!i.value),c=Vue.computed(()=>({[`x-action--${n.mode}`]:!!n.mode})),d=()=>{i.value||r("click",Vue.toRaw(n))},m=h=>{var b;if(i.value)return;const C=(b=n.menus)==null?void 0:b.find(k=>k.command===h);C&&r("command",Vue.toRaw(C))},p=h=>{s&&r("dragstart",Vue.toRaw(n),h)},f=h=>{s&&r("dragend",Vue.toRaw(n),h)},V=h=>Vue.h(ElementPlus.ElBadge,u.value,()=>[].concat(h)),g=h=>Vue.h(ElementPlus.ElDropdown,K(P({},a.value),{disabled:i.value,onCommand:m}),{default:()=>[h],dropdown:()=>[Vue.h(ElementPlus.ElDropdownMenu,()=>(n.menus||[]).map((C,b)=>Vue.h(ElementPlus.ElDropdownItem,C,()=>t.item?t.item({item:C,index:b}):C.label)))]}),v=h=>Vue.h(ElementPlus.ElTooltip,K(P({},l.value),{disabled:i.value}),()=>[h]),y=Vue.computed(()=>{var b;let h=Vue.h(Vue.markRaw(Yr),K(P({},n),{onClick:d}));const C=(b=t.default)==null?void 0:b.call(t);return C&&C.length&&(h=C[0]),u.value&&(h=V(h)),a.value&&(h=g(h)),l.value&&(h=v(h)),h});return(h,C)=>(Vue.openBlock(),Vue.createElementBlock("div",{class:Vue.normalizeClass(["x-action",c.value]),draggable:s.value,onDragstart:p,onDragend:f},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(y.value)))],42,Kr))}}),to={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},Re=Vue.defineComponent({name:"XActionBar",__name:"ActionBar",props:to,emits:["click","command"],setup(o,{emit:e}){const n=o,t=e,r=Vue.computed(()=>(n.items||[]).map(a=>a==="|"?a:K(P({},a),{badge:a.badge?P(P({},n.badge),typeof a.badge=="object"?a.badge||{}:{value:a.badge}):void 0,tooltip:a.tooltip?P(P({},n.tooltip),typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}):void 0}))),l=a=>{t("click",a)},u=(a,i)=>{t("command",a,i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:"x-action-bar",align:"center"},{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[s==="|"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),Vue.mergeProps({key:1,mode:n.mode,size:n.size,type:n.type,circle:n.circle,background:n.background,button:n.button,dropdown:n.dropdown,disabled:Vue.unref(_t)(n.disabled,s).value,ref_for:!0},s,{onClick:l,onCommand:c=>u(s,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),no={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},R=Vue.defineComponent({name:"XContainer",__name:"Container",props:no,setup(o,{expose:e}){const n=o,t=Vue.useAttrs(),r=Vue.getCurrentInstance(),l=Vue.ref(),u=Vue.computed(()=>{var c;return(c=l.value)==null?void 0:c.$el}),a=Vue.computed(()=>{const c=r==null?void 0:r.parent;if(!c)return!1;const d=c.proxy;return d.$options.name==="XContainer"||!!d.flex}),i=Vue.computed(()=>{var c;return{"is-fit":n.fit,"is-flex":n.flex&&!n.inline,"is-inline-flex":n.flex&&n.inline,[`is-direction-${n.direction}`]:n.flex&&n.direction!=="row",[`is-wrap-${n.wrap}`]:n.flex&&n.wrap!=="nowrap",[`is-justify-${n.justify}`]:n.flex&&n.justify!=="flex-start",[`is-align-${n.align}`]:n.flex&&n.align!=="flex-start",[`is-align-content-${n.alignContent}`]:n.flex&&n.alignContent!=="stretch","is-grow":(c=n.grow)!=null?c:a.value,"is-shrink":n.shrink,[`is-align-self-${n.alignSelf}`]:a.value&&n.alignSelf!=="auto",[`is-overflow-${n.overflow}`]:!!n.overflow,"is-padding":!!n.padding,"is-pointer":n.autoPointer&&!!t.onClick,"is-gap":!!n.gap}}),s=Vue.computed(()=>{const{width:c,height:d,fit:m}=n;return m?null:{width:c?ce(c):void 0,height:d?ce(d):void 0}});return e({$vtjEl:u}),(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.tag),{ref_key:"elRef",ref:l,class:Vue.normalizeClass(["x-container",i.value]),style:Vue.normalizeStyle(s.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}}),oo={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},Gr={class:"x-header__content"},Wr={key:0,class:"x-header__actions"},on=Vue.defineComponent({name:"XHeader",inheritAttrs:!1,__name:"Header",props:oo,setup(o){const e=o,n=Fe(Vue.toRef(e,"icon")),t=Vue.useAttrs(),r=Vue.computed(()=>({[`is-size-${e.size}`]:!!e.size&&e.size!=="default","is-border":e.border,"is-pointer":!!t.onClick}));return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-header",r.value]),justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(R),{align:"center",class:Vue.normalizeClass(["x-header__wrapper",r.value]),grow:"",onClick:Vue.unref(t).onClick},{default:Vue.withCtx(()=>[Vue.unref(n)?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(n)),{key:0,class:"x-header__icon",onClick:Vue.unref(t).onClickIcon||Vue.unref(t).onClick},null,8,["onClick"])):Vue.createCommentVNode("",!0),Vue.createElementVNode("span",Gr,[Vue.renderSlot(l.$slots,"default",{},()=>[Vue.createTextVNode(Vue.toDisplayString(e.content),1)])]),e.more?(Vue.openBlock(),Vue.createBlock(Vue.unref(Ve),{key:1,class:"x-header__more",icon:Vue.unref(VtjIcons.ArrowRight)},null,8,["icon"])):Vue.createCommentVNode("",!0),e.subtitle||l.$slots.subtitle?(Vue.openBlock(),Vue.createElementBlock("span",{key:2,class:"x-header__subtitle",onClick:u[0]||(u[0]=(...a)=>Vue.unref(t).onClick&&Vue.unref(t).onClick(...a))},[Vue.renderSlot(l.$slots,"subtitle",{},()=>[Vue.createTextVNode(Vue.toDisplayString(e.subtitle),1)])])):Vue.createCommentVNode("",!0)]),_:3},8,["class","onClick"]),l.$slots.actions?(Vue.openBlock(),Vue.createElementBlock("div",Wr,[Vue.renderSlot(l.$slots,"actions")])):Vue.createCommentVNode("",!0)]),_:3},8,["class"]))}}),ro={fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},Ye=Vue.defineComponent({name:"XPanel",__name:"Panel",props:ro,setup(o,{expose:e}){const n=o,t=Vue.ref(),r=Vue.computed(()=>({"x-panel--card":!!n.card,"x-panel--default":!n.card,[`is-${n.size}`]:!!n.size&&n.size!=="default","is-border":!!n.border,"is-radius":!!n.radius,[`is-shadow-${n.shadow}`]:!!n.shadow&&n.shadow!=="none"})),l=Vue.computed(()=>n.header===null?null:typeof n.header=="string"?{content:n.header,size:n.size}:K(P({},n.header),{size:n.size})),u=Vue.computed(()=>n.fit||n.height?"auto":void 0);return e({bodyRef:t}),(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-panel",r.value]),direction:"column",fit:n.fit,width:n.width,height:n.height},{default:Vue.withCtx(()=>[l.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{key:0,flex:!1,class:"x-panel__header"},{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"header",{},()=>[Vue.createVNode(Vue.unref(on),Vue.normalizeProps(Vue.guardReactiveProps(l.value)),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"title")]),actions:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"actions")]),_:3},16)])]),_:3})):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(R),Vue.mergeProps({ref_key:"bodyRef",ref:t,flex:!1,overflow:u.value,grow:"",padding:"",class:"x-panel__body"},n.body),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"default")]),_:3},16,["overflow"]),a.$slots.footer?(Vue.openBlock(),Vue.createBlock(Vue.unref(R),Vue.mergeProps({key:1,flex:!1,padding:"",class:"x-panel__footer"},n.footer),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"footer")]),_:3},16)):Vue.createCommentVNode("",!0)]),_:3},8,["class","fit","width","height"]))}}),lo="user-select-none";class rn{constructor(e,n={}){xe(this,"scope");xe(this,"dragging",!1);this.el=e,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}getHandle(){const{selector:e,handle:n}=this.options;return e?this.el.querySelector(e):n}getTarget(){const{target:e="body"}=this.options;return typeof e=="string"?document.querySelector(e):Vue.unref(e)||document.body}init(){const{el:e,options:n}=this,{disabled:t,delay:r=150,onStart:l,onEnd:u}=n;if(t)return;let a=null;const i=this.getHandle(),s=this.getTarget();let c=e.getBoundingClientRect(),d=null;const{x:m,y:p}=VueUse.useDraggable(e,K(P({initialValue:{x:c.x,y:c.y}},n),{handle:i,onStart:(f,V)=>{document.body.classList.add(lo),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=e.getBoundingClientRect(),d=s==null?void 0:s.getBoundingClientRect(),l&&l(f,V)},r)},onEnd:(f,V)=>{if(clearTimeout(a),document.body.classList.remove(lo),this.dragging&&d){this.dragging=!1;const{x:g,y:v}=f,y=this.getPosition(d,c,g,v);u&&u(y,V),d=null}}}));Vue.watch([m,p],()=>{if(this.dragging&&d){const f=this.getPosition(d,c,m.value,p.value);e.style.left=`${f.x}px`,e.style.top=`${f.y}px`}})}getPosition(e,n,t,r){const{edge:l=50}=this.options,u=-n.width+e.x+l,a=e.width+e.x-l,i=e.y,s=e.height+e.y-l,c=Math.min(a,Math.max(t,u)),d=Math.min(s,Math.max(r,i));return{x:c-e.x,y:d-e.y}}destory(){this.scope.stop()}}const ao={mounted(o,e){const n=e.value||{},t=new rn(o,n);o.__draggable__=t},updated(o,e){const n=e.value||{};let t=o.__draggable__;t&&!VtjUtils.isEqual(t.options,n)&&(t.destory(),o.__draggable__=new rn(o,n))},unmounted(o){const e=o.__draggable__;e&&(e.destory(),o.__draggable__=null)}},ln="user-select-none";class an{constructor(e,n={}){xe(this,"scope");xe(this,"resizing",Vue.ref(!1));xe(this,"direction",Vue.ref(""));xe(this,"MIE",null);xe(this,"cleanMousedown");xe(this,"cleanMouseup");this.el=e,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}init(){const{el:e,options:n}=this,{disabled:t,onStart:r,onEnd:l}=n;if(t)return;this.MIE=VueUse.useMouseInElement(e),this.cleanMousedown=VueUse.useEventListener(document,"mousedown",()=>{var i;(i=this.direction)!=null&&i.value&&this.MIE&&(this.resizing.value=!0,e.classList.add("is-resizing",`is-${this.direction.value}-resizing`),r&&r(this.direction.value,this.MIE))}),this.cleanMouseup=VueUse.useEventListener(document,"mouseup",()=>{var i;this.resizing.value&&((i=this.direction)!=null&&i.value)&&this.MIE&&(e.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),l&&l(this.direction.value,this.MIE)),this.resizing.value=!1}),Vue.watch(this.direction,i=>{const s=document.body;s.style.cursor=i?`${i}-resize`:"",i?s.classList.add(ln):s.classList.remove(ln)});const{x:u,y:a}=this.MIE;Vue.watch([u,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:e,direction:n,resizing:t,options:r,el:l}=this,u=(n==null?void 0:n.value)||"";if(!e||!t.value||!u)return;const{x:a,y:i,elementX:s,elementY:c,elementHeight:d,elementWidth:m}=e,{onResizing:p}=r,{minWidth:f=0,minHeight:V=0,maxWidth:g=99999,maxHeight:v=99999}=r;if(u.includes("e")){const y=Math.min(Math.max(s.value,f),g);l.style.width=`${y}px`}if(u.includes("s")){const y=Math.min(Math.max(c.value,V),v);l.style.height=`${y}px`}if(u.includes("w")){const y=Math.min(Math.max(m.value-s.value,f),g);l.style.width=`${y}px`,l.style.left=`${a.value}px`}if(u.includes("n")){const y=Math.min(Math.max(d.value-c.value,V),v);this.el.style.height=`${y}px`,this.el.style.top=`${i.value}px`}p&&p(u,e)}getDirection(){if(!this.MIE)return"";const{elementX:e,elementY:n,elementHeight:t,elementWidth:r,isOutside:l}=this.MIE;if(l.value)return"";const{dirs:u=["n","s","w","e"],edge:a=5}=this.options;let i="";return u.includes("n")&&n.value<=a?i+="n":u.includes("s")&&n.value>t.value-a&&(i+="s"),u.includes("w")&&e.value<=a?i+="w":u.includes("e")&&e.value>r.value-a&&(i+="e"),i}destory(){var n;const e=document.body;e.style.cursor="",e.classList.remove(ln),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),(n=this.MIE)==null||n.stop(),this.scope.stop()}}const un={mounted(o,e){const n=e.value||{},t=new an(o,n);o.__resizable__=t},updated(o,e){const n=e.value||{};let t=o.__resizable__;t&&!VtjUtils.isEqual(t.options,n)&&(t.destory(),o.__resizable__=new an(o,n))},unmounted(o){const e=o.__resizable__;e&&(e.destory(),o.__resizable__=null)}},uo={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean}};let Ke=1e3;function qr(o,e){const{width:n,height:t}=VueUse.useElementSize(e),r=Vue.reactive({mode:o.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++Ke,dragging:!1,resizing:!1});return Vue.watch([n,t],([l,u])=>{r.wrapperWidth=l,r.wrapperHeight=u,r.width=Ae(o.width,l),r.height=Ae(o.height,u),r.left=o.left?Ae(o.left,l)-r.width/2:Math.max(Math.floor((l-r.width)/2),0),r.top=o.top?Ae(o.top,u):Math.max(Math.floor((u-r.height)/2),0)}),Vue.watch(r,l=>{Ke=Math.max(l.zIndex,Ke)}),{state:r,normal:Vue.computed(()=>r.mode==="normal"),maximized:Vue.computed(()=>r.mode==="maximized"),minimized:Vue.computed(()=>r.mode==="minimized")}}function Jr(o,e){const n=Vue.computed(()=>{const{width:u,height:a,top:i,left:s,zIndex:c}=e;return{width:`${u}px`,height:`${a}px`,top:`${i}px`,left:`${s}px`,zIndex:c}}),t=Vue.computed(()=>({[`is-${e.mode}`]:!!e.mode,"is-draggable":!!o.draggable,"is-resizable":!!o.resizable,"is-primary":!!o.primary})),r=Vue.computed(()=>({[`is-${e.mode}`]:!!e.mode,"is-dragging":e.dragging,"is-resizing":e.resizing})),l=Vue.computed(()=>({zIndex:e.zIndex}));return{styles:n,classes:t,wrapperClass:r,modalStyle:l}}function Qr(o,e,n){const t=c=>{e.mode=c,["maximized","minimized","normal"].includes(c)&&n(c),n("modeChange",c)},r=()=>N(this,null,function*(){(!o.beforeClose||(yield o.beforeClose()))&&(n("update:modelValue",!1),n("close"),n("destroy"))});return{close:r,changeMode:t,show:()=>t("normal"),hide:()=>t("minimized"),active:c=>{const d=c.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(d.toUpperCase())||(e.zIndex=Math.max(e.zIndex,++Ke))},submit:()=>n("submit"),cancel:()=>{n("cancel"),r()}}}function Zr(o,e,n,t){return Vue.computed(()=>{var l;const r=typeof o.draggable=="boolean"?!o.draggable:!!((l=o.draggable)!=null&&l.disabled);return K(P({},VtjUtils.isObject(o.draggable)?o.draggable:{}),{disabled:r,target:t,selector:".x-panel__header",onStart(u){e.dragging=!0,e.zIndex=Math.max(e.zIndex,++Ke),n("dragStart",u)},onMove(u){n("dragging",u)},onEnd(u){if(e.mode==="maximized")return;const{x:a,y:i}=u;e.left=a,e.top=i,e.dragging=!1,n("dragEnd",u)}})})}function el(o,e,n){return Vue.computed(()=>{var r;const t=typeof o.resizable=="boolean"?!o.resizable:!!((r=o.resizable)!=null&&r.disabled);return K(P({minWidth:200,minHeight:150},VtjUtils.isObject(o.resizable)?o.resizable:{}),{disabled:t,dirs:["e","s","w"],onStart(l,u){e.resizing=!0,e.zIndex=Math.max(e.zIndex,++Ke),n("resizeStart",l,u)},onResizing(l,u){n("resizing",l,u)},onEnd(l,u){const a=document.body.getBoundingClientRect();e.left=u.elementPositionX.value-a.x,e.top=u.elementPositionY.value-a.y,e.width=u.elementWidth.value,e.height=u.elementHeight.value,e.resizing=!1,n("resizeEnd",l,u)}})})}function tl(o,e){const n=o.componentInstance;if(!n)return;let t=null;return Vue.onMounted(()=>{const r=Vue.unref(e),l=Vue.unref(r==null?void 0:r.bodyRef);t=n.$el,l&&l.$el&&l.$el.appendChild(t)}),Vue.onUnmounted(()=>{t&&t.parentNode&&t.parentNode.removeChild(t)}),{componentInstance:n}}const nl=["src"],Ge=Vue.defineComponent({name:"XDialog",__name:"Dialog",props:uo,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(o,{expose:e,emit:n}){const t=o,r=n,l=Vue.getCurrentInstance(),u=Vue.ref(),a=Vue.ref(),{state:i,maximized:s,minimized:c,normal:d}=qr(t,u),{styles:m,classes:p,wrapperClass:f,modalStyle:V}=Jr(t,i),{changeMode:g,active:v,close:y,show:h,hide:C,submit:b,cancel:k}=Qr(t,i,r),w=Zr(t,i,r,u),T=el(t,i,r),D=tl(t,a);Vue.watchEffect(()=>N(this,null,function*(){t.modelValue?(yield Vue.nextTick(),l&&(r("open",l),document.body.classList.add("x-dialog-visible"))):document.body.classList.remove("x-dialog-visible")}));const O=Vue.computed(()=>{var $;return($=a.value)==null?void 0:$.$el});return e({$vtjEl:O,panelRef:a,state:i,maximized:s,minimized:c,changeMode:g,show:h,hide:C,submit:b,cancel:k,close:y,componentInstance:D}),($,G)=>t.modelValue?(Vue.openBlock(),Vue.createBlock(Vue.Teleport,{key:0,to:"body"},[Vue.createElementVNode("div",{ref_key:"wrapper",ref:u,class:Vue.normalizeClass(["x-dialog__wrapper",Vue.unref(f)])},[t.modal?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,class:"x-dialog__modal",style:Vue.normalizeStyle(Vue.unref(V))},null,4)):Vue.createCommentVNode("",!0),Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(Ye),Vue.mergeProps({ref_key:"panelRef",ref:a,class:["x-dialog",Vue.unref(p)],card:"",shadow:"always",header:{icon:t.icon,subtitle:t.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:Vue.unref(m),size:t.size,body:{padding:t.bodyPadding},onClick:Vue.unref(v)},$.$attrs),Vue.createSlots({title:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(t.title),1)]),actions:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"actions"),t.minimizable?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:0,icon:Vue.unref(VtjIcons.Minimize),size:t.size,mode:"icon",type:"primary",background:"hover",onClick:G[0]||(G[0]=L=>Vue.unref(g)("minimized"))},null,8,["icon","size"])):Vue.createCommentVNode("",!0),t.maximizable?(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:1},[Vue.unref(d)?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:1,icon:Vue.unref(VtjIcons.Maximize),size:t.size,mode:"icon",type:"primary",background:"hover",onClick:G[2]||(G[2]=L=>Vue.unref(g)("maximized"))},null,8,["icon","size"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:0,icon:Vue.unref(VtjIcons.Popup),size:t.size,mode:"icon",type:"primary",background:"hover",onClick:G[1]||(G[1]=L=>Vue.unref(g)("normal"))},null,8,["icon","size"]))],64)):Vue.createCommentVNode("",!0),t.closable?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:2,icon:Vue.unref(VtjIcons.RawClose),size:t.size,mode:"icon",type:"danger",background:"hover",onClick:Vue.unref(y)},null,8,["icon","size","onClick"])):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"default",{},()=>[t.content?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(t.content),{key:0})):Vue.createCommentVNode("",!0),t.src?(Vue.openBlock(),Vue.createElementBlock("iframe",{key:1,src:t.src,class:"x-dialog__frame"},null,8,nl)):Vue.createCommentVNode("",!0)])]),_:2},[t.cancel||t.submit||$.$slots.footer||$.$slots.extra||$.$slots.handle?{name:"footer",fn:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"footer",{},()=>[Vue.createVNode(Vue.unref(R),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"extra")]),_:3}),Vue.createVNode(Vue.unref(R),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"handle"),t.cancel?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:0,type:"default",size:t.size,onClick:Vue.unref(k)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof t.cancel=="string"?t.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0),t.submit?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:1,type:"primary",size:t.size,onClick:Vue.unref(b)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof t.submit=="string"?t.submit:"确定"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[Vue.unref(ao),Vue.unref(w)],[Vue.unref(un),Vue.unref(T)]])],2)])):Vue.createCommentVNode("",!0)}});function kt(o,e){const n=document.createElement("div"),t=Vue.createVNode(Ge,o);t.appContext=e!=null?e:kt._context,Vue.render(t,n);const r=()=>{var l;Vue.render(null,n),(l=n.parentNode)==null||l.removeChild(n)};return t.props.onDestroy=()=>{r()},document.body.appendChild(n),{vnode:t,destroy:r}}const ol=Vue.defineComponent({__name:"Sidebar",props:{collapsed:{type:Boolean}},setup(o){const e=o;return(n,t)=>Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-mask-sidebar",{"is-collapsed":e.collapsed}]),grow:!1,flex:"",direction:"column"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"brand"),Vue.createVNode(Vue.unref(R),{class:"x-mask-sidebar__wrapper",flex:"",grow:"",direction:"column",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"default"),t[0]||(t[0]=Vue.createElementVNode("div",{class:"x-mask-sidebar__helper"},null,-1))]),_:3})]),_:3},8,["class"])),[[Vue.unref(un),{dirs:["e"],disabled:e.collapsed,maxWidth:500,minWidth:200}]])}}),rl=Vue.defineComponent({__name:"SwitchBar",props:{collasped:{type:Boolean,default:!1},favorite:{type:Boolean,default:!1},keyword:{}},emits:["update:collasped","update:keyword","update:favorite"],setup(o,{emit:e}){const n=o,t=e,r=Vue.ref(!1),l=Vue.ref(""),u=Vue.ref(!1),a=()=>{r.value=!0},i=()=>{l.value="",r.value=!1,t("update:keyword",l.value)},s=()=>{t("update:collasped",!n.collasped)},c=()=>{t("update:keyword",l.value)},d=()=>{t("update:favorite",u.value)};return(m,p)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:"x-mask-switch-bar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{key:0,class:"x-mask-switch-bar__left",grow:""},{default:Vue.withCtx(()=>[r.value?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSwitch),{key:0,modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=f=>u.value=f),class:"x-mask-switch-bar__switch","active-icon":Vue.unref(VtjIcons.StarFilled),"inactive-icon":Vue.unref(VtjIcons.Menu),onChange:d},null,8,["modelValue","active-icon","inactive-icon"])),r.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),{key:1,modelValue:l.value,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value=f),class:"x-mask-switch-bar__input",size:"small",placeholder:"请输入查询关键字",onInput:c,"prefix-icon":Vue.unref(VtjIcons.Search)},{suffix:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Ve),{icon:Vue.unref(VtjIcons.Close),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","prefix-icon"])):Vue.createCommentVNode("",!0)]),_:1})),Vue.createVNode(Vue.unref(R),{class:Vue.normalizeClass(["x-mask-switch-bar__right",{"is-collasped":n.collasped}]),flex:"",align:"center",justify:"center"},{default:Vue.withCtx(()=>[!r.value&&!n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:0,icon:Vue.unref(VtjIcons.Search),mode:"icon",background:"hover",size:"default",circle:"",onClick:a},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:1,icon:Vue.unref(VtjIcons.Expand),mode:"icon",size:"default",background:"hover",onClick:s,circle:""},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:2,icon:Vue.unref(VtjIcons.Fold),mode:"icon",size:"default",background:"hover",circle:"",onClick:s},null,8,["icon"]))]),_:1},8,["class"])]),_:1}))}}),ll=["src"],al={key:0},ul=Vue.defineComponent({__name:"Brand",props:{collapsed:{type:Boolean,default:!1},logo:{},title:{},url:{}},setup(o){const e=o,n=VueRouter.useRouter(),t=()=>{e.url&&n.push(e.url)};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-mask-brand",{"is-collapsed":e.collapsed}]),align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(R),{class:"x-mask-brand__logo",flex:"",justify:"center",align:"center",onClick:t},{default:Vue.withCtx(()=>[Vue.renderSlot(r.$slots,"logo",{},()=>[e.logo?(Vue.openBlock(),Vue.createElementBlock("img",{key:0,src:e.logo},null,8,ll)):Vue.createCommentVNode("",!0)])]),_:3}),Vue.createVNode(Vue.unref(R),{class:"x-mask-brand__title",flex:"",align:"center"},{default:Vue.withCtx(()=>[e.title?(Vue.openBlock(),Vue.createElementBlock("span",al,[Vue.renderSlot(r.$slots,"title",{},()=>[Vue.createTextVNode(Vue.toDisplayString(e.title),1)])])):Vue.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]))}}),Et="__favorites__",St="__search__",il=Vue.defineComponent({__name:"Menu",props:{collapse:{type:Boolean,default:!1},keyword:{},favorite:{type:Boolean},favorites:{},flatMenus:{},menus:{},active:{}},emits:["select"],setup(o,{emit:e}){const n=o,t=Vue.computed(()=>n.menus||[]),r=e,l=Vue.computed(()=>{var s;return String((s=n.active)==null?void 0:s.id)}),u=Vue.computed(()=>{var s;return[{id:Et,title:"收藏",icon:VtjIcons.Star,children:(s=n.favorites)!=null&&s.length?n.favorites:[{id:Et+"empty",disabled:!0,title:"暂无收藏菜单"}]}]}),a=Vue.computed(()=>{const s=(n.keyword||"").trim(),c=s?(n.flatMenus||[]).filter(d=>{var m;return(m=d.title)==null?void 0:m.includes(s)}):[];return[{id:St,title:"搜索",icon:VtjIcons.Search,children:c!=null&&c.length?c:[{id:St+"empty",disabled:!0,title:"查询匹配不到菜单项"}]}]}),i=s=>{r("select",s)};return(s,c)=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[Vue.withDirectives(Vue.createVNode(Vue.unref(R),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:t.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0},data:t.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,!n.collapse]]),t.value.length?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElEmpty),{key:0,description:"暂无菜单数据"}))]),_:1},512),[[Vue.vShow,!n.favorite&&!n.keyword]]),Vue.withDirectives(Vue.createVNode(Vue.unref(R),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[Et],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[Et],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512),[[Vue.vShow,n.favorite&&!n.keyword]]),n.keyword?Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(R),{key:0,class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[St],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[St],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512)),[[Vue.vShow,!!n.keyword]]):Vue.createCommentVNode("",!0)],64))}}),sl="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1711803009570'%20class='icon'%20viewBox='0%200%201280%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1500'%20width='320'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M557.85%201023l-122-35.4c-12.8-3.6-20-17-16.4-29.8L692.45%2017.4c3.6-12.8%2017-20%2029.8-16.4l122%2035.4c12.8%203.6%2020%2017%2016.4%2029.8L587.65%201006.6c-3.8%2012.8-17%2020.2-29.8%2016.4z%20m-228-224.4l87-92.8c9.2-9.8%208.6-25.4-1.6-34.4L234.05%20512l181.2-159.4c10.2-9%2011-24.6%201.6-34.4l-87-92.8c-9-9.6-24.2-10.2-34-1L7.65%20494.4c-10.2%209.4-10.2%2025.6%200%2035l288.2%20270.2c9.8%209.2%2025%208.8%2034-1z%20m654.4%201.2l288.2-270.2c10.2-9.4%2010.2-25.6%200-35L984.25%20224.2c-9.6-9-24.8-8.6-34%201L863.25%20318c-9.2%209.8-8.6%2025.4%201.6%2034.4L1046.05%20512l-181.2%20159.4c-10.2%209-11%2024.6-1.6%2034.4l87%2092.8c9%209.8%2024.2%2010.2%2034%201.2z'%20fill='%230157fe'%20p-id='1501'%3e%3c/path%3e%3c/svg%3e",io=140,so={logo:{type:String,default:sl},title:{type:String,default:"VTJ.PRO"},menus:{type:[Array,Function],default(){return[]}},favorites:{type:[Array,Function],default(){return[]}},menuAdapter:{type:Function},home:{type:[String,Object],default:"/"},tabs:{type:Number,default:20},actions:{type:Array},avatar:{type:String},theme:{type:Boolean},disabled:{type:Boolean},addFavorite:{type:Function},removeFavorite:{type:Function}},sn=Symbol(),cn=Symbol(),cl={class:"x-mask-tabs__trigger"},dl={key:1},fl=["onDragstart","onDragend"],pl={key:1},ml=Vue.defineComponent({__name:"Tabs",props:{tabs:{},home:{},isActiveTab:{type:Function},value:{},favorites:{}},emits:["click","remove","refresh","toggleFavorite","dialog"],setup(o,{emit:e}){const n=o,t=e,r=c=>{const d=!!n.favorites.find(m=>{var p;return m===c.menu||m.id===((p=c.menu)==null?void 0:p.id)});return[{icon:VtjIcons.Refresh,label:"刷新",name:"refresh",value:c},"|",{icon:d?VtjIcons.StarFilled:VtjIcons.Star,label:"收藏",name:"favorite",value:c.menu,disabled:!c.menu},"|",{icon:VtjIcons.CopyDocument,label:"弹窗",name:"dialog",value:c}]},l=c=>{const d=c.paneName;if(d===n.home.id){t("click",n.home);return}const m=n.tabs.find(p=>p.id===d);m&&t("click",m)},u=c=>{const d=n.tabs.find(m=>m.id===c);d&&t("remove",d)},a=c=>{switch(c.name){case"refresh":t("refresh",c.value);break;case"favorite":t("toggleFavorite",c.value);break;case"dialog":t("dialog",c.value);break}},i=(c,d)=>{d.dataTransfer&&(d.dataTransfer.setData("tab",c.id),d.target&&d.target.classList.add("is-dagging"))},s=(c,d)=>{d.target&&d.target.classList.remove("is-dagging")};return(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{ref:"tabsRef",class:"x-mask-tabs",height:"100%",grow:"",flex:"",justify:"flex-end",direction:"column"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElTabs),{type:"card","model-value":n.value,onTabRemove:u,onTabClick:l},{default:Vue.withCtx(()=>[n.home?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:0,name:n.home.id},{label:Vue.withCtx(()=>[Vue.createElementVNode("div",cl,[n.home.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(Fe)(n.home.icon)),{key:0})):Vue.createCommentVNode("",!0),n.home.title?(Vue.openBlock(),Vue.createElementBlock("span",dl,Vue.toDisplayString(n.home.title),1)):Vue.createCommentVNode("",!0)])]),_:1},8,["name"])):Vue.createCommentVNode("",!0),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.tabs,m=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:m.id,name:m.id,lazy:"",closable:""},{label:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElPopover),{"open-delay":500,placement:"bottom",trigger:"hover",width:"200px",disabled:m.id!==n.value},{reference:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:"x-mask-tabs__trigger",draggable:"true",onDragstart:p=>i(m,p),onDragend:p=>s(m,p)},[m.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(Fe)(m.icon)),{key:0})):Vue.createCommentVNode("",!0),m.title?(Vue.openBlock(),Vue.createElementBlock("span",pl,Vue.toDisplayString(m.title),1)):Vue.createCommentVNode("",!0)],40,fl)]),default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Re),{items:r(m),mode:"text",size:"small",type:"info",onClick:a},null,8,["items"])]),_:2},1032,["disabled"])]),_:2},1032,["name"]))),128))]),_:1},8,["model-value"])]),_:1},512))}}),Vl=Vue.defineComponent({__name:"ThemeSwitch",setup(o){const e=VueUse.useDark(),n=Vue.computed(()=>e.value?VtjIcons.Sunny:VtjIcons.Moon),t=()=>{e.value=!e.value};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{icon:n.value,dropdown:{size:"small"},mode:"icon",circle:"",background:"hover",type:"primary",onClick:t},null,8,["icon"]))}}),hl={class:"x-mask-toolbar__menu-item"},gl=Vue.defineComponent({__name:"Toolbar",props:{tabs:{default:()=>[]},actions:{},theme:{type:Boolean}},emits:["closeOtherTabs","closeAllTabs","closeTab","clickTab","actionClick","actionCommand"],setup(o,{emit:e}){const n=o,t=e,r=Vue.computed(()=>{const s=n.tabs.map((c,d)=>({divided:d===0,label:c.title,command:c}));return[{label:"关闭其他",command:"other"},{label:"关闭全部",command:"all"},...s]}),l=s=>{t("closeTab",s.command)},u=s=>{switch(s.command){case"all":t("closeAllTabs");break;case"other":t("closeOtherTabs");break;default:t("clickTab",s.command);break}},a=s=>{t("actionClick",s)},i=(s,c)=>{t("actionCommand",s,c)};return(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:"x-mask-toolbar",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(oe),{icon:Vue.unref(VtjIcons.MoreFilled),menus:r.value,dropdown:{size:"small"},type:"primary",mode:"icon",circle:"",background:"hover",onCommand:u},{item:Vue.withCtx(({item:d})=>[Vue.createElementVNode("span",hl,[Vue.createTextVNode(Vue.toDisplayString(d.label)+" ",1),["other","all"].includes(d.command)?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(Ve),{key:0,onClick:Vue.withModifiers(m=>l(d),["stop"]),icon:Vue.unref(VtjIcons.Close)},null,8,["onClick","icon"]))])]),_:1},8,["icon","menus"]),Vue.createVNode(Vue.unref(ElementPlus.ElDivider),{direction:"vertical"}),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(Re),{key:0,circle:"",mode:"icon",size:"default",background:"hover",type:"primary",items:s.actions,onClick:a,onCommand:i},null,8,["items"])):Vue.createCommentVNode("",!0),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:1,direction:"vertical"})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vl,{key:2})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:3,direction:"vertical"})):Vue.createCommentVNode("",!0),Vue.renderSlot(s.$slots,"default")]),_:3}))}}),vl=Vue.defineComponent({__name:"Avatar",props:{avatar:{}},setup(o){const e=o;return(n,t)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElPopover),{width:200,"popper-class":"x-mask-avatar__popper",disabled:!n.$slots.default},{reference:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElAvatar),{class:"x-mask-avatar",shape:"circle",icon:Vue.unref(VtjIcons.UserFilled),src:e.avatar,size:26},null,8,["icon","src"])]),default:Vue.withCtx(()=>[n.$slots.default?Vue.renderSlot(n.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["disabled"]))}}),yl={class:"x-mask__inner"},co=Vue.defineComponent({__name:"Content",props:{createView:{type:Function},exclude:{}},setup(o){const e=o;return(n,t)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:"x-mask__content",overflow:"auto",flex:!1,grow:"",padding:!1},{default:Vue.withCtx(()=>[Vue.createElementVNode("div",yl,[Vue.renderSlot(n.$slots,"default"),Vue.createVNode(Vue.unref(VueRouter.RouterView),null,{default:Vue.withCtx(({Component:r,route:l})=>[(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{exclude:e.exclude},[r?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.createView(r,l)),{key:l.fullPath})):Vue.createCommentVNode("",!0)],1032,["exclude"]))]),_:1})])]),_:3}))}});function wl(){const o=Vue.ref(!1),e=Vue.ref(""),n=Vue.ref(!1);return{collapsed:o,keyword:e,favorite:n}}function bl(o){const e=VtjUtils.uid();return Vue.computed(()=>{const n=o.home;return Object.assign({id:e,url:"/",name:"MaskHome",icon:VtjIcons.HomeFilled,closable:!1},typeof n=="string"?{url:n}:n||{})})}function fo(o,e){let n=[];return o.forEach(t=>{t=e?e(t):t,t.children?n=n.concat(fo(t.children,e)):n.push(t)}),n}function Cl(o,e){const n=VueRouter.useRouter(),t=Vue.shallowRef([]),r=Vue.shallowRef([]),l=Vue.computed(()=>fo(t.value,o.menuAdapter)),u=Vue.computed(()=>VtjUtils.arrayToMap(l.value,"id")),a=Vue.ref(null),i=f=>{const V=typeof f=="object"?f.id:f,g=u.value.get(V);if(!g){console.warn("找不到菜单",f);return}const{type:v="route",url:y,title:h,icon:C}=g;if(!y){a.value=g,e("select",g);return}if(v==="route"){VtjUtils.isUrl(y)||y.startsWith("//")?window.open(y):(a.value=g,n.push(y).catch(b=>b));return}if(v==="window"){window.open(y);return}v==="dialog"&&kt({resizable:!0,bodyPadding:!1,width:"80%",height:"80%",title:h,icon:C,src:y})},s=()=>N(this,null,function*(){var f,V;t.value=typeof o.menus=="function"?(yield o.menus())||[]:(f=o.menus)!=null?f:[],r.value=typeof o.favorites=="function"?(yield o.favorites())||[]:(V=o.favorites)!=null?V:[]}),c=f=>{r.value=[f,...r.value],o.addFavorite&&o.addFavorite(f)},d=f=>{r.value=r.value.filter(V=>V.id!==f.id),o.removeFavorite&&o.removeFavorite(f)},m=f=>!!r.value.find(V=>V===f||V.id===f.id),p=f=>{m(f)?d(f):c(f)};return Vue.watchEffect(s),{menus:t,favorites:r,flatMenus:l,active:a,select:i,toggleFavorite:p}}function _l(o,e,n,t,r){const l=VueRouter.useRoute(),u=VueRouter.useRouter(),a={},i=Vue.ref([]),s=Vue.ref(),{width:c}=VueUse.useElementSize(s),d=Vue.computed(()=>Math.floor(c.value/io)),m=Vue.computed(()=>i.value.slice(0,d.value).filter(z=>!z.dialog)),p=Vue.computed(()=>i.value.slice(d.value)),f=z=>n.value.find(F=>F.url===z),V=z=>l.fullPath===z.url,g=z=>r.value.id===z?r.value:i.value.find(F=>F.id===z),v=Vue.ref(""),y=Vue.computed(()=>g(v.value)),h=z=>{u.push(z.url).catch(F=>F)},C=z=>{v.value=z.id,l.fullPath!==z.url&&h(z)},b=()=>{h(r.value)},k=z=>{const F=i.value.find(j=>j.url===z.url||j.id===z.id);F?C(F):(i.value.unshift(z),C(z))},w=z=>N(this,null,function*(){var W;const{url:F=l.fullPath,icon:j,title:x}=z||{},S=a[F],B=VtjUtils.uid(),H=VtjUtils.upperFirstCamelCase(F);return P({id:B,name:H,url:F,icon:j,title:x||((W=f(l.path))==null?void 0:W.title)||"新建页签",closable:!0,menu:z},S?yield S():{})}),T=z=>N(this,null,function*(){if(yield ElementPlus.ElMessageBox.confirm("是否关闭页签","提示",{type:"warning"}).catch(()=>!1)){if(i.value=i.value.filter(j=>j.id!==z.id),v.value===z.id){const j=i.value[0];h(j||r.value)}return z}}),D=z=>{const F=i.value.findIndex(j=>j.id===z.id);if(F>=0){const j=i.value[F];i.value.splice(F,1,Object.assign(j,z))}},O=()=>N(this,null,function*(){if(!(yield ElementPlus.ElMessageBox.confirm("是否关闭全部页签","提示",{type:"warning"}).catch(()=>!1)))return;const F=i.value;return i.value=[],C(r.value),F}),$=()=>N(this,null,function*(){if(!(yield ElementPlus.ElMessageBox.confirm("是否关闭其他页签","提示",{type:"warning"}).catch(()=>!1)))return;const F=i.value.filter(j=>j.id!==v.value);return i.value=i.value.filter(j=>j.id===v.value),F}),G=z=>{const F=i.value.filter(j=>j.id!==z.id);i.value=[z,...F],C(z)},L=()=>N(this,null,function*(){yield Vue.nextTick();const z=r.value.url===l.path,F=f(l.fullPath);if(z)v.value=r.value.id;else{const j=yield w(F);k(j)}yield Vue.nextTick(),t.value=F||null});return Vue.watch(n,L),Vue.watch(l,L,{immediate:!0}),Vue.provide(sn,a),{tabRef:s,tabs:i,showTabs:m,currentTab:y,changeTab:h,removeTab:T,updateTab:D,addTab:k,home:r,tabValue:v,isCurrentTab:V,activeHome:b,activeTab:C,dropdownTabs:p,removeAllTabs:O,removeOtherTabs:$,moveToShow:G}}function kl(o){const e=new Map,n=Vue.ref([]),t=Vue.reactive({}),r=Vue.getCurrentInstance(),l={},{updateTab:u,isCurrentTab:a,activeHome:i,tabs:s}=o,c=(h,C)=>{const b=C.fullPath;if(e.has(b))return e.get(b);{const k=VtjUtils.upperFirstCamelCase(b),w={name:k,setup(){const T=Vue.computed(()=>t[b]||document.body),D=Vue.computed(()=>!t[b]),O=Vue.computed(()=>!n.value.includes(k));return Vue.provide(VueRouter.routeLocationKey,Vue.toRaw(P({},C))),()=>O.value?Vue.h(Vue.Teleport,{to:T.value,disabled:D.value},[Vue.h(h)]):null}};return e.set(b,w),w}},d=h=>{h.dialog=void 0,delete t[h.url];const C=l[h.id];C&&(C.destroy(),delete l[h.id],u(h))},m=(h=[])=>{h.forEach(C=>{d(C)})},p=h=>N(this,null,function*(){h.dialog=K(P({},h.dialog),{onMinimized:()=>{d(h)},onClose:()=>N(this,null,function*(){d(h),s.value=s.value.filter(b=>b.id!==h.id)})}),u(h);const C=kt(K(P({title:h.title,icon:h.icon,modal:!1,resizable:!0,draggable:!0,maximizable:!0,minimizable:!0},h.dialog),{onOpen(b){var k,w;t[h.url]=(w=(k=b.refs.panelRef)==null?void 0:k.bodyRef)==null?void 0:w.$el}}),r==null?void 0:r.appContext);return yield Vue.nextTick(),a(h)&&i(),l[h.id]=C,C}),f=h=>N(this,null,function*(){n.value=[h.name],yield Vue.nextTick(),n.value=[]}),V=h=>N(this,null,function*(){n.value=h.map(C=>C.name),yield Vue.nextTick(),n.value=[]}),g=h=>(h.preventDefault(),!1),v=h=>{if(h.dataTransfer){const C=h.dataTransfer.getData("tab"),b=s.value.find(k=>k.id===C);if(b){const{clientX:k,clientY:w}=h;b.dialog={left:k,top:w},p(b)}}},y=h=>!!t[h];return VueUse.useEventListener(document,"dragover",g),VueUse.useEventListener(document,"drop",v),{createView:c,openDialog:p,refresh:f,exclude:n,cleanCache:V,hasDialog:y,closeDialog:d,closeDialogs:m}}const po=Vue.defineComponent({name:"XMask",__name:"Mask",props:so,emits:["select","actionClick","actionCommand"],setup(o,{emit:e}){const n=o,t=e,r=bl(n),{collapsed:l,keyword:u,favorite:a}=wl(),{menus:i,favorites:s,flatMenus:c,active:d,select:m,toggleFavorite:p}=Cl(n,t),{tabRef:f,showTabs:V,currentTab:g,changeTab:v,removeTab:y,tabs:h,updateTab:C,isCurrentTab:b,activeHome:k,removeAllTabs:w,removeOtherTabs:T,dropdownTabs:D,moveToShow:O}=_l(n,t,c,d,r),{createView:$,openDialog:G,refresh:L,exclude:z,cleanCache:F,closeDialogs:j}=kl({tabs:h,updateTab:C,isCurrentTab:b,activeHome:k}),x=Y=>N(this,null,function*(){(yield y(Y))&&(yield F([Y]))}),S=()=>N(this,null,function*(){const Y=yield w();Y&&(j(Y),yield F(Y))}),B=()=>N(this,null,function*(){const Y=yield T();Y&&(j(Y),yield F(Y))}),H=Y=>{t("actionClick",Y)},W=(Y,ye)=>{t("actionCommand",Y,ye)};return Vue.provide(cn,{tabs:h,flatMenus:c,favorites:s,updateTab:C,active:d,currentTab:g}),(Y,ye)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-mask",{"is-disabled":n.disabled}]),fit:""},{default:Vue.withCtx(()=>[n.disabled?(Vue.openBlock(),Vue.createBlock(co,{key:1,createView:Vue.unref($),exclude:Vue.unref(z)},{default:Vue.withCtx(()=>[Y.$slots.default?Vue.renderSlot(Y.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude"])):(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:0},[Vue.createVNode(ol,{collapsed:Vue.unref(l)},{brand:Vue.withCtx(()=>[Vue.createVNode(ul,{logo:n.logo,title:n.title,url:Vue.unref(r).url,collapsed:Vue.unref(l)},null,8,["logo","title","url","collapsed"])]),default:Vue.withCtx(()=>[Vue.createVNode(rl,{collasped:Vue.unref(l),"onUpdate:collasped":ye[0]||(ye[0]=Me=>Vue.isRef(l)?l.value=Me:null),favorite:Vue.unref(a),"onUpdate:favorite":ye[1]||(ye[1]=Me=>Vue.isRef(a)?a.value=Me:null),keyword:Vue.unref(u),"onUpdate:keyword":ye[2]||(ye[2]=Me=>Vue.isRef(u)?u.value=Me:null)},null,8,["collasped","favorite","keyword"]),Vue.createVNode(il,{collapse:Vue.unref(l),keyword:Vue.unref(u),favorite:Vue.unref(a),favorites:Vue.unref(s),flatMenus:Vue.unref(c),menus:Vue.unref(i),active:Vue.unref(d),onSelect:Vue.unref(m)},null,8,["collapse","keyword","favorite","favorites","flatMenus","menus","active","onSelect"])]),_:1},8,["collapsed"]),Vue.createVNode(Vue.unref(R),{class:"x-mask__main",grow:"",shrink:"",flex:"",direction:"column",overflow:"hidden"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(R),{class:"x-mask-topbar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>{var Me;return[Vue.createVNode(ml,{ref_key:"tabRef",ref:f,favorites:Vue.unref(s),tabs:Vue.unref(V),home:Vue.unref(r),value:(Me=Vue.unref(g))==null?void 0:Me.id,onClick:Vue.unref(v),onToggleFavorite:Vue.unref(p),onRemove:x,onDialog:Vue.unref(G),onRefresh:Vue.unref(L)},null,8,["favorites","tabs","home","value","onClick","onToggleFavorite","onDialog","onRefresh"]),Vue.createVNode(gl,{tabs:Vue.unref(D),actions:n.actions,theme:n.theme,onCloseOtherTabs:B,onCloseAllTabs:S,onCloseTab:x,onClickTab:Vue.unref(O),onActionClick:H,onActionCommand:W},{default:Vue.withCtx(()=>[Vue.createVNode(vl,{avatar:n.avatar},Vue.createSlots({_:2},[Y.$slots.user?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(Y.$slots,"user")]),key:"0"}:void 0]),1032,["avatar"])]),_:3},8,["tabs","actions","theme","onClickTab"])]}),_:3}),Vue.createVNode(co,{createView:Vue.unref($),exclude:Vue.unref(z)},{default:Vue.withCtx(()=>[Y.$slots.default?Vue.renderSlot(Y.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude"])]),_:3})],64))]),_:3},8,["class"]))}});function El(o={}){const e=VueRouter.useRoute(),n=Vue.inject(sn,null),t=Vue.inject(cn,null);if(n){const l=typeof o=="function"?o:()=>N(this,null,function*(){return o});n[e.fullPath]=l}return{tab:Vue.computed(()=>t?t.tabs.value.find(l=>l.url===e.fullPath):null),mask:t}}const dn=Vue.defineComponent({__name:"SelectEditor",props:{options:{default:()=>[]}},emits:["change"],setup(o,{emit:e}){const n=o,t=e,r=l=>{const u=n.options.filter(a=>Array.isArray(l)?l.includes(a.value):l===a.value);t("change",l,u)};return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSelect),Vue.mergeProps(l.$attrs,{onChange:r}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.options,(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElOption),Vue.mergeProps({key:`item_${i}_${a.value}`,ref_for:!0},a),Vue.createSlots({_:2},[l.$slots.option?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(l.$slots,"option",{option:a})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Sl=Vue.defineComponent({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const e=o,n=Vue.computed(()=>Vue.markRaw(e.button?ElementPlus.ElCheckboxButton:ElementPlus.ElCheckbox));return(t,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElCheckboxGroup),Vue.normalizeProps(Vue.guardReactiveProps(t.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`,ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),xl=Vue.defineComponent({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const e=o,n=Vue.computed(()=>Vue.markRaw(e.button?ElementPlus.ElRadioButton:ElementPlus.ElRadio));return(t,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElRadioGroup),Vue.normalizeProps(Vue.guardReactiveProps(t.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`,ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Oe={filterResetMethod(o){const{options:e,column:n}=o;if(n.filterResetMethod){n.filterResetMethod(o);return}e.forEach(t=>{t.value=""})},filterRecoverMethod(o){const{option:e,column:n}=o;if(n.filterRecoverMethod){n.filterRecoverMethod(o);return}e.value=""},filterMethod(o){const{option:e,row:n,column:t}=o;if(t.filterMethod)return t.filterMethod(o);const{value:r}=e,l=n[t.field];return VtjUtils.isString(l)?l.indexOf(String(r))>-1:l===r}},Bl=Vue.defineComponent({name:"InputEdit",__name:"InputEdit",props:{params:{},renderOpts:{}},setup(o){const e=o,{renderProps:n,renderEvents:t,cellValue:r,onChange:l}=Xe(e.renderOpts,e.params);return(u,a)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",clearable:"",modelValue:Vue.unref(r),"onUpdate:modelValue":a[0]||(a[0]=i=>Vue.isRef(r)?r.value=i:null),onInput:Vue.unref(l)},Vue.unref(n),Vue.toHandlers(Vue.unref(t))),null,16,["modelValue","onInput"]))}}),Pl={class:"x-grid__filter"},fn=Vue.defineComponent({name:"InputFilter",__name:"InputFilter",props:{params:{},renderOpts:{}},setup(o){const e=o,{renderProps:n,renderEvents:t,state:r,load:l,onChange:u,onKeyup:a}=Ut(e.renderOpts,e.params);return l(),(i,s)=>(Vue.openBlock(),Vue.createElementBlock("div",Pl,[Vue.createVNode(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",placeholder:"输入关键字回车筛选",clearable:"",modelValue:Vue.unref(r).option.value,"onUpdate:modelValue":s[0]||(s[0]=c=>Vue.unref(r).option.value=c),onInput:Vue.unref(u),onKeyup:Vue.withKeys(Vue.withModifiers(Vue.unref(a),["stop"]),["enter"])},Vue.unref(n),Vue.toHandlers(Vue.unref(t))),null,16,["modelValue","onInput","onKeyup"])]))}}),We={autofocus:".el-input__inner",renderDefault(o,e){var r;const{row:n,column:t}=e;return[Vue.createTextVNode((r=n[t.field])!=null?r:"")]},renderEdit(o,e){return[Vue.h(Bl,{params:e,renderOpts:o})]},renderCell(o,e){var r;const{row:n,column:t}=e;return[Vue.createTextVNode((r=n[t.field])!=null?r:"")]}},Nl=K(P(P({cellClassName:"x-grid__edit"},We),Oe),{renderFilter(o,e){return[Vue.h(fn,{params:e,renderOpts:o})]}});/**!
|
7
|
+
*/const q="0.8.155",ee={default:14,small:12,large:18},Ct={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number}};function ce(o){return typeof o=="string"?o:`${o}px`}function Ae(o=0,e){if(typeof o=="number")return o;if(/(%|vh|vw)$/i.test(o)){const t=Number.parseInt(o);return Math.floor(e*t/100)}return Number.parseInt(o)}function at(o,e={}){const n=P({},e);return typeof o=="boolean"?n:Object.assign(n,o||{})}const $e="__VTJ_UI_INSTALLED__",me=Symbol("ADAPTER_KEY");function Be(){const o=Vue.getCurrentInstance(),e=o==null?void 0:o.appContext.config.globalProperties.$adapter;return e||Vue.inject(me,{})}const Mr={getCustom:o=>N(this,null,function*(){return VtjUtils.storage.get(o,{type:"local"})}),saveCustom:o=>N(this,null,function*(){VtjUtils.storage.save(o.id,o,{type:"local"})})},Ar={install(o,e={}){const n=Object.assign(Mr,e),{components:t=[],fieldEditors:r={}}=n;Yo(r);for(const l of t)l.name&&o.component(l.name,l);[ElementPlus.ElMessage,ElementPlus.ElMessageBox,ElementPlus.ElNotification].forEach(l=>{o.use(l)}),o.config.globalProperties.$adapter=n,o.provide(me,n)}},qn=(o=[])=>({install:(n,t={})=>{n[$e]||(n[$e]=!0,o.forEach(r=>{r.name&&n.component(r.name,r)}),t.adapter&&n.provide(me,t.adapter))}}),$r=["src"],Ve=Vue.defineComponent({name:"XIcon",__name:"Icon",props:Ct,setup(o){const e=o,n=Vue.useAttrs(),t=Vue.getCurrentInstance(),r=Vue.computed(()=>{if(!e.icon)return null;const i=t==null?void 0:t.appContext.app;return typeof e.icon=="object"?Vue.markRaw(e.icon):(i==null?void 0:i.component(e.icon))||e.icon}),l=Vue.computed(()=>{const i={"is-pointer":!!n.onClick};return!r.value&&e.icon&&(i[e.icon]=!0),i}),u=Vue.computed(()=>({"background-color":e.background,"border-radius":e.radius?ce(e.radius):void 0,padding:e.padding?ce(e.padding):void 0})),a=Vue.computed(()=>{var i;return typeof e.size=="number"?e.size:(i=ee[e.size])!=null?i:void 0});return(i,s)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElIcon),{class:Vue.normalizeClass(["x-icon",l.value]),color:e.color,size:a.value,style:Vue.normalizeStyle(u.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(i.$slots,"default",{},()=>[r.value?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(r.value),{key:0})):Vue.createCommentVNode("",!0),e.src?(Vue.openBlock(),Vue.createElementBlock("img",{key:1,src:e.src},null,8,$r)):Vue.createCommentVNode("",!0)])]),_:3},8,["class","color","size","style"]))}}),Fr={class:"x-menu__wrapper"},Rr={key:1,class:"x-menu__title"},Or={key:0,class:"x-menu__title"},Jn=Vue.defineComponent({inheritAttrs:!1,name:"XMenuItem",__name:"MenuItem",props:{item:{},subMenu:{},defaultIcon:{}},setup(o){const e=o,n=Vue.getCurrentInstance(),t=u=>{if(u){if(typeof u=="string"){const a=n==null?void 0:n.appContext.app;return(a==null?void 0:a.component(u))||e.defaultIcon||u}return u}},r=u=>typeof u=="object"?u:{value:u},l=(u=[])=>u.filter(a=>!a.hidden);return(u,a)=>e.item.children?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSubMenu),Vue.mergeProps({key:0,disabled:e.item.disabled},e.subMenu,{index:String(e.item.id)}),{title:Vue.withCtx(()=>[Vue.createElementVNode("div",Fr,[e.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(Ve),{key:0,icon:t(e.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0),e.item.title?(Vue.openBlock(),Vue.createElementBlock("span",Rr,Vue.toDisplayString(e.item.title),1)):Vue.createCommentVNode("",!0),e.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:2,class:"x-menu__badge"},r(e.item.badge)),{default:Vue.withCtx(()=>a[0]||(a[0]=[Vue.createElementVNode("i",null,null,-1)])),_:1},16)):Vue.createCommentVNode("",!0)])]),default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(l(e.item.children),i=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Jn),{key:i.id,item:i,subMenu:e.subMenu,defaultIcon:e.defaultIcon},null,8,["item","subMenu","defaultIcon"]))),128))]),_:1},16,["disabled","index"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenuItem),{key:1,index:String(e.item.id),disabled:e.item.disabled},{title:Vue.withCtx(()=>[e.item.title?(Vue.openBlock(),Vue.createElementBlock("span",Or,Vue.toDisplayString(e.item.title),1)):Vue.createCommentVNode("",!0),e.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:1,class:"x-menu__badge"},r(e.item.badge)),{default:Vue.withCtx(()=>a[1]||(a[1]=[Vue.createElementVNode("i",null,null,-1)])),_:1},16)):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[e.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(Ve),{key:0,icon:t(e.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0)]),_:1},8,["index","disabled"]))}}),Pe=Vue.defineComponent({inheritAttrs:!1,name:"XMenu",__name:"Menu",props:{data:{default:()=>[]},subMenu:{},defaultIcon:{}},emits:["select"],setup(o,{emit:e}){const n=o,t=e,r=Vue.computed(()=>n.data.filter(a=>!a.hidden)),l=(a,i)=>{const s=(c,d=[])=>{var m;for(const p of d){if(p.id.toString()===c.toString())return p;if((m=p.children)!=null&&m.length){const f=s(c,p.children);if(f)return f}}};return s(i,a)},u=a=>{const i=l(r.value,a);i&&t("select",i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenu),Vue.mergeProps({class:"x-menu"},a.$attrs,{onSelect:u}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Jn),{item:K(P({},s),{icon:s.icon}),defaultIcon:n.defaultIcon,subMenu:n.subMenu},null,8,["item","defaultIcon","subMenu"]))),256))]),_:1},16))}}),nn={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},draggable:{type:Boolean}};function jr(o){return Vue.computed(()=>{const e=o.tooltip;if(e)return typeof e=="string"?{content:e}:e})}function Ur(o){return Vue.computed(()=>{const e=o.badge;if(e)return typeof e=="object"?e:{value:e}})}function Lr(o){return Vue.computed(()=>{const{dropdown:e,menus:n}=o;if(n&&n.length>0)return Object.assign({popperClass:"x-action__menus",size:o.size},e||{})})}function Qn(o){const e=Vue.getCurrentInstance();return Vue.computed(()=>{const n=Vue.unref(o);if(n)if(typeof n=="string"||n.setup||n.render||Vue.isVNode(n)){const t=e==null?void 0:e.appContext.app;return{icon:typeof n=="string"&&(t==null?void 0:t.component(n))||n}}else return n;return null})}function Fe(o){const e=Qn(o);return e.value?Vue.markRaw(Vue.defineComponent({render:()=>Vue.h(Ve,e.value)})):void 0}function _t(o,e){return Vue.computed(()=>{const n=Vue.unref(o);return typeof n=="function"?n(e):!!n})}function Zn(o,e,n){const t=Vue.shallowRef(e),r=Vue.ref(!1),l=a=>N(this,null,function*(){const i=Vue.unref(o);return i?typeof i=="function"?yield i(a):i:e}),u=a=>N(this,null,function*(){return r.value=!0,yield l(a).then(i=>(t.value=i||e,r.value=!1,Vue.unref(t)))});return Vue.watch(()=>o,()=>{u(n)},{immediate:!0}),n&&Vue.watch(n,()=>{u(n)}),{data:t,loading:r,loader:u}}function Hr(o=1e3){const e=Vue.ref(0);let n;const t=()=>{n=VtjUtils.rAF(()=>{++e.value,e.value<o&&t()})};return Vue.onMounted(t),Vue.onUnmounted(()=>{n&&VtjUtils.cAF(n)}),r=>e.value>=r}function eo(o=[]){const e=Vue.useSlots();return Object.keys(e).filter(n=>!o.includes(n))}const Xr={key:0},Yr=Vue.defineComponent({__name:"Trigger",props:nn,emits:["click"],setup(o,{emit:e}){const n=o,t=e,r=Fe(Vue.toRef(n,"icon")),l=_t(Vue.toRef(n,"disabled")),u=Vue.computed(()=>({[`is-${n.mode}`]:!!n.mode,[`is-${n.type}`]:!!n.type,[`is-${n.size}`]:!!n.size&&n.size!=="default",[`is-background-${n.background}`]:n.mode==="icon"&&!!n.background,"is-disabled":!!n.disabled,"is-circle":!!n.circle})),a=i=>{if(i.preventDefault(),!l.value)return t("click"),!1};return(i,s)=>n.mode==="button"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),Vue.mergeProps({key:0,icon:Vue.unref(r),type:n.type,size:n.size,disabled:Vue.unref(l)},n.button,{onClick:a}),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(i.label),1)]),_:1},16,["icon","type","size","disabled"])):(Vue.openBlock(),Vue.createElementBlock("div",{key:1,class:Vue.normalizeClass(["x-action__inner",u.value]),onClick:a},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(r)))),i.label?(Vue.openBlock(),Vue.createElementBlock("span",Xr,Vue.toDisplayString(i.label),1)):Vue.createCommentVNode("",!0)],2))}}),Kr=["draggable"],oe=Vue.defineComponent({name:"XAction",__name:"Action",props:nn,emits:["click","command","dragstart","dragend"],setup(o,{emit:e}){const n=o,t=Vue.useSlots(),r=e,l=jr(n),u=Ur(n),a=Lr(n),i=_t(Vue.toRef(n,"disabled")),s=Vue.computed(()=>!!n.draggable&&!i.value),c=Vue.computed(()=>({[`x-action--${n.mode}`]:!!n.mode})),d=()=>{i.value||r("click",Vue.toRaw(n))},m=h=>{var b;if(i.value)return;const C=(b=n.menus)==null?void 0:b.find(k=>k.command===h);C&&r("command",Vue.toRaw(C))},p=h=>{s&&r("dragstart",Vue.toRaw(n),h)},f=h=>{s&&r("dragend",Vue.toRaw(n),h)},V=h=>Vue.h(ElementPlus.ElBadge,u.value,()=>[].concat(h)),g=h=>Vue.h(ElementPlus.ElDropdown,K(P({},a.value),{disabled:i.value,onCommand:m}),{default:()=>[h],dropdown:()=>[Vue.h(ElementPlus.ElDropdownMenu,()=>(n.menus||[]).map((C,b)=>Vue.h(ElementPlus.ElDropdownItem,C,()=>t.item?t.item({item:C,index:b}):C.label)))]}),v=h=>Vue.h(ElementPlus.ElTooltip,K(P({},l.value),{disabled:i.value}),()=>[h]),y=Vue.computed(()=>{var b;let h=Vue.h(Vue.markRaw(Yr),K(P({},n),{onClick:d}));const C=(b=t.default)==null?void 0:b.call(t);return C&&C.length&&(h=C[0]),u.value&&(h=V(h)),a.value&&(h=g(h)),l.value&&(h=v(h)),h});return(h,C)=>(Vue.openBlock(),Vue.createElementBlock("div",{class:Vue.normalizeClass(["x-action",c.value]),draggable:s.value,onDragstart:p,onDragend:f},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(y.value)))],42,Kr))}}),to={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},Re=Vue.defineComponent({name:"XActionBar",__name:"ActionBar",props:to,emits:["click","command"],setup(o,{emit:e}){const n=o,t=e,r=Vue.computed(()=>(n.items||[]).map(a=>a==="|"?a:K(P({},a),{badge:a.badge?P(P({},n.badge),typeof a.badge=="object"?a.badge||{}:{value:a.badge}):void 0,tooltip:a.tooltip?P(P({},n.tooltip),typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}):void 0}))),l=a=>{t("click",a)},u=(a,i)=>{t("command",a,i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:"x-action-bar",align:"center"},{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[s==="|"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),Vue.mergeProps({key:1,mode:n.mode,size:n.size,type:n.type,circle:n.circle,background:n.background,button:n.button,dropdown:n.dropdown,disabled:Vue.unref(_t)(n.disabled,s).value,ref_for:!0},s,{onClick:l,onCommand:c=>u(s,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),no={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},R=Vue.defineComponent({name:"XContainer",__name:"Container",props:no,setup(o,{expose:e}){const n=o,t=Vue.useAttrs(),r=Vue.getCurrentInstance(),l=Vue.ref(),u=Vue.computed(()=>{var c;return(c=l.value)==null?void 0:c.$el}),a=Vue.computed(()=>{const c=r==null?void 0:r.parent;if(!c)return!1;const d=c.proxy;return d.$options.name==="XContainer"||!!d.flex}),i=Vue.computed(()=>{var c;return{"is-fit":n.fit,"is-flex":n.flex&&!n.inline,"is-inline-flex":n.flex&&n.inline,[`is-direction-${n.direction}`]:n.flex&&n.direction!=="row",[`is-wrap-${n.wrap}`]:n.flex&&n.wrap!=="nowrap",[`is-justify-${n.justify}`]:n.flex&&n.justify!=="flex-start",[`is-align-${n.align}`]:n.flex&&n.align!=="flex-start",[`is-align-content-${n.alignContent}`]:n.flex&&n.alignContent!=="stretch","is-grow":(c=n.grow)!=null?c:a.value,"is-shrink":n.shrink,[`is-align-self-${n.alignSelf}`]:a.value&&n.alignSelf!=="auto",[`is-overflow-${n.overflow}`]:!!n.overflow,"is-padding":!!n.padding,"is-pointer":n.autoPointer&&!!t.onClick,"is-gap":!!n.gap}}),s=Vue.computed(()=>{const{width:c,height:d,fit:m}=n;return m?null:{width:c?ce(c):void 0,height:d?ce(d):void 0}});return e({$vtjEl:u}),(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.tag),{ref_key:"elRef",ref:l,class:Vue.normalizeClass(["x-container",i.value]),style:Vue.normalizeStyle(s.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}}),oo={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},Gr={class:"x-header__content"},Wr={key:0,class:"x-header__actions"},on=Vue.defineComponent({name:"XHeader",inheritAttrs:!1,__name:"Header",props:oo,setup(o){const e=o,n=Fe(Vue.toRef(e,"icon")),t=Vue.useAttrs(),r=Vue.computed(()=>({[`is-size-${e.size}`]:!!e.size&&e.size!=="default","is-border":e.border,"is-pointer":!!t.onClick}));return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-header",r.value]),justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(R),{align:"center",class:Vue.normalizeClass(["x-header__wrapper",r.value]),grow:"",onClick:Vue.unref(t).onClick},{default:Vue.withCtx(()=>[Vue.unref(n)?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(n)),{key:0,class:"x-header__icon",onClick:Vue.unref(t).onClickIcon||Vue.unref(t).onClick},null,8,["onClick"])):Vue.createCommentVNode("",!0),Vue.createElementVNode("span",Gr,[Vue.renderSlot(l.$slots,"default",{},()=>[Vue.createTextVNode(Vue.toDisplayString(e.content),1)])]),e.more?(Vue.openBlock(),Vue.createBlock(Vue.unref(Ve),{key:1,class:"x-header__more",icon:Vue.unref(VtjIcons.ArrowRight)},null,8,["icon"])):Vue.createCommentVNode("",!0),e.subtitle||l.$slots.subtitle?(Vue.openBlock(),Vue.createElementBlock("span",{key:2,class:"x-header__subtitle",onClick:u[0]||(u[0]=(...a)=>Vue.unref(t).onClick&&Vue.unref(t).onClick(...a))},[Vue.renderSlot(l.$slots,"subtitle",{},()=>[Vue.createTextVNode(Vue.toDisplayString(e.subtitle),1)])])):Vue.createCommentVNode("",!0)]),_:3},8,["class","onClick"]),l.$slots.actions?(Vue.openBlock(),Vue.createElementBlock("div",Wr,[Vue.renderSlot(l.$slots,"actions")])):Vue.createCommentVNode("",!0)]),_:3},8,["class"]))}}),ro={fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},Ye=Vue.defineComponent({name:"XPanel",__name:"Panel",props:ro,setup(o,{expose:e}){const n=o,t=Vue.ref(),r=Vue.computed(()=>({"x-panel--card":!!n.card,"x-panel--default":!n.card,[`is-${n.size}`]:!!n.size&&n.size!=="default","is-border":!!n.border,"is-radius":!!n.radius,[`is-shadow-${n.shadow}`]:!!n.shadow&&n.shadow!=="none"})),l=Vue.computed(()=>n.header===null?null:typeof n.header=="string"?{content:n.header,size:n.size}:K(P({},n.header),{size:n.size})),u=Vue.computed(()=>n.fit||n.height?"auto":void 0);return e({bodyRef:t}),(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-panel",r.value]),direction:"column",fit:n.fit,width:n.width,height:n.height},{default:Vue.withCtx(()=>[l.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{key:0,flex:!1,class:"x-panel__header"},{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"header",{},()=>[Vue.createVNode(Vue.unref(on),Vue.normalizeProps(Vue.guardReactiveProps(l.value)),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"title")]),actions:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"actions")]),_:3},16)])]),_:3})):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(R),Vue.mergeProps({ref_key:"bodyRef",ref:t,flex:!1,overflow:u.value,grow:"",padding:"",class:"x-panel__body"},n.body),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"default")]),_:3},16,["overflow"]),a.$slots.footer?(Vue.openBlock(),Vue.createBlock(Vue.unref(R),Vue.mergeProps({key:1,flex:!1,padding:"",class:"x-panel__footer"},n.footer),{default:Vue.withCtx(()=>[Vue.renderSlot(a.$slots,"footer")]),_:3},16)):Vue.createCommentVNode("",!0)]),_:3},8,["class","fit","width","height"]))}}),lo="user-select-none";class rn{constructor(e,n={}){xe(this,"scope");xe(this,"dragging",!1);this.el=e,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}getHandle(){const{selector:e,handle:n}=this.options;return e?this.el.querySelector(e):n}getTarget(){const{target:e="body"}=this.options;return typeof e=="string"?document.querySelector(e):Vue.unref(e)||document.body}init(){const{el:e,options:n}=this,{disabled:t,delay:r=150,onStart:l,onEnd:u}=n;if(t)return;let a=null;const i=this.getHandle(),s=this.getTarget();let c=e.getBoundingClientRect(),d=null;const{x:m,y:p}=VueUse.useDraggable(e,K(P({initialValue:{x:c.x,y:c.y}},n),{handle:i,onStart:(f,V)=>{document.body.classList.add(lo),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=e.getBoundingClientRect(),d=s==null?void 0:s.getBoundingClientRect(),l&&l(f,V)},r)},onEnd:(f,V)=>{if(clearTimeout(a),document.body.classList.remove(lo),this.dragging&&d){this.dragging=!1;const{x:g,y:v}=f,y=this.getPosition(d,c,g,v);u&&u(y,V),d=null}}}));Vue.watch([m,p],()=>{if(this.dragging&&d){const f=this.getPosition(d,c,m.value,p.value);e.style.left=`${f.x}px`,e.style.top=`${f.y}px`}})}getPosition(e,n,t,r){const{edge:l=50}=this.options,u=-n.width+e.x+l,a=e.width+e.x-l,i=e.y,s=e.height+e.y-l,c=Math.min(a,Math.max(t,u)),d=Math.min(s,Math.max(r,i));return{x:c-e.x,y:d-e.y}}destory(){this.scope.stop()}}const ao={mounted(o,e){const n=e.value||{},t=new rn(o,n);o.__draggable__=t},updated(o,e){const n=e.value||{};let t=o.__draggable__;t&&!VtjUtils.isEqual(t.options,n)&&(t.destory(),o.__draggable__=new rn(o,n))},unmounted(o){const e=o.__draggable__;e&&(e.destory(),o.__draggable__=null)}},ln="user-select-none";class an{constructor(e,n={}){xe(this,"scope");xe(this,"resizing",Vue.ref(!1));xe(this,"direction",Vue.ref(""));xe(this,"MIE",null);xe(this,"cleanMousedown");xe(this,"cleanMouseup");this.el=e,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}init(){const{el:e,options:n}=this,{disabled:t,onStart:r,onEnd:l}=n;if(t)return;this.MIE=VueUse.useMouseInElement(e),this.cleanMousedown=VueUse.useEventListener(document,"mousedown",()=>{var i;(i=this.direction)!=null&&i.value&&this.MIE&&(this.resizing.value=!0,e.classList.add("is-resizing",`is-${this.direction.value}-resizing`),r&&r(this.direction.value,this.MIE))}),this.cleanMouseup=VueUse.useEventListener(document,"mouseup",()=>{var i;this.resizing.value&&((i=this.direction)!=null&&i.value)&&this.MIE&&(e.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),l&&l(this.direction.value,this.MIE)),this.resizing.value=!1}),Vue.watch(this.direction,i=>{const s=document.body;s.style.cursor=i?`${i}-resize`:"",i?s.classList.add(ln):s.classList.remove(ln)});const{x:u,y:a}=this.MIE;Vue.watch([u,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:e,direction:n,resizing:t,options:r,el:l}=this,u=(n==null?void 0:n.value)||"";if(!e||!t.value||!u)return;const{x:a,y:i,elementX:s,elementY:c,elementHeight:d,elementWidth:m}=e,{onResizing:p}=r,{minWidth:f=0,minHeight:V=0,maxWidth:g=99999,maxHeight:v=99999}=r;if(u.includes("e")){const y=Math.min(Math.max(s.value,f),g);l.style.width=`${y}px`}if(u.includes("s")){const y=Math.min(Math.max(c.value,V),v);l.style.height=`${y}px`}if(u.includes("w")){const y=Math.min(Math.max(m.value-s.value,f),g);l.style.width=`${y}px`,l.style.left=`${a.value}px`}if(u.includes("n")){const y=Math.min(Math.max(d.value-c.value,V),v);this.el.style.height=`${y}px`,this.el.style.top=`${i.value}px`}p&&p(u,e)}getDirection(){if(!this.MIE)return"";const{elementX:e,elementY:n,elementHeight:t,elementWidth:r,isOutside:l}=this.MIE;if(l.value)return"";const{dirs:u=["n","s","w","e"],edge:a=5}=this.options;let i="";return u.includes("n")&&n.value<=a?i+="n":u.includes("s")&&n.value>t.value-a&&(i+="s"),u.includes("w")&&e.value<=a?i+="w":u.includes("e")&&e.value>r.value-a&&(i+="e"),i}destory(){var n;const e=document.body;e.style.cursor="",e.classList.remove(ln),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),(n=this.MIE)==null||n.stop(),this.scope.stop()}}const un={mounted(o,e){const n=e.value||{},t=new an(o,n);o.__resizable__=t},updated(o,e){const n=e.value||{};let t=o.__resizable__;t&&!VtjUtils.isEqual(t.options,n)&&(t.destory(),o.__resizable__=new an(o,n))},unmounted(o){const e=o.__resizable__;e&&(e.destory(),o.__resizable__=null)}},uo={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean}};let Ke=1e3;function qr(o,e){const{width:n,height:t}=VueUse.useElementSize(e),r=Vue.reactive({mode:o.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:++Ke,dragging:!1,resizing:!1});return Vue.watch([n,t],([l,u])=>{r.wrapperWidth=l,r.wrapperHeight=u,r.width=Ae(o.width,l),r.height=Ae(o.height,u),r.left=o.left?Ae(o.left,l)-r.width/2:Math.max(Math.floor((l-r.width)/2),0),r.top=o.top?Ae(o.top,u):Math.max(Math.floor((u-r.height)/2),0)}),Vue.watch(r,l=>{Ke=Math.max(l.zIndex,Ke)}),{state:r,normal:Vue.computed(()=>r.mode==="normal"),maximized:Vue.computed(()=>r.mode==="maximized"),minimized:Vue.computed(()=>r.mode==="minimized")}}function Jr(o,e){const n=Vue.computed(()=>{const{width:u,height:a,top:i,left:s,zIndex:c}=e;return{width:`${u}px`,height:`${a}px`,top:`${i}px`,left:`${s}px`,zIndex:c}}),t=Vue.computed(()=>({[`is-${e.mode}`]:!!e.mode,"is-draggable":!!o.draggable,"is-resizable":!!o.resizable,"is-primary":!!o.primary})),r=Vue.computed(()=>({[`is-${e.mode}`]:!!e.mode,"is-dragging":e.dragging,"is-resizing":e.resizing})),l=Vue.computed(()=>({zIndex:e.zIndex}));return{styles:n,classes:t,wrapperClass:r,modalStyle:l}}function Qr(o,e,n){const t=c=>{e.mode=c,["maximized","minimized","normal"].includes(c)&&n(c),n("modeChange",c)},r=()=>N(this,null,function*(){(!o.beforeClose||(yield o.beforeClose()))&&(n("update:modelValue",!1),n("close"),n("destroy"))});return{close:r,changeMode:t,show:()=>t("normal"),hide:()=>t("minimized"),active:c=>{const d=c.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(d.toUpperCase())||(e.zIndex=Math.max(e.zIndex,++Ke))},submit:()=>n("submit"),cancel:()=>{n("cancel"),r()}}}function Zr(o,e,n,t){return Vue.computed(()=>{var l;const r=typeof o.draggable=="boolean"?!o.draggable:!!((l=o.draggable)!=null&&l.disabled);return K(P({},VtjUtils.isObject(o.draggable)?o.draggable:{}),{disabled:r,target:t,selector:".x-panel__header",onStart(u){e.dragging=!0,e.zIndex=Math.max(e.zIndex,++Ke),n("dragStart",u)},onMove(u){n("dragging",u)},onEnd(u){if(e.mode==="maximized")return;const{x:a,y:i}=u;e.left=a,e.top=i,e.dragging=!1,n("dragEnd",u)}})})}function el(o,e,n){return Vue.computed(()=>{var r;const t=typeof o.resizable=="boolean"?!o.resizable:!!((r=o.resizable)!=null&&r.disabled);return K(P({minWidth:200,minHeight:150},VtjUtils.isObject(o.resizable)?o.resizable:{}),{disabled:t,dirs:["e","s","w"],onStart(l,u){e.resizing=!0,e.zIndex=Math.max(e.zIndex,++Ke),n("resizeStart",l,u)},onResizing(l,u){n("resizing",l,u)},onEnd(l,u){const a=document.body.getBoundingClientRect();e.left=u.elementPositionX.value-a.x,e.top=u.elementPositionY.value-a.y,e.width=u.elementWidth.value,e.height=u.elementHeight.value,e.resizing=!1,n("resizeEnd",l,u)}})})}function tl(o,e){const n=o.componentInstance;if(!n)return;let t=null;return Vue.onMounted(()=>{const r=Vue.unref(e),l=Vue.unref(r==null?void 0:r.bodyRef);t=n.$el,l&&l.$el&&l.$el.appendChild(t)}),Vue.onUnmounted(()=>{t&&t.parentNode&&t.parentNode.removeChild(t)}),{componentInstance:n}}const nl=["src"],Ge=Vue.defineComponent({name:"XDialog",__name:"Dialog",props:uo,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(o,{expose:e,emit:n}){const t=o,r=n,l=Vue.getCurrentInstance(),u=Vue.ref(),a=Vue.ref(),{state:i,maximized:s,minimized:c,normal:d}=qr(t,u),{styles:m,classes:p,wrapperClass:f,modalStyle:V}=Jr(t,i),{changeMode:g,active:v,close:y,show:h,hide:C,submit:b,cancel:k}=Qr(t,i,r),w=Zr(t,i,r,u),T=el(t,i,r),D=tl(t,a);Vue.watchEffect(()=>N(this,null,function*(){t.modelValue?(yield Vue.nextTick(),l&&(r("open",l),document.body.classList.add("x-dialog-visible"))):document.body.classList.remove("x-dialog-visible")})),Vue.onUnmounted(()=>{document.body.classList.remove("x-dialog-visible")});const O=Vue.computed(()=>{var $;return($=a.value)==null?void 0:$.$el});return e({$vtjEl:O,panelRef:a,state:i,maximized:s,minimized:c,changeMode:g,show:h,hide:C,submit:b,cancel:k,close:y,componentInstance:D}),($,G)=>t.modelValue?(Vue.openBlock(),Vue.createBlock(Vue.Teleport,{key:0,to:"body"},[Vue.createElementVNode("div",{ref_key:"wrapper",ref:u,class:Vue.normalizeClass(["x-dialog__wrapper",Vue.unref(f)])},[t.modal?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,class:"x-dialog__modal",style:Vue.normalizeStyle(Vue.unref(V))},null,4)):Vue.createCommentVNode("",!0),Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(Ye),Vue.mergeProps({ref_key:"panelRef",ref:a,class:["x-dialog",Vue.unref(p)],card:"",shadow:"always",header:{icon:t.icon,subtitle:t.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:Vue.unref(m),size:t.size,body:{padding:t.bodyPadding},onClick:Vue.unref(v)},$.$attrs),Vue.createSlots({title:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(t.title),1)]),actions:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"actions"),t.minimizable?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:0,icon:Vue.unref(VtjIcons.Minimize),size:t.size,mode:"icon",type:"primary",background:"hover",onClick:G[0]||(G[0]=L=>Vue.unref(g)("minimized"))},null,8,["icon","size"])):Vue.createCommentVNode("",!0),t.maximizable?(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:1},[Vue.unref(d)?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:1,icon:Vue.unref(VtjIcons.Maximize),size:t.size,mode:"icon",type:"primary",background:"hover",onClick:G[2]||(G[2]=L=>Vue.unref(g)("maximized"))},null,8,["icon","size"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:0,icon:Vue.unref(VtjIcons.Popup),size:t.size,mode:"icon",type:"primary",background:"hover",onClick:G[1]||(G[1]=L=>Vue.unref(g)("normal"))},null,8,["icon","size"]))],64)):Vue.createCommentVNode("",!0),t.closable?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:2,icon:Vue.unref(VtjIcons.RawClose),size:t.size,mode:"icon",type:"danger",background:"hover",onClick:Vue.unref(y)},null,8,["icon","size","onClick"])):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"default",{},()=>[t.content?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(t.content),{key:0})):Vue.createCommentVNode("",!0),t.src?(Vue.openBlock(),Vue.createElementBlock("iframe",{key:1,src:t.src,class:"x-dialog__frame"},null,8,nl)):Vue.createCommentVNode("",!0)])]),_:2},[t.cancel||t.submit||$.$slots.footer||$.$slots.extra||$.$slots.handle?{name:"footer",fn:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"footer",{},()=>[Vue.createVNode(Vue.unref(R),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"extra")]),_:3}),Vue.createVNode(Vue.unref(R),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot($.$slots,"handle"),t.cancel?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:0,type:"default",size:t.size,onClick:Vue.unref(k)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof t.cancel=="string"?t.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0),t.submit?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:1,type:"primary",size:t.size,onClick:Vue.unref(b)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof t.submit=="string"?t.submit:"确定"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[Vue.unref(ao),Vue.unref(w)],[Vue.unref(un),Vue.unref(T)]])],2)])):Vue.createCommentVNode("",!0)}});function kt(o,e){const n=document.createElement("div"),t=Vue.createVNode(Ge,o);t.appContext=e!=null?e:kt._context,Vue.render(t,n);const r=()=>{var l;Vue.render(null,n),(l=n.parentNode)==null||l.removeChild(n)};return t.props.onDestroy=()=>{r()},document.body.appendChild(n),{vnode:t,destroy:r}}const ol=Vue.defineComponent({__name:"Sidebar",props:{collapsed:{type:Boolean}},setup(o){const e=o;return(n,t)=>Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-mask-sidebar",{"is-collapsed":e.collapsed}]),grow:!1,flex:"",direction:"column"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"brand"),Vue.createVNode(Vue.unref(R),{class:"x-mask-sidebar__wrapper",flex:"",grow:"",direction:"column",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"default"),t[0]||(t[0]=Vue.createElementVNode("div",{class:"x-mask-sidebar__helper"},null,-1))]),_:3})]),_:3},8,["class"])),[[Vue.unref(un),{dirs:["e"],disabled:e.collapsed,maxWidth:500,minWidth:200}]])}}),rl=Vue.defineComponent({__name:"SwitchBar",props:{collasped:{type:Boolean,default:!1},favorite:{type:Boolean,default:!1},keyword:{}},emits:["update:collasped","update:keyword","update:favorite"],setup(o,{emit:e}){const n=o,t=e,r=Vue.ref(!1),l=Vue.ref(""),u=Vue.ref(!1),a=()=>{r.value=!0},i=()=>{l.value="",r.value=!1,t("update:keyword",l.value)},s=()=>{t("update:collasped",!n.collasped)},c=()=>{t("update:keyword",l.value)},d=()=>{t("update:favorite",u.value)};return(m,p)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:"x-mask-switch-bar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{key:0,class:"x-mask-switch-bar__left",grow:""},{default:Vue.withCtx(()=>[r.value?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSwitch),{key:0,modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=f=>u.value=f),class:"x-mask-switch-bar__switch","active-icon":Vue.unref(VtjIcons.StarFilled),"inactive-icon":Vue.unref(VtjIcons.Menu),onChange:d},null,8,["modelValue","active-icon","inactive-icon"])),r.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),{key:1,modelValue:l.value,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value=f),class:"x-mask-switch-bar__input",size:"small",placeholder:"请输入查询关键字",onInput:c,"prefix-icon":Vue.unref(VtjIcons.Search)},{suffix:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Ve),{icon:Vue.unref(VtjIcons.Close),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","prefix-icon"])):Vue.createCommentVNode("",!0)]),_:1})),Vue.createVNode(Vue.unref(R),{class:Vue.normalizeClass(["x-mask-switch-bar__right",{"is-collasped":n.collasped}]),flex:"",align:"center",justify:"center"},{default:Vue.withCtx(()=>[!r.value&&!n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:0,icon:Vue.unref(VtjIcons.Search),mode:"icon",background:"hover",size:"default",circle:"",onClick:a},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:1,icon:Vue.unref(VtjIcons.Expand),mode:"icon",size:"default",background:"hover",onClick:s,circle:""},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{key:2,icon:Vue.unref(VtjIcons.Fold),mode:"icon",size:"default",background:"hover",circle:"",onClick:s},null,8,["icon"]))]),_:1},8,["class"])]),_:1}))}}),ll=["src"],al={key:0},ul=Vue.defineComponent({__name:"Brand",props:{collapsed:{type:Boolean,default:!1},logo:{},title:{},url:{}},setup(o){const e=o,n=VueRouter.useRouter(),t=()=>{e.url&&n.push(e.url)};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-mask-brand",{"is-collapsed":e.collapsed}]),align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(R),{class:"x-mask-brand__logo",flex:"",justify:"center",align:"center",onClick:t},{default:Vue.withCtx(()=>[Vue.renderSlot(r.$slots,"logo",{},()=>[e.logo?(Vue.openBlock(),Vue.createElementBlock("img",{key:0,src:e.logo},null,8,ll)):Vue.createCommentVNode("",!0)])]),_:3}),Vue.createVNode(Vue.unref(R),{class:"x-mask-brand__title",flex:"",align:"center"},{default:Vue.withCtx(()=>[e.title?(Vue.openBlock(),Vue.createElementBlock("span",al,[Vue.renderSlot(r.$slots,"title",{},()=>[Vue.createTextVNode(Vue.toDisplayString(e.title),1)])])):Vue.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]))}}),Et="__favorites__",St="__search__",il=Vue.defineComponent({__name:"Menu",props:{collapse:{type:Boolean,default:!1},keyword:{},favorite:{type:Boolean},favorites:{},flatMenus:{},menus:{},active:{}},emits:["select"],setup(o,{emit:e}){const n=o,t=Vue.computed(()=>n.menus||[]),r=e,l=Vue.computed(()=>{var s;return String((s=n.active)==null?void 0:s.id)}),u=Vue.computed(()=>{var s;return[{id:Et,title:"收藏",icon:VtjIcons.Star,children:(s=n.favorites)!=null&&s.length?n.favorites:[{id:Et+"empty",disabled:!0,title:"暂无收藏菜单"}]}]}),a=Vue.computed(()=>{const s=(n.keyword||"").trim(),c=s?(n.flatMenus||[]).filter(d=>{var m;return(m=d.title)==null?void 0:m.includes(s)}):[];return[{id:St,title:"搜索",icon:VtjIcons.Search,children:c!=null&&c.length?c:[{id:St+"empty",disabled:!0,title:"查询匹配不到菜单项"}]}]}),i=s=>{r("select",s)};return(s,c)=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[Vue.withDirectives(Vue.createVNode(Vue.unref(R),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:t.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0},data:t.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,!n.collapse]]),t.value.length?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElEmpty),{key:0,description:"暂无菜单数据"}))]),_:1},512),[[Vue.vShow,!n.favorite&&!n.keyword]]),Vue.withDirectives(Vue.createVNode(Vue.unref(R),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[Et],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[Et],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512),[[Vue.vShow,n.favorite&&!n.keyword]]),n.keyword?Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(R),{key:0,class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[St],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Pe),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[St],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512)),[[Vue.vShow,!!n.keyword]]):Vue.createCommentVNode("",!0)],64))}}),sl="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1711803009570'%20class='icon'%20viewBox='0%200%201280%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1500'%20width='320'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M557.85%201023l-122-35.4c-12.8-3.6-20-17-16.4-29.8L692.45%2017.4c3.6-12.8%2017-20%2029.8-16.4l122%2035.4c12.8%203.6%2020%2017%2016.4%2029.8L587.65%201006.6c-3.8%2012.8-17%2020.2-29.8%2016.4z%20m-228-224.4l87-92.8c9.2-9.8%208.6-25.4-1.6-34.4L234.05%20512l181.2-159.4c10.2-9%2011-24.6%201.6-34.4l-87-92.8c-9-9.6-24.2-10.2-34-1L7.65%20494.4c-10.2%209.4-10.2%2025.6%200%2035l288.2%20270.2c9.8%209.2%2025%208.8%2034-1z%20m654.4%201.2l288.2-270.2c10.2-9.4%2010.2-25.6%200-35L984.25%20224.2c-9.6-9-24.8-8.6-34%201L863.25%20318c-9.2%209.8-8.6%2025.4%201.6%2034.4L1046.05%20512l-181.2%20159.4c-10.2%209-11%2024.6-1.6%2034.4l87%2092.8c9%209.8%2024.2%2010.2%2034%201.2z'%20fill='%230157fe'%20p-id='1501'%3e%3c/path%3e%3c/svg%3e",io=140,so={logo:{type:String,default:sl},title:{type:String,default:"VTJ.PRO"},menus:{type:[Array,Function],default(){return[]}},favorites:{type:[Array,Function],default(){return[]}},menuAdapter:{type:Function},home:{type:[String,Object],default:"/"},tabs:{type:Number,default:20},actions:{type:Array},avatar:{type:String},theme:{type:Boolean},disabled:{type:Boolean},addFavorite:{type:Function},removeFavorite:{type:Function}},sn=Symbol(),cn=Symbol(),cl={class:"x-mask-tabs__trigger"},dl={key:1},fl=["onDragstart","onDragend"],pl={key:1},ml=Vue.defineComponent({__name:"Tabs",props:{tabs:{},home:{},isActiveTab:{type:Function},value:{},favorites:{}},emits:["click","remove","refresh","toggleFavorite","dialog"],setup(o,{emit:e}){const n=o,t=e,r=c=>{const d=!!n.favorites.find(m=>{var p;return m===c.menu||m.id===((p=c.menu)==null?void 0:p.id)});return[{icon:VtjIcons.Refresh,label:"刷新",name:"refresh",value:c},"|",{icon:d?VtjIcons.StarFilled:VtjIcons.Star,label:"收藏",name:"favorite",value:c.menu,disabled:!c.menu},"|",{icon:VtjIcons.CopyDocument,label:"弹窗",name:"dialog",value:c}]},l=c=>{const d=c.paneName;if(d===n.home.id){t("click",n.home);return}const m=n.tabs.find(p=>p.id===d);m&&t("click",m)},u=c=>{const d=n.tabs.find(m=>m.id===c);d&&t("remove",d)},a=c=>{switch(c.name){case"refresh":t("refresh",c.value);break;case"favorite":t("toggleFavorite",c.value);break;case"dialog":t("dialog",c.value);break}},i=(c,d)=>{d.dataTransfer&&(d.dataTransfer.setData("tab",c.id),d.target&&d.target.classList.add("is-dagging"))},s=(c,d)=>{d.target&&d.target.classList.remove("is-dagging")};return(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{ref:"tabsRef",class:"x-mask-tabs",height:"100%",grow:"",flex:"",justify:"flex-end",direction:"column"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElTabs),{type:"card","model-value":n.value,onTabRemove:u,onTabClick:l},{default:Vue.withCtx(()=>[n.home?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:0,name:n.home.id},{label:Vue.withCtx(()=>[Vue.createElementVNode("div",cl,[n.home.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(Fe)(n.home.icon)),{key:0})):Vue.createCommentVNode("",!0),n.home.title?(Vue.openBlock(),Vue.createElementBlock("span",dl,Vue.toDisplayString(n.home.title),1)):Vue.createCommentVNode("",!0)])]),_:1},8,["name"])):Vue.createCommentVNode("",!0),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.tabs,m=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:m.id,name:m.id,lazy:"",closable:""},{label:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElPopover),{"open-delay":500,placement:"bottom",trigger:"hover",width:"200px",disabled:m.id!==n.value},{reference:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:"x-mask-tabs__trigger",draggable:"true",onDragstart:p=>i(m,p),onDragend:p=>s(m,p)},[m.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(Fe)(m.icon)),{key:0})):Vue.createCommentVNode("",!0),m.title?(Vue.openBlock(),Vue.createElementBlock("span",pl,Vue.toDisplayString(m.title),1)):Vue.createCommentVNode("",!0)],40,fl)]),default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Re),{items:r(m),mode:"text",size:"small",type:"info",onClick:a},null,8,["items"])]),_:2},1032,["disabled"])]),_:2},1032,["name"]))),128))]),_:1},8,["model-value"])]),_:1},512))}}),Vl=Vue.defineComponent({__name:"ThemeSwitch",setup(o){const e=VueUse.useDark(),n=Vue.computed(()=>e.value?VtjIcons.Sunny:VtjIcons.Moon),t=()=>{e.value=!e.value};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(oe),{icon:n.value,dropdown:{size:"small"},mode:"icon",circle:"",background:"hover",type:"primary",onClick:t},null,8,["icon"]))}}),hl={class:"x-mask-toolbar__menu-item"},gl=Vue.defineComponent({__name:"Toolbar",props:{tabs:{default:()=>[]},actions:{},theme:{type:Boolean}},emits:["closeOtherTabs","closeAllTabs","closeTab","clickTab","actionClick","actionCommand"],setup(o,{emit:e}){const n=o,t=e,r=Vue.computed(()=>{const s=n.tabs.map((c,d)=>({divided:d===0,label:c.title,command:c}));return[{label:"关闭其他",command:"other"},{label:"关闭全部",command:"all"},...s]}),l=s=>{t("closeTab",s.command)},u=s=>{switch(s.command){case"all":t("closeAllTabs");break;case"other":t("closeOtherTabs");break;default:t("clickTab",s.command);break}},a=s=>{t("actionClick",s)},i=(s,c)=>{t("actionCommand",s,c)};return(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:"x-mask-toolbar",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(oe),{icon:Vue.unref(VtjIcons.MoreFilled),menus:r.value,dropdown:{size:"small"},type:"primary",mode:"icon",circle:"",background:"hover",onCommand:u},{item:Vue.withCtx(({item:d})=>[Vue.createElementVNode("span",hl,[Vue.createTextVNode(Vue.toDisplayString(d.label)+" ",1),["other","all"].includes(d.command)?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(Ve),{key:0,onClick:Vue.withModifiers(m=>l(d),["stop"]),icon:Vue.unref(VtjIcons.Close)},null,8,["onClick","icon"]))])]),_:1},8,["icon","menus"]),Vue.createVNode(Vue.unref(ElementPlus.ElDivider),{direction:"vertical"}),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(Re),{key:0,circle:"",mode:"icon",size:"default",background:"hover",type:"primary",items:s.actions,onClick:a,onCommand:i},null,8,["items"])):Vue.createCommentVNode("",!0),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:1,direction:"vertical"})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vl,{key:2})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:3,direction:"vertical"})):Vue.createCommentVNode("",!0),Vue.renderSlot(s.$slots,"default")]),_:3}))}}),vl=Vue.defineComponent({__name:"Avatar",props:{avatar:{}},setup(o){const e=o;return(n,t)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElPopover),{width:200,"popper-class":"x-mask-avatar__popper",disabled:!n.$slots.default},{reference:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElAvatar),{class:"x-mask-avatar",shape:"circle",icon:Vue.unref(VtjIcons.UserFilled),src:e.avatar,size:26},null,8,["icon","src"])]),default:Vue.withCtx(()=>[n.$slots.default?Vue.renderSlot(n.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["disabled"]))}}),yl={class:"x-mask__inner"},co=Vue.defineComponent({__name:"Content",props:{createView:{type:Function},exclude:{}},setup(o){const e=o;return(n,t)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:"x-mask__content",overflow:"auto",flex:!1,grow:"",padding:!1},{default:Vue.withCtx(()=>[Vue.createElementVNode("div",yl,[Vue.renderSlot(n.$slots,"default"),Vue.createVNode(Vue.unref(VueRouter.RouterView),null,{default:Vue.withCtx(({Component:r,route:l})=>[(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{exclude:e.exclude},[r?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.createView(r,l)),{key:l.fullPath})):Vue.createCommentVNode("",!0)],1032,["exclude"]))]),_:1})])]),_:3}))}});function wl(){const o=Vue.ref(!1),e=Vue.ref(""),n=Vue.ref(!1);return{collapsed:o,keyword:e,favorite:n}}function bl(o){const e=VtjUtils.uid();return Vue.computed(()=>{const n=o.home;return Object.assign({id:e,url:"/",name:"MaskHome",icon:VtjIcons.HomeFilled,closable:!1},typeof n=="string"?{url:n}:n||{})})}function fo(o,e){let n=[];return o.forEach(t=>{t=e?e(t):t,t.children?n=n.concat(fo(t.children,e)):n.push(t)}),n}function Cl(o,e){const n=VueRouter.useRouter(),t=Vue.shallowRef([]),r=Vue.shallowRef([]),l=Vue.computed(()=>fo(t.value,o.menuAdapter)),u=Vue.computed(()=>VtjUtils.arrayToMap(l.value,"id")),a=Vue.ref(null),i=f=>{const V=typeof f=="object"?f.id:f,g=u.value.get(V);if(!g){console.warn("找不到菜单",f);return}const{type:v="route",url:y,title:h,icon:C}=g;if(!y){a.value=g,e("select",g);return}if(v==="route"){VtjUtils.isUrl(y)||y.startsWith("//")?window.open(y):(a.value=g,n.push(y).catch(b=>b));return}if(v==="window"){window.open(y);return}v==="dialog"&&kt({resizable:!0,bodyPadding:!1,width:"80%",height:"80%",title:h,icon:C,src:y})},s=()=>N(this,null,function*(){var f,V;t.value=typeof o.menus=="function"?(yield o.menus())||[]:(f=o.menus)!=null?f:[],r.value=typeof o.favorites=="function"?(yield o.favorites())||[]:(V=o.favorites)!=null?V:[]}),c=f=>{r.value=[f,...r.value],o.addFavorite&&o.addFavorite(f)},d=f=>{r.value=r.value.filter(V=>V.id!==f.id),o.removeFavorite&&o.removeFavorite(f)},m=f=>!!r.value.find(V=>V===f||V.id===f.id),p=f=>{m(f)?d(f):c(f)};return Vue.watchEffect(s),{menus:t,favorites:r,flatMenus:l,active:a,select:i,toggleFavorite:p}}function _l(o,e,n,t,r){const l=VueRouter.useRoute(),u=VueRouter.useRouter(),a={},i=Vue.ref([]),s=Vue.ref(),{width:c}=VueUse.useElementSize(s),d=Vue.computed(()=>Math.floor(c.value/io)),m=Vue.computed(()=>i.value.slice(0,d.value).filter(z=>!z.dialog)),p=Vue.computed(()=>i.value.slice(d.value)),f=z=>n.value.find(F=>F.url===z),V=z=>l.fullPath===z.url,g=z=>r.value.id===z?r.value:i.value.find(F=>F.id===z),v=Vue.ref(""),y=Vue.computed(()=>g(v.value)),h=z=>{u.push(z.url).catch(F=>F)},C=z=>{v.value=z.id,l.fullPath!==z.url&&h(z)},b=()=>{h(r.value)},k=z=>{const F=i.value.find(j=>j.url===z.url||j.id===z.id);F?C(F):(i.value.unshift(z),C(z))},w=z=>N(this,null,function*(){var W;const{url:F=l.fullPath,icon:j,title:x}=z||{},S=a[F],B=VtjUtils.uid(),H=VtjUtils.upperFirstCamelCase(F);return P({id:B,name:H,url:F,icon:j,title:x||((W=f(l.path))==null?void 0:W.title)||"新建页签",closable:!0,menu:z},S?yield S():{})}),T=z=>N(this,null,function*(){if(yield ElementPlus.ElMessageBox.confirm("是否关闭页签","提示",{type:"warning"}).catch(()=>!1)){if(i.value=i.value.filter(j=>j.id!==z.id),v.value===z.id){const j=i.value[0];h(j||r.value)}return z}}),D=z=>{const F=i.value.findIndex(j=>j.id===z.id);if(F>=0){const j=i.value[F];i.value.splice(F,1,Object.assign(j,z))}},O=()=>N(this,null,function*(){if(!(yield ElementPlus.ElMessageBox.confirm("是否关闭全部页签","提示",{type:"warning"}).catch(()=>!1)))return;const F=i.value;return i.value=[],C(r.value),F}),$=()=>N(this,null,function*(){if(!(yield ElementPlus.ElMessageBox.confirm("是否关闭其他页签","提示",{type:"warning"}).catch(()=>!1)))return;const F=i.value.filter(j=>j.id!==v.value);return i.value=i.value.filter(j=>j.id===v.value),F}),G=z=>{const F=i.value.filter(j=>j.id!==z.id);i.value=[z,...F],C(z)},L=()=>N(this,null,function*(){yield Vue.nextTick();const z=r.value.url===l.path,F=f(l.fullPath);if(z)v.value=r.value.id;else{const j=yield w(F);k(j)}yield Vue.nextTick(),t.value=F||null});return Vue.watch(n,L),Vue.watch(l,L,{immediate:!0}),Vue.provide(sn,a),{tabRef:s,tabs:i,showTabs:m,currentTab:y,changeTab:h,removeTab:T,updateTab:D,addTab:k,home:r,tabValue:v,isCurrentTab:V,activeHome:b,activeTab:C,dropdownTabs:p,removeAllTabs:O,removeOtherTabs:$,moveToShow:G}}function kl(o){const e=new Map,n=Vue.ref([]),t=Vue.reactive({}),r=Vue.getCurrentInstance(),l={},{updateTab:u,isCurrentTab:a,activeHome:i,tabs:s}=o,c=(h,C)=>{const b=C.fullPath;if(e.has(b))return e.get(b);{const k=VtjUtils.upperFirstCamelCase(b),w={name:k,setup(){const T=Vue.computed(()=>t[b]||document.body),D=Vue.computed(()=>!t[b]),O=Vue.computed(()=>!n.value.includes(k));return Vue.provide(VueRouter.routeLocationKey,Vue.toRaw(P({},C))),()=>O.value?Vue.h(Vue.Teleport,{to:T.value,disabled:D.value},[Vue.h(h)]):null}};return e.set(b,w),w}},d=h=>{h.dialog=void 0,delete t[h.url];const C=l[h.id];C&&(C.destroy(),delete l[h.id],u(h))},m=(h=[])=>{h.forEach(C=>{d(C)})},p=h=>N(this,null,function*(){h.dialog=K(P({},h.dialog),{onMinimized:()=>{d(h)},onClose:()=>N(this,null,function*(){d(h),s.value=s.value.filter(b=>b.id!==h.id)})}),u(h);const C=kt(K(P({title:h.title,icon:h.icon,modal:!1,resizable:!0,draggable:!0,maximizable:!0,minimizable:!0},h.dialog),{onOpen(b){var k,w;t[h.url]=(w=(k=b.refs.panelRef)==null?void 0:k.bodyRef)==null?void 0:w.$el}}),r==null?void 0:r.appContext);return yield Vue.nextTick(),a(h)&&i(),l[h.id]=C,C}),f=h=>N(this,null,function*(){n.value=[h.name],yield Vue.nextTick(),n.value=[]}),V=h=>N(this,null,function*(){n.value=h.map(C=>C.name),yield Vue.nextTick(),n.value=[]}),g=h=>(h.preventDefault(),!1),v=h=>{if(h.dataTransfer){const C=h.dataTransfer.getData("tab"),b=s.value.find(k=>k.id===C);if(b){const{clientX:k,clientY:w}=h;b.dialog={left:k,top:w},p(b)}}},y=h=>!!t[h];return VueUse.useEventListener(document,"dragover",g),VueUse.useEventListener(document,"drop",v),{createView:c,openDialog:p,refresh:f,exclude:n,cleanCache:V,hasDialog:y,closeDialog:d,closeDialogs:m}}const po=Vue.defineComponent({name:"XMask",__name:"Mask",props:so,emits:["select","actionClick","actionCommand"],setup(o,{emit:e}){const n=o,t=e,r=bl(n),{collapsed:l,keyword:u,favorite:a}=wl(),{menus:i,favorites:s,flatMenus:c,active:d,select:m,toggleFavorite:p}=Cl(n,t),{tabRef:f,showTabs:V,currentTab:g,changeTab:v,removeTab:y,tabs:h,updateTab:C,isCurrentTab:b,activeHome:k,removeAllTabs:w,removeOtherTabs:T,dropdownTabs:D,moveToShow:O}=_l(n,t,c,d,r),{createView:$,openDialog:G,refresh:L,exclude:z,cleanCache:F,closeDialogs:j}=kl({tabs:h,updateTab:C,isCurrentTab:b,activeHome:k}),x=Y=>N(this,null,function*(){(yield y(Y))&&(yield F([Y]))}),S=()=>N(this,null,function*(){const Y=yield w();Y&&(j(Y),yield F(Y))}),B=()=>N(this,null,function*(){const Y=yield T();Y&&(j(Y),yield F(Y))}),H=Y=>{t("actionClick",Y)},W=(Y,ye)=>{t("actionCommand",Y,ye)};return Vue.provide(cn,{tabs:h,flatMenus:c,favorites:s,updateTab:C,active:d,currentTab:g}),(Y,ye)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(R),{class:Vue.normalizeClass(["x-mask",{"is-disabled":n.disabled}]),fit:""},{default:Vue.withCtx(()=>[n.disabled?(Vue.openBlock(),Vue.createBlock(co,{key:1,createView:Vue.unref($),exclude:Vue.unref(z)},{default:Vue.withCtx(()=>[Y.$slots.default?Vue.renderSlot(Y.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude"])):(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:0},[Vue.createVNode(ol,{collapsed:Vue.unref(l)},{brand:Vue.withCtx(()=>[Vue.createVNode(ul,{logo:n.logo,title:n.title,url:Vue.unref(r).url,collapsed:Vue.unref(l)},null,8,["logo","title","url","collapsed"])]),default:Vue.withCtx(()=>[Vue.createVNode(rl,{collasped:Vue.unref(l),"onUpdate:collasped":ye[0]||(ye[0]=Me=>Vue.isRef(l)?l.value=Me:null),favorite:Vue.unref(a),"onUpdate:favorite":ye[1]||(ye[1]=Me=>Vue.isRef(a)?a.value=Me:null),keyword:Vue.unref(u),"onUpdate:keyword":ye[2]||(ye[2]=Me=>Vue.isRef(u)?u.value=Me:null)},null,8,["collasped","favorite","keyword"]),Vue.createVNode(il,{collapse:Vue.unref(l),keyword:Vue.unref(u),favorite:Vue.unref(a),favorites:Vue.unref(s),flatMenus:Vue.unref(c),menus:Vue.unref(i),active:Vue.unref(d),onSelect:Vue.unref(m)},null,8,["collapse","keyword","favorite","favorites","flatMenus","menus","active","onSelect"])]),_:1},8,["collapsed"]),Vue.createVNode(Vue.unref(R),{class:"x-mask__main",grow:"",shrink:"",flex:"",direction:"column",overflow:"hidden"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(R),{class:"x-mask-topbar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>{var Me;return[Vue.createVNode(ml,{ref_key:"tabRef",ref:f,favorites:Vue.unref(s),tabs:Vue.unref(V),home:Vue.unref(r),value:(Me=Vue.unref(g))==null?void 0:Me.id,onClick:Vue.unref(v),onToggleFavorite:Vue.unref(p),onRemove:x,onDialog:Vue.unref(G),onRefresh:Vue.unref(L)},null,8,["favorites","tabs","home","value","onClick","onToggleFavorite","onDialog","onRefresh"]),Vue.createVNode(gl,{tabs:Vue.unref(D),actions:n.actions,theme:n.theme,onCloseOtherTabs:B,onCloseAllTabs:S,onCloseTab:x,onClickTab:Vue.unref(O),onActionClick:H,onActionCommand:W},{default:Vue.withCtx(()=>[Vue.createVNode(vl,{avatar:n.avatar},Vue.createSlots({_:2},[Y.$slots.user?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(Y.$slots,"user")]),key:"0"}:void 0]),1032,["avatar"])]),_:3},8,["tabs","actions","theme","onClickTab"])]}),_:3}),Vue.createVNode(co,{createView:Vue.unref($),exclude:Vue.unref(z)},{default:Vue.withCtx(()=>[Y.$slots.default?Vue.renderSlot(Y.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude"])]),_:3})],64))]),_:3},8,["class"]))}});function El(o={}){const e=VueRouter.useRoute(),n=Vue.inject(sn,null),t=Vue.inject(cn,null);if(n){const l=typeof o=="function"?o:()=>N(this,null,function*(){return o});n[e.fullPath]=l}return{tab:Vue.computed(()=>t?t.tabs.value.find(l=>l.url===e.fullPath):null),mask:t}}const dn=Vue.defineComponent({__name:"SelectEditor",props:{options:{default:()=>[]}},emits:["change"],setup(o,{emit:e}){const n=o,t=e,r=l=>{const u=n.options.filter(a=>Array.isArray(l)?l.includes(a.value):l===a.value);t("change",l,u)};return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSelect),Vue.mergeProps(l.$attrs,{onChange:r}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.options,(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElOption),Vue.mergeProps({key:`item_${i}_${a.value}`,ref_for:!0},a),Vue.createSlots({_:2},[l.$slots.option?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(l.$slots,"option",{option:a})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Sl=Vue.defineComponent({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const e=o,n=Vue.computed(()=>Vue.markRaw(e.button?ElementPlus.ElCheckboxButton:ElementPlus.ElCheckbox));return(t,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElCheckboxGroup),Vue.normalizeProps(Vue.guardReactiveProps(t.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`,ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),xl=Vue.defineComponent({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const e=o,n=Vue.computed(()=>Vue.markRaw(e.button?ElementPlus.ElRadioButton:ElementPlus.ElRadio));return(t,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElRadioGroup),Vue.normalizeProps(Vue.guardReactiveProps(t.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`,ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Oe={filterResetMethod(o){const{options:e,column:n}=o;if(n.filterResetMethod){n.filterResetMethod(o);return}e.forEach(t=>{t.value=""})},filterRecoverMethod(o){const{option:e,column:n}=o;if(n.filterRecoverMethod){n.filterRecoverMethod(o);return}e.value=""},filterMethod(o){const{option:e,row:n,column:t}=o;if(t.filterMethod)return t.filterMethod(o);const{value:r}=e,l=n[t.field];return VtjUtils.isString(l)?l.indexOf(String(r))>-1:l===r}},Bl=Vue.defineComponent({name:"InputEdit",__name:"InputEdit",props:{params:{},renderOpts:{}},setup(o){const e=o,{renderProps:n,renderEvents:t,cellValue:r,onChange:l}=Xe(e.renderOpts,e.params);return(u,a)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",clearable:"",modelValue:Vue.unref(r),"onUpdate:modelValue":a[0]||(a[0]=i=>Vue.isRef(r)?r.value=i:null),onInput:Vue.unref(l)},Vue.unref(n),Vue.toHandlers(Vue.unref(t))),null,16,["modelValue","onInput"]))}}),Pl={class:"x-grid__filter"},fn=Vue.defineComponent({name:"InputFilter",__name:"InputFilter",props:{params:{},renderOpts:{}},setup(o){const e=o,{renderProps:n,renderEvents:t,state:r,load:l,onChange:u,onKeyup:a}=Ut(e.renderOpts,e.params);return l(),(i,s)=>(Vue.openBlock(),Vue.createElementBlock("div",Pl,[Vue.createVNode(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",placeholder:"输入关键字回车筛选",clearable:"",modelValue:Vue.unref(r).option.value,"onUpdate:modelValue":s[0]||(s[0]=c=>Vue.unref(r).option.value=c),onInput:Vue.unref(u),onKeyup:Vue.withKeys(Vue.withModifiers(Vue.unref(a),["stop"]),["enter"])},Vue.unref(n),Vue.toHandlers(Vue.unref(t))),null,16,["modelValue","onInput","onKeyup"])]))}}),We={autofocus:".el-input__inner",renderDefault(o,e){var r;const{row:n,column:t}=e;return[Vue.createTextVNode((r=n[t.field])!=null?r:"")]},renderEdit(o,e){return[Vue.h(Bl,{params:e,renderOpts:o})]},renderCell(o,e){var r;const{row:n,column:t}=e;return[Vue.createTextVNode((r=n[t.field])!=null?r:"")]}},Nl=K(P(P({cellClassName:"x-grid__edit"},We),Oe),{renderFilter(o,e){return[Vue.h(fn,{params:e,renderOpts:o})]}});/**!
|
8
8
|
* Sortable 1.15.3
|
9
9
|
* @author RubaXa <trash@rubaxa.org>
|
10
10
|
* @author owenm <owen23355@gmail.com>
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vtj/ui",
|
3
3
|
"private": false,
|
4
|
-
"version": "0.8.
|
4
|
+
"version": "0.8.155",
|
5
5
|
"type": "module",
|
6
6
|
"engines": {
|
7
7
|
"node": ">=16.0.0"
|
@@ -12,8 +12,8 @@
|
|
12
12
|
"sortablejs": "~1.15.2",
|
13
13
|
"vxe-table": "~4.6.17",
|
14
14
|
"vxe-table-plugin-menus": "~4.0.3",
|
15
|
-
"@vtj/icons": "~0.8.
|
16
|
-
"@vtj/utils": "~0.8.
|
15
|
+
"@vtj/icons": "~0.8.155",
|
16
|
+
"@vtj/utils": "~0.8.155"
|
17
17
|
},
|
18
18
|
"devDependencies": {
|
19
19
|
"@types/qrcode": "^1.5.5",
|
package/types/version.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/ui
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.8.
|
5
|
+
* @version 0.8.155
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
7
|
*/
|
8
|
-
export declare const version = "0.8.
|
8
|
+
export declare const version = "0.8.155";
|