@macroui/macroui-vue 1.9.30 → 1.9.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +212 -212
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1229,13 +1229,13 @@ const Jt = {
|
|
|
1229
1229
|
}), z = y(() => {
|
|
1230
1230
|
const x = [];
|
|
1231
1231
|
if (e.options && e.options.length > 0) {
|
|
1232
|
-
const { label: U = "label", value: ne = "value", disabled:
|
|
1233
|
-
G.forEach((
|
|
1234
|
-
|
|
1235
|
-
value:
|
|
1236
|
-
label:
|
|
1237
|
-
disabled: Y
|
|
1238
|
-
...
|
|
1232
|
+
const { label: U = "label", value: ne = "value", disabled: Y = "disabled" } = e.props || {}, fe = (G) => {
|
|
1233
|
+
G.forEach((q) => {
|
|
1234
|
+
q.options ? fe(q.options) : x.push({
|
|
1235
|
+
value: q[ne],
|
|
1236
|
+
label: q[U],
|
|
1237
|
+
disabled: q[Y],
|
|
1238
|
+
...q
|
|
1239
1239
|
});
|
|
1240
1240
|
});
|
|
1241
1241
|
};
|
|
@@ -1243,22 +1243,22 @@ const Jt = {
|
|
|
1243
1243
|
}
|
|
1244
1244
|
return i.default && i.default().forEach((ne) => {
|
|
1245
1245
|
if (ne.type && ne.type.name === "ElOption") {
|
|
1246
|
-
const
|
|
1246
|
+
const Y = ne.props || {};
|
|
1247
1247
|
x.push({
|
|
1248
|
-
value:
|
|
1249
|
-
label:
|
|
1250
|
-
disabled:
|
|
1251
|
-
...
|
|
1248
|
+
value: Y.value,
|
|
1249
|
+
label: Y.label || String(Y.value),
|
|
1250
|
+
disabled: Y.disabled,
|
|
1251
|
+
...Y
|
|
1252
1252
|
});
|
|
1253
1253
|
}
|
|
1254
1254
|
}), x;
|
|
1255
1255
|
}), E = y(() => {
|
|
1256
1256
|
if (e.options && e.options.length > 0) {
|
|
1257
1257
|
const { label: x = "label", options: U = "options", disabled: ne = "disabled" } = e.props || {};
|
|
1258
|
-
return e.options.map((
|
|
1259
|
-
label:
|
|
1260
|
-
disabled:
|
|
1261
|
-
options: (
|
|
1258
|
+
return e.options.map((Y) => ({
|
|
1259
|
+
label: Y[x] || "",
|
|
1260
|
+
disabled: Y[ne] || !1,
|
|
1261
|
+
options: (Y[U] || []).map((fe) => ({
|
|
1262
1262
|
value: fe.value,
|
|
1263
1263
|
label: fe.label || String(fe.value),
|
|
1264
1264
|
disabled: fe.disabled || !1,
|
|
@@ -1274,8 +1274,8 @@ const Jt = {
|
|
|
1274
1274
|
return e.options.some((U) => U[x] && Array.isArray(U[x]));
|
|
1275
1275
|
}), M = (x, U) => {
|
|
1276
1276
|
let ne = 0;
|
|
1277
|
-
for (let
|
|
1278
|
-
ne += E.value[
|
|
1277
|
+
for (let Y = 0; Y < x; Y++)
|
|
1278
|
+
ne += E.value[Y].options.length;
|
|
1279
1279
|
return ne + U;
|
|
1280
1280
|
}, I = y(() => {
|
|
1281
1281
|
if (!m.value)
|
|
@@ -1298,7 +1298,7 @@ const Jt = {
|
|
|
1298
1298
|
) : !1), $ = y(() => {
|
|
1299
1299
|
if (!e.multiple) return [];
|
|
1300
1300
|
const x = e.modelValue || [];
|
|
1301
|
-
return Array.isArray(x) ? x.map((U) => z.value.find((
|
|
1301
|
+
return Array.isArray(x) ? x.map((U) => z.value.find((Y) => Y.value === U) || { value: U, label: String(U) }) : [];
|
|
1302
1302
|
}), F = (x) => {
|
|
1303
1303
|
if (typeof x == "object") {
|
|
1304
1304
|
const { label: U = "label" } = e.props || {};
|
|
@@ -1351,17 +1351,17 @@ const Jt = {
|
|
|
1351
1351
|
if (ee(x)) return;
|
|
1352
1352
|
const U = H(x);
|
|
1353
1353
|
if (e.multiple) {
|
|
1354
|
-
const ne = e.modelValue || [],
|
|
1355
|
-
if (e.multipleLimit &&
|
|
1354
|
+
const ne = e.modelValue || [], Y = me(x) ? ne.filter((fe) => fe !== U) : [...ne, U];
|
|
1355
|
+
if (e.multipleLimit && Y.length > e.multipleLimit)
|
|
1356
1356
|
return;
|
|
1357
|
-
l("update:modelValue",
|
|
1357
|
+
l("update:modelValue", Y), l("change", Y);
|
|
1358
1358
|
} else {
|
|
1359
1359
|
const ne = F(x);
|
|
1360
1360
|
C.value = ne, l("update:modelValue", U), l("change", U), c.value = !1, m.value = "", l("visible-change", !1);
|
|
1361
1361
|
}
|
|
1362
1362
|
}, se = (x) => {
|
|
1363
1363
|
if (e.disabled) return;
|
|
1364
|
-
const ne = (e.modelValue || []).filter((
|
|
1364
|
+
const ne = (e.modelValue || []).filter((Y) => Y !== x.value);
|
|
1365
1365
|
l("update:modelValue", ne), l("change", ne), l("remove-tag", x.value);
|
|
1366
1366
|
}, ye = () => {
|
|
1367
1367
|
e.multiple ? (l("update:modelValue", []), l("change", [])) : (C.value = "", l("update:modelValue", ""), l("change", "")), l("clear");
|
|
@@ -1404,9 +1404,9 @@ const Jt = {
|
|
|
1404
1404
|
}, W = () => {
|
|
1405
1405
|
c.value && A();
|
|
1406
1406
|
}, Z = (x) => {
|
|
1407
|
-
var ne,
|
|
1407
|
+
var ne, Y;
|
|
1408
1408
|
const U = x.target;
|
|
1409
|
-
!((ne = o.value) != null && ne.contains(U)) && !((
|
|
1409
|
+
!((ne = o.value) != null && ne.contains(U)) && !((Y = h.value) != null && Y.contains(U)) && (c.value = !1, m.value = "", l("visible-change", !1));
|
|
1410
1410
|
};
|
|
1411
1411
|
return Ae(() => {
|
|
1412
1412
|
if (document.addEventListener("click", Z), window.addEventListener("scroll", W, !0), !e.multiple && e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0) {
|
|
@@ -1460,7 +1460,7 @@ const Jt = {
|
|
|
1460
1460
|
x.disabled ? V("", !0) : (a(), s("button", {
|
|
1461
1461
|
key: 0,
|
|
1462
1462
|
class: "tag-close",
|
|
1463
|
-
onClick: Ve((
|
|
1463
|
+
onClick: Ve((Y) => se(ne), ["stop"])
|
|
1464
1464
|
}, [...U[5] || (U[5] = [
|
|
1465
1465
|
d("svg", {
|
|
1466
1466
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1587,7 +1587,7 @@ const Jt = {
|
|
|
1587
1587
|
U[9] || (U[9] = d("span", { class: "loading loading-spinner loading-sm" }, null, -1)),
|
|
1588
1588
|
Ce(" " + j(x.loadingText || "加载中..."), 1)
|
|
1589
1589
|
])) : te.value.length === 0 && !x.allowCreate ? (a(), s("div", Zl, j(x.noDataText || "暂无数据"), 1)) : (a(), s("div", Ql, [
|
|
1590
|
-
T.value ? (a(!0), s(de, { key: 0 }, he(P.value, (ne,
|
|
1590
|
+
T.value ? (a(!0), s(de, { key: 0 }, he(P.value, (ne, Y) => (a(), s("div", {
|
|
1591
1591
|
key: ne.label
|
|
1592
1592
|
}, [
|
|
1593
1593
|
d("div", {
|
|
@@ -1598,10 +1598,10 @@ const Jt = {
|
|
|
1598
1598
|
class: K(["select-option", {
|
|
1599
1599
|
"is-selected": me(fe),
|
|
1600
1600
|
"is-disabled": ee(fe) || ne.disabled,
|
|
1601
|
-
"is-highlighted": v.value === M(
|
|
1601
|
+
"is-highlighted": v.value === M(Y, G)
|
|
1602
1602
|
}]),
|
|
1603
|
-
onClick: (
|
|
1604
|
-
onMouseenter: (
|
|
1603
|
+
onClick: (q) => N(fe),
|
|
1604
|
+
onMouseenter: (q) => v.value = M(Y, G)
|
|
1605
1605
|
}, [
|
|
1606
1606
|
X(x.$slots, "option", {
|
|
1607
1607
|
option: fe,
|
|
@@ -1623,19 +1623,19 @@ const Jt = {
|
|
|
1623
1623
|
], -1)
|
|
1624
1624
|
])])) : V("", !0)
|
|
1625
1625
|
], 42, ea))), 128))
|
|
1626
|
-
]))), 128)) : (a(!0), s(de, { key: 1 }, he(I.value, (ne,
|
|
1626
|
+
]))), 128)) : (a(!0), s(de, { key: 1 }, he(I.value, (ne, Y) => (a(), s("div", {
|
|
1627
1627
|
key: H(ne),
|
|
1628
1628
|
class: K(["select-option", {
|
|
1629
1629
|
"is-selected": me(ne),
|
|
1630
1630
|
"is-disabled": ee(ne),
|
|
1631
|
-
"is-highlighted": v.value ===
|
|
1631
|
+
"is-highlighted": v.value === Y
|
|
1632
1632
|
}]),
|
|
1633
1633
|
onClick: (fe) => N(ne),
|
|
1634
|
-
onMouseenter: (fe) => v.value =
|
|
1634
|
+
onMouseenter: (fe) => v.value = Y
|
|
1635
1635
|
}, [
|
|
1636
1636
|
X(x.$slots, "option", {
|
|
1637
1637
|
option: ne,
|
|
1638
|
-
index:
|
|
1638
|
+
index: Y
|
|
1639
1639
|
}, () => [
|
|
1640
1640
|
d("span", na, j(F(ne)), 1)
|
|
1641
1641
|
], !0),
|
|
@@ -5429,8 +5429,8 @@ const mr = {
|
|
|
5429
5429
|
Z = R.bottom + U, x = R.right - W.offsetWidth;
|
|
5430
5430
|
break;
|
|
5431
5431
|
}
|
|
5432
|
-
const ne = window.scrollX,
|
|
5433
|
-
W.style.top = `${Z +
|
|
5432
|
+
const ne = window.scrollX, Y = window.scrollY;
|
|
5433
|
+
W.style.top = `${Z + Y}px`, W.style.left = `${x + ne}px`;
|
|
5434
5434
|
});
|
|
5435
5435
|
});
|
|
5436
5436
|
}, b = () => {
|
|
@@ -5476,21 +5476,21 @@ const mr = {
|
|
|
5476
5476
|
}, f = (O) => {
|
|
5477
5477
|
e.hideOnClick && E(), l("command", O);
|
|
5478
5478
|
}, A = (O) => {
|
|
5479
|
-
var
|
|
5479
|
+
var Y;
|
|
5480
5480
|
if (!u.value || M("manual")) return;
|
|
5481
|
-
const w = O.target, R = i.value, W = (
|
|
5481
|
+
const w = O.target, R = i.value, W = (Y = p.value) == null ? void 0 : Y.$el, Z = h.value, x = R == null ? void 0 : R.contains(w), U = W && W.contains(w), ne = Z == null ? void 0 : Z.contains(w);
|
|
5482
5482
|
!x && !U && !ne && E();
|
|
5483
5483
|
};
|
|
5484
5484
|
let D = 0;
|
|
5485
5485
|
const N = ++D, se = (O) => {
|
|
5486
|
-
var ne,
|
|
5486
|
+
var ne, Y;
|
|
5487
5487
|
if (!u.value || M("manual") || M("click")) return;
|
|
5488
5488
|
const w = O.target, R = i.value, W = (ne = p.value) == null ? void 0 : ne.$el, Z = h.value;
|
|
5489
5489
|
R != null && R.contains(w) || W && W.contains(w) || Z && Z.contains(w);
|
|
5490
5490
|
const x = document.querySelectorAll(".el-dropdown");
|
|
5491
5491
|
let U = !1;
|
|
5492
5492
|
for (const fe of x)
|
|
5493
|
-
if (((
|
|
5493
|
+
if (((Y = fe.dataset) == null ? void 0 : Y.dropdownId) === String(N))
|
|
5494
5494
|
U = !0;
|
|
5495
5495
|
else if (!U && fe.contains(w)) {
|
|
5496
5496
|
E();
|
|
@@ -6799,13 +6799,13 @@ const Sr = {
|
|
|
6799
6799
|
}, ne = (Q) => {
|
|
6800
6800
|
const we = e.rowKey ? Q[e.rowKey] : Q;
|
|
6801
6801
|
return v.value.some((Te) => (e.rowKey ? Te[e.rowKey] : Te) === we);
|
|
6802
|
-
},
|
|
6802
|
+
}, Y = (Q) => Q.width ? typeof Q.width == "number" ? `${Q.width}px` : Q.width : Q.minWidth ? typeof Q.minWidth == "number" ? `${Q.minWidth}px` : Q.minWidth : "auto", fe = (Q) => {
|
|
6803
6803
|
const we = ["el-table__cell"];
|
|
6804
6804
|
return Q.align && we.push(`is-${Q.align}`), Q.sortable && we.push("is-sortable"), Q.fixed && we.push(`is-fixed-${Q.fixed}`), we;
|
|
6805
6805
|
}, G = (Q) => {
|
|
6806
6806
|
const we = ["el-table__cell"];
|
|
6807
6807
|
return Q.align && we.push(`is-${Q.align}`), Q.className && we.push(Q.className), Q.fixed && we.push(`is-fixed-${Q.fixed}`), we;
|
|
6808
|
-
},
|
|
6808
|
+
}, q = (Q, we) => {
|
|
6809
6809
|
const Te = ["el-table__row"];
|
|
6810
6810
|
return p.value === we && Te.push("is-hover"), ne(Q) && Te.push("is-selected"), Te;
|
|
6811
6811
|
}, ue = (Q, we) => we.prop ? Q[we.prop] : "", ke = (Q) => {
|
|
@@ -6913,7 +6913,7 @@ const Sr = {
|
|
|
6913
6913
|
}, null, 8, di)) : V("", !0),
|
|
6914
6914
|
(a(!0), s(de, null, he(E.value, (ge) => (a(), s("col", {
|
|
6915
6915
|
key: Z(ge),
|
|
6916
|
-
width:
|
|
6916
|
+
width: Y(ge)
|
|
6917
6917
|
}, null, 8, ci))), 128))
|
|
6918
6918
|
]),
|
|
6919
6919
|
d("thead", null, [
|
|
@@ -6958,13 +6958,13 @@ const Sr = {
|
|
|
6958
6958
|
}, null, 8, yi)) : V("", !0),
|
|
6959
6959
|
(a(!0), s(de, null, he(E.value, (ge) => (a(), s("col", {
|
|
6960
6960
|
key: Z(ge),
|
|
6961
|
-
width:
|
|
6961
|
+
width: Y(ge)
|
|
6962
6962
|
}, null, 8, bi))), 128))
|
|
6963
6963
|
]),
|
|
6964
6964
|
d("tbody", null, [
|
|
6965
6965
|
(a(!0), s(de, null, he(k.value, (ge, Re) => (a(), s("tr", {
|
|
6966
6966
|
key: x(ge, Re + B.value),
|
|
6967
|
-
class: K(
|
|
6967
|
+
class: K(q(ge, Re + B.value)),
|
|
6968
6968
|
onMouseenter: (De) => ke(Re + B.value),
|
|
6969
6969
|
onMouseleave: $e,
|
|
6970
6970
|
onClick: (De) => Ue(ge, Re + B.value, De)
|
|
@@ -7013,7 +7013,7 @@ const Sr = {
|
|
|
7013
7013
|
}, null, 8, Ei)) : V("", !0),
|
|
7014
7014
|
(a(!0), s(de, null, he(E.value, (ge) => (a(), s("col", {
|
|
7015
7015
|
key: Z(ge),
|
|
7016
|
-
width:
|
|
7016
|
+
width: Y(ge)
|
|
7017
7017
|
}, null, 8, xi))), 128))
|
|
7018
7018
|
]),
|
|
7019
7019
|
d("thead", null, [
|
|
@@ -7059,13 +7059,13 @@ const Sr = {
|
|
|
7059
7059
|
}, null, 8, Di)) : V("", !0),
|
|
7060
7060
|
(a(!0), s(de, null, he(E.value, (ge) => (a(), s("col", {
|
|
7061
7061
|
key: Z(ge),
|
|
7062
|
-
width:
|
|
7062
|
+
width: Y(ge)
|
|
7063
7063
|
}, null, 8, Ai))), 128))
|
|
7064
7064
|
]),
|
|
7065
7065
|
d("tbody", null, [
|
|
7066
7066
|
me.value.length > 0 ? (a(!0), s(de, { key: 0 }, he(me.value, (ge, Re) => (a(), s("tr", {
|
|
7067
7067
|
key: x(ge, Re),
|
|
7068
|
-
class: K(
|
|
7068
|
+
class: K(q(ge, Re)),
|
|
7069
7069
|
onMouseenter: (De) => ke(Re),
|
|
7070
7070
|
onMouseleave: $e,
|
|
7071
7071
|
onClick: (De) => Ue(ge, Re, De)
|
|
@@ -10116,7 +10116,7 @@ const S0 = Nt, Pu = {
|
|
|
10116
10116
|
_.value === 11 ? (_.value = 0, C.value += J) : (_.value = 11, C.value += J);
|
|
10117
10117
|
}, Z = (J) => {
|
|
10118
10118
|
_.value === 11 ? (_.value = 0, C.value++) : _.value = 11;
|
|
10119
|
-
}, x = (J) => v.value === null || g.value === null ? !1 : J === v.value || J === g.value, U = (J) => v.value === null || g.value === null ? !1 : J > v.value && J < g.value, ne = (J) => v.value === null ? !1 : J === v.value,
|
|
10119
|
+
}, x = (J) => v.value === null || g.value === null ? !1 : J === v.value || J === g.value, U = (J) => v.value === null || g.value === null ? !1 : J > v.value && J < g.value, ne = (J) => v.value === null ? !1 : J === v.value, Y = (J) => g.value === null ? !1 : J === g.value, fe = (J) => {
|
|
10120
10120
|
if (v.value === null || g.value !== null)
|
|
10121
10121
|
v.value = J, g.value = null;
|
|
10122
10122
|
else {
|
|
@@ -10124,7 +10124,7 @@ const S0 = Nt, Pu = {
|
|
|
10124
10124
|
const le = new Date(C.value, v.value, 1), Ie = new Date(C.value, g.value, 1);
|
|
10125
10125
|
e("update:modelValue", [le, Ie]), e("change", [le, Ie]);
|
|
10126
10126
|
}
|
|
10127
|
-
}, G = (J) => v.value === null || g.value === null ? !1 : J === v.value || J === g.value,
|
|
10127
|
+
}, G = (J) => v.value === null || g.value === null ? !1 : J === v.value || J === g.value, q = (J) => v.value === null || g.value === null ? !1 : J > v.value && J < g.value, ue = (J) => v.value === null ? !1 : J === v.value, ke = (J) => g.value === null ? !1 : J === g.value, $e = (J) => {
|
|
10128
10128
|
if (v.value === null || g.value !== null)
|
|
10129
10129
|
v.value = J, g.value = null;
|
|
10130
10130
|
else {
|
|
@@ -10329,7 +10329,7 @@ const S0 = Nt, Pu = {
|
|
|
10329
10329
|
"is-selected": x(Me),
|
|
10330
10330
|
"is-in-range": U(Me),
|
|
10331
10331
|
"is-range-start": ne(Me),
|
|
10332
|
-
"is-range-end":
|
|
10332
|
+
"is-range-end": Y(Me)
|
|
10333
10333
|
}
|
|
10334
10334
|
]),
|
|
10335
10335
|
onClick: (Be) => fe(Me)
|
|
@@ -10363,7 +10363,7 @@ const S0 = Nt, Pu = {
|
|
|
10363
10363
|
"el-month-cell",
|
|
10364
10364
|
{
|
|
10365
10365
|
"is-selected": G(Me),
|
|
10366
|
-
"is-in-range":
|
|
10366
|
+
"is-in-range": q(Me),
|
|
10367
10367
|
"is-range-start": ue(Me),
|
|
10368
10368
|
"is-range-end": ke(Me)
|
|
10369
10369
|
}
|
|
@@ -10788,73 +10788,73 @@ const S0 = Nt, Pu = {
|
|
|
10788
10788
|
const e = n, l = t, i = S();
|
|
10789
10789
|
S(), S();
|
|
10790
10790
|
const o = S(!1), p = S(!1), h = S([]), u = S([]), c = S([]), m = S(""), v = y(() => {
|
|
10791
|
-
var
|
|
10792
|
-
return ((
|
|
10791
|
+
var Y;
|
|
10792
|
+
return ((Y = e.props) == null ? void 0 : Y.label) || "label";
|
|
10793
10793
|
}), g = y(() => {
|
|
10794
|
-
var
|
|
10795
|
-
return ((
|
|
10794
|
+
var Y;
|
|
10795
|
+
return ((Y = e.props) == null ? void 0 : Y.value) || "value";
|
|
10796
10796
|
}), C = y(() => {
|
|
10797
|
-
var
|
|
10798
|
-
return ((
|
|
10797
|
+
var Y;
|
|
10798
|
+
return ((Y = e.props) == null ? void 0 : Y.children) || "children";
|
|
10799
10799
|
}), B = y(() => {
|
|
10800
|
-
var
|
|
10801
|
-
return ((
|
|
10800
|
+
var Y;
|
|
10801
|
+
return ((Y = e.props) == null ? void 0 : Y.disabled) || "disabled";
|
|
10802
10802
|
}), _ = y(() => {
|
|
10803
|
-
var
|
|
10804
|
-
return ((
|
|
10803
|
+
var Y;
|
|
10804
|
+
return ((Y = e.props) == null ? void 0 : Y.multiple) || !1;
|
|
10805
10805
|
}), k = y(() => {
|
|
10806
|
-
var
|
|
10807
|
-
return ((
|
|
10806
|
+
var Y;
|
|
10807
|
+
return ((Y = e.props) == null ? void 0 : Y.checkStrictly) || !1;
|
|
10808
10808
|
}), b = y(() => {
|
|
10809
|
-
var
|
|
10810
|
-
return ((
|
|
10809
|
+
var Y;
|
|
10810
|
+
return ((Y = e.props) == null ? void 0 : Y.emitPath) !== !1;
|
|
10811
10811
|
}), z = y(() => {
|
|
10812
|
-
var
|
|
10813
|
-
return ((
|
|
10814
|
-
}), E = y(() => e.filterable || !1), T = y(() => e.collapseTags || !1), M = y(() => e.size === "large" ? "is-large" : e.size === "small" ? "is-small" : ""), I = y(() => _.value ? c.value.length > 0 : u.value.length > 0), P = y(() => _.value ? T.value ? c.value.slice(0, yt).map((
|
|
10815
|
-
label:
|
|
10816
|
-
value:
|
|
10817
|
-
})) : c.value.map((
|
|
10818
|
-
label:
|
|
10819
|
-
value:
|
|
10812
|
+
var Y;
|
|
10813
|
+
return ((Y = e.props) == null ? void 0 : Y.expandTrigger) || "click";
|
|
10814
|
+
}), E = y(() => e.filterable || !1), T = y(() => e.collapseTags || !1), M = y(() => e.size === "large" ? "is-large" : e.size === "small" ? "is-small" : ""), I = y(() => _.value ? c.value.length > 0 : u.value.length > 0), P = y(() => _.value ? T.value ? c.value.slice(0, yt).map((Y) => ({
|
|
10815
|
+
label: Y[v.value],
|
|
10816
|
+
value: Y[g.value]
|
|
10817
|
+
})) : c.value.map((Y) => ({
|
|
10818
|
+
label: Y[v.value],
|
|
10819
|
+
value: Y[g.value]
|
|
10820
10820
|
})) : []), te = y(() => {
|
|
10821
10821
|
if (_.value && c.value.length > 0 || u.value.length === 0) return "";
|
|
10822
|
-
const
|
|
10823
|
-
return e.showAllLevels === !1 ?
|
|
10822
|
+
const Y = u.value.map((fe) => fe[v.value]);
|
|
10823
|
+
return e.showAllLevels === !1 ? Y[Y.length - 1] : Y.join(e.separator || " / ");
|
|
10824
10824
|
}), L = y(() => {
|
|
10825
10825
|
if (!m.value) return [];
|
|
10826
|
-
const
|
|
10827
|
-
for (const
|
|
10828
|
-
const ue =
|
|
10829
|
-
String(ue).includes(m.value) &&
|
|
10830
|
-
const ke =
|
|
10826
|
+
const Y = [], fe = (G) => {
|
|
10827
|
+
for (const q of G) {
|
|
10828
|
+
const ue = q[v.value];
|
|
10829
|
+
String(ue).includes(m.value) && Y.push(q);
|
|
10830
|
+
const ke = q[C.value];
|
|
10831
10831
|
ke && ke.length > 0 && fe(ke);
|
|
10832
10832
|
}
|
|
10833
10833
|
};
|
|
10834
|
-
return fe(e.options),
|
|
10835
|
-
}), $ = (
|
|
10836
|
-
const fe =
|
|
10834
|
+
return fe(e.options), Y;
|
|
10835
|
+
}), $ = (Y) => {
|
|
10836
|
+
const fe = Y[C.value];
|
|
10837
10837
|
return !fe || fe.length === 0;
|
|
10838
|
-
}, F = (
|
|
10839
|
-
if (
|
|
10840
|
-
u.value = u.value.slice(0, fe), u.value.push(
|
|
10841
|
-
const G = me(
|
|
10842
|
-
G.length > 0 ? (h.value = h.value.slice(0, fe + 1), h.value.push(G), k.value ? D(
|
|
10843
|
-
}, A = (
|
|
10838
|
+
}, F = (Y) => u.value.some((fe) => fe[g.value] === Y[g.value]), H = (Y) => u.value.some((fe) => fe[g.value] === Y[g.value]), ee = (Y) => !_.value && !k.value ? F(Y) : c.value.some((fe) => fe[g.value] === Y[g.value]), me = (Y) => Y[C.value] || [], f = (Y, fe) => {
|
|
10839
|
+
if (Y[B.value]) return;
|
|
10840
|
+
u.value = u.value.slice(0, fe), u.value.push(Y);
|
|
10841
|
+
const G = me(Y);
|
|
10842
|
+
G.length > 0 ? (h.value = h.value.slice(0, fe + 1), h.value.push(G), k.value ? D(Y) : _.value ? (c.value.some((ue) => ue[g.value] === Y[g.value]) ? c.value = c.value.filter((ue) => ue[g.value] !== Y[g.value]) : c.value.push({ ...Y }), N()) : (N(), Se())) : (h.value = h.value.slice(0, fe + 1), k.value ? D(Y) : _.value ? (c.value.some((ue) => ue[g.value] === Y[g.value]) ? c.value = c.value.filter((ue) => ue[g.value] !== Y[g.value]) : c.value.push({ ...Y }), N()) : (N(), Se())), l("expandChange", u.value.map((q) => q[g.value]));
|
|
10843
|
+
}, A = (Y, fe) => {
|
|
10844
10844
|
if (z.value === "hover" && !k.value) {
|
|
10845
|
-
u.value = u.value.slice(0, fe), u.value.push(
|
|
10846
|
-
const G = me(
|
|
10845
|
+
u.value = u.value.slice(0, fe), u.value.push(Y);
|
|
10846
|
+
const G = me(Y);
|
|
10847
10847
|
G.length > 0 && (h.value = h.value.slice(0, fe + 1), h.value.push(G));
|
|
10848
10848
|
}
|
|
10849
|
-
}, D = (
|
|
10850
|
-
c.value.some((G) => G[g.value] ===
|
|
10849
|
+
}, D = (Y) => {
|
|
10850
|
+
c.value.some((G) => G[g.value] === Y[g.value]) ? c.value = c.value.filter((G) => G[g.value] !== Y[g.value]) : c.value.push({ ...Y }), N();
|
|
10851
10851
|
}, N = () => {
|
|
10852
|
-
var
|
|
10852
|
+
var Y;
|
|
10853
10853
|
if (_.value) {
|
|
10854
10854
|
const fe = c.value.map((G) => G[g.value]);
|
|
10855
10855
|
l("update:modelValue", fe), l("change", fe);
|
|
10856
10856
|
} else {
|
|
10857
|
-
const fe = b.value ? u.value.map((G) => G[g.value]) : (
|
|
10857
|
+
const fe = b.value ? u.value.map((G) => G[g.value]) : (Y = u.value[u.value.length - 1]) == null ? void 0 : Y[g.value];
|
|
10858
10858
|
l("update:modelValue", fe), l("change", fe);
|
|
10859
10859
|
}
|
|
10860
10860
|
}, se = () => {
|
|
@@ -10865,25 +10865,25 @@ const S0 = Nt, Pu = {
|
|
|
10865
10865
|
o.value = !1, m.value = "", l("blur", new FocusEvent("blur")), l("visibleChange", !1);
|
|
10866
10866
|
}, O = () => {
|
|
10867
10867
|
h.value = [e.options];
|
|
10868
|
-
}, w = (
|
|
10869
|
-
|
|
10870
|
-
}, R = (
|
|
10871
|
-
c.value = c.value.filter((fe) => fe[g.value] !==
|
|
10872
|
-
}, W = (
|
|
10873
|
-
k.value ? D(
|
|
10874
|
-
}, Z = (
|
|
10868
|
+
}, w = (Y) => {
|
|
10869
|
+
Y.stopPropagation(), u.value = [], c.value = [], h.value = [e.options], N();
|
|
10870
|
+
}, R = (Y) => {
|
|
10871
|
+
c.value = c.value.filter((fe) => fe[g.value] !== Y.value), N();
|
|
10872
|
+
}, W = (Y) => {
|
|
10873
|
+
k.value ? D(Y) : (u.value = Z(Y), _.value ? (c.value.some((G) => G[g.value] === Y[g.value]) || c.value.push({ ...Y }), N()) : (N(), Se()));
|
|
10874
|
+
}, Z = (Y, fe = []) => {
|
|
10875
10875
|
for (const G of e.options) {
|
|
10876
|
-
if (G[g.value] ===
|
|
10876
|
+
if (G[g.value] === Y[g.value])
|
|
10877
10877
|
return [...fe, G];
|
|
10878
|
-
const
|
|
10879
|
-
if (
|
|
10880
|
-
const ue = Z(
|
|
10878
|
+
const q = G[C.value];
|
|
10879
|
+
if (q && q.length > 0) {
|
|
10880
|
+
const ue = Z(Y, [...fe, G]);
|
|
10881
10881
|
if (ue.length > 0) return ue;
|
|
10882
10882
|
}
|
|
10883
10883
|
}
|
|
10884
10884
|
return [];
|
|
10885
|
-
}, x = (
|
|
10886
|
-
o.value && i.value && !i.value.contains(
|
|
10885
|
+
}, x = (Y) => {
|
|
10886
|
+
o.value && i.value && !i.value.contains(Y.target) && Se();
|
|
10887
10887
|
}, U = () => {
|
|
10888
10888
|
p.value = !0;
|
|
10889
10889
|
}, ne = () => {
|
|
@@ -10904,13 +10904,13 @@ const S0 = Nt, Pu = {
|
|
|
10904
10904
|
},
|
|
10905
10905
|
openPopper: ye,
|
|
10906
10906
|
closePopper: Se
|
|
10907
|
-
}), (
|
|
10907
|
+
}), (Y, fe) => (a(), s("div", {
|
|
10908
10908
|
ref_key: "cascaderRef",
|
|
10909
10909
|
ref: i,
|
|
10910
10910
|
class: K(["el-cascader", [
|
|
10911
10911
|
M.value,
|
|
10912
10912
|
{
|
|
10913
|
-
"is-disabled":
|
|
10913
|
+
"is-disabled": Y.disabled,
|
|
10914
10914
|
"is-active": o.value,
|
|
10915
10915
|
"is-expand": o.value
|
|
10916
10916
|
}
|
|
@@ -10926,12 +10926,12 @@ const S0 = Nt, Pu = {
|
|
|
10926
10926
|
class: K(["input-wrapper", { "is-focus": o.value }])
|
|
10927
10927
|
}, [
|
|
10928
10928
|
_.value && P.value.length > 0 ? (a(), s("div", Np, [
|
|
10929
|
-
(a(!0), s(de, null, he(P.value, (G,
|
|
10930
|
-
key:
|
|
10929
|
+
(a(!0), s(de, null, he(P.value, (G, q) => (a(), s("span", {
|
|
10930
|
+
key: q,
|
|
10931
10931
|
class: "cascader-tag"
|
|
10932
10932
|
}, [
|
|
10933
10933
|
d("span", Dp, j(G.label), 1),
|
|
10934
|
-
|
|
10934
|
+
Y.disabled ? V("", !0) : (a(), s("span", {
|
|
10935
10935
|
key: 0,
|
|
10936
10936
|
class: "tag-close",
|
|
10937
10937
|
onClick: Ve((ue) => R(G), ["stop"])
|
|
@@ -10963,9 +10963,9 @@ const S0 = Nt, Pu = {
|
|
|
10963
10963
|
T.value && c.value.length > yt ? (a(), s("span", Pp, [
|
|
10964
10964
|
d("span", Lp, "+" + j(c.value.length - yt), 1)
|
|
10965
10965
|
])) : V("", !0)
|
|
10966
|
-
])) : I.value ? (a(), s("span", Fp, j(te.value), 1)) : (a(), s("span", Rp, j(
|
|
10966
|
+
])) : I.value ? (a(), s("span", Fp, j(te.value), 1)) : (a(), s("span", Rp, j(Y.placeholder), 1)),
|
|
10967
10967
|
d("span", Op, [
|
|
10968
|
-
|
|
10968
|
+
Y.clearable && !Y.disabled && p.value && I.value ? (a(), s("span", {
|
|
10969
10969
|
key: 0,
|
|
10970
10970
|
class: "clear-btn",
|
|
10971
10971
|
onClick: Ve(w, ["stop"])
|
|
@@ -10999,12 +10999,12 @@ const S0 = Nt, Pu = {
|
|
|
10999
10999
|
], -1)
|
|
11000
11000
|
])])) : V("", !0),
|
|
11001
11001
|
d("span", {
|
|
11002
|
-
class: K(["dropdown-arrow", { "is-open": o.value }])
|
|
11002
|
+
class: K(["dropdown-arrow", { "is-open": o.value, [`is-${Y.size}`]: !0 }])
|
|
11003
11003
|
}, [...fe[2] || (fe[2] = [
|
|
11004
11004
|
d("svg", {
|
|
11005
11005
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11006
|
-
width: "
|
|
11007
|
-
height: "
|
|
11006
|
+
width: "16",
|
|
11007
|
+
height: "16",
|
|
11008
11008
|
viewBox: "0 0 24 24",
|
|
11009
11009
|
fill: "none",
|
|
11010
11010
|
stroke: "currentColor",
|
|
@@ -11019,8 +11019,8 @@ const S0 = Nt, Pu = {
|
|
|
11019
11019
|
o.value ? (a(), s("div", jp, [
|
|
11020
11020
|
E.value && m.value ? (a(), s("div", Kp, [
|
|
11021
11021
|
d("div", Hp, [
|
|
11022
|
-
(a(!0), s(de, null, he(L.value, (G,
|
|
11023
|
-
key:
|
|
11022
|
+
(a(!0), s(de, null, he(L.value, (G, q) => (a(), s("div", {
|
|
11023
|
+
key: q,
|
|
11024
11024
|
class: K(["filter-node", { "is-checked": ee(G) }]),
|
|
11025
11025
|
onClick: (ue) => W(G)
|
|
11026
11026
|
}, [
|
|
@@ -11042,8 +11042,8 @@ const S0 = Nt, Pu = {
|
|
|
11042
11042
|
L.value.length === 0 ? (a(), s("div", qp, " 无匹配数据 ")) : V("", !0)
|
|
11043
11043
|
])
|
|
11044
11044
|
])) : (a(), s("div", Xp, [
|
|
11045
|
-
(a(!0), s(de, null, he(h.value, (G,
|
|
11046
|
-
key:
|
|
11045
|
+
(a(!0), s(de, null, he(h.value, (G, q) => (a(), s("div", {
|
|
11046
|
+
key: q,
|
|
11047
11047
|
class: "cascader-menu"
|
|
11048
11048
|
}, [
|
|
11049
11049
|
(a(!0), s(de, null, he(G, (ue) => (a(), s("div", {
|
|
@@ -11055,8 +11055,8 @@ const S0 = Nt, Pu = {
|
|
|
11055
11055
|
"is-checkable": k.value,
|
|
11056
11056
|
"is-leaf": $(ue)
|
|
11057
11057
|
}]),
|
|
11058
|
-
onClick: (ke) => f(ue,
|
|
11059
|
-
onMouseenter: (ke) => A(ue,
|
|
11058
|
+
onClick: (ke) => f(ue, q),
|
|
11059
|
+
onMouseenter: (ke) => A(ue, q)
|
|
11060
11060
|
}, [
|
|
11061
11061
|
k.value ? (a(), s("span", Jp, [
|
|
11062
11062
|
ee(ue) ? (a(), s("span", Zp, [...fe[4] || (fe[4] = [
|
|
@@ -11990,8 +11990,8 @@ const S0 = Nt, Pu = {
|
|
|
11990
11990
|
return x;
|
|
11991
11991
|
const ne = b(U);
|
|
11992
11992
|
if (ne.length) {
|
|
11993
|
-
const
|
|
11994
|
-
if (
|
|
11993
|
+
const Y = W(ne, U);
|
|
11994
|
+
if (Y !== null) return Y;
|
|
11995
11995
|
}
|
|
11996
11996
|
}
|
|
11997
11997
|
return null;
|
|
@@ -12269,8 +12269,8 @@ const S0 = Nt, Pu = {
|
|
|
12269
12269
|
return Z;
|
|
12270
12270
|
const ne = b(U);
|
|
12271
12271
|
if (ne.length) {
|
|
12272
|
-
const
|
|
12273
|
-
if (
|
|
12272
|
+
const Y = R(ne, Z + 1, x);
|
|
12273
|
+
if (Y !== -1) return Y;
|
|
12274
12274
|
}
|
|
12275
12275
|
}
|
|
12276
12276
|
return -1;
|
|
@@ -12281,11 +12281,11 @@ const S0 = Nt, Pu = {
|
|
|
12281
12281
|
getPath: (w) => {
|
|
12282
12282
|
const R = [], W = (Z, x, U) => {
|
|
12283
12283
|
for (const ne of Z) {
|
|
12284
|
-
const
|
|
12284
|
+
const Y = [...U, ne];
|
|
12285
12285
|
if (k(ne) === x)
|
|
12286
|
-
return R.push(...
|
|
12286
|
+
return R.push(...Y), !0;
|
|
12287
12287
|
const fe = b(ne);
|
|
12288
|
-
if (fe.length && W(fe, x,
|
|
12288
|
+
if (fe.length && W(fe, x, Y))
|
|
12289
12289
|
return !0;
|
|
12290
12290
|
}
|
|
12291
12291
|
return !1;
|
|
@@ -15100,26 +15100,26 @@ const jf = {
|
|
|
15100
15100
|
backgroundColor: k.value
|
|
15101
15101
|
} : {} : {}), M = y(() => {
|
|
15102
15102
|
if (!l.value) return {};
|
|
15103
|
-
const G = l.value.getBoundingClientRect(),
|
|
15103
|
+
const G = l.value.getBoundingClientRect(), q = 260, ue = 380, ke = 5;
|
|
15104
15104
|
let $e = G.bottom + ke, xe = G.left;
|
|
15105
|
-
return G.bottom + ue + ke > window.innerHeight && ($e = G.top - ue - ke), G.left +
|
|
15105
|
+
return G.bottom + ue + ke > window.innerHeight && ($e = G.top - ue - ke), G.left + q + ke > window.innerWidth && (xe = window.innerWidth - q - ke), $e < ke && ($e = ke), {
|
|
15106
15106
|
top: `${$e}px`,
|
|
15107
15107
|
left: `${xe}px`
|
|
15108
15108
|
};
|
|
15109
15109
|
});
|
|
15110
15110
|
function I(G) {
|
|
15111
|
-
const
|
|
15112
|
-
return
|
|
15113
|
-
r: parseInt(
|
|
15114
|
-
g: parseInt(
|
|
15115
|
-
b: parseInt(
|
|
15111
|
+
const q = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(G);
|
|
15112
|
+
return q ? {
|
|
15113
|
+
r: parseInt(q[1], 16),
|
|
15114
|
+
g: parseInt(q[2], 16),
|
|
15115
|
+
b: parseInt(q[3], 16)
|
|
15116
15116
|
} : null;
|
|
15117
15117
|
}
|
|
15118
|
-
function P(G,
|
|
15119
|
-
return "#" + [G,
|
|
15118
|
+
function P(G, q, ue) {
|
|
15119
|
+
return "#" + [G, q, ue].map((ke) => ke.toString(16).padStart(2, "0")).join("");
|
|
15120
15120
|
}
|
|
15121
|
-
function te(G,
|
|
15122
|
-
const ke =
|
|
15121
|
+
function te(G, q, ue) {
|
|
15122
|
+
const ke = q / 100, $e = ue / 100, xe = G / 60, Ne = $e * ke, Ue = Ne * (1 - Math.abs(xe % 2 - 1)), He = $e - Ne;
|
|
15123
15123
|
let Ye = 0, Je = 0, Qe = 0;
|
|
15124
15124
|
return xe >= 0 && xe < 1 ? (Ye = Ne, Je = Ue, Qe = 0) : xe >= 1 && xe < 2 ? (Ye = Ue, Je = Ne, Qe = 0) : xe >= 2 && xe < 3 ? (Ye = 0, Je = Ne, Qe = Ue) : xe >= 3 && xe < 4 ? (Ye = 0, Je = Ue, Qe = Ne) : xe >= 4 && xe < 5 ? (Ye = Ue, Je = 0, Qe = Ne) : (Ye = Ne, Je = 0, Qe = Ue), {
|
|
15125
15125
|
r: Math.round((Ye + He) * 255),
|
|
@@ -15127,8 +15127,8 @@ const jf = {
|
|
|
15127
15127
|
b: Math.round((Qe + He) * 255)
|
|
15128
15128
|
};
|
|
15129
15129
|
}
|
|
15130
|
-
function L(G,
|
|
15131
|
-
const ke = G / 255, $e =
|
|
15130
|
+
function L(G, q, ue) {
|
|
15131
|
+
const ke = G / 255, $e = q / 255, xe = ue / 255, Ne = Math.max(ke, $e, xe), Ue = Math.min(ke, $e, xe), He = Ne - Ue;
|
|
15132
15132
|
let Ye = 0;
|
|
15133
15133
|
const Je = Ne === 0 ? 0 : He / Ne * 100, Qe = Ne * 100;
|
|
15134
15134
|
if (He !== 0)
|
|
@@ -15148,55 +15148,55 @@ const jf = {
|
|
|
15148
15148
|
function $() {
|
|
15149
15149
|
const G = te(c.value, m.value, v.value);
|
|
15150
15150
|
B.value = G, C.value = P(G.r, G.g, G.b);
|
|
15151
|
-
let
|
|
15152
|
-
t.showAlpha && g.value < 100 && (
|
|
15151
|
+
let q = C.value;
|
|
15152
|
+
t.showAlpha && g.value < 100 && (q = `rgba(${G.r}, ${G.g}, ${G.b}, ${g.value / 100})`), e("update:modelValue", q), e("change", q), F(), H(), t.showAlpha && ee();
|
|
15153
15153
|
}
|
|
15154
15154
|
function F() {
|
|
15155
15155
|
const G = o.value;
|
|
15156
15156
|
if (!G) return;
|
|
15157
|
-
const
|
|
15158
|
-
if (!
|
|
15157
|
+
const q = G.getContext("2d");
|
|
15158
|
+
if (!q) return;
|
|
15159
15159
|
const ue = G.width, ke = G.height;
|
|
15160
|
-
|
|
15161
|
-
const $e =
|
|
15162
|
-
$e.addColorStop(0, "rgb(255, 255, 255)"), $e.addColorStop(1, "transparent"),
|
|
15163
|
-
const xe =
|
|
15164
|
-
xe.addColorStop(0, "transparent"), xe.addColorStop(1, "rgb(0, 0, 0)"),
|
|
15160
|
+
q.clearRect(0, 0, ue, ke), q.fillStyle = `hsl(${c.value}, 100%, 50%)`, q.fillRect(0, 0, ue, ke);
|
|
15161
|
+
const $e = q.createLinearGradient(0, 0, ue, 0);
|
|
15162
|
+
$e.addColorStop(0, "rgb(255, 255, 255)"), $e.addColorStop(1, "transparent"), q.fillStyle = $e, q.fillRect(0, 0, ue, ke);
|
|
15163
|
+
const xe = q.createLinearGradient(0, 0, 0, ke);
|
|
15164
|
+
xe.addColorStop(0, "transparent"), xe.addColorStop(1, "rgb(0, 0, 0)"), q.fillStyle = xe, q.fillRect(0, 0, ue, ke);
|
|
15165
15165
|
}
|
|
15166
15166
|
function H() {
|
|
15167
15167
|
const G = p.value;
|
|
15168
15168
|
if (!G) return;
|
|
15169
|
-
const
|
|
15170
|
-
if (!
|
|
15169
|
+
const q = G.getContext("2d");
|
|
15170
|
+
if (!q) return;
|
|
15171
15171
|
const ue = G.width, ke = G.height;
|
|
15172
|
-
|
|
15173
|
-
const $e =
|
|
15174
|
-
$e.addColorStop(0, "hsl(0, 100%, 50%)"), $e.addColorStop(1 / 6, "hsl(60, 100%, 50%)"), $e.addColorStop(2 / 6, "hsl(120, 100%, 50%)"), $e.addColorStop(3 / 6, "hsl(180, 100%, 50%)"), $e.addColorStop(4 / 6, "hsl(240, 100%, 50%)"), $e.addColorStop(5 / 6, "hsl(300, 100%, 50%)"), $e.addColorStop(1, "hsl(360, 100%, 50%)"),
|
|
15172
|
+
q.clearRect(0, 0, ue, ke);
|
|
15173
|
+
const $e = q.createLinearGradient(0, 0, ue, 0);
|
|
15174
|
+
$e.addColorStop(0, "hsl(0, 100%, 50%)"), $e.addColorStop(1 / 6, "hsl(60, 100%, 50%)"), $e.addColorStop(2 / 6, "hsl(120, 100%, 50%)"), $e.addColorStop(3 / 6, "hsl(180, 100%, 50%)"), $e.addColorStop(4 / 6, "hsl(240, 100%, 50%)"), $e.addColorStop(5 / 6, "hsl(300, 100%, 50%)"), $e.addColorStop(1, "hsl(360, 100%, 50%)"), q.fillStyle = $e, q.fillRect(0, 0, ue, ke);
|
|
15175
15175
|
}
|
|
15176
15176
|
function ee() {
|
|
15177
15177
|
const G = h.value;
|
|
15178
15178
|
if (!G) return;
|
|
15179
|
-
const
|
|
15180
|
-
if (!
|
|
15179
|
+
const q = G.getContext("2d");
|
|
15180
|
+
if (!q) return;
|
|
15181
15181
|
const ue = G.width, ke = G.height;
|
|
15182
|
-
|
|
15182
|
+
q.clearRect(0, 0, ue, ke);
|
|
15183
15183
|
const $e = I(C.value);
|
|
15184
15184
|
if (!$e) return;
|
|
15185
|
-
const xe =
|
|
15186
|
-
xe.addColorStop(0, "transparent"), xe.addColorStop(1, `rgb(${$e.r}, ${$e.g}, ${$e.b})`),
|
|
15185
|
+
const xe = q.createLinearGradient(0, 0, ue, 0);
|
|
15186
|
+
xe.addColorStop(0, "transparent"), xe.addColorStop(1, `rgb(${$e.r}, ${$e.g}, ${$e.b})`), q.fillStyle = xe, q.fillRect(0, 0, ue, ke), q.fillStyle = "rgba(128, 128, 128, 0.5)";
|
|
15187
15187
|
const Ne = 8;
|
|
15188
15188
|
for (let Ue = 0; Ue < ke; Ue += Ne)
|
|
15189
15189
|
for (let He = 0; He < ue; He += Ne * 2)
|
|
15190
|
-
|
|
15191
|
-
|
|
15190
|
+
q.fillRect(He, Ue, Ne, Ne), q.fillRect(He + Ne, Ue + Ne, Ne, Ne);
|
|
15191
|
+
q.fillStyle = xe, q.fillRect(0, 0, ue, ke);
|
|
15192
15192
|
}
|
|
15193
15193
|
function me(G) {
|
|
15194
15194
|
f(G), document.addEventListener("mousemove", f), document.addEventListener("mouseup", A);
|
|
15195
15195
|
}
|
|
15196
15196
|
function f(G) {
|
|
15197
|
-
const
|
|
15198
|
-
if (!
|
|
15199
|
-
const ue =
|
|
15197
|
+
const q = o.value;
|
|
15198
|
+
if (!q) return;
|
|
15199
|
+
const ue = q.getBoundingClientRect(), ke = Math.max(0, Math.min(1, (G.clientX - ue.left) / ue.width)), $e = Math.max(0, Math.min(1, (G.clientY - ue.top) / ue.height));
|
|
15200
15200
|
m.value = ke * 100, v.value = (1 - $e) * 100, $();
|
|
15201
15201
|
}
|
|
15202
15202
|
function A() {
|
|
@@ -15206,9 +15206,9 @@ const jf = {
|
|
|
15206
15206
|
N(G), document.addEventListener("mousemove", N), document.addEventListener("mouseup", se);
|
|
15207
15207
|
}
|
|
15208
15208
|
function N(G) {
|
|
15209
|
-
const
|
|
15210
|
-
if (!
|
|
15211
|
-
const ue =
|
|
15209
|
+
const q = p.value;
|
|
15210
|
+
if (!q) return;
|
|
15211
|
+
const ue = q.getBoundingClientRect(), ke = Math.max(0, Math.min(1, (G.clientY - ue.top) / ue.height));
|
|
15212
15212
|
c.value = ke * 360, $();
|
|
15213
15213
|
}
|
|
15214
15214
|
function se() {
|
|
@@ -15218,9 +15218,9 @@ const jf = {
|
|
|
15218
15218
|
Se(G), document.addEventListener("mousemove", Se), document.addEventListener("mouseup", O);
|
|
15219
15219
|
}
|
|
15220
15220
|
function Se(G) {
|
|
15221
|
-
const
|
|
15222
|
-
if (!
|
|
15223
|
-
const ue =
|
|
15221
|
+
const q = h.value;
|
|
15222
|
+
if (!q) return;
|
|
15223
|
+
const ue = q.getBoundingClientRect(), ke = Math.max(0, Math.min(1, (G.clientX - ue.left) / ue.width));
|
|
15224
15224
|
let $e = Math.round(ke * 100);
|
|
15225
15225
|
$e > 100 && ($e = 100), $e < 0 && ($e = 0), g.value = $e, _.value = $e;
|
|
15226
15226
|
const xe = I(C.value);
|
|
@@ -15234,24 +15234,24 @@ const jf = {
|
|
|
15234
15234
|
document.removeEventListener("mousemove", Se), document.removeEventListener("mouseup", O);
|
|
15235
15235
|
}
|
|
15236
15236
|
function w(G) {
|
|
15237
|
-
const
|
|
15238
|
-
if (
|
|
15239
|
-
B.value =
|
|
15240
|
-
const ue = L(
|
|
15237
|
+
const q = I(G);
|
|
15238
|
+
if (q) {
|
|
15239
|
+
B.value = q, C.value = G;
|
|
15240
|
+
const ue = L(q.r, q.g, q.b);
|
|
15241
15241
|
c.value = ue.h, m.value = ue.s, v.value = ue.v;
|
|
15242
15242
|
let ke = C.value;
|
|
15243
|
-
t.showAlpha && g.value < 100 && (ke = `rgba(${
|
|
15243
|
+
t.showAlpha && g.value < 100 && (ke = `rgba(${q.r}, ${q.g}, ${q.b}, ${g.value / 100})`), e("update:modelValue", ke), e("change", ke), F(), H(), t.showAlpha && ee();
|
|
15244
15244
|
}
|
|
15245
15245
|
}
|
|
15246
15246
|
function R() {
|
|
15247
|
-
const { r: G, g:
|
|
15247
|
+
const { r: G, g: q, b: ue } = B.value, ke = Math.max(0, Math.min(255, parseInt(String(G)) || 0)), $e = Math.max(0, Math.min(255, parseInt(String(q)) || 0)), xe = Math.max(0, Math.min(255, parseInt(String(ue)) || 0));
|
|
15248
15248
|
B.value = { r: ke, g: $e, b: xe }, C.value = P(ke, $e, xe);
|
|
15249
15249
|
const Ne = L(ke, $e, xe);
|
|
15250
15250
|
c.value = Ne.h, m.value = Ne.s, v.value = Ne.v, F(), H(), t.showAlpha && ee();
|
|
15251
15251
|
}
|
|
15252
15252
|
function W(G) {
|
|
15253
|
-
const
|
|
15254
|
-
g.value =
|
|
15253
|
+
const q = Math.max(0, Math.min(100, parseInt(String(G)) || 0));
|
|
15254
|
+
g.value = q, _.value = q;
|
|
15255
15255
|
const ue = I(C.value);
|
|
15256
15256
|
if (ue) {
|
|
15257
15257
|
const ke = `rgba(${ue.r}, ${ue.g}, ${ue.b}, ${g.value / 100})`;
|
|
@@ -15260,13 +15260,13 @@ const jf = {
|
|
|
15260
15260
|
ee();
|
|
15261
15261
|
}
|
|
15262
15262
|
function Z(G) {
|
|
15263
|
-
const
|
|
15264
|
-
if (
|
|
15265
|
-
B.value =
|
|
15266
|
-
const ue = L(
|
|
15263
|
+
const q = I(G);
|
|
15264
|
+
if (q) {
|
|
15265
|
+
B.value = q, C.value = G;
|
|
15266
|
+
const ue = L(q.r, q.g, q.b);
|
|
15267
15267
|
c.value = ue.h, m.value = ue.s, v.value = ue.v;
|
|
15268
15268
|
let ke = C.value;
|
|
15269
|
-
t.showAlpha && g.value < 100 && (ke = `rgba(${
|
|
15269
|
+
t.showAlpha && g.value < 100 && (ke = `rgba(${q.r}, ${q.g}, ${q.b}, ${g.value / 100})`), e("update:modelValue", ke), e("change", ke), $();
|
|
15270
15270
|
}
|
|
15271
15271
|
}
|
|
15272
15272
|
const x = () => {
|
|
@@ -15275,26 +15275,26 @@ const jf = {
|
|
|
15275
15275
|
const G = I(t.modelValue);
|
|
15276
15276
|
if (G) {
|
|
15277
15277
|
B.value = G, C.value = t.modelValue;
|
|
15278
|
-
const
|
|
15279
|
-
c.value =
|
|
15278
|
+
const q = L(G.r, G.g, G.b);
|
|
15279
|
+
c.value = q.h, m.value = q.s, v.value = q.v;
|
|
15280
15280
|
}
|
|
15281
15281
|
}
|
|
15282
15282
|
})));
|
|
15283
15283
|
};
|
|
15284
15284
|
function U() {
|
|
15285
15285
|
Oe(() => {
|
|
15286
|
-
const G = o.value,
|
|
15287
|
-
G && (G.width = 180, G.height = 120),
|
|
15286
|
+
const G = o.value, q = p.value, ue = h.value;
|
|
15287
|
+
G && (G.width = 180, G.height = 120), q && (q.width = 180, q.height = 14), ue && (ue.width = 180, ue.height = 14), $();
|
|
15288
15288
|
});
|
|
15289
15289
|
}
|
|
15290
15290
|
_e(
|
|
15291
15291
|
() => t.modelValue,
|
|
15292
15292
|
(G) => {
|
|
15293
15293
|
if (G) {
|
|
15294
|
-
const
|
|
15295
|
-
if (
|
|
15296
|
-
B.value =
|
|
15297
|
-
const ue = L(
|
|
15294
|
+
const q = I(G);
|
|
15295
|
+
if (q) {
|
|
15296
|
+
B.value = q, C.value = G;
|
|
15297
|
+
const ue = L(q.r, q.g, q.b);
|
|
15298
15298
|
c.value = ue.h, m.value = ue.s, v.value = ue.v;
|
|
15299
15299
|
}
|
|
15300
15300
|
}
|
|
@@ -15307,17 +15307,17 @@ const jf = {
|
|
|
15307
15307
|
});
|
|
15308
15308
|
const ne = () => {
|
|
15309
15309
|
u.value = !1;
|
|
15310
|
-
},
|
|
15310
|
+
}, Y = () => {
|
|
15311
15311
|
if (!k.value) return;
|
|
15312
15312
|
const G = I(k.value);
|
|
15313
15313
|
if (!G) return;
|
|
15314
15314
|
B.value = G, C.value = k.value;
|
|
15315
|
-
const
|
|
15316
|
-
c.value =
|
|
15315
|
+
const q = L(G.r, G.g, G.b);
|
|
15316
|
+
c.value = q.h, m.value = q.s, v.value = q.v, F(), H(), t.showAlpha && ee();
|
|
15317
15317
|
}, fe = (G) => {
|
|
15318
15318
|
u.value && l.value && i.value && !l.value.contains(G.target) && !i.value.contains(G.target) && (u.value = !1);
|
|
15319
15319
|
};
|
|
15320
|
-
return (G,
|
|
15320
|
+
return (G, q) => {
|
|
15321
15321
|
const ue = ze("el-input"), ke = ze("el-button");
|
|
15322
15322
|
return a(), s("div", {
|
|
15323
15323
|
class: K(["el-color-picker", [`el-color-picker--${G.size || "default"}`]]),
|
|
@@ -15380,7 +15380,7 @@ const jf = {
|
|
|
15380
15380
|
d("div", {
|
|
15381
15381
|
class: "preview-original",
|
|
15382
15382
|
style: re(T.value),
|
|
15383
|
-
onClick:
|
|
15383
|
+
onClick: Y
|
|
15384
15384
|
}, null, 4),
|
|
15385
15385
|
d("div", {
|
|
15386
15386
|
class: "preview-color",
|
|
@@ -15388,10 +15388,10 @@ const jf = {
|
|
|
15388
15388
|
}, null, 4)
|
|
15389
15389
|
]),
|
|
15390
15390
|
d("div", Uh, [
|
|
15391
|
-
|
|
15391
|
+
q[5] || (q[5] = d("span", { class: "label" }, "HEX", -1)),
|
|
15392
15392
|
ce(ue, {
|
|
15393
15393
|
modelValue: C.value,
|
|
15394
|
-
"onUpdate:modelValue":
|
|
15394
|
+
"onUpdate:modelValue": q[0] || (q[0] = ($e) => C.value = $e),
|
|
15395
15395
|
size: "small",
|
|
15396
15396
|
onChange: w
|
|
15397
15397
|
}, null, 8, ["modelValue"])
|
|
@@ -15409,37 +15409,37 @@ const jf = {
|
|
|
15409
15409
|
d("div", Xh, [
|
|
15410
15410
|
d("div", Gh, [
|
|
15411
15411
|
d("div", Jh, [
|
|
15412
|
-
|
|
15412
|
+
q[6] || (q[6] = d("span", { class: "label" }, "R", -1)),
|
|
15413
15413
|
ce(ue, {
|
|
15414
15414
|
modelValue: B.value.r,
|
|
15415
|
-
"onUpdate:modelValue":
|
|
15415
|
+
"onUpdate:modelValue": q[1] || (q[1] = ($e) => B.value.r = $e),
|
|
15416
15416
|
size: "small",
|
|
15417
15417
|
onChange: R
|
|
15418
15418
|
}, null, 8, ["modelValue"])
|
|
15419
15419
|
]),
|
|
15420
15420
|
d("div", Zh, [
|
|
15421
|
-
|
|
15421
|
+
q[7] || (q[7] = d("span", { class: "label" }, "G", -1)),
|
|
15422
15422
|
ce(ue, {
|
|
15423
15423
|
modelValue: B.value.g,
|
|
15424
|
-
"onUpdate:modelValue":
|
|
15424
|
+
"onUpdate:modelValue": q[2] || (q[2] = ($e) => B.value.g = $e),
|
|
15425
15425
|
size: "small",
|
|
15426
15426
|
onChange: R
|
|
15427
15427
|
}, null, 8, ["modelValue"])
|
|
15428
15428
|
]),
|
|
15429
15429
|
d("div", Qh, [
|
|
15430
|
-
|
|
15430
|
+
q[8] || (q[8] = d("span", { class: "label" }, "B", -1)),
|
|
15431
15431
|
ce(ue, {
|
|
15432
15432
|
modelValue: B.value.b,
|
|
15433
|
-
"onUpdate:modelValue":
|
|
15433
|
+
"onUpdate:modelValue": q[3] || (q[3] = ($e) => B.value.b = $e),
|
|
15434
15434
|
size: "small",
|
|
15435
15435
|
onChange: R
|
|
15436
15436
|
}, null, 8, ["modelValue"])
|
|
15437
15437
|
]),
|
|
15438
15438
|
G.showAlpha ? (a(), s("div", eg, [
|
|
15439
|
-
|
|
15439
|
+
q[9] || (q[9] = d("span", { class: "label" }, "A", -1)),
|
|
15440
15440
|
ce(ue, {
|
|
15441
15441
|
modelValue: _.value,
|
|
15442
|
-
"onUpdate:modelValue":
|
|
15442
|
+
"onUpdate:modelValue": q[4] || (q[4] = ($e) => _.value = $e),
|
|
15443
15443
|
size: "small",
|
|
15444
15444
|
onChange: W
|
|
15445
15445
|
}, null, 8, ["modelValue"])
|
|
@@ -15451,7 +15451,7 @@ const jf = {
|
|
|
15451
15451
|
type: "primary",
|
|
15452
15452
|
onClick: ne
|
|
15453
15453
|
}, {
|
|
15454
|
-
default: pe(() => [...
|
|
15454
|
+
default: pe(() => [...q[10] || (q[10] = [
|
|
15455
15455
|
Ce("确定", -1)
|
|
15456
15456
|
])]),
|
|
15457
15457
|
_: 1
|