@scorchingft/ui-plus 1.0.10 → 1.0.11
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.
|
@@ -45,7 +45,7 @@ const o2 = { key: 0 }, a2 = /* @__PURE__ */ a({
|
|
|
45
45
|
justifyContent: "center",
|
|
46
46
|
alignItems: "center"
|
|
47
47
|
}), e.disabled && (t.value.cursor = "not-allowed");
|
|
48
|
-
}), (
|
|
48
|
+
}), (C, p) => (r(), o("div", {
|
|
49
49
|
cursor: "",
|
|
50
50
|
class: e2([
|
|
51
51
|
"sf-button",
|
|
@@ -61,13 +61,13 @@ const o2 = { key: 0 }, a2 = /* @__PURE__ */ a({
|
|
|
61
61
|
e.icon ? (r(), o("span", o2, [
|
|
62
62
|
(r(), n2(s2(e.icon)))
|
|
63
63
|
])) : r2("", !0),
|
|
64
|
-
k(
|
|
64
|
+
k(C.$slots, "default", {}, void 0, !0)
|
|
65
65
|
], 6));
|
|
66
66
|
}
|
|
67
67
|
}), i = (n, e) => {
|
|
68
68
|
const t = n.__vccOpts || n;
|
|
69
|
-
for (const [l,
|
|
70
|
-
t[l] =
|
|
69
|
+
for (const [l, C] of e)
|
|
70
|
+
t[l] = C;
|
|
71
71
|
return t;
|
|
72
72
|
}, i2 = /* @__PURE__ */ i(a2, [["__scopeId", "data-v-bd2e7c01"]]), l2 = /* @__PURE__ */ a({
|
|
73
73
|
name: "SfCard",
|
|
@@ -143,7 +143,7 @@ const o2 = { key: 0 }, a2 = /* @__PURE__ */ a({
|
|
|
143
143
|
border: `${e.border} ${e.dashed ? "dashed" : "solid"} ${e.color}`,
|
|
144
144
|
borderRadius: "3px"
|
|
145
145
|
});
|
|
146
|
-
}), (l,
|
|
146
|
+
}), (l, C) => (r(), o("div", {
|
|
147
147
|
class: "sf-card",
|
|
148
148
|
style: I(t.value)
|
|
149
149
|
}, [
|
|
@@ -189,7 +189,7 @@ const o2 = { key: 0 }, a2 = /* @__PURE__ */ a({
|
|
|
189
189
|
height: `${e.size}px`,
|
|
190
190
|
color: e.color
|
|
191
191
|
};
|
|
192
|
-
}), (l,
|
|
192
|
+
}), (l, C) => (r(), o("div", {
|
|
193
193
|
class: "sf-icon",
|
|
194
194
|
ref: "wrapper",
|
|
195
195
|
style: I(t.value)
|
|
@@ -1442,7 +1442,7 @@ const _2 = {
|
|
|
1442
1442
|
let j5 = 1, t4 = 1;
|
|
1443
1443
|
const f = (n) => v(n);
|
|
1444
1444
|
function v(n) {
|
|
1445
|
-
const e = n.method ? n.method : "top center";
|
|
1445
|
+
const e = n.method ? n.method : "top center", t = n.duration ? n.duration : 3e3;
|
|
1446
1446
|
switch (e4(
|
|
1447
1447
|
e,
|
|
1448
1448
|
n.type,
|
|
@@ -1455,43 +1455,43 @@ function v(n) {
|
|
|
1455
1455
|
n.textcolor
|
|
1456
1456
|
), e) {
|
|
1457
1457
|
case "top center":
|
|
1458
|
-
const
|
|
1458
|
+
const l = d[d.length - 1];
|
|
1459
1459
|
b(
|
|
1460
1460
|
"enter",
|
|
1461
1461
|
"auto",
|
|
1462
|
-
|
|
1462
|
+
l.id,
|
|
1463
1463
|
n.type,
|
|
1464
1464
|
n.plain,
|
|
1465
|
-
|
|
1465
|
+
t
|
|
1466
1466
|
), n.showClose || b(
|
|
1467
1467
|
"leave",
|
|
1468
1468
|
"auto",
|
|
1469
|
-
|
|
1469
|
+
l.id,
|
|
1470
1470
|
n.type,
|
|
1471
1471
|
n.plain,
|
|
1472
|
-
|
|
1472
|
+
t
|
|
1473
1473
|
);
|
|
1474
1474
|
break;
|
|
1475
1475
|
case "center":
|
|
1476
1476
|
n.showClose = !1;
|
|
1477
|
-
const
|
|
1477
|
+
const C = h[h.length - 1];
|
|
1478
1478
|
A(
|
|
1479
1479
|
"enter",
|
|
1480
|
-
|
|
1480
|
+
C.id,
|
|
1481
1481
|
n.type,
|
|
1482
1482
|
n.plain,
|
|
1483
|
-
|
|
1483
|
+
t
|
|
1484
1484
|
), A(
|
|
1485
1485
|
"leave",
|
|
1486
|
-
|
|
1486
|
+
C.id,
|
|
1487
1487
|
n.type,
|
|
1488
1488
|
n.plain,
|
|
1489
|
-
|
|
1489
|
+
t
|
|
1490
1490
|
);
|
|
1491
1491
|
break;
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
|
-
function e4(n, e, t = !0, l,
|
|
1494
|
+
function e4(n, e, t = !0, l, C = !0, p, c = !1, u, _) {
|
|
1495
1495
|
let $ = 0, M = 0;
|
|
1496
1496
|
switch (n) {
|
|
1497
1497
|
case "top center":
|
|
@@ -1507,7 +1507,7 @@ function e4(n, e, t = !0, l, p = !0, C, c = !1, u, _) {
|
|
|
1507
1507
|
container: document.createElement("div"),
|
|
1508
1508
|
offset: $
|
|
1509
1509
|
};
|
|
1510
|
-
switch (
|
|
1510
|
+
switch (C || (u && (w.container.style.backgroundColor = u), _ && (w.container.style.color = _)), w.vnode = a({
|
|
1511
1511
|
setup() {
|
|
1512
1512
|
return () => m(
|
|
1513
1513
|
"div",
|
|
@@ -1517,14 +1517,14 @@ function e4(n, e, t = !0, l, p = !0, C, c = !1, u, _) {
|
|
|
1517
1517
|
Z,
|
|
1518
1518
|
{ size: 20, color: `.sf-message-${e}-icon` },
|
|
1519
1519
|
{
|
|
1520
|
-
default: () =>
|
|
1520
|
+
default: () => p ? typeof p == "string" ? m(S[p]) : m(p) : m(X5[e])
|
|
1521
1521
|
}
|
|
1522
1522
|
) : null,
|
|
1523
1523
|
m("span", null, `${l}`),
|
|
1524
1524
|
c ? m(Z, {
|
|
1525
1525
|
size: 20,
|
|
1526
1526
|
onClick: (g) => {
|
|
1527
|
-
g.stopPropagation(), b("leave", "click", w.id, e,
|
|
1527
|
+
g.stopPropagation(), b("leave", "click", w.id, e, C);
|
|
1528
1528
|
}
|
|
1529
1529
|
}, {
|
|
1530
1530
|
default: () => {
|
|
@@ -1544,34 +1544,34 @@ function e4(n, e, t = !0, l, p = !0, C, c = !1, u, _) {
|
|
|
1544
1544
|
break;
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
|
-
function A(n, e, t = "", l = !0,
|
|
1547
|
+
function A(n, e, t = "", l = !0, C) {
|
|
1548
1548
|
switch (n) {
|
|
1549
1549
|
case "enter": {
|
|
1550
|
-
const
|
|
1551
|
-
if (!
|
|
1552
|
-
const c = D(
|
|
1553
|
-
W(c,
|
|
1550
|
+
const p = h.find((u) => u.id === e);
|
|
1551
|
+
if (!p) return;
|
|
1552
|
+
const c = D(p.vnode);
|
|
1553
|
+
W(c, p.container), p.container.className = l ? `sf-message sf-${t}-plain sf-center-enter` : `sf-message sf-${t} sf-center-enter`, document.body.appendChild(p.container);
|
|
1554
1554
|
break;
|
|
1555
1555
|
}
|
|
1556
1556
|
case "leave":
|
|
1557
1557
|
setTimeout(() => {
|
|
1558
|
-
const
|
|
1559
|
-
if (
|
|
1560
|
-
const c = h[
|
|
1558
|
+
const p = h.findIndex((u) => u.id === e);
|
|
1559
|
+
if (p === -1) return;
|
|
1560
|
+
const c = h[p];
|
|
1561
1561
|
c.container.className = l ? `sf-message sf-${t}-plain sf-center-leave` : `sf-message sf-${t} sf-center-leave`, setTimeout(() => {
|
|
1562
|
-
c.container.remove(), d.splice(
|
|
1562
|
+
c.container.remove(), d.splice(p, 1);
|
|
1563
1563
|
}, 400);
|
|
1564
|
-
},
|
|
1564
|
+
}, C);
|
|
1565
1565
|
break;
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
|
-
function b(n, e, t, l = "",
|
|
1568
|
+
function b(n, e, t, l = "", C = !0, p = 3e3) {
|
|
1569
1569
|
switch (n) {
|
|
1570
1570
|
case "enter": {
|
|
1571
1571
|
const c = d.find((_) => _.id === t);
|
|
1572
1572
|
if (!c) return;
|
|
1573
1573
|
const u = D(c.vnode);
|
|
1574
|
-
W(u, c.container), c.container.style.top = `${c.offset}px`, c.container.className =
|
|
1574
|
+
W(u, c.container), c.container.style.top = `${c.offset}px`, c.container.className = C ? `sf-message sf-${l}-plain sf-topcenter-enter` : `sf-message sf-${l} sf-topcenter-enter`, document.body.appendChild(c.container);
|
|
1575
1575
|
break;
|
|
1576
1576
|
}
|
|
1577
1577
|
case "leave":
|
|
@@ -1580,7 +1580,7 @@ function b(n, e, t, l = "", p = !0, C = 3e3) {
|
|
|
1580
1580
|
const c = d.findIndex((_) => _.id === t);
|
|
1581
1581
|
if (c === -1) return;
|
|
1582
1582
|
const u = d[c];
|
|
1583
|
-
u.container.className =
|
|
1583
|
+
u.container.className = C ? `sf-message sf-${l}-plain sf-topcenter-enter` : `sf-message sf-${l} sf-topcenter-enter`;
|
|
1584
1584
|
for (let _ = c + 1; _ < d.length; _++)
|
|
1585
1585
|
d[_].offset -= 65, d[_].container.style.top = `${d[_].offset}px`;
|
|
1586
1586
|
setTimeout(() => {
|
|
@@ -1593,13 +1593,13 @@ function b(n, e, t, l = "", p = !0, C = 3e3) {
|
|
|
1593
1593
|
const c = d.findIndex((_) => _.id === t);
|
|
1594
1594
|
if (c === -1) return;
|
|
1595
1595
|
const u = d[c];
|
|
1596
|
-
u.container.className =
|
|
1596
|
+
u.container.className = C ? `sf-message sf-${l}-plain sf-topcenter-leave` : `sf-message sf-${l} sf-topcenter-leave`;
|
|
1597
1597
|
for (let _ = c + 1; _ < d.length; _++)
|
|
1598
1598
|
d[_].offset -= 65, d[_].container.style.top = `${d[_].offset}px`;
|
|
1599
1599
|
setTimeout(() => {
|
|
1600
1600
|
u.container.remove(), d.splice(c, 1);
|
|
1601
1601
|
}, 400);
|
|
1602
|
-
},
|
|
1602
|
+
}, p);
|
|
1603
1603
|
break;
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|