@cyberpunk-vue/components 1.5.0 → 1.5.1
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/container/index.d.ts +2 -16
- package/dist/container/index.d.ts.map +1 -1
- package/dist/container/src/aside.vue.d.ts +3 -9
- package/dist/container/src/aside.vue.d.ts.map +1 -1
- package/dist/container/src/main.vue.d.ts +3 -9
- package/dist/container/src/main.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1022 -1050
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as oe, computed as s, openBlock as i, createElementBlock as p, normalizeStyle as
|
|
1
|
+
import { defineComponent as oe, computed as s, openBlock as i, createElementBlock as p, normalizeStyle as U, normalizeClass as n, unref as a, createElementVNode as v, createBlock as ee, resolveDynamicComponent as we, withCtx as ve, renderSlot as H, useSlots as xe, Fragment as ue, createVNode as he, Transition as Ie, createCommentVNode as j, provide as Be, toRef as fe, watchEffect as zt, ref as W, onMounted as Me, toDisplayString as G, nextTick as Pe, watch as ge, onBeforeUnmount as Ve, renderList as ke, createTextVNode as de, withModifiers as Ce, withKeys as Ge, withDirectives as Ee, vShow as Ke, inject as $e, Teleport as Je, vModelText as at, resolveComponent as ct, useAttrs as Bt, mergeProps as Re, getCurrentInstance as dt, createStaticVNode as Mt, reactive as Pt } from "vue";
|
|
2
2
|
import { useNamespace as ne, parseSizeNumber as Ze, isPresetSize as ae, normalizeSize as Se, normalizeDuration as Ne, useImageSrc as pt } from "@cyberpunk-vue/hooks";
|
|
3
3
|
import { COMPONENT_PREFIX as se, DEFAULTS_KEY as Vt, THEME_KEY as At, DIALOG_CONTEXT_KEY as Nt, CSS_NAMESPACE as ft, TABLE_CONTEXT_KEY as vt } from "@cyberpunk-vue/constants";
|
|
4
4
|
function re(u) {
|
|
@@ -299,7 +299,7 @@ const Et = {
|
|
|
299
299
|
});
|
|
300
300
|
return (f, m) => (i(), p("div", {
|
|
301
301
|
class: n(d.value),
|
|
302
|
-
style:
|
|
302
|
+
style: U(c.value)
|
|
303
303
|
}, [
|
|
304
304
|
(i(), p("svg", {
|
|
305
305
|
class: n(a(o).e("svg")),
|
|
@@ -423,11 +423,11 @@ const Et = {
|
|
|
423
423
|
});
|
|
424
424
|
return (f, m) => (i(), ee(we(f.tag), {
|
|
425
425
|
class: n(d.value),
|
|
426
|
-
style:
|
|
426
|
+
style: U(c.value),
|
|
427
427
|
"aria-hidden": "true"
|
|
428
428
|
}, {
|
|
429
429
|
default: ve(() => [
|
|
430
|
-
r.value === "slot" ?
|
|
430
|
+
r.value === "slot" ? H(f.$slots, "default", { key: 0 }) : r.value === "component" ? (i(), ee(we(f.icon), { key: 1 })) : r.value === "svg" ? (i(), p("span", {
|
|
431
431
|
key: 2,
|
|
432
432
|
class: n(a(o).e("svg")),
|
|
433
433
|
innerHTML: f.icon
|
|
@@ -458,22 +458,22 @@ const Et = {
|
|
|
458
458
|
l.is("dashed", o.dashed),
|
|
459
459
|
l.is("custom-color", !!o.color),
|
|
460
460
|
l.is("loading-placeholder", o.loadingPlaceholder),
|
|
461
|
-
l.is("icon-only",
|
|
461
|
+
l.is("icon-only", V.value || o.square),
|
|
462
462
|
l.is("custom-size", !ae(o.size))
|
|
463
463
|
]), f = s(() => {
|
|
464
464
|
const S = {};
|
|
465
465
|
return o.color && (S["--cp-button-custom-color"] = o.color, S["--cp-button-custom-color-light"] = `${o.color}33`), o.textColor && (S.color = o.textColor), ae(o.size) || (S["--cp-button-height"] = Se(o.size, d)), S;
|
|
466
466
|
}), m = (S) => {
|
|
467
467
|
o.disabled || o.loading || e("click", S);
|
|
468
|
-
}, g = s(() => !!r.prefix || !!o.prefixIcon), k = s(() => !!r.suffix || !!o.suffixIcon),
|
|
468
|
+
}, g = s(() => !!r.prefix || !!o.prefixIcon), k = s(() => !!r.suffix || !!o.suffixIcon), V = s(() => !!o.icon && !r.default), x = s(() => o.iconColor || o.textColor || ""), T = s(() => o.prefixIconColor || o.iconColor || o.textColor || ""), I = s(() => o.suffixIconColor || o.iconColor || o.textColor || ""), b = s(() => x.value ? { color: x.value } : {}), L = s(() => T.value ? { color: T.value } : {}), P = s(() => I.value ? { color: I.value } : {}), N = s(() => (ae(o.size), o.size)), M = s(() => o.iconSize || N.value), C = s(() => o.prefixIconSize || o.iconSize || N.value), D = s(() => o.suffixIconSize || o.iconSize || N.value), X = { sm: 18, md: 20, lg: 24 }, R = s(() => ae(o.size) && X[o.size] || 16);
|
|
469
469
|
return (S, J) => (i(), p("button", {
|
|
470
470
|
class: n(c.value),
|
|
471
|
-
style:
|
|
471
|
+
style: U(f.value),
|
|
472
472
|
type: S.nativeType,
|
|
473
473
|
disabled: S.disabled || S.loading,
|
|
474
474
|
onClick: m
|
|
475
475
|
}, [
|
|
476
|
-
|
|
476
|
+
V.value ? (i(), p(ue, { key: 0 }, [
|
|
477
477
|
S.loading ? (i(), ee(a(ot), {
|
|
478
478
|
key: 0,
|
|
479
479
|
size: R.value,
|
|
@@ -481,8 +481,8 @@ const Et = {
|
|
|
481
481
|
}, null, 8, ["size"])) : (i(), ee(a(Le), {
|
|
482
482
|
key: 1,
|
|
483
483
|
icon: S.icon,
|
|
484
|
-
size:
|
|
485
|
-
style:
|
|
484
|
+
size: M.value,
|
|
485
|
+
style: U(b.value)
|
|
486
486
|
}, null, 8, ["icon", "size", "style"]))
|
|
487
487
|
], 64)) : (i(), p(ue, { key: 1 }, [
|
|
488
488
|
S.loadingPlaceholder ? (i(), p("span", {
|
|
@@ -506,7 +506,7 @@ const Et = {
|
|
|
506
506
|
size: R.value,
|
|
507
507
|
"stroke-width": 3
|
|
508
508
|
}, null, 8, ["size"])
|
|
509
|
-
], 2)) :
|
|
509
|
+
], 2)) : j("", !0)
|
|
510
510
|
]),
|
|
511
511
|
_: 1
|
|
512
512
|
})),
|
|
@@ -514,37 +514,37 @@ const Et = {
|
|
|
514
514
|
key: 2,
|
|
515
515
|
class: n(a(l).e("prefix"))
|
|
516
516
|
}, [
|
|
517
|
-
|
|
517
|
+
H(S.$slots, "prefix", {}, () => [
|
|
518
518
|
S.prefixIcon ? (i(), ee(a(Le), {
|
|
519
519
|
key: 0,
|
|
520
520
|
icon: S.prefixIcon,
|
|
521
521
|
size: C.value,
|
|
522
|
-
style:
|
|
523
|
-
}, null, 8, ["icon", "size", "style"])) :
|
|
522
|
+
style: U(L.value)
|
|
523
|
+
}, null, 8, ["icon", "size", "style"])) : j("", !0)
|
|
524
524
|
])
|
|
525
|
-
], 2)) :
|
|
525
|
+
], 2)) : j("", !0),
|
|
526
526
|
v("span", {
|
|
527
527
|
class: n(a(l).e("content"))
|
|
528
528
|
}, [
|
|
529
|
-
|
|
529
|
+
H(S.$slots, "default")
|
|
530
530
|
], 2),
|
|
531
531
|
k.value ? (i(), p("span", {
|
|
532
532
|
key: 3,
|
|
533
533
|
class: n(a(l).e("suffix"))
|
|
534
534
|
}, [
|
|
535
|
-
|
|
535
|
+
H(S.$slots, "suffix", {}, () => [
|
|
536
536
|
S.suffixIcon ? (i(), ee(a(Le), {
|
|
537
537
|
key: 0,
|
|
538
538
|
icon: S.suffixIcon,
|
|
539
539
|
size: D.value,
|
|
540
|
-
style:
|
|
541
|
-
}, null, 8, ["icon", "size", "style"])) :
|
|
540
|
+
style: U(P.value)
|
|
541
|
+
}, null, 8, ["icon", "size", "style"])) : j("", !0)
|
|
542
542
|
])
|
|
543
|
-
], 2)) :
|
|
543
|
+
], 2)) : j("", !0)
|
|
544
544
|
], 64))
|
|
545
545
|
], 14, jt));
|
|
546
546
|
}
|
|
547
|
-
}), rt = re(Oe),
|
|
547
|
+
}), rt = re(Oe), _t = {
|
|
548
548
|
/**
|
|
549
549
|
* 组件默认值配置
|
|
550
550
|
*
|
|
@@ -582,17 +582,17 @@ const Et = {
|
|
|
582
582
|
type: String,
|
|
583
583
|
default: "dark"
|
|
584
584
|
}
|
|
585
|
-
},
|
|
585
|
+
}, Ht = /* @__PURE__ */ oe({
|
|
586
586
|
name: `${se}ConfigProvider`,
|
|
587
587
|
__name: "config-provider",
|
|
588
|
-
props:
|
|
588
|
+
props: _t,
|
|
589
589
|
setup(u) {
|
|
590
590
|
const t = u;
|
|
591
591
|
return Be(Vt, t.defaults), Be(At, fe(t, "theme")), zt(() => {
|
|
592
592
|
typeof document < "u" && document.documentElement.setAttribute("data-theme", t.theme);
|
|
593
|
-
}), (o, e) =>
|
|
593
|
+
}), (o, e) => H(o.$slots, "default");
|
|
594
594
|
}
|
|
595
|
-
}), nr = re(
|
|
595
|
+
}), nr = re(Ht), Wt = {
|
|
596
596
|
/**
|
|
597
597
|
* 绑定值 (v-model)
|
|
598
598
|
* 支持字符串或数字,type="number" 时返回 number 类型
|
|
@@ -767,7 +767,7 @@ const Et = {
|
|
|
767
767
|
type: Number,
|
|
768
768
|
default: 150
|
|
769
769
|
}
|
|
770
|
-
},
|
|
770
|
+
}, qt = {
|
|
771
771
|
/**
|
|
772
772
|
* 值变化时触发 (v-model 绑定)
|
|
773
773
|
* @param value - 新的输入值
|
|
@@ -802,7 +802,7 @@ const Et = {
|
|
|
802
802
|
* @example `<CpInput clearable @clear="onClear" />`
|
|
803
803
|
*/
|
|
804
804
|
clear: () => !0
|
|
805
|
-
},
|
|
805
|
+
}, Ut = ["type", "value", "placeholder", "disabled", "readonly", "maxlength"], Yt = {
|
|
806
806
|
key: 0,
|
|
807
807
|
viewBox: "0 0 24 24",
|
|
808
808
|
fill: "currentColor"
|
|
@@ -814,9 +814,9 @@ const Et = {
|
|
|
814
814
|
name: `${se}Input`,
|
|
815
815
|
__name: "input",
|
|
816
816
|
props: Wt,
|
|
817
|
-
emits:
|
|
817
|
+
emits: qt,
|
|
818
818
|
setup(u, { expose: t, emit: o }) {
|
|
819
|
-
const e = u, r = o, l = xe(), d = ne("input"), c = { sm: 28, md: 36, lg: 44 }, f = W(), m = W(!1), g = W(!1), k = W(!1),
|
|
819
|
+
const e = u, r = o, l = xe(), d = ne("input"), c = { sm: 28, md: 36, lg: 44 }, f = W(), m = W(!1), g = W(!1), k = W(!1), V = s(() => e.type === "password" && e.showPassword ? k.value ? "text" : "password" : e.type), x = s(() => [
|
|
820
820
|
d.b(),
|
|
821
821
|
ae(e.size) && d.m(e.size),
|
|
822
822
|
d.m(e.variant),
|
|
@@ -831,7 +831,7 @@ const Et = {
|
|
|
831
831
|
]), T = s(() => {
|
|
832
832
|
const E = {};
|
|
833
833
|
return e.color && (E["--cp-input-custom-color"] = e.color, E["--cp-input-custom-color-light"] = `${e.color}33`), e.inactiveBorderColor && (E["--cp-input-inactive-border-color"] = e.inactiveBorderColor), e.placeholderColor && (E["--cp-input-placeholder-color"] = e.placeholderColor), e.textColor && (E["--cp-input-text-color"] = e.textColor), ae(e.size) || (E["--cp-input-height"] = Se(e.size, c)), e.clearDuration !== 150 && (E["--cp-input-clear-duration"] = `${e.clearDuration}ms`), E;
|
|
834
|
-
}), I = s(() => e.clearable && !e.disabled && !e.readonly && !!e.modelValue), b = s(() => e.type === "password" && e.showPassword && !e.disabled), L = s(() => String(e.modelValue || "").length),
|
|
834
|
+
}), I = s(() => e.clearable && !e.disabled && !e.readonly && !!e.modelValue), b = s(() => e.type === "password" && e.showPassword && !e.disabled), L = s(() => String(e.modelValue || "").length), P = s(() => e.showWordLimit && e.maxlength !== void 0), N = s(() => !!l.prefix), M = (E) => {
|
|
835
835
|
const Y = E.target, w = e.type === "number" ? Number(Y.value) : Y.value;
|
|
836
836
|
r("update:modelValue", w), r("input", w, E);
|
|
837
837
|
}, C = (E) => {
|
|
@@ -865,30 +865,30 @@ const Et = {
|
|
|
865
865
|
var E;
|
|
866
866
|
e.autofocus && ((E = f.value) == null || E.focus());
|
|
867
867
|
}), (E, Y) => (i(), p("div", {
|
|
868
|
-
class: n(
|
|
869
|
-
style:
|
|
868
|
+
class: n(x.value),
|
|
869
|
+
style: U(T.value)
|
|
870
870
|
}, [
|
|
871
871
|
N.value ? (i(), p("span", {
|
|
872
872
|
key: 0,
|
|
873
873
|
class: n(a(d).e("prefix"))
|
|
874
874
|
}, [
|
|
875
|
-
|
|
876
|
-
], 2)) :
|
|
875
|
+
H(E.$slots, "prefix")
|
|
876
|
+
], 2)) : j("", !0),
|
|
877
877
|
v("input", {
|
|
878
878
|
ref_key: "inputRef",
|
|
879
879
|
ref: f,
|
|
880
880
|
class: n(a(d).e("inner")),
|
|
881
|
-
type:
|
|
881
|
+
type: V.value,
|
|
882
882
|
value: E.modelValue,
|
|
883
883
|
placeholder: E.placeholder,
|
|
884
884
|
disabled: E.disabled,
|
|
885
885
|
readonly: E.readonly,
|
|
886
886
|
maxlength: E.maxlength,
|
|
887
|
-
onInput:
|
|
887
|
+
onInput: M,
|
|
888
888
|
onChange: C,
|
|
889
889
|
onFocus: D,
|
|
890
890
|
onBlur: X
|
|
891
|
-
}, null, 42,
|
|
891
|
+
}, null, 42, Ut),
|
|
892
892
|
I.value ? (i(), p("span", {
|
|
893
893
|
key: 1,
|
|
894
894
|
class: n(a(d).e("clear")),
|
|
@@ -900,7 +900,7 @@ const Et = {
|
|
|
900
900
|
}, [
|
|
901
901
|
v("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" })
|
|
902
902
|
], -1)
|
|
903
|
-
])], 2)) :
|
|
903
|
+
])], 2)) : j("", !0),
|
|
904
904
|
b.value ? (i(), p("span", {
|
|
905
905
|
key: 2,
|
|
906
906
|
class: n(a(d).e("password")),
|
|
@@ -911,17 +911,17 @@ const Et = {
|
|
|
911
911
|
])])) : (i(), p("svg", Xt, [...Y[2] || (Y[2] = [
|
|
912
912
|
v("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z" }, null, -1)
|
|
913
913
|
])]))
|
|
914
|
-
], 2)) :
|
|
914
|
+
], 2)) : j("", !0),
|
|
915
915
|
a(l).suffix ? (i(), p("span", {
|
|
916
916
|
key: 3,
|
|
917
917
|
class: n(a(d).e("suffix"))
|
|
918
918
|
}, [
|
|
919
|
-
|
|
920
|
-
], 2)) :
|
|
921
|
-
|
|
919
|
+
H(E.$slots, "suffix")
|
|
920
|
+
], 2)) : j("", !0),
|
|
921
|
+
P.value ? (i(), p("span", {
|
|
922
922
|
key: 4,
|
|
923
923
|
class: n(a(d).e("count"))
|
|
924
|
-
}, G(L.value) + " / " + G(E.maxlength), 3)) :
|
|
924
|
+
}, G(L.value) + " / " + G(E.maxlength), 3)) : j("", !0)
|
|
925
925
|
], 6));
|
|
926
926
|
}
|
|
927
927
|
}), ir = re(Gt), Jt = {
|
|
@@ -1012,7 +1012,7 @@ const Et = {
|
|
|
1012
1012
|
}), k = s(() => {
|
|
1013
1013
|
var C;
|
|
1014
1014
|
return ((C = e.modelValue) == null ? void 0 : C.length) || 0;
|
|
1015
|
-
}),
|
|
1015
|
+
}), V = s(() => e.showWordLimit && e.maxlength !== void 0), x = s(() => {
|
|
1016
1016
|
const C = {};
|
|
1017
1017
|
return typeof e.autosize == "object" && (e.autosize.minRows && (C.minHeight = `${e.autosize.minRows * 1.5}em`), e.autosize.maxRows && (C.maxHeight = `${e.autosize.maxRows * 1.5}em`)), C;
|
|
1018
1018
|
}), T = () => {
|
|
@@ -1033,7 +1033,7 @@ const Et = {
|
|
|
1033
1033
|
r("change", D.value);
|
|
1034
1034
|
}, L = (C) => {
|
|
1035
1035
|
f.value = !0, r("focus", C);
|
|
1036
|
-
},
|
|
1036
|
+
}, P = (C) => {
|
|
1037
1037
|
f.value = !1, r("blur", C);
|
|
1038
1038
|
};
|
|
1039
1039
|
return t({
|
|
@@ -1048,7 +1048,7 @@ const Et = {
|
|
|
1048
1048
|
textareaRef: c
|
|
1049
1049
|
}), (C, D) => (i(), p("div", {
|
|
1050
1050
|
class: n(m.value),
|
|
1051
|
-
style:
|
|
1051
|
+
style: U(g.value)
|
|
1052
1052
|
}, [
|
|
1053
1053
|
v("textarea", {
|
|
1054
1054
|
ref_key: "textareaRef",
|
|
@@ -1060,16 +1060,16 @@ const Et = {
|
|
|
1060
1060
|
readonly: C.readonly,
|
|
1061
1061
|
rows: C.rows,
|
|
1062
1062
|
maxlength: C.maxlength,
|
|
1063
|
-
style:
|
|
1063
|
+
style: U(x.value),
|
|
1064
1064
|
onInput: I,
|
|
1065
1065
|
onChange: b,
|
|
1066
1066
|
onFocus: L,
|
|
1067
|
-
onBlur:
|
|
1067
|
+
onBlur: P
|
|
1068
1068
|
}, null, 46, Qt),
|
|
1069
|
-
|
|
1069
|
+
V.value ? (i(), p("span", {
|
|
1070
1070
|
key: 0,
|
|
1071
1071
|
class: n(a(l).e("count"))
|
|
1072
|
-
}, G(k.value) + " / " + G(C.maxlength), 3)) :
|
|
1072
|
+
}, G(k.value) + " / " + G(C.maxlength), 3)) : j("", !0)
|
|
1073
1073
|
], 6));
|
|
1074
1074
|
}
|
|
1075
1075
|
}), ur = re(eo), to = {
|
|
@@ -1154,21 +1154,21 @@ const Et = {
|
|
|
1154
1154
|
l.is("custom-color", !!e.color),
|
|
1155
1155
|
l.is("without-controls", !e.controls),
|
|
1156
1156
|
l.is("custom-size", !ae(e.size))
|
|
1157
|
-
]),
|
|
1157
|
+
]), V = s(() => {
|
|
1158
1158
|
const S = {};
|
|
1159
1159
|
return e.color && (S["--cp-input-number-custom-color"] = e.color, S["--cp-input-number-custom-color-light"] = `${e.color}33`), ae(e.size) || (S["--cp-input-number-height"] = Se(e.size, d)), S;
|
|
1160
|
-
}),
|
|
1160
|
+
}), x = s(() => e.modelValue <= e.min), T = s(() => e.modelValue >= e.max), I = (S) => e.precision === void 0 ? S : parseFloat(S.toFixed(e.precision)), b = (S) => {
|
|
1161
1161
|
const J = e.modelValue;
|
|
1162
1162
|
let ie = S;
|
|
1163
1163
|
ie < e.min && (ie = e.min), ie > e.max && (ie = e.max), ie = I(ie), J !== ie && (r("update:modelValue", ie), r("change", ie, J));
|
|
1164
1164
|
}, L = () => {
|
|
1165
1165
|
e.disabled || e.readonly || T.value || b(e.modelValue + e.step);
|
|
1166
|
-
},
|
|
1167
|
-
e.disabled || e.readonly ||
|
|
1166
|
+
}, P = () => {
|
|
1167
|
+
e.disabled || e.readonly || x.value || b(e.modelValue - e.step);
|
|
1168
1168
|
}, N = (S) => {
|
|
1169
1169
|
const J = S.target;
|
|
1170
1170
|
m.value = J.value;
|
|
1171
|
-
},
|
|
1171
|
+
}, M = (S) => {
|
|
1172
1172
|
const ie = S.target.value;
|
|
1173
1173
|
if (m.value = null, ie === "" || ie === "-") {
|
|
1174
1174
|
b(e.min > -1 / 0 ? e.min : 0);
|
|
@@ -1193,14 +1193,14 @@ const Et = {
|
|
|
1193
1193
|
inputRef: c
|
|
1194
1194
|
}), (S, J) => (i(), p("div", {
|
|
1195
1195
|
class: n(k.value),
|
|
1196
|
-
style:
|
|
1196
|
+
style: U(V.value)
|
|
1197
1197
|
}, [
|
|
1198
1198
|
S.controls && S.controlsPosition === "both" ? (i(), p("button", {
|
|
1199
1199
|
key: 0,
|
|
1200
1200
|
type: "button",
|
|
1201
|
-
class: n([a(l).e("decrease"), { "is-disabled":
|
|
1202
|
-
disabled:
|
|
1203
|
-
onClick:
|
|
1201
|
+
class: n([a(l).e("decrease"), { "is-disabled": x.value || S.disabled }]),
|
|
1202
|
+
disabled: x.value || S.disabled,
|
|
1203
|
+
onClick: P
|
|
1204
1204
|
}, [...J[0] || (J[0] = [
|
|
1205
1205
|
v("svg", {
|
|
1206
1206
|
viewBox: "0 0 24 24",
|
|
@@ -1208,7 +1208,7 @@ const Et = {
|
|
|
1208
1208
|
}, [
|
|
1209
1209
|
v("path", { d: "M19 13H5v-2h14v2z" })
|
|
1210
1210
|
], -1)
|
|
1211
|
-
])], 10, lo)) :
|
|
1211
|
+
])], 10, lo)) : j("", !0),
|
|
1212
1212
|
v("input", {
|
|
1213
1213
|
ref_key: "inputRef",
|
|
1214
1214
|
ref: c,
|
|
@@ -1220,7 +1220,7 @@ const Et = {
|
|
|
1220
1220
|
disabled: S.disabled,
|
|
1221
1221
|
readonly: S.readonly,
|
|
1222
1222
|
onInput: N,
|
|
1223
|
-
onChange:
|
|
1223
|
+
onChange: M,
|
|
1224
1224
|
onFocus: C,
|
|
1225
1225
|
onBlur: D
|
|
1226
1226
|
}, null, 42, ao),
|
|
@@ -1237,7 +1237,7 @@ const Et = {
|
|
|
1237
1237
|
}, [
|
|
1238
1238
|
v("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" })
|
|
1239
1239
|
], -1)
|
|
1240
|
-
])], 10, ro)) :
|
|
1240
|
+
])], 10, ro)) : j("", !0),
|
|
1241
1241
|
S.controls && S.controlsPosition === "right" ? (i(), p("div", {
|
|
1242
1242
|
key: 2,
|
|
1243
1243
|
class: n(a(l).e("controls"))
|
|
@@ -1257,9 +1257,9 @@ const Et = {
|
|
|
1257
1257
|
])], 10, so),
|
|
1258
1258
|
v("button", {
|
|
1259
1259
|
type: "button",
|
|
1260
|
-
class: n([a(l).e("decrease"), { "is-disabled":
|
|
1261
|
-
disabled:
|
|
1262
|
-
onClick:
|
|
1260
|
+
class: n([a(l).e("decrease"), { "is-disabled": x.value || S.disabled }]),
|
|
1261
|
+
disabled: x.value || S.disabled,
|
|
1262
|
+
onClick: P
|
|
1263
1263
|
}, [...J[3] || (J[3] = [
|
|
1264
1264
|
v("svg", {
|
|
1265
1265
|
viewBox: "0 0 24 24",
|
|
@@ -1268,7 +1268,7 @@ const Et = {
|
|
|
1268
1268
|
v("path", { d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z" })
|
|
1269
1269
|
], -1)
|
|
1270
1270
|
])], 10, no)
|
|
1271
|
-
], 2)) :
|
|
1271
|
+
], 2)) : j("", !0)
|
|
1272
1272
|
], 6));
|
|
1273
1273
|
}
|
|
1274
1274
|
}), cr = re(io), uo = {
|
|
@@ -1423,7 +1423,7 @@ const Et = {
|
|
|
1423
1423
|
props: uo,
|
|
1424
1424
|
emits: co,
|
|
1425
1425
|
setup(u, { expose: t, emit: o }) {
|
|
1426
|
-
const e = u, r = o, l = ne("slider"), d = { sm: 4, md: 6, lg: 8 }, c = W(), f = W(!1), m = W(null), g = W(!1), k = W(!1),
|
|
1426
|
+
const e = u, r = o, l = ne("slider"), d = { sm: 4, md: 6, lg: 8 }, c = W(), f = W(!1), m = W(null), g = W(!1), k = W(!1), V = W(null), x = W(null), T = s(() => [
|
|
1427
1427
|
l.b(),
|
|
1428
1428
|
ae(e.size) && l.m(e.size),
|
|
1429
1429
|
l.m(`shape-${e.shape}`),
|
|
@@ -1434,121 +1434,121 @@ const Et = {
|
|
|
1434
1434
|
l.is("custom-color", !!e.color),
|
|
1435
1435
|
l.is("custom-size", !ae(e.size))
|
|
1436
1436
|
]), I = s(() => {
|
|
1437
|
-
const h = {},
|
|
1438
|
-
h["--cp-slider-track-height"] = `${
|
|
1439
|
-
const Q = Math.max(2, Math.floor(
|
|
1437
|
+
const h = {}, z = ae(e.size) ? e.size : "md", F = ae(e.size) ? d[z] : parseInt(Se(e.size, d)), B = ae(e.size) ? z === "sm" ? 14 : z === "lg" ? 22 : 18 : Math.max(F + 8, F * 2.5);
|
|
1438
|
+
h["--cp-slider-track-height"] = `${F}px`, h["--cp-slider-thumb-size"] = `${B}px`;
|
|
1439
|
+
const Q = Math.max(2, Math.floor(B / 10));
|
|
1440
1440
|
h["--cp-slider-thumb-border-width"] = `${Q}px`;
|
|
1441
|
-
const le = Math.max(2, Math.floor(
|
|
1441
|
+
const le = Math.max(2, Math.floor(B / 4.5));
|
|
1442
1442
|
h["--cp-slider-inner-dot-size"] = `${le}px`;
|
|
1443
|
-
const
|
|
1444
|
-
h["--cp-slider-inner-clip-size"] = `${
|
|
1445
|
-
const
|
|
1446
|
-
return h["--cp-slider-clip-size"] = `${
|
|
1443
|
+
const K = Math.max(1, Math.floor(le / 3));
|
|
1444
|
+
h["--cp-slider-inner-clip-size"] = `${K}px`;
|
|
1445
|
+
const _ = ae(e.size) ? z === "sm" ? 3 : z === "lg" ? 5 : 4 : Math.max(2, Math.floor(F * 0.6));
|
|
1446
|
+
return h["--cp-slider-clip-size"] = `${_}px`, e.color && (h["--cp-slider-custom-color"] = e.color, h["--cp-slider-custom-color-light"] = `color-mix(in srgb, ${e.color}, transparent 60%)`), e.vertical && e.height && (h.height = e.height), h;
|
|
1447
1447
|
}), b = s(() => e.range && Array.isArray(e.modelValue) ? e.modelValue : [e.min, typeof e.modelValue == "number" ? e.modelValue : e.min]), L = s(() => {
|
|
1448
1448
|
if (f.value) {
|
|
1449
|
-
const h =
|
|
1450
|
-
return [h,
|
|
1449
|
+
const h = V.value ?? b.value[0], z = x.value ?? b.value[1];
|
|
1450
|
+
return [h, z];
|
|
1451
1451
|
}
|
|
1452
1452
|
return b.value;
|
|
1453
|
-
}),
|
|
1454
|
-
const h = Number(e.min),
|
|
1455
|
-
return
|
|
1453
|
+
}), P = s(() => {
|
|
1454
|
+
const h = Number(e.min), F = Number(e.max) - h;
|
|
1455
|
+
return F === 0 ? 0 : (L.value[0] - h) / F * 100;
|
|
1456
1456
|
}), N = s(() => {
|
|
1457
|
-
const h = Number(e.min),
|
|
1458
|
-
return
|
|
1459
|
-
}),
|
|
1460
|
-
const h = Number(e.min),
|
|
1461
|
-
if (!e.showStops ||
|
|
1462
|
-
const
|
|
1463
|
-
for (let le = 1; le <
|
|
1464
|
-
const
|
|
1465
|
-
Q.push(
|
|
1457
|
+
const h = Number(e.min), F = Number(e.max) - h;
|
|
1458
|
+
return F === 0 ? 0 : (L.value[1] - h) / F * 100;
|
|
1459
|
+
}), M = s(() => e.vertical ? e.range ? { bottom: `${P.value}%`, height: `${N.value - P.value}%` } : { bottom: "0%", height: `${N.value}%` } : e.range ? { left: `${P.value}%`, width: `${N.value - P.value}%` } : { left: "0%", width: `${N.value}%` }), C = s(() => e.vertical ? { bottom: `${P.value}%` } : { left: `${P.value}%` }), D = s(() => e.vertical ? { bottom: `${N.value}%` } : { left: `${N.value}%` }), X = s(() => {
|
|
1460
|
+
const h = Number(e.min), z = Number(e.max), F = Number(e.step);
|
|
1461
|
+
if (!e.showStops || F <= 0) return [];
|
|
1462
|
+
const B = Math.floor((z - h) / F), Q = [];
|
|
1463
|
+
for (let le = 1; le < B; le++) {
|
|
1464
|
+
const _ = (h + le * F - h) / (z - h) * 100;
|
|
1465
|
+
Q.push(_);
|
|
1466
1466
|
}
|
|
1467
1467
|
return Q;
|
|
1468
|
-
}), R = s(() => X.value.filter((
|
|
1469
|
-
const h = Number(e.min),
|
|
1470
|
-
return e.marks ? Object.entries(e.marks).map(([
|
|
1471
|
-
const Q = Number(
|
|
1472
|
-
return { value: Q, percent: le, label:
|
|
1468
|
+
}), R = s(() => X.value.filter((z) => e.range && z < P.value - 0.01 || z > N.value + 0.01)), S = s(() => {
|
|
1469
|
+
const h = Number(e.min), z = Number(e.max);
|
|
1470
|
+
return e.marks ? Object.entries(e.marks).map(([F, B]) => {
|
|
1471
|
+
const Q = Number(F), le = (Q - h) / (z - h) * 100, K = typeof B == "string" ? B : B.label || "", _ = typeof B == "object" ? B.style : void 0;
|
|
1472
|
+
return { value: Q, percent: le, label: K, style: _ };
|
|
1473
1473
|
}) : [];
|
|
1474
|
-
}), J = (h) => e.formatTooltip ? e.formatTooltip(h) : String(h), ie = (h,
|
|
1474
|
+
}), J = (h) => e.formatTooltip ? e.formatTooltip(h) : String(h), ie = (h, z) => {
|
|
1475
1475
|
if (!c.value) return Number(e.min);
|
|
1476
|
-
const
|
|
1477
|
-
let
|
|
1478
|
-
e.vertical ?
|
|
1479
|
-
const Q = Number(e.min), le = Number(e.max),
|
|
1480
|
-
let
|
|
1481
|
-
return
|
|
1482
|
-
}, E = (h,
|
|
1476
|
+
const F = c.value.getBoundingClientRect();
|
|
1477
|
+
let B;
|
|
1478
|
+
e.vertical ? B = (F.bottom - z) / F.height : B = (h - F.left) / F.width, B = Math.max(0, Math.min(1, B));
|
|
1479
|
+
const Q = Number(e.min), le = Number(e.max), K = Number(e.step);
|
|
1480
|
+
let _ = Q + B * (le - Q);
|
|
1481
|
+
return K > 0 && (_ = Math.round(_ / K) * K), _ = Math.max(Q, Math.min(le, _)), _;
|
|
1482
|
+
}, E = (h, z = !1) => {
|
|
1483
1483
|
if (e.disabled) return;
|
|
1484
|
-
let
|
|
1484
|
+
let F;
|
|
1485
1485
|
if (e.range) {
|
|
1486
|
-
const [
|
|
1487
|
-
m.value === "start" ?
|
|
1486
|
+
const [B, Q] = b.value;
|
|
1487
|
+
m.value === "start" ? F = [Math.min(h, Q), Q] : F = [B, Math.max(h, B)];
|
|
1488
1488
|
} else
|
|
1489
|
-
|
|
1490
|
-
r("update:modelValue",
|
|
1489
|
+
F = h;
|
|
1490
|
+
r("update:modelValue", F), r("input", F), z && r("change", F);
|
|
1491
1491
|
}, Y = (h) => {
|
|
1492
1492
|
if (!e.range) {
|
|
1493
1493
|
m.value = "end";
|
|
1494
1494
|
return;
|
|
1495
1495
|
}
|
|
1496
|
-
const [
|
|
1497
|
-
m.value =
|
|
1496
|
+
const [z, F] = b.value, B = Math.abs(h - z), Q = Math.abs(h - F);
|
|
1497
|
+
m.value = B <= Q ? "start" : "end";
|
|
1498
1498
|
}, w = (h) => {
|
|
1499
1499
|
if (e.disabled) return;
|
|
1500
|
-
const
|
|
1501
|
-
Y(
|
|
1502
|
-
},
|
|
1503
|
-
e.disabled || (h.preventDefault(), h.stopPropagation(), m.value =
|
|
1500
|
+
const z = ie(h.clientX, h.clientY);
|
|
1501
|
+
Y(z), E(z, !0);
|
|
1502
|
+
}, q = (h, z) => {
|
|
1503
|
+
e.disabled || (h.preventDefault(), h.stopPropagation(), m.value = z, f.value = !0, V.value = b.value[0], x.value = b.value[1], z === "start" ? g.value = !0 : k.value = !0, document.addEventListener("mousemove", te), document.addEventListener("mouseup", A));
|
|
1504
1504
|
}, te = (h) => {
|
|
1505
1505
|
if (!f.value || e.disabled) return;
|
|
1506
|
-
const
|
|
1507
|
-
e.range ? m.value === "start" ?
|
|
1506
|
+
const z = ie(h.clientX, h.clientY);
|
|
1507
|
+
e.range ? m.value === "start" ? V.value = Math.min(z, x.value ?? b.value[1]) : x.value = Math.max(z, V.value ?? b.value[0]) : x.value = z, E(z);
|
|
1508
1508
|
}, A = () => {
|
|
1509
1509
|
if (f.value) {
|
|
1510
|
-
const h =
|
|
1511
|
-
r("update:modelValue",
|
|
1510
|
+
const h = V.value ?? b.value[0], z = x.value ?? b.value[1], F = e.range ? [h, z] : z;
|
|
1511
|
+
r("update:modelValue", F), r("input", F), r("change", F), f.value = !1, m.value = null, g.value = !1, k.value = !1, V.value = null, x.value = null;
|
|
1512
1512
|
}
|
|
1513
1513
|
document.removeEventListener("mousemove", te), document.removeEventListener("mouseup", A);
|
|
1514
|
-
}, $ = (h,
|
|
1514
|
+
}, $ = (h, z) => {
|
|
1515
1515
|
if (e.disabled) return;
|
|
1516
|
-
let
|
|
1516
|
+
let F = 0;
|
|
1517
1517
|
switch (h.key) {
|
|
1518
1518
|
case "ArrowLeft":
|
|
1519
1519
|
case "ArrowDown":
|
|
1520
|
-
|
|
1520
|
+
F = -e.step;
|
|
1521
1521
|
break;
|
|
1522
1522
|
case "ArrowRight":
|
|
1523
1523
|
case "ArrowUp":
|
|
1524
|
-
|
|
1524
|
+
F = e.step;
|
|
1525
1525
|
break;
|
|
1526
1526
|
case "Home":
|
|
1527
|
-
|
|
1527
|
+
F = e.min - (z === "start" ? b.value[0] : b.value[1]);
|
|
1528
1528
|
break;
|
|
1529
1529
|
case "End":
|
|
1530
|
-
|
|
1530
|
+
F = e.max - (z === "start" ? b.value[0] : b.value[1]);
|
|
1531
1531
|
break;
|
|
1532
1532
|
default:
|
|
1533
1533
|
return;
|
|
1534
1534
|
}
|
|
1535
|
-
h.preventDefault(), m.value =
|
|
1536
|
-
const
|
|
1537
|
-
E(
|
|
1535
|
+
h.preventDefault(), m.value = z;
|
|
1536
|
+
const B = z === "start" ? b.value[0] : b.value[1];
|
|
1537
|
+
E(B + F, !0);
|
|
1538
1538
|
}, y = (h) => {
|
|
1539
1539
|
!e.showTooltip || e.disabled || (h === "start" ? g.value = !0 : k.value = !0);
|
|
1540
|
-
},
|
|
1540
|
+
}, O = (h) => {
|
|
1541
1541
|
f.value || (h === "start" ? g.value = !1 : k.value = !1);
|
|
1542
1542
|
};
|
|
1543
1543
|
return Ve(() => {
|
|
1544
1544
|
document.removeEventListener("mousemove", te), document.removeEventListener("mouseup", A);
|
|
1545
1545
|
}), t({
|
|
1546
1546
|
sliderRef: c
|
|
1547
|
-
}), (h,
|
|
1547
|
+
}), (h, z) => (i(), p("div", {
|
|
1548
1548
|
ref_key: "sliderRef",
|
|
1549
1549
|
ref: c,
|
|
1550
1550
|
class: n(T.value),
|
|
1551
|
-
style:
|
|
1551
|
+
style: U(I.value)
|
|
1552
1552
|
}, [
|
|
1553
1553
|
v("div", {
|
|
1554
1554
|
class: n(a(l).e("runway")),
|
|
@@ -1556,59 +1556,59 @@ const Et = {
|
|
|
1556
1556
|
}, [
|
|
1557
1557
|
v("div", {
|
|
1558
1558
|
class: n(a(l).e("bar")),
|
|
1559
|
-
style:
|
|
1559
|
+
style: U(M.value)
|
|
1560
1560
|
}, null, 6)
|
|
1561
1561
|
], 2),
|
|
1562
|
-
(i(!0), p(ue, null, ke(R.value, (
|
|
1563
|
-
key:
|
|
1562
|
+
(i(!0), p(ue, null, ke(R.value, (F, B) => (i(), p("div", {
|
|
1563
|
+
key: B,
|
|
1564
1564
|
class: n(a(l).e("stop")),
|
|
1565
|
-
style:
|
|
1565
|
+
style: U(h.vertical ? { bottom: `${F}%` } : { left: `${F}%` })
|
|
1566
1566
|
}, null, 6))), 128)),
|
|
1567
1567
|
h.marks ? (i(), p("div", {
|
|
1568
1568
|
key: 0,
|
|
1569
1569
|
class: n(a(l).e("marks"))
|
|
1570
1570
|
}, [
|
|
1571
|
-
(i(!0), p(ue, null, ke(S.value, (
|
|
1572
|
-
key:
|
|
1571
|
+
(i(!0), p(ue, null, ke(S.value, (F) => (i(), p("div", {
|
|
1572
|
+
key: F.value,
|
|
1573
1573
|
class: n(a(l).e("mark")),
|
|
1574
|
-
style:
|
|
1575
|
-
h.vertical ? { bottom: `${
|
|
1576
|
-
|
|
1574
|
+
style: U([
|
|
1575
|
+
h.vertical ? { bottom: `${F.percent}%` } : { left: `${F.percent}%` },
|
|
1576
|
+
F.style
|
|
1577
1577
|
])
|
|
1578
1578
|
}, [
|
|
1579
1579
|
v("span", {
|
|
1580
1580
|
class: n(a(l).e("mark-text"))
|
|
1581
|
-
}, G(
|
|
1581
|
+
}, G(F.label), 3)
|
|
1582
1582
|
], 6))), 128))
|
|
1583
|
-
], 2)) :
|
|
1583
|
+
], 2)) : j("", !0),
|
|
1584
1584
|
h.range ? (i(), p("div", {
|
|
1585
1585
|
key: 1,
|
|
1586
1586
|
class: n([a(l).e("thumb"), a(l).is("active", m.value === "start")]),
|
|
1587
|
-
style:
|
|
1587
|
+
style: U(C.value),
|
|
1588
1588
|
tabindex: "0",
|
|
1589
|
-
onMousedown:
|
|
1590
|
-
onMouseenter:
|
|
1591
|
-
onMouseleave:
|
|
1592
|
-
onKeydown:
|
|
1589
|
+
onMousedown: z[0] || (z[0] = (F) => q(F, "start")),
|
|
1590
|
+
onMouseenter: z[1] || (z[1] = (F) => y("start")),
|
|
1591
|
+
onMouseleave: z[2] || (z[2] = (F) => O("start")),
|
|
1592
|
+
onKeydown: z[3] || (z[3] = (F) => $(F, "start"))
|
|
1593
1593
|
}, [
|
|
1594
1594
|
h.showTooltip && g.value ? (i(), p("div", {
|
|
1595
1595
|
key: 0,
|
|
1596
1596
|
class: n(a(l).e("tooltip"))
|
|
1597
|
-
}, G(J(L.value[0])), 3)) :
|
|
1598
|
-
], 38)) :
|
|
1597
|
+
}, G(J(L.value[0])), 3)) : j("", !0)
|
|
1598
|
+
], 38)) : j("", !0),
|
|
1599
1599
|
v("div", {
|
|
1600
1600
|
class: n([a(l).e("thumb"), a(l).is("active", m.value === "end")]),
|
|
1601
|
-
style:
|
|
1601
|
+
style: U(D.value),
|
|
1602
1602
|
tabindex: "0",
|
|
1603
|
-
onMousedown:
|
|
1604
|
-
onMouseenter:
|
|
1605
|
-
onMouseleave:
|
|
1606
|
-
onKeydown:
|
|
1603
|
+
onMousedown: z[4] || (z[4] = (F) => q(F, "end")),
|
|
1604
|
+
onMouseenter: z[5] || (z[5] = (F) => y("end")),
|
|
1605
|
+
onMouseleave: z[6] || (z[6] = (F) => O("end")),
|
|
1606
|
+
onKeydown: z[7] || (z[7] = (F) => $(F, "end"))
|
|
1607
1607
|
}, [
|
|
1608
1608
|
h.showTooltip && k.value ? (i(), p("div", {
|
|
1609
1609
|
key: 0,
|
|
1610
1610
|
class: n(a(l).e("tooltip"))
|
|
1611
|
-
}, G(J(L.value[1])), 3)) :
|
|
1611
|
+
}, G(J(L.value[1])), 3)) : j("", !0)
|
|
1612
1612
|
], 38)
|
|
1613
1613
|
], 6));
|
|
1614
1614
|
}
|
|
@@ -1862,7 +1862,7 @@ const Et = {
|
|
|
1862
1862
|
}), g = s(() => ({
|
|
1863
1863
|
"--cp-progress-duration": Ne(t.duration)
|
|
1864
1864
|
})), k = s(() => {
|
|
1865
|
-
const R = t.width, S = f.value, J = (R - S) / 2, ie = 2 * Math.PI * J, E = R / 2, Y = t.type === "dashboard" ? 0.75 : 1, w = ie * Y,
|
|
1865
|
+
const R = t.width, S = f.value, J = (R - S) / 2, ie = 2 * Math.PI * J, E = R / 2, Y = t.type === "dashboard" ? 0.75 : 1, w = ie * Y, q = ie, te = w * (1 - l.value / 100), A = J - S - 4, $ = 2 * Math.PI * A, y = $ * Y, O = $ * (1 - Y), h = y;
|
|
1866
1866
|
return {
|
|
1867
1867
|
size: R,
|
|
1868
1868
|
stroke: S,
|
|
@@ -1870,23 +1870,23 @@ const Et = {
|
|
|
1870
1870
|
circumference: ie,
|
|
1871
1871
|
center: E,
|
|
1872
1872
|
dashLength: w,
|
|
1873
|
-
gapLength:
|
|
1873
|
+
gapLength: q,
|
|
1874
1874
|
offset: te,
|
|
1875
1875
|
innerRadius: Math.max(0, A),
|
|
1876
1876
|
// 防止负数
|
|
1877
1877
|
innerCircumference: $,
|
|
1878
1878
|
innerDashLength: y,
|
|
1879
|
-
innerGapLength:
|
|
1879
|
+
innerGapLength: O,
|
|
1880
1880
|
innerOffset: h
|
|
1881
1881
|
};
|
|
1882
|
-
}),
|
|
1882
|
+
}), V = s(() => {
|
|
1883
1883
|
const { dashLength: R, gapLength: S } = k.value;
|
|
1884
1884
|
return {
|
|
1885
1885
|
strokeDasharray: `${R} ${S}`,
|
|
1886
1886
|
strokeWidth: `${f.value - 2}`
|
|
1887
1887
|
// 轨道稍微细一点,更有层次感
|
|
1888
1888
|
};
|
|
1889
|
-
}),
|
|
1889
|
+
}), x = s(() => t.showInnerStripe !== void 0 ? t.showInnerStripe : t.type === "circle"), T = s(() => ({
|
|
1890
1890
|
strokeDasharray: "4 8",
|
|
1891
1891
|
strokeDashoffset: "0",
|
|
1892
1892
|
strokeWidth: "2",
|
|
@@ -1900,37 +1900,37 @@ const Et = {
|
|
|
1900
1900
|
if (Y <= 0 || t.percentage <= 0)
|
|
1901
1901
|
return `M ${R + S} ${R} L ${R + S + 0.01} ${R}`;
|
|
1902
1902
|
if (t.shape === "round") return "";
|
|
1903
|
-
const w = (pe) => pe * Math.PI / 180,
|
|
1903
|
+
const w = (pe) => pe * Math.PI / 180, q = S - J / 2, te = S + J / 2, A = 0, $ = Math.min(Y, 359.99), y = w(A), O = w($), h = R + te * Math.cos(y), z = R + te * Math.sin(y), F = R + te * Math.cos(O), B = R + te * Math.sin(O), Q = R + q * Math.cos(y), le = R + q * Math.sin(y), K = R + q * Math.cos(O), _ = R + q * Math.sin(O), ce = $ > 180 ? 1 : 0;
|
|
1904
1904
|
if (l.value >= 100 && t.type !== "dashboard") {
|
|
1905
|
-
const ye = w(180), be = R + te * Math.cos(ye), ze = R + te * Math.sin(ye), Z = R +
|
|
1905
|
+
const ye = w(180), be = R + te * Math.cos(ye), ze = R + te * Math.sin(ye), Z = R + q * Math.cos(ye), me = R + q * Math.sin(ye);
|
|
1906
1906
|
return [
|
|
1907
|
-
`M ${h} ${
|
|
1907
|
+
`M ${h} ${z}`,
|
|
1908
1908
|
`A ${te} ${te} 0 0 1 ${be} ${ze}`,
|
|
1909
|
-
`A ${te} ${te} 0 0 1 ${h} ${
|
|
1909
|
+
`A ${te} ${te} 0 0 1 ${h} ${z + 0.01}`,
|
|
1910
1910
|
`L ${Q} ${le + 0.01}`,
|
|
1911
|
-
`A ${
|
|
1912
|
-
`A ${
|
|
1911
|
+
`A ${q} ${q} 0 0 0 ${Z} ${me}`,
|
|
1912
|
+
`A ${q} ${q} 0 0 0 ${Q} ${le}`,
|
|
1913
1913
|
"Z"
|
|
1914
1914
|
].join(" ");
|
|
1915
1915
|
}
|
|
1916
1916
|
if (t.shape === "clip") {
|
|
1917
|
-
const pe = J / 2 / S * (180 / Math.PI), ye = w(A + pe), be = w($ - pe), ze = R +
|
|
1917
|
+
const pe = J / 2 / S * (180 / Math.PI), ye = w(A + pe), be = w($ - pe), ze = R + q * Math.cos(ye), Z = R + q * Math.sin(ye), me = R + q * Math.cos(be), Te = R + q * Math.sin(be);
|
|
1918
1918
|
return [
|
|
1919
|
-
`M ${h} ${
|
|
1920
|
-
`A ${te} ${te} 0 ${ce} 1 ${
|
|
1919
|
+
`M ${h} ${z}`,
|
|
1920
|
+
`A ${te} ${te} 0 ${ce} 1 ${F} ${B}`,
|
|
1921
1921
|
`L ${me} ${Te}`,
|
|
1922
|
-
`A ${
|
|
1922
|
+
`A ${q} ${q} 0 ${ce} 0 ${ze} ${Z}`,
|
|
1923
1923
|
"Z"
|
|
1924
1924
|
].join(" ");
|
|
1925
1925
|
} else
|
|
1926
1926
|
return [
|
|
1927
|
-
`M ${h} ${
|
|
1928
|
-
`A ${te} ${te} 0 ${ce} 1 ${
|
|
1929
|
-
`L ${
|
|
1930
|
-
`A ${
|
|
1927
|
+
`M ${h} ${z}`,
|
|
1928
|
+
`A ${te} ${te} 0 ${ce} 1 ${F} ${B}`,
|
|
1929
|
+
`L ${K} ${_}`,
|
|
1930
|
+
`A ${q} ${q} 0 ${ce} 0 ${Q} ${le}`,
|
|
1931
1931
|
"Z"
|
|
1932
1932
|
].join(" ");
|
|
1933
|
-
}), L = s(() => t.shape !== "round"),
|
|
1933
|
+
}), L = s(() => t.shape !== "round"), P = s(() => {
|
|
1934
1934
|
const R = t.type === "dashboard" ? "rotate(135deg)" : "rotate(-90deg)";
|
|
1935
1935
|
return {
|
|
1936
1936
|
width: `${t.width}px`,
|
|
@@ -1941,7 +1941,7 @@ const Et = {
|
|
|
1941
1941
|
if (t.type === "line") return;
|
|
1942
1942
|
const R = Math.round(t.width * 0.15);
|
|
1943
1943
|
return `${Math.max(10, Math.min(R, 20))}px`;
|
|
1944
|
-
}),
|
|
1944
|
+
}), M = s(() => t.format ? t.format(t.percentage) : t.steps ? `${t.percentage}/${t.max}` : `${Math.round(l.value)}%`), C = s(() => [
|
|
1945
1945
|
o.b(),
|
|
1946
1946
|
o.m(t.type),
|
|
1947
1947
|
ae(t.size, e) && o.m(t.size),
|
|
@@ -1970,7 +1970,7 @@ const Et = {
|
|
|
1970
1970
|
});
|
|
1971
1971
|
return (R, S) => (i(), p("div", {
|
|
1972
1972
|
class: n(C.value),
|
|
1973
|
-
style:
|
|
1973
|
+
style: U([
|
|
1974
1974
|
R.indeterminate ? g.value : void 0,
|
|
1975
1975
|
N.value ? { "--cp-progress-circle-font-size": N.value } : void 0
|
|
1976
1976
|
])
|
|
@@ -1982,7 +1982,7 @@ const Et = {
|
|
|
1982
1982
|
}, [
|
|
1983
1983
|
v("div", {
|
|
1984
1984
|
class: n([a(o).e("inner"), a(o).e("steps")]),
|
|
1985
|
-
style:
|
|
1985
|
+
style: U({ height: `${f.value}px`, gap: `${R.stepGap}px` })
|
|
1986
1986
|
}, [
|
|
1987
1987
|
(i(!0), p(ue, null, ke(X.value, (J) => (i(), p("div", {
|
|
1988
1988
|
key: J.index,
|
|
@@ -1991,7 +1991,7 @@ const Et = {
|
|
|
1991
1991
|
a(o).is("full", J.state === "full"),
|
|
1992
1992
|
a(o).is("current", J.state === "current")
|
|
1993
1993
|
]),
|
|
1994
|
-
style:
|
|
1994
|
+
style: U(J.color ? { "--cp-progress-color": J.color } : void 0)
|
|
1995
1995
|
}, null, 6))), 128))
|
|
1996
1996
|
], 6)
|
|
1997
1997
|
], 2),
|
|
@@ -1999,30 +1999,30 @@ const Et = {
|
|
|
1999
1999
|
key: 0,
|
|
2000
2000
|
class: n(a(o).e("text"))
|
|
2001
2001
|
}, [
|
|
2002
|
-
|
|
2003
|
-
de(G(
|
|
2002
|
+
H(R.$slots, "default", {}, () => [
|
|
2003
|
+
de(G(M.value), 1)
|
|
2004
2004
|
])
|
|
2005
|
-
], 2)) :
|
|
2005
|
+
], 2)) : j("", !0)
|
|
2006
2006
|
], 64)) : (i(), p(ue, { key: 1 }, [
|
|
2007
2007
|
v("div", {
|
|
2008
2008
|
class: n(a(o).e("outer"))
|
|
2009
2009
|
}, [
|
|
2010
2010
|
v("div", {
|
|
2011
2011
|
class: n(a(o).e("inner")),
|
|
2012
|
-
style:
|
|
2012
|
+
style: U({ height: `${f.value}px` })
|
|
2013
2013
|
}, [
|
|
2014
2014
|
v("div", {
|
|
2015
2015
|
class: n(a(o).e("bar")),
|
|
2016
|
-
style:
|
|
2016
|
+
style: U(m.value)
|
|
2017
2017
|
}, [
|
|
2018
2018
|
R.showText && R.textInside && !R.indeterminate ? (i(), p("span", {
|
|
2019
2019
|
key: 0,
|
|
2020
2020
|
class: n(a(o).e("innerText"))
|
|
2021
2021
|
}, [
|
|
2022
|
-
|
|
2023
|
-
de(G(
|
|
2022
|
+
H(R.$slots, "default", {}, () => [
|
|
2023
|
+
de(G(M.value), 1)
|
|
2024
2024
|
])
|
|
2025
|
-
], 2)) :
|
|
2025
|
+
], 2)) : j("", !0)
|
|
2026
2026
|
], 6)
|
|
2027
2027
|
], 6)
|
|
2028
2028
|
], 2),
|
|
@@ -2030,15 +2030,15 @@ const Et = {
|
|
|
2030
2030
|
key: 0,
|
|
2031
2031
|
class: n(a(o).e("text"))
|
|
2032
2032
|
}, [
|
|
2033
|
-
|
|
2034
|
-
de(G(
|
|
2033
|
+
H(R.$slots, "default", {}, () => [
|
|
2034
|
+
de(G(M.value), 1)
|
|
2035
2035
|
])
|
|
2036
|
-
], 2)) :
|
|
2036
|
+
], 2)) : j("", !0)
|
|
2037
2037
|
], 64))
|
|
2038
2038
|
], 64)) : (i(), p(ue, { key: 1 }, [
|
|
2039
2039
|
(i(), p("svg", {
|
|
2040
2040
|
class: n(a(o).e("circle")),
|
|
2041
|
-
style:
|
|
2041
|
+
style: U(P.value),
|
|
2042
2042
|
viewBox: `0 0 ${k.value.size} ${k.value.size}`
|
|
2043
2043
|
}, [
|
|
2044
2044
|
v("circle", {
|
|
@@ -2047,22 +2047,22 @@ const Et = {
|
|
|
2047
2047
|
cy: k.value.center,
|
|
2048
2048
|
r: k.value.radius,
|
|
2049
2049
|
fill: "none",
|
|
2050
|
-
style:
|
|
2050
|
+
style: U(V.value)
|
|
2051
2051
|
}, null, 14, yo),
|
|
2052
|
-
|
|
2052
|
+
x.value ? (i(), p("circle", {
|
|
2053
2053
|
key: 0,
|
|
2054
2054
|
class: n(a(o).e("inner-track")),
|
|
2055
2055
|
cx: k.value.center,
|
|
2056
2056
|
cy: k.value.center,
|
|
2057
2057
|
r: k.value.innerRadius,
|
|
2058
2058
|
fill: "none",
|
|
2059
|
-
style:
|
|
2060
|
-
}, null, 14, mo)) :
|
|
2059
|
+
style: U(T.value)
|
|
2060
|
+
}, null, 14, mo)) : j("", !0),
|
|
2061
2061
|
L.value ? (i(), p("path", {
|
|
2062
2062
|
key: 1,
|
|
2063
2063
|
class: n(a(o).e("path")),
|
|
2064
2064
|
d: b.value,
|
|
2065
|
-
style:
|
|
2065
|
+
style: U(I.value)
|
|
2066
2066
|
}, null, 14, go)) : (i(), p("circle", {
|
|
2067
2067
|
key: 2,
|
|
2068
2068
|
class: n(a(o).e("path")),
|
|
@@ -2072,7 +2072,7 @@ const Et = {
|
|
|
2072
2072
|
fill: "none",
|
|
2073
2073
|
"stroke-width": f.value,
|
|
2074
2074
|
"stroke-linecap": "round",
|
|
2075
|
-
style:
|
|
2075
|
+
style: U({
|
|
2076
2076
|
...I.value,
|
|
2077
2077
|
strokeDasharray: `${k.value.dashLength} ${k.value.gapLength}`,
|
|
2078
2078
|
strokeDashoffset: k.value.offset
|
|
@@ -2083,10 +2083,10 @@ const Et = {
|
|
|
2083
2083
|
key: 0,
|
|
2084
2084
|
class: n(a(o).e("text"))
|
|
2085
2085
|
}, [
|
|
2086
|
-
|
|
2087
|
-
de(G(
|
|
2086
|
+
H(R.$slots, "default", {}, () => [
|
|
2087
|
+
de(G(M.value), 1)
|
|
2088
2088
|
])
|
|
2089
|
-
], 2)) :
|
|
2089
|
+
], 2)) : j("", !0)
|
|
2090
2090
|
], 64))
|
|
2091
2091
|
], 6));
|
|
2092
2092
|
}
|
|
@@ -2247,10 +2247,10 @@ const Et = {
|
|
|
2247
2247
|
warning: "var(--cp-color-warning)",
|
|
2248
2248
|
error: "var(--cp-color-error)",
|
|
2249
2249
|
info: "var(--cp-color-info)"
|
|
2250
|
-
},
|
|
2250
|
+
}, V = s(() => {
|
|
2251
2251
|
const T = {};
|
|
2252
2252
|
return e.color ? (T["--cp-switch-active-color"] = e.color, T["--cp-switch-active-color-light"] = `${e.color}40`) : e.type && k[e.type] && (T["--cp-switch-active-color"] = k[e.type], T["--cp-switch-active-color-light"] = `var(--cp-color-${e.type}-light)`), e.inactiveColor && (T["--cp-switch-inactive-color"] = e.inactiveColor), e.width && (T.width = typeof e.width == "string" ? e.width : `${e.width}px`), ae(e.size) || (T["--cp-switch-height"] = Se(e.size, d)), T;
|
|
2253
|
-
}),
|
|
2253
|
+
}), x = async () => {
|
|
2254
2254
|
if (m.value) return;
|
|
2255
2255
|
const T = !e.modelValue;
|
|
2256
2256
|
if (e.beforeChange) {
|
|
@@ -2272,11 +2272,11 @@ const Et = {
|
|
|
2272
2272
|
inputRef: c
|
|
2273
2273
|
}), (T, I) => (i(), p("div", {
|
|
2274
2274
|
class: n(g.value),
|
|
2275
|
-
style:
|
|
2275
|
+
style: U(V.value),
|
|
2276
2276
|
role: "switch",
|
|
2277
2277
|
"aria-checked": e.modelValue,
|
|
2278
2278
|
"aria-disabled": m.value,
|
|
2279
|
-
onClick:
|
|
2279
|
+
onClick: x
|
|
2280
2280
|
}, [
|
|
2281
2281
|
v("input", {
|
|
2282
2282
|
ref_key: "inputRef",
|
|
@@ -2298,13 +2298,13 @@ const Et = {
|
|
|
2298
2298
|
}, [
|
|
2299
2299
|
v("span", xo, G(e.activeText), 1),
|
|
2300
2300
|
v("span", zo, G(e.inactiveText), 1)
|
|
2301
|
-
], 2)) :
|
|
2301
|
+
], 2)) : j("", !0),
|
|
2302
2302
|
e.inactiveText ? (i(), p("span", {
|
|
2303
2303
|
key: 1,
|
|
2304
2304
|
class: n(a(l).e("inactive-text"))
|
|
2305
2305
|
}, [
|
|
2306
2306
|
v("span", Bo, G(e.inactiveText), 1)
|
|
2307
|
-
], 2)) :
|
|
2307
|
+
], 2)) : j("", !0),
|
|
2308
2308
|
v("div", {
|
|
2309
2309
|
class: n(a(l).e("thumb"))
|
|
2310
2310
|
}, [
|
|
@@ -2330,14 +2330,14 @@ const Et = {
|
|
|
2330
2330
|
fill: "currentColor"
|
|
2331
2331
|
})
|
|
2332
2332
|
], -1)
|
|
2333
|
-
])])) :
|
|
2333
|
+
])])) : j("", !0)
|
|
2334
2334
|
], 2),
|
|
2335
2335
|
e.activeText ? (i(), p("span", {
|
|
2336
2336
|
key: 2,
|
|
2337
2337
|
class: n(a(l).e("active-text"))
|
|
2338
2338
|
}, [
|
|
2339
2339
|
v("span", Po, G(e.activeText), 1)
|
|
2340
|
-
], 2)) :
|
|
2340
|
+
], 2)) : j("", !0)
|
|
2341
2341
|
], 2)
|
|
2342
2342
|
], 14, Co));
|
|
2343
2343
|
}
|
|
@@ -2616,14 +2616,14 @@ const Et = {
|
|
|
2616
2616
|
return t.bodyPadding && (D.padding = t.bodyPadding), D;
|
|
2617
2617
|
}), g = s(
|
|
2618
2618
|
() => t.title || o.header || o.title || o.extra
|
|
2619
|
-
), k = s(() => !!o.footer),
|
|
2619
|
+
), k = s(() => !!o.footer), V = s(() => !!o.overlay), x = s(() => [
|
|
2620
2620
|
e.e("header"),
|
|
2621
2621
|
e.is("bordered", t.headerBorder),
|
|
2622
2622
|
t.headerClass
|
|
2623
2623
|
]), T = s(() => [
|
|
2624
2624
|
e.e("footer"),
|
|
2625
2625
|
e.is("bordered", t.footerBorder)
|
|
2626
|
-
]), I = s(() => t.actionEffect ?? t.overlayEffect), b = s(() => t.actionColor ?? t.overlayColor), L = s(() => t.actionBlur ?? t.overlayBlur),
|
|
2626
|
+
]), I = s(() => t.actionEffect ?? t.overlayEffect), b = s(() => t.actionColor ?? t.overlayColor), L = s(() => t.actionBlur ?? t.overlayBlur), P = s(() => [
|
|
2627
2627
|
e.e("overlay"),
|
|
2628
2628
|
e.bem("", "overlay", t.overlayAnimation),
|
|
2629
2629
|
e.bem("", "overlay", t.overlayPosition),
|
|
@@ -2631,37 +2631,37 @@ const Et = {
|
|
|
2631
2631
|
]), N = s(() => [
|
|
2632
2632
|
e.e("overlay-backdrop"),
|
|
2633
2633
|
e.bem("", "overlay-backdrop", `effect-${t.overlayEffect}`)
|
|
2634
|
-
]),
|
|
2634
|
+
]), M = (D) => D === void 0 ? "10px" : typeof D == "number" ? `${D}px` : D, C = s(() => ({
|
|
2635
2635
|
"--cp-card-overlay-duration": Ne(t.overlayDuration),
|
|
2636
2636
|
"--cp-card-overlay-color": t.overlayColor,
|
|
2637
|
-
"--cp-card-overlay-blur":
|
|
2637
|
+
"--cp-card-overlay-blur": M(t.overlayBlur),
|
|
2638
2638
|
"--cp-card-action-color": b.value,
|
|
2639
|
-
"--cp-card-action-blur":
|
|
2639
|
+
"--cp-card-action-blur": M(L.value)
|
|
2640
2640
|
}));
|
|
2641
2641
|
return (D, X) => (i(), p("div", {
|
|
2642
2642
|
class: n(r.value),
|
|
2643
|
-
style:
|
|
2643
|
+
style: U(f.value)
|
|
2644
2644
|
}, [
|
|
2645
2645
|
v("div", {
|
|
2646
2646
|
class: n(l.value),
|
|
2647
|
-
style:
|
|
2647
|
+
style: U(D.backgroundStyle)
|
|
2648
2648
|
}, [
|
|
2649
2649
|
D.$slots.cover ? (i(), p("div", {
|
|
2650
2650
|
key: 0,
|
|
2651
2651
|
class: n(a(e).e("cover"))
|
|
2652
2652
|
}, [
|
|
2653
|
-
|
|
2654
|
-
], 2)) :
|
|
2653
|
+
H(D.$slots, "cover")
|
|
2654
|
+
], 2)) : j("", !0),
|
|
2655
2655
|
g.value ? (i(), p("div", {
|
|
2656
2656
|
key: 1,
|
|
2657
|
-
class: n(
|
|
2658
|
-
style:
|
|
2657
|
+
class: n(x.value),
|
|
2658
|
+
style: U(D.headerStyle)
|
|
2659
2659
|
}, [
|
|
2660
|
-
|
|
2660
|
+
H(D.$slots, "header", {}, () => [
|
|
2661
2661
|
v("div", {
|
|
2662
2662
|
class: n(a(e).e("title"))
|
|
2663
2663
|
}, [
|
|
2664
|
-
|
|
2664
|
+
H(D.$slots, "title", {}, () => [
|
|
2665
2665
|
de(G(D.title), 1)
|
|
2666
2666
|
])
|
|
2667
2667
|
], 2),
|
|
@@ -2669,34 +2669,34 @@ const Et = {
|
|
|
2669
2669
|
key: 0,
|
|
2670
2670
|
class: n(a(e).e("extra"))
|
|
2671
2671
|
}, [
|
|
2672
|
-
|
|
2673
|
-
], 2)) :
|
|
2672
|
+
H(D.$slots, "extra")
|
|
2673
|
+
], 2)) : j("", !0)
|
|
2674
2674
|
])
|
|
2675
|
-
], 6)) :
|
|
2675
|
+
], 6)) : j("", !0),
|
|
2676
2676
|
v("div", {
|
|
2677
2677
|
class: n([a(e).e("body"), D.bodyClass]),
|
|
2678
|
-
style:
|
|
2678
|
+
style: U(m.value)
|
|
2679
2679
|
}, [
|
|
2680
|
-
|
|
2680
|
+
H(D.$slots, "default")
|
|
2681
2681
|
], 6),
|
|
2682
2682
|
k.value ? (i(), p("div", {
|
|
2683
2683
|
key: 2,
|
|
2684
2684
|
class: n(T.value)
|
|
2685
2685
|
}, [
|
|
2686
|
-
|
|
2687
|
-
], 2)) :
|
|
2688
|
-
|
|
2686
|
+
H(D.$slots, "footer")
|
|
2687
|
+
], 2)) : j("", !0),
|
|
2688
|
+
V.value ? (i(), p("div", {
|
|
2689
2689
|
key: 3,
|
|
2690
2690
|
class: n(N.value),
|
|
2691
|
-
style:
|
|
2692
|
-
}, null, 6)) :
|
|
2693
|
-
|
|
2691
|
+
style: U(C.value)
|
|
2692
|
+
}, null, 6)) : j("", !0),
|
|
2693
|
+
V.value ? (i(), p("div", {
|
|
2694
2694
|
key: 4,
|
|
2695
|
-
class: n(
|
|
2696
|
-
style:
|
|
2695
|
+
class: n(P.value),
|
|
2696
|
+
style: U(C.value)
|
|
2697
2697
|
}, [
|
|
2698
|
-
|
|
2699
|
-
], 6)) :
|
|
2698
|
+
H(D.$slots, "overlay")
|
|
2699
|
+
], 6)) : j("", !0)
|
|
2700
2700
|
], 6)
|
|
2701
2701
|
], 6));
|
|
2702
2702
|
}
|
|
@@ -2838,37 +2838,37 @@ const Et = {
|
|
|
2838
2838
|
r.is("selected", o.selected),
|
|
2839
2839
|
r.is("custom-size", !ae(o.size))
|
|
2840
2840
|
]), f = s(() => {
|
|
2841
|
-
const
|
|
2842
|
-
return o.color ? (
|
|
2843
|
-
}), m = (
|
|
2844
|
-
o.disabled || (e("click",
|
|
2845
|
-
}, g = (
|
|
2846
|
-
|
|
2847
|
-
}, k = (
|
|
2848
|
-
|
|
2841
|
+
const V = {};
|
|
2842
|
+
return o.color ? (V["--cp-tag-color"] = o.color, V["--cp-tag-color-light"] = `color-mix(in srgb, ${o.color} 20%, transparent)`) : o.type && o.type !== "default" && l[o.type] && (V["--cp-tag-color"] = l[o.type], V["--cp-tag-color-light"] = "color-mix(in srgb, var(--cp-tag-color) 20%, transparent)"), ae(o.size) || (V["--cp-tag-height"] = Se(o.size, d)), V;
|
|
2843
|
+
}), m = (V) => {
|
|
2844
|
+
o.disabled || (e("click", V), o.selectable && e("update:selected", !o.selected));
|
|
2845
|
+
}, g = (V) => {
|
|
2846
|
+
V.stopPropagation(), !o.disabled && e("close", V);
|
|
2847
|
+
}, k = (V) => {
|
|
2848
|
+
V.stopPropagation(), !o.disabled && e("close", new MouseEvent("click"));
|
|
2849
2849
|
};
|
|
2850
|
-
return (
|
|
2850
|
+
return (V, x) => (i(), p("span", {
|
|
2851
2851
|
class: n(c.value),
|
|
2852
|
-
style:
|
|
2852
|
+
style: U(f.value),
|
|
2853
2853
|
onClick: m
|
|
2854
2854
|
}, [
|
|
2855
|
-
|
|
2855
|
+
V.$slots.prefix ? (i(), p("span", {
|
|
2856
2856
|
key: 0,
|
|
2857
2857
|
class: n(a(r).e("prefix"))
|
|
2858
2858
|
}, [
|
|
2859
|
-
|
|
2860
|
-
], 2)) :
|
|
2859
|
+
H(V.$slots, "prefix")
|
|
2860
|
+
], 2)) : j("", !0),
|
|
2861
2861
|
v("span", {
|
|
2862
2862
|
class: n(a(r).e("content"))
|
|
2863
2863
|
}, [
|
|
2864
|
-
|
|
2864
|
+
H(V.$slots, "default")
|
|
2865
2865
|
], 2),
|
|
2866
|
-
|
|
2866
|
+
V.$slots.suffix ? (i(), p("span", {
|
|
2867
2867
|
key: 1,
|
|
2868
2868
|
class: n(a(r).e("suffix"))
|
|
2869
2869
|
}, [
|
|
2870
|
-
|
|
2871
|
-
], 2)) :
|
|
2870
|
+
H(V.$slots, "suffix")
|
|
2871
|
+
], 2)) : j("", !0),
|
|
2872
2872
|
o.closable ? (i(), p("span", {
|
|
2873
2873
|
key: 2,
|
|
2874
2874
|
class: n(a(r).e("close")),
|
|
@@ -2876,7 +2876,7 @@ const Et = {
|
|
|
2876
2876
|
tabindex: "0",
|
|
2877
2877
|
onClick: g,
|
|
2878
2878
|
onKeydown: Ge(Ce(k, ["prevent"]), ["enter"])
|
|
2879
|
-
}, [...
|
|
2879
|
+
}, [...x[0] || (x[0] = [
|
|
2880
2880
|
v("svg", {
|
|
2881
2881
|
viewBox: "0 0 24 24",
|
|
2882
2882
|
fill: "none",
|
|
@@ -2886,11 +2886,11 @@ const Et = {
|
|
|
2886
2886
|
}, [
|
|
2887
2887
|
v("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2888
2888
|
], -1)
|
|
2889
|
-
])], 42, To)) :
|
|
2889
|
+
])], 42, To)) : j("", !0),
|
|
2890
2890
|
o.shape === "clip" ? (i(), p("span", {
|
|
2891
2891
|
key: 3,
|
|
2892
2892
|
class: n(a(r).e("decor"))
|
|
2893
|
-
}, null, 2)) :
|
|
2893
|
+
}, null, 2)) : j("", !0)
|
|
2894
2894
|
], 6));
|
|
2895
2895
|
}
|
|
2896
2896
|
}), vr = re(Lo), Ro = {
|
|
@@ -3135,8 +3135,8 @@ const Et = {
|
|
|
3135
3135
|
t.color ? c["--cp-text-color"] = t.color : t.type && t.type !== "default" && e[t.type] && (c["--cp-text-color"] = e[t.type]);
|
|
3136
3136
|
const f = Se(t.size, r);
|
|
3137
3137
|
if (f && (c["--cp-text-size"] = f), t.glow && t.glowIntensity && (c["--cp-text-glow-intensity"] = `${t.glowIntensity}px`), t.marker && t.markerColor && (c["--cp-text-marker-color"] = t.markerColor), t.glowPulse && t.glowPulseDuration && (c["--cp-text-pulse-duration"] = Ne(t.glowPulseDuration)), t.lightWave && t.lightWaveDuration && (c["--cp-text-wave-duration"] = Ne(t.lightWaveDuration)), t.glowPulse && t.lightWave) {
|
|
3138
|
-
const m = Ne(t.glowPulseDuration), g = Ne(t.lightWaveDuration), k = `cp-text-glow-pulse ${m} ease-in-out infinite`,
|
|
3139
|
-
c.animation = `${k}, ${
|
|
3138
|
+
const m = Ne(t.glowPulseDuration), g = Ne(t.lightWaveDuration), k = `cp-text-glow-pulse ${m} ease-in-out infinite`, V = `cp-text-light-wave ${g} linear infinite`;
|
|
3139
|
+
c.animation = `${k}, ${V}`;
|
|
3140
3140
|
}
|
|
3141
3141
|
return t.overlap && (c["--cp-text-overlap-offset-x"] = `${t.overlapOffsetX}px`, c["--cp-text-overlap-offset-y"] = `${t.overlapOffsetY}px`, t.overlapColor && (c["--cp-text-overlap-color"] = t.overlapColor)), c;
|
|
3142
3142
|
});
|
|
@@ -3144,27 +3144,27 @@ const Et = {
|
|
|
3144
3144
|
var m, g, k;
|
|
3145
3145
|
return i(), p("span", {
|
|
3146
3146
|
class: n(l.value),
|
|
3147
|
-
style:
|
|
3147
|
+
style: U(d.value),
|
|
3148
3148
|
"data-text": ((k = (g = (m = c.$slots).default) == null ? void 0 : g.call(m, {})[0]) == null ? void 0 : k.children) || ""
|
|
3149
3149
|
}, [
|
|
3150
3150
|
c.$slots.prefix ? (i(), p("span", {
|
|
3151
3151
|
key: 0,
|
|
3152
3152
|
class: n(a(o).e("prefix"))
|
|
3153
3153
|
}, [
|
|
3154
|
-
|
|
3155
|
-
], 2)) :
|
|
3154
|
+
H(c.$slots, "prefix")
|
|
3155
|
+
], 2)) : j("", !0),
|
|
3156
3156
|
v("span", {
|
|
3157
3157
|
class: n(a(o).e("content")),
|
|
3158
|
-
style:
|
|
3158
|
+
style: U(t.glowPulse && t.lightWave ? { animation: "inherit" } : {})
|
|
3159
3159
|
}, [
|
|
3160
|
-
|
|
3160
|
+
H(c.$slots, "default")
|
|
3161
3161
|
], 6),
|
|
3162
3162
|
c.$slots.suffix ? (i(), p("span", {
|
|
3163
3163
|
key: 1,
|
|
3164
3164
|
class: n(a(o).e("suffix"))
|
|
3165
3165
|
}, [
|
|
3166
|
-
|
|
3167
|
-
], 2)) :
|
|
3166
|
+
H(c.$slots, "suffix")
|
|
3167
|
+
], 2)) : j("", !0)
|
|
3168
3168
|
], 14, Do);
|
|
3169
3169
|
};
|
|
3170
3170
|
}
|
|
@@ -3279,7 +3279,7 @@ const Et = {
|
|
|
3279
3279
|
});
|
|
3280
3280
|
return (f, m) => (i(), p("span", {
|
|
3281
3281
|
class: n(d.value),
|
|
3282
|
-
style:
|
|
3282
|
+
style: U(c.value)
|
|
3283
3283
|
}, [
|
|
3284
3284
|
v("span", {
|
|
3285
3285
|
class: n(a(e).e("dot"))
|
|
@@ -3287,19 +3287,19 @@ const Et = {
|
|
|
3287
3287
|
f.animation === "pulse" ? (i(), p("span", {
|
|
3288
3288
|
key: 0,
|
|
3289
3289
|
class: n(a(e).e("pulse"))
|
|
3290
|
-
}, null, 2)) :
|
|
3290
|
+
}, null, 2)) : j("", !0)
|
|
3291
3291
|
], 2),
|
|
3292
3292
|
l.value ? (i(), p("span", {
|
|
3293
3293
|
key: 0,
|
|
3294
3294
|
class: n(a(e).e("label"))
|
|
3295
3295
|
}, [
|
|
3296
|
-
|
|
3296
|
+
H(f.$slots, "default", {}, () => [
|
|
3297
3297
|
de(G(f.label), 1)
|
|
3298
3298
|
])
|
|
3299
|
-
], 2)) :
|
|
3299
|
+
], 2)) : j("", !0)
|
|
3300
3300
|
], 6));
|
|
3301
3301
|
}
|
|
3302
|
-
}), yr = re(jo),
|
|
3302
|
+
}), yr = re(jo), _o = {
|
|
3303
3303
|
/**
|
|
3304
3304
|
* 图片源地址
|
|
3305
3305
|
* @default ''
|
|
@@ -3481,7 +3481,7 @@ const Et = {
|
|
|
3481
3481
|
type: Boolean,
|
|
3482
3482
|
default: !1
|
|
3483
3483
|
}
|
|
3484
|
-
},
|
|
3484
|
+
}, Ho = {
|
|
3485
3485
|
/**
|
|
3486
3486
|
* 图片加载成功时触发
|
|
3487
3487
|
* @param event - 原生加载事件
|
|
@@ -3492,19 +3492,19 @@ const Et = {
|
|
|
3492
3492
|
* @param event - 原生错误事件
|
|
3493
3493
|
*/
|
|
3494
3494
|
error: (u) => u instanceof Event
|
|
3495
|
-
}, Wo = ["src", "alt", "draggable"],
|
|
3495
|
+
}, Wo = ["src", "alt", "draggable"], qo = /* @__PURE__ */ oe({
|
|
3496
3496
|
name: `${se}Image`,
|
|
3497
3497
|
__name: "image",
|
|
3498
|
-
props:
|
|
3499
|
-
emits:
|
|
3498
|
+
props: _o,
|
|
3499
|
+
emits: Ho,
|
|
3500
3500
|
setup(u, { emit: t }) {
|
|
3501
3501
|
const o = u, e = t, r = ne("image"), l = W(!0), d = W(!1), c = W(""), f = W(null), m = W(null), g = W(!o.lazy);
|
|
3502
3502
|
let k = null;
|
|
3503
|
-
const { processedSrc:
|
|
3503
|
+
const { processedSrc: V } = pt({
|
|
3504
3504
|
src: fe(o, "src"),
|
|
3505
3505
|
processor: fe(o, "srcProcessor"),
|
|
3506
3506
|
params: fe(o, "processorParams")
|
|
3507
|
-
}),
|
|
3507
|
+
}), x = {
|
|
3508
3508
|
default: "var(--cp-text-muted)",
|
|
3509
3509
|
primary: "var(--cp-color-primary)",
|
|
3510
3510
|
success: "var(--cp-color-success)",
|
|
@@ -3521,30 +3521,30 @@ const Et = {
|
|
|
3521
3521
|
r.is("hoverable", o.hoverable),
|
|
3522
3522
|
o.hoverable && r.m(`hover-${o.hoverMode}`)
|
|
3523
3523
|
]), I = s(() => {
|
|
3524
|
-
const
|
|
3525
|
-
if (o.width && (
|
|
3524
|
+
const M = {};
|
|
3525
|
+
if (o.width && (M.width = Se(o.width)), o.height && (M.height = Se(o.height)), o.color ? M["--cp-image-decor-color"] = o.color : o.type && x[o.type] && (M["--cp-image-decor-color"] = x[o.type]), o.hoverable && o.hoverDuration) {
|
|
3526
3526
|
const C = Ne(o.hoverDuration);
|
|
3527
|
-
C && (
|
|
3527
|
+
C && (M["--cp-image-hover-duration"] = C);
|
|
3528
3528
|
}
|
|
3529
|
-
return
|
|
3529
|
+
return M;
|
|
3530
3530
|
}), b = () => {
|
|
3531
3531
|
if (!c.value) {
|
|
3532
3532
|
l.value = !1;
|
|
3533
3533
|
return;
|
|
3534
3534
|
}
|
|
3535
3535
|
l.value = !0, d.value = !1;
|
|
3536
|
-
}, L = (
|
|
3537
|
-
l.value = !1, d.value = !1, e("load",
|
|
3538
|
-
},
|
|
3536
|
+
}, L = (M) => {
|
|
3537
|
+
l.value = !1, d.value = !1, e("load", M);
|
|
3538
|
+
}, P = (M) => {
|
|
3539
3539
|
if (l.value = !1, o.fallbackSrc && c.value !== o.fallbackSrc) {
|
|
3540
3540
|
c.value = o.fallbackSrc;
|
|
3541
3541
|
return;
|
|
3542
3542
|
}
|
|
3543
|
-
d.value = !0, e("error",
|
|
3543
|
+
d.value = !0, e("error", M);
|
|
3544
3544
|
}, N = () => {
|
|
3545
3545
|
!o.lazy || !m.value || (k = new IntersectionObserver(
|
|
3546
|
-
(
|
|
3547
|
-
|
|
3546
|
+
(M) => {
|
|
3547
|
+
M[0].isIntersecting && (g.value = !0, k == null || k.disconnect());
|
|
3548
3548
|
},
|
|
3549
3549
|
{
|
|
3550
3550
|
rootMargin: "50px"
|
|
@@ -3553,22 +3553,22 @@ const Et = {
|
|
|
3553
3553
|
), k.observe(m.value));
|
|
3554
3554
|
};
|
|
3555
3555
|
return ge(
|
|
3556
|
-
|
|
3557
|
-
(
|
|
3558
|
-
g.value && (c.value =
|
|
3556
|
+
V,
|
|
3557
|
+
(M) => {
|
|
3558
|
+
g.value && (c.value = M, b());
|
|
3559
3559
|
},
|
|
3560
3560
|
{ immediate: !0 }
|
|
3561
|
-
), ge(g, (
|
|
3562
|
-
|
|
3561
|
+
), ge(g, (M) => {
|
|
3562
|
+
M && V.value && (c.value = V.value, b());
|
|
3563
3563
|
}), Me(() => {
|
|
3564
|
-
o.lazy ? N() : (c.value =
|
|
3564
|
+
o.lazy ? N() : (c.value = V.value, b());
|
|
3565
3565
|
}), Ve(() => {
|
|
3566
3566
|
k == null || k.disconnect();
|
|
3567
|
-
}), (
|
|
3567
|
+
}), (M, C) => (i(), p("div", {
|
|
3568
3568
|
ref_key: "containerRef",
|
|
3569
3569
|
ref: m,
|
|
3570
3570
|
class: n(T.value),
|
|
3571
|
-
style:
|
|
3571
|
+
style: U(I.value)
|
|
3572
3572
|
}, [
|
|
3573
3573
|
v("div", {
|
|
3574
3574
|
class: n(a(r).e("body"))
|
|
@@ -3577,7 +3577,7 @@ const Et = {
|
|
|
3577
3577
|
key: 0,
|
|
3578
3578
|
class: n(a(r).e("placeholder"))
|
|
3579
3579
|
}, [
|
|
3580
|
-
|
|
3580
|
+
H(M.$slots, "placeholder", {}, () => [
|
|
3581
3581
|
v("div", {
|
|
3582
3582
|
class: n(a(r).e("skeleton"))
|
|
3583
3583
|
}, [
|
|
@@ -3610,7 +3610,7 @@ const Et = {
|
|
|
3610
3610
|
key: 1,
|
|
3611
3611
|
class: n(a(r).e("error"))
|
|
3612
3612
|
}, [
|
|
3613
|
-
|
|
3613
|
+
H(M.$slots, "error", {}, () => [
|
|
3614
3614
|
(i(), p("svg", {
|
|
3615
3615
|
class: n(a(r).e("error-icon")),
|
|
3616
3616
|
viewBox: "0 0 24 24",
|
|
@@ -3631,16 +3631,16 @@ const Et = {
|
|
|
3631
3631
|
class: n(a(r).e("error-text"))
|
|
3632
3632
|
}, "加载失败", 2)
|
|
3633
3633
|
])
|
|
3634
|
-
], 2)) :
|
|
3634
|
+
], 2)) : j("", !0),
|
|
3635
3635
|
Ee(v("img", {
|
|
3636
3636
|
ref_key: "imageRef",
|
|
3637
3637
|
ref: f,
|
|
3638
3638
|
class: n(a(r).e("inner")),
|
|
3639
3639
|
src: c.value,
|
|
3640
|
-
alt:
|
|
3640
|
+
alt: M.alt,
|
|
3641
3641
|
draggable: o.draggable,
|
|
3642
3642
|
onLoad: L,
|
|
3643
|
-
onError:
|
|
3643
|
+
onError: P
|
|
3644
3644
|
}, null, 42, Wo), [
|
|
3645
3645
|
[Ke, !l.value && !d.value]
|
|
3646
3646
|
])
|
|
@@ -3648,10 +3648,10 @@ const Et = {
|
|
|
3648
3648
|
o.shape === "clip" && o.showDecor ? (i(), p("span", {
|
|
3649
3649
|
key: 0,
|
|
3650
3650
|
class: n(a(r).e("decor"))
|
|
3651
|
-
}, null, 2)) :
|
|
3651
|
+
}, null, 2)) : j("", !0)
|
|
3652
3652
|
], 6));
|
|
3653
3653
|
}
|
|
3654
|
-
}), lt = re(
|
|
3654
|
+
}), lt = re(qo), Uo = {
|
|
3655
3655
|
/**
|
|
3656
3656
|
* 头像图片地址
|
|
3657
3657
|
* @default ''
|
|
@@ -3757,7 +3757,7 @@ const Et = {
|
|
|
3757
3757
|
* 图片加载失败时触发
|
|
3758
3758
|
*/
|
|
3759
3759
|
error: (u) => u instanceof Event
|
|
3760
|
-
},
|
|
3760
|
+
}, qe = {
|
|
3761
3761
|
xs: 24,
|
|
3762
3762
|
sm: 32,
|
|
3763
3763
|
md: 40,
|
|
@@ -3844,23 +3844,23 @@ const Et = {
|
|
|
3844
3844
|
}, mt = Symbol("avatarGroup"), Go = ["src", "alt", "draggable"], Jo = /* @__PURE__ */ oe({
|
|
3845
3845
|
name: `${se}Avatar`,
|
|
3846
3846
|
__name: "avatar",
|
|
3847
|
-
props:
|
|
3847
|
+
props: Uo,
|
|
3848
3848
|
emits: Yo,
|
|
3849
3849
|
setup(u, { emit: t }) {
|
|
3850
3850
|
const o = u, e = t, r = xe(), l = ne("avatar"), d = $e(mt, null), { processedSrc: c } = pt({
|
|
3851
3851
|
src: fe(o, "src"),
|
|
3852
3852
|
processor: fe(o, "srcProcessor"),
|
|
3853
3853
|
params: fe(o, "processorParams")
|
|
3854
|
-
}), f = W(!0), m = W(!1), g = W(c.value), k = s(() => o.size !== "md" ? o.size : (d == null ? void 0 : d.size) ?? o.size),
|
|
3854
|
+
}), f = W(!0), m = W(!1), g = W(c.value), k = s(() => o.size !== "md" ? o.size : (d == null ? void 0 : d.size) ?? o.size), V = s(() => o.shape !== "circle" ? o.shape : (d == null ? void 0 : d.shape) ?? o.shape), x = s(() => Ze(k.value, qe, qe.md)), T = s(() => [
|
|
3855
3855
|
l.b(),
|
|
3856
|
-
l.m(`shape-${
|
|
3856
|
+
l.m(`shape-${V.value}`),
|
|
3857
3857
|
l.is("loading", f.value),
|
|
3858
3858
|
l.is("error", m.value)
|
|
3859
3859
|
]), I = s(() => ({
|
|
3860
|
-
"--cp-avatar-size": `${
|
|
3861
|
-
})), b = s(() => !!g.value && !m.value), L = s(() => !b.value && o.icon && !r.default),
|
|
3860
|
+
"--cp-avatar-size": `${x.value}px`
|
|
3861
|
+
})), b = s(() => !!g.value && !m.value), L = s(() => !b.value && o.icon && !r.default), P = s(() => !b.value && !L.value && !r.default), N = (C) => {
|
|
3862
3862
|
f.value = !1, m.value = !1, e("load", C);
|
|
3863
|
-
},
|
|
3863
|
+
}, M = (C) => {
|
|
3864
3864
|
if (f.value = !1, o.fallbackSrc && g.value !== o.fallbackSrc) {
|
|
3865
3865
|
g.value = o.fallbackSrc;
|
|
3866
3866
|
return;
|
|
@@ -3874,17 +3874,17 @@ const Et = {
|
|
|
3874
3874
|
}
|
|
3875
3875
|
), (C, D) => (i(), p("span", {
|
|
3876
3876
|
class: n(T.value),
|
|
3877
|
-
style:
|
|
3877
|
+
style: U(I.value)
|
|
3878
3878
|
}, [
|
|
3879
3879
|
b.value ? (i(), p("img", {
|
|
3880
3880
|
key: 0,
|
|
3881
3881
|
class: n(a(l).e("image")),
|
|
3882
3882
|
src: g.value,
|
|
3883
3883
|
alt: C.alt,
|
|
3884
|
-
style:
|
|
3884
|
+
style: U({ objectFit: C.fit }),
|
|
3885
3885
|
draggable: o.draggable,
|
|
3886
3886
|
onLoad: N,
|
|
3887
|
-
onError:
|
|
3887
|
+
onError: M
|
|
3888
3888
|
}, null, 46, Go)) : L.value ? (i(), ee(a(Le), {
|
|
3889
3889
|
key: 1,
|
|
3890
3890
|
class: n(a(l).e("icon")),
|
|
@@ -3893,8 +3893,8 @@ const Et = {
|
|
|
3893
3893
|
key: 2,
|
|
3894
3894
|
class: n(a(l).e("text"))
|
|
3895
3895
|
}, [
|
|
3896
|
-
|
|
3897
|
-
], 2)) :
|
|
3896
|
+
H(C.$slots, "default")
|
|
3897
|
+
], 2)) : P.value ? (i(), p("svg", {
|
|
3898
3898
|
key: 3,
|
|
3899
3899
|
class: n(a(l).e("placeholder")),
|
|
3900
3900
|
viewBox: "0 0 24 24",
|
|
@@ -3906,7 +3906,7 @@ const Et = {
|
|
|
3906
3906
|
r: "4"
|
|
3907
3907
|
}, null, -1),
|
|
3908
3908
|
v("path", { d: "M12 14c-4.42 0-8 1.79-8 4v2h16v-2c0-2.21-3.58-4-8-4z" }, null, -1)
|
|
3909
|
-
])], 2)) :
|
|
3909
|
+
])], 2)) : j("", !0)
|
|
3910
3910
|
], 6));
|
|
3911
3911
|
}
|
|
3912
3912
|
}), Zo = ["title"], Qo = /* @__PURE__ */ oe({
|
|
@@ -3914,9 +3914,9 @@ const Et = {
|
|
|
3914
3914
|
__name: "avatar-group",
|
|
3915
3915
|
props: Xo,
|
|
3916
3916
|
setup(u) {
|
|
3917
|
-
const t = u, o = xe(), e = ne("avatar-group"), r = s(() => Ze(t.size,
|
|
3918
|
-
const
|
|
3919
|
-
return typeof
|
|
3917
|
+
const t = u, o = xe(), e = ne("avatar-group"), r = s(() => Ze(t.size, qe, qe.md)), l = s(() => {
|
|
3918
|
+
const x = t.spacing;
|
|
3919
|
+
return typeof x == "number" ? `${x}px` : x;
|
|
3920
3920
|
});
|
|
3921
3921
|
Be(mt, {
|
|
3922
3922
|
size: t.size,
|
|
@@ -3929,40 +3929,40 @@ const Et = {
|
|
|
3929
3929
|
"--cp-avatar-size": `${r.value}px`,
|
|
3930
3930
|
"--cp-avatar-group-spacing": l.value
|
|
3931
3931
|
})), f = () => {
|
|
3932
|
-
const
|
|
3933
|
-
if (!
|
|
3934
|
-
const T =
|
|
3932
|
+
const x = o.default;
|
|
3933
|
+
if (!x) return [];
|
|
3934
|
+
const T = x();
|
|
3935
3935
|
if (!T) return [];
|
|
3936
3936
|
const I = [], b = (L) => {
|
|
3937
|
-
L.forEach((
|
|
3938
|
-
Array.isArray(
|
|
3937
|
+
L.forEach((P) => {
|
|
3938
|
+
Array.isArray(P.children) ? b(P.children) : I.push(P);
|
|
3939
3939
|
});
|
|
3940
3940
|
};
|
|
3941
3941
|
return b(T), I;
|
|
3942
3942
|
}, m = s(() => {
|
|
3943
|
-
const
|
|
3944
|
-
return t.max === void 0 || t.max >=
|
|
3943
|
+
const x = f();
|
|
3944
|
+
return t.max === void 0 || t.max >= x.length ? x.length : t.max;
|
|
3945
3945
|
}), g = s(() => {
|
|
3946
|
-
const
|
|
3947
|
-
return t.max === void 0 || t.max >=
|
|
3948
|
-
}), k = s(() => t.collapseShape ?? t.shape),
|
|
3946
|
+
const x = f();
|
|
3947
|
+
return t.max === void 0 || t.max >= x.length ? 0 : x.length - t.max;
|
|
3948
|
+
}), k = s(() => t.collapseShape ?? t.shape), V = s(() => [
|
|
3949
3949
|
e.e("counter"),
|
|
3950
3950
|
e.bem("", "counter", `shape-${k.value}`),
|
|
3951
3951
|
t.collapseClass
|
|
3952
3952
|
]);
|
|
3953
|
-
return (
|
|
3953
|
+
return (x, T) => (i(), p("div", {
|
|
3954
3954
|
class: n(d.value),
|
|
3955
|
-
style:
|
|
3955
|
+
style: U(c.value)
|
|
3956
3956
|
}, [
|
|
3957
3957
|
(i(!0), p(ue, null, ke(f(), (I, b) => (i(), p(ue, { key: b }, [
|
|
3958
|
-
b < m.value ? (i(), ee(we(I), { key: 0 })) :
|
|
3958
|
+
b < m.value ? (i(), ee(we(I), { key: 0 })) : j("", !0)
|
|
3959
3959
|
], 64))), 128)),
|
|
3960
3960
|
g.value > 0 ? (i(), p("span", {
|
|
3961
3961
|
key: 0,
|
|
3962
|
-
class: n(
|
|
3963
|
-
style:
|
|
3962
|
+
class: n(V.value),
|
|
3963
|
+
style: U(t.collapseStyle),
|
|
3964
3964
|
title: t.collapseAvatarsTooltip
|
|
3965
|
-
}, " +" + G(g.value), 15, Zo)) :
|
|
3965
|
+
}, " +" + G(g.value), 15, Zo)) : j("", !0)
|
|
3966
3966
|
], 6));
|
|
3967
3967
|
}
|
|
3968
3968
|
}), mr = re(Jo), gr = re(Qo), el = { style: { "flex-grow": "1" } }, tl = /* @__PURE__ */ oe({
|
|
@@ -4171,72 +4171,72 @@ const Et = {
|
|
|
4171
4171
|
e.modelValue !== void 0 ? r("update:modelValue", $) : c.value = $, r($ ? "open" : "close");
|
|
4172
4172
|
}
|
|
4173
4173
|
}), m = W(null), g = W(null), k = W({ top: 0, left: 0 });
|
|
4174
|
-
let
|
|
4174
|
+
let V = null, x = null;
|
|
4175
4175
|
const T = () => {
|
|
4176
|
-
|
|
4176
|
+
V && (clearTimeout(V), V = null), x && (clearTimeout(x), x = null);
|
|
4177
4177
|
}, I = () => {
|
|
4178
|
-
e.disabled || (T(), e.trigger === "hover" && e.openDelay > 0 ?
|
|
4178
|
+
e.disabled || (T(), e.trigger === "hover" && e.openDelay > 0 ? V = setTimeout(() => {
|
|
4179
4179
|
f.value = !0;
|
|
4180
4180
|
}, e.openDelay) : f.value = !0);
|
|
4181
4181
|
}, b = () => {
|
|
4182
|
-
T(), e.trigger === "hover" && e.closeDelay > 0 ?
|
|
4182
|
+
T(), e.trigger === "hover" && e.closeDelay > 0 ? x = setTimeout(() => {
|
|
4183
4183
|
f.value = !1;
|
|
4184
4184
|
}, e.closeDelay) : f.value = !1;
|
|
4185
4185
|
}, L = () => {
|
|
4186
4186
|
f.value ? b() : I();
|
|
4187
4187
|
};
|
|
4188
|
-
let
|
|
4188
|
+
let P = !1;
|
|
4189
4189
|
const N = () => {
|
|
4190
|
-
!f.value || !m.value || !g.value ||
|
|
4190
|
+
!f.value || !m.value || !g.value || P || (P = !0, requestAnimationFrame(() => {
|
|
4191
4191
|
if (!m.value || !g.value) {
|
|
4192
|
-
|
|
4192
|
+
P = !1;
|
|
4193
4193
|
return;
|
|
4194
4194
|
}
|
|
4195
|
-
const $ = m.value.getBoundingClientRect(), y = e.showArrow && !e.flipArrow && e.offset === 8 ? 12 : e.offset,
|
|
4196
|
-
let
|
|
4197
|
-
const [
|
|
4198
|
-
switch (
|
|
4195
|
+
const $ = m.value.getBoundingClientRect(), y = e.showArrow && !e.flipArrow && e.offset === 8 ? 12 : e.offset, O = g.value.offsetWidth, h = g.value.offsetHeight;
|
|
4196
|
+
let z = 0, F = 0;
|
|
4197
|
+
const [B, Q] = e.placement.includes("-") ? e.placement.split("-") : [e.placement, "center"];
|
|
4198
|
+
switch (B) {
|
|
4199
4199
|
case "top":
|
|
4200
|
-
|
|
4200
|
+
z = $.top - h - y + window.scrollY;
|
|
4201
4201
|
break;
|
|
4202
4202
|
case "bottom":
|
|
4203
|
-
|
|
4203
|
+
z = $.bottom + y + window.scrollY;
|
|
4204
4204
|
break;
|
|
4205
4205
|
case "left":
|
|
4206
|
-
|
|
4206
|
+
F = $.left - O - y + window.scrollX;
|
|
4207
4207
|
break;
|
|
4208
4208
|
case "right":
|
|
4209
|
-
|
|
4209
|
+
F = $.right + y + window.scrollX;
|
|
4210
4210
|
break;
|
|
4211
4211
|
}
|
|
4212
|
-
if (
|
|
4212
|
+
if (B === "top" || B === "bottom")
|
|
4213
4213
|
switch (Q) {
|
|
4214
4214
|
case "start":
|
|
4215
|
-
|
|
4215
|
+
F = $.right - O + window.scrollX;
|
|
4216
4216
|
break;
|
|
4217
4217
|
case "end":
|
|
4218
|
-
|
|
4218
|
+
F = $.left + window.scrollX;
|
|
4219
4219
|
break;
|
|
4220
4220
|
default:
|
|
4221
|
-
|
|
4221
|
+
F = $.left + ($.width - O) / 2 + window.scrollX;
|
|
4222
4222
|
}
|
|
4223
|
-
else if (
|
|
4223
|
+
else if (B === "left" || B === "right")
|
|
4224
4224
|
switch (Q) {
|
|
4225
4225
|
case "start":
|
|
4226
|
-
|
|
4226
|
+
z = $.top + window.scrollY;
|
|
4227
4227
|
break;
|
|
4228
4228
|
case "end":
|
|
4229
|
-
|
|
4229
|
+
z = $.bottom - h + window.scrollY;
|
|
4230
4230
|
break;
|
|
4231
4231
|
default:
|
|
4232
|
-
|
|
4232
|
+
z = $.top + ($.height - h) / 2 + window.scrollY;
|
|
4233
4233
|
}
|
|
4234
|
-
k.value = { top:
|
|
4234
|
+
k.value = { top: z, left: F }, P = !1;
|
|
4235
4235
|
}));
|
|
4236
|
-
},
|
|
4237
|
-
const $ = typeof e.width == "number" ? `${e.width}px` : e.width, y = typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth,
|
|
4238
|
-
return
|
|
4239
|
-
...
|
|
4236
|
+
}, M = s(() => e.color ? e.color : e.type && e.type !== "default" ? `var(--cp-color-${e.type})` : null), C = s(() => e.color ? `color-mix(in srgb, ${e.color} 30%, transparent)` : e.type && e.type !== "default" ? `var(--cp-color-${e.type}-light)` : null), D = s(() => {
|
|
4237
|
+
const $ = typeof e.width == "number" ? `${e.width}px` : e.width, y = typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth, O = {};
|
|
4238
|
+
return M.value && (O["--cp-popover-color"] = M.value), C.value && (O["--cp-popover-color-light"] = C.value), {
|
|
4239
|
+
...O,
|
|
4240
4240
|
top: `${k.value.top}px`,
|
|
4241
4241
|
left: `${k.value.left}px`,
|
|
4242
4242
|
width: $ === "auto" ? void 0 : $,
|
|
@@ -4267,13 +4267,13 @@ const Et = {
|
|
|
4267
4267
|
e.trigger === "focus" && b();
|
|
4268
4268
|
}, w = () => {
|
|
4269
4269
|
e.trigger === "hover" && T();
|
|
4270
|
-
},
|
|
4270
|
+
}, q = () => {
|
|
4271
4271
|
e.trigger === "hover" && b();
|
|
4272
4272
|
}, te = ($) => {
|
|
4273
|
-
var h,
|
|
4273
|
+
var h, z;
|
|
4274
4274
|
if (!e.closeOnClickOutside || e.trigger !== "click" && e.trigger !== "manual" || !f.value) return;
|
|
4275
4275
|
const y = $.target;
|
|
4276
|
-
((h = m.value) == null ? void 0 : h.contains(y)) || ((
|
|
4276
|
+
((h = m.value) == null ? void 0 : h.contains(y)) || ((z = g.value) == null ? void 0 : z.contains(y)) || b();
|
|
4277
4277
|
}, A = ($) => {
|
|
4278
4278
|
e.closeOnEscape && $.key === "Escape" && f.value && b();
|
|
4279
4279
|
};
|
|
@@ -4305,7 +4305,7 @@ const Et = {
|
|
|
4305
4305
|
onFocus: E,
|
|
4306
4306
|
onBlur: Y
|
|
4307
4307
|
}, [
|
|
4308
|
-
|
|
4308
|
+
H($.$slots, "default")
|
|
4309
4309
|
], 34),
|
|
4310
4310
|
(i(), ee(Je, { to: $.teleportTo }, [
|
|
4311
4311
|
he(Ie, {
|
|
@@ -4317,9 +4317,9 @@ const Et = {
|
|
|
4317
4317
|
ref_key: "popoverRef",
|
|
4318
4318
|
ref: g,
|
|
4319
4319
|
class: n(X.value),
|
|
4320
|
-
style:
|
|
4320
|
+
style: U(D.value),
|
|
4321
4321
|
onMouseenter: w,
|
|
4322
|
-
onMouseleave:
|
|
4322
|
+
onMouseleave: q
|
|
4323
4323
|
}, [
|
|
4324
4324
|
v("div", {
|
|
4325
4325
|
class: n(a(l).e("background"))
|
|
@@ -4327,21 +4327,21 @@ const Et = {
|
|
|
4327
4327
|
$.showArrow ? (i(), p("div", {
|
|
4328
4328
|
key: 0,
|
|
4329
4329
|
class: n(R.value)
|
|
4330
|
-
}, null, 2)) :
|
|
4331
|
-
a(d).popover ?
|
|
4330
|
+
}, null, 2)) : j("", !0),
|
|
4331
|
+
a(d).popover ? H($.$slots, "popover", { key: 1 }) : (i(), p(ue, { key: 2 }, [
|
|
4332
4332
|
$.title && !$.tooltip ? (i(), p("div", {
|
|
4333
4333
|
key: 0,
|
|
4334
4334
|
class: n(a(l).e("title"))
|
|
4335
|
-
}, G($.title), 3)) :
|
|
4335
|
+
}, G($.title), 3)) : j("", !0),
|
|
4336
4336
|
v("div", {
|
|
4337
4337
|
class: n(a(l).e("body"))
|
|
4338
4338
|
}, [
|
|
4339
|
-
|
|
4339
|
+
H($.$slots, "content", {}, () => [
|
|
4340
4340
|
de(G($.content), 1)
|
|
4341
4341
|
])
|
|
4342
4342
|
], 2)
|
|
4343
4343
|
], 64))
|
|
4344
|
-
], 38)) :
|
|
4344
|
+
], 38)) : j("", !0)
|
|
4345
4345
|
]),
|
|
4346
4346
|
_: 3
|
|
4347
4347
|
}, 8, ["name"])
|
|
@@ -4461,11 +4461,11 @@ const Et = {
|
|
|
4461
4461
|
const b = t.color;
|
|
4462
4462
|
return `linear-gradient(45deg, ${b} 25%, transparent 25%), linear-gradient(-45deg, ${b} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${b} 75%), linear-gradient(-45deg, transparent 75%, ${b} 75%)`;
|
|
4463
4463
|
}, f = () => {
|
|
4464
|
-
const b = t.color,
|
|
4465
|
-
return `radial-gradient(circle at center, ${b} ${
|
|
4464
|
+
const b = t.color, P = r(t.size) * t.dotScale / 2;
|
|
4465
|
+
return `radial-gradient(circle at center, ${b} ${P}px, transparent 0)`;
|
|
4466
4466
|
}, m = () => {
|
|
4467
|
-
const b = l(t.direction), L = r(t.lineWidth),
|
|
4468
|
-
return `repeating-linear-gradient(${b}deg, ${
|
|
4467
|
+
const b = l(t.direction), L = r(t.lineWidth), P = t.color, N = r(t.size);
|
|
4468
|
+
return `repeating-linear-gradient(${b}deg, ${P}, ${P} ${L}px, transparent ${L}px, transparent ${N}px)`;
|
|
4469
4469
|
}, g = () => {
|
|
4470
4470
|
const b = e(t.lineWidth), L = t.color;
|
|
4471
4471
|
return `linear-gradient(${L} ${b}, transparent 0), linear-gradient(90deg, ${L} ${b}, transparent 0)`;
|
|
@@ -4481,8 +4481,8 @@ const Et = {
|
|
|
4481
4481
|
default:
|
|
4482
4482
|
return `${b} ${b}`;
|
|
4483
4483
|
}
|
|
4484
|
-
}),
|
|
4485
|
-
const b = r(t.size),
|
|
4484
|
+
}), V = s(() => {
|
|
4485
|
+
const b = r(t.size), P = r(t.lineWidth) / 2;
|
|
4486
4486
|
switch (t.pattern) {
|
|
4487
4487
|
case "checkerboard": {
|
|
4488
4488
|
const N = b / 2;
|
|
@@ -4490,11 +4490,11 @@ const Et = {
|
|
|
4490
4490
|
}
|
|
4491
4491
|
case "grid":
|
|
4492
4492
|
case "cross":
|
|
4493
|
-
return `0 -${
|
|
4493
|
+
return `0 -${P}px, -${P}px 0`;
|
|
4494
4494
|
default:
|
|
4495
4495
|
return "0 0";
|
|
4496
4496
|
}
|
|
4497
|
-
}),
|
|
4497
|
+
}), x = s(() => {
|
|
4498
4498
|
switch (t.pattern) {
|
|
4499
4499
|
case "grid":
|
|
4500
4500
|
return d();
|
|
@@ -4510,9 +4510,9 @@ const Et = {
|
|
|
4510
4510
|
return d();
|
|
4511
4511
|
}
|
|
4512
4512
|
}), T = s(() => ({
|
|
4513
|
-
backgroundImage:
|
|
4513
|
+
backgroundImage: x.value,
|
|
4514
4514
|
backgroundSize: k.value,
|
|
4515
|
-
backgroundPosition:
|
|
4515
|
+
backgroundPosition: V.value,
|
|
4516
4516
|
backgroundColor: t.backgroundColor,
|
|
4517
4517
|
opacity: t.opacity
|
|
4518
4518
|
})), I = s(() => [
|
|
@@ -4522,7 +4522,7 @@ const Et = {
|
|
|
4522
4522
|
]);
|
|
4523
4523
|
return (b, L) => (i(), p("div", {
|
|
4524
4524
|
class: n(I.value),
|
|
4525
|
-
style:
|
|
4525
|
+
style: U(T.value)
|
|
4526
4526
|
}, null, 6));
|
|
4527
4527
|
}
|
|
4528
4528
|
}), Sr = re(rl), sl = {
|
|
@@ -4719,20 +4719,20 @@ const Et = {
|
|
|
4719
4719
|
props: sl,
|
|
4720
4720
|
emits: nl,
|
|
4721
4721
|
setup(u, { expose: t, emit: o }) {
|
|
4722
|
-
const e = u, r = o, l = xe(), d = ne("dropdown"), c = { sm: 28, md: 36, lg: 44 }, f = W(null), m = W(null), g = W(null), k = W(null),
|
|
4723
|
-
get: () =>
|
|
4724
|
-
set: (
|
|
4725
|
-
|
|
4722
|
+
const e = u, r = o, l = xe(), d = ne("dropdown"), c = { sm: 28, md: 36, lg: 44 }, f = W(null), m = W(null), g = W(null), k = W(null), V = W(!1), x = W(""), T = W(-1), I = W(!1), b = s(() => e.inline && e.filterable), L = s({
|
|
4723
|
+
get: () => V.value ? x.value : M.value,
|
|
4724
|
+
set: (B) => {
|
|
4725
|
+
x.value = B;
|
|
4726
4726
|
}
|
|
4727
|
-
}),
|
|
4728
|
-
var
|
|
4729
|
-
return ((
|
|
4727
|
+
}), P = W({ top: 0, left: 0, width: 0 }), N = s(() => e.options.find((B) => B.value === e.modelValue)), M = s(() => {
|
|
4728
|
+
var B;
|
|
4729
|
+
return ((B = N.value) == null ? void 0 : B.label) || "";
|
|
4730
4730
|
}), C = s(() => {
|
|
4731
|
-
if (!e.filterable || !
|
|
4731
|
+
if (!e.filterable || !x.value)
|
|
4732
4732
|
return e.options;
|
|
4733
|
-
const
|
|
4733
|
+
const B = x.value.toLowerCase();
|
|
4734
4734
|
return e.options.filter(
|
|
4735
|
-
(Q) => Q.label.toLowerCase().includes(
|
|
4735
|
+
(Q) => Q.label.toLowerCase().includes(B)
|
|
4736
4736
|
);
|
|
4737
4737
|
}), D = s(() => e.modelValue !== "" && e.modelValue !== null && e.modelValue !== void 0), X = s(() => e.clearable && !e.disabled && D.value), R = s(() => [
|
|
4738
4738
|
d.b(),
|
|
@@ -4740,19 +4740,19 @@ const Et = {
|
|
|
4740
4740
|
d.m(e.variant),
|
|
4741
4741
|
d.m(`shape-${e.shape}`),
|
|
4742
4742
|
d.is("disabled", e.disabled),
|
|
4743
|
-
d.is("active",
|
|
4743
|
+
d.is("active", V.value),
|
|
4744
4744
|
d.is("clearable", X.value),
|
|
4745
4745
|
d.is("clearing", I.value),
|
|
4746
4746
|
d.is("inline", b.value),
|
|
4747
4747
|
d.is("custom-color", !!e.color),
|
|
4748
4748
|
d.is("custom-size", !ae(e.size))
|
|
4749
4749
|
]), S = s(() => {
|
|
4750
|
-
const
|
|
4751
|
-
return e.color && (
|
|
4750
|
+
const B = {};
|
|
4751
|
+
return e.color && (B["--cp-dropdown-custom-color"] = e.color, B["--cp-dropdown-custom-color-light"] = `${e.color}33`), e.inactiveColor && (B["--cp-dropdown-inactive-color"] = e.inactiveColor), e.placeholderColor && (B["--cp-dropdown-placeholder-color"] = e.placeholderColor), ae(e.size) || (B["--cp-dropdown-height"] = Se(e.size, c)), e.clearDuration !== 150 && (B["--cp-dropdown-clear-duration"] = `${e.clearDuration}ms`), B;
|
|
4752
4752
|
}), J = s(() => ({
|
|
4753
|
-
top: `${
|
|
4754
|
-
left: `${
|
|
4755
|
-
width: `${
|
|
4753
|
+
top: `${P.value.top}px`,
|
|
4754
|
+
left: `${P.value.left}px`,
|
|
4755
|
+
width: `${P.value.width}px`,
|
|
4756
4756
|
maxHeight: `${e.maxHeight}px`
|
|
4757
4757
|
})), ie = s(() => [
|
|
4758
4758
|
d.e("popper"),
|
|
@@ -4761,81 +4761,81 @@ const Et = {
|
|
|
4761
4761
|
]);
|
|
4762
4762
|
let E = !1;
|
|
4763
4763
|
const Y = () => {
|
|
4764
|
-
!
|
|
4764
|
+
!V.value || !f.value || E || (E = !0, requestAnimationFrame(() => {
|
|
4765
4765
|
if (!f.value) {
|
|
4766
4766
|
E = !1;
|
|
4767
4767
|
return;
|
|
4768
4768
|
}
|
|
4769
|
-
const
|
|
4770
|
-
let le = 0,
|
|
4771
|
-
const
|
|
4772
|
-
e.placement.split("-")[0] === "bottom" ? le =
|
|
4769
|
+
const B = f.value.getBoundingClientRect(), Q = 4;
|
|
4770
|
+
let le = 0, K = B.left + window.scrollX;
|
|
4771
|
+
const _ = B.width;
|
|
4772
|
+
e.placement.split("-")[0] === "bottom" ? le = B.bottom + Q + window.scrollY : le = B.top - e.maxHeight - Q + window.scrollY, P.value = { top: le, left: K, width: _ }, E = !1;
|
|
4773
4773
|
}));
|
|
4774
4774
|
}, w = () => {
|
|
4775
|
-
e.disabled || (
|
|
4775
|
+
e.disabled || (V.value = !0, r("visibleChange", !0), r("focus"), Pe(() => {
|
|
4776
4776
|
Y(), b.value && k.value ? k.value.focus() : e.filterable && g.value && g.value.focus();
|
|
4777
4777
|
}));
|
|
4778
|
-
},
|
|
4779
|
-
|
|
4778
|
+
}, q = () => {
|
|
4779
|
+
V.value = !1, x.value = "", T.value = -1, r("visibleChange", !1), r("blur");
|
|
4780
4780
|
}, te = () => {
|
|
4781
|
-
|
|
4782
|
-
}, A = (
|
|
4783
|
-
|
|
4784
|
-
}, $ = (
|
|
4785
|
-
|
|
4781
|
+
V.value ? q() : w();
|
|
4782
|
+
}, A = (B) => {
|
|
4783
|
+
B.disabled || (r("update:modelValue", B.value), r("change", B.value), q());
|
|
4784
|
+
}, $ = (B) => {
|
|
4785
|
+
B.stopPropagation(), I.value = !0, setTimeout(() => {
|
|
4786
4786
|
r("update:modelValue", ""), r("clear"), I.value = !1;
|
|
4787
4787
|
}, e.clearDuration);
|
|
4788
|
-
}, y = (
|
|
4789
|
-
var
|
|
4790
|
-
if (!
|
|
4791
|
-
const Q =
|
|
4792
|
-
((
|
|
4793
|
-
}, h = (
|
|
4794
|
-
if (!
|
|
4795
|
-
(
|
|
4788
|
+
}, y = (B) => B.value === e.modelValue, O = (B) => {
|
|
4789
|
+
var K, _;
|
|
4790
|
+
if (!V.value) return;
|
|
4791
|
+
const Q = B.target;
|
|
4792
|
+
((K = f.value) == null ? void 0 : K.contains(Q)) || ((_ = m.value) == null ? void 0 : _.contains(Q)) || q();
|
|
4793
|
+
}, h = (B) => {
|
|
4794
|
+
if (!V.value) {
|
|
4795
|
+
(B.key === "Enter" || B.key === " " || B.key === "ArrowDown") && (B.preventDefault(), w());
|
|
4796
4796
|
return;
|
|
4797
4797
|
}
|
|
4798
|
-
switch (
|
|
4798
|
+
switch (B.key) {
|
|
4799
4799
|
case "Escape":
|
|
4800
|
-
|
|
4800
|
+
B.preventDefault(), q();
|
|
4801
4801
|
break;
|
|
4802
4802
|
case "ArrowDown":
|
|
4803
|
-
|
|
4803
|
+
B.preventDefault(), T.value = Math.min(T.value + 1, C.value.length - 1);
|
|
4804
4804
|
break;
|
|
4805
4805
|
case "ArrowUp":
|
|
4806
|
-
|
|
4806
|
+
B.preventDefault(), T.value = Math.max(T.value - 1, 0);
|
|
4807
4807
|
break;
|
|
4808
4808
|
case "Enter":
|
|
4809
|
-
|
|
4809
|
+
B.preventDefault(), T.value >= 0 && T.value < C.value.length && A(C.value[T.value]);
|
|
4810
4810
|
break;
|
|
4811
4811
|
}
|
|
4812
|
-
},
|
|
4813
|
-
var
|
|
4814
|
-
(
|
|
4815
|
-
},
|
|
4816
|
-
var
|
|
4817
|
-
(
|
|
4812
|
+
}, z = () => {
|
|
4813
|
+
var B;
|
|
4814
|
+
(B = f.value) == null || B.focus();
|
|
4815
|
+
}, F = () => {
|
|
4816
|
+
var B;
|
|
4817
|
+
(B = f.value) == null || B.blur();
|
|
4818
4818
|
};
|
|
4819
|
-
return ge(
|
|
4820
|
-
|
|
4819
|
+
return ge(V, async (B) => {
|
|
4820
|
+
B && (await Pe(), Y());
|
|
4821
4821
|
}), t({
|
|
4822
4822
|
/** @description 打开下拉面板 */
|
|
4823
4823
|
open: w,
|
|
4824
4824
|
/** @description 关闭下拉面板 */
|
|
4825
|
-
close:
|
|
4825
|
+
close: q,
|
|
4826
4826
|
/** @description 切换下拉面板 */
|
|
4827
4827
|
toggle: te,
|
|
4828
4828
|
/** @description 使下拉框获取焦点 */
|
|
4829
|
-
focus:
|
|
4829
|
+
focus: z,
|
|
4830
4830
|
/** @description 使下拉框失去焦点 */
|
|
4831
|
-
blur:
|
|
4831
|
+
blur: F
|
|
4832
4832
|
}), Me(() => {
|
|
4833
|
-
document.addEventListener("click",
|
|
4833
|
+
document.addEventListener("click", O), window.addEventListener("resize", Y), window.addEventListener("scroll", Y, !0);
|
|
4834
4834
|
}), Ve(() => {
|
|
4835
|
-
document.removeEventListener("click",
|
|
4836
|
-
}), (
|
|
4835
|
+
document.removeEventListener("click", O), window.removeEventListener("resize", Y), window.removeEventListener("scroll", Y, !0);
|
|
4836
|
+
}), (B, Q) => (i(), p("div", {
|
|
4837
4837
|
class: n(R.value),
|
|
4838
|
-
style:
|
|
4838
|
+
style: U(S.value)
|
|
4839
4839
|
}, [
|
|
4840
4840
|
v("div", {
|
|
4841
4841
|
ref_key: "triggerRef",
|
|
@@ -4849,15 +4849,15 @@ const Et = {
|
|
|
4849
4849
|
key: 0,
|
|
4850
4850
|
class: n(a(d).e("prefix"))
|
|
4851
4851
|
}, [
|
|
4852
|
-
|
|
4853
|
-
], 2)) :
|
|
4852
|
+
H(B.$slots, "prefix")
|
|
4853
|
+
], 2)) : j("", !0),
|
|
4854
4854
|
b.value ? Ee((i(), p("input", {
|
|
4855
4855
|
key: 1,
|
|
4856
4856
|
ref_key: "inlineInputRef",
|
|
4857
4857
|
ref: k,
|
|
4858
4858
|
"onUpdate:modelValue": Q[0] || (Q[0] = (le) => L.value = le),
|
|
4859
|
-
class: n([a(d).e("inline-input"), a(d).is("active",
|
|
4860
|
-
placeholder:
|
|
4859
|
+
class: n([a(d).e("inline-input"), a(d).is("active", V.value)]),
|
|
4860
|
+
placeholder: V.value ? "" : D.value ? M.value : e.placeholder,
|
|
4861
4861
|
autocomplete: "off",
|
|
4862
4862
|
disabled: e.disabled,
|
|
4863
4863
|
onClick: Q[1] || (Q[1] = Ce(() => {
|
|
@@ -4869,7 +4869,7 @@ const Et = {
|
|
|
4869
4869
|
]) : (i(), p("span", {
|
|
4870
4870
|
key: 2,
|
|
4871
4871
|
class: n([a(d).e("value"), { [a(d).is("placeholder")]: !D.value }])
|
|
4872
|
-
}, G(D.value ?
|
|
4872
|
+
}, G(D.value ? M.value : e.placeholder), 3)),
|
|
4873
4873
|
X.value ? (i(), p("span", {
|
|
4874
4874
|
key: 3,
|
|
4875
4875
|
class: n(a(d).e("clear")),
|
|
@@ -4881,9 +4881,9 @@ const Et = {
|
|
|
4881
4881
|
}, [
|
|
4882
4882
|
v("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" })
|
|
4883
4883
|
], -1)
|
|
4884
|
-
])], 2)) :
|
|
4884
|
+
])], 2)) : j("", !0),
|
|
4885
4885
|
v("span", {
|
|
4886
|
-
class: n([a(d).e("arrow"), { [a(d).is("reverse")]:
|
|
4886
|
+
class: n([a(d).e("arrow"), { [a(d).is("reverse")]: V.value }])
|
|
4887
4887
|
}, [...Q[7] || (Q[7] = [
|
|
4888
4888
|
v("svg", {
|
|
4889
4889
|
viewBox: "0 0 24 24",
|
|
@@ -4893,17 +4893,17 @@ const Et = {
|
|
|
4893
4893
|
], -1)
|
|
4894
4894
|
])], 2)
|
|
4895
4895
|
], 42, il),
|
|
4896
|
-
(i(), ee(Je, { to:
|
|
4896
|
+
(i(), ee(Je, { to: B.teleportTo }, [
|
|
4897
4897
|
he(Ie, {
|
|
4898
4898
|
name: a(d).namespace + "-dropdown-fade"
|
|
4899
4899
|
}, {
|
|
4900
4900
|
default: ve(() => [
|
|
4901
|
-
|
|
4901
|
+
V.value ? (i(), p("div", {
|
|
4902
4902
|
key: 0,
|
|
4903
4903
|
ref_key: "popperRef",
|
|
4904
4904
|
ref: m,
|
|
4905
4905
|
class: n(ie.value),
|
|
4906
|
-
style:
|
|
4906
|
+
style: U(J.value)
|
|
4907
4907
|
}, [
|
|
4908
4908
|
e.filterable && !b.value ? (i(), p("div", {
|
|
4909
4909
|
key: 0,
|
|
@@ -4912,42 +4912,42 @@ const Et = {
|
|
|
4912
4912
|
Ee(v("input", {
|
|
4913
4913
|
ref_key: "filterInputRef",
|
|
4914
4914
|
ref: g,
|
|
4915
|
-
"onUpdate:modelValue": Q[4] || (Q[4] = (le) =>
|
|
4915
|
+
"onUpdate:modelValue": Q[4] || (Q[4] = (le) => x.value = le),
|
|
4916
4916
|
class: n(a(d).e("filter-input")),
|
|
4917
4917
|
type: "text",
|
|
4918
4918
|
placeholder: e.filterPlaceholder,
|
|
4919
4919
|
onClick: Q[5] || (Q[5] = Ce(() => {
|
|
4920
4920
|
}, ["stop"]))
|
|
4921
4921
|
}, null, 10, cl), [
|
|
4922
|
-
[at,
|
|
4922
|
+
[at, x.value]
|
|
4923
4923
|
])
|
|
4924
|
-
], 2)) :
|
|
4924
|
+
], 2)) : j("", !0),
|
|
4925
4925
|
v("ul", {
|
|
4926
4926
|
class: n(a(d).e("options"))
|
|
4927
4927
|
}, [
|
|
4928
|
-
|
|
4928
|
+
B.options.length === 0 ? (i(), p("li", {
|
|
4929
4929
|
key: 0,
|
|
4930
4930
|
class: n(a(d).e("empty"))
|
|
4931
4931
|
}, [
|
|
4932
|
-
|
|
4933
|
-
de(G(
|
|
4932
|
+
H(B.$slots, "empty", {}, () => [
|
|
4933
|
+
de(G(B.noDataText), 1)
|
|
4934
4934
|
])
|
|
4935
4935
|
], 2)) : C.value.length === 0 ? (i(), p("li", {
|
|
4936
4936
|
key: 1,
|
|
4937
4937
|
class: n(a(d).e("empty"))
|
|
4938
|
-
}, G(
|
|
4939
|
-
(i(!0), p(ue, null, ke(C.value, (le,
|
|
4938
|
+
}, G(B.noMatchText), 3)) : j("", !0),
|
|
4939
|
+
(i(!0), p(ue, null, ke(C.value, (le, K) => (i(), p("li", {
|
|
4940
4940
|
key: le.value,
|
|
4941
4941
|
class: n([
|
|
4942
4942
|
a(d).e("option"),
|
|
4943
4943
|
a(d).is("selected", y(le)),
|
|
4944
4944
|
a(d).is("disabled", !!le.disabled),
|
|
4945
|
-
a(d).is("hover", T.value ===
|
|
4945
|
+
a(d).is("hover", T.value === K)
|
|
4946
4946
|
]),
|
|
4947
|
-
onClick: (
|
|
4948
|
-
onMouseenter: (
|
|
4947
|
+
onClick: (_) => A(le),
|
|
4948
|
+
onMouseenter: (_) => T.value = K
|
|
4949
4949
|
}, [
|
|
4950
|
-
|
|
4950
|
+
H(B.$slots, "default", { option: le }, () => [
|
|
4951
4951
|
de(G(le.label), 1)
|
|
4952
4952
|
]),
|
|
4953
4953
|
y(le) ? (i(), p("span", {
|
|
@@ -4960,10 +4960,10 @@ const Et = {
|
|
|
4960
4960
|
}, [
|
|
4961
4961
|
v("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" })
|
|
4962
4962
|
], -1)
|
|
4963
|
-
])], 2)) :
|
|
4963
|
+
])], 2)) : j("", !0)
|
|
4964
4964
|
], 42, dl))), 128))
|
|
4965
4965
|
], 2)
|
|
4966
|
-
], 6)) :
|
|
4966
|
+
], 6)) : j("", !0)
|
|
4967
4967
|
]),
|
|
4968
4968
|
_: 3
|
|
4969
4969
|
}, 8, ["name"])
|
|
@@ -5096,21 +5096,21 @@ const Et = {
|
|
|
5096
5096
|
emits: fl,
|
|
5097
5097
|
setup(u, { expose: t, emit: o }) {
|
|
5098
5098
|
const e = u, r = o, l = ne("checkbox"), d = { sm: 14, md: 18, lg: 22 }, c = $e(ht, void 0), f = s(() => !!c), m = s(() => {
|
|
5099
|
-
var
|
|
5100
|
-
return e.disabled || ((
|
|
5099
|
+
var M;
|
|
5100
|
+
return e.disabled || ((M = c == null ? void 0 : c.disabled) == null ? void 0 : M.value) || !1;
|
|
5101
5101
|
}), g = s(() => {
|
|
5102
|
-
var
|
|
5103
|
-
return ((
|
|
5102
|
+
var M;
|
|
5103
|
+
return ((M = c == null ? void 0 : c.size) == null ? void 0 : M.value) || e.size;
|
|
5104
5104
|
}), k = s(() => {
|
|
5105
|
-
var
|
|
5106
|
-
return ((
|
|
5105
|
+
var M;
|
|
5106
|
+
return ((M = c == null ? void 0 : c.type) == null ? void 0 : M.value) || e.type;
|
|
5107
|
+
}), V = s(() => {
|
|
5108
|
+
var M;
|
|
5109
|
+
return ((M = c == null ? void 0 : c.shape) == null ? void 0 : M.value) || e.shape;
|
|
5107
5110
|
}), x = s(() => {
|
|
5108
|
-
var
|
|
5109
|
-
return ((P = c == null ? void 0 : c.shape) == null ? void 0 : P.value) || e.shape;
|
|
5110
|
-
}), z = s(() => {
|
|
5111
|
-
var P;
|
|
5111
|
+
var M;
|
|
5112
5112
|
if (f.value && c) {
|
|
5113
|
-
const C = (
|
|
5113
|
+
const C = (M = c.modelValue) == null ? void 0 : M.value;
|
|
5114
5114
|
return Array.isArray(C) && e.label !== void 0 ? C.includes(e.label) : !1;
|
|
5115
5115
|
}
|
|
5116
5116
|
return typeof e.modelValue == "boolean" ? e.modelValue : e.modelValue === e.trueValue;
|
|
@@ -5129,32 +5129,32 @@ const Et = {
|
|
|
5129
5129
|
}, b = s(() => [
|
|
5130
5130
|
l.b(),
|
|
5131
5131
|
ae(g.value) && l.m(g.value),
|
|
5132
|
-
l.m(`shape-${
|
|
5133
|
-
l.is("checked",
|
|
5132
|
+
l.m(`shape-${V.value}`),
|
|
5133
|
+
l.is("checked", x.value),
|
|
5134
5134
|
l.is("disabled", m.value),
|
|
5135
5135
|
l.is("indeterminate", e.indeterminate),
|
|
5136
5136
|
l.is("border", e.border),
|
|
5137
5137
|
l.is("custom-size", !ae(g.value))
|
|
5138
5138
|
]), L = s(() => {
|
|
5139
|
-
const
|
|
5140
|
-
return e.color ? (
|
|
5141
|
-
}),
|
|
5139
|
+
const M = {};
|
|
5140
|
+
return e.color ? (M["--cp-checkbox-active-color"] = e.color, M["--cp-checkbox-active-color-light"] = `${e.color}40`) : k.value && T[k.value] && (M["--cp-checkbox-active-color"] = T[k.value], M["--cp-checkbox-active-color-light"] = `var(--cp-color-${k.value}-light)`), e.checkColor ? M["--cp-checkbox-check-color"] = e.checkColor : k.value && I[k.value] && (M["--cp-checkbox-check-color"] = I[k.value]), ae(g.value) || (M["--cp-checkbox-size"] = Se(g.value, d)), M;
|
|
5141
|
+
}), P = () => {
|
|
5142
5142
|
if (!m.value)
|
|
5143
5143
|
if (f.value && c && e.label !== void 0)
|
|
5144
5144
|
c.handleChange(e.label);
|
|
5145
5145
|
else {
|
|
5146
|
-
const
|
|
5147
|
-
r("update:modelValue",
|
|
5146
|
+
const M = x.value ? e.falseValue : e.trueValue;
|
|
5147
|
+
r("update:modelValue", M), r("change", M);
|
|
5148
5148
|
}
|
|
5149
5149
|
}, N = W();
|
|
5150
5150
|
return t({
|
|
5151
5151
|
/** @description input 元素引用 */
|
|
5152
5152
|
inputRef: N,
|
|
5153
5153
|
/** @description 是否选中 */
|
|
5154
|
-
checked:
|
|
5155
|
-
}), (
|
|
5154
|
+
checked: x
|
|
5155
|
+
}), (M, C) => (i(), p("label", {
|
|
5156
5156
|
class: n(b.value),
|
|
5157
|
-
style:
|
|
5157
|
+
style: U(L.value)
|
|
5158
5158
|
}, [
|
|
5159
5159
|
v("input", {
|
|
5160
5160
|
ref_key: "inputRef",
|
|
@@ -5162,14 +5162,14 @@ const Et = {
|
|
|
5162
5162
|
type: "checkbox",
|
|
5163
5163
|
class: n(a(l).e("input")),
|
|
5164
5164
|
name: e.name,
|
|
5165
|
-
checked:
|
|
5165
|
+
checked: x.value,
|
|
5166
5166
|
disabled: m.value,
|
|
5167
|
-
onChange:
|
|
5167
|
+
onChange: P
|
|
5168
5168
|
}, null, 42, vl),
|
|
5169
5169
|
v("span", {
|
|
5170
5170
|
class: n(a(l).e("indicator"))
|
|
5171
5171
|
}, [
|
|
5172
|
-
|
|
5172
|
+
x.value && !e.indeterminate ? (i(), p("svg", {
|
|
5173
5173
|
key: 0,
|
|
5174
5174
|
class: n(a(l).e("icon")),
|
|
5175
5175
|
viewBox: "0 0 24 24",
|
|
@@ -5178,7 +5178,7 @@ const Et = {
|
|
|
5178
5178
|
"stroke-linecap": "square"
|
|
5179
5179
|
}, [...C[0] || (C[0] = [
|
|
5180
5180
|
v("polyline", { points: "4,12 10,18 20,6" }, null, -1)
|
|
5181
|
-
])], 2)) :
|
|
5181
|
+
])], 2)) : j("", !0),
|
|
5182
5182
|
e.indeterminate ? (i(), p("svg", {
|
|
5183
5183
|
key: 1,
|
|
5184
5184
|
class: n(a(l).e("icon")),
|
|
@@ -5193,12 +5193,12 @@ const Et = {
|
|
|
5193
5193
|
x2: "19",
|
|
5194
5194
|
y2: "12"
|
|
5195
5195
|
}, null, -1)
|
|
5196
|
-
])], 2)) :
|
|
5196
|
+
])], 2)) : j("", !0)
|
|
5197
5197
|
], 2),
|
|
5198
5198
|
v("span", {
|
|
5199
5199
|
class: n(a(l).e("label"))
|
|
5200
5200
|
}, [
|
|
5201
|
-
|
|
5201
|
+
H(M.$slots, "default", {}, () => [
|
|
5202
5202
|
de(G(e.label), 1)
|
|
5203
5203
|
])
|
|
5204
5204
|
], 2)
|
|
@@ -5313,7 +5313,7 @@ const Et = {
|
|
|
5313
5313
|
class: n(d.value),
|
|
5314
5314
|
role: "group"
|
|
5315
5315
|
}, [
|
|
5316
|
-
|
|
5316
|
+
H(m.$slots, "default")
|
|
5317
5317
|
], 2));
|
|
5318
5318
|
}
|
|
5319
5319
|
}), $r = re(gl), hl = {
|
|
@@ -5429,10 +5429,10 @@ const Et = {
|
|
|
5429
5429
|
}), k = s(() => {
|
|
5430
5430
|
var N;
|
|
5431
5431
|
return ((N = c == null ? void 0 : c.type) == null ? void 0 : N.value) || e.type;
|
|
5432
|
-
}),
|
|
5432
|
+
}), V = s(() => {
|
|
5433
5433
|
var N;
|
|
5434
5434
|
return f.value && c ? ((N = c.modelValue) == null ? void 0 : N.value) === e.value : e.modelValue === e.value;
|
|
5435
|
-
}),
|
|
5435
|
+
}), x = {
|
|
5436
5436
|
primary: "var(--cp-color-primary)",
|
|
5437
5437
|
success: "var(--cp-color-success)",
|
|
5438
5438
|
warning: "var(--cp-color-warning)",
|
|
@@ -5447,36 +5447,36 @@ const Et = {
|
|
|
5447
5447
|
}, I = s(() => [
|
|
5448
5448
|
l.b(),
|
|
5449
5449
|
ae(g.value) && l.m(g.value),
|
|
5450
|
-
l.is("checked",
|
|
5450
|
+
l.is("checked", V.value),
|
|
5451
5451
|
l.is("disabled", m.value),
|
|
5452
5452
|
l.is("border", e.border),
|
|
5453
5453
|
l.is("glow", e.glow),
|
|
5454
5454
|
l.is("custom-size", !ae(g.value))
|
|
5455
5455
|
]), b = s(() => {
|
|
5456
5456
|
const N = {};
|
|
5457
|
-
return e.color ? (N["--cp-radio-active-color"] = e.color, N["--cp-radio-active-color-light"] = `${e.color}40`) : k.value &&
|
|
5457
|
+
return e.color ? (N["--cp-radio-active-color"] = e.color, N["--cp-radio-active-color-light"] = `${e.color}40`) : k.value && x[k.value] && (N["--cp-radio-active-color"] = x[k.value], N["--cp-radio-active-color-light"] = `var(--cp-color-${k.value}-light)`), e.dotColor ? N["--cp-radio-dot-color"] = e.dotColor : k.value && T[k.value] && (N["--cp-radio-dot-color"] = T[k.value]), ae(g.value) || (N["--cp-radio-size"] = Se(g.value, d)), N;
|
|
5458
5458
|
}), L = () => {
|
|
5459
|
-
if (m.value ||
|
|
5459
|
+
if (m.value || V.value) return;
|
|
5460
5460
|
const N = e.value;
|
|
5461
5461
|
f.value && c ? c.handleChange(N) : (r("update:modelValue", N), r("change", N));
|
|
5462
|
-
},
|
|
5462
|
+
}, P = W();
|
|
5463
5463
|
return t({
|
|
5464
5464
|
/** @description input 元素引用 */
|
|
5465
|
-
inputRef:
|
|
5465
|
+
inputRef: P,
|
|
5466
5466
|
/** @description 是否选中 */
|
|
5467
|
-
checked:
|
|
5468
|
-
}), (N,
|
|
5467
|
+
checked: V
|
|
5468
|
+
}), (N, M) => (i(), p("label", {
|
|
5469
5469
|
class: n(I.value),
|
|
5470
|
-
style:
|
|
5470
|
+
style: U(b.value)
|
|
5471
5471
|
}, [
|
|
5472
5472
|
v("input", {
|
|
5473
5473
|
ref_key: "inputRef",
|
|
5474
|
-
ref:
|
|
5474
|
+
ref: P,
|
|
5475
5475
|
type: "radio",
|
|
5476
5476
|
class: n(a(l).e("input")),
|
|
5477
5477
|
name: e.name,
|
|
5478
5478
|
value: e.value,
|
|
5479
|
-
checked:
|
|
5479
|
+
checked: V.value,
|
|
5480
5480
|
disabled: m.value,
|
|
5481
5481
|
onChange: L
|
|
5482
5482
|
}, null, 42, kl),
|
|
@@ -5486,16 +5486,16 @@ const Et = {
|
|
|
5486
5486
|
v("span", {
|
|
5487
5487
|
class: n(a(l).e("indicator"))
|
|
5488
5488
|
}, [
|
|
5489
|
-
|
|
5489
|
+
V.value ? (i(), p("span", {
|
|
5490
5490
|
key: 0,
|
|
5491
5491
|
class: n(a(l).e("dot"))
|
|
5492
|
-
}, null, 2)) :
|
|
5492
|
+
}, null, 2)) : j("", !0)
|
|
5493
5493
|
], 2)
|
|
5494
5494
|
], 2),
|
|
5495
5495
|
v("span", {
|
|
5496
5496
|
class: n(a(l).e("label"))
|
|
5497
5497
|
}, [
|
|
5498
|
-
|
|
5498
|
+
H(N.$slots, "default", {}, () => [
|
|
5499
5499
|
de(G(e.label), 1)
|
|
5500
5500
|
])
|
|
5501
5501
|
], 2)
|
|
@@ -5575,7 +5575,7 @@ const Et = {
|
|
|
5575
5575
|
class: n(d.value),
|
|
5576
5576
|
role: "radiogroup"
|
|
5577
5577
|
}, [
|
|
5578
|
-
|
|
5578
|
+
H(m.$slots, "default")
|
|
5579
5579
|
], 2));
|
|
5580
5580
|
}
|
|
5581
5581
|
}), zr = re($l), xl = {
|
|
@@ -5716,14 +5716,14 @@ const Et = {
|
|
|
5716
5716
|
a(o).is("custom-color", !!t.color),
|
|
5717
5717
|
a(o).is("custom-text-color", !!t.textColor)
|
|
5718
5718
|
]),
|
|
5719
|
-
style:
|
|
5719
|
+
style: U(c.value)
|
|
5720
5720
|
}, [
|
|
5721
|
-
|
|
5721
|
+
H(f.$slots, "default"),
|
|
5722
5722
|
he(Ie, {
|
|
5723
5723
|
name: a(o).namespace + "-badge-fade"
|
|
5724
5724
|
}, {
|
|
5725
5725
|
default: ve(() => [
|
|
5726
|
-
r.value ?
|
|
5726
|
+
r.value ? j("", !0) : (i(), p("sup", {
|
|
5727
5727
|
key: 0,
|
|
5728
5728
|
class: n(d.value)
|
|
5729
5729
|
}, G(l.value), 3))
|
|
@@ -5985,7 +5985,7 @@ const Et = {
|
|
|
5985
5985
|
o.is("current", f.value),
|
|
5986
5986
|
o.is("disabled", t.node.disabled),
|
|
5987
5987
|
o.is("leaf", t.node.isLeaf)
|
|
5988
|
-
]),
|
|
5988
|
+
]), V = s(() => t.node.isLeaf ? null : l.value && e.collapseIcon ? r(e.collapseIcon) : !l.value && e.expandIcon || e.expandIcon ? r(e.expandIcon) : null), x = s(() => t.node.isLeaf ? r(e.leafIcon) : null), T = s(() => !!e.expandIcon && !e.collapseIcon), I = s(() => {
|
|
5989
5989
|
var C;
|
|
5990
5990
|
if (e.nodeIcon) {
|
|
5991
5991
|
if (typeof e.nodeIcon == "function")
|
|
@@ -6009,11 +6009,11 @@ const Et = {
|
|
|
6009
6009
|
() => I.value.component !== null || I.value.iconString !== null
|
|
6010
6010
|
), L = (C) => {
|
|
6011
6011
|
C.stopPropagation(), t.node.isLeaf || e.toggleExpand(t.node);
|
|
6012
|
-
},
|
|
6012
|
+
}, P = (C) => {
|
|
6013
6013
|
C.stopPropagation(), e.toggleCheck(t.node);
|
|
6014
6014
|
}, N = () => {
|
|
6015
6015
|
e.handleNodeClick(t.node), !t.node.isLeaf && !e.showCheckbox && e.toggleExpand(t.node);
|
|
6016
|
-
},
|
|
6016
|
+
}, M = W();
|
|
6017
6017
|
return (C, D) => {
|
|
6018
6018
|
const X = ct("CpTreeNode");
|
|
6019
6019
|
return Ee((i(), p("div", {
|
|
@@ -6022,7 +6022,7 @@ const Et = {
|
|
|
6022
6022
|
}, [
|
|
6023
6023
|
v("div", {
|
|
6024
6024
|
class: n(k.value),
|
|
6025
|
-
style:
|
|
6025
|
+
style: U(g.value),
|
|
6026
6026
|
onClick: N
|
|
6027
6027
|
}, [
|
|
6028
6028
|
v("span", {
|
|
@@ -6030,7 +6030,7 @@ const Et = {
|
|
|
6030
6030
|
a(o).e("expand-icon"),
|
|
6031
6031
|
a(o).is("expanded", l.value),
|
|
6032
6032
|
a(o).is("leaf", C.node.isLeaf),
|
|
6033
|
-
a(o).is("custom-icon", !!
|
|
6033
|
+
a(o).is("custom-icon", !!V.value || !!x.value),
|
|
6034
6034
|
a(o).is("rotate-expand", T.value && l.value)
|
|
6035
6035
|
]),
|
|
6036
6036
|
onClick: L
|
|
@@ -6040,7 +6040,7 @@ const Et = {
|
|
|
6040
6040
|
node: C.node,
|
|
6041
6041
|
data: C.node.data,
|
|
6042
6042
|
expanded: l.value
|
|
6043
|
-
}, null, 8, ["node", "data", "expanded"])) :
|
|
6043
|
+
}, null, 8, ["node", "data", "expanded"])) : V.value ? (i(), ee(we(V.value), { key: 1 })) : x.value ? (i(), ee(we(x.value), { key: 2 })) : (i(), p(ue, { key: 3 }, [
|
|
6044
6044
|
C.node.isLeaf ? (i(), p("span", {
|
|
6045
6045
|
key: 1,
|
|
6046
6046
|
class: n(a(o).e("leaf-dot"))
|
|
@@ -6057,8 +6057,8 @@ const Et = {
|
|
|
6057
6057
|
key: 1,
|
|
6058
6058
|
icon: I.value.iconString,
|
|
6059
6059
|
size: "sm"
|
|
6060
|
-
}, null, 8, ["icon"])) :
|
|
6061
|
-
], 2)) :
|
|
6060
|
+
}, null, 8, ["icon"])) : j("", !0)
|
|
6061
|
+
], 2)) : j("", !0),
|
|
6062
6062
|
a(e).showCheckbox ? (i(), p("span", {
|
|
6063
6063
|
key: 1,
|
|
6064
6064
|
class: n([
|
|
@@ -6067,7 +6067,7 @@ const Et = {
|
|
|
6067
6067
|
a(o).is("indeterminate", c.value),
|
|
6068
6068
|
a(o).is("disabled", C.node.disabled)
|
|
6069
6069
|
]),
|
|
6070
|
-
onClick: Ce(
|
|
6070
|
+
onClick: Ce(P, ["stop"])
|
|
6071
6071
|
}, [
|
|
6072
6072
|
d.value && !c.value ? (i(), p("svg", {
|
|
6073
6073
|
key: 0,
|
|
@@ -6079,7 +6079,7 @@ const Et = {
|
|
|
6079
6079
|
"stroke-linecap": "square"
|
|
6080
6080
|
}, [...D[1] || (D[1] = [
|
|
6081
6081
|
v("polyline", { points: "4,12 10,18 20,6" }, null, -1)
|
|
6082
|
-
])], 2)) :
|
|
6082
|
+
])], 2)) : j("", !0),
|
|
6083
6083
|
c.value ? (i(), p("svg", {
|
|
6084
6084
|
key: 1,
|
|
6085
6085
|
class: n(a(o).e("checkbox-icon")),
|
|
@@ -6095,8 +6095,8 @@ const Et = {
|
|
|
6095
6095
|
x2: "19",
|
|
6096
6096
|
y2: "12"
|
|
6097
6097
|
}, null, -1)
|
|
6098
|
-
])], 2)) :
|
|
6099
|
-
], 2)) :
|
|
6098
|
+
])], 2)) : j("", !0)
|
|
6099
|
+
], 2)) : j("", !0),
|
|
6100
6100
|
v("span", {
|
|
6101
6101
|
class: n(a(o).e("label"))
|
|
6102
6102
|
}, [
|
|
@@ -6112,7 +6112,7 @@ const Et = {
|
|
|
6112
6112
|
C.node.children.length > 0 ? Ee((i(), p("div", {
|
|
6113
6113
|
key: 0,
|
|
6114
6114
|
ref_key: "childrenRef",
|
|
6115
|
-
ref:
|
|
6115
|
+
ref: M,
|
|
6116
6116
|
class: n(a(o).e("children"))
|
|
6117
6117
|
}, [
|
|
6118
6118
|
(i(!0), p(ue, null, ke(C.node.children, (R, S) => (i(), ee(X, {
|
|
@@ -6122,7 +6122,7 @@ const Et = {
|
|
|
6122
6122
|
}, null, 8, ["node", "is-last"]))), 128))
|
|
6123
6123
|
], 2)), [
|
|
6124
6124
|
[Ke, l.value]
|
|
6125
|
-
]) :
|
|
6125
|
+
]) : j("", !0)
|
|
6126
6126
|
], 2)), [
|
|
6127
6127
|
[Ke, m.value]
|
|
6128
6128
|
]);
|
|
@@ -6134,54 +6134,54 @@ const Et = {
|
|
|
6134
6134
|
props: Bl,
|
|
6135
6135
|
emits: Ml,
|
|
6136
6136
|
setup(u, { expose: t, emit: o }) {
|
|
6137
|
-
const e = u, r = o, l = xe(), d = ne("tree"), c = (
|
|
6138
|
-
var
|
|
6139
|
-
return
|
|
6140
|
-
}, f = (
|
|
6141
|
-
var
|
|
6142
|
-
return
|
|
6143
|
-
}, m = (
|
|
6144
|
-
var
|
|
6145
|
-
return
|
|
6146
|
-
}, g = (
|
|
6147
|
-
var
|
|
6148
|
-
return
|
|
6149
|
-
}, k = (
|
|
6150
|
-
const
|
|
6151
|
-
return typeof
|
|
6152
|
-
},
|
|
6137
|
+
const e = u, r = o, l = xe(), d = ne("tree"), c = (K) => {
|
|
6138
|
+
var _;
|
|
6139
|
+
return K[((_ = e.props) == null ? void 0 : _.label) || "label"];
|
|
6140
|
+
}, f = (K) => {
|
|
6141
|
+
var _;
|
|
6142
|
+
return K[((_ = e.props) == null ? void 0 : _.children) || "children"];
|
|
6143
|
+
}, m = (K) => {
|
|
6144
|
+
var _;
|
|
6145
|
+
return K[((_ = e.props) == null ? void 0 : _.disabled) || "disabled"];
|
|
6146
|
+
}, g = (K) => {
|
|
6147
|
+
var _;
|
|
6148
|
+
return K[((_ = e.props) == null ? void 0 : _.isLeaf) || "isLeaf"];
|
|
6149
|
+
}, k = (K) => {
|
|
6150
|
+
const _ = K[e.nodeKey];
|
|
6151
|
+
return typeof _ == "string" || typeof _ == "number" ? _ : K.label;
|
|
6152
|
+
}, V = /* @__PURE__ */ new Map(), x = (K, _ = null, ce = 0) => K.map((pe) => {
|
|
6153
6153
|
const ye = k(pe), be = f(pe), ze = {
|
|
6154
6154
|
key: ye,
|
|
6155
6155
|
label: c(pe),
|
|
6156
6156
|
level: ce,
|
|
6157
6157
|
data: pe,
|
|
6158
6158
|
children: [],
|
|
6159
|
-
parent:
|
|
6159
|
+
parent: _,
|
|
6160
6160
|
disabled: m(pe) ?? !1,
|
|
6161
6161
|
isLeaf: g(pe) ?? (!be || be.length === 0),
|
|
6162
6162
|
loading: !1,
|
|
6163
6163
|
loaded: !1
|
|
6164
6164
|
};
|
|
6165
|
-
return
|
|
6165
|
+
return V.set(ye, ze), be && be.length > 0 && (ze.children = x(be, ze, ce + 1)), ze;
|
|
6166
6166
|
}), T = W([]);
|
|
6167
6167
|
ge(() => e.data, () => {
|
|
6168
|
-
|
|
6168
|
+
V.clear(), T.value = x(e.data);
|
|
6169
6169
|
}, { immediate: !0, deep: !0 });
|
|
6170
6170
|
const b = W(/* @__PURE__ */ new Set());
|
|
6171
6171
|
ge(T, () => {
|
|
6172
6172
|
if (e.defaultExpandAll) {
|
|
6173
|
-
const
|
|
6173
|
+
const K = /* @__PURE__ */ new Set(), _ = (ce) => {
|
|
6174
6174
|
for (const pe of ce)
|
|
6175
|
-
pe.isLeaf ||
|
|
6175
|
+
pe.isLeaf || K.add(pe.key), pe.children.length > 0 && _(pe.children);
|
|
6176
6176
|
};
|
|
6177
|
-
|
|
6177
|
+
_(T.value), b.value = K;
|
|
6178
6178
|
} else e.defaultExpandedKeys.length > 0 && (b.value = new Set(e.defaultExpandedKeys));
|
|
6179
6179
|
}, { immediate: !0 });
|
|
6180
|
-
const
|
|
6180
|
+
const P = s(() => e.expandedKeys !== void 0 ? new Set(e.expandedKeys) : b.value), N = W(/* @__PURE__ */ new Set()), M = s(() => e.checkedKeys !== void 0 ? new Set(e.checkedKeys) : N.value);
|
|
6181
6181
|
ge(
|
|
6182
6182
|
() => e.checkedKeys,
|
|
6183
|
-
(
|
|
6184
|
-
|
|
6183
|
+
(K) => {
|
|
6184
|
+
K !== void 0 && (N.value = new Set(K), e.checkStrictly || D());
|
|
6185
6185
|
},
|
|
6186
6186
|
{ immediate: !0 }
|
|
6187
6187
|
);
|
|
@@ -6190,74 +6190,74 @@ const Et = {
|
|
|
6190
6190
|
C.value = /* @__PURE__ */ new Set();
|
|
6191
6191
|
return;
|
|
6192
6192
|
}
|
|
6193
|
-
const
|
|
6193
|
+
const K = /* @__PURE__ */ new Set(), _ = M.value, ce = (pe) => {
|
|
6194
6194
|
for (const ye of pe)
|
|
6195
6195
|
if (ye.children.length > 0) {
|
|
6196
6196
|
ce(ye.children);
|
|
6197
6197
|
const be = ye.children.filter((me) => !me.disabled);
|
|
6198
6198
|
if (be.length === 0) continue;
|
|
6199
|
-
const ze = be.every((me) =>
|
|
6200
|
-
(me) =>
|
|
6199
|
+
const ze = be.every((me) => _.has(me.key)), Z = be.some(
|
|
6200
|
+
(me) => _.has(me.key) || K.has(me.key)
|
|
6201
6201
|
);
|
|
6202
|
-
!ze && Z &&
|
|
6202
|
+
!ze && Z && K.add(ye.key);
|
|
6203
6203
|
}
|
|
6204
6204
|
};
|
|
6205
|
-
ce(T.value), C.value =
|
|
6205
|
+
ce(T.value), C.value = K;
|
|
6206
6206
|
};
|
|
6207
|
-
ge(
|
|
6207
|
+
ge(M, D, { immediate: !0 });
|
|
6208
6208
|
const X = W(null), R = W(""), S = W(null);
|
|
6209
6209
|
ge(R, () => {
|
|
6210
6210
|
if (!R.value || !e.filterMethod) {
|
|
6211
6211
|
S.value = null;
|
|
6212
6212
|
return;
|
|
6213
6213
|
}
|
|
6214
|
-
const
|
|
6214
|
+
const K = /* @__PURE__ */ new Set(), _ = (ce) => {
|
|
6215
6215
|
let pe = !1;
|
|
6216
6216
|
for (const ye of ce) {
|
|
6217
6217
|
let be = !1;
|
|
6218
|
-
ye.children.length > 0 && (be =
|
|
6218
|
+
ye.children.length > 0 && (be = _(ye.children)), (e.filterMethod(
|
|
6219
6219
|
R.value,
|
|
6220
6220
|
ye.data,
|
|
6221
6221
|
ye
|
|
6222
|
-
) || be) && (
|
|
6222
|
+
) || be) && (K.add(ye.key), pe = !0);
|
|
6223
6223
|
}
|
|
6224
6224
|
return pe;
|
|
6225
6225
|
};
|
|
6226
|
-
|
|
6226
|
+
_(T.value), S.value = K;
|
|
6227
6227
|
});
|
|
6228
|
-
const ie = (
|
|
6229
|
-
const
|
|
6230
|
-
if (
|
|
6231
|
-
|
|
6228
|
+
const ie = (K) => {
|
|
6229
|
+
const _ = new Set(P.value);
|
|
6230
|
+
if (_.has(K.key))
|
|
6231
|
+
_.delete(K.key), r("node-collapse", K.data, K);
|
|
6232
6232
|
else {
|
|
6233
|
-
if (e.accordion &&
|
|
6234
|
-
for (const pe of
|
|
6235
|
-
|
|
6236
|
-
else if (e.accordion && !
|
|
6233
|
+
if (e.accordion && K.parent)
|
|
6234
|
+
for (const pe of K.parent.children)
|
|
6235
|
+
_.delete(pe.key);
|
|
6236
|
+
else if (e.accordion && !K.parent)
|
|
6237
6237
|
for (const pe of T.value)
|
|
6238
|
-
|
|
6239
|
-
|
|
6238
|
+
_.delete(pe.key);
|
|
6239
|
+
_.add(K.key), r("node-expand", K.data, K);
|
|
6240
6240
|
}
|
|
6241
|
-
e.expandedKeys !== void 0 ? r("update:expandedKeys", Array.from(
|
|
6242
|
-
}, E = (
|
|
6243
|
-
if (
|
|
6244
|
-
const
|
|
6245
|
-
e.checkStrictly ? ce ?
|
|
6246
|
-
}, Y = (
|
|
6247
|
-
for (const ce of
|
|
6248
|
-
ce.disabled ||
|
|
6249
|
-
}, w = (
|
|
6250
|
-
for (const ce of
|
|
6251
|
-
ce.disabled ||
|
|
6252
|
-
},
|
|
6253
|
-
if (!
|
|
6254
|
-
const ce =
|
|
6241
|
+
e.expandedKeys !== void 0 ? r("update:expandedKeys", Array.from(_)) : b.value = _;
|
|
6242
|
+
}, E = (K) => {
|
|
6243
|
+
if (K.disabled) return;
|
|
6244
|
+
const _ = new Set(M.value), ce = _.has(K.key);
|
|
6245
|
+
e.checkStrictly ? ce ? _.delete(K.key) : _.add(K.key) : (ce ? (_.delete(K.key), w(K, _)) : (_.add(K.key), Y(K, _)), q(K.parent, _)), r("check-change", K.data, !ce), e.checkedKeys !== void 0 ? r("update:checkedKeys", Array.from(_)) : N.value = _;
|
|
6246
|
+
}, Y = (K, _) => {
|
|
6247
|
+
for (const ce of K.children)
|
|
6248
|
+
ce.disabled || _.add(ce.key), Y(ce, _);
|
|
6249
|
+
}, w = (K, _) => {
|
|
6250
|
+
for (const ce of K.children)
|
|
6251
|
+
ce.disabled || _.delete(ce.key), w(ce, _);
|
|
6252
|
+
}, q = (K, _) => {
|
|
6253
|
+
if (!K) return;
|
|
6254
|
+
const ce = K.children.filter((ye) => !ye.disabled);
|
|
6255
6255
|
if (ce.length === 0) return;
|
|
6256
|
-
ce.every((ye) =>
|
|
6257
|
-
}, te = (
|
|
6258
|
-
e.highlightCurrent && (X.value =
|
|
6259
|
-
}, A = (
|
|
6260
|
-
te(
|
|
6256
|
+
ce.every((ye) => _.has(ye.key)) ? _.add(K.key) : _.delete(K.key), q(K.parent, _);
|
|
6257
|
+
}, te = (K) => {
|
|
6258
|
+
e.highlightCurrent && (X.value = K.key);
|
|
6259
|
+
}, A = (K) => {
|
|
6260
|
+
te(K), r("node-click", K.data, K);
|
|
6261
6261
|
}, $ = s(() => [
|
|
6262
6262
|
d.b(),
|
|
6263
6263
|
d.m(e.type),
|
|
@@ -6266,9 +6266,9 @@ const Et = {
|
|
|
6266
6266
|
]), y = s(() => e.color ? {
|
|
6267
6267
|
"--cp-tree-active-color": e.color,
|
|
6268
6268
|
"--cp-tree-active-color-light": `${e.color}66`
|
|
6269
|
-
} : {}),
|
|
6270
|
-
expandedKeys:
|
|
6271
|
-
checkedKeys:
|
|
6269
|
+
} : {}), O = {
|
|
6270
|
+
expandedKeys: P,
|
|
6271
|
+
checkedKeys: M,
|
|
6272
6272
|
indeterminateKeys: C,
|
|
6273
6273
|
currentNodeKey: X,
|
|
6274
6274
|
showCheckbox: e.showCheckbox,
|
|
@@ -6284,7 +6284,7 @@ const Et = {
|
|
|
6284
6284
|
toggleCheck: E,
|
|
6285
6285
|
setCurrentNode: te,
|
|
6286
6286
|
handleNodeClick: A,
|
|
6287
|
-
nodeMap:
|
|
6287
|
+
nodeMap: V,
|
|
6288
6288
|
slots: l,
|
|
6289
6289
|
expandIcon: e.expandIcon,
|
|
6290
6290
|
collapseIcon: e.collapseIcon,
|
|
@@ -6292,29 +6292,29 @@ const Et = {
|
|
|
6292
6292
|
nodeIcon: e.nodeIcon,
|
|
6293
6293
|
showNodeIcon: e.showNodeIcon
|
|
6294
6294
|
};
|
|
6295
|
-
return Be(kt,
|
|
6296
|
-
filter: (
|
|
6297
|
-
R.value =
|
|
6295
|
+
return Be(kt, O), t({
|
|
6296
|
+
filter: (K) => {
|
|
6297
|
+
R.value = K;
|
|
6298
6298
|
},
|
|
6299
|
-
getCheckedKeys: () => Array.from(
|
|
6300
|
-
setCheckedKeys: (
|
|
6301
|
-
e.checkedKeys !== void 0 ? r("update:checkedKeys",
|
|
6299
|
+
getCheckedKeys: () => Array.from(M.value),
|
|
6300
|
+
setCheckedKeys: (K) => {
|
|
6301
|
+
e.checkedKeys !== void 0 ? r("update:checkedKeys", K) : N.value = new Set(K);
|
|
6302
6302
|
},
|
|
6303
6303
|
getHalfCheckedKeys: () => Array.from(C.value),
|
|
6304
6304
|
expandAll: () => {
|
|
6305
|
-
const
|
|
6305
|
+
const K = /* @__PURE__ */ new Set(), _ = (ce) => {
|
|
6306
6306
|
for (const pe of ce)
|
|
6307
|
-
pe.isLeaf ||
|
|
6307
|
+
pe.isLeaf || K.add(pe.key), pe.children.length && _(pe.children);
|
|
6308
6308
|
};
|
|
6309
|
-
|
|
6309
|
+
_(T.value), e.expandedKeys !== void 0 ? r("update:expandedKeys", Array.from(K)) : b.value = K;
|
|
6310
6310
|
},
|
|
6311
6311
|
collapseAll: () => {
|
|
6312
6312
|
e.expandedKeys !== void 0 ? r("update:expandedKeys", []) : b.value = /* @__PURE__ */ new Set();
|
|
6313
6313
|
},
|
|
6314
6314
|
treeNodes: T
|
|
6315
|
-
}), (
|
|
6315
|
+
}), (K, _) => (i(), p("div", {
|
|
6316
6316
|
class: n($.value),
|
|
6317
|
-
style:
|
|
6317
|
+
style: U(y.value),
|
|
6318
6318
|
role: "tree"
|
|
6319
6319
|
}, [
|
|
6320
6320
|
T.value.length > 0 ? (i(!0), p(ue, { key: 0 }, ke(T.value, (ce, pe) => (i(), ee(Al, {
|
|
@@ -6325,7 +6325,7 @@ const Et = {
|
|
|
6325
6325
|
key: 1,
|
|
6326
6326
|
class: n(a(d).e("empty"))
|
|
6327
6327
|
}, [
|
|
6328
|
-
|
|
6328
|
+
H(K.$slots, "empty", {}, () => [
|
|
6329
6329
|
v("span", {
|
|
6330
6330
|
class: n(a(d).e("empty-text"))
|
|
6331
6331
|
}, "NO DATA", 2)
|
|
@@ -6442,17 +6442,17 @@ const Et = {
|
|
|
6442
6442
|
const k = {};
|
|
6443
6443
|
return t.color ? k["--cp-divider-color"] = t.color : t.type !== "default" && r[t.type] && (k["--cp-divider-color"] = r[t.type]), t.thickness !== 1 && (k["--cp-divider-thickness"] = m(t.thickness)), t.margin !== void 0 && t.margin !== "" && (k["--cp-divider-margin"] = m(t.margin)), k;
|
|
6444
6444
|
});
|
|
6445
|
-
return (k,
|
|
6445
|
+
return (k, V) => (i(), p("div", {
|
|
6446
6446
|
role: "separator",
|
|
6447
6447
|
class: n(f.value),
|
|
6448
|
-
style:
|
|
6448
|
+
style: U(g.value)
|
|
6449
6449
|
}, [
|
|
6450
6450
|
l.value && t.direction === "horizontal" ? (i(), p("span", {
|
|
6451
6451
|
key: 0,
|
|
6452
6452
|
class: n(a(e).e("text"))
|
|
6453
6453
|
}, [
|
|
6454
|
-
|
|
6455
|
-
], 2)) :
|
|
6454
|
+
H(k.$slots, "default")
|
|
6455
|
+
], 2)) : j("", !0)
|
|
6456
6456
|
], 6));
|
|
6457
6457
|
}
|
|
6458
6458
|
}), Pr = re(Fe), Il = {
|
|
@@ -6847,34 +6847,34 @@ const Et = {
|
|
|
6847
6847
|
type: fe(e, "type"),
|
|
6848
6848
|
color: fe(e, "color")
|
|
6849
6849
|
});
|
|
6850
|
-
const f = W(!1), m = W(!1), g = W(!1), k = W(null),
|
|
6850
|
+
const f = W(!1), m = W(!1), g = W(!1), k = W(null), V = W(null), x = () => {
|
|
6851
6851
|
k.value && (k.value.classList.remove("is-shaking"), k.value.offsetWidth, k.value.classList.add("is-shaking")), g.value = !0;
|
|
6852
6852
|
}, T = () => {
|
|
6853
6853
|
g.value = !1;
|
|
6854
6854
|
}, I = W(!1), b = { offsetX: 0, offsetY: 0 };
|
|
6855
6855
|
let L = "";
|
|
6856
|
-
const
|
|
6856
|
+
const P = (Z, me) => {
|
|
6857
6857
|
if (!k.value) return;
|
|
6858
|
-
const { offsetX: Te, offsetY: je } = b, Ae = k.value.getBoundingClientRect(),
|
|
6858
|
+
const { offsetX: Te, offsetY: je } = b, Ae = k.value.getBoundingClientRect(), _e = document.documentElement.clientWidth, De = document.documentElement.clientHeight;
|
|
6859
6859
|
if (!e.overflow) {
|
|
6860
|
-
const
|
|
6861
|
-
Z = Math.min(Math.max(Z,
|
|
6860
|
+
const He = -Ae.left + Te, et = -Ae.top + je, tt = _e - Ae.left - Ae.width + Te, xt = De - Ae.top - (Ae.height < De ? Ae.height : 0) + je;
|
|
6861
|
+
Z = Math.min(Math.max(Z, He), tt), me = Math.min(Math.max(me, et), xt);
|
|
6862
6862
|
}
|
|
6863
6863
|
b.offsetX = Z, b.offsetY = me, k.value.style.transform = `translate(${Z}px, ${me}px)`;
|
|
6864
6864
|
}, N = () => {
|
|
6865
6865
|
b.offsetX = 0, b.offsetY = 0, k.value && (k.value.style.transform = "");
|
|
6866
|
-
},
|
|
6867
|
-
|
|
6866
|
+
}, M = () => {
|
|
6867
|
+
P(b.offsetX, b.offsetY);
|
|
6868
6868
|
}, C = (Z) => {
|
|
6869
6869
|
if (!e.draggable || !k.value) return;
|
|
6870
|
-
const me = Z.clientX, Te = Z.clientY, { offsetX: je, offsetY: Ae } = b,
|
|
6870
|
+
const me = Z.clientX, Te = Z.clientY, { offsetX: je, offsetY: Ae } = b, _e = (He) => {
|
|
6871
6871
|
I.value || (I.value = !0);
|
|
6872
|
-
const et = je +
|
|
6873
|
-
|
|
6872
|
+
const et = je + He.clientX - me, tt = Ae + He.clientY - Te;
|
|
6873
|
+
P(et, tt);
|
|
6874
6874
|
}, De = () => {
|
|
6875
|
-
I.value = !1, document.removeEventListener("mousemove",
|
|
6875
|
+
I.value = !1, document.removeEventListener("mousemove", _e), document.removeEventListener("mouseup", De);
|
|
6876
6876
|
};
|
|
6877
|
-
document.addEventListener("mousemove",
|
|
6877
|
+
document.addEventListener("mousemove", _e), document.addEventListener("mouseup", De);
|
|
6878
6878
|
}, D = s(() => e.color ? e.color : e.type && e.type !== "default" ? `var(--cp-color-${e.type})` : null), X = s(() => e.color ? `color-mix(in srgb, ${e.color} 30%, transparent)` : e.type && e.type !== "default" ? `var(--cp-color-${e.type}-light)` : null), R = s(() => {
|
|
6879
6879
|
const Z = {};
|
|
6880
6880
|
return D.value && (Z["--cp-dialog-color"] = D.value), X.value && (Z["--cp-dialog-color-light"] = X.value), e.bgColor && (Z["--cp-dialog-bg"] = e.bgColor), e.borderColor && (Z["--cp-dialog-border-color"] = e.borderColor), e.titleColor && (Z["--cp-dialog-title-color"] = e.titleColor), e.textColor && (Z["--cp-dialog-text-color"] = e.textColor), e.closeColor && (Z["--cp-dialog-close-color"] = e.closeColor), e.headerDividerColor && (Z["--cp-dialog-header-divider-color"] = e.headerDividerColor), e.footerDividerColor && (Z["--cp-dialog-footer-divider-color"] = e.footerDividerColor), Z;
|
|
@@ -6912,7 +6912,7 @@ const Et = {
|
|
|
6912
6912
|
]), w = s(() => [
|
|
6913
6913
|
c.e("body"),
|
|
6914
6914
|
e.bodyClass
|
|
6915
|
-
]),
|
|
6915
|
+
]), q = s(() => [
|
|
6916
6916
|
c.e("footer"),
|
|
6917
6917
|
c.is("bordered", e.footerBorder),
|
|
6918
6918
|
c.is("center", e.center),
|
|
@@ -6926,26 +6926,26 @@ const Et = {
|
|
|
6926
6926
|
() => e.title || l.header || l.title || e.showClose
|
|
6927
6927
|
), $ = s(
|
|
6928
6928
|
() => !!l.footer || e.showConfirmButton || e.showCancelButton
|
|
6929
|
-
), y = s(() => e.type && e.type !== "default" ? e.type : "primary"),
|
|
6929
|
+
), y = s(() => e.type && e.type !== "default" ? e.type : "primary"), O = s(() => e.color || ""), h = s(() => {
|
|
6930
6930
|
if (e.beforeClose) return e.beforeClose;
|
|
6931
6931
|
const Z = d["before-close"] ?? d.beforeClose;
|
|
6932
6932
|
return typeof Z == "function" ? Z : void 0;
|
|
6933
|
-
}),
|
|
6933
|
+
}), z = () => {
|
|
6934
6934
|
f.value = !1;
|
|
6935
|
-
},
|
|
6935
|
+
}, F = () => {
|
|
6936
6936
|
const Z = (me) => {
|
|
6937
|
-
me ||
|
|
6937
|
+
me || z();
|
|
6938
6938
|
};
|
|
6939
6939
|
h.value ? h.value(Z) : Z();
|
|
6940
|
-
},
|
|
6941
|
-
e.closeOnClickModal ?
|
|
6940
|
+
}, B = () => {
|
|
6941
|
+
e.closeOnClickModal ? F() : x();
|
|
6942
6942
|
}, Q = () => {
|
|
6943
|
-
r("confirm"),
|
|
6943
|
+
r("confirm"), F();
|
|
6944
6944
|
}, le = () => {
|
|
6945
|
-
r("cancel"),
|
|
6946
|
-
},
|
|
6947
|
-
Z.key === "Escape" && f.value && (e.closeOnEscape ?
|
|
6948
|
-
},
|
|
6945
|
+
r("cancel"), F();
|
|
6946
|
+
}, K = (Z) => {
|
|
6947
|
+
Z.key === "Escape" && f.value && (e.closeOnEscape ? F() : x());
|
|
6948
|
+
}, _ = (Z) => {
|
|
6949
6949
|
Z.stopPropagation();
|
|
6950
6950
|
}, ce = () => {
|
|
6951
6951
|
r("opened");
|
|
@@ -6962,11 +6962,11 @@ const Et = {
|
|
|
6962
6962
|
() => e.modelValue,
|
|
6963
6963
|
(Z) => {
|
|
6964
6964
|
Z ? (m.value = !0, f.value = !0, r("open"), Pe(() => {
|
|
6965
|
-
N(), be(), document.addEventListener("keydown",
|
|
6966
|
-
})) : f.value &&
|
|
6965
|
+
N(), be(), document.addEventListener("keydown", K), e.draggable && window.addEventListener("resize", M);
|
|
6966
|
+
})) : f.value && z();
|
|
6967
6967
|
}
|
|
6968
6968
|
), ge(f, (Z) => {
|
|
6969
|
-
!Z && e.modelValue && (r("close"), r("update:modelValue", !1), ze(), document.removeEventListener("keydown",
|
|
6969
|
+
!Z && e.modelValue && (r("close"), r("update:modelValue", !1), ze(), document.removeEventListener("keydown", K), window.removeEventListener("resize", M));
|
|
6970
6970
|
}), ge(
|
|
6971
6971
|
() => e.fullscreen,
|
|
6972
6972
|
(Z) => {
|
|
@@ -6974,13 +6974,13 @@ const Et = {
|
|
|
6974
6974
|
}
|
|
6975
6975
|
), Me(() => {
|
|
6976
6976
|
e.modelValue && (m.value = !0, f.value = !0, Pe(() => {
|
|
6977
|
-
be(), document.addEventListener("keydown",
|
|
6977
|
+
be(), document.addEventListener("keydown", K), e.draggable && window.addEventListener("resize", M);
|
|
6978
6978
|
}));
|
|
6979
6979
|
}), Ve(() => {
|
|
6980
|
-
ze(), document.removeEventListener("keydown",
|
|
6980
|
+
ze(), document.removeEventListener("keydown", K), window.removeEventListener("resize", M);
|
|
6981
6981
|
}), t({
|
|
6982
6982
|
/** @description 关闭对话框 */
|
|
6983
|
-
close:
|
|
6983
|
+
close: F,
|
|
6984
6984
|
/** @description 重置拖拽位置 */
|
|
6985
6985
|
resetPosition: N,
|
|
6986
6986
|
/** @description 当前是否可见 */
|
|
@@ -6998,12 +6998,12 @@ const Et = {
|
|
|
6998
6998
|
(Z.destroyOnClose ? f.value : m.value || f.value) ? Ee((i(), p("div", {
|
|
6999
6999
|
key: 0,
|
|
7000
7000
|
class: n(te.value),
|
|
7001
|
-
style:
|
|
7002
|
-
onClick: Ce(
|
|
7001
|
+
style: U(J.value),
|
|
7002
|
+
onClick: Ce(B, ["self"])
|
|
7003
7003
|
}, [
|
|
7004
7004
|
v("div", {
|
|
7005
7005
|
class: n(ie.value),
|
|
7006
|
-
onClick: Ce(
|
|
7006
|
+
onClick: Ce(B, ["self"])
|
|
7007
7007
|
}, [
|
|
7008
7008
|
v("div", Re({
|
|
7009
7009
|
ref_key: "panelRef",
|
|
@@ -7013,7 +7013,7 @@ const Et = {
|
|
|
7013
7013
|
style: S.value,
|
|
7014
7014
|
role: "dialog",
|
|
7015
7015
|
"aria-modal": "true",
|
|
7016
|
-
onClick:
|
|
7016
|
+
onClick: _,
|
|
7017
7017
|
onAnimationend: T
|
|
7018
7018
|
}), [
|
|
7019
7019
|
v("div", {
|
|
@@ -7022,16 +7022,16 @@ const Et = {
|
|
|
7022
7022
|
A.value ? (i(), p("div", {
|
|
7023
7023
|
key: 0,
|
|
7024
7024
|
ref_key: "headerRef",
|
|
7025
|
-
ref:
|
|
7025
|
+
ref: V,
|
|
7026
7026
|
class: n(Y.value),
|
|
7027
|
-
style:
|
|
7027
|
+
style: U(Z.headerStyle),
|
|
7028
7028
|
onMousedown: C
|
|
7029
7029
|
}, [
|
|
7030
|
-
|
|
7030
|
+
H(Z.$slots, "header", {}, () => [
|
|
7031
7031
|
v("div", {
|
|
7032
7032
|
class: n(a(c).e("title"))
|
|
7033
7033
|
}, [
|
|
7034
|
-
|
|
7034
|
+
H(Z.$slots, "title", {}, () => [
|
|
7035
7035
|
de(G(Z.title), 1)
|
|
7036
7036
|
])
|
|
7037
7037
|
], 2),
|
|
@@ -7039,7 +7039,7 @@ const Et = {
|
|
|
7039
7039
|
key: 0,
|
|
7040
7040
|
class: n(a(c).e("close")),
|
|
7041
7041
|
"aria-label": "Close",
|
|
7042
|
-
onClick:
|
|
7042
|
+
onClick: F
|
|
7043
7043
|
}, [...me[0] || (me[0] = [
|
|
7044
7044
|
v("svg", {
|
|
7045
7045
|
viewBox: "0 0 24 24",
|
|
@@ -7051,21 +7051,21 @@ const Et = {
|
|
|
7051
7051
|
}, [
|
|
7052
7052
|
v("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
7053
7053
|
], -1)
|
|
7054
|
-
])], 2)) :
|
|
7054
|
+
])], 2)) : j("", !0)
|
|
7055
7055
|
])
|
|
7056
|
-
], 38)) :
|
|
7056
|
+
], 38)) : j("", !0),
|
|
7057
7057
|
v("div", {
|
|
7058
7058
|
class: n(w.value),
|
|
7059
|
-
style:
|
|
7059
|
+
style: U(Z.bodyStyle)
|
|
7060
7060
|
}, [
|
|
7061
|
-
|
|
7061
|
+
H(Z.$slots, "default")
|
|
7062
7062
|
], 6),
|
|
7063
7063
|
$.value ? (i(), p("div", {
|
|
7064
7064
|
key: 1,
|
|
7065
|
-
class: n(
|
|
7066
|
-
style:
|
|
7065
|
+
class: n(q.value),
|
|
7066
|
+
style: U(Z.footerStyle)
|
|
7067
7067
|
}, [
|
|
7068
|
-
|
|
7068
|
+
H(Z.$slots, "footer", {}, () => [
|
|
7069
7069
|
Z.showCancelButton ? (i(), ee(a(rt), {
|
|
7070
7070
|
key: 0,
|
|
7071
7071
|
class: n(a(c).e("cancel-btn")),
|
|
@@ -7075,26 +7075,26 @@ const Et = {
|
|
|
7075
7075
|
de(G(Z.cancelText || "取消"), 1)
|
|
7076
7076
|
]),
|
|
7077
7077
|
_: 1
|
|
7078
|
-
}, 8, ["class"])) :
|
|
7078
|
+
}, 8, ["class"])) : j("", !0),
|
|
7079
7079
|
Z.showConfirmButton ? (i(), ee(a(rt), {
|
|
7080
7080
|
key: 1,
|
|
7081
7081
|
class: n(a(c).e("confirm-btn")),
|
|
7082
7082
|
type: y.value,
|
|
7083
|
-
color:
|
|
7083
|
+
color: O.value,
|
|
7084
7084
|
onClick: Q
|
|
7085
7085
|
}, {
|
|
7086
7086
|
default: ve(() => [
|
|
7087
7087
|
de(G(Z.confirmText || "确认"), 1)
|
|
7088
7088
|
]),
|
|
7089
7089
|
_: 1
|
|
7090
|
-
}, 8, ["class", "type", "color"])) :
|
|
7090
|
+
}, 8, ["class", "type", "color"])) : j("", !0)
|
|
7091
7091
|
])
|
|
7092
|
-
], 6)) :
|
|
7092
|
+
], 6)) : j("", !0)
|
|
7093
7093
|
], 16)
|
|
7094
7094
|
], 2)
|
|
7095
7095
|
], 6)), [
|
|
7096
7096
|
[Ke, f.value]
|
|
7097
|
-
]) :
|
|
7097
|
+
]) : j("", !0)
|
|
7098
7098
|
]),
|
|
7099
7099
|
_: 3
|
|
7100
7100
|
}, 8, ["name"])
|
|
@@ -7174,10 +7174,10 @@ const Et = {
|
|
|
7174
7174
|
});
|
|
7175
7175
|
return (c, f) => (i(), ee(we(c.tag), {
|
|
7176
7176
|
class: n(l.value),
|
|
7177
|
-
style:
|
|
7177
|
+
style: U(d.value)
|
|
7178
7178
|
}, {
|
|
7179
7179
|
default: ve(() => [
|
|
7180
|
-
|
|
7180
|
+
H(c.$slots, "default")
|
|
7181
7181
|
]),
|
|
7182
7182
|
_: 3
|
|
7183
7183
|
}, 8, ["class", "style"]));
|
|
@@ -7241,10 +7241,10 @@ const Et = {
|
|
|
7241
7241
|
});
|
|
7242
7242
|
return (d, c) => (i(), ee(we(d.tag), {
|
|
7243
7243
|
class: n(r.value),
|
|
7244
|
-
style:
|
|
7244
|
+
style: U(l.value)
|
|
7245
7245
|
}, {
|
|
7246
7246
|
default: ve(() => [
|
|
7247
|
-
|
|
7247
|
+
H(d.$slots, "default")
|
|
7248
7248
|
]),
|
|
7249
7249
|
_: 3
|
|
7250
7250
|
}, 8, ["class", "style"]));
|
|
@@ -7310,7 +7310,7 @@ const Et = {
|
|
|
7310
7310
|
default: "60px"
|
|
7311
7311
|
},
|
|
7312
7312
|
...nt
|
|
7313
|
-
},
|
|
7313
|
+
}, _l = {
|
|
7314
7314
|
/**
|
|
7315
7315
|
* 底部高度
|
|
7316
7316
|
* @default '60px'
|
|
@@ -7320,7 +7320,7 @@ const Et = {
|
|
|
7320
7320
|
default: "60px"
|
|
7321
7321
|
},
|
|
7322
7322
|
...nt
|
|
7323
|
-
},
|
|
7323
|
+
}, Hl = {
|
|
7324
7324
|
...wt
|
|
7325
7325
|
}, Wl = {
|
|
7326
7326
|
/**
|
|
@@ -7341,7 +7341,7 @@ const Et = {
|
|
|
7341
7341
|
},
|
|
7342
7342
|
...wt,
|
|
7343
7343
|
...nt
|
|
7344
|
-
},
|
|
7344
|
+
}, ql = /* @__PURE__ */ oe({
|
|
7345
7345
|
name: `${se}Container`,
|
|
7346
7346
|
__name: "container",
|
|
7347
7347
|
props: Fl,
|
|
@@ -7363,10 +7363,10 @@ const Et = {
|
|
|
7363
7363
|
return (d, c) => (i(), p("section", {
|
|
7364
7364
|
class: n(l.value)
|
|
7365
7365
|
}, [
|
|
7366
|
-
|
|
7366
|
+
H(d.$slots, "default")
|
|
7367
7367
|
], 2));
|
|
7368
7368
|
}
|
|
7369
|
-
}),
|
|
7369
|
+
}), Ul = /* @__PURE__ */ oe({
|
|
7370
7370
|
name: `${se}Header`,
|
|
7371
7371
|
__name: "header",
|
|
7372
7372
|
props: jl,
|
|
@@ -7397,9 +7397,9 @@ const Et = {
|
|
|
7397
7397
|
ref_key: "headerRef",
|
|
7398
7398
|
ref: r,
|
|
7399
7399
|
class: n(a(e).b()),
|
|
7400
|
-
style:
|
|
7400
|
+
style: U(l.value)
|
|
7401
7401
|
}, [
|
|
7402
|
-
|
|
7402
|
+
H(m.$slots, "default"),
|
|
7403
7403
|
he(Fe, Re(d.value, {
|
|
7404
7404
|
class: a(e).e("divider")
|
|
7405
7405
|
}), null, 16, ["class"])
|
|
@@ -7408,7 +7408,7 @@ const Et = {
|
|
|
7408
7408
|
}), Yl = /* @__PURE__ */ oe({
|
|
7409
7409
|
name: `${se}Footer`,
|
|
7410
7410
|
__name: "footer",
|
|
7411
|
-
props:
|
|
7411
|
+
props: _l,
|
|
7412
7412
|
setup(u, { expose: t }) {
|
|
7413
7413
|
const o = u, e = ne("footer"), r = W(), l = s(() => ({
|
|
7414
7414
|
"--cp-footer-height": o.height,
|
|
@@ -7436,55 +7436,41 @@ const Et = {
|
|
|
7436
7436
|
ref_key: "footerRef",
|
|
7437
7437
|
ref: r,
|
|
7438
7438
|
class: n(a(e).b()),
|
|
7439
|
-
style:
|
|
7439
|
+
style: U(l.value)
|
|
7440
7440
|
}, [
|
|
7441
7441
|
he(Fe, Re(d.value, {
|
|
7442
7442
|
class: a(e).e("divider")
|
|
7443
7443
|
}), null, 16, ["class"]),
|
|
7444
|
-
|
|
7444
|
+
H(m.$slots, "default")
|
|
7445
7445
|
], 6));
|
|
7446
7446
|
}
|
|
7447
7447
|
}), Xl = /* @__PURE__ */ oe({
|
|
7448
7448
|
name: `${se}Main`,
|
|
7449
7449
|
__name: "main",
|
|
7450
|
-
props:
|
|
7450
|
+
props: Hl,
|
|
7451
7451
|
setup(u, { expose: t }) {
|
|
7452
|
-
const o = u, e = ne("main"), r = W(), l =
|
|
7452
|
+
const o = u, e = ne("main"), r = W(), l = s(() => [
|
|
7453
7453
|
e.b(),
|
|
7454
7454
|
e.is("scroll-under-header", o.scrollUnderHeader),
|
|
7455
7455
|
e.is("scroll-under-footer", o.scrollUnderFooter)
|
|
7456
7456
|
]);
|
|
7457
7457
|
return t({
|
|
7458
|
-
/** @description body
|
|
7459
|
-
bodyHeaderPlaceholderRef: r,
|
|
7460
|
-
/** @description body 底部占位块元素 */
|
|
7461
|
-
bodyFooterPlaceholderRef: l,
|
|
7462
|
-
/** @description 获取 body 占位块高度(px) */
|
|
7458
|
+
/** @description 获取 body 占位块高度(px)(由 padding 实现) */
|
|
7463
7459
|
getPlaceholderHeights: () => {
|
|
7464
|
-
|
|
7460
|
+
const c = r.value;
|
|
7461
|
+
if (!c) return { header: 0, footer: 0 };
|
|
7462
|
+
const f = getComputedStyle(c);
|
|
7465
7463
|
return {
|
|
7466
|
-
header: (
|
|
7467
|
-
footer: (
|
|
7464
|
+
header: parseFloat(f.paddingTop) || 0,
|
|
7465
|
+
footer: parseFloat(f.paddingBottom) || 0
|
|
7468
7466
|
};
|
|
7469
7467
|
}
|
|
7470
|
-
}), (
|
|
7471
|
-
|
|
7468
|
+
}), (c, f) => (i(), p("main", {
|
|
7469
|
+
ref_key: "mainRef",
|
|
7470
|
+
ref: r,
|
|
7471
|
+
class: n(l.value)
|
|
7472
7472
|
}, [
|
|
7473
|
-
|
|
7474
|
-
key: 0,
|
|
7475
|
-
ref_key: "bodyHeaderPlaceholderRef",
|
|
7476
|
-
ref: r,
|
|
7477
|
-
class: n(a(e).e("body-header-placeholder")),
|
|
7478
|
-
"aria-hidden": "true"
|
|
7479
|
-
}, null, 2)) : O("", !0),
|
|
7480
|
-
_(f.$slots, "default"),
|
|
7481
|
-
o.scrollUnderFooter ? (i(), p("div", {
|
|
7482
|
-
key: 1,
|
|
7483
|
-
ref_key: "bodyFooterPlaceholderRef",
|
|
7484
|
-
ref: l,
|
|
7485
|
-
class: n(a(e).e("body-footer-placeholder")),
|
|
7486
|
-
"aria-hidden": "true"
|
|
7487
|
-
}, null, 2)) : O("", !0)
|
|
7473
|
+
H(c.$slots, "default")
|
|
7488
7474
|
], 2));
|
|
7489
7475
|
}
|
|
7490
7476
|
}), Gl = ["data-position"], Jl = /* @__PURE__ */ oe({
|
|
@@ -7492,66 +7478,52 @@ const Et = {
|
|
|
7492
7478
|
__name: "aside",
|
|
7493
7479
|
props: Wl,
|
|
7494
7480
|
setup(u, { expose: t }) {
|
|
7495
|
-
const o = u, e = ne("aside"), r = W(), l =
|
|
7481
|
+
const o = u, e = ne("aside"), r = W(), l = s(() => [
|
|
7496
7482
|
e.b(),
|
|
7497
7483
|
e.is(o.position),
|
|
7498
7484
|
e.is("scroll-under-header", o.scrollUnderHeader),
|
|
7499
7485
|
e.is("scroll-under-footer", o.scrollUnderFooter)
|
|
7500
|
-
]),
|
|
7486
|
+
]), d = s(() => ({
|
|
7501
7487
|
"--cp-aside-width": o.width
|
|
7502
|
-
})),
|
|
7488
|
+
})), c = s(() => ({
|
|
7503
7489
|
direction: "vertical",
|
|
7504
7490
|
type: o.dividerType,
|
|
7505
7491
|
color: o.dividerColor,
|
|
7506
7492
|
variant: o.dividerVariant,
|
|
7507
7493
|
margin: 0
|
|
7508
|
-
})),
|
|
7494
|
+
})), f = s(() => o.position === "right");
|
|
7509
7495
|
return t({
|
|
7510
|
-
/** @description sidebar
|
|
7511
|
-
sidebarHeaderPlaceholderRef: r,
|
|
7512
|
-
/** @description sidebar 底部占位块元素 */
|
|
7513
|
-
sidebarFooterPlaceholderRef: l,
|
|
7514
|
-
/** @description 获取 sidebar 占位块高度(px) */
|
|
7496
|
+
/** @description 获取 sidebar 占位块高度(px)(由 padding 实现) */
|
|
7515
7497
|
getPlaceholderHeights: () => {
|
|
7516
|
-
|
|
7498
|
+
const g = r.value;
|
|
7499
|
+
if (!g) return { header: 0, footer: 0 };
|
|
7500
|
+
const k = getComputedStyle(g);
|
|
7517
7501
|
return {
|
|
7518
|
-
header: (
|
|
7519
|
-
footer: (
|
|
7502
|
+
header: parseFloat(k.paddingTop) || 0,
|
|
7503
|
+
footer: parseFloat(k.paddingBottom) || 0
|
|
7520
7504
|
};
|
|
7521
7505
|
}
|
|
7522
|
-
}), (
|
|
7523
|
-
class: n(
|
|
7524
|
-
style:
|
|
7506
|
+
}), (g, k) => (i(), p("aside", {
|
|
7507
|
+
class: n(l.value),
|
|
7508
|
+
style: U(d.value),
|
|
7525
7509
|
"data-position": o.position
|
|
7526
7510
|
}, [
|
|
7527
|
-
|
|
7511
|
+
f.value ? (i(), ee(Fe, Re({ key: 0 }, c.value, {
|
|
7528
7512
|
class: a(e).e("divider")
|
|
7529
|
-
}), null, 16, ["class"])) :
|
|
7513
|
+
}), null, 16, ["class"])) : j("", !0),
|
|
7530
7514
|
v("div", {
|
|
7515
|
+
ref_key: "contentRef",
|
|
7516
|
+
ref: r,
|
|
7531
7517
|
class: n(a(e).e("content"))
|
|
7532
7518
|
}, [
|
|
7533
|
-
|
|
7534
|
-
key: 0,
|
|
7535
|
-
ref_key: "sidebarHeaderPlaceholderRef",
|
|
7536
|
-
ref: r,
|
|
7537
|
-
class: n(a(e).e("sidebar-header-placeholder")),
|
|
7538
|
-
"aria-hidden": "true"
|
|
7539
|
-
}, null, 2)) : O("", !0),
|
|
7540
|
-
_(k.$slots, "default"),
|
|
7541
|
-
o.scrollUnderFooter ? (i(), p("div", {
|
|
7542
|
-
key: 1,
|
|
7543
|
-
ref_key: "sidebarFooterPlaceholderRef",
|
|
7544
|
-
ref: l,
|
|
7545
|
-
class: n(a(e).e("sidebar-footer-placeholder")),
|
|
7546
|
-
"aria-hidden": "true"
|
|
7547
|
-
}, null, 2)) : O("", !0)
|
|
7519
|
+
H(g.$slots, "default")
|
|
7548
7520
|
], 2),
|
|
7549
|
-
|
|
7521
|
+
f.value ? j("", !0) : (i(), ee(Fe, Re({ key: 1 }, c.value, {
|
|
7550
7522
|
class: a(e).e("divider")
|
|
7551
7523
|
}), null, 16, ["class"]))
|
|
7552
7524
|
], 14, Gl));
|
|
7553
7525
|
}
|
|
7554
|
-
}), Er = re(
|
|
7526
|
+
}), Er = re(ql), Ir = re(Ul), Tr = re(Yl), Lr = re(Xl), Rr = re(Jl), Zl = {
|
|
7555
7527
|
/**
|
|
7556
7528
|
* 菜单布局方向
|
|
7557
7529
|
* @default 'vertical'
|
|
@@ -7645,7 +7617,7 @@ const Et = {
|
|
|
7645
7617
|
open: (u, t) => typeof u == "string" && Array.isArray(t),
|
|
7646
7618
|
/** 子菜单收起 */
|
|
7647
7619
|
close: (u, t) => typeof u == "string" && Array.isArray(t)
|
|
7648
|
-
}, Qe = Symbol("menuContext"),
|
|
7620
|
+
}, Qe = Symbol("menuContext"), Ue = Symbol("subMenuContext"), ea = /* @__PURE__ */ oe({
|
|
7649
7621
|
name: "CpMenu",
|
|
7650
7622
|
__name: "menu",
|
|
7651
7623
|
props: Zl,
|
|
@@ -7658,19 +7630,19 @@ const Et = {
|
|
|
7658
7630
|
l.value = L;
|
|
7659
7631
|
}
|
|
7660
7632
|
);
|
|
7661
|
-
const f = (L,
|
|
7662
|
-
l.value = L, d.value =
|
|
7663
|
-
}, m = (L,
|
|
7633
|
+
const f = (L, P) => {
|
|
7634
|
+
l.value = L, d.value = P, e("select", L, P);
|
|
7635
|
+
}, m = (L, P) => {
|
|
7664
7636
|
const N = new Set(c.value);
|
|
7665
|
-
N.has(L) || (o.uniqueOpened && N.clear(), N.add(L), c.value = N, e("open", L,
|
|
7666
|
-
}, g = (L,
|
|
7637
|
+
N.has(L) || (o.uniqueOpened && N.clear(), N.add(L), c.value = N, e("open", L, P));
|
|
7638
|
+
}, g = (L, P) => {
|
|
7667
7639
|
const N = new Set(c.value);
|
|
7668
|
-
N.has(L) && (N.delete(L), c.value = N, e("close", L,
|
|
7669
|
-
}, k = (L,
|
|
7670
|
-
c.value.has(L) ? g(L,
|
|
7640
|
+
N.has(L) && (N.delete(L), c.value = N, e("close", L, P));
|
|
7641
|
+
}, k = (L, P) => {
|
|
7642
|
+
c.value.has(L) ? g(L, P) : m(L, P);
|
|
7671
7643
|
};
|
|
7672
|
-
let
|
|
7673
|
-
const
|
|
7644
|
+
let V = 0;
|
|
7645
|
+
const x = () => `__cp_auto_${++V}`, T = s(() => [
|
|
7674
7646
|
r.b(),
|
|
7675
7647
|
r.m(o.mode),
|
|
7676
7648
|
r.m(`shape-${o.shape}`),
|
|
@@ -7682,7 +7654,7 @@ const Et = {
|
|
|
7682
7654
|
const L = {};
|
|
7683
7655
|
return o.color && (L["--cp-menu-active-color"] = o.color, L["--cp-menu-active-color-light"] = `${o.color}33`), L;
|
|
7684
7656
|
}), b = {
|
|
7685
|
-
generateIndex:
|
|
7657
|
+
generateIndex: x,
|
|
7686
7658
|
activeIndex: l,
|
|
7687
7659
|
activeIndexPath: d,
|
|
7688
7660
|
openedMenus: c,
|
|
@@ -7698,12 +7670,12 @@ const Et = {
|
|
|
7698
7670
|
openMenu: m,
|
|
7699
7671
|
closeMenu: g
|
|
7700
7672
|
};
|
|
7701
|
-
return Be(Qe, b), (L,
|
|
7673
|
+
return Be(Qe, b), (L, P) => (i(), p("ul", {
|
|
7702
7674
|
class: n(T.value),
|
|
7703
|
-
style:
|
|
7675
|
+
style: U(I.value),
|
|
7704
7676
|
role: "menubar"
|
|
7705
7677
|
}, [
|
|
7706
|
-
|
|
7678
|
+
H(L.$slots, "default")
|
|
7707
7679
|
], 6));
|
|
7708
7680
|
}
|
|
7709
7681
|
}), ta = re(ea), oa = {
|
|
@@ -7745,13 +7717,13 @@ const Et = {
|
|
|
7745
7717
|
props: oa,
|
|
7746
7718
|
emits: la,
|
|
7747
7719
|
setup(u, { emit: t }) {
|
|
7748
|
-
const o = u, e = t, r = ne("menu-item"), l = $e(Qe, void 0), d = $e(
|
|
7720
|
+
const o = u, e = t, r = ne("menu-item"), l = $e(Qe, void 0), d = $e(Ue, void 0), c = o.index ?? (l == null ? void 0 : l.generateIndex()) ?? `__cp_auto_fallback_${Math.random().toString(36).slice(2)}`, f = s(() => (l == null ? void 0 : l.activeIndex.value) === c), m = s(() => [...(d == null ? void 0 : d.indexPath) ?? [], c]), g = s(() => (l == null ? void 0 : l.mode) === "horizontal" ? {} : { paddingLeft: `${20 * (((d == null ? void 0 : d.level) ?? 0) + 1)}px` }), k = s(() => [
|
|
7749
7721
|
r.b(),
|
|
7750
7722
|
r.is("active", f.value),
|
|
7751
7723
|
r.is("disabled", o.disabled)
|
|
7752
|
-
]),
|
|
7724
|
+
]), V = () => {
|
|
7753
7725
|
if (!o.disabled && (l == null || l.handleSelect(c, m.value), e("click", c), l != null && l.router)) {
|
|
7754
|
-
const
|
|
7726
|
+
const x = dt(), T = x == null ? void 0 : x.appContext.config.globalProperties.$router;
|
|
7755
7727
|
if (T) {
|
|
7756
7728
|
const I = o.route ?? c;
|
|
7757
7729
|
T.push(I).catch((b) => {
|
|
@@ -7760,28 +7732,28 @@ const Et = {
|
|
|
7760
7732
|
}
|
|
7761
7733
|
}
|
|
7762
7734
|
};
|
|
7763
|
-
return (
|
|
7735
|
+
return (x, T) => (i(), p("li", {
|
|
7764
7736
|
class: n(k.value),
|
|
7765
|
-
style:
|
|
7737
|
+
style: U(g.value),
|
|
7766
7738
|
role: "menuitem",
|
|
7767
|
-
tabindex:
|
|
7768
|
-
onClick:
|
|
7769
|
-
onKeydown: Ge(
|
|
7739
|
+
tabindex: x.disabled ? -1 : 0,
|
|
7740
|
+
onClick: V,
|
|
7741
|
+
onKeydown: Ge(V, ["enter"])
|
|
7770
7742
|
}, [
|
|
7771
|
-
|
|
7743
|
+
x.icon || x.$slots.icon ? (i(), p("span", {
|
|
7772
7744
|
key: 0,
|
|
7773
7745
|
class: n(a(r).e("icon"))
|
|
7774
7746
|
}, [
|
|
7775
|
-
|
|
7747
|
+
x.icon ? (i(), ee(a(Le), {
|
|
7776
7748
|
key: 0,
|
|
7777
|
-
icon:
|
|
7749
|
+
icon: x.icon,
|
|
7778
7750
|
size: "sm"
|
|
7779
|
-
}, null, 8, ["icon"])) :
|
|
7780
|
-
], 2)) :
|
|
7751
|
+
}, null, 8, ["icon"])) : H(x.$slots, "icon", { key: 1 })
|
|
7752
|
+
], 2)) : j("", !0),
|
|
7781
7753
|
v("span", {
|
|
7782
7754
|
class: n(a(r).e("content"))
|
|
7783
7755
|
}, [
|
|
7784
|
-
|
|
7756
|
+
H(x.$slots, "default")
|
|
7785
7757
|
], 2)
|
|
7786
7758
|
], 46, aa));
|
|
7787
7759
|
}
|
|
@@ -7822,7 +7794,7 @@ const Et = {
|
|
|
7822
7794
|
__name: "sub-menu",
|
|
7823
7795
|
props: sa,
|
|
7824
7796
|
setup(u) {
|
|
7825
|
-
const t = u, o = ne("sub-menu"), e = $e(Qe, void 0), r = $e(
|
|
7797
|
+
const t = u, o = ne("sub-menu"), e = $e(Qe, void 0), r = $e(Ue, void 0), l = t.index ?? (e == null ? void 0 : e.generateIndex()) ?? `__cp_sub_auto_${Math.random().toString(36).slice(2)}`, d = W(!1), c = s(() => (r == null ? void 0 : r.level) ?? 0), f = s(() => [...(r == null ? void 0 : r.indexPath) ?? [], l]), m = s(() => (e == null ? void 0 : e.openedMenus.value.has(l)) ?? !1), g = s(() => e ? e.activeIndexPath.value.includes(l) : !1), k = s(() => e ? e.mode === "horizontal" || e.collapse.value : !1), V = s(() => (e == null ? void 0 : e.mode) === "horizontal" ? {} : { paddingLeft: `${20 * (c.value + 1)}px` }), x = s(() => [
|
|
7826
7798
|
o.b(),
|
|
7827
7799
|
o.is("opened", m.value),
|
|
7828
7800
|
o.is("active", g.value),
|
|
@@ -7833,7 +7805,7 @@ const Et = {
|
|
|
7833
7805
|
T && (clearTimeout(T), T = null), I && (clearTimeout(I), I = null);
|
|
7834
7806
|
}, L = () => {
|
|
7835
7807
|
t.disabled || k.value || e == null || e.handleSubMenuClick(l, f.value);
|
|
7836
|
-
},
|
|
7808
|
+
}, P = () => {
|
|
7837
7809
|
t.disabled || !k.value || (b(), T = setTimeout(() => {
|
|
7838
7810
|
e == null || e.openMenu(l, f.value);
|
|
7839
7811
|
}, ia), r && (r.mouseInChild.value = !0));
|
|
@@ -7841,7 +7813,7 @@ const Et = {
|
|
|
7841
7813
|
k.value && (b(), r && (r.mouseInChild.value = !1), I = setTimeout(() => {
|
|
7842
7814
|
d.value || e == null || e.closeMenu(l, f.value);
|
|
7843
7815
|
}, ua), X && (r != null && r.handleMouseleave) && r.handleMouseleave(!0));
|
|
7844
|
-
},
|
|
7816
|
+
}, M = () => {
|
|
7845
7817
|
k.value && (b(), d.value = !0);
|
|
7846
7818
|
}, C = () => {
|
|
7847
7819
|
k.value && (d.value = !1, N(!0));
|
|
@@ -7855,15 +7827,15 @@ const Et = {
|
|
|
7855
7827
|
mouseInChild: d,
|
|
7856
7828
|
handleMouseleave: N
|
|
7857
7829
|
};
|
|
7858
|
-
return Be(
|
|
7859
|
-
class: n(
|
|
7830
|
+
return Be(Ue, D), (X, R) => (i(), p("li", {
|
|
7831
|
+
class: n(x.value),
|
|
7860
7832
|
role: "none",
|
|
7861
|
-
onMouseenter:
|
|
7833
|
+
onMouseenter: P,
|
|
7862
7834
|
onMouseleave: R[0] || (R[0] = (S) => N(!1))
|
|
7863
7835
|
}, [
|
|
7864
7836
|
v("div", {
|
|
7865
7837
|
class: n(a(o).e("title")),
|
|
7866
|
-
style:
|
|
7838
|
+
style: U(V.value),
|
|
7867
7839
|
role: "menuitem",
|
|
7868
7840
|
"aria-expanded": m.value,
|
|
7869
7841
|
tabindex: X.disabled ? -1 : 0,
|
|
@@ -7878,12 +7850,12 @@ const Et = {
|
|
|
7878
7850
|
key: 0,
|
|
7879
7851
|
icon: X.icon,
|
|
7880
7852
|
size: "sm"
|
|
7881
|
-
}, null, 8, ["icon"])) :
|
|
7882
|
-
], 2)) :
|
|
7853
|
+
}, null, 8, ["icon"])) : H(X.$slots, "icon", { key: 1 })
|
|
7854
|
+
], 2)) : j("", !0),
|
|
7883
7855
|
v("span", {
|
|
7884
7856
|
class: n(a(o).e("title-content"))
|
|
7885
7857
|
}, [
|
|
7886
|
-
|
|
7858
|
+
H(X.$slots, "title", {}, () => [
|
|
7887
7859
|
de(G(X.title), 1)
|
|
7888
7860
|
])
|
|
7889
7861
|
], 2),
|
|
@@ -7906,14 +7878,14 @@ const Et = {
|
|
|
7906
7878
|
default: ve(() => [
|
|
7907
7879
|
Ee(v("div", {
|
|
7908
7880
|
class: n(a(o).e("popup")),
|
|
7909
|
-
onMouseenter:
|
|
7881
|
+
onMouseenter: M,
|
|
7910
7882
|
onMouseleave: C
|
|
7911
7883
|
}, [
|
|
7912
7884
|
v("ul", {
|
|
7913
7885
|
class: n(a(o).e("content")),
|
|
7914
7886
|
role: "menu"
|
|
7915
7887
|
}, [
|
|
7916
|
-
|
|
7888
|
+
H(X.$slots, "default")
|
|
7917
7889
|
], 2)
|
|
7918
7890
|
], 34), [
|
|
7919
7891
|
[Ke, m.value]
|
|
@@ -7937,16 +7909,16 @@ const Et = {
|
|
|
7937
7909
|
__name: "menu-item-group",
|
|
7938
7910
|
props: da,
|
|
7939
7911
|
setup(u) {
|
|
7940
|
-
const t = ne("menu-item-group"), o = $e(Qe, void 0), e = $e(
|
|
7912
|
+
const t = ne("menu-item-group"), o = $e(Qe, void 0), e = $e(Ue, void 0), r = s(() => (o == null ? void 0 : o.mode) === "horizontal" ? {} : { paddingLeft: `${20 * (((e == null ? void 0 : e.level) ?? 0) + 1)}px` });
|
|
7941
7913
|
return (l, d) => (i(), p("li", {
|
|
7942
7914
|
class: n(a(t).b()),
|
|
7943
7915
|
role: "none"
|
|
7944
7916
|
}, [
|
|
7945
7917
|
v("div", {
|
|
7946
7918
|
class: n(a(t).e("title")),
|
|
7947
|
-
style:
|
|
7919
|
+
style: U(r.value)
|
|
7948
7920
|
}, [
|
|
7949
|
-
|
|
7921
|
+
H(l.$slots, "title", {}, () => [
|
|
7950
7922
|
de(G(l.title), 1)
|
|
7951
7923
|
])
|
|
7952
7924
|
], 6),
|
|
@@ -7954,7 +7926,7 @@ const Et = {
|
|
|
7954
7926
|
class: n(a(t).e("content")),
|
|
7955
7927
|
role: "group"
|
|
7956
7928
|
}, [
|
|
7957
|
-
|
|
7929
|
+
H(l.$slots, "default")
|
|
7958
7930
|
], 2)
|
|
7959
7931
|
], 2));
|
|
7960
7932
|
}
|
|
@@ -8136,20 +8108,20 @@ const Et = {
|
|
|
8136
8108
|
e.duration <= 0 || (g <= 0 && (g = e.duration), m = Date.now(), f = setTimeout(() => {
|
|
8137
8109
|
X();
|
|
8138
8110
|
}, g));
|
|
8139
|
-
},
|
|
8111
|
+
}, V = () => {
|
|
8140
8112
|
f && (clearTimeout(f), f = null, g -= Date.now() - m, g < 0 && (g = 0));
|
|
8141
|
-
},
|
|
8113
|
+
}, x = () => {
|
|
8142
8114
|
f && (clearTimeout(f), f = null), g = 0;
|
|
8143
8115
|
}, T = () => {
|
|
8144
|
-
|
|
8116
|
+
V();
|
|
8145
8117
|
}, I = () => {
|
|
8146
8118
|
k();
|
|
8147
|
-
}, b = s(() => e.position.includes("right")), L = s(() => e.position.includes("top")),
|
|
8119
|
+
}, b = s(() => e.position.includes("right")), L = s(() => e.position.includes("top")), P = s(() => e.color ? e.color : e.type && e.type !== "default" ? `var(--cp-color-${e.type})` : null), N = s(() => e.color ? `color-mix(in srgb, ${e.color} 30%, transparent)` : e.type && e.type !== "default" ? `var(--cp-color-${e.type}-light)` : null), M = s(() => {
|
|
8148
8120
|
const E = {};
|
|
8149
|
-
return
|
|
8121
|
+
return P.value && (E["--cp-notification-color"] = P.value), N.value && (E["--cp-notification-color-light"] = N.value), e.bgColor && (E["--cp-notification-bg"] = e.bgColor), e.borderColor && (E["--cp-notification-border-color"] = e.borderColor), e.titleColor && (E["--cp-notification-title-color"] = e.titleColor), e.textColor && (E["--cp-notification-text-color"] = e.textColor), E["--cp-notification-animation-duration"] = `${e.animationDuration}ms`, e.duration > 0 && (E["--cp-notification-duration"] = `${e.duration}ms`), E;
|
|
8150
8122
|
}), C = s(() => {
|
|
8151
8123
|
const E = typeof e.width == "number" ? `${e.width}px` : e.width, Y = {
|
|
8152
|
-
...
|
|
8124
|
+
...M.value,
|
|
8153
8125
|
width: E,
|
|
8154
8126
|
zIndex: e.zIndex
|
|
8155
8127
|
};
|
|
@@ -8178,11 +8150,11 @@ const Et = {
|
|
|
8178
8150
|
E ? (c.value = !0, g = e.duration, k()) : X();
|
|
8179
8151
|
}
|
|
8180
8152
|
), ge(c, (E) => {
|
|
8181
|
-
!E && e.modelValue && (
|
|
8153
|
+
!E && e.modelValue && (x(), r("close"), r("update:modelValue", !1));
|
|
8182
8154
|
}), Me(() => {
|
|
8183
8155
|
e.modelValue && (c.value = !0, g = e.duration, k());
|
|
8184
8156
|
}), Ve(() => {
|
|
8185
|
-
|
|
8157
|
+
x();
|
|
8186
8158
|
}), t({
|
|
8187
8159
|
/** @description 关闭通知 */
|
|
8188
8160
|
close: X,
|
|
@@ -8208,14 +8180,14 @@ const Et = {
|
|
|
8208
8180
|
key: 0,
|
|
8209
8181
|
class: n(a(d).e("icon"))
|
|
8210
8182
|
}, [
|
|
8211
|
-
|
|
8183
|
+
H(E.$slots, "icon", {}, () => [
|
|
8212
8184
|
(i(), p("svg", ya, [
|
|
8213
8185
|
v("path", {
|
|
8214
8186
|
d: ie.value
|
|
8215
8187
|
}, null, 8, ma)
|
|
8216
8188
|
]))
|
|
8217
8189
|
])
|
|
8218
|
-
], 2)) :
|
|
8190
|
+
], 2)) : j("", !0),
|
|
8219
8191
|
v("div", {
|
|
8220
8192
|
class: n(a(d).e("group"))
|
|
8221
8193
|
}, [
|
|
@@ -8223,14 +8195,14 @@ const Et = {
|
|
|
8223
8195
|
key: 0,
|
|
8224
8196
|
class: n(a(d).e("title"))
|
|
8225
8197
|
}, [
|
|
8226
|
-
|
|
8198
|
+
H(E.$slots, "title", {}, () => [
|
|
8227
8199
|
de(G(E.title), 1)
|
|
8228
8200
|
])
|
|
8229
|
-
], 2)) :
|
|
8201
|
+
], 2)) : j("", !0),
|
|
8230
8202
|
v("div", {
|
|
8231
8203
|
class: n(a(d).e("content"))
|
|
8232
8204
|
}, [
|
|
8233
|
-
|
|
8205
|
+
H(E.$slots, "default", {}, () => [
|
|
8234
8206
|
E.dangerouslyUseHTMLString ? (i(), p("p", {
|
|
8235
8207
|
key: 0,
|
|
8236
8208
|
innerHTML: E.message
|
|
@@ -8254,12 +8226,12 @@ const Et = {
|
|
|
8254
8226
|
}, [
|
|
8255
8227
|
v("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
8256
8228
|
], -1)
|
|
8257
|
-
])], 2)) :
|
|
8229
|
+
])], 2)) : j("", !0),
|
|
8258
8230
|
E.duration > 0 ? (i(), p("div", {
|
|
8259
8231
|
key: 2,
|
|
8260
8232
|
class: n(a(d).e("progress"))
|
|
8261
|
-
}, null, 2)) :
|
|
8262
|
-
], 16)) :
|
|
8233
|
+
}, null, 2)) : j("", !0)
|
|
8234
|
+
], 16)) : j("", !0)
|
|
8263
8235
|
]),
|
|
8264
8236
|
_: 3
|
|
8265
8237
|
}, 8, ["name"])
|
|
@@ -8688,7 +8660,7 @@ const Et = {
|
|
|
8688
8660
|
}), ge(() => o.pageSize, (w) => {
|
|
8689
8661
|
d.value = w;
|
|
8690
8662
|
});
|
|
8691
|
-
const c = s(() => o.total <= 0 ? 1 : Math.ceil(o.total / d.value)), f = s(() => l.value <= 1), m = s(() => l.value >= c.value), g = s(() => o.layout.split(",").map((w) => w.trim()).filter(Boolean)), k = s(() => o.hideOnSinglePage && c.value <= 1),
|
|
8663
|
+
const c = s(() => o.total <= 0 ? 1 : Math.ceil(o.total / d.value)), f = s(() => l.value <= 1), m = s(() => l.value >= c.value), g = s(() => o.layout.split(",").map((w) => w.trim()).filter(Boolean)), k = s(() => o.hideOnSinglePage && c.value <= 1), V = { sm: 24, md: 32, lg: 40 }, x = s(() => o.shape), T = s(() => o.color || ""), I = s(() => [
|
|
8692
8664
|
r.b(),
|
|
8693
8665
|
ae(o.size) && r.m(o.size),
|
|
8694
8666
|
r.m(`shape-${o.shape}`),
|
|
@@ -8698,39 +8670,39 @@ const Et = {
|
|
|
8698
8670
|
r.is("custom-color", !!o.color)
|
|
8699
8671
|
]), b = s(() => {
|
|
8700
8672
|
const w = {};
|
|
8701
|
-
return ae(o.size) || (w["--cp-pagination-height"] = Se(o.size,
|
|
8673
|
+
return ae(o.size) || (w["--cp-pagination-height"] = Se(o.size, V)), o.color && (w["--cp-pagination-color"] = o.color, w["--cp-pagination-color-light"] = `${o.color}33`), w;
|
|
8702
8674
|
}), L = s(() => o.pageSizes.map((w) => ({
|
|
8703
8675
|
label: o.sizeTemplate.replace("{size}", String(w)),
|
|
8704
8676
|
value: w
|
|
8705
|
-
}))),
|
|
8677
|
+
}))), P = {
|
|
8706
8678
|
primary: "var(--cp-color-primary)",
|
|
8707
8679
|
success: "var(--cp-color-success)",
|
|
8708
8680
|
warning: "var(--cp-color-warning)",
|
|
8709
8681
|
error: "var(--cp-color-error)",
|
|
8710
8682
|
info: "var(--cp-color-info)"
|
|
8711
|
-
}, N = s(() => o.color ? o.color : o.type !== "default" &&
|
|
8712
|
-
const w = o.totalTemplate,
|
|
8713
|
-
return
|
|
8714
|
-
before: w.slice(0,
|
|
8715
|
-
after: w.slice(
|
|
8683
|
+
}, N = s(() => o.color ? o.color : o.type !== "default" && P[o.type] || ""), M = s(() => o.shape === "circle" ? "round" : o.shape), C = s(() => {
|
|
8684
|
+
const w = o.totalTemplate, q = w.indexOf("{total}");
|
|
8685
|
+
return q === -1 ? { before: w, after: "" } : {
|
|
8686
|
+
before: w.slice(0, q),
|
|
8687
|
+
after: w.slice(q + 7)
|
|
8716
8688
|
};
|
|
8717
8689
|
}), D = s(() => {
|
|
8718
|
-
const w = c.value,
|
|
8690
|
+
const w = c.value, q = l.value, te = o.pagerCount, A = Math.floor(te / 2);
|
|
8719
8691
|
if (w <= te)
|
|
8720
|
-
return Array.from({ length: w }, (h,
|
|
8692
|
+
return Array.from({ length: w }, (h, z) => z + 1);
|
|
8721
8693
|
const $ = [];
|
|
8722
8694
|
$.push(1);
|
|
8723
|
-
const y =
|
|
8724
|
-
if (y &&
|
|
8695
|
+
const y = q - A > 2, O = q + A < w - 1;
|
|
8696
|
+
if (y && O) {
|
|
8725
8697
|
$.push("left-ellipsis");
|
|
8726
|
-
for (let h =
|
|
8698
|
+
for (let h = q - A + 2; h <= q + A - 2; h++)
|
|
8727
8699
|
$.push(h);
|
|
8728
8700
|
$.push("right-ellipsis");
|
|
8729
8701
|
} else if (y) {
|
|
8730
8702
|
$.push("left-ellipsis");
|
|
8731
8703
|
for (let h = w - te + 3; h < w; h++)
|
|
8732
8704
|
$.push(h);
|
|
8733
|
-
} else if (
|
|
8705
|
+
} else if (O) {
|
|
8734
8706
|
for (let h = 2; h <= te - 2; h++)
|
|
8735
8707
|
$.push(h);
|
|
8736
8708
|
$.push("right-ellipsis");
|
|
@@ -8738,29 +8710,29 @@ const Et = {
|
|
|
8738
8710
|
return w > 1 && $.push(w), $;
|
|
8739
8711
|
}), X = (w) => {
|
|
8740
8712
|
if (o.disabled) return;
|
|
8741
|
-
const
|
|
8742
|
-
|
|
8713
|
+
const q = Math.max(1, Math.min(w, c.value));
|
|
8714
|
+
q !== l.value && (l.value = q, e("update:currentPage", q), e("change", q));
|
|
8743
8715
|
}, R = () => {
|
|
8744
8716
|
f.value || X(l.value - 1);
|
|
8745
8717
|
}, S = () => {
|
|
8746
8718
|
m.value || X(l.value + 1);
|
|
8747
8719
|
}, J = (w) => {
|
|
8748
8720
|
if (o.disabled) return;
|
|
8749
|
-
const
|
|
8750
|
-
|
|
8721
|
+
const q = Number(w);
|
|
8722
|
+
q > 0 && (d.value = q, l.value = 1, e("update:pageSize", q), e("update:currentPage", 1), e("sizeChange", q), e("change", 1));
|
|
8751
8723
|
}, ie = (w) => {
|
|
8752
8724
|
if (o.disabled) return;
|
|
8753
|
-
const
|
|
8754
|
-
X(w === "left-ellipsis" ? Math.max(1, l.value -
|
|
8725
|
+
const q = o.pagerCount - 2;
|
|
8726
|
+
X(w === "left-ellipsis" ? Math.max(1, l.value - q) : Math.min(c.value, l.value + q));
|
|
8755
8727
|
}, E = W(""), Y = () => {
|
|
8756
8728
|
if (o.disabled) return;
|
|
8757
8729
|
const w = parseInt(E.value, 10);
|
|
8758
8730
|
!isNaN(w) && w >= 1 && w <= c.value && X(w), E.value = "";
|
|
8759
8731
|
};
|
|
8760
|
-
return (w,
|
|
8732
|
+
return (w, q) => k.value ? j("", !0) : (i(), p("nav", {
|
|
8761
8733
|
key: 0,
|
|
8762
8734
|
class: n(I.value),
|
|
8763
|
-
style:
|
|
8735
|
+
style: U(b.value),
|
|
8764
8736
|
role: "navigation",
|
|
8765
8737
|
"aria-label": "分页"
|
|
8766
8738
|
}, [
|
|
@@ -8777,7 +8749,7 @@ const Et = {
|
|
|
8777
8749
|
class: n(a(r).e("total-count"))
|
|
8778
8750
|
}, G(w.total), 3),
|
|
8779
8751
|
de(G(C.value.after), 1)
|
|
8780
|
-
], 2)) : te === "sizes" ?
|
|
8752
|
+
], 2)) : te === "sizes" ? H(w.$slots, "sizes", {
|
|
8781
8753
|
key: 2,
|
|
8782
8754
|
pageSize: d.value,
|
|
8783
8755
|
pageSizes: w.pageSizes,
|
|
@@ -8796,14 +8768,14 @@ const Et = {
|
|
|
8796
8768
|
"model-value": d.value,
|
|
8797
8769
|
options: L.value,
|
|
8798
8770
|
disabled: w.disabled,
|
|
8799
|
-
shape:
|
|
8771
|
+
shape: M.value,
|
|
8800
8772
|
size: w.size,
|
|
8801
8773
|
variant: "filled",
|
|
8802
8774
|
color: N.value,
|
|
8803
8775
|
onChange: J
|
|
8804
8776
|
}, null, 8, ["model-value", "options", "disabled", "shape", "size", "color"])
|
|
8805
8777
|
], 2)
|
|
8806
|
-
]) : te === "prev" ?
|
|
8778
|
+
]) : te === "prev" ? H(w.$slots, "prev", {
|
|
8807
8779
|
key: 3,
|
|
8808
8780
|
disabled: f.value || w.disabled,
|
|
8809
8781
|
onClick: R,
|
|
@@ -8818,14 +8790,14 @@ const Et = {
|
|
|
8818
8790
|
class: n(a(r).e("prev")),
|
|
8819
8791
|
type: "default",
|
|
8820
8792
|
variant: w.buttonVariant,
|
|
8821
|
-
shape:
|
|
8793
|
+
shape: x.value,
|
|
8822
8794
|
size: w.size,
|
|
8823
8795
|
square: "",
|
|
8824
8796
|
disabled: f.value || w.disabled,
|
|
8825
8797
|
"aria-label": "上一页",
|
|
8826
8798
|
onClick: R
|
|
8827
8799
|
}, {
|
|
8828
|
-
default: ve(() => [...
|
|
8800
|
+
default: ve(() => [...q[1] || (q[1] = [
|
|
8829
8801
|
v("svg", {
|
|
8830
8802
|
viewBox: "0 0 24 24",
|
|
8831
8803
|
fill: "none",
|
|
@@ -8841,7 +8813,7 @@ const Et = {
|
|
|
8841
8813
|
])]),
|
|
8842
8814
|
_: 1
|
|
8843
8815
|
}, 8, ["class", "variant", "shape", "size", "disabled"])
|
|
8844
|
-
]) : te === "pager" ?
|
|
8816
|
+
]) : te === "pager" ? H(w.$slots, "pager", {
|
|
8845
8817
|
key: 4,
|
|
8846
8818
|
pages: D.value,
|
|
8847
8819
|
currentPage: l.value,
|
|
@@ -8867,7 +8839,7 @@ const Et = {
|
|
|
8867
8839
|
a(r).is("disabled", w.disabled)
|
|
8868
8840
|
])
|
|
8869
8841
|
}, [
|
|
8870
|
-
typeof A == "string" ?
|
|
8842
|
+
typeof A == "string" ? H(w.$slots, "ellipsis", {
|
|
8871
8843
|
key: 0,
|
|
8872
8844
|
disabled: w.disabled,
|
|
8873
8845
|
onClick: () => ie(A),
|
|
@@ -8878,14 +8850,14 @@ const Et = {
|
|
|
8878
8850
|
he(Oe, {
|
|
8879
8851
|
variant: "ghost",
|
|
8880
8852
|
type: "default",
|
|
8881
|
-
shape:
|
|
8853
|
+
shape: x.value,
|
|
8882
8854
|
size: w.size,
|
|
8883
8855
|
square: "",
|
|
8884
8856
|
disabled: w.disabled,
|
|
8885
8857
|
class: n(a(r).e("ellipsis-btn")),
|
|
8886
8858
|
onClick: ($) => ie(A)
|
|
8887
8859
|
}, {
|
|
8888
|
-
default: ve(() => [...
|
|
8860
|
+
default: ve(() => [...q[2] || (q[2] = [
|
|
8889
8861
|
v("svg", {
|
|
8890
8862
|
viewBox: "0 0 24 24",
|
|
8891
8863
|
fill: "currentColor",
|
|
@@ -8911,7 +8883,7 @@ const Et = {
|
|
|
8911
8883
|
])]),
|
|
8912
8884
|
_: 1
|
|
8913
8885
|
}, 8, ["shape", "size", "disabled", "class", "onClick"])
|
|
8914
|
-
]) :
|
|
8886
|
+
]) : H(w.$slots, "pager-item", {
|
|
8915
8887
|
key: 1,
|
|
8916
8888
|
page: A,
|
|
8917
8889
|
active: A === l.value,
|
|
@@ -8924,7 +8896,7 @@ const Et = {
|
|
|
8924
8896
|
he(Oe, {
|
|
8925
8897
|
type: A === l.value ? w.type === "default" ? "primary" : w.type : "default",
|
|
8926
8898
|
variant: A === l.value ? "solid" : w.buttonVariant,
|
|
8927
|
-
shape:
|
|
8899
|
+
shape: x.value,
|
|
8928
8900
|
size: w.size,
|
|
8929
8901
|
square: "",
|
|
8930
8902
|
color: A === l.value ? T.value : "",
|
|
@@ -8939,7 +8911,7 @@ const Et = {
|
|
|
8939
8911
|
])
|
|
8940
8912
|
], 2))), 128))
|
|
8941
8913
|
], 2)
|
|
8942
|
-
]) : te === "next" ?
|
|
8914
|
+
]) : te === "next" ? H(w.$slots, "next", {
|
|
8943
8915
|
key: 5,
|
|
8944
8916
|
disabled: m.value || w.disabled,
|
|
8945
8917
|
onClick: S,
|
|
@@ -8954,14 +8926,14 @@ const Et = {
|
|
|
8954
8926
|
class: n(a(r).e("next")),
|
|
8955
8927
|
type: "default",
|
|
8956
8928
|
variant: w.buttonVariant,
|
|
8957
|
-
shape:
|
|
8929
|
+
shape: x.value,
|
|
8958
8930
|
size: w.size,
|
|
8959
8931
|
square: "",
|
|
8960
8932
|
disabled: m.value || w.disabled,
|
|
8961
8933
|
"aria-label": "下一页",
|
|
8962
8934
|
onClick: S
|
|
8963
8935
|
}, {
|
|
8964
|
-
default: ve(() => [...
|
|
8936
|
+
default: ve(() => [...q[3] || (q[3] = [
|
|
8965
8937
|
v("svg", {
|
|
8966
8938
|
viewBox: "0 0 24 24",
|
|
8967
8939
|
fill: "none",
|
|
@@ -8977,7 +8949,7 @@ const Et = {
|
|
|
8977
8949
|
])]),
|
|
8978
8950
|
_: 1
|
|
8979
8951
|
}, 8, ["class", "variant", "shape", "size", "disabled"])
|
|
8980
|
-
]) : te === "jumper" ?
|
|
8952
|
+
]) : te === "jumper" ? H(w.$slots, "jumper", {
|
|
8981
8953
|
key: 6,
|
|
8982
8954
|
pageCount: c.value,
|
|
8983
8955
|
disabled: w.disabled,
|
|
@@ -8990,9 +8962,9 @@ const Et = {
|
|
|
8990
8962
|
v("span", {
|
|
8991
8963
|
class: n(a(r).e("jumper"))
|
|
8992
8964
|
}, [
|
|
8993
|
-
|
|
8965
|
+
q[4] || (q[4] = de(" 前往 ", -1)),
|
|
8994
8966
|
Ee(v("input", {
|
|
8995
|
-
"onUpdate:modelValue":
|
|
8967
|
+
"onUpdate:modelValue": q[0] || (q[0] = (A) => E.value = A),
|
|
8996
8968
|
class: n(a(r).e("jumper-input")),
|
|
8997
8969
|
type: "number",
|
|
8998
8970
|
min: 1,
|
|
@@ -9002,9 +8974,9 @@ const Et = {
|
|
|
9002
8974
|
}, null, 42, xa), [
|
|
9003
8975
|
[at, E.value]
|
|
9004
8976
|
]),
|
|
9005
|
-
|
|
8977
|
+
q[5] || (q[5] = de(" 页 ", -1))
|
|
9006
8978
|
], 2)
|
|
9007
|
-
]) :
|
|
8979
|
+
]) : j("", !0)
|
|
9008
8980
|
], 64))), 128))
|
|
9009
8981
|
], 6));
|
|
9010
8982
|
}
|
|
@@ -9096,17 +9068,17 @@ const Et = {
|
|
|
9096
9068
|
props: Ba,
|
|
9097
9069
|
emits: Ma,
|
|
9098
9070
|
setup(u, { expose: t, emit: o }) {
|
|
9099
|
-
const e = u, r = o, l = ne("segmented"), d = { sm: 28, md: 36, lg: 44 }, c = s(() => e.options.map((
|
|
9100
|
-
|
|
9101
|
-
},
|
|
9102
|
-
const
|
|
9071
|
+
const e = u, r = o, l = ne("segmented"), d = { sm: 28, md: 36, lg: 44 }, c = s(() => e.options.map((P) => typeof P == "string" || typeof P == "number" ? { label: String(P), value: P } : P)), f = W(), m = W([]), g = W({}), k = (P, N) => {
|
|
9072
|
+
P && (m.value[N] = P);
|
|
9073
|
+
}, V = () => {
|
|
9074
|
+
const P = c.value.findIndex(
|
|
9103
9075
|
(X) => X.value === e.modelValue
|
|
9104
9076
|
);
|
|
9105
|
-
if (
|
|
9077
|
+
if (P < 0 || !m.value[P] || !f.value) {
|
|
9106
9078
|
g.value = { opacity: "0" };
|
|
9107
9079
|
return;
|
|
9108
9080
|
}
|
|
9109
|
-
const N = m.value[
|
|
9081
|
+
const N = m.value[P], C = f.value.getBoundingClientRect(), D = N.getBoundingClientRect();
|
|
9110
9082
|
g.value = {
|
|
9111
9083
|
width: `${D.width}px`,
|
|
9112
9084
|
transform: `translateX(calc(${D.left - C.left}px + var(--cp-segmented-indicator-offset, -2px)))`,
|
|
@@ -9115,19 +9087,19 @@ const Et = {
|
|
|
9115
9087
|
};
|
|
9116
9088
|
ge(
|
|
9117
9089
|
() => e.modelValue,
|
|
9118
|
-
() => Pe(
|
|
9090
|
+
() => Pe(V)
|
|
9119
9091
|
), ge(
|
|
9120
9092
|
() => e.options,
|
|
9121
|
-
() => Pe(
|
|
9093
|
+
() => Pe(V),
|
|
9122
9094
|
{ deep: !0 }
|
|
9123
9095
|
);
|
|
9124
|
-
let
|
|
9096
|
+
let x = null;
|
|
9125
9097
|
Me(() => {
|
|
9126
|
-
Pe(
|
|
9127
|
-
|
|
9128
|
-
}),
|
|
9098
|
+
Pe(V), f.value && (x = new ResizeObserver(() => {
|
|
9099
|
+
V();
|
|
9100
|
+
}), x.observe(f.value));
|
|
9129
9101
|
}), Ve(() => {
|
|
9130
|
-
|
|
9102
|
+
x == null || x.disconnect();
|
|
9131
9103
|
});
|
|
9132
9104
|
const T = s(() => [
|
|
9133
9105
|
l.b(),
|
|
@@ -9140,47 +9112,47 @@ const Et = {
|
|
|
9140
9112
|
l.is("custom-color", !!e.color),
|
|
9141
9113
|
l.is("custom-size", !ae(e.size))
|
|
9142
9114
|
]), I = s(() => {
|
|
9143
|
-
const
|
|
9144
|
-
return e.color && (
|
|
9145
|
-
}), b = (
|
|
9146
|
-
e.disabled ||
|
|
9147
|
-
}, L = (
|
|
9115
|
+
const P = {};
|
|
9116
|
+
return e.color && (P["--cp-segmented-color"] = e.color, P["--cp-segmented-color-light"] = `${e.color}25`), ae(e.size) || (P["--cp-segmented-height"] = Se(e.size, d)), P;
|
|
9117
|
+
}), b = (P) => {
|
|
9118
|
+
e.disabled || P.disabled || P.value !== e.modelValue && (r("update:modelValue", P.value), r("change", P.value));
|
|
9119
|
+
}, L = (P) => [
|
|
9148
9120
|
l.e("item"),
|
|
9149
|
-
l.is("active",
|
|
9150
|
-
l.is("disabled", !!
|
|
9121
|
+
l.is("active", P.value === e.modelValue),
|
|
9122
|
+
l.is("disabled", !!P.disabled)
|
|
9151
9123
|
];
|
|
9152
9124
|
return t({
|
|
9153
9125
|
/** @description 更新滑块位置 */
|
|
9154
|
-
updateIndicator:
|
|
9155
|
-
}), (
|
|
9126
|
+
updateIndicator: V
|
|
9127
|
+
}), (P, N) => (i(), p("div", {
|
|
9156
9128
|
ref_key: "trackRef",
|
|
9157
9129
|
ref: f,
|
|
9158
9130
|
class: n(T.value),
|
|
9159
|
-
style:
|
|
9131
|
+
style: U(I.value),
|
|
9160
9132
|
role: "radiogroup"
|
|
9161
9133
|
}, [
|
|
9162
9134
|
v("div", {
|
|
9163
9135
|
class: n(a(l).e("indicator")),
|
|
9164
|
-
style:
|
|
9136
|
+
style: U(g.value)
|
|
9165
9137
|
}, null, 6),
|
|
9166
|
-
(i(!0), p(ue, null, ke(c.value, (
|
|
9167
|
-
key:
|
|
9138
|
+
(i(!0), p(ue, null, ke(c.value, (M, C) => (i(), p("button", {
|
|
9139
|
+
key: M.value,
|
|
9168
9140
|
ref_for: !0,
|
|
9169
9141
|
ref: (D) => k(D, C),
|
|
9170
|
-
class: n(L(
|
|
9171
|
-
disabled:
|
|
9142
|
+
class: n(L(M)),
|
|
9143
|
+
disabled: P.disabled || M.disabled,
|
|
9172
9144
|
type: "button",
|
|
9173
9145
|
role: "radio",
|
|
9174
|
-
"aria-checked":
|
|
9175
|
-
onClick: (D) => b(
|
|
9146
|
+
"aria-checked": M.value === P.modelValue,
|
|
9147
|
+
onClick: (D) => b(M)
|
|
9176
9148
|
}, [
|
|
9177
|
-
|
|
9149
|
+
M.icon ? (i(), ee(we(M.icon), {
|
|
9178
9150
|
key: 0,
|
|
9179
9151
|
class: n(a(l).e("item-icon"))
|
|
9180
|
-
}, null, 8, ["class"])) :
|
|
9152
|
+
}, null, 8, ["class"])) : j("", !0),
|
|
9181
9153
|
v("span", {
|
|
9182
9154
|
class: n(a(l).e("item-label"))
|
|
9183
|
-
}, G(
|
|
9155
|
+
}, G(M.label), 3)
|
|
9184
9156
|
], 10, Pa))), 128))
|
|
9185
9157
|
], 6));
|
|
9186
9158
|
}
|
|
@@ -9301,7 +9273,7 @@ const Et = {
|
|
|
9301
9273
|
props: Aa,
|
|
9302
9274
|
emits: Na,
|
|
9303
9275
|
setup(u, { expose: t, emit: o }) {
|
|
9304
|
-
var
|
|
9276
|
+
var q, te;
|
|
9305
9277
|
const e = u, r = o;
|
|
9306
9278
|
xe();
|
|
9307
9279
|
const l = ne("table"), d = W([]);
|
|
@@ -9314,31 +9286,31 @@ const Et = {
|
|
|
9314
9286
|
$ > -1 && d.value.splice($, 1);
|
|
9315
9287
|
} });
|
|
9316
9288
|
const g = W({
|
|
9317
|
-
prop: ((
|
|
9289
|
+
prop: ((q = e.defaultSort) == null ? void 0 : q.prop) || "",
|
|
9318
9290
|
order: ((te = e.defaultSort) == null ? void 0 : te.order) || null
|
|
9319
9291
|
}), k = s(() => {
|
|
9320
9292
|
const { prop: A, order: $ } = g.value;
|
|
9321
|
-
return !A || !$ ? [...e.data] : [...e.data].sort((y,
|
|
9322
|
-
const h = y[A],
|
|
9323
|
-
if (h == null &&
|
|
9293
|
+
return !A || !$ ? [...e.data] : [...e.data].sort((y, O) => {
|
|
9294
|
+
const h = y[A], z = O[A];
|
|
9295
|
+
if (h == null && z == null) return 0;
|
|
9324
9296
|
if (h == null) return $ === "ascending" ? -1 : 1;
|
|
9325
|
-
if (
|
|
9326
|
-
if (typeof h == "number" && typeof
|
|
9327
|
-
return $ === "ascending" ? h -
|
|
9328
|
-
const
|
|
9329
|
-
return $ === "ascending" ?
|
|
9297
|
+
if (z == null) return $ === "ascending" ? 1 : -1;
|
|
9298
|
+
if (typeof h == "number" && typeof z == "number")
|
|
9299
|
+
return $ === "ascending" ? h - z : z - h;
|
|
9300
|
+
const F = String(h), B = String(z);
|
|
9301
|
+
return $ === "ascending" ? F.localeCompare(B) : B.localeCompare(F);
|
|
9330
9302
|
});
|
|
9331
|
-
}),
|
|
9303
|
+
}), V = (A) => {
|
|
9332
9304
|
if (!A.sortable) return;
|
|
9333
9305
|
const $ = g.value.prop === A.prop ? g.value.order : null;
|
|
9334
9306
|
let y = null;
|
|
9335
9307
|
$ === null ? y = "ascending" : $ === "ascending" ? y = "descending" : y = null, g.value = { prop: A.prop, order: y }, r("sort-change", g.value);
|
|
9336
|
-
},
|
|
9308
|
+
}, x = (A) => !A.sortable || g.value.prop !== A.prop ? "" : g.value.order === "ascending" ? "is-ascending" : g.value.order === "descending" ? "is-descending" : "", T = (A, $) => g.value.prop === A.prop && g.value.order === $, I = W(/* @__PURE__ */ new Set());
|
|
9337
9309
|
s(() => d.value.some((A) => A.columnType === "selection"));
|
|
9338
9310
|
const b = s(() => k.value.length === 0 ? !1 : k.value.every((A) => I.value.has(A))), L = s(() => {
|
|
9339
9311
|
const A = k.value.filter(($) => I.value.has($)).length;
|
|
9340
9312
|
return A > 0 && A < k.value.length;
|
|
9341
|
-
}),
|
|
9313
|
+
}), P = (A) => {
|
|
9342
9314
|
const $ = new Set(I.value);
|
|
9343
9315
|
$.has(A) ? $.delete(A) : $.add(A), I.value = $;
|
|
9344
9316
|
const y = Array.from($);
|
|
@@ -9348,10 +9320,10 @@ const Et = {
|
|
|
9348
9320
|
b.value ? A = /* @__PURE__ */ new Set() : A = new Set(k.value), I.value = A;
|
|
9349
9321
|
const $ = Array.from(A);
|
|
9350
9322
|
r("select-all", $), r("selection-change", $);
|
|
9351
|
-
},
|
|
9323
|
+
}, M = W(null), C = (A, $, y) => {
|
|
9352
9324
|
if (r("row-click", A, $, y), e.highlightCurrentRow) {
|
|
9353
|
-
const
|
|
9354
|
-
|
|
9325
|
+
const O = M.value;
|
|
9326
|
+
M.value = A, r("current-change", A, O);
|
|
9355
9327
|
}
|
|
9356
9328
|
}, D = (A, $) => typeof e.rowKey == "function" ? e.rowKey(A) : A[e.rowKey] ?? $, X = s(() => [
|
|
9357
9329
|
l.b(),
|
|
@@ -9382,7 +9354,7 @@ const Et = {
|
|
|
9382
9354
|
}), E = (A) => {
|
|
9383
9355
|
const $ = {};
|
|
9384
9356
|
return A.width && ($.width = typeof A.width == "number" ? `${A.width}px` : A.width), A.minWidth && ($.minWidth = typeof A.minWidth == "number" ? `${A.minWidth}px` : A.minWidth), (A.columnType === "selection" || A.columnType === "index") && (A.width || ($.width = "50px")), $;
|
|
9385
|
-
}, Y = (A, $) => $.prop ? $.prop.split(".").reduce((y,
|
|
9357
|
+
}, Y = (A, $) => $.prop ? $.prop.split(".").reduce((y, O) => y == null ? void 0 : y[O], A) : "", w = (A) => A === "center" ? l.m("align-center") : A === "right" ? l.m("align-right") : "";
|
|
9386
9358
|
return t({
|
|
9387
9359
|
/** 清空选择 */
|
|
9388
9360
|
clearSelection: () => {
|
|
@@ -9396,15 +9368,15 @@ const Et = {
|
|
|
9396
9368
|
},
|
|
9397
9369
|
/** 设置当前行 */
|
|
9398
9370
|
setCurrentRow: (A) => {
|
|
9399
|
-
const $ =
|
|
9400
|
-
|
|
9371
|
+
const $ = M.value;
|
|
9372
|
+
M.value = A, r("current-change", A, $);
|
|
9401
9373
|
}
|
|
9402
9374
|
}), (A, $) => (i(), p("div", {
|
|
9403
9375
|
class: n(X.value),
|
|
9404
|
-
style:
|
|
9376
|
+
style: U(R.value)
|
|
9405
9377
|
}, [
|
|
9406
9378
|
v("div", Ea, [
|
|
9407
|
-
|
|
9379
|
+
H(A.$slots, "default")
|
|
9408
9380
|
]),
|
|
9409
9381
|
v("div", {
|
|
9410
9382
|
class: n(a(l).e("wrapper"))
|
|
@@ -9424,11 +9396,11 @@ const Et = {
|
|
|
9424
9396
|
class: n([
|
|
9425
9397
|
a(l).e("header-cell"),
|
|
9426
9398
|
y.sortable && a(l).is("sortable", !0),
|
|
9427
|
-
|
|
9399
|
+
x(y),
|
|
9428
9400
|
w(y.headerAlign || y.align)
|
|
9429
9401
|
]),
|
|
9430
|
-
style:
|
|
9431
|
-
onClick: (
|
|
9402
|
+
style: U(E(y)),
|
|
9403
|
+
onClick: (O) => y.sortable ? V(y) : void 0
|
|
9432
9404
|
}, [
|
|
9433
9405
|
y.columnType === "selection" ? (i(), ee(st, {
|
|
9434
9406
|
key: 0,
|
|
@@ -9470,41 +9442,41 @@ const Et = {
|
|
|
9470
9442
|
fill: "currentColor"
|
|
9471
9443
|
}, null, -1)
|
|
9472
9444
|
])], 2))
|
|
9473
|
-
], 2)) :
|
|
9445
|
+
], 2)) : j("", !0)
|
|
9474
9446
|
], 64))
|
|
9475
9447
|
], 14, Ia))), 128))
|
|
9476
9448
|
], 2)
|
|
9477
|
-
], 2)) :
|
|
9449
|
+
], 2)) : j("", !0),
|
|
9478
9450
|
v("tbody", {
|
|
9479
9451
|
class: n(a(l).e("body")),
|
|
9480
|
-
style:
|
|
9452
|
+
style: U(ie.value)
|
|
9481
9453
|
}, [
|
|
9482
|
-
k.value.length > 0 ? (i(!0), p(ue, { key: 0 }, ke(k.value, (y,
|
|
9483
|
-
key: D(y,
|
|
9454
|
+
k.value.length > 0 ? (i(!0), p(ue, { key: 0 }, ke(k.value, (y, O) => (i(), p("tr", {
|
|
9455
|
+
key: D(y, O),
|
|
9484
9456
|
class: n([
|
|
9485
9457
|
a(l).e("row"),
|
|
9486
|
-
a(l).is("striped", A.stripe &&
|
|
9487
|
-
a(l).is("current", A.highlightCurrentRow &&
|
|
9458
|
+
a(l).is("striped", A.stripe && O % 2 === 1),
|
|
9459
|
+
a(l).is("current", A.highlightCurrentRow && M.value === y),
|
|
9488
9460
|
a(l).is("selected", I.value.has(y))
|
|
9489
9461
|
]),
|
|
9490
|
-
onClick: (h) => C(y,
|
|
9462
|
+
onClick: (h) => C(y, O, h)
|
|
9491
9463
|
}, [
|
|
9492
9464
|
(i(!0), p(ue, null, ke(d.value, (h) => (i(), p("td", {
|
|
9493
9465
|
key: h.id,
|
|
9494
9466
|
class: n([a(l).e("cell"), w(h.align)]),
|
|
9495
|
-
style:
|
|
9467
|
+
style: U(E(h))
|
|
9496
9468
|
}, [
|
|
9497
9469
|
h.columnType === "selection" ? (i(), ee(st, {
|
|
9498
9470
|
key: 0,
|
|
9499
9471
|
"model-value": I.value.has(y),
|
|
9500
9472
|
type: S.value,
|
|
9501
9473
|
color: J.value,
|
|
9502
|
-
onChange: (
|
|
9474
|
+
onChange: (z) => P(y),
|
|
9503
9475
|
onClick: $[1] || ($[1] = Ce(() => {
|
|
9504
9476
|
}, ["stop"]))
|
|
9505
9477
|
}, null, 8, ["model-value", "type", "color", "onChange"])) : h.columnType === "index" ? (i(), p(ue, { key: 1 }, [
|
|
9506
|
-
de(G(
|
|
9507
|
-
], 64)) : h.slots.default ? (i(), ee(we({ render: () => h.slots.default({ row: y, column: h, $index:
|
|
9478
|
+
de(G(O + 1), 1)
|
|
9479
|
+
], 64)) : h.slots.default ? (i(), ee(we({ render: () => h.slots.default({ row: y, column: h, $index: O }) }), { key: 2 })) : (i(), p(ue, { key: 3 }, [
|
|
9508
9480
|
de(G(Y(y, h)), 1)
|
|
9509
9481
|
], 64))
|
|
9510
9482
|
], 6))), 128))
|
|
@@ -9516,7 +9488,7 @@ const Et = {
|
|
|
9516
9488
|
colspan: d.value.length,
|
|
9517
9489
|
class: n(a(l).e("empty-cell"))
|
|
9518
9490
|
}, [
|
|
9519
|
-
|
|
9491
|
+
H(A.$slots, "empty", {}, () => [
|
|
9520
9492
|
v("div", {
|
|
9521
9493
|
class: n(a(l).e("empty"))
|
|
9522
9494
|
}, [
|
|
@@ -9629,7 +9601,7 @@ const Et = {
|
|
|
9629
9601
|
e && r && e.unregisterColumn(r);
|
|
9630
9602
|
}), (l, d) => null;
|
|
9631
9603
|
}
|
|
9632
|
-
}),
|
|
9604
|
+
}), _r = re(Oa), Ka = {
|
|
9633
9605
|
/** 表单数据对象 */
|
|
9634
9606
|
model: {
|
|
9635
9607
|
type: Object,
|
|
@@ -9768,14 +9740,14 @@ const Et = {
|
|
|
9768
9740
|
}
|
|
9769
9741
|
}), (I, b) => (i(), p("form", {
|
|
9770
9742
|
class: n(f.value),
|
|
9771
|
-
style:
|
|
9743
|
+
style: U(m.value),
|
|
9772
9744
|
onSubmit: b[0] || (b[0] = Ce(() => {
|
|
9773
9745
|
}, ["prevent"]))
|
|
9774
9746
|
}, [
|
|
9775
|
-
|
|
9747
|
+
H(I.$slots, "default")
|
|
9776
9748
|
], 38));
|
|
9777
9749
|
}
|
|
9778
|
-
}),
|
|
9750
|
+
}), Hr = re(Fa), ja = {
|
|
9779
9751
|
/** 标签文本 */
|
|
9780
9752
|
label: {
|
|
9781
9753
|
type: String,
|
|
@@ -9841,7 +9813,7 @@ const Et = {
|
|
|
9841
9813
|
type: [String, Number],
|
|
9842
9814
|
default: void 0
|
|
9843
9815
|
}
|
|
9844
|
-
},
|
|
9816
|
+
}, _a = { key: 0 }, Ha = /* @__PURE__ */ oe({
|
|
9845
9817
|
name: `${se}FormItem`,
|
|
9846
9818
|
__name: "form-item",
|
|
9847
9819
|
props: ja,
|
|
@@ -9849,9 +9821,9 @@ const Et = {
|
|
|
9849
9821
|
const o = u, e = ne("form-item"), r = $e(it, void 0), l = W(""), d = W("");
|
|
9850
9822
|
let c;
|
|
9851
9823
|
Me(() => {
|
|
9852
|
-
o.prop && r && (r.model.value && (c = f(r.model.value[o.prop])), r.addField(
|
|
9824
|
+
o.prop && r && (r.model.value && (c = f(r.model.value[o.prop])), r.addField(M));
|
|
9853
9825
|
}), Ve(() => {
|
|
9854
|
-
r && r.removeField(
|
|
9826
|
+
r && r.removeField(M);
|
|
9855
9827
|
});
|
|
9856
9828
|
function f(S) {
|
|
9857
9829
|
return Array.isArray(S) ? [...S] : S && typeof S == "object" ? { ...S } : S;
|
|
@@ -9859,7 +9831,7 @@ const Et = {
|
|
|
9859
9831
|
const m = s(() => {
|
|
9860
9832
|
if (!(!o.prop || !(r != null && r.model.value)))
|
|
9861
9833
|
return r.model.value[o.prop];
|
|
9862
|
-
}), g = s(() => o.showMessage !== void 0 ? o.showMessage : (r == null ? void 0 : r.showMessage.value) ?? !0), k = s(() => o.reserveErrorSpace !== void 0 ? o.reserveErrorSpace : (r == null ? void 0 : r.reserveErrorSpace.value) ?? !1),
|
|
9834
|
+
}), g = s(() => o.showMessage !== void 0 ? o.showMessage : (r == null ? void 0 : r.showMessage.value) ?? !0), k = s(() => o.reserveErrorSpace !== void 0 ? o.reserveErrorSpace : (r == null ? void 0 : r.reserveErrorSpace.value) ?? !1), V = s(() => o.required ? !0 : x.value.some((J) => J.required)), x = s(() => {
|
|
9863
9835
|
if (o.rules)
|
|
9864
9836
|
return Array.isArray(o.rules) ? o.rules : [o.rules];
|
|
9865
9837
|
if (o.prop && (r != null && r.rules.value)) {
|
|
@@ -9873,7 +9845,7 @@ const Et = {
|
|
|
9873
9845
|
if (S !== "auto")
|
|
9874
9846
|
return typeof S == "number" ? `${S}px` : S;
|
|
9875
9847
|
}), I = s(() => o.error ? o.error : d.value), b = s(() => l.value === "error" || !!o.error), L = async (S) => {
|
|
9876
|
-
const J =
|
|
9848
|
+
const J = x.value;
|
|
9877
9849
|
if (J.length === 0) return !0;
|
|
9878
9850
|
const ie = S ? J.filter((Y) => !Y.trigger || Y.trigger === S) : J;
|
|
9879
9851
|
if (ie.length === 0) return !0;
|
|
@@ -9903,22 +9875,22 @@ const Et = {
|
|
|
9903
9875
|
}
|
|
9904
9876
|
}
|
|
9905
9877
|
return l.value = "", d.value = "", !0;
|
|
9906
|
-
},
|
|
9878
|
+
}, P = () => {
|
|
9907
9879
|
o.prop && (r != null && r.model.value) && (r.model.value[o.prop] = f(c)), l.value = "", d.value = "";
|
|
9908
9880
|
}, N = () => {
|
|
9909
9881
|
l.value = "", d.value = "";
|
|
9910
|
-
},
|
|
9882
|
+
}, M = Pt({
|
|
9911
9883
|
prop: o.prop,
|
|
9912
9884
|
validate: L,
|
|
9913
|
-
resetField:
|
|
9885
|
+
resetField: P,
|
|
9914
9886
|
clearValidate: N
|
|
9915
9887
|
});
|
|
9916
9888
|
ge(m, () => {
|
|
9917
|
-
|
|
9889
|
+
x.value.length > 0 && L("change");
|
|
9918
9890
|
});
|
|
9919
9891
|
const C = s(() => [
|
|
9920
9892
|
e.b(),
|
|
9921
|
-
|
|
9893
|
+
V.value ? "is-required" : "",
|
|
9922
9894
|
b.value ? "is-error" : "",
|
|
9923
9895
|
l.value === "validating" ? "is-validating" : "",
|
|
9924
9896
|
k.value ? "is-reserve-space" : ""
|
|
@@ -9933,7 +9905,7 @@ const Et = {
|
|
|
9933
9905
|
/** @description 验证该表单项 */
|
|
9934
9906
|
validate: L,
|
|
9935
9907
|
/** @description 重置该表单项 */
|
|
9936
|
-
resetField:
|
|
9908
|
+
resetField: P,
|
|
9937
9909
|
/** @description 清除验证状态 */
|
|
9938
9910
|
clearValidate: N,
|
|
9939
9911
|
/** @description 当前验证状态 */
|
|
@@ -9946,30 +9918,30 @@ const Et = {
|
|
|
9946
9918
|
S.label || S.$slots.label ? (i(), p("label", {
|
|
9947
9919
|
key: 0,
|
|
9948
9920
|
class: n(D.value),
|
|
9949
|
-
style:
|
|
9921
|
+
style: U(X.value)
|
|
9950
9922
|
}, [
|
|
9951
|
-
|
|
9923
|
+
H(S.$slots, "label", {}, () => [
|
|
9952
9924
|
de(G(S.label) + G(R.value), 1)
|
|
9953
9925
|
])
|
|
9954
|
-
], 6)) :
|
|
9926
|
+
], 6)) : j("", !0),
|
|
9955
9927
|
v("div", {
|
|
9956
9928
|
class: n(a(e).e("content"))
|
|
9957
9929
|
}, [
|
|
9958
|
-
|
|
9930
|
+
H(S.$slots, "default"),
|
|
9959
9931
|
v("div", {
|
|
9960
9932
|
class: n([
|
|
9961
9933
|
a(e).e("error"),
|
|
9962
9934
|
b.value && g.value ? "is-active" : ""
|
|
9963
9935
|
])
|
|
9964
9936
|
}, [
|
|
9965
|
-
|
|
9966
|
-
b.value && g.value ? (i(), p("span",
|
|
9937
|
+
H(S.$slots, "error", { error: I.value }, () => [
|
|
9938
|
+
b.value && g.value ? (i(), p("span", _a, G(I.value), 1)) : j("", !0)
|
|
9967
9939
|
])
|
|
9968
9940
|
], 2)
|
|
9969
9941
|
], 2)
|
|
9970
9942
|
], 2));
|
|
9971
9943
|
}
|
|
9972
|
-
}), Wr = re(
|
|
9944
|
+
}), Wr = re(Ha), Wa = {
|
|
9973
9945
|
/**
|
|
9974
9946
|
* 分隔符文本
|
|
9975
9947
|
* @default '/'
|
|
@@ -10010,7 +9982,7 @@ const Et = {
|
|
|
10010
9982
|
type: String,
|
|
10011
9983
|
default: ""
|
|
10012
9984
|
}
|
|
10013
|
-
}, $t = Symbol("breadcrumb"),
|
|
9985
|
+
}, $t = Symbol("breadcrumb"), qa = /* @__PURE__ */ oe({
|
|
10014
9986
|
name: `${se}Breadcrumb`,
|
|
10015
9987
|
__name: "breadcrumb",
|
|
10016
9988
|
props: Wa,
|
|
@@ -10037,17 +10009,17 @@ const Et = {
|
|
|
10037
10009
|
});
|
|
10038
10010
|
return (d, c) => (i(), p("nav", {
|
|
10039
10011
|
class: n(r.value),
|
|
10040
|
-
style:
|
|
10012
|
+
style: U(l.value),
|
|
10041
10013
|
"aria-label": "Breadcrumb"
|
|
10042
10014
|
}, [
|
|
10043
10015
|
v("ol", {
|
|
10044
10016
|
class: n(a(o).e("list"))
|
|
10045
10017
|
}, [
|
|
10046
|
-
|
|
10018
|
+
H(d.$slots, "default")
|
|
10047
10019
|
], 2)
|
|
10048
10020
|
], 6));
|
|
10049
10021
|
}
|
|
10050
|
-
}),
|
|
10022
|
+
}), qr = re(qa), Ua = {
|
|
10051
10023
|
/**
|
|
10052
10024
|
* 路由跳转目标(vue-router 的 `to`)
|
|
10053
10025
|
* 不设置则渲染为纯文本
|
|
@@ -10067,7 +10039,7 @@ const Et = {
|
|
|
10067
10039
|
}, Ya = /* @__PURE__ */ oe({
|
|
10068
10040
|
name: `${se}BreadcrumbItem`,
|
|
10069
10041
|
__name: "breadcrumb-item",
|
|
10070
|
-
props:
|
|
10042
|
+
props: Ua,
|
|
10071
10043
|
setup(u) {
|
|
10072
10044
|
const t = u, o = ne("breadcrumb"), e = $e($t, {
|
|
10073
10045
|
separator: "/"
|
|
@@ -10084,13 +10056,13 @@ const Et = {
|
|
|
10084
10056
|
role: "link",
|
|
10085
10057
|
onClick: d
|
|
10086
10058
|
}, [
|
|
10087
|
-
|
|
10059
|
+
H(c.$slots, "default")
|
|
10088
10060
|
], 2),
|
|
10089
10061
|
v("span", {
|
|
10090
10062
|
class: n(a(o).e("separator")),
|
|
10091
10063
|
"aria-hidden": "true"
|
|
10092
10064
|
}, [
|
|
10093
|
-
|
|
10065
|
+
H(c.$slots, "separator", {}, () => [
|
|
10094
10066
|
a(e).separatorIcon ? (i(), ee(we(a(e).separatorIcon), {
|
|
10095
10067
|
key: 0,
|
|
10096
10068
|
class: n(a(o).e("separator-icon"))
|
|
@@ -10101,7 +10073,7 @@ const Et = {
|
|
|
10101
10073
|
], 2)
|
|
10102
10074
|
], 2));
|
|
10103
10075
|
}
|
|
10104
|
-
}),
|
|
10076
|
+
}), Ur = re(Ya), Xa = {
|
|
10105
10077
|
/**
|
|
10106
10078
|
* 文件列表 (v-model)
|
|
10107
10079
|
* @default []
|
|
@@ -10354,9 +10326,9 @@ const Et = {
|
|
|
10354
10326
|
warning: "var(--cp-color-warning)",
|
|
10355
10327
|
error: "var(--cp-color-error)",
|
|
10356
10328
|
info: "var(--cp-color-info)"
|
|
10357
|
-
},
|
|
10329
|
+
}, V = s(() => e.color ? e.color : k[e.type] || ""), x = s(() => {
|
|
10358
10330
|
const y = {};
|
|
10359
|
-
return
|
|
10331
|
+
return V.value && (y["--cp-upload-color"] = V.value, y["--cp-upload-border-color"] = V.value), y;
|
|
10360
10332
|
}), T = s(() => [
|
|
10361
10333
|
l.b(),
|
|
10362
10334
|
l.m(e.variant),
|
|
@@ -10371,36 +10343,36 @@ const Et = {
|
|
|
10371
10343
|
dashed: "outline",
|
|
10372
10344
|
filled: "solid",
|
|
10373
10345
|
ghost: "ghost"
|
|
10374
|
-
})[e.variant] || "outline"), b = s(() => e.variant === "dashed"), L = s(() => e.listType !== "picture-card" || e.limit !== 1 ? !1 : e.inlinePreview ?? !0),
|
|
10346
|
+
})[e.variant] || "outline"), b = s(() => e.variant === "dashed"), L = s(() => e.listType !== "picture-card" || e.limit !== 1 ? !1 : e.inlinePreview ?? !0), P = s(() => L.value && e.modelValue.length > 0 ? e.modelValue[0] : null);
|
|
10375
10347
|
function N(y) {
|
|
10376
|
-
return new Promise((
|
|
10377
|
-
const
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
}),
|
|
10381
|
-
|
|
10382
|
-
}),
|
|
10383
|
-
if (
|
|
10384
|
-
let
|
|
10348
|
+
return new Promise((O, h) => {
|
|
10349
|
+
const z = new XMLHttpRequest(), F = new FormData();
|
|
10350
|
+
F.append(y.filename, y.file), Object.entries(y.data).forEach(([B, Q]) => {
|
|
10351
|
+
F.append(B, Q);
|
|
10352
|
+
}), z.upload.addEventListener("progress", (B) => {
|
|
10353
|
+
B.lengthComputable && y.onProgress(Math.round(B.loaded / B.total * 100));
|
|
10354
|
+
}), z.addEventListener("load", () => {
|
|
10355
|
+
if (z.status >= 200 && z.status < 300) {
|
|
10356
|
+
let B;
|
|
10385
10357
|
try {
|
|
10386
|
-
|
|
10358
|
+
B = JSON.parse(z.responseText);
|
|
10387
10359
|
} catch {
|
|
10388
|
-
|
|
10360
|
+
B = z.responseText;
|
|
10389
10361
|
}
|
|
10390
|
-
y.onSuccess(
|
|
10362
|
+
y.onSuccess(B), O(B);
|
|
10391
10363
|
} else {
|
|
10392
|
-
const
|
|
10393
|
-
y.onError(
|
|
10364
|
+
const B = new Error(`Upload failed with status ${z.status}`);
|
|
10365
|
+
y.onError(B), h(B);
|
|
10394
10366
|
}
|
|
10395
|
-
}),
|
|
10396
|
-
const
|
|
10397
|
-
y.onError(
|
|
10398
|
-
}),
|
|
10399
|
-
|
|
10400
|
-
}),
|
|
10367
|
+
}), z.addEventListener("error", () => {
|
|
10368
|
+
const B = new Error("Upload request failed");
|
|
10369
|
+
y.onError(B), h(B);
|
|
10370
|
+
}), z.open("POST", y.action, !0), Object.entries(y.headers).forEach(([B, Q]) => {
|
|
10371
|
+
z.setRequestHeader(B, Q);
|
|
10372
|
+
}), z.send(F);
|
|
10401
10373
|
});
|
|
10402
10374
|
}
|
|
10403
|
-
function
|
|
10375
|
+
function M(y) {
|
|
10404
10376
|
r("update:modelValue", y);
|
|
10405
10377
|
}
|
|
10406
10378
|
function C() {
|
|
@@ -10415,40 +10387,40 @@ const Et = {
|
|
|
10415
10387
|
async function R(y) {
|
|
10416
10388
|
if (!e.action || !y.raw) return;
|
|
10417
10389
|
y.status = "uploading", y.percentage = 0;
|
|
10418
|
-
const
|
|
10390
|
+
const O = e.httpRequest || N, h = {
|
|
10419
10391
|
action: e.action,
|
|
10420
10392
|
file: y.raw,
|
|
10421
10393
|
filename: e.name,
|
|
10422
10394
|
headers: e.headers,
|
|
10423
10395
|
data: e.data,
|
|
10424
|
-
onProgress: (
|
|
10425
|
-
y.percentage =
|
|
10396
|
+
onProgress: (z) => {
|
|
10397
|
+
y.percentage = z, r("progress", z, y), M([...e.modelValue]);
|
|
10426
10398
|
},
|
|
10427
|
-
onSuccess: (
|
|
10428
|
-
y.status = "success", y.percentage = 100, y.response =
|
|
10429
|
-
const
|
|
10430
|
-
r("success",
|
|
10399
|
+
onSuccess: (z) => {
|
|
10400
|
+
y.status = "success", y.percentage = 100, y.response = z;
|
|
10401
|
+
const F = [...e.modelValue];
|
|
10402
|
+
r("success", z, y, F), r("change", y, F), M(F);
|
|
10431
10403
|
},
|
|
10432
|
-
onError: (
|
|
10404
|
+
onError: (z) => {
|
|
10433
10405
|
y.status = "error";
|
|
10434
|
-
const
|
|
10435
|
-
r("error",
|
|
10406
|
+
const F = [...e.modelValue];
|
|
10407
|
+
r("error", z, y, F), r("change", y, F), M(F);
|
|
10436
10408
|
}
|
|
10437
10409
|
};
|
|
10438
10410
|
try {
|
|
10439
|
-
await
|
|
10411
|
+
await O(h);
|
|
10440
10412
|
} catch {
|
|
10441
10413
|
}
|
|
10442
10414
|
}
|
|
10443
10415
|
async function S(y) {
|
|
10444
|
-
var
|
|
10445
|
-
const
|
|
10416
|
+
var B, Q;
|
|
10417
|
+
const O = Array.from(y), h = L.value ? O.slice(0, 1) : O;
|
|
10446
10418
|
if (!L.value && e.limit && e.modelValue.length + h.length > e.limit) {
|
|
10447
|
-
(
|
|
10419
|
+
(B = e.onExceed) == null || B.call(e, h, e.modelValue);
|
|
10448
10420
|
return;
|
|
10449
10421
|
}
|
|
10450
|
-
L.value &&
|
|
10451
|
-
const
|
|
10422
|
+
L.value && O.length > 1 && ((Q = e.onExceed) == null || Q.call(e, O.slice(1), e.modelValue));
|
|
10423
|
+
const z = [];
|
|
10452
10424
|
for (const le of h) {
|
|
10453
10425
|
if (e.maxSize && le.size > e.maxSize)
|
|
10454
10426
|
continue;
|
|
@@ -10458,7 +10430,7 @@ const Et = {
|
|
|
10458
10430
|
} catch {
|
|
10459
10431
|
continue;
|
|
10460
10432
|
}
|
|
10461
|
-
const
|
|
10433
|
+
const K = {
|
|
10462
10434
|
uid: C(),
|
|
10463
10435
|
name: le.name,
|
|
10464
10436
|
size: le.size,
|
|
@@ -10466,15 +10438,15 @@ const Et = {
|
|
|
10466
10438
|
percentage: 0,
|
|
10467
10439
|
raw: le
|
|
10468
10440
|
};
|
|
10469
|
-
le.type.startsWith("image/") && (
|
|
10441
|
+
le.type.startsWith("image/") && (K.url = URL.createObjectURL(le)), z.push(K);
|
|
10470
10442
|
}
|
|
10471
|
-
if (
|
|
10472
|
-
const
|
|
10443
|
+
if (z.length === 0) return;
|
|
10444
|
+
const F = L.value ? [z[0]] : [...e.modelValue, ...z];
|
|
10473
10445
|
if (L.value)
|
|
10474
10446
|
for (const le of e.modelValue)
|
|
10475
10447
|
le.url && le.raw && URL.revokeObjectURL(le.url);
|
|
10476
|
-
if (
|
|
10477
|
-
for (const le of
|
|
10448
|
+
if (M(F), e.autoUpload)
|
|
10449
|
+
for (const le of z)
|
|
10478
10450
|
R(le);
|
|
10479
10451
|
}
|
|
10480
10452
|
function J() {
|
|
@@ -10482,8 +10454,8 @@ const Et = {
|
|
|
10482
10454
|
g.value || (y = c.value) == null || y.click();
|
|
10483
10455
|
}
|
|
10484
10456
|
function ie(y) {
|
|
10485
|
-
const
|
|
10486
|
-
|
|
10457
|
+
const O = y.target;
|
|
10458
|
+
O.files && S(O.files), O.value = "";
|
|
10487
10459
|
}
|
|
10488
10460
|
function E(y) {
|
|
10489
10461
|
y.preventDefault(), !g.value && (f.value = !0);
|
|
@@ -10494,13 +10466,13 @@ const Et = {
|
|
|
10494
10466
|
function w(y) {
|
|
10495
10467
|
y.preventDefault(), f.value = !1;
|
|
10496
10468
|
}
|
|
10497
|
-
function
|
|
10498
|
-
var
|
|
10499
|
-
y.preventDefault(), f.value = !1, !g.value && (
|
|
10469
|
+
function q(y) {
|
|
10470
|
+
var O;
|
|
10471
|
+
y.preventDefault(), f.value = !1, !g.value && (O = y.dataTransfer) != null && O.files && S(y.dataTransfer.files);
|
|
10500
10472
|
}
|
|
10501
10473
|
function te(y) {
|
|
10502
|
-
const
|
|
10503
|
-
y.url && y.raw && URL.revokeObjectURL(y.url), r("remove", y,
|
|
10474
|
+
const O = e.modelValue.filter((h) => h.uid !== y.uid);
|
|
10475
|
+
y.url && y.raw && URL.revokeObjectURL(y.url), r("remove", y, O), r("change", y, O), M(O);
|
|
10504
10476
|
}
|
|
10505
10477
|
function A() {
|
|
10506
10478
|
e.modelValue.filter((y) => y.status === "ready").forEach((y) => R(y));
|
|
@@ -10509,16 +10481,16 @@ const Et = {
|
|
|
10509
10481
|
/** 手动触发上传 */
|
|
10510
10482
|
submit: A,
|
|
10511
10483
|
/** 清空文件列表 */
|
|
10512
|
-
clearFiles: () =>
|
|
10484
|
+
clearFiles: () => M([])
|
|
10513
10485
|
});
|
|
10514
10486
|
function $(y) {
|
|
10515
10487
|
if (y === 0) return "0 B";
|
|
10516
|
-
const
|
|
10517
|
-
return `${(y / Math.pow(
|
|
10488
|
+
const O = 1024, h = ["B", "KB", "MB", "GB"], z = Math.floor(Math.log(y) / Math.log(O));
|
|
10489
|
+
return `${(y / Math.pow(O, z)).toFixed(1)} ${h[z]}`;
|
|
10518
10490
|
}
|
|
10519
|
-
return (y,
|
|
10491
|
+
return (y, O) => (i(), p("div", {
|
|
10520
10492
|
class: n(T.value),
|
|
10521
|
-
style:
|
|
10493
|
+
style: U(x.value)
|
|
10522
10494
|
}, [
|
|
10523
10495
|
v("input", {
|
|
10524
10496
|
ref_key: "inputRef",
|
|
@@ -10536,14 +10508,14 @@ const Et = {
|
|
|
10536
10508
|
onDragenter: E,
|
|
10537
10509
|
onDragover: Y,
|
|
10538
10510
|
onDragleave: w,
|
|
10539
|
-
onDrop:
|
|
10511
|
+
onDrop: q
|
|
10540
10512
|
}, [
|
|
10541
|
-
|
|
10513
|
+
H(y.$slots, "default", {}, () => [
|
|
10542
10514
|
y.drag ? (i(), p("div", {
|
|
10543
10515
|
key: 0,
|
|
10544
10516
|
class: n(a(l).e("drag-content"))
|
|
10545
10517
|
}, [
|
|
10546
|
-
|
|
10518
|
+
H(y.$slots, "placeholder", { mode: "drag" }, () => [
|
|
10547
10519
|
y.placeholderIcon ? (i(), ee(we(y.placeholderIcon), {
|
|
10548
10520
|
key: 0,
|
|
10549
10521
|
class: n(a(l).e("drag-icon"))
|
|
@@ -10554,7 +10526,7 @@ const Et = {
|
|
|
10554
10526
|
fill: "none",
|
|
10555
10527
|
stroke: "currentColor",
|
|
10556
10528
|
"stroke-width": "1.5"
|
|
10557
|
-
}, [...
|
|
10529
|
+
}, [...O[1] || (O[1] = [
|
|
10558
10530
|
v("path", { d: "M7 18a4.6 4.4 0 0 1 0-9 5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1" }, null, -1),
|
|
10559
10531
|
v("polyline", { points: "16 16 12 12 8 16" }, null, -1),
|
|
10560
10532
|
v("line", {
|
|
@@ -10571,12 +10543,12 @@ const Et = {
|
|
|
10571
10543
|
key: 3,
|
|
10572
10544
|
class: n(a(l).e("drag-text"))
|
|
10573
10545
|
}, [
|
|
10574
|
-
|
|
10546
|
+
O[3] || (O[3] = de("拖拽文件到此处,或 ", -1)),
|
|
10575
10547
|
he(a(Ko), {
|
|
10576
10548
|
underline: "",
|
|
10577
10549
|
type: "primary"
|
|
10578
10550
|
}, {
|
|
10579
|
-
default: ve(() => [...
|
|
10551
|
+
default: ve(() => [...O[2] || (O[2] = [
|
|
10580
10552
|
de("点击上传", -1)
|
|
10581
10553
|
])]),
|
|
10582
10554
|
_: 1
|
|
@@ -10584,38 +10556,38 @@ const Et = {
|
|
|
10584
10556
|
], 2))
|
|
10585
10557
|
])
|
|
10586
10558
|
], 2)) : y.listType === "picture-card" ? (i(), p(ue, { key: 1 }, [
|
|
10587
|
-
|
|
10559
|
+
P.value ? (i(), p("div", {
|
|
10588
10560
|
key: 0,
|
|
10589
|
-
class: n([a(l).e("card"), a(l).e("card--inline"), a(l).is(
|
|
10561
|
+
class: n([a(l).e("card"), a(l).e("card--inline"), a(l).is(P.value.status, !0)])
|
|
10590
10562
|
}, [
|
|
10591
|
-
D(
|
|
10563
|
+
D(P.value) ? (i(), ee(a(lt), {
|
|
10592
10564
|
key: 0,
|
|
10593
|
-
src: X(
|
|
10565
|
+
src: X(P.value),
|
|
10594
10566
|
fit: "cover",
|
|
10595
10567
|
shape: y.shape,
|
|
10596
10568
|
"show-decor": !1,
|
|
10597
10569
|
width: "100%",
|
|
10598
10570
|
height: "100%"
|
|
10599
|
-
}, null, 8, ["src", "shape"])) :
|
|
10600
|
-
|
|
10571
|
+
}, null, 8, ["src", "shape"])) : j("", !0),
|
|
10572
|
+
P.value.status === "uploading" ? (i(), p("div", {
|
|
10601
10573
|
key: 1,
|
|
10602
10574
|
class: n(a(l).e("card-progress"))
|
|
10603
10575
|
}, [
|
|
10604
10576
|
he(a(We), {
|
|
10605
10577
|
type: "circle",
|
|
10606
|
-
percentage:
|
|
10578
|
+
percentage: P.value.percentage,
|
|
10607
10579
|
width: 60,
|
|
10608
10580
|
"stroke-width": 4,
|
|
10609
10581
|
shape: "round",
|
|
10610
10582
|
"show-inner-stripe": e.showInnerStripe === !0
|
|
10611
10583
|
}, null, 8, ["percentage", "show-inner-stripe"])
|
|
10612
|
-
], 2)) :
|
|
10584
|
+
], 2)) : j("", !0),
|
|
10613
10585
|
v("div", {
|
|
10614
10586
|
class: n(a(l).e("card-actions"))
|
|
10615
10587
|
}, [
|
|
10616
10588
|
v("span", {
|
|
10617
10589
|
onClick: Ce(J, ["stop"])
|
|
10618
|
-
}, [...
|
|
10590
|
+
}, [...O[4] || (O[4] = [
|
|
10619
10591
|
v("svg", {
|
|
10620
10592
|
viewBox: "0 0 24 24",
|
|
10621
10593
|
fill: "none",
|
|
@@ -10626,8 +10598,8 @@ const Et = {
|
|
|
10626
10598
|
], -1)
|
|
10627
10599
|
])]),
|
|
10628
10600
|
v("span", {
|
|
10629
|
-
onClick:
|
|
10630
|
-
}, [...
|
|
10601
|
+
onClick: O[0] || (O[0] = Ce((h) => te(P.value), ["stop"]))
|
|
10602
|
+
}, [...O[5] || (O[5] = [
|
|
10631
10603
|
v("svg", {
|
|
10632
10604
|
viewBox: "0 0 24 24",
|
|
10633
10605
|
fill: "none",
|
|
@@ -10643,11 +10615,11 @@ const Et = {
|
|
|
10643
10615
|
key: 1,
|
|
10644
10616
|
class: n(a(l).e("card-trigger"))
|
|
10645
10617
|
}, [
|
|
10646
|
-
|
|
10618
|
+
H(y.$slots, "placeholder", { mode: "picture-card" }, () => [
|
|
10647
10619
|
y.placeholderIcon ? (i(), ee(we(y.placeholderIcon), {
|
|
10648
10620
|
key: 0,
|
|
10649
10621
|
style: { width: "28px", height: "28px" }
|
|
10650
|
-
})) : (i(), p("svg", Za, [...
|
|
10622
|
+
})) : (i(), p("svg", Za, [...O[6] || (O[6] = [
|
|
10651
10623
|
v("line", {
|
|
10652
10624
|
x1: "12",
|
|
10653
10625
|
y1: "5",
|
|
@@ -10664,7 +10636,7 @@ const Et = {
|
|
|
10664
10636
|
y.placeholder ? (i(), p("span", {
|
|
10665
10637
|
key: 2,
|
|
10666
10638
|
class: n(a(l).e("card-trigger-text"))
|
|
10667
|
-
}, G(y.placeholder), 3)) :
|
|
10639
|
+
}, G(y.placeholder), 3)) : j("", !0)
|
|
10668
10640
|
])
|
|
10669
10641
|
], 2))
|
|
10670
10642
|
], 64)) : (i(), ee(a(rt), {
|
|
@@ -10678,11 +10650,11 @@ const Et = {
|
|
|
10678
10650
|
dashed: b.value
|
|
10679
10651
|
}, {
|
|
10680
10652
|
default: ve(() => [
|
|
10681
|
-
|
|
10653
|
+
H(y.$slots, "placeholder", { mode: "button" }, () => [
|
|
10682
10654
|
y.placeholderIcon ? (i(), ee(we(y.placeholderIcon), {
|
|
10683
10655
|
key: 0,
|
|
10684
10656
|
style: { width: "14px", height: "14px", "margin-right": "4px" }
|
|
10685
|
-
})) : (i(), p("svg", Qa, [...
|
|
10657
|
+
})) : (i(), p("svg", Qa, [...O[7] || (O[7] = [
|
|
10686
10658
|
v("polyline", { points: "16 16 12 12 8 16" }, null, -1),
|
|
10687
10659
|
v("line", {
|
|
10688
10660
|
x1: "12",
|
|
@@ -10699,7 +10671,7 @@ const Et = {
|
|
|
10699
10671
|
}, 8, ["disabled", "variant", "shape", "type", "color", "size", "dashed"]))
|
|
10700
10672
|
])
|
|
10701
10673
|
], 34),
|
|
10702
|
-
y.showFileList && y.modelValue.length > 0 && !
|
|
10674
|
+
y.showFileList && y.modelValue.length > 0 && !P.value ? (i(), p("div", {
|
|
10703
10675
|
key: 0,
|
|
10704
10676
|
class: n(a(l).e("list"))
|
|
10705
10677
|
}, [
|
|
@@ -10716,7 +10688,7 @@ const Et = {
|
|
|
10716
10688
|
fill: "none",
|
|
10717
10689
|
stroke: "currentColor",
|
|
10718
10690
|
"stroke-width": "1.5"
|
|
10719
|
-
}, [...
|
|
10691
|
+
}, [...O[8] || (O[8] = [
|
|
10720
10692
|
v("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
|
|
10721
10693
|
v("polyline", { points: "14 2 14 8 20 8" }, null, -1)
|
|
10722
10694
|
])], 2)),
|
|
@@ -10733,7 +10705,7 @@ const Et = {
|
|
|
10733
10705
|
fill: "none",
|
|
10734
10706
|
stroke: "currentColor",
|
|
10735
10707
|
"stroke-width": "2"
|
|
10736
|
-
}, [...
|
|
10708
|
+
}, [...O[9] || (O[9] = [
|
|
10737
10709
|
v("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
10738
10710
|
])], 2)) : h.status === "error" ? (i(), p("svg", {
|
|
10739
10711
|
key: 1,
|
|
@@ -10742,7 +10714,7 @@ const Et = {
|
|
|
10742
10714
|
fill: "none",
|
|
10743
10715
|
stroke: "currentColor",
|
|
10744
10716
|
"stroke-width": "2"
|
|
10745
|
-
}, [...
|
|
10717
|
+
}, [...O[10] || (O[10] = [
|
|
10746
10718
|
v("line", {
|
|
10747
10719
|
x1: "18",
|
|
10748
10720
|
y1: "6",
|
|
@@ -10755,11 +10727,11 @@ const Et = {
|
|
|
10755
10727
|
x2: "18",
|
|
10756
10728
|
y2: "18"
|
|
10757
10729
|
}, null, -1)
|
|
10758
|
-
])], 2)) :
|
|
10730
|
+
])], 2)) : j("", !0),
|
|
10759
10731
|
v("span", {
|
|
10760
10732
|
class: n(a(l).e("remove")),
|
|
10761
|
-
onClick: Ce((
|
|
10762
|
-
}, [...
|
|
10733
|
+
onClick: Ce((z) => te(h), ["stop"])
|
|
10734
|
+
}, [...O[11] || (O[11] = [
|
|
10763
10735
|
v("svg", {
|
|
10764
10736
|
viewBox: "0 0 24 24",
|
|
10765
10737
|
fill: "none",
|
|
@@ -10789,7 +10761,7 @@ const Et = {
|
|
|
10789
10761
|
shape: "round",
|
|
10790
10762
|
"show-inner-stripe": e.showInnerStripe === !0,
|
|
10791
10763
|
class: n(a(l).e("progress"))
|
|
10792
|
-
}, null, 8, ["percentage", "show-inner-stripe", "class"])) :
|
|
10764
|
+
}, null, 8, ["percentage", "show-inner-stripe", "class"])) : j("", !0)
|
|
10793
10765
|
], 2))), 128)) : y.listType === "picture" ? (i(!0), p(ue, { key: 1 }, ke(y.modelValue, (h) => (i(), p("div", {
|
|
10794
10766
|
key: h.uid,
|
|
10795
10767
|
class: n([a(l).e("item"), a(l).e("item--picture"), a(l).is(h.status, !0)])
|
|
@@ -10808,7 +10780,7 @@ const Et = {
|
|
|
10808
10780
|
}, null, 8, ["src", "shape"])) : (i(), p("div", {
|
|
10809
10781
|
key: 1,
|
|
10810
10782
|
class: n(a(l).e("file-placeholder"))
|
|
10811
|
-
}, [...
|
|
10783
|
+
}, [...O[12] || (O[12] = [
|
|
10812
10784
|
v("svg", {
|
|
10813
10785
|
viewBox: "0 0 24 24",
|
|
10814
10786
|
fill: "none",
|
|
@@ -10838,7 +10810,7 @@ const Et = {
|
|
|
10838
10810
|
shape: "round",
|
|
10839
10811
|
"show-inner-stripe": e.showInnerStripe === !0,
|
|
10840
10812
|
class: n(a(l).e("progress"))
|
|
10841
|
-
}, null, 8, ["percentage", "show-inner-stripe", "class"])) :
|
|
10813
|
+
}, null, 8, ["percentage", "show-inner-stripe", "class"])) : j("", !0),
|
|
10842
10814
|
v("div", {
|
|
10843
10815
|
class: n(a(l).e("actions"))
|
|
10844
10816
|
}, [
|
|
@@ -10849,7 +10821,7 @@ const Et = {
|
|
|
10849
10821
|
fill: "none",
|
|
10850
10822
|
stroke: "currentColor",
|
|
10851
10823
|
"stroke-width": "2"
|
|
10852
|
-
}, [...
|
|
10824
|
+
}, [...O[13] || (O[13] = [
|
|
10853
10825
|
v("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
10854
10826
|
])], 2)) : h.status === "error" ? (i(), p("svg", {
|
|
10855
10827
|
key: 1,
|
|
@@ -10858,7 +10830,7 @@ const Et = {
|
|
|
10858
10830
|
fill: "none",
|
|
10859
10831
|
stroke: "currentColor",
|
|
10860
10832
|
"stroke-width": "2"
|
|
10861
|
-
}, [...
|
|
10833
|
+
}, [...O[14] || (O[14] = [
|
|
10862
10834
|
v("line", {
|
|
10863
10835
|
x1: "18",
|
|
10864
10836
|
y1: "6",
|
|
@@ -10871,11 +10843,11 @@ const Et = {
|
|
|
10871
10843
|
x2: "18",
|
|
10872
10844
|
y2: "18"
|
|
10873
10845
|
}, null, -1)
|
|
10874
|
-
])], 2)) :
|
|
10846
|
+
])], 2)) : j("", !0),
|
|
10875
10847
|
v("span", {
|
|
10876
10848
|
class: n(a(l).e("remove")),
|
|
10877
|
-
onClick: Ce((
|
|
10878
|
-
}, [...
|
|
10849
|
+
onClick: Ce((z) => te(h), ["stop"])
|
|
10850
|
+
}, [...O[15] || (O[15] = [
|
|
10879
10851
|
v("svg", {
|
|
10880
10852
|
viewBox: "0 0 24 24",
|
|
10881
10853
|
fill: "none",
|
|
@@ -10913,7 +10885,7 @@ const Et = {
|
|
|
10913
10885
|
key: 1,
|
|
10914
10886
|
class: n(a(l).e("card-file"))
|
|
10915
10887
|
}, [
|
|
10916
|
-
|
|
10888
|
+
O[16] || (O[16] = v("svg", {
|
|
10917
10889
|
viewBox: "0 0 24 24",
|
|
10918
10890
|
fill: "none",
|
|
10919
10891
|
stroke: "currentColor",
|
|
@@ -10936,13 +10908,13 @@ const Et = {
|
|
|
10936
10908
|
shape: "round",
|
|
10937
10909
|
"show-inner-stripe": e.showInnerStripe === !0
|
|
10938
10910
|
}, null, 8, ["percentage", "show-inner-stripe"])
|
|
10939
|
-
], 2)) :
|
|
10911
|
+
], 2)) : j("", !0),
|
|
10940
10912
|
v("div", {
|
|
10941
10913
|
class: n(a(l).e("card-actions"))
|
|
10942
10914
|
}, [
|
|
10943
10915
|
v("span", {
|
|
10944
|
-
onClick: Ce((
|
|
10945
|
-
}, [...
|
|
10916
|
+
onClick: Ce((z) => te(h), ["stop"])
|
|
10917
|
+
}, [...O[17] || (O[17] = [
|
|
10946
10918
|
v("svg", {
|
|
10947
10919
|
viewBox: "0 0 24 24",
|
|
10948
10920
|
fill: "none",
|
|
@@ -10954,8 +10926,8 @@ const Et = {
|
|
|
10954
10926
|
], -1)
|
|
10955
10927
|
])], 8, or)
|
|
10956
10928
|
], 2)
|
|
10957
|
-
], 2))), 128)) :
|
|
10958
|
-
], 2)) :
|
|
10929
|
+
], 2))), 128)) : j("", !0)
|
|
10930
|
+
], 2)) : j("", !0)
|
|
10959
10931
|
], 6));
|
|
10960
10932
|
}
|
|
10961
10933
|
}), Yr = re(lr);
|
|
@@ -10966,8 +10938,8 @@ export {
|
|
|
10966
10938
|
mr as CpAvatar,
|
|
10967
10939
|
gr as CpAvatarGroup,
|
|
10968
10940
|
Br as CpBadge,
|
|
10969
|
-
|
|
10970
|
-
|
|
10941
|
+
qr as CpBreadcrumb,
|
|
10942
|
+
Ur as CpBreadcrumbItem,
|
|
10971
10943
|
rt as CpButton,
|
|
10972
10944
|
fr as CpCard,
|
|
10973
10945
|
Cr as CpCheckbox,
|
|
@@ -10979,7 +10951,7 @@ export {
|
|
|
10979
10951
|
Pr as CpDivider,
|
|
10980
10952
|
wr as CpDropdown,
|
|
10981
10953
|
Tr as CpFooter,
|
|
10982
|
-
|
|
10954
|
+
Hr as CpForm,
|
|
10983
10955
|
Wr as CpFormItem,
|
|
10984
10956
|
Ir as CpHeader,
|
|
10985
10957
|
Le as CpIcon,
|
|
@@ -11007,7 +10979,7 @@ export {
|
|
|
11007
10979
|
Xe as CpSubMenu,
|
|
11008
10980
|
pr as CpSwitch,
|
|
11009
10981
|
jr as CpTable,
|
|
11010
|
-
|
|
10982
|
+
_r as CpTableColumn,
|
|
11011
10983
|
vr as CpTag,
|
|
11012
10984
|
Ko as CpText,
|
|
11013
10985
|
ur as CpTextarea,
|
|
@@ -11016,10 +10988,10 @@ export {
|
|
|
11016
10988
|
Wl as asideProps,
|
|
11017
10989
|
Yo as avatarEmits,
|
|
11018
10990
|
Xo as avatarGroupProps,
|
|
11019
|
-
|
|
11020
|
-
|
|
10991
|
+
Uo as avatarProps,
|
|
10992
|
+
qe as avatarSizeMap,
|
|
11021
10993
|
xl as badgeProps,
|
|
11022
|
-
|
|
10994
|
+
Ua as breadcrumbItemProps,
|
|
11023
10995
|
Wa as breadcrumbProps,
|
|
11024
10996
|
It as buttonEmits,
|
|
11025
10997
|
Et as buttonProps,
|
|
@@ -11030,27 +11002,27 @@ export {
|
|
|
11030
11002
|
yl as checkboxGroupProps,
|
|
11031
11003
|
pl as checkboxProps,
|
|
11032
11004
|
Ol as colProps,
|
|
11033
|
-
|
|
11005
|
+
_t as configProviderProps,
|
|
11034
11006
|
Fl as containerProps,
|
|
11035
11007
|
Tl as dialogEmits,
|
|
11036
11008
|
Il as dialogProps,
|
|
11037
11009
|
El as dividerProps,
|
|
11038
11010
|
nl as dropdownEmits,
|
|
11039
11011
|
sl as dropdownProps,
|
|
11040
|
-
|
|
11012
|
+
_l as footerProps,
|
|
11041
11013
|
it as formContextKey,
|
|
11042
11014
|
ja as formItemProps,
|
|
11043
11015
|
Ka as formProps,
|
|
11044
11016
|
jl as headerProps,
|
|
11045
11017
|
Kt as iconProps,
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11018
|
+
Ho as imageEmits,
|
|
11019
|
+
_o as imageProps,
|
|
11020
|
+
qt as inputEmits,
|
|
11049
11021
|
oo as inputNumberEmits,
|
|
11050
11022
|
to as inputNumberProps,
|
|
11051
11023
|
Wt as inputProps,
|
|
11052
11024
|
Tt as loadingProps,
|
|
11053
|
-
|
|
11025
|
+
Hl as mainProps,
|
|
11054
11026
|
Qe as menuContextKey,
|
|
11055
11027
|
Ql as menuEmits,
|
|
11056
11028
|
la as menuItemEmits,
|
|
@@ -11080,7 +11052,7 @@ export {
|
|
|
11080
11052
|
uo as sliderProps,
|
|
11081
11053
|
hr as spacerProps,
|
|
11082
11054
|
Fo as statusIndicatorProps,
|
|
11083
|
-
|
|
11055
|
+
Ue as subMenuContextKey,
|
|
11084
11056
|
sa as subMenuProps,
|
|
11085
11057
|
wo as switchEmits,
|
|
11086
11058
|
So as switchProps,
|