@deot/vc 1.0.62 → 1.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +389 -106
- package/dist/index.iife.js +1414 -406
- package/dist/index.js +3 -3
- package/dist/index.umd.cjs +1414 -406
- package/package.json +4 -4
package/dist/index.umd.cjs
CHANGED
|
@@ -9141,16 +9141,16 @@
|
|
|
9141
9141
|
}
|
|
9142
9142
|
}
|
|
9143
9143
|
const VcInstance = new Instance();
|
|
9144
|
-
const props$
|
|
9144
|
+
const props$1v = {
|
|
9145
9145
|
tag: {
|
|
9146
9146
|
type: String,
|
|
9147
9147
|
default: "div"
|
|
9148
9148
|
}
|
|
9149
9149
|
};
|
|
9150
|
-
const COMPONENT_NAME$
|
|
9150
|
+
const COMPONENT_NAME$2g = "vc-action-sheet";
|
|
9151
9151
|
const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
9152
|
-
name: COMPONENT_NAME$
|
|
9153
|
-
props: props$
|
|
9152
|
+
name: COMPONENT_NAME$2g,
|
|
9153
|
+
props: props$1v,
|
|
9154
9154
|
setup(props2, {
|
|
9155
9155
|
slots
|
|
9156
9156
|
}) {
|
|
@@ -9162,7 +9162,7 @@
|
|
|
9162
9162
|
}
|
|
9163
9163
|
});
|
|
9164
9164
|
const MActionSheet = ActionSheet;
|
|
9165
|
-
const props$
|
|
9165
|
+
const props$1u = {
|
|
9166
9166
|
modelValue: {
|
|
9167
9167
|
type: Boolean,
|
|
9168
9168
|
default: false
|
|
@@ -9220,11 +9220,11 @@
|
|
|
9220
9220
|
const isWheel = (el2) => {
|
|
9221
9221
|
return SCROLLER_WHEEL_REG.test(el2?.className || "");
|
|
9222
9222
|
};
|
|
9223
|
-
const COMPONENT_NAME$
|
|
9223
|
+
const COMPONENT_NAME$2f = "vc-affix";
|
|
9224
9224
|
const Affix = /* @__PURE__ */ vue.defineComponent({
|
|
9225
|
-
name: COMPONENT_NAME$
|
|
9225
|
+
name: COMPONENT_NAME$2f,
|
|
9226
9226
|
emits: ["update:modelValue"],
|
|
9227
|
-
props: props$
|
|
9227
|
+
props: props$1u,
|
|
9228
9228
|
setup(props2, {
|
|
9229
9229
|
slots,
|
|
9230
9230
|
expose,
|
|
@@ -9384,7 +9384,7 @@
|
|
|
9384
9384
|
}
|
|
9385
9385
|
});
|
|
9386
9386
|
const MAffix = Affix;
|
|
9387
|
-
const props$
|
|
9387
|
+
const props$1t = {
|
|
9388
9388
|
modelValue: {
|
|
9389
9389
|
type: Boolean,
|
|
9390
9390
|
default: true
|
|
@@ -9410,7 +9410,7 @@
|
|
|
9410
9410
|
default: false
|
|
9411
9411
|
}
|
|
9412
9412
|
};
|
|
9413
|
-
const props$
|
|
9413
|
+
const props$1s = {
|
|
9414
9414
|
type: String,
|
|
9415
9415
|
inherit: {
|
|
9416
9416
|
type: Boolean,
|
|
@@ -9543,10 +9543,10 @@
|
|
|
9543
9543
|
}
|
|
9544
9544
|
}
|
|
9545
9545
|
const IconManager = new Manager();
|
|
9546
|
-
const COMPONENT_NAME$
|
|
9546
|
+
const COMPONENT_NAME$2e = "vc-icon";
|
|
9547
9547
|
const Icon = /* @__PURE__ */ vue.defineComponent({
|
|
9548
|
-
name: COMPONENT_NAME$
|
|
9549
|
-
props: props$
|
|
9548
|
+
name: COMPONENT_NAME$2e,
|
|
9549
|
+
props: props$1s,
|
|
9550
9550
|
setup(props2) {
|
|
9551
9551
|
const viewBox = vue.ref("0 0 1024 1024");
|
|
9552
9552
|
const path = vue.ref([]);
|
|
@@ -9578,7 +9578,7 @@
|
|
|
9578
9578
|
};
|
|
9579
9579
|
}
|
|
9580
9580
|
});
|
|
9581
|
-
const props$
|
|
9581
|
+
const props$1r = {
|
|
9582
9582
|
/**
|
|
9583
9583
|
* 进入/离开持续时间
|
|
9584
9584
|
* {enter: 300, leave: 300}
|
|
@@ -9741,10 +9741,10 @@
|
|
|
9741
9741
|
}
|
|
9742
9742
|
};
|
|
9743
9743
|
};
|
|
9744
|
-
const COMPONENT_NAME$
|
|
9744
|
+
const COMPONENT_NAME$2d = "vc-transition";
|
|
9745
9745
|
const Transition = vue.defineComponent({
|
|
9746
|
-
name: COMPONENT_NAME$
|
|
9747
|
-
props: props$
|
|
9746
|
+
name: COMPONENT_NAME$2d,
|
|
9747
|
+
props: props$1r,
|
|
9748
9748
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
9749
9749
|
inheritAttrs: false,
|
|
9750
9750
|
setup(props2, { slots, attrs }) {
|
|
@@ -9763,10 +9763,10 @@
|
|
|
9763
9763
|
};
|
|
9764
9764
|
}
|
|
9765
9765
|
});
|
|
9766
|
-
const COMPONENT_NAME$
|
|
9766
|
+
const COMPONENT_NAME$2c = "vc-transition-collapse";
|
|
9767
9767
|
const TransitionCollapse = vue.defineComponent({
|
|
9768
|
-
name: COMPONENT_NAME$
|
|
9769
|
-
props: props$
|
|
9768
|
+
name: COMPONENT_NAME$2c,
|
|
9769
|
+
props: props$1r,
|
|
9770
9770
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
9771
9771
|
inheritAttrs: false,
|
|
9772
9772
|
setup(props2, { slots, attrs: _attrs }) {
|
|
@@ -9879,11 +9879,11 @@
|
|
|
9879
9879
|
};
|
|
9880
9880
|
}
|
|
9881
9881
|
});
|
|
9882
|
-
const COMPONENT_NAME$
|
|
9882
|
+
const COMPONENT_NAME$2b = "vc-transition-fade";
|
|
9883
9883
|
const TransitionFade = vue.defineComponent({
|
|
9884
|
-
name: COMPONENT_NAME$
|
|
9884
|
+
name: COMPONENT_NAME$2b,
|
|
9885
9885
|
props: {
|
|
9886
|
-
...props$
|
|
9886
|
+
...props$1r,
|
|
9887
9887
|
// inheritAttrs必须是false
|
|
9888
9888
|
style: {
|
|
9889
9889
|
type: Object,
|
|
@@ -9915,11 +9915,11 @@
|
|
|
9915
9915
|
};
|
|
9916
9916
|
}
|
|
9917
9917
|
});
|
|
9918
|
-
const COMPONENT_NAME$
|
|
9918
|
+
const COMPONENT_NAME$2a = "vc-transition-scale";
|
|
9919
9919
|
const TransitionScale = vue.defineComponent({
|
|
9920
|
-
name: COMPONENT_NAME$
|
|
9920
|
+
name: COMPONENT_NAME$2a,
|
|
9921
9921
|
props: {
|
|
9922
|
-
...props$
|
|
9922
|
+
...props$1r,
|
|
9923
9923
|
mode: {
|
|
9924
9924
|
type: String,
|
|
9925
9925
|
default: "both",
|
|
@@ -9956,11 +9956,11 @@
|
|
|
9956
9956
|
};
|
|
9957
9957
|
}
|
|
9958
9958
|
});
|
|
9959
|
-
const COMPONENT_NAME$
|
|
9959
|
+
const COMPONENT_NAME$29 = "vc-transition-slide";
|
|
9960
9960
|
const TransitionSlide = vue.defineComponent({
|
|
9961
|
-
name: COMPONENT_NAME$
|
|
9961
|
+
name: COMPONENT_NAME$29,
|
|
9962
9962
|
props: {
|
|
9963
|
-
...props$
|
|
9963
|
+
...props$1r,
|
|
9964
9964
|
mode: {
|
|
9965
9965
|
type: String,
|
|
9966
9966
|
default: "left",
|
|
@@ -9997,11 +9997,11 @@
|
|
|
9997
9997
|
};
|
|
9998
9998
|
}
|
|
9999
9999
|
});
|
|
10000
|
-
const COMPONENT_NAME$
|
|
10000
|
+
const COMPONENT_NAME$28 = "vc-transition-zoom";
|
|
10001
10001
|
const TransitionZoom = vue.defineComponent({
|
|
10002
|
-
name: COMPONENT_NAME$
|
|
10002
|
+
name: COMPONENT_NAME$28,
|
|
10003
10003
|
props: {
|
|
10004
|
-
...props$
|
|
10004
|
+
...props$1r,
|
|
10005
10005
|
mode: {
|
|
10006
10006
|
type: String,
|
|
10007
10007
|
default: "x",
|
|
@@ -10038,7 +10038,7 @@
|
|
|
10038
10038
|
};
|
|
10039
10039
|
}
|
|
10040
10040
|
});
|
|
10041
|
-
const COMPONENT_NAME$
|
|
10041
|
+
const COMPONENT_NAME$27 = "vc-alert";
|
|
10042
10042
|
const THEME_MAP = {
|
|
10043
10043
|
info: ["#456CF6", "#91d5ff", "#e6f7ff"],
|
|
10044
10044
|
success: ["#52c41a", "#b7eb8f", "#f6ffed"],
|
|
@@ -10046,8 +10046,8 @@
|
|
|
10046
10046
|
warning: ["#ffbf00", "#ffe58f", "#fffbe6"]
|
|
10047
10047
|
};
|
|
10048
10048
|
const Alert = /* @__PURE__ */ vue.defineComponent({
|
|
10049
|
-
name: COMPONENT_NAME$
|
|
10050
|
-
props: props$
|
|
10049
|
+
name: COMPONENT_NAME$27,
|
|
10050
|
+
props: props$1t,
|
|
10051
10051
|
setup(props2, {
|
|
10052
10052
|
slots,
|
|
10053
10053
|
emit
|
|
@@ -10133,7 +10133,7 @@
|
|
|
10133
10133
|
}
|
|
10134
10134
|
});
|
|
10135
10135
|
const MAlert = Alert;
|
|
10136
|
-
const props$
|
|
10136
|
+
const props$1q = {
|
|
10137
10137
|
// canvas配置参数
|
|
10138
10138
|
options: Object,
|
|
10139
10139
|
width: {
|
|
@@ -10146,10 +10146,10 @@
|
|
|
10146
10146
|
}
|
|
10147
10147
|
};
|
|
10148
10148
|
const isTouch = typeof document !== "undefined" && "ontouchend" in document;
|
|
10149
|
-
const COMPONENT_NAME$
|
|
10149
|
+
const COMPONENT_NAME$26 = "vc-artboard";
|
|
10150
10150
|
const Artboard = /* @__PURE__ */ vue.defineComponent({
|
|
10151
|
-
name: COMPONENT_NAME$
|
|
10152
|
-
props: props$
|
|
10151
|
+
name: COMPONENT_NAME$26,
|
|
10152
|
+
props: props$1q,
|
|
10153
10153
|
setup(props2, {
|
|
10154
10154
|
emit,
|
|
10155
10155
|
expose
|
|
@@ -10324,7 +10324,7 @@
|
|
|
10324
10324
|
}
|
|
10325
10325
|
});
|
|
10326
10326
|
const MArtboard = Artboard;
|
|
10327
|
-
const props$
|
|
10327
|
+
const props$1p = {
|
|
10328
10328
|
size: {
|
|
10329
10329
|
type: Number,
|
|
10330
10330
|
default: 28
|
|
@@ -10345,10 +10345,10 @@
|
|
|
10345
10345
|
default: false
|
|
10346
10346
|
}
|
|
10347
10347
|
};
|
|
10348
|
-
const COMPONENT_NAME$
|
|
10348
|
+
const COMPONENT_NAME$25 = "vc-spin";
|
|
10349
10349
|
const Spin = /* @__PURE__ */ vue.defineComponent({
|
|
10350
|
-
name: COMPONENT_NAME$
|
|
10351
|
-
props: props$
|
|
10350
|
+
name: COMPONENT_NAME$25,
|
|
10351
|
+
props: props$1p,
|
|
10352
10352
|
setup(props2, {
|
|
10353
10353
|
slots
|
|
10354
10354
|
}) {
|
|
@@ -10381,7 +10381,7 @@
|
|
|
10381
10381
|
};
|
|
10382
10382
|
}
|
|
10383
10383
|
});
|
|
10384
|
-
const props$
|
|
10384
|
+
const props$1o = {
|
|
10385
10385
|
wait: {
|
|
10386
10386
|
type: Number,
|
|
10387
10387
|
default: 250
|
|
@@ -10396,10 +10396,10 @@
|
|
|
10396
10396
|
},
|
|
10397
10397
|
exclude: RegExp
|
|
10398
10398
|
};
|
|
10399
|
-
const COMPONENT_NAME$
|
|
10399
|
+
const COMPONENT_NAME$24 = "vc-debounce";
|
|
10400
10400
|
const Debounce = vue.defineComponent({
|
|
10401
|
-
name: COMPONENT_NAME$
|
|
10402
|
-
props: props$
|
|
10401
|
+
name: COMPONENT_NAME$24,
|
|
10402
|
+
props: props$1o,
|
|
10403
10403
|
/**
|
|
10404
10404
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
10405
10405
|
* 如事件onClick
|
|
@@ -10438,7 +10438,7 @@
|
|
|
10438
10438
|
};
|
|
10439
10439
|
}
|
|
10440
10440
|
});
|
|
10441
|
-
const props$
|
|
10441
|
+
const props$1n = {
|
|
10442
10442
|
tag: {
|
|
10443
10443
|
type: String,
|
|
10444
10444
|
default: "button"
|
|
@@ -10467,11 +10467,11 @@
|
|
|
10467
10467
|
default: "button"
|
|
10468
10468
|
}
|
|
10469
10469
|
};
|
|
10470
|
-
const COMPONENT_NAME$
|
|
10470
|
+
const COMPONENT_NAME$23 = "vc-button";
|
|
10471
10471
|
const Button = /* @__PURE__ */ vue.defineComponent({
|
|
10472
|
-
name: COMPONENT_NAME$
|
|
10472
|
+
name: COMPONENT_NAME$23,
|
|
10473
10473
|
emits: ["click"],
|
|
10474
|
-
props: props$
|
|
10474
|
+
props: props$1n,
|
|
10475
10475
|
setup(props2, {
|
|
10476
10476
|
slots
|
|
10477
10477
|
}) {
|
|
@@ -10531,7 +10531,7 @@
|
|
|
10531
10531
|
};
|
|
10532
10532
|
}
|
|
10533
10533
|
});
|
|
10534
|
-
const props$
|
|
10534
|
+
const props$1m = {
|
|
10535
10535
|
vertical: {
|
|
10536
10536
|
type: Boolean,
|
|
10537
10537
|
default: false
|
|
@@ -10549,10 +10549,10 @@
|
|
|
10549
10549
|
default: false
|
|
10550
10550
|
}
|
|
10551
10551
|
};
|
|
10552
|
-
const COMPONENT_NAME$
|
|
10552
|
+
const COMPONENT_NAME$22 = "vc-button-group";
|
|
10553
10553
|
const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
|
|
10554
|
-
name: COMPONENT_NAME$
|
|
10555
|
-
props: props$
|
|
10554
|
+
name: COMPONENT_NAME$22,
|
|
10555
|
+
props: props$1m,
|
|
10556
10556
|
setup(props2, {
|
|
10557
10557
|
slots
|
|
10558
10558
|
}) {
|
|
@@ -10574,16 +10574,16 @@
|
|
|
10574
10574
|
});
|
|
10575
10575
|
const MButton = Button;
|
|
10576
10576
|
const MButtonGroup = ButtonGroup;
|
|
10577
|
-
const props$
|
|
10577
|
+
const props$1l = {
|
|
10578
10578
|
tag: {
|
|
10579
10579
|
type: String,
|
|
10580
10580
|
default: "div"
|
|
10581
10581
|
}
|
|
10582
10582
|
};
|
|
10583
|
-
const COMPONENT_NAME$
|
|
10583
|
+
const COMPONENT_NAME$21 = "vc-calendar";
|
|
10584
10584
|
const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10585
|
-
name: COMPONENT_NAME$
|
|
10586
|
-
props: props$
|
|
10585
|
+
name: COMPONENT_NAME$21,
|
|
10586
|
+
props: props$1l,
|
|
10587
10587
|
setup(props2, {
|
|
10588
10588
|
slots
|
|
10589
10589
|
}) {
|
|
@@ -10595,7 +10595,7 @@
|
|
|
10595
10595
|
}
|
|
10596
10596
|
});
|
|
10597
10597
|
const MCalendar = Calendar$1;
|
|
10598
|
-
const props$
|
|
10598
|
+
const props$1k = {
|
|
10599
10599
|
border: {
|
|
10600
10600
|
type: Boolean,
|
|
10601
10601
|
default: true
|
|
@@ -10615,10 +10615,10 @@
|
|
|
10615
10615
|
type: String
|
|
10616
10616
|
}
|
|
10617
10617
|
};
|
|
10618
|
-
const COMPONENT_NAME$
|
|
10618
|
+
const COMPONENT_NAME$20 = "vc-card";
|
|
10619
10619
|
const Card = /* @__PURE__ */ vue.defineComponent({
|
|
10620
|
-
name: COMPONENT_NAME$
|
|
10621
|
-
props: props$
|
|
10620
|
+
name: COMPONENT_NAME$20,
|
|
10621
|
+
props: props$1k,
|
|
10622
10622
|
setup(props2, {
|
|
10623
10623
|
slots
|
|
10624
10624
|
}) {
|
|
@@ -10642,27 +10642,696 @@
|
|
|
10642
10642
|
}
|
|
10643
10643
|
});
|
|
10644
10644
|
const MCard = Card;
|
|
10645
|
-
const
|
|
10646
|
-
|
|
10645
|
+
const useCarousel = (wrapper, content, expose) => {
|
|
10646
|
+
const instance = vue.getCurrentInstance();
|
|
10647
|
+
const props2 = instance.props;
|
|
10648
|
+
const { emit } = instance;
|
|
10649
|
+
const items = vue.ref([]);
|
|
10650
|
+
const activeIndex = vue.ref(-1);
|
|
10651
|
+
const timer = vue.ref(null);
|
|
10652
|
+
const offset = vue.ref(0);
|
|
10653
|
+
const carouselId = vue.ref(getUid("carousel"));
|
|
10654
|
+
const start = vue.ref();
|
|
10655
|
+
const startX = vue.ref();
|
|
10656
|
+
const startY = vue.ref();
|
|
10657
|
+
const allowTransition = vue.ref(false);
|
|
10658
|
+
const direction = vue.computed(() => {
|
|
10659
|
+
return props2.vertical ? "vertical" : "horizontal";
|
|
10660
|
+
});
|
|
10661
|
+
const hasLabel = vue.computed(() => {
|
|
10662
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
10663
|
+
});
|
|
10664
|
+
const dotsClasses = vue.computed(() => {
|
|
10665
|
+
const classes = ["is-" + direction.value];
|
|
10666
|
+
if (hasLabel.value) {
|
|
10667
|
+
classes.push("is-labels");
|
|
10668
|
+
}
|
|
10669
|
+
if (props2.dots === "outside" || props2.card) {
|
|
10670
|
+
classes.push("is-outside");
|
|
10671
|
+
}
|
|
10672
|
+
return classes;
|
|
10673
|
+
});
|
|
10674
|
+
const resetItems = (oldIndex) => {
|
|
10675
|
+
items.value.forEach((item, index) => {
|
|
10676
|
+
item.exposed?.reset?.(index, activeIndex.value, oldIndex);
|
|
10677
|
+
});
|
|
10678
|
+
};
|
|
10679
|
+
const playSlides = () => {
|
|
10680
|
+
allowTransition.value = true;
|
|
10681
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
10682
|
+
activeIndex.value++;
|
|
10683
|
+
} else if (props2.loop) {
|
|
10684
|
+
activeIndex.value = 0;
|
|
10685
|
+
}
|
|
10686
|
+
};
|
|
10687
|
+
const pauseTimer = () => {
|
|
10688
|
+
if (timer.value) {
|
|
10689
|
+
clearInterval(timer.value);
|
|
10690
|
+
timer.value = null;
|
|
10691
|
+
}
|
|
10692
|
+
};
|
|
10693
|
+
const startTimer = () => {
|
|
10694
|
+
if (props2.t <= 0 || !props2.autoplay || timer.value) return;
|
|
10695
|
+
timer.value = setInterval(playSlides, props2.t);
|
|
10696
|
+
};
|
|
10697
|
+
const setActiveItem = (index) => {
|
|
10698
|
+
if (typeof index === "string") {
|
|
10699
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
10700
|
+
if (filteredItems.length > 0) {
|
|
10701
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
10702
|
+
}
|
|
10703
|
+
}
|
|
10704
|
+
index = Number(index);
|
|
10705
|
+
if (isNaN(index) || index !== Math.floor(index)) {
|
|
10706
|
+
throw new VcError("carousel", "索引必须是整数");
|
|
10707
|
+
}
|
|
10708
|
+
const length = items.value.length;
|
|
10709
|
+
const oldIndex = activeIndex.value;
|
|
10710
|
+
if (index < 0) {
|
|
10711
|
+
activeIndex.value = props2.loop ? length - 1 : 0;
|
|
10712
|
+
} else if (index >= length) {
|
|
10713
|
+
activeIndex.value = props2.loop ? 0 : length - 1;
|
|
10714
|
+
} else {
|
|
10715
|
+
activeIndex.value = index;
|
|
10716
|
+
}
|
|
10717
|
+
if (oldIndex === activeIndex.value) {
|
|
10718
|
+
resetItems(oldIndex);
|
|
10719
|
+
}
|
|
10720
|
+
};
|
|
10721
|
+
const prev = () => {
|
|
10722
|
+
setActiveItem(activeIndex.value - 1);
|
|
10723
|
+
};
|
|
10724
|
+
const next = () => {
|
|
10725
|
+
setActiveItem(activeIndex.value + 1);
|
|
10726
|
+
};
|
|
10727
|
+
const handleDotClick = (index) => {
|
|
10728
|
+
activeIndex.value = index;
|
|
10729
|
+
};
|
|
10730
|
+
const handleStart = (e) => {
|
|
10731
|
+
allowTransition.value = true;
|
|
10732
|
+
if (!props2.draggable) return;
|
|
10733
|
+
pauseTimer();
|
|
10734
|
+
start.value = true;
|
|
10735
|
+
startX.value = e.screenX;
|
|
10736
|
+
startY.value = e.screenY;
|
|
10737
|
+
};
|
|
10738
|
+
const handleMove = (e) => {
|
|
10739
|
+
if (!start.value || !props2.draggable) return;
|
|
10740
|
+
offset.value = !props2.vertical ? e.screenX - startX.value : e.screenY - startY.value;
|
|
10741
|
+
resetItems();
|
|
10742
|
+
};
|
|
10743
|
+
const handleEnd = () => {
|
|
10744
|
+
if (!props2.draggable) return;
|
|
10745
|
+
start.value = false;
|
|
10746
|
+
startTimer();
|
|
10747
|
+
const $offset = Math.abs(offset.value);
|
|
10748
|
+
const $direction = offset.value > 0;
|
|
10749
|
+
offset.value = 0;
|
|
10750
|
+
if ($offset > 5) {
|
|
10751
|
+
$direction && prev();
|
|
10752
|
+
!$direction && next();
|
|
10753
|
+
} else {
|
|
10754
|
+
resetItems();
|
|
10755
|
+
}
|
|
10756
|
+
};
|
|
10757
|
+
vue.watch(
|
|
10758
|
+
() => items.value,
|
|
10759
|
+
(v) => {
|
|
10760
|
+
if (v.length > 0) setActiveItem(props2.initialIndex);
|
|
10761
|
+
}
|
|
10762
|
+
);
|
|
10763
|
+
vue.watch(
|
|
10764
|
+
() => activeIndex.value,
|
|
10765
|
+
(v, oldV) => {
|
|
10766
|
+
resetItems(oldV);
|
|
10767
|
+
emit("change", v, oldV);
|
|
10768
|
+
}
|
|
10769
|
+
);
|
|
10770
|
+
vue.watch(
|
|
10771
|
+
() => props2.autoplay,
|
|
10772
|
+
(v) => {
|
|
10773
|
+
v ? startTimer() : pauseTimer();
|
|
10774
|
+
}
|
|
10775
|
+
);
|
|
10776
|
+
vue.watch(
|
|
10777
|
+
() => props2.loop,
|
|
10778
|
+
() => {
|
|
10779
|
+
setActiveItem(activeIndex.value);
|
|
10780
|
+
}
|
|
10781
|
+
);
|
|
10782
|
+
vue.watch(
|
|
10783
|
+
() => props2.t,
|
|
10784
|
+
() => {
|
|
10785
|
+
pauseTimer();
|
|
10786
|
+
startTimer();
|
|
10787
|
+
}
|
|
10788
|
+
);
|
|
10789
|
+
vue.onMounted(() => {
|
|
10790
|
+
vue.nextTick(() => {
|
|
10791
|
+
if (wrapper.value) Resize.on(wrapper.value, resetItems);
|
|
10792
|
+
if (props2.initialIndex < items.value.length && props2.initialIndex >= 0) {
|
|
10793
|
+
activeIndex.value = props2.initialIndex;
|
|
10794
|
+
}
|
|
10795
|
+
startTimer();
|
|
10796
|
+
});
|
|
10797
|
+
});
|
|
10798
|
+
vue.onBeforeUnmount(() => {
|
|
10799
|
+
if (wrapper.value) Resize.off(wrapper.value, resetItems);
|
|
10800
|
+
pauseTimer();
|
|
10801
|
+
startTimer();
|
|
10802
|
+
});
|
|
10803
|
+
const add = (item) => {
|
|
10804
|
+
if (!item) return;
|
|
10805
|
+
vue.nextTick(() => {
|
|
10806
|
+
if (content.value) {
|
|
10807
|
+
const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
|
|
10808
|
+
items.value.splice(index, 0, item);
|
|
10809
|
+
return;
|
|
10810
|
+
}
|
|
10811
|
+
items.value.push(item);
|
|
10812
|
+
});
|
|
10813
|
+
};
|
|
10814
|
+
const remove = (item) => {
|
|
10815
|
+
if (!item) return;
|
|
10816
|
+
items.value.splice(items.value.indexOf(item), 1);
|
|
10817
|
+
};
|
|
10818
|
+
vue.provide("vc-carousel", {
|
|
10819
|
+
props: props2,
|
|
10820
|
+
items,
|
|
10821
|
+
offset,
|
|
10822
|
+
allowTransition,
|
|
10823
|
+
setActiveItem,
|
|
10824
|
+
wrapper,
|
|
10825
|
+
content,
|
|
10826
|
+
add,
|
|
10827
|
+
remove
|
|
10828
|
+
});
|
|
10829
|
+
expose({
|
|
10830
|
+
setActiveItem,
|
|
10831
|
+
prev,
|
|
10832
|
+
next
|
|
10833
|
+
});
|
|
10834
|
+
return {
|
|
10835
|
+
carouselId,
|
|
10836
|
+
allowTransition,
|
|
10837
|
+
items,
|
|
10838
|
+
activeIndex,
|
|
10839
|
+
offset,
|
|
10840
|
+
direction,
|
|
10841
|
+
hasLabel,
|
|
10842
|
+
dotsClasses,
|
|
10843
|
+
start,
|
|
10844
|
+
startX,
|
|
10845
|
+
startY,
|
|
10846
|
+
handleStart,
|
|
10847
|
+
handleMove,
|
|
10848
|
+
handleEnd,
|
|
10849
|
+
handleDotClick,
|
|
10850
|
+
prev,
|
|
10851
|
+
next,
|
|
10852
|
+
setActiveItem,
|
|
10853
|
+
pauseTimer,
|
|
10854
|
+
startTimer
|
|
10855
|
+
};
|
|
10856
|
+
};
|
|
10857
|
+
const props$1j = {
|
|
10858
|
+
t: {
|
|
10859
|
+
type: Number,
|
|
10860
|
+
default: 3e3
|
|
10861
|
+
},
|
|
10862
|
+
card: Boolean,
|
|
10863
|
+
gutter: {
|
|
10864
|
+
type: Number,
|
|
10865
|
+
default: 0
|
|
10866
|
+
},
|
|
10867
|
+
height: [String, Number],
|
|
10868
|
+
initialIndex: {
|
|
10869
|
+
type: Number,
|
|
10870
|
+
default: 0
|
|
10871
|
+
},
|
|
10872
|
+
trigger: {
|
|
10647
10873
|
type: String,
|
|
10648
|
-
default: "
|
|
10874
|
+
default: "hover"
|
|
10875
|
+
},
|
|
10876
|
+
autoplay: {
|
|
10877
|
+
type: Boolean,
|
|
10878
|
+
default: true
|
|
10879
|
+
},
|
|
10880
|
+
dots: {
|
|
10881
|
+
type: [String, Boolean],
|
|
10882
|
+
default: "bottom"
|
|
10883
|
+
// bottom/outside | false
|
|
10884
|
+
},
|
|
10885
|
+
arrow: {
|
|
10886
|
+
type: [String, Boolean],
|
|
10887
|
+
default: "hover"
|
|
10888
|
+
// hover/always | false
|
|
10889
|
+
},
|
|
10890
|
+
loop: {
|
|
10891
|
+
type: Boolean,
|
|
10892
|
+
default: true
|
|
10893
|
+
},
|
|
10894
|
+
vertical: {
|
|
10895
|
+
type: Boolean,
|
|
10896
|
+
default: false
|
|
10897
|
+
},
|
|
10898
|
+
draggable: {
|
|
10899
|
+
type: Boolean,
|
|
10900
|
+
default: true
|
|
10649
10901
|
}
|
|
10650
10902
|
};
|
|
10651
|
-
const COMPONENT_NAME$
|
|
10903
|
+
const COMPONENT_NAME$1$ = "vc-carousel";
|
|
10652
10904
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
10653
|
-
name: COMPONENT_NAME$
|
|
10905
|
+
name: COMPONENT_NAME$1$,
|
|
10906
|
+
props: props$1j,
|
|
10907
|
+
setup(props2, {
|
|
10908
|
+
slots,
|
|
10909
|
+
expose
|
|
10910
|
+
}) {
|
|
10911
|
+
const isHover = vue.ref(false);
|
|
10912
|
+
const wrapper = vue.ref(null);
|
|
10913
|
+
const content = vue.ref(null);
|
|
10914
|
+
const arrowDisplay = vue.computed(() => {
|
|
10915
|
+
return props2.arrow && !props2.vertical;
|
|
10916
|
+
});
|
|
10917
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
10918
|
+
const itemInStage = (item, index, items) => {
|
|
10919
|
+
const length = items.length;
|
|
10920
|
+
const isInStage = item.exposed.isInStage.value;
|
|
10921
|
+
if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
|
|
10922
|
+
return "left";
|
|
10923
|
+
} else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
|
|
10924
|
+
return "right";
|
|
10925
|
+
}
|
|
10926
|
+
return false;
|
|
10927
|
+
};
|
|
10928
|
+
const handleButtonEnter = (arrow) => {
|
|
10929
|
+
if (props2.vertical) return;
|
|
10930
|
+
carousel.items.value.forEach((item, index, items) => {
|
|
10931
|
+
if (arrow === itemInStage(item, index, items)) {
|
|
10932
|
+
item.exposed.isHover.value = true;
|
|
10933
|
+
}
|
|
10934
|
+
});
|
|
10935
|
+
};
|
|
10936
|
+
const handleButtonLeave = () => {
|
|
10937
|
+
if (props2.vertical) return;
|
|
10938
|
+
carousel.items.value.forEach((item) => {
|
|
10939
|
+
item.exposed.isHover.value = false;
|
|
10940
|
+
});
|
|
10941
|
+
};
|
|
10942
|
+
const handleDotHover = (index) => {
|
|
10943
|
+
if (props2.trigger === "hover" && index !== carousel.activeIndex.value) {
|
|
10944
|
+
carousel.activeIndex.value = index;
|
|
10945
|
+
}
|
|
10946
|
+
};
|
|
10947
|
+
const handleMouseEnter = () => {
|
|
10948
|
+
isHover.value = true;
|
|
10949
|
+
carousel.pauseTimer();
|
|
10950
|
+
};
|
|
10951
|
+
const handleMouseLeave = () => {
|
|
10952
|
+
isHover.value = false;
|
|
10953
|
+
carousel.startTimer();
|
|
10954
|
+
};
|
|
10955
|
+
const throttledArrowClick = throttle$1(carousel.setActiveItem);
|
|
10956
|
+
const throttledDotHover = throttle$1(handleDotHover);
|
|
10957
|
+
return () => {
|
|
10958
|
+
return vue.createVNode("div", {
|
|
10959
|
+
"ref": wrapper,
|
|
10960
|
+
"class": ["vc-carousel", `is-${carousel.direction.value}`],
|
|
10961
|
+
"onMousedown": vue.withModifiers(carousel.handleStart, ["stop", "prevent"]),
|
|
10962
|
+
"onMousemove": vue.withModifiers(carousel.handleMove, ["stop", "prevent"]),
|
|
10963
|
+
"onMouseup": vue.withModifiers(carousel.handleEnd, ["stop", "prevent"]),
|
|
10964
|
+
"onMouseenter": vue.withModifiers(handleMouseEnter, ["stop"]),
|
|
10965
|
+
"onMouseleave": vue.withModifiers(handleMouseLeave, ["stop"])
|
|
10966
|
+
}, [vue.createVNode("div", {
|
|
10967
|
+
"ref": content,
|
|
10968
|
+
"class": "vc-carousel__wrapper",
|
|
10969
|
+
"style": {
|
|
10970
|
+
height: props2.height ? `${props2.height}px` : "auto"
|
|
10971
|
+
}
|
|
10972
|
+
}, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
10973
|
+
"mode": "left-part"
|
|
10974
|
+
}, {
|
|
10975
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
10976
|
+
"type": "button",
|
|
10977
|
+
"class": "vc-carousel__arrow is-left-arrow",
|
|
10978
|
+
"onMouseenter": () => handleButtonEnter("left"),
|
|
10979
|
+
"onMouseleave": handleButtonLeave,
|
|
10980
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ["stop"])
|
|
10981
|
+
}, [vue.createVNode(Icon, {
|
|
10982
|
+
"type": "left"
|
|
10983
|
+
}, null)]), [[vue.vShow, (props2.arrow === "always" || isHover.value) && (props2.loop || carousel.activeIndex.value > 0)]])]
|
|
10984
|
+
}), arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
10985
|
+
"mode": "right-part"
|
|
10986
|
+
}, {
|
|
10987
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
10988
|
+
"type": "button",
|
|
10989
|
+
"class": "vc-carousel__arrow is-right-arrow",
|
|
10990
|
+
"onMouseenter": () => handleButtonEnter("right"),
|
|
10991
|
+
"onMouseleave": handleButtonLeave,
|
|
10992
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ["stop"])
|
|
10993
|
+
}, [vue.createVNode(Icon, {
|
|
10994
|
+
"type": "right"
|
|
10995
|
+
}, null)]), [[vue.vShow, (props2.arrow === "always" || isHover.value) && (props2.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
|
|
10996
|
+
}), slots.default?.()]), props2.dots && vue.createVNode("ul", {
|
|
10997
|
+
"class": ["vc-carousel__dots", ...carousel.dotsClasses.value]
|
|
10998
|
+
}, [carousel.items.value.map((item, index) => vue.createVNode("li", {
|
|
10999
|
+
"key": index,
|
|
11000
|
+
"class": ["vc-carousel__dot", `is-${carousel.direction.value}`, {
|
|
11001
|
+
"is-active": index === carousel.activeIndex.value
|
|
11002
|
+
}],
|
|
11003
|
+
"onMouseenter": () => throttledDotHover(index),
|
|
11004
|
+
"onClick": () => carousel.handleDotClick(index)
|
|
11005
|
+
}, [vue.createVNode("button", {
|
|
11006
|
+
"class": "vc-carousel__button"
|
|
11007
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
|
|
11008
|
+
};
|
|
11009
|
+
}
|
|
11010
|
+
});
|
|
11011
|
+
const props$1i = {
|
|
11012
|
+
name: String,
|
|
11013
|
+
label: {
|
|
11014
|
+
type: [String, Number],
|
|
11015
|
+
default: ""
|
|
11016
|
+
},
|
|
11017
|
+
// card大小
|
|
11018
|
+
width: {
|
|
11019
|
+
type: [Number, String],
|
|
11020
|
+
default: "70%"
|
|
11021
|
+
},
|
|
11022
|
+
// card之间间距, 或者滑动时候的间距
|
|
11023
|
+
gutter: {
|
|
11024
|
+
type: Number,
|
|
11025
|
+
default: 0
|
|
11026
|
+
},
|
|
11027
|
+
scale: {
|
|
11028
|
+
type: Number,
|
|
11029
|
+
default: 0.83
|
|
11030
|
+
}
|
|
11031
|
+
};
|
|
11032
|
+
const TRANSFORM = prefixStyle("transform").camel;
|
|
11033
|
+
const useCarouselItem = (expose) => {
|
|
11034
|
+
const instance = vue.getCurrentInstance();
|
|
11035
|
+
const carousel = vue.inject("vc-carousel", {});
|
|
11036
|
+
const props2 = instance.props;
|
|
11037
|
+
const translate = vue.ref(0);
|
|
11038
|
+
const currentScale = vue.ref(1);
|
|
11039
|
+
const isHover = vue.ref(false);
|
|
11040
|
+
const isActive = vue.ref(false);
|
|
11041
|
+
const isReady = vue.ref(false);
|
|
11042
|
+
const isInStage = vue.ref(false);
|
|
11043
|
+
const isAnimating = vue.ref(false);
|
|
11044
|
+
const isVertical = vue.computed(() => {
|
|
11045
|
+
return carousel.props.vertical;
|
|
11046
|
+
});
|
|
11047
|
+
const isCard = vue.computed(() => {
|
|
11048
|
+
return carousel.props.card;
|
|
11049
|
+
});
|
|
11050
|
+
const isMove = vue.computed(() => {
|
|
11051
|
+
return carousel.offset.value !== 0;
|
|
11052
|
+
});
|
|
11053
|
+
const itemGutter = vue.computed(() => {
|
|
11054
|
+
return props2.gutter || carousel.props.gutter || 0;
|
|
11055
|
+
});
|
|
11056
|
+
const itemStyle = vue.computed(() => {
|
|
11057
|
+
const translateType = isVertical.value ? "translateY" : "translateX";
|
|
11058
|
+
if (carousel.props.card) {
|
|
11059
|
+
return {
|
|
11060
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
11061
|
+
width: props2.width
|
|
11062
|
+
};
|
|
11063
|
+
} else {
|
|
11064
|
+
return {
|
|
11065
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
11066
|
+
width: itemGutter.value ? props2.width : "100%"
|
|
11067
|
+
};
|
|
11068
|
+
}
|
|
11069
|
+
});
|
|
11070
|
+
vue.onBeforeMount(() => {
|
|
11071
|
+
carousel.add?.(instance);
|
|
11072
|
+
if (!isCard.value && itemGutter.value && carousel.props.loop) {
|
|
11073
|
+
throw new VcError("carousel", "slide模式下loop不能为true");
|
|
11074
|
+
}
|
|
11075
|
+
});
|
|
11076
|
+
vue.onBeforeUnmount(() => {
|
|
11077
|
+
carousel.remove?.(instance);
|
|
11078
|
+
});
|
|
11079
|
+
const processIndex = (index, activeIndex, length) => {
|
|
11080
|
+
if (activeIndex === 0 && index === length - 1) {
|
|
11081
|
+
return -1;
|
|
11082
|
+
} else if (activeIndex === length - 1 && index === 0) {
|
|
11083
|
+
return length;
|
|
11084
|
+
} else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
|
|
11085
|
+
return length + 1;
|
|
11086
|
+
} else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
|
|
11087
|
+
return -2;
|
|
11088
|
+
}
|
|
11089
|
+
return index;
|
|
11090
|
+
};
|
|
11091
|
+
const calcCardTranslate = (index, activeIndex) => {
|
|
11092
|
+
let value;
|
|
11093
|
+
const widthNumber = +props2.width / 100;
|
|
11094
|
+
const parentW = carousel.wrapper.value.offsetWidth;
|
|
11095
|
+
if (isInStage.value) {
|
|
11096
|
+
if (index === activeIndex) {
|
|
11097
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
11098
|
+
} else if (index > activeIndex) {
|
|
11099
|
+
value = parentW * (1 + widthNumber * props2.scale) / 2 + itemGutter.value;
|
|
11100
|
+
} else {
|
|
11101
|
+
value = -(parentW * ((widthNumber * props2.scale - 1) / 2 + widthNumber)) - itemGutter.value;
|
|
11102
|
+
}
|
|
11103
|
+
} else if (index < activeIndex) {
|
|
11104
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
11105
|
+
} else {
|
|
11106
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
11107
|
+
}
|
|
11108
|
+
return value;
|
|
11109
|
+
};
|
|
11110
|
+
const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
|
|
11111
|
+
const { length } = carousel.items.value;
|
|
11112
|
+
const offset = wrapperWidth - (instance.vnode?.el?.offsetWidth || 0);
|
|
11113
|
+
const gutter = itemGutter.value;
|
|
11114
|
+
if (!gutter || isVertical.value) return 0;
|
|
11115
|
+
let slideOffset = 0;
|
|
11116
|
+
if (length === 1) {
|
|
11117
|
+
return offset / 2;
|
|
11118
|
+
}
|
|
11119
|
+
if (activeIndex == 0) {
|
|
11120
|
+
if (index - activeIndex === 0) {
|
|
11121
|
+
slideOffset = gutter;
|
|
11122
|
+
} else if (index - activeIndex === 1) {
|
|
11123
|
+
slideOffset = -offset + gutter * 2;
|
|
11124
|
+
}
|
|
11125
|
+
}
|
|
11126
|
+
if (activeIndex !== 0 && activeIndex != length - 1) {
|
|
11127
|
+
if (index - activeIndex === 0) {
|
|
11128
|
+
slideOffset = offset / 2;
|
|
11129
|
+
} else if (index - activeIndex === 1) {
|
|
11130
|
+
slideOffset = -offset / 2 + gutter;
|
|
11131
|
+
} else if (index - activeIndex === -1) {
|
|
11132
|
+
slideOffset = offset * 3 / 2 - gutter;
|
|
11133
|
+
}
|
|
11134
|
+
}
|
|
11135
|
+
if (activeIndex == length - 1) {
|
|
11136
|
+
if (index - activeIndex === 0) {
|
|
11137
|
+
slideOffset = offset - gutter;
|
|
11138
|
+
} else if (index - activeIndex === -1) {
|
|
11139
|
+
slideOffset = offset * 2 - gutter * 2;
|
|
11140
|
+
}
|
|
11141
|
+
}
|
|
11142
|
+
return slideOffset;
|
|
11143
|
+
};
|
|
11144
|
+
const calcTranslate = (index, activeIndex) => {
|
|
11145
|
+
const distance = carousel.vnode.el[isVertical.value ? "offsetHeight" : "offsetWidth"];
|
|
11146
|
+
const slideOffset = calcSlideOffset(index, activeIndex, distance);
|
|
11147
|
+
return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
|
|
11148
|
+
};
|
|
11149
|
+
const reset = (index, activeIndex, oldIndex) => {
|
|
11150
|
+
const { length } = carousel.items.value;
|
|
11151
|
+
if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
|
|
11152
|
+
isAnimating.value = index === activeIndex || index === oldIndex;
|
|
11153
|
+
if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
|
|
11154
|
+
isAnimating.value = true;
|
|
11155
|
+
}
|
|
11156
|
+
}
|
|
11157
|
+
if (index !== activeIndex && length > 2 && carousel.props.loop) {
|
|
11158
|
+
index = processIndex(index, activeIndex, length);
|
|
11159
|
+
}
|
|
11160
|
+
if (isCard.value) {
|
|
11161
|
+
if (isVertical.value) {
|
|
11162
|
+
throw new VcError("carousel", "卡片模式不支持垂直方向");
|
|
11163
|
+
}
|
|
11164
|
+
isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
11165
|
+
isActive.value = index === activeIndex;
|
|
11166
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
11167
|
+
currentScale.value = isActive.value ? 1 : props2.scale;
|
|
11168
|
+
} else {
|
|
11169
|
+
isActive.value = index === activeIndex;
|
|
11170
|
+
translate.value = calcTranslate(index, activeIndex);
|
|
11171
|
+
}
|
|
11172
|
+
isReady.value = true;
|
|
11173
|
+
};
|
|
11174
|
+
const handleItemClick = () => {
|
|
11175
|
+
if (parent && isCard.value) {
|
|
11176
|
+
const index = carousel.items.value.indexOf(instance);
|
|
11177
|
+
carousel.setActiveItem(index);
|
|
11178
|
+
}
|
|
11179
|
+
};
|
|
11180
|
+
expose({
|
|
11181
|
+
reset,
|
|
11182
|
+
isInStage,
|
|
11183
|
+
isHover,
|
|
11184
|
+
isActive
|
|
11185
|
+
});
|
|
11186
|
+
return {
|
|
11187
|
+
translate,
|
|
11188
|
+
currentScale,
|
|
11189
|
+
isHover,
|
|
11190
|
+
isActive,
|
|
11191
|
+
isReady,
|
|
11192
|
+
isInStage,
|
|
11193
|
+
isAnimating,
|
|
11194
|
+
isVertical,
|
|
11195
|
+
isCard,
|
|
11196
|
+
isMove,
|
|
11197
|
+
itemGutter,
|
|
11198
|
+
itemStyle,
|
|
11199
|
+
reset,
|
|
11200
|
+
handleItemClick
|
|
11201
|
+
};
|
|
11202
|
+
};
|
|
11203
|
+
const COMPONENT_NAME$1_ = "vc-carousel-item";
|
|
11204
|
+
const CarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
11205
|
+
name: COMPONENT_NAME$1_,
|
|
10654
11206
|
props: props$1i,
|
|
11207
|
+
setup(_, {
|
|
11208
|
+
slots,
|
|
11209
|
+
expose
|
|
11210
|
+
}) {
|
|
11211
|
+
const it = useCarouselItem(expose);
|
|
11212
|
+
return () => {
|
|
11213
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
11214
|
+
"class": ["vc-carousel-item", {
|
|
11215
|
+
"is-active": it.isActive.value,
|
|
11216
|
+
"is-card": it.isCard.value,
|
|
11217
|
+
"is-in-stage": it.isInStage.value,
|
|
11218
|
+
"is-hover": it.isHover.value,
|
|
11219
|
+
"is-animating": it.isAnimating.value && !it.isMove.value
|
|
11220
|
+
}],
|
|
11221
|
+
"style": it.itemStyle.value,
|
|
11222
|
+
"onClick": it.handleItemClick
|
|
11223
|
+
}, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
|
|
11224
|
+
"class": "vc-carousel-item__mask"
|
|
11225
|
+
}, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
11226
|
+
};
|
|
11227
|
+
}
|
|
11228
|
+
});
|
|
11229
|
+
const COMPONENT_NAME$1Z = "vcm-carousel";
|
|
11230
|
+
const MCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
11231
|
+
name: COMPONENT_NAME$1Z,
|
|
11232
|
+
props: {
|
|
11233
|
+
...props$1j,
|
|
11234
|
+
dots: {
|
|
11235
|
+
type: [String, Boolean],
|
|
11236
|
+
default: false
|
|
11237
|
+
},
|
|
11238
|
+
indicator: {
|
|
11239
|
+
type: Boolean,
|
|
11240
|
+
default: true
|
|
11241
|
+
}
|
|
11242
|
+
},
|
|
10655
11243
|
setup(props2, {
|
|
10656
|
-
slots
|
|
11244
|
+
slots,
|
|
11245
|
+
expose
|
|
10657
11246
|
}) {
|
|
11247
|
+
const wrapper = vue.ref(null);
|
|
11248
|
+
const content = vue.ref(null);
|
|
11249
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
11250
|
+
let scrollStatus = 0;
|
|
11251
|
+
const handleTouchStart = (e) => {
|
|
11252
|
+
carousel.handleStart(e.touches[0]);
|
|
11253
|
+
scrollStatus = 0;
|
|
11254
|
+
};
|
|
11255
|
+
const handleTouchMove = (e) => {
|
|
11256
|
+
const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
|
|
11257
|
+
const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
|
|
11258
|
+
if (!props2.vertical && absX > absY && scrollStatus !== 1) {
|
|
11259
|
+
e.preventDefault();
|
|
11260
|
+
carousel.handleMove(e.touches[0]);
|
|
11261
|
+
scrollStatus = 2;
|
|
11262
|
+
return;
|
|
11263
|
+
}
|
|
11264
|
+
if (props2.vertical && absY > absX) {
|
|
11265
|
+
e.preventDefault();
|
|
11266
|
+
carousel.handleMove(e.touches[0]);
|
|
11267
|
+
return;
|
|
11268
|
+
}
|
|
11269
|
+
if (scrollStatus === 0) {
|
|
11270
|
+
scrollStatus = 1;
|
|
11271
|
+
}
|
|
11272
|
+
};
|
|
11273
|
+
const handleTouchEnd = () => {
|
|
11274
|
+
carousel.handleEnd();
|
|
11275
|
+
scrollStatus = 0;
|
|
11276
|
+
};
|
|
10658
11277
|
return () => {
|
|
10659
11278
|
return vue.createVNode("div", {
|
|
10660
|
-
"
|
|
10661
|
-
|
|
11279
|
+
"ref": wrapper,
|
|
11280
|
+
"class": ["vcm-carousel", `is-${carousel.direction.value}`],
|
|
11281
|
+
"onTouchstart": vue.withModifiers(handleTouchStart, ["stop"]),
|
|
11282
|
+
"onTouchmove": vue.withModifiers(handleTouchMove, ["stop"]),
|
|
11283
|
+
"onTouchend": vue.withModifiers(handleTouchEnd, ["stop"])
|
|
11284
|
+
}, [vue.createVNode("div", {
|
|
11285
|
+
"ref": content,
|
|
11286
|
+
"style": {
|
|
11287
|
+
height: props2.height ? `${props2.height}px` : "auto"
|
|
11288
|
+
},
|
|
11289
|
+
"class": "vcm-carousel__wrapper"
|
|
11290
|
+
}, [slots.default?.()]), props2.dots && vue.createVNode("ul", {
|
|
11291
|
+
"class": ["vcm-carousel__dots", ...carousel.dotsClasses.value]
|
|
11292
|
+
}, [carousel.items.value.map((_, index) => vue.createVNode("li", {
|
|
11293
|
+
"key": index,
|
|
11294
|
+
"class": ["vcm-carousel__dot", "is-" + carousel.direction.value, {
|
|
11295
|
+
"is-active": index === carousel.activeIndex.value
|
|
11296
|
+
}],
|
|
11297
|
+
"onClick": (e) => {
|
|
11298
|
+
e.stopPropagation();
|
|
11299
|
+
carousel.handleDotClick(index);
|
|
11300
|
+
}
|
|
11301
|
+
}, [vue.createVNode("button", {
|
|
11302
|
+
"class": "vcm-carousel__button"
|
|
11303
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props2.card && props2.indicator && vue.createVNode("div", {
|
|
11304
|
+
"class": "vcm-carousel__indicator"
|
|
11305
|
+
}, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
|
|
11306
|
+
};
|
|
11307
|
+
}
|
|
11308
|
+
});
|
|
11309
|
+
const COMPONENT_NAME$1Y = "vcm-carousel-item";
|
|
11310
|
+
const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
11311
|
+
name: COMPONENT_NAME$1Y,
|
|
11312
|
+
props: props$1i,
|
|
11313
|
+
setup(_, {
|
|
11314
|
+
slots,
|
|
11315
|
+
expose
|
|
11316
|
+
}) {
|
|
11317
|
+
const it = useCarouselItem(expose);
|
|
11318
|
+
return () => {
|
|
11319
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
11320
|
+
"style": it.itemStyle.value,
|
|
11321
|
+
"class": {
|
|
11322
|
+
"vcm-carousel-item": true,
|
|
11323
|
+
"is-active": it.isActive.value,
|
|
11324
|
+
"is-card": it.isCard.value,
|
|
11325
|
+
"is-animating": it.isAnimating.value && !it.isMove.value,
|
|
11326
|
+
"is-in-stage": it.isInStage.value
|
|
11327
|
+
},
|
|
11328
|
+
"onClick": it.handleItemClick
|
|
11329
|
+
}, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
|
|
11330
|
+
"class": "vcm-carousel-item__mask"
|
|
11331
|
+
}, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
10662
11332
|
};
|
|
10663
11333
|
}
|
|
10664
11334
|
});
|
|
10665
|
-
const MCarousel = Carousel;
|
|
10666
11335
|
const getSelectedData = (value = [], source = []) => {
|
|
10667
11336
|
const label = [];
|
|
10668
11337
|
const data = [];
|
|
@@ -10935,9 +11604,9 @@
|
|
|
10935
11604
|
expose?.(exposed);
|
|
10936
11605
|
return exposed;
|
|
10937
11606
|
};
|
|
10938
|
-
const COMPONENT_NAME$
|
|
11607
|
+
const COMPONENT_NAME$1X = "vc-input";
|
|
10939
11608
|
const Input$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10940
|
-
name: COMPONENT_NAME$
|
|
11609
|
+
name: COMPONENT_NAME$1X,
|
|
10941
11610
|
inheritAttrs: false,
|
|
10942
11611
|
props: {
|
|
10943
11612
|
...props$1h,
|
|
@@ -11268,9 +11937,9 @@
|
|
|
11268
11937
|
handleStepper
|
|
11269
11938
|
};
|
|
11270
11939
|
};
|
|
11271
|
-
const COMPONENT_NAME$
|
|
11940
|
+
const COMPONENT_NAME$1W = "vc-input-number";
|
|
11272
11941
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
11273
|
-
name: COMPONENT_NAME$
|
|
11942
|
+
name: COMPONENT_NAME$1W,
|
|
11274
11943
|
props: props$1g,
|
|
11275
11944
|
inheritAttrs: false,
|
|
11276
11945
|
setup(props2, {
|
|
@@ -11330,9 +11999,9 @@
|
|
|
11330
11999
|
default: true
|
|
11331
12000
|
}
|
|
11332
12001
|
};
|
|
11333
|
-
const COMPONENT_NAME$
|
|
12002
|
+
const COMPONENT_NAME$1V = "vc-input-search";
|
|
11334
12003
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
11335
|
-
name: COMPONENT_NAME$
|
|
12004
|
+
name: COMPONENT_NAME$1V,
|
|
11336
12005
|
props: props$1f,
|
|
11337
12006
|
inheritAttrs: false,
|
|
11338
12007
|
setup(props2, {
|
|
@@ -11720,9 +12389,9 @@
|
|
|
11720
12389
|
default: () => null
|
|
11721
12390
|
}
|
|
11722
12391
|
};
|
|
11723
|
-
const COMPONENT_NAME$
|
|
12392
|
+
const COMPONENT_NAME$1U = "vc-customer";
|
|
11724
12393
|
const Customer = vue.defineComponent({
|
|
11725
|
-
name: COMPONENT_NAME$
|
|
12394
|
+
name: COMPONENT_NAME$1U,
|
|
11726
12395
|
props: props$1c,
|
|
11727
12396
|
setup(props2, context) {
|
|
11728
12397
|
return () => vue.h(() => {
|
|
@@ -11795,7 +12464,7 @@
|
|
|
11795
12464
|
return this.target.finally(callback);
|
|
11796
12465
|
}
|
|
11797
12466
|
}
|
|
11798
|
-
const COMPONENT_NAME$
|
|
12467
|
+
const COMPONENT_NAME$1T = "vc-portal";
|
|
11799
12468
|
class Portal {
|
|
11800
12469
|
/**
|
|
11801
12470
|
* 清理Portals类型组件
|
|
@@ -11845,7 +12514,7 @@
|
|
|
11845
12514
|
this.wrapper = wrapper;
|
|
11846
12515
|
this.globalOptions = {
|
|
11847
12516
|
...options,
|
|
11848
|
-
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$
|
|
12517
|
+
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1T)
|
|
11849
12518
|
};
|
|
11850
12519
|
}
|
|
11851
12520
|
popup(propsData, options) {
|
|
@@ -11938,12 +12607,12 @@
|
|
|
11938
12607
|
components,
|
|
11939
12608
|
uses,
|
|
11940
12609
|
slots,
|
|
11941
|
-
parent,
|
|
12610
|
+
parent: parent2,
|
|
11942
12611
|
propsData,
|
|
11943
12612
|
...rest
|
|
11944
12613
|
} = options;
|
|
11945
12614
|
let useAllNodes = fragment;
|
|
11946
|
-
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$
|
|
12615
|
+
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1T)}` : name$;
|
|
11947
12616
|
const container = document.createElement(tag);
|
|
11948
12617
|
const root = typeof el2 === "object" ? el2 : document.querySelector(el2 || "body");
|
|
11949
12618
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -11977,8 +12646,8 @@
|
|
|
11977
12646
|
} else {
|
|
11978
12647
|
const wrapper = this.wrapper;
|
|
11979
12648
|
const app = vue.createApp({
|
|
11980
|
-
name: COMPONENT_NAME$
|
|
11981
|
-
parent,
|
|
12649
|
+
name: COMPONENT_NAME$1T,
|
|
12650
|
+
parent: parent2,
|
|
11982
12651
|
setup() {
|
|
11983
12652
|
if (alive) {
|
|
11984
12653
|
const handleExtra = (e) => {
|
|
@@ -12086,9 +12755,9 @@
|
|
|
12086
12755
|
default: "div"
|
|
12087
12756
|
}
|
|
12088
12757
|
};
|
|
12089
|
-
const COMPONENT_NAME$
|
|
12758
|
+
const COMPONENT_NAME$1S = "vc-portal-view";
|
|
12090
12759
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
12091
|
-
name: COMPONENT_NAME$
|
|
12760
|
+
name: COMPONENT_NAME$1S,
|
|
12092
12761
|
props: props$1b,
|
|
12093
12762
|
setup(props2, {
|
|
12094
12763
|
slots
|
|
@@ -12102,9 +12771,9 @@
|
|
|
12102
12771
|
};
|
|
12103
12772
|
}
|
|
12104
12773
|
});
|
|
12105
|
-
const COMPONENT_NAME$
|
|
12774
|
+
const COMPONENT_NAME$1R = "vc-popover-wrapper";
|
|
12106
12775
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
12107
|
-
name: COMPONENT_NAME$
|
|
12776
|
+
name: COMPONENT_NAME$1R,
|
|
12108
12777
|
props: props$1e,
|
|
12109
12778
|
emits: ["portal-fulfilled", "close"],
|
|
12110
12779
|
setup(props2, {
|
|
@@ -12326,9 +12995,9 @@
|
|
|
12326
12995
|
const PopoverPortal = new Portal(PopoverWrapper, {
|
|
12327
12996
|
leaveDelay: 0
|
|
12328
12997
|
});
|
|
12329
|
-
const COMPONENT_NAME$
|
|
12998
|
+
const COMPONENT_NAME$1Q = "vc-popover";
|
|
12330
12999
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
12331
|
-
name: COMPONENT_NAME$
|
|
13000
|
+
name: COMPONENT_NAME$1Q,
|
|
12332
13001
|
props: props$1d,
|
|
12333
13002
|
emits: ["update:modelValue", "visible-change", "ready", "close"],
|
|
12334
13003
|
setup(props2, {
|
|
@@ -12456,9 +13125,9 @@
|
|
|
12456
13125
|
const Popover = Object.assign(Popover$1, {
|
|
12457
13126
|
open: PopoverPortal.popup.bind(PopoverPortal)
|
|
12458
13127
|
});
|
|
12459
|
-
const COMPONENT_NAME$
|
|
13128
|
+
const COMPONENT_NAME$1P = "vc-cascader-column";
|
|
12460
13129
|
const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
|
|
12461
|
-
name: COMPONENT_NAME$
|
|
13130
|
+
name: COMPONENT_NAME$1P,
|
|
12462
13131
|
emits: ["click", "change"],
|
|
12463
13132
|
props: {
|
|
12464
13133
|
data: {
|
|
@@ -12661,9 +13330,9 @@
|
|
|
12661
13330
|
default: true
|
|
12662
13331
|
}
|
|
12663
13332
|
};
|
|
12664
|
-
const COMPONENT_NAME$
|
|
13333
|
+
const COMPONENT_NAME$1O = "vc-cascader";
|
|
12665
13334
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
12666
|
-
name: COMPONENT_NAME$
|
|
13335
|
+
name: COMPONENT_NAME$1O,
|
|
12667
13336
|
inheritAttrs: false,
|
|
12668
13337
|
props: props$19,
|
|
12669
13338
|
emits: ["update:modelValue", "visible-change", "ready", "change", "close"],
|
|
@@ -12950,9 +13619,9 @@
|
|
|
12950
13619
|
watchShallow: Boolean,
|
|
12951
13620
|
manualUpdate: Boolean
|
|
12952
13621
|
};
|
|
12953
|
-
const COMPONENT_NAME$
|
|
13622
|
+
const COMPONENT_NAME$1N = "vc-chart";
|
|
12954
13623
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
12955
|
-
name: COMPONENT_NAME$
|
|
13624
|
+
name: COMPONENT_NAME$1N,
|
|
12956
13625
|
props: props$18,
|
|
12957
13626
|
emits: [...EVENTS$1, "ready"],
|
|
12958
13627
|
setup(props2, {
|
|
@@ -13179,9 +13848,9 @@
|
|
|
13179
13848
|
computedLabel
|
|
13180
13849
|
};
|
|
13181
13850
|
};
|
|
13182
|
-
const COMPONENT_NAME$
|
|
13851
|
+
const COMPONENT_NAME$1M = "vc-checkbox";
|
|
13183
13852
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
13184
|
-
name: COMPONENT_NAME$
|
|
13853
|
+
name: COMPONENT_NAME$1M,
|
|
13185
13854
|
props: props$17,
|
|
13186
13855
|
emits: ["update:modelValue", "change"],
|
|
13187
13856
|
setup(props2, {
|
|
@@ -13263,9 +13932,9 @@
|
|
|
13263
13932
|
reset
|
|
13264
13933
|
};
|
|
13265
13934
|
};
|
|
13266
|
-
const COMPONENT_NAME$
|
|
13935
|
+
const COMPONENT_NAME$1L = "vc-checkbox-group";
|
|
13267
13936
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
13268
|
-
name: COMPONENT_NAME$
|
|
13937
|
+
name: COMPONENT_NAME$1L,
|
|
13269
13938
|
props: props$16,
|
|
13270
13939
|
emits: ["update:modelValue", "change"],
|
|
13271
13940
|
setup(props2, {
|
|
@@ -13280,9 +13949,9 @@
|
|
|
13280
13949
|
};
|
|
13281
13950
|
}
|
|
13282
13951
|
});
|
|
13283
|
-
const COMPONENT_NAME$
|
|
13952
|
+
const COMPONENT_NAME$1K = "vcm-checkbox";
|
|
13284
13953
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
13285
|
-
name: COMPONENT_NAME$
|
|
13954
|
+
name: COMPONENT_NAME$1K,
|
|
13286
13955
|
props: props$17,
|
|
13287
13956
|
emits: ["update:modelValue", "change"],
|
|
13288
13957
|
setup(props2, {
|
|
@@ -13319,9 +13988,9 @@
|
|
|
13319
13988
|
};
|
|
13320
13989
|
}
|
|
13321
13990
|
});
|
|
13322
|
-
const COMPONENT_NAME$
|
|
13991
|
+
const COMPONENT_NAME$1J = "vcm-checkbox-group";
|
|
13323
13992
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
13324
|
-
name: COMPONENT_NAME$
|
|
13993
|
+
name: COMPONENT_NAME$1J,
|
|
13325
13994
|
props: props$16,
|
|
13326
13995
|
emits: ["update:modelValue", "change"],
|
|
13327
13996
|
setup(props2, {
|
|
@@ -13371,9 +14040,9 @@
|
|
|
13371
14040
|
// 这个相当于Modal中的onCancel,支持Promise
|
|
13372
14041
|
onBeforeClose: Function
|
|
13373
14042
|
};
|
|
13374
|
-
const COMPONENT_NAME$
|
|
14043
|
+
const COMPONENT_NAME$1I = "vc-message";
|
|
13375
14044
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
13376
|
-
name: COMPONENT_NAME$
|
|
14045
|
+
name: COMPONENT_NAME$1I,
|
|
13377
14046
|
emits: ["before-close", "close", "portal-fulfilled"],
|
|
13378
14047
|
props: props$15,
|
|
13379
14048
|
setup(props2, {
|
|
@@ -13616,9 +14285,9 @@
|
|
|
13616
14285
|
};
|
|
13617
14286
|
return () => vue.h(props2.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
13618
14287
|
};
|
|
13619
|
-
const COMPONENT_NAME$
|
|
14288
|
+
const COMPONENT_NAME$1H = "vc-clipboard";
|
|
13620
14289
|
const Clipboard$1 = vue.defineComponent({
|
|
13621
|
-
name: COMPONENT_NAME$
|
|
14290
|
+
name: COMPONENT_NAME$1H,
|
|
13622
14291
|
props: props$14,
|
|
13623
14292
|
setup() {
|
|
13624
14293
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -13650,9 +14319,9 @@
|
|
|
13650
14319
|
const MTransitionScale = TransitionScale;
|
|
13651
14320
|
const MTransitionSlide = TransitionSlide;
|
|
13652
14321
|
const MTransitionZoom = TransitionZoom;
|
|
13653
|
-
const COMPONENT_NAME$
|
|
14322
|
+
const COMPONENT_NAME$1G = "vcm-toast";
|
|
13654
14323
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
13655
|
-
name: COMPONENT_NAME$
|
|
14324
|
+
name: COMPONENT_NAME$1G,
|
|
13656
14325
|
emits: ["close", "portal-fulfilled"],
|
|
13657
14326
|
props: props$13,
|
|
13658
14327
|
setup(props2, {
|
|
@@ -13751,9 +14420,9 @@
|
|
|
13751
14420
|
const warning$2 = create$3({ mode: "warning" });
|
|
13752
14421
|
const error$2 = create$3({ mode: "error" });
|
|
13753
14422
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
|
|
13754
|
-
const COMPONENT_NAME$
|
|
14423
|
+
const COMPONENT_NAME$1F = "vcm-clipboard";
|
|
13755
14424
|
const MClipboard$1 = vue.defineComponent({
|
|
13756
|
-
name: COMPONENT_NAME$
|
|
14425
|
+
name: COMPONENT_NAME$1F,
|
|
13757
14426
|
props: props$14,
|
|
13758
14427
|
setup() {
|
|
13759
14428
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -13782,9 +14451,9 @@
|
|
|
13782
14451
|
default: false
|
|
13783
14452
|
}
|
|
13784
14453
|
};
|
|
13785
|
-
const COMPONENT_NAME$
|
|
14454
|
+
const COMPONENT_NAME$1E = "vc-collapse";
|
|
13786
14455
|
const Collapse = vue.defineComponent({
|
|
13787
|
-
name: COMPONENT_NAME$
|
|
14456
|
+
name: COMPONENT_NAME$1E,
|
|
13788
14457
|
props: props$12,
|
|
13789
14458
|
emits: ["update:moodelValue", "change"],
|
|
13790
14459
|
setup(props2, { slots, emit }) {
|
|
@@ -13896,9 +14565,9 @@
|
|
|
13896
14565
|
function _isSlot$3(s) {
|
|
13897
14566
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13898
14567
|
}
|
|
13899
|
-
const COMPONENT_NAME$
|
|
14568
|
+
const COMPONENT_NAME$1D = "vc-expand";
|
|
13900
14569
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
13901
|
-
name: COMPONENT_NAME$
|
|
14570
|
+
name: COMPONENT_NAME$1D,
|
|
13902
14571
|
props: props$10,
|
|
13903
14572
|
setup(props2, {
|
|
13904
14573
|
slots
|
|
@@ -13925,9 +14594,9 @@
|
|
|
13925
14594
|
};
|
|
13926
14595
|
}
|
|
13927
14596
|
});
|
|
13928
|
-
const COMPONENT_NAME$
|
|
14597
|
+
const COMPONENT_NAME$1C = "vc-collapse-item";
|
|
13929
14598
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
13930
|
-
name: COMPONENT_NAME$
|
|
14599
|
+
name: COMPONENT_NAME$1C,
|
|
13931
14600
|
props: props$11,
|
|
13932
14601
|
setup(props2, {
|
|
13933
14602
|
slots,
|
|
@@ -13997,9 +14666,9 @@
|
|
|
13997
14666
|
default: "div"
|
|
13998
14667
|
}
|
|
13999
14668
|
};
|
|
14000
|
-
const COMPONENT_NAME$
|
|
14669
|
+
const COMPONENT_NAME$1B = "vc-color-picker";
|
|
14001
14670
|
const ColorPicker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
14002
|
-
name: COMPONENT_NAME$
|
|
14671
|
+
name: COMPONENT_NAME$1B,
|
|
14003
14672
|
props: props$$,
|
|
14004
14673
|
setup(props2, {
|
|
14005
14674
|
slots
|
|
@@ -14056,9 +14725,9 @@
|
|
|
14056
14725
|
function _isSlot$2(s) {
|
|
14057
14726
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
14058
14727
|
}
|
|
14059
|
-
const COMPONENT_NAME$
|
|
14728
|
+
const COMPONENT_NAME$1A = "vc-countdown";
|
|
14060
14729
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
14061
|
-
name: COMPONENT_NAME$
|
|
14730
|
+
name: COMPONENT_NAME$1A,
|
|
14062
14731
|
props: props$_,
|
|
14063
14732
|
emits: ["change", "complete", "error"],
|
|
14064
14733
|
setup(props2, {
|
|
@@ -14070,6 +14739,7 @@
|
|
|
14070
14739
|
const minute = vue.ref("");
|
|
14071
14740
|
const second = vue.ref("");
|
|
14072
14741
|
const millisecond = vue.ref("");
|
|
14742
|
+
const isComplete = vue.ref(false);
|
|
14073
14743
|
const showResult = vue.computed(() => {
|
|
14074
14744
|
return !props2.render && !slots.default;
|
|
14075
14745
|
});
|
|
@@ -14135,15 +14805,18 @@
|
|
|
14135
14805
|
millisecond.value = String(Math.floor(timestamp % 1e3 / (1e3 / msDividend.value)));
|
|
14136
14806
|
if (timestamp <= 0) {
|
|
14137
14807
|
stop();
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
|
-
|
|
14808
|
+
if (!isComplete.value) {
|
|
14809
|
+
isComplete.value = true;
|
|
14810
|
+
emit("change", {
|
|
14811
|
+
timestamp: 0,
|
|
14812
|
+
day: "00",
|
|
14813
|
+
hour: "00",
|
|
14814
|
+
minute: "00",
|
|
14815
|
+
second: "00",
|
|
14816
|
+
millisecond: "00"
|
|
14817
|
+
});
|
|
14818
|
+
emit("complete");
|
|
14819
|
+
}
|
|
14147
14820
|
} else {
|
|
14148
14821
|
emit("change", {
|
|
14149
14822
|
timestamp,
|
|
@@ -14158,6 +14831,8 @@
|
|
|
14158
14831
|
const start = () => {
|
|
14159
14832
|
if (targetTimestamp.value) {
|
|
14160
14833
|
timer && clearInterval(timer);
|
|
14834
|
+
isComplete.value = false;
|
|
14835
|
+
run();
|
|
14161
14836
|
timer = setInterval(run, T.value);
|
|
14162
14837
|
}
|
|
14163
14838
|
};
|
|
@@ -14314,9 +14989,9 @@
|
|
|
14314
14989
|
function _isSlot$1(s) {
|
|
14315
14990
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
14316
14991
|
}
|
|
14317
|
-
const COMPONENT_NAME$
|
|
14992
|
+
const COMPONENT_NAME$1z = "vc-counter";
|
|
14318
14993
|
const Counter = /* @__PURE__ */ vue.defineComponent({
|
|
14319
|
-
name: COMPONENT_NAME$
|
|
14994
|
+
name: COMPONENT_NAME$1z,
|
|
14320
14995
|
props: props$Z,
|
|
14321
14996
|
emits: ["begin", "complete", "change"],
|
|
14322
14997
|
setup(props2, {
|
|
@@ -15564,9 +16239,9 @@
|
|
|
15564
16239
|
}
|
|
15565
16240
|
return view;
|
|
15566
16241
|
};
|
|
15567
|
-
const COMPONENT_NAME$
|
|
16242
|
+
const COMPONENT_NAME$1y = "vc-date-confirm";
|
|
15568
16243
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
15569
|
-
name: COMPONENT_NAME$
|
|
16244
|
+
name: COMPONENT_NAME$1y,
|
|
15570
16245
|
props: {
|
|
15571
16246
|
showTime: {
|
|
15572
16247
|
type: Boolean,
|
|
@@ -15627,9 +16302,9 @@
|
|
|
15627
16302
|
};
|
|
15628
16303
|
}
|
|
15629
16304
|
});
|
|
15630
|
-
const COMPONENT_NAME$
|
|
16305
|
+
const COMPONENT_NAME$1x = "vc-date-header";
|
|
15631
16306
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
15632
|
-
name: COMPONENT_NAME$
|
|
16307
|
+
name: COMPONENT_NAME$1x,
|
|
15633
16308
|
props: {
|
|
15634
16309
|
panelDate: Date,
|
|
15635
16310
|
showNext: {
|
|
@@ -15710,9 +16385,9 @@
|
|
|
15710
16385
|
};
|
|
15711
16386
|
}
|
|
15712
16387
|
});
|
|
15713
|
-
const COMPONENT_NAME$
|
|
16388
|
+
const COMPONENT_NAME$1w = "vc-date-table";
|
|
15714
16389
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
15715
|
-
name: COMPONENT_NAME$
|
|
16390
|
+
name: COMPONENT_NAME$1w,
|
|
15716
16391
|
props: {
|
|
15717
16392
|
value: Array,
|
|
15718
16393
|
firstDayOfWeek: {
|
|
@@ -15912,9 +16587,9 @@
|
|
|
15912
16587
|
};
|
|
15913
16588
|
}
|
|
15914
16589
|
});
|
|
15915
|
-
const COMPONENT_NAME$
|
|
16590
|
+
const COMPONENT_NAME$1v = "vc-month-table";
|
|
15916
16591
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
15917
|
-
name: COMPONENT_NAME$
|
|
16592
|
+
name: COMPONENT_NAME$1v,
|
|
15918
16593
|
props: {
|
|
15919
16594
|
value: Array,
|
|
15920
16595
|
panelDate: Date,
|
|
@@ -16040,7 +16715,7 @@
|
|
|
16040
16715
|
};
|
|
16041
16716
|
}
|
|
16042
16717
|
});
|
|
16043
|
-
const COMPONENT_NAME$
|
|
16718
|
+
const COMPONENT_NAME$1u = "vc-quarter-table";
|
|
16044
16719
|
const getMonthRange = (panelDate, quarter) => {
|
|
16045
16720
|
const year = panelDate.getFullYear();
|
|
16046
16721
|
const [startMonth, endMonth] = [quarter * 3, quarter * 3 + 2];
|
|
@@ -16067,7 +16742,7 @@
|
|
|
16067
16742
|
}
|
|
16068
16743
|
};
|
|
16069
16744
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
16070
|
-
name: COMPONENT_NAME$
|
|
16745
|
+
name: COMPONENT_NAME$1u,
|
|
16071
16746
|
props: {
|
|
16072
16747
|
value: Array,
|
|
16073
16748
|
panelDate: Date,
|
|
@@ -16185,9 +16860,9 @@
|
|
|
16185
16860
|
};
|
|
16186
16861
|
}
|
|
16187
16862
|
});
|
|
16188
|
-
const COMPONENT_NAME$
|
|
16863
|
+
const COMPONENT_NAME$1t = "vc-shortcuts-select";
|
|
16189
16864
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
16190
|
-
name: COMPONENT_NAME$
|
|
16865
|
+
name: COMPONENT_NAME$1t,
|
|
16191
16866
|
props: {
|
|
16192
16867
|
panelDate: Date,
|
|
16193
16868
|
config: Array,
|
|
@@ -16224,9 +16899,9 @@
|
|
|
16224
16899
|
};
|
|
16225
16900
|
}
|
|
16226
16901
|
});
|
|
16227
|
-
const COMPONENT_NAME$
|
|
16902
|
+
const COMPONENT_NAME$1s = "vc-time-select";
|
|
16228
16903
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
16229
|
-
name: COMPONENT_NAME$
|
|
16904
|
+
name: COMPONENT_NAME$1s,
|
|
16230
16905
|
props: {
|
|
16231
16906
|
hours: {
|
|
16232
16907
|
type: [Number, String],
|
|
@@ -16502,9 +17177,9 @@
|
|
|
16502
17177
|
};
|
|
16503
17178
|
}
|
|
16504
17179
|
});
|
|
16505
|
-
const COMPONENT_NAME$
|
|
17180
|
+
const COMPONENT_NAME$1r = "vc-year-table";
|
|
16506
17181
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
16507
|
-
name: COMPONENT_NAME$
|
|
17182
|
+
name: COMPONENT_NAME$1r,
|
|
16508
17183
|
props: {
|
|
16509
17184
|
value: Array,
|
|
16510
17185
|
panelDate: Date,
|
|
@@ -16620,9 +17295,9 @@
|
|
|
16620
17295
|
}
|
|
16621
17296
|
return true;
|
|
16622
17297
|
};
|
|
16623
|
-
const COMPONENT_NAME$
|
|
17298
|
+
const COMPONENT_NAME$1q = "vc-date-range-panel";
|
|
16624
17299
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
16625
|
-
name: COMPONENT_NAME$
|
|
17300
|
+
name: COMPONENT_NAME$1q,
|
|
16626
17301
|
props: {
|
|
16627
17302
|
...props$W,
|
|
16628
17303
|
confirm: {
|
|
@@ -16983,9 +17658,9 @@
|
|
|
16983
17658
|
};
|
|
16984
17659
|
}
|
|
16985
17660
|
});
|
|
16986
|
-
const COMPONENT_NAME$
|
|
17661
|
+
const COMPONENT_NAME$1p = "vc-date-panel";
|
|
16987
17662
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
16988
|
-
name: COMPONENT_NAME$
|
|
17663
|
+
name: COMPONENT_NAME$1p,
|
|
16989
17664
|
props: {
|
|
16990
17665
|
...props$W,
|
|
16991
17666
|
type: String,
|
|
@@ -17184,9 +17859,9 @@
|
|
|
17184
17859
|
const endYear = value[1].getFullYear();
|
|
17185
17860
|
return startYear === endYear;
|
|
17186
17861
|
};
|
|
17187
|
-
const COMPONENT_NAME$
|
|
17862
|
+
const COMPONENT_NAME$1o = "vc-monthrange-panel";
|
|
17188
17863
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17189
|
-
name: COMPONENT_NAME$
|
|
17864
|
+
name: COMPONENT_NAME$1o,
|
|
17190
17865
|
props: {
|
|
17191
17866
|
...props$W,
|
|
17192
17867
|
confirm: {
|
|
@@ -17356,9 +18031,9 @@
|
|
|
17356
18031
|
const endYear = value[1].getFullYear();
|
|
17357
18032
|
return startYear === endYear;
|
|
17358
18033
|
};
|
|
17359
|
-
const COMPONENT_NAME$
|
|
18034
|
+
const COMPONENT_NAME$1n = "vc-quarterrange-panel";
|
|
17360
18035
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17361
|
-
name: COMPONENT_NAME$
|
|
18036
|
+
name: COMPONENT_NAME$1n,
|
|
17362
18037
|
props: {
|
|
17363
18038
|
...props$W,
|
|
17364
18039
|
confirm: {
|
|
@@ -17589,9 +18264,9 @@
|
|
|
17589
18264
|
seconds
|
|
17590
18265
|
};
|
|
17591
18266
|
};
|
|
17592
|
-
const COMPONENT_NAME$
|
|
18267
|
+
const COMPONENT_NAME$1m = "vc-timerange-panel";
|
|
17593
18268
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17594
|
-
name: COMPONENT_NAME$
|
|
18269
|
+
name: COMPONENT_NAME$1m,
|
|
17595
18270
|
props: props$V,
|
|
17596
18271
|
emits: ["pick", "clear", "ok"],
|
|
17597
18272
|
setup(props2, {
|
|
@@ -17689,9 +18364,9 @@
|
|
|
17689
18364
|
};
|
|
17690
18365
|
}
|
|
17691
18366
|
});
|
|
17692
|
-
const COMPONENT_NAME$
|
|
18367
|
+
const COMPONENT_NAME$1l = "vc-time-panel";
|
|
17693
18368
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17694
|
-
name: COMPONENT_NAME$
|
|
18369
|
+
name: COMPONENT_NAME$1l,
|
|
17695
18370
|
props: props$V,
|
|
17696
18371
|
emits: ["pick", "clear", "ok"],
|
|
17697
18372
|
setup(props2, {
|
|
@@ -17743,7 +18418,7 @@
|
|
|
17743
18418
|
};
|
|
17744
18419
|
}
|
|
17745
18420
|
});
|
|
17746
|
-
const COMPONENT_NAME$
|
|
18421
|
+
const COMPONENT_NAME$1k = "vc-date-picker";
|
|
17747
18422
|
const getPanel$1 = (type) => {
|
|
17748
18423
|
if (["daterange", "datetimerange"].includes(type)) {
|
|
17749
18424
|
return DateRangePanel;
|
|
@@ -17754,7 +18429,7 @@
|
|
|
17754
18429
|
}
|
|
17755
18430
|
return DatePanel;
|
|
17756
18431
|
};
|
|
17757
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
18432
|
+
const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
|
|
17758
18433
|
const props2 = vue.getCurrentInstance().props;
|
|
17759
18434
|
const icon = vue.ref("date");
|
|
17760
18435
|
const panel = vue.shallowRef({});
|
|
@@ -17790,9 +18465,9 @@
|
|
|
17790
18465
|
}
|
|
17791
18466
|
}
|
|
17792
18467
|
};
|
|
17793
|
-
const COMPONENT_NAME$
|
|
18468
|
+
const COMPONENT_NAME$1j = "vc-divider";
|
|
17794
18469
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
17795
|
-
name: COMPONENT_NAME$
|
|
18470
|
+
name: COMPONENT_NAME$1j,
|
|
17796
18471
|
props: props$U,
|
|
17797
18472
|
setup(props2, {
|
|
17798
18473
|
slots
|
|
@@ -17921,7 +18596,7 @@
|
|
|
17921
18596
|
barTo: props$S.to,
|
|
17922
18597
|
...pick(props$S, barKeys)
|
|
17923
18598
|
};
|
|
17924
|
-
const COMPONENT_NAME$
|
|
18599
|
+
const COMPONENT_NAME$1i = "vc-scroller-track";
|
|
17925
18600
|
const BAR_MAP = {
|
|
17926
18601
|
vertical: {
|
|
17927
18602
|
scroll: "scrollTop",
|
|
@@ -17941,7 +18616,7 @@
|
|
|
17941
18616
|
}
|
|
17942
18617
|
};
|
|
17943
18618
|
const Track$1 = /* @__PURE__ */ vue.defineComponent({
|
|
17944
|
-
name: COMPONENT_NAME$
|
|
18619
|
+
name: COMPONENT_NAME$1i,
|
|
17945
18620
|
props: props$T,
|
|
17946
18621
|
emits: ["change"],
|
|
17947
18622
|
inheritAttrs: false,
|
|
@@ -18103,9 +18778,9 @@
|
|
|
18103
18778
|
};
|
|
18104
18779
|
}
|
|
18105
18780
|
});
|
|
18106
|
-
const COMPONENT_NAME$
|
|
18781
|
+
const COMPONENT_NAME$1h = "vc-scroller-bar";
|
|
18107
18782
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
18108
|
-
name: COMPONENT_NAME$
|
|
18783
|
+
name: COMPONENT_NAME$1h,
|
|
18109
18784
|
props: props$S,
|
|
18110
18785
|
emits: ["change"],
|
|
18111
18786
|
setup(props2, {
|
|
@@ -18336,9 +19011,9 @@
|
|
|
18336
19011
|
refreshPosition
|
|
18337
19012
|
};
|
|
18338
19013
|
};
|
|
18339
|
-
const COMPONENT_NAME$
|
|
19014
|
+
const COMPONENT_NAME$1g = "vc-scroller";
|
|
18340
19015
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
18341
|
-
name: COMPONENT_NAME$
|
|
19016
|
+
name: COMPONENT_NAME$1g,
|
|
18342
19017
|
props: props$R,
|
|
18343
19018
|
emits: ["scroll"],
|
|
18344
19019
|
setup(props2, {
|
|
@@ -18396,9 +19071,9 @@
|
|
|
18396
19071
|
};
|
|
18397
19072
|
}
|
|
18398
19073
|
});
|
|
18399
|
-
const COMPONENT_NAME$
|
|
19074
|
+
const COMPONENT_NAME$1f = "vc-scroller-wheel";
|
|
18400
19075
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
18401
|
-
name: COMPONENT_NAME$
|
|
19076
|
+
name: COMPONENT_NAME$1f,
|
|
18402
19077
|
props: Object.assign({}, props$R, {
|
|
18403
19078
|
stopPropagation: {
|
|
18404
19079
|
type: Boolean,
|
|
@@ -18579,9 +19254,9 @@
|
|
|
18579
19254
|
type: Function
|
|
18580
19255
|
}
|
|
18581
19256
|
};
|
|
18582
|
-
const COMPONENT_NAME$
|
|
19257
|
+
const COMPONENT_NAME$1e = "vc-drawer";
|
|
18583
19258
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
18584
|
-
name: COMPONENT_NAME$
|
|
19259
|
+
name: COMPONENT_NAME$1e,
|
|
18585
19260
|
props: props$Q,
|
|
18586
19261
|
emits: ["close", "update:modelValue", "visible-change"],
|
|
18587
19262
|
setup(props2, {
|
|
@@ -18753,9 +19428,9 @@
|
|
|
18753
19428
|
default: false
|
|
18754
19429
|
}
|
|
18755
19430
|
};
|
|
18756
|
-
const COMPONENT_NAME$
|
|
19431
|
+
const COMPONENT_NAME$1d = "vc-dropdown";
|
|
18757
19432
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
18758
|
-
name: COMPONENT_NAME$
|
|
19433
|
+
name: COMPONENT_NAME$1d,
|
|
18759
19434
|
props: props$P,
|
|
18760
19435
|
inheritAttrs: false,
|
|
18761
19436
|
emits: ["update:modelValue", "ready", "close", "visible-change", "click"],
|
|
@@ -18818,9 +19493,9 @@
|
|
|
18818
19493
|
};
|
|
18819
19494
|
}
|
|
18820
19495
|
});
|
|
18821
|
-
const COMPONENT_NAME$
|
|
19496
|
+
const COMPONENT_NAME$1c = "vc-dropdown-menu";
|
|
18822
19497
|
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
18823
|
-
name: COMPONENT_NAME$
|
|
19498
|
+
name: COMPONENT_NAME$1c,
|
|
18824
19499
|
setup(_, {
|
|
18825
19500
|
slots
|
|
18826
19501
|
}) {
|
|
@@ -18831,9 +19506,9 @@
|
|
|
18831
19506
|
};
|
|
18832
19507
|
}
|
|
18833
19508
|
});
|
|
18834
|
-
const COMPONENT_NAME$
|
|
19509
|
+
const COMPONENT_NAME$1b = "vc-dropdown-item";
|
|
18835
19510
|
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
18836
|
-
name: COMPONENT_NAME$
|
|
19511
|
+
name: COMPONENT_NAME$1b,
|
|
18837
19512
|
emits: ["click"],
|
|
18838
19513
|
props: {
|
|
18839
19514
|
value: {
|
|
@@ -19032,9 +19707,9 @@
|
|
|
19032
19707
|
["link", "upload/video", "upload/image", "undo", "redo"]
|
|
19033
19708
|
]
|
|
19034
19709
|
};
|
|
19035
|
-
const COMPONENT_NAME$
|
|
19710
|
+
const COMPONENT_NAME$1a = "vc-editor-toolbar";
|
|
19036
19711
|
const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
19037
|
-
name: COMPONENT_NAME$
|
|
19712
|
+
name: COMPONENT_NAME$1a,
|
|
19038
19713
|
props: {
|
|
19039
19714
|
options: [Array, Object],
|
|
19040
19715
|
elementId: String
|
|
@@ -19234,9 +19909,9 @@
|
|
|
19234
19909
|
default: "div"
|
|
19235
19910
|
}
|
|
19236
19911
|
};
|
|
19237
|
-
const COMPONENT_NAME$
|
|
19912
|
+
const COMPONENT_NAME$19 = "vc-image-preview";
|
|
19238
19913
|
const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19239
|
-
name: COMPONENT_NAME$
|
|
19914
|
+
name: COMPONENT_NAME$19,
|
|
19240
19915
|
props: props$O,
|
|
19241
19916
|
setup(props2, {
|
|
19242
19917
|
slots
|
|
@@ -19426,9 +20101,9 @@
|
|
|
19426
20101
|
default: false
|
|
19427
20102
|
}
|
|
19428
20103
|
};
|
|
19429
|
-
const COMPONENT_NAME$
|
|
20104
|
+
const COMPONENT_NAME$18 = "vc-upload";
|
|
19430
20105
|
const Upload$1 = vue.defineComponent({
|
|
19431
|
-
name: COMPONENT_NAME$
|
|
20106
|
+
name: COMPONENT_NAME$18,
|
|
19432
20107
|
props: props$N,
|
|
19433
20108
|
emits: [
|
|
19434
20109
|
"message",
|
|
@@ -19951,9 +20626,9 @@
|
|
|
19951
20626
|
default: true
|
|
19952
20627
|
}
|
|
19953
20628
|
};
|
|
19954
|
-
const COMPONENT_NAME$
|
|
20629
|
+
const COMPONENT_NAME$17 = "vc-editor";
|
|
19955
20630
|
const Editor$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19956
|
-
name: COMPONENT_NAME$
|
|
20631
|
+
name: COMPONENT_NAME$17,
|
|
19957
20632
|
props: props$M,
|
|
19958
20633
|
defaults: defaults$3,
|
|
19959
20634
|
emits: ["ready", "blur", "focus", "input", "update:modelValue", "change"],
|
|
@@ -20134,7 +20809,7 @@
|
|
|
20134
20809
|
};
|
|
20135
20810
|
}
|
|
20136
20811
|
});
|
|
20137
|
-
const COMPONENT_NAME$
|
|
20812
|
+
const COMPONENT_NAME$16 = "vc-editor-view";
|
|
20138
20813
|
const setImages = (v) => {
|
|
20139
20814
|
if (!v) return;
|
|
20140
20815
|
const IMG_REGX = /<img.*?(?:>|\/>)/gi;
|
|
@@ -20151,7 +20826,7 @@
|
|
|
20151
20826
|
return;
|
|
20152
20827
|
};
|
|
20153
20828
|
const EditorView = /* @__PURE__ */ vue.defineComponent({
|
|
20154
|
-
name: COMPONENT_NAME$
|
|
20829
|
+
name: COMPONENT_NAME$16,
|
|
20155
20830
|
props: {
|
|
20156
20831
|
value: {
|
|
20157
20832
|
type: String,
|
|
@@ -20359,9 +21034,9 @@
|
|
|
20359
21034
|
validateField
|
|
20360
21035
|
});
|
|
20361
21036
|
};
|
|
20362
|
-
const COMPONENT_NAME$
|
|
21037
|
+
const COMPONENT_NAME$15 = "vc-form";
|
|
20363
21038
|
const Form = vue.defineComponent({
|
|
20364
|
-
name: COMPONENT_NAME$
|
|
21039
|
+
name: COMPONENT_NAME$15,
|
|
20365
21040
|
props: props$L,
|
|
20366
21041
|
setup(props2, { slots, expose }) {
|
|
20367
21042
|
useForm(expose);
|
|
@@ -20704,9 +21379,9 @@
|
|
|
20704
21379
|
labelPosition
|
|
20705
21380
|
};
|
|
20706
21381
|
};
|
|
20707
|
-
const COMPONENT_NAME$
|
|
21382
|
+
const COMPONENT_NAME$14 = "vc-form-item";
|
|
20708
21383
|
const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20709
|
-
name: COMPONENT_NAME$
|
|
21384
|
+
name: COMPONENT_NAME$14,
|
|
20710
21385
|
props: props$K,
|
|
20711
21386
|
setup(props2, {
|
|
20712
21387
|
slots,
|
|
@@ -20772,9 +21447,9 @@
|
|
|
20772
21447
|
default: false
|
|
20773
21448
|
}
|
|
20774
21449
|
};
|
|
20775
|
-
const COMPONENT_NAME$
|
|
21450
|
+
const COMPONENT_NAME$13 = "vcm-form";
|
|
20776
21451
|
const MForm = vue.defineComponent({
|
|
20777
|
-
name: COMPONENT_NAME$
|
|
21452
|
+
name: COMPONENT_NAME$13,
|
|
20778
21453
|
props: props$J,
|
|
20779
21454
|
setup(props2, { slots, expose }) {
|
|
20780
21455
|
useForm(expose, {
|
|
@@ -20801,9 +21476,9 @@
|
|
|
20801
21476
|
default: 12
|
|
20802
21477
|
}
|
|
20803
21478
|
};
|
|
20804
|
-
const COMPONENT_NAME$
|
|
21479
|
+
const COMPONENT_NAME$12 = "vcm-form-item";
|
|
20805
21480
|
const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20806
|
-
name: COMPONENT_NAME$
|
|
21481
|
+
name: COMPONENT_NAME$12,
|
|
20807
21482
|
props: props$I,
|
|
20808
21483
|
setup(props2, {
|
|
20809
21484
|
slots,
|
|
@@ -20857,9 +21532,9 @@
|
|
|
20857
21532
|
};
|
|
20858
21533
|
}
|
|
20859
21534
|
});
|
|
20860
|
-
const COMPONENT_NAME
|
|
21535
|
+
const COMPONENT_NAME$11 = "vc-fragment";
|
|
20861
21536
|
const Fragment = vue.defineComponent({
|
|
20862
|
-
name: COMPONENT_NAME
|
|
21537
|
+
name: COMPONENT_NAME$11,
|
|
20863
21538
|
setup(_, { slots }) {
|
|
20864
21539
|
return () => vue.h(vue.Fragment, slots.default?.());
|
|
20865
21540
|
}
|
|
@@ -20893,9 +21568,9 @@
|
|
|
20893
21568
|
default: () => ({})
|
|
20894
21569
|
}
|
|
20895
21570
|
};
|
|
20896
|
-
const COMPONENT_NAME$
|
|
21571
|
+
const COMPONENT_NAME$10 = "vc-snapshot";
|
|
20897
21572
|
const Snapshot = /* @__PURE__ */ vue.defineComponent({
|
|
20898
|
-
name: COMPONENT_NAME$
|
|
21573
|
+
name: COMPONENT_NAME$10,
|
|
20899
21574
|
props: props$H,
|
|
20900
21575
|
emits: ["ready"],
|
|
20901
21576
|
setup(props2, {
|
|
@@ -21047,7 +21722,7 @@
|
|
|
21047
21722
|
}
|
|
21048
21723
|
}
|
|
21049
21724
|
const IMGStore$1 = new IMGStore();
|
|
21050
|
-
const COMPONENT_NAME
|
|
21725
|
+
const COMPONENT_NAME$$ = "vc-image";
|
|
21051
21726
|
let isSupportObjectFit = false;
|
|
21052
21727
|
window.addEventListener("DOMContentLoaded", () => {
|
|
21053
21728
|
isSupportObjectFit = !IS_SERVER$3 && document.documentElement.style.objectFit !== void 0;
|
|
@@ -21060,7 +21735,7 @@
|
|
|
21060
21735
|
SCALE_DOWN: "scale-down"
|
|
21061
21736
|
};
|
|
21062
21737
|
const Image$1$1 = /* @__PURE__ */ vue.defineComponent({
|
|
21063
|
-
name: COMPONENT_NAME
|
|
21738
|
+
name: COMPONENT_NAME$$,
|
|
21064
21739
|
inheritAttrs: false,
|
|
21065
21740
|
props: props$G,
|
|
21066
21741
|
setup(props2, {
|
|
@@ -21268,9 +21943,9 @@
|
|
|
21268
21943
|
default: "div"
|
|
21269
21944
|
}
|
|
21270
21945
|
};
|
|
21271
|
-
const COMPONENT_NAME$
|
|
21946
|
+
const COMPONENT_NAME$_ = "vc-image-crop";
|
|
21272
21947
|
const ImageCrop = /* @__PURE__ */ vue.defineComponent({
|
|
21273
|
-
name: COMPONENT_NAME$
|
|
21948
|
+
name: COMPONENT_NAME$_,
|
|
21274
21949
|
props: props$F,
|
|
21275
21950
|
setup(props2, {
|
|
21276
21951
|
slots
|
|
@@ -21290,9 +21965,9 @@
|
|
|
21290
21965
|
default: "div"
|
|
21291
21966
|
}
|
|
21292
21967
|
};
|
|
21293
|
-
const COMPONENT_NAME$
|
|
21968
|
+
const COMPONENT_NAME$Z = "vc-image-processing";
|
|
21294
21969
|
const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
|
|
21295
|
-
name: COMPONENT_NAME$
|
|
21970
|
+
name: COMPONENT_NAME$Z,
|
|
21296
21971
|
props: props$E,
|
|
21297
21972
|
setup(props2, {
|
|
21298
21973
|
slots
|
|
@@ -21305,9 +21980,9 @@
|
|
|
21305
21980
|
}
|
|
21306
21981
|
});
|
|
21307
21982
|
const MImageProcessing = ImageProcessing;
|
|
21308
|
-
const COMPONENT_NAME$
|
|
21983
|
+
const COMPONENT_NAME$Y = "vcm-input";
|
|
21309
21984
|
const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
21310
|
-
name: COMPONENT_NAME$
|
|
21985
|
+
name: COMPONENT_NAME$Y,
|
|
21311
21986
|
inheritAttrs: false,
|
|
21312
21987
|
props: {
|
|
21313
21988
|
...props$1h,
|
|
@@ -21394,9 +22069,9 @@
|
|
|
21394
22069
|
};
|
|
21395
22070
|
}
|
|
21396
22071
|
});
|
|
21397
|
-
const COMPONENT_NAME$
|
|
22072
|
+
const COMPONENT_NAME$X = "vcm-input-number";
|
|
21398
22073
|
const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
21399
|
-
name: COMPONENT_NAME$
|
|
22074
|
+
name: COMPONENT_NAME$X,
|
|
21400
22075
|
props: props$1g,
|
|
21401
22076
|
inheritAttrs: false,
|
|
21402
22077
|
setup(props2, {
|
|
@@ -21442,9 +22117,9 @@
|
|
|
21442
22117
|
};
|
|
21443
22118
|
}
|
|
21444
22119
|
});
|
|
21445
|
-
const COMPONENT_NAME$
|
|
22120
|
+
const COMPONENT_NAME$W = "vcm-input-search";
|
|
21446
22121
|
const MInputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
21447
|
-
name: COMPONENT_NAME$
|
|
22122
|
+
name: COMPONENT_NAME$W,
|
|
21448
22123
|
props: {
|
|
21449
22124
|
...props$1f,
|
|
21450
22125
|
cancelText: {
|
|
@@ -21518,9 +22193,9 @@
|
|
|
21518
22193
|
default: true
|
|
21519
22194
|
}
|
|
21520
22195
|
};
|
|
21521
|
-
const COMPONENT_NAME$
|
|
22196
|
+
const COMPONENT_NAME$V = "vcm-list";
|
|
21522
22197
|
const MList = vue.defineComponent({
|
|
21523
|
-
name: COMPONENT_NAME$
|
|
22198
|
+
name: COMPONENT_NAME$V,
|
|
21524
22199
|
props: props$D,
|
|
21525
22200
|
setup(props2, { slots }) {
|
|
21526
22201
|
vue.provide("vc-list", { props: props2 });
|
|
@@ -21571,10 +22246,10 @@
|
|
|
21571
22246
|
// MListItem是否独立存在
|
|
21572
22247
|
alone: Boolean
|
|
21573
22248
|
};
|
|
21574
|
-
const COMPONENT_NAME$
|
|
22249
|
+
const COMPONENT_NAME$U = "vcm-list-item";
|
|
21575
22250
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
21576
22251
|
const MListItem = /* @__PURE__ */ vue.defineComponent({
|
|
21577
|
-
name: COMPONENT_NAME$
|
|
22252
|
+
name: COMPONENT_NAME$U,
|
|
21578
22253
|
props: props$C,
|
|
21579
22254
|
emits: ["click"],
|
|
21580
22255
|
setup(props2, {
|
|
@@ -21658,11 +22333,11 @@
|
|
|
21658
22333
|
default: false
|
|
21659
22334
|
}
|
|
21660
22335
|
};
|
|
21661
|
-
const COMPONENT_NAME$
|
|
22336
|
+
const COMPONENT_NAME$T = "vc-marquee";
|
|
21662
22337
|
const ANIMATION = prefixStyle("animation").camel;
|
|
21663
22338
|
const TRANSFORM_KEBAB = prefixStyle("transform").kebab;
|
|
21664
22339
|
const Marquee = /* @__PURE__ */ vue.defineComponent({
|
|
21665
|
-
name: COMPONENT_NAME$
|
|
22340
|
+
name: COMPONENT_NAME$T,
|
|
21666
22341
|
props: props$B,
|
|
21667
22342
|
setup(props2, {
|
|
21668
22343
|
slots
|
|
@@ -21723,9 +22398,9 @@
|
|
|
21723
22398
|
default: true
|
|
21724
22399
|
}
|
|
21725
22400
|
};
|
|
21726
|
-
const COMPONENT_NAME$
|
|
22401
|
+
const COMPONENT_NAME$S = "vc-resizer";
|
|
21727
22402
|
const Resizer = vue.defineComponent({
|
|
21728
|
-
name: COMPONENT_NAME$
|
|
22403
|
+
name: COMPONENT_NAME$S,
|
|
21729
22404
|
props: props$A,
|
|
21730
22405
|
emits: ["resize"],
|
|
21731
22406
|
setup(props2, { emit, slots, expose }) {
|
|
@@ -21891,10 +22566,10 @@
|
|
|
21891
22566
|
type: Function
|
|
21892
22567
|
}
|
|
21893
22568
|
};
|
|
21894
|
-
const COMPONENT_NAME$
|
|
22569
|
+
const COMPONENT_NAME$R = "vc-modal";
|
|
21895
22570
|
let zIndexNumber = 1002;
|
|
21896
22571
|
const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
21897
|
-
name: COMPONENT_NAME$
|
|
22572
|
+
name: COMPONENT_NAME$R,
|
|
21898
22573
|
emits: ["update:modelValue", "close", "portal-fulfilled", "visible-change", "ok", "cancel"],
|
|
21899
22574
|
props: props$z,
|
|
21900
22575
|
setup(props2, {
|
|
@@ -22284,9 +22959,9 @@
|
|
|
22284
22959
|
type: Function
|
|
22285
22960
|
}
|
|
22286
22961
|
};
|
|
22287
|
-
const COMPONENT_NAME$
|
|
22962
|
+
const COMPONENT_NAME$Q = "vc-modal";
|
|
22288
22963
|
const MModalView = /* @__PURE__ */ vue.defineComponent({
|
|
22289
|
-
name: COMPONENT_NAME$
|
|
22964
|
+
name: COMPONENT_NAME$Q,
|
|
22290
22965
|
emits: ["update:modelValue", "portal-fulfilled", "close", "ok", "cancel"],
|
|
22291
22966
|
props: props$y,
|
|
22292
22967
|
setup(props2, {
|
|
@@ -22481,9 +23156,9 @@
|
|
|
22481
23156
|
// 这个相当于Modal中的onCancel,支持Promise
|
|
22482
23157
|
onBeforeClose: Function
|
|
22483
23158
|
};
|
|
22484
|
-
const COMPONENT_NAME$
|
|
23159
|
+
const COMPONENT_NAME$P = "vc-notice";
|
|
22485
23160
|
const NoticeView = /* @__PURE__ */ vue.defineComponent({
|
|
22486
|
-
name: COMPONENT_NAME$
|
|
23161
|
+
name: COMPONENT_NAME$P,
|
|
22487
23162
|
props: props$x,
|
|
22488
23163
|
emits: ["portal-fulfilled", "close", "before-close"],
|
|
22489
23164
|
setup(props2, {
|
|
@@ -22649,9 +23324,9 @@
|
|
|
22649
23324
|
default: "div"
|
|
22650
23325
|
}
|
|
22651
23326
|
};
|
|
22652
|
-
const COMPONENT_NAME$
|
|
23327
|
+
const COMPONENT_NAME$O = "vc-option";
|
|
22653
23328
|
const Option$1 = /* @__PURE__ */ vue.defineComponent({
|
|
22654
|
-
name: COMPONENT_NAME$
|
|
23329
|
+
name: COMPONENT_NAME$O,
|
|
22655
23330
|
props: props$w,
|
|
22656
23331
|
setup(props2, {
|
|
22657
23332
|
slots
|
|
@@ -22729,9 +23404,9 @@
|
|
|
22729
23404
|
type: [String, Number]
|
|
22730
23405
|
}
|
|
22731
23406
|
};
|
|
22732
|
-
const COMPONENT_NAME$
|
|
23407
|
+
const COMPONENT_NAME$N = "vc-tag";
|
|
22733
23408
|
const Tag = /* @__PURE__ */ vue.defineComponent({
|
|
22734
|
-
name: COMPONENT_NAME$
|
|
23409
|
+
name: COMPONENT_NAME$N,
|
|
22735
23410
|
props: props$u,
|
|
22736
23411
|
emits: ["close", "change"],
|
|
22737
23412
|
setup(props2, {
|
|
@@ -22798,9 +23473,9 @@
|
|
|
22798
23473
|
render: [Function],
|
|
22799
23474
|
row: Object
|
|
22800
23475
|
};
|
|
22801
|
-
const COMPONENT_NAME$
|
|
23476
|
+
const COMPONENT_NAME$M = "vc-select-option";
|
|
22802
23477
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
22803
|
-
name: COMPONENT_NAME$
|
|
23478
|
+
name: COMPONENT_NAME$M,
|
|
22804
23479
|
props: props$t,
|
|
22805
23480
|
setup(props2, {
|
|
22806
23481
|
slots,
|
|
@@ -22889,9 +23564,9 @@
|
|
|
22889
23564
|
row: Object,
|
|
22890
23565
|
render: [Function]
|
|
22891
23566
|
};
|
|
22892
|
-
const COMPONENT_NAME$
|
|
23567
|
+
const COMPONENT_NAME$L = "vc-select-option-group";
|
|
22893
23568
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
22894
|
-
name: COMPONENT_NAME$
|
|
23569
|
+
name: COMPONENT_NAME$L,
|
|
22895
23570
|
props: props$s,
|
|
22896
23571
|
setup(props2, {
|
|
22897
23572
|
slots
|
|
@@ -22918,9 +23593,9 @@
|
|
|
22918
23593
|
};
|
|
22919
23594
|
}
|
|
22920
23595
|
});
|
|
22921
|
-
const COMPONENT_NAME$
|
|
23596
|
+
const COMPONENT_NAME$K = "vc-select-all";
|
|
22922
23597
|
const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
22923
|
-
name: COMPONENT_NAME$
|
|
23598
|
+
name: COMPONENT_NAME$K,
|
|
22924
23599
|
props: {
|
|
22925
23600
|
data: {
|
|
22926
23601
|
type: Array,
|
|
@@ -22974,9 +23649,9 @@
|
|
|
22974
23649
|
};
|
|
22975
23650
|
}
|
|
22976
23651
|
});
|
|
22977
|
-
const COMPONENT_NAME$
|
|
23652
|
+
const COMPONENT_NAME$J = "vc-select";
|
|
22978
23653
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
22979
|
-
name: COMPONENT_NAME$
|
|
23654
|
+
name: COMPONENT_NAME$J,
|
|
22980
23655
|
props: props$1a,
|
|
22981
23656
|
emits: ["ready", "close", "visible-change", "clear", "change", "update:modelValue"],
|
|
22982
23657
|
setup(props2, {
|
|
@@ -23257,9 +23932,9 @@
|
|
|
23257
23932
|
};
|
|
23258
23933
|
}
|
|
23259
23934
|
});
|
|
23260
|
-
const COMPONENT_NAME$
|
|
23935
|
+
const COMPONENT_NAME$I = "vc-pagination";
|
|
23261
23936
|
const Pagination = /* @__PURE__ */ vue.defineComponent({
|
|
23262
|
-
name: COMPONENT_NAME$
|
|
23937
|
+
name: COMPONENT_NAME$I,
|
|
23263
23938
|
props: props$v,
|
|
23264
23939
|
emits: ["update:current", "change", "page-size-change"],
|
|
23265
23940
|
setup(props2, {
|
|
@@ -23450,9 +24125,9 @@
|
|
|
23450
24125
|
default: "div"
|
|
23451
24126
|
}
|
|
23452
24127
|
};
|
|
23453
|
-
const COMPONENT_NAME$
|
|
24128
|
+
const COMPONENT_NAME$H = "vc-picker";
|
|
23454
24129
|
const Picker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
23455
|
-
name: COMPONENT_NAME$
|
|
24130
|
+
name: COMPONENT_NAME$H,
|
|
23456
24131
|
props: props$r,
|
|
23457
24132
|
setup(props2, {
|
|
23458
24133
|
slots
|
|
@@ -23510,9 +24185,9 @@
|
|
|
23510
24185
|
width: [String, Number],
|
|
23511
24186
|
portalClass: [String, Object]
|
|
23512
24187
|
};
|
|
23513
|
-
const COMPONENT_NAME$
|
|
24188
|
+
const COMPONENT_NAME$G = "vc-popconfirm";
|
|
23514
24189
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
23515
|
-
name: COMPONENT_NAME$
|
|
24190
|
+
name: COMPONENT_NAME$G,
|
|
23516
24191
|
props: props$q,
|
|
23517
24192
|
inheritAttrs: false,
|
|
23518
24193
|
emits: ["update:modelValue", "visible-change", "ready", "close", "cancel", "ok"],
|
|
@@ -23672,9 +24347,9 @@
|
|
|
23672
24347
|
})
|
|
23673
24348
|
}
|
|
23674
24349
|
};
|
|
23675
|
-
const COMPONENT_NAME$
|
|
24350
|
+
const COMPONENT_NAME$F = "vc-popup";
|
|
23676
24351
|
const MPopup = /* @__PURE__ */ vue.defineComponent({
|
|
23677
|
-
name: COMPONENT_NAME$
|
|
24352
|
+
name: COMPONENT_NAME$F,
|
|
23678
24353
|
props: props$p,
|
|
23679
24354
|
emits: ["update:modelValue", "close", "portal-fulfilled", "visible-change"],
|
|
23680
24355
|
setup(props2, {
|
|
@@ -23783,9 +24458,9 @@
|
|
|
23783
24458
|
default: "div"
|
|
23784
24459
|
}
|
|
23785
24460
|
};
|
|
23786
|
-
const COMPONENT_NAME$
|
|
24461
|
+
const COMPONENT_NAME$E = "vc-print";
|
|
23787
24462
|
const Print = /* @__PURE__ */ vue.defineComponent({
|
|
23788
|
-
name: COMPONENT_NAME$
|
|
24463
|
+
name: COMPONENT_NAME$E,
|
|
23789
24464
|
props: props$o,
|
|
23790
24465
|
setup(props2, {
|
|
23791
24466
|
expose,
|
|
@@ -23856,7 +24531,7 @@
|
|
|
23856
24531
|
},
|
|
23857
24532
|
strokeColor: {
|
|
23858
24533
|
type: String,
|
|
23859
|
-
default: "#
|
|
24534
|
+
default: "#456CF6"
|
|
23860
24535
|
},
|
|
23861
24536
|
trackColor: {
|
|
23862
24537
|
type: String,
|
|
@@ -23875,9 +24550,9 @@
|
|
|
23875
24550
|
})
|
|
23876
24551
|
}
|
|
23877
24552
|
};
|
|
23878
|
-
const COMPONENT_NAME$
|
|
24553
|
+
const COMPONENT_NAME$D = "vc-progress-circle";
|
|
23879
24554
|
const Circle$1 = /* @__PURE__ */ vue.defineComponent({
|
|
23880
|
-
name: COMPONENT_NAME$
|
|
24555
|
+
name: COMPONENT_NAME$D,
|
|
23881
24556
|
props: props$n,
|
|
23882
24557
|
setup(props2, {
|
|
23883
24558
|
slots
|
|
@@ -23934,9 +24609,9 @@
|
|
|
23934
24609
|
};
|
|
23935
24610
|
}
|
|
23936
24611
|
});
|
|
23937
|
-
const COMPONENT_NAME$
|
|
24612
|
+
const COMPONENT_NAME$C = "vc-progress-line";
|
|
23938
24613
|
const Line$2 = /* @__PURE__ */ vue.defineComponent({
|
|
23939
|
-
name: COMPONENT_NAME$
|
|
24614
|
+
name: COMPONENT_NAME$C,
|
|
23940
24615
|
props: props$n,
|
|
23941
24616
|
setup(props2) {
|
|
23942
24617
|
const colorStyle = vue.computed(() => {
|
|
@@ -23980,9 +24655,9 @@
|
|
|
23980
24655
|
function _isSlot(s) {
|
|
23981
24656
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
23982
24657
|
}
|
|
23983
|
-
const COMPONENT_NAME$
|
|
24658
|
+
const COMPONENT_NAME$B = "vc-progress";
|
|
23984
24659
|
const Progress = /* @__PURE__ */ vue.defineComponent({
|
|
23985
|
-
name: COMPONENT_NAME$
|
|
24660
|
+
name: COMPONENT_NAME$B,
|
|
23986
24661
|
props: props$n,
|
|
23987
24662
|
setup(props2, {
|
|
23988
24663
|
slots
|
|
@@ -24138,9 +24813,9 @@
|
|
|
24138
24813
|
computedLabel
|
|
24139
24814
|
};
|
|
24140
24815
|
};
|
|
24141
|
-
const COMPONENT_NAME$
|
|
24816
|
+
const COMPONENT_NAME$A = "vc-radio";
|
|
24142
24817
|
const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
24143
|
-
name: COMPONENT_NAME$
|
|
24818
|
+
name: COMPONENT_NAME$A,
|
|
24144
24819
|
props: props$m,
|
|
24145
24820
|
emits: ["update:modelValue", "change"],
|
|
24146
24821
|
setup(props2, {
|
|
@@ -24181,9 +24856,9 @@
|
|
|
24181
24856
|
};
|
|
24182
24857
|
}
|
|
24183
24858
|
});
|
|
24184
|
-
const COMPONENT_NAME$
|
|
24859
|
+
const COMPONENT_NAME$z = "vc-radio-button";
|
|
24185
24860
|
const RadioButton = /* @__PURE__ */ vue.defineComponent({
|
|
24186
|
-
name: COMPONENT_NAME$
|
|
24861
|
+
name: COMPONENT_NAME$z,
|
|
24187
24862
|
props: {
|
|
24188
24863
|
...props$m,
|
|
24189
24864
|
labelStyle: [String, Object],
|
|
@@ -24291,9 +24966,9 @@
|
|
|
24291
24966
|
reset
|
|
24292
24967
|
};
|
|
24293
24968
|
};
|
|
24294
|
-
const COMPONENT_NAME$
|
|
24969
|
+
const COMPONENT_NAME$y = "vc-radio-group";
|
|
24295
24970
|
const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
24296
|
-
name: COMPONENT_NAME$
|
|
24971
|
+
name: COMPONENT_NAME$y,
|
|
24297
24972
|
props: props$l,
|
|
24298
24973
|
emits: ["update:modelValue", "change"],
|
|
24299
24974
|
setup(props2, {
|
|
@@ -24311,9 +24986,9 @@
|
|
|
24311
24986
|
};
|
|
24312
24987
|
}
|
|
24313
24988
|
});
|
|
24314
|
-
const COMPONENT_NAME$
|
|
24989
|
+
const COMPONENT_NAME$x = "vcm-radio";
|
|
24315
24990
|
const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
24316
|
-
name: COMPONENT_NAME$
|
|
24991
|
+
name: COMPONENT_NAME$x,
|
|
24317
24992
|
props: props$m,
|
|
24318
24993
|
emits: ["update:modelValue", "change"],
|
|
24319
24994
|
setup(props2, {
|
|
@@ -24354,9 +25029,9 @@
|
|
|
24354
25029
|
};
|
|
24355
25030
|
}
|
|
24356
25031
|
});
|
|
24357
|
-
const COMPONENT_NAME$
|
|
25032
|
+
const COMPONENT_NAME$w = "vcm-radio-group";
|
|
24358
25033
|
const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
24359
|
-
name: COMPONENT_NAME$
|
|
25034
|
+
name: COMPONENT_NAME$w,
|
|
24360
25035
|
props: props$l,
|
|
24361
25036
|
emits: ["update:modelValue", "change"],
|
|
24362
25037
|
setup(props2, {
|
|
@@ -24418,9 +25093,9 @@
|
|
|
24418
25093
|
default: () => ({})
|
|
24419
25094
|
}
|
|
24420
25095
|
};
|
|
24421
|
-
const COMPONENT_NAME$
|
|
25096
|
+
const COMPONENT_NAME$v = "vc-rate";
|
|
24422
25097
|
const Rate = /* @__PURE__ */ vue.defineComponent({
|
|
24423
|
-
name: COMPONENT_NAME$
|
|
25098
|
+
name: COMPONENT_NAME$v,
|
|
24424
25099
|
props: props$k,
|
|
24425
25100
|
emits: ["update:modelValue", "change"],
|
|
24426
25101
|
setup(props2, {
|
|
@@ -24615,9 +25290,9 @@
|
|
|
24615
25290
|
renderPlaceholder: Function,
|
|
24616
25291
|
renderRefresh: Function
|
|
24617
25292
|
};
|
|
24618
|
-
const COMPONENT_NAME$
|
|
25293
|
+
const COMPONENT_NAME$u = "vc-recycle-list-scroll-state";
|
|
24619
25294
|
const ScrollState = /* @__PURE__ */ vue.defineComponent({
|
|
24620
|
-
name: COMPONENT_NAME$
|
|
25295
|
+
name: COMPONENT_NAME$u,
|
|
24621
25296
|
setup(_, {
|
|
24622
25297
|
slots
|
|
24623
25298
|
}) {
|
|
@@ -24741,10 +25416,10 @@
|
|
|
24741
25416
|
);
|
|
24742
25417
|
return keys;
|
|
24743
25418
|
};
|
|
24744
|
-
const COMPONENT_NAME$
|
|
25419
|
+
const COMPONENT_NAME$t = "vc-recycle-list-container";
|
|
24745
25420
|
const transformKey = prefixStyle("transform").camel;
|
|
24746
25421
|
const Container$1 = /* @__PURE__ */ vue.defineComponent({
|
|
24747
|
-
name: COMPONENT_NAME$
|
|
25422
|
+
name: COMPONENT_NAME$t,
|
|
24748
25423
|
props: props$i,
|
|
24749
25424
|
emits: ["refresh"],
|
|
24750
25425
|
setup(props2, {
|
|
@@ -24837,9 +25512,9 @@
|
|
|
24837
25512
|
};
|
|
24838
25513
|
}
|
|
24839
25514
|
});
|
|
24840
|
-
const COMPONENT_NAME$
|
|
25515
|
+
const COMPONENT_NAME$s = "vc-recycle-list";
|
|
24841
25516
|
const RecycleList = /* @__PURE__ */ vue.defineComponent({
|
|
24842
|
-
name: COMPONENT_NAME$
|
|
25517
|
+
name: COMPONENT_NAME$s,
|
|
24843
25518
|
props: props$j,
|
|
24844
25519
|
emits: ["scroll", "row-resize"],
|
|
24845
25520
|
setup(props2, {
|
|
@@ -25364,9 +26039,9 @@
|
|
|
25364
26039
|
default: "div"
|
|
25365
26040
|
}
|
|
25366
26041
|
};
|
|
25367
|
-
const COMPONENT_NAME$
|
|
26042
|
+
const COMPONENT_NAME$r = "vc-slider";
|
|
25368
26043
|
const Slider = /* @__PURE__ */ vue.defineComponent({
|
|
25369
|
-
name: COMPONENT_NAME$
|
|
26044
|
+
name: COMPONENT_NAME$r,
|
|
25370
26045
|
props: props$h,
|
|
25371
26046
|
setup(props2, {
|
|
25372
26047
|
slots
|
|
@@ -25385,9 +26060,9 @@
|
|
|
25385
26060
|
default: "div"
|
|
25386
26061
|
}
|
|
25387
26062
|
};
|
|
25388
|
-
const COMPONENT_NAME$
|
|
26063
|
+
const COMPONENT_NAME$q = "vc-sort-list";
|
|
25389
26064
|
const SortList = /* @__PURE__ */ vue.defineComponent({
|
|
25390
|
-
name: COMPONENT_NAME$
|
|
26065
|
+
name: COMPONENT_NAME$q,
|
|
25391
26066
|
props: props$g,
|
|
25392
26067
|
setup(props2, {
|
|
25393
26068
|
slots
|
|
@@ -25406,9 +26081,9 @@
|
|
|
25406
26081
|
default: "div"
|
|
25407
26082
|
}
|
|
25408
26083
|
};
|
|
25409
|
-
const COMPONENT_NAME$
|
|
26084
|
+
const COMPONENT_NAME$p = "vc-steps";
|
|
25410
26085
|
const Steps = /* @__PURE__ */ vue.defineComponent({
|
|
25411
|
-
name: COMPONENT_NAME$
|
|
26086
|
+
name: COMPONENT_NAME$p,
|
|
25412
26087
|
props: props$f,
|
|
25413
26088
|
setup(props2, {
|
|
25414
26089
|
slots
|
|
@@ -25528,9 +26203,9 @@
|
|
|
25528
26203
|
reset
|
|
25529
26204
|
};
|
|
25530
26205
|
};
|
|
25531
|
-
const COMPONENT_NAME$
|
|
26206
|
+
const COMPONENT_NAME$o = "vc-switch";
|
|
25532
26207
|
const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
25533
|
-
name: COMPONENT_NAME$
|
|
26208
|
+
name: COMPONENT_NAME$o,
|
|
25534
26209
|
props: props$e,
|
|
25535
26210
|
// click -> onClick要被拦截,此处不能放置
|
|
25536
26211
|
emits: ["update:modelValue", "change", "click"],
|
|
@@ -25601,9 +26276,9 @@
|
|
|
25601
26276
|
};
|
|
25602
26277
|
}
|
|
25603
26278
|
});
|
|
25604
|
-
const COMPONENT_NAME$
|
|
26279
|
+
const COMPONENT_NAME$n = "vcm-switch";
|
|
25605
26280
|
const MSwitch = /* @__PURE__ */ vue.defineComponent({
|
|
25606
|
-
name: COMPONENT_NAME$
|
|
26281
|
+
name: COMPONENT_NAME$n,
|
|
25607
26282
|
props: props$e,
|
|
25608
26283
|
// click -> onClick要被拦截,此处不能放置
|
|
25609
26284
|
emits: ["update:modelValue", "change", "click"],
|
|
@@ -25739,9 +26414,9 @@
|
|
|
25739
26414
|
};
|
|
25740
26415
|
const columnsToRowsEffect = (v) => {
|
|
25741
26416
|
let maxLevel = 1;
|
|
25742
|
-
const traverse = (column,
|
|
25743
|
-
if (
|
|
25744
|
-
column.level =
|
|
26417
|
+
const traverse = (column, parent2) => {
|
|
26418
|
+
if (parent2) {
|
|
26419
|
+
column.level = parent2.level + 1;
|
|
25745
26420
|
if (maxLevel < column.level) {
|
|
25746
26421
|
maxLevel = column.level;
|
|
25747
26422
|
}
|
|
@@ -25795,8 +26470,8 @@
|
|
|
25795
26470
|
level: baseLevel = 0
|
|
25796
26471
|
} = opts;
|
|
25797
26472
|
const isNil = (array) => !(Array.isArray(array) && array.length);
|
|
25798
|
-
function _walker(
|
|
25799
|
-
cb(
|
|
26473
|
+
function _walker(parent2, children, level) {
|
|
26474
|
+
cb(parent2, children, level);
|
|
25800
26475
|
children.forEach((item) => {
|
|
25801
26476
|
if (item[lazyKey]) {
|
|
25802
26477
|
cb(item, null, level + 1);
|
|
@@ -26009,8 +26684,8 @@
|
|
|
26009
26684
|
const res = {};
|
|
26010
26685
|
walkTreeNode(
|
|
26011
26686
|
data,
|
|
26012
|
-
(
|
|
26013
|
-
const parentId = getRowValue(
|
|
26687
|
+
(parent2, children, level) => {
|
|
26688
|
+
const parentId = getRowValue(parent2, primaryKey);
|
|
26014
26689
|
if (Array.isArray(children)) {
|
|
26015
26690
|
res[parentId] = {
|
|
26016
26691
|
children: children.map((row) => getRowValue(row, primaryKey)),
|
|
@@ -26150,9 +26825,9 @@
|
|
|
26150
26825
|
this.store.states.treeData[key].expanded = true;
|
|
26151
26826
|
walkTreeNode(
|
|
26152
26827
|
data,
|
|
26153
|
-
(
|
|
26154
|
-
const id = getRowValue(
|
|
26155
|
-
Object.defineProperty(
|
|
26828
|
+
(parent2, _, level) => {
|
|
26829
|
+
const id = getRowValue(parent2, primaryKey);
|
|
26830
|
+
Object.defineProperty(parent2, "__KEY__", {
|
|
26156
26831
|
value: `${level}__${id}`,
|
|
26157
26832
|
writable: false
|
|
26158
26833
|
});
|
|
@@ -26445,13 +27120,13 @@
|
|
|
26445
27120
|
* @param index ~
|
|
26446
27121
|
* @param parent ~
|
|
26447
27122
|
*/
|
|
26448
|
-
insertColumn(column, index,
|
|
27123
|
+
insertColumn(column, index, parent2) {
|
|
26449
27124
|
let array = this.states._columns;
|
|
26450
|
-
if (
|
|
26451
|
-
array =
|
|
27125
|
+
if (parent2) {
|
|
27126
|
+
array = parent2.children;
|
|
26452
27127
|
if (!array) {
|
|
26453
27128
|
array = [];
|
|
26454
|
-
|
|
27129
|
+
parent2.children = array;
|
|
26455
27130
|
}
|
|
26456
27131
|
}
|
|
26457
27132
|
if (typeof index !== "undefined") {
|
|
@@ -26468,10 +27143,10 @@
|
|
|
26468
27143
|
this.scheduleLayout();
|
|
26469
27144
|
}
|
|
26470
27145
|
}
|
|
26471
|
-
removeColumn(column,
|
|
27146
|
+
removeColumn(column, parent2) {
|
|
26472
27147
|
let array = this.states._columns;
|
|
26473
|
-
if (
|
|
26474
|
-
array =
|
|
27148
|
+
if (parent2) {
|
|
27149
|
+
array = parent2.children || [];
|
|
26475
27150
|
}
|
|
26476
27151
|
if (array) {
|
|
26477
27152
|
array.splice(array.indexOf(column), 1);
|
|
@@ -26704,9 +27379,9 @@
|
|
|
26704
27379
|
});
|
|
26705
27380
|
return states;
|
|
26706
27381
|
};
|
|
26707
|
-
const COMPONENT_NAME$
|
|
27382
|
+
const COMPONENT_NAME$m = "vc-table-normal-list";
|
|
26708
27383
|
const NormalList = /* @__PURE__ */ vue.defineComponent({
|
|
26709
|
-
name: COMPONENT_NAME$
|
|
27384
|
+
name: COMPONENT_NAME$m,
|
|
26710
27385
|
props: {
|
|
26711
27386
|
data: {
|
|
26712
27387
|
type: Array,
|
|
@@ -27220,6 +27895,10 @@
|
|
|
27220
27895
|
const allowDrag = vue.computed(() => {
|
|
27221
27896
|
return typeof props2.resizable === "boolean" ? props2.resizable : props2.border;
|
|
27222
27897
|
});
|
|
27898
|
+
const dragLineClass = vue.computed(() => {
|
|
27899
|
+
if (props2.border || !props2.resizable) return;
|
|
27900
|
+
return "has-drag-line";
|
|
27901
|
+
});
|
|
27223
27902
|
const states = useStates({
|
|
27224
27903
|
columns: "columns",
|
|
27225
27904
|
isAllSelected: "isAllSelected",
|
|
@@ -27452,7 +28131,7 @@
|
|
|
27452
28131
|
"style": [getHeaderCellStyle(rowIndex, columnIndex, columns, column), {
|
|
27453
28132
|
width: `${column.realWidth}px`
|
|
27454
28133
|
}],
|
|
27455
|
-
"class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), "vc-table__th"],
|
|
28134
|
+
"class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), column.resizable && dragLineClass.value, "vc-table__th"],
|
|
27456
28135
|
"key": column.id
|
|
27457
28136
|
}, [vue.createVNode("div", {
|
|
27458
28137
|
"class": [
|
|
@@ -27696,9 +28375,9 @@
|
|
|
27696
28375
|
default: void 0
|
|
27697
28376
|
}
|
|
27698
28377
|
};
|
|
27699
|
-
const COMPONENT_NAME$
|
|
28378
|
+
const COMPONENT_NAME$l = "vc-table";
|
|
27700
28379
|
const Table$1 = /* @__PURE__ */ vue.defineComponent({
|
|
27701
|
-
name: COMPONENT_NAME$
|
|
28380
|
+
name: COMPONENT_NAME$l,
|
|
27702
28381
|
props: props$d,
|
|
27703
28382
|
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"],
|
|
27704
28383
|
setup(props2, {
|
|
@@ -28435,9 +29114,9 @@
|
|
|
28435
29114
|
}) {
|
|
28436
29115
|
const instance = vue.getCurrentInstance();
|
|
28437
29116
|
const table = vue.inject("vc-table");
|
|
28438
|
-
const
|
|
28439
|
-
const isSubColumn = table !==
|
|
28440
|
-
const columnId = vue.ref((
|
|
29117
|
+
const parent2 = vue.inject("vc-table-column", table);
|
|
29118
|
+
const isSubColumn = table !== parent2;
|
|
29119
|
+
const columnId = vue.ref((parent2.tableId || parent2.columnId) + getUid("column"));
|
|
28441
29120
|
const realWidth = vue.computed(() => {
|
|
28442
29121
|
return parseWidth(props2.width);
|
|
28443
29122
|
});
|
|
@@ -28563,13 +29242,13 @@
|
|
|
28563
29242
|
registerWatchers();
|
|
28564
29243
|
});
|
|
28565
29244
|
vue.onMounted(() => {
|
|
28566
|
-
const children = isSubColumn ?
|
|
29245
|
+
const children = isSubColumn ? parent2.vnode.el.children : parent2.hiddenColumns.value.children;
|
|
28567
29246
|
const columnIndex = [...children].indexOf(instance.vnode.el);
|
|
28568
|
-
table.store.insertColumn(columnConfig, columnIndex, isSubColumn &&
|
|
29247
|
+
table.store.insertColumn(columnConfig, columnIndex, isSubColumn && parent2.columnConfig);
|
|
28569
29248
|
});
|
|
28570
29249
|
vue.onUnmounted(() => {
|
|
28571
29250
|
if (!instance.parent) return;
|
|
28572
|
-
table.store.removeColumn(columnConfig, isSubColumn &&
|
|
29251
|
+
table.store.removeColumn(columnConfig, isSubColumn && parent2.columnConfig);
|
|
28573
29252
|
});
|
|
28574
29253
|
vue.provide("vc-table-column", {
|
|
28575
29254
|
columnId,
|
|
@@ -28814,9 +29493,9 @@
|
|
|
28814
29493
|
handleChange
|
|
28815
29494
|
};
|
|
28816
29495
|
};
|
|
28817
|
-
const COMPONENT_NAME$
|
|
29496
|
+
const COMPONENT_NAME$k = "vc-tabs";
|
|
28818
29497
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
28819
|
-
name: COMPONENT_NAME$
|
|
29498
|
+
name: COMPONENT_NAME$k,
|
|
28820
29499
|
props: props$c,
|
|
28821
29500
|
emits: ["update:modelValue", "change", "click"],
|
|
28822
29501
|
setup(props2, {
|
|
@@ -29045,9 +29724,9 @@
|
|
|
29045
29724
|
currentValue
|
|
29046
29725
|
};
|
|
29047
29726
|
};
|
|
29048
|
-
const COMPONENT_NAME$
|
|
29727
|
+
const COMPONENT_NAME$j = "vc-tabs-pane";
|
|
29049
29728
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
29050
|
-
name: COMPONENT_NAME$
|
|
29729
|
+
name: COMPONENT_NAME$j,
|
|
29051
29730
|
props: props$b,
|
|
29052
29731
|
setup(_, {
|
|
29053
29732
|
slots
|
|
@@ -29098,9 +29777,9 @@
|
|
|
29098
29777
|
default: false
|
|
29099
29778
|
}
|
|
29100
29779
|
};
|
|
29101
|
-
const COMPONENT_NAME$
|
|
29780
|
+
const COMPONENT_NAME$i = "vcm-tabs";
|
|
29102
29781
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
29103
|
-
name: COMPONENT_NAME$
|
|
29782
|
+
name: COMPONENT_NAME$i,
|
|
29104
29783
|
props: props$a,
|
|
29105
29784
|
emits: ["update:modelValue", "change", "click"],
|
|
29106
29785
|
setup(props2, {
|
|
@@ -29328,9 +30007,9 @@
|
|
|
29328
30007
|
};
|
|
29329
30008
|
}
|
|
29330
30009
|
});
|
|
29331
|
-
const COMPONENT_NAME$
|
|
30010
|
+
const COMPONENT_NAME$h = "vcm-tabs-pane";
|
|
29332
30011
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
29333
|
-
name: COMPONENT_NAME$
|
|
30012
|
+
name: COMPONENT_NAME$h,
|
|
29334
30013
|
props: props$b,
|
|
29335
30014
|
setup(_, {
|
|
29336
30015
|
slots
|
|
@@ -29389,9 +30068,9 @@
|
|
|
29389
30068
|
default: "dark"
|
|
29390
30069
|
}
|
|
29391
30070
|
};
|
|
29392
|
-
const COMPONENT_NAME$
|
|
30071
|
+
const COMPONENT_NAME$g = "vc-text";
|
|
29393
30072
|
const Text$2 = /* @__PURE__ */ vue.defineComponent({
|
|
29394
|
-
name: COMPONENT_NAME$
|
|
30073
|
+
name: COMPONENT_NAME$g,
|
|
29395
30074
|
props: props$9,
|
|
29396
30075
|
setup(props2, {
|
|
29397
30076
|
emit
|
|
@@ -29750,9 +30429,9 @@
|
|
|
29750
30429
|
type: [Object, Array]
|
|
29751
30430
|
}
|
|
29752
30431
|
};
|
|
29753
|
-
const COMPONENT_NAME$
|
|
30432
|
+
const COMPONENT_NAME$f = "vc-textarea";
|
|
29754
30433
|
const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
29755
|
-
name: COMPONENT_NAME$
|
|
30434
|
+
name: COMPONENT_NAME$f,
|
|
29756
30435
|
props: Object.assign({}, props$8, {
|
|
29757
30436
|
indicator: {
|
|
29758
30437
|
type: [Boolean, Object],
|
|
@@ -29805,9 +30484,9 @@
|
|
|
29805
30484
|
};
|
|
29806
30485
|
}
|
|
29807
30486
|
});
|
|
29808
|
-
const COMPONENT_NAME$
|
|
30487
|
+
const COMPONENT_NAME$e = "vcm-textarea";
|
|
29809
30488
|
const MTextarea = /* @__PURE__ */ vue.defineComponent({
|
|
29810
|
-
name: COMPONENT_NAME$
|
|
30489
|
+
name: COMPONENT_NAME$e,
|
|
29811
30490
|
props: Object.assign({}, props$8, {
|
|
29812
30491
|
align: {
|
|
29813
30492
|
type: String,
|
|
@@ -29888,9 +30567,9 @@
|
|
|
29888
30567
|
type: [String, Object]
|
|
29889
30568
|
}
|
|
29890
30569
|
};
|
|
29891
|
-
const COMPONENT_NAME$
|
|
30570
|
+
const COMPONENT_NAME$d = "vc-theme";
|
|
29892
30571
|
const Theme$1 = vue.defineComponent({
|
|
29893
|
-
name: COMPONENT_NAME$
|
|
30572
|
+
name: COMPONENT_NAME$d,
|
|
29894
30573
|
props: props$7,
|
|
29895
30574
|
setup(props2, { slots }) {
|
|
29896
30575
|
const themeId = getUid("vc-theme");
|
|
@@ -29972,9 +30651,9 @@
|
|
|
29972
30651
|
};
|
|
29973
30652
|
}
|
|
29974
30653
|
});
|
|
29975
|
-
const COMPONENT_NAME$
|
|
30654
|
+
const COMPONENT_NAME$c = "vc-theme-view";
|
|
29976
30655
|
const ThemeView = vue.defineComponent({
|
|
29977
|
-
name: COMPONENT_NAME$
|
|
30656
|
+
name: COMPONENT_NAME$c,
|
|
29978
30657
|
props: props$7,
|
|
29979
30658
|
setup(props2, { slots }) {
|
|
29980
30659
|
return () => {
|
|
@@ -29989,9 +30668,9 @@
|
|
|
29989
30668
|
};
|
|
29990
30669
|
}
|
|
29991
30670
|
});
|
|
29992
|
-
const COMPONENT_NAME$
|
|
30671
|
+
const COMPONENT_NAME$b = "vc-theme-text";
|
|
29993
30672
|
const ThemeText = vue.defineComponent({
|
|
29994
|
-
name: COMPONENT_NAME$
|
|
30673
|
+
name: COMPONENT_NAME$b,
|
|
29995
30674
|
props: props$7,
|
|
29996
30675
|
setup(props2, { slots }) {
|
|
29997
30676
|
return () => {
|
|
@@ -30006,9 +30685,9 @@
|
|
|
30006
30685
|
};
|
|
30007
30686
|
}
|
|
30008
30687
|
});
|
|
30009
|
-
const COMPONENT_NAME$
|
|
30688
|
+
const COMPONENT_NAME$a = "vc-theme-image";
|
|
30010
30689
|
const ThemeImage = vue.defineComponent({
|
|
30011
|
-
name: COMPONENT_NAME$
|
|
30690
|
+
name: COMPONENT_NAME$a,
|
|
30012
30691
|
props: props$7,
|
|
30013
30692
|
setup(props2, { slots }) {
|
|
30014
30693
|
return () => {
|
|
@@ -30056,12 +30735,12 @@
|
|
|
30056
30735
|
default: false
|
|
30057
30736
|
}
|
|
30058
30737
|
};
|
|
30059
|
-
const COMPONENT_NAME$
|
|
30738
|
+
const COMPONENT_NAME$9 = "vc-time-picker";
|
|
30060
30739
|
const getPanel = (type) => {
|
|
30061
30740
|
const isRange = type === "timerange";
|
|
30062
30741
|
return isRange ? TimeRangePanel : TimePanel;
|
|
30063
30742
|
};
|
|
30064
|
-
const TimePicker = createPicker(COMPONENT_NAME$
|
|
30743
|
+
const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
|
|
30065
30744
|
const props2 = vue.getCurrentInstance().props;
|
|
30066
30745
|
const icon = vue.ref("icon");
|
|
30067
30746
|
const panel = vue.shallowRef({});
|
|
@@ -30092,9 +30771,9 @@
|
|
|
30092
30771
|
default: "div"
|
|
30093
30772
|
}
|
|
30094
30773
|
};
|
|
30095
|
-
const COMPONENT_NAME$
|
|
30774
|
+
const COMPONENT_NAME$8 = "vc-timeline";
|
|
30096
30775
|
const Timeline = /* @__PURE__ */ vue.defineComponent({
|
|
30097
|
-
name: COMPONENT_NAME$
|
|
30776
|
+
name: COMPONENT_NAME$8,
|
|
30098
30777
|
props: props$5,
|
|
30099
30778
|
setup(props2, {
|
|
30100
30779
|
slots
|
|
@@ -30115,9 +30794,9 @@
|
|
|
30115
30794
|
default: "div"
|
|
30116
30795
|
}
|
|
30117
30796
|
};
|
|
30118
|
-
const COMPONENT_NAME$
|
|
30797
|
+
const COMPONENT_NAME$7 = "vc-touch";
|
|
30119
30798
|
const Touch = /* @__PURE__ */ vue.defineComponent({
|
|
30120
|
-
name: COMPONENT_NAME$
|
|
30799
|
+
name: COMPONENT_NAME$7,
|
|
30121
30800
|
props: props$4,
|
|
30122
30801
|
setup(props2, {
|
|
30123
30802
|
slots
|
|
@@ -30178,10 +30857,10 @@
|
|
|
30178
30857
|
node.states.checked = false;
|
|
30179
30858
|
node.states.indeterminate = false;
|
|
30180
30859
|
}
|
|
30181
|
-
const
|
|
30182
|
-
if (!
|
|
30860
|
+
const parent2 = node.parentNode;
|
|
30861
|
+
if (!parent2 || parent2.states.level === 0) return;
|
|
30183
30862
|
if (!node.store.checkStrictly) {
|
|
30184
|
-
reInitChecked(
|
|
30863
|
+
reInitChecked(parent2);
|
|
30185
30864
|
}
|
|
30186
30865
|
};
|
|
30187
30866
|
const getPropertyFromData = (node, prop) => {
|
|
@@ -30274,21 +30953,21 @@
|
|
|
30274
30953
|
this.updateLeafState();
|
|
30275
30954
|
}
|
|
30276
30955
|
getNextSiblingNode() {
|
|
30277
|
-
const
|
|
30278
|
-
if (
|
|
30279
|
-
const index =
|
|
30956
|
+
const parent2 = this.parentNode;
|
|
30957
|
+
if (parent2) {
|
|
30958
|
+
const index = parent2.childNodes.indexOf(this);
|
|
30280
30959
|
if (index > -1) {
|
|
30281
|
-
return
|
|
30960
|
+
return parent2.childNodes[index + 1];
|
|
30282
30961
|
}
|
|
30283
30962
|
}
|
|
30284
30963
|
return null;
|
|
30285
30964
|
}
|
|
30286
30965
|
getPreviousSiblingNode() {
|
|
30287
|
-
const
|
|
30288
|
-
if (
|
|
30289
|
-
const index =
|
|
30966
|
+
const parent2 = this.parentNode;
|
|
30967
|
+
if (parent2) {
|
|
30968
|
+
const index = parent2.childNodes.indexOf(this);
|
|
30290
30969
|
if (index > -1) {
|
|
30291
|
-
return index > 0 ?
|
|
30970
|
+
return index > 0 ? parent2.childNodes[index - 1] : null;
|
|
30292
30971
|
}
|
|
30293
30972
|
}
|
|
30294
30973
|
return null;
|
|
@@ -30310,8 +30989,8 @@
|
|
|
30310
30989
|
}
|
|
30311
30990
|
}
|
|
30312
30991
|
contains(target, deep = true) {
|
|
30313
|
-
const walk = function(
|
|
30314
|
-
const children =
|
|
30992
|
+
const walk = function(parent2) {
|
|
30993
|
+
const children = parent2.childNodes || [];
|
|
30315
30994
|
let result = false;
|
|
30316
30995
|
for (let i = 0, j = children.length; i < j; i++) {
|
|
30317
30996
|
const child = children[i];
|
|
@@ -30325,9 +31004,9 @@
|
|
|
30325
31004
|
return walk(this);
|
|
30326
31005
|
}
|
|
30327
31006
|
remove() {
|
|
30328
|
-
const
|
|
30329
|
-
if (
|
|
30330
|
-
|
|
31007
|
+
const parent2 = this.parentNode;
|
|
31008
|
+
if (parent2) {
|
|
31009
|
+
parent2.removeChild(this);
|
|
30331
31010
|
}
|
|
30332
31011
|
}
|
|
30333
31012
|
insertChild(states, index, batch) {
|
|
@@ -30400,10 +31079,10 @@
|
|
|
30400
31079
|
async expand(expandParent) {
|
|
30401
31080
|
const done = () => {
|
|
30402
31081
|
if (expandParent) {
|
|
30403
|
-
let
|
|
30404
|
-
while (
|
|
30405
|
-
|
|
30406
|
-
|
|
31082
|
+
let parent2 = this.parentNode;
|
|
31083
|
+
while (parent2 && parent2.states.level > 0) {
|
|
31084
|
+
parent2.states.expanded = true;
|
|
31085
|
+
parent2 = parent2.parentNode;
|
|
30407
31086
|
}
|
|
30408
31087
|
}
|
|
30409
31088
|
this.states.expanded = true;
|
|
@@ -30480,10 +31159,10 @@
|
|
|
30480
31159
|
handleDescendants();
|
|
30481
31160
|
}
|
|
30482
31161
|
}
|
|
30483
|
-
const
|
|
30484
|
-
if (!
|
|
31162
|
+
const parent2 = this.parentNode;
|
|
31163
|
+
if (!parent2 || parent2.states.level === 0) return;
|
|
30485
31164
|
if (!recursion) {
|
|
30486
|
-
reInitChecked(
|
|
31165
|
+
reInitChecked(parent2);
|
|
30487
31166
|
}
|
|
30488
31167
|
}
|
|
30489
31168
|
getChildren(forceInit = false) {
|
|
@@ -30621,21 +31300,68 @@
|
|
|
30621
31300
|
parentNode.insertChild({ data });
|
|
30622
31301
|
}
|
|
30623
31302
|
}
|
|
31303
|
+
/**
|
|
31304
|
+
* 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
|
|
31305
|
+
* 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
|
|
31306
|
+
* @param checkedValues ~
|
|
31307
|
+
* @returns ~
|
|
31308
|
+
*/
|
|
31309
|
+
_getCascadeCheckedAnchorIds(checkedValues) {
|
|
31310
|
+
const checkedSet = new Set(checkedValues);
|
|
31311
|
+
const nodesMap = this.nodesMap;
|
|
31312
|
+
const anchors = [];
|
|
31313
|
+
for (const id of checkedValues) {
|
|
31314
|
+
const node = nodesMap[id];
|
|
31315
|
+
if (!node) continue;
|
|
31316
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
31317
|
+
(child) => checkedSet.has(child.getter.value)
|
|
31318
|
+
);
|
|
31319
|
+
if (!hasSelectedChildInSet) {
|
|
31320
|
+
anchors.push(id);
|
|
31321
|
+
}
|
|
31322
|
+
}
|
|
31323
|
+
anchors.sort((a, b) => {
|
|
31324
|
+
const na = nodesMap[a];
|
|
31325
|
+
const nb = nodesMap[b];
|
|
31326
|
+
if (!na || !nb) return 0;
|
|
31327
|
+
return nb.states.level - na.states.level;
|
|
31328
|
+
});
|
|
31329
|
+
return anchors;
|
|
31330
|
+
}
|
|
30624
31331
|
_initDefaultCheckedNodes() {
|
|
30625
31332
|
const checkedValues = this.checkedValues || [];
|
|
30626
31333
|
const nodesMap = this.nodesMap;
|
|
30627
|
-
|
|
31334
|
+
if (this.checkStrictly) {
|
|
31335
|
+
checkedValues.forEach((id) => {
|
|
31336
|
+
const node = nodesMap[id];
|
|
31337
|
+
if (node) {
|
|
31338
|
+
node.setChecked(true, false);
|
|
31339
|
+
}
|
|
31340
|
+
});
|
|
31341
|
+
return;
|
|
31342
|
+
}
|
|
31343
|
+
const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
|
|
31344
|
+
anchorIds.forEach((id) => {
|
|
30628
31345
|
const node = nodesMap[id];
|
|
30629
31346
|
if (node) {
|
|
30630
|
-
node.setChecked(true,
|
|
31347
|
+
node.setChecked(true, true);
|
|
30631
31348
|
}
|
|
30632
31349
|
});
|
|
30633
31350
|
}
|
|
30634
31351
|
_initDefaultCheckedNode(node) {
|
|
30635
31352
|
const checkedValues = this.checkedValues || [];
|
|
30636
31353
|
const nodeValue = node.getter.value;
|
|
30637
|
-
if (checkedValues.indexOf(nodeValue)
|
|
30638
|
-
|
|
31354
|
+
if (checkedValues.indexOf(nodeValue) === -1) return;
|
|
31355
|
+
if (this.checkStrictly) {
|
|
31356
|
+
node.setChecked(true, false);
|
|
31357
|
+
return;
|
|
31358
|
+
}
|
|
31359
|
+
const checkedSet = new Set(checkedValues);
|
|
31360
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
31361
|
+
(child) => checkedSet.has(child.getter.value)
|
|
31362
|
+
);
|
|
31363
|
+
if (!hasSelectedChildInSet) {
|
|
31364
|
+
node.setChecked(true, true);
|
|
30639
31365
|
}
|
|
30640
31366
|
}
|
|
30641
31367
|
setCheckedValues(newVal) {
|
|
@@ -30733,10 +31459,10 @@
|
|
|
30733
31459
|
node.setChecked(false, false);
|
|
30734
31460
|
}
|
|
30735
31461
|
} else {
|
|
30736
|
-
let
|
|
30737
|
-
while (
|
|
30738
|
-
cache[
|
|
30739
|
-
|
|
31462
|
+
let parent2 = node.parentNode;
|
|
31463
|
+
while (parent2 && parent2.states.level > 0) {
|
|
31464
|
+
cache[parent2.states.data[key]] = true;
|
|
31465
|
+
parent2 = parent2.parentNode;
|
|
30740
31466
|
}
|
|
30741
31467
|
if (node.states.isLeaf || this.checkStrictly) {
|
|
30742
31468
|
node.setChecked(true, false);
|
|
@@ -30858,9 +31584,9 @@
|
|
|
30858
31584
|
default: true
|
|
30859
31585
|
}
|
|
30860
31586
|
};
|
|
30861
|
-
const COMPONENT_NAME$
|
|
31587
|
+
const COMPONENT_NAME$6 = "vc-tree-node";
|
|
30862
31588
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
30863
|
-
name: COMPONENT_NAME$
|
|
31589
|
+
name: COMPONENT_NAME$6,
|
|
30864
31590
|
props: props$3,
|
|
30865
31591
|
emits: ["node-expand"],
|
|
30866
31592
|
setup(props2, {
|
|
@@ -31353,9 +32079,9 @@
|
|
|
31353
32079
|
default: () => KEY_VALUE
|
|
31354
32080
|
}
|
|
31355
32081
|
};
|
|
31356
|
-
const COMPONENT_NAME$
|
|
32082
|
+
const COMPONENT_NAME$5 = "vc-tree";
|
|
31357
32083
|
const Tree2 = /* @__PURE__ */ vue.defineComponent({
|
|
31358
|
-
name: COMPONENT_NAME$
|
|
32084
|
+
name: COMPONENT_NAME$5,
|
|
31359
32085
|
props: props$2,
|
|
31360
32086
|
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"],
|
|
31361
32087
|
setup(props2, {
|
|
@@ -31414,10 +32140,10 @@
|
|
|
31414
32140
|
const node = store.getNode(data);
|
|
31415
32141
|
if (!node) return [];
|
|
31416
32142
|
const path = [node.states.data];
|
|
31417
|
-
let
|
|
31418
|
-
while (
|
|
31419
|
-
path.push(
|
|
31420
|
-
|
|
32143
|
+
let parent2 = node.parentNode;
|
|
32144
|
+
while (parent2 && parent2 !== root) {
|
|
32145
|
+
path.push(parent2.states.data);
|
|
32146
|
+
parent2 = parent2.parentNode;
|
|
31421
32147
|
}
|
|
31422
32148
|
return path.reverse();
|
|
31423
32149
|
};
|
|
@@ -31549,6 +32275,217 @@
|
|
|
31549
32275
|
};
|
|
31550
32276
|
}
|
|
31551
32277
|
});
|
|
32278
|
+
const COMPONENT_NAME$4 = "vc-tree-select-content";
|
|
32279
|
+
const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
|
|
32280
|
+
name: COMPONENT_NAME$4,
|
|
32281
|
+
props: {
|
|
32282
|
+
value: {
|
|
32283
|
+
type: Array,
|
|
32284
|
+
required: true
|
|
32285
|
+
},
|
|
32286
|
+
data: {
|
|
32287
|
+
type: Array,
|
|
32288
|
+
default: () => []
|
|
32289
|
+
},
|
|
32290
|
+
checkStrictly: {
|
|
32291
|
+
type: Boolean,
|
|
32292
|
+
default: false
|
|
32293
|
+
},
|
|
32294
|
+
renderNodeLabel: Function
|
|
32295
|
+
},
|
|
32296
|
+
emits: ["change"],
|
|
32297
|
+
setup(props2, {
|
|
32298
|
+
emit
|
|
32299
|
+
}) {
|
|
32300
|
+
return () => {
|
|
32301
|
+
return vue.createVNode(Scroller, {
|
|
32302
|
+
"class": "vc-tree-select__options",
|
|
32303
|
+
"max-height": "200px"
|
|
32304
|
+
}, {
|
|
32305
|
+
default: () => [vue.createVNode(Tree2, {
|
|
32306
|
+
"model-value": props2.value,
|
|
32307
|
+
"expanded-values": props2.value,
|
|
32308
|
+
"data": props2.data,
|
|
32309
|
+
"checkStrictly": props2.checkStrictly,
|
|
32310
|
+
"allowDispatch": false,
|
|
32311
|
+
"showCheckbox": true,
|
|
32312
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
32313
|
+
"onChange": (_, data) => emit("change", _, data)
|
|
32314
|
+
}, null)]
|
|
32315
|
+
});
|
|
32316
|
+
};
|
|
32317
|
+
}
|
|
32318
|
+
});
|
|
32319
|
+
const COMPONENT_NAME$3 = "vc-tree-select-content-cascader";
|
|
32320
|
+
const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
|
|
32321
|
+
name: COMPONENT_NAME$3,
|
|
32322
|
+
props: {
|
|
32323
|
+
value: {
|
|
32324
|
+
type: Array,
|
|
32325
|
+
required: true
|
|
32326
|
+
},
|
|
32327
|
+
data: {
|
|
32328
|
+
type: Array,
|
|
32329
|
+
default: () => []
|
|
32330
|
+
},
|
|
32331
|
+
checkStrictly: {
|
|
32332
|
+
type: Boolean,
|
|
32333
|
+
default: false
|
|
32334
|
+
},
|
|
32335
|
+
renderNodeLabel: Function,
|
|
32336
|
+
numerable: {
|
|
32337
|
+
type: Boolean,
|
|
32338
|
+
default: false
|
|
32339
|
+
},
|
|
32340
|
+
separator: {
|
|
32341
|
+
type: String,
|
|
32342
|
+
default: ","
|
|
32343
|
+
},
|
|
32344
|
+
max: {
|
|
32345
|
+
type: Number,
|
|
32346
|
+
default: 1
|
|
32347
|
+
},
|
|
32348
|
+
nullValue: {
|
|
32349
|
+
type: [Number, String, Object],
|
|
32350
|
+
default: void 0
|
|
32351
|
+
}
|
|
32352
|
+
},
|
|
32353
|
+
emits: ["change"],
|
|
32354
|
+
setup(props2, {
|
|
32355
|
+
emit
|
|
32356
|
+
}) {
|
|
32357
|
+
const treeRef = vue.ref(null);
|
|
32358
|
+
const currentValue = vue.ref([]);
|
|
32359
|
+
const rebuildData = vue.computed(() => {
|
|
32360
|
+
if (!props2.data.length) return [];
|
|
32361
|
+
let temp = props2.data;
|
|
32362
|
+
const data = [];
|
|
32363
|
+
currentValue.value.forEach((cur) => {
|
|
32364
|
+
const col = temp;
|
|
32365
|
+
data.push(col);
|
|
32366
|
+
const next = (temp.find((i) => i.value == cur) || {}).children || [];
|
|
32367
|
+
temp = next;
|
|
32368
|
+
});
|
|
32369
|
+
data.push(temp);
|
|
32370
|
+
return data;
|
|
32371
|
+
});
|
|
32372
|
+
const panelTick = vue.ref(0);
|
|
32373
|
+
const columns = vue.computed(() => Array.from({
|
|
32374
|
+
length: currentValue.value.length + 1
|
|
32375
|
+
}).map((_, index) => index));
|
|
32376
|
+
const handleHover = (value, columnIndex) => {
|
|
32377
|
+
const len = currentValue.value.length - columnIndex;
|
|
32378
|
+
currentValue.value.splice(columnIndex, len, value);
|
|
32379
|
+
};
|
|
32380
|
+
const sync = async () => {
|
|
32381
|
+
await vue.nextTick();
|
|
32382
|
+
const tree = treeRef.value;
|
|
32383
|
+
if (!tree) return;
|
|
32384
|
+
const data = {
|
|
32385
|
+
checkedNodes: tree.getCheckedNodes(),
|
|
32386
|
+
checkedValues: tree.getCheckedValues(),
|
|
32387
|
+
halfCheckedNodes: tree.getHalfCheckedNodes(),
|
|
32388
|
+
halfCheckedValues: tree.getHalfCheckedValues()
|
|
32389
|
+
};
|
|
32390
|
+
panelTick.value++;
|
|
32391
|
+
emit("change", null, data);
|
|
32392
|
+
};
|
|
32393
|
+
const getNodeState = (item) => {
|
|
32394
|
+
const tree = treeRef.value;
|
|
32395
|
+
if (!tree) {
|
|
32396
|
+
return {
|
|
32397
|
+
checked: false,
|
|
32398
|
+
indeterminate: false
|
|
32399
|
+
};
|
|
32400
|
+
}
|
|
32401
|
+
const node = tree.getNode(item);
|
|
32402
|
+
if (!node) {
|
|
32403
|
+
return {
|
|
32404
|
+
checked: false,
|
|
32405
|
+
indeterminate: false
|
|
32406
|
+
};
|
|
32407
|
+
}
|
|
32408
|
+
return {
|
|
32409
|
+
checked: !!node.states.checked,
|
|
32410
|
+
indeterminate: !!node.states.indeterminate
|
|
32411
|
+
};
|
|
32412
|
+
};
|
|
32413
|
+
const hasChildren = (item) => {
|
|
32414
|
+
return !!(item.children && item.children.length > 0);
|
|
32415
|
+
};
|
|
32416
|
+
const handleCheckboxChange = async (v, item) => {
|
|
32417
|
+
const tree = treeRef.value;
|
|
32418
|
+
if (!tree) return;
|
|
32419
|
+
tree.setChecked(item, v, !props2.checkStrictly);
|
|
32420
|
+
sync();
|
|
32421
|
+
};
|
|
32422
|
+
const handleLabelClick = (v, item) => {
|
|
32423
|
+
const tree = treeRef.value;
|
|
32424
|
+
if (!tree) return;
|
|
32425
|
+
tree.setChecked(item, v, !props2.checkStrictly);
|
|
32426
|
+
sync();
|
|
32427
|
+
};
|
|
32428
|
+
return () => {
|
|
32429
|
+
return vue.createVNode("div", {
|
|
32430
|
+
"class": "vc-tree-select__cascader"
|
|
32431
|
+
}, [vue.createVNode(Tree2, {
|
|
32432
|
+
"ref": treeRef,
|
|
32433
|
+
"class": "vc-tree-select__cascader-tree-hidden",
|
|
32434
|
+
"model-value": props2.value,
|
|
32435
|
+
"expanded-values": props2.value,
|
|
32436
|
+
"data": props2.data,
|
|
32437
|
+
"checkStrictly": props2.checkStrictly,
|
|
32438
|
+
"allowDispatch": false,
|
|
32439
|
+
"showCheckbox": true,
|
|
32440
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
32441
|
+
"numerable": props2.numerable,
|
|
32442
|
+
"separator": props2.separator,
|
|
32443
|
+
"max": props2.max,
|
|
32444
|
+
"nullValue": props2.nullValue
|
|
32445
|
+
}, null), vue.createVNode("div", {
|
|
32446
|
+
"class": "vc-tree-select__cascader-columns"
|
|
32447
|
+
}, [columns.value.map((columnIndex) => {
|
|
32448
|
+
const col = rebuildData.value[columnIndex];
|
|
32449
|
+
if (!col || !col.length) return null;
|
|
32450
|
+
return vue.createVNode("div", {
|
|
32451
|
+
"class": "vc-tree-select__cascader-column",
|
|
32452
|
+
"key": columnIndex
|
|
32453
|
+
}, [vue.createVNode("div", {
|
|
32454
|
+
"class": "vc-tree-select__cascader-column-wrapper"
|
|
32455
|
+
}, [col.map((item) => {
|
|
32456
|
+
const state = getNodeState(item);
|
|
32457
|
+
const isSelect = currentValue.value[columnIndex] === item.value;
|
|
32458
|
+
const child = hasChildren(item);
|
|
32459
|
+
return vue.createVNode("div", {
|
|
32460
|
+
"key": item.value,
|
|
32461
|
+
"class": ["vc-tree-select__cascader-item", {
|
|
32462
|
+
"is-select": isSelect
|
|
32463
|
+
}],
|
|
32464
|
+
"onMouseenter": () => handleHover(item.value, columnIndex),
|
|
32465
|
+
"onClick": () => handleLabelClick(!state.checked, item)
|
|
32466
|
+
}, [vue.createVNode("span", {
|
|
32467
|
+
"class": "vc-tree-select__cascader-checkbox",
|
|
32468
|
+
"onClick": (e) => e.stopPropagation()
|
|
32469
|
+
}, [vue.createVNode(Checkbox, {
|
|
32470
|
+
"modelValue": state.checked,
|
|
32471
|
+
"indeterminate": state.indeterminate,
|
|
32472
|
+
"disabled": !!item.disabled,
|
|
32473
|
+
"onChange": (v) => handleCheckboxChange(v, item)
|
|
32474
|
+
}, null)]), vue.createVNode("span", {
|
|
32475
|
+
"class": "vc-tree-select__cascader-label"
|
|
32476
|
+
}, [props2.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
|
|
32477
|
+
"render": props2.renderNodeLabel,
|
|
32478
|
+
"store": treeRef.value.getNode(item),
|
|
32479
|
+
"row": item
|
|
32480
|
+
}, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
|
|
32481
|
+
"type": "right",
|
|
32482
|
+
"class": "vc-tree-select__cascader-icon"
|
|
32483
|
+
}, null) : null]);
|
|
32484
|
+
})])]);
|
|
32485
|
+
})])]);
|
|
32486
|
+
};
|
|
32487
|
+
}
|
|
32488
|
+
});
|
|
31552
32489
|
const treeKeys = [
|
|
31553
32490
|
"checkStrictly",
|
|
31554
32491
|
"data",
|
|
@@ -31557,7 +32494,18 @@
|
|
|
31557
32494
|
];
|
|
31558
32495
|
const props$1 = {
|
|
31559
32496
|
...props$1a,
|
|
31560
|
-
...pick(props$2, treeKeys)
|
|
32497
|
+
...pick(props$2, treeKeys),
|
|
32498
|
+
autoWidth: {
|
|
32499
|
+
type: Boolean,
|
|
32500
|
+
default: void 0
|
|
32501
|
+
},
|
|
32502
|
+
/**
|
|
32503
|
+
* 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
|
|
32504
|
+
*/
|
|
32505
|
+
cascader: {
|
|
32506
|
+
type: Boolean,
|
|
32507
|
+
default: false
|
|
32508
|
+
}
|
|
31561
32509
|
};
|
|
31562
32510
|
const COMPONENT_NAME$2 = "vc-tree-select";
|
|
31563
32511
|
const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -31580,12 +32528,37 @@
|
|
|
31580
32528
|
const searchValue = vue.ref("");
|
|
31581
32529
|
const searchRegex = vue.ref(new RegExp(""));
|
|
31582
32530
|
const currentValue = vue.ref([]);
|
|
32531
|
+
const currentValueGroups = vue.computed(() => {
|
|
32532
|
+
if (props2.checkStrictly) return;
|
|
32533
|
+
if (!props2.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
|
|
32534
|
+
return [];
|
|
32535
|
+
}
|
|
32536
|
+
const pathMap = /* @__PURE__ */ new Map();
|
|
32537
|
+
const traverse = (data, path = []) => {
|
|
32538
|
+
data.forEach((item) => {
|
|
32539
|
+
const v = item.value;
|
|
32540
|
+
if (v == null) return;
|
|
32541
|
+
const fullPath = [...path, v];
|
|
32542
|
+
pathMap.set(v, fullPath);
|
|
32543
|
+
if (item.children?.length) traverse(item.children, fullPath);
|
|
32544
|
+
});
|
|
32545
|
+
};
|
|
32546
|
+
traverse(props2.data);
|
|
32547
|
+
const allPaths = currentValue.value.map((v) => pathMap.get(v)).filter(Boolean);
|
|
32548
|
+
return allPaths.filter((path) => !allPaths.some((other) => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
|
|
32549
|
+
});
|
|
31583
32550
|
const source = vue.computed(() => {
|
|
31584
32551
|
return flattenData$1(props2.data, {
|
|
31585
32552
|
parent: true,
|
|
31586
32553
|
cascader: true
|
|
31587
32554
|
});
|
|
31588
32555
|
});
|
|
32556
|
+
const labelMap = vue.computed(() => {
|
|
32557
|
+
return source.value.reduce((pre, cur) => {
|
|
32558
|
+
pre[cur.value] = cur.label || "";
|
|
32559
|
+
return pre;
|
|
32560
|
+
}, {});
|
|
32561
|
+
});
|
|
31589
32562
|
const icon = vue.computed(() => {
|
|
31590
32563
|
return isActive.value ? "up" : "down";
|
|
31591
32564
|
});
|
|
@@ -31602,17 +32575,34 @@
|
|
|
31602
32575
|
"is-disabled": props2.disabled
|
|
31603
32576
|
};
|
|
31604
32577
|
});
|
|
31605
|
-
const
|
|
32578
|
+
const displayTags = vue.computed(() => {
|
|
31606
32579
|
if (!props2.data.length) {
|
|
31607
32580
|
return [];
|
|
31608
32581
|
}
|
|
31609
|
-
|
|
32582
|
+
if (props2.checkStrictly) {
|
|
32583
|
+
return currentValue.value.map((v) => ({
|
|
32584
|
+
value: v,
|
|
32585
|
+
label: labelMap.value[v] || ""
|
|
32586
|
+
}));
|
|
32587
|
+
}
|
|
32588
|
+
return (currentValueGroups.value || []).map((path) => {
|
|
32589
|
+
const value = path[path.length - 1];
|
|
32590
|
+
const label = path.map((v) => labelMap.value[v] || "").filter(Boolean).join(" / ");
|
|
32591
|
+
return {
|
|
32592
|
+
path,
|
|
32593
|
+
value,
|
|
32594
|
+
label
|
|
32595
|
+
};
|
|
32596
|
+
});
|
|
31610
32597
|
});
|
|
31611
32598
|
const collapseTagCount = vue.computed(() => {
|
|
31612
32599
|
if (!props2.maxTags) return 0;
|
|
31613
|
-
const v =
|
|
32600
|
+
const v = displayTags.value.length - props2.maxTags;
|
|
31614
32601
|
return v < 0 ? 0 : v;
|
|
31615
32602
|
});
|
|
32603
|
+
const autoWidth = vue.computed(() => {
|
|
32604
|
+
return typeof props2.autoWidth === "boolean" ? props2.autoWidth : !!props2.cascader;
|
|
32605
|
+
});
|
|
31616
32606
|
const sync = () => {
|
|
31617
32607
|
const v = toModelValue(currentValue.value, {
|
|
31618
32608
|
modelValue: props2.modelValue,
|
|
@@ -31621,8 +32611,9 @@
|
|
|
31621
32611
|
separator: props2.separator,
|
|
31622
32612
|
nullValue: props2.nullValue
|
|
31623
32613
|
});
|
|
31624
|
-
|
|
31625
|
-
emit("
|
|
32614
|
+
const labels = displayTags.value.map((item) => item.label);
|
|
32615
|
+
emit("update:modelValue", v, labels);
|
|
32616
|
+
emit("change", v, labels);
|
|
31626
32617
|
formItem?.change?.(currentValue.value);
|
|
31627
32618
|
};
|
|
31628
32619
|
const _loadData = debounce(function() {
|
|
@@ -31641,8 +32632,15 @@
|
|
|
31641
32632
|
const close = () => {
|
|
31642
32633
|
isActive.value = false;
|
|
31643
32634
|
};
|
|
31644
|
-
const handleClose = (
|
|
31645
|
-
|
|
32635
|
+
const handleClose = (item) => {
|
|
32636
|
+
if (props2.checkStrictly) {
|
|
32637
|
+
const index = currentValue.value.findIndex((v) => v === item.value);
|
|
32638
|
+
if (index === -1) return;
|
|
32639
|
+
currentValue.value = currentValue.value.filter((_, i) => i !== index);
|
|
32640
|
+
} else if (item.path) {
|
|
32641
|
+
const remaining = (currentValueGroups.value || []).filter((p) => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
|
|
32642
|
+
currentValue.value = [...new Set(remaining.flat())];
|
|
32643
|
+
}
|
|
31646
32644
|
sync();
|
|
31647
32645
|
};
|
|
31648
32646
|
const handleClear = (e) => {
|
|
@@ -31679,6 +32677,7 @@
|
|
|
31679
32677
|
multiple,
|
|
31680
32678
|
isActive,
|
|
31681
32679
|
current: currentValue,
|
|
32680
|
+
currentValueGroups,
|
|
31682
32681
|
// for portal
|
|
31683
32682
|
toggle(v) {
|
|
31684
32683
|
v = typeof v === "boolean" ? v : !isActive.value;
|
|
@@ -31693,7 +32692,7 @@
|
|
|
31693
32692
|
"trigger": props2.trigger,
|
|
31694
32693
|
"tag": props2.tag,
|
|
31695
32694
|
"placement": props2.placement,
|
|
31696
|
-
"
|
|
32695
|
+
"autoWidth": autoWidth.value,
|
|
31697
32696
|
"disabled": props2.disabled,
|
|
31698
32697
|
"portalClass": [["is-padding-none", props2.portalClass]],
|
|
31699
32698
|
"class": [classes.value, its.value.class, "vc-tree-select"],
|
|
@@ -31710,22 +32709,22 @@
|
|
|
31710
32709
|
return vue.createVNode(Input$1, {
|
|
31711
32710
|
"id": props2.id,
|
|
31712
32711
|
"disabled": props2.disabled,
|
|
31713
|
-
"modelValue":
|
|
32712
|
+
"modelValue": displayTags.value[0]?.label || props2.extra,
|
|
31714
32713
|
"allow-dispatch": false,
|
|
31715
32714
|
"class": "vc-tree-select__input",
|
|
31716
32715
|
"readonly": true,
|
|
31717
32716
|
"placeholder": its.value.attrs?.placeholder || "请选择"
|
|
31718
32717
|
}, {
|
|
31719
|
-
content: multiple.value &&
|
|
32718
|
+
content: multiple.value && displayTags.value.length > 0 ? () => {
|
|
31720
32719
|
return vue.createVNode("div", {
|
|
31721
32720
|
"class": [classes.value, "vc-tree-select__tags"]
|
|
31722
|
-
}, [
|
|
32721
|
+
}, [displayTags.value.slice(0, props2.maxTags).map((item) => {
|
|
31723
32722
|
return vue.createVNode(Tag, {
|
|
31724
|
-
"key": item,
|
|
32723
|
+
"key": item.path ? item.path.join("-") : item.value,
|
|
31725
32724
|
"closable": !props2.disabled,
|
|
31726
|
-
"onClose": () => handleClose(
|
|
32725
|
+
"onClose": () => handleClose(item)
|
|
31727
32726
|
}, {
|
|
31728
|
-
default: () => [
|
|
32727
|
+
default: () => [item.label]
|
|
31729
32728
|
});
|
|
31730
32729
|
}), collapseTagCount.value ? vue.createVNode(Tag, null, {
|
|
31731
32730
|
default: () => [`+${collapseTagCount.value}...`]
|
|
@@ -31758,16 +32757,23 @@
|
|
|
31758
32757
|
}, [vue.createVNode(Spin, {
|
|
31759
32758
|
"size": 16
|
|
31760
32759
|
}, null)]), vue.createVNode(Scroller, {
|
|
31761
|
-
"class": "vc-tree-select__options",
|
|
32760
|
+
"class": ["vc-tree-select__options", props2.cascader && "is-cascader"],
|
|
31762
32761
|
"max-height": "200px"
|
|
31763
32762
|
}, {
|
|
31764
|
-
default: () => [vue.createVNode(
|
|
31765
|
-
"
|
|
31766
|
-
"
|
|
32763
|
+
default: () => [props2.cascader ? vue.createVNode(TreeSelectContentCascader, {
|
|
32764
|
+
"value": currentValue.value,
|
|
32765
|
+
"data": props2.data,
|
|
32766
|
+
"checkStrictly": props2.checkStrictly,
|
|
32767
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
32768
|
+
"numerable": props2.numerable,
|
|
32769
|
+
"separator": props2.separator,
|
|
32770
|
+
"max": props2.max,
|
|
32771
|
+
"nullValue": props2.nullValue,
|
|
32772
|
+
"onChange": handleChange
|
|
32773
|
+
}, null) : vue.createVNode(TreeSelectContent, {
|
|
32774
|
+
"value": currentValue.value,
|
|
31767
32775
|
"data": props2.data,
|
|
31768
32776
|
"checkStrictly": props2.checkStrictly,
|
|
31769
|
-
"allowDispatch": false,
|
|
31770
|
-
"showCheckbox": true,
|
|
31771
32777
|
"renderNodeLabel": props2.renderNodeLabel,
|
|
31772
32778
|
"onChange": handleChange
|
|
31773
32779
|
}, null)]
|
|
@@ -32336,8 +33342,8 @@
|
|
|
32336
33342
|
MCard,
|
|
32337
33343
|
Carousel,
|
|
32338
33344
|
MCarousel,
|
|
32339
|
-
|
|
32340
|
-
|
|
33345
|
+
CarouselItem,
|
|
33346
|
+
MCarouselItem,
|
|
32341
33347
|
Cascader,
|
|
32342
33348
|
MCascader,
|
|
32343
33349
|
// MCascaderView,
|
|
@@ -138689,6 +139695,7 @@ ${r}
|
|
|
138689
139695
|
exports.Calendar = Calendar$1;
|
|
138690
139696
|
exports.Card = Card;
|
|
138691
139697
|
exports.Carousel = Carousel;
|
|
139698
|
+
exports.CarouselItem = CarouselItem;
|
|
138692
139699
|
exports.Cascader = Cascader;
|
|
138693
139700
|
exports.Chart = Chart;
|
|
138694
139701
|
exports.Checkbox = Checkbox;
|
|
@@ -138735,6 +139742,7 @@ ${r}
|
|
|
138735
139742
|
exports.MCalendar = MCalendar;
|
|
138736
139743
|
exports.MCard = MCard;
|
|
138737
139744
|
exports.MCarousel = MCarousel;
|
|
139745
|
+
exports.MCarouselItem = MCarouselItem;
|
|
138738
139746
|
exports.MCascader = MCascader;
|
|
138739
139747
|
exports.MChart = MChart;
|
|
138740
139748
|
exports.MCheckbox = MCheckbox;
|