@deot/vc 1.0.63 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +389 -106
- package/dist/index.iife.js +1417 -396
- package/dist/index.js +3 -3
- package/dist/index.umd.cjs +1417 -396
- 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,719 @@
|
|
|
10642
10642
|
}
|
|
10643
10643
|
});
|
|
10644
10644
|
const MCard = Card;
|
|
10645
|
-
const
|
|
10646
|
-
|
|
10645
|
+
const DRAG_CLICK_SUPPRESS_PX = 5;
|
|
10646
|
+
const swallowNextClickFromDrag = () => {
|
|
10647
|
+
let invoked = false;
|
|
10648
|
+
const options = { capture: true, once: true };
|
|
10649
|
+
const swallow = (e) => {
|
|
10650
|
+
invoked = true;
|
|
10651
|
+
e.preventDefault();
|
|
10652
|
+
e.stopPropagation();
|
|
10653
|
+
e.stopImmediatePropagation();
|
|
10654
|
+
};
|
|
10655
|
+
document.addEventListener("click", swallow, options);
|
|
10656
|
+
setTimeout(() => !invoked && document.removeEventListener("click", swallow, options), 0);
|
|
10657
|
+
};
|
|
10658
|
+
const useCarousel = (wrapper, content, expose) => {
|
|
10659
|
+
const instance = vue.getCurrentInstance();
|
|
10660
|
+
const props2 = instance.props;
|
|
10661
|
+
const { emit } = instance;
|
|
10662
|
+
const items = vue.ref([]);
|
|
10663
|
+
const activeIndex = vue.ref(-1);
|
|
10664
|
+
const timer = vue.ref(null);
|
|
10665
|
+
const offset = vue.ref(0);
|
|
10666
|
+
const carouselId = vue.ref(getUid("carousel"));
|
|
10667
|
+
const start = vue.ref();
|
|
10668
|
+
const startX = vue.ref();
|
|
10669
|
+
const startY = vue.ref();
|
|
10670
|
+
const dragMovedPastThreshold = vue.ref(false);
|
|
10671
|
+
const allowTransition = vue.ref(false);
|
|
10672
|
+
const direction = vue.computed(() => {
|
|
10673
|
+
return props2.vertical ? "vertical" : "horizontal";
|
|
10674
|
+
});
|
|
10675
|
+
const hasLabel = vue.computed(() => {
|
|
10676
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
10677
|
+
});
|
|
10678
|
+
const dotsClasses = vue.computed(() => {
|
|
10679
|
+
const classes = ["is-" + direction.value];
|
|
10680
|
+
if (hasLabel.value) {
|
|
10681
|
+
classes.push("is-labels");
|
|
10682
|
+
}
|
|
10683
|
+
if (props2.dots === "outside" || props2.card) {
|
|
10684
|
+
classes.push("is-outside");
|
|
10685
|
+
}
|
|
10686
|
+
return classes;
|
|
10687
|
+
});
|
|
10688
|
+
const resetItems = (oldIndex) => {
|
|
10689
|
+
items.value.forEach((item, index) => {
|
|
10690
|
+
item.exposed?.reset?.(index, activeIndex.value, oldIndex);
|
|
10691
|
+
});
|
|
10692
|
+
};
|
|
10693
|
+
const playSlides = () => {
|
|
10694
|
+
allowTransition.value = true;
|
|
10695
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
10696
|
+
activeIndex.value++;
|
|
10697
|
+
} else if (props2.loop) {
|
|
10698
|
+
activeIndex.value = 0;
|
|
10699
|
+
}
|
|
10700
|
+
};
|
|
10701
|
+
const pauseTimer = () => {
|
|
10702
|
+
if (timer.value) {
|
|
10703
|
+
clearInterval(timer.value);
|
|
10704
|
+
timer.value = null;
|
|
10705
|
+
}
|
|
10706
|
+
};
|
|
10707
|
+
const startTimer = () => {
|
|
10708
|
+
if (props2.t <= 0 || !props2.autoplay || timer.value) return;
|
|
10709
|
+
timer.value = setInterval(playSlides, props2.t);
|
|
10710
|
+
};
|
|
10711
|
+
const setActiveItem = (index) => {
|
|
10712
|
+
if (typeof index === "string") {
|
|
10713
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
10714
|
+
if (filteredItems.length > 0) {
|
|
10715
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
10716
|
+
}
|
|
10717
|
+
}
|
|
10718
|
+
index = Number(index);
|
|
10719
|
+
if (isNaN(index) || index !== Math.floor(index)) {
|
|
10720
|
+
throw new VcError("carousel", "索引必须是整数");
|
|
10721
|
+
}
|
|
10722
|
+
const length = items.value.length;
|
|
10723
|
+
const oldIndex = activeIndex.value;
|
|
10724
|
+
if (index < 0) {
|
|
10725
|
+
activeIndex.value = props2.loop ? length - 1 : 0;
|
|
10726
|
+
} else if (index >= length) {
|
|
10727
|
+
activeIndex.value = props2.loop ? 0 : length - 1;
|
|
10728
|
+
} else {
|
|
10729
|
+
activeIndex.value = index;
|
|
10730
|
+
}
|
|
10731
|
+
if (oldIndex === activeIndex.value) {
|
|
10732
|
+
resetItems(oldIndex);
|
|
10733
|
+
}
|
|
10734
|
+
};
|
|
10735
|
+
const prev = () => {
|
|
10736
|
+
setActiveItem(activeIndex.value - 1);
|
|
10737
|
+
};
|
|
10738
|
+
const next = () => {
|
|
10739
|
+
setActiveItem(activeIndex.value + 1);
|
|
10740
|
+
};
|
|
10741
|
+
const handleDotClick = (index) => {
|
|
10742
|
+
activeIndex.value = index;
|
|
10743
|
+
};
|
|
10744
|
+
const handleStart = (e) => {
|
|
10745
|
+
allowTransition.value = true;
|
|
10746
|
+
if (!props2.draggable) return;
|
|
10747
|
+
pauseTimer();
|
|
10748
|
+
start.value = true;
|
|
10749
|
+
dragMovedPastThreshold.value = false;
|
|
10750
|
+
startX.value = e.screenX;
|
|
10751
|
+
startY.value = e.screenY;
|
|
10752
|
+
};
|
|
10753
|
+
const handleMove = (e) => {
|
|
10754
|
+
if (!start.value || !props2.draggable) return;
|
|
10755
|
+
offset.value = !props2.vertical ? e.screenX - startX.value : e.screenY - startY.value;
|
|
10756
|
+
if (Math.abs(offset.value) > DRAG_CLICK_SUPPRESS_PX) {
|
|
10757
|
+
dragMovedPastThreshold.value = true;
|
|
10758
|
+
}
|
|
10759
|
+
resetItems();
|
|
10760
|
+
};
|
|
10761
|
+
const handleEnd = () => {
|
|
10762
|
+
if (!props2.draggable) return;
|
|
10763
|
+
const shouldSwallowClick = dragMovedPastThreshold.value;
|
|
10764
|
+
start.value = false;
|
|
10765
|
+
startTimer();
|
|
10766
|
+
const $offset = Math.abs(offset.value);
|
|
10767
|
+
const $direction = offset.value > 0;
|
|
10768
|
+
offset.value = 0;
|
|
10769
|
+
if ($offset > 5) {
|
|
10770
|
+
$direction && prev();
|
|
10771
|
+
!$direction && next();
|
|
10772
|
+
} else {
|
|
10773
|
+
resetItems();
|
|
10774
|
+
}
|
|
10775
|
+
if (shouldSwallowClick) {
|
|
10776
|
+
swallowNextClickFromDrag();
|
|
10777
|
+
}
|
|
10778
|
+
dragMovedPastThreshold.value = false;
|
|
10779
|
+
};
|
|
10780
|
+
vue.watch(
|
|
10781
|
+
() => items.value,
|
|
10782
|
+
(v) => {
|
|
10783
|
+
if (v.length > 0) setActiveItem(props2.initialIndex);
|
|
10784
|
+
}
|
|
10785
|
+
);
|
|
10786
|
+
vue.watch(
|
|
10787
|
+
() => activeIndex.value,
|
|
10788
|
+
(v, oldV) => {
|
|
10789
|
+
resetItems(oldV);
|
|
10790
|
+
emit("change", v, oldV);
|
|
10791
|
+
}
|
|
10792
|
+
);
|
|
10793
|
+
vue.watch(
|
|
10794
|
+
() => props2.autoplay,
|
|
10795
|
+
(v) => {
|
|
10796
|
+
v ? startTimer() : pauseTimer();
|
|
10797
|
+
}
|
|
10798
|
+
);
|
|
10799
|
+
vue.watch(
|
|
10800
|
+
() => props2.loop,
|
|
10801
|
+
() => {
|
|
10802
|
+
setActiveItem(activeIndex.value);
|
|
10803
|
+
}
|
|
10804
|
+
);
|
|
10805
|
+
vue.watch(
|
|
10806
|
+
() => props2.t,
|
|
10807
|
+
() => {
|
|
10808
|
+
pauseTimer();
|
|
10809
|
+
startTimer();
|
|
10810
|
+
}
|
|
10811
|
+
);
|
|
10812
|
+
vue.onMounted(() => {
|
|
10813
|
+
vue.nextTick(() => {
|
|
10814
|
+
if (wrapper.value) Resize.on(wrapper.value, resetItems);
|
|
10815
|
+
if (props2.initialIndex < items.value.length && props2.initialIndex >= 0) {
|
|
10816
|
+
activeIndex.value = props2.initialIndex;
|
|
10817
|
+
}
|
|
10818
|
+
startTimer();
|
|
10819
|
+
});
|
|
10820
|
+
});
|
|
10821
|
+
vue.onBeforeUnmount(() => {
|
|
10822
|
+
if (wrapper.value) Resize.off(wrapper.value, resetItems);
|
|
10823
|
+
pauseTimer();
|
|
10824
|
+
startTimer();
|
|
10825
|
+
});
|
|
10826
|
+
const add = (item) => {
|
|
10827
|
+
if (!item) return;
|
|
10828
|
+
vue.nextTick(() => {
|
|
10829
|
+
if (content.value) {
|
|
10830
|
+
const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
|
|
10831
|
+
items.value.splice(index, 0, item);
|
|
10832
|
+
return;
|
|
10833
|
+
}
|
|
10834
|
+
items.value.push(item);
|
|
10835
|
+
});
|
|
10836
|
+
};
|
|
10837
|
+
const remove = (item) => {
|
|
10838
|
+
if (!item) return;
|
|
10839
|
+
items.value.splice(items.value.indexOf(item), 1);
|
|
10840
|
+
};
|
|
10841
|
+
vue.provide("vc-carousel", {
|
|
10842
|
+
props: props2,
|
|
10843
|
+
items,
|
|
10844
|
+
offset,
|
|
10845
|
+
allowTransition,
|
|
10846
|
+
setActiveItem,
|
|
10847
|
+
wrapper,
|
|
10848
|
+
content,
|
|
10849
|
+
add,
|
|
10850
|
+
remove
|
|
10851
|
+
});
|
|
10852
|
+
expose({
|
|
10853
|
+
setActiveItem,
|
|
10854
|
+
prev,
|
|
10855
|
+
next
|
|
10856
|
+
});
|
|
10857
|
+
return {
|
|
10858
|
+
carouselId,
|
|
10859
|
+
allowTransition,
|
|
10860
|
+
items,
|
|
10861
|
+
activeIndex,
|
|
10862
|
+
offset,
|
|
10863
|
+
direction,
|
|
10864
|
+
hasLabel,
|
|
10865
|
+
dotsClasses,
|
|
10866
|
+
start,
|
|
10867
|
+
startX,
|
|
10868
|
+
startY,
|
|
10869
|
+
handleStart,
|
|
10870
|
+
handleMove,
|
|
10871
|
+
handleEnd,
|
|
10872
|
+
handleDotClick,
|
|
10873
|
+
prev,
|
|
10874
|
+
next,
|
|
10875
|
+
setActiveItem,
|
|
10876
|
+
pauseTimer,
|
|
10877
|
+
startTimer
|
|
10878
|
+
};
|
|
10879
|
+
};
|
|
10880
|
+
const props$1j = {
|
|
10881
|
+
t: {
|
|
10882
|
+
type: Number,
|
|
10883
|
+
default: 3e3
|
|
10884
|
+
},
|
|
10885
|
+
card: Boolean,
|
|
10886
|
+
gutter: {
|
|
10887
|
+
type: Number,
|
|
10888
|
+
default: 0
|
|
10889
|
+
},
|
|
10890
|
+
height: [String, Number],
|
|
10891
|
+
initialIndex: {
|
|
10892
|
+
type: Number,
|
|
10893
|
+
default: 0
|
|
10894
|
+
},
|
|
10895
|
+
trigger: {
|
|
10647
10896
|
type: String,
|
|
10648
|
-
default: "
|
|
10897
|
+
default: "hover"
|
|
10898
|
+
},
|
|
10899
|
+
autoplay: {
|
|
10900
|
+
type: Boolean,
|
|
10901
|
+
default: true
|
|
10902
|
+
},
|
|
10903
|
+
dots: {
|
|
10904
|
+
type: [String, Boolean],
|
|
10905
|
+
default: "bottom"
|
|
10906
|
+
// bottom/outside | false
|
|
10907
|
+
},
|
|
10908
|
+
arrow: {
|
|
10909
|
+
type: [String, Boolean],
|
|
10910
|
+
default: "hover"
|
|
10911
|
+
// hover/always | false
|
|
10912
|
+
},
|
|
10913
|
+
loop: {
|
|
10914
|
+
type: Boolean,
|
|
10915
|
+
default: true
|
|
10916
|
+
},
|
|
10917
|
+
vertical: {
|
|
10918
|
+
type: Boolean,
|
|
10919
|
+
default: false
|
|
10920
|
+
},
|
|
10921
|
+
draggable: {
|
|
10922
|
+
type: Boolean,
|
|
10923
|
+
default: true
|
|
10649
10924
|
}
|
|
10650
10925
|
};
|
|
10651
|
-
const COMPONENT_NAME$
|
|
10926
|
+
const COMPONENT_NAME$1$ = "vc-carousel";
|
|
10652
10927
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
10653
|
-
name: COMPONENT_NAME$
|
|
10928
|
+
name: COMPONENT_NAME$1$,
|
|
10929
|
+
props: props$1j,
|
|
10930
|
+
setup(props2, {
|
|
10931
|
+
slots,
|
|
10932
|
+
expose
|
|
10933
|
+
}) {
|
|
10934
|
+
const isHover = vue.ref(false);
|
|
10935
|
+
const wrapper = vue.ref(null);
|
|
10936
|
+
const content = vue.ref(null);
|
|
10937
|
+
const arrowDisplay = vue.computed(() => {
|
|
10938
|
+
return props2.arrow && !props2.vertical;
|
|
10939
|
+
});
|
|
10940
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
10941
|
+
const itemInStage = (item, index, items) => {
|
|
10942
|
+
const length = items.length;
|
|
10943
|
+
const isInStage = item.exposed.isInStage.value;
|
|
10944
|
+
if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
|
|
10945
|
+
return "left";
|
|
10946
|
+
} else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
|
|
10947
|
+
return "right";
|
|
10948
|
+
}
|
|
10949
|
+
return false;
|
|
10950
|
+
};
|
|
10951
|
+
const handleButtonEnter = (arrow) => {
|
|
10952
|
+
if (props2.vertical) return;
|
|
10953
|
+
carousel.items.value.forEach((item, index, items) => {
|
|
10954
|
+
if (arrow === itemInStage(item, index, items)) {
|
|
10955
|
+
item.exposed.isHover.value = true;
|
|
10956
|
+
}
|
|
10957
|
+
});
|
|
10958
|
+
};
|
|
10959
|
+
const handleButtonLeave = () => {
|
|
10960
|
+
if (props2.vertical) return;
|
|
10961
|
+
carousel.items.value.forEach((item) => {
|
|
10962
|
+
item.exposed.isHover.value = false;
|
|
10963
|
+
});
|
|
10964
|
+
};
|
|
10965
|
+
const handleDotHover = (index) => {
|
|
10966
|
+
if (props2.trigger === "hover" && index !== carousel.activeIndex.value) {
|
|
10967
|
+
carousel.activeIndex.value = index;
|
|
10968
|
+
}
|
|
10969
|
+
};
|
|
10970
|
+
const handleMouseEnter = () => {
|
|
10971
|
+
isHover.value = true;
|
|
10972
|
+
carousel.pauseTimer();
|
|
10973
|
+
};
|
|
10974
|
+
const handleMouseLeave = () => {
|
|
10975
|
+
isHover.value = false;
|
|
10976
|
+
carousel.startTimer();
|
|
10977
|
+
};
|
|
10978
|
+
const throttledArrowClick = throttle$1(carousel.setActiveItem);
|
|
10979
|
+
const throttledDotHover = throttle$1(handleDotHover);
|
|
10980
|
+
return () => {
|
|
10981
|
+
return vue.createVNode("div", {
|
|
10982
|
+
"ref": wrapper,
|
|
10983
|
+
"class": ["vc-carousel", `is-${carousel.direction.value}`],
|
|
10984
|
+
"onMousedown": vue.withModifiers(carousel.handleStart, ["stop", "prevent"]),
|
|
10985
|
+
"onMousemove": vue.withModifiers(carousel.handleMove, ["stop", "prevent"]),
|
|
10986
|
+
"onMouseup": vue.withModifiers(carousel.handleEnd, ["stop", "prevent"]),
|
|
10987
|
+
"onMouseenter": vue.withModifiers(handleMouseEnter, ["stop"]),
|
|
10988
|
+
"onMouseleave": vue.withModifiers(handleMouseLeave, ["stop"])
|
|
10989
|
+
}, [vue.createVNode("div", {
|
|
10990
|
+
"ref": content,
|
|
10991
|
+
"class": "vc-carousel__wrapper",
|
|
10992
|
+
"style": {
|
|
10993
|
+
height: props2.height ? `${props2.height}px` : "auto"
|
|
10994
|
+
}
|
|
10995
|
+
}, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
10996
|
+
"mode": "left-part"
|
|
10997
|
+
}, {
|
|
10998
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
10999
|
+
"type": "button",
|
|
11000
|
+
"class": "vc-carousel__arrow is-left-arrow",
|
|
11001
|
+
"onMouseenter": () => handleButtonEnter("left"),
|
|
11002
|
+
"onMouseleave": handleButtonLeave,
|
|
11003
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ["stop"])
|
|
11004
|
+
}, [vue.createVNode(Icon, {
|
|
11005
|
+
"type": "left"
|
|
11006
|
+
}, null)]), [[vue.vShow, (props2.arrow === "always" || isHover.value) && (props2.loop || carousel.activeIndex.value > 0)]])]
|
|
11007
|
+
}), arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
11008
|
+
"mode": "right-part"
|
|
11009
|
+
}, {
|
|
11010
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
11011
|
+
"type": "button",
|
|
11012
|
+
"class": "vc-carousel__arrow is-right-arrow",
|
|
11013
|
+
"onMouseenter": () => handleButtonEnter("right"),
|
|
11014
|
+
"onMouseleave": handleButtonLeave,
|
|
11015
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ["stop"])
|
|
11016
|
+
}, [vue.createVNode(Icon, {
|
|
11017
|
+
"type": "right"
|
|
11018
|
+
}, null)]), [[vue.vShow, (props2.arrow === "always" || isHover.value) && (props2.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
|
|
11019
|
+
}), slots.default?.()]), props2.dots && vue.createVNode("ul", {
|
|
11020
|
+
"class": ["vc-carousel__dots", ...carousel.dotsClasses.value]
|
|
11021
|
+
}, [carousel.items.value.map((item, index) => vue.createVNode("li", {
|
|
11022
|
+
"key": index,
|
|
11023
|
+
"class": ["vc-carousel__dot", `is-${carousel.direction.value}`, {
|
|
11024
|
+
"is-active": index === carousel.activeIndex.value
|
|
11025
|
+
}],
|
|
11026
|
+
"onMouseenter": () => throttledDotHover(index),
|
|
11027
|
+
"onClick": () => carousel.handleDotClick(index)
|
|
11028
|
+
}, [vue.createVNode("button", {
|
|
11029
|
+
"class": "vc-carousel__button"
|
|
11030
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
|
|
11031
|
+
};
|
|
11032
|
+
}
|
|
11033
|
+
});
|
|
11034
|
+
const props$1i = {
|
|
11035
|
+
name: String,
|
|
11036
|
+
label: {
|
|
11037
|
+
type: [String, Number],
|
|
11038
|
+
default: ""
|
|
11039
|
+
},
|
|
11040
|
+
// card大小
|
|
11041
|
+
width: {
|
|
11042
|
+
type: [Number, String],
|
|
11043
|
+
default: "70%"
|
|
11044
|
+
},
|
|
11045
|
+
// card之间间距, 或者滑动时候的间距
|
|
11046
|
+
gutter: {
|
|
11047
|
+
type: Number,
|
|
11048
|
+
default: 0
|
|
11049
|
+
},
|
|
11050
|
+
scale: {
|
|
11051
|
+
type: Number,
|
|
11052
|
+
default: 0.83
|
|
11053
|
+
}
|
|
11054
|
+
};
|
|
11055
|
+
const TRANSFORM = prefixStyle("transform").camel;
|
|
11056
|
+
const useCarouselItem = (expose) => {
|
|
11057
|
+
const instance = vue.getCurrentInstance();
|
|
11058
|
+
const carousel = vue.inject("vc-carousel", {});
|
|
11059
|
+
const props2 = instance.props;
|
|
11060
|
+
const translate = vue.ref(0);
|
|
11061
|
+
const currentScale = vue.ref(1);
|
|
11062
|
+
const isHover = vue.ref(false);
|
|
11063
|
+
const isActive = vue.ref(false);
|
|
11064
|
+
const isReady = vue.ref(false);
|
|
11065
|
+
const isInStage = vue.ref(false);
|
|
11066
|
+
const isAnimating = vue.ref(false);
|
|
11067
|
+
const isVertical = vue.computed(() => {
|
|
11068
|
+
return carousel.props.vertical;
|
|
11069
|
+
});
|
|
11070
|
+
const isCard = vue.computed(() => {
|
|
11071
|
+
return carousel.props.card;
|
|
11072
|
+
});
|
|
11073
|
+
const isMove = vue.computed(() => {
|
|
11074
|
+
return carousel.offset.value !== 0;
|
|
11075
|
+
});
|
|
11076
|
+
const itemGutter = vue.computed(() => {
|
|
11077
|
+
return props2.gutter || carousel.props.gutter || 0;
|
|
11078
|
+
});
|
|
11079
|
+
const itemStyle = vue.computed(() => {
|
|
11080
|
+
const translateType = isVertical.value ? "translateY" : "translateX";
|
|
11081
|
+
if (carousel.props.card) {
|
|
11082
|
+
return {
|
|
11083
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
11084
|
+
width: props2.width
|
|
11085
|
+
};
|
|
11086
|
+
} else {
|
|
11087
|
+
return {
|
|
11088
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
11089
|
+
width: itemGutter.value ? props2.width : "100%"
|
|
11090
|
+
};
|
|
11091
|
+
}
|
|
11092
|
+
});
|
|
11093
|
+
vue.onBeforeMount(() => {
|
|
11094
|
+
carousel.add?.(instance);
|
|
11095
|
+
if (!isCard.value && itemGutter.value && carousel.props.loop) {
|
|
11096
|
+
throw new VcError("carousel", "slide模式下loop不能为true");
|
|
11097
|
+
}
|
|
11098
|
+
});
|
|
11099
|
+
vue.onBeforeUnmount(() => {
|
|
11100
|
+
carousel.remove?.(instance);
|
|
11101
|
+
});
|
|
11102
|
+
const processIndex = (index, activeIndex, length) => {
|
|
11103
|
+
if (activeIndex === 0 && index === length - 1) {
|
|
11104
|
+
return -1;
|
|
11105
|
+
} else if (activeIndex === length - 1 && index === 0) {
|
|
11106
|
+
return length;
|
|
11107
|
+
} else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
|
|
11108
|
+
return length + 1;
|
|
11109
|
+
} else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
|
|
11110
|
+
return -2;
|
|
11111
|
+
}
|
|
11112
|
+
return index;
|
|
11113
|
+
};
|
|
11114
|
+
const calcCardTranslate = (index, activeIndex) => {
|
|
11115
|
+
let value;
|
|
11116
|
+
const widthNumber = +props2.width / 100;
|
|
11117
|
+
const parentW = carousel.wrapper.value.offsetWidth;
|
|
11118
|
+
if (isInStage.value) {
|
|
11119
|
+
if (index === activeIndex) {
|
|
11120
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
11121
|
+
} else if (index > activeIndex) {
|
|
11122
|
+
value = parentW * (1 + widthNumber * props2.scale) / 2 + itemGutter.value;
|
|
11123
|
+
} else {
|
|
11124
|
+
value = -(parentW * ((widthNumber * props2.scale - 1) / 2 + widthNumber)) - itemGutter.value;
|
|
11125
|
+
}
|
|
11126
|
+
} else if (index < activeIndex) {
|
|
11127
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
11128
|
+
} else {
|
|
11129
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
11130
|
+
}
|
|
11131
|
+
return value;
|
|
11132
|
+
};
|
|
11133
|
+
const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
|
|
11134
|
+
const { length } = carousel.items.value;
|
|
11135
|
+
const offset = wrapperWidth - (carousel.wrapper?.value?.offsetWidth || 0);
|
|
11136
|
+
const gutter = itemGutter.value;
|
|
11137
|
+
if (!gutter || isVertical.value) return 0;
|
|
11138
|
+
let slideOffset = 0;
|
|
11139
|
+
if (length === 1) {
|
|
11140
|
+
return offset / 2;
|
|
11141
|
+
}
|
|
11142
|
+
if (activeIndex == 0) {
|
|
11143
|
+
if (index - activeIndex === 0) {
|
|
11144
|
+
slideOffset = gutter;
|
|
11145
|
+
} else if (index - activeIndex === 1) {
|
|
11146
|
+
slideOffset = -offset + gutter * 2;
|
|
11147
|
+
}
|
|
11148
|
+
}
|
|
11149
|
+
if (activeIndex !== 0 && activeIndex != length - 1) {
|
|
11150
|
+
if (index - activeIndex === 0) {
|
|
11151
|
+
slideOffset = offset / 2;
|
|
11152
|
+
} else if (index - activeIndex === 1) {
|
|
11153
|
+
slideOffset = -offset / 2 + gutter;
|
|
11154
|
+
} else if (index - activeIndex === -1) {
|
|
11155
|
+
slideOffset = offset * 3 / 2 - gutter;
|
|
11156
|
+
}
|
|
11157
|
+
}
|
|
11158
|
+
if (activeIndex == length - 1) {
|
|
11159
|
+
if (index - activeIndex === 0) {
|
|
11160
|
+
slideOffset = offset - gutter;
|
|
11161
|
+
} else if (index - activeIndex === -1) {
|
|
11162
|
+
slideOffset = offset * 2 - gutter * 2;
|
|
11163
|
+
}
|
|
11164
|
+
}
|
|
11165
|
+
return slideOffset;
|
|
11166
|
+
};
|
|
11167
|
+
const calcTranslate = (index, activeIndex) => {
|
|
11168
|
+
const distance = carousel.wrapper.value[isVertical.value ? "offsetHeight" : "offsetWidth"];
|
|
11169
|
+
const slideOffset = calcSlideOffset(index, activeIndex, distance);
|
|
11170
|
+
return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
|
|
11171
|
+
};
|
|
11172
|
+
const reset = (index, activeIndex, oldIndex) => {
|
|
11173
|
+
const { length } = carousel.items.value;
|
|
11174
|
+
if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
|
|
11175
|
+
isAnimating.value = index === activeIndex || index === oldIndex;
|
|
11176
|
+
if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
|
|
11177
|
+
isAnimating.value = true;
|
|
11178
|
+
}
|
|
11179
|
+
}
|
|
11180
|
+
if (index !== activeIndex && length > 2 && carousel.props.loop) {
|
|
11181
|
+
index = processIndex(index, activeIndex, length);
|
|
11182
|
+
}
|
|
11183
|
+
if (isCard.value) {
|
|
11184
|
+
if (isVertical.value) {
|
|
11185
|
+
throw new VcError("carousel", "卡片模式不支持垂直方向");
|
|
11186
|
+
}
|
|
11187
|
+
isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
11188
|
+
isActive.value = index === activeIndex;
|
|
11189
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
11190
|
+
currentScale.value = isActive.value ? 1 : props2.scale;
|
|
11191
|
+
} else {
|
|
11192
|
+
isActive.value = index === activeIndex;
|
|
11193
|
+
translate.value = calcTranslate(index, activeIndex);
|
|
11194
|
+
}
|
|
11195
|
+
isReady.value = true;
|
|
11196
|
+
};
|
|
11197
|
+
const handleItemClick = () => {
|
|
11198
|
+
if (parent && isCard.value) {
|
|
11199
|
+
const index = carousel.items.value.indexOf(instance);
|
|
11200
|
+
carousel.setActiveItem(index);
|
|
11201
|
+
}
|
|
11202
|
+
};
|
|
11203
|
+
expose({
|
|
11204
|
+
reset,
|
|
11205
|
+
isInStage,
|
|
11206
|
+
isHover,
|
|
11207
|
+
isActive
|
|
11208
|
+
});
|
|
11209
|
+
return {
|
|
11210
|
+
translate,
|
|
11211
|
+
currentScale,
|
|
11212
|
+
isHover,
|
|
11213
|
+
isActive,
|
|
11214
|
+
isReady,
|
|
11215
|
+
isInStage,
|
|
11216
|
+
isAnimating,
|
|
11217
|
+
isVertical,
|
|
11218
|
+
isCard,
|
|
11219
|
+
isMove,
|
|
11220
|
+
itemGutter,
|
|
11221
|
+
itemStyle,
|
|
11222
|
+
reset,
|
|
11223
|
+
handleItemClick
|
|
11224
|
+
};
|
|
11225
|
+
};
|
|
11226
|
+
const COMPONENT_NAME$1_ = "vc-carousel-item";
|
|
11227
|
+
const CarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
11228
|
+
name: COMPONENT_NAME$1_,
|
|
10654
11229
|
props: props$1i,
|
|
11230
|
+
setup(_, {
|
|
11231
|
+
slots,
|
|
11232
|
+
expose
|
|
11233
|
+
}) {
|
|
11234
|
+
const it = useCarouselItem(expose);
|
|
11235
|
+
return () => {
|
|
11236
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
11237
|
+
"class": ["vc-carousel-item", {
|
|
11238
|
+
"is-active": it.isActive.value,
|
|
11239
|
+
"is-card": it.isCard.value,
|
|
11240
|
+
"is-in-stage": it.isInStage.value,
|
|
11241
|
+
"is-hover": it.isHover.value,
|
|
11242
|
+
"is-animating": it.isAnimating.value && !it.isMove.value
|
|
11243
|
+
}],
|
|
11244
|
+
"style": it.itemStyle.value,
|
|
11245
|
+
"onClick": it.handleItemClick
|
|
11246
|
+
}, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
|
|
11247
|
+
"class": "vc-carousel-item__mask"
|
|
11248
|
+
}, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
11249
|
+
};
|
|
11250
|
+
}
|
|
11251
|
+
});
|
|
11252
|
+
const COMPONENT_NAME$1Z = "vcm-carousel";
|
|
11253
|
+
const MCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
11254
|
+
name: COMPONENT_NAME$1Z,
|
|
11255
|
+
props: {
|
|
11256
|
+
...props$1j,
|
|
11257
|
+
dots: {
|
|
11258
|
+
type: [String, Boolean],
|
|
11259
|
+
default: false
|
|
11260
|
+
},
|
|
11261
|
+
indicator: {
|
|
11262
|
+
type: Boolean,
|
|
11263
|
+
default: true
|
|
11264
|
+
}
|
|
11265
|
+
},
|
|
10655
11266
|
setup(props2, {
|
|
10656
|
-
slots
|
|
11267
|
+
slots,
|
|
11268
|
+
expose
|
|
10657
11269
|
}) {
|
|
11270
|
+
const wrapper = vue.ref(null);
|
|
11271
|
+
const content = vue.ref(null);
|
|
11272
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
11273
|
+
let scrollStatus = 0;
|
|
11274
|
+
const handleTouchStart = (e) => {
|
|
11275
|
+
carousel.handleStart(e.touches[0]);
|
|
11276
|
+
scrollStatus = 0;
|
|
11277
|
+
};
|
|
11278
|
+
const handleTouchMove = (e) => {
|
|
11279
|
+
const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
|
|
11280
|
+
const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
|
|
11281
|
+
if (!props2.vertical && absX > absY && scrollStatus !== 1) {
|
|
11282
|
+
e.preventDefault();
|
|
11283
|
+
carousel.handleMove(e.touches[0]);
|
|
11284
|
+
scrollStatus = 2;
|
|
11285
|
+
return;
|
|
11286
|
+
}
|
|
11287
|
+
if (props2.vertical && absY > absX) {
|
|
11288
|
+
e.preventDefault();
|
|
11289
|
+
carousel.handleMove(e.touches[0]);
|
|
11290
|
+
return;
|
|
11291
|
+
}
|
|
11292
|
+
if (scrollStatus === 0) {
|
|
11293
|
+
scrollStatus = 1;
|
|
11294
|
+
}
|
|
11295
|
+
};
|
|
11296
|
+
const handleTouchEnd = () => {
|
|
11297
|
+
carousel.handleEnd();
|
|
11298
|
+
scrollStatus = 0;
|
|
11299
|
+
};
|
|
10658
11300
|
return () => {
|
|
10659
11301
|
return vue.createVNode("div", {
|
|
10660
|
-
"
|
|
10661
|
-
|
|
11302
|
+
"ref": wrapper,
|
|
11303
|
+
"class": ["vcm-carousel", `is-${carousel.direction.value}`],
|
|
11304
|
+
"onTouchstart": vue.withModifiers(handleTouchStart, ["stop"]),
|
|
11305
|
+
"onTouchmove": vue.withModifiers(handleTouchMove, ["stop"]),
|
|
11306
|
+
"onTouchend": vue.withModifiers(handleTouchEnd, ["stop"])
|
|
11307
|
+
}, [vue.createVNode("div", {
|
|
11308
|
+
"ref": content,
|
|
11309
|
+
"style": {
|
|
11310
|
+
height: props2.height ? `${props2.height}px` : "auto"
|
|
11311
|
+
},
|
|
11312
|
+
"class": "vcm-carousel__wrapper"
|
|
11313
|
+
}, [slots.default?.()]), props2.dots && vue.createVNode("ul", {
|
|
11314
|
+
"class": ["vcm-carousel__dots", ...carousel.dotsClasses.value]
|
|
11315
|
+
}, [carousel.items.value.map((_, index) => vue.createVNode("li", {
|
|
11316
|
+
"key": index,
|
|
11317
|
+
"class": ["vcm-carousel__dot", "is-" + carousel.direction.value, {
|
|
11318
|
+
"is-active": index === carousel.activeIndex.value
|
|
11319
|
+
}],
|
|
11320
|
+
"onClick": (e) => {
|
|
11321
|
+
e.stopPropagation();
|
|
11322
|
+
carousel.handleDotClick(index);
|
|
11323
|
+
}
|
|
11324
|
+
}, [vue.createVNode("button", {
|
|
11325
|
+
"class": "vcm-carousel__button"
|
|
11326
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props2.card && props2.indicator && vue.createVNode("div", {
|
|
11327
|
+
"class": "vcm-carousel__indicator"
|
|
11328
|
+
}, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
|
|
11329
|
+
};
|
|
11330
|
+
}
|
|
11331
|
+
});
|
|
11332
|
+
const COMPONENT_NAME$1Y = "vcm-carousel-item";
|
|
11333
|
+
const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
11334
|
+
name: COMPONENT_NAME$1Y,
|
|
11335
|
+
props: props$1i,
|
|
11336
|
+
setup(_, {
|
|
11337
|
+
slots,
|
|
11338
|
+
expose
|
|
11339
|
+
}) {
|
|
11340
|
+
const it = useCarouselItem(expose);
|
|
11341
|
+
return () => {
|
|
11342
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
11343
|
+
"style": it.itemStyle.value,
|
|
11344
|
+
"class": {
|
|
11345
|
+
"vcm-carousel-item": true,
|
|
11346
|
+
"is-active": it.isActive.value,
|
|
11347
|
+
"is-card": it.isCard.value,
|
|
11348
|
+
"is-animating": it.isAnimating.value && !it.isMove.value,
|
|
11349
|
+
"is-in-stage": it.isInStage.value
|
|
11350
|
+
},
|
|
11351
|
+
"onClick": it.handleItemClick
|
|
11352
|
+
}, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
|
|
11353
|
+
"class": "vcm-carousel-item__mask"
|
|
11354
|
+
}, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
10662
11355
|
};
|
|
10663
11356
|
}
|
|
10664
11357
|
});
|
|
10665
|
-
const MCarousel = Carousel;
|
|
10666
11358
|
const getSelectedData = (value = [], source = []) => {
|
|
10667
11359
|
const label = [];
|
|
10668
11360
|
const data = [];
|
|
@@ -10935,9 +11627,9 @@
|
|
|
10935
11627
|
expose?.(exposed);
|
|
10936
11628
|
return exposed;
|
|
10937
11629
|
};
|
|
10938
|
-
const COMPONENT_NAME$
|
|
11630
|
+
const COMPONENT_NAME$1X = "vc-input";
|
|
10939
11631
|
const Input$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10940
|
-
name: COMPONENT_NAME$
|
|
11632
|
+
name: COMPONENT_NAME$1X,
|
|
10941
11633
|
inheritAttrs: false,
|
|
10942
11634
|
props: {
|
|
10943
11635
|
...props$1h,
|
|
@@ -11268,9 +11960,9 @@
|
|
|
11268
11960
|
handleStepper
|
|
11269
11961
|
};
|
|
11270
11962
|
};
|
|
11271
|
-
const COMPONENT_NAME$
|
|
11963
|
+
const COMPONENT_NAME$1W = "vc-input-number";
|
|
11272
11964
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
11273
|
-
name: COMPONENT_NAME$
|
|
11965
|
+
name: COMPONENT_NAME$1W,
|
|
11274
11966
|
props: props$1g,
|
|
11275
11967
|
inheritAttrs: false,
|
|
11276
11968
|
setup(props2, {
|
|
@@ -11330,9 +12022,9 @@
|
|
|
11330
12022
|
default: true
|
|
11331
12023
|
}
|
|
11332
12024
|
};
|
|
11333
|
-
const COMPONENT_NAME$
|
|
12025
|
+
const COMPONENT_NAME$1V = "vc-input-search";
|
|
11334
12026
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
11335
|
-
name: COMPONENT_NAME$
|
|
12027
|
+
name: COMPONENT_NAME$1V,
|
|
11336
12028
|
props: props$1f,
|
|
11337
12029
|
inheritAttrs: false,
|
|
11338
12030
|
setup(props2, {
|
|
@@ -11720,9 +12412,9 @@
|
|
|
11720
12412
|
default: () => null
|
|
11721
12413
|
}
|
|
11722
12414
|
};
|
|
11723
|
-
const COMPONENT_NAME$
|
|
12415
|
+
const COMPONENT_NAME$1U = "vc-customer";
|
|
11724
12416
|
const Customer = vue.defineComponent({
|
|
11725
|
-
name: COMPONENT_NAME$
|
|
12417
|
+
name: COMPONENT_NAME$1U,
|
|
11726
12418
|
props: props$1c,
|
|
11727
12419
|
setup(props2, context) {
|
|
11728
12420
|
return () => vue.h(() => {
|
|
@@ -11795,7 +12487,7 @@
|
|
|
11795
12487
|
return this.target.finally(callback);
|
|
11796
12488
|
}
|
|
11797
12489
|
}
|
|
11798
|
-
const COMPONENT_NAME$
|
|
12490
|
+
const COMPONENT_NAME$1T = "vc-portal";
|
|
11799
12491
|
class Portal {
|
|
11800
12492
|
/**
|
|
11801
12493
|
* 清理Portals类型组件
|
|
@@ -11845,7 +12537,7 @@
|
|
|
11845
12537
|
this.wrapper = wrapper;
|
|
11846
12538
|
this.globalOptions = {
|
|
11847
12539
|
...options,
|
|
11848
|
-
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$
|
|
12540
|
+
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1T)
|
|
11849
12541
|
};
|
|
11850
12542
|
}
|
|
11851
12543
|
popup(propsData, options) {
|
|
@@ -11938,12 +12630,12 @@
|
|
|
11938
12630
|
components,
|
|
11939
12631
|
uses,
|
|
11940
12632
|
slots,
|
|
11941
|
-
parent,
|
|
12633
|
+
parent: parent2,
|
|
11942
12634
|
propsData,
|
|
11943
12635
|
...rest
|
|
11944
12636
|
} = options;
|
|
11945
12637
|
let useAllNodes = fragment;
|
|
11946
|
-
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$
|
|
12638
|
+
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1T)}` : name$;
|
|
11947
12639
|
const container = document.createElement(tag);
|
|
11948
12640
|
const root = typeof el2 === "object" ? el2 : document.querySelector(el2 || "body");
|
|
11949
12641
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -11977,8 +12669,8 @@
|
|
|
11977
12669
|
} else {
|
|
11978
12670
|
const wrapper = this.wrapper;
|
|
11979
12671
|
const app = vue.createApp({
|
|
11980
|
-
name: COMPONENT_NAME$
|
|
11981
|
-
parent,
|
|
12672
|
+
name: COMPONENT_NAME$1T,
|
|
12673
|
+
parent: parent2,
|
|
11982
12674
|
setup() {
|
|
11983
12675
|
if (alive) {
|
|
11984
12676
|
const handleExtra = (e) => {
|
|
@@ -12086,9 +12778,9 @@
|
|
|
12086
12778
|
default: "div"
|
|
12087
12779
|
}
|
|
12088
12780
|
};
|
|
12089
|
-
const COMPONENT_NAME$
|
|
12781
|
+
const COMPONENT_NAME$1S = "vc-portal-view";
|
|
12090
12782
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
12091
|
-
name: COMPONENT_NAME$
|
|
12783
|
+
name: COMPONENT_NAME$1S,
|
|
12092
12784
|
props: props$1b,
|
|
12093
12785
|
setup(props2, {
|
|
12094
12786
|
slots
|
|
@@ -12102,9 +12794,9 @@
|
|
|
12102
12794
|
};
|
|
12103
12795
|
}
|
|
12104
12796
|
});
|
|
12105
|
-
const COMPONENT_NAME$
|
|
12797
|
+
const COMPONENT_NAME$1R = "vc-popover-wrapper";
|
|
12106
12798
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
12107
|
-
name: COMPONENT_NAME$
|
|
12799
|
+
name: COMPONENT_NAME$1R,
|
|
12108
12800
|
props: props$1e,
|
|
12109
12801
|
emits: ["portal-fulfilled", "close"],
|
|
12110
12802
|
setup(props2, {
|
|
@@ -12326,9 +13018,9 @@
|
|
|
12326
13018
|
const PopoverPortal = new Portal(PopoverWrapper, {
|
|
12327
13019
|
leaveDelay: 0
|
|
12328
13020
|
});
|
|
12329
|
-
const COMPONENT_NAME$
|
|
13021
|
+
const COMPONENT_NAME$1Q = "vc-popover";
|
|
12330
13022
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
12331
|
-
name: COMPONENT_NAME$
|
|
13023
|
+
name: COMPONENT_NAME$1Q,
|
|
12332
13024
|
props: props$1d,
|
|
12333
13025
|
emits: ["update:modelValue", "visible-change", "ready", "close"],
|
|
12334
13026
|
setup(props2, {
|
|
@@ -12456,9 +13148,9 @@
|
|
|
12456
13148
|
const Popover = Object.assign(Popover$1, {
|
|
12457
13149
|
open: PopoverPortal.popup.bind(PopoverPortal)
|
|
12458
13150
|
});
|
|
12459
|
-
const COMPONENT_NAME$
|
|
13151
|
+
const COMPONENT_NAME$1P = "vc-cascader-column";
|
|
12460
13152
|
const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
|
|
12461
|
-
name: COMPONENT_NAME$
|
|
13153
|
+
name: COMPONENT_NAME$1P,
|
|
12462
13154
|
emits: ["click", "change"],
|
|
12463
13155
|
props: {
|
|
12464
13156
|
data: {
|
|
@@ -12661,9 +13353,9 @@
|
|
|
12661
13353
|
default: true
|
|
12662
13354
|
}
|
|
12663
13355
|
};
|
|
12664
|
-
const COMPONENT_NAME$
|
|
13356
|
+
const COMPONENT_NAME$1O = "vc-cascader";
|
|
12665
13357
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
12666
|
-
name: COMPONENT_NAME$
|
|
13358
|
+
name: COMPONENT_NAME$1O,
|
|
12667
13359
|
inheritAttrs: false,
|
|
12668
13360
|
props: props$19,
|
|
12669
13361
|
emits: ["update:modelValue", "visible-change", "ready", "change", "close"],
|
|
@@ -12950,9 +13642,9 @@
|
|
|
12950
13642
|
watchShallow: Boolean,
|
|
12951
13643
|
manualUpdate: Boolean
|
|
12952
13644
|
};
|
|
12953
|
-
const COMPONENT_NAME$
|
|
13645
|
+
const COMPONENT_NAME$1N = "vc-chart";
|
|
12954
13646
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
12955
|
-
name: COMPONENT_NAME$
|
|
13647
|
+
name: COMPONENT_NAME$1N,
|
|
12956
13648
|
props: props$18,
|
|
12957
13649
|
emits: [...EVENTS$1, "ready"],
|
|
12958
13650
|
setup(props2, {
|
|
@@ -13179,9 +13871,9 @@
|
|
|
13179
13871
|
computedLabel
|
|
13180
13872
|
};
|
|
13181
13873
|
};
|
|
13182
|
-
const COMPONENT_NAME$
|
|
13874
|
+
const COMPONENT_NAME$1M = "vc-checkbox";
|
|
13183
13875
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
13184
|
-
name: COMPONENT_NAME$
|
|
13876
|
+
name: COMPONENT_NAME$1M,
|
|
13185
13877
|
props: props$17,
|
|
13186
13878
|
emits: ["update:modelValue", "change"],
|
|
13187
13879
|
setup(props2, {
|
|
@@ -13263,9 +13955,9 @@
|
|
|
13263
13955
|
reset
|
|
13264
13956
|
};
|
|
13265
13957
|
};
|
|
13266
|
-
const COMPONENT_NAME$
|
|
13958
|
+
const COMPONENT_NAME$1L = "vc-checkbox-group";
|
|
13267
13959
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
13268
|
-
name: COMPONENT_NAME$
|
|
13960
|
+
name: COMPONENT_NAME$1L,
|
|
13269
13961
|
props: props$16,
|
|
13270
13962
|
emits: ["update:modelValue", "change"],
|
|
13271
13963
|
setup(props2, {
|
|
@@ -13280,9 +13972,9 @@
|
|
|
13280
13972
|
};
|
|
13281
13973
|
}
|
|
13282
13974
|
});
|
|
13283
|
-
const COMPONENT_NAME$
|
|
13975
|
+
const COMPONENT_NAME$1K = "vcm-checkbox";
|
|
13284
13976
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
13285
|
-
name: COMPONENT_NAME$
|
|
13977
|
+
name: COMPONENT_NAME$1K,
|
|
13286
13978
|
props: props$17,
|
|
13287
13979
|
emits: ["update:modelValue", "change"],
|
|
13288
13980
|
setup(props2, {
|
|
@@ -13319,9 +14011,9 @@
|
|
|
13319
14011
|
};
|
|
13320
14012
|
}
|
|
13321
14013
|
});
|
|
13322
|
-
const COMPONENT_NAME$
|
|
14014
|
+
const COMPONENT_NAME$1J = "vcm-checkbox-group";
|
|
13323
14015
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
13324
|
-
name: COMPONENT_NAME$
|
|
14016
|
+
name: COMPONENT_NAME$1J,
|
|
13325
14017
|
props: props$16,
|
|
13326
14018
|
emits: ["update:modelValue", "change"],
|
|
13327
14019
|
setup(props2, {
|
|
@@ -13371,9 +14063,9 @@
|
|
|
13371
14063
|
// 这个相当于Modal中的onCancel,支持Promise
|
|
13372
14064
|
onBeforeClose: Function
|
|
13373
14065
|
};
|
|
13374
|
-
const COMPONENT_NAME$
|
|
14066
|
+
const COMPONENT_NAME$1I = "vc-message";
|
|
13375
14067
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
13376
|
-
name: COMPONENT_NAME$
|
|
14068
|
+
name: COMPONENT_NAME$1I,
|
|
13377
14069
|
emits: ["before-close", "close", "portal-fulfilled"],
|
|
13378
14070
|
props: props$15,
|
|
13379
14071
|
setup(props2, {
|
|
@@ -13616,9 +14308,9 @@
|
|
|
13616
14308
|
};
|
|
13617
14309
|
return () => vue.h(props2.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
13618
14310
|
};
|
|
13619
|
-
const COMPONENT_NAME$
|
|
14311
|
+
const COMPONENT_NAME$1H = "vc-clipboard";
|
|
13620
14312
|
const Clipboard$1 = vue.defineComponent({
|
|
13621
|
-
name: COMPONENT_NAME$
|
|
14313
|
+
name: COMPONENT_NAME$1H,
|
|
13622
14314
|
props: props$14,
|
|
13623
14315
|
setup() {
|
|
13624
14316
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -13650,9 +14342,9 @@
|
|
|
13650
14342
|
const MTransitionScale = TransitionScale;
|
|
13651
14343
|
const MTransitionSlide = TransitionSlide;
|
|
13652
14344
|
const MTransitionZoom = TransitionZoom;
|
|
13653
|
-
const COMPONENT_NAME$
|
|
14345
|
+
const COMPONENT_NAME$1G = "vcm-toast";
|
|
13654
14346
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
13655
|
-
name: COMPONENT_NAME$
|
|
14347
|
+
name: COMPONENT_NAME$1G,
|
|
13656
14348
|
emits: ["close", "portal-fulfilled"],
|
|
13657
14349
|
props: props$13,
|
|
13658
14350
|
setup(props2, {
|
|
@@ -13751,9 +14443,9 @@
|
|
|
13751
14443
|
const warning$2 = create$3({ mode: "warning" });
|
|
13752
14444
|
const error$2 = create$3({ mode: "error" });
|
|
13753
14445
|
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$
|
|
14446
|
+
const COMPONENT_NAME$1F = "vcm-clipboard";
|
|
13755
14447
|
const MClipboard$1 = vue.defineComponent({
|
|
13756
|
-
name: COMPONENT_NAME$
|
|
14448
|
+
name: COMPONENT_NAME$1F,
|
|
13757
14449
|
props: props$14,
|
|
13758
14450
|
setup() {
|
|
13759
14451
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -13782,9 +14474,9 @@
|
|
|
13782
14474
|
default: false
|
|
13783
14475
|
}
|
|
13784
14476
|
};
|
|
13785
|
-
const COMPONENT_NAME$
|
|
14477
|
+
const COMPONENT_NAME$1E = "vc-collapse";
|
|
13786
14478
|
const Collapse = vue.defineComponent({
|
|
13787
|
-
name: COMPONENT_NAME$
|
|
14479
|
+
name: COMPONENT_NAME$1E,
|
|
13788
14480
|
props: props$12,
|
|
13789
14481
|
emits: ["update:moodelValue", "change"],
|
|
13790
14482
|
setup(props2, { slots, emit }) {
|
|
@@ -13896,9 +14588,9 @@
|
|
|
13896
14588
|
function _isSlot$3(s) {
|
|
13897
14589
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13898
14590
|
}
|
|
13899
|
-
const COMPONENT_NAME$
|
|
14591
|
+
const COMPONENT_NAME$1D = "vc-expand";
|
|
13900
14592
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
13901
|
-
name: COMPONENT_NAME$
|
|
14593
|
+
name: COMPONENT_NAME$1D,
|
|
13902
14594
|
props: props$10,
|
|
13903
14595
|
setup(props2, {
|
|
13904
14596
|
slots
|
|
@@ -13925,9 +14617,9 @@
|
|
|
13925
14617
|
};
|
|
13926
14618
|
}
|
|
13927
14619
|
});
|
|
13928
|
-
const COMPONENT_NAME$
|
|
14620
|
+
const COMPONENT_NAME$1C = "vc-collapse-item";
|
|
13929
14621
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
13930
|
-
name: COMPONENT_NAME$
|
|
14622
|
+
name: COMPONENT_NAME$1C,
|
|
13931
14623
|
props: props$11,
|
|
13932
14624
|
setup(props2, {
|
|
13933
14625
|
slots,
|
|
@@ -13997,9 +14689,9 @@
|
|
|
13997
14689
|
default: "div"
|
|
13998
14690
|
}
|
|
13999
14691
|
};
|
|
14000
|
-
const COMPONENT_NAME$
|
|
14692
|
+
const COMPONENT_NAME$1B = "vc-color-picker";
|
|
14001
14693
|
const ColorPicker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
14002
|
-
name: COMPONENT_NAME$
|
|
14694
|
+
name: COMPONENT_NAME$1B,
|
|
14003
14695
|
props: props$$,
|
|
14004
14696
|
setup(props2, {
|
|
14005
14697
|
slots
|
|
@@ -14056,9 +14748,9 @@
|
|
|
14056
14748
|
function _isSlot$2(s) {
|
|
14057
14749
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
14058
14750
|
}
|
|
14059
|
-
const COMPONENT_NAME$
|
|
14751
|
+
const COMPONENT_NAME$1A = "vc-countdown";
|
|
14060
14752
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
14061
|
-
name: COMPONENT_NAME$
|
|
14753
|
+
name: COMPONENT_NAME$1A,
|
|
14062
14754
|
props: props$_,
|
|
14063
14755
|
emits: ["change", "complete", "error"],
|
|
14064
14756
|
setup(props2, {
|
|
@@ -14320,9 +15012,9 @@
|
|
|
14320
15012
|
function _isSlot$1(s) {
|
|
14321
15013
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
14322
15014
|
}
|
|
14323
|
-
const COMPONENT_NAME$
|
|
15015
|
+
const COMPONENT_NAME$1z = "vc-counter";
|
|
14324
15016
|
const Counter = /* @__PURE__ */ vue.defineComponent({
|
|
14325
|
-
name: COMPONENT_NAME$
|
|
15017
|
+
name: COMPONENT_NAME$1z,
|
|
14326
15018
|
props: props$Z,
|
|
14327
15019
|
emits: ["begin", "complete", "change"],
|
|
14328
15020
|
setup(props2, {
|
|
@@ -15570,9 +16262,9 @@
|
|
|
15570
16262
|
}
|
|
15571
16263
|
return view;
|
|
15572
16264
|
};
|
|
15573
|
-
const COMPONENT_NAME$
|
|
16265
|
+
const COMPONENT_NAME$1y = "vc-date-confirm";
|
|
15574
16266
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
15575
|
-
name: COMPONENT_NAME$
|
|
16267
|
+
name: COMPONENT_NAME$1y,
|
|
15576
16268
|
props: {
|
|
15577
16269
|
showTime: {
|
|
15578
16270
|
type: Boolean,
|
|
@@ -15633,9 +16325,9 @@
|
|
|
15633
16325
|
};
|
|
15634
16326
|
}
|
|
15635
16327
|
});
|
|
15636
|
-
const COMPONENT_NAME$
|
|
16328
|
+
const COMPONENT_NAME$1x = "vc-date-header";
|
|
15637
16329
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
15638
|
-
name: COMPONENT_NAME$
|
|
16330
|
+
name: COMPONENT_NAME$1x,
|
|
15639
16331
|
props: {
|
|
15640
16332
|
panelDate: Date,
|
|
15641
16333
|
showNext: {
|
|
@@ -15716,9 +16408,9 @@
|
|
|
15716
16408
|
};
|
|
15717
16409
|
}
|
|
15718
16410
|
});
|
|
15719
|
-
const COMPONENT_NAME$
|
|
16411
|
+
const COMPONENT_NAME$1w = "vc-date-table";
|
|
15720
16412
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
15721
|
-
name: COMPONENT_NAME$
|
|
16413
|
+
name: COMPONENT_NAME$1w,
|
|
15722
16414
|
props: {
|
|
15723
16415
|
value: Array,
|
|
15724
16416
|
firstDayOfWeek: {
|
|
@@ -15918,9 +16610,9 @@
|
|
|
15918
16610
|
};
|
|
15919
16611
|
}
|
|
15920
16612
|
});
|
|
15921
|
-
const COMPONENT_NAME$
|
|
16613
|
+
const COMPONENT_NAME$1v = "vc-month-table";
|
|
15922
16614
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
15923
|
-
name: COMPONENT_NAME$
|
|
16615
|
+
name: COMPONENT_NAME$1v,
|
|
15924
16616
|
props: {
|
|
15925
16617
|
value: Array,
|
|
15926
16618
|
panelDate: Date,
|
|
@@ -16046,7 +16738,7 @@
|
|
|
16046
16738
|
};
|
|
16047
16739
|
}
|
|
16048
16740
|
});
|
|
16049
|
-
const COMPONENT_NAME$
|
|
16741
|
+
const COMPONENT_NAME$1u = "vc-quarter-table";
|
|
16050
16742
|
const getMonthRange = (panelDate, quarter) => {
|
|
16051
16743
|
const year = panelDate.getFullYear();
|
|
16052
16744
|
const [startMonth, endMonth] = [quarter * 3, quarter * 3 + 2];
|
|
@@ -16073,7 +16765,7 @@
|
|
|
16073
16765
|
}
|
|
16074
16766
|
};
|
|
16075
16767
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
16076
|
-
name: COMPONENT_NAME$
|
|
16768
|
+
name: COMPONENT_NAME$1u,
|
|
16077
16769
|
props: {
|
|
16078
16770
|
value: Array,
|
|
16079
16771
|
panelDate: Date,
|
|
@@ -16191,9 +16883,9 @@
|
|
|
16191
16883
|
};
|
|
16192
16884
|
}
|
|
16193
16885
|
});
|
|
16194
|
-
const COMPONENT_NAME$
|
|
16886
|
+
const COMPONENT_NAME$1t = "vc-shortcuts-select";
|
|
16195
16887
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
16196
|
-
name: COMPONENT_NAME$
|
|
16888
|
+
name: COMPONENT_NAME$1t,
|
|
16197
16889
|
props: {
|
|
16198
16890
|
panelDate: Date,
|
|
16199
16891
|
config: Array,
|
|
@@ -16230,9 +16922,9 @@
|
|
|
16230
16922
|
};
|
|
16231
16923
|
}
|
|
16232
16924
|
});
|
|
16233
|
-
const COMPONENT_NAME$
|
|
16925
|
+
const COMPONENT_NAME$1s = "vc-time-select";
|
|
16234
16926
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
16235
|
-
name: COMPONENT_NAME$
|
|
16927
|
+
name: COMPONENT_NAME$1s,
|
|
16236
16928
|
props: {
|
|
16237
16929
|
hours: {
|
|
16238
16930
|
type: [Number, String],
|
|
@@ -16508,9 +17200,9 @@
|
|
|
16508
17200
|
};
|
|
16509
17201
|
}
|
|
16510
17202
|
});
|
|
16511
|
-
const COMPONENT_NAME$
|
|
17203
|
+
const COMPONENT_NAME$1r = "vc-year-table";
|
|
16512
17204
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
16513
|
-
name: COMPONENT_NAME$
|
|
17205
|
+
name: COMPONENT_NAME$1r,
|
|
16514
17206
|
props: {
|
|
16515
17207
|
value: Array,
|
|
16516
17208
|
panelDate: Date,
|
|
@@ -16626,9 +17318,9 @@
|
|
|
16626
17318
|
}
|
|
16627
17319
|
return true;
|
|
16628
17320
|
};
|
|
16629
|
-
const COMPONENT_NAME$
|
|
17321
|
+
const COMPONENT_NAME$1q = "vc-date-range-panel";
|
|
16630
17322
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
16631
|
-
name: COMPONENT_NAME$
|
|
17323
|
+
name: COMPONENT_NAME$1q,
|
|
16632
17324
|
props: {
|
|
16633
17325
|
...props$W,
|
|
16634
17326
|
confirm: {
|
|
@@ -16989,9 +17681,9 @@
|
|
|
16989
17681
|
};
|
|
16990
17682
|
}
|
|
16991
17683
|
});
|
|
16992
|
-
const COMPONENT_NAME$
|
|
17684
|
+
const COMPONENT_NAME$1p = "vc-date-panel";
|
|
16993
17685
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
16994
|
-
name: COMPONENT_NAME$
|
|
17686
|
+
name: COMPONENT_NAME$1p,
|
|
16995
17687
|
props: {
|
|
16996
17688
|
...props$W,
|
|
16997
17689
|
type: String,
|
|
@@ -17190,9 +17882,9 @@
|
|
|
17190
17882
|
const endYear = value[1].getFullYear();
|
|
17191
17883
|
return startYear === endYear;
|
|
17192
17884
|
};
|
|
17193
|
-
const COMPONENT_NAME$
|
|
17885
|
+
const COMPONENT_NAME$1o = "vc-monthrange-panel";
|
|
17194
17886
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17195
|
-
name: COMPONENT_NAME$
|
|
17887
|
+
name: COMPONENT_NAME$1o,
|
|
17196
17888
|
props: {
|
|
17197
17889
|
...props$W,
|
|
17198
17890
|
confirm: {
|
|
@@ -17362,9 +18054,9 @@
|
|
|
17362
18054
|
const endYear = value[1].getFullYear();
|
|
17363
18055
|
return startYear === endYear;
|
|
17364
18056
|
};
|
|
17365
|
-
const COMPONENT_NAME$
|
|
18057
|
+
const COMPONENT_NAME$1n = "vc-quarterrange-panel";
|
|
17366
18058
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17367
|
-
name: COMPONENT_NAME$
|
|
18059
|
+
name: COMPONENT_NAME$1n,
|
|
17368
18060
|
props: {
|
|
17369
18061
|
...props$W,
|
|
17370
18062
|
confirm: {
|
|
@@ -17595,9 +18287,9 @@
|
|
|
17595
18287
|
seconds
|
|
17596
18288
|
};
|
|
17597
18289
|
};
|
|
17598
|
-
const COMPONENT_NAME$
|
|
18290
|
+
const COMPONENT_NAME$1m = "vc-timerange-panel";
|
|
17599
18291
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17600
|
-
name: COMPONENT_NAME$
|
|
18292
|
+
name: COMPONENT_NAME$1m,
|
|
17601
18293
|
props: props$V,
|
|
17602
18294
|
emits: ["pick", "clear", "ok"],
|
|
17603
18295
|
setup(props2, {
|
|
@@ -17695,9 +18387,9 @@
|
|
|
17695
18387
|
};
|
|
17696
18388
|
}
|
|
17697
18389
|
});
|
|
17698
|
-
const COMPONENT_NAME$
|
|
18390
|
+
const COMPONENT_NAME$1l = "vc-time-panel";
|
|
17699
18391
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17700
|
-
name: COMPONENT_NAME$
|
|
18392
|
+
name: COMPONENT_NAME$1l,
|
|
17701
18393
|
props: props$V,
|
|
17702
18394
|
emits: ["pick", "clear", "ok"],
|
|
17703
18395
|
setup(props2, {
|
|
@@ -17749,7 +18441,7 @@
|
|
|
17749
18441
|
};
|
|
17750
18442
|
}
|
|
17751
18443
|
});
|
|
17752
|
-
const COMPONENT_NAME$
|
|
18444
|
+
const COMPONENT_NAME$1k = "vc-date-picker";
|
|
17753
18445
|
const getPanel$1 = (type) => {
|
|
17754
18446
|
if (["daterange", "datetimerange"].includes(type)) {
|
|
17755
18447
|
return DateRangePanel;
|
|
@@ -17760,7 +18452,7 @@
|
|
|
17760
18452
|
}
|
|
17761
18453
|
return DatePanel;
|
|
17762
18454
|
};
|
|
17763
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
18455
|
+
const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
|
|
17764
18456
|
const props2 = vue.getCurrentInstance().props;
|
|
17765
18457
|
const icon = vue.ref("date");
|
|
17766
18458
|
const panel = vue.shallowRef({});
|
|
@@ -17796,9 +18488,9 @@
|
|
|
17796
18488
|
}
|
|
17797
18489
|
}
|
|
17798
18490
|
};
|
|
17799
|
-
const COMPONENT_NAME$
|
|
18491
|
+
const COMPONENT_NAME$1j = "vc-divider";
|
|
17800
18492
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
17801
|
-
name: COMPONENT_NAME$
|
|
18493
|
+
name: COMPONENT_NAME$1j,
|
|
17802
18494
|
props: props$U,
|
|
17803
18495
|
setup(props2, {
|
|
17804
18496
|
slots
|
|
@@ -17927,7 +18619,7 @@
|
|
|
17927
18619
|
barTo: props$S.to,
|
|
17928
18620
|
...pick(props$S, barKeys)
|
|
17929
18621
|
};
|
|
17930
|
-
const COMPONENT_NAME$
|
|
18622
|
+
const COMPONENT_NAME$1i = "vc-scroller-track";
|
|
17931
18623
|
const BAR_MAP = {
|
|
17932
18624
|
vertical: {
|
|
17933
18625
|
scroll: "scrollTop",
|
|
@@ -17947,7 +18639,7 @@
|
|
|
17947
18639
|
}
|
|
17948
18640
|
};
|
|
17949
18641
|
const Track$1 = /* @__PURE__ */ vue.defineComponent({
|
|
17950
|
-
name: COMPONENT_NAME$
|
|
18642
|
+
name: COMPONENT_NAME$1i,
|
|
17951
18643
|
props: props$T,
|
|
17952
18644
|
emits: ["change"],
|
|
17953
18645
|
inheritAttrs: false,
|
|
@@ -18109,9 +18801,9 @@
|
|
|
18109
18801
|
};
|
|
18110
18802
|
}
|
|
18111
18803
|
});
|
|
18112
|
-
const COMPONENT_NAME$
|
|
18804
|
+
const COMPONENT_NAME$1h = "vc-scroller-bar";
|
|
18113
18805
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
18114
|
-
name: COMPONENT_NAME$
|
|
18806
|
+
name: COMPONENT_NAME$1h,
|
|
18115
18807
|
props: props$S,
|
|
18116
18808
|
emits: ["change"],
|
|
18117
18809
|
setup(props2, {
|
|
@@ -18342,9 +19034,9 @@
|
|
|
18342
19034
|
refreshPosition
|
|
18343
19035
|
};
|
|
18344
19036
|
};
|
|
18345
|
-
const COMPONENT_NAME$
|
|
19037
|
+
const COMPONENT_NAME$1g = "vc-scroller";
|
|
18346
19038
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
18347
|
-
name: COMPONENT_NAME$
|
|
19039
|
+
name: COMPONENT_NAME$1g,
|
|
18348
19040
|
props: props$R,
|
|
18349
19041
|
emits: ["scroll"],
|
|
18350
19042
|
setup(props2, {
|
|
@@ -18402,9 +19094,9 @@
|
|
|
18402
19094
|
};
|
|
18403
19095
|
}
|
|
18404
19096
|
});
|
|
18405
|
-
const COMPONENT_NAME$
|
|
19097
|
+
const COMPONENT_NAME$1f = "vc-scroller-wheel";
|
|
18406
19098
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
18407
|
-
name: COMPONENT_NAME$
|
|
19099
|
+
name: COMPONENT_NAME$1f,
|
|
18408
19100
|
props: Object.assign({}, props$R, {
|
|
18409
19101
|
stopPropagation: {
|
|
18410
19102
|
type: Boolean,
|
|
@@ -18585,9 +19277,9 @@
|
|
|
18585
19277
|
type: Function
|
|
18586
19278
|
}
|
|
18587
19279
|
};
|
|
18588
|
-
const COMPONENT_NAME$
|
|
19280
|
+
const COMPONENT_NAME$1e = "vc-drawer";
|
|
18589
19281
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
18590
|
-
name: COMPONENT_NAME$
|
|
19282
|
+
name: COMPONENT_NAME$1e,
|
|
18591
19283
|
props: props$Q,
|
|
18592
19284
|
emits: ["close", "update:modelValue", "visible-change"],
|
|
18593
19285
|
setup(props2, {
|
|
@@ -18759,9 +19451,9 @@
|
|
|
18759
19451
|
default: false
|
|
18760
19452
|
}
|
|
18761
19453
|
};
|
|
18762
|
-
const COMPONENT_NAME$
|
|
19454
|
+
const COMPONENT_NAME$1d = "vc-dropdown";
|
|
18763
19455
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
18764
|
-
name: COMPONENT_NAME$
|
|
19456
|
+
name: COMPONENT_NAME$1d,
|
|
18765
19457
|
props: props$P,
|
|
18766
19458
|
inheritAttrs: false,
|
|
18767
19459
|
emits: ["update:modelValue", "ready", "close", "visible-change", "click"],
|
|
@@ -18824,9 +19516,9 @@
|
|
|
18824
19516
|
};
|
|
18825
19517
|
}
|
|
18826
19518
|
});
|
|
18827
|
-
const COMPONENT_NAME$
|
|
19519
|
+
const COMPONENT_NAME$1c = "vc-dropdown-menu";
|
|
18828
19520
|
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
18829
|
-
name: COMPONENT_NAME$
|
|
19521
|
+
name: COMPONENT_NAME$1c,
|
|
18830
19522
|
setup(_, {
|
|
18831
19523
|
slots
|
|
18832
19524
|
}) {
|
|
@@ -18837,9 +19529,9 @@
|
|
|
18837
19529
|
};
|
|
18838
19530
|
}
|
|
18839
19531
|
});
|
|
18840
|
-
const COMPONENT_NAME$
|
|
19532
|
+
const COMPONENT_NAME$1b = "vc-dropdown-item";
|
|
18841
19533
|
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
18842
|
-
name: COMPONENT_NAME$
|
|
19534
|
+
name: COMPONENT_NAME$1b,
|
|
18843
19535
|
emits: ["click"],
|
|
18844
19536
|
props: {
|
|
18845
19537
|
value: {
|
|
@@ -19038,9 +19730,9 @@
|
|
|
19038
19730
|
["link", "upload/video", "upload/image", "undo", "redo"]
|
|
19039
19731
|
]
|
|
19040
19732
|
};
|
|
19041
|
-
const COMPONENT_NAME$
|
|
19733
|
+
const COMPONENT_NAME$1a = "vc-editor-toolbar";
|
|
19042
19734
|
const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
19043
|
-
name: COMPONENT_NAME$
|
|
19735
|
+
name: COMPONENT_NAME$1a,
|
|
19044
19736
|
props: {
|
|
19045
19737
|
options: [Array, Object],
|
|
19046
19738
|
elementId: String
|
|
@@ -19240,9 +19932,9 @@
|
|
|
19240
19932
|
default: "div"
|
|
19241
19933
|
}
|
|
19242
19934
|
};
|
|
19243
|
-
const COMPONENT_NAME$
|
|
19935
|
+
const COMPONENT_NAME$19 = "vc-image-preview";
|
|
19244
19936
|
const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19245
|
-
name: COMPONENT_NAME$
|
|
19937
|
+
name: COMPONENT_NAME$19,
|
|
19246
19938
|
props: props$O,
|
|
19247
19939
|
setup(props2, {
|
|
19248
19940
|
slots
|
|
@@ -19432,9 +20124,9 @@
|
|
|
19432
20124
|
default: false
|
|
19433
20125
|
}
|
|
19434
20126
|
};
|
|
19435
|
-
const COMPONENT_NAME$
|
|
20127
|
+
const COMPONENT_NAME$18 = "vc-upload";
|
|
19436
20128
|
const Upload$1 = vue.defineComponent({
|
|
19437
|
-
name: COMPONENT_NAME$
|
|
20129
|
+
name: COMPONENT_NAME$18,
|
|
19438
20130
|
props: props$N,
|
|
19439
20131
|
emits: [
|
|
19440
20132
|
"message",
|
|
@@ -19957,9 +20649,9 @@
|
|
|
19957
20649
|
default: true
|
|
19958
20650
|
}
|
|
19959
20651
|
};
|
|
19960
|
-
const COMPONENT_NAME$
|
|
20652
|
+
const COMPONENT_NAME$17 = "vc-editor";
|
|
19961
20653
|
const Editor$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19962
|
-
name: COMPONENT_NAME$
|
|
20654
|
+
name: COMPONENT_NAME$17,
|
|
19963
20655
|
props: props$M,
|
|
19964
20656
|
defaults: defaults$3,
|
|
19965
20657
|
emits: ["ready", "blur", "focus", "input", "update:modelValue", "change"],
|
|
@@ -20140,7 +20832,7 @@
|
|
|
20140
20832
|
};
|
|
20141
20833
|
}
|
|
20142
20834
|
});
|
|
20143
|
-
const COMPONENT_NAME$
|
|
20835
|
+
const COMPONENT_NAME$16 = "vc-editor-view";
|
|
20144
20836
|
const setImages = (v) => {
|
|
20145
20837
|
if (!v) return;
|
|
20146
20838
|
const IMG_REGX = /<img.*?(?:>|\/>)/gi;
|
|
@@ -20157,7 +20849,7 @@
|
|
|
20157
20849
|
return;
|
|
20158
20850
|
};
|
|
20159
20851
|
const EditorView = /* @__PURE__ */ vue.defineComponent({
|
|
20160
|
-
name: COMPONENT_NAME$
|
|
20852
|
+
name: COMPONENT_NAME$16,
|
|
20161
20853
|
props: {
|
|
20162
20854
|
value: {
|
|
20163
20855
|
type: String,
|
|
@@ -20365,9 +21057,9 @@
|
|
|
20365
21057
|
validateField
|
|
20366
21058
|
});
|
|
20367
21059
|
};
|
|
20368
|
-
const COMPONENT_NAME$
|
|
21060
|
+
const COMPONENT_NAME$15 = "vc-form";
|
|
20369
21061
|
const Form = vue.defineComponent({
|
|
20370
|
-
name: COMPONENT_NAME$
|
|
21062
|
+
name: COMPONENT_NAME$15,
|
|
20371
21063
|
props: props$L,
|
|
20372
21064
|
setup(props2, { slots, expose }) {
|
|
20373
21065
|
useForm(expose);
|
|
@@ -20710,9 +21402,9 @@
|
|
|
20710
21402
|
labelPosition
|
|
20711
21403
|
};
|
|
20712
21404
|
};
|
|
20713
|
-
const COMPONENT_NAME$
|
|
21405
|
+
const COMPONENT_NAME$14 = "vc-form-item";
|
|
20714
21406
|
const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20715
|
-
name: COMPONENT_NAME$
|
|
21407
|
+
name: COMPONENT_NAME$14,
|
|
20716
21408
|
props: props$K,
|
|
20717
21409
|
setup(props2, {
|
|
20718
21410
|
slots,
|
|
@@ -20778,9 +21470,9 @@
|
|
|
20778
21470
|
default: false
|
|
20779
21471
|
}
|
|
20780
21472
|
};
|
|
20781
|
-
const COMPONENT_NAME$
|
|
21473
|
+
const COMPONENT_NAME$13 = "vcm-form";
|
|
20782
21474
|
const MForm = vue.defineComponent({
|
|
20783
|
-
name: COMPONENT_NAME$
|
|
21475
|
+
name: COMPONENT_NAME$13,
|
|
20784
21476
|
props: props$J,
|
|
20785
21477
|
setup(props2, { slots, expose }) {
|
|
20786
21478
|
useForm(expose, {
|
|
@@ -20807,9 +21499,9 @@
|
|
|
20807
21499
|
default: 12
|
|
20808
21500
|
}
|
|
20809
21501
|
};
|
|
20810
|
-
const COMPONENT_NAME$
|
|
21502
|
+
const COMPONENT_NAME$12 = "vcm-form-item";
|
|
20811
21503
|
const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20812
|
-
name: COMPONENT_NAME$
|
|
21504
|
+
name: COMPONENT_NAME$12,
|
|
20813
21505
|
props: props$I,
|
|
20814
21506
|
setup(props2, {
|
|
20815
21507
|
slots,
|
|
@@ -20863,9 +21555,9 @@
|
|
|
20863
21555
|
};
|
|
20864
21556
|
}
|
|
20865
21557
|
});
|
|
20866
|
-
const COMPONENT_NAME
|
|
21558
|
+
const COMPONENT_NAME$11 = "vc-fragment";
|
|
20867
21559
|
const Fragment = vue.defineComponent({
|
|
20868
|
-
name: COMPONENT_NAME
|
|
21560
|
+
name: COMPONENT_NAME$11,
|
|
20869
21561
|
setup(_, { slots }) {
|
|
20870
21562
|
return () => vue.h(vue.Fragment, slots.default?.());
|
|
20871
21563
|
}
|
|
@@ -20899,9 +21591,9 @@
|
|
|
20899
21591
|
default: () => ({})
|
|
20900
21592
|
}
|
|
20901
21593
|
};
|
|
20902
|
-
const COMPONENT_NAME$
|
|
21594
|
+
const COMPONENT_NAME$10 = "vc-snapshot";
|
|
20903
21595
|
const Snapshot = /* @__PURE__ */ vue.defineComponent({
|
|
20904
|
-
name: COMPONENT_NAME$
|
|
21596
|
+
name: COMPONENT_NAME$10,
|
|
20905
21597
|
props: props$H,
|
|
20906
21598
|
emits: ["ready"],
|
|
20907
21599
|
setup(props2, {
|
|
@@ -21053,7 +21745,7 @@
|
|
|
21053
21745
|
}
|
|
21054
21746
|
}
|
|
21055
21747
|
const IMGStore$1 = new IMGStore();
|
|
21056
|
-
const COMPONENT_NAME
|
|
21748
|
+
const COMPONENT_NAME$$ = "vc-image";
|
|
21057
21749
|
let isSupportObjectFit = false;
|
|
21058
21750
|
window.addEventListener("DOMContentLoaded", () => {
|
|
21059
21751
|
isSupportObjectFit = !IS_SERVER$3 && document.documentElement.style.objectFit !== void 0;
|
|
@@ -21066,7 +21758,7 @@
|
|
|
21066
21758
|
SCALE_DOWN: "scale-down"
|
|
21067
21759
|
};
|
|
21068
21760
|
const Image$1$1 = /* @__PURE__ */ vue.defineComponent({
|
|
21069
|
-
name: COMPONENT_NAME
|
|
21761
|
+
name: COMPONENT_NAME$$,
|
|
21070
21762
|
inheritAttrs: false,
|
|
21071
21763
|
props: props$G,
|
|
21072
21764
|
setup(props2, {
|
|
@@ -21274,9 +21966,9 @@
|
|
|
21274
21966
|
default: "div"
|
|
21275
21967
|
}
|
|
21276
21968
|
};
|
|
21277
|
-
const COMPONENT_NAME$
|
|
21969
|
+
const COMPONENT_NAME$_ = "vc-image-crop";
|
|
21278
21970
|
const ImageCrop = /* @__PURE__ */ vue.defineComponent({
|
|
21279
|
-
name: COMPONENT_NAME$
|
|
21971
|
+
name: COMPONENT_NAME$_,
|
|
21280
21972
|
props: props$F,
|
|
21281
21973
|
setup(props2, {
|
|
21282
21974
|
slots
|
|
@@ -21296,9 +21988,9 @@
|
|
|
21296
21988
|
default: "div"
|
|
21297
21989
|
}
|
|
21298
21990
|
};
|
|
21299
|
-
const COMPONENT_NAME$
|
|
21991
|
+
const COMPONENT_NAME$Z = "vc-image-processing";
|
|
21300
21992
|
const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
|
|
21301
|
-
name: COMPONENT_NAME$
|
|
21993
|
+
name: COMPONENT_NAME$Z,
|
|
21302
21994
|
props: props$E,
|
|
21303
21995
|
setup(props2, {
|
|
21304
21996
|
slots
|
|
@@ -21311,9 +22003,9 @@
|
|
|
21311
22003
|
}
|
|
21312
22004
|
});
|
|
21313
22005
|
const MImageProcessing = ImageProcessing;
|
|
21314
|
-
const COMPONENT_NAME$
|
|
22006
|
+
const COMPONENT_NAME$Y = "vcm-input";
|
|
21315
22007
|
const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
21316
|
-
name: COMPONENT_NAME$
|
|
22008
|
+
name: COMPONENT_NAME$Y,
|
|
21317
22009
|
inheritAttrs: false,
|
|
21318
22010
|
props: {
|
|
21319
22011
|
...props$1h,
|
|
@@ -21400,9 +22092,9 @@
|
|
|
21400
22092
|
};
|
|
21401
22093
|
}
|
|
21402
22094
|
});
|
|
21403
|
-
const COMPONENT_NAME$
|
|
22095
|
+
const COMPONENT_NAME$X = "vcm-input-number";
|
|
21404
22096
|
const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
21405
|
-
name: COMPONENT_NAME$
|
|
22097
|
+
name: COMPONENT_NAME$X,
|
|
21406
22098
|
props: props$1g,
|
|
21407
22099
|
inheritAttrs: false,
|
|
21408
22100
|
setup(props2, {
|
|
@@ -21448,9 +22140,9 @@
|
|
|
21448
22140
|
};
|
|
21449
22141
|
}
|
|
21450
22142
|
});
|
|
21451
|
-
const COMPONENT_NAME$
|
|
22143
|
+
const COMPONENT_NAME$W = "vcm-input-search";
|
|
21452
22144
|
const MInputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
21453
|
-
name: COMPONENT_NAME$
|
|
22145
|
+
name: COMPONENT_NAME$W,
|
|
21454
22146
|
props: {
|
|
21455
22147
|
...props$1f,
|
|
21456
22148
|
cancelText: {
|
|
@@ -21524,9 +22216,9 @@
|
|
|
21524
22216
|
default: true
|
|
21525
22217
|
}
|
|
21526
22218
|
};
|
|
21527
|
-
const COMPONENT_NAME$
|
|
22219
|
+
const COMPONENT_NAME$V = "vcm-list";
|
|
21528
22220
|
const MList = vue.defineComponent({
|
|
21529
|
-
name: COMPONENT_NAME$
|
|
22221
|
+
name: COMPONENT_NAME$V,
|
|
21530
22222
|
props: props$D,
|
|
21531
22223
|
setup(props2, { slots }) {
|
|
21532
22224
|
vue.provide("vc-list", { props: props2 });
|
|
@@ -21577,10 +22269,10 @@
|
|
|
21577
22269
|
// MListItem是否独立存在
|
|
21578
22270
|
alone: Boolean
|
|
21579
22271
|
};
|
|
21580
|
-
const COMPONENT_NAME$
|
|
22272
|
+
const COMPONENT_NAME$U = "vcm-list-item";
|
|
21581
22273
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
21582
22274
|
const MListItem = /* @__PURE__ */ vue.defineComponent({
|
|
21583
|
-
name: COMPONENT_NAME$
|
|
22275
|
+
name: COMPONENT_NAME$U,
|
|
21584
22276
|
props: props$C,
|
|
21585
22277
|
emits: ["click"],
|
|
21586
22278
|
setup(props2, {
|
|
@@ -21664,11 +22356,11 @@
|
|
|
21664
22356
|
default: false
|
|
21665
22357
|
}
|
|
21666
22358
|
};
|
|
21667
|
-
const COMPONENT_NAME$
|
|
22359
|
+
const COMPONENT_NAME$T = "vc-marquee";
|
|
21668
22360
|
const ANIMATION = prefixStyle("animation").camel;
|
|
21669
22361
|
const TRANSFORM_KEBAB = prefixStyle("transform").kebab;
|
|
21670
22362
|
const Marquee = /* @__PURE__ */ vue.defineComponent({
|
|
21671
|
-
name: COMPONENT_NAME$
|
|
22363
|
+
name: COMPONENT_NAME$T,
|
|
21672
22364
|
props: props$B,
|
|
21673
22365
|
setup(props2, {
|
|
21674
22366
|
slots
|
|
@@ -21729,9 +22421,9 @@
|
|
|
21729
22421
|
default: true
|
|
21730
22422
|
}
|
|
21731
22423
|
};
|
|
21732
|
-
const COMPONENT_NAME$
|
|
22424
|
+
const COMPONENT_NAME$S = "vc-resizer";
|
|
21733
22425
|
const Resizer = vue.defineComponent({
|
|
21734
|
-
name: COMPONENT_NAME$
|
|
22426
|
+
name: COMPONENT_NAME$S,
|
|
21735
22427
|
props: props$A,
|
|
21736
22428
|
emits: ["resize"],
|
|
21737
22429
|
setup(props2, { emit, slots, expose }) {
|
|
@@ -21897,10 +22589,10 @@
|
|
|
21897
22589
|
type: Function
|
|
21898
22590
|
}
|
|
21899
22591
|
};
|
|
21900
|
-
const COMPONENT_NAME$
|
|
22592
|
+
const COMPONENT_NAME$R = "vc-modal";
|
|
21901
22593
|
let zIndexNumber = 1002;
|
|
21902
22594
|
const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
21903
|
-
name: COMPONENT_NAME$
|
|
22595
|
+
name: COMPONENT_NAME$R,
|
|
21904
22596
|
emits: ["update:modelValue", "close", "portal-fulfilled", "visible-change", "ok", "cancel"],
|
|
21905
22597
|
props: props$z,
|
|
21906
22598
|
setup(props2, {
|
|
@@ -22290,9 +22982,9 @@
|
|
|
22290
22982
|
type: Function
|
|
22291
22983
|
}
|
|
22292
22984
|
};
|
|
22293
|
-
const COMPONENT_NAME$
|
|
22985
|
+
const COMPONENT_NAME$Q = "vc-modal";
|
|
22294
22986
|
const MModalView = /* @__PURE__ */ vue.defineComponent({
|
|
22295
|
-
name: COMPONENT_NAME$
|
|
22987
|
+
name: COMPONENT_NAME$Q,
|
|
22296
22988
|
emits: ["update:modelValue", "portal-fulfilled", "close", "ok", "cancel"],
|
|
22297
22989
|
props: props$y,
|
|
22298
22990
|
setup(props2, {
|
|
@@ -22487,9 +23179,9 @@
|
|
|
22487
23179
|
// 这个相当于Modal中的onCancel,支持Promise
|
|
22488
23180
|
onBeforeClose: Function
|
|
22489
23181
|
};
|
|
22490
|
-
const COMPONENT_NAME$
|
|
23182
|
+
const COMPONENT_NAME$P = "vc-notice";
|
|
22491
23183
|
const NoticeView = /* @__PURE__ */ vue.defineComponent({
|
|
22492
|
-
name: COMPONENT_NAME$
|
|
23184
|
+
name: COMPONENT_NAME$P,
|
|
22493
23185
|
props: props$x,
|
|
22494
23186
|
emits: ["portal-fulfilled", "close", "before-close"],
|
|
22495
23187
|
setup(props2, {
|
|
@@ -22655,9 +23347,9 @@
|
|
|
22655
23347
|
default: "div"
|
|
22656
23348
|
}
|
|
22657
23349
|
};
|
|
22658
|
-
const COMPONENT_NAME$
|
|
23350
|
+
const COMPONENT_NAME$O = "vc-option";
|
|
22659
23351
|
const Option$1 = /* @__PURE__ */ vue.defineComponent({
|
|
22660
|
-
name: COMPONENT_NAME$
|
|
23352
|
+
name: COMPONENT_NAME$O,
|
|
22661
23353
|
props: props$w,
|
|
22662
23354
|
setup(props2, {
|
|
22663
23355
|
slots
|
|
@@ -22735,9 +23427,9 @@
|
|
|
22735
23427
|
type: [String, Number]
|
|
22736
23428
|
}
|
|
22737
23429
|
};
|
|
22738
|
-
const COMPONENT_NAME$
|
|
23430
|
+
const COMPONENT_NAME$N = "vc-tag";
|
|
22739
23431
|
const Tag = /* @__PURE__ */ vue.defineComponent({
|
|
22740
|
-
name: COMPONENT_NAME$
|
|
23432
|
+
name: COMPONENT_NAME$N,
|
|
22741
23433
|
props: props$u,
|
|
22742
23434
|
emits: ["close", "change"],
|
|
22743
23435
|
setup(props2, {
|
|
@@ -22804,9 +23496,9 @@
|
|
|
22804
23496
|
render: [Function],
|
|
22805
23497
|
row: Object
|
|
22806
23498
|
};
|
|
22807
|
-
const COMPONENT_NAME$
|
|
23499
|
+
const COMPONENT_NAME$M = "vc-select-option";
|
|
22808
23500
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
22809
|
-
name: COMPONENT_NAME$
|
|
23501
|
+
name: COMPONENT_NAME$M,
|
|
22810
23502
|
props: props$t,
|
|
22811
23503
|
setup(props2, {
|
|
22812
23504
|
slots,
|
|
@@ -22895,9 +23587,9 @@
|
|
|
22895
23587
|
row: Object,
|
|
22896
23588
|
render: [Function]
|
|
22897
23589
|
};
|
|
22898
|
-
const COMPONENT_NAME$
|
|
23590
|
+
const COMPONENT_NAME$L = "vc-select-option-group";
|
|
22899
23591
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
22900
|
-
name: COMPONENT_NAME$
|
|
23592
|
+
name: COMPONENT_NAME$L,
|
|
22901
23593
|
props: props$s,
|
|
22902
23594
|
setup(props2, {
|
|
22903
23595
|
slots
|
|
@@ -22924,9 +23616,9 @@
|
|
|
22924
23616
|
};
|
|
22925
23617
|
}
|
|
22926
23618
|
});
|
|
22927
|
-
const COMPONENT_NAME$
|
|
23619
|
+
const COMPONENT_NAME$K = "vc-select-all";
|
|
22928
23620
|
const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
22929
|
-
name: COMPONENT_NAME$
|
|
23621
|
+
name: COMPONENT_NAME$K,
|
|
22930
23622
|
props: {
|
|
22931
23623
|
data: {
|
|
22932
23624
|
type: Array,
|
|
@@ -22980,9 +23672,9 @@
|
|
|
22980
23672
|
};
|
|
22981
23673
|
}
|
|
22982
23674
|
});
|
|
22983
|
-
const COMPONENT_NAME$
|
|
23675
|
+
const COMPONENT_NAME$J = "vc-select";
|
|
22984
23676
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
22985
|
-
name: COMPONENT_NAME$
|
|
23677
|
+
name: COMPONENT_NAME$J,
|
|
22986
23678
|
props: props$1a,
|
|
22987
23679
|
emits: ["ready", "close", "visible-change", "clear", "change", "update:modelValue"],
|
|
22988
23680
|
setup(props2, {
|
|
@@ -23263,9 +23955,9 @@
|
|
|
23263
23955
|
};
|
|
23264
23956
|
}
|
|
23265
23957
|
});
|
|
23266
|
-
const COMPONENT_NAME$
|
|
23958
|
+
const COMPONENT_NAME$I = "vc-pagination";
|
|
23267
23959
|
const Pagination = /* @__PURE__ */ vue.defineComponent({
|
|
23268
|
-
name: COMPONENT_NAME$
|
|
23960
|
+
name: COMPONENT_NAME$I,
|
|
23269
23961
|
props: props$v,
|
|
23270
23962
|
emits: ["update:current", "change", "page-size-change"],
|
|
23271
23963
|
setup(props2, {
|
|
@@ -23456,9 +24148,9 @@
|
|
|
23456
24148
|
default: "div"
|
|
23457
24149
|
}
|
|
23458
24150
|
};
|
|
23459
|
-
const COMPONENT_NAME$
|
|
24151
|
+
const COMPONENT_NAME$H = "vc-picker";
|
|
23460
24152
|
const Picker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
23461
|
-
name: COMPONENT_NAME$
|
|
24153
|
+
name: COMPONENT_NAME$H,
|
|
23462
24154
|
props: props$r,
|
|
23463
24155
|
setup(props2, {
|
|
23464
24156
|
slots
|
|
@@ -23516,9 +24208,9 @@
|
|
|
23516
24208
|
width: [String, Number],
|
|
23517
24209
|
portalClass: [String, Object]
|
|
23518
24210
|
};
|
|
23519
|
-
const COMPONENT_NAME$
|
|
24211
|
+
const COMPONENT_NAME$G = "vc-popconfirm";
|
|
23520
24212
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
23521
|
-
name: COMPONENT_NAME$
|
|
24213
|
+
name: COMPONENT_NAME$G,
|
|
23522
24214
|
props: props$q,
|
|
23523
24215
|
inheritAttrs: false,
|
|
23524
24216
|
emits: ["update:modelValue", "visible-change", "ready", "close", "cancel", "ok"],
|
|
@@ -23678,9 +24370,9 @@
|
|
|
23678
24370
|
})
|
|
23679
24371
|
}
|
|
23680
24372
|
};
|
|
23681
|
-
const COMPONENT_NAME$
|
|
24373
|
+
const COMPONENT_NAME$F = "vc-popup";
|
|
23682
24374
|
const MPopup = /* @__PURE__ */ vue.defineComponent({
|
|
23683
|
-
name: COMPONENT_NAME$
|
|
24375
|
+
name: COMPONENT_NAME$F,
|
|
23684
24376
|
props: props$p,
|
|
23685
24377
|
emits: ["update:modelValue", "close", "portal-fulfilled", "visible-change"],
|
|
23686
24378
|
setup(props2, {
|
|
@@ -23789,9 +24481,9 @@
|
|
|
23789
24481
|
default: "div"
|
|
23790
24482
|
}
|
|
23791
24483
|
};
|
|
23792
|
-
const COMPONENT_NAME$
|
|
24484
|
+
const COMPONENT_NAME$E = "vc-print";
|
|
23793
24485
|
const Print = /* @__PURE__ */ vue.defineComponent({
|
|
23794
|
-
name: COMPONENT_NAME$
|
|
24486
|
+
name: COMPONENT_NAME$E,
|
|
23795
24487
|
props: props$o,
|
|
23796
24488
|
setup(props2, {
|
|
23797
24489
|
expose,
|
|
@@ -23862,7 +24554,7 @@
|
|
|
23862
24554
|
},
|
|
23863
24555
|
strokeColor: {
|
|
23864
24556
|
type: String,
|
|
23865
|
-
default: "#
|
|
24557
|
+
default: "#456CF6"
|
|
23866
24558
|
},
|
|
23867
24559
|
trackColor: {
|
|
23868
24560
|
type: String,
|
|
@@ -23881,9 +24573,9 @@
|
|
|
23881
24573
|
})
|
|
23882
24574
|
}
|
|
23883
24575
|
};
|
|
23884
|
-
const COMPONENT_NAME$
|
|
24576
|
+
const COMPONENT_NAME$D = "vc-progress-circle";
|
|
23885
24577
|
const Circle$1 = /* @__PURE__ */ vue.defineComponent({
|
|
23886
|
-
name: COMPONENT_NAME$
|
|
24578
|
+
name: COMPONENT_NAME$D,
|
|
23887
24579
|
props: props$n,
|
|
23888
24580
|
setup(props2, {
|
|
23889
24581
|
slots
|
|
@@ -23940,9 +24632,9 @@
|
|
|
23940
24632
|
};
|
|
23941
24633
|
}
|
|
23942
24634
|
});
|
|
23943
|
-
const COMPONENT_NAME$
|
|
24635
|
+
const COMPONENT_NAME$C = "vc-progress-line";
|
|
23944
24636
|
const Line$2 = /* @__PURE__ */ vue.defineComponent({
|
|
23945
|
-
name: COMPONENT_NAME$
|
|
24637
|
+
name: COMPONENT_NAME$C,
|
|
23946
24638
|
props: props$n,
|
|
23947
24639
|
setup(props2) {
|
|
23948
24640
|
const colorStyle = vue.computed(() => {
|
|
@@ -23986,9 +24678,9 @@
|
|
|
23986
24678
|
function _isSlot(s) {
|
|
23987
24679
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
23988
24680
|
}
|
|
23989
|
-
const COMPONENT_NAME$
|
|
24681
|
+
const COMPONENT_NAME$B = "vc-progress";
|
|
23990
24682
|
const Progress = /* @__PURE__ */ vue.defineComponent({
|
|
23991
|
-
name: COMPONENT_NAME$
|
|
24683
|
+
name: COMPONENT_NAME$B,
|
|
23992
24684
|
props: props$n,
|
|
23993
24685
|
setup(props2, {
|
|
23994
24686
|
slots
|
|
@@ -24144,9 +24836,9 @@
|
|
|
24144
24836
|
computedLabel
|
|
24145
24837
|
};
|
|
24146
24838
|
};
|
|
24147
|
-
const COMPONENT_NAME$
|
|
24839
|
+
const COMPONENT_NAME$A = "vc-radio";
|
|
24148
24840
|
const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
24149
|
-
name: COMPONENT_NAME$
|
|
24841
|
+
name: COMPONENT_NAME$A,
|
|
24150
24842
|
props: props$m,
|
|
24151
24843
|
emits: ["update:modelValue", "change"],
|
|
24152
24844
|
setup(props2, {
|
|
@@ -24187,9 +24879,9 @@
|
|
|
24187
24879
|
};
|
|
24188
24880
|
}
|
|
24189
24881
|
});
|
|
24190
|
-
const COMPONENT_NAME$
|
|
24882
|
+
const COMPONENT_NAME$z = "vc-radio-button";
|
|
24191
24883
|
const RadioButton = /* @__PURE__ */ vue.defineComponent({
|
|
24192
|
-
name: COMPONENT_NAME$
|
|
24884
|
+
name: COMPONENT_NAME$z,
|
|
24193
24885
|
props: {
|
|
24194
24886
|
...props$m,
|
|
24195
24887
|
labelStyle: [String, Object],
|
|
@@ -24297,9 +24989,9 @@
|
|
|
24297
24989
|
reset
|
|
24298
24990
|
};
|
|
24299
24991
|
};
|
|
24300
|
-
const COMPONENT_NAME$
|
|
24992
|
+
const COMPONENT_NAME$y = "vc-radio-group";
|
|
24301
24993
|
const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
24302
|
-
name: COMPONENT_NAME$
|
|
24994
|
+
name: COMPONENT_NAME$y,
|
|
24303
24995
|
props: props$l,
|
|
24304
24996
|
emits: ["update:modelValue", "change"],
|
|
24305
24997
|
setup(props2, {
|
|
@@ -24317,9 +25009,9 @@
|
|
|
24317
25009
|
};
|
|
24318
25010
|
}
|
|
24319
25011
|
});
|
|
24320
|
-
const COMPONENT_NAME$
|
|
25012
|
+
const COMPONENT_NAME$x = "vcm-radio";
|
|
24321
25013
|
const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
24322
|
-
name: COMPONENT_NAME$
|
|
25014
|
+
name: COMPONENT_NAME$x,
|
|
24323
25015
|
props: props$m,
|
|
24324
25016
|
emits: ["update:modelValue", "change"],
|
|
24325
25017
|
setup(props2, {
|
|
@@ -24360,9 +25052,9 @@
|
|
|
24360
25052
|
};
|
|
24361
25053
|
}
|
|
24362
25054
|
});
|
|
24363
|
-
const COMPONENT_NAME$
|
|
25055
|
+
const COMPONENT_NAME$w = "vcm-radio-group";
|
|
24364
25056
|
const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
24365
|
-
name: COMPONENT_NAME$
|
|
25057
|
+
name: COMPONENT_NAME$w,
|
|
24366
25058
|
props: props$l,
|
|
24367
25059
|
emits: ["update:modelValue", "change"],
|
|
24368
25060
|
setup(props2, {
|
|
@@ -24424,9 +25116,9 @@
|
|
|
24424
25116
|
default: () => ({})
|
|
24425
25117
|
}
|
|
24426
25118
|
};
|
|
24427
|
-
const COMPONENT_NAME$
|
|
25119
|
+
const COMPONENT_NAME$v = "vc-rate";
|
|
24428
25120
|
const Rate = /* @__PURE__ */ vue.defineComponent({
|
|
24429
|
-
name: COMPONENT_NAME$
|
|
25121
|
+
name: COMPONENT_NAME$v,
|
|
24430
25122
|
props: props$k,
|
|
24431
25123
|
emits: ["update:modelValue", "change"],
|
|
24432
25124
|
setup(props2, {
|
|
@@ -24621,9 +25313,9 @@
|
|
|
24621
25313
|
renderPlaceholder: Function,
|
|
24622
25314
|
renderRefresh: Function
|
|
24623
25315
|
};
|
|
24624
|
-
const COMPONENT_NAME$
|
|
25316
|
+
const COMPONENT_NAME$u = "vc-recycle-list-scroll-state";
|
|
24625
25317
|
const ScrollState = /* @__PURE__ */ vue.defineComponent({
|
|
24626
|
-
name: COMPONENT_NAME$
|
|
25318
|
+
name: COMPONENT_NAME$u,
|
|
24627
25319
|
setup(_, {
|
|
24628
25320
|
slots
|
|
24629
25321
|
}) {
|
|
@@ -24747,10 +25439,10 @@
|
|
|
24747
25439
|
);
|
|
24748
25440
|
return keys;
|
|
24749
25441
|
};
|
|
24750
|
-
const COMPONENT_NAME$
|
|
25442
|
+
const COMPONENT_NAME$t = "vc-recycle-list-container";
|
|
24751
25443
|
const transformKey = prefixStyle("transform").camel;
|
|
24752
25444
|
const Container$1 = /* @__PURE__ */ vue.defineComponent({
|
|
24753
|
-
name: COMPONENT_NAME$
|
|
25445
|
+
name: COMPONENT_NAME$t,
|
|
24754
25446
|
props: props$i,
|
|
24755
25447
|
emits: ["refresh"],
|
|
24756
25448
|
setup(props2, {
|
|
@@ -24843,9 +25535,9 @@
|
|
|
24843
25535
|
};
|
|
24844
25536
|
}
|
|
24845
25537
|
});
|
|
24846
|
-
const COMPONENT_NAME$
|
|
25538
|
+
const COMPONENT_NAME$s = "vc-recycle-list";
|
|
24847
25539
|
const RecycleList = /* @__PURE__ */ vue.defineComponent({
|
|
24848
|
-
name: COMPONENT_NAME$
|
|
25540
|
+
name: COMPONENT_NAME$s,
|
|
24849
25541
|
props: props$j,
|
|
24850
25542
|
emits: ["scroll", "row-resize"],
|
|
24851
25543
|
setup(props2, {
|
|
@@ -25370,9 +26062,9 @@
|
|
|
25370
26062
|
default: "div"
|
|
25371
26063
|
}
|
|
25372
26064
|
};
|
|
25373
|
-
const COMPONENT_NAME$
|
|
26065
|
+
const COMPONENT_NAME$r = "vc-slider";
|
|
25374
26066
|
const Slider = /* @__PURE__ */ vue.defineComponent({
|
|
25375
|
-
name: COMPONENT_NAME$
|
|
26067
|
+
name: COMPONENT_NAME$r,
|
|
25376
26068
|
props: props$h,
|
|
25377
26069
|
setup(props2, {
|
|
25378
26070
|
slots
|
|
@@ -25391,9 +26083,9 @@
|
|
|
25391
26083
|
default: "div"
|
|
25392
26084
|
}
|
|
25393
26085
|
};
|
|
25394
|
-
const COMPONENT_NAME$
|
|
26086
|
+
const COMPONENT_NAME$q = "vc-sort-list";
|
|
25395
26087
|
const SortList = /* @__PURE__ */ vue.defineComponent({
|
|
25396
|
-
name: COMPONENT_NAME$
|
|
26088
|
+
name: COMPONENT_NAME$q,
|
|
25397
26089
|
props: props$g,
|
|
25398
26090
|
setup(props2, {
|
|
25399
26091
|
slots
|
|
@@ -25412,9 +26104,9 @@
|
|
|
25412
26104
|
default: "div"
|
|
25413
26105
|
}
|
|
25414
26106
|
};
|
|
25415
|
-
const COMPONENT_NAME$
|
|
26107
|
+
const COMPONENT_NAME$p = "vc-steps";
|
|
25416
26108
|
const Steps = /* @__PURE__ */ vue.defineComponent({
|
|
25417
|
-
name: COMPONENT_NAME$
|
|
26109
|
+
name: COMPONENT_NAME$p,
|
|
25418
26110
|
props: props$f,
|
|
25419
26111
|
setup(props2, {
|
|
25420
26112
|
slots
|
|
@@ -25534,9 +26226,9 @@
|
|
|
25534
26226
|
reset
|
|
25535
26227
|
};
|
|
25536
26228
|
};
|
|
25537
|
-
const COMPONENT_NAME$
|
|
26229
|
+
const COMPONENT_NAME$o = "vc-switch";
|
|
25538
26230
|
const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
25539
|
-
name: COMPONENT_NAME$
|
|
26231
|
+
name: COMPONENT_NAME$o,
|
|
25540
26232
|
props: props$e,
|
|
25541
26233
|
// click -> onClick要被拦截,此处不能放置
|
|
25542
26234
|
emits: ["update:modelValue", "change", "click"],
|
|
@@ -25607,9 +26299,9 @@
|
|
|
25607
26299
|
};
|
|
25608
26300
|
}
|
|
25609
26301
|
});
|
|
25610
|
-
const COMPONENT_NAME$
|
|
26302
|
+
const COMPONENT_NAME$n = "vcm-switch";
|
|
25611
26303
|
const MSwitch = /* @__PURE__ */ vue.defineComponent({
|
|
25612
|
-
name: COMPONENT_NAME$
|
|
26304
|
+
name: COMPONENT_NAME$n,
|
|
25613
26305
|
props: props$e,
|
|
25614
26306
|
// click -> onClick要被拦截,此处不能放置
|
|
25615
26307
|
emits: ["update:modelValue", "change", "click"],
|
|
@@ -25745,9 +26437,9 @@
|
|
|
25745
26437
|
};
|
|
25746
26438
|
const columnsToRowsEffect = (v) => {
|
|
25747
26439
|
let maxLevel = 1;
|
|
25748
|
-
const traverse = (column,
|
|
25749
|
-
if (
|
|
25750
|
-
column.level =
|
|
26440
|
+
const traverse = (column, parent2) => {
|
|
26441
|
+
if (parent2) {
|
|
26442
|
+
column.level = parent2.level + 1;
|
|
25751
26443
|
if (maxLevel < column.level) {
|
|
25752
26444
|
maxLevel = column.level;
|
|
25753
26445
|
}
|
|
@@ -25801,8 +26493,8 @@
|
|
|
25801
26493
|
level: baseLevel = 0
|
|
25802
26494
|
} = opts;
|
|
25803
26495
|
const isNil = (array) => !(Array.isArray(array) && array.length);
|
|
25804
|
-
function _walker(
|
|
25805
|
-
cb(
|
|
26496
|
+
function _walker(parent2, children, level) {
|
|
26497
|
+
cb(parent2, children, level);
|
|
25806
26498
|
children.forEach((item) => {
|
|
25807
26499
|
if (item[lazyKey]) {
|
|
25808
26500
|
cb(item, null, level + 1);
|
|
@@ -26015,8 +26707,8 @@
|
|
|
26015
26707
|
const res = {};
|
|
26016
26708
|
walkTreeNode(
|
|
26017
26709
|
data,
|
|
26018
|
-
(
|
|
26019
|
-
const parentId = getRowValue(
|
|
26710
|
+
(parent2, children, level) => {
|
|
26711
|
+
const parentId = getRowValue(parent2, primaryKey);
|
|
26020
26712
|
if (Array.isArray(children)) {
|
|
26021
26713
|
res[parentId] = {
|
|
26022
26714
|
children: children.map((row) => getRowValue(row, primaryKey)),
|
|
@@ -26156,9 +26848,9 @@
|
|
|
26156
26848
|
this.store.states.treeData[key].expanded = true;
|
|
26157
26849
|
walkTreeNode(
|
|
26158
26850
|
data,
|
|
26159
|
-
(
|
|
26160
|
-
const id = getRowValue(
|
|
26161
|
-
Object.defineProperty(
|
|
26851
|
+
(parent2, _, level) => {
|
|
26852
|
+
const id = getRowValue(parent2, primaryKey);
|
|
26853
|
+
Object.defineProperty(parent2, "__KEY__", {
|
|
26162
26854
|
value: `${level}__${id}`,
|
|
26163
26855
|
writable: false
|
|
26164
26856
|
});
|
|
@@ -26451,13 +27143,13 @@
|
|
|
26451
27143
|
* @param index ~
|
|
26452
27144
|
* @param parent ~
|
|
26453
27145
|
*/
|
|
26454
|
-
insertColumn(column, index,
|
|
27146
|
+
insertColumn(column, index, parent2) {
|
|
26455
27147
|
let array = this.states._columns;
|
|
26456
|
-
if (
|
|
26457
|
-
array =
|
|
27148
|
+
if (parent2) {
|
|
27149
|
+
array = parent2.children;
|
|
26458
27150
|
if (!array) {
|
|
26459
27151
|
array = [];
|
|
26460
|
-
|
|
27152
|
+
parent2.children = array;
|
|
26461
27153
|
}
|
|
26462
27154
|
}
|
|
26463
27155
|
if (typeof index !== "undefined") {
|
|
@@ -26474,10 +27166,10 @@
|
|
|
26474
27166
|
this.scheduleLayout();
|
|
26475
27167
|
}
|
|
26476
27168
|
}
|
|
26477
|
-
removeColumn(column,
|
|
27169
|
+
removeColumn(column, parent2) {
|
|
26478
27170
|
let array = this.states._columns;
|
|
26479
|
-
if (
|
|
26480
|
-
array =
|
|
27171
|
+
if (parent2) {
|
|
27172
|
+
array = parent2.children || [];
|
|
26481
27173
|
}
|
|
26482
27174
|
if (array) {
|
|
26483
27175
|
array.splice(array.indexOf(column), 1);
|
|
@@ -26710,9 +27402,9 @@
|
|
|
26710
27402
|
});
|
|
26711
27403
|
return states;
|
|
26712
27404
|
};
|
|
26713
|
-
const COMPONENT_NAME$
|
|
27405
|
+
const COMPONENT_NAME$m = "vc-table-normal-list";
|
|
26714
27406
|
const NormalList = /* @__PURE__ */ vue.defineComponent({
|
|
26715
|
-
name: COMPONENT_NAME$
|
|
27407
|
+
name: COMPONENT_NAME$m,
|
|
26716
27408
|
props: {
|
|
26717
27409
|
data: {
|
|
26718
27410
|
type: Array,
|
|
@@ -27706,9 +28398,9 @@
|
|
|
27706
28398
|
default: void 0
|
|
27707
28399
|
}
|
|
27708
28400
|
};
|
|
27709
|
-
const COMPONENT_NAME$
|
|
28401
|
+
const COMPONENT_NAME$l = "vc-table";
|
|
27710
28402
|
const Table$1 = /* @__PURE__ */ vue.defineComponent({
|
|
27711
|
-
name: COMPONENT_NAME$
|
|
28403
|
+
name: COMPONENT_NAME$l,
|
|
27712
28404
|
props: props$d,
|
|
27713
28405
|
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"],
|
|
27714
28406
|
setup(props2, {
|
|
@@ -28445,9 +29137,9 @@
|
|
|
28445
29137
|
}) {
|
|
28446
29138
|
const instance = vue.getCurrentInstance();
|
|
28447
29139
|
const table = vue.inject("vc-table");
|
|
28448
|
-
const
|
|
28449
|
-
const isSubColumn = table !==
|
|
28450
|
-
const columnId = vue.ref((
|
|
29140
|
+
const parent2 = vue.inject("vc-table-column", table);
|
|
29141
|
+
const isSubColumn = table !== parent2;
|
|
29142
|
+
const columnId = vue.ref((parent2.tableId || parent2.columnId) + getUid("column"));
|
|
28451
29143
|
const realWidth = vue.computed(() => {
|
|
28452
29144
|
return parseWidth(props2.width);
|
|
28453
29145
|
});
|
|
@@ -28573,13 +29265,13 @@
|
|
|
28573
29265
|
registerWatchers();
|
|
28574
29266
|
});
|
|
28575
29267
|
vue.onMounted(() => {
|
|
28576
|
-
const children = isSubColumn ?
|
|
29268
|
+
const children = isSubColumn ? parent2.vnode.el.children : parent2.hiddenColumns.value.children;
|
|
28577
29269
|
const columnIndex = [...children].indexOf(instance.vnode.el);
|
|
28578
|
-
table.store.insertColumn(columnConfig, columnIndex, isSubColumn &&
|
|
29270
|
+
table.store.insertColumn(columnConfig, columnIndex, isSubColumn && parent2.columnConfig);
|
|
28579
29271
|
});
|
|
28580
29272
|
vue.onUnmounted(() => {
|
|
28581
29273
|
if (!instance.parent) return;
|
|
28582
|
-
table.store.removeColumn(columnConfig, isSubColumn &&
|
|
29274
|
+
table.store.removeColumn(columnConfig, isSubColumn && parent2.columnConfig);
|
|
28583
29275
|
});
|
|
28584
29276
|
vue.provide("vc-table-column", {
|
|
28585
29277
|
columnId,
|
|
@@ -28824,9 +29516,9 @@
|
|
|
28824
29516
|
handleChange
|
|
28825
29517
|
};
|
|
28826
29518
|
};
|
|
28827
|
-
const COMPONENT_NAME$
|
|
29519
|
+
const COMPONENT_NAME$k = "vc-tabs";
|
|
28828
29520
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
28829
|
-
name: COMPONENT_NAME$
|
|
29521
|
+
name: COMPONENT_NAME$k,
|
|
28830
29522
|
props: props$c,
|
|
28831
29523
|
emits: ["update:modelValue", "change", "click"],
|
|
28832
29524
|
setup(props2, {
|
|
@@ -29055,9 +29747,9 @@
|
|
|
29055
29747
|
currentValue
|
|
29056
29748
|
};
|
|
29057
29749
|
};
|
|
29058
|
-
const COMPONENT_NAME$
|
|
29750
|
+
const COMPONENT_NAME$j = "vc-tabs-pane";
|
|
29059
29751
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
29060
|
-
name: COMPONENT_NAME$
|
|
29752
|
+
name: COMPONENT_NAME$j,
|
|
29061
29753
|
props: props$b,
|
|
29062
29754
|
setup(_, {
|
|
29063
29755
|
slots
|
|
@@ -29108,9 +29800,9 @@
|
|
|
29108
29800
|
default: false
|
|
29109
29801
|
}
|
|
29110
29802
|
};
|
|
29111
|
-
const COMPONENT_NAME$
|
|
29803
|
+
const COMPONENT_NAME$i = "vcm-tabs";
|
|
29112
29804
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
29113
|
-
name: COMPONENT_NAME$
|
|
29805
|
+
name: COMPONENT_NAME$i,
|
|
29114
29806
|
props: props$a,
|
|
29115
29807
|
emits: ["update:modelValue", "change", "click"],
|
|
29116
29808
|
setup(props2, {
|
|
@@ -29338,9 +30030,9 @@
|
|
|
29338
30030
|
};
|
|
29339
30031
|
}
|
|
29340
30032
|
});
|
|
29341
|
-
const COMPONENT_NAME$
|
|
30033
|
+
const COMPONENT_NAME$h = "vcm-tabs-pane";
|
|
29342
30034
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
29343
|
-
name: COMPONENT_NAME$
|
|
30035
|
+
name: COMPONENT_NAME$h,
|
|
29344
30036
|
props: props$b,
|
|
29345
30037
|
setup(_, {
|
|
29346
30038
|
slots
|
|
@@ -29399,9 +30091,9 @@
|
|
|
29399
30091
|
default: "dark"
|
|
29400
30092
|
}
|
|
29401
30093
|
};
|
|
29402
|
-
const COMPONENT_NAME$
|
|
30094
|
+
const COMPONENT_NAME$g = "vc-text";
|
|
29403
30095
|
const Text$2 = /* @__PURE__ */ vue.defineComponent({
|
|
29404
|
-
name: COMPONENT_NAME$
|
|
30096
|
+
name: COMPONENT_NAME$g,
|
|
29405
30097
|
props: props$9,
|
|
29406
30098
|
setup(props2, {
|
|
29407
30099
|
emit
|
|
@@ -29760,9 +30452,9 @@
|
|
|
29760
30452
|
type: [Object, Array]
|
|
29761
30453
|
}
|
|
29762
30454
|
};
|
|
29763
|
-
const COMPONENT_NAME$
|
|
30455
|
+
const COMPONENT_NAME$f = "vc-textarea";
|
|
29764
30456
|
const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
29765
|
-
name: COMPONENT_NAME$
|
|
30457
|
+
name: COMPONENT_NAME$f,
|
|
29766
30458
|
props: Object.assign({}, props$8, {
|
|
29767
30459
|
indicator: {
|
|
29768
30460
|
type: [Boolean, Object],
|
|
@@ -29815,9 +30507,9 @@
|
|
|
29815
30507
|
};
|
|
29816
30508
|
}
|
|
29817
30509
|
});
|
|
29818
|
-
const COMPONENT_NAME$
|
|
30510
|
+
const COMPONENT_NAME$e = "vcm-textarea";
|
|
29819
30511
|
const MTextarea = /* @__PURE__ */ vue.defineComponent({
|
|
29820
|
-
name: COMPONENT_NAME$
|
|
30512
|
+
name: COMPONENT_NAME$e,
|
|
29821
30513
|
props: Object.assign({}, props$8, {
|
|
29822
30514
|
align: {
|
|
29823
30515
|
type: String,
|
|
@@ -29898,9 +30590,9 @@
|
|
|
29898
30590
|
type: [String, Object]
|
|
29899
30591
|
}
|
|
29900
30592
|
};
|
|
29901
|
-
const COMPONENT_NAME$
|
|
30593
|
+
const COMPONENT_NAME$d = "vc-theme";
|
|
29902
30594
|
const Theme$1 = vue.defineComponent({
|
|
29903
|
-
name: COMPONENT_NAME$
|
|
30595
|
+
name: COMPONENT_NAME$d,
|
|
29904
30596
|
props: props$7,
|
|
29905
30597
|
setup(props2, { slots }) {
|
|
29906
30598
|
const themeId = getUid("vc-theme");
|
|
@@ -29982,9 +30674,9 @@
|
|
|
29982
30674
|
};
|
|
29983
30675
|
}
|
|
29984
30676
|
});
|
|
29985
|
-
const COMPONENT_NAME$
|
|
30677
|
+
const COMPONENT_NAME$c = "vc-theme-view";
|
|
29986
30678
|
const ThemeView = vue.defineComponent({
|
|
29987
|
-
name: COMPONENT_NAME$
|
|
30679
|
+
name: COMPONENT_NAME$c,
|
|
29988
30680
|
props: props$7,
|
|
29989
30681
|
setup(props2, { slots }) {
|
|
29990
30682
|
return () => {
|
|
@@ -29999,9 +30691,9 @@
|
|
|
29999
30691
|
};
|
|
30000
30692
|
}
|
|
30001
30693
|
});
|
|
30002
|
-
const COMPONENT_NAME$
|
|
30694
|
+
const COMPONENT_NAME$b = "vc-theme-text";
|
|
30003
30695
|
const ThemeText = vue.defineComponent({
|
|
30004
|
-
name: COMPONENT_NAME$
|
|
30696
|
+
name: COMPONENT_NAME$b,
|
|
30005
30697
|
props: props$7,
|
|
30006
30698
|
setup(props2, { slots }) {
|
|
30007
30699
|
return () => {
|
|
@@ -30016,9 +30708,9 @@
|
|
|
30016
30708
|
};
|
|
30017
30709
|
}
|
|
30018
30710
|
});
|
|
30019
|
-
const COMPONENT_NAME$
|
|
30711
|
+
const COMPONENT_NAME$a = "vc-theme-image";
|
|
30020
30712
|
const ThemeImage = vue.defineComponent({
|
|
30021
|
-
name: COMPONENT_NAME$
|
|
30713
|
+
name: COMPONENT_NAME$a,
|
|
30022
30714
|
props: props$7,
|
|
30023
30715
|
setup(props2, { slots }) {
|
|
30024
30716
|
return () => {
|
|
@@ -30066,12 +30758,12 @@
|
|
|
30066
30758
|
default: false
|
|
30067
30759
|
}
|
|
30068
30760
|
};
|
|
30069
|
-
const COMPONENT_NAME$
|
|
30761
|
+
const COMPONENT_NAME$9 = "vc-time-picker";
|
|
30070
30762
|
const getPanel = (type) => {
|
|
30071
30763
|
const isRange = type === "timerange";
|
|
30072
30764
|
return isRange ? TimeRangePanel : TimePanel;
|
|
30073
30765
|
};
|
|
30074
|
-
const TimePicker = createPicker(COMPONENT_NAME$
|
|
30766
|
+
const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
|
|
30075
30767
|
const props2 = vue.getCurrentInstance().props;
|
|
30076
30768
|
const icon = vue.ref("icon");
|
|
30077
30769
|
const panel = vue.shallowRef({});
|
|
@@ -30102,9 +30794,9 @@
|
|
|
30102
30794
|
default: "div"
|
|
30103
30795
|
}
|
|
30104
30796
|
};
|
|
30105
|
-
const COMPONENT_NAME$
|
|
30797
|
+
const COMPONENT_NAME$8 = "vc-timeline";
|
|
30106
30798
|
const Timeline = /* @__PURE__ */ vue.defineComponent({
|
|
30107
|
-
name: COMPONENT_NAME$
|
|
30799
|
+
name: COMPONENT_NAME$8,
|
|
30108
30800
|
props: props$5,
|
|
30109
30801
|
setup(props2, {
|
|
30110
30802
|
slots
|
|
@@ -30125,9 +30817,9 @@
|
|
|
30125
30817
|
default: "div"
|
|
30126
30818
|
}
|
|
30127
30819
|
};
|
|
30128
|
-
const COMPONENT_NAME$
|
|
30820
|
+
const COMPONENT_NAME$7 = "vc-touch";
|
|
30129
30821
|
const Touch = /* @__PURE__ */ vue.defineComponent({
|
|
30130
|
-
name: COMPONENT_NAME$
|
|
30822
|
+
name: COMPONENT_NAME$7,
|
|
30131
30823
|
props: props$4,
|
|
30132
30824
|
setup(props2, {
|
|
30133
30825
|
slots
|
|
@@ -30188,10 +30880,10 @@
|
|
|
30188
30880
|
node.states.checked = false;
|
|
30189
30881
|
node.states.indeterminate = false;
|
|
30190
30882
|
}
|
|
30191
|
-
const
|
|
30192
|
-
if (!
|
|
30883
|
+
const parent2 = node.parentNode;
|
|
30884
|
+
if (!parent2 || parent2.states.level === 0) return;
|
|
30193
30885
|
if (!node.store.checkStrictly) {
|
|
30194
|
-
reInitChecked(
|
|
30886
|
+
reInitChecked(parent2);
|
|
30195
30887
|
}
|
|
30196
30888
|
};
|
|
30197
30889
|
const getPropertyFromData = (node, prop) => {
|
|
@@ -30284,21 +30976,21 @@
|
|
|
30284
30976
|
this.updateLeafState();
|
|
30285
30977
|
}
|
|
30286
30978
|
getNextSiblingNode() {
|
|
30287
|
-
const
|
|
30288
|
-
if (
|
|
30289
|
-
const index =
|
|
30979
|
+
const parent2 = this.parentNode;
|
|
30980
|
+
if (parent2) {
|
|
30981
|
+
const index = parent2.childNodes.indexOf(this);
|
|
30290
30982
|
if (index > -1) {
|
|
30291
|
-
return
|
|
30983
|
+
return parent2.childNodes[index + 1];
|
|
30292
30984
|
}
|
|
30293
30985
|
}
|
|
30294
30986
|
return null;
|
|
30295
30987
|
}
|
|
30296
30988
|
getPreviousSiblingNode() {
|
|
30297
|
-
const
|
|
30298
|
-
if (
|
|
30299
|
-
const index =
|
|
30989
|
+
const parent2 = this.parentNode;
|
|
30990
|
+
if (parent2) {
|
|
30991
|
+
const index = parent2.childNodes.indexOf(this);
|
|
30300
30992
|
if (index > -1) {
|
|
30301
|
-
return index > 0 ?
|
|
30993
|
+
return index > 0 ? parent2.childNodes[index - 1] : null;
|
|
30302
30994
|
}
|
|
30303
30995
|
}
|
|
30304
30996
|
return null;
|
|
@@ -30320,8 +31012,8 @@
|
|
|
30320
31012
|
}
|
|
30321
31013
|
}
|
|
30322
31014
|
contains(target, deep = true) {
|
|
30323
|
-
const walk = function(
|
|
30324
|
-
const children =
|
|
31015
|
+
const walk = function(parent2) {
|
|
31016
|
+
const children = parent2.childNodes || [];
|
|
30325
31017
|
let result = false;
|
|
30326
31018
|
for (let i = 0, j = children.length; i < j; i++) {
|
|
30327
31019
|
const child = children[i];
|
|
@@ -30335,9 +31027,9 @@
|
|
|
30335
31027
|
return walk(this);
|
|
30336
31028
|
}
|
|
30337
31029
|
remove() {
|
|
30338
|
-
const
|
|
30339
|
-
if (
|
|
30340
|
-
|
|
31030
|
+
const parent2 = this.parentNode;
|
|
31031
|
+
if (parent2) {
|
|
31032
|
+
parent2.removeChild(this);
|
|
30341
31033
|
}
|
|
30342
31034
|
}
|
|
30343
31035
|
insertChild(states, index, batch) {
|
|
@@ -30410,10 +31102,10 @@
|
|
|
30410
31102
|
async expand(expandParent) {
|
|
30411
31103
|
const done = () => {
|
|
30412
31104
|
if (expandParent) {
|
|
30413
|
-
let
|
|
30414
|
-
while (
|
|
30415
|
-
|
|
30416
|
-
|
|
31105
|
+
let parent2 = this.parentNode;
|
|
31106
|
+
while (parent2 && parent2.states.level > 0) {
|
|
31107
|
+
parent2.states.expanded = true;
|
|
31108
|
+
parent2 = parent2.parentNode;
|
|
30417
31109
|
}
|
|
30418
31110
|
}
|
|
30419
31111
|
this.states.expanded = true;
|
|
@@ -30490,10 +31182,10 @@
|
|
|
30490
31182
|
handleDescendants();
|
|
30491
31183
|
}
|
|
30492
31184
|
}
|
|
30493
|
-
const
|
|
30494
|
-
if (!
|
|
31185
|
+
const parent2 = this.parentNode;
|
|
31186
|
+
if (!parent2 || parent2.states.level === 0) return;
|
|
30495
31187
|
if (!recursion) {
|
|
30496
|
-
reInitChecked(
|
|
31188
|
+
reInitChecked(parent2);
|
|
30497
31189
|
}
|
|
30498
31190
|
}
|
|
30499
31191
|
getChildren(forceInit = false) {
|
|
@@ -30631,21 +31323,68 @@
|
|
|
30631
31323
|
parentNode.insertChild({ data });
|
|
30632
31324
|
}
|
|
30633
31325
|
}
|
|
31326
|
+
/**
|
|
31327
|
+
* 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
|
|
31328
|
+
* 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
|
|
31329
|
+
* @param checkedValues ~
|
|
31330
|
+
* @returns ~
|
|
31331
|
+
*/
|
|
31332
|
+
_getCascadeCheckedAnchorIds(checkedValues) {
|
|
31333
|
+
const checkedSet = new Set(checkedValues);
|
|
31334
|
+
const nodesMap = this.nodesMap;
|
|
31335
|
+
const anchors = [];
|
|
31336
|
+
for (const id of checkedValues) {
|
|
31337
|
+
const node = nodesMap[id];
|
|
31338
|
+
if (!node) continue;
|
|
31339
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
31340
|
+
(child) => checkedSet.has(child.getter.value)
|
|
31341
|
+
);
|
|
31342
|
+
if (!hasSelectedChildInSet) {
|
|
31343
|
+
anchors.push(id);
|
|
31344
|
+
}
|
|
31345
|
+
}
|
|
31346
|
+
anchors.sort((a, b) => {
|
|
31347
|
+
const na = nodesMap[a];
|
|
31348
|
+
const nb = nodesMap[b];
|
|
31349
|
+
if (!na || !nb) return 0;
|
|
31350
|
+
return nb.states.level - na.states.level;
|
|
31351
|
+
});
|
|
31352
|
+
return anchors;
|
|
31353
|
+
}
|
|
30634
31354
|
_initDefaultCheckedNodes() {
|
|
30635
31355
|
const checkedValues = this.checkedValues || [];
|
|
30636
31356
|
const nodesMap = this.nodesMap;
|
|
30637
|
-
|
|
31357
|
+
if (this.checkStrictly) {
|
|
31358
|
+
checkedValues.forEach((id) => {
|
|
31359
|
+
const node = nodesMap[id];
|
|
31360
|
+
if (node) {
|
|
31361
|
+
node.setChecked(true, false);
|
|
31362
|
+
}
|
|
31363
|
+
});
|
|
31364
|
+
return;
|
|
31365
|
+
}
|
|
31366
|
+
const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
|
|
31367
|
+
anchorIds.forEach((id) => {
|
|
30638
31368
|
const node = nodesMap[id];
|
|
30639
31369
|
if (node) {
|
|
30640
|
-
node.setChecked(true,
|
|
31370
|
+
node.setChecked(true, true);
|
|
30641
31371
|
}
|
|
30642
31372
|
});
|
|
30643
31373
|
}
|
|
30644
31374
|
_initDefaultCheckedNode(node) {
|
|
30645
31375
|
const checkedValues = this.checkedValues || [];
|
|
30646
31376
|
const nodeValue = node.getter.value;
|
|
30647
|
-
if (checkedValues.indexOf(nodeValue)
|
|
30648
|
-
|
|
31377
|
+
if (checkedValues.indexOf(nodeValue) === -1) return;
|
|
31378
|
+
if (this.checkStrictly) {
|
|
31379
|
+
node.setChecked(true, false);
|
|
31380
|
+
return;
|
|
31381
|
+
}
|
|
31382
|
+
const checkedSet = new Set(checkedValues);
|
|
31383
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
31384
|
+
(child) => checkedSet.has(child.getter.value)
|
|
31385
|
+
);
|
|
31386
|
+
if (!hasSelectedChildInSet) {
|
|
31387
|
+
node.setChecked(true, true);
|
|
30649
31388
|
}
|
|
30650
31389
|
}
|
|
30651
31390
|
setCheckedValues(newVal) {
|
|
@@ -30743,10 +31482,10 @@
|
|
|
30743
31482
|
node.setChecked(false, false);
|
|
30744
31483
|
}
|
|
30745
31484
|
} else {
|
|
30746
|
-
let
|
|
30747
|
-
while (
|
|
30748
|
-
cache[
|
|
30749
|
-
|
|
31485
|
+
let parent2 = node.parentNode;
|
|
31486
|
+
while (parent2 && parent2.states.level > 0) {
|
|
31487
|
+
cache[parent2.states.data[key]] = true;
|
|
31488
|
+
parent2 = parent2.parentNode;
|
|
30750
31489
|
}
|
|
30751
31490
|
if (node.states.isLeaf || this.checkStrictly) {
|
|
30752
31491
|
node.setChecked(true, false);
|
|
@@ -30868,9 +31607,9 @@
|
|
|
30868
31607
|
default: true
|
|
30869
31608
|
}
|
|
30870
31609
|
};
|
|
30871
|
-
const COMPONENT_NAME$
|
|
31610
|
+
const COMPONENT_NAME$6 = "vc-tree-node";
|
|
30872
31611
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
30873
|
-
name: COMPONENT_NAME$
|
|
31612
|
+
name: COMPONENT_NAME$6,
|
|
30874
31613
|
props: props$3,
|
|
30875
31614
|
emits: ["node-expand"],
|
|
30876
31615
|
setup(props2, {
|
|
@@ -31363,9 +32102,9 @@
|
|
|
31363
32102
|
default: () => KEY_VALUE
|
|
31364
32103
|
}
|
|
31365
32104
|
};
|
|
31366
|
-
const COMPONENT_NAME$
|
|
32105
|
+
const COMPONENT_NAME$5 = "vc-tree";
|
|
31367
32106
|
const Tree2 = /* @__PURE__ */ vue.defineComponent({
|
|
31368
|
-
name: COMPONENT_NAME$
|
|
32107
|
+
name: COMPONENT_NAME$5,
|
|
31369
32108
|
props: props$2,
|
|
31370
32109
|
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"],
|
|
31371
32110
|
setup(props2, {
|
|
@@ -31424,10 +32163,10 @@
|
|
|
31424
32163
|
const node = store.getNode(data);
|
|
31425
32164
|
if (!node) return [];
|
|
31426
32165
|
const path = [node.states.data];
|
|
31427
|
-
let
|
|
31428
|
-
while (
|
|
31429
|
-
path.push(
|
|
31430
|
-
|
|
32166
|
+
let parent2 = node.parentNode;
|
|
32167
|
+
while (parent2 && parent2 !== root) {
|
|
32168
|
+
path.push(parent2.states.data);
|
|
32169
|
+
parent2 = parent2.parentNode;
|
|
31431
32170
|
}
|
|
31432
32171
|
return path.reverse();
|
|
31433
32172
|
};
|
|
@@ -31559,6 +32298,217 @@
|
|
|
31559
32298
|
};
|
|
31560
32299
|
}
|
|
31561
32300
|
});
|
|
32301
|
+
const COMPONENT_NAME$4 = "vc-tree-select-content";
|
|
32302
|
+
const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
|
|
32303
|
+
name: COMPONENT_NAME$4,
|
|
32304
|
+
props: {
|
|
32305
|
+
value: {
|
|
32306
|
+
type: Array,
|
|
32307
|
+
required: true
|
|
32308
|
+
},
|
|
32309
|
+
data: {
|
|
32310
|
+
type: Array,
|
|
32311
|
+
default: () => []
|
|
32312
|
+
},
|
|
32313
|
+
checkStrictly: {
|
|
32314
|
+
type: Boolean,
|
|
32315
|
+
default: false
|
|
32316
|
+
},
|
|
32317
|
+
renderNodeLabel: Function
|
|
32318
|
+
},
|
|
32319
|
+
emits: ["change"],
|
|
32320
|
+
setup(props2, {
|
|
32321
|
+
emit
|
|
32322
|
+
}) {
|
|
32323
|
+
return () => {
|
|
32324
|
+
return vue.createVNode(Scroller, {
|
|
32325
|
+
"class": "vc-tree-select__options",
|
|
32326
|
+
"max-height": "200px"
|
|
32327
|
+
}, {
|
|
32328
|
+
default: () => [vue.createVNode(Tree2, {
|
|
32329
|
+
"model-value": props2.value,
|
|
32330
|
+
"expanded-values": props2.value,
|
|
32331
|
+
"data": props2.data,
|
|
32332
|
+
"checkStrictly": props2.checkStrictly,
|
|
32333
|
+
"allowDispatch": false,
|
|
32334
|
+
"showCheckbox": true,
|
|
32335
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
32336
|
+
"onChange": (_, data) => emit("change", _, data)
|
|
32337
|
+
}, null)]
|
|
32338
|
+
});
|
|
32339
|
+
};
|
|
32340
|
+
}
|
|
32341
|
+
});
|
|
32342
|
+
const COMPONENT_NAME$3 = "vc-tree-select-content-cascader";
|
|
32343
|
+
const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
|
|
32344
|
+
name: COMPONENT_NAME$3,
|
|
32345
|
+
props: {
|
|
32346
|
+
value: {
|
|
32347
|
+
type: Array,
|
|
32348
|
+
required: true
|
|
32349
|
+
},
|
|
32350
|
+
data: {
|
|
32351
|
+
type: Array,
|
|
32352
|
+
default: () => []
|
|
32353
|
+
},
|
|
32354
|
+
checkStrictly: {
|
|
32355
|
+
type: Boolean,
|
|
32356
|
+
default: false
|
|
32357
|
+
},
|
|
32358
|
+
renderNodeLabel: Function,
|
|
32359
|
+
numerable: {
|
|
32360
|
+
type: Boolean,
|
|
32361
|
+
default: false
|
|
32362
|
+
},
|
|
32363
|
+
separator: {
|
|
32364
|
+
type: String,
|
|
32365
|
+
default: ","
|
|
32366
|
+
},
|
|
32367
|
+
max: {
|
|
32368
|
+
type: Number,
|
|
32369
|
+
default: 1
|
|
32370
|
+
},
|
|
32371
|
+
nullValue: {
|
|
32372
|
+
type: [Number, String, Object],
|
|
32373
|
+
default: void 0
|
|
32374
|
+
}
|
|
32375
|
+
},
|
|
32376
|
+
emits: ["change"],
|
|
32377
|
+
setup(props2, {
|
|
32378
|
+
emit
|
|
32379
|
+
}) {
|
|
32380
|
+
const treeRef = vue.ref(null);
|
|
32381
|
+
const currentValue = vue.ref([]);
|
|
32382
|
+
const rebuildData = vue.computed(() => {
|
|
32383
|
+
if (!props2.data.length) return [];
|
|
32384
|
+
let temp = props2.data;
|
|
32385
|
+
const data = [];
|
|
32386
|
+
currentValue.value.forEach((cur) => {
|
|
32387
|
+
const col = temp;
|
|
32388
|
+
data.push(col);
|
|
32389
|
+
const next = (temp.find((i) => i.value == cur) || {}).children || [];
|
|
32390
|
+
temp = next;
|
|
32391
|
+
});
|
|
32392
|
+
data.push(temp);
|
|
32393
|
+
return data;
|
|
32394
|
+
});
|
|
32395
|
+
const panelTick = vue.ref(0);
|
|
32396
|
+
const columns = vue.computed(() => Array.from({
|
|
32397
|
+
length: currentValue.value.length + 1
|
|
32398
|
+
}).map((_, index) => index));
|
|
32399
|
+
const handleHover = (value, columnIndex) => {
|
|
32400
|
+
const len = currentValue.value.length - columnIndex;
|
|
32401
|
+
currentValue.value.splice(columnIndex, len, value);
|
|
32402
|
+
};
|
|
32403
|
+
const sync = async () => {
|
|
32404
|
+
await vue.nextTick();
|
|
32405
|
+
const tree = treeRef.value;
|
|
32406
|
+
if (!tree) return;
|
|
32407
|
+
const data = {
|
|
32408
|
+
checkedNodes: tree.getCheckedNodes(),
|
|
32409
|
+
checkedValues: tree.getCheckedValues(),
|
|
32410
|
+
halfCheckedNodes: tree.getHalfCheckedNodes(),
|
|
32411
|
+
halfCheckedValues: tree.getHalfCheckedValues()
|
|
32412
|
+
};
|
|
32413
|
+
panelTick.value++;
|
|
32414
|
+
emit("change", null, data);
|
|
32415
|
+
};
|
|
32416
|
+
const getNodeState = (item) => {
|
|
32417
|
+
const tree = treeRef.value;
|
|
32418
|
+
if (!tree) {
|
|
32419
|
+
return {
|
|
32420
|
+
checked: false,
|
|
32421
|
+
indeterminate: false
|
|
32422
|
+
};
|
|
32423
|
+
}
|
|
32424
|
+
const node = tree.getNode(item);
|
|
32425
|
+
if (!node) {
|
|
32426
|
+
return {
|
|
32427
|
+
checked: false,
|
|
32428
|
+
indeterminate: false
|
|
32429
|
+
};
|
|
32430
|
+
}
|
|
32431
|
+
return {
|
|
32432
|
+
checked: !!node.states.checked,
|
|
32433
|
+
indeterminate: !!node.states.indeterminate
|
|
32434
|
+
};
|
|
32435
|
+
};
|
|
32436
|
+
const hasChildren = (item) => {
|
|
32437
|
+
return !!(item.children && item.children.length > 0);
|
|
32438
|
+
};
|
|
32439
|
+
const handleCheckboxChange = async (v, item) => {
|
|
32440
|
+
const tree = treeRef.value;
|
|
32441
|
+
if (!tree) return;
|
|
32442
|
+
tree.setChecked(item, v, !props2.checkStrictly);
|
|
32443
|
+
sync();
|
|
32444
|
+
};
|
|
32445
|
+
const handleLabelClick = (v, item) => {
|
|
32446
|
+
const tree = treeRef.value;
|
|
32447
|
+
if (!tree) return;
|
|
32448
|
+
tree.setChecked(item, v, !props2.checkStrictly);
|
|
32449
|
+
sync();
|
|
32450
|
+
};
|
|
32451
|
+
return () => {
|
|
32452
|
+
return vue.createVNode("div", {
|
|
32453
|
+
"class": "vc-tree-select__cascader"
|
|
32454
|
+
}, [vue.createVNode(Tree2, {
|
|
32455
|
+
"ref": treeRef,
|
|
32456
|
+
"class": "vc-tree-select__cascader-tree-hidden",
|
|
32457
|
+
"model-value": props2.value,
|
|
32458
|
+
"expanded-values": props2.value,
|
|
32459
|
+
"data": props2.data,
|
|
32460
|
+
"checkStrictly": props2.checkStrictly,
|
|
32461
|
+
"allowDispatch": false,
|
|
32462
|
+
"showCheckbox": true,
|
|
32463
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
32464
|
+
"numerable": props2.numerable,
|
|
32465
|
+
"separator": props2.separator,
|
|
32466
|
+
"max": props2.max,
|
|
32467
|
+
"nullValue": props2.nullValue
|
|
32468
|
+
}, null), vue.createVNode("div", {
|
|
32469
|
+
"class": "vc-tree-select__cascader-columns"
|
|
32470
|
+
}, [columns.value.map((columnIndex) => {
|
|
32471
|
+
const col = rebuildData.value[columnIndex];
|
|
32472
|
+
if (!col || !col.length) return null;
|
|
32473
|
+
return vue.createVNode("div", {
|
|
32474
|
+
"class": "vc-tree-select__cascader-column",
|
|
32475
|
+
"key": columnIndex
|
|
32476
|
+
}, [vue.createVNode("div", {
|
|
32477
|
+
"class": "vc-tree-select__cascader-column-wrapper"
|
|
32478
|
+
}, [col.map((item) => {
|
|
32479
|
+
const state = getNodeState(item);
|
|
32480
|
+
const isSelect = currentValue.value[columnIndex] === item.value;
|
|
32481
|
+
const child = hasChildren(item);
|
|
32482
|
+
return vue.createVNode("div", {
|
|
32483
|
+
"key": item.value,
|
|
32484
|
+
"class": ["vc-tree-select__cascader-item", {
|
|
32485
|
+
"is-select": isSelect
|
|
32486
|
+
}],
|
|
32487
|
+
"onMouseenter": () => handleHover(item.value, columnIndex),
|
|
32488
|
+
"onClick": () => handleLabelClick(!state.checked, item)
|
|
32489
|
+
}, [vue.createVNode("span", {
|
|
32490
|
+
"class": "vc-tree-select__cascader-checkbox",
|
|
32491
|
+
"onClick": (e) => e.stopPropagation()
|
|
32492
|
+
}, [vue.createVNode(Checkbox, {
|
|
32493
|
+
"modelValue": state.checked,
|
|
32494
|
+
"indeterminate": state.indeterminate,
|
|
32495
|
+
"disabled": !!item.disabled,
|
|
32496
|
+
"onChange": (v) => handleCheckboxChange(v, item)
|
|
32497
|
+
}, null)]), vue.createVNode("span", {
|
|
32498
|
+
"class": "vc-tree-select__cascader-label"
|
|
32499
|
+
}, [props2.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
|
|
32500
|
+
"render": props2.renderNodeLabel,
|
|
32501
|
+
"store": treeRef.value.getNode(item),
|
|
32502
|
+
"row": item
|
|
32503
|
+
}, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
|
|
32504
|
+
"type": "right",
|
|
32505
|
+
"class": "vc-tree-select__cascader-icon"
|
|
32506
|
+
}, null) : null]);
|
|
32507
|
+
})])]);
|
|
32508
|
+
})])]);
|
|
32509
|
+
};
|
|
32510
|
+
}
|
|
32511
|
+
});
|
|
31562
32512
|
const treeKeys = [
|
|
31563
32513
|
"checkStrictly",
|
|
31564
32514
|
"data",
|
|
@@ -31567,7 +32517,18 @@
|
|
|
31567
32517
|
];
|
|
31568
32518
|
const props$1 = {
|
|
31569
32519
|
...props$1a,
|
|
31570
|
-
...pick(props$2, treeKeys)
|
|
32520
|
+
...pick(props$2, treeKeys),
|
|
32521
|
+
autoWidth: {
|
|
32522
|
+
type: Boolean,
|
|
32523
|
+
default: void 0
|
|
32524
|
+
},
|
|
32525
|
+
/**
|
|
32526
|
+
* 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
|
|
32527
|
+
*/
|
|
32528
|
+
cascader: {
|
|
32529
|
+
type: Boolean,
|
|
32530
|
+
default: false
|
|
32531
|
+
}
|
|
31571
32532
|
};
|
|
31572
32533
|
const COMPONENT_NAME$2 = "vc-tree-select";
|
|
31573
32534
|
const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -31590,12 +32551,37 @@
|
|
|
31590
32551
|
const searchValue = vue.ref("");
|
|
31591
32552
|
const searchRegex = vue.ref(new RegExp(""));
|
|
31592
32553
|
const currentValue = vue.ref([]);
|
|
32554
|
+
const currentValueGroups = vue.computed(() => {
|
|
32555
|
+
if (props2.checkStrictly) return;
|
|
32556
|
+
if (!props2.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
|
|
32557
|
+
return [];
|
|
32558
|
+
}
|
|
32559
|
+
const pathMap = /* @__PURE__ */ new Map();
|
|
32560
|
+
const traverse = (data, path = []) => {
|
|
32561
|
+
data.forEach((item) => {
|
|
32562
|
+
const v = item.value;
|
|
32563
|
+
if (v == null) return;
|
|
32564
|
+
const fullPath = [...path, v];
|
|
32565
|
+
pathMap.set(v, fullPath);
|
|
32566
|
+
if (item.children?.length) traverse(item.children, fullPath);
|
|
32567
|
+
});
|
|
32568
|
+
};
|
|
32569
|
+
traverse(props2.data);
|
|
32570
|
+
const allPaths = currentValue.value.map((v) => pathMap.get(v)).filter(Boolean);
|
|
32571
|
+
return allPaths.filter((path) => !allPaths.some((other) => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
|
|
32572
|
+
});
|
|
31593
32573
|
const source = vue.computed(() => {
|
|
31594
32574
|
return flattenData$1(props2.data, {
|
|
31595
32575
|
parent: true,
|
|
31596
32576
|
cascader: true
|
|
31597
32577
|
});
|
|
31598
32578
|
});
|
|
32579
|
+
const labelMap = vue.computed(() => {
|
|
32580
|
+
return source.value.reduce((pre, cur) => {
|
|
32581
|
+
pre[cur.value] = cur.label || "";
|
|
32582
|
+
return pre;
|
|
32583
|
+
}, {});
|
|
32584
|
+
});
|
|
31599
32585
|
const icon = vue.computed(() => {
|
|
31600
32586
|
return isActive.value ? "up" : "down";
|
|
31601
32587
|
});
|
|
@@ -31612,17 +32598,34 @@
|
|
|
31612
32598
|
"is-disabled": props2.disabled
|
|
31613
32599
|
};
|
|
31614
32600
|
});
|
|
31615
|
-
const
|
|
32601
|
+
const displayTags = vue.computed(() => {
|
|
31616
32602
|
if (!props2.data.length) {
|
|
31617
32603
|
return [];
|
|
31618
32604
|
}
|
|
31619
|
-
|
|
32605
|
+
if (props2.checkStrictly) {
|
|
32606
|
+
return currentValue.value.map((v) => ({
|
|
32607
|
+
value: v,
|
|
32608
|
+
label: labelMap.value[v] || ""
|
|
32609
|
+
}));
|
|
32610
|
+
}
|
|
32611
|
+
return (currentValueGroups.value || []).map((path) => {
|
|
32612
|
+
const value = path[path.length - 1];
|
|
32613
|
+
const label = path.map((v) => labelMap.value[v] || "").filter(Boolean).join(" / ");
|
|
32614
|
+
return {
|
|
32615
|
+
path,
|
|
32616
|
+
value,
|
|
32617
|
+
label
|
|
32618
|
+
};
|
|
32619
|
+
});
|
|
31620
32620
|
});
|
|
31621
32621
|
const collapseTagCount = vue.computed(() => {
|
|
31622
32622
|
if (!props2.maxTags) return 0;
|
|
31623
|
-
const v =
|
|
32623
|
+
const v = displayTags.value.length - props2.maxTags;
|
|
31624
32624
|
return v < 0 ? 0 : v;
|
|
31625
32625
|
});
|
|
32626
|
+
const autoWidth = vue.computed(() => {
|
|
32627
|
+
return typeof props2.autoWidth === "boolean" ? props2.autoWidth : !!props2.cascader;
|
|
32628
|
+
});
|
|
31626
32629
|
const sync = () => {
|
|
31627
32630
|
const v = toModelValue(currentValue.value, {
|
|
31628
32631
|
modelValue: props2.modelValue,
|
|
@@ -31631,8 +32634,9 @@
|
|
|
31631
32634
|
separator: props2.separator,
|
|
31632
32635
|
nullValue: props2.nullValue
|
|
31633
32636
|
});
|
|
31634
|
-
|
|
31635
|
-
emit("
|
|
32637
|
+
const labels = displayTags.value.map((item) => item.label);
|
|
32638
|
+
emit("update:modelValue", v, labels);
|
|
32639
|
+
emit("change", v, labels);
|
|
31636
32640
|
formItem?.change?.(currentValue.value);
|
|
31637
32641
|
};
|
|
31638
32642
|
const _loadData = debounce(function() {
|
|
@@ -31651,8 +32655,15 @@
|
|
|
31651
32655
|
const close = () => {
|
|
31652
32656
|
isActive.value = false;
|
|
31653
32657
|
};
|
|
31654
|
-
const handleClose = (
|
|
31655
|
-
|
|
32658
|
+
const handleClose = (item) => {
|
|
32659
|
+
if (props2.checkStrictly) {
|
|
32660
|
+
const index = currentValue.value.findIndex((v) => v === item.value);
|
|
32661
|
+
if (index === -1) return;
|
|
32662
|
+
currentValue.value = currentValue.value.filter((_, i) => i !== index);
|
|
32663
|
+
} else if (item.path) {
|
|
32664
|
+
const remaining = (currentValueGroups.value || []).filter((p) => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
|
|
32665
|
+
currentValue.value = [...new Set(remaining.flat())];
|
|
32666
|
+
}
|
|
31656
32667
|
sync();
|
|
31657
32668
|
};
|
|
31658
32669
|
const handleClear = (e) => {
|
|
@@ -31689,6 +32700,7 @@
|
|
|
31689
32700
|
multiple,
|
|
31690
32701
|
isActive,
|
|
31691
32702
|
current: currentValue,
|
|
32703
|
+
currentValueGroups,
|
|
31692
32704
|
// for portal
|
|
31693
32705
|
toggle(v) {
|
|
31694
32706
|
v = typeof v === "boolean" ? v : !isActive.value;
|
|
@@ -31703,7 +32715,7 @@
|
|
|
31703
32715
|
"trigger": props2.trigger,
|
|
31704
32716
|
"tag": props2.tag,
|
|
31705
32717
|
"placement": props2.placement,
|
|
31706
|
-
"
|
|
32718
|
+
"autoWidth": autoWidth.value,
|
|
31707
32719
|
"disabled": props2.disabled,
|
|
31708
32720
|
"portalClass": [["is-padding-none", props2.portalClass]],
|
|
31709
32721
|
"class": [classes.value, its.value.class, "vc-tree-select"],
|
|
@@ -31720,22 +32732,22 @@
|
|
|
31720
32732
|
return vue.createVNode(Input$1, {
|
|
31721
32733
|
"id": props2.id,
|
|
31722
32734
|
"disabled": props2.disabled,
|
|
31723
|
-
"modelValue":
|
|
32735
|
+
"modelValue": displayTags.value[0]?.label || props2.extra,
|
|
31724
32736
|
"allow-dispatch": false,
|
|
31725
32737
|
"class": "vc-tree-select__input",
|
|
31726
32738
|
"readonly": true,
|
|
31727
32739
|
"placeholder": its.value.attrs?.placeholder || "请选择"
|
|
31728
32740
|
}, {
|
|
31729
|
-
content: multiple.value &&
|
|
32741
|
+
content: multiple.value && displayTags.value.length > 0 ? () => {
|
|
31730
32742
|
return vue.createVNode("div", {
|
|
31731
32743
|
"class": [classes.value, "vc-tree-select__tags"]
|
|
31732
|
-
}, [
|
|
32744
|
+
}, [displayTags.value.slice(0, props2.maxTags).map((item) => {
|
|
31733
32745
|
return vue.createVNode(Tag, {
|
|
31734
|
-
"key": item,
|
|
32746
|
+
"key": item.path ? item.path.join("-") : item.value,
|
|
31735
32747
|
"closable": !props2.disabled,
|
|
31736
|
-
"onClose": () => handleClose(
|
|
32748
|
+
"onClose": () => handleClose(item)
|
|
31737
32749
|
}, {
|
|
31738
|
-
default: () => [
|
|
32750
|
+
default: () => [item.label]
|
|
31739
32751
|
});
|
|
31740
32752
|
}), collapseTagCount.value ? vue.createVNode(Tag, null, {
|
|
31741
32753
|
default: () => [`+${collapseTagCount.value}...`]
|
|
@@ -31768,16 +32780,23 @@
|
|
|
31768
32780
|
}, [vue.createVNode(Spin, {
|
|
31769
32781
|
"size": 16
|
|
31770
32782
|
}, null)]), vue.createVNode(Scroller, {
|
|
31771
|
-
"class": "vc-tree-select__options",
|
|
32783
|
+
"class": ["vc-tree-select__options", props2.cascader && "is-cascader"],
|
|
31772
32784
|
"max-height": "200px"
|
|
31773
32785
|
}, {
|
|
31774
|
-
default: () => [vue.createVNode(
|
|
31775
|
-
"
|
|
31776
|
-
"
|
|
32786
|
+
default: () => [props2.cascader ? vue.createVNode(TreeSelectContentCascader, {
|
|
32787
|
+
"value": currentValue.value,
|
|
32788
|
+
"data": props2.data,
|
|
32789
|
+
"checkStrictly": props2.checkStrictly,
|
|
32790
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
32791
|
+
"numerable": props2.numerable,
|
|
32792
|
+
"separator": props2.separator,
|
|
32793
|
+
"max": props2.max,
|
|
32794
|
+
"nullValue": props2.nullValue,
|
|
32795
|
+
"onChange": handleChange
|
|
32796
|
+
}, null) : vue.createVNode(TreeSelectContent, {
|
|
32797
|
+
"value": currentValue.value,
|
|
31777
32798
|
"data": props2.data,
|
|
31778
32799
|
"checkStrictly": props2.checkStrictly,
|
|
31779
|
-
"allowDispatch": false,
|
|
31780
|
-
"showCheckbox": true,
|
|
31781
32800
|
"renderNodeLabel": props2.renderNodeLabel,
|
|
31782
32801
|
"onChange": handleChange
|
|
31783
32802
|
}, null)]
|
|
@@ -32346,8 +33365,8 @@
|
|
|
32346
33365
|
MCard,
|
|
32347
33366
|
Carousel,
|
|
32348
33367
|
MCarousel,
|
|
32349
|
-
|
|
32350
|
-
|
|
33368
|
+
CarouselItem,
|
|
33369
|
+
MCarouselItem,
|
|
32351
33370
|
Cascader,
|
|
32352
33371
|
MCascader,
|
|
32353
33372
|
// MCascaderView,
|
|
@@ -138699,6 +139718,7 @@ ${r}
|
|
|
138699
139718
|
exports.Calendar = Calendar$1;
|
|
138700
139719
|
exports.Card = Card;
|
|
138701
139720
|
exports.Carousel = Carousel;
|
|
139721
|
+
exports.CarouselItem = CarouselItem;
|
|
138702
139722
|
exports.Cascader = Cascader;
|
|
138703
139723
|
exports.Chart = Chart;
|
|
138704
139724
|
exports.Checkbox = Checkbox;
|
|
@@ -138745,6 +139765,7 @@ ${r}
|
|
|
138745
139765
|
exports.MCalendar = MCalendar;
|
|
138746
139766
|
exports.MCard = MCard;
|
|
138747
139767
|
exports.MCarousel = MCarousel;
|
|
139768
|
+
exports.MCarouselItem = MCarouselItem;
|
|
138748
139769
|
exports.MCascader = MCascader;
|
|
138749
139770
|
exports.MChart = MChart;
|
|
138750
139771
|
exports.MCheckbox = MCheckbox;
|