btxui 1.0.33 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +555 -94
- package/dist/index.js.gz +0 -0
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, reactive, onMounted, renderSlot, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, normalizeStyle, inject,
|
|
1
|
+
import { defineComponent, ref, computed, reactive, onMounted, renderSlot, watch, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, normalizeStyle, inject, getCurrentInstance, withModifiers, createVNode, resolveComponent, createElementBlock, Fragment, createCommentVNode, withDirectives, vModelDynamic, vModelText, mergeProps, createTextVNode, toDisplayString, renderList, createSlots, onBeforeMount, KeepAlive } from "vue";
|
|
2
2
|
const prestyles = {
|
|
3
3
|
//预置样式-----------------------------------------------------------------------------------
|
|
4
4
|
// 文本对齐
|
|
@@ -98,9 +98,10 @@ const prestyles = {
|
|
|
98
98
|
"bg-fixed": `background-attachment: scroll;`,
|
|
99
99
|
// 圆角
|
|
100
100
|
"round": `border-radius: 50%;`,
|
|
101
|
-
"round-lg": `
|
|
101
|
+
"round-lg": `border-radius: 24px;`,
|
|
102
102
|
"round-md": `border-radius: 10px;`,
|
|
103
103
|
"round-sm": `border-radius: 4px;`,
|
|
104
|
+
"round-none": `border-radius: 0px;`,
|
|
104
105
|
"round-t": `border-bottom-right-radius: 0; border-bottom-left-radius: 0;`,
|
|
105
106
|
"round-b": `border-top-right-radius: 0; border-top-left-radius: 0;`,
|
|
106
107
|
"round-l": `border-top-right-radius: 0; border-bottom-right-radius: 0;`,
|
|
@@ -112,7 +113,10 @@ const prestyles = {
|
|
|
112
113
|
"solid-r": `border-right-style: solid;`,
|
|
113
114
|
"solid-t": `border-top-style: solid;`,
|
|
114
115
|
"solid-b": `border-bottom-style: solid;`,
|
|
115
|
-
"solid-none": `border-style: none;`,
|
|
116
|
+
"solid-l-none": `border-left-style: none;`,
|
|
117
|
+
"solid-r-none": `border-right-style: none;`,
|
|
118
|
+
"solid-t-none": `border-top-style: none;`,
|
|
119
|
+
"solid-b-none": `border-bottom-style: none;`,
|
|
116
120
|
"dashed-l": `border-left-style: dashed;`,
|
|
117
121
|
"dashed-r": `border-right-style: dashed;`,
|
|
118
122
|
"dashed-t": `border-top-style: dashed;`,
|
|
@@ -531,7 +535,7 @@ var md5$1 = {
|
|
|
531
535
|
})(md5$1);
|
|
532
536
|
const md5 = md5Exports;
|
|
533
537
|
const GLOBAL_STYLE_NAME = "BTXUIGlobal";
|
|
534
|
-
const _sfc_main$
|
|
538
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
535
539
|
__name: "b-style",
|
|
536
540
|
props: {
|
|
537
541
|
class: {},
|
|
@@ -657,7 +661,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
657
661
|
const combineStyles = (_class) => {
|
|
658
662
|
if (!_class)
|
|
659
663
|
return "";
|
|
660
|
-
const combineStyle = _class.split(" ").reduce((total, rule) => {
|
|
664
|
+
const combineStyle = _class.trim().split(" ").reduce((total, rule) => {
|
|
661
665
|
const validateRule = parseStyle(rule);
|
|
662
666
|
if (!validateRule)
|
|
663
667
|
return "";
|
|
@@ -703,11 +707,27 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
703
707
|
if (props.active)
|
|
704
708
|
appendStyle(compSelector, props.active);
|
|
705
709
|
};
|
|
710
|
+
const dealRule = (baseSelector, state, stateStyles) => {
|
|
711
|
+
appendStyle(`${baseSelector}[state="${state}"]`, stateStyles);
|
|
712
|
+
};
|
|
713
|
+
const aniStates = reactive({});
|
|
714
|
+
const dealClassToggle = (state, ani) => {
|
|
715
|
+
aniStates[state] = ani;
|
|
716
|
+
};
|
|
706
717
|
const genStateStyles = (baseSelector) => {
|
|
707
718
|
if (!props.states)
|
|
708
719
|
return;
|
|
709
720
|
Object.keys(props.states).forEach((state) => {
|
|
710
|
-
|
|
721
|
+
if (props.states) {
|
|
722
|
+
const stateStyles = props.states[state];
|
|
723
|
+
if (typeof stateStyles === "string") {
|
|
724
|
+
dealRule(baseSelector, state, stateStyles);
|
|
725
|
+
} else {
|
|
726
|
+
const { class: styles2, ani } = stateStyles;
|
|
727
|
+
dealRule(baseSelector, state, styles2);
|
|
728
|
+
dealClassToggle(state, ani);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
711
731
|
});
|
|
712
732
|
};
|
|
713
733
|
const genExtraStyles = (baseSelector) => {
|
|
@@ -749,14 +769,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
749
769
|
});
|
|
750
770
|
return (_ctx, _cache) => {
|
|
751
771
|
return renderSlot(_ctx.$slots, "className", {
|
|
772
|
+
aniStates: JSON.stringify(aniStates),
|
|
752
773
|
className: className.value,
|
|
753
774
|
matrixStyle: matrixStyle.value
|
|
754
775
|
});
|
|
755
776
|
};
|
|
756
777
|
}
|
|
757
778
|
});
|
|
758
|
-
const _hoisted_1$
|
|
759
|
-
const _sfc_main$
|
|
779
|
+
const _hoisted_1$b = ["data-ani-states", "state"];
|
|
780
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
760
781
|
__name: "b-view",
|
|
761
782
|
props: {
|
|
762
783
|
class: {},
|
|
@@ -766,11 +787,30 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
766
787
|
matrix: {},
|
|
767
788
|
cname: {}
|
|
768
789
|
},
|
|
769
|
-
|
|
790
|
+
emits: ["on_aniEnd"],
|
|
791
|
+
setup(__props, { emit }) {
|
|
770
792
|
const props = __props;
|
|
793
|
+
const $el = ref();
|
|
794
|
+
const state = computed(() => props.state);
|
|
795
|
+
let lastAni;
|
|
796
|
+
watch(state, (val, old) => {
|
|
797
|
+
if (val == null || val == void 0)
|
|
798
|
+
return;
|
|
799
|
+
const aniStates = JSON.parse($el.value.dataset.aniStates);
|
|
800
|
+
if (aniStates[val]) {
|
|
801
|
+
if (old != null || old != void 0)
|
|
802
|
+
$el.value.classList.remove(aniStates[old]);
|
|
803
|
+
$el.value.classList.add("ani-fast", aniStates[val]);
|
|
804
|
+
lastAni = aniStates[val];
|
|
805
|
+
}
|
|
806
|
+
});
|
|
807
|
+
const aniEnd = (e) => {
|
|
808
|
+
$el.value.classList.remove(lastAni);
|
|
809
|
+
emit("on_aniEnd", e);
|
|
810
|
+
};
|
|
771
811
|
const bgStyle = computed(() => props.bgImg ? { backgroundImage: `url(${props.bgImg})` } : {});
|
|
772
812
|
return (_ctx, _cache) => {
|
|
773
|
-
return openBlock(), createBlock(_sfc_main$
|
|
813
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
774
814
|
class: normalizeClass(_ctx.class),
|
|
775
815
|
cname: _ctx.cname,
|
|
776
816
|
states: _ctx.states,
|
|
@@ -778,20 +818,24 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
778
818
|
}, {
|
|
779
819
|
className: withCtx((scope) => [
|
|
780
820
|
createElementVNode("div", {
|
|
821
|
+
ref_key: "$el",
|
|
822
|
+
ref: $el,
|
|
823
|
+
onAnimationend: aniEnd,
|
|
781
824
|
class: normalizeClass(scope.className),
|
|
782
|
-
|
|
825
|
+
"data-ani-states": scope.aniStates,
|
|
826
|
+
state: state.value,
|
|
783
827
|
style: normalizeStyle({ ...bgStyle.value, ...scope.matrixStyle })
|
|
784
828
|
}, [
|
|
785
829
|
renderSlot(_ctx.$slots, "default")
|
|
786
|
-
],
|
|
830
|
+
], 46, _hoisted_1$b)
|
|
787
831
|
]),
|
|
788
832
|
_: 3
|
|
789
833
|
}, 8, ["class", "cname", "states", "matrix"]);
|
|
790
834
|
};
|
|
791
835
|
}
|
|
792
836
|
});
|
|
793
|
-
const _hoisted_1$
|
|
794
|
-
const _sfc_main$
|
|
837
|
+
const _hoisted_1$a = ["state"];
|
|
838
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
795
839
|
__name: "b-text",
|
|
796
840
|
props: {
|
|
797
841
|
class: {},
|
|
@@ -801,7 +845,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
801
845
|
},
|
|
802
846
|
setup(__props) {
|
|
803
847
|
return (_ctx, _cache) => {
|
|
804
|
-
return openBlock(), createBlock(_sfc_main$
|
|
848
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
805
849
|
class: normalizeClass(_ctx.class),
|
|
806
850
|
states: _ctx.states,
|
|
807
851
|
cname: _ctx.cname
|
|
@@ -812,7 +856,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
812
856
|
state: _ctx.state
|
|
813
857
|
}, [
|
|
814
858
|
renderSlot(_ctx.$slots, "default")
|
|
815
|
-
], 10, _hoisted_1$
|
|
859
|
+
], 10, _hoisted_1$a)
|
|
816
860
|
]),
|
|
817
861
|
_: 3
|
|
818
862
|
}, 8, ["class", "states", "cname"]);
|
|
@@ -850,8 +894,8 @@ Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
|
|
|
850
894
|
function useRouter() {
|
|
851
895
|
return inject(routerKey);
|
|
852
896
|
}
|
|
853
|
-
const _hoisted_1$
|
|
854
|
-
const _sfc_main$
|
|
897
|
+
const _hoisted_1$9 = ["onClick", "onDblclick", "target", "hover", "state", "active", "href"];
|
|
898
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
855
899
|
__name: "b-hot",
|
|
856
900
|
props: {
|
|
857
901
|
link: {},
|
|
@@ -863,12 +907,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
863
907
|
forbid: { type: Boolean },
|
|
864
908
|
download: {},
|
|
865
909
|
anchor: {},
|
|
866
|
-
cname: {}
|
|
867
|
-
router: {}
|
|
910
|
+
cname: {}
|
|
868
911
|
},
|
|
869
912
|
emits: ["on_click", "on_enter", "on_move", "on_leave", "on_dblclick"],
|
|
870
913
|
setup(__props, { emit }) {
|
|
871
914
|
const props = __props;
|
|
915
|
+
const { proxy } = getCurrentInstance();
|
|
872
916
|
const $anchor = ref();
|
|
873
917
|
const target = ref("");
|
|
874
918
|
let routeLink;
|
|
@@ -898,7 +942,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
898
942
|
}
|
|
899
943
|
if (routeLink) {
|
|
900
944
|
e.preventDefault();
|
|
901
|
-
(router ??
|
|
945
|
+
(router ?? proxy.$router).push(routeLink);
|
|
902
946
|
}
|
|
903
947
|
!props.forbid && emit("on_click", e);
|
|
904
948
|
};
|
|
@@ -919,7 +963,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
919
963
|
$anchor.value.download = props.download;
|
|
920
964
|
});
|
|
921
965
|
return (_ctx, _cache) => {
|
|
922
|
-
return openBlock(), createBlock(_sfc_main$
|
|
966
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
923
967
|
class: normalizeClass(_ctx.class),
|
|
924
968
|
states: _ctx.states,
|
|
925
969
|
hover: _ctx.hover,
|
|
@@ -947,19 +991,21 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
947
991
|
href: url.value
|
|
948
992
|
}, [
|
|
949
993
|
renderSlot(_ctx.$slots, "default")
|
|
950
|
-
], 46, _hoisted_1$
|
|
994
|
+
], 46, _hoisted_1$9)
|
|
951
995
|
]),
|
|
952
996
|
_: 3
|
|
953
997
|
}, 8, ["class", "states", "hover", "active", "cname"]);
|
|
954
998
|
};
|
|
955
999
|
}
|
|
956
1000
|
});
|
|
957
|
-
const _hoisted_1$
|
|
958
|
-
const _sfc_main$
|
|
1001
|
+
const _hoisted_1$8 = ["src", "state", "alt"];
|
|
1002
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
959
1003
|
__name: "b-img",
|
|
960
1004
|
props: {
|
|
961
1005
|
img: {},
|
|
962
1006
|
class: {},
|
|
1007
|
+
state: {},
|
|
1008
|
+
states: {},
|
|
963
1009
|
defaultSrc: {},
|
|
964
1010
|
alt: {},
|
|
965
1011
|
matrix: {},
|
|
@@ -985,35 +1031,37 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
985
1031
|
setSrc();
|
|
986
1032
|
});
|
|
987
1033
|
return (_ctx, _cache) => {
|
|
988
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1034
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
989
1035
|
class: normalizeClass(_ctx.class),
|
|
990
1036
|
cname: _ctx.cname,
|
|
1037
|
+
states: _ctx.states,
|
|
991
1038
|
matrix: _ctx.matrix
|
|
992
1039
|
}, {
|
|
993
1040
|
className: withCtx((scope) => [
|
|
994
1041
|
createElementVNode("img", {
|
|
995
1042
|
src: src.value,
|
|
996
1043
|
class: normalizeClass(scope.className),
|
|
1044
|
+
state: _ctx.state,
|
|
997
1045
|
style: normalizeStyle({ display: "block", ...scope.matrixStyle }),
|
|
998
1046
|
alt: _ctx.alt
|
|
999
|
-
}, null, 14, _hoisted_1$
|
|
1047
|
+
}, null, 14, _hoisted_1$8)
|
|
1000
1048
|
]),
|
|
1001
1049
|
_: 1
|
|
1002
|
-
}, 8, ["class", "cname", "matrix"]);
|
|
1050
|
+
}, 8, ["class", "cname", "states", "matrix"]);
|
|
1003
1051
|
};
|
|
1004
1052
|
}
|
|
1005
1053
|
});
|
|
1006
|
-
const _sfc_main$
|
|
1054
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
1007
1055
|
__name: "ani-success",
|
|
1008
1056
|
setup(__props) {
|
|
1009
1057
|
return (_ctx, _cache) => {
|
|
1010
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1058
|
+
return openBlock(), createBlock(_sfc_main$m, {
|
|
1011
1059
|
class: "flex-5",
|
|
1012
1060
|
matrix: { translate: "0,9px", rotate: "45deg" }
|
|
1013
1061
|
}, {
|
|
1014
1062
|
default: withCtx(() => [
|
|
1015
|
-
createVNode(_sfc_main$
|
|
1016
|
-
createVNode(_sfc_main$
|
|
1063
|
+
createVNode(_sfc_main$l, { class: "ani-success-part1 w-1 h-3-px bg-color-green round-sm" }),
|
|
1064
|
+
createVNode(_sfc_main$l, { class: "ani-success-part2 w-1d7 h-3-px bg-color-green round-sm rel t-1-px l-f1-px" })
|
|
1017
1065
|
]),
|
|
1018
1066
|
_: 1
|
|
1019
1067
|
});
|
|
@@ -1029,7 +1077,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
1029
1077
|
}
|
|
1030
1078
|
return target;
|
|
1031
1079
|
};
|
|
1032
|
-
const _sfc_main$
|
|
1080
|
+
const _sfc_main$h = {};
|
|
1033
1081
|
function _sfc_render$2(_ctx, _cache) {
|
|
1034
1082
|
const _component_b_text = resolveComponent("b-text");
|
|
1035
1083
|
const _component_b_view = resolveComponent("b-view");
|
|
@@ -1041,9 +1089,9 @@ function _sfc_render$2(_ctx, _cache) {
|
|
|
1041
1089
|
_: 1
|
|
1042
1090
|
});
|
|
1043
1091
|
}
|
|
1044
|
-
const AniFail = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1092
|
+
const AniFail = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$2]]);
|
|
1045
1093
|
const aniNotic_vue_vue_type_style_index_0_lang = "";
|
|
1046
|
-
const _sfc_main$
|
|
1094
|
+
const _sfc_main$g = {};
|
|
1047
1095
|
function _sfc_render$1(_ctx, _cache) {
|
|
1048
1096
|
const _component_b_text = resolveComponent("b-text");
|
|
1049
1097
|
const _component_b_view = resolveComponent("b-view");
|
|
@@ -1058,9 +1106,9 @@ function _sfc_render$1(_ctx, _cache) {
|
|
|
1058
1106
|
_: 1
|
|
1059
1107
|
});
|
|
1060
1108
|
}
|
|
1061
|
-
const AniNotic = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1109
|
+
const AniNotic = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$1]]);
|
|
1062
1110
|
const aniLoading_vue_vue_type_style_index_0_lang = "";
|
|
1063
|
-
const _sfc_main$
|
|
1111
|
+
const _sfc_main$f = {};
|
|
1064
1112
|
function _sfc_render(_ctx, _cache) {
|
|
1065
1113
|
const _component_b_view = resolveComponent("b-view");
|
|
1066
1114
|
return openBlock(), createBlock(_component_b_view, { class: "flex-5" }, {
|
|
@@ -1070,9 +1118,9 @@ function _sfc_render(_ctx, _cache) {
|
|
|
1070
1118
|
_: 1
|
|
1071
1119
|
});
|
|
1072
1120
|
}
|
|
1073
|
-
const AniLoading = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1074
|
-
const _hoisted_1$
|
|
1075
|
-
const _sfc_main$
|
|
1121
|
+
const AniLoading = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render]]);
|
|
1122
|
+
const _hoisted_1$7 = ["state"];
|
|
1123
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
1076
1124
|
__name: "b-icon",
|
|
1077
1125
|
props: {
|
|
1078
1126
|
icon: {},
|
|
@@ -1084,19 +1132,19 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1084
1132
|
setup(__props) {
|
|
1085
1133
|
const props = __props;
|
|
1086
1134
|
return (_ctx, _cache) => {
|
|
1087
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1135
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
1088
1136
|
class: normalizeClass(_ctx.class),
|
|
1089
1137
|
states: _ctx.states,
|
|
1090
1138
|
cname: _ctx.cname
|
|
1091
1139
|
}, {
|
|
1092
1140
|
className: withCtx((scope) => [
|
|
1093
1141
|
_ctx.icon.search("ani_") === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1094
|
-
_ctx.icon === "ani_success" ? (openBlock(), createBlock(_sfc_main$
|
|
1142
|
+
_ctx.icon === "ani_success" ? (openBlock(), createBlock(_sfc_main$i, { key: "success" })) : createCommentVNode("", true),
|
|
1095
1143
|
_ctx.icon === "ani_fail" ? (openBlock(), createBlock(AniFail, { key: "fail" })) : createCommentVNode("", true),
|
|
1096
1144
|
_ctx.icon === "ani_notic" ? (openBlock(), createBlock(AniNotic, { key: "notic" })) : createCommentVNode("", true),
|
|
1097
1145
|
_ctx.icon === "ani_loading" ? (openBlock(), createBlock(AniLoading, { key: "loading" })) : createCommentVNode("", true)
|
|
1098
1146
|
], 64)) : createCommentVNode("", true),
|
|
1099
|
-
_ctx.icon.search("/") > -1 ? (openBlock(), createBlock(_sfc_main$
|
|
1147
|
+
_ctx.icon.search("/") > -1 ? (openBlock(), createBlock(_sfc_main$m, {
|
|
1100
1148
|
key: 1,
|
|
1101
1149
|
"bg-img": _ctx.icon,
|
|
1102
1150
|
states: _ctx.states,
|
|
@@ -1106,15 +1154,15 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1106
1154
|
key: 2,
|
|
1107
1155
|
class: normalizeClass(`ico-${props.icon} ${scope.className}`),
|
|
1108
1156
|
state: _ctx.state
|
|
1109
|
-
}, null, 10, _hoisted_1$
|
|
1157
|
+
}, null, 10, _hoisted_1$7))
|
|
1110
1158
|
]),
|
|
1111
1159
|
_: 1
|
|
1112
1160
|
}, 8, ["class", "states", "cname"]);
|
|
1113
1161
|
};
|
|
1114
1162
|
}
|
|
1115
1163
|
});
|
|
1116
|
-
const _hoisted_1$
|
|
1117
|
-
const _sfc_main$
|
|
1164
|
+
const _hoisted_1$6 = ["type", "name", "focus", "state", "placeholder", "maxlength", "readonly"];
|
|
1165
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
1118
1166
|
__name: "b-input",
|
|
1119
1167
|
props: {
|
|
1120
1168
|
type: {},
|
|
@@ -1190,7 +1238,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
1190
1238
|
check
|
|
1191
1239
|
});
|
|
1192
1240
|
return (_ctx, _cache) => {
|
|
1193
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1241
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
1194
1242
|
class: normalizeClass(_ctx.class),
|
|
1195
1243
|
focus: _ctx.focus,
|
|
1196
1244
|
states: _ctx.states,
|
|
@@ -1212,7 +1260,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
1212
1260
|
maxlength: _ctx.maxlength,
|
|
1213
1261
|
readonly: _ctx.readonly,
|
|
1214
1262
|
autocomplete: "off"
|
|
1215
|
-
}, null, 42, _hoisted_1$
|
|
1263
|
+
}, null, 42, _hoisted_1$6), [
|
|
1216
1264
|
[vModelDynamic, val.value]
|
|
1217
1265
|
])
|
|
1218
1266
|
]),
|
|
@@ -1221,8 +1269,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
1221
1269
|
};
|
|
1222
1270
|
}
|
|
1223
1271
|
});
|
|
1224
|
-
const _hoisted_1$
|
|
1225
|
-
const _sfc_main$
|
|
1272
|
+
const _hoisted_1$5 = ["name", "focus", "state", "placeholder", "maxlength", "readonly", "rows"];
|
|
1273
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1226
1274
|
__name: "b-textarea",
|
|
1227
1275
|
props: {
|
|
1228
1276
|
text: {},
|
|
@@ -1246,7 +1294,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
1246
1294
|
emit("update:text", formatText(val.value));
|
|
1247
1295
|
};
|
|
1248
1296
|
return (_ctx, _cache) => {
|
|
1249
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1297
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
1250
1298
|
class: normalizeClass(_ctx.class),
|
|
1251
1299
|
focus: _ctx.focus,
|
|
1252
1300
|
states: _ctx.states,
|
|
@@ -1267,7 +1315,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
1267
1315
|
maxlength: _ctx.maxlength,
|
|
1268
1316
|
readonly: _ctx.readonly,
|
|
1269
1317
|
rows: _ctx.rows || 7
|
|
1270
|
-
}, null, 42, _hoisted_1$
|
|
1318
|
+
}, null, 42, _hoisted_1$5), [
|
|
1271
1319
|
[vModelText, val.value]
|
|
1272
1320
|
])
|
|
1273
1321
|
]),
|
|
@@ -1276,8 +1324,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
1276
1324
|
};
|
|
1277
1325
|
}
|
|
1278
1326
|
});
|
|
1279
|
-
const _hoisted_1$
|
|
1280
|
-
const _sfc_main$
|
|
1327
|
+
const _hoisted_1$4 = ["muted", "src", "autoplay", "loop"];
|
|
1328
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1281
1329
|
__name: "b-video",
|
|
1282
1330
|
props: {
|
|
1283
1331
|
video: {},
|
|
@@ -1289,7 +1337,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1289
1337
|
setup(__props) {
|
|
1290
1338
|
const $video = ref();
|
|
1291
1339
|
return (_ctx, _cache) => {
|
|
1292
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1340
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
1293
1341
|
class: normalizeClass(_ctx.class),
|
|
1294
1342
|
cname: _ctx.cname
|
|
1295
1343
|
}, {
|
|
@@ -1302,16 +1350,16 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1302
1350
|
src: _ctx.video,
|
|
1303
1351
|
autoplay: _ctx.autoPlay,
|
|
1304
1352
|
loop: _ctx.loop
|
|
1305
|
-
}, null, 10, _hoisted_1$
|
|
1353
|
+
}, null, 10, _hoisted_1$4)
|
|
1306
1354
|
]),
|
|
1307
1355
|
_: 1
|
|
1308
1356
|
}, 8, ["class", "cname"]);
|
|
1309
1357
|
};
|
|
1310
1358
|
}
|
|
1311
1359
|
});
|
|
1312
|
-
const _hoisted_1$
|
|
1360
|
+
const _hoisted_1$3 = ["state"];
|
|
1313
1361
|
const tolerance = 2;
|
|
1314
|
-
const _sfc_main$
|
|
1362
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1315
1363
|
__name: "b-list",
|
|
1316
1364
|
props: {
|
|
1317
1365
|
scroll: {},
|
|
@@ -1361,7 +1409,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1361
1409
|
watchPos();
|
|
1362
1410
|
});
|
|
1363
1411
|
return (_ctx, _cache) => {
|
|
1364
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1412
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
1365
1413
|
class: normalizeClass(_ctx.class),
|
|
1366
1414
|
states: _ctx.states,
|
|
1367
1415
|
cname: _ctx.cname
|
|
@@ -1381,15 +1429,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1381
1429
|
}, [
|
|
1382
1430
|
renderSlot(_ctx.$slots, "default")
|
|
1383
1431
|
], 38)
|
|
1384
|
-
], 10, _hoisted_1$
|
|
1432
|
+
], 10, _hoisted_1$3)
|
|
1385
1433
|
]),
|
|
1386
1434
|
_: 3
|
|
1387
1435
|
}, 8, ["class", "states", "cname"]);
|
|
1388
1436
|
};
|
|
1389
1437
|
}
|
|
1390
1438
|
});
|
|
1391
|
-
const _hoisted_1$
|
|
1392
|
-
const _sfc_main$
|
|
1439
|
+
const _hoisted_1$2 = ["state", "draggable"];
|
|
1440
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
1393
1441
|
__name: "b-drag",
|
|
1394
1442
|
props: {
|
|
1395
1443
|
class: {},
|
|
@@ -1499,7 +1547,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1499
1547
|
bindEvent();
|
|
1500
1548
|
});
|
|
1501
1549
|
return (_ctx, _cache) => {
|
|
1502
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1550
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
1503
1551
|
class: normalizeClass(_ctx.class),
|
|
1504
1552
|
states: { dragStart: _ctx.dragStart, dragOver: _ctx.dragOver },
|
|
1505
1553
|
cname: _ctx.cname
|
|
@@ -1521,15 +1569,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1521
1569
|
draggable: _ctx.dragStart ? true : false
|
|
1522
1570
|
}, [
|
|
1523
1571
|
renderSlot(_ctx.$slots, "default")
|
|
1524
|
-
], 14, _hoisted_1$
|
|
1572
|
+
], 14, _hoisted_1$2)
|
|
1525
1573
|
]),
|
|
1526
1574
|
_: 3
|
|
1527
1575
|
}, 8, ["class", "states", "cname"]);
|
|
1528
1576
|
};
|
|
1529
1577
|
}
|
|
1530
1578
|
});
|
|
1531
|
-
const _hoisted_1 = ["src"];
|
|
1532
|
-
const _sfc_main$
|
|
1579
|
+
const _hoisted_1$1 = ["src"];
|
|
1580
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
1533
1581
|
__name: "b-webview",
|
|
1534
1582
|
props: {
|
|
1535
1583
|
src: {},
|
|
@@ -1538,7 +1586,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1538
1586
|
},
|
|
1539
1587
|
setup(__props) {
|
|
1540
1588
|
return (_ctx, _cache) => {
|
|
1541
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1589
|
+
return openBlock(), createBlock(_sfc_main$n, {
|
|
1542
1590
|
class: normalizeClass(_ctx.class),
|
|
1543
1591
|
cname: _ctx.cname
|
|
1544
1592
|
}, {
|
|
@@ -1547,14 +1595,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1547
1595
|
class: normalizeClass(scope.className),
|
|
1548
1596
|
frameborder: "0",
|
|
1549
1597
|
src: _ctx.src
|
|
1550
|
-
}, null, 10, _hoisted_1)
|
|
1598
|
+
}, null, 10, _hoisted_1$1)
|
|
1551
1599
|
]),
|
|
1552
1600
|
_: 1
|
|
1553
1601
|
}, 8, ["class", "cname"]);
|
|
1554
1602
|
};
|
|
1555
1603
|
}
|
|
1556
1604
|
});
|
|
1557
|
-
const _sfc_main$
|
|
1605
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1558
1606
|
__name: "b-row",
|
|
1559
1607
|
props: {
|
|
1560
1608
|
class: {},
|
|
@@ -1571,7 +1619,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1571
1619
|
});
|
|
1572
1620
|
const combClass = ref(`${props.class} flex pad-h-${gap.value[0]} pad-v-${gap.value[1]}`);
|
|
1573
1621
|
return (_ctx, _cache) => {
|
|
1574
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1622
|
+
return openBlock(), createBlock(_sfc_main$m, mergeProps({ class: combClass.value }, _ctx.viewData, {
|
|
1575
1623
|
extraClass: {
|
|
1576
1624
|
selector: ">",
|
|
1577
1625
|
value: `pad-h-${gap.value[0]} pad-v-${gap.value[1]}`
|
|
@@ -1585,7 +1633,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1585
1633
|
};
|
|
1586
1634
|
}
|
|
1587
1635
|
});
|
|
1588
|
-
const _sfc_main$
|
|
1636
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1589
1637
|
__name: "b-col",
|
|
1590
1638
|
props: {
|
|
1591
1639
|
span: {},
|
|
@@ -1595,9 +1643,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1595
1643
|
},
|
|
1596
1644
|
setup(__props) {
|
|
1597
1645
|
const props = __props;
|
|
1598
|
-
const combClass = ref(`${props.class} ${props.span ? "col-" + props.span : ""} ${props.offset ? "offset-" + props.offset : ""}`);
|
|
1646
|
+
const combClass = ref(`${props.class ?? ""} ${props.span ? "col-" + props.span : ""} ${props.offset ? "offset-" + props.offset : ""}`);
|
|
1599
1647
|
return (_ctx, _cache) => {
|
|
1600
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1648
|
+
return openBlock(), createBlock(_sfc_main$m, mergeProps({ class: combClass.value }, _ctx.viewData), {
|
|
1601
1649
|
default: withCtx(() => [
|
|
1602
1650
|
renderSlot(_ctx.$slots, "default")
|
|
1603
1651
|
]),
|
|
@@ -1606,7 +1654,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1606
1654
|
};
|
|
1607
1655
|
}
|
|
1608
1656
|
});
|
|
1609
|
-
const _sfc_main$
|
|
1657
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1610
1658
|
__name: "btn-wid",
|
|
1611
1659
|
props: {
|
|
1612
1660
|
btnText: {},
|
|
@@ -1653,13 +1701,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1653
1701
|
};
|
|
1654
1702
|
});
|
|
1655
1703
|
return (_ctx, _cache) => {
|
|
1656
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1704
|
+
return openBlock(), createBlock(_sfc_main$k, mergeProps(_ctx.hotData, {
|
|
1657
1705
|
class: `flex-5 pad-h-1d4 pad-v-d4 thick-1 ellipsis ${_ctx.btnRound ? "round-lg" : "round-sm"} ${_ctx.btnWidth ? "lw-" + _ctx.btnWidth : ""} ${normal.value.bg} ${normal.value.text} ${normal.value.line} solid`,
|
|
1658
1706
|
hover: `${hover.value.text} ${hover.value.bg} ${hover.value.line}`,
|
|
1659
1707
|
active: `${active.value.text} ${active.value.bg} ${active.value.line}`
|
|
1660
1708
|
}), {
|
|
1661
1709
|
default: withCtx(() => [
|
|
1662
|
-
_ctx.iconData ? (openBlock(), createBlock(_sfc_main$
|
|
1710
|
+
_ctx.iconData ? (openBlock(), createBlock(_sfc_main$e, mergeProps({ key: 0 }, _ctx.iconData, { class: "mrg-r-d7" }), null, 16)) : createCommentVNode("", true),
|
|
1663
1711
|
createTextVNode(" " + toDisplayString(_ctx.btnText), 1)
|
|
1664
1712
|
]),
|
|
1665
1713
|
_: 1
|
|
@@ -1667,6 +1715,410 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1667
1715
|
};
|
|
1668
1716
|
}
|
|
1669
1717
|
});
|
|
1718
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1719
|
+
__name: "checkbox-wid",
|
|
1720
|
+
props: {
|
|
1721
|
+
selected: { type: Boolean },
|
|
1722
|
+
value: {},
|
|
1723
|
+
class: {},
|
|
1724
|
+
actClass: {},
|
|
1725
|
+
actColor: {},
|
|
1726
|
+
label: {}
|
|
1727
|
+
},
|
|
1728
|
+
emits: ["update:selected", "change"],
|
|
1729
|
+
setup(__props, { emit }) {
|
|
1730
|
+
const props = __props;
|
|
1731
|
+
const combClass = ref(`flex-4 bg-color-neutral round-sm pad-4-px ${props.class ?? ""}`);
|
|
1732
|
+
const combActClass = ref(`color-blue ${props.actClass ?? ""}`);
|
|
1733
|
+
const label = computed(() => {
|
|
1734
|
+
const label2 = props.label;
|
|
1735
|
+
if (!label2)
|
|
1736
|
+
return null;
|
|
1737
|
+
return Array.isArray(label2) ? label2 : [label2, label2];
|
|
1738
|
+
});
|
|
1739
|
+
const selected = computed(() => props.selected);
|
|
1740
|
+
const toggle = () => {
|
|
1741
|
+
const state = !selected.value;
|
|
1742
|
+
emit("update:selected", state);
|
|
1743
|
+
emit("change", props.value, state);
|
|
1744
|
+
};
|
|
1745
|
+
return (_ctx, _cache) => {
|
|
1746
|
+
return openBlock(), createBlock(_sfc_main$k, {
|
|
1747
|
+
class: normalizeClass(combClass.value),
|
|
1748
|
+
hover: "alpha-d9",
|
|
1749
|
+
state: selected.value ? "act" : "",
|
|
1750
|
+
states: { act: combActClass.value },
|
|
1751
|
+
cname: combClass.value + combActClass.value,
|
|
1752
|
+
onOn_click: toggle
|
|
1753
|
+
}, {
|
|
1754
|
+
default: withCtx(() => [
|
|
1755
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1756
|
+
state: selected.value ? "act" : ""
|
|
1757
|
+
}, () => {
|
|
1758
|
+
var _a, _b;
|
|
1759
|
+
return [
|
|
1760
|
+
createVNode(_sfc_main$m, {
|
|
1761
|
+
class: "w-24-px h-24-px bg-color-neutral round-sm flex-5",
|
|
1762
|
+
state: selected.value ? "act" : "",
|
|
1763
|
+
cname: combClass.value + combActClass.value,
|
|
1764
|
+
states: {
|
|
1765
|
+
act: `bg-color-${_ctx.actColor ? ((_a = _ctx.actColor) == null ? void 0 : _a.bg) ?? "blue" : "blue"} color-${_ctx.actColor ? ((_b = _ctx.actColor) == null ? void 0 : _b.icon) ?? "light" : "light"}`
|
|
1766
|
+
}
|
|
1767
|
+
}, {
|
|
1768
|
+
default: withCtx(() => [
|
|
1769
|
+
createVNode(_sfc_main$e, {
|
|
1770
|
+
icon: "success",
|
|
1771
|
+
class: "alpha-d3",
|
|
1772
|
+
state: selected.value ? "act" : "",
|
|
1773
|
+
states: {
|
|
1774
|
+
act: "alpha-1"
|
|
1775
|
+
}
|
|
1776
|
+
}, null, 8, ["state"])
|
|
1777
|
+
]),
|
|
1778
|
+
_: 1
|
|
1779
|
+
}, 8, ["state", "cname", "states"])
|
|
1780
|
+
];
|
|
1781
|
+
}),
|
|
1782
|
+
label.value ? (openBlock(), createBlock(_sfc_main$m, {
|
|
1783
|
+
key: 0,
|
|
1784
|
+
class: "pad-h-1 ellipsis"
|
|
1785
|
+
}, {
|
|
1786
|
+
default: withCtx(() => [
|
|
1787
|
+
createTextVNode(toDisplayString(selected.value ? label.value[1] : label.value[0]), 1)
|
|
1788
|
+
]),
|
|
1789
|
+
_: 1
|
|
1790
|
+
})) : createCommentVNode("", true)
|
|
1791
|
+
]),
|
|
1792
|
+
_: 3
|
|
1793
|
+
}, 8, ["class", "state", "states", "cname"]);
|
|
1794
|
+
};
|
|
1795
|
+
}
|
|
1796
|
+
});
|
|
1797
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1798
|
+
__name: "checkbox-group-wid",
|
|
1799
|
+
props: {
|
|
1800
|
+
options: {},
|
|
1801
|
+
selected: {},
|
|
1802
|
+
class: {},
|
|
1803
|
+
title: {},
|
|
1804
|
+
span: {}
|
|
1805
|
+
},
|
|
1806
|
+
emits: ["update:selected", "change"],
|
|
1807
|
+
setup(__props, { emit }) {
|
|
1808
|
+
const props = __props;
|
|
1809
|
+
const checkboxData = computed(() => {
|
|
1810
|
+
return props.options.map((opt) => {
|
|
1811
|
+
var _a;
|
|
1812
|
+
return {
|
|
1813
|
+
...opt,
|
|
1814
|
+
checkboxData: {
|
|
1815
|
+
...opt == null ? void 0 : opt.checkboxData,
|
|
1816
|
+
class: ((_a = opt == null ? void 0 : opt.checkboxData) == null ? void 0 : _a.class) ?? "bg-color-none mrg-r-1d5"
|
|
1817
|
+
},
|
|
1818
|
+
selected: props.selected.includes(opt.value)
|
|
1819
|
+
};
|
|
1820
|
+
});
|
|
1821
|
+
});
|
|
1822
|
+
const change = (value, state) => {
|
|
1823
|
+
const selected = [...props.selected];
|
|
1824
|
+
if (state && !selected.includes(value))
|
|
1825
|
+
selected.push(value);
|
|
1826
|
+
if (!state && selected.includes(value))
|
|
1827
|
+
selected.splice(selected.findIndex((val) => val === value), 1);
|
|
1828
|
+
emit("update:selected", selected);
|
|
1829
|
+
emit("change", selected.map((value2) => {
|
|
1830
|
+
var _a;
|
|
1831
|
+
return {
|
|
1832
|
+
label: (_a = props.options.find((opt) => opt.value === value2)) == null ? void 0 : _a.label,
|
|
1833
|
+
value: value2
|
|
1834
|
+
};
|
|
1835
|
+
}));
|
|
1836
|
+
};
|
|
1837
|
+
return (_ctx, _cache) => {
|
|
1838
|
+
const _component_b_col = resolveComponent("b-col");
|
|
1839
|
+
const _component_b_row = resolveComponent("b-row");
|
|
1840
|
+
return openBlock(), createBlock(_sfc_main$m, {
|
|
1841
|
+
class: normalizeClass(_ctx.class)
|
|
1842
|
+
}, {
|
|
1843
|
+
default: withCtx(() => [
|
|
1844
|
+
_ctx.title ? (openBlock(), createBlock(_sfc_main$m, {
|
|
1845
|
+
key: 0,
|
|
1846
|
+
class: "mrg-b-1"
|
|
1847
|
+
}, {
|
|
1848
|
+
default: withCtx(() => [
|
|
1849
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
1850
|
+
]),
|
|
1851
|
+
_: 1
|
|
1852
|
+
})) : createCommentVNode("", true),
|
|
1853
|
+
createVNode(_component_b_row, null, {
|
|
1854
|
+
default: withCtx(() => [
|
|
1855
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(checkboxData.value, (item, i) => {
|
|
1856
|
+
return openBlock(), createBlock(_component_b_col, {
|
|
1857
|
+
class: "flex-4",
|
|
1858
|
+
span: _ctx.span,
|
|
1859
|
+
key: i
|
|
1860
|
+
}, {
|
|
1861
|
+
default: withCtx(() => [
|
|
1862
|
+
createVNode(_sfc_main$4, mergeProps({
|
|
1863
|
+
onChange: change,
|
|
1864
|
+
label: item.label,
|
|
1865
|
+
value: item.value
|
|
1866
|
+
}, item.checkboxData, {
|
|
1867
|
+
selected: item.selected,
|
|
1868
|
+
"onUpdate:selected": ($event) => item.selected = $event
|
|
1869
|
+
}), createSlots({ _: 2 }, [
|
|
1870
|
+
_ctx.$slots.default ? {
|
|
1871
|
+
name: "default",
|
|
1872
|
+
fn: withCtx((scope) => [
|
|
1873
|
+
renderSlot(_ctx.$slots, "default", {
|
|
1874
|
+
state: scope.state
|
|
1875
|
+
})
|
|
1876
|
+
]),
|
|
1877
|
+
key: "0"
|
|
1878
|
+
} : void 0,
|
|
1879
|
+
_ctx.$slots[item.value] ? {
|
|
1880
|
+
name: "default",
|
|
1881
|
+
fn: withCtx((scope) => [
|
|
1882
|
+
renderSlot(_ctx.$slots, item.value, {
|
|
1883
|
+
state: scope.state
|
|
1884
|
+
})
|
|
1885
|
+
]),
|
|
1886
|
+
key: "1"
|
|
1887
|
+
} : void 0
|
|
1888
|
+
]), 1040, ["label", "value", "selected", "onUpdate:selected"])
|
|
1889
|
+
]),
|
|
1890
|
+
_: 2
|
|
1891
|
+
}, 1032, ["span"]);
|
|
1892
|
+
}), 128))
|
|
1893
|
+
]),
|
|
1894
|
+
_: 3
|
|
1895
|
+
})
|
|
1896
|
+
]),
|
|
1897
|
+
_: 3
|
|
1898
|
+
}, 8, ["class"]);
|
|
1899
|
+
};
|
|
1900
|
+
}
|
|
1901
|
+
});
|
|
1902
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1903
|
+
__name: "radio-group-wid",
|
|
1904
|
+
props: {
|
|
1905
|
+
options: {},
|
|
1906
|
+
selected: {},
|
|
1907
|
+
class: {},
|
|
1908
|
+
title: {},
|
|
1909
|
+
span: {},
|
|
1910
|
+
regular: { type: Boolean }
|
|
1911
|
+
},
|
|
1912
|
+
emits: ["update:selected", "change"],
|
|
1913
|
+
setup(__props, { emit }) {
|
|
1914
|
+
const props = __props;
|
|
1915
|
+
const selected = computed(() => [props.selected]);
|
|
1916
|
+
const change = (selected2) => {
|
|
1917
|
+
const values = selected2.map((item) => item.value);
|
|
1918
|
+
if (values.length === 2)
|
|
1919
|
+
emit("update:selected", values[1]);
|
|
1920
|
+
emit("change", values);
|
|
1921
|
+
};
|
|
1922
|
+
const slots = ref([]);
|
|
1923
|
+
onMounted(() => {
|
|
1924
|
+
var _a;
|
|
1925
|
+
slots.value = Object.keys(((_a = getCurrentInstance()) == null ? void 0 : _a.slots) ?? []);
|
|
1926
|
+
});
|
|
1927
|
+
return (_ctx, _cache) => {
|
|
1928
|
+
const _component_b_view = resolveComponent("b-view");
|
|
1929
|
+
return openBlock(), createBlock(_sfc_main$3, {
|
|
1930
|
+
span: _ctx.span,
|
|
1931
|
+
title: _ctx.title,
|
|
1932
|
+
class: normalizeClass(_ctx.class),
|
|
1933
|
+
selected: selected.value,
|
|
1934
|
+
options: _ctx.options,
|
|
1935
|
+
onChange: change
|
|
1936
|
+
}, createSlots({ _: 2 }, [
|
|
1937
|
+
_ctx.regular ? {
|
|
1938
|
+
name: "default",
|
|
1939
|
+
fn: withCtx((scope) => [
|
|
1940
|
+
createVNode(_component_b_view, { class: "h-24-px w-24-px round-lg pad-d5 bg-color-neutral" }, {
|
|
1941
|
+
default: withCtx(() => [
|
|
1942
|
+
createVNode(_component_b_view, {
|
|
1943
|
+
class: "max round-lg bg-color-C99999944",
|
|
1944
|
+
state: scope.state,
|
|
1945
|
+
states: {
|
|
1946
|
+
act: "bg-color-blue"
|
|
1947
|
+
}
|
|
1948
|
+
}, null, 8, ["state"])
|
|
1949
|
+
]),
|
|
1950
|
+
_: 2
|
|
1951
|
+
}, 1024)
|
|
1952
|
+
]),
|
|
1953
|
+
key: "0"
|
|
1954
|
+
} : void 0,
|
|
1955
|
+
renderList(slots.value, (slotName) => {
|
|
1956
|
+
return {
|
|
1957
|
+
name: slotName,
|
|
1958
|
+
fn: withCtx((scope) => [
|
|
1959
|
+
renderSlot(_ctx.$slots, slotName, {
|
|
1960
|
+
state: scope.state
|
|
1961
|
+
})
|
|
1962
|
+
])
|
|
1963
|
+
};
|
|
1964
|
+
})
|
|
1965
|
+
]), 1032, ["span", "title", "class", "selected", "options"]);
|
|
1966
|
+
};
|
|
1967
|
+
}
|
|
1968
|
+
});
|
|
1969
|
+
const _hoisted_1 = /* @__PURE__ */ createElementVNode("span", null, null, -1);
|
|
1970
|
+
const _hoisted_2 = ["innerHTML"];
|
|
1971
|
+
const _hoisted_3 = ["innerHTML"];
|
|
1972
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1973
|
+
__name: "tabs-wid",
|
|
1974
|
+
props: {
|
|
1975
|
+
options: {},
|
|
1976
|
+
selected: {},
|
|
1977
|
+
title: {},
|
|
1978
|
+
color: {},
|
|
1979
|
+
tabStyle: {},
|
|
1980
|
+
smooth: { type: Boolean },
|
|
1981
|
+
noDataNotic: {}
|
|
1982
|
+
},
|
|
1983
|
+
emits: ["update:selected", "change"],
|
|
1984
|
+
setup(__props, { emit }) {
|
|
1985
|
+
const props = __props;
|
|
1986
|
+
const tabConts = reactive({});
|
|
1987
|
+
const color = computed(() => props.color ?? "blue");
|
|
1988
|
+
const tabOrder = reactive({});
|
|
1989
|
+
const contLine = ref(false);
|
|
1990
|
+
const options = computed(() => {
|
|
1991
|
+
return props.options.map((opt, i) => {
|
|
1992
|
+
const { label, value, cont } = opt;
|
|
1993
|
+
let checkboxData = opt.checkboxData;
|
|
1994
|
+
tabConts[value] = cont;
|
|
1995
|
+
tabOrder[value] = i;
|
|
1996
|
+
if (!checkboxData) {
|
|
1997
|
+
contLine.value = true;
|
|
1998
|
+
checkboxData = {
|
|
1999
|
+
class: "round-none solid-b line-neutral thick-1 pad-b-1 bg-color-none rel",
|
|
2000
|
+
actClass: `color-${color.value}`
|
|
2001
|
+
};
|
|
2002
|
+
if (props.tabStyle === "grid") {
|
|
2003
|
+
contLine.value = false;
|
|
2004
|
+
checkboxData = {
|
|
2005
|
+
class: "round-none thick-1 solid line-neutral bg-color-none",
|
|
2006
|
+
actClass: `line-${color.value} color-${color.value}`
|
|
2007
|
+
};
|
|
2008
|
+
}
|
|
2009
|
+
if (props.tabStyle === "card") {
|
|
2010
|
+
checkboxData = {
|
|
2011
|
+
class: "round-sm round-t thick-1 solid line-neutral bg-color-neutral rel mrg-r-4-px",
|
|
2012
|
+
actClass: `bg-color-none solid-b-none t-f1-px color-${color.value}`
|
|
2013
|
+
};
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
return { label, value, checkboxData };
|
|
2017
|
+
});
|
|
2018
|
+
});
|
|
2019
|
+
const contArea = computed(() => props.options.findIndex((opt) => opt.cont) > -1);
|
|
2020
|
+
const selected = ref(props.selected);
|
|
2021
|
+
const flipDir = ref("");
|
|
2022
|
+
watch(selected, (val, oldVal) => {
|
|
2023
|
+
flipDir.value = tabOrder[val] > tabOrder[oldVal] ? "right-to-left" : "left-to-right";
|
|
2024
|
+
emit("update:selected", val);
|
|
2025
|
+
emit("change", {
|
|
2026
|
+
cur: val,
|
|
2027
|
+
old: oldVal,
|
|
2028
|
+
dir: tabOrder[val] > tabOrder[oldVal] ? 1 : 0,
|
|
2029
|
+
aniClass: `ani-${flipDir.value}`
|
|
2030
|
+
});
|
|
2031
|
+
});
|
|
2032
|
+
const slots = ref([]);
|
|
2033
|
+
onBeforeMount(() => {
|
|
2034
|
+
var _a;
|
|
2035
|
+
slots.value = Object.keys(((_a = getCurrentInstance()) == null ? void 0 : _a.slots) ?? []);
|
|
2036
|
+
});
|
|
2037
|
+
return (_ctx, _cache) => {
|
|
2038
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
2039
|
+
createVNode(_sfc_main$m, { class: "flex-7" }, {
|
|
2040
|
+
default: withCtx(() => [
|
|
2041
|
+
createVNode(_sfc_main$2, {
|
|
2042
|
+
options: options.value,
|
|
2043
|
+
title: _ctx.title,
|
|
2044
|
+
selected: selected.value,
|
|
2045
|
+
"onUpdate:selected": _cache[0] || (_cache[0] = ($event) => selected.value = $event)
|
|
2046
|
+
}, createSlots({ _: 2 }, [
|
|
2047
|
+
slots.value.length === 0 && _ctx.tabStyle === "grid" ? {
|
|
2048
|
+
name: "default",
|
|
2049
|
+
fn: withCtx((scope) => [
|
|
2050
|
+
_hoisted_1
|
|
2051
|
+
]),
|
|
2052
|
+
key: "0"
|
|
2053
|
+
} : slots.value.length === 0 && _ctx.tabStyle === "card" ? {
|
|
2054
|
+
name: "default",
|
|
2055
|
+
fn: withCtx((scope) => [
|
|
2056
|
+
createVNode(_sfc_main$m, { class: "w-4-px b-f1-px h-1-px bg-color-neutral r-f5-px abs" })
|
|
2057
|
+
]),
|
|
2058
|
+
key: "1"
|
|
2059
|
+
} : slots.value.length === 0 ? {
|
|
2060
|
+
name: "default",
|
|
2061
|
+
fn: withCtx((scope) => [
|
|
2062
|
+
createVNode(_sfc_main$m, {
|
|
2063
|
+
class: normalizeClass(`max-w l-0 b-f1-px round-sm h-2-px bg-color-none abs`),
|
|
2064
|
+
state: scope.state,
|
|
2065
|
+
states: {
|
|
2066
|
+
act: `bg-color-${color.value}`
|
|
2067
|
+
}
|
|
2068
|
+
}, null, 8, ["state", "states"])
|
|
2069
|
+
]),
|
|
2070
|
+
key: "2"
|
|
2071
|
+
} : void 0,
|
|
2072
|
+
renderList(slots.value, (slotName) => {
|
|
2073
|
+
return {
|
|
2074
|
+
name: slotName,
|
|
2075
|
+
fn: withCtx((scope) => [
|
|
2076
|
+
renderSlot(_ctx.$slots, slotName, {
|
|
2077
|
+
state: scope.state
|
|
2078
|
+
})
|
|
2079
|
+
])
|
|
2080
|
+
};
|
|
2081
|
+
})
|
|
2082
|
+
]), 1032, ["options", "title", "selected"]),
|
|
2083
|
+
contLine.value ? (openBlock(), createBlock(_sfc_main$m, {
|
|
2084
|
+
key: 0,
|
|
2085
|
+
class: "grow-1 h-1-px bg-color-neutral"
|
|
2086
|
+
})) : createCommentVNode("", true)
|
|
2087
|
+
]),
|
|
2088
|
+
_: 3
|
|
2089
|
+
}),
|
|
2090
|
+
contArea.value ? (openBlock(), createBlock(_sfc_main$m, {
|
|
2091
|
+
key: 0,
|
|
2092
|
+
class: "pad-v-1d5 over-hide"
|
|
2093
|
+
}, {
|
|
2094
|
+
default: withCtx(() => [
|
|
2095
|
+
selected.value ? (openBlock(), createBlock(_sfc_main$m, { key: 0 }, {
|
|
2096
|
+
default: withCtx(() => [
|
|
2097
|
+
createElementVNode("div", {
|
|
2098
|
+
innerHTML: tabConts[selected.value],
|
|
2099
|
+
class: normalizeClass(_ctx.smooth ? `ani-fast ani-${flipDir.value}` : ""),
|
|
2100
|
+
onAnimationend: _cache[1] || (_cache[1] = ($event) => flipDir.value = "")
|
|
2101
|
+
}, null, 42, _hoisted_2)
|
|
2102
|
+
]),
|
|
2103
|
+
_: 1
|
|
2104
|
+
})) : (openBlock(), createBlock(_sfc_main$m, {
|
|
2105
|
+
key: 1,
|
|
2106
|
+
class: "alpha-d5"
|
|
2107
|
+
}, {
|
|
2108
|
+
default: withCtx(() => [
|
|
2109
|
+
createElementVNode("div", {
|
|
2110
|
+
innerHTML: _ctx.noDataNotic ?? "暂未选择标签"
|
|
2111
|
+
}, null, 8, _hoisted_3)
|
|
2112
|
+
]),
|
|
2113
|
+
_: 1
|
|
2114
|
+
}))
|
|
2115
|
+
]),
|
|
2116
|
+
_: 1
|
|
2117
|
+
})) : createCommentVNode("", true)
|
|
2118
|
+
], 64);
|
|
2119
|
+
};
|
|
2120
|
+
}
|
|
2121
|
+
});
|
|
1670
2122
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1671
2123
|
__name: "app-wid",
|
|
1672
2124
|
props: {
|
|
@@ -1691,15 +2143,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1691
2143
|
return (_ctx, _cache) => {
|
|
1692
2144
|
var _a;
|
|
1693
2145
|
const _component_router_view = resolveComponent("router-view");
|
|
1694
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2146
|
+
return openBlock(), createBlock(_sfc_main$m, {
|
|
1695
2147
|
class: normalizeClass(`max flex-column color-light select-none bg-color-${((_a = _ctx.colors) == null ? void 0 : _a.bg) || "none"}`)
|
|
1696
2148
|
}, {
|
|
1697
2149
|
default: withCtx(() => {
|
|
1698
2150
|
var _a2;
|
|
1699
2151
|
return [
|
|
1700
|
-
createVNode(_sfc_main$
|
|
2152
|
+
createVNode(_sfc_main$m, { class: "rel grow-1" }, {
|
|
1701
2153
|
default: withCtx(() => [
|
|
1702
|
-
createVNode(_sfc_main$
|
|
2154
|
+
createVNode(_sfc_main$a, {
|
|
1703
2155
|
scroll: { y: "auto", x: "hidden" },
|
|
1704
2156
|
class: "abs max"
|
|
1705
2157
|
}, {
|
|
@@ -1713,32 +2165,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1713
2165
|
]),
|
|
1714
2166
|
_: 1
|
|
1715
2167
|
}),
|
|
1716
|
-
createVNode(_sfc_main$
|
|
2168
|
+
createVNode(_sfc_main$m, {
|
|
1717
2169
|
class: normalizeClass(`pcenter flex-around ${_ctx.round ? "round-md round-t" : ""} bg-color-${((_a2 = _ctx.colors) == null ? void 0 : _a2.bar) || "dark"}`)
|
|
1718
2170
|
}, {
|
|
1719
2171
|
default: withCtx(() => [
|
|
1720
2172
|
(openBlock(true), createElementBlock(Fragment, null, renderList(navs.value, (nav, i) => {
|
|
1721
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2173
|
+
return openBlock(), createBlock(_sfc_main$k, mergeProps({ key: i }, nav.hotData, {
|
|
1722
2174
|
onOn_click: ($event) => _ctx.$emit("on_toggle", nav),
|
|
1723
2175
|
class: "flex rel pad-v-4-px max-h"
|
|
1724
2176
|
}), {
|
|
1725
2177
|
default: withCtx(() => {
|
|
1726
2178
|
var _a3, _b, _c, _d, _e, _f;
|
|
1727
2179
|
return [
|
|
1728
|
-
nav.main ? (openBlock(), createBlock(_sfc_main$
|
|
2180
|
+
nav.main ? (openBlock(), createBlock(_sfc_main$m, {
|
|
1729
2181
|
key: 0,
|
|
1730
2182
|
class: "rel w-5"
|
|
1731
2183
|
}, {
|
|
1732
2184
|
default: withCtx(() => {
|
|
1733
2185
|
var _a4, _b2, _c2, _d2;
|
|
1734
2186
|
return [
|
|
1735
|
-
createVNode(_sfc_main$
|
|
2187
|
+
createVNode(_sfc_main$e, mergeProps(nav.iconData, {
|
|
1736
2188
|
class: `abs flex-5 solid t-f1d4 thick-2 w-5 h-5 flex-5 round fsize-1d7 line-${((_b2 = (_a4 = _ctx.colors) == null ? void 0 : _a4.center) == null ? void 0 : _b2.line) || "neutral"} bg-color-${((_d2 = (_c2 = _ctx.colors) == null ? void 0 : _c2.center) == null ? void 0 : _d2.bg) || "dgray"}`
|
|
1737
2189
|
}), null, 16, ["class"])
|
|
1738
2190
|
];
|
|
1739
2191
|
}),
|
|
1740
2192
|
_: 2
|
|
1741
|
-
}, 1024)) : (openBlock(), createBlock(_sfc_main$
|
|
2193
|
+
}, 1024)) : (openBlock(), createBlock(_sfc_main$m, {
|
|
1742
2194
|
key: 1,
|
|
1743
2195
|
class: normalizeClass(`flex-column flex-5 color-${((_b = (_a3 = _ctx.colors) == null ? void 0 : _a3.text) == null ? void 0 : _b.normal) || "mgray"}`),
|
|
1744
2196
|
cname: ((_d = (_c = _ctx.colors) == null ? void 0 : _c.text) == null ? void 0 : _d.act) || "light",
|
|
@@ -1748,7 +2200,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1748
2200
|
}
|
|
1749
2201
|
}, {
|
|
1750
2202
|
default: withCtx(() => [
|
|
1751
|
-
createVNode(_sfc_main$
|
|
2203
|
+
createVNode(_sfc_main$e, mergeProps(nav.iconData, {
|
|
1752
2204
|
cname: nav.act,
|
|
1753
2205
|
state: curRoute.value === nav.hotData.link ? "act" : "",
|
|
1754
2206
|
states: {
|
|
@@ -1756,7 +2208,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1756
2208
|
},
|
|
1757
2209
|
class: "w-2d7 h-2d7 trans-fast fsize-1d7"
|
|
1758
2210
|
}), null, 16, ["cname", "state", "states"]),
|
|
1759
|
-
nav.text ? (openBlock(), createBlock(_sfc_main$
|
|
2211
|
+
nav.text ? (openBlock(), createBlock(_sfc_main$l, {
|
|
1760
2212
|
key: 0,
|
|
1761
2213
|
class: "fsize-d8"
|
|
1762
2214
|
}, {
|
|
@@ -1784,18 +2236,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1784
2236
|
}
|
|
1785
2237
|
});
|
|
1786
2238
|
const initGlobalComponents = [
|
|
2239
|
+
_sfc_main$n,
|
|
2240
|
+
_sfc_main$m,
|
|
2241
|
+
_sfc_main$l,
|
|
2242
|
+
_sfc_main$k,
|
|
1787
2243
|
_sfc_main$j,
|
|
1788
|
-
_sfc_main$
|
|
1789
|
-
_sfc_main$
|
|
1790
|
-
_sfc_main$g,
|
|
1791
|
-
_sfc_main$f,
|
|
2244
|
+
_sfc_main$e,
|
|
2245
|
+
_sfc_main$b,
|
|
1792
2246
|
_sfc_main$a,
|
|
2247
|
+
_sfc_main$8,
|
|
2248
|
+
_sfc_main$d,
|
|
2249
|
+
_sfc_main$9,
|
|
2250
|
+
_sfc_main$c,
|
|
1793
2251
|
_sfc_main$7,
|
|
1794
2252
|
_sfc_main$6,
|
|
1795
|
-
_sfc_main$4,
|
|
1796
|
-
_sfc_main$9,
|
|
1797
2253
|
_sfc_main$5,
|
|
1798
|
-
_sfc_main$
|
|
2254
|
+
_sfc_main$4,
|
|
1799
2255
|
_sfc_main$3,
|
|
1800
2256
|
_sfc_main$2,
|
|
1801
2257
|
_sfc_main$1,
|
|
@@ -1803,10 +2259,15 @@ const initGlobalComponents = [
|
|
|
1803
2259
|
];
|
|
1804
2260
|
const index = {
|
|
1805
2261
|
name: "btxui",
|
|
1806
|
-
install(app) {
|
|
2262
|
+
install(app, config) {
|
|
1807
2263
|
initGlobalComponents.forEach((wid) => {
|
|
1808
2264
|
app.component(wid.__name, wid);
|
|
1809
2265
|
});
|
|
2266
|
+
if (config) {
|
|
2267
|
+
Object.keys(config).forEach((key) => {
|
|
2268
|
+
app.config.globalProperties[`$${key}`] = config[key];
|
|
2269
|
+
});
|
|
2270
|
+
}
|
|
1810
2271
|
}
|
|
1811
2272
|
};
|
|
1812
2273
|
export {
|