@deot/vc-components 1.0.63 → 1.0.65
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 +1381 -339
- package/dist/index.d.ts +386 -101
- package/dist/index.iife.js +1443 -401
- package/dist/index.js +1383 -343
- package/dist/index.style.css +2 -2
- package/dist/index.umd.cjs +1443 -401
- 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,799 @@ 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 DRAG_CLICK_SUPPRESS_PX = 5;
|
|
7114
|
+
const swallowNextClickFromDrag = () => {
|
|
7115
|
+
let invoked = false;
|
|
7116
|
+
const options = { capture: true, once: true };
|
|
7117
|
+
const swallow = (e) => {
|
|
7118
|
+
invoked = true;
|
|
7119
|
+
e.preventDefault();
|
|
7120
|
+
e.stopPropagation();
|
|
7121
|
+
e.stopImmediatePropagation();
|
|
7122
|
+
};
|
|
7123
|
+
document.addEventListener("click", swallow, options);
|
|
7124
|
+
setTimeout(() => !invoked && document.removeEventListener("click", swallow, options), 0);
|
|
7125
|
+
};
|
|
7126
|
+
const useCarousel = (wrapper, content, expose) => {
|
|
7127
|
+
const instance = vue.getCurrentInstance();
|
|
7128
|
+
const props = instance.props;
|
|
7129
|
+
const { emit } = instance;
|
|
7130
|
+
const items = vue.ref([]);
|
|
7131
|
+
const activeIndex = vue.ref(-1);
|
|
7132
|
+
const timer = vue.ref(null);
|
|
7133
|
+
const offset = vue.ref(0);
|
|
7134
|
+
const carouselId = vue.ref(getUid("carousel"));
|
|
7135
|
+
const start = vue.ref();
|
|
7136
|
+
const startX = vue.ref();
|
|
7137
|
+
const startY = vue.ref();
|
|
7138
|
+
const dragMovedPastThreshold = vue.ref(false);
|
|
7139
|
+
const allowTransition = vue.ref(false);
|
|
7140
|
+
const direction = vue.computed(() => {
|
|
7141
|
+
return props.vertical ? "vertical" : "horizontal";
|
|
7142
|
+
});
|
|
7143
|
+
const hasLabel = vue.computed(() => {
|
|
7144
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
7145
|
+
});
|
|
7146
|
+
const dotsClasses = vue.computed(() => {
|
|
7147
|
+
const classes = ["is-" + direction.value];
|
|
7148
|
+
if (hasLabel.value) {
|
|
7149
|
+
classes.push("is-labels");
|
|
7150
|
+
}
|
|
7151
|
+
if (props.dots === "outside" || props.card) {
|
|
7152
|
+
classes.push("is-outside");
|
|
7153
|
+
}
|
|
7154
|
+
return classes;
|
|
7155
|
+
});
|
|
7156
|
+
const resetItems = (oldIndex) => {
|
|
7157
|
+
items.value.forEach((item, index) => {
|
|
7158
|
+
item.exposed?.reset?.(index, activeIndex.value, oldIndex);
|
|
7159
|
+
});
|
|
7160
|
+
};
|
|
7161
|
+
const playSlides = () => {
|
|
7162
|
+
allowTransition.value = true;
|
|
7163
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
7164
|
+
activeIndex.value++;
|
|
7165
|
+
} else if (props.loop) {
|
|
7166
|
+
activeIndex.value = 0;
|
|
7167
|
+
}
|
|
7168
|
+
};
|
|
7169
|
+
const pauseTimer = () => {
|
|
7170
|
+
if (timer.value) {
|
|
7171
|
+
clearInterval(timer.value);
|
|
7172
|
+
timer.value = null;
|
|
7173
|
+
}
|
|
7174
|
+
};
|
|
7175
|
+
const startTimer = () => {
|
|
7176
|
+
if (props.t <= 0 || !props.autoplay || timer.value) return;
|
|
7177
|
+
timer.value = setInterval(playSlides, props.t);
|
|
7178
|
+
};
|
|
7179
|
+
const setActiveItem = (index) => {
|
|
7180
|
+
if (typeof index === "string") {
|
|
7181
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
7182
|
+
if (filteredItems.length > 0) {
|
|
7183
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
7184
|
+
}
|
|
7185
|
+
}
|
|
7186
|
+
index = Number(index);
|
|
7187
|
+
if (isNaN(index) || index !== Math.floor(index)) {
|
|
7188
|
+
throw new VcError("carousel", "索引必须是整数");
|
|
7189
|
+
}
|
|
7190
|
+
const length = items.value.length;
|
|
7191
|
+
const oldIndex = activeIndex.value;
|
|
7192
|
+
if (index < 0) {
|
|
7193
|
+
activeIndex.value = props.loop ? length - 1 : 0;
|
|
7194
|
+
} else if (index >= length) {
|
|
7195
|
+
activeIndex.value = props.loop ? 0 : length - 1;
|
|
7196
|
+
} else {
|
|
7197
|
+
activeIndex.value = index;
|
|
7198
|
+
}
|
|
7199
|
+
if (oldIndex === activeIndex.value) {
|
|
7200
|
+
resetItems(oldIndex);
|
|
7201
|
+
}
|
|
7202
|
+
};
|
|
7203
|
+
const prev = () => {
|
|
7204
|
+
setActiveItem(activeIndex.value - 1);
|
|
7205
|
+
};
|
|
7206
|
+
const next = () => {
|
|
7207
|
+
setActiveItem(activeIndex.value + 1);
|
|
7208
|
+
};
|
|
7209
|
+
const handleDotClick = (index) => {
|
|
7210
|
+
activeIndex.value = index;
|
|
7211
|
+
};
|
|
7212
|
+
const handleStart = (e) => {
|
|
7213
|
+
allowTransition.value = true;
|
|
7214
|
+
if (!props.draggable) return;
|
|
7215
|
+
pauseTimer();
|
|
7216
|
+
start.value = true;
|
|
7217
|
+
dragMovedPastThreshold.value = false;
|
|
7218
|
+
startX.value = e.screenX;
|
|
7219
|
+
startY.value = e.screenY;
|
|
7220
|
+
};
|
|
7221
|
+
const handleMove = (e) => {
|
|
7222
|
+
if (!start.value || !props.draggable) return;
|
|
7223
|
+
offset.value = !props.vertical ? e.screenX - startX.value : e.screenY - startY.value;
|
|
7224
|
+
if (Math.abs(offset.value) > DRAG_CLICK_SUPPRESS_PX) {
|
|
7225
|
+
dragMovedPastThreshold.value = true;
|
|
7226
|
+
}
|
|
7227
|
+
resetItems();
|
|
7228
|
+
};
|
|
7229
|
+
const handleEnd = () => {
|
|
7230
|
+
if (!props.draggable) return;
|
|
7231
|
+
const shouldSwallowClick = dragMovedPastThreshold.value;
|
|
7232
|
+
start.value = false;
|
|
7233
|
+
startTimer();
|
|
7234
|
+
const $offset = Math.abs(offset.value);
|
|
7235
|
+
const $direction = offset.value > 0;
|
|
7236
|
+
offset.value = 0;
|
|
7237
|
+
if ($offset > 5) {
|
|
7238
|
+
$direction && prev();
|
|
7239
|
+
!$direction && next();
|
|
7240
|
+
} else {
|
|
7241
|
+
resetItems();
|
|
7242
|
+
}
|
|
7243
|
+
if (shouldSwallowClick) {
|
|
7244
|
+
swallowNextClickFromDrag();
|
|
7245
|
+
}
|
|
7246
|
+
dragMovedPastThreshold.value = false;
|
|
7247
|
+
};
|
|
7248
|
+
vue.watch(
|
|
7249
|
+
() => items.value,
|
|
7250
|
+
(v) => {
|
|
7251
|
+
if (v.length > 0) setActiveItem(props.initialIndex);
|
|
7252
|
+
}
|
|
7253
|
+
);
|
|
7254
|
+
vue.watch(
|
|
7255
|
+
() => activeIndex.value,
|
|
7256
|
+
(v, oldV) => {
|
|
7257
|
+
resetItems(oldV);
|
|
7258
|
+
emit("change", v, oldV);
|
|
7259
|
+
}
|
|
7260
|
+
);
|
|
7261
|
+
vue.watch(
|
|
7262
|
+
() => props.autoplay,
|
|
7263
|
+
(v) => {
|
|
7264
|
+
v ? startTimer() : pauseTimer();
|
|
7265
|
+
}
|
|
7266
|
+
);
|
|
7267
|
+
vue.watch(
|
|
7268
|
+
() => props.loop,
|
|
7269
|
+
() => {
|
|
7270
|
+
setActiveItem(activeIndex.value);
|
|
7271
|
+
}
|
|
7272
|
+
);
|
|
7273
|
+
vue.watch(
|
|
7274
|
+
() => props.t,
|
|
7275
|
+
() => {
|
|
7276
|
+
pauseTimer();
|
|
7277
|
+
startTimer();
|
|
7278
|
+
}
|
|
7279
|
+
);
|
|
7280
|
+
vue.onMounted(() => {
|
|
7281
|
+
vue.nextTick(() => {
|
|
7282
|
+
if (wrapper.value) Resize.on(wrapper.value, resetItems);
|
|
7283
|
+
if (props.initialIndex < items.value.length && props.initialIndex >= 0) {
|
|
7284
|
+
activeIndex.value = props.initialIndex;
|
|
7285
|
+
}
|
|
7286
|
+
startTimer();
|
|
7287
|
+
});
|
|
7288
|
+
});
|
|
7289
|
+
vue.onBeforeUnmount(() => {
|
|
7290
|
+
if (wrapper.value) Resize.off(wrapper.value, resetItems);
|
|
7291
|
+
pauseTimer();
|
|
7292
|
+
startTimer();
|
|
7293
|
+
});
|
|
7294
|
+
const add = (item) => {
|
|
7295
|
+
if (!item) return;
|
|
7296
|
+
vue.nextTick(() => {
|
|
7297
|
+
if (content.value) {
|
|
7298
|
+
const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
|
|
7299
|
+
items.value.splice(index, 0, item);
|
|
7300
|
+
return;
|
|
7301
|
+
}
|
|
7302
|
+
items.value.push(item);
|
|
7303
|
+
});
|
|
7304
|
+
};
|
|
7305
|
+
const remove = (item) => {
|
|
7306
|
+
if (!item) return;
|
|
7307
|
+
items.value.splice(items.value.indexOf(item), 1);
|
|
7308
|
+
};
|
|
7309
|
+
vue.provide("vc-carousel", {
|
|
7310
|
+
props,
|
|
7311
|
+
items,
|
|
7312
|
+
offset,
|
|
7313
|
+
allowTransition,
|
|
7314
|
+
setActiveItem,
|
|
7315
|
+
wrapper,
|
|
7316
|
+
content,
|
|
7317
|
+
add,
|
|
7318
|
+
remove
|
|
7319
|
+
});
|
|
7320
|
+
expose({
|
|
7321
|
+
setActiveItem,
|
|
7322
|
+
prev,
|
|
7323
|
+
next
|
|
7324
|
+
});
|
|
7325
|
+
return {
|
|
7326
|
+
carouselId,
|
|
7327
|
+
allowTransition,
|
|
7328
|
+
items,
|
|
7329
|
+
activeIndex,
|
|
7330
|
+
offset,
|
|
7331
|
+
direction,
|
|
7332
|
+
hasLabel,
|
|
7333
|
+
dotsClasses,
|
|
7334
|
+
start,
|
|
7335
|
+
startX,
|
|
7336
|
+
startY,
|
|
7337
|
+
handleStart,
|
|
7338
|
+
handleMove,
|
|
7339
|
+
handleEnd,
|
|
7340
|
+
handleDotClick,
|
|
7341
|
+
prev,
|
|
7342
|
+
next,
|
|
7343
|
+
setActiveItem,
|
|
7344
|
+
pauseTimer,
|
|
7345
|
+
startTimer
|
|
7346
|
+
};
|
|
7347
|
+
};
|
|
7348
|
+
|
|
7349
|
+
const props$1j = {
|
|
7350
|
+
t: {
|
|
7351
|
+
type: Number,
|
|
7352
|
+
default: 3e3
|
|
7353
|
+
},
|
|
7354
|
+
card: Boolean,
|
|
7355
|
+
gutter: {
|
|
7356
|
+
type: Number,
|
|
7357
|
+
default: 0
|
|
7358
|
+
},
|
|
7359
|
+
height: [String, Number],
|
|
7360
|
+
initialIndex: {
|
|
7361
|
+
type: Number,
|
|
7362
|
+
default: 0
|
|
7363
|
+
},
|
|
7364
|
+
trigger: {
|
|
7052
7365
|
type: String,
|
|
7053
|
-
default: "
|
|
7366
|
+
default: "hover"
|
|
7367
|
+
},
|
|
7368
|
+
autoplay: {
|
|
7369
|
+
type: Boolean,
|
|
7370
|
+
default: true
|
|
7371
|
+
},
|
|
7372
|
+
dots: {
|
|
7373
|
+
type: [String, Boolean],
|
|
7374
|
+
default: "bottom"
|
|
7375
|
+
// bottom/outside | false
|
|
7376
|
+
},
|
|
7377
|
+
arrow: {
|
|
7378
|
+
type: [String, Boolean],
|
|
7379
|
+
default: "hover"
|
|
7380
|
+
// hover/always | false
|
|
7381
|
+
},
|
|
7382
|
+
loop: {
|
|
7383
|
+
type: Boolean,
|
|
7384
|
+
default: true
|
|
7385
|
+
},
|
|
7386
|
+
vertical: {
|
|
7387
|
+
type: Boolean,
|
|
7388
|
+
default: false
|
|
7389
|
+
},
|
|
7390
|
+
draggable: {
|
|
7391
|
+
type: Boolean,
|
|
7392
|
+
default: true
|
|
7054
7393
|
}
|
|
7055
7394
|
};
|
|
7056
7395
|
|
|
7057
7396
|
/** @jsxImportSource vue */
|
|
7058
7397
|
|
|
7059
|
-
const COMPONENT_NAME$
|
|
7398
|
+
const COMPONENT_NAME$1$ = 'vc-carousel';
|
|
7060
7399
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
7061
|
-
name: COMPONENT_NAME$
|
|
7400
|
+
name: COMPONENT_NAME$1$,
|
|
7401
|
+
props: props$1j,
|
|
7402
|
+
setup(props, {
|
|
7403
|
+
slots,
|
|
7404
|
+
expose
|
|
7405
|
+
}) {
|
|
7406
|
+
const isHover = vue.ref(false);
|
|
7407
|
+
const wrapper = vue.ref(null);
|
|
7408
|
+
const content = vue.ref(null);
|
|
7409
|
+
const arrowDisplay = vue.computed(() => {
|
|
7410
|
+
return props.arrow && !props.vertical;
|
|
7411
|
+
});
|
|
7412
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
7413
|
+
const itemInStage = (item, index, items) => {
|
|
7414
|
+
const length = items.length;
|
|
7415
|
+
const isInStage = item.exposed.isInStage.value;
|
|
7416
|
+
if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
|
|
7417
|
+
return 'left';
|
|
7418
|
+
} else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
|
|
7419
|
+
return 'right';
|
|
7420
|
+
}
|
|
7421
|
+
return false;
|
|
7422
|
+
};
|
|
7423
|
+
const handleButtonEnter = arrow => {
|
|
7424
|
+
if (props.vertical) return;
|
|
7425
|
+
carousel.items.value.forEach((item, index, items) => {
|
|
7426
|
+
if (arrow === itemInStage(item, index, items)) {
|
|
7427
|
+
item.exposed.isHover.value = true;
|
|
7428
|
+
}
|
|
7429
|
+
});
|
|
7430
|
+
};
|
|
7431
|
+
const handleButtonLeave = () => {
|
|
7432
|
+
if (props.vertical) return;
|
|
7433
|
+
carousel.items.value.forEach(item => {
|
|
7434
|
+
item.exposed.isHover.value = false;
|
|
7435
|
+
});
|
|
7436
|
+
};
|
|
7437
|
+
const handleDotHover = index => {
|
|
7438
|
+
if (props.trigger === 'hover' && index !== carousel.activeIndex.value) {
|
|
7439
|
+
carousel.activeIndex.value = index;
|
|
7440
|
+
}
|
|
7441
|
+
};
|
|
7442
|
+
const handleMouseEnter = () => {
|
|
7443
|
+
isHover.value = true;
|
|
7444
|
+
carousel.pauseTimer();
|
|
7445
|
+
};
|
|
7446
|
+
const handleMouseLeave = () => {
|
|
7447
|
+
isHover.value = false;
|
|
7448
|
+
carousel.startTimer();
|
|
7449
|
+
};
|
|
7450
|
+
const throttledArrowClick = throttle$1(carousel.setActiveItem);
|
|
7451
|
+
const throttledDotHover = throttle$1(handleDotHover);
|
|
7452
|
+
return () => {
|
|
7453
|
+
return vue.createVNode("div", {
|
|
7454
|
+
"ref": wrapper,
|
|
7455
|
+
"class": ['vc-carousel', `is-${carousel.direction.value}`],
|
|
7456
|
+
"onMousedown": vue.withModifiers(carousel.handleStart, ['stop', 'prevent']),
|
|
7457
|
+
"onMousemove": vue.withModifiers(carousel.handleMove, ['stop', 'prevent']),
|
|
7458
|
+
"onMouseup": vue.withModifiers(carousel.handleEnd, ['stop', 'prevent']),
|
|
7459
|
+
"onMouseenter": vue.withModifiers(handleMouseEnter, ['stop']),
|
|
7460
|
+
"onMouseleave": vue.withModifiers(handleMouseLeave, ['stop'])
|
|
7461
|
+
}, [vue.createVNode("div", {
|
|
7462
|
+
"ref": content,
|
|
7463
|
+
"class": "vc-carousel__wrapper",
|
|
7464
|
+
"style": {
|
|
7465
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
7466
|
+
}
|
|
7467
|
+
}, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
7468
|
+
"mode": "left-part"
|
|
7469
|
+
}, {
|
|
7470
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
7471
|
+
"type": "button",
|
|
7472
|
+
"class": "vc-carousel__arrow is-left-arrow",
|
|
7473
|
+
"onMouseenter": () => handleButtonEnter('left'),
|
|
7474
|
+
"onMouseleave": handleButtonLeave,
|
|
7475
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ['stop'])
|
|
7476
|
+
}, [vue.createVNode(Icon, {
|
|
7477
|
+
"type": "left"
|
|
7478
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value > 0)]])]
|
|
7479
|
+
}), arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
7480
|
+
"mode": "right-part"
|
|
7481
|
+
}, {
|
|
7482
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
7483
|
+
"type": "button",
|
|
7484
|
+
"class": "vc-carousel__arrow is-right-arrow",
|
|
7485
|
+
"onMouseenter": () => handleButtonEnter('right'),
|
|
7486
|
+
"onMouseleave": handleButtonLeave,
|
|
7487
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ['stop'])
|
|
7488
|
+
}, [vue.createVNode(Icon, {
|
|
7489
|
+
"type": "right"
|
|
7490
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
|
|
7491
|
+
}), slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
7492
|
+
"class": ['vc-carousel__dots', ...carousel.dotsClasses.value]
|
|
7493
|
+
}, [carousel.items.value.map((item, index) => vue.createVNode("li", {
|
|
7494
|
+
"key": index,
|
|
7495
|
+
"class": ['vc-carousel__dot', `is-${carousel.direction.value}`, {
|
|
7496
|
+
'is-active': index === carousel.activeIndex.value
|
|
7497
|
+
}],
|
|
7498
|
+
"onMouseenter": () => throttledDotHover(index),
|
|
7499
|
+
"onClick": () => carousel.handleDotClick(index)
|
|
7500
|
+
}, [vue.createVNode("button", {
|
|
7501
|
+
"class": "vc-carousel__button"
|
|
7502
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
|
|
7503
|
+
};
|
|
7504
|
+
}
|
|
7505
|
+
});
|
|
7506
|
+
|
|
7507
|
+
const props$1i = {
|
|
7508
|
+
name: String,
|
|
7509
|
+
label: {
|
|
7510
|
+
type: [String, Number],
|
|
7511
|
+
default: ""
|
|
7512
|
+
},
|
|
7513
|
+
// card大小
|
|
7514
|
+
width: {
|
|
7515
|
+
type: [Number, String],
|
|
7516
|
+
default: "70%"
|
|
7517
|
+
},
|
|
7518
|
+
// card之间间距, 或者滑动时候的间距
|
|
7519
|
+
gutter: {
|
|
7520
|
+
type: Number,
|
|
7521
|
+
default: 0
|
|
7522
|
+
},
|
|
7523
|
+
scale: {
|
|
7524
|
+
type: Number,
|
|
7525
|
+
default: 0.83
|
|
7526
|
+
}
|
|
7527
|
+
};
|
|
7528
|
+
|
|
7529
|
+
const TRANSFORM = prefixStyle("transform").camel;
|
|
7530
|
+
const useCarouselItem = (expose) => {
|
|
7531
|
+
const instance = vue.getCurrentInstance();
|
|
7532
|
+
const carousel = vue.inject("vc-carousel", {});
|
|
7533
|
+
const props = instance.props;
|
|
7534
|
+
const translate = vue.ref(0);
|
|
7535
|
+
const currentScale = vue.ref(1);
|
|
7536
|
+
const isHover = vue.ref(false);
|
|
7537
|
+
const isActive = vue.ref(false);
|
|
7538
|
+
const isReady = vue.ref(false);
|
|
7539
|
+
const isInStage = vue.ref(false);
|
|
7540
|
+
const isAnimating = vue.ref(false);
|
|
7541
|
+
const isVertical = vue.computed(() => {
|
|
7542
|
+
return carousel.props.vertical;
|
|
7543
|
+
});
|
|
7544
|
+
const isCard = vue.computed(() => {
|
|
7545
|
+
return carousel.props.card;
|
|
7546
|
+
});
|
|
7547
|
+
const isMove = vue.computed(() => {
|
|
7548
|
+
return carousel.offset.value !== 0;
|
|
7549
|
+
});
|
|
7550
|
+
const itemGutter = vue.computed(() => {
|
|
7551
|
+
return props.gutter || carousel.props.gutter || 0;
|
|
7552
|
+
});
|
|
7553
|
+
const itemStyle = vue.computed(() => {
|
|
7554
|
+
const translateType = isVertical.value ? "translateY" : "translateX";
|
|
7555
|
+
if (carousel.props.card) {
|
|
7556
|
+
return {
|
|
7557
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
7558
|
+
width: props.width
|
|
7559
|
+
};
|
|
7560
|
+
} else {
|
|
7561
|
+
return {
|
|
7562
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
7563
|
+
width: itemGutter.value ? props.width : "100%"
|
|
7564
|
+
};
|
|
7565
|
+
}
|
|
7566
|
+
});
|
|
7567
|
+
vue.onBeforeMount(() => {
|
|
7568
|
+
carousel.add?.(instance);
|
|
7569
|
+
if (!isCard.value && itemGutter.value && carousel.props.loop) {
|
|
7570
|
+
throw new VcError("carousel", "slide模式下loop不能为true");
|
|
7571
|
+
}
|
|
7572
|
+
});
|
|
7573
|
+
vue.onBeforeUnmount(() => {
|
|
7574
|
+
carousel.remove?.(instance);
|
|
7575
|
+
});
|
|
7576
|
+
const processIndex = (index, activeIndex, length) => {
|
|
7577
|
+
if (activeIndex === 0 && index === length - 1) {
|
|
7578
|
+
return -1;
|
|
7579
|
+
} else if (activeIndex === length - 1 && index === 0) {
|
|
7580
|
+
return length;
|
|
7581
|
+
} else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
|
|
7582
|
+
return length + 1;
|
|
7583
|
+
} else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
|
|
7584
|
+
return -2;
|
|
7585
|
+
}
|
|
7586
|
+
return index;
|
|
7587
|
+
};
|
|
7588
|
+
const calcCardTranslate = (index, activeIndex) => {
|
|
7589
|
+
let value;
|
|
7590
|
+
const widthNumber = +props.width / 100;
|
|
7591
|
+
const parentW = carousel.wrapper.value.offsetWidth;
|
|
7592
|
+
if (isInStage.value) {
|
|
7593
|
+
if (index === activeIndex) {
|
|
7594
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
7595
|
+
} else if (index > activeIndex) {
|
|
7596
|
+
value = parentW * (1 + widthNumber * props.scale) / 2 + itemGutter.value;
|
|
7597
|
+
} else {
|
|
7598
|
+
value = -(parentW * ((widthNumber * props.scale - 1) / 2 + widthNumber)) - itemGutter.value;
|
|
7599
|
+
}
|
|
7600
|
+
} else if (index < activeIndex) {
|
|
7601
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
7602
|
+
} else {
|
|
7603
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
7604
|
+
}
|
|
7605
|
+
return value;
|
|
7606
|
+
};
|
|
7607
|
+
const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
|
|
7608
|
+
const { length } = carousel.items.value;
|
|
7609
|
+
const offset = wrapperWidth - (carousel.wrapper?.value?.offsetWidth || 0);
|
|
7610
|
+
const gutter = itemGutter.value;
|
|
7611
|
+
if (!gutter || isVertical.value) return 0;
|
|
7612
|
+
let slideOffset = 0;
|
|
7613
|
+
if (length === 1) {
|
|
7614
|
+
return offset / 2;
|
|
7615
|
+
}
|
|
7616
|
+
if (activeIndex == 0) {
|
|
7617
|
+
if (index - activeIndex === 0) {
|
|
7618
|
+
slideOffset = gutter;
|
|
7619
|
+
} else if (index - activeIndex === 1) {
|
|
7620
|
+
slideOffset = -offset + gutter * 2;
|
|
7621
|
+
}
|
|
7622
|
+
}
|
|
7623
|
+
if (activeIndex !== 0 && activeIndex != length - 1) {
|
|
7624
|
+
if (index - activeIndex === 0) {
|
|
7625
|
+
slideOffset = offset / 2;
|
|
7626
|
+
} else if (index - activeIndex === 1) {
|
|
7627
|
+
slideOffset = -offset / 2 + gutter;
|
|
7628
|
+
} else if (index - activeIndex === -1) {
|
|
7629
|
+
slideOffset = offset * 3 / 2 - gutter;
|
|
7630
|
+
}
|
|
7631
|
+
}
|
|
7632
|
+
if (activeIndex == length - 1) {
|
|
7633
|
+
if (index - activeIndex === 0) {
|
|
7634
|
+
slideOffset = offset - gutter;
|
|
7635
|
+
} else if (index - activeIndex === -1) {
|
|
7636
|
+
slideOffset = offset * 2 - gutter * 2;
|
|
7637
|
+
}
|
|
7638
|
+
}
|
|
7639
|
+
return slideOffset;
|
|
7640
|
+
};
|
|
7641
|
+
const calcTranslate = (index, activeIndex) => {
|
|
7642
|
+
const distance = carousel.wrapper.value[isVertical.value ? "offsetHeight" : "offsetWidth"];
|
|
7643
|
+
const slideOffset = calcSlideOffset(index, activeIndex, distance);
|
|
7644
|
+
return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
|
|
7645
|
+
};
|
|
7646
|
+
const reset = (index, activeIndex, oldIndex) => {
|
|
7647
|
+
const { length } = carousel.items.value;
|
|
7648
|
+
if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
|
|
7649
|
+
isAnimating.value = index === activeIndex || index === oldIndex;
|
|
7650
|
+
if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
|
|
7651
|
+
isAnimating.value = true;
|
|
7652
|
+
}
|
|
7653
|
+
}
|
|
7654
|
+
if (index !== activeIndex && length > 2 && carousel.props.loop) {
|
|
7655
|
+
index = processIndex(index, activeIndex, length);
|
|
7656
|
+
}
|
|
7657
|
+
if (isCard.value) {
|
|
7658
|
+
if (isVertical.value) {
|
|
7659
|
+
throw new VcError("carousel", "卡片模式不支持垂直方向");
|
|
7660
|
+
}
|
|
7661
|
+
isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
7662
|
+
isActive.value = index === activeIndex;
|
|
7663
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
7664
|
+
currentScale.value = isActive.value ? 1 : props.scale;
|
|
7665
|
+
} else {
|
|
7666
|
+
isActive.value = index === activeIndex;
|
|
7667
|
+
translate.value = calcTranslate(index, activeIndex);
|
|
7668
|
+
}
|
|
7669
|
+
isReady.value = true;
|
|
7670
|
+
};
|
|
7671
|
+
const handleItemClick = () => {
|
|
7672
|
+
if (parent && isCard.value) {
|
|
7673
|
+
const index = carousel.items.value.indexOf(instance);
|
|
7674
|
+
carousel.setActiveItem(index);
|
|
7675
|
+
}
|
|
7676
|
+
};
|
|
7677
|
+
expose({
|
|
7678
|
+
reset,
|
|
7679
|
+
isInStage,
|
|
7680
|
+
isHover,
|
|
7681
|
+
isActive
|
|
7682
|
+
});
|
|
7683
|
+
return {
|
|
7684
|
+
translate,
|
|
7685
|
+
currentScale,
|
|
7686
|
+
isHover,
|
|
7687
|
+
isActive,
|
|
7688
|
+
isReady,
|
|
7689
|
+
isInStage,
|
|
7690
|
+
isAnimating,
|
|
7691
|
+
isVertical,
|
|
7692
|
+
isCard,
|
|
7693
|
+
isMove,
|
|
7694
|
+
itemGutter,
|
|
7695
|
+
itemStyle,
|
|
7696
|
+
reset,
|
|
7697
|
+
handleItemClick
|
|
7698
|
+
};
|
|
7699
|
+
};
|
|
7700
|
+
|
|
7701
|
+
/** @jsxImportSource vue */
|
|
7702
|
+
|
|
7703
|
+
const COMPONENT_NAME$1_ = 'vc-carousel-item';
|
|
7704
|
+
const CarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
7705
|
+
name: COMPONENT_NAME$1_,
|
|
7062
7706
|
props: props$1i,
|
|
7707
|
+
setup(_, {
|
|
7708
|
+
slots,
|
|
7709
|
+
expose
|
|
7710
|
+
}) {
|
|
7711
|
+
const it = useCarouselItem(expose);
|
|
7712
|
+
return () => {
|
|
7713
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
7714
|
+
"class": ['vc-carousel-item', {
|
|
7715
|
+
'is-active': it.isActive.value,
|
|
7716
|
+
'is-card': it.isCard.value,
|
|
7717
|
+
'is-in-stage': it.isInStage.value,
|
|
7718
|
+
'is-hover': it.isHover.value,
|
|
7719
|
+
'is-animating': it.isAnimating.value && !it.isMove.value
|
|
7720
|
+
}],
|
|
7721
|
+
"style": it.itemStyle.value,
|
|
7722
|
+
"onClick": it.handleItemClick
|
|
7723
|
+
}, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
|
|
7724
|
+
"class": "vc-carousel-item__mask"
|
|
7725
|
+
}, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
7726
|
+
};
|
|
7727
|
+
}
|
|
7728
|
+
});
|
|
7729
|
+
|
|
7730
|
+
/** @jsxImportSource vue */
|
|
7731
|
+
|
|
7732
|
+
const COMPONENT_NAME$1Z = 'vcm-carousel';
|
|
7733
|
+
const MCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
7734
|
+
name: COMPONENT_NAME$1Z,
|
|
7735
|
+
props: {
|
|
7736
|
+
...props$1j,
|
|
7737
|
+
dots: {
|
|
7738
|
+
type: [String, Boolean],
|
|
7739
|
+
default: false
|
|
7740
|
+
},
|
|
7741
|
+
indicator: {
|
|
7742
|
+
type: Boolean,
|
|
7743
|
+
default: true
|
|
7744
|
+
}
|
|
7745
|
+
},
|
|
7063
7746
|
setup(props, {
|
|
7064
|
-
slots
|
|
7747
|
+
slots,
|
|
7748
|
+
expose
|
|
7065
7749
|
}) {
|
|
7750
|
+
const wrapper = vue.ref(null);
|
|
7751
|
+
const content = vue.ref(null);
|
|
7752
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
7753
|
+
let scrollStatus = 0;
|
|
7754
|
+
const handleTouchStart = e => {
|
|
7755
|
+
carousel.handleStart(e.touches[0]);
|
|
7756
|
+
scrollStatus = 0;
|
|
7757
|
+
};
|
|
7758
|
+
const handleTouchMove = e => {
|
|
7759
|
+
const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
|
|
7760
|
+
const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
|
|
7761
|
+
if (!props.vertical && absX > absY && scrollStatus !== 1) {
|
|
7762
|
+
e.preventDefault();
|
|
7763
|
+
carousel.handleMove(e.touches[0]);
|
|
7764
|
+
scrollStatus = 2;
|
|
7765
|
+
return;
|
|
7766
|
+
}
|
|
7767
|
+
if (props.vertical && absY > absX) {
|
|
7768
|
+
e.preventDefault();
|
|
7769
|
+
carousel.handleMove(e.touches[0]);
|
|
7770
|
+
return;
|
|
7771
|
+
}
|
|
7772
|
+
if (scrollStatus === 0) {
|
|
7773
|
+
scrollStatus = 1;
|
|
7774
|
+
}
|
|
7775
|
+
};
|
|
7776
|
+
|
|
7777
|
+
// e.changedTouches[0]
|
|
7778
|
+
const handleTouchEnd = () => {
|
|
7779
|
+
carousel.handleEnd();
|
|
7780
|
+
scrollStatus = 0;
|
|
7781
|
+
};
|
|
7066
7782
|
return () => {
|
|
7067
7783
|
return vue.createVNode("div", {
|
|
7068
|
-
"
|
|
7069
|
-
|
|
7784
|
+
"ref": wrapper,
|
|
7785
|
+
"class": ['vcm-carousel', `is-${carousel.direction.value}`],
|
|
7786
|
+
"onTouchstart": vue.withModifiers(handleTouchStart, ['stop']),
|
|
7787
|
+
"onTouchmove": vue.withModifiers(handleTouchMove, ['stop']),
|
|
7788
|
+
"onTouchend": vue.withModifiers(handleTouchEnd, ['stop'])
|
|
7789
|
+
}, [vue.createVNode("div", {
|
|
7790
|
+
"ref": content,
|
|
7791
|
+
"style": {
|
|
7792
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
7793
|
+
},
|
|
7794
|
+
"class": "vcm-carousel__wrapper"
|
|
7795
|
+
}, [slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
7796
|
+
"class": ['vcm-carousel__dots', ...carousel.dotsClasses.value]
|
|
7797
|
+
}, [carousel.items.value.map((_, index) => vue.createVNode("li", {
|
|
7798
|
+
"key": index,
|
|
7799
|
+
"class": ['vcm-carousel__dot', 'is-' + carousel.direction.value, {
|
|
7800
|
+
'is-active': index === carousel.activeIndex.value
|
|
7801
|
+
}],
|
|
7802
|
+
"onClick": e => {
|
|
7803
|
+
e.stopPropagation();
|
|
7804
|
+
carousel.handleDotClick(index);
|
|
7805
|
+
}
|
|
7806
|
+
}, [vue.createVNode("button", {
|
|
7807
|
+
"class": "vcm-carousel__button"
|
|
7808
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props.card && props.indicator && vue.createVNode("div", {
|
|
7809
|
+
"class": "vcm-carousel__indicator"
|
|
7810
|
+
}, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
|
|
7070
7811
|
};
|
|
7071
7812
|
}
|
|
7072
7813
|
});
|
|
7073
7814
|
|
|
7074
|
-
|
|
7815
|
+
/** @jsxImportSource vue */
|
|
7816
|
+
|
|
7817
|
+
const COMPONENT_NAME$1Y = 'vcm-carousel-item';
|
|
7818
|
+
const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
7819
|
+
name: COMPONENT_NAME$1Y,
|
|
7820
|
+
props: props$1i,
|
|
7821
|
+
setup(_, {
|
|
7822
|
+
slots,
|
|
7823
|
+
expose
|
|
7824
|
+
}) {
|
|
7825
|
+
const it = useCarouselItem(expose);
|
|
7826
|
+
return () => {
|
|
7827
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
7828
|
+
"style": it.itemStyle.value,
|
|
7829
|
+
"class": {
|
|
7830
|
+
'vcm-carousel-item': true,
|
|
7831
|
+
'is-active': it.isActive.value,
|
|
7832
|
+
'is-card': it.isCard.value,
|
|
7833
|
+
'is-animating': it.isAnimating.value && !it.isMove.value,
|
|
7834
|
+
'is-in-stage': it.isInStage.value
|
|
7835
|
+
},
|
|
7836
|
+
"onClick": it.handleItemClick
|
|
7837
|
+
}, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
|
|
7838
|
+
"class": "vcm-carousel-item__mask"
|
|
7839
|
+
}, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
7840
|
+
};
|
|
7841
|
+
}
|
|
7842
|
+
});
|
|
7075
7843
|
|
|
7076
7844
|
const useAttrs = (options) => {
|
|
7077
7845
|
const attrs = vue.useAttrs();
|
|
@@ -7415,9 +8183,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
7415
8183
|
|
|
7416
8184
|
/** @jsxImportSource vue */
|
|
7417
8185
|
|
|
7418
|
-
const COMPONENT_NAME$
|
|
8186
|
+
const COMPONENT_NAME$1X = 'vc-input';
|
|
7419
8187
|
const Input$1 = /* @__PURE__ */ vue.defineComponent({
|
|
7420
|
-
name: COMPONENT_NAME$
|
|
8188
|
+
name: COMPONENT_NAME$1X,
|
|
7421
8189
|
inheritAttrs: false,
|
|
7422
8190
|
props: {
|
|
7423
8191
|
...props$1h,
|
|
@@ -7752,9 +8520,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
7752
8520
|
|
|
7753
8521
|
/** @jsxImportSource vue */
|
|
7754
8522
|
|
|
7755
|
-
const COMPONENT_NAME$
|
|
8523
|
+
const COMPONENT_NAME$1W = 'vc-input-number';
|
|
7756
8524
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
7757
|
-
name: COMPONENT_NAME$
|
|
8525
|
+
name: COMPONENT_NAME$1W,
|
|
7758
8526
|
props: props$1g,
|
|
7759
8527
|
inheritAttrs: false,
|
|
7760
8528
|
setup(props, {
|
|
@@ -7818,9 +8586,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
7818
8586
|
|
|
7819
8587
|
/** @jsxImportSource vue */
|
|
7820
8588
|
|
|
7821
|
-
const COMPONENT_NAME$
|
|
8589
|
+
const COMPONENT_NAME$1V = 'vc-input-search';
|
|
7822
8590
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
7823
|
-
name: COMPONENT_NAME$
|
|
8591
|
+
name: COMPONENT_NAME$1V,
|
|
7824
8592
|
props: props$1f,
|
|
7825
8593
|
inheritAttrs: false,
|
|
7826
8594
|
setup(props, {
|
|
@@ -7953,69 +8721,6 @@ var VcComponents = (function (exports, vue) {
|
|
|
7953
8721
|
...pick(props$1e, wrapperKeys)
|
|
7954
8722
|
};
|
|
7955
8723
|
|
|
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
8724
|
const EXTRA_DISTANCE = 4;
|
|
8020
8725
|
const HALF_ARROW = 12.73 / 2;
|
|
8021
8726
|
const usePos = () => {
|
|
@@ -8276,9 +8981,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
8276
8981
|
}
|
|
8277
8982
|
};
|
|
8278
8983
|
|
|
8279
|
-
const COMPONENT_NAME$
|
|
8984
|
+
const COMPONENT_NAME$1U = "vc-customer";
|
|
8280
8985
|
const Customer = vue.defineComponent({
|
|
8281
|
-
name: COMPONENT_NAME$
|
|
8986
|
+
name: COMPONENT_NAME$1U,
|
|
8282
8987
|
props: props$1c,
|
|
8283
8988
|
setup(props, context) {
|
|
8284
8989
|
return () => vue.h(() => {
|
|
@@ -8413,7 +9118,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
8413
9118
|
}
|
|
8414
9119
|
}
|
|
8415
9120
|
|
|
8416
|
-
const COMPONENT_NAME$
|
|
9121
|
+
const COMPONENT_NAME$1T = "vc-portal";
|
|
8417
9122
|
class Portal {
|
|
8418
9123
|
/**
|
|
8419
9124
|
* 清理Portals类型组件
|
|
@@ -8463,7 +9168,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
8463
9168
|
this.wrapper = wrapper;
|
|
8464
9169
|
this.globalOptions = {
|
|
8465
9170
|
...options,
|
|
8466
|
-
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$
|
|
9171
|
+
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1T)
|
|
8467
9172
|
};
|
|
8468
9173
|
}
|
|
8469
9174
|
popup(propsData, options) {
|
|
@@ -8561,7 +9266,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
8561
9266
|
...rest
|
|
8562
9267
|
} = options;
|
|
8563
9268
|
let useAllNodes = fragment;
|
|
8564
|
-
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$
|
|
9269
|
+
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1T)}` : name$;
|
|
8565
9270
|
const container = document.createElement(tag);
|
|
8566
9271
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
8567
9272
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -8595,7 +9300,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
8595
9300
|
} else {
|
|
8596
9301
|
const wrapper = this.wrapper;
|
|
8597
9302
|
const app = vue.createApp({
|
|
8598
|
-
name: COMPONENT_NAME$
|
|
9303
|
+
name: COMPONENT_NAME$1T,
|
|
8599
9304
|
parent,
|
|
8600
9305
|
setup() {
|
|
8601
9306
|
if (alive) {
|
|
@@ -8706,13 +9411,13 @@ var VcComponents = (function (exports, vue) {
|
|
|
8706
9411
|
}
|
|
8707
9412
|
};
|
|
8708
9413
|
|
|
8709
|
-
const COMPONENT_NAME$
|
|
9414
|
+
const COMPONENT_NAME$1S = 'vc-portal-view';
|
|
8710
9415
|
|
|
8711
9416
|
/**
|
|
8712
9417
|
* 写法不同,但与vue@2.x 保持一致
|
|
8713
9418
|
*/
|
|
8714
9419
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
8715
|
-
name: COMPONENT_NAME$
|
|
9420
|
+
name: COMPONENT_NAME$1S,
|
|
8716
9421
|
props: props$1b,
|
|
8717
9422
|
setup(props, {
|
|
8718
9423
|
slots
|
|
@@ -8732,9 +9437,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
8732
9437
|
|
|
8733
9438
|
/** @jsxImportSource vue */
|
|
8734
9439
|
|
|
8735
|
-
const COMPONENT_NAME$
|
|
9440
|
+
const COMPONENT_NAME$1R = 'vc-popover-wrapper';
|
|
8736
9441
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
8737
|
-
name: COMPONENT_NAME$
|
|
9442
|
+
name: COMPONENT_NAME$1R,
|
|
8738
9443
|
props: props$1e,
|
|
8739
9444
|
emits: ['portal-fulfilled', 'close'],
|
|
8740
9445
|
setup(props, {
|
|
@@ -8992,9 +9697,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
8992
9697
|
|
|
8993
9698
|
/** @jsxImportSource vue */
|
|
8994
9699
|
|
|
8995
|
-
const COMPONENT_NAME$
|
|
9700
|
+
const COMPONENT_NAME$1Q = 'vc-popover';
|
|
8996
9701
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
8997
|
-
name: COMPONENT_NAME$
|
|
9702
|
+
name: COMPONENT_NAME$1Q,
|
|
8998
9703
|
props: props$1d,
|
|
8999
9704
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
9000
9705
|
setup(props, {
|
|
@@ -9138,9 +9843,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
9138
9843
|
|
|
9139
9844
|
/** @jsxImportSource vue */
|
|
9140
9845
|
|
|
9141
|
-
const COMPONENT_NAME$
|
|
9846
|
+
const COMPONENT_NAME$1P = 'vc-cascader-column';
|
|
9142
9847
|
const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
|
|
9143
|
-
name: COMPONENT_NAME$
|
|
9848
|
+
name: COMPONENT_NAME$1P,
|
|
9144
9849
|
emits: ['click', 'change'],
|
|
9145
9850
|
props: {
|
|
9146
9851
|
data: {
|
|
@@ -9348,9 +10053,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
9348
10053
|
|
|
9349
10054
|
/** @jsxImportSource vue */
|
|
9350
10055
|
|
|
9351
|
-
const COMPONENT_NAME$
|
|
10056
|
+
const COMPONENT_NAME$1O = 'vc-cascader';
|
|
9352
10057
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
9353
|
-
name: COMPONENT_NAME$
|
|
10058
|
+
name: COMPONENT_NAME$1O,
|
|
9354
10059
|
inheritAttrs: false,
|
|
9355
10060
|
props: props$19,
|
|
9356
10061
|
emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
|
|
@@ -9702,9 +10407,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
9702
10407
|
|
|
9703
10408
|
/** @jsxImportSource vue */
|
|
9704
10409
|
|
|
9705
|
-
const COMPONENT_NAME$
|
|
10410
|
+
const COMPONENT_NAME$1N = 'vc-chart';
|
|
9706
10411
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
9707
|
-
name: COMPONENT_NAME$
|
|
10412
|
+
name: COMPONENT_NAME$1N,
|
|
9708
10413
|
props: props$18,
|
|
9709
10414
|
emits: [...EVENTS$1, 'ready'],
|
|
9710
10415
|
setup(props, {
|
|
@@ -9943,9 +10648,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
9943
10648
|
|
|
9944
10649
|
/** @jsxImportSource vue */
|
|
9945
10650
|
|
|
9946
|
-
const COMPONENT_NAME$
|
|
10651
|
+
const COMPONENT_NAME$1M = 'vc-checkbox';
|
|
9947
10652
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
9948
|
-
name: COMPONENT_NAME$
|
|
10653
|
+
name: COMPONENT_NAME$1M,
|
|
9949
10654
|
props: props$17,
|
|
9950
10655
|
emits: ['update:modelValue', 'change'],
|
|
9951
10656
|
setup(props, {
|
|
@@ -10032,9 +10737,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10032
10737
|
|
|
10033
10738
|
/** @jsxImportSource vue */
|
|
10034
10739
|
|
|
10035
|
-
const COMPONENT_NAME$
|
|
10740
|
+
const COMPONENT_NAME$1L = 'vc-checkbox-group';
|
|
10036
10741
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
10037
|
-
name: COMPONENT_NAME$
|
|
10742
|
+
name: COMPONENT_NAME$1L,
|
|
10038
10743
|
props: props$16,
|
|
10039
10744
|
emits: ['update:modelValue', 'change'],
|
|
10040
10745
|
setup(props, {
|
|
@@ -10052,9 +10757,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10052
10757
|
|
|
10053
10758
|
/** @jsxImportSource vue */
|
|
10054
10759
|
|
|
10055
|
-
const COMPONENT_NAME$
|
|
10760
|
+
const COMPONENT_NAME$1K = 'vcm-checkbox';
|
|
10056
10761
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
10057
|
-
name: COMPONENT_NAME$
|
|
10762
|
+
name: COMPONENT_NAME$1K,
|
|
10058
10763
|
props: props$17,
|
|
10059
10764
|
emits: ['update:modelValue', 'change'],
|
|
10060
10765
|
setup(props, {
|
|
@@ -10094,9 +10799,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10094
10799
|
|
|
10095
10800
|
/** @jsxImportSource vue */
|
|
10096
10801
|
|
|
10097
|
-
const COMPONENT_NAME$
|
|
10802
|
+
const COMPONENT_NAME$1J = 'vcm-checkbox-group';
|
|
10098
10803
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
10099
|
-
name: COMPONENT_NAME$
|
|
10804
|
+
name: COMPONENT_NAME$1J,
|
|
10100
10805
|
props: props$16,
|
|
10101
10806
|
emits: ['update:modelValue', 'change'],
|
|
10102
10807
|
setup(props, {
|
|
@@ -10150,9 +10855,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10150
10855
|
|
|
10151
10856
|
/** @jsxImportSource vue */
|
|
10152
10857
|
|
|
10153
|
-
const COMPONENT_NAME$
|
|
10858
|
+
const COMPONENT_NAME$1I = 'vc-message';
|
|
10154
10859
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
10155
|
-
name: COMPONENT_NAME$
|
|
10860
|
+
name: COMPONENT_NAME$1I,
|
|
10156
10861
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
10157
10862
|
props: props$15,
|
|
10158
10863
|
setup(props, {
|
|
@@ -10401,9 +11106,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10401
11106
|
return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
10402
11107
|
};
|
|
10403
11108
|
|
|
10404
|
-
const COMPONENT_NAME$
|
|
11109
|
+
const COMPONENT_NAME$1H = "vc-clipboard";
|
|
10405
11110
|
const Clipboard$2 = vue.defineComponent({
|
|
10406
|
-
name: COMPONENT_NAME$
|
|
11111
|
+
name: COMPONENT_NAME$1H,
|
|
10407
11112
|
props: props$14,
|
|
10408
11113
|
setup() {
|
|
10409
11114
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -10443,9 +11148,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10443
11148
|
|
|
10444
11149
|
/** @jsxImportSource vue */
|
|
10445
11150
|
|
|
10446
|
-
const COMPONENT_NAME$
|
|
11151
|
+
const COMPONENT_NAME$1G = 'vcm-toast';
|
|
10447
11152
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
10448
|
-
name: COMPONENT_NAME$
|
|
11153
|
+
name: COMPONENT_NAME$1G,
|
|
10449
11154
|
emits: ['close', 'portal-fulfilled'],
|
|
10450
11155
|
props: props$13,
|
|
10451
11156
|
setup(props, {
|
|
@@ -10547,9 +11252,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10547
11252
|
const error$3 = create$6({ mode: "error" });
|
|
10548
11253
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$3 });
|
|
10549
11254
|
|
|
10550
|
-
const COMPONENT_NAME$
|
|
11255
|
+
const COMPONENT_NAME$1F = "vcm-clipboard";
|
|
10551
11256
|
const MClipboard$1 = vue.defineComponent({
|
|
10552
|
-
name: COMPONENT_NAME$
|
|
11257
|
+
name: COMPONENT_NAME$1F,
|
|
10553
11258
|
props: props$14,
|
|
10554
11259
|
setup() {
|
|
10555
11260
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -10581,9 +11286,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10581
11286
|
}
|
|
10582
11287
|
};
|
|
10583
11288
|
|
|
10584
|
-
const COMPONENT_NAME$
|
|
11289
|
+
const COMPONENT_NAME$1E = "vc-collapse";
|
|
10585
11290
|
const Collapse = vue.defineComponent({
|
|
10586
|
-
name: COMPONENT_NAME$
|
|
11291
|
+
name: COMPONENT_NAME$1E,
|
|
10587
11292
|
props: props$12,
|
|
10588
11293
|
emits: ["update:moodelValue", "change"],
|
|
10589
11294
|
setup(props, { slots, emit }) {
|
|
@@ -10700,9 +11405,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10700
11405
|
function _isSlot$3(s) {
|
|
10701
11406
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
10702
11407
|
}
|
|
10703
|
-
const COMPONENT_NAME$
|
|
11408
|
+
const COMPONENT_NAME$1D = 'vc-expand';
|
|
10704
11409
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10705
|
-
name: COMPONENT_NAME$
|
|
11410
|
+
name: COMPONENT_NAME$1D,
|
|
10706
11411
|
props: props$10,
|
|
10707
11412
|
setup(props, {
|
|
10708
11413
|
slots
|
|
@@ -10732,9 +11437,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10732
11437
|
|
|
10733
11438
|
/** @jsxImportSource vue */
|
|
10734
11439
|
|
|
10735
|
-
const COMPONENT_NAME$
|
|
11440
|
+
const COMPONENT_NAME$1C = 'vc-collapse-item';
|
|
10736
11441
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
10737
|
-
name: COMPONENT_NAME$
|
|
11442
|
+
name: COMPONENT_NAME$1C,
|
|
10738
11443
|
props: props$11,
|
|
10739
11444
|
setup(props, {
|
|
10740
11445
|
slots,
|
|
@@ -10809,9 +11514,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10809
11514
|
|
|
10810
11515
|
/** @jsxImportSource vue */
|
|
10811
11516
|
|
|
10812
|
-
const COMPONENT_NAME$
|
|
11517
|
+
const COMPONENT_NAME$1B = 'vc-color-picker';
|
|
10813
11518
|
const ColorPicker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10814
|
-
name: COMPONENT_NAME$
|
|
11519
|
+
name: COMPONENT_NAME$1B,
|
|
10815
11520
|
props: props$$,
|
|
10816
11521
|
setup(props, {
|
|
10817
11522
|
slots
|
|
@@ -10874,9 +11579,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
10874
11579
|
function _isSlot$2(s) {
|
|
10875
11580
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
10876
11581
|
}
|
|
10877
|
-
const COMPONENT_NAME$
|
|
11582
|
+
const COMPONENT_NAME$1A = 'vc-countdown';
|
|
10878
11583
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
10879
|
-
name: COMPONENT_NAME$
|
|
11584
|
+
name: COMPONENT_NAME$1A,
|
|
10880
11585
|
props: props$_,
|
|
10881
11586
|
emits: ['change', 'complete', 'error'],
|
|
10882
11587
|
setup(props, {
|
|
@@ -11149,9 +11854,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
11149
11854
|
function _isSlot$1(s) {
|
|
11150
11855
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
11151
11856
|
}
|
|
11152
|
-
const COMPONENT_NAME$
|
|
11857
|
+
const COMPONENT_NAME$1z = 'vc-counter';
|
|
11153
11858
|
const Counter = /* @__PURE__ */ vue.defineComponent({
|
|
11154
|
-
name: COMPONENT_NAME$
|
|
11859
|
+
name: COMPONENT_NAME$1z,
|
|
11155
11860
|
props: props$Z,
|
|
11156
11861
|
emits: ['begin', 'complete', 'change'],
|
|
11157
11862
|
setup(props, {
|
|
@@ -12414,9 +13119,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
12414
13119
|
}
|
|
12415
13120
|
return view;
|
|
12416
13121
|
};
|
|
12417
|
-
const COMPONENT_NAME$
|
|
13122
|
+
const COMPONENT_NAME$1y = 'vc-date-confirm';
|
|
12418
13123
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
12419
|
-
name: COMPONENT_NAME$
|
|
13124
|
+
name: COMPONENT_NAME$1y,
|
|
12420
13125
|
props: {
|
|
12421
13126
|
showTime: {
|
|
12422
13127
|
type: Boolean,
|
|
@@ -12480,9 +13185,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
12480
13185
|
|
|
12481
13186
|
/** @jsxImportSource vue */
|
|
12482
13187
|
|
|
12483
|
-
const COMPONENT_NAME$
|
|
13188
|
+
const COMPONENT_NAME$1x = 'vc-date-header';
|
|
12484
13189
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
12485
|
-
name: COMPONENT_NAME$
|
|
13190
|
+
name: COMPONENT_NAME$1x,
|
|
12486
13191
|
props: {
|
|
12487
13192
|
panelDate: Date,
|
|
12488
13193
|
showNext: {
|
|
@@ -12566,9 +13271,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
12566
13271
|
|
|
12567
13272
|
/** @jsxImportSource vue */
|
|
12568
13273
|
|
|
12569
|
-
const COMPONENT_NAME$
|
|
13274
|
+
const COMPONENT_NAME$1w = 'vc-date-table';
|
|
12570
13275
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
12571
|
-
name: COMPONENT_NAME$
|
|
13276
|
+
name: COMPONENT_NAME$1w,
|
|
12572
13277
|
props: {
|
|
12573
13278
|
value: Array,
|
|
12574
13279
|
firstDayOfWeek: {
|
|
@@ -12777,9 +13482,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
12777
13482
|
|
|
12778
13483
|
/** @jsxImportSource vue */
|
|
12779
13484
|
|
|
12780
|
-
const COMPONENT_NAME$
|
|
13485
|
+
const COMPONENT_NAME$1v = 'vc-month-table';
|
|
12781
13486
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
12782
|
-
name: COMPONENT_NAME$
|
|
13487
|
+
name: COMPONENT_NAME$1v,
|
|
12783
13488
|
props: {
|
|
12784
13489
|
value: Array,
|
|
12785
13490
|
panelDate: Date,
|
|
@@ -12911,7 +13616,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
12911
13616
|
|
|
12912
13617
|
/** @jsxImportSource vue */
|
|
12913
13618
|
|
|
12914
|
-
const COMPONENT_NAME$
|
|
13619
|
+
const COMPONENT_NAME$1u = 'vc-quarter-table';
|
|
12915
13620
|
|
|
12916
13621
|
/**
|
|
12917
13622
|
* 获取季度对应的月份范围
|
|
@@ -12945,7 +13650,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
12945
13650
|
}
|
|
12946
13651
|
};
|
|
12947
13652
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
12948
|
-
name: COMPONENT_NAME$
|
|
13653
|
+
name: COMPONENT_NAME$1u,
|
|
12949
13654
|
props: {
|
|
12950
13655
|
value: Array,
|
|
12951
13656
|
panelDate: Date,
|
|
@@ -13068,9 +13773,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13068
13773
|
|
|
13069
13774
|
/** @jsxImportSource vue */
|
|
13070
13775
|
|
|
13071
|
-
const COMPONENT_NAME$
|
|
13776
|
+
const COMPONENT_NAME$1t = 'vc-shortcuts-select';
|
|
13072
13777
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
13073
|
-
name: COMPONENT_NAME$
|
|
13778
|
+
name: COMPONENT_NAME$1t,
|
|
13074
13779
|
props: {
|
|
13075
13780
|
panelDate: Date,
|
|
13076
13781
|
config: Array,
|
|
@@ -13110,9 +13815,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13110
13815
|
|
|
13111
13816
|
/** @jsxImportSource vue */
|
|
13112
13817
|
|
|
13113
|
-
const COMPONENT_NAME$
|
|
13818
|
+
const COMPONENT_NAME$1s = 'vc-time-select';
|
|
13114
13819
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
13115
|
-
name: COMPONENT_NAME$
|
|
13820
|
+
name: COMPONENT_NAME$1s,
|
|
13116
13821
|
props: {
|
|
13117
13822
|
hours: {
|
|
13118
13823
|
type: [Number, String],
|
|
@@ -13392,9 +14097,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13392
14097
|
|
|
13393
14098
|
/** @jsxImportSource vue */
|
|
13394
14099
|
|
|
13395
|
-
const COMPONENT_NAME$
|
|
14100
|
+
const COMPONENT_NAME$1r = 'vc-year-table';
|
|
13396
14101
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
13397
|
-
name: COMPONENT_NAME$
|
|
14102
|
+
name: COMPONENT_NAME$1r,
|
|
13398
14103
|
props: {
|
|
13399
14104
|
value: Array,
|
|
13400
14105
|
panelDate: Date,
|
|
@@ -13517,9 +14222,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13517
14222
|
}
|
|
13518
14223
|
return true;
|
|
13519
14224
|
};
|
|
13520
|
-
const COMPONENT_NAME$
|
|
14225
|
+
const COMPONENT_NAME$1q = 'vc-date-range-panel';
|
|
13521
14226
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
13522
|
-
name: COMPONENT_NAME$
|
|
14227
|
+
name: COMPONENT_NAME$1q,
|
|
13523
14228
|
props: {
|
|
13524
14229
|
...props$W,
|
|
13525
14230
|
confirm: {
|
|
@@ -13898,9 +14603,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
13898
14603
|
|
|
13899
14604
|
/** @jsxImportSource vue */
|
|
13900
14605
|
|
|
13901
|
-
const COMPONENT_NAME$
|
|
14606
|
+
const COMPONENT_NAME$1p = 'vc-date-panel';
|
|
13902
14607
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
13903
|
-
name: COMPONENT_NAME$
|
|
14608
|
+
name: COMPONENT_NAME$1p,
|
|
13904
14609
|
props: {
|
|
13905
14610
|
...props$W,
|
|
13906
14611
|
type: String,
|
|
@@ -14108,9 +14813,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14108
14813
|
const endYear = value[1].getFullYear();
|
|
14109
14814
|
return startYear === endYear;
|
|
14110
14815
|
};
|
|
14111
|
-
const COMPONENT_NAME$
|
|
14816
|
+
const COMPONENT_NAME$1o = 'vc-monthrange-panel';
|
|
14112
14817
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14113
|
-
name: COMPONENT_NAME$
|
|
14818
|
+
name: COMPONENT_NAME$1o,
|
|
14114
14819
|
props: {
|
|
14115
14820
|
...props$W,
|
|
14116
14821
|
confirm: {
|
|
@@ -14285,9 +14990,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14285
14990
|
const endYear = value[1].getFullYear();
|
|
14286
14991
|
return startYear === endYear;
|
|
14287
14992
|
};
|
|
14288
|
-
const COMPONENT_NAME$
|
|
14993
|
+
const COMPONENT_NAME$1n = 'vc-quarterrange-panel';
|
|
14289
14994
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14290
|
-
name: COMPONENT_NAME$
|
|
14995
|
+
name: COMPONENT_NAME$1n,
|
|
14291
14996
|
props: {
|
|
14292
14997
|
...props$W,
|
|
14293
14998
|
confirm: {
|
|
@@ -14526,9 +15231,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14526
15231
|
seconds
|
|
14527
15232
|
};
|
|
14528
15233
|
};
|
|
14529
|
-
const COMPONENT_NAME$
|
|
15234
|
+
const COMPONENT_NAME$1m = 'vc-timerange-panel';
|
|
14530
15235
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14531
|
-
name: COMPONENT_NAME$
|
|
15236
|
+
name: COMPONENT_NAME$1m,
|
|
14532
15237
|
props: props$V,
|
|
14533
15238
|
emits: ['pick', 'clear', 'ok'],
|
|
14534
15239
|
setup(props, {
|
|
@@ -14629,9 +15334,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14629
15334
|
|
|
14630
15335
|
/** @jsxImportSource vue */
|
|
14631
15336
|
|
|
14632
|
-
const COMPONENT_NAME$
|
|
15337
|
+
const COMPONENT_NAME$1l = 'vc-time-panel';
|
|
14633
15338
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14634
|
-
name: COMPONENT_NAME$
|
|
15339
|
+
name: COMPONENT_NAME$1l,
|
|
14635
15340
|
props: props$V,
|
|
14636
15341
|
emits: ['pick', 'clear', 'ok'],
|
|
14637
15342
|
setup(props, {
|
|
@@ -14687,7 +15392,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
14687
15392
|
|
|
14688
15393
|
/** @jsxImportSource vue */
|
|
14689
15394
|
|
|
14690
|
-
const COMPONENT_NAME$
|
|
15395
|
+
const COMPONENT_NAME$1k = 'vc-date-picker';
|
|
14691
15396
|
const getPanel$1 = type => {
|
|
14692
15397
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
14693
15398
|
return DateRangePanel;
|
|
@@ -14698,7 +15403,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
14698
15403
|
}
|
|
14699
15404
|
return DatePanel;
|
|
14700
15405
|
};
|
|
14701
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
15406
|
+
const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
|
|
14702
15407
|
const props = vue.getCurrentInstance().props;
|
|
14703
15408
|
const icon = vue.ref('date');
|
|
14704
15409
|
const panel = vue.shallowRef({});
|
|
@@ -14739,9 +15444,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
14739
15444
|
|
|
14740
15445
|
/** @jsxImportSource vue */
|
|
14741
15446
|
|
|
14742
|
-
const COMPONENT_NAME$
|
|
15447
|
+
const COMPONENT_NAME$1j = 'vc-divider';
|
|
14743
15448
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
14744
|
-
name: COMPONENT_NAME$
|
|
15449
|
+
name: COMPONENT_NAME$1j,
|
|
14745
15450
|
props: props$U,
|
|
14746
15451
|
setup(props, {
|
|
14747
15452
|
slots
|
|
@@ -14877,7 +15582,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
14877
15582
|
|
|
14878
15583
|
/** @jsxImportSource vue */
|
|
14879
15584
|
|
|
14880
|
-
const COMPONENT_NAME$
|
|
15585
|
+
const COMPONENT_NAME$1i = 'vc-scroller-track';
|
|
14881
15586
|
const BAR_MAP = {
|
|
14882
15587
|
vertical: {
|
|
14883
15588
|
scroll: 'scrollTop',
|
|
@@ -14897,7 +15602,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
14897
15602
|
}
|
|
14898
15603
|
};
|
|
14899
15604
|
const Track$1 = /* @__PURE__ */ vue.defineComponent({
|
|
14900
|
-
name: COMPONENT_NAME$
|
|
15605
|
+
name: COMPONENT_NAME$1i,
|
|
14901
15606
|
props: props$T,
|
|
14902
15607
|
emits: ['change'],
|
|
14903
15608
|
inheritAttrs: false,
|
|
@@ -15087,9 +15792,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
15087
15792
|
|
|
15088
15793
|
/** @jsxImportSource vue */
|
|
15089
15794
|
|
|
15090
|
-
const COMPONENT_NAME$
|
|
15795
|
+
const COMPONENT_NAME$1h = 'vc-scroller-bar';
|
|
15091
15796
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
15092
|
-
name: COMPONENT_NAME$
|
|
15797
|
+
name: COMPONENT_NAME$1h,
|
|
15093
15798
|
props: props$S,
|
|
15094
15799
|
emits: ['change'],
|
|
15095
15800
|
setup(props, {
|
|
@@ -15324,7 +16029,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
15324
16029
|
|
|
15325
16030
|
/** @jsxImportSource vue */
|
|
15326
16031
|
|
|
15327
|
-
const COMPONENT_NAME$
|
|
16032
|
+
const COMPONENT_NAME$1g = 'vc-scroller';
|
|
15328
16033
|
|
|
15329
16034
|
/**
|
|
15330
16035
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -15335,7 +16040,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
15335
16040
|
* 2. 增加了一层嵌套
|
|
15336
16041
|
*/
|
|
15337
16042
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
15338
|
-
name: COMPONENT_NAME$
|
|
16043
|
+
name: COMPONENT_NAME$1g,
|
|
15339
16044
|
props: props$R,
|
|
15340
16045
|
emits: ['scroll'],
|
|
15341
16046
|
setup(props, {
|
|
@@ -16282,7 +16987,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
16282
16987
|
|
|
16283
16988
|
/** @jsxImportSource vue */
|
|
16284
16989
|
|
|
16285
|
-
const COMPONENT_NAME$
|
|
16990
|
+
const COMPONENT_NAME$1f = 'vc-scroller-wheel';
|
|
16286
16991
|
|
|
16287
16992
|
/**
|
|
16288
16993
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -16304,7 +17009,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
16304
17009
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
16305
17010
|
*/
|
|
16306
17011
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
16307
|
-
name: COMPONENT_NAME$
|
|
17012
|
+
name: COMPONENT_NAME$1f,
|
|
16308
17013
|
props: Object.assign({}, props$R, {
|
|
16309
17014
|
stopPropagation: {
|
|
16310
17015
|
type: Boolean,
|
|
@@ -16493,9 +17198,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
16493
17198
|
|
|
16494
17199
|
/** @jsxImportSource vue */
|
|
16495
17200
|
|
|
16496
|
-
const COMPONENT_NAME$
|
|
17201
|
+
const COMPONENT_NAME$1e = 'vc-drawer';
|
|
16497
17202
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
16498
|
-
name: COMPONENT_NAME$
|
|
17203
|
+
name: COMPONENT_NAME$1e,
|
|
16499
17204
|
props: props$Q,
|
|
16500
17205
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
16501
17206
|
setup(props, {
|
|
@@ -16684,9 +17389,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
16684
17389
|
|
|
16685
17390
|
/** @jsxImportSource vue */
|
|
16686
17391
|
|
|
16687
|
-
const COMPONENT_NAME$
|
|
17392
|
+
const COMPONENT_NAME$1d = 'vc-dropdown';
|
|
16688
17393
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
16689
|
-
name: COMPONENT_NAME$
|
|
17394
|
+
name: COMPONENT_NAME$1d,
|
|
16690
17395
|
props: props$P,
|
|
16691
17396
|
inheritAttrs: false,
|
|
16692
17397
|
emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
|
|
@@ -16756,9 +17461,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
16756
17461
|
|
|
16757
17462
|
/** @jsxImportSource vue */
|
|
16758
17463
|
|
|
16759
|
-
const COMPONENT_NAME$
|
|
17464
|
+
const COMPONENT_NAME$1c = 'vc-dropdown-menu';
|
|
16760
17465
|
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
16761
|
-
name: COMPONENT_NAME$
|
|
17466
|
+
name: COMPONENT_NAME$1c,
|
|
16762
17467
|
setup(_, {
|
|
16763
17468
|
slots
|
|
16764
17469
|
}) {
|
|
@@ -16772,9 +17477,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
16772
17477
|
|
|
16773
17478
|
/** @jsxImportSource vue */
|
|
16774
17479
|
|
|
16775
|
-
const COMPONENT_NAME$
|
|
17480
|
+
const COMPONENT_NAME$1b = 'vc-dropdown-item';
|
|
16776
17481
|
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
16777
|
-
name: COMPONENT_NAME$
|
|
17482
|
+
name: COMPONENT_NAME$1b,
|
|
16778
17483
|
emits: ['click'],
|
|
16779
17484
|
props: {
|
|
16780
17485
|
value: {
|
|
@@ -17018,9 +17723,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
17018
17723
|
|
|
17019
17724
|
/** @jsxImportSource vue */
|
|
17020
17725
|
|
|
17021
|
-
const COMPONENT_NAME$
|
|
17726
|
+
const COMPONENT_NAME$1a = 'vc-editor-toolbar';
|
|
17022
17727
|
const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
17023
|
-
name: COMPONENT_NAME$
|
|
17728
|
+
name: COMPONENT_NAME$1a,
|
|
17024
17729
|
props: {
|
|
17025
17730
|
options: [Array, Object],
|
|
17026
17731
|
elementId: String
|
|
@@ -17228,9 +17933,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
17228
17933
|
|
|
17229
17934
|
/** @jsxImportSource vue */
|
|
17230
17935
|
|
|
17231
|
-
const COMPONENT_NAME$
|
|
17936
|
+
const COMPONENT_NAME$19 = 'vc-image-preview';
|
|
17232
17937
|
const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
|
|
17233
|
-
name: COMPONENT_NAME$
|
|
17938
|
+
name: COMPONENT_NAME$19,
|
|
17234
17939
|
props: props$O,
|
|
17235
17940
|
setup(props, {
|
|
17236
17941
|
slots
|
|
@@ -19383,9 +20088,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
19383
20088
|
}
|
|
19384
20089
|
};
|
|
19385
20090
|
|
|
19386
|
-
const COMPONENT_NAME$
|
|
20091
|
+
const COMPONENT_NAME$18 = "vc-upload";
|
|
19387
20092
|
const Upload$1 = vue.defineComponent({
|
|
19388
|
-
name: COMPONENT_NAME$
|
|
20093
|
+
name: COMPONENT_NAME$18,
|
|
19389
20094
|
props: props$N,
|
|
19390
20095
|
emits: [
|
|
19391
20096
|
"message",
|
|
@@ -19919,9 +20624,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
19919
20624
|
|
|
19920
20625
|
/** @jsxImportSource vue */
|
|
19921
20626
|
|
|
19922
|
-
const COMPONENT_NAME$
|
|
20627
|
+
const COMPONENT_NAME$17 = 'vc-editor';
|
|
19923
20628
|
const Editor$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19924
|
-
name: COMPONENT_NAME$
|
|
20629
|
+
name: COMPONENT_NAME$17,
|
|
19925
20630
|
props: props$M,
|
|
19926
20631
|
defaults: defaults$1,
|
|
19927
20632
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
@@ -20110,7 +20815,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
20110
20815
|
|
|
20111
20816
|
/** @jsxImportSource vue */
|
|
20112
20817
|
|
|
20113
|
-
const COMPONENT_NAME$
|
|
20818
|
+
const COMPONENT_NAME$16 = 'vc-editor-view';
|
|
20114
20819
|
const setImages = v => {
|
|
20115
20820
|
if (!v) return;
|
|
20116
20821
|
const IMG_REGX = /<img.*?(?:>|\/>)/gi;
|
|
@@ -20128,7 +20833,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
20128
20833
|
return;
|
|
20129
20834
|
};
|
|
20130
20835
|
const EditorView = /* @__PURE__ */ vue.defineComponent({
|
|
20131
|
-
name: COMPONENT_NAME$
|
|
20836
|
+
name: COMPONENT_NAME$16,
|
|
20132
20837
|
props: {
|
|
20133
20838
|
value: {
|
|
20134
20839
|
type: String,
|
|
@@ -20343,9 +21048,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20343
21048
|
});
|
|
20344
21049
|
};
|
|
20345
21050
|
|
|
20346
|
-
const COMPONENT_NAME$
|
|
21051
|
+
const COMPONENT_NAME$15 = "vc-form";
|
|
20347
21052
|
const Form = vue.defineComponent({
|
|
20348
|
-
name: COMPONENT_NAME$
|
|
21053
|
+
name: COMPONENT_NAME$15,
|
|
20349
21054
|
props: props$L,
|
|
20350
21055
|
setup(props, { slots, expose }) {
|
|
20351
21056
|
useForm(expose);
|
|
@@ -20825,9 +21530,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20825
21530
|
|
|
20826
21531
|
/** @jsxImportSource vue */
|
|
20827
21532
|
|
|
20828
|
-
const COMPONENT_NAME$
|
|
21533
|
+
const COMPONENT_NAME$14 = 'vc-form-item';
|
|
20829
21534
|
const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20830
|
-
name: COMPONENT_NAME$
|
|
21535
|
+
name: COMPONENT_NAME$14,
|
|
20831
21536
|
props: props$K,
|
|
20832
21537
|
setup(props, {
|
|
20833
21538
|
slots,
|
|
@@ -20895,9 +21600,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20895
21600
|
}
|
|
20896
21601
|
};
|
|
20897
21602
|
|
|
20898
|
-
const COMPONENT_NAME$
|
|
21603
|
+
const COMPONENT_NAME$13 = "vcm-form";
|
|
20899
21604
|
const MForm = vue.defineComponent({
|
|
20900
|
-
name: COMPONENT_NAME$
|
|
21605
|
+
name: COMPONENT_NAME$13,
|
|
20901
21606
|
props: props$J,
|
|
20902
21607
|
setup(props, { slots, expose }) {
|
|
20903
21608
|
useForm(expose, {
|
|
@@ -20928,9 +21633,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20928
21633
|
|
|
20929
21634
|
/** @jsxImportSource vue */
|
|
20930
21635
|
|
|
20931
|
-
const COMPONENT_NAME$
|
|
21636
|
+
const COMPONENT_NAME$12 = 'vcm-form-item';
|
|
20932
21637
|
const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20933
|
-
name: COMPONENT_NAME$
|
|
21638
|
+
name: COMPONENT_NAME$12,
|
|
20934
21639
|
props: props$I,
|
|
20935
21640
|
setup(props, {
|
|
20936
21641
|
slots,
|
|
@@ -20985,9 +21690,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
20985
21690
|
}
|
|
20986
21691
|
});
|
|
20987
21692
|
|
|
20988
|
-
const COMPONENT_NAME
|
|
21693
|
+
const COMPONENT_NAME$11 = "vc-fragment";
|
|
20989
21694
|
const Fragment = vue.defineComponent({
|
|
20990
|
-
name: COMPONENT_NAME
|
|
21695
|
+
name: COMPONENT_NAME$11,
|
|
20991
21696
|
setup(_, { slots }) {
|
|
20992
21697
|
return () => vue.h(vue.Fragment, slots.default?.());
|
|
20993
21698
|
}
|
|
@@ -21026,9 +21731,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21026
21731
|
|
|
21027
21732
|
/** @jsxImportSource vue */
|
|
21028
21733
|
|
|
21029
|
-
const COMPONENT_NAME$
|
|
21734
|
+
const COMPONENT_NAME$10 = 'vc-snapshot';
|
|
21030
21735
|
const Snapshot = /* @__PURE__ */ vue.defineComponent({
|
|
21031
|
-
name: COMPONENT_NAME$
|
|
21736
|
+
name: COMPONENT_NAME$10,
|
|
21032
21737
|
props: props$H,
|
|
21033
21738
|
emits: ['ready'],
|
|
21034
21739
|
setup(props, {
|
|
@@ -21561,7 +22266,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
21561
22266
|
|
|
21562
22267
|
/** @jsxImportSource vue */
|
|
21563
22268
|
|
|
21564
|
-
const COMPONENT_NAME
|
|
22269
|
+
const COMPONENT_NAME$$ = 'vc-image';
|
|
21565
22270
|
let isSupportObjectFit = false;
|
|
21566
22271
|
window.addEventListener('DOMContentLoaded', () => {
|
|
21567
22272
|
isSupportObjectFit = !IS_SERVER$1 && document.documentElement.style.objectFit !== undefined;
|
|
@@ -21574,7 +22279,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
21574
22279
|
SCALE_DOWN: 'scale-down'
|
|
21575
22280
|
};
|
|
21576
22281
|
const Image$2 = /* @__PURE__ */ vue.defineComponent({
|
|
21577
|
-
name: COMPONENT_NAME
|
|
22282
|
+
name: COMPONENT_NAME$$,
|
|
21578
22283
|
inheritAttrs: false,
|
|
21579
22284
|
props: props$G,
|
|
21580
22285
|
setup(props, {
|
|
@@ -21791,9 +22496,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21791
22496
|
|
|
21792
22497
|
/** @jsxImportSource vue */
|
|
21793
22498
|
|
|
21794
|
-
const COMPONENT_NAME$
|
|
22499
|
+
const COMPONENT_NAME$_ = 'vc-image-crop';
|
|
21795
22500
|
const ImageCrop = /* @__PURE__ */ vue.defineComponent({
|
|
21796
|
-
name: COMPONENT_NAME$
|
|
22501
|
+
name: COMPONENT_NAME$_,
|
|
21797
22502
|
props: props$F,
|
|
21798
22503
|
setup(props, {
|
|
21799
22504
|
slots
|
|
@@ -21819,9 +22524,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21819
22524
|
|
|
21820
22525
|
/** @jsxImportSource vue */
|
|
21821
22526
|
|
|
21822
|
-
const COMPONENT_NAME$
|
|
22527
|
+
const COMPONENT_NAME$Z = 'vc-image-processing';
|
|
21823
22528
|
const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
|
|
21824
|
-
name: COMPONENT_NAME$
|
|
22529
|
+
name: COMPONENT_NAME$Z,
|
|
21825
22530
|
props: props$E,
|
|
21826
22531
|
setup(props, {
|
|
21827
22532
|
slots
|
|
@@ -21838,9 +22543,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21838
22543
|
|
|
21839
22544
|
/** @jsxImportSource vue */
|
|
21840
22545
|
|
|
21841
|
-
const COMPONENT_NAME$
|
|
22546
|
+
const COMPONENT_NAME$Y = 'vcm-input';
|
|
21842
22547
|
const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
21843
|
-
name: COMPONENT_NAME$
|
|
22548
|
+
name: COMPONENT_NAME$Y,
|
|
21844
22549
|
inheritAttrs: false,
|
|
21845
22550
|
props: {
|
|
21846
22551
|
...props$1h,
|
|
@@ -21929,9 +22634,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21929
22634
|
|
|
21930
22635
|
/** @jsxImportSource vue */
|
|
21931
22636
|
|
|
21932
|
-
const COMPONENT_NAME$
|
|
22637
|
+
const COMPONENT_NAME$X = 'vcm-input-number';
|
|
21933
22638
|
const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
21934
|
-
name: COMPONENT_NAME$
|
|
22639
|
+
name: COMPONENT_NAME$X,
|
|
21935
22640
|
props: props$1g,
|
|
21936
22641
|
inheritAttrs: false,
|
|
21937
22642
|
setup(props, {
|
|
@@ -21980,9 +22685,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
21980
22685
|
|
|
21981
22686
|
/** @jsxImportSource vue */
|
|
21982
22687
|
|
|
21983
|
-
const COMPONENT_NAME$
|
|
22688
|
+
const COMPONENT_NAME$W = 'vcm-input-search';
|
|
21984
22689
|
const MInputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
21985
|
-
name: COMPONENT_NAME$
|
|
22690
|
+
name: COMPONENT_NAME$W,
|
|
21986
22691
|
props: {
|
|
21987
22692
|
...props$1f,
|
|
21988
22693
|
cancelText: {
|
|
@@ -22059,9 +22764,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
22059
22764
|
}
|
|
22060
22765
|
};
|
|
22061
22766
|
|
|
22062
|
-
const COMPONENT_NAME$
|
|
22767
|
+
const COMPONENT_NAME$V = "vcm-list";
|
|
22063
22768
|
const MList = vue.defineComponent({
|
|
22064
|
-
name: COMPONENT_NAME$
|
|
22769
|
+
name: COMPONENT_NAME$V,
|
|
22065
22770
|
props: props$D,
|
|
22066
22771
|
setup(props, { slots }) {
|
|
22067
22772
|
vue.provide("vc-list", { props });
|
|
@@ -22116,10 +22821,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
22116
22821
|
|
|
22117
22822
|
/** @jsxImportSource vue */
|
|
22118
22823
|
|
|
22119
|
-
const COMPONENT_NAME$
|
|
22824
|
+
const COMPONENT_NAME$U = 'vcm-list-item';
|
|
22120
22825
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
22121
22826
|
const MListItem = /* @__PURE__ */ vue.defineComponent({
|
|
22122
|
-
name: COMPONENT_NAME$
|
|
22827
|
+
name: COMPONENT_NAME$U,
|
|
22123
22828
|
props: props$C,
|
|
22124
22829
|
emits: ['click'],
|
|
22125
22830
|
setup(props, {
|
|
@@ -22213,11 +22918,11 @@ var VcComponents = (function (exports, vue) {
|
|
|
22213
22918
|
|
|
22214
22919
|
/** @jsxImportSource vue */
|
|
22215
22920
|
|
|
22216
|
-
const COMPONENT_NAME$
|
|
22921
|
+
const COMPONENT_NAME$T = 'vc-marquee';
|
|
22217
22922
|
const ANIMATION = prefixStyle('animation').camel;
|
|
22218
22923
|
const TRANSFORM_KEBAB = prefixStyle('transform').kebab;
|
|
22219
22924
|
const Marquee = /* @__PURE__ */ vue.defineComponent({
|
|
22220
|
-
name: COMPONENT_NAME$
|
|
22925
|
+
name: COMPONENT_NAME$T,
|
|
22221
22926
|
props: props$B,
|
|
22222
22927
|
setup(props, {
|
|
22223
22928
|
slots
|
|
@@ -22285,9 +22990,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
22285
22990
|
}
|
|
22286
22991
|
};
|
|
22287
22992
|
|
|
22288
|
-
const COMPONENT_NAME$
|
|
22993
|
+
const COMPONENT_NAME$S = "vc-resizer";
|
|
22289
22994
|
const Resizer = vue.defineComponent({
|
|
22290
|
-
name: COMPONENT_NAME$
|
|
22995
|
+
name: COMPONENT_NAME$S,
|
|
22291
22996
|
props: props$A,
|
|
22292
22997
|
emits: ["resize"],
|
|
22293
22998
|
setup(props, { emit, slots, expose }) {
|
|
@@ -22457,10 +23162,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
22457
23162
|
|
|
22458
23163
|
/** @jsxImportSource vue */
|
|
22459
23164
|
|
|
22460
|
-
const COMPONENT_NAME$
|
|
23165
|
+
const COMPONENT_NAME$R = 'vc-modal';
|
|
22461
23166
|
let zIndexNumber = 1002;
|
|
22462
23167
|
const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
22463
|
-
name: COMPONENT_NAME$
|
|
23168
|
+
name: COMPONENT_NAME$R,
|
|
22464
23169
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
|
|
22465
23170
|
props: props$z,
|
|
22466
23171
|
setup(props, {
|
|
@@ -22899,9 +23604,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
22899
23604
|
|
|
22900
23605
|
/** @jsxImportSource vue */
|
|
22901
23606
|
|
|
22902
|
-
const COMPONENT_NAME$
|
|
23607
|
+
const COMPONENT_NAME$Q = 'vc-modal';
|
|
22903
23608
|
const MModalView = /* @__PURE__ */ vue.defineComponent({
|
|
22904
|
-
name: COMPONENT_NAME$
|
|
23609
|
+
name: COMPONENT_NAME$Q,
|
|
22905
23610
|
emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
|
|
22906
23611
|
props: props$y,
|
|
22907
23612
|
setup(props, {
|
|
@@ -23113,9 +23818,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23113
23818
|
|
|
23114
23819
|
/** @jsxImportSource vue */
|
|
23115
23820
|
|
|
23116
|
-
const COMPONENT_NAME$
|
|
23821
|
+
const COMPONENT_NAME$P = 'vc-notice';
|
|
23117
23822
|
const NoticeView = /* @__PURE__ */ vue.defineComponent({
|
|
23118
|
-
name: COMPONENT_NAME$
|
|
23823
|
+
name: COMPONENT_NAME$P,
|
|
23119
23824
|
props: props$x,
|
|
23120
23825
|
emits: ['portal-fulfilled', 'close', 'before-close'],
|
|
23121
23826
|
setup(props, {
|
|
@@ -23288,9 +23993,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23288
23993
|
|
|
23289
23994
|
/** @jsxImportSource vue */
|
|
23290
23995
|
|
|
23291
|
-
const COMPONENT_NAME$
|
|
23996
|
+
const COMPONENT_NAME$O = 'vc-option';
|
|
23292
23997
|
const Option$1 = /* @__PURE__ */ vue.defineComponent({
|
|
23293
|
-
name: COMPONENT_NAME$
|
|
23998
|
+
name: COMPONENT_NAME$O,
|
|
23294
23999
|
props: props$w,
|
|
23295
24000
|
setup(props, {
|
|
23296
24001
|
slots
|
|
@@ -23374,9 +24079,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23374
24079
|
|
|
23375
24080
|
/** @jsxImportSource vue */
|
|
23376
24081
|
|
|
23377
|
-
const COMPONENT_NAME$
|
|
24082
|
+
const COMPONENT_NAME$N = 'vc-tag';
|
|
23378
24083
|
const Tag = /* @__PURE__ */ vue.defineComponent({
|
|
23379
|
-
name: COMPONENT_NAME$
|
|
24084
|
+
name: COMPONENT_NAME$N,
|
|
23380
24085
|
props: props$u,
|
|
23381
24086
|
emits: ['close', 'change'],
|
|
23382
24087
|
setup(props, {
|
|
@@ -23447,9 +24152,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23447
24152
|
|
|
23448
24153
|
/** @jsxImportSource vue */
|
|
23449
24154
|
|
|
23450
|
-
const COMPONENT_NAME$
|
|
24155
|
+
const COMPONENT_NAME$M = 'vc-select-option';
|
|
23451
24156
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
23452
|
-
name: COMPONENT_NAME$
|
|
24157
|
+
name: COMPONENT_NAME$M,
|
|
23453
24158
|
props: props$t,
|
|
23454
24159
|
setup(props, {
|
|
23455
24160
|
slots,
|
|
@@ -23544,9 +24249,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23544
24249
|
|
|
23545
24250
|
/** @jsxImportSource vue */
|
|
23546
24251
|
|
|
23547
|
-
const COMPONENT_NAME$
|
|
24252
|
+
const COMPONENT_NAME$L = 'vc-select-option-group';
|
|
23548
24253
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
23549
|
-
name: COMPONENT_NAME$
|
|
24254
|
+
name: COMPONENT_NAME$L,
|
|
23550
24255
|
props: props$s,
|
|
23551
24256
|
setup(props, {
|
|
23552
24257
|
slots
|
|
@@ -23576,9 +24281,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23576
24281
|
|
|
23577
24282
|
/** @jsxImportSource vue */
|
|
23578
24283
|
|
|
23579
|
-
const COMPONENT_NAME$
|
|
24284
|
+
const COMPONENT_NAME$K = 'vc-select-all';
|
|
23580
24285
|
const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
23581
|
-
name: COMPONENT_NAME$
|
|
24286
|
+
name: COMPONENT_NAME$K,
|
|
23582
24287
|
props: {
|
|
23583
24288
|
data: {
|
|
23584
24289
|
type: Array,
|
|
@@ -23648,9 +24353,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23648
24353
|
|
|
23649
24354
|
/** @jsxImportSource vue */
|
|
23650
24355
|
|
|
23651
|
-
const COMPONENT_NAME$
|
|
24356
|
+
const COMPONENT_NAME$J = 'vc-select';
|
|
23652
24357
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
23653
|
-
name: COMPONENT_NAME$
|
|
24358
|
+
name: COMPONENT_NAME$J,
|
|
23654
24359
|
props: props$1a,
|
|
23655
24360
|
emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
|
|
23656
24361
|
setup(props, {
|
|
@@ -23944,9 +24649,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
23944
24649
|
|
|
23945
24650
|
/** @jsxImportSource vue */
|
|
23946
24651
|
|
|
23947
|
-
const COMPONENT_NAME$
|
|
24652
|
+
const COMPONENT_NAME$I = 'vc-pagination';
|
|
23948
24653
|
const Pagination = /* @__PURE__ */ vue.defineComponent({
|
|
23949
|
-
name: COMPONENT_NAME$
|
|
24654
|
+
name: COMPONENT_NAME$I,
|
|
23950
24655
|
props: props$v,
|
|
23951
24656
|
emits: ['update:current', 'change', 'page-size-change'],
|
|
23952
24657
|
setup(props, {
|
|
@@ -24144,9 +24849,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24144
24849
|
|
|
24145
24850
|
/** @jsxImportSource vue */
|
|
24146
24851
|
|
|
24147
|
-
const COMPONENT_NAME$
|
|
24852
|
+
const COMPONENT_NAME$H = 'vc-picker';
|
|
24148
24853
|
const Picker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
24149
|
-
name: COMPONENT_NAME$
|
|
24854
|
+
name: COMPONENT_NAME$H,
|
|
24150
24855
|
props: props$r,
|
|
24151
24856
|
setup(props, {
|
|
24152
24857
|
slots
|
|
@@ -24209,9 +24914,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24209
24914
|
|
|
24210
24915
|
/** @jsxImportSource vue */
|
|
24211
24916
|
|
|
24212
|
-
const COMPONENT_NAME$
|
|
24917
|
+
const COMPONENT_NAME$G = 'vc-popconfirm';
|
|
24213
24918
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
24214
|
-
name: COMPONENT_NAME$
|
|
24919
|
+
name: COMPONENT_NAME$G,
|
|
24215
24920
|
props: props$q,
|
|
24216
24921
|
inheritAttrs: false,
|
|
24217
24922
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
|
|
@@ -24379,9 +25084,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24379
25084
|
|
|
24380
25085
|
/** @jsxImportSource vue */
|
|
24381
25086
|
|
|
24382
|
-
const COMPONENT_NAME$
|
|
25087
|
+
const COMPONENT_NAME$F = 'vc-popup';
|
|
24383
25088
|
const MPopup = /* @__PURE__ */ vue.defineComponent({
|
|
24384
|
-
name: COMPONENT_NAME$
|
|
25089
|
+
name: COMPONENT_NAME$F,
|
|
24385
25090
|
props: props$p,
|
|
24386
25091
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change'],
|
|
24387
25092
|
setup(props, {
|
|
@@ -24508,9 +25213,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24508
25213
|
|
|
24509
25214
|
/** @jsxImportSource vue */
|
|
24510
25215
|
|
|
24511
|
-
const COMPONENT_NAME$
|
|
25216
|
+
const COMPONENT_NAME$E = 'vc-print';
|
|
24512
25217
|
const Print = /* @__PURE__ */ vue.defineComponent({
|
|
24513
|
-
name: COMPONENT_NAME$
|
|
25218
|
+
name: COMPONENT_NAME$E,
|
|
24514
25219
|
props: props$o,
|
|
24515
25220
|
setup(props, {
|
|
24516
25221
|
expose,
|
|
@@ -24590,7 +25295,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
24590
25295
|
},
|
|
24591
25296
|
strokeColor: {
|
|
24592
25297
|
type: String,
|
|
24593
|
-
default: "#
|
|
25298
|
+
default: "#456CF6"
|
|
24594
25299
|
},
|
|
24595
25300
|
trackColor: {
|
|
24596
25301
|
type: String,
|
|
@@ -24612,9 +25317,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24612
25317
|
|
|
24613
25318
|
/** @jsxImportSource vue */
|
|
24614
25319
|
|
|
24615
|
-
const COMPONENT_NAME$
|
|
25320
|
+
const COMPONENT_NAME$D = 'vc-progress-circle';
|
|
24616
25321
|
const Circle$1 = /* @__PURE__ */ vue.defineComponent({
|
|
24617
|
-
name: COMPONENT_NAME$
|
|
25322
|
+
name: COMPONENT_NAME$D,
|
|
24618
25323
|
props: props$n,
|
|
24619
25324
|
setup(props, {
|
|
24620
25325
|
slots
|
|
@@ -24674,9 +25379,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24674
25379
|
|
|
24675
25380
|
/** @jsxImportSource vue */
|
|
24676
25381
|
|
|
24677
|
-
const COMPONENT_NAME$
|
|
25382
|
+
const COMPONENT_NAME$C = 'vc-progress-line';
|
|
24678
25383
|
const Line$2 = /* @__PURE__ */ vue.defineComponent({
|
|
24679
|
-
name: COMPONENT_NAME$
|
|
25384
|
+
name: COMPONENT_NAME$C,
|
|
24680
25385
|
props: props$n,
|
|
24681
25386
|
setup(props) {
|
|
24682
25387
|
const colorStyle = vue.computed(() => {
|
|
@@ -24723,9 +25428,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24723
25428
|
function _isSlot(s) {
|
|
24724
25429
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
24725
25430
|
}
|
|
24726
|
-
const COMPONENT_NAME$
|
|
25431
|
+
const COMPONENT_NAME$B = 'vc-progress';
|
|
24727
25432
|
const Progress = /* @__PURE__ */ vue.defineComponent({
|
|
24728
|
-
name: COMPONENT_NAME$
|
|
25433
|
+
name: COMPONENT_NAME$B,
|
|
24729
25434
|
props: props$n,
|
|
24730
25435
|
setup(props, {
|
|
24731
25436
|
slots
|
|
@@ -24887,9 +25592,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24887
25592
|
|
|
24888
25593
|
/** @jsxImportSource vue */
|
|
24889
25594
|
|
|
24890
|
-
const COMPONENT_NAME$
|
|
25595
|
+
const COMPONENT_NAME$A = 'vc-radio';
|
|
24891
25596
|
const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
24892
|
-
name: COMPONENT_NAME$
|
|
25597
|
+
name: COMPONENT_NAME$A,
|
|
24893
25598
|
props: props$m,
|
|
24894
25599
|
emits: ['update:modelValue', 'change'],
|
|
24895
25600
|
setup(props, {
|
|
@@ -24933,9 +25638,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
24933
25638
|
|
|
24934
25639
|
/** @jsxImportSource vue */
|
|
24935
25640
|
|
|
24936
|
-
const COMPONENT_NAME$
|
|
25641
|
+
const COMPONENT_NAME$z = 'vc-radio-button';
|
|
24937
25642
|
const RadioButton = /* @__PURE__ */ vue.defineComponent({
|
|
24938
|
-
name: COMPONENT_NAME$
|
|
25643
|
+
name: COMPONENT_NAME$z,
|
|
24939
25644
|
props: {
|
|
24940
25645
|
...props$m,
|
|
24941
25646
|
labelStyle: [String, Object],
|
|
@@ -25048,9 +25753,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25048
25753
|
|
|
25049
25754
|
/** @jsxImportSource vue */
|
|
25050
25755
|
|
|
25051
|
-
const COMPONENT_NAME$
|
|
25756
|
+
const COMPONENT_NAME$y = 'vc-radio-group';
|
|
25052
25757
|
const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
25053
|
-
name: COMPONENT_NAME$
|
|
25758
|
+
name: COMPONENT_NAME$y,
|
|
25054
25759
|
props: props$l,
|
|
25055
25760
|
emits: ['update:modelValue', 'change'],
|
|
25056
25761
|
setup(props, {
|
|
@@ -25071,9 +25776,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25071
25776
|
|
|
25072
25777
|
/** @jsxImportSource vue */
|
|
25073
25778
|
|
|
25074
|
-
const COMPONENT_NAME$
|
|
25779
|
+
const COMPONENT_NAME$x = 'vcm-radio';
|
|
25075
25780
|
const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
25076
|
-
name: COMPONENT_NAME$
|
|
25781
|
+
name: COMPONENT_NAME$x,
|
|
25077
25782
|
props: props$m,
|
|
25078
25783
|
emits: ['update:modelValue', 'change'],
|
|
25079
25784
|
setup(props, {
|
|
@@ -25117,9 +25822,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25117
25822
|
|
|
25118
25823
|
/** @jsxImportSource vue */
|
|
25119
25824
|
|
|
25120
|
-
const COMPONENT_NAME$
|
|
25825
|
+
const COMPONENT_NAME$w = 'vcm-radio-group';
|
|
25121
25826
|
const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
25122
|
-
name: COMPONENT_NAME$
|
|
25827
|
+
name: COMPONENT_NAME$w,
|
|
25123
25828
|
props: props$l,
|
|
25124
25829
|
emits: ['update:modelValue', 'change'],
|
|
25125
25830
|
setup(props, {
|
|
@@ -25186,9 +25891,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25186
25891
|
|
|
25187
25892
|
/** @jsxImportSource vue */
|
|
25188
25893
|
|
|
25189
|
-
const COMPONENT_NAME$
|
|
25894
|
+
const COMPONENT_NAME$v = 'vc-rate';
|
|
25190
25895
|
const Rate = /* @__PURE__ */ vue.defineComponent({
|
|
25191
|
-
name: COMPONENT_NAME$
|
|
25896
|
+
name: COMPONENT_NAME$v,
|
|
25192
25897
|
props: props$k,
|
|
25193
25898
|
emits: ['update:modelValue', 'change'],
|
|
25194
25899
|
setup(props, {
|
|
@@ -25504,9 +26209,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25504
26209
|
|
|
25505
26210
|
/** @jsxImportSource vue */
|
|
25506
26211
|
|
|
25507
|
-
const COMPONENT_NAME$
|
|
26212
|
+
const COMPONENT_NAME$u = 'vc-recycle-list-scroll-state';
|
|
25508
26213
|
const ScrollState = /* @__PURE__ */ vue.defineComponent({
|
|
25509
|
-
name: COMPONENT_NAME$
|
|
26214
|
+
name: COMPONENT_NAME$u,
|
|
25510
26215
|
setup(_, {
|
|
25511
26216
|
slots
|
|
25512
26217
|
}) {
|
|
@@ -25636,12 +26341,12 @@ var VcComponents = (function (exports, vue) {
|
|
|
25636
26341
|
|
|
25637
26342
|
/** @jsxImportSource vue */
|
|
25638
26343
|
|
|
25639
|
-
const COMPONENT_NAME$
|
|
26344
|
+
const COMPONENT_NAME$t = 'vc-recycle-list-container';
|
|
25640
26345
|
|
|
25641
26346
|
// TODO: 抽离
|
|
25642
26347
|
const transformKey = prefixStyle('transform').camel;
|
|
25643
26348
|
const Container$1 = /* @__PURE__ */ vue.defineComponent({
|
|
25644
|
-
name: COMPONENT_NAME$
|
|
26349
|
+
name: COMPONENT_NAME$t,
|
|
25645
26350
|
props: props$i,
|
|
25646
26351
|
emits: ['refresh'],
|
|
25647
26352
|
setup(props, {
|
|
@@ -25739,9 +26444,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
25739
26444
|
|
|
25740
26445
|
/** @jsxImportSource vue */
|
|
25741
26446
|
|
|
25742
|
-
const COMPONENT_NAME$
|
|
26447
|
+
const COMPONENT_NAME$s = 'vc-recycle-list';
|
|
25743
26448
|
const RecycleList = /* @__PURE__ */ vue.defineComponent({
|
|
25744
|
-
name: COMPONENT_NAME$
|
|
26449
|
+
name: COMPONENT_NAME$s,
|
|
25745
26450
|
props: props$j,
|
|
25746
26451
|
emits: ['scroll', 'row-resize'],
|
|
25747
26452
|
setup(props, {
|
|
@@ -26315,9 +27020,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26315
27020
|
|
|
26316
27021
|
/** @jsxImportSource vue */
|
|
26317
27022
|
|
|
26318
|
-
const COMPONENT_NAME$
|
|
27023
|
+
const COMPONENT_NAME$r = 'vc-slider';
|
|
26319
27024
|
const Slider = /* @__PURE__ */ vue.defineComponent({
|
|
26320
|
-
name: COMPONENT_NAME$
|
|
27025
|
+
name: COMPONENT_NAME$r,
|
|
26321
27026
|
props: props$h,
|
|
26322
27027
|
setup(props, {
|
|
26323
27028
|
slots
|
|
@@ -26341,9 +27046,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26341
27046
|
|
|
26342
27047
|
/** @jsxImportSource vue */
|
|
26343
27048
|
|
|
26344
|
-
const COMPONENT_NAME$
|
|
27049
|
+
const COMPONENT_NAME$q = 'vc-sort-list';
|
|
26345
27050
|
const SortList = /* @__PURE__ */ vue.defineComponent({
|
|
26346
|
-
name: COMPONENT_NAME$
|
|
27051
|
+
name: COMPONENT_NAME$q,
|
|
26347
27052
|
props: props$g,
|
|
26348
27053
|
setup(props, {
|
|
26349
27054
|
slots
|
|
@@ -26367,9 +27072,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26367
27072
|
|
|
26368
27073
|
/** @jsxImportSource vue */
|
|
26369
27074
|
|
|
26370
|
-
const COMPONENT_NAME$
|
|
27075
|
+
const COMPONENT_NAME$p = 'vc-steps';
|
|
26371
27076
|
const Steps = /* @__PURE__ */ vue.defineComponent({
|
|
26372
|
-
name: COMPONENT_NAME$
|
|
27077
|
+
name: COMPONENT_NAME$p,
|
|
26373
27078
|
props: props$f,
|
|
26374
27079
|
setup(props, {
|
|
26375
27080
|
slots
|
|
@@ -26495,9 +27200,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26495
27200
|
|
|
26496
27201
|
/** @jsxImportSource vue */
|
|
26497
27202
|
|
|
26498
|
-
const COMPONENT_NAME$
|
|
27203
|
+
const COMPONENT_NAME$o = 'vc-switch';
|
|
26499
27204
|
const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
26500
|
-
name: COMPONENT_NAME$
|
|
27205
|
+
name: COMPONENT_NAME$o,
|
|
26501
27206
|
props: props$e,
|
|
26502
27207
|
// click -> onClick要被拦截,此处不能放置
|
|
26503
27208
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -26571,9 +27276,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
26571
27276
|
|
|
26572
27277
|
/** @jsxImportSource vue */
|
|
26573
27278
|
|
|
26574
|
-
const COMPONENT_NAME$
|
|
27279
|
+
const COMPONENT_NAME$n = 'vcm-switch';
|
|
26575
27280
|
const MSwitch = /* @__PURE__ */ vue.defineComponent({
|
|
26576
|
-
name: COMPONENT_NAME$
|
|
27281
|
+
name: COMPONENT_NAME$n,
|
|
26577
27282
|
props: props$e,
|
|
26578
27283
|
// click -> onClick要被拦截,此处不能放置
|
|
26579
27284
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -27686,9 +28391,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
27686
28391
|
|
|
27687
28392
|
/** @jsxImportSource vue */
|
|
27688
28393
|
|
|
27689
|
-
const COMPONENT_NAME$
|
|
28394
|
+
const COMPONENT_NAME$m = 'vc-table-normal-list';
|
|
27690
28395
|
const NormalList = /* @__PURE__ */ vue.defineComponent({
|
|
27691
|
-
name: COMPONENT_NAME$
|
|
28396
|
+
name: COMPONENT_NAME$m,
|
|
27692
28397
|
props: {
|
|
27693
28398
|
data: {
|
|
27694
28399
|
type: Array,
|
|
@@ -28689,9 +29394,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
28689
29394
|
|
|
28690
29395
|
/** @jsxImportSource vue */
|
|
28691
29396
|
|
|
28692
|
-
const COMPONENT_NAME$
|
|
29397
|
+
const COMPONENT_NAME$l = 'vc-table';
|
|
28693
29398
|
const Table$1 = /* @__PURE__ */ vue.defineComponent({
|
|
28694
|
-
name: COMPONENT_NAME$
|
|
29399
|
+
name: COMPONENT_NAME$l,
|
|
28695
29400
|
props: props$d,
|
|
28696
29401
|
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'],
|
|
28697
29402
|
setup(props, {
|
|
@@ -29894,9 +30599,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
29894
30599
|
|
|
29895
30600
|
/** @jsxImportSource vue */
|
|
29896
30601
|
|
|
29897
|
-
const COMPONENT_NAME$
|
|
30602
|
+
const COMPONENT_NAME$k = 'vc-tabs';
|
|
29898
30603
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
29899
|
-
name: COMPONENT_NAME$
|
|
30604
|
+
name: COMPONENT_NAME$k,
|
|
29900
30605
|
props: props$c,
|
|
29901
30606
|
emits: ['update:modelValue', 'change', 'click'],
|
|
29902
30607
|
setup(props, {
|
|
@@ -30149,9 +30854,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30149
30854
|
|
|
30150
30855
|
/** @jsxImportSource vue */
|
|
30151
30856
|
|
|
30152
|
-
const COMPONENT_NAME$
|
|
30857
|
+
const COMPONENT_NAME$j = 'vc-tabs-pane';
|
|
30153
30858
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
30154
|
-
name: COMPONENT_NAME$
|
|
30859
|
+
name: COMPONENT_NAME$j,
|
|
30155
30860
|
props: props$b,
|
|
30156
30861
|
setup(_, {
|
|
30157
30862
|
slots
|
|
@@ -30206,9 +30911,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30206
30911
|
|
|
30207
30912
|
/** @jsxImportSource vue */
|
|
30208
30913
|
|
|
30209
|
-
const COMPONENT_NAME$
|
|
30914
|
+
const COMPONENT_NAME$i = 'vcm-tabs';
|
|
30210
30915
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
30211
|
-
name: COMPONENT_NAME$
|
|
30916
|
+
name: COMPONENT_NAME$i,
|
|
30212
30917
|
props: props$a,
|
|
30213
30918
|
emits: ['update:modelValue', 'change', 'click'],
|
|
30214
30919
|
setup(props, {
|
|
@@ -30473,9 +31178,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30473
31178
|
|
|
30474
31179
|
/** @jsxImportSource vue */
|
|
30475
31180
|
|
|
30476
|
-
const COMPONENT_NAME$
|
|
31181
|
+
const COMPONENT_NAME$h = 'vcm-tabs-pane';
|
|
30477
31182
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
30478
|
-
name: COMPONENT_NAME$
|
|
31183
|
+
name: COMPONENT_NAME$h,
|
|
30479
31184
|
props: props$b,
|
|
30480
31185
|
setup(_, {
|
|
30481
31186
|
slots
|
|
@@ -30539,9 +31244,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30539
31244
|
|
|
30540
31245
|
/** @jsxImportSource vue */
|
|
30541
31246
|
|
|
30542
|
-
const COMPONENT_NAME$
|
|
31247
|
+
const COMPONENT_NAME$g = 'vc-text';
|
|
30543
31248
|
const Text$2 = /* @__PURE__ */ vue.defineComponent({
|
|
30544
|
-
name: COMPONENT_NAME$
|
|
31249
|
+
name: COMPONENT_NAME$g,
|
|
30545
31250
|
props: props$9,
|
|
30546
31251
|
setup(props, {
|
|
30547
31252
|
emit
|
|
@@ -30908,9 +31613,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30908
31613
|
|
|
30909
31614
|
/** @jsxImportSource vue */
|
|
30910
31615
|
|
|
30911
|
-
const COMPONENT_NAME$
|
|
31616
|
+
const COMPONENT_NAME$f = 'vc-textarea';
|
|
30912
31617
|
const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
30913
|
-
name: COMPONENT_NAME$
|
|
31618
|
+
name: COMPONENT_NAME$f,
|
|
30914
31619
|
props: Object.assign({}, props$8, {
|
|
30915
31620
|
indicator: {
|
|
30916
31621
|
type: [Boolean, Object],
|
|
@@ -30966,9 +31671,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
30966
31671
|
|
|
30967
31672
|
/** @jsxImportSource vue */
|
|
30968
31673
|
|
|
30969
|
-
const COMPONENT_NAME$
|
|
31674
|
+
const COMPONENT_NAME$e = 'vcm-textarea';
|
|
30970
31675
|
const MTextarea = /* @__PURE__ */ vue.defineComponent({
|
|
30971
|
-
name: COMPONENT_NAME$
|
|
31676
|
+
name: COMPONENT_NAME$e,
|
|
30972
31677
|
props: Object.assign({}, props$8, {
|
|
30973
31678
|
align: {
|
|
30974
31679
|
type: String,
|
|
@@ -31051,9 +31756,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31051
31756
|
}
|
|
31052
31757
|
};
|
|
31053
31758
|
|
|
31054
|
-
const COMPONENT_NAME$
|
|
31759
|
+
const COMPONENT_NAME$d = "vc-theme";
|
|
31055
31760
|
const Theme$1 = vue.defineComponent({
|
|
31056
|
-
name: COMPONENT_NAME$
|
|
31761
|
+
name: COMPONENT_NAME$d,
|
|
31057
31762
|
props: props$7,
|
|
31058
31763
|
setup(props, { slots }) {
|
|
31059
31764
|
const themeId = getUid("vc-theme");
|
|
@@ -31136,9 +31841,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31136
31841
|
}
|
|
31137
31842
|
});
|
|
31138
31843
|
|
|
31139
|
-
const COMPONENT_NAME$
|
|
31844
|
+
const COMPONENT_NAME$c = "vc-theme-view";
|
|
31140
31845
|
const ThemeView = vue.defineComponent({
|
|
31141
|
-
name: COMPONENT_NAME$
|
|
31846
|
+
name: COMPONENT_NAME$c,
|
|
31142
31847
|
props: props$7,
|
|
31143
31848
|
setup(props, { slots }) {
|
|
31144
31849
|
return () => {
|
|
@@ -31154,9 +31859,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31154
31859
|
}
|
|
31155
31860
|
});
|
|
31156
31861
|
|
|
31157
|
-
const COMPONENT_NAME$
|
|
31862
|
+
const COMPONENT_NAME$b = "vc-theme-text";
|
|
31158
31863
|
const ThemeText = vue.defineComponent({
|
|
31159
|
-
name: COMPONENT_NAME$
|
|
31864
|
+
name: COMPONENT_NAME$b,
|
|
31160
31865
|
props: props$7,
|
|
31161
31866
|
setup(props, { slots }) {
|
|
31162
31867
|
return () => {
|
|
@@ -31172,9 +31877,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31172
31877
|
}
|
|
31173
31878
|
});
|
|
31174
31879
|
|
|
31175
|
-
const COMPONENT_NAME$
|
|
31880
|
+
const COMPONENT_NAME$a = "vc-theme-image";
|
|
31176
31881
|
const ThemeImage = vue.defineComponent({
|
|
31177
|
-
name: COMPONENT_NAME$
|
|
31882
|
+
name: COMPONENT_NAME$a,
|
|
31178
31883
|
props: props$7,
|
|
31179
31884
|
setup(props, { slots }) {
|
|
31180
31885
|
return () => {
|
|
@@ -31226,12 +31931,12 @@ var VcComponents = (function (exports, vue) {
|
|
|
31226
31931
|
|
|
31227
31932
|
/** @jsxImportSource vue */
|
|
31228
31933
|
|
|
31229
|
-
const COMPONENT_NAME$
|
|
31934
|
+
const COMPONENT_NAME$9 = 'vc-time-picker';
|
|
31230
31935
|
const getPanel = type => {
|
|
31231
31936
|
const isRange = type === 'timerange';
|
|
31232
31937
|
return isRange ? TimeRangePanel : TimePanel;
|
|
31233
31938
|
};
|
|
31234
|
-
const TimePicker = createPicker(COMPONENT_NAME$
|
|
31939
|
+
const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
|
|
31235
31940
|
const props = vue.getCurrentInstance().props;
|
|
31236
31941
|
const icon = vue.ref('icon');
|
|
31237
31942
|
const panel = vue.shallowRef({});
|
|
@@ -31267,9 +31972,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31267
31972
|
|
|
31268
31973
|
/** @jsxImportSource vue */
|
|
31269
31974
|
|
|
31270
|
-
const COMPONENT_NAME$
|
|
31975
|
+
const COMPONENT_NAME$8 = 'vc-timeline';
|
|
31271
31976
|
const Timeline = /* @__PURE__ */ vue.defineComponent({
|
|
31272
|
-
name: COMPONENT_NAME$
|
|
31977
|
+
name: COMPONENT_NAME$8,
|
|
31273
31978
|
props: props$5,
|
|
31274
31979
|
setup(props, {
|
|
31275
31980
|
slots
|
|
@@ -31296,9 +32001,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
31296
32001
|
|
|
31297
32002
|
/** @jsxImportSource vue */
|
|
31298
32003
|
|
|
31299
|
-
const COMPONENT_NAME$
|
|
32004
|
+
const COMPONENT_NAME$7 = 'vc-touch';
|
|
31300
32005
|
const Touch = /* @__PURE__ */ vue.defineComponent({
|
|
31301
|
-
name: COMPONENT_NAME$
|
|
32006
|
+
name: COMPONENT_NAME$7,
|
|
31302
32007
|
props: props$4,
|
|
31303
32008
|
setup(props, {
|
|
31304
32009
|
slots
|
|
@@ -31806,21 +32511,68 @@ var VcComponents = (function (exports, vue) {
|
|
|
31806
32511
|
parentNode.insertChild({ data });
|
|
31807
32512
|
}
|
|
31808
32513
|
}
|
|
32514
|
+
/**
|
|
32515
|
+
* 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
|
|
32516
|
+
* 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
|
|
32517
|
+
* @param checkedValues ~
|
|
32518
|
+
* @returns ~
|
|
32519
|
+
*/
|
|
32520
|
+
_getCascadeCheckedAnchorIds(checkedValues) {
|
|
32521
|
+
const checkedSet = new Set(checkedValues);
|
|
32522
|
+
const nodesMap = this.nodesMap;
|
|
32523
|
+
const anchors = [];
|
|
32524
|
+
for (const id of checkedValues) {
|
|
32525
|
+
const node = nodesMap[id];
|
|
32526
|
+
if (!node) continue;
|
|
32527
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
32528
|
+
(child) => checkedSet.has(child.getter.value)
|
|
32529
|
+
);
|
|
32530
|
+
if (!hasSelectedChildInSet) {
|
|
32531
|
+
anchors.push(id);
|
|
32532
|
+
}
|
|
32533
|
+
}
|
|
32534
|
+
anchors.sort((a, b) => {
|
|
32535
|
+
const na = nodesMap[a];
|
|
32536
|
+
const nb = nodesMap[b];
|
|
32537
|
+
if (!na || !nb) return 0;
|
|
32538
|
+
return nb.states.level - na.states.level;
|
|
32539
|
+
});
|
|
32540
|
+
return anchors;
|
|
32541
|
+
}
|
|
31809
32542
|
_initDefaultCheckedNodes() {
|
|
31810
32543
|
const checkedValues = this.checkedValues || [];
|
|
31811
32544
|
const nodesMap = this.nodesMap;
|
|
31812
|
-
|
|
32545
|
+
if (this.checkStrictly) {
|
|
32546
|
+
checkedValues.forEach((id) => {
|
|
32547
|
+
const node = nodesMap[id];
|
|
32548
|
+
if (node) {
|
|
32549
|
+
node.setChecked(true, false);
|
|
32550
|
+
}
|
|
32551
|
+
});
|
|
32552
|
+
return;
|
|
32553
|
+
}
|
|
32554
|
+
const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
|
|
32555
|
+
anchorIds.forEach((id) => {
|
|
31813
32556
|
const node = nodesMap[id];
|
|
31814
32557
|
if (node) {
|
|
31815
|
-
node.setChecked(true,
|
|
32558
|
+
node.setChecked(true, true);
|
|
31816
32559
|
}
|
|
31817
32560
|
});
|
|
31818
32561
|
}
|
|
31819
32562
|
_initDefaultCheckedNode(node) {
|
|
31820
32563
|
const checkedValues = this.checkedValues || [];
|
|
31821
32564
|
const nodeValue = node.getter.value;
|
|
31822
|
-
if (checkedValues.indexOf(nodeValue)
|
|
31823
|
-
|
|
32565
|
+
if (checkedValues.indexOf(nodeValue) === -1) return;
|
|
32566
|
+
if (this.checkStrictly) {
|
|
32567
|
+
node.setChecked(true, false);
|
|
32568
|
+
return;
|
|
32569
|
+
}
|
|
32570
|
+
const checkedSet = new Set(checkedValues);
|
|
32571
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
32572
|
+
(child) => checkedSet.has(child.getter.value)
|
|
32573
|
+
);
|
|
32574
|
+
if (!hasSelectedChildInSet) {
|
|
32575
|
+
node.setChecked(true, true);
|
|
31824
32576
|
}
|
|
31825
32577
|
}
|
|
31826
32578
|
setCheckedValues(newVal) {
|
|
@@ -32048,9 +32800,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
32048
32800
|
|
|
32049
32801
|
/** @jsxImportSource vue */
|
|
32050
32802
|
|
|
32051
|
-
const COMPONENT_NAME$
|
|
32803
|
+
const COMPONENT_NAME$6 = 'vc-tree-node';
|
|
32052
32804
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
32053
|
-
name: COMPONENT_NAME$
|
|
32805
|
+
name: COMPONENT_NAME$6,
|
|
32054
32806
|
props: props$3,
|
|
32055
32807
|
emits: ['node-expand'],
|
|
32056
32808
|
setup(props, {
|
|
@@ -32549,9 +33301,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
32549
33301
|
|
|
32550
33302
|
/** @jsxImportSource vue */
|
|
32551
33303
|
|
|
32552
|
-
const COMPONENT_NAME$
|
|
33304
|
+
const COMPONENT_NAME$5 = 'vc-tree';
|
|
32553
33305
|
const Tree$1 = /* @__PURE__ */ vue.defineComponent({
|
|
32554
|
-
name: COMPONENT_NAME$
|
|
33306
|
+
name: COMPONENT_NAME$5,
|
|
32555
33307
|
props: props$2,
|
|
32556
33308
|
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'],
|
|
32557
33309
|
setup(props, {
|
|
@@ -32746,6 +33498,225 @@ var VcComponents = (function (exports, vue) {
|
|
|
32746
33498
|
}
|
|
32747
33499
|
});
|
|
32748
33500
|
|
|
33501
|
+
/** @jsxImportSource vue */
|
|
33502
|
+
|
|
33503
|
+
const COMPONENT_NAME$4 = 'vc-tree-select-content';
|
|
33504
|
+
const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
|
|
33505
|
+
name: COMPONENT_NAME$4,
|
|
33506
|
+
props: {
|
|
33507
|
+
value: {
|
|
33508
|
+
type: Array,
|
|
33509
|
+
required: true
|
|
33510
|
+
},
|
|
33511
|
+
data: {
|
|
33512
|
+
type: Array,
|
|
33513
|
+
default: () => []
|
|
33514
|
+
},
|
|
33515
|
+
checkStrictly: {
|
|
33516
|
+
type: Boolean,
|
|
33517
|
+
default: false
|
|
33518
|
+
},
|
|
33519
|
+
renderNodeLabel: Function
|
|
33520
|
+
},
|
|
33521
|
+
emits: ['change'],
|
|
33522
|
+
setup(props, {
|
|
33523
|
+
emit
|
|
33524
|
+
}) {
|
|
33525
|
+
return () => {
|
|
33526
|
+
return vue.createVNode(Scroller, {
|
|
33527
|
+
"class": "vc-tree-select__options",
|
|
33528
|
+
"max-height": "200px"
|
|
33529
|
+
}, {
|
|
33530
|
+
default: () => [vue.createVNode(Tree$1, {
|
|
33531
|
+
"model-value": props.value,
|
|
33532
|
+
"expanded-values": props.value,
|
|
33533
|
+
"data": props.data,
|
|
33534
|
+
"checkStrictly": props.checkStrictly,
|
|
33535
|
+
"allowDispatch": false,
|
|
33536
|
+
"showCheckbox": true,
|
|
33537
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
33538
|
+
"onChange": (_, data) => emit('change', _, data)
|
|
33539
|
+
}, null)]
|
|
33540
|
+
});
|
|
33541
|
+
};
|
|
33542
|
+
}
|
|
33543
|
+
});
|
|
33544
|
+
|
|
33545
|
+
/** @jsxImportSource vue */
|
|
33546
|
+
|
|
33547
|
+
const COMPONENT_NAME$3 = 'vc-tree-select-content-cascader';
|
|
33548
|
+
const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
|
|
33549
|
+
name: COMPONENT_NAME$3,
|
|
33550
|
+
props: {
|
|
33551
|
+
value: {
|
|
33552
|
+
type: Array,
|
|
33553
|
+
required: true
|
|
33554
|
+
},
|
|
33555
|
+
data: {
|
|
33556
|
+
type: Array,
|
|
33557
|
+
default: () => []
|
|
33558
|
+
},
|
|
33559
|
+
checkStrictly: {
|
|
33560
|
+
type: Boolean,
|
|
33561
|
+
default: false
|
|
33562
|
+
},
|
|
33563
|
+
renderNodeLabel: Function,
|
|
33564
|
+
numerable: {
|
|
33565
|
+
type: Boolean,
|
|
33566
|
+
default: false
|
|
33567
|
+
},
|
|
33568
|
+
separator: {
|
|
33569
|
+
type: String,
|
|
33570
|
+
default: ','
|
|
33571
|
+
},
|
|
33572
|
+
max: {
|
|
33573
|
+
type: Number,
|
|
33574
|
+
default: 1
|
|
33575
|
+
},
|
|
33576
|
+
nullValue: {
|
|
33577
|
+
type: [Number, String, Object],
|
|
33578
|
+
default: void 0
|
|
33579
|
+
}
|
|
33580
|
+
},
|
|
33581
|
+
emits: ['change'],
|
|
33582
|
+
setup(props, {
|
|
33583
|
+
emit
|
|
33584
|
+
}) {
|
|
33585
|
+
const treeRef = vue.ref(null);
|
|
33586
|
+
/** hover 展开路径,与 Cascader 一致 */
|
|
33587
|
+
const currentValue = vue.ref([]);
|
|
33588
|
+
const rebuildData = vue.computed(() => {
|
|
33589
|
+
if (!props.data.length) return [];
|
|
33590
|
+
let temp = props.data;
|
|
33591
|
+
const data = [];
|
|
33592
|
+
currentValue.value.forEach(cur => {
|
|
33593
|
+
const col = temp;
|
|
33594
|
+
data.push(col);
|
|
33595
|
+
const next = (temp.find(i => i.value == cur) || {}).children || [];
|
|
33596
|
+
temp = next;
|
|
33597
|
+
});
|
|
33598
|
+
data.push(temp);
|
|
33599
|
+
return data;
|
|
33600
|
+
});
|
|
33601
|
+
/** 驱动列区在 TreeStore 更新后重绘 */
|
|
33602
|
+
const panelTick = vue.ref(0);
|
|
33603
|
+
const columns = vue.computed(() => Array.from({
|
|
33604
|
+
length: currentValue.value.length + 1
|
|
33605
|
+
}).map((_, index) => index));
|
|
33606
|
+
const handleHover = (value, columnIndex) => {
|
|
33607
|
+
const len = currentValue.value.length - columnIndex;
|
|
33608
|
+
currentValue.value.splice(columnIndex, len, value);
|
|
33609
|
+
};
|
|
33610
|
+
const sync = async () => {
|
|
33611
|
+
await vue.nextTick();
|
|
33612
|
+
const tree = treeRef.value;
|
|
33613
|
+
if (!tree) return;
|
|
33614
|
+
const data = {
|
|
33615
|
+
checkedNodes: tree.getCheckedNodes(),
|
|
33616
|
+
checkedValues: tree.getCheckedValues(),
|
|
33617
|
+
halfCheckedNodes: tree.getHalfCheckedNodes(),
|
|
33618
|
+
halfCheckedValues: tree.getHalfCheckedValues()
|
|
33619
|
+
};
|
|
33620
|
+
panelTick.value++;
|
|
33621
|
+
emit('change', null, data);
|
|
33622
|
+
};
|
|
33623
|
+
const getNodeState = item => {
|
|
33624
|
+
const tree = treeRef.value;
|
|
33625
|
+
if (!tree) {
|
|
33626
|
+
return {
|
|
33627
|
+
checked: false,
|
|
33628
|
+
indeterminate: false
|
|
33629
|
+
};
|
|
33630
|
+
}
|
|
33631
|
+
const node = tree.getNode(item);
|
|
33632
|
+
if (!node) {
|
|
33633
|
+
return {
|
|
33634
|
+
checked: false,
|
|
33635
|
+
indeterminate: false
|
|
33636
|
+
};
|
|
33637
|
+
}
|
|
33638
|
+
return {
|
|
33639
|
+
checked: !!node.states.checked,
|
|
33640
|
+
indeterminate: !!node.states.indeterminate
|
|
33641
|
+
};
|
|
33642
|
+
};
|
|
33643
|
+
const hasChildren = item => {
|
|
33644
|
+
return !!(item.children && item.children.length > 0);
|
|
33645
|
+
};
|
|
33646
|
+
const handleCheckboxChange = async (v, item) => {
|
|
33647
|
+
const tree = treeRef.value;
|
|
33648
|
+
if (!tree) return;
|
|
33649
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
33650
|
+
sync();
|
|
33651
|
+
};
|
|
33652
|
+
const handleLabelClick = (v, item) => {
|
|
33653
|
+
const tree = treeRef.value;
|
|
33654
|
+
if (!tree) return;
|
|
33655
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
33656
|
+
sync();
|
|
33657
|
+
};
|
|
33658
|
+
return () => {
|
|
33659
|
+
return vue.createVNode("div", {
|
|
33660
|
+
"class": "vc-tree-select__cascader"
|
|
33661
|
+
}, [vue.createVNode(Tree$1, {
|
|
33662
|
+
"ref": treeRef,
|
|
33663
|
+
"class": "vc-tree-select__cascader-tree-hidden",
|
|
33664
|
+
"model-value": props.value,
|
|
33665
|
+
"expanded-values": props.value,
|
|
33666
|
+
"data": props.data,
|
|
33667
|
+
"checkStrictly": props.checkStrictly,
|
|
33668
|
+
"allowDispatch": false,
|
|
33669
|
+
"showCheckbox": true,
|
|
33670
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
33671
|
+
"numerable": props.numerable,
|
|
33672
|
+
"separator": props.separator,
|
|
33673
|
+
"max": props.max,
|
|
33674
|
+
"nullValue": props.nullValue
|
|
33675
|
+
}, null), vue.createVNode("div", {
|
|
33676
|
+
"class": "vc-tree-select__cascader-columns"
|
|
33677
|
+
}, [columns.value.map(columnIndex => {
|
|
33678
|
+
const col = rebuildData.value[columnIndex];
|
|
33679
|
+
if (!col || !col.length) return null;
|
|
33680
|
+
return vue.createVNode("div", {
|
|
33681
|
+
"class": "vc-tree-select__cascader-column",
|
|
33682
|
+
"key": columnIndex
|
|
33683
|
+
}, [vue.createVNode("div", {
|
|
33684
|
+
"class": "vc-tree-select__cascader-column-wrapper"
|
|
33685
|
+
}, [col.map(item => {
|
|
33686
|
+
const state = getNodeState(item);
|
|
33687
|
+
const isSelect = currentValue.value[columnIndex] === item.value;
|
|
33688
|
+
const child = hasChildren(item);
|
|
33689
|
+
return vue.createVNode("div", {
|
|
33690
|
+
"key": item.value,
|
|
33691
|
+
"class": ['vc-tree-select__cascader-item', {
|
|
33692
|
+
'is-select': isSelect
|
|
33693
|
+
}],
|
|
33694
|
+
"onMouseenter": () => handleHover(item.value, columnIndex),
|
|
33695
|
+
"onClick": () => handleLabelClick(!state.checked, item)
|
|
33696
|
+
}, [vue.createVNode("span", {
|
|
33697
|
+
"class": "vc-tree-select__cascader-checkbox",
|
|
33698
|
+
"onClick": e => e.stopPropagation()
|
|
33699
|
+
}, [vue.createVNode(Checkbox, {
|
|
33700
|
+
"modelValue": state.checked,
|
|
33701
|
+
"indeterminate": state.indeterminate,
|
|
33702
|
+
"disabled": !!item.disabled,
|
|
33703
|
+
"onChange": v => handleCheckboxChange(v, item)
|
|
33704
|
+
}, null)]), vue.createVNode("span", {
|
|
33705
|
+
"class": "vc-tree-select__cascader-label"
|
|
33706
|
+
}, [props.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
|
|
33707
|
+
"render": props.renderNodeLabel,
|
|
33708
|
+
"store": treeRef.value.getNode(item),
|
|
33709
|
+
"row": item
|
|
33710
|
+
}, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
|
|
33711
|
+
"type": "right",
|
|
33712
|
+
"class": "vc-tree-select__cascader-icon"
|
|
33713
|
+
}, null) : null]);
|
|
33714
|
+
})])]);
|
|
33715
|
+
})])]);
|
|
33716
|
+
};
|
|
33717
|
+
}
|
|
33718
|
+
});
|
|
33719
|
+
|
|
32749
33720
|
const treeKeys = [
|
|
32750
33721
|
"checkStrictly",
|
|
32751
33722
|
"data",
|
|
@@ -32754,7 +33725,18 @@ var VcComponents = (function (exports, vue) {
|
|
|
32754
33725
|
];
|
|
32755
33726
|
const props$1 = {
|
|
32756
33727
|
...props$1a,
|
|
32757
|
-
...pick(props$2, treeKeys)
|
|
33728
|
+
...pick(props$2, treeKeys),
|
|
33729
|
+
autoWidth: {
|
|
33730
|
+
type: Boolean,
|
|
33731
|
+
default: void 0
|
|
33732
|
+
},
|
|
33733
|
+
/**
|
|
33734
|
+
* 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
|
|
33735
|
+
*/
|
|
33736
|
+
cascader: {
|
|
33737
|
+
type: Boolean,
|
|
33738
|
+
default: false
|
|
33739
|
+
}
|
|
32758
33740
|
};
|
|
32759
33741
|
|
|
32760
33742
|
/** @jsxImportSource vue */
|
|
@@ -32780,12 +33762,37 @@ var VcComponents = (function (exports, vue) {
|
|
|
32780
33762
|
const searchValue = vue.ref('');
|
|
32781
33763
|
const searchRegex = vue.ref(new RegExp(''));
|
|
32782
33764
|
const currentValue = vue.ref([]);
|
|
33765
|
+
const currentValueGroups = vue.computed(() => {
|
|
33766
|
+
if (props.checkStrictly) return;
|
|
33767
|
+
if (!props.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
|
|
33768
|
+
return [];
|
|
33769
|
+
}
|
|
33770
|
+
const pathMap = new Map();
|
|
33771
|
+
const traverse = (data, path = []) => {
|
|
33772
|
+
data.forEach(item => {
|
|
33773
|
+
const v = item.value;
|
|
33774
|
+
if (v == null) return;
|
|
33775
|
+
const fullPath = [...path, v];
|
|
33776
|
+
pathMap.set(v, fullPath);
|
|
33777
|
+
if (item.children?.length) traverse(item.children, fullPath);
|
|
33778
|
+
});
|
|
33779
|
+
};
|
|
33780
|
+
traverse(props.data);
|
|
33781
|
+
const allPaths = currentValue.value.map(v => pathMap.get(v)).filter(Boolean);
|
|
33782
|
+
return allPaths.filter(path => !allPaths.some(other => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
|
|
33783
|
+
});
|
|
32783
33784
|
const source = vue.computed(() => {
|
|
32784
33785
|
return flattenData$1(props.data, {
|
|
32785
33786
|
parent: true,
|
|
32786
33787
|
cascader: true
|
|
32787
33788
|
});
|
|
32788
33789
|
});
|
|
33790
|
+
const labelMap = vue.computed(() => {
|
|
33791
|
+
return source.value.reduce((pre, cur) => {
|
|
33792
|
+
pre[cur.value] = cur.label || '';
|
|
33793
|
+
return pre;
|
|
33794
|
+
}, {});
|
|
33795
|
+
});
|
|
32789
33796
|
const icon = vue.computed(() => {
|
|
32790
33797
|
return isActive.value ? 'up' : 'down';
|
|
32791
33798
|
});
|
|
@@ -32802,17 +33809,34 @@ var VcComponents = (function (exports, vue) {
|
|
|
32802
33809
|
'is-disabled': props.disabled
|
|
32803
33810
|
};
|
|
32804
33811
|
});
|
|
32805
|
-
const
|
|
33812
|
+
const displayTags = vue.computed(() => {
|
|
32806
33813
|
if (!props.data.length) {
|
|
32807
33814
|
return [];
|
|
32808
33815
|
}
|
|
32809
|
-
|
|
33816
|
+
if (props.checkStrictly) {
|
|
33817
|
+
return currentValue.value.map(v => ({
|
|
33818
|
+
value: v,
|
|
33819
|
+
label: labelMap.value[v] || ''
|
|
33820
|
+
}));
|
|
33821
|
+
}
|
|
33822
|
+
return (currentValueGroups.value || []).map(path => {
|
|
33823
|
+
const value = path[path.length - 1];
|
|
33824
|
+
const label = path.map(v => labelMap.value[v] || '').filter(Boolean).join(' / ');
|
|
33825
|
+
return {
|
|
33826
|
+
path,
|
|
33827
|
+
value,
|
|
33828
|
+
label
|
|
33829
|
+
};
|
|
33830
|
+
});
|
|
32810
33831
|
});
|
|
32811
33832
|
const collapseTagCount = vue.computed(() => {
|
|
32812
33833
|
if (!props.maxTags) return 0;
|
|
32813
|
-
const v =
|
|
33834
|
+
const v = displayTags.value.length - props.maxTags;
|
|
32814
33835
|
return v < 0 ? 0 : v;
|
|
32815
33836
|
});
|
|
33837
|
+
const autoWidth = vue.computed(() => {
|
|
33838
|
+
return typeof props.autoWidth === 'boolean' ? props.autoWidth : !!props.cascader;
|
|
33839
|
+
});
|
|
32816
33840
|
|
|
32817
33841
|
/**
|
|
32818
33842
|
* v-model 同步, 外部的数据改变时不会触发
|
|
@@ -32825,8 +33849,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
32825
33849
|
separator: props.separator,
|
|
32826
33850
|
nullValue: props.nullValue
|
|
32827
33851
|
});
|
|
32828
|
-
|
|
32829
|
-
emit('
|
|
33852
|
+
const labels = displayTags.value.map(item => item.label);
|
|
33853
|
+
emit('update:modelValue', v, labels);
|
|
33854
|
+
emit('change', v, labels);
|
|
32830
33855
|
|
|
32831
33856
|
// form表单
|
|
32832
33857
|
formItem?.change?.(currentValue.value);
|
|
@@ -32851,8 +33876,15 @@ var VcComponents = (function (exports, vue) {
|
|
|
32851
33876
|
const close = () => {
|
|
32852
33877
|
isActive.value = false;
|
|
32853
33878
|
};
|
|
32854
|
-
const handleClose =
|
|
32855
|
-
|
|
33879
|
+
const handleClose = item => {
|
|
33880
|
+
if (props.checkStrictly) {
|
|
33881
|
+
const index = currentValue.value.findIndex(v => v === item.value);
|
|
33882
|
+
if (index === -1) return;
|
|
33883
|
+
currentValue.value = currentValue.value.filter((_, i) => i !== index);
|
|
33884
|
+
} else if (item.path) {
|
|
33885
|
+
const remaining = (currentValueGroups.value || []).filter(p => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
|
|
33886
|
+
currentValue.value = [...new Set(remaining.flat())];
|
|
33887
|
+
}
|
|
32856
33888
|
sync();
|
|
32857
33889
|
};
|
|
32858
33890
|
const handleClear = e => {
|
|
@@ -32889,6 +33921,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
32889
33921
|
multiple,
|
|
32890
33922
|
isActive,
|
|
32891
33923
|
current: currentValue,
|
|
33924
|
+
currentValueGroups,
|
|
32892
33925
|
// for portal
|
|
32893
33926
|
toggle(v) {
|
|
32894
33927
|
v = typeof v === 'boolean' ? v : !isActive.value;
|
|
@@ -32903,7 +33936,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
32903
33936
|
"trigger": props.trigger,
|
|
32904
33937
|
"tag": props.tag,
|
|
32905
33938
|
"placement": props.placement,
|
|
32906
|
-
"
|
|
33939
|
+
"autoWidth": autoWidth.value,
|
|
32907
33940
|
"disabled": props.disabled,
|
|
32908
33941
|
"portalClass": [['is-padding-none', props.portalClass]],
|
|
32909
33942
|
"class": [classes.value, its.value.class, 'vc-tree-select'],
|
|
@@ -32920,22 +33953,22 @@ var VcComponents = (function (exports, vue) {
|
|
|
32920
33953
|
return vue.createVNode(Input$1, {
|
|
32921
33954
|
"id": props.id,
|
|
32922
33955
|
"disabled": props.disabled,
|
|
32923
|
-
"modelValue":
|
|
33956
|
+
"modelValue": displayTags.value[0]?.label || props.extra,
|
|
32924
33957
|
"allow-dispatch": false,
|
|
32925
33958
|
"class": "vc-tree-select__input",
|
|
32926
33959
|
"readonly": true,
|
|
32927
33960
|
"placeholder": its.value.attrs?.placeholder || '请选择'
|
|
32928
33961
|
}, {
|
|
32929
|
-
content: multiple.value &&
|
|
33962
|
+
content: multiple.value && displayTags.value.length > 0 ? () => {
|
|
32930
33963
|
return vue.createVNode("div", {
|
|
32931
33964
|
"class": [classes.value, 'vc-tree-select__tags']
|
|
32932
|
-
}, [
|
|
33965
|
+
}, [displayTags.value.slice(0, props.maxTags).map(item => {
|
|
32933
33966
|
return vue.createVNode(Tag, {
|
|
32934
|
-
"key": item,
|
|
33967
|
+
"key": item.path ? item.path.join('-') : item.value,
|
|
32935
33968
|
"closable": !props.disabled,
|
|
32936
|
-
"onClose": () => handleClose(
|
|
33969
|
+
"onClose": () => handleClose(item)
|
|
32937
33970
|
}, {
|
|
32938
|
-
default: () => [
|
|
33971
|
+
default: () => [item.label]
|
|
32939
33972
|
});
|
|
32940
33973
|
}), collapseTagCount.value ? vue.createVNode(Tag, null, {
|
|
32941
33974
|
default: () => [`+${collapseTagCount.value}...`]
|
|
@@ -32968,16 +34001,23 @@ var VcComponents = (function (exports, vue) {
|
|
|
32968
34001
|
}, [vue.createVNode(Spin, {
|
|
32969
34002
|
"size": 16
|
|
32970
34003
|
}, null)]), vue.createVNode(Scroller, {
|
|
32971
|
-
"class":
|
|
34004
|
+
"class": ['vc-tree-select__options', props.cascader && 'is-cascader'],
|
|
32972
34005
|
"max-height": "200px"
|
|
32973
34006
|
}, {
|
|
32974
|
-
default: () => [vue.createVNode(
|
|
32975
|
-
"
|
|
32976
|
-
"
|
|
34007
|
+
default: () => [props.cascader ? vue.createVNode(TreeSelectContentCascader, {
|
|
34008
|
+
"value": currentValue.value,
|
|
34009
|
+
"data": props.data,
|
|
34010
|
+
"checkStrictly": props.checkStrictly,
|
|
34011
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
34012
|
+
"numerable": props.numerable,
|
|
34013
|
+
"separator": props.separator,
|
|
34014
|
+
"max": props.max,
|
|
34015
|
+
"nullValue": props.nullValue,
|
|
34016
|
+
"onChange": handleChange
|
|
34017
|
+
}, null) : vue.createVNode(TreeSelectContent, {
|
|
34018
|
+
"value": currentValue.value,
|
|
32977
34019
|
"data": props.data,
|
|
32978
34020
|
"checkStrictly": props.checkStrictly,
|
|
32979
|
-
"allowDispatch": false,
|
|
32980
|
-
"showCheckbox": true,
|
|
32981
34021
|
"renderNodeLabel": props.renderNodeLabel,
|
|
32982
34022
|
"onChange": handleChange
|
|
32983
34023
|
}, null)]
|
|
@@ -139705,6 +140745,7 @@ ${r}
|
|
|
139705
140745
|
exports.Calendar = Calendar$1;
|
|
139706
140746
|
exports.Card = Card;
|
|
139707
140747
|
exports.Carousel = Carousel;
|
|
140748
|
+
exports.CarouselItem = CarouselItem;
|
|
139708
140749
|
exports.Cascader = Cascader;
|
|
139709
140750
|
exports.Chart = Chart;
|
|
139710
140751
|
exports.Checkbox = Checkbox;
|
|
@@ -139750,6 +140791,7 @@ ${r}
|
|
|
139750
140791
|
exports.MCalendar = MCalendar;
|
|
139751
140792
|
exports.MCard = MCard;
|
|
139752
140793
|
exports.MCarousel = MCarousel;
|
|
140794
|
+
exports.MCarouselItem = MCarouselItem;
|
|
139753
140795
|
exports.MCascader = MCascader;
|
|
139754
140796
|
exports.MChart = MChart;
|
|
139755
140797
|
exports.MCheckbox = MCheckbox;
|