@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.umd.cjs
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
const VcInstance = new Instance();
|
|
79
79
|
|
|
80
|
-
const props$
|
|
80
|
+
const props$1v = {
|
|
81
81
|
tag: {
|
|
82
82
|
type: String,
|
|
83
83
|
default: "div"
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
|
|
87
87
|
/** @jsxImportSource vue */
|
|
88
88
|
|
|
89
|
-
const COMPONENT_NAME$
|
|
89
|
+
const COMPONENT_NAME$2g = 'vc-action-sheet';
|
|
90
90
|
const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
91
|
-
name: COMPONENT_NAME$
|
|
92
|
-
props: props$
|
|
91
|
+
name: COMPONENT_NAME$2g,
|
|
92
|
+
props: props$1v,
|
|
93
93
|
setup(props, {
|
|
94
94
|
slots
|
|
95
95
|
}) {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
|
|
104
104
|
const MActionSheet = ActionSheet;
|
|
105
105
|
|
|
106
|
-
const props$
|
|
106
|
+
const props$1u = {
|
|
107
107
|
modelValue: {
|
|
108
108
|
type: Boolean,
|
|
109
109
|
default: false
|
|
@@ -381,11 +381,11 @@
|
|
|
381
381
|
|
|
382
382
|
/** @jsxImportSource vue */
|
|
383
383
|
|
|
384
|
-
const COMPONENT_NAME$
|
|
384
|
+
const COMPONENT_NAME$2f = 'vc-affix';
|
|
385
385
|
const Affix = /* @__PURE__ */ vue.defineComponent({
|
|
386
|
-
name: COMPONENT_NAME$
|
|
386
|
+
name: COMPONENT_NAME$2f,
|
|
387
387
|
emits: ['update:modelValue'],
|
|
388
|
-
props: props$
|
|
388
|
+
props: props$1u,
|
|
389
389
|
setup(props, {
|
|
390
390
|
slots,
|
|
391
391
|
expose,
|
|
@@ -551,7 +551,7 @@
|
|
|
551
551
|
|
|
552
552
|
const MAffix = Affix;
|
|
553
553
|
|
|
554
|
-
const props$
|
|
554
|
+
const props$1t = {
|
|
555
555
|
modelValue: {
|
|
556
556
|
type: Boolean,
|
|
557
557
|
default: true
|
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
580
|
|
|
581
|
-
const props$
|
|
581
|
+
const props$1s = {
|
|
582
582
|
type: String,
|
|
583
583
|
inherit: {
|
|
584
584
|
type: Boolean,
|
|
@@ -715,10 +715,10 @@
|
|
|
715
715
|
|
|
716
716
|
/** @jsxImportSource vue */
|
|
717
717
|
|
|
718
|
-
const COMPONENT_NAME$
|
|
718
|
+
const COMPONENT_NAME$2e = 'vc-icon';
|
|
719
719
|
const Icon = /* @__PURE__ */ vue.defineComponent({
|
|
720
|
-
name: COMPONENT_NAME$
|
|
721
|
-
props: props$
|
|
720
|
+
name: COMPONENT_NAME$2e,
|
|
721
|
+
props: props$1s,
|
|
722
722
|
setup(props) {
|
|
723
723
|
const viewBox = vue.ref('0 0 1024 1024');
|
|
724
724
|
const path = vue.ref([]);
|
|
@@ -751,7 +751,7 @@
|
|
|
751
751
|
}
|
|
752
752
|
});
|
|
753
753
|
|
|
754
|
-
const props$
|
|
754
|
+
const props$1r = {
|
|
755
755
|
/**
|
|
756
756
|
* 进入/离开持续时间
|
|
757
757
|
* {enter: 300, leave: 300}
|
|
@@ -916,10 +916,10 @@
|
|
|
916
916
|
};
|
|
917
917
|
};
|
|
918
918
|
|
|
919
|
-
const COMPONENT_NAME$
|
|
919
|
+
const COMPONENT_NAME$2d = "vc-transition";
|
|
920
920
|
const Transition = vue.defineComponent({
|
|
921
|
-
name: COMPONENT_NAME$
|
|
922
|
-
props: props$
|
|
921
|
+
name: COMPONENT_NAME$2d,
|
|
922
|
+
props: props$1r,
|
|
923
923
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
924
924
|
inheritAttrs: false,
|
|
925
925
|
setup(props, { slots, attrs }) {
|
|
@@ -939,10 +939,10 @@
|
|
|
939
939
|
}
|
|
940
940
|
});
|
|
941
941
|
|
|
942
|
-
const COMPONENT_NAME$
|
|
942
|
+
const COMPONENT_NAME$2c = "vc-transition-collapse";
|
|
943
943
|
const TransitionCollapse = vue.defineComponent({
|
|
944
|
-
name: COMPONENT_NAME$
|
|
945
|
-
props: props$
|
|
944
|
+
name: COMPONENT_NAME$2c,
|
|
945
|
+
props: props$1r,
|
|
946
946
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
947
947
|
inheritAttrs: false,
|
|
948
948
|
setup(props, { slots, attrs: _attrs }) {
|
|
@@ -1056,11 +1056,11 @@
|
|
|
1056
1056
|
}
|
|
1057
1057
|
});
|
|
1058
1058
|
|
|
1059
|
-
const COMPONENT_NAME$
|
|
1059
|
+
const COMPONENT_NAME$2b = "vc-transition-fade";
|
|
1060
1060
|
const TransitionFade = vue.defineComponent({
|
|
1061
|
-
name: COMPONENT_NAME$
|
|
1061
|
+
name: COMPONENT_NAME$2b,
|
|
1062
1062
|
props: {
|
|
1063
|
-
...props$
|
|
1063
|
+
...props$1r,
|
|
1064
1064
|
// inheritAttrs必须是false
|
|
1065
1065
|
style: {
|
|
1066
1066
|
type: Object,
|
|
@@ -1093,11 +1093,11 @@
|
|
|
1093
1093
|
}
|
|
1094
1094
|
});
|
|
1095
1095
|
|
|
1096
|
-
const COMPONENT_NAME$
|
|
1096
|
+
const COMPONENT_NAME$2a = "vc-transition-scale";
|
|
1097
1097
|
const TransitionScale = vue.defineComponent({
|
|
1098
|
-
name: COMPONENT_NAME$
|
|
1098
|
+
name: COMPONENT_NAME$2a,
|
|
1099
1099
|
props: {
|
|
1100
|
-
...props$
|
|
1100
|
+
...props$1r,
|
|
1101
1101
|
mode: {
|
|
1102
1102
|
type: String,
|
|
1103
1103
|
default: "both",
|
|
@@ -1135,11 +1135,11 @@
|
|
|
1135
1135
|
}
|
|
1136
1136
|
});
|
|
1137
1137
|
|
|
1138
|
-
const COMPONENT_NAME$
|
|
1138
|
+
const COMPONENT_NAME$29 = "vc-transition-slide";
|
|
1139
1139
|
const TransitionSlide = vue.defineComponent({
|
|
1140
|
-
name: COMPONENT_NAME$
|
|
1140
|
+
name: COMPONENT_NAME$29,
|
|
1141
1141
|
props: {
|
|
1142
|
-
...props$
|
|
1142
|
+
...props$1r,
|
|
1143
1143
|
mode: {
|
|
1144
1144
|
type: String,
|
|
1145
1145
|
default: "left",
|
|
@@ -1177,11 +1177,11 @@
|
|
|
1177
1177
|
}
|
|
1178
1178
|
});
|
|
1179
1179
|
|
|
1180
|
-
const COMPONENT_NAME$
|
|
1180
|
+
const COMPONENT_NAME$28 = "vc-transition-zoom";
|
|
1181
1181
|
const TransitionZoom = vue.defineComponent({
|
|
1182
|
-
name: COMPONENT_NAME$
|
|
1182
|
+
name: COMPONENT_NAME$28,
|
|
1183
1183
|
props: {
|
|
1184
|
-
...props$
|
|
1184
|
+
...props$1r,
|
|
1185
1185
|
mode: {
|
|
1186
1186
|
type: String,
|
|
1187
1187
|
default: "x",
|
|
@@ -1221,7 +1221,7 @@
|
|
|
1221
1221
|
|
|
1222
1222
|
/** @jsxImportSource vue */
|
|
1223
1223
|
|
|
1224
|
-
const COMPONENT_NAME$
|
|
1224
|
+
const COMPONENT_NAME$27 = 'vc-alert';
|
|
1225
1225
|
|
|
1226
1226
|
// [color, borderColor, backgroundColor], -> CSS
|
|
1227
1227
|
const THEME_MAP = {
|
|
@@ -1231,8 +1231,8 @@
|
|
|
1231
1231
|
warning: ['#ffbf00', '#ffe58f', '#fffbe6']
|
|
1232
1232
|
};
|
|
1233
1233
|
const Alert = /* @__PURE__ */ vue.defineComponent({
|
|
1234
|
-
name: COMPONENT_NAME$
|
|
1235
|
-
props: props$
|
|
1234
|
+
name: COMPONENT_NAME$27,
|
|
1235
|
+
props: props$1t,
|
|
1236
1236
|
setup(props, {
|
|
1237
1237
|
slots,
|
|
1238
1238
|
emit
|
|
@@ -1447,7 +1447,7 @@
|
|
|
1447
1447
|
return flatten$1(value, JSON.parse);
|
|
1448
1448
|
};
|
|
1449
1449
|
|
|
1450
|
-
const props$
|
|
1450
|
+
const props$1q = {
|
|
1451
1451
|
// canvas配置参数
|
|
1452
1452
|
options: Object,
|
|
1453
1453
|
width: {
|
|
@@ -1463,10 +1463,10 @@
|
|
|
1463
1463
|
/** @jsxImportSource vue */
|
|
1464
1464
|
|
|
1465
1465
|
const isTouch = typeof document !== 'undefined' && 'ontouchend' in document;
|
|
1466
|
-
const COMPONENT_NAME$
|
|
1466
|
+
const COMPONENT_NAME$26 = 'vc-artboard';
|
|
1467
1467
|
const Artboard = /* @__PURE__ */ vue.defineComponent({
|
|
1468
|
-
name: COMPONENT_NAME$
|
|
1469
|
-
props: props$
|
|
1468
|
+
name: COMPONENT_NAME$26,
|
|
1469
|
+
props: props$1q,
|
|
1470
1470
|
setup(props, {
|
|
1471
1471
|
emit,
|
|
1472
1472
|
expose
|
|
@@ -1669,7 +1669,7 @@
|
|
|
1669
1669
|
|
|
1670
1670
|
const MArtboard = Artboard;
|
|
1671
1671
|
|
|
1672
|
-
const props$
|
|
1672
|
+
const props$1p = {
|
|
1673
1673
|
size: {
|
|
1674
1674
|
type: Number,
|
|
1675
1675
|
default: 28
|
|
@@ -1693,10 +1693,10 @@
|
|
|
1693
1693
|
|
|
1694
1694
|
/** @jsxImportSource vue */
|
|
1695
1695
|
|
|
1696
|
-
const COMPONENT_NAME$
|
|
1696
|
+
const COMPONENT_NAME$25 = 'vc-spin';
|
|
1697
1697
|
const Spin = /* @__PURE__ */ vue.defineComponent({
|
|
1698
|
-
name: COMPONENT_NAME$
|
|
1699
|
-
props: props$
|
|
1698
|
+
name: COMPONENT_NAME$25,
|
|
1699
|
+
props: props$1p,
|
|
1700
1700
|
setup(props, {
|
|
1701
1701
|
slots
|
|
1702
1702
|
}) {
|
|
@@ -6768,7 +6768,7 @@
|
|
|
6768
6768
|
});
|
|
6769
6769
|
}
|
|
6770
6770
|
|
|
6771
|
-
const props$
|
|
6771
|
+
const props$1o = {
|
|
6772
6772
|
wait: {
|
|
6773
6773
|
type: Number,
|
|
6774
6774
|
default: 250
|
|
@@ -6784,10 +6784,10 @@
|
|
|
6784
6784
|
exclude: RegExp
|
|
6785
6785
|
};
|
|
6786
6786
|
|
|
6787
|
-
const COMPONENT_NAME$
|
|
6787
|
+
const COMPONENT_NAME$24 = "vc-debounce";
|
|
6788
6788
|
const Debounce = vue.defineComponent({
|
|
6789
|
-
name: COMPONENT_NAME$
|
|
6790
|
-
props: props$
|
|
6789
|
+
name: COMPONENT_NAME$24,
|
|
6790
|
+
props: props$1o,
|
|
6791
6791
|
/**
|
|
6792
6792
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
6793
6793
|
* 如事件onClick
|
|
@@ -6827,7 +6827,7 @@
|
|
|
6827
6827
|
}
|
|
6828
6828
|
});
|
|
6829
6829
|
|
|
6830
|
-
const props$
|
|
6830
|
+
const props$1n = {
|
|
6831
6831
|
tag: {
|
|
6832
6832
|
type: String,
|
|
6833
6833
|
default: "button"
|
|
@@ -6859,11 +6859,11 @@
|
|
|
6859
6859
|
|
|
6860
6860
|
/** @jsxImportSource vue */
|
|
6861
6861
|
|
|
6862
|
-
const COMPONENT_NAME$
|
|
6862
|
+
const COMPONENT_NAME$23 = 'vc-button';
|
|
6863
6863
|
const Button = /* @__PURE__ */ vue.defineComponent({
|
|
6864
|
-
name: COMPONENT_NAME$
|
|
6864
|
+
name: COMPONENT_NAME$23,
|
|
6865
6865
|
emits: ['click'],
|
|
6866
|
-
props: props$
|
|
6866
|
+
props: props$1n,
|
|
6867
6867
|
setup(props, {
|
|
6868
6868
|
slots
|
|
6869
6869
|
}) {
|
|
@@ -6924,7 +6924,7 @@
|
|
|
6924
6924
|
}
|
|
6925
6925
|
});
|
|
6926
6926
|
|
|
6927
|
-
const props$
|
|
6927
|
+
const props$1m = {
|
|
6928
6928
|
vertical: {
|
|
6929
6929
|
type: Boolean,
|
|
6930
6930
|
default: false
|
|
@@ -6945,10 +6945,10 @@
|
|
|
6945
6945
|
|
|
6946
6946
|
/** @jsxImportSource vue */
|
|
6947
6947
|
|
|
6948
|
-
const COMPONENT_NAME$
|
|
6948
|
+
const COMPONENT_NAME$22 = 'vc-button-group';
|
|
6949
6949
|
const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
|
|
6950
|
-
name: COMPONENT_NAME$
|
|
6951
|
-
props: props$
|
|
6950
|
+
name: COMPONENT_NAME$22,
|
|
6951
|
+
props: props$1m,
|
|
6952
6952
|
setup(props, {
|
|
6953
6953
|
slots
|
|
6954
6954
|
}) {
|
|
@@ -6972,7 +6972,7 @@
|
|
|
6972
6972
|
const MButton = Button;
|
|
6973
6973
|
const MButtonGroup = ButtonGroup;
|
|
6974
6974
|
|
|
6975
|
-
const props$
|
|
6975
|
+
const props$1l = {
|
|
6976
6976
|
tag: {
|
|
6977
6977
|
type: String,
|
|
6978
6978
|
default: "div"
|
|
@@ -6981,10 +6981,10 @@
|
|
|
6981
6981
|
|
|
6982
6982
|
/** @jsxImportSource vue */
|
|
6983
6983
|
|
|
6984
|
-
const COMPONENT_NAME$
|
|
6984
|
+
const COMPONENT_NAME$21 = 'vc-calendar';
|
|
6985
6985
|
const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
|
|
6986
|
-
name: COMPONENT_NAME$
|
|
6987
|
-
props: props$
|
|
6986
|
+
name: COMPONENT_NAME$21,
|
|
6987
|
+
props: props$1l,
|
|
6988
6988
|
setup(props, {
|
|
6989
6989
|
slots
|
|
6990
6990
|
}) {
|
|
@@ -6998,7 +6998,7 @@
|
|
|
6998
6998
|
|
|
6999
6999
|
const MCalendar = Calendar$1;
|
|
7000
7000
|
|
|
7001
|
-
const props$
|
|
7001
|
+
const props$1k = {
|
|
7002
7002
|
border: {
|
|
7003
7003
|
type: Boolean,
|
|
7004
7004
|
default: true
|
|
@@ -7021,10 +7021,10 @@
|
|
|
7021
7021
|
|
|
7022
7022
|
/** @jsxImportSource vue */
|
|
7023
7023
|
|
|
7024
|
-
const COMPONENT_NAME$
|
|
7024
|
+
const COMPONENT_NAME$20 = 'vc-card';
|
|
7025
7025
|
const Card = /* @__PURE__ */ vue.defineComponent({
|
|
7026
|
-
name: COMPONENT_NAME$
|
|
7027
|
-
props: props$
|
|
7026
|
+
name: COMPONENT_NAME$20,
|
|
7027
|
+
props: props$1k,
|
|
7028
7028
|
setup(props, {
|
|
7029
7029
|
slots
|
|
7030
7030
|
}) {
|
|
@@ -7050,31 +7050,799 @@
|
|
|
7050
7050
|
|
|
7051
7051
|
const MCard = Card;
|
|
7052
7052
|
|
|
7053
|
-
|
|
7054
|
-
|
|
7053
|
+
class Resize {
|
|
7054
|
+
el;
|
|
7055
|
+
static of(el) {
|
|
7056
|
+
return new Resize(el);
|
|
7057
|
+
}
|
|
7058
|
+
/**
|
|
7059
|
+
* Resize.of(el, fn);
|
|
7060
|
+
* @param el ~
|
|
7061
|
+
* @param fn ~
|
|
7062
|
+
* @returns off
|
|
7063
|
+
*/
|
|
7064
|
+
static on(el, fn) {
|
|
7065
|
+
return new Resize(el).on(fn);
|
|
7066
|
+
}
|
|
7067
|
+
/**
|
|
7068
|
+
* 要实现Resize.off(el),el必须侵入式修改挂上__rz__
|
|
7069
|
+
* @param el ~
|
|
7070
|
+
* @param fn ~
|
|
7071
|
+
* @returns ~
|
|
7072
|
+
*/
|
|
7073
|
+
static off(el, fn) {
|
|
7074
|
+
return new Resize(el).off(fn);
|
|
7075
|
+
}
|
|
7076
|
+
listeners = [];
|
|
7077
|
+
ro = null;
|
|
7078
|
+
constructor(el) {
|
|
7079
|
+
this.el = el;
|
|
7080
|
+
let rz = el.__rz__;
|
|
7081
|
+
if (rz && rz instanceof Resize) {
|
|
7082
|
+
this.listeners = rz.listeners;
|
|
7083
|
+
this.ro = rz.ro;
|
|
7084
|
+
}
|
|
7085
|
+
}
|
|
7086
|
+
handleResize = (entries) => {
|
|
7087
|
+
/* istanbul ignore else -- @preserve */
|
|
7088
|
+
if (entries.some((i) => i.target === this.el)) {
|
|
7089
|
+
this.listeners?.forEach((fn) => fn());
|
|
7090
|
+
}
|
|
7091
|
+
};
|
|
7092
|
+
on(fn) {
|
|
7093
|
+
if (typeof ResizeObserver === "undefined")
|
|
7094
|
+
return () => {
|
|
7095
|
+
};
|
|
7096
|
+
if (!this.listeners.length) {
|
|
7097
|
+
this.ro = this.ro || new ResizeObserver(this.handleResize);
|
|
7098
|
+
this.ro.observe(this.el);
|
|
7099
|
+
this.el.__rz__ = this;
|
|
7100
|
+
}
|
|
7101
|
+
this.listeners.push(fn);
|
|
7102
|
+
return () => this.off(fn);
|
|
7103
|
+
}
|
|
7104
|
+
off(fn) {
|
|
7105
|
+
if (fn) {
|
|
7106
|
+
this.listeners.splice(this.listeners.indexOf(fn), 1);
|
|
7107
|
+
} else {
|
|
7108
|
+
this.listeners = [];
|
|
7109
|
+
}
|
|
7110
|
+
if (!this.listeners.length && this.ro) {
|
|
7111
|
+
this.ro.disconnect();
|
|
7112
|
+
}
|
|
7113
|
+
}
|
|
7114
|
+
}
|
|
7115
|
+
|
|
7116
|
+
const DRAG_CLICK_SUPPRESS_PX = 5;
|
|
7117
|
+
const swallowNextClickFromDrag = () => {
|
|
7118
|
+
let invoked = false;
|
|
7119
|
+
const options = { capture: true, once: true };
|
|
7120
|
+
const swallow = (e) => {
|
|
7121
|
+
invoked = true;
|
|
7122
|
+
e.preventDefault();
|
|
7123
|
+
e.stopPropagation();
|
|
7124
|
+
e.stopImmediatePropagation();
|
|
7125
|
+
};
|
|
7126
|
+
document.addEventListener("click", swallow, options);
|
|
7127
|
+
setTimeout(() => !invoked && document.removeEventListener("click", swallow, options), 0);
|
|
7128
|
+
};
|
|
7129
|
+
const useCarousel = (wrapper, content, expose) => {
|
|
7130
|
+
const instance = vue.getCurrentInstance();
|
|
7131
|
+
const props = instance.props;
|
|
7132
|
+
const { emit } = instance;
|
|
7133
|
+
const items = vue.ref([]);
|
|
7134
|
+
const activeIndex = vue.ref(-1);
|
|
7135
|
+
const timer = vue.ref(null);
|
|
7136
|
+
const offset = vue.ref(0);
|
|
7137
|
+
const carouselId = vue.ref(getUid("carousel"));
|
|
7138
|
+
const start = vue.ref();
|
|
7139
|
+
const startX = vue.ref();
|
|
7140
|
+
const startY = vue.ref();
|
|
7141
|
+
const dragMovedPastThreshold = vue.ref(false);
|
|
7142
|
+
const allowTransition = vue.ref(false);
|
|
7143
|
+
const direction = vue.computed(() => {
|
|
7144
|
+
return props.vertical ? "vertical" : "horizontal";
|
|
7145
|
+
});
|
|
7146
|
+
const hasLabel = vue.computed(() => {
|
|
7147
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
7148
|
+
});
|
|
7149
|
+
const dotsClasses = vue.computed(() => {
|
|
7150
|
+
const classes = ["is-" + direction.value];
|
|
7151
|
+
if (hasLabel.value) {
|
|
7152
|
+
classes.push("is-labels");
|
|
7153
|
+
}
|
|
7154
|
+
if (props.dots === "outside" || props.card) {
|
|
7155
|
+
classes.push("is-outside");
|
|
7156
|
+
}
|
|
7157
|
+
return classes;
|
|
7158
|
+
});
|
|
7159
|
+
const resetItems = (oldIndex) => {
|
|
7160
|
+
items.value.forEach((item, index) => {
|
|
7161
|
+
item.exposed?.reset?.(index, activeIndex.value, oldIndex);
|
|
7162
|
+
});
|
|
7163
|
+
};
|
|
7164
|
+
const playSlides = () => {
|
|
7165
|
+
allowTransition.value = true;
|
|
7166
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
7167
|
+
activeIndex.value++;
|
|
7168
|
+
} else if (props.loop) {
|
|
7169
|
+
activeIndex.value = 0;
|
|
7170
|
+
}
|
|
7171
|
+
};
|
|
7172
|
+
const pauseTimer = () => {
|
|
7173
|
+
if (timer.value) {
|
|
7174
|
+
clearInterval(timer.value);
|
|
7175
|
+
timer.value = null;
|
|
7176
|
+
}
|
|
7177
|
+
};
|
|
7178
|
+
const startTimer = () => {
|
|
7179
|
+
if (props.t <= 0 || !props.autoplay || timer.value) return;
|
|
7180
|
+
timer.value = setInterval(playSlides, props.t);
|
|
7181
|
+
};
|
|
7182
|
+
const setActiveItem = (index) => {
|
|
7183
|
+
if (typeof index === "string") {
|
|
7184
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
7185
|
+
if (filteredItems.length > 0) {
|
|
7186
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
7187
|
+
}
|
|
7188
|
+
}
|
|
7189
|
+
index = Number(index);
|
|
7190
|
+
if (isNaN(index) || index !== Math.floor(index)) {
|
|
7191
|
+
throw new VcError("carousel", "索引必须是整数");
|
|
7192
|
+
}
|
|
7193
|
+
const length = items.value.length;
|
|
7194
|
+
const oldIndex = activeIndex.value;
|
|
7195
|
+
if (index < 0) {
|
|
7196
|
+
activeIndex.value = props.loop ? length - 1 : 0;
|
|
7197
|
+
} else if (index >= length) {
|
|
7198
|
+
activeIndex.value = props.loop ? 0 : length - 1;
|
|
7199
|
+
} else {
|
|
7200
|
+
activeIndex.value = index;
|
|
7201
|
+
}
|
|
7202
|
+
if (oldIndex === activeIndex.value) {
|
|
7203
|
+
resetItems(oldIndex);
|
|
7204
|
+
}
|
|
7205
|
+
};
|
|
7206
|
+
const prev = () => {
|
|
7207
|
+
setActiveItem(activeIndex.value - 1);
|
|
7208
|
+
};
|
|
7209
|
+
const next = () => {
|
|
7210
|
+
setActiveItem(activeIndex.value + 1);
|
|
7211
|
+
};
|
|
7212
|
+
const handleDotClick = (index) => {
|
|
7213
|
+
activeIndex.value = index;
|
|
7214
|
+
};
|
|
7215
|
+
const handleStart = (e) => {
|
|
7216
|
+
allowTransition.value = true;
|
|
7217
|
+
if (!props.draggable) return;
|
|
7218
|
+
pauseTimer();
|
|
7219
|
+
start.value = true;
|
|
7220
|
+
dragMovedPastThreshold.value = false;
|
|
7221
|
+
startX.value = e.screenX;
|
|
7222
|
+
startY.value = e.screenY;
|
|
7223
|
+
};
|
|
7224
|
+
const handleMove = (e) => {
|
|
7225
|
+
if (!start.value || !props.draggable) return;
|
|
7226
|
+
offset.value = !props.vertical ? e.screenX - startX.value : e.screenY - startY.value;
|
|
7227
|
+
if (Math.abs(offset.value) > DRAG_CLICK_SUPPRESS_PX) {
|
|
7228
|
+
dragMovedPastThreshold.value = true;
|
|
7229
|
+
}
|
|
7230
|
+
resetItems();
|
|
7231
|
+
};
|
|
7232
|
+
const handleEnd = () => {
|
|
7233
|
+
if (!props.draggable) return;
|
|
7234
|
+
const shouldSwallowClick = dragMovedPastThreshold.value;
|
|
7235
|
+
start.value = false;
|
|
7236
|
+
startTimer();
|
|
7237
|
+
const $offset = Math.abs(offset.value);
|
|
7238
|
+
const $direction = offset.value > 0;
|
|
7239
|
+
offset.value = 0;
|
|
7240
|
+
if ($offset > 5) {
|
|
7241
|
+
$direction && prev();
|
|
7242
|
+
!$direction && next();
|
|
7243
|
+
} else {
|
|
7244
|
+
resetItems();
|
|
7245
|
+
}
|
|
7246
|
+
if (shouldSwallowClick) {
|
|
7247
|
+
swallowNextClickFromDrag();
|
|
7248
|
+
}
|
|
7249
|
+
dragMovedPastThreshold.value = false;
|
|
7250
|
+
};
|
|
7251
|
+
vue.watch(
|
|
7252
|
+
() => items.value,
|
|
7253
|
+
(v) => {
|
|
7254
|
+
if (v.length > 0) setActiveItem(props.initialIndex);
|
|
7255
|
+
}
|
|
7256
|
+
);
|
|
7257
|
+
vue.watch(
|
|
7258
|
+
() => activeIndex.value,
|
|
7259
|
+
(v, oldV) => {
|
|
7260
|
+
resetItems(oldV);
|
|
7261
|
+
emit("change", v, oldV);
|
|
7262
|
+
}
|
|
7263
|
+
);
|
|
7264
|
+
vue.watch(
|
|
7265
|
+
() => props.autoplay,
|
|
7266
|
+
(v) => {
|
|
7267
|
+
v ? startTimer() : pauseTimer();
|
|
7268
|
+
}
|
|
7269
|
+
);
|
|
7270
|
+
vue.watch(
|
|
7271
|
+
() => props.loop,
|
|
7272
|
+
() => {
|
|
7273
|
+
setActiveItem(activeIndex.value);
|
|
7274
|
+
}
|
|
7275
|
+
);
|
|
7276
|
+
vue.watch(
|
|
7277
|
+
() => props.t,
|
|
7278
|
+
() => {
|
|
7279
|
+
pauseTimer();
|
|
7280
|
+
startTimer();
|
|
7281
|
+
}
|
|
7282
|
+
);
|
|
7283
|
+
vue.onMounted(() => {
|
|
7284
|
+
vue.nextTick(() => {
|
|
7285
|
+
if (wrapper.value) Resize.on(wrapper.value, resetItems);
|
|
7286
|
+
if (props.initialIndex < items.value.length && props.initialIndex >= 0) {
|
|
7287
|
+
activeIndex.value = props.initialIndex;
|
|
7288
|
+
}
|
|
7289
|
+
startTimer();
|
|
7290
|
+
});
|
|
7291
|
+
});
|
|
7292
|
+
vue.onBeforeUnmount(() => {
|
|
7293
|
+
if (wrapper.value) Resize.off(wrapper.value, resetItems);
|
|
7294
|
+
pauseTimer();
|
|
7295
|
+
startTimer();
|
|
7296
|
+
});
|
|
7297
|
+
const add = (item) => {
|
|
7298
|
+
if (!item) return;
|
|
7299
|
+
vue.nextTick(() => {
|
|
7300
|
+
if (content.value) {
|
|
7301
|
+
const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
|
|
7302
|
+
items.value.splice(index, 0, item);
|
|
7303
|
+
return;
|
|
7304
|
+
}
|
|
7305
|
+
items.value.push(item);
|
|
7306
|
+
});
|
|
7307
|
+
};
|
|
7308
|
+
const remove = (item) => {
|
|
7309
|
+
if (!item) return;
|
|
7310
|
+
items.value.splice(items.value.indexOf(item), 1);
|
|
7311
|
+
};
|
|
7312
|
+
vue.provide("vc-carousel", {
|
|
7313
|
+
props,
|
|
7314
|
+
items,
|
|
7315
|
+
offset,
|
|
7316
|
+
allowTransition,
|
|
7317
|
+
setActiveItem,
|
|
7318
|
+
wrapper,
|
|
7319
|
+
content,
|
|
7320
|
+
add,
|
|
7321
|
+
remove
|
|
7322
|
+
});
|
|
7323
|
+
expose({
|
|
7324
|
+
setActiveItem,
|
|
7325
|
+
prev,
|
|
7326
|
+
next
|
|
7327
|
+
});
|
|
7328
|
+
return {
|
|
7329
|
+
carouselId,
|
|
7330
|
+
allowTransition,
|
|
7331
|
+
items,
|
|
7332
|
+
activeIndex,
|
|
7333
|
+
offset,
|
|
7334
|
+
direction,
|
|
7335
|
+
hasLabel,
|
|
7336
|
+
dotsClasses,
|
|
7337
|
+
start,
|
|
7338
|
+
startX,
|
|
7339
|
+
startY,
|
|
7340
|
+
handleStart,
|
|
7341
|
+
handleMove,
|
|
7342
|
+
handleEnd,
|
|
7343
|
+
handleDotClick,
|
|
7344
|
+
prev,
|
|
7345
|
+
next,
|
|
7346
|
+
setActiveItem,
|
|
7347
|
+
pauseTimer,
|
|
7348
|
+
startTimer
|
|
7349
|
+
};
|
|
7350
|
+
};
|
|
7351
|
+
|
|
7352
|
+
const props$1j = {
|
|
7353
|
+
t: {
|
|
7354
|
+
type: Number,
|
|
7355
|
+
default: 3e3
|
|
7356
|
+
},
|
|
7357
|
+
card: Boolean,
|
|
7358
|
+
gutter: {
|
|
7359
|
+
type: Number,
|
|
7360
|
+
default: 0
|
|
7361
|
+
},
|
|
7362
|
+
height: [String, Number],
|
|
7363
|
+
initialIndex: {
|
|
7364
|
+
type: Number,
|
|
7365
|
+
default: 0
|
|
7366
|
+
},
|
|
7367
|
+
trigger: {
|
|
7055
7368
|
type: String,
|
|
7056
|
-
default: "
|
|
7369
|
+
default: "hover"
|
|
7370
|
+
},
|
|
7371
|
+
autoplay: {
|
|
7372
|
+
type: Boolean,
|
|
7373
|
+
default: true
|
|
7374
|
+
},
|
|
7375
|
+
dots: {
|
|
7376
|
+
type: [String, Boolean],
|
|
7377
|
+
default: "bottom"
|
|
7378
|
+
// bottom/outside | false
|
|
7379
|
+
},
|
|
7380
|
+
arrow: {
|
|
7381
|
+
type: [String, Boolean],
|
|
7382
|
+
default: "hover"
|
|
7383
|
+
// hover/always | false
|
|
7384
|
+
},
|
|
7385
|
+
loop: {
|
|
7386
|
+
type: Boolean,
|
|
7387
|
+
default: true
|
|
7388
|
+
},
|
|
7389
|
+
vertical: {
|
|
7390
|
+
type: Boolean,
|
|
7391
|
+
default: false
|
|
7392
|
+
},
|
|
7393
|
+
draggable: {
|
|
7394
|
+
type: Boolean,
|
|
7395
|
+
default: true
|
|
7057
7396
|
}
|
|
7058
7397
|
};
|
|
7059
7398
|
|
|
7060
7399
|
/** @jsxImportSource vue */
|
|
7061
7400
|
|
|
7062
|
-
const COMPONENT_NAME$
|
|
7401
|
+
const COMPONENT_NAME$1$ = 'vc-carousel';
|
|
7063
7402
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
7064
|
-
name: COMPONENT_NAME$
|
|
7403
|
+
name: COMPONENT_NAME$1$,
|
|
7404
|
+
props: props$1j,
|
|
7405
|
+
setup(props, {
|
|
7406
|
+
slots,
|
|
7407
|
+
expose
|
|
7408
|
+
}) {
|
|
7409
|
+
const isHover = vue.ref(false);
|
|
7410
|
+
const wrapper = vue.ref(null);
|
|
7411
|
+
const content = vue.ref(null);
|
|
7412
|
+
const arrowDisplay = vue.computed(() => {
|
|
7413
|
+
return props.arrow && !props.vertical;
|
|
7414
|
+
});
|
|
7415
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
7416
|
+
const itemInStage = (item, index, items) => {
|
|
7417
|
+
const length = items.length;
|
|
7418
|
+
const isInStage = item.exposed.isInStage.value;
|
|
7419
|
+
if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
|
|
7420
|
+
return 'left';
|
|
7421
|
+
} else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
|
|
7422
|
+
return 'right';
|
|
7423
|
+
}
|
|
7424
|
+
return false;
|
|
7425
|
+
};
|
|
7426
|
+
const handleButtonEnter = arrow => {
|
|
7427
|
+
if (props.vertical) return;
|
|
7428
|
+
carousel.items.value.forEach((item, index, items) => {
|
|
7429
|
+
if (arrow === itemInStage(item, index, items)) {
|
|
7430
|
+
item.exposed.isHover.value = true;
|
|
7431
|
+
}
|
|
7432
|
+
});
|
|
7433
|
+
};
|
|
7434
|
+
const handleButtonLeave = () => {
|
|
7435
|
+
if (props.vertical) return;
|
|
7436
|
+
carousel.items.value.forEach(item => {
|
|
7437
|
+
item.exposed.isHover.value = false;
|
|
7438
|
+
});
|
|
7439
|
+
};
|
|
7440
|
+
const handleDotHover = index => {
|
|
7441
|
+
if (props.trigger === 'hover' && index !== carousel.activeIndex.value) {
|
|
7442
|
+
carousel.activeIndex.value = index;
|
|
7443
|
+
}
|
|
7444
|
+
};
|
|
7445
|
+
const handleMouseEnter = () => {
|
|
7446
|
+
isHover.value = true;
|
|
7447
|
+
carousel.pauseTimer();
|
|
7448
|
+
};
|
|
7449
|
+
const handleMouseLeave = () => {
|
|
7450
|
+
isHover.value = false;
|
|
7451
|
+
carousel.startTimer();
|
|
7452
|
+
};
|
|
7453
|
+
const throttledArrowClick = throttle$1(carousel.setActiveItem);
|
|
7454
|
+
const throttledDotHover = throttle$1(handleDotHover);
|
|
7455
|
+
return () => {
|
|
7456
|
+
return vue.createVNode("div", {
|
|
7457
|
+
"ref": wrapper,
|
|
7458
|
+
"class": ['vc-carousel', `is-${carousel.direction.value}`],
|
|
7459
|
+
"onMousedown": vue.withModifiers(carousel.handleStart, ['stop', 'prevent']),
|
|
7460
|
+
"onMousemove": vue.withModifiers(carousel.handleMove, ['stop', 'prevent']),
|
|
7461
|
+
"onMouseup": vue.withModifiers(carousel.handleEnd, ['stop', 'prevent']),
|
|
7462
|
+
"onMouseenter": vue.withModifiers(handleMouseEnter, ['stop']),
|
|
7463
|
+
"onMouseleave": vue.withModifiers(handleMouseLeave, ['stop'])
|
|
7464
|
+
}, [vue.createVNode("div", {
|
|
7465
|
+
"ref": content,
|
|
7466
|
+
"class": "vc-carousel__wrapper",
|
|
7467
|
+
"style": {
|
|
7468
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
7469
|
+
}
|
|
7470
|
+
}, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
7471
|
+
"mode": "left-part"
|
|
7472
|
+
}, {
|
|
7473
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
7474
|
+
"type": "button",
|
|
7475
|
+
"class": "vc-carousel__arrow is-left-arrow",
|
|
7476
|
+
"onMouseenter": () => handleButtonEnter('left'),
|
|
7477
|
+
"onMouseleave": handleButtonLeave,
|
|
7478
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ['stop'])
|
|
7479
|
+
}, [vue.createVNode(Icon, {
|
|
7480
|
+
"type": "left"
|
|
7481
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value > 0)]])]
|
|
7482
|
+
}), arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
7483
|
+
"mode": "right-part"
|
|
7484
|
+
}, {
|
|
7485
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
7486
|
+
"type": "button",
|
|
7487
|
+
"class": "vc-carousel__arrow is-right-arrow",
|
|
7488
|
+
"onMouseenter": () => handleButtonEnter('right'),
|
|
7489
|
+
"onMouseleave": handleButtonLeave,
|
|
7490
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ['stop'])
|
|
7491
|
+
}, [vue.createVNode(Icon, {
|
|
7492
|
+
"type": "right"
|
|
7493
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
|
|
7494
|
+
}), slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
7495
|
+
"class": ['vc-carousel__dots', ...carousel.dotsClasses.value]
|
|
7496
|
+
}, [carousel.items.value.map((item, index) => vue.createVNode("li", {
|
|
7497
|
+
"key": index,
|
|
7498
|
+
"class": ['vc-carousel__dot', `is-${carousel.direction.value}`, {
|
|
7499
|
+
'is-active': index === carousel.activeIndex.value
|
|
7500
|
+
}],
|
|
7501
|
+
"onMouseenter": () => throttledDotHover(index),
|
|
7502
|
+
"onClick": () => carousel.handleDotClick(index)
|
|
7503
|
+
}, [vue.createVNode("button", {
|
|
7504
|
+
"class": "vc-carousel__button"
|
|
7505
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
|
|
7506
|
+
};
|
|
7507
|
+
}
|
|
7508
|
+
});
|
|
7509
|
+
|
|
7510
|
+
const props$1i = {
|
|
7511
|
+
name: String,
|
|
7512
|
+
label: {
|
|
7513
|
+
type: [String, Number],
|
|
7514
|
+
default: ""
|
|
7515
|
+
},
|
|
7516
|
+
// card大小
|
|
7517
|
+
width: {
|
|
7518
|
+
type: [Number, String],
|
|
7519
|
+
default: "70%"
|
|
7520
|
+
},
|
|
7521
|
+
// card之间间距, 或者滑动时候的间距
|
|
7522
|
+
gutter: {
|
|
7523
|
+
type: Number,
|
|
7524
|
+
default: 0
|
|
7525
|
+
},
|
|
7526
|
+
scale: {
|
|
7527
|
+
type: Number,
|
|
7528
|
+
default: 0.83
|
|
7529
|
+
}
|
|
7530
|
+
};
|
|
7531
|
+
|
|
7532
|
+
const TRANSFORM = prefixStyle("transform").camel;
|
|
7533
|
+
const useCarouselItem = (expose) => {
|
|
7534
|
+
const instance = vue.getCurrentInstance();
|
|
7535
|
+
const carousel = vue.inject("vc-carousel", {});
|
|
7536
|
+
const props = instance.props;
|
|
7537
|
+
const translate = vue.ref(0);
|
|
7538
|
+
const currentScale = vue.ref(1);
|
|
7539
|
+
const isHover = vue.ref(false);
|
|
7540
|
+
const isActive = vue.ref(false);
|
|
7541
|
+
const isReady = vue.ref(false);
|
|
7542
|
+
const isInStage = vue.ref(false);
|
|
7543
|
+
const isAnimating = vue.ref(false);
|
|
7544
|
+
const isVertical = vue.computed(() => {
|
|
7545
|
+
return carousel.props.vertical;
|
|
7546
|
+
});
|
|
7547
|
+
const isCard = vue.computed(() => {
|
|
7548
|
+
return carousel.props.card;
|
|
7549
|
+
});
|
|
7550
|
+
const isMove = vue.computed(() => {
|
|
7551
|
+
return carousel.offset.value !== 0;
|
|
7552
|
+
});
|
|
7553
|
+
const itemGutter = vue.computed(() => {
|
|
7554
|
+
return props.gutter || carousel.props.gutter || 0;
|
|
7555
|
+
});
|
|
7556
|
+
const itemStyle = vue.computed(() => {
|
|
7557
|
+
const translateType = isVertical.value ? "translateY" : "translateX";
|
|
7558
|
+
if (carousel.props.card) {
|
|
7559
|
+
return {
|
|
7560
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
7561
|
+
width: props.width
|
|
7562
|
+
};
|
|
7563
|
+
} else {
|
|
7564
|
+
return {
|
|
7565
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
7566
|
+
width: itemGutter.value ? props.width : "100%"
|
|
7567
|
+
};
|
|
7568
|
+
}
|
|
7569
|
+
});
|
|
7570
|
+
vue.onBeforeMount(() => {
|
|
7571
|
+
carousel.add?.(instance);
|
|
7572
|
+
if (!isCard.value && itemGutter.value && carousel.props.loop) {
|
|
7573
|
+
throw new VcError("carousel", "slide模式下loop不能为true");
|
|
7574
|
+
}
|
|
7575
|
+
});
|
|
7576
|
+
vue.onBeforeUnmount(() => {
|
|
7577
|
+
carousel.remove?.(instance);
|
|
7578
|
+
});
|
|
7579
|
+
const processIndex = (index, activeIndex, length) => {
|
|
7580
|
+
if (activeIndex === 0 && index === length - 1) {
|
|
7581
|
+
return -1;
|
|
7582
|
+
} else if (activeIndex === length - 1 && index === 0) {
|
|
7583
|
+
return length;
|
|
7584
|
+
} else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
|
|
7585
|
+
return length + 1;
|
|
7586
|
+
} else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
|
|
7587
|
+
return -2;
|
|
7588
|
+
}
|
|
7589
|
+
return index;
|
|
7590
|
+
};
|
|
7591
|
+
const calcCardTranslate = (index, activeIndex) => {
|
|
7592
|
+
let value;
|
|
7593
|
+
const widthNumber = +props.width / 100;
|
|
7594
|
+
const parentW = carousel.wrapper.value.offsetWidth;
|
|
7595
|
+
if (isInStage.value) {
|
|
7596
|
+
if (index === activeIndex) {
|
|
7597
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
7598
|
+
} else if (index > activeIndex) {
|
|
7599
|
+
value = parentW * (1 + widthNumber * props.scale) / 2 + itemGutter.value;
|
|
7600
|
+
} else {
|
|
7601
|
+
value = -(parentW * ((widthNumber * props.scale - 1) / 2 + widthNumber)) - itemGutter.value;
|
|
7602
|
+
}
|
|
7603
|
+
} else if (index < activeIndex) {
|
|
7604
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
7605
|
+
} else {
|
|
7606
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
7607
|
+
}
|
|
7608
|
+
return value;
|
|
7609
|
+
};
|
|
7610
|
+
const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
|
|
7611
|
+
const { length } = carousel.items.value;
|
|
7612
|
+
const offset = wrapperWidth - (carousel.wrapper?.value?.offsetWidth || 0);
|
|
7613
|
+
const gutter = itemGutter.value;
|
|
7614
|
+
if (!gutter || isVertical.value) return 0;
|
|
7615
|
+
let slideOffset = 0;
|
|
7616
|
+
if (length === 1) {
|
|
7617
|
+
return offset / 2;
|
|
7618
|
+
}
|
|
7619
|
+
if (activeIndex == 0) {
|
|
7620
|
+
if (index - activeIndex === 0) {
|
|
7621
|
+
slideOffset = gutter;
|
|
7622
|
+
} else if (index - activeIndex === 1) {
|
|
7623
|
+
slideOffset = -offset + gutter * 2;
|
|
7624
|
+
}
|
|
7625
|
+
}
|
|
7626
|
+
if (activeIndex !== 0 && activeIndex != length - 1) {
|
|
7627
|
+
if (index - activeIndex === 0) {
|
|
7628
|
+
slideOffset = offset / 2;
|
|
7629
|
+
} else if (index - activeIndex === 1) {
|
|
7630
|
+
slideOffset = -offset / 2 + gutter;
|
|
7631
|
+
} else if (index - activeIndex === -1) {
|
|
7632
|
+
slideOffset = offset * 3 / 2 - gutter;
|
|
7633
|
+
}
|
|
7634
|
+
}
|
|
7635
|
+
if (activeIndex == length - 1) {
|
|
7636
|
+
if (index - activeIndex === 0) {
|
|
7637
|
+
slideOffset = offset - gutter;
|
|
7638
|
+
} else if (index - activeIndex === -1) {
|
|
7639
|
+
slideOffset = offset * 2 - gutter * 2;
|
|
7640
|
+
}
|
|
7641
|
+
}
|
|
7642
|
+
return slideOffset;
|
|
7643
|
+
};
|
|
7644
|
+
const calcTranslate = (index, activeIndex) => {
|
|
7645
|
+
const distance = carousel.wrapper.value[isVertical.value ? "offsetHeight" : "offsetWidth"];
|
|
7646
|
+
const slideOffset = calcSlideOffset(index, activeIndex, distance);
|
|
7647
|
+
return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
|
|
7648
|
+
};
|
|
7649
|
+
const reset = (index, activeIndex, oldIndex) => {
|
|
7650
|
+
const { length } = carousel.items.value;
|
|
7651
|
+
if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
|
|
7652
|
+
isAnimating.value = index === activeIndex || index === oldIndex;
|
|
7653
|
+
if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
|
|
7654
|
+
isAnimating.value = true;
|
|
7655
|
+
}
|
|
7656
|
+
}
|
|
7657
|
+
if (index !== activeIndex && length > 2 && carousel.props.loop) {
|
|
7658
|
+
index = processIndex(index, activeIndex, length);
|
|
7659
|
+
}
|
|
7660
|
+
if (isCard.value) {
|
|
7661
|
+
if (isVertical.value) {
|
|
7662
|
+
throw new VcError("carousel", "卡片模式不支持垂直方向");
|
|
7663
|
+
}
|
|
7664
|
+
isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
7665
|
+
isActive.value = index === activeIndex;
|
|
7666
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
7667
|
+
currentScale.value = isActive.value ? 1 : props.scale;
|
|
7668
|
+
} else {
|
|
7669
|
+
isActive.value = index === activeIndex;
|
|
7670
|
+
translate.value = calcTranslate(index, activeIndex);
|
|
7671
|
+
}
|
|
7672
|
+
isReady.value = true;
|
|
7673
|
+
};
|
|
7674
|
+
const handleItemClick = () => {
|
|
7675
|
+
if (parent && isCard.value) {
|
|
7676
|
+
const index = carousel.items.value.indexOf(instance);
|
|
7677
|
+
carousel.setActiveItem(index);
|
|
7678
|
+
}
|
|
7679
|
+
};
|
|
7680
|
+
expose({
|
|
7681
|
+
reset,
|
|
7682
|
+
isInStage,
|
|
7683
|
+
isHover,
|
|
7684
|
+
isActive
|
|
7685
|
+
});
|
|
7686
|
+
return {
|
|
7687
|
+
translate,
|
|
7688
|
+
currentScale,
|
|
7689
|
+
isHover,
|
|
7690
|
+
isActive,
|
|
7691
|
+
isReady,
|
|
7692
|
+
isInStage,
|
|
7693
|
+
isAnimating,
|
|
7694
|
+
isVertical,
|
|
7695
|
+
isCard,
|
|
7696
|
+
isMove,
|
|
7697
|
+
itemGutter,
|
|
7698
|
+
itemStyle,
|
|
7699
|
+
reset,
|
|
7700
|
+
handleItemClick
|
|
7701
|
+
};
|
|
7702
|
+
};
|
|
7703
|
+
|
|
7704
|
+
/** @jsxImportSource vue */
|
|
7705
|
+
|
|
7706
|
+
const COMPONENT_NAME$1_ = 'vc-carousel-item';
|
|
7707
|
+
const CarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
7708
|
+
name: COMPONENT_NAME$1_,
|
|
7065
7709
|
props: props$1i,
|
|
7710
|
+
setup(_, {
|
|
7711
|
+
slots,
|
|
7712
|
+
expose
|
|
7713
|
+
}) {
|
|
7714
|
+
const it = useCarouselItem(expose);
|
|
7715
|
+
return () => {
|
|
7716
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
7717
|
+
"class": ['vc-carousel-item', {
|
|
7718
|
+
'is-active': it.isActive.value,
|
|
7719
|
+
'is-card': it.isCard.value,
|
|
7720
|
+
'is-in-stage': it.isInStage.value,
|
|
7721
|
+
'is-hover': it.isHover.value,
|
|
7722
|
+
'is-animating': it.isAnimating.value && !it.isMove.value
|
|
7723
|
+
}],
|
|
7724
|
+
"style": it.itemStyle.value,
|
|
7725
|
+
"onClick": it.handleItemClick
|
|
7726
|
+
}, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
|
|
7727
|
+
"class": "vc-carousel-item__mask"
|
|
7728
|
+
}, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
7729
|
+
};
|
|
7730
|
+
}
|
|
7731
|
+
});
|
|
7732
|
+
|
|
7733
|
+
/** @jsxImportSource vue */
|
|
7734
|
+
|
|
7735
|
+
const COMPONENT_NAME$1Z = 'vcm-carousel';
|
|
7736
|
+
const MCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
7737
|
+
name: COMPONENT_NAME$1Z,
|
|
7738
|
+
props: {
|
|
7739
|
+
...props$1j,
|
|
7740
|
+
dots: {
|
|
7741
|
+
type: [String, Boolean],
|
|
7742
|
+
default: false
|
|
7743
|
+
},
|
|
7744
|
+
indicator: {
|
|
7745
|
+
type: Boolean,
|
|
7746
|
+
default: true
|
|
7747
|
+
}
|
|
7748
|
+
},
|
|
7066
7749
|
setup(props, {
|
|
7067
|
-
slots
|
|
7750
|
+
slots,
|
|
7751
|
+
expose
|
|
7068
7752
|
}) {
|
|
7753
|
+
const wrapper = vue.ref(null);
|
|
7754
|
+
const content = vue.ref(null);
|
|
7755
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
7756
|
+
let scrollStatus = 0;
|
|
7757
|
+
const handleTouchStart = e => {
|
|
7758
|
+
carousel.handleStart(e.touches[0]);
|
|
7759
|
+
scrollStatus = 0;
|
|
7760
|
+
};
|
|
7761
|
+
const handleTouchMove = e => {
|
|
7762
|
+
const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
|
|
7763
|
+
const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
|
|
7764
|
+
if (!props.vertical && absX > absY && scrollStatus !== 1) {
|
|
7765
|
+
e.preventDefault();
|
|
7766
|
+
carousel.handleMove(e.touches[0]);
|
|
7767
|
+
scrollStatus = 2;
|
|
7768
|
+
return;
|
|
7769
|
+
}
|
|
7770
|
+
if (props.vertical && absY > absX) {
|
|
7771
|
+
e.preventDefault();
|
|
7772
|
+
carousel.handleMove(e.touches[0]);
|
|
7773
|
+
return;
|
|
7774
|
+
}
|
|
7775
|
+
if (scrollStatus === 0) {
|
|
7776
|
+
scrollStatus = 1;
|
|
7777
|
+
}
|
|
7778
|
+
};
|
|
7779
|
+
|
|
7780
|
+
// e.changedTouches[0]
|
|
7781
|
+
const handleTouchEnd = () => {
|
|
7782
|
+
carousel.handleEnd();
|
|
7783
|
+
scrollStatus = 0;
|
|
7784
|
+
};
|
|
7069
7785
|
return () => {
|
|
7070
7786
|
return vue.createVNode("div", {
|
|
7071
|
-
"
|
|
7072
|
-
|
|
7787
|
+
"ref": wrapper,
|
|
7788
|
+
"class": ['vcm-carousel', `is-${carousel.direction.value}`],
|
|
7789
|
+
"onTouchstart": vue.withModifiers(handleTouchStart, ['stop']),
|
|
7790
|
+
"onTouchmove": vue.withModifiers(handleTouchMove, ['stop']),
|
|
7791
|
+
"onTouchend": vue.withModifiers(handleTouchEnd, ['stop'])
|
|
7792
|
+
}, [vue.createVNode("div", {
|
|
7793
|
+
"ref": content,
|
|
7794
|
+
"style": {
|
|
7795
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
7796
|
+
},
|
|
7797
|
+
"class": "vcm-carousel__wrapper"
|
|
7798
|
+
}, [slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
7799
|
+
"class": ['vcm-carousel__dots', ...carousel.dotsClasses.value]
|
|
7800
|
+
}, [carousel.items.value.map((_, index) => vue.createVNode("li", {
|
|
7801
|
+
"key": index,
|
|
7802
|
+
"class": ['vcm-carousel__dot', 'is-' + carousel.direction.value, {
|
|
7803
|
+
'is-active': index === carousel.activeIndex.value
|
|
7804
|
+
}],
|
|
7805
|
+
"onClick": e => {
|
|
7806
|
+
e.stopPropagation();
|
|
7807
|
+
carousel.handleDotClick(index);
|
|
7808
|
+
}
|
|
7809
|
+
}, [vue.createVNode("button", {
|
|
7810
|
+
"class": "vcm-carousel__button"
|
|
7811
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props.card && props.indicator && vue.createVNode("div", {
|
|
7812
|
+
"class": "vcm-carousel__indicator"
|
|
7813
|
+
}, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
|
|
7073
7814
|
};
|
|
7074
7815
|
}
|
|
7075
7816
|
});
|
|
7076
7817
|
|
|
7077
|
-
|
|
7818
|
+
/** @jsxImportSource vue */
|
|
7819
|
+
|
|
7820
|
+
const COMPONENT_NAME$1Y = 'vcm-carousel-item';
|
|
7821
|
+
const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
7822
|
+
name: COMPONENT_NAME$1Y,
|
|
7823
|
+
props: props$1i,
|
|
7824
|
+
setup(_, {
|
|
7825
|
+
slots,
|
|
7826
|
+
expose
|
|
7827
|
+
}) {
|
|
7828
|
+
const it = useCarouselItem(expose);
|
|
7829
|
+
return () => {
|
|
7830
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
7831
|
+
"style": it.itemStyle.value,
|
|
7832
|
+
"class": {
|
|
7833
|
+
'vcm-carousel-item': true,
|
|
7834
|
+
'is-active': it.isActive.value,
|
|
7835
|
+
'is-card': it.isCard.value,
|
|
7836
|
+
'is-animating': it.isAnimating.value && !it.isMove.value,
|
|
7837
|
+
'is-in-stage': it.isInStage.value
|
|
7838
|
+
},
|
|
7839
|
+
"onClick": it.handleItemClick
|
|
7840
|
+
}, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
|
|
7841
|
+
"class": "vcm-carousel-item__mask"
|
|
7842
|
+
}, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
7843
|
+
};
|
|
7844
|
+
}
|
|
7845
|
+
});
|
|
7078
7846
|
|
|
7079
7847
|
const useAttrs = (options) => {
|
|
7080
7848
|
const attrs = vue.useAttrs();
|
|
@@ -7418,9 +8186,9 @@
|
|
|
7418
8186
|
|
|
7419
8187
|
/** @jsxImportSource vue */
|
|
7420
8188
|
|
|
7421
|
-
const COMPONENT_NAME$
|
|
8189
|
+
const COMPONENT_NAME$1X = 'vc-input';
|
|
7422
8190
|
const Input$1 = /* @__PURE__ */ vue.defineComponent({
|
|
7423
|
-
name: COMPONENT_NAME$
|
|
8191
|
+
name: COMPONENT_NAME$1X,
|
|
7424
8192
|
inheritAttrs: false,
|
|
7425
8193
|
props: {
|
|
7426
8194
|
...props$1h,
|
|
@@ -7755,9 +8523,9 @@
|
|
|
7755
8523
|
|
|
7756
8524
|
/** @jsxImportSource vue */
|
|
7757
8525
|
|
|
7758
|
-
const COMPONENT_NAME$
|
|
8526
|
+
const COMPONENT_NAME$1W = 'vc-input-number';
|
|
7759
8527
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
7760
|
-
name: COMPONENT_NAME$
|
|
8528
|
+
name: COMPONENT_NAME$1W,
|
|
7761
8529
|
props: props$1g,
|
|
7762
8530
|
inheritAttrs: false,
|
|
7763
8531
|
setup(props, {
|
|
@@ -7821,9 +8589,9 @@
|
|
|
7821
8589
|
|
|
7822
8590
|
/** @jsxImportSource vue */
|
|
7823
8591
|
|
|
7824
|
-
const COMPONENT_NAME$
|
|
8592
|
+
const COMPONENT_NAME$1V = 'vc-input-search';
|
|
7825
8593
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
7826
|
-
name: COMPONENT_NAME$
|
|
8594
|
+
name: COMPONENT_NAME$1V,
|
|
7827
8595
|
props: props$1f,
|
|
7828
8596
|
inheritAttrs: false,
|
|
7829
8597
|
setup(props, {
|
|
@@ -7956,69 +8724,6 @@
|
|
|
7956
8724
|
...pick(props$1e, wrapperKeys)
|
|
7957
8725
|
};
|
|
7958
8726
|
|
|
7959
|
-
class Resize {
|
|
7960
|
-
el;
|
|
7961
|
-
static of(el) {
|
|
7962
|
-
return new Resize(el);
|
|
7963
|
-
}
|
|
7964
|
-
/**
|
|
7965
|
-
* Resize.of(el, fn);
|
|
7966
|
-
* @param el ~
|
|
7967
|
-
* @param fn ~
|
|
7968
|
-
* @returns off
|
|
7969
|
-
*/
|
|
7970
|
-
static on(el, fn) {
|
|
7971
|
-
return new Resize(el).on(fn);
|
|
7972
|
-
}
|
|
7973
|
-
/**
|
|
7974
|
-
* 要实现Resize.off(el),el必须侵入式修改挂上__rz__
|
|
7975
|
-
* @param el ~
|
|
7976
|
-
* @param fn ~
|
|
7977
|
-
* @returns ~
|
|
7978
|
-
*/
|
|
7979
|
-
static off(el, fn) {
|
|
7980
|
-
return new Resize(el).off(fn);
|
|
7981
|
-
}
|
|
7982
|
-
listeners = [];
|
|
7983
|
-
ro = null;
|
|
7984
|
-
constructor(el) {
|
|
7985
|
-
this.el = el;
|
|
7986
|
-
let rz = el.__rz__;
|
|
7987
|
-
if (rz && rz instanceof Resize) {
|
|
7988
|
-
this.listeners = rz.listeners;
|
|
7989
|
-
this.ro = rz.ro;
|
|
7990
|
-
}
|
|
7991
|
-
}
|
|
7992
|
-
handleResize = (entries) => {
|
|
7993
|
-
/* istanbul ignore else -- @preserve */
|
|
7994
|
-
if (entries.some((i) => i.target === this.el)) {
|
|
7995
|
-
this.listeners?.forEach((fn) => fn());
|
|
7996
|
-
}
|
|
7997
|
-
};
|
|
7998
|
-
on(fn) {
|
|
7999
|
-
if (typeof ResizeObserver === "undefined")
|
|
8000
|
-
return () => {
|
|
8001
|
-
};
|
|
8002
|
-
if (!this.listeners.length) {
|
|
8003
|
-
this.ro = this.ro || new ResizeObserver(this.handleResize);
|
|
8004
|
-
this.ro.observe(this.el);
|
|
8005
|
-
this.el.__rz__ = this;
|
|
8006
|
-
}
|
|
8007
|
-
this.listeners.push(fn);
|
|
8008
|
-
return () => this.off(fn);
|
|
8009
|
-
}
|
|
8010
|
-
off(fn) {
|
|
8011
|
-
if (fn) {
|
|
8012
|
-
this.listeners.splice(this.listeners.indexOf(fn), 1);
|
|
8013
|
-
} else {
|
|
8014
|
-
this.listeners = [];
|
|
8015
|
-
}
|
|
8016
|
-
if (!this.listeners.length && this.ro) {
|
|
8017
|
-
this.ro.disconnect();
|
|
8018
|
-
}
|
|
8019
|
-
}
|
|
8020
|
-
}
|
|
8021
|
-
|
|
8022
8727
|
const EXTRA_DISTANCE = 4;
|
|
8023
8728
|
const HALF_ARROW = 12.73 / 2;
|
|
8024
8729
|
const usePos = () => {
|
|
@@ -8279,9 +8984,9 @@
|
|
|
8279
8984
|
}
|
|
8280
8985
|
};
|
|
8281
8986
|
|
|
8282
|
-
const COMPONENT_NAME$
|
|
8987
|
+
const COMPONENT_NAME$1U = "vc-customer";
|
|
8283
8988
|
const Customer = vue.defineComponent({
|
|
8284
|
-
name: COMPONENT_NAME$
|
|
8989
|
+
name: COMPONENT_NAME$1U,
|
|
8285
8990
|
props: props$1c,
|
|
8286
8991
|
setup(props, context) {
|
|
8287
8992
|
return () => vue.h(() => {
|
|
@@ -8416,7 +9121,7 @@
|
|
|
8416
9121
|
}
|
|
8417
9122
|
}
|
|
8418
9123
|
|
|
8419
|
-
const COMPONENT_NAME$
|
|
9124
|
+
const COMPONENT_NAME$1T = "vc-portal";
|
|
8420
9125
|
class Portal {
|
|
8421
9126
|
/**
|
|
8422
9127
|
* 清理Portals类型组件
|
|
@@ -8466,7 +9171,7 @@
|
|
|
8466
9171
|
this.wrapper = wrapper;
|
|
8467
9172
|
this.globalOptions = {
|
|
8468
9173
|
...options,
|
|
8469
|
-
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$
|
|
9174
|
+
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1T)
|
|
8470
9175
|
};
|
|
8471
9176
|
}
|
|
8472
9177
|
popup(propsData, options) {
|
|
@@ -8564,7 +9269,7 @@
|
|
|
8564
9269
|
...rest
|
|
8565
9270
|
} = options;
|
|
8566
9271
|
let useAllNodes = fragment;
|
|
8567
|
-
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$
|
|
9272
|
+
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1T)}` : name$;
|
|
8568
9273
|
const container = document.createElement(tag);
|
|
8569
9274
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
8570
9275
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -8598,7 +9303,7 @@
|
|
|
8598
9303
|
} else {
|
|
8599
9304
|
const wrapper = this.wrapper;
|
|
8600
9305
|
const app = vue.createApp({
|
|
8601
|
-
name: COMPONENT_NAME$
|
|
9306
|
+
name: COMPONENT_NAME$1T,
|
|
8602
9307
|
parent,
|
|
8603
9308
|
setup() {
|
|
8604
9309
|
if (alive) {
|
|
@@ -8709,13 +9414,13 @@
|
|
|
8709
9414
|
}
|
|
8710
9415
|
};
|
|
8711
9416
|
|
|
8712
|
-
const COMPONENT_NAME$
|
|
9417
|
+
const COMPONENT_NAME$1S = 'vc-portal-view';
|
|
8713
9418
|
|
|
8714
9419
|
/**
|
|
8715
9420
|
* 写法不同,但与vue@2.x 保持一致
|
|
8716
9421
|
*/
|
|
8717
9422
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
8718
|
-
name: COMPONENT_NAME$
|
|
9423
|
+
name: COMPONENT_NAME$1S,
|
|
8719
9424
|
props: props$1b,
|
|
8720
9425
|
setup(props, {
|
|
8721
9426
|
slots
|
|
@@ -8735,9 +9440,9 @@
|
|
|
8735
9440
|
|
|
8736
9441
|
/** @jsxImportSource vue */
|
|
8737
9442
|
|
|
8738
|
-
const COMPONENT_NAME$
|
|
9443
|
+
const COMPONENT_NAME$1R = 'vc-popover-wrapper';
|
|
8739
9444
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
8740
|
-
name: COMPONENT_NAME$
|
|
9445
|
+
name: COMPONENT_NAME$1R,
|
|
8741
9446
|
props: props$1e,
|
|
8742
9447
|
emits: ['portal-fulfilled', 'close'],
|
|
8743
9448
|
setup(props, {
|
|
@@ -8995,9 +9700,9 @@
|
|
|
8995
9700
|
|
|
8996
9701
|
/** @jsxImportSource vue */
|
|
8997
9702
|
|
|
8998
|
-
const COMPONENT_NAME$
|
|
9703
|
+
const COMPONENT_NAME$1Q = 'vc-popover';
|
|
8999
9704
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
9000
|
-
name: COMPONENT_NAME$
|
|
9705
|
+
name: COMPONENT_NAME$1Q,
|
|
9001
9706
|
props: props$1d,
|
|
9002
9707
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
9003
9708
|
setup(props, {
|
|
@@ -9141,9 +9846,9 @@
|
|
|
9141
9846
|
|
|
9142
9847
|
/** @jsxImportSource vue */
|
|
9143
9848
|
|
|
9144
|
-
const COMPONENT_NAME$
|
|
9849
|
+
const COMPONENT_NAME$1P = 'vc-cascader-column';
|
|
9145
9850
|
const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
|
|
9146
|
-
name: COMPONENT_NAME$
|
|
9851
|
+
name: COMPONENT_NAME$1P,
|
|
9147
9852
|
emits: ['click', 'change'],
|
|
9148
9853
|
props: {
|
|
9149
9854
|
data: {
|
|
@@ -9351,9 +10056,9 @@
|
|
|
9351
10056
|
|
|
9352
10057
|
/** @jsxImportSource vue */
|
|
9353
10058
|
|
|
9354
|
-
const COMPONENT_NAME$
|
|
10059
|
+
const COMPONENT_NAME$1O = 'vc-cascader';
|
|
9355
10060
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
9356
|
-
name: COMPONENT_NAME$
|
|
10061
|
+
name: COMPONENT_NAME$1O,
|
|
9357
10062
|
inheritAttrs: false,
|
|
9358
10063
|
props: props$19,
|
|
9359
10064
|
emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
|
|
@@ -9705,9 +10410,9 @@
|
|
|
9705
10410
|
|
|
9706
10411
|
/** @jsxImportSource vue */
|
|
9707
10412
|
|
|
9708
|
-
const COMPONENT_NAME$
|
|
10413
|
+
const COMPONENT_NAME$1N = 'vc-chart';
|
|
9709
10414
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
9710
|
-
name: COMPONENT_NAME$
|
|
10415
|
+
name: COMPONENT_NAME$1N,
|
|
9711
10416
|
props: props$18,
|
|
9712
10417
|
emits: [...EVENTS$1, 'ready'],
|
|
9713
10418
|
setup(props, {
|
|
@@ -9946,9 +10651,9 @@
|
|
|
9946
10651
|
|
|
9947
10652
|
/** @jsxImportSource vue */
|
|
9948
10653
|
|
|
9949
|
-
const COMPONENT_NAME$
|
|
10654
|
+
const COMPONENT_NAME$1M = 'vc-checkbox';
|
|
9950
10655
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
9951
|
-
name: COMPONENT_NAME$
|
|
10656
|
+
name: COMPONENT_NAME$1M,
|
|
9952
10657
|
props: props$17,
|
|
9953
10658
|
emits: ['update:modelValue', 'change'],
|
|
9954
10659
|
setup(props, {
|
|
@@ -10035,9 +10740,9 @@
|
|
|
10035
10740
|
|
|
10036
10741
|
/** @jsxImportSource vue */
|
|
10037
10742
|
|
|
10038
|
-
const COMPONENT_NAME$
|
|
10743
|
+
const COMPONENT_NAME$1L = 'vc-checkbox-group';
|
|
10039
10744
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
10040
|
-
name: COMPONENT_NAME$
|
|
10745
|
+
name: COMPONENT_NAME$1L,
|
|
10041
10746
|
props: props$16,
|
|
10042
10747
|
emits: ['update:modelValue', 'change'],
|
|
10043
10748
|
setup(props, {
|
|
@@ -10055,9 +10760,9 @@
|
|
|
10055
10760
|
|
|
10056
10761
|
/** @jsxImportSource vue */
|
|
10057
10762
|
|
|
10058
|
-
const COMPONENT_NAME$
|
|
10763
|
+
const COMPONENT_NAME$1K = 'vcm-checkbox';
|
|
10059
10764
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
10060
|
-
name: COMPONENT_NAME$
|
|
10765
|
+
name: COMPONENT_NAME$1K,
|
|
10061
10766
|
props: props$17,
|
|
10062
10767
|
emits: ['update:modelValue', 'change'],
|
|
10063
10768
|
setup(props, {
|
|
@@ -10097,9 +10802,9 @@
|
|
|
10097
10802
|
|
|
10098
10803
|
/** @jsxImportSource vue */
|
|
10099
10804
|
|
|
10100
|
-
const COMPONENT_NAME$
|
|
10805
|
+
const COMPONENT_NAME$1J = 'vcm-checkbox-group';
|
|
10101
10806
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
10102
|
-
name: COMPONENT_NAME$
|
|
10807
|
+
name: COMPONENT_NAME$1J,
|
|
10103
10808
|
props: props$16,
|
|
10104
10809
|
emits: ['update:modelValue', 'change'],
|
|
10105
10810
|
setup(props, {
|
|
@@ -10153,9 +10858,9 @@
|
|
|
10153
10858
|
|
|
10154
10859
|
/** @jsxImportSource vue */
|
|
10155
10860
|
|
|
10156
|
-
const COMPONENT_NAME$
|
|
10861
|
+
const COMPONENT_NAME$1I = 'vc-message';
|
|
10157
10862
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
10158
|
-
name: COMPONENT_NAME$
|
|
10863
|
+
name: COMPONENT_NAME$1I,
|
|
10159
10864
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
10160
10865
|
props: props$15,
|
|
10161
10866
|
setup(props, {
|
|
@@ -10404,9 +11109,9 @@
|
|
|
10404
11109
|
return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
10405
11110
|
};
|
|
10406
11111
|
|
|
10407
|
-
const COMPONENT_NAME$
|
|
11112
|
+
const COMPONENT_NAME$1H = "vc-clipboard";
|
|
10408
11113
|
const Clipboard$2 = vue.defineComponent({
|
|
10409
|
-
name: COMPONENT_NAME$
|
|
11114
|
+
name: COMPONENT_NAME$1H,
|
|
10410
11115
|
props: props$14,
|
|
10411
11116
|
setup() {
|
|
10412
11117
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -10446,9 +11151,9 @@
|
|
|
10446
11151
|
|
|
10447
11152
|
/** @jsxImportSource vue */
|
|
10448
11153
|
|
|
10449
|
-
const COMPONENT_NAME$
|
|
11154
|
+
const COMPONENT_NAME$1G = 'vcm-toast';
|
|
10450
11155
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
10451
|
-
name: COMPONENT_NAME$
|
|
11156
|
+
name: COMPONENT_NAME$1G,
|
|
10452
11157
|
emits: ['close', 'portal-fulfilled'],
|
|
10453
11158
|
props: props$13,
|
|
10454
11159
|
setup(props, {
|
|
@@ -10550,9 +11255,9 @@
|
|
|
10550
11255
|
const error$3 = create$6({ mode: "error" });
|
|
10551
11256
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$3 });
|
|
10552
11257
|
|
|
10553
|
-
const COMPONENT_NAME$
|
|
11258
|
+
const COMPONENT_NAME$1F = "vcm-clipboard";
|
|
10554
11259
|
const MClipboard$1 = vue.defineComponent({
|
|
10555
|
-
name: COMPONENT_NAME$
|
|
11260
|
+
name: COMPONENT_NAME$1F,
|
|
10556
11261
|
props: props$14,
|
|
10557
11262
|
setup() {
|
|
10558
11263
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -10584,9 +11289,9 @@
|
|
|
10584
11289
|
}
|
|
10585
11290
|
};
|
|
10586
11291
|
|
|
10587
|
-
const COMPONENT_NAME$
|
|
11292
|
+
const COMPONENT_NAME$1E = "vc-collapse";
|
|
10588
11293
|
const Collapse = vue.defineComponent({
|
|
10589
|
-
name: COMPONENT_NAME$
|
|
11294
|
+
name: COMPONENT_NAME$1E,
|
|
10590
11295
|
props: props$12,
|
|
10591
11296
|
emits: ["update:moodelValue", "change"],
|
|
10592
11297
|
setup(props, { slots, emit }) {
|
|
@@ -10703,9 +11408,9 @@
|
|
|
10703
11408
|
function _isSlot$3(s) {
|
|
10704
11409
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
10705
11410
|
}
|
|
10706
|
-
const COMPONENT_NAME$
|
|
11411
|
+
const COMPONENT_NAME$1D = 'vc-expand';
|
|
10707
11412
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10708
|
-
name: COMPONENT_NAME$
|
|
11413
|
+
name: COMPONENT_NAME$1D,
|
|
10709
11414
|
props: props$10,
|
|
10710
11415
|
setup(props, {
|
|
10711
11416
|
slots
|
|
@@ -10735,9 +11440,9 @@
|
|
|
10735
11440
|
|
|
10736
11441
|
/** @jsxImportSource vue */
|
|
10737
11442
|
|
|
10738
|
-
const COMPONENT_NAME$
|
|
11443
|
+
const COMPONENT_NAME$1C = 'vc-collapse-item';
|
|
10739
11444
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
10740
|
-
name: COMPONENT_NAME$
|
|
11445
|
+
name: COMPONENT_NAME$1C,
|
|
10741
11446
|
props: props$11,
|
|
10742
11447
|
setup(props, {
|
|
10743
11448
|
slots,
|
|
@@ -10812,9 +11517,9 @@
|
|
|
10812
11517
|
|
|
10813
11518
|
/** @jsxImportSource vue */
|
|
10814
11519
|
|
|
10815
|
-
const COMPONENT_NAME$
|
|
11520
|
+
const COMPONENT_NAME$1B = 'vc-color-picker';
|
|
10816
11521
|
const ColorPicker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10817
|
-
name: COMPONENT_NAME$
|
|
11522
|
+
name: COMPONENT_NAME$1B,
|
|
10818
11523
|
props: props$$,
|
|
10819
11524
|
setup(props, {
|
|
10820
11525
|
slots
|
|
@@ -10877,9 +11582,9 @@
|
|
|
10877
11582
|
function _isSlot$2(s) {
|
|
10878
11583
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
10879
11584
|
}
|
|
10880
|
-
const COMPONENT_NAME$
|
|
11585
|
+
const COMPONENT_NAME$1A = 'vc-countdown';
|
|
10881
11586
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
10882
|
-
name: COMPONENT_NAME$
|
|
11587
|
+
name: COMPONENT_NAME$1A,
|
|
10883
11588
|
props: props$_,
|
|
10884
11589
|
emits: ['change', 'complete', 'error'],
|
|
10885
11590
|
setup(props, {
|
|
@@ -11152,9 +11857,9 @@
|
|
|
11152
11857
|
function _isSlot$1(s) {
|
|
11153
11858
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
11154
11859
|
}
|
|
11155
|
-
const COMPONENT_NAME$
|
|
11860
|
+
const COMPONENT_NAME$1z = 'vc-counter';
|
|
11156
11861
|
const Counter = /* @__PURE__ */ vue.defineComponent({
|
|
11157
|
-
name: COMPONENT_NAME$
|
|
11862
|
+
name: COMPONENT_NAME$1z,
|
|
11158
11863
|
props: props$Z,
|
|
11159
11864
|
emits: ['begin', 'complete', 'change'],
|
|
11160
11865
|
setup(props, {
|
|
@@ -12417,9 +13122,9 @@
|
|
|
12417
13122
|
}
|
|
12418
13123
|
return view;
|
|
12419
13124
|
};
|
|
12420
|
-
const COMPONENT_NAME$
|
|
13125
|
+
const COMPONENT_NAME$1y = 'vc-date-confirm';
|
|
12421
13126
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
12422
|
-
name: COMPONENT_NAME$
|
|
13127
|
+
name: COMPONENT_NAME$1y,
|
|
12423
13128
|
props: {
|
|
12424
13129
|
showTime: {
|
|
12425
13130
|
type: Boolean,
|
|
@@ -12483,9 +13188,9 @@
|
|
|
12483
13188
|
|
|
12484
13189
|
/** @jsxImportSource vue */
|
|
12485
13190
|
|
|
12486
|
-
const COMPONENT_NAME$
|
|
13191
|
+
const COMPONENT_NAME$1x = 'vc-date-header';
|
|
12487
13192
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
12488
|
-
name: COMPONENT_NAME$
|
|
13193
|
+
name: COMPONENT_NAME$1x,
|
|
12489
13194
|
props: {
|
|
12490
13195
|
panelDate: Date,
|
|
12491
13196
|
showNext: {
|
|
@@ -12569,9 +13274,9 @@
|
|
|
12569
13274
|
|
|
12570
13275
|
/** @jsxImportSource vue */
|
|
12571
13276
|
|
|
12572
|
-
const COMPONENT_NAME$
|
|
13277
|
+
const COMPONENT_NAME$1w = 'vc-date-table';
|
|
12573
13278
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
12574
|
-
name: COMPONENT_NAME$
|
|
13279
|
+
name: COMPONENT_NAME$1w,
|
|
12575
13280
|
props: {
|
|
12576
13281
|
value: Array,
|
|
12577
13282
|
firstDayOfWeek: {
|
|
@@ -12780,9 +13485,9 @@
|
|
|
12780
13485
|
|
|
12781
13486
|
/** @jsxImportSource vue */
|
|
12782
13487
|
|
|
12783
|
-
const COMPONENT_NAME$
|
|
13488
|
+
const COMPONENT_NAME$1v = 'vc-month-table';
|
|
12784
13489
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
12785
|
-
name: COMPONENT_NAME$
|
|
13490
|
+
name: COMPONENT_NAME$1v,
|
|
12786
13491
|
props: {
|
|
12787
13492
|
value: Array,
|
|
12788
13493
|
panelDate: Date,
|
|
@@ -12914,7 +13619,7 @@
|
|
|
12914
13619
|
|
|
12915
13620
|
/** @jsxImportSource vue */
|
|
12916
13621
|
|
|
12917
|
-
const COMPONENT_NAME$
|
|
13622
|
+
const COMPONENT_NAME$1u = 'vc-quarter-table';
|
|
12918
13623
|
|
|
12919
13624
|
/**
|
|
12920
13625
|
* 获取季度对应的月份范围
|
|
@@ -12948,7 +13653,7 @@
|
|
|
12948
13653
|
}
|
|
12949
13654
|
};
|
|
12950
13655
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
12951
|
-
name: COMPONENT_NAME$
|
|
13656
|
+
name: COMPONENT_NAME$1u,
|
|
12952
13657
|
props: {
|
|
12953
13658
|
value: Array,
|
|
12954
13659
|
panelDate: Date,
|
|
@@ -13071,9 +13776,9 @@
|
|
|
13071
13776
|
|
|
13072
13777
|
/** @jsxImportSource vue */
|
|
13073
13778
|
|
|
13074
|
-
const COMPONENT_NAME$
|
|
13779
|
+
const COMPONENT_NAME$1t = 'vc-shortcuts-select';
|
|
13075
13780
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
13076
|
-
name: COMPONENT_NAME$
|
|
13781
|
+
name: COMPONENT_NAME$1t,
|
|
13077
13782
|
props: {
|
|
13078
13783
|
panelDate: Date,
|
|
13079
13784
|
config: Array,
|
|
@@ -13113,9 +13818,9 @@
|
|
|
13113
13818
|
|
|
13114
13819
|
/** @jsxImportSource vue */
|
|
13115
13820
|
|
|
13116
|
-
const COMPONENT_NAME$
|
|
13821
|
+
const COMPONENT_NAME$1s = 'vc-time-select';
|
|
13117
13822
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
13118
|
-
name: COMPONENT_NAME$
|
|
13823
|
+
name: COMPONENT_NAME$1s,
|
|
13119
13824
|
props: {
|
|
13120
13825
|
hours: {
|
|
13121
13826
|
type: [Number, String],
|
|
@@ -13395,9 +14100,9 @@
|
|
|
13395
14100
|
|
|
13396
14101
|
/** @jsxImportSource vue */
|
|
13397
14102
|
|
|
13398
|
-
const COMPONENT_NAME$
|
|
14103
|
+
const COMPONENT_NAME$1r = 'vc-year-table';
|
|
13399
14104
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
13400
|
-
name: COMPONENT_NAME$
|
|
14105
|
+
name: COMPONENT_NAME$1r,
|
|
13401
14106
|
props: {
|
|
13402
14107
|
value: Array,
|
|
13403
14108
|
panelDate: Date,
|
|
@@ -13520,9 +14225,9 @@
|
|
|
13520
14225
|
}
|
|
13521
14226
|
return true;
|
|
13522
14227
|
};
|
|
13523
|
-
const COMPONENT_NAME$
|
|
14228
|
+
const COMPONENT_NAME$1q = 'vc-date-range-panel';
|
|
13524
14229
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
13525
|
-
name: COMPONENT_NAME$
|
|
14230
|
+
name: COMPONENT_NAME$1q,
|
|
13526
14231
|
props: {
|
|
13527
14232
|
...props$W,
|
|
13528
14233
|
confirm: {
|
|
@@ -13901,9 +14606,9 @@
|
|
|
13901
14606
|
|
|
13902
14607
|
/** @jsxImportSource vue */
|
|
13903
14608
|
|
|
13904
|
-
const COMPONENT_NAME$
|
|
14609
|
+
const COMPONENT_NAME$1p = 'vc-date-panel';
|
|
13905
14610
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
13906
|
-
name: COMPONENT_NAME$
|
|
14611
|
+
name: COMPONENT_NAME$1p,
|
|
13907
14612
|
props: {
|
|
13908
14613
|
...props$W,
|
|
13909
14614
|
type: String,
|
|
@@ -14111,9 +14816,9 @@
|
|
|
14111
14816
|
const endYear = value[1].getFullYear();
|
|
14112
14817
|
return startYear === endYear;
|
|
14113
14818
|
};
|
|
14114
|
-
const COMPONENT_NAME$
|
|
14819
|
+
const COMPONENT_NAME$1o = 'vc-monthrange-panel';
|
|
14115
14820
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14116
|
-
name: COMPONENT_NAME$
|
|
14821
|
+
name: COMPONENT_NAME$1o,
|
|
14117
14822
|
props: {
|
|
14118
14823
|
...props$W,
|
|
14119
14824
|
confirm: {
|
|
@@ -14288,9 +14993,9 @@
|
|
|
14288
14993
|
const endYear = value[1].getFullYear();
|
|
14289
14994
|
return startYear === endYear;
|
|
14290
14995
|
};
|
|
14291
|
-
const COMPONENT_NAME$
|
|
14996
|
+
const COMPONENT_NAME$1n = 'vc-quarterrange-panel';
|
|
14292
14997
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14293
|
-
name: COMPONENT_NAME$
|
|
14998
|
+
name: COMPONENT_NAME$1n,
|
|
14294
14999
|
props: {
|
|
14295
15000
|
...props$W,
|
|
14296
15001
|
confirm: {
|
|
@@ -14529,9 +15234,9 @@
|
|
|
14529
15234
|
seconds
|
|
14530
15235
|
};
|
|
14531
15236
|
};
|
|
14532
|
-
const COMPONENT_NAME$
|
|
15237
|
+
const COMPONENT_NAME$1m = 'vc-timerange-panel';
|
|
14533
15238
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14534
|
-
name: COMPONENT_NAME$
|
|
15239
|
+
name: COMPONENT_NAME$1m,
|
|
14535
15240
|
props: props$V,
|
|
14536
15241
|
emits: ['pick', 'clear', 'ok'],
|
|
14537
15242
|
setup(props, {
|
|
@@ -14632,9 +15337,9 @@
|
|
|
14632
15337
|
|
|
14633
15338
|
/** @jsxImportSource vue */
|
|
14634
15339
|
|
|
14635
|
-
const COMPONENT_NAME$
|
|
15340
|
+
const COMPONENT_NAME$1l = 'vc-time-panel';
|
|
14636
15341
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
14637
|
-
name: COMPONENT_NAME$
|
|
15342
|
+
name: COMPONENT_NAME$1l,
|
|
14638
15343
|
props: props$V,
|
|
14639
15344
|
emits: ['pick', 'clear', 'ok'],
|
|
14640
15345
|
setup(props, {
|
|
@@ -14690,7 +15395,7 @@
|
|
|
14690
15395
|
|
|
14691
15396
|
/** @jsxImportSource vue */
|
|
14692
15397
|
|
|
14693
|
-
const COMPONENT_NAME$
|
|
15398
|
+
const COMPONENT_NAME$1k = 'vc-date-picker';
|
|
14694
15399
|
const getPanel$1 = type => {
|
|
14695
15400
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
14696
15401
|
return DateRangePanel;
|
|
@@ -14701,7 +15406,7 @@
|
|
|
14701
15406
|
}
|
|
14702
15407
|
return DatePanel;
|
|
14703
15408
|
};
|
|
14704
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
15409
|
+
const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
|
|
14705
15410
|
const props = vue.getCurrentInstance().props;
|
|
14706
15411
|
const icon = vue.ref('date');
|
|
14707
15412
|
const panel = vue.shallowRef({});
|
|
@@ -14742,9 +15447,9 @@
|
|
|
14742
15447
|
|
|
14743
15448
|
/** @jsxImportSource vue */
|
|
14744
15449
|
|
|
14745
|
-
const COMPONENT_NAME$
|
|
15450
|
+
const COMPONENT_NAME$1j = 'vc-divider';
|
|
14746
15451
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
14747
|
-
name: COMPONENT_NAME$
|
|
15452
|
+
name: COMPONENT_NAME$1j,
|
|
14748
15453
|
props: props$U,
|
|
14749
15454
|
setup(props, {
|
|
14750
15455
|
slots
|
|
@@ -14880,7 +15585,7 @@
|
|
|
14880
15585
|
|
|
14881
15586
|
/** @jsxImportSource vue */
|
|
14882
15587
|
|
|
14883
|
-
const COMPONENT_NAME$
|
|
15588
|
+
const COMPONENT_NAME$1i = 'vc-scroller-track';
|
|
14884
15589
|
const BAR_MAP = {
|
|
14885
15590
|
vertical: {
|
|
14886
15591
|
scroll: 'scrollTop',
|
|
@@ -14900,7 +15605,7 @@
|
|
|
14900
15605
|
}
|
|
14901
15606
|
};
|
|
14902
15607
|
const Track$1 = /* @__PURE__ */ vue.defineComponent({
|
|
14903
|
-
name: COMPONENT_NAME$
|
|
15608
|
+
name: COMPONENT_NAME$1i,
|
|
14904
15609
|
props: props$T,
|
|
14905
15610
|
emits: ['change'],
|
|
14906
15611
|
inheritAttrs: false,
|
|
@@ -15090,9 +15795,9 @@
|
|
|
15090
15795
|
|
|
15091
15796
|
/** @jsxImportSource vue */
|
|
15092
15797
|
|
|
15093
|
-
const COMPONENT_NAME$
|
|
15798
|
+
const COMPONENT_NAME$1h = 'vc-scroller-bar';
|
|
15094
15799
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
15095
|
-
name: COMPONENT_NAME$
|
|
15800
|
+
name: COMPONENT_NAME$1h,
|
|
15096
15801
|
props: props$S,
|
|
15097
15802
|
emits: ['change'],
|
|
15098
15803
|
setup(props, {
|
|
@@ -15327,7 +16032,7 @@
|
|
|
15327
16032
|
|
|
15328
16033
|
/** @jsxImportSource vue */
|
|
15329
16034
|
|
|
15330
|
-
const COMPONENT_NAME$
|
|
16035
|
+
const COMPONENT_NAME$1g = 'vc-scroller';
|
|
15331
16036
|
|
|
15332
16037
|
/**
|
|
15333
16038
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -15338,7 +16043,7 @@
|
|
|
15338
16043
|
* 2. 增加了一层嵌套
|
|
15339
16044
|
*/
|
|
15340
16045
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
15341
|
-
name: COMPONENT_NAME$
|
|
16046
|
+
name: COMPONENT_NAME$1g,
|
|
15342
16047
|
props: props$R,
|
|
15343
16048
|
emits: ['scroll'],
|
|
15344
16049
|
setup(props, {
|
|
@@ -16285,7 +16990,7 @@
|
|
|
16285
16990
|
|
|
16286
16991
|
/** @jsxImportSource vue */
|
|
16287
16992
|
|
|
16288
|
-
const COMPONENT_NAME$
|
|
16993
|
+
const COMPONENT_NAME$1f = 'vc-scroller-wheel';
|
|
16289
16994
|
|
|
16290
16995
|
/**
|
|
16291
16996
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -16307,7 +17012,7 @@
|
|
|
16307
17012
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
16308
17013
|
*/
|
|
16309
17014
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
16310
|
-
name: COMPONENT_NAME$
|
|
17015
|
+
name: COMPONENT_NAME$1f,
|
|
16311
17016
|
props: Object.assign({}, props$R, {
|
|
16312
17017
|
stopPropagation: {
|
|
16313
17018
|
type: Boolean,
|
|
@@ -16496,9 +17201,9 @@
|
|
|
16496
17201
|
|
|
16497
17202
|
/** @jsxImportSource vue */
|
|
16498
17203
|
|
|
16499
|
-
const COMPONENT_NAME$
|
|
17204
|
+
const COMPONENT_NAME$1e = 'vc-drawer';
|
|
16500
17205
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
16501
|
-
name: COMPONENT_NAME$
|
|
17206
|
+
name: COMPONENT_NAME$1e,
|
|
16502
17207
|
props: props$Q,
|
|
16503
17208
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
16504
17209
|
setup(props, {
|
|
@@ -16687,9 +17392,9 @@
|
|
|
16687
17392
|
|
|
16688
17393
|
/** @jsxImportSource vue */
|
|
16689
17394
|
|
|
16690
|
-
const COMPONENT_NAME$
|
|
17395
|
+
const COMPONENT_NAME$1d = 'vc-dropdown';
|
|
16691
17396
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
16692
|
-
name: COMPONENT_NAME$
|
|
17397
|
+
name: COMPONENT_NAME$1d,
|
|
16693
17398
|
props: props$P,
|
|
16694
17399
|
inheritAttrs: false,
|
|
16695
17400
|
emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
|
|
@@ -16759,9 +17464,9 @@
|
|
|
16759
17464
|
|
|
16760
17465
|
/** @jsxImportSource vue */
|
|
16761
17466
|
|
|
16762
|
-
const COMPONENT_NAME$
|
|
17467
|
+
const COMPONENT_NAME$1c = 'vc-dropdown-menu';
|
|
16763
17468
|
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
16764
|
-
name: COMPONENT_NAME$
|
|
17469
|
+
name: COMPONENT_NAME$1c,
|
|
16765
17470
|
setup(_, {
|
|
16766
17471
|
slots
|
|
16767
17472
|
}) {
|
|
@@ -16775,9 +17480,9 @@
|
|
|
16775
17480
|
|
|
16776
17481
|
/** @jsxImportSource vue */
|
|
16777
17482
|
|
|
16778
|
-
const COMPONENT_NAME$
|
|
17483
|
+
const COMPONENT_NAME$1b = 'vc-dropdown-item';
|
|
16779
17484
|
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
16780
|
-
name: COMPONENT_NAME$
|
|
17485
|
+
name: COMPONENT_NAME$1b,
|
|
16781
17486
|
emits: ['click'],
|
|
16782
17487
|
props: {
|
|
16783
17488
|
value: {
|
|
@@ -17021,9 +17726,9 @@
|
|
|
17021
17726
|
|
|
17022
17727
|
/** @jsxImportSource vue */
|
|
17023
17728
|
|
|
17024
|
-
const COMPONENT_NAME$
|
|
17729
|
+
const COMPONENT_NAME$1a = 'vc-editor-toolbar';
|
|
17025
17730
|
const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
17026
|
-
name: COMPONENT_NAME$
|
|
17731
|
+
name: COMPONENT_NAME$1a,
|
|
17027
17732
|
props: {
|
|
17028
17733
|
options: [Array, Object],
|
|
17029
17734
|
elementId: String
|
|
@@ -17231,9 +17936,9 @@
|
|
|
17231
17936
|
|
|
17232
17937
|
/** @jsxImportSource vue */
|
|
17233
17938
|
|
|
17234
|
-
const COMPONENT_NAME$
|
|
17939
|
+
const COMPONENT_NAME$19 = 'vc-image-preview';
|
|
17235
17940
|
const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
|
|
17236
|
-
name: COMPONENT_NAME$
|
|
17941
|
+
name: COMPONENT_NAME$19,
|
|
17237
17942
|
props: props$O,
|
|
17238
17943
|
setup(props, {
|
|
17239
17944
|
slots
|
|
@@ -19386,9 +20091,9 @@
|
|
|
19386
20091
|
}
|
|
19387
20092
|
};
|
|
19388
20093
|
|
|
19389
|
-
const COMPONENT_NAME$
|
|
20094
|
+
const COMPONENT_NAME$18 = "vc-upload";
|
|
19390
20095
|
const Upload$1 = vue.defineComponent({
|
|
19391
|
-
name: COMPONENT_NAME$
|
|
20096
|
+
name: COMPONENT_NAME$18,
|
|
19392
20097
|
props: props$N,
|
|
19393
20098
|
emits: [
|
|
19394
20099
|
"message",
|
|
@@ -19922,9 +20627,9 @@
|
|
|
19922
20627
|
|
|
19923
20628
|
/** @jsxImportSource vue */
|
|
19924
20629
|
|
|
19925
|
-
const COMPONENT_NAME$
|
|
20630
|
+
const COMPONENT_NAME$17 = 'vc-editor';
|
|
19926
20631
|
const Editor$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19927
|
-
name: COMPONENT_NAME$
|
|
20632
|
+
name: COMPONENT_NAME$17,
|
|
19928
20633
|
props: props$M,
|
|
19929
20634
|
defaults: defaults$1,
|
|
19930
20635
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
@@ -20113,7 +20818,7 @@
|
|
|
20113
20818
|
|
|
20114
20819
|
/** @jsxImportSource vue */
|
|
20115
20820
|
|
|
20116
|
-
const COMPONENT_NAME$
|
|
20821
|
+
const COMPONENT_NAME$16 = 'vc-editor-view';
|
|
20117
20822
|
const setImages = v => {
|
|
20118
20823
|
if (!v) return;
|
|
20119
20824
|
const IMG_REGX = /<img.*?(?:>|\/>)/gi;
|
|
@@ -20131,7 +20836,7 @@
|
|
|
20131
20836
|
return;
|
|
20132
20837
|
};
|
|
20133
20838
|
const EditorView = /* @__PURE__ */ vue.defineComponent({
|
|
20134
|
-
name: COMPONENT_NAME$
|
|
20839
|
+
name: COMPONENT_NAME$16,
|
|
20135
20840
|
props: {
|
|
20136
20841
|
value: {
|
|
20137
20842
|
type: String,
|
|
@@ -20346,9 +21051,9 @@
|
|
|
20346
21051
|
});
|
|
20347
21052
|
};
|
|
20348
21053
|
|
|
20349
|
-
const COMPONENT_NAME$
|
|
21054
|
+
const COMPONENT_NAME$15 = "vc-form";
|
|
20350
21055
|
const Form = vue.defineComponent({
|
|
20351
|
-
name: COMPONENT_NAME$
|
|
21056
|
+
name: COMPONENT_NAME$15,
|
|
20352
21057
|
props: props$L,
|
|
20353
21058
|
setup(props, { slots, expose }) {
|
|
20354
21059
|
useForm(expose);
|
|
@@ -20828,9 +21533,9 @@
|
|
|
20828
21533
|
|
|
20829
21534
|
/** @jsxImportSource vue */
|
|
20830
21535
|
|
|
20831
|
-
const COMPONENT_NAME$
|
|
21536
|
+
const COMPONENT_NAME$14 = 'vc-form-item';
|
|
20832
21537
|
const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20833
|
-
name: COMPONENT_NAME$
|
|
21538
|
+
name: COMPONENT_NAME$14,
|
|
20834
21539
|
props: props$K,
|
|
20835
21540
|
setup(props, {
|
|
20836
21541
|
slots,
|
|
@@ -20898,9 +21603,9 @@
|
|
|
20898
21603
|
}
|
|
20899
21604
|
};
|
|
20900
21605
|
|
|
20901
|
-
const COMPONENT_NAME$
|
|
21606
|
+
const COMPONENT_NAME$13 = "vcm-form";
|
|
20902
21607
|
const MForm = vue.defineComponent({
|
|
20903
|
-
name: COMPONENT_NAME$
|
|
21608
|
+
name: COMPONENT_NAME$13,
|
|
20904
21609
|
props: props$J,
|
|
20905
21610
|
setup(props, { slots, expose }) {
|
|
20906
21611
|
useForm(expose, {
|
|
@@ -20931,9 +21636,9 @@
|
|
|
20931
21636
|
|
|
20932
21637
|
/** @jsxImportSource vue */
|
|
20933
21638
|
|
|
20934
|
-
const COMPONENT_NAME$
|
|
21639
|
+
const COMPONENT_NAME$12 = 'vcm-form-item';
|
|
20935
21640
|
const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20936
|
-
name: COMPONENT_NAME$
|
|
21641
|
+
name: COMPONENT_NAME$12,
|
|
20937
21642
|
props: props$I,
|
|
20938
21643
|
setup(props, {
|
|
20939
21644
|
slots,
|
|
@@ -20988,9 +21693,9 @@
|
|
|
20988
21693
|
}
|
|
20989
21694
|
});
|
|
20990
21695
|
|
|
20991
|
-
const COMPONENT_NAME
|
|
21696
|
+
const COMPONENT_NAME$11 = "vc-fragment";
|
|
20992
21697
|
const Fragment = vue.defineComponent({
|
|
20993
|
-
name: COMPONENT_NAME
|
|
21698
|
+
name: COMPONENT_NAME$11,
|
|
20994
21699
|
setup(_, { slots }) {
|
|
20995
21700
|
return () => vue.h(vue.Fragment, slots.default?.());
|
|
20996
21701
|
}
|
|
@@ -21029,9 +21734,9 @@
|
|
|
21029
21734
|
|
|
21030
21735
|
/** @jsxImportSource vue */
|
|
21031
21736
|
|
|
21032
|
-
const COMPONENT_NAME$
|
|
21737
|
+
const COMPONENT_NAME$10 = 'vc-snapshot';
|
|
21033
21738
|
const Snapshot = /* @__PURE__ */ vue.defineComponent({
|
|
21034
|
-
name: COMPONENT_NAME$
|
|
21739
|
+
name: COMPONENT_NAME$10,
|
|
21035
21740
|
props: props$H,
|
|
21036
21741
|
emits: ['ready'],
|
|
21037
21742
|
setup(props, {
|
|
@@ -21564,7 +22269,7 @@
|
|
|
21564
22269
|
|
|
21565
22270
|
/** @jsxImportSource vue */
|
|
21566
22271
|
|
|
21567
|
-
const COMPONENT_NAME
|
|
22272
|
+
const COMPONENT_NAME$$ = 'vc-image';
|
|
21568
22273
|
let isSupportObjectFit = false;
|
|
21569
22274
|
window.addEventListener('DOMContentLoaded', () => {
|
|
21570
22275
|
isSupportObjectFit = !IS_SERVER$1 && document.documentElement.style.objectFit !== undefined;
|
|
@@ -21577,7 +22282,7 @@
|
|
|
21577
22282
|
SCALE_DOWN: 'scale-down'
|
|
21578
22283
|
};
|
|
21579
22284
|
const Image$2 = /* @__PURE__ */ vue.defineComponent({
|
|
21580
|
-
name: COMPONENT_NAME
|
|
22285
|
+
name: COMPONENT_NAME$$,
|
|
21581
22286
|
inheritAttrs: false,
|
|
21582
22287
|
props: props$G,
|
|
21583
22288
|
setup(props, {
|
|
@@ -21794,9 +22499,9 @@
|
|
|
21794
22499
|
|
|
21795
22500
|
/** @jsxImportSource vue */
|
|
21796
22501
|
|
|
21797
|
-
const COMPONENT_NAME$
|
|
22502
|
+
const COMPONENT_NAME$_ = 'vc-image-crop';
|
|
21798
22503
|
const ImageCrop = /* @__PURE__ */ vue.defineComponent({
|
|
21799
|
-
name: COMPONENT_NAME$
|
|
22504
|
+
name: COMPONENT_NAME$_,
|
|
21800
22505
|
props: props$F,
|
|
21801
22506
|
setup(props, {
|
|
21802
22507
|
slots
|
|
@@ -21822,9 +22527,9 @@
|
|
|
21822
22527
|
|
|
21823
22528
|
/** @jsxImportSource vue */
|
|
21824
22529
|
|
|
21825
|
-
const COMPONENT_NAME$
|
|
22530
|
+
const COMPONENT_NAME$Z = 'vc-image-processing';
|
|
21826
22531
|
const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
|
|
21827
|
-
name: COMPONENT_NAME$
|
|
22532
|
+
name: COMPONENT_NAME$Z,
|
|
21828
22533
|
props: props$E,
|
|
21829
22534
|
setup(props, {
|
|
21830
22535
|
slots
|
|
@@ -21841,9 +22546,9 @@
|
|
|
21841
22546
|
|
|
21842
22547
|
/** @jsxImportSource vue */
|
|
21843
22548
|
|
|
21844
|
-
const COMPONENT_NAME$
|
|
22549
|
+
const COMPONENT_NAME$Y = 'vcm-input';
|
|
21845
22550
|
const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
21846
|
-
name: COMPONENT_NAME$
|
|
22551
|
+
name: COMPONENT_NAME$Y,
|
|
21847
22552
|
inheritAttrs: false,
|
|
21848
22553
|
props: {
|
|
21849
22554
|
...props$1h,
|
|
@@ -21932,9 +22637,9 @@
|
|
|
21932
22637
|
|
|
21933
22638
|
/** @jsxImportSource vue */
|
|
21934
22639
|
|
|
21935
|
-
const COMPONENT_NAME$
|
|
22640
|
+
const COMPONENT_NAME$X = 'vcm-input-number';
|
|
21936
22641
|
const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
21937
|
-
name: COMPONENT_NAME$
|
|
22642
|
+
name: COMPONENT_NAME$X,
|
|
21938
22643
|
props: props$1g,
|
|
21939
22644
|
inheritAttrs: false,
|
|
21940
22645
|
setup(props, {
|
|
@@ -21983,9 +22688,9 @@
|
|
|
21983
22688
|
|
|
21984
22689
|
/** @jsxImportSource vue */
|
|
21985
22690
|
|
|
21986
|
-
const COMPONENT_NAME$
|
|
22691
|
+
const COMPONENT_NAME$W = 'vcm-input-search';
|
|
21987
22692
|
const MInputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
21988
|
-
name: COMPONENT_NAME$
|
|
22693
|
+
name: COMPONENT_NAME$W,
|
|
21989
22694
|
props: {
|
|
21990
22695
|
...props$1f,
|
|
21991
22696
|
cancelText: {
|
|
@@ -22062,9 +22767,9 @@
|
|
|
22062
22767
|
}
|
|
22063
22768
|
};
|
|
22064
22769
|
|
|
22065
|
-
const COMPONENT_NAME$
|
|
22770
|
+
const COMPONENT_NAME$V = "vcm-list";
|
|
22066
22771
|
const MList = vue.defineComponent({
|
|
22067
|
-
name: COMPONENT_NAME$
|
|
22772
|
+
name: COMPONENT_NAME$V,
|
|
22068
22773
|
props: props$D,
|
|
22069
22774
|
setup(props, { slots }) {
|
|
22070
22775
|
vue.provide("vc-list", { props });
|
|
@@ -22119,10 +22824,10 @@
|
|
|
22119
22824
|
|
|
22120
22825
|
/** @jsxImportSource vue */
|
|
22121
22826
|
|
|
22122
|
-
const COMPONENT_NAME$
|
|
22827
|
+
const COMPONENT_NAME$U = 'vcm-list-item';
|
|
22123
22828
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
22124
22829
|
const MListItem = /* @__PURE__ */ vue.defineComponent({
|
|
22125
|
-
name: COMPONENT_NAME$
|
|
22830
|
+
name: COMPONENT_NAME$U,
|
|
22126
22831
|
props: props$C,
|
|
22127
22832
|
emits: ['click'],
|
|
22128
22833
|
setup(props, {
|
|
@@ -22216,11 +22921,11 @@
|
|
|
22216
22921
|
|
|
22217
22922
|
/** @jsxImportSource vue */
|
|
22218
22923
|
|
|
22219
|
-
const COMPONENT_NAME$
|
|
22924
|
+
const COMPONENT_NAME$T = 'vc-marquee';
|
|
22220
22925
|
const ANIMATION = prefixStyle('animation').camel;
|
|
22221
22926
|
const TRANSFORM_KEBAB = prefixStyle('transform').kebab;
|
|
22222
22927
|
const Marquee = /* @__PURE__ */ vue.defineComponent({
|
|
22223
|
-
name: COMPONENT_NAME$
|
|
22928
|
+
name: COMPONENT_NAME$T,
|
|
22224
22929
|
props: props$B,
|
|
22225
22930
|
setup(props, {
|
|
22226
22931
|
slots
|
|
@@ -22288,9 +22993,9 @@
|
|
|
22288
22993
|
}
|
|
22289
22994
|
};
|
|
22290
22995
|
|
|
22291
|
-
const COMPONENT_NAME$
|
|
22996
|
+
const COMPONENT_NAME$S = "vc-resizer";
|
|
22292
22997
|
const Resizer = vue.defineComponent({
|
|
22293
|
-
name: COMPONENT_NAME$
|
|
22998
|
+
name: COMPONENT_NAME$S,
|
|
22294
22999
|
props: props$A,
|
|
22295
23000
|
emits: ["resize"],
|
|
22296
23001
|
setup(props, { emit, slots, expose }) {
|
|
@@ -22460,10 +23165,10 @@
|
|
|
22460
23165
|
|
|
22461
23166
|
/** @jsxImportSource vue */
|
|
22462
23167
|
|
|
22463
|
-
const COMPONENT_NAME$
|
|
23168
|
+
const COMPONENT_NAME$R = 'vc-modal';
|
|
22464
23169
|
let zIndexNumber = 1002;
|
|
22465
23170
|
const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
22466
|
-
name: COMPONENT_NAME$
|
|
23171
|
+
name: COMPONENT_NAME$R,
|
|
22467
23172
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
|
|
22468
23173
|
props: props$z,
|
|
22469
23174
|
setup(props, {
|
|
@@ -22902,9 +23607,9 @@
|
|
|
22902
23607
|
|
|
22903
23608
|
/** @jsxImportSource vue */
|
|
22904
23609
|
|
|
22905
|
-
const COMPONENT_NAME$
|
|
23610
|
+
const COMPONENT_NAME$Q = 'vc-modal';
|
|
22906
23611
|
const MModalView = /* @__PURE__ */ vue.defineComponent({
|
|
22907
|
-
name: COMPONENT_NAME$
|
|
23612
|
+
name: COMPONENT_NAME$Q,
|
|
22908
23613
|
emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
|
|
22909
23614
|
props: props$y,
|
|
22910
23615
|
setup(props, {
|
|
@@ -23116,9 +23821,9 @@
|
|
|
23116
23821
|
|
|
23117
23822
|
/** @jsxImportSource vue */
|
|
23118
23823
|
|
|
23119
|
-
const COMPONENT_NAME$
|
|
23824
|
+
const COMPONENT_NAME$P = 'vc-notice';
|
|
23120
23825
|
const NoticeView = /* @__PURE__ */ vue.defineComponent({
|
|
23121
|
-
name: COMPONENT_NAME$
|
|
23826
|
+
name: COMPONENT_NAME$P,
|
|
23122
23827
|
props: props$x,
|
|
23123
23828
|
emits: ['portal-fulfilled', 'close', 'before-close'],
|
|
23124
23829
|
setup(props, {
|
|
@@ -23291,9 +23996,9 @@
|
|
|
23291
23996
|
|
|
23292
23997
|
/** @jsxImportSource vue */
|
|
23293
23998
|
|
|
23294
|
-
const COMPONENT_NAME$
|
|
23999
|
+
const COMPONENT_NAME$O = 'vc-option';
|
|
23295
24000
|
const Option$1 = /* @__PURE__ */ vue.defineComponent({
|
|
23296
|
-
name: COMPONENT_NAME$
|
|
24001
|
+
name: COMPONENT_NAME$O,
|
|
23297
24002
|
props: props$w,
|
|
23298
24003
|
setup(props, {
|
|
23299
24004
|
slots
|
|
@@ -23377,9 +24082,9 @@
|
|
|
23377
24082
|
|
|
23378
24083
|
/** @jsxImportSource vue */
|
|
23379
24084
|
|
|
23380
|
-
const COMPONENT_NAME$
|
|
24085
|
+
const COMPONENT_NAME$N = 'vc-tag';
|
|
23381
24086
|
const Tag = /* @__PURE__ */ vue.defineComponent({
|
|
23382
|
-
name: COMPONENT_NAME$
|
|
24087
|
+
name: COMPONENT_NAME$N,
|
|
23383
24088
|
props: props$u,
|
|
23384
24089
|
emits: ['close', 'change'],
|
|
23385
24090
|
setup(props, {
|
|
@@ -23450,9 +24155,9 @@
|
|
|
23450
24155
|
|
|
23451
24156
|
/** @jsxImportSource vue */
|
|
23452
24157
|
|
|
23453
|
-
const COMPONENT_NAME$
|
|
24158
|
+
const COMPONENT_NAME$M = 'vc-select-option';
|
|
23454
24159
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
23455
|
-
name: COMPONENT_NAME$
|
|
24160
|
+
name: COMPONENT_NAME$M,
|
|
23456
24161
|
props: props$t,
|
|
23457
24162
|
setup(props, {
|
|
23458
24163
|
slots,
|
|
@@ -23547,9 +24252,9 @@
|
|
|
23547
24252
|
|
|
23548
24253
|
/** @jsxImportSource vue */
|
|
23549
24254
|
|
|
23550
|
-
const COMPONENT_NAME$
|
|
24255
|
+
const COMPONENT_NAME$L = 'vc-select-option-group';
|
|
23551
24256
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
23552
|
-
name: COMPONENT_NAME$
|
|
24257
|
+
name: COMPONENT_NAME$L,
|
|
23553
24258
|
props: props$s,
|
|
23554
24259
|
setup(props, {
|
|
23555
24260
|
slots
|
|
@@ -23579,9 +24284,9 @@
|
|
|
23579
24284
|
|
|
23580
24285
|
/** @jsxImportSource vue */
|
|
23581
24286
|
|
|
23582
|
-
const COMPONENT_NAME$
|
|
24287
|
+
const COMPONENT_NAME$K = 'vc-select-all';
|
|
23583
24288
|
const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
23584
|
-
name: COMPONENT_NAME$
|
|
24289
|
+
name: COMPONENT_NAME$K,
|
|
23585
24290
|
props: {
|
|
23586
24291
|
data: {
|
|
23587
24292
|
type: Array,
|
|
@@ -23651,9 +24356,9 @@
|
|
|
23651
24356
|
|
|
23652
24357
|
/** @jsxImportSource vue */
|
|
23653
24358
|
|
|
23654
|
-
const COMPONENT_NAME$
|
|
24359
|
+
const COMPONENT_NAME$J = 'vc-select';
|
|
23655
24360
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
23656
|
-
name: COMPONENT_NAME$
|
|
24361
|
+
name: COMPONENT_NAME$J,
|
|
23657
24362
|
props: props$1a,
|
|
23658
24363
|
emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
|
|
23659
24364
|
setup(props, {
|
|
@@ -23947,9 +24652,9 @@
|
|
|
23947
24652
|
|
|
23948
24653
|
/** @jsxImportSource vue */
|
|
23949
24654
|
|
|
23950
|
-
const COMPONENT_NAME$
|
|
24655
|
+
const COMPONENT_NAME$I = 'vc-pagination';
|
|
23951
24656
|
const Pagination = /* @__PURE__ */ vue.defineComponent({
|
|
23952
|
-
name: COMPONENT_NAME$
|
|
24657
|
+
name: COMPONENT_NAME$I,
|
|
23953
24658
|
props: props$v,
|
|
23954
24659
|
emits: ['update:current', 'change', 'page-size-change'],
|
|
23955
24660
|
setup(props, {
|
|
@@ -24147,9 +24852,9 @@
|
|
|
24147
24852
|
|
|
24148
24853
|
/** @jsxImportSource vue */
|
|
24149
24854
|
|
|
24150
|
-
const COMPONENT_NAME$
|
|
24855
|
+
const COMPONENT_NAME$H = 'vc-picker';
|
|
24151
24856
|
const Picker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
24152
|
-
name: COMPONENT_NAME$
|
|
24857
|
+
name: COMPONENT_NAME$H,
|
|
24153
24858
|
props: props$r,
|
|
24154
24859
|
setup(props, {
|
|
24155
24860
|
slots
|
|
@@ -24212,9 +24917,9 @@
|
|
|
24212
24917
|
|
|
24213
24918
|
/** @jsxImportSource vue */
|
|
24214
24919
|
|
|
24215
|
-
const COMPONENT_NAME$
|
|
24920
|
+
const COMPONENT_NAME$G = 'vc-popconfirm';
|
|
24216
24921
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
24217
|
-
name: COMPONENT_NAME$
|
|
24922
|
+
name: COMPONENT_NAME$G,
|
|
24218
24923
|
props: props$q,
|
|
24219
24924
|
inheritAttrs: false,
|
|
24220
24925
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
|
|
@@ -24382,9 +25087,9 @@
|
|
|
24382
25087
|
|
|
24383
25088
|
/** @jsxImportSource vue */
|
|
24384
25089
|
|
|
24385
|
-
const COMPONENT_NAME$
|
|
25090
|
+
const COMPONENT_NAME$F = 'vc-popup';
|
|
24386
25091
|
const MPopup = /* @__PURE__ */ vue.defineComponent({
|
|
24387
|
-
name: COMPONENT_NAME$
|
|
25092
|
+
name: COMPONENT_NAME$F,
|
|
24388
25093
|
props: props$p,
|
|
24389
25094
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change'],
|
|
24390
25095
|
setup(props, {
|
|
@@ -24511,9 +25216,9 @@
|
|
|
24511
25216
|
|
|
24512
25217
|
/** @jsxImportSource vue */
|
|
24513
25218
|
|
|
24514
|
-
const COMPONENT_NAME$
|
|
25219
|
+
const COMPONENT_NAME$E = 'vc-print';
|
|
24515
25220
|
const Print = /* @__PURE__ */ vue.defineComponent({
|
|
24516
|
-
name: COMPONENT_NAME$
|
|
25221
|
+
name: COMPONENT_NAME$E,
|
|
24517
25222
|
props: props$o,
|
|
24518
25223
|
setup(props, {
|
|
24519
25224
|
expose,
|
|
@@ -24593,7 +25298,7 @@
|
|
|
24593
25298
|
},
|
|
24594
25299
|
strokeColor: {
|
|
24595
25300
|
type: String,
|
|
24596
|
-
default: "#
|
|
25301
|
+
default: "#456CF6"
|
|
24597
25302
|
},
|
|
24598
25303
|
trackColor: {
|
|
24599
25304
|
type: String,
|
|
@@ -24615,9 +25320,9 @@
|
|
|
24615
25320
|
|
|
24616
25321
|
/** @jsxImportSource vue */
|
|
24617
25322
|
|
|
24618
|
-
const COMPONENT_NAME$
|
|
25323
|
+
const COMPONENT_NAME$D = 'vc-progress-circle';
|
|
24619
25324
|
const Circle$1 = /* @__PURE__ */ vue.defineComponent({
|
|
24620
|
-
name: COMPONENT_NAME$
|
|
25325
|
+
name: COMPONENT_NAME$D,
|
|
24621
25326
|
props: props$n,
|
|
24622
25327
|
setup(props, {
|
|
24623
25328
|
slots
|
|
@@ -24677,9 +25382,9 @@
|
|
|
24677
25382
|
|
|
24678
25383
|
/** @jsxImportSource vue */
|
|
24679
25384
|
|
|
24680
|
-
const COMPONENT_NAME$
|
|
25385
|
+
const COMPONENT_NAME$C = 'vc-progress-line';
|
|
24681
25386
|
const Line$2 = /* @__PURE__ */ vue.defineComponent({
|
|
24682
|
-
name: COMPONENT_NAME$
|
|
25387
|
+
name: COMPONENT_NAME$C,
|
|
24683
25388
|
props: props$n,
|
|
24684
25389
|
setup(props) {
|
|
24685
25390
|
const colorStyle = vue.computed(() => {
|
|
@@ -24726,9 +25431,9 @@
|
|
|
24726
25431
|
function _isSlot(s) {
|
|
24727
25432
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
24728
25433
|
}
|
|
24729
|
-
const COMPONENT_NAME$
|
|
25434
|
+
const COMPONENT_NAME$B = 'vc-progress';
|
|
24730
25435
|
const Progress = /* @__PURE__ */ vue.defineComponent({
|
|
24731
|
-
name: COMPONENT_NAME$
|
|
25436
|
+
name: COMPONENT_NAME$B,
|
|
24732
25437
|
props: props$n,
|
|
24733
25438
|
setup(props, {
|
|
24734
25439
|
slots
|
|
@@ -24890,9 +25595,9 @@
|
|
|
24890
25595
|
|
|
24891
25596
|
/** @jsxImportSource vue */
|
|
24892
25597
|
|
|
24893
|
-
const COMPONENT_NAME$
|
|
25598
|
+
const COMPONENT_NAME$A = 'vc-radio';
|
|
24894
25599
|
const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
24895
|
-
name: COMPONENT_NAME$
|
|
25600
|
+
name: COMPONENT_NAME$A,
|
|
24896
25601
|
props: props$m,
|
|
24897
25602
|
emits: ['update:modelValue', 'change'],
|
|
24898
25603
|
setup(props, {
|
|
@@ -24936,9 +25641,9 @@
|
|
|
24936
25641
|
|
|
24937
25642
|
/** @jsxImportSource vue */
|
|
24938
25643
|
|
|
24939
|
-
const COMPONENT_NAME$
|
|
25644
|
+
const COMPONENT_NAME$z = 'vc-radio-button';
|
|
24940
25645
|
const RadioButton = /* @__PURE__ */ vue.defineComponent({
|
|
24941
|
-
name: COMPONENT_NAME$
|
|
25646
|
+
name: COMPONENT_NAME$z,
|
|
24942
25647
|
props: {
|
|
24943
25648
|
...props$m,
|
|
24944
25649
|
labelStyle: [String, Object],
|
|
@@ -25051,9 +25756,9 @@
|
|
|
25051
25756
|
|
|
25052
25757
|
/** @jsxImportSource vue */
|
|
25053
25758
|
|
|
25054
|
-
const COMPONENT_NAME$
|
|
25759
|
+
const COMPONENT_NAME$y = 'vc-radio-group';
|
|
25055
25760
|
const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
25056
|
-
name: COMPONENT_NAME$
|
|
25761
|
+
name: COMPONENT_NAME$y,
|
|
25057
25762
|
props: props$l,
|
|
25058
25763
|
emits: ['update:modelValue', 'change'],
|
|
25059
25764
|
setup(props, {
|
|
@@ -25074,9 +25779,9 @@
|
|
|
25074
25779
|
|
|
25075
25780
|
/** @jsxImportSource vue */
|
|
25076
25781
|
|
|
25077
|
-
const COMPONENT_NAME$
|
|
25782
|
+
const COMPONENT_NAME$x = 'vcm-radio';
|
|
25078
25783
|
const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
25079
|
-
name: COMPONENT_NAME$
|
|
25784
|
+
name: COMPONENT_NAME$x,
|
|
25080
25785
|
props: props$m,
|
|
25081
25786
|
emits: ['update:modelValue', 'change'],
|
|
25082
25787
|
setup(props, {
|
|
@@ -25120,9 +25825,9 @@
|
|
|
25120
25825
|
|
|
25121
25826
|
/** @jsxImportSource vue */
|
|
25122
25827
|
|
|
25123
|
-
const COMPONENT_NAME$
|
|
25828
|
+
const COMPONENT_NAME$w = 'vcm-radio-group';
|
|
25124
25829
|
const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
25125
|
-
name: COMPONENT_NAME$
|
|
25830
|
+
name: COMPONENT_NAME$w,
|
|
25126
25831
|
props: props$l,
|
|
25127
25832
|
emits: ['update:modelValue', 'change'],
|
|
25128
25833
|
setup(props, {
|
|
@@ -25189,9 +25894,9 @@
|
|
|
25189
25894
|
|
|
25190
25895
|
/** @jsxImportSource vue */
|
|
25191
25896
|
|
|
25192
|
-
const COMPONENT_NAME$
|
|
25897
|
+
const COMPONENT_NAME$v = 'vc-rate';
|
|
25193
25898
|
const Rate = /* @__PURE__ */ vue.defineComponent({
|
|
25194
|
-
name: COMPONENT_NAME$
|
|
25899
|
+
name: COMPONENT_NAME$v,
|
|
25195
25900
|
props: props$k,
|
|
25196
25901
|
emits: ['update:modelValue', 'change'],
|
|
25197
25902
|
setup(props, {
|
|
@@ -25507,9 +26212,9 @@
|
|
|
25507
26212
|
|
|
25508
26213
|
/** @jsxImportSource vue */
|
|
25509
26214
|
|
|
25510
|
-
const COMPONENT_NAME$
|
|
26215
|
+
const COMPONENT_NAME$u = 'vc-recycle-list-scroll-state';
|
|
25511
26216
|
const ScrollState = /* @__PURE__ */ vue.defineComponent({
|
|
25512
|
-
name: COMPONENT_NAME$
|
|
26217
|
+
name: COMPONENT_NAME$u,
|
|
25513
26218
|
setup(_, {
|
|
25514
26219
|
slots
|
|
25515
26220
|
}) {
|
|
@@ -25639,12 +26344,12 @@
|
|
|
25639
26344
|
|
|
25640
26345
|
/** @jsxImportSource vue */
|
|
25641
26346
|
|
|
25642
|
-
const COMPONENT_NAME$
|
|
26347
|
+
const COMPONENT_NAME$t = 'vc-recycle-list-container';
|
|
25643
26348
|
|
|
25644
26349
|
// TODO: 抽离
|
|
25645
26350
|
const transformKey = prefixStyle('transform').camel;
|
|
25646
26351
|
const Container$1 = /* @__PURE__ */ vue.defineComponent({
|
|
25647
|
-
name: COMPONENT_NAME$
|
|
26352
|
+
name: COMPONENT_NAME$t,
|
|
25648
26353
|
props: props$i,
|
|
25649
26354
|
emits: ['refresh'],
|
|
25650
26355
|
setup(props, {
|
|
@@ -25742,9 +26447,9 @@
|
|
|
25742
26447
|
|
|
25743
26448
|
/** @jsxImportSource vue */
|
|
25744
26449
|
|
|
25745
|
-
const COMPONENT_NAME$
|
|
26450
|
+
const COMPONENT_NAME$s = 'vc-recycle-list';
|
|
25746
26451
|
const RecycleList = /* @__PURE__ */ vue.defineComponent({
|
|
25747
|
-
name: COMPONENT_NAME$
|
|
26452
|
+
name: COMPONENT_NAME$s,
|
|
25748
26453
|
props: props$j,
|
|
25749
26454
|
emits: ['scroll', 'row-resize'],
|
|
25750
26455
|
setup(props, {
|
|
@@ -26318,9 +27023,9 @@
|
|
|
26318
27023
|
|
|
26319
27024
|
/** @jsxImportSource vue */
|
|
26320
27025
|
|
|
26321
|
-
const COMPONENT_NAME$
|
|
27026
|
+
const COMPONENT_NAME$r = 'vc-slider';
|
|
26322
27027
|
const Slider = /* @__PURE__ */ vue.defineComponent({
|
|
26323
|
-
name: COMPONENT_NAME$
|
|
27028
|
+
name: COMPONENT_NAME$r,
|
|
26324
27029
|
props: props$h,
|
|
26325
27030
|
setup(props, {
|
|
26326
27031
|
slots
|
|
@@ -26344,9 +27049,9 @@
|
|
|
26344
27049
|
|
|
26345
27050
|
/** @jsxImportSource vue */
|
|
26346
27051
|
|
|
26347
|
-
const COMPONENT_NAME$
|
|
27052
|
+
const COMPONENT_NAME$q = 'vc-sort-list';
|
|
26348
27053
|
const SortList = /* @__PURE__ */ vue.defineComponent({
|
|
26349
|
-
name: COMPONENT_NAME$
|
|
27054
|
+
name: COMPONENT_NAME$q,
|
|
26350
27055
|
props: props$g,
|
|
26351
27056
|
setup(props, {
|
|
26352
27057
|
slots
|
|
@@ -26370,9 +27075,9 @@
|
|
|
26370
27075
|
|
|
26371
27076
|
/** @jsxImportSource vue */
|
|
26372
27077
|
|
|
26373
|
-
const COMPONENT_NAME$
|
|
27078
|
+
const COMPONENT_NAME$p = 'vc-steps';
|
|
26374
27079
|
const Steps = /* @__PURE__ */ vue.defineComponent({
|
|
26375
|
-
name: COMPONENT_NAME$
|
|
27080
|
+
name: COMPONENT_NAME$p,
|
|
26376
27081
|
props: props$f,
|
|
26377
27082
|
setup(props, {
|
|
26378
27083
|
slots
|
|
@@ -26498,9 +27203,9 @@
|
|
|
26498
27203
|
|
|
26499
27204
|
/** @jsxImportSource vue */
|
|
26500
27205
|
|
|
26501
|
-
const COMPONENT_NAME$
|
|
27206
|
+
const COMPONENT_NAME$o = 'vc-switch';
|
|
26502
27207
|
const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
26503
|
-
name: COMPONENT_NAME$
|
|
27208
|
+
name: COMPONENT_NAME$o,
|
|
26504
27209
|
props: props$e,
|
|
26505
27210
|
// click -> onClick要被拦截,此处不能放置
|
|
26506
27211
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -26574,9 +27279,9 @@
|
|
|
26574
27279
|
|
|
26575
27280
|
/** @jsxImportSource vue */
|
|
26576
27281
|
|
|
26577
|
-
const COMPONENT_NAME$
|
|
27282
|
+
const COMPONENT_NAME$n = 'vcm-switch';
|
|
26578
27283
|
const MSwitch = /* @__PURE__ */ vue.defineComponent({
|
|
26579
|
-
name: COMPONENT_NAME$
|
|
27284
|
+
name: COMPONENT_NAME$n,
|
|
26580
27285
|
props: props$e,
|
|
26581
27286
|
// click -> onClick要被拦截,此处不能放置
|
|
26582
27287
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -27689,9 +28394,9 @@
|
|
|
27689
28394
|
|
|
27690
28395
|
/** @jsxImportSource vue */
|
|
27691
28396
|
|
|
27692
|
-
const COMPONENT_NAME$
|
|
28397
|
+
const COMPONENT_NAME$m = 'vc-table-normal-list';
|
|
27693
28398
|
const NormalList = /* @__PURE__ */ vue.defineComponent({
|
|
27694
|
-
name: COMPONENT_NAME$
|
|
28399
|
+
name: COMPONENT_NAME$m,
|
|
27695
28400
|
props: {
|
|
27696
28401
|
data: {
|
|
27697
28402
|
type: Array,
|
|
@@ -28692,9 +29397,9 @@
|
|
|
28692
29397
|
|
|
28693
29398
|
/** @jsxImportSource vue */
|
|
28694
29399
|
|
|
28695
|
-
const COMPONENT_NAME$
|
|
29400
|
+
const COMPONENT_NAME$l = 'vc-table';
|
|
28696
29401
|
const Table$1 = /* @__PURE__ */ vue.defineComponent({
|
|
28697
|
-
name: COMPONENT_NAME$
|
|
29402
|
+
name: COMPONENT_NAME$l,
|
|
28698
29403
|
props: props$d,
|
|
28699
29404
|
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'],
|
|
28700
29405
|
setup(props, {
|
|
@@ -29897,9 +30602,9 @@
|
|
|
29897
30602
|
|
|
29898
30603
|
/** @jsxImportSource vue */
|
|
29899
30604
|
|
|
29900
|
-
const COMPONENT_NAME$
|
|
30605
|
+
const COMPONENT_NAME$k = 'vc-tabs';
|
|
29901
30606
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
29902
|
-
name: COMPONENT_NAME$
|
|
30607
|
+
name: COMPONENT_NAME$k,
|
|
29903
30608
|
props: props$c,
|
|
29904
30609
|
emits: ['update:modelValue', 'change', 'click'],
|
|
29905
30610
|
setup(props, {
|
|
@@ -30152,9 +30857,9 @@
|
|
|
30152
30857
|
|
|
30153
30858
|
/** @jsxImportSource vue */
|
|
30154
30859
|
|
|
30155
|
-
const COMPONENT_NAME$
|
|
30860
|
+
const COMPONENT_NAME$j = 'vc-tabs-pane';
|
|
30156
30861
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
30157
|
-
name: COMPONENT_NAME$
|
|
30862
|
+
name: COMPONENT_NAME$j,
|
|
30158
30863
|
props: props$b,
|
|
30159
30864
|
setup(_, {
|
|
30160
30865
|
slots
|
|
@@ -30209,9 +30914,9 @@
|
|
|
30209
30914
|
|
|
30210
30915
|
/** @jsxImportSource vue */
|
|
30211
30916
|
|
|
30212
|
-
const COMPONENT_NAME$
|
|
30917
|
+
const COMPONENT_NAME$i = 'vcm-tabs';
|
|
30213
30918
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
30214
|
-
name: COMPONENT_NAME$
|
|
30919
|
+
name: COMPONENT_NAME$i,
|
|
30215
30920
|
props: props$a,
|
|
30216
30921
|
emits: ['update:modelValue', 'change', 'click'],
|
|
30217
30922
|
setup(props, {
|
|
@@ -30476,9 +31181,9 @@
|
|
|
30476
31181
|
|
|
30477
31182
|
/** @jsxImportSource vue */
|
|
30478
31183
|
|
|
30479
|
-
const COMPONENT_NAME$
|
|
31184
|
+
const COMPONENT_NAME$h = 'vcm-tabs-pane';
|
|
30480
31185
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
30481
|
-
name: COMPONENT_NAME$
|
|
31186
|
+
name: COMPONENT_NAME$h,
|
|
30482
31187
|
props: props$b,
|
|
30483
31188
|
setup(_, {
|
|
30484
31189
|
slots
|
|
@@ -30542,9 +31247,9 @@
|
|
|
30542
31247
|
|
|
30543
31248
|
/** @jsxImportSource vue */
|
|
30544
31249
|
|
|
30545
|
-
const COMPONENT_NAME$
|
|
31250
|
+
const COMPONENT_NAME$g = 'vc-text';
|
|
30546
31251
|
const Text$2 = /* @__PURE__ */ vue.defineComponent({
|
|
30547
|
-
name: COMPONENT_NAME$
|
|
31252
|
+
name: COMPONENT_NAME$g,
|
|
30548
31253
|
props: props$9,
|
|
30549
31254
|
setup(props, {
|
|
30550
31255
|
emit
|
|
@@ -30911,9 +31616,9 @@
|
|
|
30911
31616
|
|
|
30912
31617
|
/** @jsxImportSource vue */
|
|
30913
31618
|
|
|
30914
|
-
const COMPONENT_NAME$
|
|
31619
|
+
const COMPONENT_NAME$f = 'vc-textarea';
|
|
30915
31620
|
const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
30916
|
-
name: COMPONENT_NAME$
|
|
31621
|
+
name: COMPONENT_NAME$f,
|
|
30917
31622
|
props: Object.assign({}, props$8, {
|
|
30918
31623
|
indicator: {
|
|
30919
31624
|
type: [Boolean, Object],
|
|
@@ -30969,9 +31674,9 @@
|
|
|
30969
31674
|
|
|
30970
31675
|
/** @jsxImportSource vue */
|
|
30971
31676
|
|
|
30972
|
-
const COMPONENT_NAME$
|
|
31677
|
+
const COMPONENT_NAME$e = 'vcm-textarea';
|
|
30973
31678
|
const MTextarea = /* @__PURE__ */ vue.defineComponent({
|
|
30974
|
-
name: COMPONENT_NAME$
|
|
31679
|
+
name: COMPONENT_NAME$e,
|
|
30975
31680
|
props: Object.assign({}, props$8, {
|
|
30976
31681
|
align: {
|
|
30977
31682
|
type: String,
|
|
@@ -31054,9 +31759,9 @@
|
|
|
31054
31759
|
}
|
|
31055
31760
|
};
|
|
31056
31761
|
|
|
31057
|
-
const COMPONENT_NAME$
|
|
31762
|
+
const COMPONENT_NAME$d = "vc-theme";
|
|
31058
31763
|
const Theme$1 = vue.defineComponent({
|
|
31059
|
-
name: COMPONENT_NAME$
|
|
31764
|
+
name: COMPONENT_NAME$d,
|
|
31060
31765
|
props: props$7,
|
|
31061
31766
|
setup(props, { slots }) {
|
|
31062
31767
|
const themeId = getUid("vc-theme");
|
|
@@ -31139,9 +31844,9 @@
|
|
|
31139
31844
|
}
|
|
31140
31845
|
});
|
|
31141
31846
|
|
|
31142
|
-
const COMPONENT_NAME$
|
|
31847
|
+
const COMPONENT_NAME$c = "vc-theme-view";
|
|
31143
31848
|
const ThemeView = vue.defineComponent({
|
|
31144
|
-
name: COMPONENT_NAME$
|
|
31849
|
+
name: COMPONENT_NAME$c,
|
|
31145
31850
|
props: props$7,
|
|
31146
31851
|
setup(props, { slots }) {
|
|
31147
31852
|
return () => {
|
|
@@ -31157,9 +31862,9 @@
|
|
|
31157
31862
|
}
|
|
31158
31863
|
});
|
|
31159
31864
|
|
|
31160
|
-
const COMPONENT_NAME$
|
|
31865
|
+
const COMPONENT_NAME$b = "vc-theme-text";
|
|
31161
31866
|
const ThemeText = vue.defineComponent({
|
|
31162
|
-
name: COMPONENT_NAME$
|
|
31867
|
+
name: COMPONENT_NAME$b,
|
|
31163
31868
|
props: props$7,
|
|
31164
31869
|
setup(props, { slots }) {
|
|
31165
31870
|
return () => {
|
|
@@ -31175,9 +31880,9 @@
|
|
|
31175
31880
|
}
|
|
31176
31881
|
});
|
|
31177
31882
|
|
|
31178
|
-
const COMPONENT_NAME$
|
|
31883
|
+
const COMPONENT_NAME$a = "vc-theme-image";
|
|
31179
31884
|
const ThemeImage = vue.defineComponent({
|
|
31180
|
-
name: COMPONENT_NAME$
|
|
31885
|
+
name: COMPONENT_NAME$a,
|
|
31181
31886
|
props: props$7,
|
|
31182
31887
|
setup(props, { slots }) {
|
|
31183
31888
|
return () => {
|
|
@@ -31229,12 +31934,12 @@
|
|
|
31229
31934
|
|
|
31230
31935
|
/** @jsxImportSource vue */
|
|
31231
31936
|
|
|
31232
|
-
const COMPONENT_NAME$
|
|
31937
|
+
const COMPONENT_NAME$9 = 'vc-time-picker';
|
|
31233
31938
|
const getPanel = type => {
|
|
31234
31939
|
const isRange = type === 'timerange';
|
|
31235
31940
|
return isRange ? TimeRangePanel : TimePanel;
|
|
31236
31941
|
};
|
|
31237
|
-
const TimePicker = createPicker(COMPONENT_NAME$
|
|
31942
|
+
const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
|
|
31238
31943
|
const props = vue.getCurrentInstance().props;
|
|
31239
31944
|
const icon = vue.ref('icon');
|
|
31240
31945
|
const panel = vue.shallowRef({});
|
|
@@ -31270,9 +31975,9 @@
|
|
|
31270
31975
|
|
|
31271
31976
|
/** @jsxImportSource vue */
|
|
31272
31977
|
|
|
31273
|
-
const COMPONENT_NAME$
|
|
31978
|
+
const COMPONENT_NAME$8 = 'vc-timeline';
|
|
31274
31979
|
const Timeline = /* @__PURE__ */ vue.defineComponent({
|
|
31275
|
-
name: COMPONENT_NAME$
|
|
31980
|
+
name: COMPONENT_NAME$8,
|
|
31276
31981
|
props: props$5,
|
|
31277
31982
|
setup(props, {
|
|
31278
31983
|
slots
|
|
@@ -31299,9 +32004,9 @@
|
|
|
31299
32004
|
|
|
31300
32005
|
/** @jsxImportSource vue */
|
|
31301
32006
|
|
|
31302
|
-
const COMPONENT_NAME$
|
|
32007
|
+
const COMPONENT_NAME$7 = 'vc-touch';
|
|
31303
32008
|
const Touch = /* @__PURE__ */ vue.defineComponent({
|
|
31304
|
-
name: COMPONENT_NAME$
|
|
32009
|
+
name: COMPONENT_NAME$7,
|
|
31305
32010
|
props: props$4,
|
|
31306
32011
|
setup(props, {
|
|
31307
32012
|
slots
|
|
@@ -31809,21 +32514,68 @@
|
|
|
31809
32514
|
parentNode.insertChild({ data });
|
|
31810
32515
|
}
|
|
31811
32516
|
}
|
|
32517
|
+
/**
|
|
32518
|
+
* 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
|
|
32519
|
+
* 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
|
|
32520
|
+
* @param checkedValues ~
|
|
32521
|
+
* @returns ~
|
|
32522
|
+
*/
|
|
32523
|
+
_getCascadeCheckedAnchorIds(checkedValues) {
|
|
32524
|
+
const checkedSet = new Set(checkedValues);
|
|
32525
|
+
const nodesMap = this.nodesMap;
|
|
32526
|
+
const anchors = [];
|
|
32527
|
+
for (const id of checkedValues) {
|
|
32528
|
+
const node = nodesMap[id];
|
|
32529
|
+
if (!node) continue;
|
|
32530
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
32531
|
+
(child) => checkedSet.has(child.getter.value)
|
|
32532
|
+
);
|
|
32533
|
+
if (!hasSelectedChildInSet) {
|
|
32534
|
+
anchors.push(id);
|
|
32535
|
+
}
|
|
32536
|
+
}
|
|
32537
|
+
anchors.sort((a, b) => {
|
|
32538
|
+
const na = nodesMap[a];
|
|
32539
|
+
const nb = nodesMap[b];
|
|
32540
|
+
if (!na || !nb) return 0;
|
|
32541
|
+
return nb.states.level - na.states.level;
|
|
32542
|
+
});
|
|
32543
|
+
return anchors;
|
|
32544
|
+
}
|
|
31812
32545
|
_initDefaultCheckedNodes() {
|
|
31813
32546
|
const checkedValues = this.checkedValues || [];
|
|
31814
32547
|
const nodesMap = this.nodesMap;
|
|
31815
|
-
|
|
32548
|
+
if (this.checkStrictly) {
|
|
32549
|
+
checkedValues.forEach((id) => {
|
|
32550
|
+
const node = nodesMap[id];
|
|
32551
|
+
if (node) {
|
|
32552
|
+
node.setChecked(true, false);
|
|
32553
|
+
}
|
|
32554
|
+
});
|
|
32555
|
+
return;
|
|
32556
|
+
}
|
|
32557
|
+
const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
|
|
32558
|
+
anchorIds.forEach((id) => {
|
|
31816
32559
|
const node = nodesMap[id];
|
|
31817
32560
|
if (node) {
|
|
31818
|
-
node.setChecked(true,
|
|
32561
|
+
node.setChecked(true, true);
|
|
31819
32562
|
}
|
|
31820
32563
|
});
|
|
31821
32564
|
}
|
|
31822
32565
|
_initDefaultCheckedNode(node) {
|
|
31823
32566
|
const checkedValues = this.checkedValues || [];
|
|
31824
32567
|
const nodeValue = node.getter.value;
|
|
31825
|
-
if (checkedValues.indexOf(nodeValue)
|
|
31826
|
-
|
|
32568
|
+
if (checkedValues.indexOf(nodeValue) === -1) return;
|
|
32569
|
+
if (this.checkStrictly) {
|
|
32570
|
+
node.setChecked(true, false);
|
|
32571
|
+
return;
|
|
32572
|
+
}
|
|
32573
|
+
const checkedSet = new Set(checkedValues);
|
|
32574
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
32575
|
+
(child) => checkedSet.has(child.getter.value)
|
|
32576
|
+
);
|
|
32577
|
+
if (!hasSelectedChildInSet) {
|
|
32578
|
+
node.setChecked(true, true);
|
|
31827
32579
|
}
|
|
31828
32580
|
}
|
|
31829
32581
|
setCheckedValues(newVal) {
|
|
@@ -32051,9 +32803,9 @@
|
|
|
32051
32803
|
|
|
32052
32804
|
/** @jsxImportSource vue */
|
|
32053
32805
|
|
|
32054
|
-
const COMPONENT_NAME$
|
|
32806
|
+
const COMPONENT_NAME$6 = 'vc-tree-node';
|
|
32055
32807
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
32056
|
-
name: COMPONENT_NAME$
|
|
32808
|
+
name: COMPONENT_NAME$6,
|
|
32057
32809
|
props: props$3,
|
|
32058
32810
|
emits: ['node-expand'],
|
|
32059
32811
|
setup(props, {
|
|
@@ -32552,9 +33304,9 @@
|
|
|
32552
33304
|
|
|
32553
33305
|
/** @jsxImportSource vue */
|
|
32554
33306
|
|
|
32555
|
-
const COMPONENT_NAME$
|
|
33307
|
+
const COMPONENT_NAME$5 = 'vc-tree';
|
|
32556
33308
|
const Tree$1 = /* @__PURE__ */ vue.defineComponent({
|
|
32557
|
-
name: COMPONENT_NAME$
|
|
33309
|
+
name: COMPONENT_NAME$5,
|
|
32558
33310
|
props: props$2,
|
|
32559
33311
|
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'],
|
|
32560
33312
|
setup(props, {
|
|
@@ -32749,6 +33501,225 @@
|
|
|
32749
33501
|
}
|
|
32750
33502
|
});
|
|
32751
33503
|
|
|
33504
|
+
/** @jsxImportSource vue */
|
|
33505
|
+
|
|
33506
|
+
const COMPONENT_NAME$4 = 'vc-tree-select-content';
|
|
33507
|
+
const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
|
|
33508
|
+
name: COMPONENT_NAME$4,
|
|
33509
|
+
props: {
|
|
33510
|
+
value: {
|
|
33511
|
+
type: Array,
|
|
33512
|
+
required: true
|
|
33513
|
+
},
|
|
33514
|
+
data: {
|
|
33515
|
+
type: Array,
|
|
33516
|
+
default: () => []
|
|
33517
|
+
},
|
|
33518
|
+
checkStrictly: {
|
|
33519
|
+
type: Boolean,
|
|
33520
|
+
default: false
|
|
33521
|
+
},
|
|
33522
|
+
renderNodeLabel: Function
|
|
33523
|
+
},
|
|
33524
|
+
emits: ['change'],
|
|
33525
|
+
setup(props, {
|
|
33526
|
+
emit
|
|
33527
|
+
}) {
|
|
33528
|
+
return () => {
|
|
33529
|
+
return vue.createVNode(Scroller, {
|
|
33530
|
+
"class": "vc-tree-select__options",
|
|
33531
|
+
"max-height": "200px"
|
|
33532
|
+
}, {
|
|
33533
|
+
default: () => [vue.createVNode(Tree$1, {
|
|
33534
|
+
"model-value": props.value,
|
|
33535
|
+
"expanded-values": props.value,
|
|
33536
|
+
"data": props.data,
|
|
33537
|
+
"checkStrictly": props.checkStrictly,
|
|
33538
|
+
"allowDispatch": false,
|
|
33539
|
+
"showCheckbox": true,
|
|
33540
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
33541
|
+
"onChange": (_, data) => emit('change', _, data)
|
|
33542
|
+
}, null)]
|
|
33543
|
+
});
|
|
33544
|
+
};
|
|
33545
|
+
}
|
|
33546
|
+
});
|
|
33547
|
+
|
|
33548
|
+
/** @jsxImportSource vue */
|
|
33549
|
+
|
|
33550
|
+
const COMPONENT_NAME$3 = 'vc-tree-select-content-cascader';
|
|
33551
|
+
const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
|
|
33552
|
+
name: COMPONENT_NAME$3,
|
|
33553
|
+
props: {
|
|
33554
|
+
value: {
|
|
33555
|
+
type: Array,
|
|
33556
|
+
required: true
|
|
33557
|
+
},
|
|
33558
|
+
data: {
|
|
33559
|
+
type: Array,
|
|
33560
|
+
default: () => []
|
|
33561
|
+
},
|
|
33562
|
+
checkStrictly: {
|
|
33563
|
+
type: Boolean,
|
|
33564
|
+
default: false
|
|
33565
|
+
},
|
|
33566
|
+
renderNodeLabel: Function,
|
|
33567
|
+
numerable: {
|
|
33568
|
+
type: Boolean,
|
|
33569
|
+
default: false
|
|
33570
|
+
},
|
|
33571
|
+
separator: {
|
|
33572
|
+
type: String,
|
|
33573
|
+
default: ','
|
|
33574
|
+
},
|
|
33575
|
+
max: {
|
|
33576
|
+
type: Number,
|
|
33577
|
+
default: 1
|
|
33578
|
+
},
|
|
33579
|
+
nullValue: {
|
|
33580
|
+
type: [Number, String, Object],
|
|
33581
|
+
default: void 0
|
|
33582
|
+
}
|
|
33583
|
+
},
|
|
33584
|
+
emits: ['change'],
|
|
33585
|
+
setup(props, {
|
|
33586
|
+
emit
|
|
33587
|
+
}) {
|
|
33588
|
+
const treeRef = vue.ref(null);
|
|
33589
|
+
/** hover 展开路径,与 Cascader 一致 */
|
|
33590
|
+
const currentValue = vue.ref([]);
|
|
33591
|
+
const rebuildData = vue.computed(() => {
|
|
33592
|
+
if (!props.data.length) return [];
|
|
33593
|
+
let temp = props.data;
|
|
33594
|
+
const data = [];
|
|
33595
|
+
currentValue.value.forEach(cur => {
|
|
33596
|
+
const col = temp;
|
|
33597
|
+
data.push(col);
|
|
33598
|
+
const next = (temp.find(i => i.value == cur) || {}).children || [];
|
|
33599
|
+
temp = next;
|
|
33600
|
+
});
|
|
33601
|
+
data.push(temp);
|
|
33602
|
+
return data;
|
|
33603
|
+
});
|
|
33604
|
+
/** 驱动列区在 TreeStore 更新后重绘 */
|
|
33605
|
+
const panelTick = vue.ref(0);
|
|
33606
|
+
const columns = vue.computed(() => Array.from({
|
|
33607
|
+
length: currentValue.value.length + 1
|
|
33608
|
+
}).map((_, index) => index));
|
|
33609
|
+
const handleHover = (value, columnIndex) => {
|
|
33610
|
+
const len = currentValue.value.length - columnIndex;
|
|
33611
|
+
currentValue.value.splice(columnIndex, len, value);
|
|
33612
|
+
};
|
|
33613
|
+
const sync = async () => {
|
|
33614
|
+
await vue.nextTick();
|
|
33615
|
+
const tree = treeRef.value;
|
|
33616
|
+
if (!tree) return;
|
|
33617
|
+
const data = {
|
|
33618
|
+
checkedNodes: tree.getCheckedNodes(),
|
|
33619
|
+
checkedValues: tree.getCheckedValues(),
|
|
33620
|
+
halfCheckedNodes: tree.getHalfCheckedNodes(),
|
|
33621
|
+
halfCheckedValues: tree.getHalfCheckedValues()
|
|
33622
|
+
};
|
|
33623
|
+
panelTick.value++;
|
|
33624
|
+
emit('change', null, data);
|
|
33625
|
+
};
|
|
33626
|
+
const getNodeState = item => {
|
|
33627
|
+
const tree = treeRef.value;
|
|
33628
|
+
if (!tree) {
|
|
33629
|
+
return {
|
|
33630
|
+
checked: false,
|
|
33631
|
+
indeterminate: false
|
|
33632
|
+
};
|
|
33633
|
+
}
|
|
33634
|
+
const node = tree.getNode(item);
|
|
33635
|
+
if (!node) {
|
|
33636
|
+
return {
|
|
33637
|
+
checked: false,
|
|
33638
|
+
indeterminate: false
|
|
33639
|
+
};
|
|
33640
|
+
}
|
|
33641
|
+
return {
|
|
33642
|
+
checked: !!node.states.checked,
|
|
33643
|
+
indeterminate: !!node.states.indeterminate
|
|
33644
|
+
};
|
|
33645
|
+
};
|
|
33646
|
+
const hasChildren = item => {
|
|
33647
|
+
return !!(item.children && item.children.length > 0);
|
|
33648
|
+
};
|
|
33649
|
+
const handleCheckboxChange = async (v, item) => {
|
|
33650
|
+
const tree = treeRef.value;
|
|
33651
|
+
if (!tree) return;
|
|
33652
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
33653
|
+
sync();
|
|
33654
|
+
};
|
|
33655
|
+
const handleLabelClick = (v, item) => {
|
|
33656
|
+
const tree = treeRef.value;
|
|
33657
|
+
if (!tree) return;
|
|
33658
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
33659
|
+
sync();
|
|
33660
|
+
};
|
|
33661
|
+
return () => {
|
|
33662
|
+
return vue.createVNode("div", {
|
|
33663
|
+
"class": "vc-tree-select__cascader"
|
|
33664
|
+
}, [vue.createVNode(Tree$1, {
|
|
33665
|
+
"ref": treeRef,
|
|
33666
|
+
"class": "vc-tree-select__cascader-tree-hidden",
|
|
33667
|
+
"model-value": props.value,
|
|
33668
|
+
"expanded-values": props.value,
|
|
33669
|
+
"data": props.data,
|
|
33670
|
+
"checkStrictly": props.checkStrictly,
|
|
33671
|
+
"allowDispatch": false,
|
|
33672
|
+
"showCheckbox": true,
|
|
33673
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
33674
|
+
"numerable": props.numerable,
|
|
33675
|
+
"separator": props.separator,
|
|
33676
|
+
"max": props.max,
|
|
33677
|
+
"nullValue": props.nullValue
|
|
33678
|
+
}, null), vue.createVNode("div", {
|
|
33679
|
+
"class": "vc-tree-select__cascader-columns"
|
|
33680
|
+
}, [columns.value.map(columnIndex => {
|
|
33681
|
+
const col = rebuildData.value[columnIndex];
|
|
33682
|
+
if (!col || !col.length) return null;
|
|
33683
|
+
return vue.createVNode("div", {
|
|
33684
|
+
"class": "vc-tree-select__cascader-column",
|
|
33685
|
+
"key": columnIndex
|
|
33686
|
+
}, [vue.createVNode("div", {
|
|
33687
|
+
"class": "vc-tree-select__cascader-column-wrapper"
|
|
33688
|
+
}, [col.map(item => {
|
|
33689
|
+
const state = getNodeState(item);
|
|
33690
|
+
const isSelect = currentValue.value[columnIndex] === item.value;
|
|
33691
|
+
const child = hasChildren(item);
|
|
33692
|
+
return vue.createVNode("div", {
|
|
33693
|
+
"key": item.value,
|
|
33694
|
+
"class": ['vc-tree-select__cascader-item', {
|
|
33695
|
+
'is-select': isSelect
|
|
33696
|
+
}],
|
|
33697
|
+
"onMouseenter": () => handleHover(item.value, columnIndex),
|
|
33698
|
+
"onClick": () => handleLabelClick(!state.checked, item)
|
|
33699
|
+
}, [vue.createVNode("span", {
|
|
33700
|
+
"class": "vc-tree-select__cascader-checkbox",
|
|
33701
|
+
"onClick": e => e.stopPropagation()
|
|
33702
|
+
}, [vue.createVNode(Checkbox, {
|
|
33703
|
+
"modelValue": state.checked,
|
|
33704
|
+
"indeterminate": state.indeterminate,
|
|
33705
|
+
"disabled": !!item.disabled,
|
|
33706
|
+
"onChange": v => handleCheckboxChange(v, item)
|
|
33707
|
+
}, null)]), vue.createVNode("span", {
|
|
33708
|
+
"class": "vc-tree-select__cascader-label"
|
|
33709
|
+
}, [props.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
|
|
33710
|
+
"render": props.renderNodeLabel,
|
|
33711
|
+
"store": treeRef.value.getNode(item),
|
|
33712
|
+
"row": item
|
|
33713
|
+
}, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
|
|
33714
|
+
"type": "right",
|
|
33715
|
+
"class": "vc-tree-select__cascader-icon"
|
|
33716
|
+
}, null) : null]);
|
|
33717
|
+
})])]);
|
|
33718
|
+
})])]);
|
|
33719
|
+
};
|
|
33720
|
+
}
|
|
33721
|
+
});
|
|
33722
|
+
|
|
32752
33723
|
const treeKeys = [
|
|
32753
33724
|
"checkStrictly",
|
|
32754
33725
|
"data",
|
|
@@ -32757,7 +33728,18 @@
|
|
|
32757
33728
|
];
|
|
32758
33729
|
const props$1 = {
|
|
32759
33730
|
...props$1a,
|
|
32760
|
-
...pick(props$2, treeKeys)
|
|
33731
|
+
...pick(props$2, treeKeys),
|
|
33732
|
+
autoWidth: {
|
|
33733
|
+
type: Boolean,
|
|
33734
|
+
default: void 0
|
|
33735
|
+
},
|
|
33736
|
+
/**
|
|
33737
|
+
* 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
|
|
33738
|
+
*/
|
|
33739
|
+
cascader: {
|
|
33740
|
+
type: Boolean,
|
|
33741
|
+
default: false
|
|
33742
|
+
}
|
|
32761
33743
|
};
|
|
32762
33744
|
|
|
32763
33745
|
/** @jsxImportSource vue */
|
|
@@ -32783,12 +33765,37 @@
|
|
|
32783
33765
|
const searchValue = vue.ref('');
|
|
32784
33766
|
const searchRegex = vue.ref(new RegExp(''));
|
|
32785
33767
|
const currentValue = vue.ref([]);
|
|
33768
|
+
const currentValueGroups = vue.computed(() => {
|
|
33769
|
+
if (props.checkStrictly) return;
|
|
33770
|
+
if (!props.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
|
|
33771
|
+
return [];
|
|
33772
|
+
}
|
|
33773
|
+
const pathMap = new Map();
|
|
33774
|
+
const traverse = (data, path = []) => {
|
|
33775
|
+
data.forEach(item => {
|
|
33776
|
+
const v = item.value;
|
|
33777
|
+
if (v == null) return;
|
|
33778
|
+
const fullPath = [...path, v];
|
|
33779
|
+
pathMap.set(v, fullPath);
|
|
33780
|
+
if (item.children?.length) traverse(item.children, fullPath);
|
|
33781
|
+
});
|
|
33782
|
+
};
|
|
33783
|
+
traverse(props.data);
|
|
33784
|
+
const allPaths = currentValue.value.map(v => pathMap.get(v)).filter(Boolean);
|
|
33785
|
+
return allPaths.filter(path => !allPaths.some(other => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
|
|
33786
|
+
});
|
|
32786
33787
|
const source = vue.computed(() => {
|
|
32787
33788
|
return flattenData$1(props.data, {
|
|
32788
33789
|
parent: true,
|
|
32789
33790
|
cascader: true
|
|
32790
33791
|
});
|
|
32791
33792
|
});
|
|
33793
|
+
const labelMap = vue.computed(() => {
|
|
33794
|
+
return source.value.reduce((pre, cur) => {
|
|
33795
|
+
pre[cur.value] = cur.label || '';
|
|
33796
|
+
return pre;
|
|
33797
|
+
}, {});
|
|
33798
|
+
});
|
|
32792
33799
|
const icon = vue.computed(() => {
|
|
32793
33800
|
return isActive.value ? 'up' : 'down';
|
|
32794
33801
|
});
|
|
@@ -32805,17 +33812,34 @@
|
|
|
32805
33812
|
'is-disabled': props.disabled
|
|
32806
33813
|
};
|
|
32807
33814
|
});
|
|
32808
|
-
const
|
|
33815
|
+
const displayTags = vue.computed(() => {
|
|
32809
33816
|
if (!props.data.length) {
|
|
32810
33817
|
return [];
|
|
32811
33818
|
}
|
|
32812
|
-
|
|
33819
|
+
if (props.checkStrictly) {
|
|
33820
|
+
return currentValue.value.map(v => ({
|
|
33821
|
+
value: v,
|
|
33822
|
+
label: labelMap.value[v] || ''
|
|
33823
|
+
}));
|
|
33824
|
+
}
|
|
33825
|
+
return (currentValueGroups.value || []).map(path => {
|
|
33826
|
+
const value = path[path.length - 1];
|
|
33827
|
+
const label = path.map(v => labelMap.value[v] || '').filter(Boolean).join(' / ');
|
|
33828
|
+
return {
|
|
33829
|
+
path,
|
|
33830
|
+
value,
|
|
33831
|
+
label
|
|
33832
|
+
};
|
|
33833
|
+
});
|
|
32813
33834
|
});
|
|
32814
33835
|
const collapseTagCount = vue.computed(() => {
|
|
32815
33836
|
if (!props.maxTags) return 0;
|
|
32816
|
-
const v =
|
|
33837
|
+
const v = displayTags.value.length - props.maxTags;
|
|
32817
33838
|
return v < 0 ? 0 : v;
|
|
32818
33839
|
});
|
|
33840
|
+
const autoWidth = vue.computed(() => {
|
|
33841
|
+
return typeof props.autoWidth === 'boolean' ? props.autoWidth : !!props.cascader;
|
|
33842
|
+
});
|
|
32819
33843
|
|
|
32820
33844
|
/**
|
|
32821
33845
|
* v-model 同步, 外部的数据改变时不会触发
|
|
@@ -32828,8 +33852,9 @@
|
|
|
32828
33852
|
separator: props.separator,
|
|
32829
33853
|
nullValue: props.nullValue
|
|
32830
33854
|
});
|
|
32831
|
-
|
|
32832
|
-
emit('
|
|
33855
|
+
const labels = displayTags.value.map(item => item.label);
|
|
33856
|
+
emit('update:modelValue', v, labels);
|
|
33857
|
+
emit('change', v, labels);
|
|
32833
33858
|
|
|
32834
33859
|
// form表单
|
|
32835
33860
|
formItem?.change?.(currentValue.value);
|
|
@@ -32854,8 +33879,15 @@
|
|
|
32854
33879
|
const close = () => {
|
|
32855
33880
|
isActive.value = false;
|
|
32856
33881
|
};
|
|
32857
|
-
const handleClose =
|
|
32858
|
-
|
|
33882
|
+
const handleClose = item => {
|
|
33883
|
+
if (props.checkStrictly) {
|
|
33884
|
+
const index = currentValue.value.findIndex(v => v === item.value);
|
|
33885
|
+
if (index === -1) return;
|
|
33886
|
+
currentValue.value = currentValue.value.filter((_, i) => i !== index);
|
|
33887
|
+
} else if (item.path) {
|
|
33888
|
+
const remaining = (currentValueGroups.value || []).filter(p => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
|
|
33889
|
+
currentValue.value = [...new Set(remaining.flat())];
|
|
33890
|
+
}
|
|
32859
33891
|
sync();
|
|
32860
33892
|
};
|
|
32861
33893
|
const handleClear = e => {
|
|
@@ -32892,6 +33924,7 @@
|
|
|
32892
33924
|
multiple,
|
|
32893
33925
|
isActive,
|
|
32894
33926
|
current: currentValue,
|
|
33927
|
+
currentValueGroups,
|
|
32895
33928
|
// for portal
|
|
32896
33929
|
toggle(v) {
|
|
32897
33930
|
v = typeof v === 'boolean' ? v : !isActive.value;
|
|
@@ -32906,7 +33939,7 @@
|
|
|
32906
33939
|
"trigger": props.trigger,
|
|
32907
33940
|
"tag": props.tag,
|
|
32908
33941
|
"placement": props.placement,
|
|
32909
|
-
"
|
|
33942
|
+
"autoWidth": autoWidth.value,
|
|
32910
33943
|
"disabled": props.disabled,
|
|
32911
33944
|
"portalClass": [['is-padding-none', props.portalClass]],
|
|
32912
33945
|
"class": [classes.value, its.value.class, 'vc-tree-select'],
|
|
@@ -32923,22 +33956,22 @@
|
|
|
32923
33956
|
return vue.createVNode(Input$1, {
|
|
32924
33957
|
"id": props.id,
|
|
32925
33958
|
"disabled": props.disabled,
|
|
32926
|
-
"modelValue":
|
|
33959
|
+
"modelValue": displayTags.value[0]?.label || props.extra,
|
|
32927
33960
|
"allow-dispatch": false,
|
|
32928
33961
|
"class": "vc-tree-select__input",
|
|
32929
33962
|
"readonly": true,
|
|
32930
33963
|
"placeholder": its.value.attrs?.placeholder || '请选择'
|
|
32931
33964
|
}, {
|
|
32932
|
-
content: multiple.value &&
|
|
33965
|
+
content: multiple.value && displayTags.value.length > 0 ? () => {
|
|
32933
33966
|
return vue.createVNode("div", {
|
|
32934
33967
|
"class": [classes.value, 'vc-tree-select__tags']
|
|
32935
|
-
}, [
|
|
33968
|
+
}, [displayTags.value.slice(0, props.maxTags).map(item => {
|
|
32936
33969
|
return vue.createVNode(Tag, {
|
|
32937
|
-
"key": item,
|
|
33970
|
+
"key": item.path ? item.path.join('-') : item.value,
|
|
32938
33971
|
"closable": !props.disabled,
|
|
32939
|
-
"onClose": () => handleClose(
|
|
33972
|
+
"onClose": () => handleClose(item)
|
|
32940
33973
|
}, {
|
|
32941
|
-
default: () => [
|
|
33974
|
+
default: () => [item.label]
|
|
32942
33975
|
});
|
|
32943
33976
|
}), collapseTagCount.value ? vue.createVNode(Tag, null, {
|
|
32944
33977
|
default: () => [`+${collapseTagCount.value}...`]
|
|
@@ -32971,16 +34004,23 @@
|
|
|
32971
34004
|
}, [vue.createVNode(Spin, {
|
|
32972
34005
|
"size": 16
|
|
32973
34006
|
}, null)]), vue.createVNode(Scroller, {
|
|
32974
|
-
"class":
|
|
34007
|
+
"class": ['vc-tree-select__options', props.cascader && 'is-cascader'],
|
|
32975
34008
|
"max-height": "200px"
|
|
32976
34009
|
}, {
|
|
32977
|
-
default: () => [vue.createVNode(
|
|
32978
|
-
"
|
|
32979
|
-
"
|
|
34010
|
+
default: () => [props.cascader ? vue.createVNode(TreeSelectContentCascader, {
|
|
34011
|
+
"value": currentValue.value,
|
|
34012
|
+
"data": props.data,
|
|
34013
|
+
"checkStrictly": props.checkStrictly,
|
|
34014
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
34015
|
+
"numerable": props.numerable,
|
|
34016
|
+
"separator": props.separator,
|
|
34017
|
+
"max": props.max,
|
|
34018
|
+
"nullValue": props.nullValue,
|
|
34019
|
+
"onChange": handleChange
|
|
34020
|
+
}, null) : vue.createVNode(TreeSelectContent, {
|
|
34021
|
+
"value": currentValue.value,
|
|
32980
34022
|
"data": props.data,
|
|
32981
34023
|
"checkStrictly": props.checkStrictly,
|
|
32982
|
-
"allowDispatch": false,
|
|
32983
|
-
"showCheckbox": true,
|
|
32984
34024
|
"renderNodeLabel": props.renderNodeLabel,
|
|
32985
34025
|
"onChange": handleChange
|
|
32986
34026
|
}, null)]
|
|
@@ -139708,6 +140748,7 @@ ${r}
|
|
|
139708
140748
|
exports.Calendar = Calendar$1;
|
|
139709
140749
|
exports.Card = Card;
|
|
139710
140750
|
exports.Carousel = Carousel;
|
|
140751
|
+
exports.CarouselItem = CarouselItem;
|
|
139711
140752
|
exports.Cascader = Cascader;
|
|
139712
140753
|
exports.Chart = Chart;
|
|
139713
140754
|
exports.Checkbox = Checkbox;
|
|
@@ -139753,6 +140794,7 @@ ${r}
|
|
|
139753
140794
|
exports.MCalendar = MCalendar;
|
|
139754
140795
|
exports.MCard = MCard;
|
|
139755
140796
|
exports.MCarousel = MCarousel;
|
|
140797
|
+
exports.MCarouselItem = MCarouselItem;
|
|
139756
140798
|
exports.MCascader = MCascader;
|
|
139757
140799
|
exports.MChart = MChart;
|
|
139758
140800
|
exports.MCheckbox = MCheckbox;
|