quail-ui 0.2.42 → 0.2.43
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.js +74 -74
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { openBlock as n, createElementBlock as s, createElementVNode as o, createStaticVNode as a1, defineComponent as A, ref as S, watch as N, onMounted as d1, withDirectives as i1, vModelText as C1, computed as I, nextTick as V1, Fragment as m1, renderSlot as t1, createBlock as Z, Transition as f1, withCtx as g1, normalizeClass as D, normalizeStyle as w1, withModifiers as p1, createCommentVNode as O, toDisplayString as P, getCurrentInstance as b1, unref as r1, resolveDynamicComponent as c1, renderList as k1, vModelCheckbox as z1, useSlots as Q1, resolveComponent as v1, createVNode as l1 } from "vue";
|
|
2
2
|
const c = (e, t) => {
|
|
3
3
|
const r = e.__vccOpts || e;
|
|
4
|
-
for (const [C,
|
|
5
|
-
r[C] =
|
|
4
|
+
for (const [C, _] of t)
|
|
5
|
+
r[C] = _;
|
|
6
6
|
return r;
|
|
7
7
|
}, I1 = {}, B1 = {
|
|
8
8
|
width: "24",
|
|
@@ -1288,7 +1288,7 @@ var L1 = { exports: {} };
|
|
|
1288
1288
|
(function(r, C) {
|
|
1289
1289
|
e.exports = C();
|
|
1290
1290
|
})(a9, function() {
|
|
1291
|
-
var r = 1e3, C = 6e4,
|
|
1291
|
+
var r = 1e3, C = 6e4, _ = 36e5, d = "millisecond", u = "second", g = "minute", $ = "hour", k = "day", m = "week", h = "month", x = "quarter", z = "year", j = "date", F = "Invalid Date", L = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, R = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(w) {
|
|
1292
1292
|
var a = ["th", "st", "nd", "rd"], i = w % 100;
|
|
1293
1293
|
return "[" + w + (a[(i - 20) % 10] || a[i] || a[0]) + "]";
|
|
1294
1294
|
} }, J = function(w, a, i) {
|
|
@@ -1300,12 +1300,12 @@ var L1 = { exports: {} };
|
|
|
1300
1300
|
}, m: function w(a, i) {
|
|
1301
1301
|
if (a.date() < i.date())
|
|
1302
1302
|
return -w(i, a);
|
|
1303
|
-
var f = 12 * (i.year() - a.year()) + (i.month() - a.month()), l = a.clone().add(f,
|
|
1303
|
+
var f = 12 * (i.year() - a.year()) + (i.month() - a.month()), l = a.clone().add(f, h), p = i - l < 0, v = a.clone().add(f + (p ? -1 : 1), h);
|
|
1304
1304
|
return +(-(f + (i - l) / (p ? l - v : v - l)) || 0);
|
|
1305
1305
|
}, a: function(w) {
|
|
1306
1306
|
return w < 0 ? Math.ceil(w) || 0 : Math.floor(w);
|
|
1307
1307
|
}, p: function(w) {
|
|
1308
|
-
return { M:
|
|
1308
|
+
return { M: h, y: z, w: m, d: k, D: j, h: $, m: g, s: u, ms: d, Q: x }[w] || String(w || "").toLowerCase().replace(/s$/, "");
|
|
1309
1309
|
}, u: function(w) {
|
|
1310
1310
|
return w === void 0;
|
|
1311
1311
|
} }, X = "en", U = {};
|
|
@@ -1389,7 +1389,7 @@ var L1 = { exports: {} };
|
|
|
1389
1389
|
switch (v) {
|
|
1390
1390
|
case z:
|
|
1391
1391
|
return p ? y(1, 0) : y(31, 11);
|
|
1392
|
-
case
|
|
1392
|
+
case h:
|
|
1393
1393
|
return p ? y(1, Q) : y(0, Q + 1);
|
|
1394
1394
|
case m:
|
|
1395
1395
|
var E = this.$locale().weekStart || 0, K = (b < E ? b + 7 : b) - E;
|
|
@@ -1409,8 +1409,8 @@ var L1 = { exports: {} };
|
|
|
1409
1409
|
}, a.endOf = function(i) {
|
|
1410
1410
|
return this.startOf(i, !1);
|
|
1411
1411
|
}, a.$set = function(i, f) {
|
|
1412
|
-
var l, p = M.p(i), v = "set" + (this.$u ? "UTC" : ""), y = (l = {}, l[k] = v + "Date", l[j] = v + "Date", l[
|
|
1413
|
-
if (p ===
|
|
1412
|
+
var l, p = M.p(i), v = "set" + (this.$u ? "UTC" : ""), y = (l = {}, l[k] = v + "Date", l[j] = v + "Date", l[h] = v + "Month", l[z] = v + "FullYear", l[$] = v + "Hours", l[g] = v + "Minutes", l[u] = v + "Seconds", l[d] = v + "Milliseconds", l)[p], H = p === k ? this.$D + (f - this.$W) : f;
|
|
1413
|
+
if (p === h || p === z) {
|
|
1414
1414
|
var b = this.clone().set(j, 1);
|
|
1415
1415
|
b.$d[y](H), b.init(), this.$d = b.set(j, Math.min(this.$D, b.daysInMonth())).$d;
|
|
1416
1416
|
} else
|
|
@@ -1427,15 +1427,15 @@ var L1 = { exports: {} };
|
|
|
1427
1427
|
var q = V(p);
|
|
1428
1428
|
return M.w(q.date(q.date() + Math.round(Q * i)), p);
|
|
1429
1429
|
};
|
|
1430
|
-
if (v ===
|
|
1431
|
-
return this.set(
|
|
1430
|
+
if (v === h)
|
|
1431
|
+
return this.set(h, this.$M + i);
|
|
1432
1432
|
if (v === z)
|
|
1433
1433
|
return this.set(z, this.$y + i);
|
|
1434
1434
|
if (v === k)
|
|
1435
1435
|
return y(1);
|
|
1436
1436
|
if (v === m)
|
|
1437
1437
|
return y(7);
|
|
1438
|
-
var H = (l = {}, l[g] = C, l[$] =
|
|
1438
|
+
var H = (l = {}, l[g] = C, l[$] = _, l[u] = r, l)[v] || 1, b = this.$d.getTime() + i * H;
|
|
1439
1439
|
return M.w(b, this);
|
|
1440
1440
|
}, a.subtract = function(i, f) {
|
|
1441
1441
|
return this.add(-1 * i, f);
|
|
@@ -1516,7 +1516,7 @@ var L1 = { exports: {} };
|
|
|
1516
1516
|
case z:
|
|
1517
1517
|
p = q() / 12;
|
|
1518
1518
|
break;
|
|
1519
|
-
case
|
|
1519
|
+
case h:
|
|
1520
1520
|
p = q();
|
|
1521
1521
|
break;
|
|
1522
1522
|
case x:
|
|
@@ -1529,7 +1529,7 @@ var L1 = { exports: {} };
|
|
|
1529
1529
|
p = (Q - b) / 864e5;
|
|
1530
1530
|
break;
|
|
1531
1531
|
case $:
|
|
1532
|
-
p = Q /
|
|
1532
|
+
p = Q / _;
|
|
1533
1533
|
break;
|
|
1534
1534
|
case g:
|
|
1535
1535
|
p = Q / C;
|
|
@@ -1542,7 +1542,7 @@ var L1 = { exports: {} };
|
|
|
1542
1542
|
}
|
|
1543
1543
|
return l ? p : M.a(p);
|
|
1544
1544
|
}, a.daysInMonth = function() {
|
|
1545
|
-
return this.endOf(
|
|
1545
|
+
return this.endOf(h).$D;
|
|
1546
1546
|
}, a.$locale = function() {
|
|
1547
1547
|
return U[this.$L];
|
|
1548
1548
|
}, a.locale = function(i, f) {
|
|
@@ -1562,7 +1562,7 @@ var L1 = { exports: {} };
|
|
|
1562
1562
|
return this.$d.toUTCString();
|
|
1563
1563
|
}, w;
|
|
1564
1564
|
}(), M1 = o1.prototype;
|
|
1565
|
-
return V.prototype = M1, [["$ms", d], ["$s", u], ["$m", g], ["$H", $], ["$W", k], ["$M",
|
|
1565
|
+
return V.prototype = M1, [["$ms", d], ["$s", u], ["$m", g], ["$H", $], ["$W", k], ["$M", h], ["$y", z], ["$D", j]].forEach(function(w) {
|
|
1566
1566
|
M1[w[1]] = function(a) {
|
|
1567
1567
|
return this.$g(a, w[0], w[1]);
|
|
1568
1568
|
};
|
|
@@ -1588,21 +1588,21 @@ const h1 = /* @__PURE__ */ d9(u9), _9 = { class: "q-datetime-picker" }, h9 = ["d
|
|
|
1588
1588
|
},
|
|
1589
1589
|
emits: ["update:modelValue", "change"],
|
|
1590
1590
|
setup(e, { emit: t }) {
|
|
1591
|
-
const r = e, C = S(""),
|
|
1591
|
+
const r = e, C = S(""), _ = S("");
|
|
1592
1592
|
N(
|
|
1593
1593
|
() => r.modelValue,
|
|
1594
1594
|
(u) => {
|
|
1595
1595
|
const g = h1(u);
|
|
1596
|
-
C.value = g.format("YYYY-MM-DD"),
|
|
1596
|
+
C.value = g.format("YYYY-MM-DD"), _.value = g.format("HH:mm");
|
|
1597
1597
|
}
|
|
1598
1598
|
);
|
|
1599
1599
|
function d() {
|
|
1600
|
-
const u = h1(`${C.value} ${
|
|
1600
|
+
const u = h1(`${C.value} ${_.value}`).format("YYYY-MM-DDTHH:mm:ssZ");
|
|
1601
1601
|
t("change", u), t("update:modelValue", u);
|
|
1602
1602
|
}
|
|
1603
1603
|
return d1(() => {
|
|
1604
1604
|
const u = h1();
|
|
1605
|
-
C.value = u.format("YYYY-MM-DD"),
|
|
1605
|
+
C.value = u.format("YYYY-MM-DD"), _.value = u.format("HH:mm");
|
|
1606
1606
|
}), (u, g) => (n(), s("div", _9, [
|
|
1607
1607
|
i1(o("input", {
|
|
1608
1608
|
"onUpdate:modelValue": g[0] || (g[0] = ($) => C.value = $),
|
|
@@ -1613,30 +1613,30 @@ const h1 = /* @__PURE__ */ d9(u9), _9 = { class: "q-datetime-picker" }, h9 = ["d
|
|
|
1613
1613
|
[C1, C.value]
|
|
1614
1614
|
]),
|
|
1615
1615
|
i1(o("input", {
|
|
1616
|
-
"onUpdate:modelValue": g[1] || (g[1] = ($) =>
|
|
1616
|
+
"onUpdate:modelValue": g[1] || (g[1] = ($) => _.value = $),
|
|
1617
1617
|
type: "time",
|
|
1618
1618
|
disabled: e.disabled,
|
|
1619
1619
|
onChange: d
|
|
1620
1620
|
}, null, 40, C9), [
|
|
1621
|
-
[C1,
|
|
1621
|
+
[C1, _.value]
|
|
1622
1622
|
])
|
|
1623
1623
|
]));
|
|
1624
1624
|
}
|
|
1625
1625
|
});
|
|
1626
1626
|
function g9() {
|
|
1627
1627
|
function e() {
|
|
1628
|
-
const r = !!window.ActiveXObject || "ActiveXObject" in window, C = navigator.userAgent.indexOf("Edge") > -1,
|
|
1628
|
+
const r = !!window.ActiveXObject || "ActiveXObject" in window, C = navigator.userAgent.indexOf("Edge") > -1, _ = navigator.userAgent.indexOf("Chrome") > -1, d = navigator.userAgent.indexOf("Firefox") > -1, u = navigator.userAgent.indexOf("Safari") > -1, g = navigator.userAgent.indexOf("Opera") > -1, $ = navigator.userAgent.indexOf("MicroMessenger") > -1, k = !!navigator.userAgent.match(/AppleWebKit.*Mobile.*/), m = navigator.userAgent.indexOf("Android") > -1 || navigator.userAgent.indexOf("Adr") > -1, h = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), x = navigator.userAgent.indexOf("iPad") > -1, z = navigator.userAgent.indexOf("iPhone") > -1, j = navigator.userAgent.indexOf("Macintosh") > -1, F = navigator.userAgent.indexOf("Windows") > -1, L = navigator.userAgent.indexOf("Linux") > -1;
|
|
1629
1629
|
return {
|
|
1630
1630
|
isIE: r,
|
|
1631
1631
|
isEdge: C,
|
|
1632
|
-
isChrome:
|
|
1632
|
+
isChrome: _,
|
|
1633
1633
|
isFirefox: d,
|
|
1634
1634
|
isSafari: u,
|
|
1635
1635
|
isOpera: g,
|
|
1636
1636
|
isWeixin: $,
|
|
1637
1637
|
isMobile: k,
|
|
1638
1638
|
isAndroid: m,
|
|
1639
|
-
isIOS:
|
|
1639
|
+
isIOS: h,
|
|
1640
1640
|
isIpad: x,
|
|
1641
1641
|
isIphone: z,
|
|
1642
1642
|
isMac: j,
|
|
@@ -1645,10 +1645,10 @@ function g9() {
|
|
|
1645
1645
|
};
|
|
1646
1646
|
}
|
|
1647
1647
|
function t(r, C) {
|
|
1648
|
-
let
|
|
1648
|
+
let _;
|
|
1649
1649
|
return function(...d) {
|
|
1650
1650
|
const u = this;
|
|
1651
|
-
clearTimeout(
|
|
1651
|
+
clearTimeout(_), _ = setTimeout(() => {
|
|
1652
1652
|
r.apply(u, d);
|
|
1653
1653
|
}, C);
|
|
1654
1654
|
};
|
|
@@ -1697,7 +1697,7 @@ const w9 = ["onClick"], p9 = { class: "q-dialog-body" }, v9 = ["onClick"], $9 =
|
|
|
1697
1697
|
},
|
|
1698
1698
|
emits: ["update:modelValue", "close"],
|
|
1699
1699
|
setup(e, { emit: t }) {
|
|
1700
|
-
const r = e, { browserDetect: C } = g9(), { isMobile:
|
|
1700
|
+
const r = e, { browserDetect: C } = g9(), { isMobile: _ } = C(), d = S(!1), u = S(r.modelValue), g = S({ top: "0", left: "0" }), $ = S(null), k = S(null), m = I(() => !_ && r.desktopMode === "popup"), h = I(() => {
|
|
1701
1701
|
const L = document.body.clientWidth < 720 ? "100%" : r.width, Y = r.height, R = {
|
|
1702
1702
|
width: L,
|
|
1703
1703
|
height: Y
|
|
@@ -1705,7 +1705,7 @@ const w9 = ["onClick"], p9 = { class: "q-dialog-body" }, v9 = ["onClick"], $9 =
|
|
|
1705
1705
|
return m.value && (R.top = g.value.top, R.left = g.value.left), R;
|
|
1706
1706
|
}), x = I(() => {
|
|
1707
1707
|
let L = [];
|
|
1708
|
-
return d.value && L.push("shaking"),
|
|
1708
|
+
return d.value && L.push("shaking"), _ || L.push(`desktop-mode-${r.desktopMode}`), r.noFrame && L.push("no-frame"), L.join(" ");
|
|
1709
1709
|
}), z = I(() => {
|
|
1710
1710
|
let L = [];
|
|
1711
1711
|
return m.value && L.push("desktop-mode-popup"), L.join(" ");
|
|
@@ -1714,7 +1714,7 @@ const w9 = ["onClick"], p9 = { class: "q-dialog-body" }, v9 = ["onClick"], $9 =
|
|
|
1714
1714
|
() => r.modelValue,
|
|
1715
1715
|
(L) => {
|
|
1716
1716
|
u.value = L, V1(() => {
|
|
1717
|
-
if (!
|
|
1717
|
+
if (!_ && r.desktopMode === "popup" && $.value.children) {
|
|
1718
1718
|
const Y = $.value.children[0];
|
|
1719
1719
|
if (Y) {
|
|
1720
1720
|
const J = Y.getBoundingClientRect().height + 8, u1 = 0;
|
|
@@ -1751,7 +1751,7 @@ const w9 = ["onClick"], p9 = { class: "q-dialog-body" }, v9 = ["onClick"], $9 =
|
|
|
1751
1751
|
u.value ? (n(), s("div", {
|
|
1752
1752
|
key: 0,
|
|
1753
1753
|
class: D(["q-dialog", x.value]),
|
|
1754
|
-
style: w1(
|
|
1754
|
+
style: w1(h.value),
|
|
1755
1755
|
onClick: p1(F, ["stop"])
|
|
1756
1756
|
}, [
|
|
1757
1757
|
o("div", p9, [
|
|
@@ -1773,7 +1773,7 @@ const w9 = ["onClick"], p9 = { class: "q-dialog-body" }, v9 = ["onClick"], $9 =
|
|
|
1773
1773
|
}, [
|
|
1774
1774
|
o("div", {
|
|
1775
1775
|
class: D(["q-dialog", x.value]),
|
|
1776
|
-
style: w1(
|
|
1776
|
+
style: w1(h.value),
|
|
1777
1777
|
onClick: p1(F, ["stop"])
|
|
1778
1778
|
}, [
|
|
1779
1779
|
o("div", $9, [
|
|
@@ -1815,7 +1815,7 @@ const x9 = ["href"], y9 = { class: "q-fence-text" }, L9 = {
|
|
|
1815
1815
|
setup(e) {
|
|
1816
1816
|
var r;
|
|
1817
1817
|
const t = (r = b1()) == null ? void 0 : r.appContext.components;
|
|
1818
|
-
return (C,
|
|
1818
|
+
return (C, _) => (n(), s("div", {
|
|
1819
1819
|
class: D(["q-fence", e.type])
|
|
1820
1820
|
}, [
|
|
1821
1821
|
e.link ? (n(), s("a", {
|
|
@@ -1878,14 +1878,14 @@ const S9 = /* @__PURE__ */ c(b9, [["render", B9]]), j9 = { class: "q-menu" }, q9
|
|
|
1878
1878
|
let u = "";
|
|
1879
1879
|
return d.disabled && (u += " disabled"), d.danger && (u += " danger"), d.icon && (u += " with-icon"), d.image && (u += " with-image"), d.divider && (u += " with-divider"), u;
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1881
|
+
function _(d) {
|
|
1882
1882
|
d.action && d.action(d), d.disabled !== !0 && t("action", d);
|
|
1883
1883
|
}
|
|
1884
1884
|
return (d, u) => (n(), s("div", j9, [
|
|
1885
1885
|
(n(!0), s(m1, null, k1(r.items, (g) => (n(), s("div", {
|
|
1886
1886
|
class: D(["q-menu-item", C(g)]),
|
|
1887
1887
|
key: `q-menu-item-${g.id}`,
|
|
1888
|
-
onClick: ($) =>
|
|
1888
|
+
onClick: ($) => _(g)
|
|
1889
1889
|
}, [
|
|
1890
1890
|
g.divider ? (n(), s("div", D9)) : (n(), s("div", Z9, [
|
|
1891
1891
|
g.image ? (n(), s("img", {
|
|
@@ -1924,7 +1924,7 @@ const Y9 = ["disabled"], U9 = /* @__PURE__ */ o("div", { class: "q-switch-inner"
|
|
|
1924
1924
|
N(() => r.modelValue, (d) => {
|
|
1925
1925
|
C.value = d;
|
|
1926
1926
|
});
|
|
1927
|
-
function
|
|
1927
|
+
function _(d) {
|
|
1928
1928
|
t("update:modelValue", C.value), t("change", C.value);
|
|
1929
1929
|
}
|
|
1930
1930
|
return (d, u) => (n(), s("label", {
|
|
@@ -1934,7 +1934,7 @@ const Y9 = ["disabled"], U9 = /* @__PURE__ */ o("div", { class: "q-switch-inner"
|
|
|
1934
1934
|
class: "q-switch-checkbox",
|
|
1935
1935
|
type: "checkbox",
|
|
1936
1936
|
"onUpdate:modelValue": u[0] || (u[0] = (g) => C.value = g),
|
|
1937
|
-
onChange:
|
|
1937
|
+
onChange: _,
|
|
1938
1938
|
disabled: r.disabled
|
|
1939
1939
|
}, null, 40, Y9), [
|
|
1940
1940
|
[z1, C.value]
|
|
@@ -1980,23 +1980,23 @@ const W9 = { class: "q-text-field-wrapper" }, N9 = ["placeholder"], R9 = { class
|
|
|
1980
1980
|
},
|
|
1981
1981
|
emits: ["submit", "update:modelValue"],
|
|
1982
1982
|
setup(e, { emit: t }) {
|
|
1983
|
-
const r = e, C = S(r.defaultText),
|
|
1984
|
-
const
|
|
1985
|
-
return r.layout === "vertical" ?
|
|
1983
|
+
const r = e, C = S(r.defaultText), _ = I(() => {
|
|
1984
|
+
const h = [];
|
|
1985
|
+
return r.layout === "vertical" ? h.push("vertical") : h.push("horizontal"), r.type === "code" && h.push("code"), r.glow && h.push(`glow-${r.glow}`), h.join(" ");
|
|
1986
1986
|
}), d = I(() => {
|
|
1987
1987
|
var x;
|
|
1988
1988
|
return r.loading || ((x = C.value) == null ? void 0 : x.trim()).length === 0 ? !1 : r.type === "email" ? u.value : r.type === "code" ? g.value : !0;
|
|
1989
1989
|
}), u = I(() => {
|
|
1990
1990
|
var x;
|
|
1991
|
-
const
|
|
1992
|
-
return !r.disabled && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(
|
|
1991
|
+
const h = (x = C.value) == null ? void 0 : x.trim();
|
|
1992
|
+
return !r.disabled && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(h);
|
|
1993
1993
|
}), g = I(() => {
|
|
1994
1994
|
var x;
|
|
1995
|
-
const
|
|
1996
|
-
return /^\d{6}$/.test(
|
|
1995
|
+
const h = (x = C.value) == null ? void 0 : x.trim();
|
|
1996
|
+
return /^\d{6}$/.test(h);
|
|
1997
1997
|
}), $ = I(() => r.loading ? "Loading..." : r.actionLabel);
|
|
1998
|
-
N(() => r.modelValue, (
|
|
1999
|
-
C.value =
|
|
1998
|
+
N(() => r.modelValue, (h) => {
|
|
1999
|
+
C.value = h;
|
|
2000
2000
|
});
|
|
2001
2001
|
function k() {
|
|
2002
2002
|
d.value && t("submit", { text: C.value });
|
|
@@ -2004,8 +2004,8 @@ const W9 = { class: "q-text-field-wrapper" }, N9 = ["placeholder"], R9 = { class
|
|
|
2004
2004
|
function m() {
|
|
2005
2005
|
t("update:modelValue", C.value);
|
|
2006
2006
|
}
|
|
2007
|
-
return (
|
|
2008
|
-
class: D(["q-text-field-with-button",
|
|
2007
|
+
return (h, x) => (n(), s("div", {
|
|
2008
|
+
class: D(["q-text-field-with-button", _.value])
|
|
2009
2009
|
}, [
|
|
2010
2010
|
o("div", W9, [
|
|
2011
2011
|
i1(o("input", {
|
|
@@ -2065,18 +2065,18 @@ const K9 = { class: "q-dropdown-menu" }, e5 = { class: "q-dropdown-menu-inner na
|
|
|
2065
2065
|
},
|
|
2066
2066
|
emits: ["change"],
|
|
2067
2067
|
setup(e, { emit: t }) {
|
|
2068
|
-
const r = e, C = Q1(),
|
|
2069
|
-
const
|
|
2070
|
-
return
|
|
2068
|
+
const r = e, C = Q1(), _ = S(!1), d = S(null), u = S(null), g = I(() => {
|
|
2069
|
+
const h = [];
|
|
2070
|
+
return _.value && h.push("expanded"), r.variant === "outlined" && h.push("frame"), r.hideSelected && h.push("hide-selected"), d.value && (d.value.icon || d.value.image) ? h.push("prepend") : h.push("no-prepend"), h.join(" ");
|
|
2071
2071
|
}), $ = I(() => C.default !== void 0);
|
|
2072
2072
|
function k() {
|
|
2073
|
-
|
|
2073
|
+
_.value || H1(), _.value = !_.value, _.value && setTimeout(() => {
|
|
2074
2074
|
const x = u.value.querySelector(".q-menu");
|
|
2075
2075
|
x.getBoundingClientRect().left < 0 && (x.style.left = "0");
|
|
2076
2076
|
}, 10);
|
|
2077
2077
|
}
|
|
2078
|
-
function m(
|
|
2079
|
-
|
|
2078
|
+
function m(h) {
|
|
2079
|
+
_.value = !1, d.value = h, t("change", h);
|
|
2080
2080
|
}
|
|
2081
2081
|
return N(
|
|
2082
2082
|
() => r.initialItem,
|
|
@@ -2084,10 +2084,10 @@ const K9 = { class: "q-dropdown-menu" }, e5 = { class: "q-dropdown-menu-inner na
|
|
|
2084
2084
|
r.initialItem && (d.value = r.initialItem);
|
|
2085
2085
|
}
|
|
2086
2086
|
), d1(() => {
|
|
2087
|
-
r.initialItem && (d.value = r.initialItem), window.addEventListener("storage", (
|
|
2088
|
-
|
|
2087
|
+
r.initialItem && (d.value = r.initialItem), window.addEventListener("storage", (h) => {
|
|
2088
|
+
h.key === "quailui_global_popup_trigger" && h.newValue && (_.value = !1);
|
|
2089
2089
|
});
|
|
2090
|
-
}), (
|
|
2090
|
+
}), (h, x) => {
|
|
2091
2091
|
const z = v1("q-icon-chevron-down"), j = v1("q-menu");
|
|
2092
2092
|
return n(), s("div", K9, [
|
|
2093
2093
|
o("div", e5, [
|
|
@@ -2107,7 +2107,7 @@ const K9 = { class: "q-dropdown-menu" }, e5 = { class: "q-dropdown-menu-inner na
|
|
|
2107
2107
|
})) : O("", !0),
|
|
2108
2108
|
o("div", s5, P(d.value ? d.value.title : r.placeholder || "Select ..."), 1)
|
|
2109
2109
|
])) : O("", !0),
|
|
2110
|
-
t1(
|
|
2110
|
+
t1(h.$slots, "default"),
|
|
2111
2111
|
l1(z, { class: "icon chevron-icon" })
|
|
2112
2112
|
], 10, t5),
|
|
2113
2113
|
o("div", {
|
|
@@ -2116,7 +2116,7 @@ const K9 = { class: "q-dropdown-menu" }, e5 = { class: "q-dropdown-menu-inner na
|
|
|
2116
2116
|
}, [
|
|
2117
2117
|
l1(f1, null, {
|
|
2118
2118
|
default: g1(() => [
|
|
2119
|
-
|
|
2119
|
+
_.value ? (n(), Z(j, {
|
|
2120
2120
|
key: 0,
|
|
2121
2121
|
items: e.items,
|
|
2122
2122
|
onAction: m
|
|
@@ -2167,25 +2167,25 @@ const i5 = { class: "q-pagination" }, c5 = ["disabled"], l5 = {
|
|
|
2167
2167
|
k.push({ label: m });
|
|
2168
2168
|
else {
|
|
2169
2169
|
k.push({ label: 1 });
|
|
2170
|
-
let m =
|
|
2171
|
-
m < 2 && (m = 2,
|
|
2172
|
-
for (let x = m; x <=
|
|
2170
|
+
let m = _.value - 2, h = _.value + 2;
|
|
2171
|
+
m < 2 && (m = 2, h = m + $ - 2), h > r.totalPage - 1 && (h = r.totalPage - 1, m = h - $ + 2), m > 2 && k.push({ label: "…", disabled: !0 });
|
|
2172
|
+
for (let x = m; x <= h; x++)
|
|
2173
2173
|
k.push({ label: x });
|
|
2174
|
-
|
|
2174
|
+
h < r.totalPage - 1 && k.push({ label: "…", disabled: !0 }), k.push({ label: r.totalPage });
|
|
2175
2175
|
}
|
|
2176
2176
|
return k;
|
|
2177
|
-
}),
|
|
2177
|
+
}), _ = S(r.modelValue);
|
|
2178
2178
|
N(() => r.modelValue, ($) => {
|
|
2179
|
-
|
|
2179
|
+
_.value = $;
|
|
2180
2180
|
});
|
|
2181
2181
|
function d() {
|
|
2182
|
-
|
|
2182
|
+
_.value--, t("change:prev", _.value), t("update:modelValue", _.value);
|
|
2183
2183
|
}
|
|
2184
2184
|
function u() {
|
|
2185
|
-
|
|
2185
|
+
_.value++, t("change:next", _.value), t("update:modelValue", _.value);
|
|
2186
2186
|
}
|
|
2187
2187
|
function g($, k) {
|
|
2188
|
-
k.disabled || (
|
|
2188
|
+
k.disabled || (_.value = $, t("change:goto", _.value), t("update:modelValue", _.value));
|
|
2189
2189
|
}
|
|
2190
2190
|
return ($, k) => (n(), s("div", i5, [
|
|
2191
2191
|
o("button", {
|
|
@@ -2198,9 +2198,9 @@ const i5 = { class: "q-pagination" }, c5 = ["disabled"], l5 = {
|
|
|
2198
2198
|
e.totalPage !== 0 ? (n(), s("div", l5, [
|
|
2199
2199
|
(n(!0), s(m1, null, k1(C.value, (m) => (n(), s("div", a5, [
|
|
2200
2200
|
o("button", {
|
|
2201
|
-
class: D(["q-page-indicator q-button button sm plain", m.label ===
|
|
2201
|
+
class: D(["q-page-indicator q-button button sm plain", m.label === _.value ? "active" : ""]),
|
|
2202
2202
|
disabled: m.disabled,
|
|
2203
|
-
onClick: (
|
|
2203
|
+
onClick: (h) => g(m.label, m)
|
|
2204
2204
|
}, P(m.label), 11, d5)
|
|
2205
2205
|
]))), 256))
|
|
2206
2206
|
])) : (n(), s("div", u5, [
|
|
@@ -2240,7 +2240,7 @@ const f5 = { class: "q-progress-slot" }, g5 = /* @__PURE__ */ o("div", { class:
|
|
|
2240
2240
|
},
|
|
2241
2241
|
setup(e) {
|
|
2242
2242
|
const t = e, r = I(() => t.infinite ? "100%" : `${t.value / t.max * 100}%`), C = I(() => t.value >= t.max);
|
|
2243
|
-
return (
|
|
2243
|
+
return (_, d) => (n(), s("div", {
|
|
2244
2244
|
class: D(["q-progress", e.color])
|
|
2245
2245
|
}, [
|
|
2246
2246
|
o("div", f5, [
|
|
@@ -2274,7 +2274,7 @@ const v5 = /* @__PURE__ */ A({
|
|
|
2274
2274
|
},
|
|
2275
2275
|
emits: ["change"],
|
|
2276
2276
|
setup(e, { emit: t }) {
|
|
2277
|
-
const r = e, C = S(null),
|
|
2277
|
+
const r = e, C = S(null), _ = I(() => {
|
|
2278
2278
|
let u = [
|
|
2279
2279
|
{
|
|
2280
2280
|
title_flag: "🇺🇸 English",
|
|
@@ -2318,13 +2318,13 @@ const v5 = /* @__PURE__ */ A({
|
|
|
2318
2318
|
});
|
|
2319
2319
|
}
|
|
2320
2320
|
return N(() => r.lang, (u) => {
|
|
2321
|
-
C.value =
|
|
2321
|
+
C.value = _.value.find((g) => u === g.value);
|
|
2322
2322
|
}), d1(() => {
|
|
2323
|
-
C.value =
|
|
2323
|
+
C.value = _.value.find((u) => r.lang === u.value || localStorage.getItem("quail-language") === u.value) || _.value[0];
|
|
2324
2324
|
}), (u, g) => {
|
|
2325
2325
|
const $ = v1("QDropdownMenu");
|
|
2326
2326
|
return n(), Z($, {
|
|
2327
|
-
items:
|
|
2327
|
+
items: _.value,
|
|
2328
2328
|
"initial-item": C.value
|
|
2329
2329
|
}, null, 8, ["items", "initial-item"]);
|
|
2330
2330
|
};
|