@squirrel-cloud/ui-vue 0.4.20 → 0.4.22
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/components/index.d.ts +1 -0
- package/dist/components/message-box/index.d.ts +3 -0
- package/dist/components/message-box/message-box.d.ts +6 -0
- package/dist/props/dialog/dialog.d.ts +1 -1
- package/dist/props/index.d.ts +1 -0
- package/dist/props/message-box/index.d.ts +1 -0
- package/dist/props/message-box/message-box.d.ts +16 -0
- package/dist/squirrel-cloud-ui-vue.js +501 -433
- package/dist/squirrel-cloud-ui-vue.umd.cjs +5 -5
- package/dist/style.css +1 -1
- package/dist/typings/Message.d.ts +4 -4
- package/dist/typings/MessageBox.d.ts +29 -0
- package/dist/typings/index.d.ts +1 -0
- package/license +220 -220
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { WarningFilled as Je, CloseFilled as Qe, InfoFilled as Ve, CheckFilled as et, JumpTo as yt, CaretUp as xt, Loading as Re, Check as _t, Close as
|
|
1
|
+
import { defineComponent as T, computed as b, createBlock as C, openBlock as m, unref as u, normalizeClass as U, withCtx as M, createCommentVNode as L, createTextVNode as Se, resolveDynamicComponent as ue, toDisplayString as Y, h as Ee, ref as z, watch as ce, createElementBlock as $, normalizeStyle as X, onMounted as ie, onBeforeUnmount as ge, Transition as he, withDirectives as oe, createElementVNode as I, renderSlot as N, vShow as ve, useSlots as Be, createVNode as S, inject as fe, provide as ke, toRef as se, mergeModels as Z, useModel as le, vModelCheckbox as Ke, toRaw as _e, Fragment as ne, renderList as de, useAttrs as De, Teleport as Ge, mergeProps as pe, shallowRef as re, withModifiers as me, nextTick as ze, vModelDynamic as vt, vModelText as mt, render as Te, cloneVNode as ht, Text as gt, Comment as bt, vModelRadio as Ze } from "vue";
|
|
2
|
+
import { WarningFilled as Je, CloseFilled as Qe, InfoFilled as Ve, CheckFilled as et, JumpTo as yt, CaretUp as xt, Loading as Re, Check as _t, Close as Oe, Bold as $t, Italic as kt, Underline as wt, Strikethrough as qt, Hide as tt, ListUl as Ct, ListOl as St, View as st, ArrowLeft as nt, ArrowRight as ot, ZoomIn as Bt, ZoomOut as zt, FlipHorizontal as Tt, FlipVertical as Rt, Clockwise as Lt, Couterclockwise as It, FitSize as Mt, Fullscreen as Et, Ellipsis as At } from "@squirrel-cloud/icons-vue";
|
|
3
3
|
import Dt from "markdown-it";
|
|
4
4
|
import { RouterLink as Ot } from "vue-router";
|
|
5
5
|
import { autoUpdate as Pt, computePosition as Nt, offset as Ft, flip as Ut, shift as Vt } from "@floating-ui/dom";
|
|
6
|
-
const
|
|
6
|
+
const Pe = {
|
|
7
7
|
primary: Ve,
|
|
8
8
|
success: et,
|
|
9
9
|
info: Ve,
|
|
10
10
|
error: Qe,
|
|
11
11
|
warn: Je
|
|
12
|
-
}, Ht = "sq-alert",
|
|
12
|
+
}, Ht = "sq-alert", Jo = /* @__PURE__ */ T({
|
|
13
13
|
name: Ht,
|
|
14
14
|
__name: "alert",
|
|
15
15
|
props: {
|
|
@@ -22,27 +22,27 @@ const Oe = {
|
|
|
22
22
|
const o = d, n = b(() => {
|
|
23
23
|
const s = [];
|
|
24
24
|
return o.type && s.push(`is-${o.type}`), s;
|
|
25
|
-
}), t = b(() => o.icon ? o.icon : o.showIcon && o.type ?
|
|
25
|
+
}), t = b(() => o.icon ? o.icon : o.showIcon && o.type ? Pe[o.type] : void 0);
|
|
26
26
|
return (s, e) => (m(), C(u(be), {
|
|
27
27
|
class: U(["sq-alert", n.value])
|
|
28
28
|
}, {
|
|
29
|
-
default:
|
|
30
|
-
t.value ? (m(), C(
|
|
31
|
-
Se(" " +
|
|
29
|
+
default: M(() => [
|
|
30
|
+
t.value ? (m(), C(ue(t.value), { key: 0 })) : L("", !0),
|
|
31
|
+
Se(" " + Y(o.text), 1)
|
|
32
32
|
]),
|
|
33
33
|
_: 1
|
|
34
34
|
}, 8, ["class"]));
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
let He = 0;
|
|
38
|
-
const
|
|
38
|
+
const Le = () => ({
|
|
39
39
|
/**
|
|
40
40
|
* 获取下一个ID
|
|
41
41
|
* @returns 下一个ID
|
|
42
42
|
*/
|
|
43
43
|
nextId: () => (He++, He)
|
|
44
44
|
});
|
|
45
|
-
function
|
|
45
|
+
function Ne() {
|
|
46
46
|
function d(n) {
|
|
47
47
|
const t = document.documentElement;
|
|
48
48
|
return getComputedStyle(t).getPropertyValue(n).trim();
|
|
@@ -100,7 +100,7 @@ function jt() {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
let We = 2e3;
|
|
103
|
-
const
|
|
103
|
+
const Fe = () => ({
|
|
104
104
|
/**
|
|
105
105
|
* 获取下一个层级
|
|
106
106
|
* @returns 下一个层级
|
|
@@ -173,7 +173,7 @@ function Yt() {
|
|
|
173
173
|
}
|
|
174
174
|
function o(s, e) {
|
|
175
175
|
const r = t(s, e) ?? [];
|
|
176
|
-
return
|
|
176
|
+
return Ee("article", { class: "sq-article" }, n(r));
|
|
177
177
|
}
|
|
178
178
|
function n(s) {
|
|
179
179
|
if (!s) return;
|
|
@@ -182,7 +182,7 @@ function Yt() {
|
|
|
182
182
|
return r;
|
|
183
183
|
{
|
|
184
184
|
const c = n(r.children);
|
|
185
|
-
return
|
|
185
|
+
return Ee(
|
|
186
186
|
r.tag,
|
|
187
187
|
r.attrs,
|
|
188
188
|
typeof r.tag != "string" ? { default: () => c } : c
|
|
@@ -195,7 +195,7 @@ function Yt() {
|
|
|
195
195
|
const r = [], c = { children: [] };
|
|
196
196
|
let a = c;
|
|
197
197
|
return s.forEach((l) => {
|
|
198
|
-
var B, D, P, O, V,
|
|
198
|
+
var B, D, P, O, V, K, H, ee, J, k, _;
|
|
199
199
|
const { type: i, children: p, content: g, attrs: h, tag: f, hidden: w } = l;
|
|
200
200
|
switch (i) {
|
|
201
201
|
case "heading_open":
|
|
@@ -268,7 +268,7 @@ function Yt() {
|
|
|
268
268
|
const v = t(p, e);
|
|
269
269
|
(V = a.children) == null || V.push(...v ?? []);
|
|
270
270
|
} else
|
|
271
|
-
(
|
|
271
|
+
(K = a.children) == null || K.push(g);
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
case "text": {
|
|
@@ -290,12 +290,12 @@ function Yt() {
|
|
|
290
290
|
break;
|
|
291
291
|
}
|
|
292
292
|
case "input": {
|
|
293
|
-
const v = h ? Object.fromEntries(h) : {}, y = v.type ?? "text", x = `${f}-${y}`,
|
|
293
|
+
const v = h ? Object.fromEntries(h) : {}, y = v.type ?? "text", x = `${f}-${y}`, R = {
|
|
294
294
|
tag: (e == null ? void 0 : e[x]) ?? f,
|
|
295
295
|
children: [],
|
|
296
296
|
attrs: v
|
|
297
297
|
};
|
|
298
|
-
y === "checkbox" && (
|
|
298
|
+
y === "checkbox" && (R.attrs.value = `task-list-${je}`, je++), (k = a.children) == null || k.push(R);
|
|
299
299
|
break;
|
|
300
300
|
}
|
|
301
301
|
case "html_inline": {
|
|
@@ -347,7 +347,7 @@ function Kt() {
|
|
|
347
347
|
throttle: d
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt =
|
|
350
|
+
const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = T({
|
|
351
351
|
name: Jt,
|
|
352
352
|
props: {
|
|
353
353
|
text: {
|
|
@@ -369,13 +369,13 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
369
369
|
const o = b(() => ({
|
|
370
370
|
hr: $e,
|
|
371
371
|
blur: rs,
|
|
372
|
-
img:
|
|
372
|
+
img: mn,
|
|
373
373
|
"input-checkbox": lt,
|
|
374
374
|
...d.customNodeMap
|
|
375
375
|
}));
|
|
376
376
|
return () => {
|
|
377
377
|
if (!d.md)
|
|
378
|
-
return
|
|
378
|
+
return Ee("article", {
|
|
379
379
|
class: "sq-article",
|
|
380
380
|
innerHTML: d.text
|
|
381
381
|
});
|
|
@@ -383,7 +383,7 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
383
383
|
return Zt(n, o.value);
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
|
-
}), es = ["src", "alt"], ts = ["textContent"], ss = "sq-avatar",
|
|
386
|
+
}), es = ["src", "alt"], ts = ["textContent"], ss = "sq-avatar", Qo = /* @__PURE__ */ T({
|
|
387
387
|
name: ss,
|
|
388
388
|
__name: "avatar",
|
|
389
389
|
props: {
|
|
@@ -404,7 +404,7 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
404
404
|
"--avatar-bg-color": c()
|
|
405
405
|
};
|
|
406
406
|
}), e = b(() => o.alt.charAt(0).toUpperCase());
|
|
407
|
-
|
|
407
|
+
ce(
|
|
408
408
|
() => o.img,
|
|
409
409
|
() => {
|
|
410
410
|
n.value = !0;
|
|
@@ -424,11 +424,11 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
424
424
|
onError: r
|
|
425
425
|
}, null, 40, es)) : (m(), $("span", {
|
|
426
426
|
key: 1,
|
|
427
|
-
textContent:
|
|
427
|
+
textContent: Y(e.value)
|
|
428
428
|
}, null, 8, ts))
|
|
429
429
|
], 6));
|
|
430
430
|
}
|
|
431
|
-
}), ns = { class: "sq-backtop" }, os = "sq-backtop",
|
|
431
|
+
}), ns = { class: "sq-backtop" }, os = "sq-backtop", ea = /* @__PURE__ */ T({
|
|
432
432
|
name: os,
|
|
433
433
|
__name: "backtop",
|
|
434
434
|
props: {
|
|
@@ -441,7 +441,7 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
441
441
|
},
|
|
442
442
|
setup(d) {
|
|
443
443
|
const { throttle: o } = Kt(), n = o(a), t = new ResizeObserver(l), s = d, e = z(100), r = z(0), c = b(() => r.value > s.visibilityHeight);
|
|
444
|
-
|
|
444
|
+
ie(() => {
|
|
445
445
|
var g;
|
|
446
446
|
l(), n(), window.addEventListener("scroll", n);
|
|
447
447
|
const p = document.querySelector(s.target) ?? document.body;
|
|
@@ -463,7 +463,7 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
463
463
|
return (p, g) => (m(), C(he, {
|
|
464
464
|
name: s.transition
|
|
465
465
|
}, {
|
|
466
|
-
default:
|
|
466
|
+
default: M(() => {
|
|
467
467
|
var h, f, w;
|
|
468
468
|
return [
|
|
469
469
|
oe(I("div", ns, [
|
|
@@ -471,7 +471,7 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
471
471
|
class: "sq-backtop-wrap",
|
|
472
472
|
onClick: i
|
|
473
473
|
}, [
|
|
474
|
-
s.progress ? (m(), C(u(
|
|
474
|
+
s.progress ? (m(), C(u(ao), {
|
|
475
475
|
key: 0,
|
|
476
476
|
variant: "circle",
|
|
477
477
|
label: !1,
|
|
@@ -482,7 +482,7 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
482
482
|
color: (w = s.progressProps) == null ? void 0 : w.color
|
|
483
483
|
}, null, 8, ["value", "max", "type", "stroke", "color"])) : L("", !0),
|
|
484
484
|
N(p.$slots, "default", {}, () => [
|
|
485
|
-
(m(), C(
|
|
485
|
+
(m(), C(ue(s.icon)))
|
|
486
486
|
])
|
|
487
487
|
])
|
|
488
488
|
], 512), [
|
|
@@ -493,7 +493,7 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
493
493
|
_: 3
|
|
494
494
|
}, 8, ["name"]));
|
|
495
495
|
}
|
|
496
|
-
}), as = ["textContent"], ls = "sq-badge", Xe = /* @__PURE__ */
|
|
496
|
+
}), as = ["textContent"], ls = "sq-badge", Xe = /* @__PURE__ */ T({
|
|
497
497
|
name: ls,
|
|
498
498
|
__name: "badge",
|
|
499
499
|
props: {
|
|
@@ -511,23 +511,23 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
511
511
|
return n.dot && c.push("is-dot"), c.push(`is-${n.type}`), c;
|
|
512
512
|
}), s = b(() => o.default ? "sup" : "div"), e = b(() => !n.dot && n.text || n.showZero ? !0 : n.count > 0), r = b(() => n.dot ? "" : n.text ? n.text : n.max && n.count > n.max ? `${n.max}+` : `${n.count}`);
|
|
513
513
|
return (c, a) => (m(), C(he, { name: "sq-zoom" }, {
|
|
514
|
-
default:
|
|
514
|
+
default: M(() => [
|
|
515
515
|
u(o).default || e.value ? (m(), $("span", {
|
|
516
516
|
key: 0,
|
|
517
517
|
class: U(["sq-badge", t.value]),
|
|
518
518
|
style: X({ "--badge-color": n.color })
|
|
519
519
|
}, [
|
|
520
520
|
N(c.$slots, "default"),
|
|
521
|
-
(m(), C(
|
|
522
|
-
default:
|
|
521
|
+
(m(), C(ue(s.value), { class: "sq-badge-label" }, {
|
|
522
|
+
default: M(() => [
|
|
523
523
|
S(he, {
|
|
524
524
|
name: u(o).default ? "sq-zoom" : ""
|
|
525
525
|
}, {
|
|
526
|
-
default:
|
|
526
|
+
default: M(() => [
|
|
527
527
|
e.value ? (m(), $("span", {
|
|
528
528
|
key: 0,
|
|
529
529
|
class: "sq-badge-label-inner",
|
|
530
|
-
textContent:
|
|
530
|
+
textContent: Y(r.value)
|
|
531
531
|
}, null, 8, as)) : L("", !0)
|
|
532
532
|
]),
|
|
533
533
|
_: 1
|
|
@@ -540,12 +540,12 @@ const { md2tokens: Gt, tokens2vueh: Zt } = Yt(), Jt = "sq-article", Qt = R({
|
|
|
540
540
|
_: 3
|
|
541
541
|
}));
|
|
542
542
|
}
|
|
543
|
-
}), is = "sq-blur", rs = /* @__PURE__ */
|
|
543
|
+
}), is = "sq-blur", rs = /* @__PURE__ */ T({
|
|
544
544
|
name: is,
|
|
545
545
|
__name: "blur",
|
|
546
546
|
setup(d) {
|
|
547
547
|
return (o, n) => (m(), C(u(be), { class: "sq-blur" }, {
|
|
548
|
-
default:
|
|
548
|
+
default: M(() => [
|
|
549
549
|
N(o.$slots, "default")
|
|
550
550
|
]),
|
|
551
551
|
_: 3
|
|
@@ -639,7 +639,7 @@ function cs(d) {
|
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
function ds(d) {
|
|
642
|
-
const { getOption: o } = we(), n = fe(Ce, void 0), t = fe(
|
|
642
|
+
const { getOption: o } = we(), n = fe(Ce, void 0), t = fe(Ue, void 0), s = b(
|
|
643
643
|
() => {
|
|
644
644
|
var a;
|
|
645
645
|
return o(d.size, (a = u(n)) == null ? void 0 : a.size, "md");
|
|
@@ -721,7 +721,7 @@ function ps(d) {
|
|
|
721
721
|
};
|
|
722
722
|
}
|
|
723
723
|
function vs(d) {
|
|
724
|
-
const { getOption: o } = we(), n = fe(Ce, void 0), t = fe(
|
|
724
|
+
const { getOption: o } = we(), n = fe(Ce, void 0), t = fe(Ue, void 0), s = b(
|
|
725
725
|
() => {
|
|
726
726
|
var r;
|
|
727
727
|
return o(d.size, (r = u(n)) == null ? void 0 : r.size, "md");
|
|
@@ -738,7 +738,7 @@ function vs(d) {
|
|
|
738
738
|
);
|
|
739
739
|
return { switchSize: s, switchDisabled: e, id: t };
|
|
740
740
|
}
|
|
741
|
-
const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */
|
|
741
|
+
const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ T({
|
|
742
742
|
name: hs,
|
|
743
743
|
__name: "button",
|
|
744
744
|
props: {
|
|
@@ -769,15 +769,15 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
769
769
|
S(u(be), {
|
|
770
770
|
size: u(e) === "lg" ? "md" : u(e)
|
|
771
771
|
}, {
|
|
772
|
-
default:
|
|
773
|
-
i.value ? (m(), C(
|
|
772
|
+
default: M(() => [
|
|
773
|
+
i.value ? (m(), C(ue(i.value), { key: 0 })) : L("", !0),
|
|
774
774
|
N(g.$slots, "default")
|
|
775
775
|
]),
|
|
776
776
|
_: 3
|
|
777
777
|
}, 8, ["size"])
|
|
778
778
|
], 10, ms));
|
|
779
779
|
}
|
|
780
|
-
}), gs = { class: "sq-button-group" }, bs = "sq-button-group",
|
|
780
|
+
}), gs = { class: "sq-button-group" }, bs = "sq-button-group", ta = /* @__PURE__ */ T({
|
|
781
781
|
name: bs,
|
|
782
782
|
__name: "button-group",
|
|
783
783
|
props: {
|
|
@@ -806,7 +806,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
806
806
|
}, _s = ["textContent"], $s = {
|
|
807
807
|
key: 1,
|
|
808
808
|
class: "sq-card-footer"
|
|
809
|
-
}, ks = "sq-card",
|
|
809
|
+
}, ks = "sq-card", sa = /* @__PURE__ */ T({
|
|
810
810
|
name: ks,
|
|
811
811
|
__name: "card",
|
|
812
812
|
props: {
|
|
@@ -819,7 +819,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
819
819
|
n.title || u(o).title ? (m(), $("div", xs, [
|
|
820
820
|
I("h2", {
|
|
821
821
|
class: U({ "has-decorative": n.decorative }),
|
|
822
|
-
textContent:
|
|
822
|
+
textContent: Y(n.title)
|
|
823
823
|
}, null, 10, _s),
|
|
824
824
|
N(t.$slots, "title")
|
|
825
825
|
])) : L("", !0),
|
|
@@ -829,7 +829,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
829
829
|
])) : L("", !0)
|
|
830
830
|
]));
|
|
831
831
|
}
|
|
832
|
-
}), ws = ["autofocus", "name", "form", "value", "disabled"], qs = ["textContent"], Cs = "sq-checkbox", lt = /* @__PURE__ */
|
|
832
|
+
}), ws = ["autofocus", "name", "form", "value", "disabled"], qs = ["textContent"], Cs = "sq-checkbox", lt = /* @__PURE__ */ T({
|
|
833
833
|
name: Cs,
|
|
834
834
|
__name: "checkbox",
|
|
835
835
|
props: /* @__PURE__ */ Z({
|
|
@@ -859,14 +859,14 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
859
859
|
const h = [], f = u(s), w = u(e), B = u(a);
|
|
860
860
|
return f !== "md" && h.push(`sq-selection--${f}`), g.value && h.push("is-checked"), w && h.push("is-disabled"), B && h.push(`is-${B}`), h;
|
|
861
861
|
}), g = b(() => l ? u(l).list.includes(t.value) : i.value);
|
|
862
|
-
return
|
|
862
|
+
return ce(g, (h) => {
|
|
863
863
|
if (i.value !== h) {
|
|
864
864
|
i.value = h;
|
|
865
865
|
return;
|
|
866
866
|
}
|
|
867
|
-
}),
|
|
867
|
+
}), ce(i, (h) => {
|
|
868
868
|
g.value !== h && l && l.value.toggleItem(t.value);
|
|
869
|
-
}),
|
|
869
|
+
}), ie(() => {
|
|
870
870
|
i.value = g.value;
|
|
871
871
|
}), (h, f) => (m(), $("label", {
|
|
872
872
|
class: U(["sq-selection sq-checkbox", p.value])
|
|
@@ -895,11 +895,11 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
895
895
|
t.label ? (m(), $("span", {
|
|
896
896
|
key: 1,
|
|
897
897
|
class: "sq-selection-label",
|
|
898
|
-
textContent:
|
|
898
|
+
textContent: Y(t.label)
|
|
899
899
|
}, null, 8, qs)) : L("", !0)
|
|
900
900
|
], 2));
|
|
901
901
|
}
|
|
902
|
-
}), Ss = { class: "sq-checkbox-group sq-selection-group" }, Bs = "sq-checkbox-group", zs = /* @__PURE__ */
|
|
902
|
+
}), Ss = { class: "sq-checkbox-group sq-selection-group" }, Bs = "sq-checkbox-group", zs = /* @__PURE__ */ T({
|
|
903
903
|
name: Bs,
|
|
904
904
|
__name: "checkbox-group",
|
|
905
905
|
props: {
|
|
@@ -913,7 +913,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
913
913
|
},
|
|
914
914
|
emits: ["change", "update:value"],
|
|
915
915
|
setup(d, { emit: o }) {
|
|
916
|
-
const { nextId: n } =
|
|
916
|
+
const { nextId: n } = Le(), t = o, s = d, e = z(s.value ?? []), r = b(() => s.name ?? `sq-checkbox-${n()}`);
|
|
917
917
|
ke(
|
|
918
918
|
it,
|
|
919
919
|
z({
|
|
@@ -925,7 +925,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
925
925
|
list: e,
|
|
926
926
|
toggleItem: c
|
|
927
927
|
})
|
|
928
|
-
),
|
|
928
|
+
), ce(
|
|
929
929
|
() => s.value,
|
|
930
930
|
(a) => {
|
|
931
931
|
const l = a || [], i = [.../* @__PURE__ */ new Set([...l, e.value])];
|
|
@@ -945,8 +945,8 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
945
945
|
])
|
|
946
946
|
]));
|
|
947
947
|
}
|
|
948
|
-
}), it = Symbol("checkbox-group-context-keys"),
|
|
949
|
-
name:
|
|
948
|
+
}), it = Symbol("checkbox-group-context-keys"), Ts = "sq-mask", rt = /* @__PURE__ */ T({
|
|
949
|
+
name: Ts,
|
|
950
950
|
inheritAttrs: !1,
|
|
951
951
|
__name: "mask",
|
|
952
952
|
props: /* @__PURE__ */ Z({
|
|
@@ -959,10 +959,10 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
959
959
|
}),
|
|
960
960
|
emits: /* @__PURE__ */ Z(["open", "opened", "close", "closed"], ["update:visible"]),
|
|
961
961
|
setup(d, { emit: o }) {
|
|
962
|
-
const { nextZIndex: n } =
|
|
962
|
+
const { nextZIndex: n } = Fe(), t = De();
|
|
963
963
|
let s;
|
|
964
964
|
const e = o, r = d, c = z(0), a = z(!1), l = le(d, "visible");
|
|
965
|
-
a.value = l.value,
|
|
965
|
+
a.value = l.value, ce(l, (h) => {
|
|
966
966
|
const f = document.scrollingElement;
|
|
967
967
|
h ? (s = f.style.overflow, f.style.overflow = "hidden", c.value = n(), a.value = !0, document.addEventListener("keydown", i)) : (f.style.overflow = s, document.removeEventListener("keydown", i));
|
|
968
968
|
}), ge(() => {
|
|
@@ -993,7 +993,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
993
993
|
onBeforeLeave: f[2] || (f[2] = (w) => e("close")),
|
|
994
994
|
onAfterLeave: f[3] || (f[3] = (w) => e("closed"))
|
|
995
995
|
}, {
|
|
996
|
-
default:
|
|
996
|
+
default: M(() => [
|
|
997
997
|
a.value ? oe((m(), $("div", pe({
|
|
998
998
|
key: 0,
|
|
999
999
|
class: "sq-mask",
|
|
@@ -1008,13 +1008,13 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1008
1008
|
})
|
|
1009
1009
|
]));
|
|
1010
1010
|
}
|
|
1011
|
-
}),
|
|
1011
|
+
}), Rs = {
|
|
1012
1012
|
key: 0,
|
|
1013
1013
|
class: "sq-dialog-header"
|
|
1014
1014
|
}, Ls = ["textContent"], Is = { class: "sq-dialog-body" }, Ms = {
|
|
1015
1015
|
key: 1,
|
|
1016
1016
|
class: "sq-dialog-footer"
|
|
1017
|
-
}, Es = "sq-dialog",
|
|
1017
|
+
}, Es = "sq-dialog", As = /* @__PURE__ */ T({
|
|
1018
1018
|
name: Es,
|
|
1019
1019
|
inheritAttrs: !1,
|
|
1020
1020
|
__name: "dialog",
|
|
@@ -1037,10 +1037,10 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1037
1037
|
}),
|
|
1038
1038
|
emits: /* @__PURE__ */ Z(["open", "opened", "close", "closed"], ["update:visible"]),
|
|
1039
1039
|
setup(d, { emit: o }) {
|
|
1040
|
-
const n = Be(), t =
|
|
1040
|
+
const n = Be(), t = De(), s = o, e = d, r = z(!1), c = z(!1), a = le(d, "visible"), l = b(() => !!e.title || !!n.header), i = b(() => {
|
|
1041
1041
|
const P = [];
|
|
1042
1042
|
return e.type && P.push(`is-${e.type}`), l.value && P.push("has-header"), P.push(t.class), [P];
|
|
1043
|
-
}), p = b(() => e.type ?
|
|
1043
|
+
}), p = b(() => e.type ? Pe[e.type] : void 0), g = b(() => ({
|
|
1044
1044
|
type: e.type ?? "primary",
|
|
1045
1045
|
loading: r.value && c.value,
|
|
1046
1046
|
disabled: r.value && !c.value,
|
|
@@ -1072,29 +1072,31 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1072
1072
|
return (P, O) => (m(), C(u(rt), {
|
|
1073
1073
|
visible: a.value,
|
|
1074
1074
|
"onUpdate:visible": O[0] || (O[0] = (V) => a.value = V),
|
|
1075
|
+
"mask-closeable": e.maskCloseable,
|
|
1076
|
+
keyboard: e.keyboard,
|
|
1075
1077
|
"before-close": () => w(e.beforeClose),
|
|
1076
1078
|
onOpen: O[1] || (O[1] = (V) => s("open")),
|
|
1077
1079
|
onOpened: O[2] || (O[2] = (V) => s("opened")),
|
|
1078
1080
|
onClose: O[3] || (O[3] = (V) => s("close")),
|
|
1079
1081
|
onClosed: O[4] || (O[4] = (V) => s("closed"))
|
|
1080
1082
|
}, {
|
|
1081
|
-
default:
|
|
1083
|
+
default: M(() => [
|
|
1082
1084
|
I("div", {
|
|
1083
1085
|
class: U(["sq-dialog", i.value]),
|
|
1084
1086
|
style: X(u(t).style)
|
|
1085
1087
|
}, [
|
|
1086
|
-
l.value ? (m(), $("div",
|
|
1087
|
-
p.value ? (m(), C(
|
|
1088
|
+
l.value ? (m(), $("div", Rs, [
|
|
1089
|
+
p.value ? (m(), C(ue(p.value), {
|
|
1088
1090
|
key: 0,
|
|
1089
1091
|
class: "sq-dialog-header-icon"
|
|
1090
1092
|
})) : L("", !0),
|
|
1091
1093
|
N(P.$slots, "header", {}, () => [
|
|
1092
1094
|
I("span", {
|
|
1093
1095
|
class: "sq-dialog-header-title",
|
|
1094
|
-
textContent:
|
|
1096
|
+
textContent: Y(e.title)
|
|
1095
1097
|
}, null, 8, Ls)
|
|
1096
1098
|
]),
|
|
1097
|
-
S(u(
|
|
1099
|
+
S(u(Oe), {
|
|
1098
1100
|
class: "sq-dialog-close",
|
|
1099
1101
|
onClick: B
|
|
1100
1102
|
})
|
|
@@ -1105,14 +1107,14 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1105
1107
|
e.footer ? (m(), $("div", Ms, [
|
|
1106
1108
|
N(P.$slots, "footer", {}, () => [
|
|
1107
1109
|
S(u(j), pe(h.value, { onClick: B }), {
|
|
1108
|
-
default:
|
|
1109
|
-
Se(
|
|
1110
|
+
default: M(() => [
|
|
1111
|
+
Se(Y(e.cancelText), 1)
|
|
1110
1112
|
]),
|
|
1111
1113
|
_: 1
|
|
1112
1114
|
}, 16),
|
|
1113
1115
|
S(u(j), pe(g.value, { onClick: D }), {
|
|
1114
|
-
default:
|
|
1115
|
-
Se(
|
|
1116
|
+
default: M(() => [
|
|
1117
|
+
Se(Y(e.okText), 1)
|
|
1116
1118
|
]),
|
|
1117
1119
|
_: 1
|
|
1118
1120
|
}, 16)
|
|
@@ -1121,10 +1123,10 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1121
1123
|
], 6)
|
|
1122
1124
|
]),
|
|
1123
1125
|
_: 3
|
|
1124
|
-
}, 8, ["visible", "before-close"]));
|
|
1126
|
+
}, 8, ["visible", "mask-closeable", "keyboard", "before-close"]));
|
|
1125
1127
|
}
|
|
1126
|
-
}),
|
|
1127
|
-
name:
|
|
1128
|
+
}), Ds = "sq-divider", $e = /* @__PURE__ */ T({
|
|
1129
|
+
name: Ds,
|
|
1128
1130
|
__name: "divider",
|
|
1129
1131
|
props: {
|
|
1130
1132
|
direction: { default: "horizontal" },
|
|
@@ -1147,15 +1149,15 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1147
1149
|
ellipsis: n.ellipsis,
|
|
1148
1150
|
size: n.size
|
|
1149
1151
|
}, {
|
|
1150
|
-
default:
|
|
1152
|
+
default: M(() => [
|
|
1151
1153
|
N(s.$slots, "default")
|
|
1152
1154
|
]),
|
|
1153
1155
|
_: 3
|
|
1154
1156
|
}, 8, ["ellipsis", "size"])) : L("", !0)
|
|
1155
1157
|
], 6));
|
|
1156
1158
|
}
|
|
1157
|
-
}),
|
|
1158
|
-
name:
|
|
1159
|
+
}), Os = "sq-editor-bold", Ps = /* @__PURE__ */ T({
|
|
1160
|
+
name: Os,
|
|
1159
1161
|
__name: "editor-bold",
|
|
1160
1162
|
props: {
|
|
1161
1163
|
disabled: { type: Boolean },
|
|
@@ -1185,7 +1187,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1185
1187
|
tip: "加粗 ( Ctrl + B )",
|
|
1186
1188
|
disabled: s.disabled
|
|
1187
1189
|
}, {
|
|
1188
|
-
default:
|
|
1190
|
+
default: M(() => [
|
|
1189
1191
|
S(u(j), {
|
|
1190
1192
|
text: "",
|
|
1191
1193
|
icon: u($t),
|
|
@@ -1196,8 +1198,8 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1196
1198
|
_: 1
|
|
1197
1199
|
}, 8, ["disabled"]));
|
|
1198
1200
|
}
|
|
1199
|
-
}),
|
|
1200
|
-
name:
|
|
1201
|
+
}), Ns = "sq-editor-italic", Fs = /* @__PURE__ */ T({
|
|
1202
|
+
name: Ns,
|
|
1201
1203
|
__name: "editor-italic",
|
|
1202
1204
|
props: {
|
|
1203
1205
|
disabled: { type: Boolean },
|
|
@@ -1235,7 +1237,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1235
1237
|
tip: "斜体 ( Ctrl + I )",
|
|
1236
1238
|
disabled: s.disabled
|
|
1237
1239
|
}, {
|
|
1238
|
-
default:
|
|
1240
|
+
default: M(() => [
|
|
1239
1241
|
S(u(j), {
|
|
1240
1242
|
text: "",
|
|
1241
1243
|
icon: u(kt),
|
|
@@ -1246,8 +1248,8 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1246
1248
|
_: 1
|
|
1247
1249
|
}, 8, ["disabled"]));
|
|
1248
1250
|
}
|
|
1249
|
-
}),
|
|
1250
|
-
name:
|
|
1251
|
+
}), Us = "sq-editor-underline", Vs = /* @__PURE__ */ T({
|
|
1252
|
+
name: Us,
|
|
1251
1253
|
__name: "editor-underline",
|
|
1252
1254
|
props: {
|
|
1253
1255
|
disabled: { type: Boolean },
|
|
@@ -1277,7 +1279,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1277
1279
|
tip: "下划线 ( Ctrl + U )",
|
|
1278
1280
|
disabled: s.disabled
|
|
1279
1281
|
}, {
|
|
1280
|
-
default:
|
|
1282
|
+
default: M(() => [
|
|
1281
1283
|
S(u(j), {
|
|
1282
1284
|
text: "",
|
|
1283
1285
|
icon: u(wt),
|
|
@@ -1288,8 +1290,8 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1288
1290
|
_: 1
|
|
1289
1291
|
}, 8, ["disabled"]));
|
|
1290
1292
|
}
|
|
1291
|
-
}),
|
|
1292
|
-
name:
|
|
1293
|
+
}), Hs = "sq-editor-strikethrough", Ws = /* @__PURE__ */ T({
|
|
1294
|
+
name: Hs,
|
|
1293
1295
|
__name: "editor-strikethrough",
|
|
1294
1296
|
props: {
|
|
1295
1297
|
disabled: { type: Boolean },
|
|
@@ -1315,7 +1317,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1315
1317
|
tip: "删除线",
|
|
1316
1318
|
disabled: t.disabled
|
|
1317
1319
|
}, {
|
|
1318
|
-
default:
|
|
1320
|
+
default: M(() => [
|
|
1319
1321
|
S(u(j), {
|
|
1320
1322
|
text: "",
|
|
1321
1323
|
icon: u(qt),
|
|
@@ -1326,8 +1328,8 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1326
1328
|
_: 1
|
|
1327
1329
|
}, 8, ["disabled"]));
|
|
1328
1330
|
}
|
|
1329
|
-
}),
|
|
1330
|
-
name:
|
|
1331
|
+
}), js = "sq-editor-blur", Xs = /* @__PURE__ */ T({
|
|
1332
|
+
name: js,
|
|
1331
1333
|
__name: "editor-blur",
|
|
1332
1334
|
props: {
|
|
1333
1335
|
disabled: { type: Boolean },
|
|
@@ -1357,7 +1359,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1357
1359
|
tip: "模糊块",
|
|
1358
1360
|
disabled: t.disabled
|
|
1359
1361
|
}, {
|
|
1360
|
-
default:
|
|
1362
|
+
default: M(() => [
|
|
1361
1363
|
S(u(j), {
|
|
1362
1364
|
text: "",
|
|
1363
1365
|
icon: u(tt),
|
|
@@ -1368,8 +1370,8 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1368
1370
|
_: 1
|
|
1369
1371
|
}, 8, ["disabled"]));
|
|
1370
1372
|
}
|
|
1371
|
-
}),
|
|
1372
|
-
name:
|
|
1373
|
+
}), Ys = "sq-editor-ul", Ks = /* @__PURE__ */ T({
|
|
1374
|
+
name: Ys,
|
|
1373
1375
|
__name: "editor-ul",
|
|
1374
1376
|
props: {
|
|
1375
1377
|
disabled: { type: Boolean },
|
|
@@ -1407,7 +1409,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1407
1409
|
tip: "无序列表",
|
|
1408
1410
|
disabled: t.disabled
|
|
1409
1411
|
}, {
|
|
1410
|
-
default:
|
|
1412
|
+
default: M(() => [
|
|
1411
1413
|
S(u(j), {
|
|
1412
1414
|
text: "",
|
|
1413
1415
|
icon: u(Ct),
|
|
@@ -1418,8 +1420,8 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1418
1420
|
_: 1
|
|
1419
1421
|
}, 8, ["disabled"]));
|
|
1420
1422
|
}
|
|
1421
|
-
}),
|
|
1422
|
-
name:
|
|
1423
|
+
}), Gs = "sq-editor-ol", Zs = /* @__PURE__ */ T({
|
|
1424
|
+
name: Gs,
|
|
1423
1425
|
__name: "editor-ol",
|
|
1424
1426
|
props: {
|
|
1425
1427
|
disabled: { type: Boolean },
|
|
@@ -1462,7 +1464,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1462
1464
|
tip: "有序列表",
|
|
1463
1465
|
disabled: t.disabled
|
|
1464
1466
|
}, {
|
|
1465
|
-
default:
|
|
1467
|
+
default: M(() => [
|
|
1466
1468
|
S(u(j), {
|
|
1467
1469
|
text: "",
|
|
1468
1470
|
icon: u(St),
|
|
@@ -1473,8 +1475,8 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1473
1475
|
_: 1
|
|
1474
1476
|
}, 8, ["disabled"]));
|
|
1475
1477
|
}
|
|
1476
|
-
}),
|
|
1477
|
-
name:
|
|
1478
|
+
}), Js = { class: "sq-editor-body" }, Qs = { class: "sq-editor-toolbar" }, en = { class: "sq-editor-control" }, tn = "sq-editor", na = /* @__PURE__ */ T({
|
|
1479
|
+
name: tn,
|
|
1478
1480
|
__name: "editor",
|
|
1479
1481
|
props: /* @__PURE__ */ Z({
|
|
1480
1482
|
round: { type: Boolean },
|
|
@@ -1501,7 +1503,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1501
1503
|
}
|
|
1502
1504
|
];
|
|
1503
1505
|
let n;
|
|
1504
|
-
const t = d, s = z("edit"), e = z([]), r = z(!1), c = z(""), a = z(), l = z({}), i =
|
|
1506
|
+
const t = d, s = z("edit"), e = z([]), r = z(!1), c = z(""), a = z(), l = z({}), i = re(null), p = re(null), g = re(null), h = re(
|
|
1505
1507
|
null
|
|
1506
1508
|
), f = le(d, "value"), w = b(() => {
|
|
1507
1509
|
const y = [];
|
|
@@ -1514,10 +1516,10 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1514
1516
|
), P = b(
|
|
1515
1517
|
() => typeof t.beforePreview == "function" ? t.beforePreview(f.value) : f.value
|
|
1516
1518
|
);
|
|
1517
|
-
|
|
1518
|
-
document.addEventListener("selectionchange",
|
|
1519
|
+
ie(() => {
|
|
1520
|
+
document.addEventListener("selectionchange", K), document.addEventListener("click", H);
|
|
1519
1521
|
}), ge(() => {
|
|
1520
|
-
document.removeEventListener("selectionchange",
|
|
1522
|
+
document.removeEventListener("selectionchange", K), document.removeEventListener("click", H);
|
|
1521
1523
|
});
|
|
1522
1524
|
function O(y) {
|
|
1523
1525
|
y === "edit" && ze(() => {
|
|
@@ -1527,7 +1529,7 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1527
1529
|
}
|
|
1528
1530
|
function V(y) {
|
|
1529
1531
|
var Q, G, A;
|
|
1530
|
-
const x = e.value[a.value],
|
|
1532
|
+
const x = e.value[a.value], R = (x == null ? void 0 : x.replace(" ", "")) ?? "";
|
|
1531
1533
|
if (y.key === "Tab") {
|
|
1532
1534
|
y.preventDefault();
|
|
1533
1535
|
const F = x.substring(0, l.value.startOfRow), q = x.substring(l.value.endOfRow);
|
|
@@ -1550,10 +1552,10 @@ const ms = ["disabled", "form", "type"], hs = "sq-button", j = /* @__PURE__ */ R
|
|
|
1550
1552
|
if (k(x)) {
|
|
1551
1553
|
y.preventDefault();
|
|
1552
1554
|
const F = x.substring(0, x.indexOf("- "));
|
|
1553
|
-
if (
|
|
1554
|
-
const
|
|
1555
|
+
if (R !== "- ") {
|
|
1556
|
+
const E = 3 + F.length;
|
|
1555
1557
|
e.value[a.value] = `${x}
|
|
1556
|
-
${F}- `, ee(y.target), v(e.value,
|
|
1558
|
+
${F}- `, ee(y.target), v(e.value, E, E);
|
|
1557
1559
|
return;
|
|
1558
1560
|
}
|
|
1559
1561
|
const q = 2 + F.length;
|
|
@@ -1562,11 +1564,11 @@ ${F}- `, ee(y.target), v(e.value, M, M);
|
|
|
1562
1564
|
}
|
|
1563
1565
|
if (_(x)) {
|
|
1564
1566
|
y.preventDefault();
|
|
1565
|
-
const F =
|
|
1566
|
-
if (
|
|
1567
|
-
const ye =
|
|
1567
|
+
const F = R.match(/^\d+\.\s/)[0], E = `${parseInt(F) + 1}. `, W = x.substring(0, x.indexOf(F));
|
|
1568
|
+
if (R !== F) {
|
|
1569
|
+
const ye = E.length + W.length + 1;
|
|
1568
1570
|
e.value[a.value] = `${x}
|
|
1569
|
-
${W}${
|
|
1571
|
+
${W}${E}`, ee(y.target), v(e.value, ye, ye);
|
|
1570
1572
|
return;
|
|
1571
1573
|
}
|
|
1572
1574
|
const te = F.length + W.length;
|
|
@@ -1575,10 +1577,10 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1575
1577
|
}
|
|
1576
1578
|
}
|
|
1577
1579
|
}
|
|
1578
|
-
function
|
|
1579
|
-
var
|
|
1580
|
+
function K(y) {
|
|
1581
|
+
var R;
|
|
1580
1582
|
const x = window.getSelection();
|
|
1581
|
-
(x == null ? void 0 : x.focusNode) === ((
|
|
1583
|
+
(x == null ? void 0 : x.focusNode) === ((R = i.value) == null ? void 0 : R.$el) && (n = y.target, !((n == null ? void 0 : n.selectionStart) === void 0 || (n == null ? void 0 : n.selectionEnd) === void 0) && (l.value.start = (n == null ? void 0 : n.selectionStart) ?? 0, l.value.end = (n == null ? void 0 : n.selectionEnd) ?? 0, c.value = f.value.substring(
|
|
1582
1584
|
l.value.start,
|
|
1583
1585
|
l.value.end
|
|
1584
1586
|
), J()));
|
|
@@ -1597,9 +1599,9 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1597
1599
|
const y = n.selectionStart, x = f.value.substring(0, y ?? 0);
|
|
1598
1600
|
a.value = x.split(`
|
|
1599
1601
|
`).length - 1;
|
|
1600
|
-
const
|
|
1602
|
+
const R = Math.max(x.lastIndexOf(`
|
|
1601
1603
|
`) + 1, 0);
|
|
1602
|
-
l.value.startOfRow = l.value.start -
|
|
1604
|
+
l.value.startOfRow = l.value.start - R, l.value.endOfRow = l.value.startOfRow + c.value.length, e.value = f.value.split(`
|
|
1603
1605
|
`);
|
|
1604
1606
|
}
|
|
1605
1607
|
function k(y) {
|
|
@@ -1608,9 +1610,9 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1608
1610
|
function _(y) {
|
|
1609
1611
|
return /^\d+\.\s+/.test(y.replace(" ", ""));
|
|
1610
1612
|
}
|
|
1611
|
-
function v(y, x = 0,
|
|
1613
|
+
function v(y, x = 0, R = 0) {
|
|
1612
1614
|
r.value || (e.value = [...y], f.value = e.value.join(`
|
|
1613
|
-
`), l.value.start += x, l.value.end +=
|
|
1615
|
+
`), l.value.start += x, l.value.end += R, l.value.startOfRow += x, l.value.endOfRow += R, n == null || n.focus(), r.value = !0, ze(() => {
|
|
1614
1616
|
n == null || n.setSelectionRange(l.value.start, l.value.end), setTimeout(() => {
|
|
1615
1617
|
r.value = !1;
|
|
1616
1618
|
}, 100);
|
|
@@ -1621,9 +1623,9 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1621
1623
|
onClick: x[2] || (x[2] = me(() => {
|
|
1622
1624
|
}, ["stop"]))
|
|
1623
1625
|
}, [
|
|
1624
|
-
oe(I("div",
|
|
1625
|
-
I("div",
|
|
1626
|
-
S(
|
|
1626
|
+
oe(I("div", Js, [
|
|
1627
|
+
I("div", Qs, [
|
|
1628
|
+
S(Ps, {
|
|
1627
1629
|
ref_key: "boldRef",
|
|
1628
1630
|
ref: p,
|
|
1629
1631
|
disabled: !B.value,
|
|
@@ -1633,7 +1635,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1633
1635
|
"select-info": l.value,
|
|
1634
1636
|
onUpdateText: v
|
|
1635
1637
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1636
|
-
S(
|
|
1638
|
+
S(Fs, {
|
|
1637
1639
|
ref_key: "italicRef",
|
|
1638
1640
|
ref: g,
|
|
1639
1641
|
disabled: !B.value,
|
|
@@ -1643,7 +1645,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1643
1645
|
"select-info": l.value,
|
|
1644
1646
|
onUpdateText: v
|
|
1645
1647
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1646
|
-
S(
|
|
1648
|
+
S(Vs, {
|
|
1647
1649
|
ref_key: "underlineRef",
|
|
1648
1650
|
ref: h,
|
|
1649
1651
|
disabled: !B.value,
|
|
@@ -1653,7 +1655,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1653
1655
|
"select-info": l.value,
|
|
1654
1656
|
onUpdateText: v
|
|
1655
1657
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1656
|
-
S(
|
|
1658
|
+
S(Ws, {
|
|
1657
1659
|
disabled: !B.value,
|
|
1658
1660
|
rows: e.value,
|
|
1659
1661
|
"selected-val": c.value,
|
|
@@ -1661,7 +1663,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1661
1663
|
"select-info": l.value,
|
|
1662
1664
|
onUpdateText: v
|
|
1663
1665
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1664
|
-
S(
|
|
1666
|
+
S(Xs, {
|
|
1665
1667
|
disabled: !B.value,
|
|
1666
1668
|
rows: e.value,
|
|
1667
1669
|
"selected-val": c.value,
|
|
@@ -1670,7 +1672,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1670
1672
|
onUpdateText: v
|
|
1671
1673
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1672
1674
|
S(u($e), { direction: "vertical" }),
|
|
1673
|
-
S(
|
|
1675
|
+
S(Ks, {
|
|
1674
1676
|
disabled: !D.value,
|
|
1675
1677
|
rows: e.value,
|
|
1676
1678
|
"selected-val": c.value,
|
|
@@ -1678,7 +1680,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1678
1680
|
"select-info": l.value,
|
|
1679
1681
|
onUpdateText: v
|
|
1680
1682
|
}, null, 8, ["disabled", "rows", "selected-val", "selected-row", "select-info"]),
|
|
1681
|
-
S(
|
|
1683
|
+
S(Zs, {
|
|
1682
1684
|
disabled: !D.value,
|
|
1683
1685
|
rows: e.value,
|
|
1684
1686
|
"selected-val": c.value,
|
|
@@ -1700,7 +1702,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1700
1702
|
maxlength: t.maxlength,
|
|
1701
1703
|
minlength: t.minlength,
|
|
1702
1704
|
value: f.value,
|
|
1703
|
-
"onUpdate:value": x[0] || (x[0] = (
|
|
1705
|
+
"onUpdate:value": x[0] || (x[0] = (R) => f.value = R),
|
|
1704
1706
|
onKeydown: V
|
|
1705
1707
|
}, null, 8, ["size", "round", "disabled", "placeholder", "maxlength", "minlength", "value"])
|
|
1706
1708
|
], 512), [
|
|
@@ -1710,22 +1712,22 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1710
1712
|
key: 0,
|
|
1711
1713
|
text: P.value
|
|
1712
1714
|
}, null, 8, ["text"])) : L("", !0),
|
|
1713
|
-
I("div",
|
|
1714
|
-
S(u(
|
|
1715
|
+
I("div", en, [
|
|
1716
|
+
S(u(ho), {
|
|
1715
1717
|
size: t.size,
|
|
1716
1718
|
round: t.round,
|
|
1717
1719
|
disabled: t.disabled,
|
|
1718
1720
|
items: o,
|
|
1719
1721
|
value: s.value,
|
|
1720
|
-
"onUpdate:value": x[1] || (x[1] = (
|
|
1722
|
+
"onUpdate:value": x[1] || (x[1] = (R) => s.value = R),
|
|
1721
1723
|
onChange: O
|
|
1722
1724
|
}, null, 8, ["size", "round", "disabled", "value"]),
|
|
1723
1725
|
N(y.$slots, "control")
|
|
1724
1726
|
])
|
|
1725
1727
|
], 2));
|
|
1726
1728
|
}
|
|
1727
|
-
}),
|
|
1728
|
-
name:
|
|
1729
|
+
}), sn = ["textContent", "for"], nn = { class: "sq-form-item-content" }, on = ["textContent"], an = "sq-form-item", ln = /* @__PURE__ */ T({
|
|
1730
|
+
name: an,
|
|
1729
1731
|
__name: "form-item",
|
|
1730
1732
|
props: {
|
|
1731
1733
|
label: {},
|
|
@@ -1736,18 +1738,18 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1736
1738
|
errorMsg: {}
|
|
1737
1739
|
},
|
|
1738
1740
|
setup(d) {
|
|
1739
|
-
const { nextId: o } =
|
|
1740
|
-
ke(
|
|
1741
|
+
const { nextId: o } = Le(), n = d, t = z(""), s = z("");
|
|
1742
|
+
ke(Ue, t);
|
|
1741
1743
|
const e = b(() => {
|
|
1742
1744
|
const a = [];
|
|
1743
1745
|
return n.isRequired && a.push("is-required"), a;
|
|
1744
1746
|
}), r = b(() => ["input", "switch"].includes(n.type));
|
|
1745
|
-
|
|
1747
|
+
ce(
|
|
1746
1748
|
() => n.errorMsg,
|
|
1747
1749
|
(a) => {
|
|
1748
1750
|
a && (s.value = a);
|
|
1749
1751
|
}
|
|
1750
|
-
),
|
|
1752
|
+
), ie(() => {
|
|
1751
1753
|
r.value && (t.value = `sq-form-item-${o()}`);
|
|
1752
1754
|
});
|
|
1753
1755
|
function c() {
|
|
@@ -1760,21 +1762,21 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1760
1762
|
n.label || n.showLabel ? (m(), $("label", {
|
|
1761
1763
|
key: 0,
|
|
1762
1764
|
class: U(["sq-form-item-label", e.value]),
|
|
1763
|
-
textContent:
|
|
1765
|
+
textContent: Y(n.label),
|
|
1764
1766
|
for: n.type !== "custom" ? t.value : void 0
|
|
1765
|
-
}, null, 10,
|
|
1766
|
-
I("div",
|
|
1767
|
+
}, null, 10, sn)) : L("", !0),
|
|
1768
|
+
I("div", nn, [
|
|
1767
1769
|
N(a.$slots, "default"),
|
|
1768
1770
|
S(he, {
|
|
1769
1771
|
appear: "",
|
|
1770
1772
|
name: "sq-zoom-top",
|
|
1771
1773
|
onAfterLeave: c
|
|
1772
1774
|
}, {
|
|
1773
|
-
default:
|
|
1775
|
+
default: M(() => [
|
|
1774
1776
|
oe(I("span", {
|
|
1775
1777
|
class: "sq-form-item-check",
|
|
1776
|
-
textContent:
|
|
1777
|
-
}, null, 8,
|
|
1778
|
+
textContent: Y(s.value)
|
|
1779
|
+
}, null, 8, on), [
|
|
1778
1780
|
[ve, n.errorMsg]
|
|
1779
1781
|
])
|
|
1780
1782
|
]),
|
|
@@ -1783,8 +1785,8 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1783
1785
|
])
|
|
1784
1786
|
], 4));
|
|
1785
1787
|
}
|
|
1786
|
-
}),
|
|
1787
|
-
name:
|
|
1788
|
+
}), rn = "sq-form", oa = /* @__PURE__ */ T({
|
|
1789
|
+
name: rn,
|
|
1788
1790
|
__name: "form",
|
|
1789
1791
|
props: {
|
|
1790
1792
|
round: { type: Boolean, default: void 0 },
|
|
@@ -1823,7 +1825,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1823
1825
|
const k = e.step;
|
|
1824
1826
|
return k === void 0 ? e.items : e.items.filter((_) => _.step === void 0 ? _ : Array.isArray(_.step) ? _.step.includes(k) : _.step === k);
|
|
1825
1827
|
});
|
|
1826
|
-
|
|
1828
|
+
ie(() => {
|
|
1827
1829
|
t = structuredClone(_e(e.formData));
|
|
1828
1830
|
});
|
|
1829
1831
|
function g(k) {
|
|
@@ -1838,10 +1840,10 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1838
1840
|
}
|
|
1839
1841
|
async function f(k, _, v, y = !0) {
|
|
1840
1842
|
if (!v) return;
|
|
1841
|
-
const x = v.trigger ?? "change",
|
|
1843
|
+
const x = v.trigger ?? "change", R = Array.isArray(x) ? "array" : "string";
|
|
1842
1844
|
if (_) {
|
|
1843
|
-
if (
|
|
1844
|
-
if (
|
|
1845
|
+
if (R === "array" && !x.includes(_)) return;
|
|
1846
|
+
if (R === "string" && x !== _) return;
|
|
1845
1847
|
}
|
|
1846
1848
|
c.value = c.value.filter((F) => F !== k), H(k), a.value[k] = new AbortController(), await ze();
|
|
1847
1849
|
const Q = e.formData[k];
|
|
@@ -1853,26 +1855,26 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1853
1855
|
if (r.value[k]) return e.invalidStatus;
|
|
1854
1856
|
}
|
|
1855
1857
|
async function B(k, _, v, y) {
|
|
1856
|
-
const x = a.value[k].signal,
|
|
1857
|
-
if (
|
|
1858
|
+
const x = a.value[k].signal, R = await v.validateFunc(_, x, y);
|
|
1859
|
+
if (R === void 0) {
|
|
1858
1860
|
c.value = c.value.filter((Q) => Q !== k), delete r.value[k];
|
|
1859
1861
|
return;
|
|
1860
1862
|
}
|
|
1861
|
-
return
|
|
1863
|
+
return R === !0 ? K(k) : R === !1 ? V(k, "字段验证失败") : R ? V(k, R) : K(k), R === !0 || typeof R == "string" && !R;
|
|
1862
1864
|
}
|
|
1863
1865
|
function D(k, _, v) {
|
|
1864
|
-
return v.required && !_ ? (V(k, v.requiredText ?? "字段必填"), !1) : v.pattern && _ && !v.pattern.test(_) ? (V(k, v.patternText ?? "字段验证失败"), !1) : (
|
|
1866
|
+
return v.required && !_ ? (V(k, v.requiredText ?? "字段必填"), !1) : v.pattern && _ && !v.pattern.test(_) ? (V(k, v.patternText ?? "字段验证失败"), !1) : (K(k), !0);
|
|
1865
1867
|
}
|
|
1866
1868
|
function P(k, _, v) {
|
|
1867
|
-
return v.required && _ === void 0 ? (V(k, v.requiredText ?? "字段必填"), !1) : (
|
|
1869
|
+
return v.required && _ === void 0 ? (V(k, v.requiredText ?? "字段必填"), !1) : (K(k), !0);
|
|
1868
1870
|
}
|
|
1869
1871
|
function O(k, _, v) {
|
|
1870
|
-
return v.required && (!_ || !_.length) ? (V(k, v.requiredText ?? "字段必填"), !1) : v.pattern && _ && _.map((
|
|
1872
|
+
return v.required && (!_ || !_.length) ? (V(k, v.requiredText ?? "字段必填"), !1) : v.pattern && _ && _.map((R) => R.toString()).map((R) => v.pattern.test(R)).includes(!1) ? (V(k, v.patternText ?? "字段验证失败"), !1) : (K(k), !0);
|
|
1871
1873
|
}
|
|
1872
1874
|
function V(k, _) {
|
|
1873
1875
|
c.value = c.value.filter((v) => v !== k), r.value[k] = _;
|
|
1874
1876
|
}
|
|
1875
|
-
function
|
|
1877
|
+
function K(k) {
|
|
1876
1878
|
c.value.push(k), delete r.value[k];
|
|
1877
1879
|
}
|
|
1878
1880
|
function H(k) {
|
|
@@ -1897,7 +1899,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1897
1899
|
onSubmit: _[0] || (_[0] = me(() => {
|
|
1898
1900
|
}, ["prevent"]))
|
|
1899
1901
|
}, [
|
|
1900
|
-
(m(!0), $(ne, null, de(p.value, (v, y) => (m(), C(
|
|
1902
|
+
(m(!0), $(ne, null, de(p.value, (v, y) => (m(), C(ln, {
|
|
1901
1903
|
class: U(v.itemClass),
|
|
1902
1904
|
type: v.type,
|
|
1903
1905
|
key: y,
|
|
@@ -1907,7 +1909,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1907
1909
|
"is-required": g(v),
|
|
1908
1910
|
"error-msg": e.hasFeedback ? r.value[v.binding] : ""
|
|
1909
1911
|
}, {
|
|
1910
|
-
default:
|
|
1912
|
+
default: M(() => [
|
|
1911
1913
|
v.type === "input" ? (m(), C(u(ut), pe({
|
|
1912
1914
|
key: 0,
|
|
1913
1915
|
ref_for: !0
|
|
@@ -1928,7 +1930,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1928
1930
|
value: e.formData[v.binding],
|
|
1929
1931
|
"onUpdate:value": (x) => e.formData[v.binding] = x,
|
|
1930
1932
|
onChange: (x) => f(v.binding, "change", v.rule)
|
|
1931
|
-
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : v.type === "radio" ? (m(), C(u(
|
|
1933
|
+
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : v.type === "radio" ? (m(), C(u(vo), pe({
|
|
1932
1934
|
key: 2,
|
|
1933
1935
|
ref_for: !0
|
|
1934
1936
|
}, v.props, {
|
|
@@ -1936,7 +1938,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1936
1938
|
value: e.formData[v.binding],
|
|
1937
1939
|
"onUpdate:value": (x) => e.formData[v.binding] = x,
|
|
1938
1940
|
onChange: (x) => f(v.binding, "change", v.rule)
|
|
1939
|
-
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : v.type === "switch" ? (m(), C(u(
|
|
1941
|
+
}), null, 16, ["name", "value", "onUpdate:value", "onChange"])) : v.type === "switch" ? (m(), C(u(wo), pe({
|
|
1940
1942
|
key: 3,
|
|
1941
1943
|
ref_for: !0
|
|
1942
1944
|
}, v.props, {
|
|
@@ -1951,17 +1953,17 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1951
1953
|
}, 1032, ["class", "type", "label-width", "label", "show-label", "is-required", "error-msg"]))), 128))
|
|
1952
1954
|
], 38));
|
|
1953
1955
|
}
|
|
1954
|
-
}), Ce = Symbol("form-context-keys"),
|
|
1956
|
+
}), Ce = Symbol("form-context-keys"), Ue = Symbol("form-item-id-keys"), un = {
|
|
1955
1957
|
key: 0,
|
|
1956
1958
|
class: "sq-image-mask"
|
|
1957
|
-
},
|
|
1959
|
+
}, cn = {
|
|
1958
1960
|
key: 0,
|
|
1959
1961
|
class: "sq-image-picture"
|
|
1960
|
-
},
|
|
1962
|
+
}, dn = ["srcset", "media", "type"], fn = ["crossorigin", "alt", "src"], pn = {
|
|
1961
1963
|
key: 2,
|
|
1962
1964
|
class: "sq-image-error"
|
|
1963
|
-
},
|
|
1964
|
-
name:
|
|
1965
|
+
}, vn = "sq-image", mn = /* @__PURE__ */ T({
|
|
1966
|
+
name: vn,
|
|
1965
1967
|
__name: "image",
|
|
1966
1968
|
props: {
|
|
1967
1969
|
alt: {},
|
|
@@ -1976,11 +1978,11 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
1976
1978
|
},
|
|
1977
1979
|
emits: ["load", "error"],
|
|
1978
1980
|
setup(d, { emit: o }) {
|
|
1979
|
-
const n = new IntersectionObserver(w), t = o, s = d, e = z(!1), r = z(s.src), c = z(!1), a = z(!1), l = z(!1), i =
|
|
1981
|
+
const n = new IntersectionObserver(w), t = o, s = d, e = z(!1), r = z(s.src), c = z(!1), a = z(!1), l = z(!1), i = re(null), p = b(() => e.value && !c.value), g = b(() => ({
|
|
1980
1982
|
height: p.value ? void 0 : "var(--image-placeholder-height)",
|
|
1981
1983
|
aspectRatio: p.value ? void 0 : s.aspectRatio
|
|
1982
1984
|
}));
|
|
1983
|
-
|
|
1985
|
+
ie(() => {
|
|
1984
1986
|
n.observe(i.value);
|
|
1985
1987
|
}), ge(() => {
|
|
1986
1988
|
n.disconnect();
|
|
@@ -2008,18 +2010,18 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2008
2010
|
ref: i
|
|
2009
2011
|
}, [
|
|
2010
2012
|
S(he, { name: "sq-fade" }, {
|
|
2011
|
-
default:
|
|
2012
|
-
e.value ? L("", !0) : (m(), $("div",
|
|
2013
|
+
default: M(() => [
|
|
2014
|
+
e.value ? L("", !0) : (m(), $("div", un))
|
|
2013
2015
|
]),
|
|
2014
2016
|
_: 1
|
|
2015
2017
|
}),
|
|
2016
|
-
!c.value && a.value ? (m(), $("picture",
|
|
2018
|
+
!c.value && a.value ? (m(), $("picture", cn, [
|
|
2017
2019
|
(m(!0), $(ne, null, de(s.source, (O, V) => (m(), $("source", {
|
|
2018
2020
|
key: V,
|
|
2019
2021
|
srcset: O.src,
|
|
2020
2022
|
media: O.media,
|
|
2021
2023
|
type: O.type
|
|
2022
|
-
}, null, 8,
|
|
2024
|
+
}, null, 8, dn))), 128)),
|
|
2023
2025
|
I("img", {
|
|
2024
2026
|
style: X({ objectFit: s.objectFit }),
|
|
2025
2027
|
crossorigin: s.crossorigin,
|
|
@@ -2027,7 +2029,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2027
2029
|
src: r.value,
|
|
2028
2030
|
onLoad: h,
|
|
2029
2031
|
onError: f
|
|
2030
|
-
}, null, 44,
|
|
2032
|
+
}, null, 44, fn)
|
|
2031
2033
|
])) : L("", !0),
|
|
2032
2034
|
!c.value && a.value && s.preview ? (m(), $("div", {
|
|
2033
2035
|
key: 1,
|
|
@@ -2036,12 +2038,12 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2036
2038
|
}, [
|
|
2037
2039
|
S(u(st))
|
|
2038
2040
|
])) : L("", !0),
|
|
2039
|
-
c.value ? (m(), $("div",
|
|
2041
|
+
c.value ? (m(), $("div", pn, [
|
|
2040
2042
|
N(D.$slots, "error", {}, () => [
|
|
2041
2043
|
P[1] || (P[1] = I("span", null, "图片加载失败", -1))
|
|
2042
2044
|
])
|
|
2043
2045
|
])) : L("", !0),
|
|
2044
|
-
s.preview ? (m(), C(u(
|
|
2046
|
+
s.preview ? (m(), C(u(bn), {
|
|
2045
2047
|
key: 3,
|
|
2046
2048
|
"src-list": [r.value],
|
|
2047
2049
|
visible: l.value,
|
|
@@ -2049,8 +2051,8 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2049
2051
|
}, null, 8, ["src-list", "visible"])) : L("", !0)
|
|
2050
2052
|
], 4));
|
|
2051
2053
|
}
|
|
2052
|
-
}),
|
|
2053
|
-
name:
|
|
2054
|
+
}), hn = ["src"], gn = "sq-image-viewer", bn = /* @__PURE__ */ T({
|
|
2055
|
+
name: gn,
|
|
2054
2056
|
__name: "image-viewer",
|
|
2055
2057
|
props: /* @__PURE__ */ Z({
|
|
2056
2058
|
srcList: {},
|
|
@@ -2071,10 +2073,10 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2071
2073
|
const o = {}, n = {};
|
|
2072
2074
|
let t = !1, s;
|
|
2073
2075
|
const e = d, r = z(1), c = z(!1), a = z(!1), l = z(0), i = z(0), p = z(!0), g = z({ x: 0, y: 0 }), h = le(d, "visible"), f = b(() => e.srcList[i.value]), w = b(() => {
|
|
2074
|
-
const q = c.value ? -1 : 1,
|
|
2076
|
+
const q = c.value ? -1 : 1, E = a.value ? -1 : 1;
|
|
2075
2077
|
return {
|
|
2076
2078
|
transform: [
|
|
2077
|
-
`scale(${r.value * q}, ${r.value *
|
|
2079
|
+
`scale(${r.value * q}, ${r.value * E})`,
|
|
2078
2080
|
`rotate(${l.value}deg)`
|
|
2079
2081
|
].join(" "),
|
|
2080
2082
|
marginInlineStart: `${g.value.x}px`,
|
|
@@ -2093,26 +2095,26 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2093
2095
|
}
|
|
2094
2096
|
function O(q) {
|
|
2095
2097
|
if (!t || !e.moveable) return;
|
|
2096
|
-
const
|
|
2097
|
-
g.value.x +=
|
|
2098
|
+
const E = q.x - o.x, W = q.y - o.y;
|
|
2099
|
+
g.value.x += E * 2, g.value.y += W * 2, o.x = q.x, o.y = q.y;
|
|
2098
2100
|
}
|
|
2099
2101
|
function V(q) {
|
|
2100
2102
|
q.touches.length === 1 ? (t = !0, o.x = q.touches[0].screenX, o.y = q.touches[0].screenY) : q.touches.length === 2 && (s = k(q.touches[0], q.touches[1]));
|
|
2101
2103
|
}
|
|
2102
|
-
function
|
|
2104
|
+
function K() {
|
|
2103
2105
|
t = !1, s = void 0, p.value = !0;
|
|
2104
2106
|
}
|
|
2105
2107
|
function H(q) {
|
|
2106
2108
|
if (q.touches.length === 1) {
|
|
2107
2109
|
if (!t || !e.moveable) return;
|
|
2108
|
-
const
|
|
2109
|
-
g.value.x += W * 2, g.value.y += te * 2, o.x =
|
|
2110
|
+
const E = q.touches[0], W = E.screenX - o.x, te = E.screenY - o.y;
|
|
2111
|
+
g.value.x += W * 2, g.value.y += te * 2, o.x = E.screenX, o.y = E.screenY;
|
|
2110
2112
|
} else if (q.touches.length === 2) {
|
|
2111
2113
|
if (!s) return;
|
|
2112
2114
|
p.value = !1;
|
|
2113
|
-
const
|
|
2115
|
+
const E = k(q.touches[0], q.touches[1]), W = E / s;
|
|
2114
2116
|
let te = r.value * W;
|
|
2115
|
-
te = Math.min(e.maxScale, te), te = Math.max(e.minScale, te), r.value = te, s =
|
|
2117
|
+
te = Math.min(e.maxScale, te), te = Math.max(e.minScale, te), r.value = te, s = E;
|
|
2116
2118
|
}
|
|
2117
2119
|
}
|
|
2118
2120
|
function ee() {
|
|
@@ -2121,8 +2123,8 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2121
2123
|
function J(q) {
|
|
2122
2124
|
i.value += q;
|
|
2123
2125
|
}
|
|
2124
|
-
function k(q,
|
|
2125
|
-
const W =
|
|
2126
|
+
function k(q, E) {
|
|
2127
|
+
const W = E.clientX - q.clientX, te = E.clientY - q.clientY;
|
|
2126
2128
|
return Math.sqrt(W * W + te * te);
|
|
2127
2129
|
}
|
|
2128
2130
|
function _() {
|
|
@@ -2137,7 +2139,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2137
2139
|
function x() {
|
|
2138
2140
|
r.value = 1, g.value = { x: 0, y: 0 };
|
|
2139
2141
|
}
|
|
2140
|
-
function
|
|
2142
|
+
function R() {
|
|
2141
2143
|
c.value = !c.value;
|
|
2142
2144
|
}
|
|
2143
2145
|
function Q() {
|
|
@@ -2153,33 +2155,33 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2153
2155
|
const W = q.target.getBoundingClientRect(), te = window.innerWidth, ye = window.innerHeight;
|
|
2154
2156
|
n.x = te / W.width, n.y = ye / W.height, r.value = Math.min(n.x, n.y, 1);
|
|
2155
2157
|
}
|
|
2156
|
-
return (q,
|
|
2158
|
+
return (q, E) => (m(), C(u(rt), {
|
|
2157
2159
|
class: "sq-image-viewer-mask",
|
|
2158
2160
|
visible: h.value,
|
|
2159
|
-
"onUpdate:visible":
|
|
2161
|
+
"onUpdate:visible": E[6] || (E[6] = (W) => h.value = W),
|
|
2160
2162
|
keyboard: e.keyboard,
|
|
2161
2163
|
"mask-closeable": e.maskCloseable,
|
|
2162
2164
|
onWheelPassive: B,
|
|
2163
2165
|
onMousemove: O,
|
|
2164
2166
|
onMouseup: P,
|
|
2165
2167
|
onTouchmovePassive: H,
|
|
2166
|
-
onTouchend:
|
|
2168
|
+
onTouchend: K,
|
|
2167
2169
|
onClosed: ee
|
|
2168
2170
|
}, {
|
|
2169
|
-
default:
|
|
2171
|
+
default: M(() => [
|
|
2170
2172
|
I("img", {
|
|
2171
2173
|
style: X(w.value),
|
|
2172
2174
|
src: f.value,
|
|
2173
|
-
onClick:
|
|
2175
|
+
onClick: E[0] || (E[0] = me(() => {
|
|
2174
2176
|
}, ["stop"])),
|
|
2175
2177
|
onLoad: F,
|
|
2176
2178
|
onMousedown: me(D, ["prevent"]),
|
|
2177
2179
|
onTouchstartPassive: V
|
|
2178
|
-
}, null, 44,
|
|
2180
|
+
}, null, 44, hn),
|
|
2179
2181
|
S(u(j), {
|
|
2180
2182
|
class: "sq-image-viewer-close",
|
|
2181
2183
|
round: "",
|
|
2182
|
-
icon: u(
|
|
2184
|
+
icon: u(Oe),
|
|
2183
2185
|
onClick: me(A, ["stop"])
|
|
2184
2186
|
}, null, 8, ["icon"]),
|
|
2185
2187
|
e.srcList.length > 1 ? (m(), $(ne, { key: 0 }, [
|
|
@@ -2188,27 +2190,27 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2188
2190
|
round: "",
|
|
2189
2191
|
icon: u(nt),
|
|
2190
2192
|
disabled: i.value === 0,
|
|
2191
|
-
onClick:
|
|
2193
|
+
onClick: E[1] || (E[1] = (W) => J(-1))
|
|
2192
2194
|
}, null, 8, ["icon", "disabled"]),
|
|
2193
2195
|
S(u(j), {
|
|
2194
2196
|
class: "sq-image-viewer-next",
|
|
2195
2197
|
round: "",
|
|
2196
2198
|
icon: u(ot),
|
|
2197
2199
|
disabled: i.value === e.srcList.length - 1,
|
|
2198
|
-
onClick:
|
|
2200
|
+
onClick: E[2] || (E[2] = (W) => J(1))
|
|
2199
2201
|
}, null, 8, ["icon", "disabled"])
|
|
2200
2202
|
], 64)) : L("", !0),
|
|
2201
2203
|
e.toolbar ? (m(), $("div", {
|
|
2202
2204
|
key: 1,
|
|
2203
2205
|
class: "sq-image-viewer-toolbar",
|
|
2204
|
-
onClick:
|
|
2206
|
+
onClick: E[5] || (E[5] = me(() => {
|
|
2205
2207
|
}, ["stop"]))
|
|
2206
2208
|
}, [
|
|
2207
2209
|
S(u(ae), {
|
|
2208
2210
|
tip: "放大",
|
|
2209
2211
|
shadow: !1
|
|
2210
2212
|
}, {
|
|
2211
|
-
default:
|
|
2213
|
+
default: M(() => [
|
|
2212
2214
|
S(u(j), {
|
|
2213
2215
|
text: "",
|
|
2214
2216
|
icon: u(Bt),
|
|
@@ -2222,7 +2224,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2222
2224
|
tip: "缩小",
|
|
2223
2225
|
shadow: !1
|
|
2224
2226
|
}, {
|
|
2225
|
-
default:
|
|
2227
|
+
default: M(() => [
|
|
2226
2228
|
S(u(j), {
|
|
2227
2229
|
text: "",
|
|
2228
2230
|
icon: u(zt),
|
|
@@ -2237,11 +2239,11 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2237
2239
|
tip: "水平翻转",
|
|
2238
2240
|
shadow: !1
|
|
2239
2241
|
}, {
|
|
2240
|
-
default:
|
|
2242
|
+
default: M(() => [
|
|
2241
2243
|
S(u(j), {
|
|
2242
2244
|
text: "",
|
|
2243
|
-
icon: u(
|
|
2244
|
-
onClick:
|
|
2245
|
+
icon: u(Tt),
|
|
2246
|
+
onClick: R
|
|
2245
2247
|
}, null, 8, ["icon"])
|
|
2246
2248
|
]),
|
|
2247
2249
|
_: 1
|
|
@@ -2250,10 +2252,10 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2250
2252
|
tip: "垂直翻转",
|
|
2251
2253
|
shadow: !1
|
|
2252
2254
|
}, {
|
|
2253
|
-
default:
|
|
2255
|
+
default: M(() => [
|
|
2254
2256
|
S(u(j), {
|
|
2255
2257
|
text: "",
|
|
2256
|
-
icon: u(
|
|
2258
|
+
icon: u(Rt),
|
|
2257
2259
|
onClick: Q
|
|
2258
2260
|
}, null, 8, ["icon"])
|
|
2259
2261
|
]),
|
|
@@ -2264,11 +2266,11 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2264
2266
|
tip: "顺时针旋转",
|
|
2265
2267
|
shadow: !1
|
|
2266
2268
|
}, {
|
|
2267
|
-
default:
|
|
2269
|
+
default: M(() => [
|
|
2268
2270
|
S(u(j), {
|
|
2269
2271
|
text: "",
|
|
2270
2272
|
icon: u(Lt),
|
|
2271
|
-
onClick:
|
|
2273
|
+
onClick: E[3] || (E[3] = (W) => G(90))
|
|
2272
2274
|
}, null, 8, ["icon"])
|
|
2273
2275
|
]),
|
|
2274
2276
|
_: 1
|
|
@@ -2277,11 +2279,11 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2277
2279
|
tip: "逆时针旋转",
|
|
2278
2280
|
shadow: !1
|
|
2279
2281
|
}, {
|
|
2280
|
-
default:
|
|
2282
|
+
default: M(() => [
|
|
2281
2283
|
S(u(j), {
|
|
2282
2284
|
text: "",
|
|
2283
2285
|
icon: u(It),
|
|
2284
|
-
onClick:
|
|
2286
|
+
onClick: E[4] || (E[4] = (W) => G(-90))
|
|
2285
2287
|
}, null, 8, ["icon"])
|
|
2286
2288
|
]),
|
|
2287
2289
|
_: 1
|
|
@@ -2291,7 +2293,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2291
2293
|
tip: "原始大小",
|
|
2292
2294
|
shadow: !1
|
|
2293
2295
|
}, {
|
|
2294
|
-
default:
|
|
2296
|
+
default: M(() => [
|
|
2295
2297
|
S(u(j), {
|
|
2296
2298
|
text: "",
|
|
2297
2299
|
icon: u(Mt),
|
|
@@ -2304,7 +2306,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2304
2306
|
tip: "全屏",
|
|
2305
2307
|
shadow: !1
|
|
2306
2308
|
}, {
|
|
2307
|
-
default:
|
|
2309
|
+
default: M(() => [
|
|
2308
2310
|
S(u(j), {
|
|
2309
2311
|
text: "",
|
|
2310
2312
|
icon: u(Et),
|
|
@@ -2318,8 +2320,8 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2318
2320
|
_: 1
|
|
2319
2321
|
}, 8, ["visible", "keyboard", "mask-closeable"]));
|
|
2320
2322
|
}
|
|
2321
|
-
}),
|
|
2322
|
-
name:
|
|
2323
|
+
}), yn = ["src"], xn = "sq-image-crop", Ie = 5, aa = /* @__PURE__ */ T({
|
|
2324
|
+
name: xn,
|
|
2323
2325
|
__name: "image-crop",
|
|
2324
2326
|
props: {
|
|
2325
2327
|
aspectRatio: { default: 1 },
|
|
@@ -2328,20 +2330,20 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2328
2330
|
setup(d, { expose: o }) {
|
|
2329
2331
|
const n = {};
|
|
2330
2332
|
let t = 0, s, e = !1, r;
|
|
2331
|
-
const c = d, a = z(1), l = z({ x: 0, y: 0 }), i =
|
|
2333
|
+
const c = d, a = z(1), l = z({ x: 0, y: 0 }), i = re(null), p = re(null), g = b(() => ({
|
|
2332
2334
|
transform: `scale(${a.value})`,
|
|
2333
2335
|
marginInlineStart: `${l.value.x}px`,
|
|
2334
2336
|
marginBlockStart: `${l.value.y}px`
|
|
2335
2337
|
}));
|
|
2336
|
-
|
|
2338
|
+
ie(() => {
|
|
2337
2339
|
document.addEventListener("mousemove", D), document.addEventListener("mouseup", B);
|
|
2338
2340
|
}), ge(() => {
|
|
2339
2341
|
document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", B);
|
|
2340
2342
|
});
|
|
2341
2343
|
function h(_) {
|
|
2342
2344
|
l.value = { x: 0, y: 0 }, s = i.value.getBoundingClientRect();
|
|
2343
|
-
const v = _.target, y = v.naturalWidth, x = v.naturalHeight,
|
|
2344
|
-
t = Math.max(
|
|
2345
|
+
const v = _.target, y = v.naturalWidth, x = v.naturalHeight, R = s.width / y, Q = s.height / x;
|
|
2346
|
+
t = Math.max(R, Q), a.value = t;
|
|
2345
2347
|
}
|
|
2346
2348
|
function f(_) {
|
|
2347
2349
|
_.deltaY < 0 ? H() : ee();
|
|
@@ -2356,11 +2358,11 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2356
2358
|
if (!e) return;
|
|
2357
2359
|
const v = _.x - n.x, y = _.y - n.y;
|
|
2358
2360
|
n.x = _.x, n.y = _.y;
|
|
2359
|
-
const x = l.value.x + v * 2,
|
|
2360
|
-
l.value.x = x, l.value.y =
|
|
2361
|
+
const x = l.value.x + v * 2, R = l.value.y + y * 2;
|
|
2362
|
+
l.value.x = x, l.value.y = R, J();
|
|
2361
2363
|
}
|
|
2362
2364
|
function P(_) {
|
|
2363
|
-
_.touches.length === 1 ? (e = !0, n.x = _.touches[0].screenX, n.y = _.touches[0].screenY) : _.touches.length === 2 && (r =
|
|
2365
|
+
_.touches.length === 1 ? (e = !0, n.x = _.touches[0].screenX, n.y = _.touches[0].screenY) : _.touches.length === 2 && (r = K(_.touches[0], _.touches[1]));
|
|
2364
2366
|
}
|
|
2365
2367
|
function O() {
|
|
2366
2368
|
e = !1, r = void 0;
|
|
@@ -2372,18 +2374,18 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2372
2374
|
l.value.x += y * 2, l.value.y += x * 2, n.x = v.screenX, n.y = v.screenY;
|
|
2373
2375
|
} else if (_.touches.length === 2) {
|
|
2374
2376
|
if (!r) return;
|
|
2375
|
-
const v =
|
|
2377
|
+
const v = K(_.touches[0], _.touches[1]), y = v / r;
|
|
2376
2378
|
let x = a.value * y;
|
|
2377
|
-
x = Math.min(
|
|
2379
|
+
x = Math.min(Ie, x), x = Math.max(t, x), a.value = x, r = v;
|
|
2378
2380
|
}
|
|
2379
2381
|
J();
|
|
2380
2382
|
}
|
|
2381
|
-
function
|
|
2383
|
+
function K(_, v) {
|
|
2382
2384
|
const y = v.clientX - _.clientX, x = v.clientY - _.clientY;
|
|
2383
2385
|
return Math.sqrt(y * y + x * x);
|
|
2384
2386
|
}
|
|
2385
2387
|
function H() {
|
|
2386
|
-
a.value >=
|
|
2388
|
+
a.value >= Ie || (a.value = Math.min(Ie, a.value * (1 + 0.1)));
|
|
2387
2389
|
}
|
|
2388
2390
|
function ee() {
|
|
2389
2391
|
a.value <= t || (a.value = Math.max(t, a.value / (1 + 0.1)), J());
|
|
@@ -2392,8 +2394,8 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2392
2394
|
requestAnimationFrame(() => {
|
|
2393
2395
|
const _ = p.value.getBoundingClientRect(), v = _.left >= s.left, y = _.right <= s.right;
|
|
2394
2396
|
v ? l.value.x -= (_.left - s.left) * 2 : y && (l.value.x += (s.right - _.right) * 2);
|
|
2395
|
-
const x = _.top >= s.top,
|
|
2396
|
-
x ? l.value.y -= (_.top - s.top) * 2 :
|
|
2397
|
+
const x = _.top >= s.top, R = _.bottom <= s.bottom;
|
|
2398
|
+
x ? l.value.y -= (_.top - s.top) * 2 : R && (l.value.y += (s.bottom - _.bottom) * 2);
|
|
2397
2399
|
});
|
|
2398
2400
|
}
|
|
2399
2401
|
async function k(_ = "base64") {
|
|
@@ -2403,7 +2405,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2403
2405
|
const F = Math.min(v, y);
|
|
2404
2406
|
A.width = F, A.height = F / c.aspectRatio;
|
|
2405
2407
|
let q = A.getContext("2d");
|
|
2406
|
-
const
|
|
2408
|
+
const E = p.value.getBoundingClientRect(), W = (E.left - s.left) / a.value, te = (E.top - s.top) / a.value;
|
|
2407
2409
|
return q == null || q.drawImage(
|
|
2408
2410
|
p.value,
|
|
2409
2411
|
W * G,
|
|
@@ -2440,14 +2442,14 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2440
2442
|
ref: p,
|
|
2441
2443
|
src: c.src,
|
|
2442
2444
|
onLoad: h
|
|
2443
|
-
}, null, 44,
|
|
2445
|
+
}, null, 44, yn)) : L("", !0)
|
|
2444
2446
|
], 36));
|
|
2445
2447
|
}
|
|
2446
|
-
}),
|
|
2448
|
+
}), _n = {
|
|
2447
2449
|
key: 0,
|
|
2448
2450
|
class: "sq-input-prefix"
|
|
2449
|
-
},
|
|
2450
|
-
name:
|
|
2451
|
+
}, $n = ["id", "disabled", "readonly", "placeholder", "type", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "inputmode"], kn = ["id", "disabled", "readonly", "placeholder", "type", "maxlength", "minlength", "autocomplete", "name", "autofocus", "form", "inputmode", "rows", "cols"], wn = { class: "sq-input-suffix" }, qn = "sq-input", ut = /* @__PURE__ */ T({
|
|
2452
|
+
name: qn,
|
|
2451
2453
|
__name: "input",
|
|
2452
2454
|
props: /* @__PURE__ */ Z({
|
|
2453
2455
|
status: {},
|
|
@@ -2477,13 +2479,13 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2477
2479
|
}),
|
|
2478
2480
|
emits: /* @__PURE__ */ Z(["focus", "blur", "input", "change"], ["update:value"]),
|
|
2479
2481
|
setup(d, { expose: o, emit: n }) {
|
|
2480
|
-
const t = Be(), s = n, e = d, { inputSize: r, inputRound: c, inputDisabled: a, inputReadonly: l, id: i } = ds(e), p = le(d, "value"), g = z(!1), h = z(!1), f =
|
|
2481
|
-
const A = [], F = u(r), q = u(c),
|
|
2482
|
-
return F !== "md" && A.push(`sq-input--${F}`), e.status && A.push(`is-${e.status}`), q && A.push("is-round"),
|
|
2482
|
+
const t = Be(), s = n, e = d, { inputSize: r, inputRound: c, inputDisabled: a, inputReadonly: l, id: i } = ds(e), p = le(d, "value"), g = z(!1), h = z(!1), f = re(null), w = b(() => {
|
|
2483
|
+
const A = [], F = u(r), q = u(c), E = u(J);
|
|
2484
|
+
return F !== "md" && A.push(`sq-input--${F}`), e.status && A.push(`is-${e.status}`), q && A.push("is-round"), E && A.push("is-disabled"), A;
|
|
2483
2485
|
}), B = b(() => u(h) ? tt : st), D = b(() => u(h) ? "text" : e.type), P = b(() => t.prefix || e.prefixIcon), O = b(() => u(g) && u(p).length), V = b(
|
|
2484
2486
|
() => e.type === "password" && u(O)
|
|
2485
|
-
),
|
|
2486
|
-
() => u(V) || u(
|
|
2487
|
+
), K = b(() => e.clearable && u(O)), H = b(() => e.loading ? Re : e.suffixIcon), ee = b(
|
|
2488
|
+
() => u(V) || u(K) || u(H) || t.suffix
|
|
2487
2489
|
), J = b(() => e.loading || u(a)), k = b(() => {
|
|
2488
2490
|
if (e.type === "textarea")
|
|
2489
2491
|
return u(J) || u(l) ? "none" : e.resize;
|
|
@@ -2500,7 +2502,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2500
2502
|
function x() {
|
|
2501
2503
|
p.value = "";
|
|
2502
2504
|
}
|
|
2503
|
-
function
|
|
2505
|
+
function R() {
|
|
2504
2506
|
h.value = !h.value;
|
|
2505
2507
|
}
|
|
2506
2508
|
function Q() {
|
|
@@ -2515,9 +2517,9 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2515
2517
|
class: U(["sq-input", w.value]),
|
|
2516
2518
|
onMousedown: y
|
|
2517
2519
|
}, [
|
|
2518
|
-
P.value ? (m(), $("span",
|
|
2520
|
+
P.value ? (m(), $("span", _n, [
|
|
2519
2521
|
N(A.$slots, "prefix", {}, () => [
|
|
2520
|
-
(m(), C(
|
|
2522
|
+
(m(), C(ue(e.prefixIcon)))
|
|
2521
2523
|
])
|
|
2522
2524
|
])) : L("", !0),
|
|
2523
2525
|
e.type !== "textarea" ? oe((m(), $("input", {
|
|
@@ -2542,7 +2544,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2542
2544
|
onBlur: v,
|
|
2543
2545
|
onInput: F[1] || (F[1] = (q) => s("input", q)),
|
|
2544
2546
|
onChange: F[2] || (F[2] = (q) => s("change", q))
|
|
2545
|
-
}, null, 40,
|
|
2547
|
+
}, null, 40, $n)), [
|
|
2546
2548
|
[vt, p.value]
|
|
2547
2549
|
]) : oe((m(), $("textarea", {
|
|
2548
2550
|
key: 2,
|
|
@@ -2569,30 +2571,30 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2569
2571
|
onBlur: v,
|
|
2570
2572
|
onInput: F[4] || (F[4] = (q) => s("input", q)),
|
|
2571
2573
|
onChange: F[5] || (F[5] = (q) => s("change", q))
|
|
2572
|
-
}, null, 44,
|
|
2574
|
+
}, null, 44, kn)), [
|
|
2573
2575
|
[mt, p.value]
|
|
2574
2576
|
]),
|
|
2575
|
-
oe(I("span",
|
|
2576
|
-
V.value ? (m(), C(
|
|
2577
|
+
oe(I("span", wn, [
|
|
2578
|
+
V.value ? (m(), C(ue(B.value), {
|
|
2577
2579
|
key: 0,
|
|
2578
2580
|
class: "sq-input-suffix-pwd",
|
|
2579
|
-
onMousedown:
|
|
2581
|
+
onMousedown: R
|
|
2580
2582
|
}, null, 32)) : L("", !0),
|
|
2581
|
-
|
|
2583
|
+
K.value ? (m(), C(u(Oe), {
|
|
2582
2584
|
key: 1,
|
|
2583
2585
|
class: "sq-input-suffix-clear",
|
|
2584
2586
|
onMousedown: x
|
|
2585
2587
|
})) : L("", !0),
|
|
2586
2588
|
N(A.$slots, "suffix", {}, () => [
|
|
2587
|
-
H.value ? (m(), C(
|
|
2589
|
+
H.value ? (m(), C(ue(H.value), { key: 0 })) : L("", !0)
|
|
2588
2590
|
])
|
|
2589
2591
|
], 512), [
|
|
2590
2592
|
[ve, ee.value]
|
|
2591
2593
|
])
|
|
2592
2594
|
], 34));
|
|
2593
2595
|
}
|
|
2594
|
-
}),
|
|
2595
|
-
name:
|
|
2596
|
+
}), Cn = ["onClick"], Sn = ["textContent"], Bn = ["onClick"], zn = ["textContent"], Tn = "sq-menu", la = /* @__PURE__ */ T({
|
|
2597
|
+
name: Tn,
|
|
2596
2598
|
__name: "menu",
|
|
2597
2599
|
props: /* @__PURE__ */ Z({
|
|
2598
2600
|
router: { type: Boolean },
|
|
@@ -2622,16 +2624,16 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2622
2624
|
to: { name: i.value },
|
|
2623
2625
|
key: i.value
|
|
2624
2626
|
}, {
|
|
2625
|
-
default:
|
|
2627
|
+
default: M(({ navigate: p, isActive: g }) => [
|
|
2626
2628
|
I("li", {
|
|
2627
2629
|
class: U(["sq-menu-item", { "is-active": g, "is-disabled": i.disabled }]),
|
|
2628
2630
|
onClick: (h) => r(i, p)
|
|
2629
2631
|
}, [
|
|
2630
2632
|
N(a.$slots, "default", pe({ ref_for: !0 }, i), () => [
|
|
2631
|
-
i.icon ? (m(), C(
|
|
2633
|
+
i.icon ? (m(), C(ue(i.icon), { key: 0 })) : L("", !0),
|
|
2632
2634
|
I("span", {
|
|
2633
|
-
textContent:
|
|
2634
|
-
}, null, 8,
|
|
2635
|
+
textContent: Y(i.text)
|
|
2636
|
+
}, null, 8, Sn),
|
|
2635
2637
|
t.direction === "vertical" ? oe((m(), C(u(Xe), {
|
|
2636
2638
|
key: 1,
|
|
2637
2639
|
dot: "",
|
|
@@ -2641,7 +2643,7 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2641
2643
|
[ve, g]
|
|
2642
2644
|
]) : L("", !0)
|
|
2643
2645
|
])
|
|
2644
|
-
], 10,
|
|
2646
|
+
], 10, Cn)
|
|
2645
2647
|
]),
|
|
2646
2648
|
_: 2
|
|
2647
2649
|
}, 1032, ["to"]))), 128)) : (m(!0), $(ne, { key: 1 }, de(t.items, (i) => (m(), $("li", {
|
|
@@ -2653,10 +2655,10 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2653
2655
|
onClick: (p) => c(i, p)
|
|
2654
2656
|
}, [
|
|
2655
2657
|
N(a.$slots, "default", pe({ ref_for: !0 }, i), () => [
|
|
2656
|
-
i.icon ? (m(), C(
|
|
2658
|
+
i.icon ? (m(), C(ue(i.icon), { key: 0 })) : L("", !0),
|
|
2657
2659
|
I("span", {
|
|
2658
|
-
textContent:
|
|
2659
|
-
}, null, 8,
|
|
2660
|
+
textContent: Y(i.text)
|
|
2661
|
+
}, null, 8, zn),
|
|
2660
2662
|
t.direction === "vertical" ? oe((m(), C(u(Xe), {
|
|
2661
2663
|
key: 1,
|
|
2662
2664
|
dot: "",
|
|
@@ -2666,11 +2668,11 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2666
2668
|
[ve, s.value === i.value]
|
|
2667
2669
|
]) : L("", !0)
|
|
2668
2670
|
])
|
|
2669
|
-
], 10,
|
|
2671
|
+
], 10, Bn))), 128))
|
|
2670
2672
|
], 2));
|
|
2671
2673
|
}
|
|
2672
|
-
}), Rn = ["id"],
|
|
2673
|
-
name:
|
|
2674
|
+
}), Rn = ["id"], Ln = ["textContent"], In = "sq-message", Mn = /* @__PURE__ */ T({
|
|
2675
|
+
name: In,
|
|
2674
2676
|
__name: "message",
|
|
2675
2677
|
props: {
|
|
2676
2678
|
message: {},
|
|
@@ -2682,8 +2684,8 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2682
2684
|
id: {}
|
|
2683
2685
|
},
|
|
2684
2686
|
setup(d, { expose: o }) {
|
|
2685
|
-
const n = d, t = z(!0), s = b(() => n.type ?
|
|
2686
|
-
|
|
2687
|
+
const n = d, t = z(!0), s = b(() => n.type ? Pe[n.type] : void 0);
|
|
2688
|
+
ie(() => {
|
|
2687
2689
|
setTimeout(e, n.closeAfter);
|
|
2688
2690
|
});
|
|
2689
2691
|
function e() {
|
|
@@ -2695,26 +2697,25 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2695
2697
|
onBeforeLeave: n.onClose,
|
|
2696
2698
|
onAfterLeave: n.onDestroy
|
|
2697
2699
|
}, {
|
|
2698
|
-
default:
|
|
2700
|
+
default: M(() => [
|
|
2699
2701
|
oe(I("div", {
|
|
2700
2702
|
class: U(["sq-message", `is-${n.type}`]),
|
|
2701
2703
|
id: n.id,
|
|
2702
2704
|
style: X({ top: `${n.offsetTop}px` })
|
|
2703
2705
|
}, [
|
|
2704
2706
|
S(u(be), { class: "sq-message-inner" }, {
|
|
2705
|
-
default:
|
|
2706
|
-
n.type && s.value ? (m(), C(
|
|
2707
|
+
default: M(() => [
|
|
2708
|
+
n.type && s.value ? (m(), C(ue(s.value), {
|
|
2707
2709
|
key: 0,
|
|
2708
2710
|
class: "sq-message-icon"
|
|
2709
2711
|
})) : L("", !0),
|
|
2710
2712
|
I("div", {
|
|
2711
2713
|
class: "sq-message-content",
|
|
2712
|
-
textContent:
|
|
2713
|
-
}, null, 8,
|
|
2714
|
+
textContent: Y(n.message)
|
|
2715
|
+
}, null, 8, Ln)
|
|
2714
2716
|
]),
|
|
2715
2717
|
_: 1
|
|
2716
|
-
})
|
|
2717
|
-
c[0] || (c[0] = I("div", { class: "sq-message-progress" }, null, -1))
|
|
2718
|
+
})
|
|
2718
2719
|
], 14, Rn), [
|
|
2719
2720
|
[ve, t.value]
|
|
2720
2721
|
])
|
|
@@ -2722,16 +2723,16 @@ ${W}${M}`, ee(y.target), v(e.value, ye, ye);
|
|
|
2722
2723
|
_: 1
|
|
2723
2724
|
}, 8, ["onBeforeLeave", "onAfterLeave"]));
|
|
2724
2725
|
}
|
|
2725
|
-
}), { getCssVar:
|
|
2726
|
-
let
|
|
2727
|
-
const
|
|
2728
|
-
const o = `sq-message-${
|
|
2726
|
+
}), { getCssVar: En } = Ne(), { nextZIndex: An } = Fe(), xe = [], Dn = ["primary", "success", "info", "warn", "error"], Me = parseInt(En("--sq-padding-md"));
|
|
2727
|
+
let On = 0;
|
|
2728
|
+
const Ae = (d = {}) => {
|
|
2729
|
+
const o = `sq-message-${On++}`;
|
|
2729
2730
|
let n = document.querySelector(".sq-message-wrap");
|
|
2730
|
-
n || (n = document.createElement("div"), n.classList.add("sq-message-wrap"), document.body.appendChild(n)), n.style.zIndex =
|
|
2731
|
-
let t =
|
|
2731
|
+
n || (n = document.createElement("div"), n.classList.add("sq-message-wrap"), document.body.appendChild(n)), n.style.zIndex = An().toString();
|
|
2732
|
+
let t = Me;
|
|
2732
2733
|
xe.forEach((l) => {
|
|
2733
2734
|
var i;
|
|
2734
|
-
t += (((i = l.vm.el) == null ? void 0 : i.offsetHeight) || 0) +
|
|
2735
|
+
t += (((i = l.vm.el) == null ? void 0 : i.offsetHeight) || 0) + Me;
|
|
2735
2736
|
});
|
|
2736
2737
|
const s = {
|
|
2737
2738
|
type: "info",
|
|
@@ -2740,7 +2741,9 @@ const Ee = (d = {}) => {
|
|
|
2740
2741
|
// 固有配置
|
|
2741
2742
|
offsetTop: t,
|
|
2742
2743
|
id: o
|
|
2743
|
-
}
|
|
2744
|
+
};
|
|
2745
|
+
let e = document.createElement("div");
|
|
2746
|
+
const r = s.onClose;
|
|
2744
2747
|
s.onClose = () => {
|
|
2745
2748
|
r == null || r();
|
|
2746
2749
|
const l = xe.findIndex(
|
|
@@ -2749,28 +2752,92 @@ const Ee = (d = {}) => {
|
|
|
2749
2752
|
if (!(xe.length < 1))
|
|
2750
2753
|
for (const h of xe) {
|
|
2751
2754
|
let f = Number(parseInt(h.vm.el.style.top));
|
|
2752
|
-
f -= p, f -=
|
|
2755
|
+
f -= p, f -= Me, h.vm.component.props.offsetTop = f;
|
|
2753
2756
|
}
|
|
2754
2757
|
};
|
|
2755
2758
|
const c = s.onDestroy;
|
|
2756
2759
|
s.onDestroy = () => {
|
|
2757
|
-
c == null || c(),
|
|
2760
|
+
c == null || c(), Te(null, e), e.remove(), e = null;
|
|
2758
2761
|
};
|
|
2759
|
-
const a = S(
|
|
2760
|
-
return
|
|
2762
|
+
const a = S(Mn, s);
|
|
2763
|
+
return Te(a, e), xe.push({ vm: a }), n.appendChild(e.firstElementChild), {
|
|
2761
2764
|
close: () => {
|
|
2762
2765
|
var l, i;
|
|
2763
2766
|
(i = (l = a.component) == null ? void 0 : l.exposed) == null || i.close();
|
|
2764
2767
|
}
|
|
2765
2768
|
};
|
|
2766
2769
|
};
|
|
2767
|
-
|
|
2768
|
-
|
|
2770
|
+
Dn.forEach((d) => {
|
|
2771
|
+
Ae[d] = (o = {}) => (typeof o == "string" && (o = {
|
|
2769
2772
|
message: o
|
|
2770
|
-
}),
|
|
2773
|
+
}), Ae({ ...o, type: d }));
|
|
2771
2774
|
});
|
|
2772
|
-
const
|
|
2773
|
-
name:
|
|
2775
|
+
const ia = Ae, Pn = ["textContent"], Nn = "sq-message-box", Fn = /* @__PURE__ */ T({
|
|
2776
|
+
name: Nn,
|
|
2777
|
+
__name: "message-box",
|
|
2778
|
+
props: {
|
|
2779
|
+
message: {},
|
|
2780
|
+
onDestroy: {},
|
|
2781
|
+
type: {},
|
|
2782
|
+
title: {},
|
|
2783
|
+
okText: {},
|
|
2784
|
+
cancelText: {},
|
|
2785
|
+
onOk: {},
|
|
2786
|
+
keyboard: { type: Boolean },
|
|
2787
|
+
maskCloseable: { type: Boolean },
|
|
2788
|
+
beforeClose: {}
|
|
2789
|
+
},
|
|
2790
|
+
setup(d, { expose: o }) {
|
|
2791
|
+
const n = d, t = z(!1);
|
|
2792
|
+
ie(() => {
|
|
2793
|
+
t.value = !0;
|
|
2794
|
+
});
|
|
2795
|
+
function s() {
|
|
2796
|
+
t.value = !1;
|
|
2797
|
+
}
|
|
2798
|
+
return o({ close: s }), (e, r) => (m(), C(u(As), {
|
|
2799
|
+
visible: t.value,
|
|
2800
|
+
"onUpdate:visible": r[0] || (r[0] = (c) => t.value = c),
|
|
2801
|
+
type: n.type,
|
|
2802
|
+
"mask-closeable": n.maskCloseable,
|
|
2803
|
+
keyboard: n.keyboard,
|
|
2804
|
+
"ok-text": n.okText,
|
|
2805
|
+
"cancel-text": n.cancelText,
|
|
2806
|
+
title: n.title,
|
|
2807
|
+
"before-close": n.beforeClose,
|
|
2808
|
+
onOk: n.onOk,
|
|
2809
|
+
onClosed: n.onDestroy
|
|
2810
|
+
}, {
|
|
2811
|
+
default: M(() => [
|
|
2812
|
+
I("span", {
|
|
2813
|
+
textContent: Y(n.message)
|
|
2814
|
+
}, null, 8, Pn)
|
|
2815
|
+
]),
|
|
2816
|
+
_: 1
|
|
2817
|
+
}, 8, ["visible", "type", "mask-closeable", "keyboard", "ok-text", "cancel-text", "title", "before-close", "onOk", "onClosed"]));
|
|
2818
|
+
}
|
|
2819
|
+
}), Un = (d, o = {}) => {
|
|
2820
|
+
const n = {
|
|
2821
|
+
type: "warn",
|
|
2822
|
+
message: d,
|
|
2823
|
+
// 用户配置
|
|
2824
|
+
...o
|
|
2825
|
+
};
|
|
2826
|
+
n.onDestroy = () => {
|
|
2827
|
+
Te(null, t), t.remove(), t = null;
|
|
2828
|
+
};
|
|
2829
|
+
let t = document.createElement("div");
|
|
2830
|
+
const s = S(Fn, n);
|
|
2831
|
+
return Te(s, t), {
|
|
2832
|
+
close: () => {
|
|
2833
|
+
var e, r;
|
|
2834
|
+
(r = (e = s.component) == null ? void 0 : e.exposed) == null || r.close();
|
|
2835
|
+
}
|
|
2836
|
+
};
|
|
2837
|
+
}, ra = {
|
|
2838
|
+
confirm: (d, o) => Un(d, { title: "警告", ...o ?? {} })
|
|
2839
|
+
}, Vn = "sq-pagination-prev", Hn = /* @__PURE__ */ T({
|
|
2840
|
+
name: Vn,
|
|
2774
2841
|
__name: "pagination-prev",
|
|
2775
2842
|
props: /* @__PURE__ */ Z({
|
|
2776
2843
|
disabled: { type: Boolean },
|
|
@@ -2792,8 +2859,8 @@ const na = Ee, On = "sq-pagination-prev", Pn = /* @__PURE__ */ R({
|
|
|
2792
2859
|
onClick: e[0] || (e[0] = (r) => t(-1))
|
|
2793
2860
|
}, null, 8, ["icon", "size", "disabled"]));
|
|
2794
2861
|
}
|
|
2795
|
-
}),
|
|
2796
|
-
name:
|
|
2862
|
+
}), Wn = "sq-pagination-next", jn = /* @__PURE__ */ T({
|
|
2863
|
+
name: Wn,
|
|
2797
2864
|
__name: "pagination-next",
|
|
2798
2865
|
props: /* @__PURE__ */ Z({
|
|
2799
2866
|
disabled: { type: Boolean },
|
|
@@ -2815,8 +2882,8 @@ const na = Ee, On = "sq-pagination-prev", Pn = /* @__PURE__ */ R({
|
|
|
2815
2882
|
onClick: e[0] || (e[0] = (r) => t(1))
|
|
2816
2883
|
}, null, 8, ["icon", "size", "disabled"]));
|
|
2817
2884
|
}
|
|
2818
|
-
}),
|
|
2819
|
-
name:
|
|
2885
|
+
}), Xn = { class: "sq-pagination-pager" }, Yn = "sq-pagination-pager", Kn = /* @__PURE__ */ T({
|
|
2886
|
+
name: Yn,
|
|
2820
2887
|
__name: "pagination-pager",
|
|
2821
2888
|
props: /* @__PURE__ */ Z({
|
|
2822
2889
|
disabled: { type: Boolean },
|
|
@@ -2831,7 +2898,7 @@ const na = Ee, On = "sq-pagination-prev", Pn = /* @__PURE__ */ R({
|
|
|
2831
2898
|
const o = d, n = le(d, "current"), t = (s) => {
|
|
2832
2899
|
n.value = s;
|
|
2833
2900
|
};
|
|
2834
|
-
return (s, e) => (m(), $("div",
|
|
2901
|
+
return (s, e) => (m(), $("div", Xn, [
|
|
2835
2902
|
(m(!0), $(ne, null, de(o.list, (r) => (m(), $(ne, { key: r }, [
|
|
2836
2903
|
r ? (m(), C(u(j), {
|
|
2837
2904
|
key: 0,
|
|
@@ -2840,8 +2907,8 @@ const na = Ee, On = "sq-pagination-prev", Pn = /* @__PURE__ */ R({
|
|
|
2840
2907
|
disabled: o.disabled,
|
|
2841
2908
|
onClick: (c) => t(r)
|
|
2842
2909
|
}, {
|
|
2843
|
-
default:
|
|
2844
|
-
Se(
|
|
2910
|
+
default: M(() => [
|
|
2911
|
+
Se(Y(r), 1)
|
|
2845
2912
|
]),
|
|
2846
2913
|
_: 2
|
|
2847
2914
|
}, 1032, ["type", "size", "disabled", "onClick"])) : (m(), C(u(j), {
|
|
@@ -2853,8 +2920,8 @@ const na = Ee, On = "sq-pagination-prev", Pn = /* @__PURE__ */ R({
|
|
|
2853
2920
|
], 64))), 128))
|
|
2854
2921
|
]));
|
|
2855
2922
|
}
|
|
2856
|
-
}),
|
|
2857
|
-
name:
|
|
2923
|
+
}), Gn = { class: "sq-pagination" }, Zn = "sq-pagination", ua = /* @__PURE__ */ T({
|
|
2924
|
+
name: Zn,
|
|
2858
2925
|
__name: "pagination",
|
|
2859
2926
|
props: /* @__PURE__ */ Z({
|
|
2860
2927
|
total: { default: 0 },
|
|
@@ -2882,19 +2949,19 @@ const na = Ee, On = "sq-pagination-prev", Pn = /* @__PURE__ */ R({
|
|
|
2882
2949
|
for (const l of c)
|
|
2883
2950
|
switch (l) {
|
|
2884
2951
|
case "prev":
|
|
2885
|
-
a.push(
|
|
2952
|
+
a.push(Hn);
|
|
2886
2953
|
break;
|
|
2887
2954
|
case "pager":
|
|
2888
|
-
a.push(
|
|
2955
|
+
a.push(Kn);
|
|
2889
2956
|
break;
|
|
2890
2957
|
case "next":
|
|
2891
|
-
a.push(
|
|
2958
|
+
a.push(jn);
|
|
2892
2959
|
break;
|
|
2893
2960
|
}
|
|
2894
2961
|
return a;
|
|
2895
2962
|
});
|
|
2896
|
-
return (c, a) => (m(), $("div",
|
|
2897
|
-
(m(!0), $(ne, null, de(r.value, (l, i) => (m(), C(
|
|
2963
|
+
return (c, a) => (m(), $("div", Gn, [
|
|
2964
|
+
(m(!0), $(ne, null, de(r.value, (l, i) => (m(), C(ue(l), {
|
|
2898
2965
|
key: i,
|
|
2899
2966
|
size: o.size,
|
|
2900
2967
|
disabled: o.disabled,
|
|
@@ -2905,8 +2972,8 @@ const na = Ee, On = "sq-pagination-prev", Pn = /* @__PURE__ */ R({
|
|
|
2905
2972
|
}, null, 40, ["size", "disabled", "list", "max-page", "current"]))), 128))
|
|
2906
2973
|
]));
|
|
2907
2974
|
}
|
|
2908
|
-
}),
|
|
2909
|
-
name:
|
|
2975
|
+
}), Jn = "sq-only-child", Qn = /* @__PURE__ */ T({
|
|
2976
|
+
name: Jn,
|
|
2910
2977
|
setup(d, {
|
|
2911
2978
|
slots: o,
|
|
2912
2979
|
attrs: n
|
|
@@ -2941,8 +3008,8 @@ function ct(d) {
|
|
|
2941
3008
|
function Ye(d) {
|
|
2942
3009
|
return S("span", null, [d]);
|
|
2943
3010
|
}
|
|
2944
|
-
const
|
|
2945
|
-
name:
|
|
3011
|
+
const eo = "sq-popover", to = /* @__PURE__ */ T({
|
|
3012
|
+
name: eo,
|
|
2946
3013
|
__name: "popover",
|
|
2947
3014
|
props: /* @__PURE__ */ Z({
|
|
2948
3015
|
placement: { default: "top" },
|
|
@@ -2961,30 +3028,30 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
2961
3028
|
}),
|
|
2962
3029
|
emits: ["update:visible"],
|
|
2963
3030
|
setup(d) {
|
|
2964
|
-
const { getCssVar: o } =
|
|
3031
|
+
const { getCssVar: o } = Ne(), { nextZIndex: n } = Fe(), t = De(), s = parseInt(o("--sq-padding-sm")), e = parseInt(o("--sq-padding-md"));
|
|
2965
3032
|
let r, c;
|
|
2966
|
-
const a = d, l = le(d, "visible"), i = z(0), p = z({}), g =
|
|
3033
|
+
const a = d, l = le(d, "visible"), i = z(0), p = z({}), g = re(null), h = re(null), f = b(() => {
|
|
2967
3034
|
const H = [];
|
|
2968
3035
|
return a.shadow && H.push("has-shadow"), H.push(a.popoverClass), [H];
|
|
2969
3036
|
});
|
|
2970
|
-
|
|
3037
|
+
ce(l, (H) => {
|
|
2971
3038
|
H ? (i.value = n(), V(), c = Pt(
|
|
2972
3039
|
g.value.$el,
|
|
2973
3040
|
h.value,
|
|
2974
3041
|
V
|
|
2975
3042
|
)) : c == null || c();
|
|
2976
|
-
}),
|
|
3043
|
+
}), ie(() => {
|
|
2977
3044
|
V();
|
|
2978
3045
|
}), ge(() => {
|
|
2979
|
-
|
|
3046
|
+
K(), document.removeEventListener("click", O);
|
|
2980
3047
|
});
|
|
2981
3048
|
function w() {
|
|
2982
|
-
a.trigger !== "hover" || a.disabled || (
|
|
3049
|
+
a.trigger !== "hover" || a.disabled || (K(), r = setTimeout(() => {
|
|
2983
3050
|
P(!1);
|
|
2984
3051
|
}, a.showAfter));
|
|
2985
3052
|
}
|
|
2986
3053
|
function B() {
|
|
2987
|
-
a.trigger === "hover" && (
|
|
3054
|
+
a.trigger === "hover" && (K(), r = setTimeout(() => {
|
|
2988
3055
|
O();
|
|
2989
3056
|
}, a.hideAfter));
|
|
2990
3057
|
}
|
|
@@ -3014,11 +3081,11 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3014
3081
|
top: `${_}px`
|
|
3015
3082
|
};
|
|
3016
3083
|
}
|
|
3017
|
-
function
|
|
3084
|
+
function K() {
|
|
3018
3085
|
r && (clearTimeout(r), r = void 0);
|
|
3019
3086
|
}
|
|
3020
3087
|
return (H, ee) => (m(), $(ne, null, [
|
|
3021
|
-
S(u(
|
|
3088
|
+
S(u(Qn), {
|
|
3022
3089
|
class: U(["sq-popover-trigger", u(t).class]),
|
|
3023
3090
|
style: X(u(t).style),
|
|
3024
3091
|
ref_key: "triggerRef",
|
|
@@ -3027,7 +3094,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3027
3094
|
onMouseleave: B,
|
|
3028
3095
|
onClick: D
|
|
3029
3096
|
}, {
|
|
3030
|
-
default:
|
|
3097
|
+
default: M(() => [
|
|
3031
3098
|
N(H.$slots, "reference")
|
|
3032
3099
|
]),
|
|
3033
3100
|
_: 3
|
|
@@ -3039,7 +3106,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3039
3106
|
S(he, {
|
|
3040
3107
|
name: a.transition
|
|
3041
3108
|
}, {
|
|
3042
|
-
default:
|
|
3109
|
+
default: M(() => [
|
|
3043
3110
|
oe(I("div", {
|
|
3044
3111
|
class: U(["sq-popover", f.value]),
|
|
3045
3112
|
style: X({ ...p.value, zIndex: i.value }),
|
|
@@ -3058,11 +3125,11 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3058
3125
|
], 8, ["disabled"]))
|
|
3059
3126
|
], 64));
|
|
3060
3127
|
}
|
|
3061
|
-
}),
|
|
3128
|
+
}), so = {
|
|
3062
3129
|
key: 0,
|
|
3063
3130
|
class: "sq-progress-label"
|
|
3064
|
-
},
|
|
3065
|
-
name:
|
|
3131
|
+
}, no = ["textContent"], oo = "sq-progress", ao = /* @__PURE__ */ T({
|
|
3132
|
+
name: oo,
|
|
3066
3133
|
__name: "progress",
|
|
3067
3134
|
props: {
|
|
3068
3135
|
value: {},
|
|
@@ -3075,7 +3142,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3075
3142
|
label: { type: Boolean, default: !0 }
|
|
3076
3143
|
},
|
|
3077
3144
|
setup(d) {
|
|
3078
|
-
const o = new ResizeObserver(l), n = d, t = z(100), s =
|
|
3145
|
+
const o = new ResizeObserver(l), n = d, t = z(100), s = re(null), e = b(() => {
|
|
3079
3146
|
const i = [];
|
|
3080
3147
|
return n.color || i.push(`is-${n.type}`), n.variant && i.push(`is-${n.variant}`), i;
|
|
3081
3148
|
}), r = b(() => {
|
|
@@ -3095,7 +3162,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3095
3162
|
}
|
|
3096
3163
|
return i;
|
|
3097
3164
|
});
|
|
3098
|
-
|
|
3165
|
+
ie(() => {
|
|
3099
3166
|
o.observe(s.value);
|
|
3100
3167
|
}), ge(() => {
|
|
3101
3168
|
o.disconnect();
|
|
@@ -3126,21 +3193,21 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3126
3193
|
cy: "50"
|
|
3127
3194
|
})
|
|
3128
3195
|
], -1)),
|
|
3129
|
-
n.label ? (m(), $("div",
|
|
3196
|
+
n.label ? (m(), $("div", so, [
|
|
3130
3197
|
N(i.$slots, "default", { percentage: r.value }, () => [
|
|
3131
3198
|
I("span", {
|
|
3132
|
-
textContent:
|
|
3133
|
-
}, null, 8,
|
|
3199
|
+
textContent: Y(c.value)
|
|
3200
|
+
}, null, 8, no)
|
|
3134
3201
|
])
|
|
3135
3202
|
])) : L("", !0)
|
|
3136
3203
|
], 64)) : L("", !0)
|
|
3137
3204
|
], 6));
|
|
3138
3205
|
}
|
|
3139
|
-
}),
|
|
3206
|
+
}), lo = ["autofocus", "name", "form", "value", "disabled"], io = {
|
|
3140
3207
|
key: 0,
|
|
3141
3208
|
class: "sq-radio-box"
|
|
3142
|
-
},
|
|
3143
|
-
name:
|
|
3209
|
+
}, ro = ["textContent"], uo = "sq-radio", co = /* @__PURE__ */ T({
|
|
3210
|
+
name: uo,
|
|
3144
3211
|
__name: "radio",
|
|
3145
3212
|
props: /* @__PURE__ */ Z({
|
|
3146
3213
|
form: {},
|
|
@@ -3168,16 +3235,16 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3168
3235
|
const f = [], w = u(s), B = u(e), D = u(a);
|
|
3169
3236
|
return w !== "md" && f.push(`sq-selection--${w}`), h.value && f.push("is-checked"), B && f.push("is-disabled"), D && f.push(`is-${D}`), f;
|
|
3170
3237
|
}), h = b(() => l ? u(l).checked === t.value : p.value);
|
|
3171
|
-
return
|
|
3238
|
+
return ce(i, (f) => {
|
|
3172
3239
|
p.value = f === t.value;
|
|
3173
|
-
}),
|
|
3240
|
+
}), ce(h, (f) => {
|
|
3174
3241
|
if (f ? i.value = t.value ?? "on" : i.value = void 0, p.value !== f) {
|
|
3175
3242
|
p.value = f;
|
|
3176
3243
|
return;
|
|
3177
3244
|
}
|
|
3178
|
-
}),
|
|
3245
|
+
}), ce(p, (f) => {
|
|
3179
3246
|
h.value !== f && l && l.value.toggleItem(t.value);
|
|
3180
|
-
}),
|
|
3247
|
+
}), ie(() => {
|
|
3181
3248
|
p.value = h.value, i.value = p.value ? t.value ?? "on" : void 0;
|
|
3182
3249
|
}), (f, w) => (m(), $("label", {
|
|
3183
3250
|
class: U(["sq-selection sq-radio", g.value])
|
|
@@ -3191,19 +3258,19 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3191
3258
|
disabled: u(e),
|
|
3192
3259
|
"onUpdate:modelValue": w[0] || (w[0] = (B) => i.value = B),
|
|
3193
3260
|
onChange: w[1] || (w[1] = (B) => n("change", h.value))
|
|
3194
|
-
}, null, 40,
|
|
3261
|
+
}, null, 40, lo), [
|
|
3195
3262
|
[Ze, i.value]
|
|
3196
3263
|
]),
|
|
3197
|
-
u(a) !== "solid" ? (m(), $("span",
|
|
3264
|
+
u(a) !== "solid" ? (m(), $("span", io)) : L("", !0),
|
|
3198
3265
|
t.label ? (m(), $("span", {
|
|
3199
3266
|
key: 1,
|
|
3200
3267
|
class: "sq-selection-label",
|
|
3201
|
-
textContent:
|
|
3202
|
-
}, null, 8,
|
|
3268
|
+
textContent: Y(t.label)
|
|
3269
|
+
}, null, 8, ro)) : L("", !0)
|
|
3203
3270
|
], 2));
|
|
3204
3271
|
}
|
|
3205
|
-
}),
|
|
3206
|
-
name:
|
|
3272
|
+
}), fo = { class: "sq-radio-group sq-selection-group" }, po = "sq-radio-group", vo = /* @__PURE__ */ T({
|
|
3273
|
+
name: po,
|
|
3207
3274
|
__name: "radio-group",
|
|
3208
3275
|
props: {
|
|
3209
3276
|
items: { default: () => [] },
|
|
@@ -3216,7 +3283,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3216
3283
|
},
|
|
3217
3284
|
emits: ["change", "update:value"],
|
|
3218
3285
|
setup(d, { emit: o }) {
|
|
3219
|
-
const { nextId: n } =
|
|
3286
|
+
const { nextId: n } = Le(), t = o, s = d, e = z(s.value), r = b(() => s.name ?? `sq-radio-${n()}`);
|
|
3220
3287
|
ke(
|
|
3221
3288
|
dt,
|
|
3222
3289
|
z({
|
|
@@ -3228,7 +3295,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3228
3295
|
checked: e,
|
|
3229
3296
|
toggleItem: c
|
|
3230
3297
|
})
|
|
3231
|
-
),
|
|
3298
|
+
), ce(
|
|
3232
3299
|
() => s.value,
|
|
3233
3300
|
(a) => {
|
|
3234
3301
|
a !== e.value && (e.value = a);
|
|
@@ -3237,9 +3304,9 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3237
3304
|
function c(a) {
|
|
3238
3305
|
e.value = a, t("change", e.value), t("update:value", e.value);
|
|
3239
3306
|
}
|
|
3240
|
-
return (a, l) => (m(), $("div",
|
|
3307
|
+
return (a, l) => (m(), $("div", fo, [
|
|
3241
3308
|
N(a.$slots, "default", {}, () => [
|
|
3242
|
-
(m(!0), $(ne, null, de(s.items, (i, p) => (m(), C(u(
|
|
3309
|
+
(m(!0), $(ne, null, de(s.items, (i, p) => (m(), C(u(co), {
|
|
3243
3310
|
key: p,
|
|
3244
3311
|
label: i.toString(),
|
|
3245
3312
|
value: i
|
|
@@ -3247,8 +3314,8 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3247
3314
|
])
|
|
3248
3315
|
]));
|
|
3249
3316
|
}
|
|
3250
|
-
}), dt = Symbol("radio-group-context-keys"),
|
|
3251
|
-
name:
|
|
3317
|
+
}), dt = Symbol("radio-group-context-keys"), mo = "sq-segmented", ho = /* @__PURE__ */ T({
|
|
3318
|
+
name: mo,
|
|
3252
3319
|
__name: "segmented",
|
|
3253
3320
|
props: {
|
|
3254
3321
|
name: {},
|
|
@@ -3260,7 +3327,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3260
3327
|
},
|
|
3261
3328
|
emits: ["change", "update:value"],
|
|
3262
3329
|
setup(d, { emit: o }) {
|
|
3263
|
-
const { nextId: n } =
|
|
3330
|
+
const { nextId: n } = Le(), t = o, s = d, e = z(s.value), r = z(), c = z(), a = b(() => s.items.length && typeof s.items[0] == "string" ? s.items.map((f) => ({
|
|
3264
3331
|
text: f,
|
|
3265
3332
|
value: f
|
|
3266
3333
|
})) : s.items), l = b(() => {
|
|
@@ -3280,14 +3347,14 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3280
3347
|
toggleItem: g,
|
|
3281
3348
|
updateThumb: h
|
|
3282
3349
|
})
|
|
3283
|
-
),
|
|
3350
|
+
), ce(e, (f) => {
|
|
3284
3351
|
f !== s.value && (t("change", f), t("update:value", f));
|
|
3285
|
-
}),
|
|
3352
|
+
}), ce(
|
|
3286
3353
|
() => s.value,
|
|
3287
3354
|
(f) => {
|
|
3288
3355
|
f !== e.value && (e.value = f);
|
|
3289
3356
|
}
|
|
3290
|
-
),
|
|
3357
|
+
), ie(() => {
|
|
3291
3358
|
var f;
|
|
3292
3359
|
e.value || (e.value = (f = a.value[0]) == null ? void 0 : f.value);
|
|
3293
3360
|
});
|
|
@@ -3305,14 +3372,14 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3305
3372
|
style: X(i.value)
|
|
3306
3373
|
}, null, 4),
|
|
3307
3374
|
N(f.$slots, "default", {}, () => [
|
|
3308
|
-
(m(!0), $(ne, null, de(a.value, (B) => (m(), C(u(
|
|
3375
|
+
(m(!0), $(ne, null, de(a.value, (B) => (m(), C(u(yo), pe({
|
|
3309
3376
|
key: B.text
|
|
3310
3377
|
}, { ref_for: !0 }, B), null, 16))), 128))
|
|
3311
3378
|
])
|
|
3312
3379
|
], 2));
|
|
3313
3380
|
}
|
|
3314
|
-
}),
|
|
3315
|
-
name:
|
|
3381
|
+
}), go = ["name", "value", "disabled"], bo = "sq-segmented-item", yo = /* @__PURE__ */ T({
|
|
3382
|
+
name: bo,
|
|
3316
3383
|
__name: "segmented-item",
|
|
3317
3384
|
props: {
|
|
3318
3385
|
icon: {},
|
|
@@ -3321,16 +3388,16 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3321
3388
|
value: {}
|
|
3322
3389
|
},
|
|
3323
3390
|
setup(d) {
|
|
3324
|
-
const o = d, { segmentedDisabled: n, parentContext: t } = ps(o), s = z(), e =
|
|
3391
|
+
const o = d, { segmentedDisabled: n, parentContext: t } = ps(o), s = z(), e = re(null), r = b(() => {
|
|
3325
3392
|
const i = [], p = u(n);
|
|
3326
3393
|
return c.value && i.push("is-active"), p && i.push("is-disabled"), i;
|
|
3327
3394
|
}), c = b(() => u(t).active === o.value), a = b(() => u(t).size !== "sm" ? "md" : "sm");
|
|
3328
|
-
|
|
3395
|
+
ce(c, (i) => {
|
|
3329
3396
|
if (i) {
|
|
3330
3397
|
if (s.value = o.value ?? "on", !t) return;
|
|
3331
3398
|
t.value.updateThumb(e.value);
|
|
3332
3399
|
} else s.value = void 0;
|
|
3333
|
-
}),
|
|
3400
|
+
}), ie(() => {
|
|
3334
3401
|
s.value = c.value ? o.value ?? "on" : void 0, !(!c.value || !t) && t.value.updateThumb(e.value);
|
|
3335
3402
|
});
|
|
3336
3403
|
function l() {
|
|
@@ -3350,14 +3417,14 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3350
3417
|
disabled: u(n),
|
|
3351
3418
|
"onUpdate:modelValue": p[0] || (p[0] = (h) => s.value = h),
|
|
3352
3419
|
onChange: l
|
|
3353
|
-
}, null, 40,
|
|
3420
|
+
}, null, 40, go), [
|
|
3354
3421
|
[Ze, s.value]
|
|
3355
3422
|
]),
|
|
3356
3423
|
N(i.$slots, "default", {}, () => [
|
|
3357
3424
|
S(u(be), { size: a.value }, {
|
|
3358
|
-
default:
|
|
3359
|
-
o.icon ? (m(), C(
|
|
3360
|
-
Se(" " +
|
|
3425
|
+
default: M(() => [
|
|
3426
|
+
o.icon ? (m(), C(ue(o.icon), { key: 0 })) : L("", !0),
|
|
3427
|
+
Se(" " + Y(o.text), 1)
|
|
3361
3428
|
]),
|
|
3362
3429
|
_: 1
|
|
3363
3430
|
}, 8, ["size"])
|
|
@@ -3367,8 +3434,8 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3367
3434
|
}
|
|
3368
3435
|
}), ft = Symbol(
|
|
3369
3436
|
"segmented-context-keys"
|
|
3370
|
-
),
|
|
3371
|
-
name:
|
|
3437
|
+
), xo = ["id", "autofocus", "name", "form", "disabled"], _o = { class: "sq-switch-track" }, $o = { class: "sq-switch-thumb" }, ko = "sq-switch", wo = /* @__PURE__ */ T({
|
|
3438
|
+
name: ko,
|
|
3372
3439
|
__name: "switch",
|
|
3373
3440
|
props: /* @__PURE__ */ Z({
|
|
3374
3441
|
form: {},
|
|
@@ -3401,18 +3468,18 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3401
3468
|
disabled: u(e) || t.loading,
|
|
3402
3469
|
onChange: i[1] || (i[1] = (p) => n("change", c.value, p)),
|
|
3403
3470
|
onClick: i[2] || (i[2] = (p) => n("click", c.value, p))
|
|
3404
|
-
}, null, 40,
|
|
3471
|
+
}, null, 40, xo), [
|
|
3405
3472
|
[Ke, c.value]
|
|
3406
3473
|
]),
|
|
3407
|
-
I("span",
|
|
3408
|
-
I("span",
|
|
3474
|
+
I("span", _o, [
|
|
3475
|
+
I("span", $o, [
|
|
3409
3476
|
t.loading ? (m(), C(u(Re), { key: 0 })) : L("", !0)
|
|
3410
3477
|
])
|
|
3411
3478
|
])
|
|
3412
3479
|
], 2));
|
|
3413
3480
|
}
|
|
3414
|
-
}),
|
|
3415
|
-
name:
|
|
3481
|
+
}), qo = "sq-vnode-renderer", Co = T({
|
|
3482
|
+
name: qo,
|
|
3416
3483
|
props: {
|
|
3417
3484
|
content: {
|
|
3418
3485
|
type: Object
|
|
@@ -3421,11 +3488,11 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3421
3488
|
render() {
|
|
3422
3489
|
return this.content;
|
|
3423
3490
|
}
|
|
3424
|
-
}),
|
|
3491
|
+
}), So = { class: "sq-table-wrap" }, Bo = ["textContent"], zo = ["textContent"], To = {
|
|
3425
3492
|
key: 0,
|
|
3426
3493
|
class: "sq-table-empty"
|
|
3427
|
-
},
|
|
3428
|
-
name:
|
|
3494
|
+
}, Ro = ["textContent"], Lo = "sq-table", ca = /* @__PURE__ */ T({
|
|
3495
|
+
name: Lo,
|
|
3429
3496
|
__name: "table",
|
|
3430
3497
|
props: {
|
|
3431
3498
|
emptyText: { default: "暂无数据" },
|
|
@@ -3437,7 +3504,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3437
3504
|
cols: { default: () => [] }
|
|
3438
3505
|
},
|
|
3439
3506
|
setup(d) {
|
|
3440
|
-
const { getCssUnit: o } =
|
|
3507
|
+
const { getCssUnit: o } = Ne(), n = new ResizeObserver(l), t = d, s = z(!1), e = re(null), r = b(() => {
|
|
3441
3508
|
const h = [];
|
|
3442
3509
|
return t.stripe && h.push("is-striped"), t.border && h.push("has-border"), h;
|
|
3443
3510
|
}), c = b(() => ({
|
|
@@ -3446,7 +3513,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3446
3513
|
...c.value,
|
|
3447
3514
|
paddingInlineEnd: s.value ? "6px" : "0"
|
|
3448
3515
|
}));
|
|
3449
|
-
|
|
3516
|
+
ie(() => {
|
|
3450
3517
|
n.observe(e.value);
|
|
3451
3518
|
}), ge(() => {
|
|
3452
3519
|
n.disconnect();
|
|
@@ -3483,7 +3550,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3483
3550
|
return (h, f) => (m(), $("div", {
|
|
3484
3551
|
class: U(["sq-table", r.value])
|
|
3485
3552
|
}, [
|
|
3486
|
-
I("div",
|
|
3553
|
+
I("div", So, [
|
|
3487
3554
|
I("div", {
|
|
3488
3555
|
class: "sq-table-header",
|
|
3489
3556
|
style: X(a.value)
|
|
@@ -3494,8 +3561,8 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3494
3561
|
key: w.binding
|
|
3495
3562
|
}, [
|
|
3496
3563
|
I("span", {
|
|
3497
|
-
textContent:
|
|
3498
|
-
}, null, 8,
|
|
3564
|
+
textContent: Y(w.title)
|
|
3565
|
+
}, null, 8, Bo)
|
|
3499
3566
|
], 4))), 128))
|
|
3500
3567
|
], 4),
|
|
3501
3568
|
oe(I("div", {
|
|
@@ -3513,30 +3580,30 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3513
3580
|
style: X({ "justify-content": p(D.align) }),
|
|
3514
3581
|
key: `${D.binding}-${i(w, P)}`
|
|
3515
3582
|
}, [
|
|
3516
|
-
typeof D.cellRender == "function" ? (m(), C(u(
|
|
3583
|
+
typeof D.cellRender == "function" ? (m(), C(u(Co), {
|
|
3517
3584
|
key: 0,
|
|
3518
3585
|
content: D.cellRender(w)
|
|
3519
3586
|
}, null, 8, ["content"])) : (m(), $("span", {
|
|
3520
3587
|
key: 1,
|
|
3521
|
-
textContent:
|
|
3522
|
-
}, null, 8,
|
|
3588
|
+
textContent: Y(g(w, D))
|
|
3589
|
+
}, null, 8, zo))
|
|
3523
3590
|
], 6))), 128))
|
|
3524
3591
|
], 4))), 128))
|
|
3525
3592
|
], 512), [
|
|
3526
3593
|
[ve, t.data.length]
|
|
3527
3594
|
]),
|
|
3528
|
-
t.data.length ? L("", !0) : (m(), $("div",
|
|
3595
|
+
t.data.length ? L("", !0) : (m(), $("div", To, [
|
|
3529
3596
|
N(h.$slots, "empty", {}, () => [
|
|
3530
3597
|
I("span", {
|
|
3531
|
-
textContent:
|
|
3532
|
-
}, null, 8,
|
|
3598
|
+
textContent: Y(t.emptyText)
|
|
3599
|
+
}, null, 8, Ro)
|
|
3533
3600
|
])
|
|
3534
3601
|
]))
|
|
3535
3602
|
])
|
|
3536
3603
|
], 2));
|
|
3537
3604
|
}
|
|
3538
|
-
}),
|
|
3539
|
-
name:
|
|
3605
|
+
}), Io = "sq-tag", da = /* @__PURE__ */ T({
|
|
3606
|
+
name: Io,
|
|
3540
3607
|
__name: "tag",
|
|
3541
3608
|
props: {
|
|
3542
3609
|
type: {},
|
|
@@ -3553,14 +3620,14 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3553
3620
|
class: U(["sq-tag", n.value]),
|
|
3554
3621
|
size: t.value
|
|
3555
3622
|
}, {
|
|
3556
|
-
default:
|
|
3623
|
+
default: M(() => [
|
|
3557
3624
|
N(s.$slots, "default")
|
|
3558
3625
|
]),
|
|
3559
3626
|
_: 3
|
|
3560
3627
|
}, 8, ["class", "size"]));
|
|
3561
3628
|
}
|
|
3562
|
-
}),
|
|
3563
|
-
name:
|
|
3629
|
+
}), Mo = "sq-check-tag", fa = /* @__PURE__ */ T({
|
|
3630
|
+
name: Mo,
|
|
3564
3631
|
__name: "check-tag",
|
|
3565
3632
|
props: {
|
|
3566
3633
|
checked: { type: Boolean, default: !1 },
|
|
@@ -3579,14 +3646,14 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3579
3646
|
size: e.value,
|
|
3580
3647
|
onClick: c[0] || (c[0] = (a) => n("change", !t.checked))
|
|
3581
3648
|
}, {
|
|
3582
|
-
default:
|
|
3649
|
+
default: M(() => [
|
|
3583
3650
|
N(r.$slots, "default")
|
|
3584
3651
|
]),
|
|
3585
3652
|
_: 3
|
|
3586
3653
|
}, 8, ["class", "size"]));
|
|
3587
3654
|
}
|
|
3588
|
-
}),
|
|
3589
|
-
name:
|
|
3655
|
+
}), Eo = "sq-text", be = /* @__PURE__ */ T({
|
|
3656
|
+
name: Eo,
|
|
3590
3657
|
__name: "text",
|
|
3591
3658
|
props: {
|
|
3592
3659
|
ellipsis: { type: [Boolean, Number], default: !1 },
|
|
@@ -3606,8 +3673,8 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3606
3673
|
N(e.$slots, "default")
|
|
3607
3674
|
], 6));
|
|
3608
3675
|
}
|
|
3609
|
-
}),
|
|
3610
|
-
name:
|
|
3676
|
+
}), Ao = "sq-timeline", pa = /* @__PURE__ */ T({
|
|
3677
|
+
name: Ao,
|
|
3611
3678
|
__name: "timeline",
|
|
3612
3679
|
props: {
|
|
3613
3680
|
align: { default: "left" },
|
|
@@ -3624,8 +3691,8 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3624
3691
|
N(t.$slots, "default")
|
|
3625
3692
|
], 2));
|
|
3626
3693
|
}
|
|
3627
|
-
}),
|
|
3628
|
-
name:
|
|
3694
|
+
}), Do = { class: "sq-timeline-dot" }, Oo = { class: "sq-timeline-content" }, Po = ["textContent"], No = ["textContent"], Fo = { class: "content-info" }, Uo = "sq-timeline-item", va = /* @__PURE__ */ T({
|
|
3695
|
+
name: Uo,
|
|
3629
3696
|
__name: "timeline-item",
|
|
3630
3697
|
props: {
|
|
3631
3698
|
color: {},
|
|
@@ -3647,28 +3714,28 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3647
3714
|
class: U(["sq-timeline-item", n.value]),
|
|
3648
3715
|
style: X(t.value)
|
|
3649
3716
|
}, [
|
|
3650
|
-
I("span",
|
|
3651
|
-
o.icon ? (m(), C(
|
|
3717
|
+
I("span", Do, [
|
|
3718
|
+
o.icon ? (m(), C(ue(o.icon), { key: 0 })) : L("", !0)
|
|
3652
3719
|
]),
|
|
3653
|
-
I("div",
|
|
3720
|
+
I("div", Oo, [
|
|
3654
3721
|
o.title ? (m(), $("h2", {
|
|
3655
3722
|
key: 0,
|
|
3656
3723
|
class: "content-title",
|
|
3657
|
-
textContent:
|
|
3658
|
-
}, null, 8,
|
|
3724
|
+
textContent: Y(o.title)
|
|
3725
|
+
}, null, 8, Po)) : L("", !0),
|
|
3659
3726
|
o.timestamp ? (m(), $("span", {
|
|
3660
3727
|
key: 1,
|
|
3661
3728
|
class: "content-time",
|
|
3662
|
-
textContent:
|
|
3663
|
-
}, null, 8,
|
|
3664
|
-
I("div",
|
|
3729
|
+
textContent: Y(o.timestamp)
|
|
3730
|
+
}, null, 8, No)) : L("", !0),
|
|
3731
|
+
I("div", Fo, [
|
|
3665
3732
|
N(s.$slots, "default")
|
|
3666
3733
|
])
|
|
3667
3734
|
])
|
|
3668
3735
|
], 6));
|
|
3669
3736
|
}
|
|
3670
|
-
}),
|
|
3671
|
-
name:
|
|
3737
|
+
}), Vo = ["textContent"], Ho = "sq-tooltip", ae = /* @__PURE__ */ T({
|
|
3738
|
+
name: Ho,
|
|
3672
3739
|
__name: "tooltip",
|
|
3673
3740
|
props: {
|
|
3674
3741
|
placement: {},
|
|
@@ -3684,7 +3751,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3684
3751
|
const t = ["sq-tooltip"], s = o.popoverClass;
|
|
3685
3752
|
return Array.isArray(s) ? t.push(...s) : typeof s == "string" && t.push(s), t;
|
|
3686
3753
|
});
|
|
3687
|
-
return (t, s) => (m(), C(u(
|
|
3754
|
+
return (t, s) => (m(), C(u(to), {
|
|
3688
3755
|
placement: o.placement,
|
|
3689
3756
|
disabled: o.disabled,
|
|
3690
3757
|
"show-after": 300,
|
|
@@ -3694,19 +3761,19 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3694
3761
|
transition: o.transition,
|
|
3695
3762
|
shadow: o.shadow
|
|
3696
3763
|
}, {
|
|
3697
|
-
reference:
|
|
3764
|
+
reference: M(() => [
|
|
3698
3765
|
N(t.$slots, "default")
|
|
3699
3766
|
]),
|
|
3700
|
-
default:
|
|
3767
|
+
default: M(() => [
|
|
3701
3768
|
I("span", {
|
|
3702
|
-
textContent:
|
|
3703
|
-
}, null, 8,
|
|
3769
|
+
textContent: Y(o.tip)
|
|
3770
|
+
}, null, 8, Vo)
|
|
3704
3771
|
]),
|
|
3705
3772
|
_: 3
|
|
3706
3773
|
}, 8, ["placement", "disabled", "popover-class", "teleported", "transition", "shadow"]));
|
|
3707
3774
|
}
|
|
3708
|
-
}),
|
|
3709
|
-
name:
|
|
3775
|
+
}), Wo = ["name", "form", "disabled", "accept", "multiple"], jo = "sq-upload", ma = /* @__PURE__ */ T({
|
|
3776
|
+
name: jo,
|
|
3710
3777
|
__name: "upload",
|
|
3711
3778
|
props: {
|
|
3712
3779
|
form: {},
|
|
@@ -3719,7 +3786,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3719
3786
|
},
|
|
3720
3787
|
emits: ["change"],
|
|
3721
3788
|
setup(d, { expose: o, emit: n }) {
|
|
3722
|
-
const t = n, s = d, e =
|
|
3789
|
+
const t = n, s = d, e = re(null);
|
|
3723
3790
|
function r() {
|
|
3724
3791
|
var g;
|
|
3725
3792
|
i(((g = e.value) == null ? void 0 : g.files) ?? void 0);
|
|
@@ -3762,7 +3829,7 @@ const Kn = "sq-popover", Gn = /* @__PURE__ */ R({
|
|
|
3762
3829
|
accept: s.accept,
|
|
3763
3830
|
multiple: s.multiple,
|
|
3764
3831
|
onChange: r
|
|
3765
|
-
}, null, 40,
|
|
3832
|
+
}, null, 40, Wo),
|
|
3766
3833
|
N(g.$slots, "default")
|
|
3767
3834
|
], 32));
|
|
3768
3835
|
}
|
|
@@ -3771,44 +3838,45 @@ export {
|
|
|
3771
3838
|
at as ButtonGroupContextKeys,
|
|
3772
3839
|
it as CheckboxGroupContextKeys,
|
|
3773
3840
|
Ce as FormContextKeys,
|
|
3774
|
-
|
|
3841
|
+
Ue as FormItemIdKeys,
|
|
3775
3842
|
dt as RadioGroupContextKeys,
|
|
3776
3843
|
ft as SegmentedContextKeys,
|
|
3777
|
-
|
|
3844
|
+
Jo as SqAlert,
|
|
3778
3845
|
Qt as SqArticle,
|
|
3779
|
-
|
|
3780
|
-
|
|
3846
|
+
Qo as SqAvatar,
|
|
3847
|
+
ea as SqBacktop,
|
|
3781
3848
|
Xe as SqBadge,
|
|
3782
3849
|
rs as SqBlur,
|
|
3783
3850
|
j as SqButton,
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3851
|
+
ta as SqButtonGroup,
|
|
3852
|
+
sa as SqCard,
|
|
3853
|
+
fa as SqCheckTag,
|
|
3787
3854
|
lt as SqCheckbox,
|
|
3788
3855
|
zs as SqCheckboxGroup,
|
|
3789
|
-
|
|
3856
|
+
As as SqDialog,
|
|
3790
3857
|
$e as SqDivider,
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3858
|
+
na as SqEditor,
|
|
3859
|
+
oa as SqForm,
|
|
3860
|
+
mn as SqImage,
|
|
3861
|
+
aa as SqImageCrop,
|
|
3862
|
+
bn as SqImageViewer,
|
|
3796
3863
|
ut as SqInput,
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
ao as
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
yo as
|
|
3807
|
-
|
|
3808
|
-
|
|
3864
|
+
la as SqMenu,
|
|
3865
|
+
ia as SqMessage,
|
|
3866
|
+
ra as SqMessageBox,
|
|
3867
|
+
ua as SqPagination,
|
|
3868
|
+
to as SqPopover,
|
|
3869
|
+
ao as SqProgress,
|
|
3870
|
+
co as SqRadio,
|
|
3871
|
+
vo as SqRadioGroup,
|
|
3872
|
+
ho as SqSegmented,
|
|
3873
|
+
yo as SqSegmentedItem,
|
|
3874
|
+
wo as SqSwitch,
|
|
3875
|
+
ca as SqTable,
|
|
3876
|
+
da as SqTag,
|
|
3809
3877
|
be as SqText,
|
|
3810
|
-
|
|
3811
|
-
|
|
3878
|
+
pa as SqTimeline,
|
|
3879
|
+
va as SqTimelineItem,
|
|
3812
3880
|
ae as SqTooltip,
|
|
3813
|
-
|
|
3881
|
+
ma as SqUpload
|
|
3814
3882
|
};
|