quail-ui 0.2.33 → 0.2.34
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 +103 -98
- 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
|
-
import { openBlock as n, createElementBlock as s, createElementVNode as o, createStaticVNode as o1, defineComponent as j, ref as S, watch as
|
|
1
|
+
import { openBlock as n, createElementBlock as s, createElementVNode as o, createStaticVNode as o1, defineComponent as j, ref as S, watch as U, onMounted as u1, withDirectives as e1, vModelText as c1, computed as B, createBlock as Z, Transition as C1, withCtx as f1, normalizeClass as D, normalizeStyle as w1, withModifiers as g1, toDisplayString as q, renderSlot as l1, createCommentVNode as F, getCurrentInstance as V1, unref as X, resolveDynamicComponent as t1, Fragment as p1, renderList as v1, vModelCheckbox as b1, useSlots as z1, resolveComponent as a1, createVNode as n1 } from "vue";
|
|
2
2
|
const c = (e, t) => {
|
|
3
3
|
const i = e.__vccOpts || e;
|
|
4
|
-
for (const [
|
|
5
|
-
i[
|
|
4
|
+
for (const [_, C] of t)
|
|
5
|
+
i[_] = C;
|
|
6
6
|
return i;
|
|
7
7
|
}, Q1 = {}, I1 = {
|
|
8
8
|
width: "24",
|
|
@@ -1285,10 +1285,10 @@ function l5(e) {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
var M1 = { exports: {} };
|
|
1287
1287
|
(function(e, t) {
|
|
1288
|
-
(function(i,
|
|
1289
|
-
e.exports =
|
|
1288
|
+
(function(i, _) {
|
|
1289
|
+
e.exports = _();
|
|
1290
1290
|
})(c5, function() {
|
|
1291
|
-
var i = 1e3,
|
|
1291
|
+
var i = 1e3, _ = 6e4, C = 36e5, h = "millisecond", f = "second", v = "minute", $ = "hour", M = "day", x = "week", u = "month", L = "quarter", Q = "year", O = "date", _1 = "Invalid Date", x1 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, L1 = /\[([^\]]+)]|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, y1 = { 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"], r = w % 100;
|
|
1293
1293
|
return "[" + w + (a[(r - 20) % 10] || a[r] || a[0]) + "]";
|
|
1294
1294
|
} }, s1 = function(w, a, r) {
|
|
@@ -1305,7 +1305,7 @@ var M1 = { exports: {} };
|
|
|
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: u, y: Q, w: x, d: M, D: O, h: $, m: v, s: f, ms:
|
|
1308
|
+
return { M: u, y: Q, w: x, d: M, D: O, h: $, m: v, s: f, ms: h, Q: L }[w] || String(w || "").toLowerCase().replace(/s$/, "");
|
|
1309
1309
|
}, u: function(w) {
|
|
1310
1310
|
return w === void 0;
|
|
1311
1311
|
} }, W = "en", T = {};
|
|
@@ -1385,7 +1385,7 @@ var M1 = { exports: {} };
|
|
|
1385
1385
|
return g ? P : P.endOf(M);
|
|
1386
1386
|
}, y = function(A, z) {
|
|
1387
1387
|
return m.w(l.toDate()[A].apply(l.toDate("s"), (g ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(z)), l);
|
|
1388
|
-
}, V = this.$W, b = this.$M, I = this.$D,
|
|
1388
|
+
}, V = this.$W, b = this.$M, I = this.$D, E = "set" + (this.$u ? "UTC" : "");
|
|
1389
1389
|
switch (p) {
|
|
1390
1390
|
case Q:
|
|
1391
1391
|
return g ? k(1, 0) : k(31, 11);
|
|
@@ -1396,20 +1396,20 @@ var M1 = { exports: {} };
|
|
|
1396
1396
|
return k(g ? I - N : I + (6 - N), b);
|
|
1397
1397
|
case M:
|
|
1398
1398
|
case O:
|
|
1399
|
-
return y(
|
|
1399
|
+
return y(E + "Hours", 0);
|
|
1400
1400
|
case $:
|
|
1401
|
-
return y(
|
|
1401
|
+
return y(E + "Minutes", 1);
|
|
1402
1402
|
case v:
|
|
1403
|
-
return y(
|
|
1403
|
+
return y(E + "Seconds", 2);
|
|
1404
1404
|
case f:
|
|
1405
|
-
return y(
|
|
1405
|
+
return y(E + "Milliseconds", 3);
|
|
1406
1406
|
default:
|
|
1407
1407
|
return this.clone();
|
|
1408
1408
|
}
|
|
1409
1409
|
}, a.endOf = function(r) {
|
|
1410
1410
|
return this.startOf(r, !1);
|
|
1411
1411
|
}, a.$set = function(r, d) {
|
|
1412
|
-
var l, g = m.p(r), p = "set" + (this.$u ? "UTC" : ""), k = (l = {}, l[M] = p + "Date", l[O] = p + "Date", l[u] = p + "Month", l[Q] = p + "FullYear", l[$] = p + "Hours", l[v] = p + "Minutes", l[f] = p + "Seconds", l[
|
|
1412
|
+
var l, g = m.p(r), p = "set" + (this.$u ? "UTC" : ""), k = (l = {}, l[M] = p + "Date", l[O] = p + "Date", l[u] = p + "Month", l[Q] = p + "FullYear", l[$] = p + "Hours", l[v] = p + "Minutes", l[f] = p + "Seconds", l[h] = p + "Milliseconds", l)[g], y = g === M ? this.$D + (d - this.$W) : d;
|
|
1413
1413
|
if (g === u || g === Q) {
|
|
1414
1414
|
var V = this.clone().set(O, 1);
|
|
1415
1415
|
V.$d[k](y), V.init(), this.$d = V.set(O, Math.min(this.$D, V.daysInMonth())).$d;
|
|
@@ -1435,7 +1435,7 @@ var M1 = { exports: {} };
|
|
|
1435
1435
|
return k(1);
|
|
1436
1436
|
if (p === x)
|
|
1437
1437
|
return k(7);
|
|
1438
|
-
var y = (l = {}, l[v] =
|
|
1438
|
+
var y = (l = {}, l[v] = _, l[$] = C, l[f] = i, l)[p] || 1, V = this.$d.getTime() + r * y;
|
|
1439
1439
|
return m.w(V, this);
|
|
1440
1440
|
}, a.subtract = function(r, d) {
|
|
1441
1441
|
return this.add(-1 * r, d);
|
|
@@ -1443,11 +1443,11 @@ var M1 = { exports: {} };
|
|
|
1443
1443
|
var d = this, l = this.$locale();
|
|
1444
1444
|
if (!this.isValid())
|
|
1445
1445
|
return l.invalidDate || _1;
|
|
1446
|
-
var g = r || "YYYY-MM-DDTHH:mm:ssZ", p = m.z(this), k = this.$H, y = this.$m, V = this.$M, b = l.weekdays, I = l.months,
|
|
1446
|
+
var g = r || "YYYY-MM-DDTHH:mm:ssZ", p = m.z(this), k = this.$H, y = this.$m, V = this.$M, b = l.weekdays, I = l.months, E = l.meridiem, Y = function(z, P, G, K) {
|
|
1447
1447
|
return z && (z[P] || z(d, g)) || G[P].slice(0, K);
|
|
1448
1448
|
}, N = function(z) {
|
|
1449
1449
|
return m.s(k % 12 || 12, z, "0");
|
|
1450
|
-
}, A =
|
|
1450
|
+
}, A = E || function(z, P, G) {
|
|
1451
1451
|
var K = z < 12 ? "AM" : "PM";
|
|
1452
1452
|
return G ? K.toLowerCase() : K;
|
|
1453
1453
|
};
|
|
@@ -1509,7 +1509,7 @@ var M1 = { exports: {} };
|
|
|
1509
1509
|
}, a.utcOffset = function() {
|
|
1510
1510
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1511
1511
|
}, a.diff = function(r, d, l) {
|
|
1512
|
-
var g, p = this, k = m.p(d), y = H(r), V = (y.utcOffset() - this.utcOffset()) *
|
|
1512
|
+
var g, p = this, k = m.p(d), y = H(r), V = (y.utcOffset() - this.utcOffset()) * _, b = this - y, I = function() {
|
|
1513
1513
|
return m.m(p, y);
|
|
1514
1514
|
};
|
|
1515
1515
|
switch (k) {
|
|
@@ -1532,7 +1532,7 @@ var M1 = { exports: {} };
|
|
|
1532
1532
|
g = b / C;
|
|
1533
1533
|
break;
|
|
1534
1534
|
case v:
|
|
1535
|
-
g = b /
|
|
1535
|
+
g = b / _;
|
|
1536
1536
|
break;
|
|
1537
1537
|
case f:
|
|
1538
1538
|
g = b / i;
|
|
@@ -1562,7 +1562,7 @@ var M1 = { exports: {} };
|
|
|
1562
1562
|
return this.$d.toUTCString();
|
|
1563
1563
|
}, w;
|
|
1564
1564
|
}(), h1 = J.prototype;
|
|
1565
|
-
return H.prototype = h1, [["$ms",
|
|
1565
|
+
return H.prototype = h1, [["$ms", h], ["$s", f], ["$m", v], ["$H", $], ["$W", M], ["$M", u], ["$y", Q], ["$D", O]].forEach(function(w) {
|
|
1566
1566
|
h1[w[1]] = function(a) {
|
|
1567
1567
|
return this.$g(a, w[0], w[1]);
|
|
1568
1568
|
};
|
|
@@ -1588,35 +1588,35 @@ const i1 = /* @__PURE__ */ l5(a5), d5 = { class: "q-datetime-picker" }, u5 = ["d
|
|
|
1588
1588
|
},
|
|
1589
1589
|
emits: ["update:modelValue", "change"],
|
|
1590
1590
|
setup(e, { emit: t }) {
|
|
1591
|
-
const i = e,
|
|
1592
|
-
|
|
1591
|
+
const i = e, _ = S(""), C = S("");
|
|
1592
|
+
U(
|
|
1593
1593
|
() => i.modelValue,
|
|
1594
1594
|
(f) => {
|
|
1595
1595
|
const v = i1(f);
|
|
1596
|
-
|
|
1596
|
+
_.value = v.format("YYYY-MM-DD"), C.value = v.format("HH:mm");
|
|
1597
1597
|
}
|
|
1598
1598
|
);
|
|
1599
|
-
function
|
|
1600
|
-
const f = i1(`${
|
|
1599
|
+
function h() {
|
|
1600
|
+
const f = i1(`${_.value} ${C.value}`).format("YYYY-MM-DDTHH:mm:ssZ");
|
|
1601
1601
|
t("change", f), t("update:modelValue", f);
|
|
1602
1602
|
}
|
|
1603
1603
|
return u1(() => {
|
|
1604
1604
|
const f = i1();
|
|
1605
|
-
|
|
1605
|
+
_.value = f.format("YYYY-MM-DD"), C.value = f.format("HH:mm");
|
|
1606
1606
|
}), (f, v) => (n(), s("div", d5, [
|
|
1607
1607
|
e1(o("input", {
|
|
1608
|
-
"onUpdate:modelValue": v[0] || (v[0] = ($) =>
|
|
1608
|
+
"onUpdate:modelValue": v[0] || (v[0] = ($) => _.value = $),
|
|
1609
1609
|
type: "date",
|
|
1610
1610
|
disabled: e.disabled,
|
|
1611
|
-
onChange:
|
|
1611
|
+
onChange: h
|
|
1612
1612
|
}, null, 40, u5), [
|
|
1613
|
-
[c1,
|
|
1613
|
+
[c1, _.value]
|
|
1614
1614
|
]),
|
|
1615
1615
|
e1(o("input", {
|
|
1616
1616
|
"onUpdate:modelValue": v[1] || (v[1] = ($) => C.value = $),
|
|
1617
1617
|
type: "time",
|
|
1618
1618
|
disabled: e.disabled,
|
|
1619
|
-
onChange:
|
|
1619
|
+
onChange: h
|
|
1620
1620
|
}, null, 40, _5), [
|
|
1621
1621
|
[c1, C.value]
|
|
1622
1622
|
])
|
|
@@ -1653,14 +1653,14 @@ const C5 = ["onClick"], f5 = { class: "q-dialog-header" }, w5 = {
|
|
|
1653
1653
|
},
|
|
1654
1654
|
emits: ["update:modelValue", "close"],
|
|
1655
1655
|
setup(e, { emit: t }) {
|
|
1656
|
-
const i = e,
|
|
1656
|
+
const i = e, _ = S(!1), C = S(i.modelValue), h = B(() => {
|
|
1657
1657
|
const $ = document.body.clientWidth < 720 ? "100%" : i.width, M = i.height;
|
|
1658
1658
|
return {
|
|
1659
1659
|
width: $,
|
|
1660
1660
|
height: M
|
|
1661
1661
|
};
|
|
1662
1662
|
});
|
|
1663
|
-
|
|
1663
|
+
U(
|
|
1664
1664
|
() => i.modelValue,
|
|
1665
1665
|
($) => {
|
|
1666
1666
|
C.value = $;
|
|
@@ -1668,8 +1668,8 @@ const C5 = ["onClick"], f5 = { class: "q-dialog-header" }, w5 = {
|
|
|
1668
1668
|
);
|
|
1669
1669
|
function f() {
|
|
1670
1670
|
if (i.persistent) {
|
|
1671
|
-
|
|
1672
|
-
|
|
1671
|
+
_.value = !0, setTimeout(() => {
|
|
1672
|
+
_.value = !1;
|
|
1673
1673
|
}, 300);
|
|
1674
1674
|
return;
|
|
1675
1675
|
}
|
|
@@ -1685,8 +1685,8 @@ const C5 = ["onClick"], f5 = { class: "q-dialog-header" }, w5 = {
|
|
|
1685
1685
|
onClick: f
|
|
1686
1686
|
}, [
|
|
1687
1687
|
o("div", {
|
|
1688
|
-
class: D(["q-dialog",
|
|
1689
|
-
style: w1(
|
|
1688
|
+
class: D(["q-dialog", _.value ? "shaking" : ""]),
|
|
1689
|
+
style: w1(h.value),
|
|
1690
1690
|
onClick: g1(v, ["stop"])
|
|
1691
1691
|
}, [
|
|
1692
1692
|
o("div", f5, [
|
|
@@ -1727,7 +1727,7 @@ const v5 = ["href"], $5 = { class: "q-fence-text" }, m5 = {
|
|
|
1727
1727
|
setup(e) {
|
|
1728
1728
|
var i;
|
|
1729
1729
|
const t = (i = V1()) == null ? void 0 : i.appContext.components;
|
|
1730
|
-
return (
|
|
1730
|
+
return (_, C) => (n(), s("div", {
|
|
1731
1731
|
class: D(["q-fence", e.type])
|
|
1732
1732
|
}, [
|
|
1733
1733
|
e.link ? (n(), s("a", {
|
|
@@ -1786,16 +1786,16 @@ const b5 = /* @__PURE__ */ c(x5, [["render", V5]]), z5 = { class: "q-menu" }, Q5
|
|
|
1786
1786
|
emits: ["action"],
|
|
1787
1787
|
setup(e, { emit: t }) {
|
|
1788
1788
|
const i = e;
|
|
1789
|
-
function h
|
|
1789
|
+
function _(h) {
|
|
1790
1790
|
let f = "";
|
|
1791
|
-
return
|
|
1791
|
+
return h.disabled && (f += " disabled"), h.danger && (f += " danger"), h.icon && (f += " with-icon"), h.image && (f += " with-image"), h.divider && (f += " with-divider"), f;
|
|
1792
1792
|
}
|
|
1793
|
-
function C(
|
|
1794
|
-
|
|
1793
|
+
function C(h) {
|
|
1794
|
+
h.action && h.action(h), h.disabled !== !0 && t("action", h);
|
|
1795
1795
|
}
|
|
1796
|
-
return (
|
|
1796
|
+
return (h, f) => (n(), s("div", z5, [
|
|
1797
1797
|
(n(!0), s(p1, null, v1(i.items, (v) => (n(), s("div", {
|
|
1798
|
-
class: D(["q-menu-item",
|
|
1798
|
+
class: D(["q-menu-item", _(v)]),
|
|
1799
1799
|
key: `q-menu-item-${v.id}`,
|
|
1800
1800
|
onClick: ($) => C(v)
|
|
1801
1801
|
}, [
|
|
@@ -1832,24 +1832,24 @@ const O5 = ["disabled"], P5 = /* @__PURE__ */ o("div", { class: "q-switch-inner"
|
|
|
1832
1832
|
},
|
|
1833
1833
|
emits: ["update:modelValue", "change"],
|
|
1834
1834
|
setup(e, { emit: t }) {
|
|
1835
|
-
const i = e,
|
|
1836
|
-
|
|
1837
|
-
|
|
1835
|
+
const i = e, _ = S(i.modelValue);
|
|
1836
|
+
U(() => i.modelValue, (h) => {
|
|
1837
|
+
_.value = h;
|
|
1838
1838
|
});
|
|
1839
|
-
function C(
|
|
1840
|
-
t("update:modelValue",
|
|
1839
|
+
function C(h) {
|
|
1840
|
+
t("update:modelValue", _.value), t("change", _.value);
|
|
1841
1841
|
}
|
|
1842
|
-
return (
|
|
1842
|
+
return (h, f) => (n(), s("label", {
|
|
1843
1843
|
class: D(["q-switch", e.disabled ? "disabled" : ""])
|
|
1844
1844
|
}, [
|
|
1845
1845
|
e1(o("input", {
|
|
1846
1846
|
class: "q-switch-checkbox",
|
|
1847
1847
|
type: "checkbox",
|
|
1848
|
-
"onUpdate:modelValue": f[0] || (f[0] = (v) =>
|
|
1848
|
+
"onUpdate:modelValue": f[0] || (f[0] = (v) => _.value = v),
|
|
1849
1849
|
onChange: C,
|
|
1850
1850
|
disabled: i.disabled
|
|
1851
1851
|
}, null, 40, O5), [
|
|
1852
|
-
[b1,
|
|
1852
|
+
[b1, _.value]
|
|
1853
1853
|
]),
|
|
1854
1854
|
P5
|
|
1855
1855
|
], 2));
|
|
@@ -1892,29 +1892,29 @@ const Y5 = { class: "q-text-field-wrapper" }, A5 = ["placeholder"], F5 = { class
|
|
|
1892
1892
|
},
|
|
1893
1893
|
emits: ["submit", "update:modelValue"],
|
|
1894
1894
|
setup(e, { emit: t }) {
|
|
1895
|
-
const i = e,
|
|
1895
|
+
const i = e, _ = S(i.defaultText), C = B(() => {
|
|
1896
1896
|
const u = [];
|
|
1897
1897
|
return i.layout === "vertical" ? u.push("vertical") : u.push("horizontal"), i.type === "code" && u.push("code"), i.glow && u.push(`glow-${i.glow}`), u.join(" ");
|
|
1898
|
-
}),
|
|
1898
|
+
}), h = B(() => {
|
|
1899
1899
|
var L;
|
|
1900
|
-
return i.loading || ((L =
|
|
1900
|
+
return i.loading || ((L = _.value) == null ? void 0 : L.trim()).length === 0 ? !1 : i.type === "email" ? f.value : i.type === "code" ? v.value : !0;
|
|
1901
1901
|
}), f = B(() => {
|
|
1902
1902
|
var L;
|
|
1903
|
-
const u = (L =
|
|
1903
|
+
const u = (L = _.value) == null ? void 0 : L.trim();
|
|
1904
1904
|
return !i.disabled && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(u);
|
|
1905
1905
|
}), v = B(() => {
|
|
1906
1906
|
var L;
|
|
1907
|
-
const u = (L =
|
|
1907
|
+
const u = (L = _.value) == null ? void 0 : L.trim();
|
|
1908
1908
|
return /^\d{6}$/.test(u);
|
|
1909
1909
|
}), $ = B(() => i.loading ? "Loading..." : i.actionLabel);
|
|
1910
|
-
|
|
1911
|
-
|
|
1910
|
+
U(() => i.modelValue, (u) => {
|
|
1911
|
+
_.value = u;
|
|
1912
1912
|
});
|
|
1913
1913
|
function M() {
|
|
1914
|
-
|
|
1914
|
+
h.value && t("submit", { text: _.value });
|
|
1915
1915
|
}
|
|
1916
1916
|
function x() {
|
|
1917
|
-
t("update:modelValue",
|
|
1917
|
+
t("update:modelValue", _.value);
|
|
1918
1918
|
}
|
|
1919
1919
|
return (u, L) => (n(), s("div", {
|
|
1920
1920
|
class: D(["q-text-field-with-button", C.value])
|
|
@@ -1923,16 +1923,16 @@ const Y5 = { class: "q-text-field-wrapper" }, A5 = ["placeholder"], F5 = { class
|
|
|
1923
1923
|
e1(o("input", {
|
|
1924
1924
|
class: "q-text-field text-field",
|
|
1925
1925
|
placeholder: i.placeholder,
|
|
1926
|
-
"onUpdate:modelValue": L[0] || (L[0] = (Q) =>
|
|
1926
|
+
"onUpdate:modelValue": L[0] || (L[0] = (Q) => _.value = Q),
|
|
1927
1927
|
onChange: x
|
|
1928
1928
|
}, null, 40, A5), [
|
|
1929
|
-
[c1,
|
|
1929
|
+
[c1, _.value]
|
|
1930
1930
|
])
|
|
1931
1931
|
]),
|
|
1932
1932
|
o("div", F5, [
|
|
1933
1933
|
o("button", {
|
|
1934
1934
|
class: "q-button button primary",
|
|
1935
|
-
disabled: !
|
|
1935
|
+
disabled: !h.value,
|
|
1936
1936
|
onClick: M
|
|
1937
1937
|
}, q($.value), 9, U5)
|
|
1938
1938
|
]),
|
|
@@ -1977,10 +1977,10 @@ const N5 = { class: "q-dropdown-menu" }, G5 = { class: "q-dropdown-menu-inner na
|
|
|
1977
1977
|
},
|
|
1978
1978
|
emits: ["change"],
|
|
1979
1979
|
setup(e, { emit: t }) {
|
|
1980
|
-
const i = e,
|
|
1980
|
+
const i = e, _ = z1(), C = S(!1), h = S(null), f = S(null), v = B(() => {
|
|
1981
1981
|
const u = [];
|
|
1982
|
-
return C.value && u.push("expanded"), i.variant === "outlined" && u.push("frame"), i.hideSelected && u.push("hide-selected"),
|
|
1983
|
-
}), $ = B(() =>
|
|
1982
|
+
return C.value && u.push("expanded"), i.variant === "outlined" && u.push("frame"), i.hideSelected && u.push("hide-selected"), h.value && (h.value.icon || h.value.image) ? u.push("prepend") : u.push("no-prepend"), u.join(" ");
|
|
1983
|
+
}), $ = B(() => _.default !== void 0);
|
|
1984
1984
|
function M() {
|
|
1985
1985
|
C.value || k1(), C.value = !C.value, C.value && setTimeout(() => {
|
|
1986
1986
|
const L = f.value.querySelector(".q-menu");
|
|
@@ -1988,15 +1988,15 @@ const N5 = { class: "q-dropdown-menu" }, G5 = { class: "q-dropdown-menu-inner na
|
|
|
1988
1988
|
}, 10);
|
|
1989
1989
|
}
|
|
1990
1990
|
function x(u) {
|
|
1991
|
-
C.value = !1,
|
|
1991
|
+
C.value = !1, h.value = u, u.action && u.action(u), t("change", u);
|
|
1992
1992
|
}
|
|
1993
|
-
return
|
|
1993
|
+
return U(
|
|
1994
1994
|
() => i.initialItem,
|
|
1995
1995
|
() => {
|
|
1996
|
-
i.initialItem && (
|
|
1996
|
+
i.initialItem && (h.value = i.initialItem);
|
|
1997
1997
|
}
|
|
1998
1998
|
), u1(() => {
|
|
1999
|
-
i.initialItem && (
|
|
1999
|
+
i.initialItem && (h.value = i.initialItem), window.addEventListener("storage", (u) => {
|
|
2000
2000
|
u.key === "quailui_global_popup_trigger" && u.newValue && (C.value = !1);
|
|
2001
2001
|
});
|
|
2002
2002
|
}), (u, L) => {
|
|
@@ -2007,17 +2007,17 @@ const N5 = { class: "q-dropdown-menu" }, G5 = { class: "q-dropdown-menu-inner na
|
|
|
2007
2007
|
class: D(["q-dropdown-menu-action", v.value]),
|
|
2008
2008
|
onClick: g1(M, ["stop"])
|
|
2009
2009
|
}, [
|
|
2010
|
-
!e.hideSelected &&
|
|
2011
|
-
|
|
2010
|
+
!e.hideSelected && h.value && !$.value ? (n(), s("div", J5, [
|
|
2011
|
+
h.value.image ? (n(), s("img", {
|
|
2012
2012
|
key: 0,
|
|
2013
2013
|
class: "menu-image",
|
|
2014
|
-
src:
|
|
2015
|
-
alt:
|
|
2016
|
-
}, null, 8, K5)) :
|
|
2014
|
+
src: h.value.image,
|
|
2015
|
+
alt: h.value.title
|
|
2016
|
+
}, null, 8, K5)) : h.value.icon ? (n(), Z(t1(h.value.icon), {
|
|
2017
2017
|
key: 1,
|
|
2018
2018
|
class: "icon menu-icon"
|
|
2019
2019
|
})) : F("", !0),
|
|
2020
|
-
o("div", X5, q(
|
|
2020
|
+
o("div", X5, q(h.value ? h.value.title : i.placeholder || "Select ..."), 1)
|
|
2021
2021
|
])) : F("", !0),
|
|
2022
2022
|
l1(u.$slots, "default"),
|
|
2023
2023
|
n1(Q, { class: "icon chevron-icon" })
|
|
@@ -2070,7 +2070,7 @@ const t7 = { class: "q-pagination" }, n7 = ["disabled"], o7 = {
|
|
|
2070
2070
|
},
|
|
2071
2071
|
emits: ["change:next", "change:prev", "change:goto", "update:modelValue"],
|
|
2072
2072
|
setup(e, { emit: t }) {
|
|
2073
|
-
const i = e,
|
|
2073
|
+
const i = e, _ = B(() => {
|
|
2074
2074
|
let $ = 6;
|
|
2075
2075
|
const M = [];
|
|
2076
2076
|
if (i.totalPage !== 0)
|
|
@@ -2087,10 +2087,10 @@ const t7 = { class: "q-pagination" }, n7 = ["disabled"], o7 = {
|
|
|
2087
2087
|
}
|
|
2088
2088
|
return M;
|
|
2089
2089
|
}), C = S(i.modelValue);
|
|
2090
|
-
|
|
2090
|
+
U(() => i.modelValue, ($) => {
|
|
2091
2091
|
C.value = $;
|
|
2092
2092
|
});
|
|
2093
|
-
function
|
|
2093
|
+
function h() {
|
|
2094
2094
|
C.value--, t("change:prev", C.value), t("update:modelValue", C.value);
|
|
2095
2095
|
}
|
|
2096
2096
|
function f() {
|
|
@@ -2102,13 +2102,13 @@ const t7 = { class: "q-pagination" }, n7 = ["disabled"], o7 = {
|
|
|
2102
2102
|
return ($, M) => (n(), s("div", t7, [
|
|
2103
2103
|
o("button", {
|
|
2104
2104
|
class: "prev q-button button sm outlined icon",
|
|
2105
|
-
onClick:
|
|
2105
|
+
onClick: h,
|
|
2106
2106
|
disabled: !i.hasPrev
|
|
2107
2107
|
}, [
|
|
2108
2108
|
n1($1, { class: "icon" })
|
|
2109
2109
|
], 8, n7),
|
|
2110
2110
|
e.totalPage !== 0 ? (n(), s("div", o7, [
|
|
2111
|
-
(n(!0), s(p1, null, v1(
|
|
2111
|
+
(n(!0), s(p1, null, v1(_.value, (x) => (n(), s("div", s7, [
|
|
2112
2112
|
o("button", {
|
|
2113
2113
|
class: D(["q-page-indicator q-button button sm plain", x.label === C.value ? "active" : ""]),
|
|
2114
2114
|
disabled: x.disabled,
|
|
@@ -2151,13 +2151,13 @@ const d7 = { class: "q-progress-slot" }, u7 = /* @__PURE__ */ o("div", { class:
|
|
|
2151
2151
|
}
|
|
2152
2152
|
},
|
|
2153
2153
|
setup(e) {
|
|
2154
|
-
const t = e, i = B(() => t.infinite ? "100%" : `${t.value / t.max * 100}%`),
|
|
2155
|
-
return (C,
|
|
2154
|
+
const t = e, i = B(() => t.infinite ? "100%" : `${t.value / t.max * 100}%`), _ = B(() => t.value >= t.max);
|
|
2155
|
+
return (C, h) => (n(), s("div", {
|
|
2156
2156
|
class: D(["q-progress", e.color])
|
|
2157
2157
|
}, [
|
|
2158
2158
|
o("div", d7, [
|
|
2159
2159
|
o("div", {
|
|
2160
|
-
class: D(["q-progress-bar",
|
|
2160
|
+
class: D(["q-progress-bar", _.value ? "" : "animated"]),
|
|
2161
2161
|
style: w1({ width: i.value })
|
|
2162
2162
|
}, _7, 6)
|
|
2163
2163
|
])
|
|
@@ -2167,45 +2167,50 @@ const d7 = { class: "q-progress-slot" }, u7 = /* @__PURE__ */ o("div", { class:
|
|
|
2167
2167
|
const C7 = /* @__PURE__ */ j({
|
|
2168
2168
|
__name: "QLanguageSelector",
|
|
2169
2169
|
props: {
|
|
2170
|
-
|
|
2170
|
+
lang: {
|
|
2171
2171
|
type: String,
|
|
2172
2172
|
default: "en"
|
|
2173
2173
|
}
|
|
2174
2174
|
},
|
|
2175
2175
|
emits: ["change"],
|
|
2176
2176
|
setup(e, { emit: t }) {
|
|
2177
|
-
const i = e,
|
|
2177
|
+
const i = e, _ = S(null), C = B(() => [
|
|
2178
2178
|
{
|
|
2179
2179
|
title: "🇺🇸 English",
|
|
2180
2180
|
value: "en",
|
|
2181
|
-
action:
|
|
2181
|
+
action: h
|
|
2182
2182
|
},
|
|
2183
2183
|
{
|
|
2184
2184
|
title: "🇨🇳 简体中文",
|
|
2185
2185
|
value: "zh",
|
|
2186
|
-
action:
|
|
2186
|
+
action: h
|
|
2187
2187
|
},
|
|
2188
2188
|
{
|
|
2189
2189
|
title: "🇹🇼 正體中文",
|
|
2190
2190
|
value: "zh-tw",
|
|
2191
|
-
action:
|
|
2191
|
+
action: h
|
|
2192
2192
|
},
|
|
2193
2193
|
{
|
|
2194
2194
|
title: "🇯🇵 日本語",
|
|
2195
2195
|
value: "ja",
|
|
2196
|
-
action:
|
|
2196
|
+
action: h
|
|
2197
2197
|
}
|
|
2198
2198
|
]);
|
|
2199
|
-
function
|
|
2200
|
-
t("change",
|
|
2199
|
+
function h(f) {
|
|
2200
|
+
t("change", {
|
|
2201
|
+
title: f.title,
|
|
2202
|
+
value: f.value
|
|
2203
|
+
});
|
|
2201
2204
|
}
|
|
2202
|
-
return
|
|
2203
|
-
|
|
2205
|
+
return U(() => i.lang, (f) => {
|
|
2206
|
+
_.value = C.value.find((v) => f === v.value);
|
|
2207
|
+
}), u1(() => {
|
|
2208
|
+
_.value = C.value.find((f) => i.lang === f.value || localStorage.getItem("quail-language") === f.value) || C.value[0];
|
|
2204
2209
|
}), (f, v) => {
|
|
2205
2210
|
const $ = a1("QDropdownMenu");
|
|
2206
2211
|
return n(), Z($, {
|
|
2207
2212
|
items: C.value,
|
|
2208
|
-
"initial-item":
|
|
2213
|
+
"initial-item": _.value
|
|
2209
2214
|
}, null, 8, ["items", "initial-item"]);
|
|
2210
2215
|
};
|
|
2211
2216
|
}
|
|
@@ -2226,10 +2231,10 @@ const C7 = /* @__PURE__ */ j({
|
|
|
2226
2231
|
const g7 = {
|
|
2227
2232
|
install(e, t) {
|
|
2228
2233
|
t != null && t.debug && console.log("options", t);
|
|
2229
|
-
for (const [i,
|
|
2230
|
-
t != null && t.debug && console.log("[quail-ui] register icon component", i,
|
|
2231
|
-
for (const [i,
|
|
2232
|
-
t != null && t.debug && console.log("[quail-ui] register common component", i,
|
|
2234
|
+
for (const [i, _] of Object.entries(i5))
|
|
2235
|
+
t != null && t.debug && console.log("[quail-ui] register icon component", i, _), e.component(i, _);
|
|
2236
|
+
for (const [i, _] of Object.entries(f7))
|
|
2237
|
+
t != null && t.debug && console.log("[quail-ui] register common component", i, _), e.component(i, _);
|
|
2233
2238
|
document.body.addEventListener("click", (i) => {
|
|
2234
2239
|
k1();
|
|
2235
2240
|
});
|