@deot/vc-components 1.0.62 → 1.0.64
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.cjs +1378 -349
- package/dist/index.d.ts +386 -101
- package/dist/index.iife.js +1440 -411
- package/dist/index.js +1380 -353
- package/dist/index.style.css +2 -2
- package/dist/index.umd.cjs +1440 -411
- package/package.json +1 -1
package/dist/index.iife.js
CHANGED
|
@@ -74,7 +74,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
74
74
|
}
|
|
75
75
|
const VcInstance = new Instance();
|
|
76
76
|
|
|
77
|
-
const props$
|
|
77
|
+
const props$1v = {
|
|
78
78
|
tag: {
|
|
79
79
|
type: String,
|
|
80
80
|
default: "div"
|
|
@@ -83,10 +83,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
83
83
|
|
|
84
84
|
/** @jsxImportSource vue */
|
|
85
85
|
|
|
86
|
-
const COMPONENT_NAME$
|
|
86
|
+
const COMPONENT_NAME$2g = 'vc-action-sheet';
|
|
87
87
|
const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
88
|
-
name: COMPONENT_NAME$
|
|
89
|
-
props: props$
|
|
88
|
+
name: COMPONENT_NAME$2g,
|
|
89
|
+
props: props$1v,
|
|
90
90
|
setup(props, {
|
|
91
91
|
slots
|
|
92
92
|
}) {
|
|
@@ -100,7 +100,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
100
100
|
|
|
101
101
|
const MActionSheet = ActionSheet;
|
|
102
102
|
|
|
103
|
-
const props$
|
|
103
|
+
const props$1u = {
|
|
104
104
|
modelValue: {
|
|
105
105
|
type: Boolean,
|
|
106
106
|
default: false
|
|
@@ -378,11 +378,11 @@ var VcComponents = (function (exports, vue) {
|
|
|
378
378
|
|
|
379
379
|
/** @jsxImportSource vue */
|
|
380
380
|
|
|
381
|
-
const COMPONENT_NAME$
|
|
381
|
+
const COMPONENT_NAME$2f = 'vc-affix';
|
|
382
382
|
const Affix = /* @__PURE__ */ vue.defineComponent({
|
|
383
|
-
name: COMPONENT_NAME$
|
|
383
|
+
name: COMPONENT_NAME$2f,
|
|
384
384
|
emits: ['update:modelValue'],
|
|
385
|
-
props: props$
|
|
385
|
+
props: props$1u,
|
|
386
386
|
setup(props, {
|
|
387
387
|
slots,
|
|
388
388
|
expose,
|
|
@@ -548,7 +548,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
548
548
|
|
|
549
549
|
const MAffix = Affix;
|
|
550
550
|
|
|
551
|
-
const props$
|
|
551
|
+
const props$1t = {
|
|
552
552
|
modelValue: {
|
|
553
553
|
type: Boolean,
|
|
554
554
|
default: true
|
|
@@ -575,7 +575,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
577
|
|
|
578
|
-
const props$
|
|
578
|
+
const props$1s = {
|
|
579
579
|
type: String,
|
|
580
580
|
inherit: {
|
|
581
581
|
type: Boolean,
|
|
@@ -712,10 +712,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
712
712
|
|
|
713
713
|
/** @jsxImportSource vue */
|
|
714
714
|
|
|
715
|
-
const COMPONENT_NAME$
|
|
715
|
+
const COMPONENT_NAME$2e = 'vc-icon';
|
|
716
716
|
const Icon = /* @__PURE__ */ vue.defineComponent({
|
|
717
|
-
name: COMPONENT_NAME$
|
|
718
|
-
props: props$
|
|
717
|
+
name: COMPONENT_NAME$2e,
|
|
718
|
+
props: props$1s,
|
|
719
719
|
setup(props) {
|
|
720
720
|
const viewBox = vue.ref('0 0 1024 1024');
|
|
721
721
|
const path = vue.ref([]);
|
|
@@ -748,7 +748,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
748
748
|
}
|
|
749
749
|
});
|
|
750
750
|
|
|
751
|
-
const props$
|
|
751
|
+
const props$1r = {
|
|
752
752
|
/**
|
|
753
753
|
* 进入/离开持续时间
|
|
754
754
|
* {enter: 300, leave: 300}
|
|
@@ -913,10 +913,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
913
913
|
};
|
|
914
914
|
};
|
|
915
915
|
|
|
916
|
-
const COMPONENT_NAME$
|
|
916
|
+
const COMPONENT_NAME$2d = "vc-transition";
|
|
917
917
|
const Transition = vue.defineComponent({
|
|
918
|
-
name: COMPONENT_NAME$
|
|
919
|
-
props: props$
|
|
918
|
+
name: COMPONENT_NAME$2d,
|
|
919
|
+
props: props$1r,
|
|
920
920
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
921
921
|
inheritAttrs: false,
|
|
922
922
|
setup(props, { slots, attrs }) {
|
|
@@ -936,10 +936,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
936
936
|
}
|
|
937
937
|
});
|
|
938
938
|
|
|
939
|
-
const COMPONENT_NAME$
|
|
939
|
+
const COMPONENT_NAME$2c = "vc-transition-collapse";
|
|
940
940
|
const TransitionCollapse = vue.defineComponent({
|
|
941
|
-
name: COMPONENT_NAME$
|
|
942
|
-
props: props$
|
|
941
|
+
name: COMPONENT_NAME$2c,
|
|
942
|
+
props: props$1r,
|
|
943
943
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
944
944
|
inheritAttrs: false,
|
|
945
945
|
setup(props, { slots, attrs: _attrs }) {
|
|
@@ -1053,11 +1053,11 @@ var VcComponents = (function (exports, vue) {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
});
|
|
1055
1055
|
|
|
1056
|
-
const COMPONENT_NAME$
|
|
1056
|
+
const COMPONENT_NAME$2b = "vc-transition-fade";
|
|
1057
1057
|
const TransitionFade = vue.defineComponent({
|
|
1058
|
-
name: COMPONENT_NAME$
|
|
1058
|
+
name: COMPONENT_NAME$2b,
|
|
1059
1059
|
props: {
|
|
1060
|
-
...props$
|
|
1060
|
+
...props$1r,
|
|
1061
1061
|
// inheritAttrs必须是false
|
|
1062
1062
|
style: {
|
|
1063
1063
|
type: Object,
|
|
@@ -1090,11 +1090,11 @@ var VcComponents = (function (exports, vue) {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
});
|
|
1092
1092
|
|
|
1093
|
-
const COMPONENT_NAME$
|
|
1093
|
+
const COMPONENT_NAME$2a = "vc-transition-scale";
|
|
1094
1094
|
const TransitionScale = vue.defineComponent({
|
|
1095
|
-
name: COMPONENT_NAME$
|
|
1095
|
+
name: COMPONENT_NAME$2a,
|
|
1096
1096
|
props: {
|
|
1097
|
-
...props$
|
|
1097
|
+
...props$1r,
|
|
1098
1098
|
mode: {
|
|
1099
1099
|
type: String,
|
|
1100
1100
|
default: "both",
|
|
@@ -1132,11 +1132,11 @@ var VcComponents = (function (exports, vue) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
});
|
|
1134
1134
|
|
|
1135
|
-
const COMPONENT_NAME$
|
|
1135
|
+
const COMPONENT_NAME$29 = "vc-transition-slide";
|
|
1136
1136
|
const TransitionSlide = vue.defineComponent({
|
|
1137
|
-
name: COMPONENT_NAME$
|
|
1137
|
+
name: COMPONENT_NAME$29,
|
|
1138
1138
|
props: {
|
|
1139
|
-
...props$
|
|
1139
|
+
...props$1r,
|
|
1140
1140
|
mode: {
|
|
1141
1141
|
type: String,
|
|
1142
1142
|
default: "left",
|
|
@@ -1174,11 +1174,11 @@ var VcComponents = (function (exports, vue) {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
});
|
|
1176
1176
|
|
|
1177
|
-
const COMPONENT_NAME$
|
|
1177
|
+
const COMPONENT_NAME$28 = "vc-transition-zoom";
|
|
1178
1178
|
const TransitionZoom = vue.defineComponent({
|
|
1179
|
-
name: COMPONENT_NAME$
|
|
1179
|
+
name: COMPONENT_NAME$28,
|
|
1180
1180
|
props: {
|
|
1181
|
-
...props$
|
|
1181
|
+
...props$1r,
|
|
1182
1182
|
mode: {
|
|
1183
1183
|
type: String,
|
|
1184
1184
|
default: "x",
|
|
@@ -1218,7 +1218,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
1218
1218
|
|
|
1219
1219
|
/** @jsxImportSource vue */
|
|
1220
1220
|
|
|
1221
|
-
const COMPONENT_NAME$
|
|
1221
|
+
const COMPONENT_NAME$27 = 'vc-alert';
|
|
1222
1222
|
|
|
1223
1223
|
// [color, borderColor, backgroundColor], -> CSS
|
|
1224
1224
|
const THEME_MAP = {
|
|
@@ -1228,8 +1228,8 @@ var VcComponents = (function (exports, vue) {
|
|
|
1228
1228
|
warning: ['#ffbf00', '#ffe58f', '#fffbe6']
|
|
1229
1229
|
};
|
|
1230
1230
|
const Alert = /* @__PURE__ */ vue.defineComponent({
|
|
1231
|
-
name: COMPONENT_NAME$
|
|
1232
|
-
props: props$
|
|
1231
|
+
name: COMPONENT_NAME$27,
|
|
1232
|
+
props: props$1t,
|
|
1233
1233
|
setup(props, {
|
|
1234
1234
|
slots,
|
|
1235
1235
|
emit
|
|
@@ -1444,7 +1444,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
1444
1444
|
return flatten$1(value, JSON.parse);
|
|
1445
1445
|
};
|
|
1446
1446
|
|
|
1447
|
-
const props$
|
|
1447
|
+
const props$1q = {
|
|
1448
1448
|
// canvas配置参数
|
|
1449
1449
|
options: Object,
|
|
1450
1450
|
width: {
|
|
@@ -1460,10 +1460,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
1460
1460
|
/** @jsxImportSource vue */
|
|
1461
1461
|
|
|
1462
1462
|
const isTouch = typeof document !== 'undefined' && 'ontouchend' in document;
|
|
1463
|
-
const COMPONENT_NAME$
|
|
1463
|
+
const COMPONENT_NAME$26 = 'vc-artboard';
|
|
1464
1464
|
const Artboard = /* @__PURE__ */ vue.defineComponent({
|
|
1465
|
-
name: COMPONENT_NAME$
|
|
1466
|
-
props: props$
|
|
1465
|
+
name: COMPONENT_NAME$26,
|
|
1466
|
+
props: props$1q,
|
|
1467
1467
|
setup(props, {
|
|
1468
1468
|
emit,
|
|
1469
1469
|
expose
|
|
@@ -1666,7 +1666,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
1666
1666
|
|
|
1667
1667
|
const MArtboard = Artboard;
|
|
1668
1668
|
|
|
1669
|
-
const props$
|
|
1669
|
+
const props$1p = {
|
|
1670
1670
|
size: {
|
|
1671
1671
|
type: Number,
|
|
1672
1672
|
default: 28
|
|
@@ -1690,10 +1690,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
1690
1690
|
|
|
1691
1691
|
/** @jsxImportSource vue */
|
|
1692
1692
|
|
|
1693
|
-
const COMPONENT_NAME$
|
|
1693
|
+
const COMPONENT_NAME$25 = 'vc-spin';
|
|
1694
1694
|
const Spin = /* @__PURE__ */ vue.defineComponent({
|
|
1695
|
-
name: COMPONENT_NAME$
|
|
1696
|
-
props: props$
|
|
1695
|
+
name: COMPONENT_NAME$25,
|
|
1696
|
+
props: props$1p,
|
|
1697
1697
|
setup(props, {
|
|
1698
1698
|
slots
|
|
1699
1699
|
}) {
|
|
@@ -6765,7 +6765,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
6765
6765
|
});
|
|
6766
6766
|
}
|
|
6767
6767
|
|
|
6768
|
-
const props$
|
|
6768
|
+
const props$1o = {
|
|
6769
6769
|
wait: {
|
|
6770
6770
|
type: Number,
|
|
6771
6771
|
default: 250
|
|
@@ -6781,10 +6781,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
6781
6781
|
exclude: RegExp
|
|
6782
6782
|
};
|
|
6783
6783
|
|
|
6784
|
-
const COMPONENT_NAME$
|
|
6784
|
+
const COMPONENT_NAME$24 = "vc-debounce";
|
|
6785
6785
|
const Debounce = vue.defineComponent({
|
|
6786
|
-
name: COMPONENT_NAME$
|
|
6787
|
-
props: props$
|
|
6786
|
+
name: COMPONENT_NAME$24,
|
|
6787
|
+
props: props$1o,
|
|
6788
6788
|
/**
|
|
6789
6789
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
6790
6790
|
* 如事件onClick
|
|
@@ -6824,7 +6824,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
6824
6824
|
}
|
|
6825
6825
|
});
|
|
6826
6826
|
|
|
6827
|
-
const props$
|
|
6827
|
+
const props$1n = {
|
|
6828
6828
|
tag: {
|
|
6829
6829
|
type: String,
|
|
6830
6830
|
default: "button"
|
|
@@ -6856,11 +6856,11 @@ var VcComponents = (function (exports, vue) {
|
|
|
6856
6856
|
|
|
6857
6857
|
/** @jsxImportSource vue */
|
|
6858
6858
|
|
|
6859
|
-
const COMPONENT_NAME$
|
|
6859
|
+
const COMPONENT_NAME$23 = 'vc-button';
|
|
6860
6860
|
const Button = /* @__PURE__ */ vue.defineComponent({
|
|
6861
|
-
name: COMPONENT_NAME$
|
|
6861
|
+
name: COMPONENT_NAME$23,
|
|
6862
6862
|
emits: ['click'],
|
|
6863
|
-
props: props$
|
|
6863
|
+
props: props$1n,
|
|
6864
6864
|
setup(props, {
|
|
6865
6865
|
slots
|
|
6866
6866
|
}) {
|
|
@@ -6921,7 +6921,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
6921
6921
|
}
|
|
6922
6922
|
});
|
|
6923
6923
|
|
|
6924
|
-
const props$
|
|
6924
|
+
const props$1m = {
|
|
6925
6925
|
vertical: {
|
|
6926
6926
|
type: Boolean,
|
|
6927
6927
|
default: false
|
|
@@ -6942,10 +6942,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
6942
6942
|
|
|
6943
6943
|
/** @jsxImportSource vue */
|
|
6944
6944
|
|
|
6945
|
-
const COMPONENT_NAME$
|
|
6945
|
+
const COMPONENT_NAME$22 = 'vc-button-group';
|
|
6946
6946
|
const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
|
|
6947
|
-
name: COMPONENT_NAME$
|
|
6948
|
-
props: props$
|
|
6947
|
+
name: COMPONENT_NAME$22,
|
|
6948
|
+
props: props$1m,
|
|
6949
6949
|
setup(props, {
|
|
6950
6950
|
slots
|
|
6951
6951
|
}) {
|
|
@@ -6969,7 +6969,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
6969
6969
|
const MButton = Button;
|
|
6970
6970
|
const MButtonGroup = ButtonGroup;
|
|
6971
6971
|
|
|
6972
|
-
const props$
|
|
6972
|
+
const props$1l = {
|
|
6973
6973
|
tag: {
|
|
6974
6974
|
type: String,
|
|
6975
6975
|
default: "div"
|
|
@@ -6978,10 +6978,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
6978
6978
|
|
|
6979
6979
|
/** @jsxImportSource vue */
|
|
6980
6980
|
|
|
6981
|
-
const COMPONENT_NAME$
|
|
6981
|
+
const COMPONENT_NAME$21 = 'vc-calendar';
|
|
6982
6982
|
const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
|
|
6983
|
-
name: COMPONENT_NAME$
|
|
6984
|
-
props: props$
|
|
6983
|
+
name: COMPONENT_NAME$21,
|
|
6984
|
+
props: props$1l,
|
|
6985
6985
|
setup(props, {
|
|
6986
6986
|
slots
|
|
6987
6987
|
}) {
|
|
@@ -6995,7 +6995,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
6995
6995
|
|
|
6996
6996
|
const MCalendar = Calendar$1;
|
|
6997
6997
|
|
|
6998
|
-
const props$
|
|
6998
|
+
const props$1k = {
|
|
6999
6999
|
border: {
|
|
7000
7000
|
type: Boolean,
|
|
7001
7001
|
default: true
|
|
@@ -7018,10 +7018,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
7018
7018
|
|
|
7019
7019
|
/** @jsxImportSource vue */
|
|
7020
7020
|
|
|
7021
|
-
const COMPONENT_NAME$
|
|
7021
|
+
const COMPONENT_NAME$20 = 'vc-card';
|
|
7022
7022
|
const Card = /* @__PURE__ */ vue.defineComponent({
|
|
7023
|
-
name: COMPONENT_NAME$
|
|
7024
|
-
props: props$
|
|
7023
|
+
name: COMPONENT_NAME$20,
|
|
7024
|
+
props: props$1k,
|
|
7025
7025
|
setup(props, {
|
|
7026
7026
|
slots
|
|
7027
7027
|
}) {
|
|
@@ -7047,31 +7047,776 @@ var VcComponents = (function (exports, vue) {
|
|
|
7047
7047
|
|
|
7048
7048
|
const MCard = Card;
|
|
7049
7049
|
|
|
7050
|
-
|
|
7051
|
-
|
|
7050
|
+
class Resize {
|
|
7051
|
+
el;
|
|
7052
|
+
static of(el) {
|
|
7053
|
+
return new Resize(el);
|
|
7054
|
+
}
|
|
7055
|
+
/**
|
|
7056
|
+
* Resize.of(el, fn);
|
|
7057
|
+
* @param el ~
|
|
7058
|
+
* @param fn ~
|
|
7059
|
+
* @returns off
|
|
7060
|
+
*/
|
|
7061
|
+
static on(el, fn) {
|
|
7062
|
+
return new Resize(el).on(fn);
|
|
7063
|
+
}
|
|
7064
|
+
/**
|
|
7065
|
+
* 要实现Resize.off(el),el必须侵入式修改挂上__rz__
|
|
7066
|
+
* @param el ~
|
|
7067
|
+
* @param fn ~
|
|
7068
|
+
* @returns ~
|
|
7069
|
+
*/
|
|
7070
|
+
static off(el, fn) {
|
|
7071
|
+
return new Resize(el).off(fn);
|
|
7072
|
+
}
|
|
7073
|
+
listeners = [];
|
|
7074
|
+
ro = null;
|
|
7075
|
+
constructor(el) {
|
|
7076
|
+
this.el = el;
|
|
7077
|
+
let rz = el.__rz__;
|
|
7078
|
+
if (rz && rz instanceof Resize) {
|
|
7079
|
+
this.listeners = rz.listeners;
|
|
7080
|
+
this.ro = rz.ro;
|
|
7081
|
+
}
|
|
7082
|
+
}
|
|
7083
|
+
handleResize = (entries) => {
|
|
7084
|
+
/* istanbul ignore else -- @preserve */
|
|
7085
|
+
if (entries.some((i) => i.target === this.el)) {
|
|
7086
|
+
this.listeners?.forEach((fn) => fn());
|
|
7087
|
+
}
|
|
7088
|
+
};
|
|
7089
|
+
on(fn) {
|
|
7090
|
+
if (typeof ResizeObserver === "undefined")
|
|
7091
|
+
return () => {
|
|
7092
|
+
};
|
|
7093
|
+
if (!this.listeners.length) {
|
|
7094
|
+
this.ro = this.ro || new ResizeObserver(this.handleResize);
|
|
7095
|
+
this.ro.observe(this.el);
|
|
7096
|
+
this.el.__rz__ = this;
|
|
7097
|
+
}
|
|
7098
|
+
this.listeners.push(fn);
|
|
7099
|
+
return () => this.off(fn);
|
|
7100
|
+
}
|
|
7101
|
+
off(fn) {
|
|
7102
|
+
if (fn) {
|
|
7103
|
+
this.listeners.splice(this.listeners.indexOf(fn), 1);
|
|
7104
|
+
} else {
|
|
7105
|
+
this.listeners = [];
|
|
7106
|
+
}
|
|
7107
|
+
if (!this.listeners.length && this.ro) {
|
|
7108
|
+
this.ro.disconnect();
|
|
7109
|
+
}
|
|
7110
|
+
}
|
|
7111
|
+
}
|
|
7112
|
+
|
|
7113
|
+
const useCarousel = (wrapper, content, expose) => {
|
|
7114
|
+
const instance = vue.getCurrentInstance();
|
|
7115
|
+
const props = instance.props;
|
|
7116
|
+
const { emit } = instance;
|
|
7117
|
+
const items = vue.ref([]);
|
|
7118
|
+
const activeIndex = vue.ref(-1);
|
|
7119
|
+
const timer = vue.ref(null);
|
|
7120
|
+
const offset = vue.ref(0);
|
|
7121
|
+
const carouselId = vue.ref(getUid("carousel"));
|
|
7122
|
+
const start = vue.ref();
|
|
7123
|
+
const startX = vue.ref();
|
|
7124
|
+
const startY = vue.ref();
|
|
7125
|
+
const allowTransition = vue.ref(false);
|
|
7126
|
+
const direction = vue.computed(() => {
|
|
7127
|
+
return props.vertical ? "vertical" : "horizontal";
|
|
7128
|
+
});
|
|
7129
|
+
const hasLabel = vue.computed(() => {
|
|
7130
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
7131
|
+
});
|
|
7132
|
+
const dotsClasses = vue.computed(() => {
|
|
7133
|
+
const classes = ["is-" + direction.value];
|
|
7134
|
+
if (hasLabel.value) {
|
|
7135
|
+
classes.push("is-labels");
|
|
7136
|
+
}
|
|
7137
|
+
if (props.dots === "outside" || props.card) {
|
|
7138
|
+
classes.push("is-outside");
|
|
7139
|
+
}
|
|
7140
|
+
return classes;
|
|
7141
|
+
});
|
|
7142
|
+
const resetItems = (oldIndex) => {
|
|
7143
|
+
items.value.forEach((item, index) => {
|
|
7144
|
+
item.exposed?.reset?.(index, activeIndex.value, oldIndex);
|
|
7145
|
+
});
|
|
7146
|
+
};
|
|
7147
|
+
const playSlides = () => {
|
|
7148
|
+
allowTransition.value = true;
|
|
7149
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
7150
|
+
activeIndex.value++;
|
|
7151
|
+
} else if (props.loop) {
|
|
7152
|
+
activeIndex.value = 0;
|
|
7153
|
+
}
|
|
7154
|
+
};
|
|
7155
|
+
const pauseTimer = () => {
|
|
7156
|
+
if (timer.value) {
|
|
7157
|
+
clearInterval(timer.value);
|
|
7158
|
+
timer.value = null;
|
|
7159
|
+
}
|
|
7160
|
+
};
|
|
7161
|
+
const startTimer = () => {
|
|
7162
|
+
if (props.t <= 0 || !props.autoplay || timer.value) return;
|
|
7163
|
+
timer.value = setInterval(playSlides, props.t);
|
|
7164
|
+
};
|
|
7165
|
+
const setActiveItem = (index) => {
|
|
7166
|
+
if (typeof index === "string") {
|
|
7167
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
7168
|
+
if (filteredItems.length > 0) {
|
|
7169
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
7170
|
+
}
|
|
7171
|
+
}
|
|
7172
|
+
index = Number(index);
|
|
7173
|
+
if (isNaN(index) || index !== Math.floor(index)) {
|
|
7174
|
+
throw new VcError("carousel", "索引必须是整数");
|
|
7175
|
+
}
|
|
7176
|
+
const length = items.value.length;
|
|
7177
|
+
const oldIndex = activeIndex.value;
|
|
7178
|
+
if (index < 0) {
|
|
7179
|
+
activeIndex.value = props.loop ? length - 1 : 0;
|
|
7180
|
+
} else if (index >= length) {
|
|
7181
|
+
activeIndex.value = props.loop ? 0 : length - 1;
|
|
7182
|
+
} else {
|
|
7183
|
+
activeIndex.value = index;
|
|
7184
|
+
}
|
|
7185
|
+
if (oldIndex === activeIndex.value) {
|
|
7186
|
+
resetItems(oldIndex);
|
|
7187
|
+
}
|
|
7188
|
+
};
|
|
7189
|
+
const prev = () => {
|
|
7190
|
+
setActiveItem(activeIndex.value - 1);
|
|
7191
|
+
};
|
|
7192
|
+
const next = () => {
|
|
7193
|
+
setActiveItem(activeIndex.value + 1);
|
|
7194
|
+
};
|
|
7195
|
+
const handleDotClick = (index) => {
|
|
7196
|
+
activeIndex.value = index;
|
|
7197
|
+
};
|
|
7198
|
+
const handleStart = (e) => {
|
|
7199
|
+
allowTransition.value = true;
|
|
7200
|
+
if (!props.draggable) return;
|
|
7201
|
+
pauseTimer();
|
|
7202
|
+
start.value = true;
|
|
7203
|
+
startX.value = e.screenX;
|
|
7204
|
+
startY.value = e.screenY;
|
|
7205
|
+
};
|
|
7206
|
+
const handleMove = (e) => {
|
|
7207
|
+
if (!start.value || !props.draggable) return;
|
|
7208
|
+
offset.value = !props.vertical ? e.screenX - startX.value : e.screenY - startY.value;
|
|
7209
|
+
resetItems();
|
|
7210
|
+
};
|
|
7211
|
+
const handleEnd = () => {
|
|
7212
|
+
if (!props.draggable) return;
|
|
7213
|
+
start.value = false;
|
|
7214
|
+
startTimer();
|
|
7215
|
+
const $offset = Math.abs(offset.value);
|
|
7216
|
+
const $direction = offset.value > 0;
|
|
7217
|
+
offset.value = 0;
|
|
7218
|
+
if ($offset > 5) {
|
|
7219
|
+
$direction && prev();
|
|
7220
|
+
!$direction && next();
|
|
7221
|
+
} else {
|
|
7222
|
+
resetItems();
|
|
7223
|
+
}
|
|
7224
|
+
};
|
|
7225
|
+
vue.watch(
|
|
7226
|
+
() => items.value,
|
|
7227
|
+
(v) => {
|
|
7228
|
+
if (v.length > 0) setActiveItem(props.initialIndex);
|
|
7229
|
+
}
|
|
7230
|
+
);
|
|
7231
|
+
vue.watch(
|
|
7232
|
+
() => activeIndex.value,
|
|
7233
|
+
(v, oldV) => {
|
|
7234
|
+
resetItems(oldV);
|
|
7235
|
+
emit("change", v, oldV);
|
|
7236
|
+
}
|
|
7237
|
+
);
|
|
7238
|
+
vue.watch(
|
|
7239
|
+
() => props.autoplay,
|
|
7240
|
+
(v) => {
|
|
7241
|
+
v ? startTimer() : pauseTimer();
|
|
7242
|
+
}
|
|
7243
|
+
);
|
|
7244
|
+
vue.watch(
|
|
7245
|
+
() => props.loop,
|
|
7246
|
+
() => {
|
|
7247
|
+
setActiveItem(activeIndex.value);
|
|
7248
|
+
}
|
|
7249
|
+
);
|
|
7250
|
+
vue.watch(
|
|
7251
|
+
() => props.t,
|
|
7252
|
+
() => {
|
|
7253
|
+
pauseTimer();
|
|
7254
|
+
startTimer();
|
|
7255
|
+
}
|
|
7256
|
+
);
|
|
7257
|
+
vue.onMounted(() => {
|
|
7258
|
+
vue.nextTick(() => {
|
|
7259
|
+
if (wrapper.value) Resize.on(wrapper.value, resetItems);
|
|
7260
|
+
if (props.initialIndex < items.value.length && props.initialIndex >= 0) {
|
|
7261
|
+
activeIndex.value = props.initialIndex;
|
|
7262
|
+
}
|
|
7263
|
+
startTimer();
|
|
7264
|
+
});
|
|
7265
|
+
});
|
|
7266
|
+
vue.onBeforeUnmount(() => {
|
|
7267
|
+
if (wrapper.value) Resize.off(wrapper.value, resetItems);
|
|
7268
|
+
pauseTimer();
|
|
7269
|
+
startTimer();
|
|
7270
|
+
});
|
|
7271
|
+
const add = (item) => {
|
|
7272
|
+
if (!item) return;
|
|
7273
|
+
vue.nextTick(() => {
|
|
7274
|
+
if (content.value) {
|
|
7275
|
+
const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
|
|
7276
|
+
items.value.splice(index, 0, item);
|
|
7277
|
+
return;
|
|
7278
|
+
}
|
|
7279
|
+
items.value.push(item);
|
|
7280
|
+
});
|
|
7281
|
+
};
|
|
7282
|
+
const remove = (item) => {
|
|
7283
|
+
if (!item) return;
|
|
7284
|
+
items.value.splice(items.value.indexOf(item), 1);
|
|
7285
|
+
};
|
|
7286
|
+
vue.provide("vc-carousel", {
|
|
7287
|
+
props,
|
|
7288
|
+
items,
|
|
7289
|
+
offset,
|
|
7290
|
+
allowTransition,
|
|
7291
|
+
setActiveItem,
|
|
7292
|
+
wrapper,
|
|
7293
|
+
content,
|
|
7294
|
+
add,
|
|
7295
|
+
remove
|
|
7296
|
+
});
|
|
7297
|
+
expose({
|
|
7298
|
+
setActiveItem,
|
|
7299
|
+
prev,
|
|
7300
|
+
next
|
|
7301
|
+
});
|
|
7302
|
+
return {
|
|
7303
|
+
carouselId,
|
|
7304
|
+
allowTransition,
|
|
7305
|
+
items,
|
|
7306
|
+
activeIndex,
|
|
7307
|
+
offset,
|
|
7308
|
+
direction,
|
|
7309
|
+
hasLabel,
|
|
7310
|
+
dotsClasses,
|
|
7311
|
+
start,
|
|
7312
|
+
startX,
|
|
7313
|
+
startY,
|
|
7314
|
+
handleStart,
|
|
7315
|
+
handleMove,
|
|
7316
|
+
handleEnd,
|
|
7317
|
+
handleDotClick,
|
|
7318
|
+
prev,
|
|
7319
|
+
next,
|
|
7320
|
+
setActiveItem,
|
|
7321
|
+
pauseTimer,
|
|
7322
|
+
startTimer
|
|
7323
|
+
};
|
|
7324
|
+
};
|
|
7325
|
+
|
|
7326
|
+
const props$1j = {
|
|
7327
|
+
t: {
|
|
7328
|
+
type: Number,
|
|
7329
|
+
default: 3e3
|
|
7330
|
+
},
|
|
7331
|
+
card: Boolean,
|
|
7332
|
+
gutter: {
|
|
7333
|
+
type: Number,
|
|
7334
|
+
default: 0
|
|
7335
|
+
},
|
|
7336
|
+
height: [String, Number],
|
|
7337
|
+
initialIndex: {
|
|
7338
|
+
type: Number,
|
|
7339
|
+
default: 0
|
|
7340
|
+
},
|
|
7341
|
+
trigger: {
|
|
7052
7342
|
type: String,
|
|
7053
|
-
default: "
|
|
7343
|
+
default: "hover"
|
|
7344
|
+
},
|
|
7345
|
+
autoplay: {
|
|
7346
|
+
type: Boolean,
|
|
7347
|
+
default: true
|
|
7348
|
+
},
|
|
7349
|
+
dots: {
|
|
7350
|
+
type: [String, Boolean],
|
|
7351
|
+
default: "bottom"
|
|
7352
|
+
// bottom/outside | false
|
|
7353
|
+
},
|
|
7354
|
+
arrow: {
|
|
7355
|
+
type: [String, Boolean],
|
|
7356
|
+
default: "hover"
|
|
7357
|
+
// hover/always | false
|
|
7358
|
+
},
|
|
7359
|
+
loop: {
|
|
7360
|
+
type: Boolean,
|
|
7361
|
+
default: true
|
|
7362
|
+
},
|
|
7363
|
+
vertical: {
|
|
7364
|
+
type: Boolean,
|
|
7365
|
+
default: false
|
|
7366
|
+
},
|
|
7367
|
+
draggable: {
|
|
7368
|
+
type: Boolean,
|
|
7369
|
+
default: true
|
|
7054
7370
|
}
|
|
7055
7371
|
};
|
|
7056
7372
|
|
|
7057
7373
|
/** @jsxImportSource vue */
|
|
7058
7374
|
|
|
7059
|
-
const COMPONENT_NAME$
|
|
7375
|
+
const COMPONENT_NAME$1$ = 'vc-carousel';
|
|
7060
7376
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
7061
|
-
name: COMPONENT_NAME$
|
|
7377
|
+
name: COMPONENT_NAME$1$,
|
|
7378
|
+
props: props$1j,
|
|
7379
|
+
setup(props, {
|
|
7380
|
+
slots,
|
|
7381
|
+
expose
|
|
7382
|
+
}) {
|
|
7383
|
+
const isHover = vue.ref(false);
|
|
7384
|
+
const wrapper = vue.ref(null);
|
|
7385
|
+
const content = vue.ref(null);
|
|
7386
|
+
const arrowDisplay = vue.computed(() => {
|
|
7387
|
+
return props.arrow && !props.vertical;
|
|
7388
|
+
});
|
|
7389
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
7390
|
+
const itemInStage = (item, index, items) => {
|
|
7391
|
+
const length = items.length;
|
|
7392
|
+
const isInStage = item.exposed.isInStage.value;
|
|
7393
|
+
if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
|
|
7394
|
+
return 'left';
|
|
7395
|
+
} else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
|
|
7396
|
+
return 'right';
|
|
7397
|
+
}
|
|
7398
|
+
return false;
|
|
7399
|
+
};
|
|
7400
|
+
const handleButtonEnter = arrow => {
|
|
7401
|
+
if (props.vertical) return;
|
|
7402
|
+
carousel.items.value.forEach((item, index, items) => {
|
|
7403
|
+
if (arrow === itemInStage(item, index, items)) {
|
|
7404
|
+
item.exposed.isHover.value = true;
|
|
7405
|
+
}
|
|
7406
|
+
});
|
|
7407
|
+
};
|
|
7408
|
+
const handleButtonLeave = () => {
|
|
7409
|
+
if (props.vertical) return;
|
|
7410
|
+
carousel.items.value.forEach(item => {
|
|
7411
|
+
item.exposed.isHover.value = false;
|
|
7412
|
+
});
|
|
7413
|
+
};
|
|
7414
|
+
const handleDotHover = index => {
|
|
7415
|
+
if (props.trigger === 'hover' && index !== carousel.activeIndex.value) {
|
|
7416
|
+
carousel.activeIndex.value = index;
|
|
7417
|
+
}
|
|
7418
|
+
};
|
|
7419
|
+
const handleMouseEnter = () => {
|
|
7420
|
+
isHover.value = true;
|
|
7421
|
+
carousel.pauseTimer();
|
|
7422
|
+
};
|
|
7423
|
+
const handleMouseLeave = () => {
|
|
7424
|
+
isHover.value = false;
|
|
7425
|
+
carousel.startTimer();
|
|
7426
|
+
};
|
|
7427
|
+
const throttledArrowClick = throttle$1(carousel.setActiveItem);
|
|
7428
|
+
const throttledDotHover = throttle$1(handleDotHover);
|
|
7429
|
+
return () => {
|
|
7430
|
+
return vue.createVNode("div", {
|
|
7431
|
+
"ref": wrapper,
|
|
7432
|
+
"class": ['vc-carousel', `is-${carousel.direction.value}`],
|
|
7433
|
+
"onMousedown": vue.withModifiers(carousel.handleStart, ['stop', 'prevent']),
|
|
7434
|
+
"onMousemove": vue.withModifiers(carousel.handleMove, ['stop', 'prevent']),
|
|
7435
|
+
"onMouseup": vue.withModifiers(carousel.handleEnd, ['stop', 'prevent']),
|
|
7436
|
+
"onMouseenter": vue.withModifiers(handleMouseEnter, ['stop']),
|
|
7437
|
+
"onMouseleave": vue.withModifiers(handleMouseLeave, ['stop'])
|
|
7438
|
+
}, [vue.createVNode("div", {
|
|
7439
|
+
"ref": content,
|
|
7440
|
+
"class": "vc-carousel__wrapper",
|
|
7441
|
+
"style": {
|
|
7442
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
7443
|
+
}
|
|
7444
|
+
}, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
7445
|
+
"mode": "left-part"
|
|
7446
|
+
}, {
|
|
7447
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
7448
|
+
"type": "button",
|
|
7449
|
+
"class": "vc-carousel__arrow is-left-arrow",
|
|
7450
|
+
"onMouseenter": () => handleButtonEnter('left'),
|
|
7451
|
+
"onMouseleave": handleButtonLeave,
|
|
7452
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ['stop'])
|
|
7453
|
+
}, [vue.createVNode(Icon, {
|
|
7454
|
+
"type": "left"
|
|
7455
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value > 0)]])]
|
|
7456
|
+
}), arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
7457
|
+
"mode": "right-part"
|
|
7458
|
+
}, {
|
|
7459
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
7460
|
+
"type": "button",
|
|
7461
|
+
"class": "vc-carousel__arrow is-right-arrow",
|
|
7462
|
+
"onMouseenter": () => handleButtonEnter('right'),
|
|
7463
|
+
"onMouseleave": handleButtonLeave,
|
|
7464
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ['stop'])
|
|
7465
|
+
}, [vue.createVNode(Icon, {
|
|
7466
|
+
"type": "right"
|
|
7467
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
|
|
7468
|
+
}), slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
7469
|
+
"class": ['vc-carousel__dots', ...carousel.dotsClasses.value]
|
|
7470
|
+
}, [carousel.items.value.map((item, index) => vue.createVNode("li", {
|
|
7471
|
+
"key": index,
|
|
7472
|
+
"class": ['vc-carousel__dot', `is-${carousel.direction.value}`, {
|
|
7473
|
+
'is-active': index === carousel.activeIndex.value
|
|
7474
|
+
}],
|
|
7475
|
+
"onMouseenter": () => throttledDotHover(index),
|
|
7476
|
+
"onClick": () => carousel.handleDotClick(index)
|
|
7477
|
+
}, [vue.createVNode("button", {
|
|
7478
|
+
"class": "vc-carousel__button"
|
|
7479
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
|
|
7480
|
+
};
|
|
7481
|
+
}
|
|
7482
|
+
});
|
|
7483
|
+
|
|
7484
|
+
const props$1i = {
|
|
7485
|
+
name: String,
|
|
7486
|
+
label: {
|
|
7487
|
+
type: [String, Number],
|
|
7488
|
+
default: ""
|
|
7489
|
+
},
|
|
7490
|
+
// card大小
|
|
7491
|
+
width: {
|
|
7492
|
+
type: [Number, String],
|
|
7493
|
+
default: "70%"
|
|
7494
|
+
},
|
|
7495
|
+
// card之间间距, 或者滑动时候的间距
|
|
7496
|
+
gutter: {
|
|
7497
|
+
type: Number,
|
|
7498
|
+
default: 0
|
|
7499
|
+
},
|
|
7500
|
+
scale: {
|
|
7501
|
+
type: Number,
|
|
7502
|
+
default: 0.83
|
|
7503
|
+
}
|
|
7504
|
+
};
|
|
7505
|
+
|
|
7506
|
+
const TRANSFORM = prefixStyle("transform").camel;
|
|
7507
|
+
const useCarouselItem = (expose) => {
|
|
7508
|
+
const instance = vue.getCurrentInstance();
|
|
7509
|
+
const carousel = vue.inject("vc-carousel", {});
|
|
7510
|
+
const props = instance.props;
|
|
7511
|
+
const translate = vue.ref(0);
|
|
7512
|
+
const currentScale = vue.ref(1);
|
|
7513
|
+
const isHover = vue.ref(false);
|
|
7514
|
+
const isActive = vue.ref(false);
|
|
7515
|
+
const isReady = vue.ref(false);
|
|
7516
|
+
const isInStage = vue.ref(false);
|
|
7517
|
+
const isAnimating = vue.ref(false);
|
|
7518
|
+
const isVertical = vue.computed(() => {
|
|
7519
|
+
return carousel.props.vertical;
|
|
7520
|
+
});
|
|
7521
|
+
const isCard = vue.computed(() => {
|
|
7522
|
+
return carousel.props.card;
|
|
7523
|
+
});
|
|
7524
|
+
const isMove = vue.computed(() => {
|
|
7525
|
+
return carousel.offset.value !== 0;
|
|
7526
|
+
});
|
|
7527
|
+
const itemGutter = vue.computed(() => {
|
|
7528
|
+
return props.gutter || carousel.props.gutter || 0;
|
|
7529
|
+
});
|
|
7530
|
+
const itemStyle = vue.computed(() => {
|
|
7531
|
+
const translateType = isVertical.value ? "translateY" : "translateX";
|
|
7532
|
+
if (carousel.props.card) {
|
|
7533
|
+
return {
|
|
7534
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
7535
|
+
width: props.width
|
|
7536
|
+
};
|
|
7537
|
+
} else {
|
|
7538
|
+
return {
|
|
7539
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
7540
|
+
width: itemGutter.value ? props.width : "100%"
|
|
7541
|
+
};
|
|
7542
|
+
}
|
|
7543
|
+
});
|
|
7544
|
+
vue.onBeforeMount(() => {
|
|
7545
|
+
carousel.add?.(instance);
|
|
7546
|
+
if (!isCard.value && itemGutter.value && carousel.props.loop) {
|
|
7547
|
+
throw new VcError("carousel", "slide模式下loop不能为true");
|
|
7548
|
+
}
|
|
7549
|
+
});
|
|
7550
|
+
vue.onBeforeUnmount(() => {
|
|
7551
|
+
carousel.remove?.(instance);
|
|
7552
|
+
});
|
|
7553
|
+
const processIndex = (index, activeIndex, length) => {
|
|
7554
|
+
if (activeIndex === 0 && index === length - 1) {
|
|
7555
|
+
return -1;
|
|
7556
|
+
} else if (activeIndex === length - 1 && index === 0) {
|
|
7557
|
+
return length;
|
|
7558
|
+
} else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
|
|
7559
|
+
return length + 1;
|
|
7560
|
+
} else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
|
|
7561
|
+
return -2;
|
|
7562
|
+
}
|
|
7563
|
+
return index;
|
|
7564
|
+
};
|
|
7565
|
+
const calcCardTranslate = (index, activeIndex) => {
|
|
7566
|
+
let value;
|
|
7567
|
+
const widthNumber = +props.width / 100;
|
|
7568
|
+
const parentW = carousel.wrapper.value.offsetWidth;
|
|
7569
|
+
if (isInStage.value) {
|
|
7570
|
+
if (index === activeIndex) {
|
|
7571
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
7572
|
+
} else if (index > activeIndex) {
|
|
7573
|
+
value = parentW * (1 + widthNumber * props.scale) / 2 + itemGutter.value;
|
|
7574
|
+
} else {
|
|
7575
|
+
value = -(parentW * ((widthNumber * props.scale - 1) / 2 + widthNumber)) - itemGutter.value;
|
|
7576
|
+
}
|
|
7577
|
+
} else if (index < activeIndex) {
|
|
7578
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
7579
|
+
} else {
|
|
7580
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
7581
|
+
}
|
|
7582
|
+
return value;
|
|
7583
|
+
};
|
|
7584
|
+
const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
|
|
7585
|
+
const { length } = carousel.items.value;
|
|
7586
|
+
const offset = wrapperWidth - (instance.vnode?.el?.offsetWidth || 0);
|
|
7587
|
+
const gutter = itemGutter.value;
|
|
7588
|
+
if (!gutter || isVertical.value) return 0;
|
|
7589
|
+
let slideOffset = 0;
|
|
7590
|
+
if (length === 1) {
|
|
7591
|
+
return offset / 2;
|
|
7592
|
+
}
|
|
7593
|
+
if (activeIndex == 0) {
|
|
7594
|
+
if (index - activeIndex === 0) {
|
|
7595
|
+
slideOffset = gutter;
|
|
7596
|
+
} else if (index - activeIndex === 1) {
|
|
7597
|
+
slideOffset = -offset + gutter * 2;
|
|
7598
|
+
}
|
|
7599
|
+
}
|
|
7600
|
+
if (activeIndex !== 0 && activeIndex != length - 1) {
|
|
7601
|
+
if (index - activeIndex === 0) {
|
|
7602
|
+
slideOffset = offset / 2;
|
|
7603
|
+
} else if (index - activeIndex === 1) {
|
|
7604
|
+
slideOffset = -offset / 2 + gutter;
|
|
7605
|
+
} else if (index - activeIndex === -1) {
|
|
7606
|
+
slideOffset = offset * 3 / 2 - gutter;
|
|
7607
|
+
}
|
|
7608
|
+
}
|
|
7609
|
+
if (activeIndex == length - 1) {
|
|
7610
|
+
if (index - activeIndex === 0) {
|
|
7611
|
+
slideOffset = offset - gutter;
|
|
7612
|
+
} else if (index - activeIndex === -1) {
|
|
7613
|
+
slideOffset = offset * 2 - gutter * 2;
|
|
7614
|
+
}
|
|
7615
|
+
}
|
|
7616
|
+
return slideOffset;
|
|
7617
|
+
};
|
|
7618
|
+
const calcTranslate = (index, activeIndex) => {
|
|
7619
|
+
const distance = carousel.vnode.el[isVertical.value ? "offsetHeight" : "offsetWidth"];
|
|
7620
|
+
const slideOffset = calcSlideOffset(index, activeIndex, distance);
|
|
7621
|
+
return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
|
|
7622
|
+
};
|
|
7623
|
+
const reset = (index, activeIndex, oldIndex) => {
|
|
7624
|
+
const { length } = carousel.items.value;
|
|
7625
|
+
if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
|
|
7626
|
+
isAnimating.value = index === activeIndex || index === oldIndex;
|
|
7627
|
+
if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
|
|
7628
|
+
isAnimating.value = true;
|
|
7629
|
+
}
|
|
7630
|
+
}
|
|
7631
|
+
if (index !== activeIndex && length > 2 && carousel.props.loop) {
|
|
7632
|
+
index = processIndex(index, activeIndex, length);
|
|
7633
|
+
}
|
|
7634
|
+
if (isCard.value) {
|
|
7635
|
+
if (isVertical.value) {
|
|
7636
|
+
throw new VcError("carousel", "卡片模式不支持垂直方向");
|
|
7637
|
+
}
|
|
7638
|
+
isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
7639
|
+
isActive.value = index === activeIndex;
|
|
7640
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
7641
|
+
currentScale.value = isActive.value ? 1 : props.scale;
|
|
7642
|
+
} else {
|
|
7643
|
+
isActive.value = index === activeIndex;
|
|
7644
|
+
translate.value = calcTranslate(index, activeIndex);
|
|
7645
|
+
}
|
|
7646
|
+
isReady.value = true;
|
|
7647
|
+
};
|
|
7648
|
+
const handleItemClick = () => {
|
|
7649
|
+
if (parent && isCard.value) {
|
|
7650
|
+
const index = carousel.items.value.indexOf(instance);
|
|
7651
|
+
carousel.setActiveItem(index);
|
|
7652
|
+
}
|
|
7653
|
+
};
|
|
7654
|
+
expose({
|
|
7655
|
+
reset,
|
|
7656
|
+
isInStage,
|
|
7657
|
+
isHover,
|
|
7658
|
+
isActive
|
|
7659
|
+
});
|
|
7660
|
+
return {
|
|
7661
|
+
translate,
|
|
7662
|
+
currentScale,
|
|
7663
|
+
isHover,
|
|
7664
|
+
isActive,
|
|
7665
|
+
isReady,
|
|
7666
|
+
isInStage,
|
|
7667
|
+
isAnimating,
|
|
7668
|
+
isVertical,
|
|
7669
|
+
isCard,
|
|
7670
|
+
isMove,
|
|
7671
|
+
itemGutter,
|
|
7672
|
+
itemStyle,
|
|
7673
|
+
reset,
|
|
7674
|
+
handleItemClick
|
|
7675
|
+
};
|
|
7676
|
+
};
|
|
7677
|
+
|
|
7678
|
+
/** @jsxImportSource vue */
|
|
7679
|
+
|
|
7680
|
+
const COMPONENT_NAME$1_ = 'vc-carousel-item';
|
|
7681
|
+
const CarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
7682
|
+
name: COMPONENT_NAME$1_,
|
|
7062
7683
|
props: props$1i,
|
|
7684
|
+
setup(_, {
|
|
7685
|
+
slots,
|
|
7686
|
+
expose
|
|
7687
|
+
}) {
|
|
7688
|
+
const it = useCarouselItem(expose);
|
|
7689
|
+
return () => {
|
|
7690
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
7691
|
+
"class": ['vc-carousel-item', {
|
|
7692
|
+
'is-active': it.isActive.value,
|
|
7693
|
+
'is-card': it.isCard.value,
|
|
7694
|
+
'is-in-stage': it.isInStage.value,
|
|
7695
|
+
'is-hover': it.isHover.value,
|
|
7696
|
+
'is-animating': it.isAnimating.value && !it.isMove.value
|
|
7697
|
+
}],
|
|
7698
|
+
"style": it.itemStyle.value,
|
|
7699
|
+
"onClick": it.handleItemClick
|
|
7700
|
+
}, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
|
|
7701
|
+
"class": "vc-carousel-item__mask"
|
|
7702
|
+
}, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
7703
|
+
};
|
|
7704
|
+
}
|
|
7705
|
+
});
|
|
7706
|
+
|
|
7707
|
+
/** @jsxImportSource vue */
|
|
7708
|
+
|
|
7709
|
+
const COMPONENT_NAME$1Z = 'vcm-carousel';
|
|
7710
|
+
const MCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
7711
|
+
name: COMPONENT_NAME$1Z,
|
|
7712
|
+
props: {
|
|
7713
|
+
...props$1j,
|
|
7714
|
+
dots: {
|
|
7715
|
+
type: [String, Boolean],
|
|
7716
|
+
default: false
|
|
7717
|
+
},
|
|
7718
|
+
indicator: {
|
|
7719
|
+
type: Boolean,
|
|
7720
|
+
default: true
|
|
7721
|
+
}
|
|
7722
|
+
},
|
|
7063
7723
|
setup(props, {
|
|
7064
|
-
slots
|
|
7724
|
+
slots,
|
|
7725
|
+
expose
|
|
7065
7726
|
}) {
|
|
7727
|
+
const wrapper = vue.ref(null);
|
|
7728
|
+
const content = vue.ref(null);
|
|
7729
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
7730
|
+
let scrollStatus = 0;
|
|
7731
|
+
const handleTouchStart = e => {
|
|
7732
|
+
carousel.handleStart(e.touches[0]);
|
|
7733
|
+
scrollStatus = 0;
|
|
7734
|
+
};
|
|
7735
|
+
const handleTouchMove = e => {
|
|
7736
|
+
const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
|
|
7737
|
+
const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
|
|
7738
|
+
if (!props.vertical && absX > absY && scrollStatus !== 1) {
|
|
7739
|
+
e.preventDefault();
|
|
7740
|
+
carousel.handleMove(e.touches[0]);
|
|
7741
|
+
scrollStatus = 2;
|
|
7742
|
+
return;
|
|
7743
|
+
}
|
|
7744
|
+
if (props.vertical && absY > absX) {
|
|
7745
|
+
e.preventDefault();
|
|
7746
|
+
carousel.handleMove(e.touches[0]);
|
|
7747
|
+
return;
|
|
7748
|
+
}
|
|
7749
|
+
if (scrollStatus === 0) {
|
|
7750
|
+
scrollStatus = 1;
|
|
7751
|
+
}
|
|
7752
|
+
};
|
|
7753
|
+
|
|
7754
|
+
// e.changedTouches[0]
|
|
7755
|
+
const handleTouchEnd = () => {
|
|
7756
|
+
carousel.handleEnd();
|
|
7757
|
+
scrollStatus = 0;
|
|
7758
|
+
};
|
|
7066
7759
|
return () => {
|
|
7067
7760
|
return vue.createVNode("div", {
|
|
7068
|
-
"
|
|
7069
|
-
|
|
7761
|
+
"ref": wrapper,
|
|
7762
|
+
"class": ['vcm-carousel', `is-${carousel.direction.value}`],
|
|
7763
|
+
"onTouchstart": vue.withModifiers(handleTouchStart, ['stop']),
|
|
7764
|
+
"onTouchmove": vue.withModifiers(handleTouchMove, ['stop']),
|
|
7765
|
+
"onTouchend": vue.withModifiers(handleTouchEnd, ['stop'])
|
|
7766
|
+
}, [vue.createVNode("div", {
|
|
7767
|
+
"ref": content,
|
|
7768
|
+
"style": {
|
|
7769
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
7770
|
+
},
|
|
7771
|
+
"class": "vcm-carousel__wrapper"
|
|
7772
|
+
}, [slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
7773
|
+
"class": ['vcm-carousel__dots', ...carousel.dotsClasses.value]
|
|
7774
|
+
}, [carousel.items.value.map((_, index) => vue.createVNode("li", {
|
|
7775
|
+
"key": index,
|
|
7776
|
+
"class": ['vcm-carousel__dot', 'is-' + carousel.direction.value, {
|
|
7777
|
+
'is-active': index === carousel.activeIndex.value
|
|
7778
|
+
}],
|
|
7779
|
+
"onClick": e => {
|
|
7780
|
+
e.stopPropagation();
|
|
7781
|
+
carousel.handleDotClick(index);
|
|
7782
|
+
}
|
|
7783
|
+
}, [vue.createVNode("button", {
|
|
7784
|
+
"class": "vcm-carousel__button"
|
|
7785
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props.card && props.indicator && vue.createVNode("div", {
|
|
7786
|
+
"class": "vcm-carousel__indicator"
|
|
7787
|
+
}, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
|
|
7070
7788
|
};
|
|
7071
7789
|
}
|
|
7072
7790
|
});
|
|
7073
7791
|
|
|
7074
|
-
|
|
7792
|
+
/** @jsxImportSource vue */
|
|
7793
|
+
|
|
7794
|
+
const COMPONENT_NAME$1Y = 'vcm-carousel-item';
|
|
7795
|
+
const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
7796
|
+
name: COMPONENT_NAME$1Y,
|
|
7797
|
+
props: props$1i,
|
|
7798
|
+
setup(_, {
|
|
7799
|
+
slots,
|
|
7800
|
+
expose
|
|
7801
|
+
}) {
|
|
7802
|
+
const it = useCarouselItem(expose);
|
|
7803
|
+
return () => {
|
|
7804
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
7805
|
+
"style": it.itemStyle.value,
|
|
7806
|
+
"class": {
|
|
7807
|
+
'vcm-carousel-item': true,
|
|
7808
|
+
'is-active': it.isActive.value,
|
|
7809
|
+
'is-card': it.isCard.value,
|
|
7810
|
+
'is-animating': it.isAnimating.value && !it.isMove.value,
|
|
7811
|
+
'is-in-stage': it.isInStage.value
|
|
7812
|
+
},
|
|
7813
|
+
"onClick": it.handleItemClick
|
|
7814
|
+
}, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
|
|
7815
|
+
"class": "vcm-carousel-item__mask"
|
|
7816
|
+
}, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
7817
|
+
};
|
|
7818
|
+
}
|
|
7819
|
+
});
|
|
7075
7820
|
|
|
7076
7821
|
const useAttrs = (options) => {
|
|
7077
7822
|
const attrs = vue.useAttrs();
|
|
@@ -7415,9 +8160,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
7415
8160
|
|
|
7416
8161
|
/** @jsxImportSource vue */
|
|
7417
8162
|
|
|
7418
|
-
const COMPONENT_NAME$
|
|
8163
|
+
const COMPONENT_NAME$1X = 'vc-input';
|
|
7419
8164
|
const Input$1 = /* @__PURE__ */ vue.defineComponent({
|
|
7420
|
-
name: COMPONENT_NAME$
|
|
8165
|
+
name: COMPONENT_NAME$1X,
|
|
7421
8166
|
inheritAttrs: false,
|
|
7422
8167
|
props: {
|
|
7423
8168
|
...props$1h,
|
|
@@ -7752,9 +8497,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
7752
8497
|
|
|
7753
8498
|
/** @jsxImportSource vue */
|
|
7754
8499
|
|
|
7755
|
-
const COMPONENT_NAME$
|
|
8500
|
+
const COMPONENT_NAME$1W = 'vc-input-number';
|
|
7756
8501
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
7757
|
-
name: COMPONENT_NAME$
|
|
8502
|
+
name: COMPONENT_NAME$1W,
|
|
7758
8503
|
props: props$1g,
|
|
7759
8504
|
inheritAttrs: false,
|
|
7760
8505
|
setup(props, {
|
|
@@ -7818,9 +8563,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
7818
8563
|
|
|
7819
8564
|
/** @jsxImportSource vue */
|
|
7820
8565
|
|
|
7821
|
-
const COMPONENT_NAME$
|
|
8566
|
+
const COMPONENT_NAME$1V = 'vc-input-search';
|
|
7822
8567
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
7823
|
-
name: COMPONENT_NAME$
|
|
8568
|
+
name: COMPONENT_NAME$1V,
|
|
7824
8569
|
props: props$1f,
|
|
7825
8570
|
inheritAttrs: false,
|
|
7826
8571
|
setup(props, {
|
|
@@ -7953,69 +8698,6 @@ var VcComponents = (function (exports, vue) {
|
|
|
7953
8698
|
...pick(props$1e, wrapperKeys)
|
|
7954
8699
|
};
|
|
7955
8700
|
|
|
7956
|
-
class Resize {
|
|
7957
|
-
el;
|
|
7958
|
-
static of(el) {
|
|
7959
|
-
return new Resize(el);
|
|
7960
|
-
}
|
|
7961
|
-
/**
|
|
7962
|
-
* Resize.of(el, fn);
|
|
7963
|
-
* @param el ~
|
|
7964
|
-
* @param fn ~
|
|
7965
|
-
* @returns off
|
|
7966
|
-
*/
|
|
7967
|
-
static on(el, fn) {
|
|
7968
|
-
return new Resize(el).on(fn);
|
|
7969
|
-
}
|
|
7970
|
-
/**
|
|
7971
|
-
* 要实现Resize.off(el),el必须侵入式修改挂上__rz__
|
|
7972
|
-
* @param el ~
|
|
7973
|
-
* @param fn ~
|
|
7974
|
-
* @returns ~
|
|
7975
|
-
*/
|
|
7976
|
-
static off(el, fn) {
|
|
7977
|
-
return new Resize(el).off(fn);
|
|
7978
|
-
}
|
|
7979
|
-
listeners = [];
|
|
7980
|
-
ro = null;
|
|
7981
|
-
constructor(el) {
|
|
7982
|
-
this.el = el;
|
|
7983
|
-
let rz = el.__rz__;
|
|
7984
|
-
if (rz && rz instanceof Resize) {
|
|
7985
|
-
this.listeners = rz.listeners;
|
|
7986
|
-
this.ro = rz.ro;
|
|
7987
|
-
}
|
|
7988
|
-
}
|
|
7989
|
-
handleResize = (entries) => {
|
|
7990
|
-
/* istanbul ignore else -- @preserve */
|
|
7991
|
-
if (entries.some((i) => i.target === this.el)) {
|
|
7992
|
-
this.listeners?.forEach((fn) => fn());
|
|
7993
|
-
}
|
|
7994
|
-
};
|
|
7995
|
-
on(fn) {
|
|
7996
|
-
if (typeof ResizeObserver === "undefined")
|
|
7997
|
-
return () => {
|
|
7998
|
-
};
|
|
7999
|
-
if (!this.listeners.length) {
|
|
8000
|
-
this.ro = this.ro || new ResizeObserver(this.handleResize);
|
|
8001
|
-
this.ro.observe(this.el);
|
|
8002
|
-
this.el.__rz__ = this;
|
|
8003
|
-
}
|
|
8004
|
-
this.listeners.push(fn);
|
|
8005
|
-
return () => this.off(fn);
|
|
8006
|
-
}
|
|
8007
|
-
off(fn) {
|
|
8008
|
-
if (fn) {
|
|
8009
|
-
this.listeners.splice(this.listeners.indexOf(fn), 1);
|
|
8010
|
-
} else {
|
|
8011
|
-
this.listeners = [];
|
|
8012
|
-
}
|
|
8013
|
-
if (!this.listeners.length && this.ro) {
|
|
8014
|
-
this.ro.disconnect();
|
|
8015
|
-
}
|
|
8016
|
-
}
|
|
8017
|
-
}
|
|
8018
|
-
|
|
8019
8701
|
const EXTRA_DISTANCE = 4;
|
|
8020
8702
|
const HALF_ARROW = 12.73 / 2;
|
|
8021
8703
|
const usePos = () => {
|
|
@@ -8276,9 +8958,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
8276
8958
|
}
|
|
8277
8959
|
};
|
|
8278
8960
|
|
|
8279
|
-
const COMPONENT_NAME$
|
|
8961
|
+
const COMPONENT_NAME$1U = "vc-customer";
|
|
8280
8962
|
const Customer = vue.defineComponent({
|
|
8281
|
-
name: COMPONENT_NAME$
|
|
8963
|
+
name: COMPONENT_NAME$1U,
|
|
8282
8964
|
props: props$1c,
|
|
8283
8965
|
setup(props, context) {
|
|
8284
8966
|
return () => vue.h(() => {
|
|
@@ -8413,7 +9095,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
8413
9095
|
}
|
|
8414
9096
|
}
|
|
8415
9097
|
|
|
8416
|
-
const COMPONENT_NAME$
|
|
9098
|
+
const COMPONENT_NAME$1T = "vc-portal";
|
|
8417
9099
|
class Portal {
|
|
8418
9100
|
/**
|
|
8419
9101
|
* 清理Portals类型组件
|
|
@@ -8463,7 +9145,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
8463
9145
|
this.wrapper = wrapper;
|
|
8464
9146
|
this.globalOptions = {
|
|
8465
9147
|
...options,
|
|
8466
|
-
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$
|
|
9148
|
+
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1T)
|
|
8467
9149
|
};
|
|
8468
9150
|
}
|
|
8469
9151
|
popup(propsData, options) {
|
|
@@ -8561,7 +9243,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
8561
9243
|
...rest
|
|
8562
9244
|
} = options;
|
|
8563
9245
|
let useAllNodes = fragment;
|
|
8564
|
-
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$
|
|
9246
|
+
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1T)}` : name$;
|
|
8565
9247
|
const container = document.createElement(tag);
|
|
8566
9248
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
8567
9249
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -8595,7 +9277,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
8595
9277
|
} else {
|
|
8596
9278
|
const wrapper = this.wrapper;
|
|
8597
9279
|
const app = vue.createApp({
|
|
8598
|
-
name: COMPONENT_NAME$
|
|
9280
|
+
name: COMPONENT_NAME$1T,
|
|
8599
9281
|
parent,
|
|
8600
9282
|
setup() {
|
|
8601
9283
|
if (alive) {
|
|
@@ -8706,13 +9388,13 @@ var VcComponents = (function (exports, vue) {
|
|
|
8706
9388
|
}
|
|
8707
9389
|
};
|
|
8708
9390
|
|
|
8709
|
-
const COMPONENT_NAME$
|
|
9391
|
+
const COMPONENT_NAME$1S = 'vc-portal-view';
|
|
8710
9392
|
|
|
8711
9393
|
/**
|
|
8712
9394
|
* 写法不同,但与vue@2.x 保持一致
|
|
8713
9395
|
*/
|
|
8714
9396
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
8715
|
-
name: COMPONENT_NAME$
|
|
9397
|
+
name: COMPONENT_NAME$1S,
|
|
8716
9398
|
props: props$1b,
|
|
8717
9399
|
setup(props, {
|
|
8718
9400
|
slots
|
|
@@ -8732,9 +9414,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
8732
9414
|
|
|
8733
9415
|
/** @jsxImportSource vue */
|
|
8734
9416
|
|
|
8735
|
-
const COMPONENT_NAME$
|
|
9417
|
+
const COMPONENT_NAME$1R = 'vc-popover-wrapper';
|
|
8736
9418
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
8737
|
-
name: COMPONENT_NAME$
|
|
9419
|
+
name: COMPONENT_NAME$1R,
|
|
8738
9420
|
props: props$1e,
|
|
8739
9421
|
emits: ['portal-fulfilled', 'close'],
|
|
8740
9422
|
setup(props, {
|
|
@@ -8992,9 +9674,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
8992
9674
|
|
|
8993
9675
|
/** @jsxImportSource vue */
|
|
8994
9676
|
|
|
8995
|
-
const COMPONENT_NAME$
|
|
9677
|
+
const COMPONENT_NAME$1Q = 'vc-popover';
|
|
8996
9678
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
8997
|
-
name: COMPONENT_NAME$
|
|
9679
|
+
name: COMPONENT_NAME$1Q,
|
|
8998
9680
|
props: props$1d,
|
|
8999
9681
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
9000
9682
|
setup(props, {
|
|
@@ -9138,9 +9820,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
9138
9820
|
|
|
9139
9821
|
/** @jsxImportSource vue */
|
|
9140
9822
|
|
|
9141
|
-
const COMPONENT_NAME$
|
|
9823
|
+
const COMPONENT_NAME$1P = 'vc-cascader-column';
|
|
9142
9824
|
const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
|
|
9143
|
-
name: COMPONENT_NAME$
|
|
9825
|
+
name: COMPONENT_NAME$1P,
|
|
9144
9826
|
emits: ['click', 'change'],
|
|
9145
9827
|
props: {
|
|
9146
9828
|
data: {
|
|
@@ -9348,9 +10030,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
9348
10030
|
|
|
9349
10031
|
/** @jsxImportSource vue */
|
|
9350
10032
|
|
|
9351
|
-
const COMPONENT_NAME$
|
|
10033
|
+
const COMPONENT_NAME$1O = 'vc-cascader';
|
|
9352
10034
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
9353
|
-
name: COMPONENT_NAME$
|
|
10035
|
+
name: COMPONENT_NAME$1O,
|
|
9354
10036
|
inheritAttrs: false,
|
|
9355
10037
|
props: props$19,
|
|
9356
10038
|
emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
|
|
@@ -9702,9 +10384,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
9702
10384
|
|
|
9703
10385
|
/** @jsxImportSource vue */
|
|
9704
10386
|
|
|
9705
|
-
const COMPONENT_NAME$
|
|
10387
|
+
const COMPONENT_NAME$1N = 'vc-chart';
|
|
9706
10388
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
9707
|
-
name: COMPONENT_NAME$
|
|
10389
|
+
name: COMPONENT_NAME$1N,
|
|
9708
10390
|
props: props$18,
|
|
9709
10391
|
emits: [...EVENTS$1, 'ready'],
|
|
9710
10392
|
setup(props, {
|
|
@@ -9943,9 +10625,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
9943
10625
|
|
|
9944
10626
|
/** @jsxImportSource vue */
|
|
9945
10627
|
|
|
9946
|
-
const COMPONENT_NAME$
|
|
10628
|
+
const COMPONENT_NAME$1M = 'vc-checkbox';
|
|
9947
10629
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
9948
|
-
name: COMPONENT_NAME$
|
|
10630
|
+
name: COMPONENT_NAME$1M,
|
|
9949
10631
|
props: props$17,
|
|
9950
10632
|
emits: ['update:modelValue', 'change'],
|
|
9951
10633
|
setup(props, {
|
|
@@ -10032,9 +10714,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10032
10714
|
|
|
10033
10715
|
/** @jsxImportSource vue */
|
|
10034
10716
|
|
|
10035
|
-
const COMPONENT_NAME$
|
|
10717
|
+
const COMPONENT_NAME$1L = 'vc-checkbox-group';
|
|
10036
10718
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
10037
|
-
name: COMPONENT_NAME$
|
|
10719
|
+
name: COMPONENT_NAME$1L,
|
|
10038
10720
|
props: props$16,
|
|
10039
10721
|
emits: ['update:modelValue', 'change'],
|
|
10040
10722
|
setup(props, {
|
|
@@ -10052,9 +10734,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10052
10734
|
|
|
10053
10735
|
/** @jsxImportSource vue */
|
|
10054
10736
|
|
|
10055
|
-
const COMPONENT_NAME$
|
|
10737
|
+
const COMPONENT_NAME$1K = 'vcm-checkbox';
|
|
10056
10738
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
10057
|
-
name: COMPONENT_NAME$
|
|
10739
|
+
name: COMPONENT_NAME$1K,
|
|
10058
10740
|
props: props$17,
|
|
10059
10741
|
emits: ['update:modelValue', 'change'],
|
|
10060
10742
|
setup(props, {
|
|
@@ -10094,9 +10776,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10094
10776
|
|
|
10095
10777
|
/** @jsxImportSource vue */
|
|
10096
10778
|
|
|
10097
|
-
const COMPONENT_NAME$
|
|
10779
|
+
const COMPONENT_NAME$1J = 'vcm-checkbox-group';
|
|
10098
10780
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
10099
|
-
name: COMPONENT_NAME$
|
|
10781
|
+
name: COMPONENT_NAME$1J,
|
|
10100
10782
|
props: props$16,
|
|
10101
10783
|
emits: ['update:modelValue', 'change'],
|
|
10102
10784
|
setup(props, {
|
|
@@ -10150,9 +10832,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10150
10832
|
|
|
10151
10833
|
/** @jsxImportSource vue */
|
|
10152
10834
|
|
|
10153
|
-
const COMPONENT_NAME$
|
|
10835
|
+
const COMPONENT_NAME$1I = 'vc-message';
|
|
10154
10836
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
10155
|
-
name: COMPONENT_NAME$
|
|
10837
|
+
name: COMPONENT_NAME$1I,
|
|
10156
10838
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
10157
10839
|
props: props$15,
|
|
10158
10840
|
setup(props, {
|
|
@@ -10401,9 +11083,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10401
11083
|
return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
10402
11084
|
};
|
|
10403
11085
|
|
|
10404
|
-
const COMPONENT_NAME$
|
|
11086
|
+
const COMPONENT_NAME$1H = "vc-clipboard";
|
|
10405
11087
|
const Clipboard$2 = vue.defineComponent({
|
|
10406
|
-
name: COMPONENT_NAME$
|
|
11088
|
+
name: COMPONENT_NAME$1H,
|
|
10407
11089
|
props: props$14,
|
|
10408
11090
|
setup() {
|
|
10409
11091
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -10443,9 +11125,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10443
11125
|
|
|
10444
11126
|
/** @jsxImportSource vue */
|
|
10445
11127
|
|
|
10446
|
-
const COMPONENT_NAME$
|
|
11128
|
+
const COMPONENT_NAME$1G = 'vcm-toast';
|
|
10447
11129
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
10448
|
-
name: COMPONENT_NAME$
|
|
11130
|
+
name: COMPONENT_NAME$1G,
|
|
10449
11131
|
emits: ['close', 'portal-fulfilled'],
|
|
10450
11132
|
props: props$13,
|
|
10451
11133
|
setup(props, {
|
|
@@ -10547,9 +11229,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10547
11229
|
const error$3 = create$6({ mode: "error" });
|
|
10548
11230
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$3 });
|
|
10549
11231
|
|
|
10550
|
-
const COMPONENT_NAME$
|
|
11232
|
+
const COMPONENT_NAME$1F = "vcm-clipboard";
|
|
10551
11233
|
const MClipboard$1 = vue.defineComponent({
|
|
10552
|
-
name: COMPONENT_NAME$
|
|
11234
|
+
name: COMPONENT_NAME$1F,
|
|
10553
11235
|
props: props$14,
|
|
10554
11236
|
setup() {
|
|
10555
11237
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -10581,9 +11263,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10581
11263
|
}
|
|
10582
11264
|
};
|
|
10583
11265
|
|
|
10584
|
-
const COMPONENT_NAME$
|
|
11266
|
+
const COMPONENT_NAME$1E = "vc-collapse";
|
|
10585
11267
|
const Collapse = vue.defineComponent({
|
|
10586
|
-
name: COMPONENT_NAME$
|
|
11268
|
+
name: COMPONENT_NAME$1E,
|
|
10587
11269
|
props: props$12,
|
|
10588
11270
|
emits: ["update:moodelValue", "change"],
|
|
10589
11271
|
setup(props, { slots, emit }) {
|
|
@@ -10700,9 +11382,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10700
11382
|
function _isSlot$3(s) {
|
|
10701
11383
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
10702
11384
|
}
|
|
10703
|
-
const COMPONENT_NAME$
|
|
11385
|
+
const COMPONENT_NAME$1D = 'vc-expand';
|
|
10704
11386
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10705
|
-
name: COMPONENT_NAME$
|
|
11387
|
+
name: COMPONENT_NAME$1D,
|
|
10706
11388
|
props: props$10,
|
|
10707
11389
|
setup(props, {
|
|
10708
11390
|
slots
|
|
@@ -10732,9 +11414,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10732
11414
|
|
|
10733
11415
|
/** @jsxImportSource vue */
|
|
10734
11416
|
|
|
10735
|
-
const COMPONENT_NAME$
|
|
11417
|
+
const COMPONENT_NAME$1C = 'vc-collapse-item';
|
|
10736
11418
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
10737
|
-
name: COMPONENT_NAME$
|
|
11419
|
+
name: COMPONENT_NAME$1C,
|
|
10738
11420
|
props: props$11,
|
|
10739
11421
|
setup(props, {
|
|
10740
11422
|
slots,
|
|
@@ -10809,9 +11491,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10809
11491
|
|
|
10810
11492
|
/** @jsxImportSource vue */
|
|
10811
11493
|
|
|
10812
|
-
const COMPONENT_NAME$
|
|
11494
|
+
const COMPONENT_NAME$1B = 'vc-color-picker';
|
|
10813
11495
|
const ColorPicker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10814
|
-
name: COMPONENT_NAME$
|
|
11496
|
+
name: COMPONENT_NAME$1B,
|
|
10815
11497
|
props: props$$,
|
|
10816
11498
|
setup(props, {
|
|
10817
11499
|
slots
|
|
@@ -10874,9 +11556,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10874
11556
|
function _isSlot$2(s) {
|
|
10875
11557
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
10876
11558
|
}
|
|
10877
|
-
const COMPONENT_NAME$
|
|
11559
|
+
const COMPONENT_NAME$1A = 'vc-countdown';
|
|
10878
11560
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
10879
|
-
name: COMPONENT_NAME$
|
|
11561
|
+
name: COMPONENT_NAME$1A,
|
|
10880
11562
|
props: props$_,
|
|
10881
11563
|
emits: ['change', 'complete', 'error'],
|
|
10882
11564
|
setup(props, {
|
|
@@ -10888,6 +11570,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
10888
11570
|
const minute = vue.ref('');
|
|
10889
11571
|
const second = vue.ref('');
|
|
10890
11572
|
const millisecond = vue.ref('');
|
|
11573
|
+
const isComplete = vue.ref(false);
|
|
10891
11574
|
const showResult = vue.computed(() => {
|
|
10892
11575
|
return !props.render && !slots.default;
|
|
10893
11576
|
});
|
|
@@ -10960,15 +11643,18 @@ var VcComponents = (function (exports, vue) {
|
|
|
10960
11643
|
|
|
10961
11644
|
if (timestamp <= 0) {
|
|
10962
11645
|
stop();
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
11646
|
+
if (!isComplete.value) {
|
|
11647
|
+
isComplete.value = true;
|
|
11648
|
+
emit('change', {
|
|
11649
|
+
timestamp: 0,
|
|
11650
|
+
day: '00',
|
|
11651
|
+
hour: '00',
|
|
11652
|
+
minute: '00',
|
|
11653
|
+
second: '00',
|
|
11654
|
+
millisecond: '00'
|
|
11655
|
+
});
|
|
11656
|
+
emit('complete');
|
|
11657
|
+
}
|
|
10972
11658
|
} else {
|
|
10973
11659
|
emit('change', {
|
|
10974
11660
|
timestamp,
|
|
@@ -10983,6 +11669,8 @@ var VcComponents = (function (exports, vue) {
|
|
|
10983
11669
|
const start = () => {
|
|
10984
11670
|
if (targetTimestamp.value) {
|
|
10985
11671
|
timer && clearInterval(timer);
|
|
11672
|
+
isComplete.value = false;
|
|
11673
|
+
run(); // 立即执行一次,界面马上展示当前数值
|
|
10986
11674
|
timer = setInterval(run, T.value);
|
|
10987
11675
|
}
|
|
10988
11676
|
};
|
|
@@ -11143,9 +11831,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
11143
11831
|
function _isSlot$1(s) {
|
|
11144
11832
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
11145
11833
|
}
|
|
11146
|
-
const COMPONENT_NAME$
|
|
11834
|
+
const COMPONENT_NAME$1z = 'vc-counter';
|
|
11147
11835
|
const Counter = /* @__PURE__ */ vue.defineComponent({
|
|
11148
|
-
name: COMPONENT_NAME$
|
|
11836
|
+
name: COMPONENT_NAME$1z,
|
|
11149
11837
|
props: props$Z,
|
|
11150
11838
|
emits: ['begin', 'complete', 'change'],
|
|
11151
11839
|
setup(props, {
|
|
@@ -12408,9 +13096,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
12408
13096
|
}
|
|
12409
13097
|
return view;
|
|
12410
13098
|
};
|
|
12411
|
-
const COMPONENT_NAME$
|
|
13099
|
+
const COMPONENT_NAME$1y = 'vc-date-confirm';
|
|
12412
13100
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
12413
|
-
name: COMPONENT_NAME$
|
|
13101
|
+
name: COMPONENT_NAME$1y,
|
|
12414
13102
|
props: {
|
|
12415
13103
|
showTime: {
|
|
12416
13104
|
type: Boolean,
|
|
@@ -12474,9 +13162,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
12474
13162
|
|
|
12475
13163
|
/** @jsxImportSource vue */
|
|
12476
13164
|
|
|
12477
|
-
const COMPONENT_NAME$
|
|
13165
|
+
const COMPONENT_NAME$1x = 'vc-date-header';
|
|
12478
13166
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
12479
|
-
name: COMPONENT_NAME$
|
|
13167
|
+
name: COMPONENT_NAME$1x,
|
|
12480
13168
|
props: {
|
|
12481
13169
|
panelDate: Date,
|
|
12482
13170
|
showNext: {
|
|
@@ -12560,9 +13248,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
12560
13248
|
|
|
12561
13249
|
/** @jsxImportSource vue */
|
|
12562
13250
|
|
|
12563
|
-
const COMPONENT_NAME$
|
|
13251
|
+
const COMPONENT_NAME$1w = 'vc-date-table';
|
|
12564
13252
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
12565
|
-
name: COMPONENT_NAME$
|
|
13253
|
+
name: COMPONENT_NAME$1w,
|
|
12566
13254
|
props: {
|
|
12567
13255
|
value: Array,
|
|
12568
13256
|
firstDayOfWeek: {
|
|
@@ -12771,9 +13459,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
12771
13459
|
|
|
12772
13460
|
/** @jsxImportSource vue */
|
|
12773
13461
|
|
|
12774
|
-
const COMPONENT_NAME$
|
|
13462
|
+
const COMPONENT_NAME$1v = 'vc-month-table';
|
|
12775
13463
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
12776
|
-
name: COMPONENT_NAME$
|
|
13464
|
+
name: COMPONENT_NAME$1v,
|
|
12777
13465
|
props: {
|
|
12778
13466
|
value: Array,
|
|
12779
13467
|
panelDate: Date,
|
|
@@ -12905,7 +13593,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
12905
13593
|
|
|
12906
13594
|
/** @jsxImportSource vue */
|
|
12907
13595
|
|
|
12908
|
-
const COMPONENT_NAME$
|
|
13596
|
+
const COMPONENT_NAME$1u = 'vc-quarter-table';
|
|
12909
13597
|
|
|
12910
13598
|
/**
|
|
12911
13599
|
* 获取季度对应的月份范围
|
|
@@ -12939,7 +13627,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
12939
13627
|
}
|
|
12940
13628
|
};
|
|
12941
13629
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
12942
|
-
name: COMPONENT_NAME$
|
|
13630
|
+
name: COMPONENT_NAME$1u,
|
|
12943
13631
|
props: {
|
|
12944
13632
|
value: Array,
|
|
12945
13633
|
panelDate: Date,
|
|
@@ -13062,9 +13750,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13062
13750
|
|
|
13063
13751
|
/** @jsxImportSource vue */
|
|
13064
13752
|
|
|
13065
|
-
const COMPONENT_NAME$
|
|
13753
|
+
const COMPONENT_NAME$1t = 'vc-shortcuts-select';
|
|
13066
13754
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
13067
|
-
name: COMPONENT_NAME$
|
|
13755
|
+
name: COMPONENT_NAME$1t,
|
|
13068
13756
|
props: {
|
|
13069
13757
|
panelDate: Date,
|
|
13070
13758
|
config: Array,
|
|
@@ -13104,9 +13792,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13104
13792
|
|
|
13105
13793
|
/** @jsxImportSource vue */
|
|
13106
13794
|
|
|
13107
|
-
const COMPONENT_NAME$
|
|
13795
|
+
const COMPONENT_NAME$1s = 'vc-time-select';
|
|
13108
13796
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
13109
|
-
name: COMPONENT_NAME$
|
|
13797
|
+
name: COMPONENT_NAME$1s,
|
|
13110
13798
|
props: {
|
|
13111
13799
|
hours: {
|
|
13112
13800
|
type: [Number, String],
|
|
@@ -13386,9 +14074,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13386
14074
|
|
|
13387
14075
|
/** @jsxImportSource vue */
|
|
13388
14076
|
|
|
13389
|
-
const COMPONENT_NAME$
|
|
14077
|
+
const COMPONENT_NAME$1r = 'vc-year-table';
|
|
13390
14078
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
13391
|
-
name: COMPONENT_NAME$
|
|
14079
|
+
name: COMPONENT_NAME$1r,
|
|
13392
14080
|
props: {
|
|
13393
14081
|
value: Array,
|
|
13394
14082
|
panelDate: Date,
|
|
@@ -13511,9 +14199,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13511
14199
|
}
|
|
13512
14200
|
return true;
|
|
13513
14201
|
};
|
|
13514
|
-
const COMPONENT_NAME$
|
|
14202
|
+
const COMPONENT_NAME$1q = 'vc-date-range-panel';
|
|
13515
14203
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
13516
|
-
name: COMPONENT_NAME$
|
|
14204
|
+
name: COMPONENT_NAME$1q,
|
|
13517
14205
|
props: {
|
|
13518
14206
|
...props$W,
|
|
13519
14207
|
confirm: {
|
|
@@ -13892,9 +14580,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13892
14580
|
|
|
13893
14581
|
/** @jsxImportSource vue */
|
|
13894
14582
|
|
|
13895
|
-
const COMPONENT_NAME$
|
|
14583
|
+
const COMPONENT_NAME$1p = 'vc-date-panel';
|
|
13896
14584
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
13897
|
-
name: COMPONENT_NAME$
|
|
14585
|
+
name: COMPONENT_NAME$1p,
|
|
13898
14586
|
props: {
|
|
13899
14587
|
...props$W,
|
|
13900
14588
|
type: String,
|
|
@@ -14102,9 +14790,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14102
14790
|
const endYear = value[1].getFullYear();
|
|
14103
14791
|
return startYear === endYear;
|
|
14104
14792
|
};
|
|
14105
|
-
const COMPONENT_NAME$
|
|
14793
|
+
const COMPONENT_NAME$1o = 'vc-monthrange-panel';
|
|
14106
14794
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14107
|
-
name: COMPONENT_NAME$
|
|
14795
|
+
name: COMPONENT_NAME$1o,
|
|
14108
14796
|
props: {
|
|
14109
14797
|
...props$W,
|
|
14110
14798
|
confirm: {
|
|
@@ -14279,9 +14967,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14279
14967
|
const endYear = value[1].getFullYear();
|
|
14280
14968
|
return startYear === endYear;
|
|
14281
14969
|
};
|
|
14282
|
-
const COMPONENT_NAME$
|
|
14970
|
+
const COMPONENT_NAME$1n = 'vc-quarterrange-panel';
|
|
14283
14971
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14284
|
-
name: COMPONENT_NAME$
|
|
14972
|
+
name: COMPONENT_NAME$1n,
|
|
14285
14973
|
props: {
|
|
14286
14974
|
...props$W,
|
|
14287
14975
|
confirm: {
|
|
@@ -14520,9 +15208,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14520
15208
|
seconds
|
|
14521
15209
|
};
|
|
14522
15210
|
};
|
|
14523
|
-
const COMPONENT_NAME$
|
|
15211
|
+
const COMPONENT_NAME$1m = 'vc-timerange-panel';
|
|
14524
15212
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14525
|
-
name: COMPONENT_NAME$
|
|
15213
|
+
name: COMPONENT_NAME$1m,
|
|
14526
15214
|
props: props$V,
|
|
14527
15215
|
emits: ['pick', 'clear', 'ok'],
|
|
14528
15216
|
setup(props, {
|
|
@@ -14623,9 +15311,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14623
15311
|
|
|
14624
15312
|
/** @jsxImportSource vue */
|
|
14625
15313
|
|
|
14626
|
-
const COMPONENT_NAME$
|
|
15314
|
+
const COMPONENT_NAME$1l = 'vc-time-panel';
|
|
14627
15315
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14628
|
-
name: COMPONENT_NAME$
|
|
15316
|
+
name: COMPONENT_NAME$1l,
|
|
14629
15317
|
props: props$V,
|
|
14630
15318
|
emits: ['pick', 'clear', 'ok'],
|
|
14631
15319
|
setup(props, {
|
|
@@ -14681,7 +15369,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
14681
15369
|
|
|
14682
15370
|
/** @jsxImportSource vue */
|
|
14683
15371
|
|
|
14684
|
-
const COMPONENT_NAME$
|
|
15372
|
+
const COMPONENT_NAME$1k = 'vc-date-picker';
|
|
14685
15373
|
const getPanel$1 = type => {
|
|
14686
15374
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
14687
15375
|
return DateRangePanel;
|
|
@@ -14692,7 +15380,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
14692
15380
|
}
|
|
14693
15381
|
return DatePanel;
|
|
14694
15382
|
};
|
|
14695
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
15383
|
+
const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
|
|
14696
15384
|
const props = vue.getCurrentInstance().props;
|
|
14697
15385
|
const icon = vue.ref('date');
|
|
14698
15386
|
const panel = vue.shallowRef({});
|
|
@@ -14733,9 +15421,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14733
15421
|
|
|
14734
15422
|
/** @jsxImportSource vue */
|
|
14735
15423
|
|
|
14736
|
-
const COMPONENT_NAME$
|
|
15424
|
+
const COMPONENT_NAME$1j = 'vc-divider';
|
|
14737
15425
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
14738
|
-
name: COMPONENT_NAME$
|
|
15426
|
+
name: COMPONENT_NAME$1j,
|
|
14739
15427
|
props: props$U,
|
|
14740
15428
|
setup(props, {
|
|
14741
15429
|
slots
|
|
@@ -14871,7 +15559,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
14871
15559
|
|
|
14872
15560
|
/** @jsxImportSource vue */
|
|
14873
15561
|
|
|
14874
|
-
const COMPONENT_NAME$
|
|
15562
|
+
const COMPONENT_NAME$1i = 'vc-scroller-track';
|
|
14875
15563
|
const BAR_MAP = {
|
|
14876
15564
|
vertical: {
|
|
14877
15565
|
scroll: 'scrollTop',
|
|
@@ -14891,7 +15579,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
14891
15579
|
}
|
|
14892
15580
|
};
|
|
14893
15581
|
const Track$1 = /* @__PURE__ */ vue.defineComponent({
|
|
14894
|
-
name: COMPONENT_NAME$
|
|
15582
|
+
name: COMPONENT_NAME$1i,
|
|
14895
15583
|
props: props$T,
|
|
14896
15584
|
emits: ['change'],
|
|
14897
15585
|
inheritAttrs: false,
|
|
@@ -15081,9 +15769,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
15081
15769
|
|
|
15082
15770
|
/** @jsxImportSource vue */
|
|
15083
15771
|
|
|
15084
|
-
const COMPONENT_NAME$
|
|
15772
|
+
const COMPONENT_NAME$1h = 'vc-scroller-bar';
|
|
15085
15773
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
15086
|
-
name: COMPONENT_NAME$
|
|
15774
|
+
name: COMPONENT_NAME$1h,
|
|
15087
15775
|
props: props$S,
|
|
15088
15776
|
emits: ['change'],
|
|
15089
15777
|
setup(props, {
|
|
@@ -15318,7 +16006,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
15318
16006
|
|
|
15319
16007
|
/** @jsxImportSource vue */
|
|
15320
16008
|
|
|
15321
|
-
const COMPONENT_NAME$
|
|
16009
|
+
const COMPONENT_NAME$1g = 'vc-scroller';
|
|
15322
16010
|
|
|
15323
16011
|
/**
|
|
15324
16012
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -15329,7 +16017,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
15329
16017
|
* 2. 增加了一层嵌套
|
|
15330
16018
|
*/
|
|
15331
16019
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
15332
|
-
name: COMPONENT_NAME$
|
|
16020
|
+
name: COMPONENT_NAME$1g,
|
|
15333
16021
|
props: props$R,
|
|
15334
16022
|
emits: ['scroll'],
|
|
15335
16023
|
setup(props, {
|
|
@@ -16276,7 +16964,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
16276
16964
|
|
|
16277
16965
|
/** @jsxImportSource vue */
|
|
16278
16966
|
|
|
16279
|
-
const COMPONENT_NAME$
|
|
16967
|
+
const COMPONENT_NAME$1f = 'vc-scroller-wheel';
|
|
16280
16968
|
|
|
16281
16969
|
/**
|
|
16282
16970
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -16298,7 +16986,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
16298
16986
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
16299
16987
|
*/
|
|
16300
16988
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
16301
|
-
name: COMPONENT_NAME$
|
|
16989
|
+
name: COMPONENT_NAME$1f,
|
|
16302
16990
|
props: Object.assign({}, props$R, {
|
|
16303
16991
|
stopPropagation: {
|
|
16304
16992
|
type: Boolean,
|
|
@@ -16487,9 +17175,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
16487
17175
|
|
|
16488
17176
|
/** @jsxImportSource vue */
|
|
16489
17177
|
|
|
16490
|
-
const COMPONENT_NAME$
|
|
17178
|
+
const COMPONENT_NAME$1e = 'vc-drawer';
|
|
16491
17179
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
16492
|
-
name: COMPONENT_NAME$
|
|
17180
|
+
name: COMPONENT_NAME$1e,
|
|
16493
17181
|
props: props$Q,
|
|
16494
17182
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
16495
17183
|
setup(props, {
|
|
@@ -16678,9 +17366,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
16678
17366
|
|
|
16679
17367
|
/** @jsxImportSource vue */
|
|
16680
17368
|
|
|
16681
|
-
const COMPONENT_NAME$
|
|
17369
|
+
const COMPONENT_NAME$1d = 'vc-dropdown';
|
|
16682
17370
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
16683
|
-
name: COMPONENT_NAME$
|
|
17371
|
+
name: COMPONENT_NAME$1d,
|
|
16684
17372
|
props: props$P,
|
|
16685
17373
|
inheritAttrs: false,
|
|
16686
17374
|
emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
|
|
@@ -16750,9 +17438,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
16750
17438
|
|
|
16751
17439
|
/** @jsxImportSource vue */
|
|
16752
17440
|
|
|
16753
|
-
const COMPONENT_NAME$
|
|
17441
|
+
const COMPONENT_NAME$1c = 'vc-dropdown-menu';
|
|
16754
17442
|
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
16755
|
-
name: COMPONENT_NAME$
|
|
17443
|
+
name: COMPONENT_NAME$1c,
|
|
16756
17444
|
setup(_, {
|
|
16757
17445
|
slots
|
|
16758
17446
|
}) {
|
|
@@ -16766,9 +17454,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
16766
17454
|
|
|
16767
17455
|
/** @jsxImportSource vue */
|
|
16768
17456
|
|
|
16769
|
-
const COMPONENT_NAME$
|
|
17457
|
+
const COMPONENT_NAME$1b = 'vc-dropdown-item';
|
|
16770
17458
|
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
16771
|
-
name: COMPONENT_NAME$
|
|
17459
|
+
name: COMPONENT_NAME$1b,
|
|
16772
17460
|
emits: ['click'],
|
|
16773
17461
|
props: {
|
|
16774
17462
|
value: {
|
|
@@ -17012,9 +17700,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
17012
17700
|
|
|
17013
17701
|
/** @jsxImportSource vue */
|
|
17014
17702
|
|
|
17015
|
-
const COMPONENT_NAME$
|
|
17703
|
+
const COMPONENT_NAME$1a = 'vc-editor-toolbar';
|
|
17016
17704
|
const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
17017
|
-
name: COMPONENT_NAME$
|
|
17705
|
+
name: COMPONENT_NAME$1a,
|
|
17018
17706
|
props: {
|
|
17019
17707
|
options: [Array, Object],
|
|
17020
17708
|
elementId: String
|
|
@@ -17222,9 +17910,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
17222
17910
|
|
|
17223
17911
|
/** @jsxImportSource vue */
|
|
17224
17912
|
|
|
17225
|
-
const COMPONENT_NAME$
|
|
17913
|
+
const COMPONENT_NAME$19 = 'vc-image-preview';
|
|
17226
17914
|
const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
|
|
17227
|
-
name: COMPONENT_NAME$
|
|
17915
|
+
name: COMPONENT_NAME$19,
|
|
17228
17916
|
props: props$O,
|
|
17229
17917
|
setup(props, {
|
|
17230
17918
|
slots
|
|
@@ -19377,9 +20065,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
19377
20065
|
}
|
|
19378
20066
|
};
|
|
19379
20067
|
|
|
19380
|
-
const COMPONENT_NAME$
|
|
20068
|
+
const COMPONENT_NAME$18 = "vc-upload";
|
|
19381
20069
|
const Upload$1 = vue.defineComponent({
|
|
19382
|
-
name: COMPONENT_NAME$
|
|
20070
|
+
name: COMPONENT_NAME$18,
|
|
19383
20071
|
props: props$N,
|
|
19384
20072
|
emits: [
|
|
19385
20073
|
"message",
|
|
@@ -19913,9 +20601,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
19913
20601
|
|
|
19914
20602
|
/** @jsxImportSource vue */
|
|
19915
20603
|
|
|
19916
|
-
const COMPONENT_NAME$
|
|
20604
|
+
const COMPONENT_NAME$17 = 'vc-editor';
|
|
19917
20605
|
const Editor$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19918
|
-
name: COMPONENT_NAME$
|
|
20606
|
+
name: COMPONENT_NAME$17,
|
|
19919
20607
|
props: props$M,
|
|
19920
20608
|
defaults: defaults$1,
|
|
19921
20609
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
@@ -20104,7 +20792,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
20104
20792
|
|
|
20105
20793
|
/** @jsxImportSource vue */
|
|
20106
20794
|
|
|
20107
|
-
const COMPONENT_NAME$
|
|
20795
|
+
const COMPONENT_NAME$16 = 'vc-editor-view';
|
|
20108
20796
|
const setImages = v => {
|
|
20109
20797
|
if (!v) return;
|
|
20110
20798
|
const IMG_REGX = /<img.*?(?:>|\/>)/gi;
|
|
@@ -20122,7 +20810,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
20122
20810
|
return;
|
|
20123
20811
|
};
|
|
20124
20812
|
const EditorView = /* @__PURE__ */ vue.defineComponent({
|
|
20125
|
-
name: COMPONENT_NAME$
|
|
20813
|
+
name: COMPONENT_NAME$16,
|
|
20126
20814
|
props: {
|
|
20127
20815
|
value: {
|
|
20128
20816
|
type: String,
|
|
@@ -20337,9 +21025,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20337
21025
|
});
|
|
20338
21026
|
};
|
|
20339
21027
|
|
|
20340
|
-
const COMPONENT_NAME$
|
|
21028
|
+
const COMPONENT_NAME$15 = "vc-form";
|
|
20341
21029
|
const Form = vue.defineComponent({
|
|
20342
|
-
name: COMPONENT_NAME$
|
|
21030
|
+
name: COMPONENT_NAME$15,
|
|
20343
21031
|
props: props$L,
|
|
20344
21032
|
setup(props, { slots, expose }) {
|
|
20345
21033
|
useForm(expose);
|
|
@@ -20819,9 +21507,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20819
21507
|
|
|
20820
21508
|
/** @jsxImportSource vue */
|
|
20821
21509
|
|
|
20822
|
-
const COMPONENT_NAME$
|
|
21510
|
+
const COMPONENT_NAME$14 = 'vc-form-item';
|
|
20823
21511
|
const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20824
|
-
name: COMPONENT_NAME$
|
|
21512
|
+
name: COMPONENT_NAME$14,
|
|
20825
21513
|
props: props$K,
|
|
20826
21514
|
setup(props, {
|
|
20827
21515
|
slots,
|
|
@@ -20889,9 +21577,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20889
21577
|
}
|
|
20890
21578
|
};
|
|
20891
21579
|
|
|
20892
|
-
const COMPONENT_NAME$
|
|
21580
|
+
const COMPONENT_NAME$13 = "vcm-form";
|
|
20893
21581
|
const MForm = vue.defineComponent({
|
|
20894
|
-
name: COMPONENT_NAME$
|
|
21582
|
+
name: COMPONENT_NAME$13,
|
|
20895
21583
|
props: props$J,
|
|
20896
21584
|
setup(props, { slots, expose }) {
|
|
20897
21585
|
useForm(expose, {
|
|
@@ -20922,9 +21610,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20922
21610
|
|
|
20923
21611
|
/** @jsxImportSource vue */
|
|
20924
21612
|
|
|
20925
|
-
const COMPONENT_NAME$
|
|
21613
|
+
const COMPONENT_NAME$12 = 'vcm-form-item';
|
|
20926
21614
|
const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20927
|
-
name: COMPONENT_NAME$
|
|
21615
|
+
name: COMPONENT_NAME$12,
|
|
20928
21616
|
props: props$I,
|
|
20929
21617
|
setup(props, {
|
|
20930
21618
|
slots,
|
|
@@ -20979,9 +21667,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20979
21667
|
}
|
|
20980
21668
|
});
|
|
20981
21669
|
|
|
20982
|
-
const COMPONENT_NAME
|
|
21670
|
+
const COMPONENT_NAME$11 = "vc-fragment";
|
|
20983
21671
|
const Fragment = vue.defineComponent({
|
|
20984
|
-
name: COMPONENT_NAME
|
|
21672
|
+
name: COMPONENT_NAME$11,
|
|
20985
21673
|
setup(_, { slots }) {
|
|
20986
21674
|
return () => vue.h(vue.Fragment, slots.default?.());
|
|
20987
21675
|
}
|
|
@@ -21020,9 +21708,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21020
21708
|
|
|
21021
21709
|
/** @jsxImportSource vue */
|
|
21022
21710
|
|
|
21023
|
-
const COMPONENT_NAME$
|
|
21711
|
+
const COMPONENT_NAME$10 = 'vc-snapshot';
|
|
21024
21712
|
const Snapshot = /* @__PURE__ */ vue.defineComponent({
|
|
21025
|
-
name: COMPONENT_NAME$
|
|
21713
|
+
name: COMPONENT_NAME$10,
|
|
21026
21714
|
props: props$H,
|
|
21027
21715
|
emits: ['ready'],
|
|
21028
21716
|
setup(props, {
|
|
@@ -21555,7 +22243,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
21555
22243
|
|
|
21556
22244
|
/** @jsxImportSource vue */
|
|
21557
22245
|
|
|
21558
|
-
const COMPONENT_NAME
|
|
22246
|
+
const COMPONENT_NAME$$ = 'vc-image';
|
|
21559
22247
|
let isSupportObjectFit = false;
|
|
21560
22248
|
window.addEventListener('DOMContentLoaded', () => {
|
|
21561
22249
|
isSupportObjectFit = !IS_SERVER$1 && document.documentElement.style.objectFit !== undefined;
|
|
@@ -21568,7 +22256,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
21568
22256
|
SCALE_DOWN: 'scale-down'
|
|
21569
22257
|
};
|
|
21570
22258
|
const Image$2 = /* @__PURE__ */ vue.defineComponent({
|
|
21571
|
-
name: COMPONENT_NAME
|
|
22259
|
+
name: COMPONENT_NAME$$,
|
|
21572
22260
|
inheritAttrs: false,
|
|
21573
22261
|
props: props$G,
|
|
21574
22262
|
setup(props, {
|
|
@@ -21785,9 +22473,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21785
22473
|
|
|
21786
22474
|
/** @jsxImportSource vue */
|
|
21787
22475
|
|
|
21788
|
-
const COMPONENT_NAME$
|
|
22476
|
+
const COMPONENT_NAME$_ = 'vc-image-crop';
|
|
21789
22477
|
const ImageCrop = /* @__PURE__ */ vue.defineComponent({
|
|
21790
|
-
name: COMPONENT_NAME$
|
|
22478
|
+
name: COMPONENT_NAME$_,
|
|
21791
22479
|
props: props$F,
|
|
21792
22480
|
setup(props, {
|
|
21793
22481
|
slots
|
|
@@ -21813,9 +22501,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21813
22501
|
|
|
21814
22502
|
/** @jsxImportSource vue */
|
|
21815
22503
|
|
|
21816
|
-
const COMPONENT_NAME$
|
|
22504
|
+
const COMPONENT_NAME$Z = 'vc-image-processing';
|
|
21817
22505
|
const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
|
|
21818
|
-
name: COMPONENT_NAME$
|
|
22506
|
+
name: COMPONENT_NAME$Z,
|
|
21819
22507
|
props: props$E,
|
|
21820
22508
|
setup(props, {
|
|
21821
22509
|
slots
|
|
@@ -21832,9 +22520,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21832
22520
|
|
|
21833
22521
|
/** @jsxImportSource vue */
|
|
21834
22522
|
|
|
21835
|
-
const COMPONENT_NAME$
|
|
22523
|
+
const COMPONENT_NAME$Y = 'vcm-input';
|
|
21836
22524
|
const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
21837
|
-
name: COMPONENT_NAME$
|
|
22525
|
+
name: COMPONENT_NAME$Y,
|
|
21838
22526
|
inheritAttrs: false,
|
|
21839
22527
|
props: {
|
|
21840
22528
|
...props$1h,
|
|
@@ -21923,9 +22611,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21923
22611
|
|
|
21924
22612
|
/** @jsxImportSource vue */
|
|
21925
22613
|
|
|
21926
|
-
const COMPONENT_NAME$
|
|
22614
|
+
const COMPONENT_NAME$X = 'vcm-input-number';
|
|
21927
22615
|
const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
21928
|
-
name: COMPONENT_NAME$
|
|
22616
|
+
name: COMPONENT_NAME$X,
|
|
21929
22617
|
props: props$1g,
|
|
21930
22618
|
inheritAttrs: false,
|
|
21931
22619
|
setup(props, {
|
|
@@ -21974,9 +22662,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21974
22662
|
|
|
21975
22663
|
/** @jsxImportSource vue */
|
|
21976
22664
|
|
|
21977
|
-
const COMPONENT_NAME$
|
|
22665
|
+
const COMPONENT_NAME$W = 'vcm-input-search';
|
|
21978
22666
|
const MInputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
21979
|
-
name: COMPONENT_NAME$
|
|
22667
|
+
name: COMPONENT_NAME$W,
|
|
21980
22668
|
props: {
|
|
21981
22669
|
...props$1f,
|
|
21982
22670
|
cancelText: {
|
|
@@ -22053,9 +22741,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
22053
22741
|
}
|
|
22054
22742
|
};
|
|
22055
22743
|
|
|
22056
|
-
const COMPONENT_NAME$
|
|
22744
|
+
const COMPONENT_NAME$V = "vcm-list";
|
|
22057
22745
|
const MList = vue.defineComponent({
|
|
22058
|
-
name: COMPONENT_NAME$
|
|
22746
|
+
name: COMPONENT_NAME$V,
|
|
22059
22747
|
props: props$D,
|
|
22060
22748
|
setup(props, { slots }) {
|
|
22061
22749
|
vue.provide("vc-list", { props });
|
|
@@ -22110,10 +22798,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
22110
22798
|
|
|
22111
22799
|
/** @jsxImportSource vue */
|
|
22112
22800
|
|
|
22113
|
-
const COMPONENT_NAME$
|
|
22801
|
+
const COMPONENT_NAME$U = 'vcm-list-item';
|
|
22114
22802
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
22115
22803
|
const MListItem = /* @__PURE__ */ vue.defineComponent({
|
|
22116
|
-
name: COMPONENT_NAME$
|
|
22804
|
+
name: COMPONENT_NAME$U,
|
|
22117
22805
|
props: props$C,
|
|
22118
22806
|
emits: ['click'],
|
|
22119
22807
|
setup(props, {
|
|
@@ -22207,11 +22895,11 @@ var VcComponents = (function (exports, vue) {
|
|
|
22207
22895
|
|
|
22208
22896
|
/** @jsxImportSource vue */
|
|
22209
22897
|
|
|
22210
|
-
const COMPONENT_NAME$
|
|
22898
|
+
const COMPONENT_NAME$T = 'vc-marquee';
|
|
22211
22899
|
const ANIMATION = prefixStyle('animation').camel;
|
|
22212
22900
|
const TRANSFORM_KEBAB = prefixStyle('transform').kebab;
|
|
22213
22901
|
const Marquee = /* @__PURE__ */ vue.defineComponent({
|
|
22214
|
-
name: COMPONENT_NAME$
|
|
22902
|
+
name: COMPONENT_NAME$T,
|
|
22215
22903
|
props: props$B,
|
|
22216
22904
|
setup(props, {
|
|
22217
22905
|
slots
|
|
@@ -22279,9 +22967,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
22279
22967
|
}
|
|
22280
22968
|
};
|
|
22281
22969
|
|
|
22282
|
-
const COMPONENT_NAME$
|
|
22970
|
+
const COMPONENT_NAME$S = "vc-resizer";
|
|
22283
22971
|
const Resizer = vue.defineComponent({
|
|
22284
|
-
name: COMPONENT_NAME$
|
|
22972
|
+
name: COMPONENT_NAME$S,
|
|
22285
22973
|
props: props$A,
|
|
22286
22974
|
emits: ["resize"],
|
|
22287
22975
|
setup(props, { emit, slots, expose }) {
|
|
@@ -22451,10 +23139,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
22451
23139
|
|
|
22452
23140
|
/** @jsxImportSource vue */
|
|
22453
23141
|
|
|
22454
|
-
const COMPONENT_NAME$
|
|
23142
|
+
const COMPONENT_NAME$R = 'vc-modal';
|
|
22455
23143
|
let zIndexNumber = 1002;
|
|
22456
23144
|
const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
22457
|
-
name: COMPONENT_NAME$
|
|
23145
|
+
name: COMPONENT_NAME$R,
|
|
22458
23146
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
|
|
22459
23147
|
props: props$z,
|
|
22460
23148
|
setup(props, {
|
|
@@ -22893,9 +23581,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
22893
23581
|
|
|
22894
23582
|
/** @jsxImportSource vue */
|
|
22895
23583
|
|
|
22896
|
-
const COMPONENT_NAME$
|
|
23584
|
+
const COMPONENT_NAME$Q = 'vc-modal';
|
|
22897
23585
|
const MModalView = /* @__PURE__ */ vue.defineComponent({
|
|
22898
|
-
name: COMPONENT_NAME$
|
|
23586
|
+
name: COMPONENT_NAME$Q,
|
|
22899
23587
|
emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
|
|
22900
23588
|
props: props$y,
|
|
22901
23589
|
setup(props, {
|
|
@@ -23107,9 +23795,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23107
23795
|
|
|
23108
23796
|
/** @jsxImportSource vue */
|
|
23109
23797
|
|
|
23110
|
-
const COMPONENT_NAME$
|
|
23798
|
+
const COMPONENT_NAME$P = 'vc-notice';
|
|
23111
23799
|
const NoticeView = /* @__PURE__ */ vue.defineComponent({
|
|
23112
|
-
name: COMPONENT_NAME$
|
|
23800
|
+
name: COMPONENT_NAME$P,
|
|
23113
23801
|
props: props$x,
|
|
23114
23802
|
emits: ['portal-fulfilled', 'close', 'before-close'],
|
|
23115
23803
|
setup(props, {
|
|
@@ -23282,9 +23970,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23282
23970
|
|
|
23283
23971
|
/** @jsxImportSource vue */
|
|
23284
23972
|
|
|
23285
|
-
const COMPONENT_NAME$
|
|
23973
|
+
const COMPONENT_NAME$O = 'vc-option';
|
|
23286
23974
|
const Option$1 = /* @__PURE__ */ vue.defineComponent({
|
|
23287
|
-
name: COMPONENT_NAME$
|
|
23975
|
+
name: COMPONENT_NAME$O,
|
|
23288
23976
|
props: props$w,
|
|
23289
23977
|
setup(props, {
|
|
23290
23978
|
slots
|
|
@@ -23368,9 +24056,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23368
24056
|
|
|
23369
24057
|
/** @jsxImportSource vue */
|
|
23370
24058
|
|
|
23371
|
-
const COMPONENT_NAME$
|
|
24059
|
+
const COMPONENT_NAME$N = 'vc-tag';
|
|
23372
24060
|
const Tag = /* @__PURE__ */ vue.defineComponent({
|
|
23373
|
-
name: COMPONENT_NAME$
|
|
24061
|
+
name: COMPONENT_NAME$N,
|
|
23374
24062
|
props: props$u,
|
|
23375
24063
|
emits: ['close', 'change'],
|
|
23376
24064
|
setup(props, {
|
|
@@ -23441,9 +24129,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23441
24129
|
|
|
23442
24130
|
/** @jsxImportSource vue */
|
|
23443
24131
|
|
|
23444
|
-
const COMPONENT_NAME$
|
|
24132
|
+
const COMPONENT_NAME$M = 'vc-select-option';
|
|
23445
24133
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
23446
|
-
name: COMPONENT_NAME$
|
|
24134
|
+
name: COMPONENT_NAME$M,
|
|
23447
24135
|
props: props$t,
|
|
23448
24136
|
setup(props, {
|
|
23449
24137
|
slots,
|
|
@@ -23538,9 +24226,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23538
24226
|
|
|
23539
24227
|
/** @jsxImportSource vue */
|
|
23540
24228
|
|
|
23541
|
-
const COMPONENT_NAME$
|
|
24229
|
+
const COMPONENT_NAME$L = 'vc-select-option-group';
|
|
23542
24230
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
23543
|
-
name: COMPONENT_NAME$
|
|
24231
|
+
name: COMPONENT_NAME$L,
|
|
23544
24232
|
props: props$s,
|
|
23545
24233
|
setup(props, {
|
|
23546
24234
|
slots
|
|
@@ -23570,9 +24258,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23570
24258
|
|
|
23571
24259
|
/** @jsxImportSource vue */
|
|
23572
24260
|
|
|
23573
|
-
const COMPONENT_NAME$
|
|
24261
|
+
const COMPONENT_NAME$K = 'vc-select-all';
|
|
23574
24262
|
const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
23575
|
-
name: COMPONENT_NAME$
|
|
24263
|
+
name: COMPONENT_NAME$K,
|
|
23576
24264
|
props: {
|
|
23577
24265
|
data: {
|
|
23578
24266
|
type: Array,
|
|
@@ -23642,9 +24330,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23642
24330
|
|
|
23643
24331
|
/** @jsxImportSource vue */
|
|
23644
24332
|
|
|
23645
|
-
const COMPONENT_NAME$
|
|
24333
|
+
const COMPONENT_NAME$J = 'vc-select';
|
|
23646
24334
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
23647
|
-
name: COMPONENT_NAME$
|
|
24335
|
+
name: COMPONENT_NAME$J,
|
|
23648
24336
|
props: props$1a,
|
|
23649
24337
|
emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
|
|
23650
24338
|
setup(props, {
|
|
@@ -23938,9 +24626,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23938
24626
|
|
|
23939
24627
|
/** @jsxImportSource vue */
|
|
23940
24628
|
|
|
23941
|
-
const COMPONENT_NAME$
|
|
24629
|
+
const COMPONENT_NAME$I = 'vc-pagination';
|
|
23942
24630
|
const Pagination = /* @__PURE__ */ vue.defineComponent({
|
|
23943
|
-
name: COMPONENT_NAME$
|
|
24631
|
+
name: COMPONENT_NAME$I,
|
|
23944
24632
|
props: props$v,
|
|
23945
24633
|
emits: ['update:current', 'change', 'page-size-change'],
|
|
23946
24634
|
setup(props, {
|
|
@@ -24138,9 +24826,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24138
24826
|
|
|
24139
24827
|
/** @jsxImportSource vue */
|
|
24140
24828
|
|
|
24141
|
-
const COMPONENT_NAME$
|
|
24829
|
+
const COMPONENT_NAME$H = 'vc-picker';
|
|
24142
24830
|
const Picker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
24143
|
-
name: COMPONENT_NAME$
|
|
24831
|
+
name: COMPONENT_NAME$H,
|
|
24144
24832
|
props: props$r,
|
|
24145
24833
|
setup(props, {
|
|
24146
24834
|
slots
|
|
@@ -24203,9 +24891,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24203
24891
|
|
|
24204
24892
|
/** @jsxImportSource vue */
|
|
24205
24893
|
|
|
24206
|
-
const COMPONENT_NAME$
|
|
24894
|
+
const COMPONENT_NAME$G = 'vc-popconfirm';
|
|
24207
24895
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
24208
|
-
name: COMPONENT_NAME$
|
|
24896
|
+
name: COMPONENT_NAME$G,
|
|
24209
24897
|
props: props$q,
|
|
24210
24898
|
inheritAttrs: false,
|
|
24211
24899
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
|
|
@@ -24373,9 +25061,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24373
25061
|
|
|
24374
25062
|
/** @jsxImportSource vue */
|
|
24375
25063
|
|
|
24376
|
-
const COMPONENT_NAME$
|
|
25064
|
+
const COMPONENT_NAME$F = 'vc-popup';
|
|
24377
25065
|
const MPopup = /* @__PURE__ */ vue.defineComponent({
|
|
24378
|
-
name: COMPONENT_NAME$
|
|
25066
|
+
name: COMPONENT_NAME$F,
|
|
24379
25067
|
props: props$p,
|
|
24380
25068
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change'],
|
|
24381
25069
|
setup(props, {
|
|
@@ -24502,9 +25190,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24502
25190
|
|
|
24503
25191
|
/** @jsxImportSource vue */
|
|
24504
25192
|
|
|
24505
|
-
const COMPONENT_NAME$
|
|
25193
|
+
const COMPONENT_NAME$E = 'vc-print';
|
|
24506
25194
|
const Print = /* @__PURE__ */ vue.defineComponent({
|
|
24507
|
-
name: COMPONENT_NAME$
|
|
25195
|
+
name: COMPONENT_NAME$E,
|
|
24508
25196
|
props: props$o,
|
|
24509
25197
|
setup(props, {
|
|
24510
25198
|
expose,
|
|
@@ -24584,7 +25272,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
24584
25272
|
},
|
|
24585
25273
|
strokeColor: {
|
|
24586
25274
|
type: String,
|
|
24587
|
-
default: "#
|
|
25275
|
+
default: "#456CF6"
|
|
24588
25276
|
},
|
|
24589
25277
|
trackColor: {
|
|
24590
25278
|
type: String,
|
|
@@ -24606,9 +25294,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24606
25294
|
|
|
24607
25295
|
/** @jsxImportSource vue */
|
|
24608
25296
|
|
|
24609
|
-
const COMPONENT_NAME$
|
|
25297
|
+
const COMPONENT_NAME$D = 'vc-progress-circle';
|
|
24610
25298
|
const Circle$1 = /* @__PURE__ */ vue.defineComponent({
|
|
24611
|
-
name: COMPONENT_NAME$
|
|
25299
|
+
name: COMPONENT_NAME$D,
|
|
24612
25300
|
props: props$n,
|
|
24613
25301
|
setup(props, {
|
|
24614
25302
|
slots
|
|
@@ -24668,9 +25356,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24668
25356
|
|
|
24669
25357
|
/** @jsxImportSource vue */
|
|
24670
25358
|
|
|
24671
|
-
const COMPONENT_NAME$
|
|
25359
|
+
const COMPONENT_NAME$C = 'vc-progress-line';
|
|
24672
25360
|
const Line$2 = /* @__PURE__ */ vue.defineComponent({
|
|
24673
|
-
name: COMPONENT_NAME$
|
|
25361
|
+
name: COMPONENT_NAME$C,
|
|
24674
25362
|
props: props$n,
|
|
24675
25363
|
setup(props) {
|
|
24676
25364
|
const colorStyle = vue.computed(() => {
|
|
@@ -24717,9 +25405,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24717
25405
|
function _isSlot(s) {
|
|
24718
25406
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
24719
25407
|
}
|
|
24720
|
-
const COMPONENT_NAME$
|
|
25408
|
+
const COMPONENT_NAME$B = 'vc-progress';
|
|
24721
25409
|
const Progress = /* @__PURE__ */ vue.defineComponent({
|
|
24722
|
-
name: COMPONENT_NAME$
|
|
25410
|
+
name: COMPONENT_NAME$B,
|
|
24723
25411
|
props: props$n,
|
|
24724
25412
|
setup(props, {
|
|
24725
25413
|
slots
|
|
@@ -24881,9 +25569,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24881
25569
|
|
|
24882
25570
|
/** @jsxImportSource vue */
|
|
24883
25571
|
|
|
24884
|
-
const COMPONENT_NAME$
|
|
25572
|
+
const COMPONENT_NAME$A = 'vc-radio';
|
|
24885
25573
|
const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
24886
|
-
name: COMPONENT_NAME$
|
|
25574
|
+
name: COMPONENT_NAME$A,
|
|
24887
25575
|
props: props$m,
|
|
24888
25576
|
emits: ['update:modelValue', 'change'],
|
|
24889
25577
|
setup(props, {
|
|
@@ -24927,9 +25615,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24927
25615
|
|
|
24928
25616
|
/** @jsxImportSource vue */
|
|
24929
25617
|
|
|
24930
|
-
const COMPONENT_NAME$
|
|
25618
|
+
const COMPONENT_NAME$z = 'vc-radio-button';
|
|
24931
25619
|
const RadioButton = /* @__PURE__ */ vue.defineComponent({
|
|
24932
|
-
name: COMPONENT_NAME$
|
|
25620
|
+
name: COMPONENT_NAME$z,
|
|
24933
25621
|
props: {
|
|
24934
25622
|
...props$m,
|
|
24935
25623
|
labelStyle: [String, Object],
|
|
@@ -25042,9 +25730,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25042
25730
|
|
|
25043
25731
|
/** @jsxImportSource vue */
|
|
25044
25732
|
|
|
25045
|
-
const COMPONENT_NAME$
|
|
25733
|
+
const COMPONENT_NAME$y = 'vc-radio-group';
|
|
25046
25734
|
const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
25047
|
-
name: COMPONENT_NAME$
|
|
25735
|
+
name: COMPONENT_NAME$y,
|
|
25048
25736
|
props: props$l,
|
|
25049
25737
|
emits: ['update:modelValue', 'change'],
|
|
25050
25738
|
setup(props, {
|
|
@@ -25065,9 +25753,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25065
25753
|
|
|
25066
25754
|
/** @jsxImportSource vue */
|
|
25067
25755
|
|
|
25068
|
-
const COMPONENT_NAME$
|
|
25756
|
+
const COMPONENT_NAME$x = 'vcm-radio';
|
|
25069
25757
|
const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
25070
|
-
name: COMPONENT_NAME$
|
|
25758
|
+
name: COMPONENT_NAME$x,
|
|
25071
25759
|
props: props$m,
|
|
25072
25760
|
emits: ['update:modelValue', 'change'],
|
|
25073
25761
|
setup(props, {
|
|
@@ -25111,9 +25799,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25111
25799
|
|
|
25112
25800
|
/** @jsxImportSource vue */
|
|
25113
25801
|
|
|
25114
|
-
const COMPONENT_NAME$
|
|
25802
|
+
const COMPONENT_NAME$w = 'vcm-radio-group';
|
|
25115
25803
|
const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
25116
|
-
name: COMPONENT_NAME$
|
|
25804
|
+
name: COMPONENT_NAME$w,
|
|
25117
25805
|
props: props$l,
|
|
25118
25806
|
emits: ['update:modelValue', 'change'],
|
|
25119
25807
|
setup(props, {
|
|
@@ -25180,9 +25868,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25180
25868
|
|
|
25181
25869
|
/** @jsxImportSource vue */
|
|
25182
25870
|
|
|
25183
|
-
const COMPONENT_NAME$
|
|
25871
|
+
const COMPONENT_NAME$v = 'vc-rate';
|
|
25184
25872
|
const Rate = /* @__PURE__ */ vue.defineComponent({
|
|
25185
|
-
name: COMPONENT_NAME$
|
|
25873
|
+
name: COMPONENT_NAME$v,
|
|
25186
25874
|
props: props$k,
|
|
25187
25875
|
emits: ['update:modelValue', 'change'],
|
|
25188
25876
|
setup(props, {
|
|
@@ -25498,9 +26186,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25498
26186
|
|
|
25499
26187
|
/** @jsxImportSource vue */
|
|
25500
26188
|
|
|
25501
|
-
const COMPONENT_NAME$
|
|
26189
|
+
const COMPONENT_NAME$u = 'vc-recycle-list-scroll-state';
|
|
25502
26190
|
const ScrollState = /* @__PURE__ */ vue.defineComponent({
|
|
25503
|
-
name: COMPONENT_NAME$
|
|
26191
|
+
name: COMPONENT_NAME$u,
|
|
25504
26192
|
setup(_, {
|
|
25505
26193
|
slots
|
|
25506
26194
|
}) {
|
|
@@ -25630,12 +26318,12 @@ var VcComponents = (function (exports, vue) {
|
|
|
25630
26318
|
|
|
25631
26319
|
/** @jsxImportSource vue */
|
|
25632
26320
|
|
|
25633
|
-
const COMPONENT_NAME$
|
|
26321
|
+
const COMPONENT_NAME$t = 'vc-recycle-list-container';
|
|
25634
26322
|
|
|
25635
26323
|
// TODO: 抽离
|
|
25636
26324
|
const transformKey = prefixStyle('transform').camel;
|
|
25637
26325
|
const Container$1 = /* @__PURE__ */ vue.defineComponent({
|
|
25638
|
-
name: COMPONENT_NAME$
|
|
26326
|
+
name: COMPONENT_NAME$t,
|
|
25639
26327
|
props: props$i,
|
|
25640
26328
|
emits: ['refresh'],
|
|
25641
26329
|
setup(props, {
|
|
@@ -25733,9 +26421,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25733
26421
|
|
|
25734
26422
|
/** @jsxImportSource vue */
|
|
25735
26423
|
|
|
25736
|
-
const COMPONENT_NAME$
|
|
26424
|
+
const COMPONENT_NAME$s = 'vc-recycle-list';
|
|
25737
26425
|
const RecycleList = /* @__PURE__ */ vue.defineComponent({
|
|
25738
|
-
name: COMPONENT_NAME$
|
|
26426
|
+
name: COMPONENT_NAME$s,
|
|
25739
26427
|
props: props$j,
|
|
25740
26428
|
emits: ['scroll', 'row-resize'],
|
|
25741
26429
|
setup(props, {
|
|
@@ -26309,9 +26997,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26309
26997
|
|
|
26310
26998
|
/** @jsxImportSource vue */
|
|
26311
26999
|
|
|
26312
|
-
const COMPONENT_NAME$
|
|
27000
|
+
const COMPONENT_NAME$r = 'vc-slider';
|
|
26313
27001
|
const Slider = /* @__PURE__ */ vue.defineComponent({
|
|
26314
|
-
name: COMPONENT_NAME$
|
|
27002
|
+
name: COMPONENT_NAME$r,
|
|
26315
27003
|
props: props$h,
|
|
26316
27004
|
setup(props, {
|
|
26317
27005
|
slots
|
|
@@ -26335,9 +27023,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26335
27023
|
|
|
26336
27024
|
/** @jsxImportSource vue */
|
|
26337
27025
|
|
|
26338
|
-
const COMPONENT_NAME$
|
|
27026
|
+
const COMPONENT_NAME$q = 'vc-sort-list';
|
|
26339
27027
|
const SortList = /* @__PURE__ */ vue.defineComponent({
|
|
26340
|
-
name: COMPONENT_NAME$
|
|
27028
|
+
name: COMPONENT_NAME$q,
|
|
26341
27029
|
props: props$g,
|
|
26342
27030
|
setup(props, {
|
|
26343
27031
|
slots
|
|
@@ -26361,9 +27049,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26361
27049
|
|
|
26362
27050
|
/** @jsxImportSource vue */
|
|
26363
27051
|
|
|
26364
|
-
const COMPONENT_NAME$
|
|
27052
|
+
const COMPONENT_NAME$p = 'vc-steps';
|
|
26365
27053
|
const Steps = /* @__PURE__ */ vue.defineComponent({
|
|
26366
|
-
name: COMPONENT_NAME$
|
|
27054
|
+
name: COMPONENT_NAME$p,
|
|
26367
27055
|
props: props$f,
|
|
26368
27056
|
setup(props, {
|
|
26369
27057
|
slots
|
|
@@ -26489,9 +27177,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26489
27177
|
|
|
26490
27178
|
/** @jsxImportSource vue */
|
|
26491
27179
|
|
|
26492
|
-
const COMPONENT_NAME$
|
|
27180
|
+
const COMPONENT_NAME$o = 'vc-switch';
|
|
26493
27181
|
const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
26494
|
-
name: COMPONENT_NAME$
|
|
27182
|
+
name: COMPONENT_NAME$o,
|
|
26495
27183
|
props: props$e,
|
|
26496
27184
|
// click -> onClick要被拦截,此处不能放置
|
|
26497
27185
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -26565,9 +27253,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26565
27253
|
|
|
26566
27254
|
/** @jsxImportSource vue */
|
|
26567
27255
|
|
|
26568
|
-
const COMPONENT_NAME$
|
|
27256
|
+
const COMPONENT_NAME$n = 'vcm-switch';
|
|
26569
27257
|
const MSwitch = /* @__PURE__ */ vue.defineComponent({
|
|
26570
|
-
name: COMPONENT_NAME$
|
|
27258
|
+
name: COMPONENT_NAME$n,
|
|
26571
27259
|
props: props$e,
|
|
26572
27260
|
// click -> onClick要被拦截,此处不能放置
|
|
26573
27261
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -27680,9 +28368,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
27680
28368
|
|
|
27681
28369
|
/** @jsxImportSource vue */
|
|
27682
28370
|
|
|
27683
|
-
const COMPONENT_NAME$
|
|
28371
|
+
const COMPONENT_NAME$m = 'vc-table-normal-list';
|
|
27684
28372
|
const NormalList = /* @__PURE__ */ vue.defineComponent({
|
|
27685
|
-
name: COMPONENT_NAME$
|
|
28373
|
+
name: COMPONENT_NAME$m,
|
|
27686
28374
|
props: {
|
|
27687
28375
|
data: {
|
|
27688
28376
|
type: Array,
|
|
@@ -28200,6 +28888,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
28200
28888
|
const allowDrag = vue.computed(() => {
|
|
28201
28889
|
return typeof props.resizable === 'boolean' ? props.resizable : props.border;
|
|
28202
28890
|
});
|
|
28891
|
+
const dragLineClass = vue.computed(() => {
|
|
28892
|
+
if (props.border || !props.resizable) return;
|
|
28893
|
+
return 'has-drag-line';
|
|
28894
|
+
});
|
|
28203
28895
|
const states = useStates({
|
|
28204
28896
|
columns: 'columns',
|
|
28205
28897
|
isAllSelected: 'isAllSelected',
|
|
@@ -28433,7 +29125,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
28433
29125
|
"style": [getHeaderCellStyle(rowIndex, columnIndex, columns, column), {
|
|
28434
29126
|
width: `${column.realWidth}px`
|
|
28435
29127
|
}],
|
|
28436
|
-
"class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), 'vc-table__th'],
|
|
29128
|
+
"class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), column.resizable && dragLineClass.value, 'vc-table__th'],
|
|
28437
29129
|
"key": column.id
|
|
28438
29130
|
}, [vue.createVNode("div", {
|
|
28439
29131
|
"class": ['vc-table__cell',
|
|
@@ -28679,9 +29371,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
28679
29371
|
|
|
28680
29372
|
/** @jsxImportSource vue */
|
|
28681
29373
|
|
|
28682
|
-
const COMPONENT_NAME$
|
|
29374
|
+
const COMPONENT_NAME$l = 'vc-table';
|
|
28683
29375
|
const Table$1 = /* @__PURE__ */ vue.defineComponent({
|
|
28684
|
-
name: COMPONENT_NAME$
|
|
29376
|
+
name: COMPONENT_NAME$l,
|
|
28685
29377
|
props: props$d,
|
|
28686
29378
|
emits: ['select', 'select-all', 'selection-change', 'cell-mouse-enter', 'cell-mouse-leave', 'cell-click', 'cell-dblclick', 'row-click', 'row-contextmenu', 'row-dblclick', 'header-click', 'header-contextmenu', 'current-change', 'header-dragend', 'expand-change', 'sort-change', 'update:sort'],
|
|
28687
29379
|
setup(props, {
|
|
@@ -29884,9 +30576,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
29884
30576
|
|
|
29885
30577
|
/** @jsxImportSource vue */
|
|
29886
30578
|
|
|
29887
|
-
const COMPONENT_NAME$
|
|
30579
|
+
const COMPONENT_NAME$k = 'vc-tabs';
|
|
29888
30580
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
29889
|
-
name: COMPONENT_NAME$
|
|
30581
|
+
name: COMPONENT_NAME$k,
|
|
29890
30582
|
props: props$c,
|
|
29891
30583
|
emits: ['update:modelValue', 'change', 'click'],
|
|
29892
30584
|
setup(props, {
|
|
@@ -30139,9 +30831,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30139
30831
|
|
|
30140
30832
|
/** @jsxImportSource vue */
|
|
30141
30833
|
|
|
30142
|
-
const COMPONENT_NAME$
|
|
30834
|
+
const COMPONENT_NAME$j = 'vc-tabs-pane';
|
|
30143
30835
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
30144
|
-
name: COMPONENT_NAME$
|
|
30836
|
+
name: COMPONENT_NAME$j,
|
|
30145
30837
|
props: props$b,
|
|
30146
30838
|
setup(_, {
|
|
30147
30839
|
slots
|
|
@@ -30196,9 +30888,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30196
30888
|
|
|
30197
30889
|
/** @jsxImportSource vue */
|
|
30198
30890
|
|
|
30199
|
-
const COMPONENT_NAME$
|
|
30891
|
+
const COMPONENT_NAME$i = 'vcm-tabs';
|
|
30200
30892
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
30201
|
-
name: COMPONENT_NAME$
|
|
30893
|
+
name: COMPONENT_NAME$i,
|
|
30202
30894
|
props: props$a,
|
|
30203
30895
|
emits: ['update:modelValue', 'change', 'click'],
|
|
30204
30896
|
setup(props, {
|
|
@@ -30463,9 +31155,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30463
31155
|
|
|
30464
31156
|
/** @jsxImportSource vue */
|
|
30465
31157
|
|
|
30466
|
-
const COMPONENT_NAME$
|
|
31158
|
+
const COMPONENT_NAME$h = 'vcm-tabs-pane';
|
|
30467
31159
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
30468
|
-
name: COMPONENT_NAME$
|
|
31160
|
+
name: COMPONENT_NAME$h,
|
|
30469
31161
|
props: props$b,
|
|
30470
31162
|
setup(_, {
|
|
30471
31163
|
slots
|
|
@@ -30529,9 +31221,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30529
31221
|
|
|
30530
31222
|
/** @jsxImportSource vue */
|
|
30531
31223
|
|
|
30532
|
-
const COMPONENT_NAME$
|
|
31224
|
+
const COMPONENT_NAME$g = 'vc-text';
|
|
30533
31225
|
const Text$2 = /* @__PURE__ */ vue.defineComponent({
|
|
30534
|
-
name: COMPONENT_NAME$
|
|
31226
|
+
name: COMPONENT_NAME$g,
|
|
30535
31227
|
props: props$9,
|
|
30536
31228
|
setup(props, {
|
|
30537
31229
|
emit
|
|
@@ -30898,9 +31590,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30898
31590
|
|
|
30899
31591
|
/** @jsxImportSource vue */
|
|
30900
31592
|
|
|
30901
|
-
const COMPONENT_NAME$
|
|
31593
|
+
const COMPONENT_NAME$f = 'vc-textarea';
|
|
30902
31594
|
const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
30903
|
-
name: COMPONENT_NAME$
|
|
31595
|
+
name: COMPONENT_NAME$f,
|
|
30904
31596
|
props: Object.assign({}, props$8, {
|
|
30905
31597
|
indicator: {
|
|
30906
31598
|
type: [Boolean, Object],
|
|
@@ -30956,9 +31648,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30956
31648
|
|
|
30957
31649
|
/** @jsxImportSource vue */
|
|
30958
31650
|
|
|
30959
|
-
const COMPONENT_NAME$
|
|
31651
|
+
const COMPONENT_NAME$e = 'vcm-textarea';
|
|
30960
31652
|
const MTextarea = /* @__PURE__ */ vue.defineComponent({
|
|
30961
|
-
name: COMPONENT_NAME$
|
|
31653
|
+
name: COMPONENT_NAME$e,
|
|
30962
31654
|
props: Object.assign({}, props$8, {
|
|
30963
31655
|
align: {
|
|
30964
31656
|
type: String,
|
|
@@ -31041,9 +31733,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31041
31733
|
}
|
|
31042
31734
|
};
|
|
31043
31735
|
|
|
31044
|
-
const COMPONENT_NAME$
|
|
31736
|
+
const COMPONENT_NAME$d = "vc-theme";
|
|
31045
31737
|
const Theme$1 = vue.defineComponent({
|
|
31046
|
-
name: COMPONENT_NAME$
|
|
31738
|
+
name: COMPONENT_NAME$d,
|
|
31047
31739
|
props: props$7,
|
|
31048
31740
|
setup(props, { slots }) {
|
|
31049
31741
|
const themeId = getUid("vc-theme");
|
|
@@ -31126,9 +31818,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31126
31818
|
}
|
|
31127
31819
|
});
|
|
31128
31820
|
|
|
31129
|
-
const COMPONENT_NAME$
|
|
31821
|
+
const COMPONENT_NAME$c = "vc-theme-view";
|
|
31130
31822
|
const ThemeView = vue.defineComponent({
|
|
31131
|
-
name: COMPONENT_NAME$
|
|
31823
|
+
name: COMPONENT_NAME$c,
|
|
31132
31824
|
props: props$7,
|
|
31133
31825
|
setup(props, { slots }) {
|
|
31134
31826
|
return () => {
|
|
@@ -31144,9 +31836,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31144
31836
|
}
|
|
31145
31837
|
});
|
|
31146
31838
|
|
|
31147
|
-
const COMPONENT_NAME$
|
|
31839
|
+
const COMPONENT_NAME$b = "vc-theme-text";
|
|
31148
31840
|
const ThemeText = vue.defineComponent({
|
|
31149
|
-
name: COMPONENT_NAME$
|
|
31841
|
+
name: COMPONENT_NAME$b,
|
|
31150
31842
|
props: props$7,
|
|
31151
31843
|
setup(props, { slots }) {
|
|
31152
31844
|
return () => {
|
|
@@ -31162,9 +31854,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31162
31854
|
}
|
|
31163
31855
|
});
|
|
31164
31856
|
|
|
31165
|
-
const COMPONENT_NAME$
|
|
31857
|
+
const COMPONENT_NAME$a = "vc-theme-image";
|
|
31166
31858
|
const ThemeImage = vue.defineComponent({
|
|
31167
|
-
name: COMPONENT_NAME$
|
|
31859
|
+
name: COMPONENT_NAME$a,
|
|
31168
31860
|
props: props$7,
|
|
31169
31861
|
setup(props, { slots }) {
|
|
31170
31862
|
return () => {
|
|
@@ -31216,12 +31908,12 @@ var VcComponents = (function (exports, vue) {
|
|
|
31216
31908
|
|
|
31217
31909
|
/** @jsxImportSource vue */
|
|
31218
31910
|
|
|
31219
|
-
const COMPONENT_NAME$
|
|
31911
|
+
const COMPONENT_NAME$9 = 'vc-time-picker';
|
|
31220
31912
|
const getPanel = type => {
|
|
31221
31913
|
const isRange = type === 'timerange';
|
|
31222
31914
|
return isRange ? TimeRangePanel : TimePanel;
|
|
31223
31915
|
};
|
|
31224
|
-
const TimePicker = createPicker(COMPONENT_NAME$
|
|
31916
|
+
const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
|
|
31225
31917
|
const props = vue.getCurrentInstance().props;
|
|
31226
31918
|
const icon = vue.ref('icon');
|
|
31227
31919
|
const panel = vue.shallowRef({});
|
|
@@ -31257,9 +31949,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31257
31949
|
|
|
31258
31950
|
/** @jsxImportSource vue */
|
|
31259
31951
|
|
|
31260
|
-
const COMPONENT_NAME$
|
|
31952
|
+
const COMPONENT_NAME$8 = 'vc-timeline';
|
|
31261
31953
|
const Timeline = /* @__PURE__ */ vue.defineComponent({
|
|
31262
|
-
name: COMPONENT_NAME$
|
|
31954
|
+
name: COMPONENT_NAME$8,
|
|
31263
31955
|
props: props$5,
|
|
31264
31956
|
setup(props, {
|
|
31265
31957
|
slots
|
|
@@ -31286,9 +31978,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31286
31978
|
|
|
31287
31979
|
/** @jsxImportSource vue */
|
|
31288
31980
|
|
|
31289
|
-
const COMPONENT_NAME$
|
|
31981
|
+
const COMPONENT_NAME$7 = 'vc-touch';
|
|
31290
31982
|
const Touch = /* @__PURE__ */ vue.defineComponent({
|
|
31291
|
-
name: COMPONENT_NAME$
|
|
31983
|
+
name: COMPONENT_NAME$7,
|
|
31292
31984
|
props: props$4,
|
|
31293
31985
|
setup(props, {
|
|
31294
31986
|
slots
|
|
@@ -31796,21 +32488,68 @@ var VcComponents = (function (exports, vue) {
|
|
|
31796
32488
|
parentNode.insertChild({ data });
|
|
31797
32489
|
}
|
|
31798
32490
|
}
|
|
32491
|
+
/**
|
|
32492
|
+
* 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
|
|
32493
|
+
* 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
|
|
32494
|
+
* @param checkedValues ~
|
|
32495
|
+
* @returns ~
|
|
32496
|
+
*/
|
|
32497
|
+
_getCascadeCheckedAnchorIds(checkedValues) {
|
|
32498
|
+
const checkedSet = new Set(checkedValues);
|
|
32499
|
+
const nodesMap = this.nodesMap;
|
|
32500
|
+
const anchors = [];
|
|
32501
|
+
for (const id of checkedValues) {
|
|
32502
|
+
const node = nodesMap[id];
|
|
32503
|
+
if (!node) continue;
|
|
32504
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
32505
|
+
(child) => checkedSet.has(child.getter.value)
|
|
32506
|
+
);
|
|
32507
|
+
if (!hasSelectedChildInSet) {
|
|
32508
|
+
anchors.push(id);
|
|
32509
|
+
}
|
|
32510
|
+
}
|
|
32511
|
+
anchors.sort((a, b) => {
|
|
32512
|
+
const na = nodesMap[a];
|
|
32513
|
+
const nb = nodesMap[b];
|
|
32514
|
+
if (!na || !nb) return 0;
|
|
32515
|
+
return nb.states.level - na.states.level;
|
|
32516
|
+
});
|
|
32517
|
+
return anchors;
|
|
32518
|
+
}
|
|
31799
32519
|
_initDefaultCheckedNodes() {
|
|
31800
32520
|
const checkedValues = this.checkedValues || [];
|
|
31801
32521
|
const nodesMap = this.nodesMap;
|
|
31802
|
-
|
|
32522
|
+
if (this.checkStrictly) {
|
|
32523
|
+
checkedValues.forEach((id) => {
|
|
32524
|
+
const node = nodesMap[id];
|
|
32525
|
+
if (node) {
|
|
32526
|
+
node.setChecked(true, false);
|
|
32527
|
+
}
|
|
32528
|
+
});
|
|
32529
|
+
return;
|
|
32530
|
+
}
|
|
32531
|
+
const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
|
|
32532
|
+
anchorIds.forEach((id) => {
|
|
31803
32533
|
const node = nodesMap[id];
|
|
31804
32534
|
if (node) {
|
|
31805
|
-
node.setChecked(true,
|
|
32535
|
+
node.setChecked(true, true);
|
|
31806
32536
|
}
|
|
31807
32537
|
});
|
|
31808
32538
|
}
|
|
31809
32539
|
_initDefaultCheckedNode(node) {
|
|
31810
32540
|
const checkedValues = this.checkedValues || [];
|
|
31811
32541
|
const nodeValue = node.getter.value;
|
|
31812
|
-
if (checkedValues.indexOf(nodeValue)
|
|
31813
|
-
|
|
32542
|
+
if (checkedValues.indexOf(nodeValue) === -1) return;
|
|
32543
|
+
if (this.checkStrictly) {
|
|
32544
|
+
node.setChecked(true, false);
|
|
32545
|
+
return;
|
|
32546
|
+
}
|
|
32547
|
+
const checkedSet = new Set(checkedValues);
|
|
32548
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
32549
|
+
(child) => checkedSet.has(child.getter.value)
|
|
32550
|
+
);
|
|
32551
|
+
if (!hasSelectedChildInSet) {
|
|
32552
|
+
node.setChecked(true, true);
|
|
31814
32553
|
}
|
|
31815
32554
|
}
|
|
31816
32555
|
setCheckedValues(newVal) {
|
|
@@ -32038,9 +32777,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
32038
32777
|
|
|
32039
32778
|
/** @jsxImportSource vue */
|
|
32040
32779
|
|
|
32041
|
-
const COMPONENT_NAME$
|
|
32780
|
+
const COMPONENT_NAME$6 = 'vc-tree-node';
|
|
32042
32781
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
32043
|
-
name: COMPONENT_NAME$
|
|
32782
|
+
name: COMPONENT_NAME$6,
|
|
32044
32783
|
props: props$3,
|
|
32045
32784
|
emits: ['node-expand'],
|
|
32046
32785
|
setup(props, {
|
|
@@ -32539,9 +33278,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
32539
33278
|
|
|
32540
33279
|
/** @jsxImportSource vue */
|
|
32541
33280
|
|
|
32542
|
-
const COMPONENT_NAME$
|
|
33281
|
+
const COMPONENT_NAME$5 = 'vc-tree';
|
|
32543
33282
|
const Tree$1 = /* @__PURE__ */ vue.defineComponent({
|
|
32544
|
-
name: COMPONENT_NAME$
|
|
33283
|
+
name: COMPONENT_NAME$5,
|
|
32545
33284
|
props: props$2,
|
|
32546
33285
|
emits: ['update:modelValue', 'change', 'check-change', 'current-change', 'node-click', 'node-contextmenu', 'node-collapse', 'node-expand', 'check', 'node-drag-start', 'node-drag-end', 'node-drop', 'node-drag-leave', 'node-drag-enter', 'node-drag-over'],
|
|
32547
33286
|
setup(props, {
|
|
@@ -32736,6 +33475,225 @@ var VcComponents = (function (exports, vue) {
|
|
|
32736
33475
|
}
|
|
32737
33476
|
});
|
|
32738
33477
|
|
|
33478
|
+
/** @jsxImportSource vue */
|
|
33479
|
+
|
|
33480
|
+
const COMPONENT_NAME$4 = 'vc-tree-select-content';
|
|
33481
|
+
const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
|
|
33482
|
+
name: COMPONENT_NAME$4,
|
|
33483
|
+
props: {
|
|
33484
|
+
value: {
|
|
33485
|
+
type: Array,
|
|
33486
|
+
required: true
|
|
33487
|
+
},
|
|
33488
|
+
data: {
|
|
33489
|
+
type: Array,
|
|
33490
|
+
default: () => []
|
|
33491
|
+
},
|
|
33492
|
+
checkStrictly: {
|
|
33493
|
+
type: Boolean,
|
|
33494
|
+
default: false
|
|
33495
|
+
},
|
|
33496
|
+
renderNodeLabel: Function
|
|
33497
|
+
},
|
|
33498
|
+
emits: ['change'],
|
|
33499
|
+
setup(props, {
|
|
33500
|
+
emit
|
|
33501
|
+
}) {
|
|
33502
|
+
return () => {
|
|
33503
|
+
return vue.createVNode(Scroller, {
|
|
33504
|
+
"class": "vc-tree-select__options",
|
|
33505
|
+
"max-height": "200px"
|
|
33506
|
+
}, {
|
|
33507
|
+
default: () => [vue.createVNode(Tree$1, {
|
|
33508
|
+
"model-value": props.value,
|
|
33509
|
+
"expanded-values": props.value,
|
|
33510
|
+
"data": props.data,
|
|
33511
|
+
"checkStrictly": props.checkStrictly,
|
|
33512
|
+
"allowDispatch": false,
|
|
33513
|
+
"showCheckbox": true,
|
|
33514
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
33515
|
+
"onChange": (_, data) => emit('change', _, data)
|
|
33516
|
+
}, null)]
|
|
33517
|
+
});
|
|
33518
|
+
};
|
|
33519
|
+
}
|
|
33520
|
+
});
|
|
33521
|
+
|
|
33522
|
+
/** @jsxImportSource vue */
|
|
33523
|
+
|
|
33524
|
+
const COMPONENT_NAME$3 = 'vc-tree-select-content-cascader';
|
|
33525
|
+
const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
|
|
33526
|
+
name: COMPONENT_NAME$3,
|
|
33527
|
+
props: {
|
|
33528
|
+
value: {
|
|
33529
|
+
type: Array,
|
|
33530
|
+
required: true
|
|
33531
|
+
},
|
|
33532
|
+
data: {
|
|
33533
|
+
type: Array,
|
|
33534
|
+
default: () => []
|
|
33535
|
+
},
|
|
33536
|
+
checkStrictly: {
|
|
33537
|
+
type: Boolean,
|
|
33538
|
+
default: false
|
|
33539
|
+
},
|
|
33540
|
+
renderNodeLabel: Function,
|
|
33541
|
+
numerable: {
|
|
33542
|
+
type: Boolean,
|
|
33543
|
+
default: false
|
|
33544
|
+
},
|
|
33545
|
+
separator: {
|
|
33546
|
+
type: String,
|
|
33547
|
+
default: ','
|
|
33548
|
+
},
|
|
33549
|
+
max: {
|
|
33550
|
+
type: Number,
|
|
33551
|
+
default: 1
|
|
33552
|
+
},
|
|
33553
|
+
nullValue: {
|
|
33554
|
+
type: [Number, String, Object],
|
|
33555
|
+
default: void 0
|
|
33556
|
+
}
|
|
33557
|
+
},
|
|
33558
|
+
emits: ['change'],
|
|
33559
|
+
setup(props, {
|
|
33560
|
+
emit
|
|
33561
|
+
}) {
|
|
33562
|
+
const treeRef = vue.ref(null);
|
|
33563
|
+
/** hover 展开路径,与 Cascader 一致 */
|
|
33564
|
+
const currentValue = vue.ref([]);
|
|
33565
|
+
const rebuildData = vue.computed(() => {
|
|
33566
|
+
if (!props.data.length) return [];
|
|
33567
|
+
let temp = props.data;
|
|
33568
|
+
const data = [];
|
|
33569
|
+
currentValue.value.forEach(cur => {
|
|
33570
|
+
const col = temp;
|
|
33571
|
+
data.push(col);
|
|
33572
|
+
const next = (temp.find(i => i.value == cur) || {}).children || [];
|
|
33573
|
+
temp = next;
|
|
33574
|
+
});
|
|
33575
|
+
data.push(temp);
|
|
33576
|
+
return data;
|
|
33577
|
+
});
|
|
33578
|
+
/** 驱动列区在 TreeStore 更新后重绘 */
|
|
33579
|
+
const panelTick = vue.ref(0);
|
|
33580
|
+
const columns = vue.computed(() => Array.from({
|
|
33581
|
+
length: currentValue.value.length + 1
|
|
33582
|
+
}).map((_, index) => index));
|
|
33583
|
+
const handleHover = (value, columnIndex) => {
|
|
33584
|
+
const len = currentValue.value.length - columnIndex;
|
|
33585
|
+
currentValue.value.splice(columnIndex, len, value);
|
|
33586
|
+
};
|
|
33587
|
+
const sync = async () => {
|
|
33588
|
+
await vue.nextTick();
|
|
33589
|
+
const tree = treeRef.value;
|
|
33590
|
+
if (!tree) return;
|
|
33591
|
+
const data = {
|
|
33592
|
+
checkedNodes: tree.getCheckedNodes(),
|
|
33593
|
+
checkedValues: tree.getCheckedValues(),
|
|
33594
|
+
halfCheckedNodes: tree.getHalfCheckedNodes(),
|
|
33595
|
+
halfCheckedValues: tree.getHalfCheckedValues()
|
|
33596
|
+
};
|
|
33597
|
+
panelTick.value++;
|
|
33598
|
+
emit('change', null, data);
|
|
33599
|
+
};
|
|
33600
|
+
const getNodeState = item => {
|
|
33601
|
+
const tree = treeRef.value;
|
|
33602
|
+
if (!tree) {
|
|
33603
|
+
return {
|
|
33604
|
+
checked: false,
|
|
33605
|
+
indeterminate: false
|
|
33606
|
+
};
|
|
33607
|
+
}
|
|
33608
|
+
const node = tree.getNode(item);
|
|
33609
|
+
if (!node) {
|
|
33610
|
+
return {
|
|
33611
|
+
checked: false,
|
|
33612
|
+
indeterminate: false
|
|
33613
|
+
};
|
|
33614
|
+
}
|
|
33615
|
+
return {
|
|
33616
|
+
checked: !!node.states.checked,
|
|
33617
|
+
indeterminate: !!node.states.indeterminate
|
|
33618
|
+
};
|
|
33619
|
+
};
|
|
33620
|
+
const hasChildren = item => {
|
|
33621
|
+
return !!(item.children && item.children.length > 0);
|
|
33622
|
+
};
|
|
33623
|
+
const handleCheckboxChange = async (v, item) => {
|
|
33624
|
+
const tree = treeRef.value;
|
|
33625
|
+
if (!tree) return;
|
|
33626
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
33627
|
+
sync();
|
|
33628
|
+
};
|
|
33629
|
+
const handleLabelClick = (v, item) => {
|
|
33630
|
+
const tree = treeRef.value;
|
|
33631
|
+
if (!tree) return;
|
|
33632
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
33633
|
+
sync();
|
|
33634
|
+
};
|
|
33635
|
+
return () => {
|
|
33636
|
+
return vue.createVNode("div", {
|
|
33637
|
+
"class": "vc-tree-select__cascader"
|
|
33638
|
+
}, [vue.createVNode(Tree$1, {
|
|
33639
|
+
"ref": treeRef,
|
|
33640
|
+
"class": "vc-tree-select__cascader-tree-hidden",
|
|
33641
|
+
"model-value": props.value,
|
|
33642
|
+
"expanded-values": props.value,
|
|
33643
|
+
"data": props.data,
|
|
33644
|
+
"checkStrictly": props.checkStrictly,
|
|
33645
|
+
"allowDispatch": false,
|
|
33646
|
+
"showCheckbox": true,
|
|
33647
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
33648
|
+
"numerable": props.numerable,
|
|
33649
|
+
"separator": props.separator,
|
|
33650
|
+
"max": props.max,
|
|
33651
|
+
"nullValue": props.nullValue
|
|
33652
|
+
}, null), vue.createVNode("div", {
|
|
33653
|
+
"class": "vc-tree-select__cascader-columns"
|
|
33654
|
+
}, [columns.value.map(columnIndex => {
|
|
33655
|
+
const col = rebuildData.value[columnIndex];
|
|
33656
|
+
if (!col || !col.length) return null;
|
|
33657
|
+
return vue.createVNode("div", {
|
|
33658
|
+
"class": "vc-tree-select__cascader-column",
|
|
33659
|
+
"key": columnIndex
|
|
33660
|
+
}, [vue.createVNode("div", {
|
|
33661
|
+
"class": "vc-tree-select__cascader-column-wrapper"
|
|
33662
|
+
}, [col.map(item => {
|
|
33663
|
+
const state = getNodeState(item);
|
|
33664
|
+
const isSelect = currentValue.value[columnIndex] === item.value;
|
|
33665
|
+
const child = hasChildren(item);
|
|
33666
|
+
return vue.createVNode("div", {
|
|
33667
|
+
"key": item.value,
|
|
33668
|
+
"class": ['vc-tree-select__cascader-item', {
|
|
33669
|
+
'is-select': isSelect
|
|
33670
|
+
}],
|
|
33671
|
+
"onMouseenter": () => handleHover(item.value, columnIndex),
|
|
33672
|
+
"onClick": () => handleLabelClick(!state.checked, item)
|
|
33673
|
+
}, [vue.createVNode("span", {
|
|
33674
|
+
"class": "vc-tree-select__cascader-checkbox",
|
|
33675
|
+
"onClick": e => e.stopPropagation()
|
|
33676
|
+
}, [vue.createVNode(Checkbox, {
|
|
33677
|
+
"modelValue": state.checked,
|
|
33678
|
+
"indeterminate": state.indeterminate,
|
|
33679
|
+
"disabled": !!item.disabled,
|
|
33680
|
+
"onChange": v => handleCheckboxChange(v, item)
|
|
33681
|
+
}, null)]), vue.createVNode("span", {
|
|
33682
|
+
"class": "vc-tree-select__cascader-label"
|
|
33683
|
+
}, [props.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
|
|
33684
|
+
"render": props.renderNodeLabel,
|
|
33685
|
+
"store": treeRef.value.getNode(item),
|
|
33686
|
+
"row": item
|
|
33687
|
+
}, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
|
|
33688
|
+
"type": "right",
|
|
33689
|
+
"class": "vc-tree-select__cascader-icon"
|
|
33690
|
+
}, null) : null]);
|
|
33691
|
+
})])]);
|
|
33692
|
+
})])]);
|
|
33693
|
+
};
|
|
33694
|
+
}
|
|
33695
|
+
});
|
|
33696
|
+
|
|
32739
33697
|
const treeKeys = [
|
|
32740
33698
|
"checkStrictly",
|
|
32741
33699
|
"data",
|
|
@@ -32744,7 +33702,18 @@ var VcComponents = (function (exports, vue) {
|
|
|
32744
33702
|
];
|
|
32745
33703
|
const props$1 = {
|
|
32746
33704
|
...props$1a,
|
|
32747
|
-
...pick(props$2, treeKeys)
|
|
33705
|
+
...pick(props$2, treeKeys),
|
|
33706
|
+
autoWidth: {
|
|
33707
|
+
type: Boolean,
|
|
33708
|
+
default: void 0
|
|
33709
|
+
},
|
|
33710
|
+
/**
|
|
33711
|
+
* 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
|
|
33712
|
+
*/
|
|
33713
|
+
cascader: {
|
|
33714
|
+
type: Boolean,
|
|
33715
|
+
default: false
|
|
33716
|
+
}
|
|
32748
33717
|
};
|
|
32749
33718
|
|
|
32750
33719
|
/** @jsxImportSource vue */
|
|
@@ -32770,12 +33739,37 @@ var VcComponents = (function (exports, vue) {
|
|
|
32770
33739
|
const searchValue = vue.ref('');
|
|
32771
33740
|
const searchRegex = vue.ref(new RegExp(''));
|
|
32772
33741
|
const currentValue = vue.ref([]);
|
|
33742
|
+
const currentValueGroups = vue.computed(() => {
|
|
33743
|
+
if (props.checkStrictly) return;
|
|
33744
|
+
if (!props.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
|
|
33745
|
+
return [];
|
|
33746
|
+
}
|
|
33747
|
+
const pathMap = new Map();
|
|
33748
|
+
const traverse = (data, path = []) => {
|
|
33749
|
+
data.forEach(item => {
|
|
33750
|
+
const v = item.value;
|
|
33751
|
+
if (v == null) return;
|
|
33752
|
+
const fullPath = [...path, v];
|
|
33753
|
+
pathMap.set(v, fullPath);
|
|
33754
|
+
if (item.children?.length) traverse(item.children, fullPath);
|
|
33755
|
+
});
|
|
33756
|
+
};
|
|
33757
|
+
traverse(props.data);
|
|
33758
|
+
const allPaths = currentValue.value.map(v => pathMap.get(v)).filter(Boolean);
|
|
33759
|
+
return allPaths.filter(path => !allPaths.some(other => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
|
|
33760
|
+
});
|
|
32773
33761
|
const source = vue.computed(() => {
|
|
32774
33762
|
return flattenData$1(props.data, {
|
|
32775
33763
|
parent: true,
|
|
32776
33764
|
cascader: true
|
|
32777
33765
|
});
|
|
32778
33766
|
});
|
|
33767
|
+
const labelMap = vue.computed(() => {
|
|
33768
|
+
return source.value.reduce((pre, cur) => {
|
|
33769
|
+
pre[cur.value] = cur.label || '';
|
|
33770
|
+
return pre;
|
|
33771
|
+
}, {});
|
|
33772
|
+
});
|
|
32779
33773
|
const icon = vue.computed(() => {
|
|
32780
33774
|
return isActive.value ? 'up' : 'down';
|
|
32781
33775
|
});
|
|
@@ -32792,17 +33786,34 @@ var VcComponents = (function (exports, vue) {
|
|
|
32792
33786
|
'is-disabled': props.disabled
|
|
32793
33787
|
};
|
|
32794
33788
|
});
|
|
32795
|
-
const
|
|
33789
|
+
const displayTags = vue.computed(() => {
|
|
32796
33790
|
if (!props.data.length) {
|
|
32797
33791
|
return [];
|
|
32798
33792
|
}
|
|
32799
|
-
|
|
33793
|
+
if (props.checkStrictly) {
|
|
33794
|
+
return currentValue.value.map(v => ({
|
|
33795
|
+
value: v,
|
|
33796
|
+
label: labelMap.value[v] || ''
|
|
33797
|
+
}));
|
|
33798
|
+
}
|
|
33799
|
+
return (currentValueGroups.value || []).map(path => {
|
|
33800
|
+
const value = path[path.length - 1];
|
|
33801
|
+
const label = path.map(v => labelMap.value[v] || '').filter(Boolean).join(' / ');
|
|
33802
|
+
return {
|
|
33803
|
+
path,
|
|
33804
|
+
value,
|
|
33805
|
+
label
|
|
33806
|
+
};
|
|
33807
|
+
});
|
|
32800
33808
|
});
|
|
32801
33809
|
const collapseTagCount = vue.computed(() => {
|
|
32802
33810
|
if (!props.maxTags) return 0;
|
|
32803
|
-
const v =
|
|
33811
|
+
const v = displayTags.value.length - props.maxTags;
|
|
32804
33812
|
return v < 0 ? 0 : v;
|
|
32805
33813
|
});
|
|
33814
|
+
const autoWidth = vue.computed(() => {
|
|
33815
|
+
return typeof props.autoWidth === 'boolean' ? props.autoWidth : !!props.cascader;
|
|
33816
|
+
});
|
|
32806
33817
|
|
|
32807
33818
|
/**
|
|
32808
33819
|
* v-model 同步, 外部的数据改变时不会触发
|
|
@@ -32815,8 +33826,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
32815
33826
|
separator: props.separator,
|
|
32816
33827
|
nullValue: props.nullValue
|
|
32817
33828
|
});
|
|
32818
|
-
|
|
32819
|
-
emit('
|
|
33829
|
+
const labels = displayTags.value.map(item => item.label);
|
|
33830
|
+
emit('update:modelValue', v, labels);
|
|
33831
|
+
emit('change', v, labels);
|
|
32820
33832
|
|
|
32821
33833
|
// form表单
|
|
32822
33834
|
formItem?.change?.(currentValue.value);
|
|
@@ -32841,8 +33853,15 @@ var VcComponents = (function (exports, vue) {
|
|
|
32841
33853
|
const close = () => {
|
|
32842
33854
|
isActive.value = false;
|
|
32843
33855
|
};
|
|
32844
|
-
const handleClose =
|
|
32845
|
-
|
|
33856
|
+
const handleClose = item => {
|
|
33857
|
+
if (props.checkStrictly) {
|
|
33858
|
+
const index = currentValue.value.findIndex(v => v === item.value);
|
|
33859
|
+
if (index === -1) return;
|
|
33860
|
+
currentValue.value = currentValue.value.filter((_, i) => i !== index);
|
|
33861
|
+
} else if (item.path) {
|
|
33862
|
+
const remaining = (currentValueGroups.value || []).filter(p => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
|
|
33863
|
+
currentValue.value = [...new Set(remaining.flat())];
|
|
33864
|
+
}
|
|
32846
33865
|
sync();
|
|
32847
33866
|
};
|
|
32848
33867
|
const handleClear = e => {
|
|
@@ -32879,6 +33898,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
32879
33898
|
multiple,
|
|
32880
33899
|
isActive,
|
|
32881
33900
|
current: currentValue,
|
|
33901
|
+
currentValueGroups,
|
|
32882
33902
|
// for portal
|
|
32883
33903
|
toggle(v) {
|
|
32884
33904
|
v = typeof v === 'boolean' ? v : !isActive.value;
|
|
@@ -32893,7 +33913,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
32893
33913
|
"trigger": props.trigger,
|
|
32894
33914
|
"tag": props.tag,
|
|
32895
33915
|
"placement": props.placement,
|
|
32896
|
-
"
|
|
33916
|
+
"autoWidth": autoWidth.value,
|
|
32897
33917
|
"disabled": props.disabled,
|
|
32898
33918
|
"portalClass": [['is-padding-none', props.portalClass]],
|
|
32899
33919
|
"class": [classes.value, its.value.class, 'vc-tree-select'],
|
|
@@ -32910,22 +33930,22 @@ var VcComponents = (function (exports, vue) {
|
|
|
32910
33930
|
return vue.createVNode(Input$1, {
|
|
32911
33931
|
"id": props.id,
|
|
32912
33932
|
"disabled": props.disabled,
|
|
32913
|
-
"modelValue":
|
|
33933
|
+
"modelValue": displayTags.value[0]?.label || props.extra,
|
|
32914
33934
|
"allow-dispatch": false,
|
|
32915
33935
|
"class": "vc-tree-select__input",
|
|
32916
33936
|
"readonly": true,
|
|
32917
33937
|
"placeholder": its.value.attrs?.placeholder || '请选择'
|
|
32918
33938
|
}, {
|
|
32919
|
-
content: multiple.value &&
|
|
33939
|
+
content: multiple.value && displayTags.value.length > 0 ? () => {
|
|
32920
33940
|
return vue.createVNode("div", {
|
|
32921
33941
|
"class": [classes.value, 'vc-tree-select__tags']
|
|
32922
|
-
}, [
|
|
33942
|
+
}, [displayTags.value.slice(0, props.maxTags).map(item => {
|
|
32923
33943
|
return vue.createVNode(Tag, {
|
|
32924
|
-
"key": item,
|
|
33944
|
+
"key": item.path ? item.path.join('-') : item.value,
|
|
32925
33945
|
"closable": !props.disabled,
|
|
32926
|
-
"onClose": () => handleClose(
|
|
33946
|
+
"onClose": () => handleClose(item)
|
|
32927
33947
|
}, {
|
|
32928
|
-
default: () => [
|
|
33948
|
+
default: () => [item.label]
|
|
32929
33949
|
});
|
|
32930
33950
|
}), collapseTagCount.value ? vue.createVNode(Tag, null, {
|
|
32931
33951
|
default: () => [`+${collapseTagCount.value}...`]
|
|
@@ -32958,16 +33978,23 @@ var VcComponents = (function (exports, vue) {
|
|
|
32958
33978
|
}, [vue.createVNode(Spin, {
|
|
32959
33979
|
"size": 16
|
|
32960
33980
|
}, null)]), vue.createVNode(Scroller, {
|
|
32961
|
-
"class":
|
|
33981
|
+
"class": ['vc-tree-select__options', props.cascader && 'is-cascader'],
|
|
32962
33982
|
"max-height": "200px"
|
|
32963
33983
|
}, {
|
|
32964
|
-
default: () => [vue.createVNode(
|
|
32965
|
-
"
|
|
32966
|
-
"
|
|
33984
|
+
default: () => [props.cascader ? vue.createVNode(TreeSelectContentCascader, {
|
|
33985
|
+
"value": currentValue.value,
|
|
33986
|
+
"data": props.data,
|
|
33987
|
+
"checkStrictly": props.checkStrictly,
|
|
33988
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
33989
|
+
"numerable": props.numerable,
|
|
33990
|
+
"separator": props.separator,
|
|
33991
|
+
"max": props.max,
|
|
33992
|
+
"nullValue": props.nullValue,
|
|
33993
|
+
"onChange": handleChange
|
|
33994
|
+
}, null) : vue.createVNode(TreeSelectContent, {
|
|
33995
|
+
"value": currentValue.value,
|
|
32967
33996
|
"data": props.data,
|
|
32968
33997
|
"checkStrictly": props.checkStrictly,
|
|
32969
|
-
"allowDispatch": false,
|
|
32970
|
-
"showCheckbox": true,
|
|
32971
33998
|
"renderNodeLabel": props.renderNodeLabel,
|
|
32972
33999
|
"onChange": handleChange
|
|
32973
34000
|
}, null)]
|
|
@@ -139695,6 +140722,7 @@ ${r}
|
|
|
139695
140722
|
exports.Calendar = Calendar$1;
|
|
139696
140723
|
exports.Card = Card;
|
|
139697
140724
|
exports.Carousel = Carousel;
|
|
140725
|
+
exports.CarouselItem = CarouselItem;
|
|
139698
140726
|
exports.Cascader = Cascader;
|
|
139699
140727
|
exports.Chart = Chart;
|
|
139700
140728
|
exports.Checkbox = Checkbox;
|
|
@@ -139740,6 +140768,7 @@ ${r}
|
|
|
139740
140768
|
exports.MCalendar = MCalendar;
|
|
139741
140769
|
exports.MCard = MCard;
|
|
139742
140770
|
exports.MCarousel = MCarousel;
|
|
140771
|
+
exports.MCarouselItem = MCarouselItem;
|
|
139743
140772
|
exports.MCascader = MCascader;
|
|
139744
140773
|
exports.MChart = MChart;
|
|
139745
140774
|
exports.MCheckbox = MCheckbox;
|