@deot/vc 1.0.62 → 1.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +389 -106
- package/dist/index.iife.js +1414 -406
- package/dist/index.js +3 -3
- package/dist/index.umd.cjs +1414 -406
- package/package.json +4 -4
package/dist/index.iife.js
CHANGED
|
@@ -9138,16 +9138,16 @@ var Vc = (function (exports, vue) {
|
|
|
9138
9138
|
}
|
|
9139
9139
|
}
|
|
9140
9140
|
const VcInstance = new Instance();
|
|
9141
|
-
const props$
|
|
9141
|
+
const props$1v = {
|
|
9142
9142
|
tag: {
|
|
9143
9143
|
type: String,
|
|
9144
9144
|
default: "div"
|
|
9145
9145
|
}
|
|
9146
9146
|
};
|
|
9147
|
-
const COMPONENT_NAME$
|
|
9147
|
+
const COMPONENT_NAME$2g = "vc-action-sheet";
|
|
9148
9148
|
const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
9149
|
-
name: COMPONENT_NAME$
|
|
9150
|
-
props: props$
|
|
9149
|
+
name: COMPONENT_NAME$2g,
|
|
9150
|
+
props: props$1v,
|
|
9151
9151
|
setup(props2, {
|
|
9152
9152
|
slots
|
|
9153
9153
|
}) {
|
|
@@ -9159,7 +9159,7 @@ var Vc = (function (exports, vue) {
|
|
|
9159
9159
|
}
|
|
9160
9160
|
});
|
|
9161
9161
|
const MActionSheet = ActionSheet;
|
|
9162
|
-
const props$
|
|
9162
|
+
const props$1u = {
|
|
9163
9163
|
modelValue: {
|
|
9164
9164
|
type: Boolean,
|
|
9165
9165
|
default: false
|
|
@@ -9217,11 +9217,11 @@ var Vc = (function (exports, vue) {
|
|
|
9217
9217
|
const isWheel = (el2) => {
|
|
9218
9218
|
return SCROLLER_WHEEL_REG.test(el2?.className || "");
|
|
9219
9219
|
};
|
|
9220
|
-
const COMPONENT_NAME$
|
|
9220
|
+
const COMPONENT_NAME$2f = "vc-affix";
|
|
9221
9221
|
const Affix = /* @__PURE__ */ vue.defineComponent({
|
|
9222
|
-
name: COMPONENT_NAME$
|
|
9222
|
+
name: COMPONENT_NAME$2f,
|
|
9223
9223
|
emits: ["update:modelValue"],
|
|
9224
|
-
props: props$
|
|
9224
|
+
props: props$1u,
|
|
9225
9225
|
setup(props2, {
|
|
9226
9226
|
slots,
|
|
9227
9227
|
expose,
|
|
@@ -9381,7 +9381,7 @@ var Vc = (function (exports, vue) {
|
|
|
9381
9381
|
}
|
|
9382
9382
|
});
|
|
9383
9383
|
const MAffix = Affix;
|
|
9384
|
-
const props$
|
|
9384
|
+
const props$1t = {
|
|
9385
9385
|
modelValue: {
|
|
9386
9386
|
type: Boolean,
|
|
9387
9387
|
default: true
|
|
@@ -9407,7 +9407,7 @@ var Vc = (function (exports, vue) {
|
|
|
9407
9407
|
default: false
|
|
9408
9408
|
}
|
|
9409
9409
|
};
|
|
9410
|
-
const props$
|
|
9410
|
+
const props$1s = {
|
|
9411
9411
|
type: String,
|
|
9412
9412
|
inherit: {
|
|
9413
9413
|
type: Boolean,
|
|
@@ -9540,10 +9540,10 @@ var Vc = (function (exports, vue) {
|
|
|
9540
9540
|
}
|
|
9541
9541
|
}
|
|
9542
9542
|
const IconManager = new Manager();
|
|
9543
|
-
const COMPONENT_NAME$
|
|
9543
|
+
const COMPONENT_NAME$2e = "vc-icon";
|
|
9544
9544
|
const Icon = /* @__PURE__ */ vue.defineComponent({
|
|
9545
|
-
name: COMPONENT_NAME$
|
|
9546
|
-
props: props$
|
|
9545
|
+
name: COMPONENT_NAME$2e,
|
|
9546
|
+
props: props$1s,
|
|
9547
9547
|
setup(props2) {
|
|
9548
9548
|
const viewBox = vue.ref("0 0 1024 1024");
|
|
9549
9549
|
const path = vue.ref([]);
|
|
@@ -9575,7 +9575,7 @@ var Vc = (function (exports, vue) {
|
|
|
9575
9575
|
};
|
|
9576
9576
|
}
|
|
9577
9577
|
});
|
|
9578
|
-
const props$
|
|
9578
|
+
const props$1r = {
|
|
9579
9579
|
/**
|
|
9580
9580
|
* 进入/离开持续时间
|
|
9581
9581
|
* {enter: 300, leave: 300}
|
|
@@ -9738,10 +9738,10 @@ var Vc = (function (exports, vue) {
|
|
|
9738
9738
|
}
|
|
9739
9739
|
};
|
|
9740
9740
|
};
|
|
9741
|
-
const COMPONENT_NAME$
|
|
9741
|
+
const COMPONENT_NAME$2d = "vc-transition";
|
|
9742
9742
|
const Transition = vue.defineComponent({
|
|
9743
|
-
name: COMPONENT_NAME$
|
|
9744
|
-
props: props$
|
|
9743
|
+
name: COMPONENT_NAME$2d,
|
|
9744
|
+
props: props$1r,
|
|
9745
9745
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
9746
9746
|
inheritAttrs: false,
|
|
9747
9747
|
setup(props2, { slots, attrs }) {
|
|
@@ -9760,10 +9760,10 @@ var Vc = (function (exports, vue) {
|
|
|
9760
9760
|
};
|
|
9761
9761
|
}
|
|
9762
9762
|
});
|
|
9763
|
-
const COMPONENT_NAME$
|
|
9763
|
+
const COMPONENT_NAME$2c = "vc-transition-collapse";
|
|
9764
9764
|
const TransitionCollapse = vue.defineComponent({
|
|
9765
|
-
name: COMPONENT_NAME$
|
|
9766
|
-
props: props$
|
|
9765
|
+
name: COMPONENT_NAME$2c,
|
|
9766
|
+
props: props$1r,
|
|
9767
9767
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
9768
9768
|
inheritAttrs: false,
|
|
9769
9769
|
setup(props2, { slots, attrs: _attrs }) {
|
|
@@ -9876,11 +9876,11 @@ var Vc = (function (exports, vue) {
|
|
|
9876
9876
|
};
|
|
9877
9877
|
}
|
|
9878
9878
|
});
|
|
9879
|
-
const COMPONENT_NAME$
|
|
9879
|
+
const COMPONENT_NAME$2b = "vc-transition-fade";
|
|
9880
9880
|
const TransitionFade = vue.defineComponent({
|
|
9881
|
-
name: COMPONENT_NAME$
|
|
9881
|
+
name: COMPONENT_NAME$2b,
|
|
9882
9882
|
props: {
|
|
9883
|
-
...props$
|
|
9883
|
+
...props$1r,
|
|
9884
9884
|
// inheritAttrs必须是false
|
|
9885
9885
|
style: {
|
|
9886
9886
|
type: Object,
|
|
@@ -9912,11 +9912,11 @@ var Vc = (function (exports, vue) {
|
|
|
9912
9912
|
};
|
|
9913
9913
|
}
|
|
9914
9914
|
});
|
|
9915
|
-
const COMPONENT_NAME$
|
|
9915
|
+
const COMPONENT_NAME$2a = "vc-transition-scale";
|
|
9916
9916
|
const TransitionScale = vue.defineComponent({
|
|
9917
|
-
name: COMPONENT_NAME$
|
|
9917
|
+
name: COMPONENT_NAME$2a,
|
|
9918
9918
|
props: {
|
|
9919
|
-
...props$
|
|
9919
|
+
...props$1r,
|
|
9920
9920
|
mode: {
|
|
9921
9921
|
type: String,
|
|
9922
9922
|
default: "both",
|
|
@@ -9953,11 +9953,11 @@ var Vc = (function (exports, vue) {
|
|
|
9953
9953
|
};
|
|
9954
9954
|
}
|
|
9955
9955
|
});
|
|
9956
|
-
const COMPONENT_NAME$
|
|
9956
|
+
const COMPONENT_NAME$29 = "vc-transition-slide";
|
|
9957
9957
|
const TransitionSlide = vue.defineComponent({
|
|
9958
|
-
name: COMPONENT_NAME$
|
|
9958
|
+
name: COMPONENT_NAME$29,
|
|
9959
9959
|
props: {
|
|
9960
|
-
...props$
|
|
9960
|
+
...props$1r,
|
|
9961
9961
|
mode: {
|
|
9962
9962
|
type: String,
|
|
9963
9963
|
default: "left",
|
|
@@ -9994,11 +9994,11 @@ var Vc = (function (exports, vue) {
|
|
|
9994
9994
|
};
|
|
9995
9995
|
}
|
|
9996
9996
|
});
|
|
9997
|
-
const COMPONENT_NAME$
|
|
9997
|
+
const COMPONENT_NAME$28 = "vc-transition-zoom";
|
|
9998
9998
|
const TransitionZoom = vue.defineComponent({
|
|
9999
|
-
name: COMPONENT_NAME$
|
|
9999
|
+
name: COMPONENT_NAME$28,
|
|
10000
10000
|
props: {
|
|
10001
|
-
...props$
|
|
10001
|
+
...props$1r,
|
|
10002
10002
|
mode: {
|
|
10003
10003
|
type: String,
|
|
10004
10004
|
default: "x",
|
|
@@ -10035,7 +10035,7 @@ var Vc = (function (exports, vue) {
|
|
|
10035
10035
|
};
|
|
10036
10036
|
}
|
|
10037
10037
|
});
|
|
10038
|
-
const COMPONENT_NAME$
|
|
10038
|
+
const COMPONENT_NAME$27 = "vc-alert";
|
|
10039
10039
|
const THEME_MAP = {
|
|
10040
10040
|
info: ["#456CF6", "#91d5ff", "#e6f7ff"],
|
|
10041
10041
|
success: ["#52c41a", "#b7eb8f", "#f6ffed"],
|
|
@@ -10043,8 +10043,8 @@ var Vc = (function (exports, vue) {
|
|
|
10043
10043
|
warning: ["#ffbf00", "#ffe58f", "#fffbe6"]
|
|
10044
10044
|
};
|
|
10045
10045
|
const Alert = /* @__PURE__ */ vue.defineComponent({
|
|
10046
|
-
name: COMPONENT_NAME$
|
|
10047
|
-
props: props$
|
|
10046
|
+
name: COMPONENT_NAME$27,
|
|
10047
|
+
props: props$1t,
|
|
10048
10048
|
setup(props2, {
|
|
10049
10049
|
slots,
|
|
10050
10050
|
emit
|
|
@@ -10130,7 +10130,7 @@ var Vc = (function (exports, vue) {
|
|
|
10130
10130
|
}
|
|
10131
10131
|
});
|
|
10132
10132
|
const MAlert = Alert;
|
|
10133
|
-
const props$
|
|
10133
|
+
const props$1q = {
|
|
10134
10134
|
// canvas配置参数
|
|
10135
10135
|
options: Object,
|
|
10136
10136
|
width: {
|
|
@@ -10143,10 +10143,10 @@ var Vc = (function (exports, vue) {
|
|
|
10143
10143
|
}
|
|
10144
10144
|
};
|
|
10145
10145
|
const isTouch = typeof document !== "undefined" && "ontouchend" in document;
|
|
10146
|
-
const COMPONENT_NAME$
|
|
10146
|
+
const COMPONENT_NAME$26 = "vc-artboard";
|
|
10147
10147
|
const Artboard = /* @__PURE__ */ vue.defineComponent({
|
|
10148
|
-
name: COMPONENT_NAME$
|
|
10149
|
-
props: props$
|
|
10148
|
+
name: COMPONENT_NAME$26,
|
|
10149
|
+
props: props$1q,
|
|
10150
10150
|
setup(props2, {
|
|
10151
10151
|
emit,
|
|
10152
10152
|
expose
|
|
@@ -10321,7 +10321,7 @@ var Vc = (function (exports, vue) {
|
|
|
10321
10321
|
}
|
|
10322
10322
|
});
|
|
10323
10323
|
const MArtboard = Artboard;
|
|
10324
|
-
const props$
|
|
10324
|
+
const props$1p = {
|
|
10325
10325
|
size: {
|
|
10326
10326
|
type: Number,
|
|
10327
10327
|
default: 28
|
|
@@ -10342,10 +10342,10 @@ var Vc = (function (exports, vue) {
|
|
|
10342
10342
|
default: false
|
|
10343
10343
|
}
|
|
10344
10344
|
};
|
|
10345
|
-
const COMPONENT_NAME$
|
|
10345
|
+
const COMPONENT_NAME$25 = "vc-spin";
|
|
10346
10346
|
const Spin = /* @__PURE__ */ vue.defineComponent({
|
|
10347
|
-
name: COMPONENT_NAME$
|
|
10348
|
-
props: props$
|
|
10347
|
+
name: COMPONENT_NAME$25,
|
|
10348
|
+
props: props$1p,
|
|
10349
10349
|
setup(props2, {
|
|
10350
10350
|
slots
|
|
10351
10351
|
}) {
|
|
@@ -10378,7 +10378,7 @@ var Vc = (function (exports, vue) {
|
|
|
10378
10378
|
};
|
|
10379
10379
|
}
|
|
10380
10380
|
});
|
|
10381
|
-
const props$
|
|
10381
|
+
const props$1o = {
|
|
10382
10382
|
wait: {
|
|
10383
10383
|
type: Number,
|
|
10384
10384
|
default: 250
|
|
@@ -10393,10 +10393,10 @@ var Vc = (function (exports, vue) {
|
|
|
10393
10393
|
},
|
|
10394
10394
|
exclude: RegExp
|
|
10395
10395
|
};
|
|
10396
|
-
const COMPONENT_NAME$
|
|
10396
|
+
const COMPONENT_NAME$24 = "vc-debounce";
|
|
10397
10397
|
const Debounce = vue.defineComponent({
|
|
10398
|
-
name: COMPONENT_NAME$
|
|
10399
|
-
props: props$
|
|
10398
|
+
name: COMPONENT_NAME$24,
|
|
10399
|
+
props: props$1o,
|
|
10400
10400
|
/**
|
|
10401
10401
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
10402
10402
|
* 如事件onClick
|
|
@@ -10435,7 +10435,7 @@ var Vc = (function (exports, vue) {
|
|
|
10435
10435
|
};
|
|
10436
10436
|
}
|
|
10437
10437
|
});
|
|
10438
|
-
const props$
|
|
10438
|
+
const props$1n = {
|
|
10439
10439
|
tag: {
|
|
10440
10440
|
type: String,
|
|
10441
10441
|
default: "button"
|
|
@@ -10464,11 +10464,11 @@ var Vc = (function (exports, vue) {
|
|
|
10464
10464
|
default: "button"
|
|
10465
10465
|
}
|
|
10466
10466
|
};
|
|
10467
|
-
const COMPONENT_NAME$
|
|
10467
|
+
const COMPONENT_NAME$23 = "vc-button";
|
|
10468
10468
|
const Button = /* @__PURE__ */ vue.defineComponent({
|
|
10469
|
-
name: COMPONENT_NAME$
|
|
10469
|
+
name: COMPONENT_NAME$23,
|
|
10470
10470
|
emits: ["click"],
|
|
10471
|
-
props: props$
|
|
10471
|
+
props: props$1n,
|
|
10472
10472
|
setup(props2, {
|
|
10473
10473
|
slots
|
|
10474
10474
|
}) {
|
|
@@ -10528,7 +10528,7 @@ var Vc = (function (exports, vue) {
|
|
|
10528
10528
|
};
|
|
10529
10529
|
}
|
|
10530
10530
|
});
|
|
10531
|
-
const props$
|
|
10531
|
+
const props$1m = {
|
|
10532
10532
|
vertical: {
|
|
10533
10533
|
type: Boolean,
|
|
10534
10534
|
default: false
|
|
@@ -10546,10 +10546,10 @@ var Vc = (function (exports, vue) {
|
|
|
10546
10546
|
default: false
|
|
10547
10547
|
}
|
|
10548
10548
|
};
|
|
10549
|
-
const COMPONENT_NAME$
|
|
10549
|
+
const COMPONENT_NAME$22 = "vc-button-group";
|
|
10550
10550
|
const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
|
|
10551
|
-
name: COMPONENT_NAME$
|
|
10552
|
-
props: props$
|
|
10551
|
+
name: COMPONENT_NAME$22,
|
|
10552
|
+
props: props$1m,
|
|
10553
10553
|
setup(props2, {
|
|
10554
10554
|
slots
|
|
10555
10555
|
}) {
|
|
@@ -10571,16 +10571,16 @@ var Vc = (function (exports, vue) {
|
|
|
10571
10571
|
});
|
|
10572
10572
|
const MButton = Button;
|
|
10573
10573
|
const MButtonGroup = ButtonGroup;
|
|
10574
|
-
const props$
|
|
10574
|
+
const props$1l = {
|
|
10575
10575
|
tag: {
|
|
10576
10576
|
type: String,
|
|
10577
10577
|
default: "div"
|
|
10578
10578
|
}
|
|
10579
10579
|
};
|
|
10580
|
-
const COMPONENT_NAME$
|
|
10580
|
+
const COMPONENT_NAME$21 = "vc-calendar";
|
|
10581
10581
|
const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10582
|
-
name: COMPONENT_NAME$
|
|
10583
|
-
props: props$
|
|
10582
|
+
name: COMPONENT_NAME$21,
|
|
10583
|
+
props: props$1l,
|
|
10584
10584
|
setup(props2, {
|
|
10585
10585
|
slots
|
|
10586
10586
|
}) {
|
|
@@ -10592,7 +10592,7 @@ var Vc = (function (exports, vue) {
|
|
|
10592
10592
|
}
|
|
10593
10593
|
});
|
|
10594
10594
|
const MCalendar = Calendar$1;
|
|
10595
|
-
const props$
|
|
10595
|
+
const props$1k = {
|
|
10596
10596
|
border: {
|
|
10597
10597
|
type: Boolean,
|
|
10598
10598
|
default: true
|
|
@@ -10612,10 +10612,10 @@ var Vc = (function (exports, vue) {
|
|
|
10612
10612
|
type: String
|
|
10613
10613
|
}
|
|
10614
10614
|
};
|
|
10615
|
-
const COMPONENT_NAME$
|
|
10615
|
+
const COMPONENT_NAME$20 = "vc-card";
|
|
10616
10616
|
const Card = /* @__PURE__ */ vue.defineComponent({
|
|
10617
|
-
name: COMPONENT_NAME$
|
|
10618
|
-
props: props$
|
|
10617
|
+
name: COMPONENT_NAME$20,
|
|
10618
|
+
props: props$1k,
|
|
10619
10619
|
setup(props2, {
|
|
10620
10620
|
slots
|
|
10621
10621
|
}) {
|
|
@@ -10639,27 +10639,696 @@ var Vc = (function (exports, vue) {
|
|
|
10639
10639
|
}
|
|
10640
10640
|
});
|
|
10641
10641
|
const MCard = Card;
|
|
10642
|
-
const
|
|
10643
|
-
|
|
10642
|
+
const useCarousel = (wrapper, content, expose) => {
|
|
10643
|
+
const instance = vue.getCurrentInstance();
|
|
10644
|
+
const props2 = instance.props;
|
|
10645
|
+
const { emit } = instance;
|
|
10646
|
+
const items = vue.ref([]);
|
|
10647
|
+
const activeIndex = vue.ref(-1);
|
|
10648
|
+
const timer = vue.ref(null);
|
|
10649
|
+
const offset = vue.ref(0);
|
|
10650
|
+
const carouselId = vue.ref(getUid("carousel"));
|
|
10651
|
+
const start = vue.ref();
|
|
10652
|
+
const startX = vue.ref();
|
|
10653
|
+
const startY = vue.ref();
|
|
10654
|
+
const allowTransition = vue.ref(false);
|
|
10655
|
+
const direction = vue.computed(() => {
|
|
10656
|
+
return props2.vertical ? "vertical" : "horizontal";
|
|
10657
|
+
});
|
|
10658
|
+
const hasLabel = vue.computed(() => {
|
|
10659
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
10660
|
+
});
|
|
10661
|
+
const dotsClasses = vue.computed(() => {
|
|
10662
|
+
const classes = ["is-" + direction.value];
|
|
10663
|
+
if (hasLabel.value) {
|
|
10664
|
+
classes.push("is-labels");
|
|
10665
|
+
}
|
|
10666
|
+
if (props2.dots === "outside" || props2.card) {
|
|
10667
|
+
classes.push("is-outside");
|
|
10668
|
+
}
|
|
10669
|
+
return classes;
|
|
10670
|
+
});
|
|
10671
|
+
const resetItems = (oldIndex) => {
|
|
10672
|
+
items.value.forEach((item, index) => {
|
|
10673
|
+
item.exposed?.reset?.(index, activeIndex.value, oldIndex);
|
|
10674
|
+
});
|
|
10675
|
+
};
|
|
10676
|
+
const playSlides = () => {
|
|
10677
|
+
allowTransition.value = true;
|
|
10678
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
10679
|
+
activeIndex.value++;
|
|
10680
|
+
} else if (props2.loop) {
|
|
10681
|
+
activeIndex.value = 0;
|
|
10682
|
+
}
|
|
10683
|
+
};
|
|
10684
|
+
const pauseTimer = () => {
|
|
10685
|
+
if (timer.value) {
|
|
10686
|
+
clearInterval(timer.value);
|
|
10687
|
+
timer.value = null;
|
|
10688
|
+
}
|
|
10689
|
+
};
|
|
10690
|
+
const startTimer = () => {
|
|
10691
|
+
if (props2.t <= 0 || !props2.autoplay || timer.value) return;
|
|
10692
|
+
timer.value = setInterval(playSlides, props2.t);
|
|
10693
|
+
};
|
|
10694
|
+
const setActiveItem = (index) => {
|
|
10695
|
+
if (typeof index === "string") {
|
|
10696
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
10697
|
+
if (filteredItems.length > 0) {
|
|
10698
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
10699
|
+
}
|
|
10700
|
+
}
|
|
10701
|
+
index = Number(index);
|
|
10702
|
+
if (isNaN(index) || index !== Math.floor(index)) {
|
|
10703
|
+
throw new VcError("carousel", "索引必须是整数");
|
|
10704
|
+
}
|
|
10705
|
+
const length = items.value.length;
|
|
10706
|
+
const oldIndex = activeIndex.value;
|
|
10707
|
+
if (index < 0) {
|
|
10708
|
+
activeIndex.value = props2.loop ? length - 1 : 0;
|
|
10709
|
+
} else if (index >= length) {
|
|
10710
|
+
activeIndex.value = props2.loop ? 0 : length - 1;
|
|
10711
|
+
} else {
|
|
10712
|
+
activeIndex.value = index;
|
|
10713
|
+
}
|
|
10714
|
+
if (oldIndex === activeIndex.value) {
|
|
10715
|
+
resetItems(oldIndex);
|
|
10716
|
+
}
|
|
10717
|
+
};
|
|
10718
|
+
const prev = () => {
|
|
10719
|
+
setActiveItem(activeIndex.value - 1);
|
|
10720
|
+
};
|
|
10721
|
+
const next = () => {
|
|
10722
|
+
setActiveItem(activeIndex.value + 1);
|
|
10723
|
+
};
|
|
10724
|
+
const handleDotClick = (index) => {
|
|
10725
|
+
activeIndex.value = index;
|
|
10726
|
+
};
|
|
10727
|
+
const handleStart = (e) => {
|
|
10728
|
+
allowTransition.value = true;
|
|
10729
|
+
if (!props2.draggable) return;
|
|
10730
|
+
pauseTimer();
|
|
10731
|
+
start.value = true;
|
|
10732
|
+
startX.value = e.screenX;
|
|
10733
|
+
startY.value = e.screenY;
|
|
10734
|
+
};
|
|
10735
|
+
const handleMove = (e) => {
|
|
10736
|
+
if (!start.value || !props2.draggable) return;
|
|
10737
|
+
offset.value = !props2.vertical ? e.screenX - startX.value : e.screenY - startY.value;
|
|
10738
|
+
resetItems();
|
|
10739
|
+
};
|
|
10740
|
+
const handleEnd = () => {
|
|
10741
|
+
if (!props2.draggable) return;
|
|
10742
|
+
start.value = false;
|
|
10743
|
+
startTimer();
|
|
10744
|
+
const $offset = Math.abs(offset.value);
|
|
10745
|
+
const $direction = offset.value > 0;
|
|
10746
|
+
offset.value = 0;
|
|
10747
|
+
if ($offset > 5) {
|
|
10748
|
+
$direction && prev();
|
|
10749
|
+
!$direction && next();
|
|
10750
|
+
} else {
|
|
10751
|
+
resetItems();
|
|
10752
|
+
}
|
|
10753
|
+
};
|
|
10754
|
+
vue.watch(
|
|
10755
|
+
() => items.value,
|
|
10756
|
+
(v) => {
|
|
10757
|
+
if (v.length > 0) setActiveItem(props2.initialIndex);
|
|
10758
|
+
}
|
|
10759
|
+
);
|
|
10760
|
+
vue.watch(
|
|
10761
|
+
() => activeIndex.value,
|
|
10762
|
+
(v, oldV) => {
|
|
10763
|
+
resetItems(oldV);
|
|
10764
|
+
emit("change", v, oldV);
|
|
10765
|
+
}
|
|
10766
|
+
);
|
|
10767
|
+
vue.watch(
|
|
10768
|
+
() => props2.autoplay,
|
|
10769
|
+
(v) => {
|
|
10770
|
+
v ? startTimer() : pauseTimer();
|
|
10771
|
+
}
|
|
10772
|
+
);
|
|
10773
|
+
vue.watch(
|
|
10774
|
+
() => props2.loop,
|
|
10775
|
+
() => {
|
|
10776
|
+
setActiveItem(activeIndex.value);
|
|
10777
|
+
}
|
|
10778
|
+
);
|
|
10779
|
+
vue.watch(
|
|
10780
|
+
() => props2.t,
|
|
10781
|
+
() => {
|
|
10782
|
+
pauseTimer();
|
|
10783
|
+
startTimer();
|
|
10784
|
+
}
|
|
10785
|
+
);
|
|
10786
|
+
vue.onMounted(() => {
|
|
10787
|
+
vue.nextTick(() => {
|
|
10788
|
+
if (wrapper.value) Resize.on(wrapper.value, resetItems);
|
|
10789
|
+
if (props2.initialIndex < items.value.length && props2.initialIndex >= 0) {
|
|
10790
|
+
activeIndex.value = props2.initialIndex;
|
|
10791
|
+
}
|
|
10792
|
+
startTimer();
|
|
10793
|
+
});
|
|
10794
|
+
});
|
|
10795
|
+
vue.onBeforeUnmount(() => {
|
|
10796
|
+
if (wrapper.value) Resize.off(wrapper.value, resetItems);
|
|
10797
|
+
pauseTimer();
|
|
10798
|
+
startTimer();
|
|
10799
|
+
});
|
|
10800
|
+
const add = (item) => {
|
|
10801
|
+
if (!item) return;
|
|
10802
|
+
vue.nextTick(() => {
|
|
10803
|
+
if (content.value) {
|
|
10804
|
+
const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
|
|
10805
|
+
items.value.splice(index, 0, item);
|
|
10806
|
+
return;
|
|
10807
|
+
}
|
|
10808
|
+
items.value.push(item);
|
|
10809
|
+
});
|
|
10810
|
+
};
|
|
10811
|
+
const remove = (item) => {
|
|
10812
|
+
if (!item) return;
|
|
10813
|
+
items.value.splice(items.value.indexOf(item), 1);
|
|
10814
|
+
};
|
|
10815
|
+
vue.provide("vc-carousel", {
|
|
10816
|
+
props: props2,
|
|
10817
|
+
items,
|
|
10818
|
+
offset,
|
|
10819
|
+
allowTransition,
|
|
10820
|
+
setActiveItem,
|
|
10821
|
+
wrapper,
|
|
10822
|
+
content,
|
|
10823
|
+
add,
|
|
10824
|
+
remove
|
|
10825
|
+
});
|
|
10826
|
+
expose({
|
|
10827
|
+
setActiveItem,
|
|
10828
|
+
prev,
|
|
10829
|
+
next
|
|
10830
|
+
});
|
|
10831
|
+
return {
|
|
10832
|
+
carouselId,
|
|
10833
|
+
allowTransition,
|
|
10834
|
+
items,
|
|
10835
|
+
activeIndex,
|
|
10836
|
+
offset,
|
|
10837
|
+
direction,
|
|
10838
|
+
hasLabel,
|
|
10839
|
+
dotsClasses,
|
|
10840
|
+
start,
|
|
10841
|
+
startX,
|
|
10842
|
+
startY,
|
|
10843
|
+
handleStart,
|
|
10844
|
+
handleMove,
|
|
10845
|
+
handleEnd,
|
|
10846
|
+
handleDotClick,
|
|
10847
|
+
prev,
|
|
10848
|
+
next,
|
|
10849
|
+
setActiveItem,
|
|
10850
|
+
pauseTimer,
|
|
10851
|
+
startTimer
|
|
10852
|
+
};
|
|
10853
|
+
};
|
|
10854
|
+
const props$1j = {
|
|
10855
|
+
t: {
|
|
10856
|
+
type: Number,
|
|
10857
|
+
default: 3e3
|
|
10858
|
+
},
|
|
10859
|
+
card: Boolean,
|
|
10860
|
+
gutter: {
|
|
10861
|
+
type: Number,
|
|
10862
|
+
default: 0
|
|
10863
|
+
},
|
|
10864
|
+
height: [String, Number],
|
|
10865
|
+
initialIndex: {
|
|
10866
|
+
type: Number,
|
|
10867
|
+
default: 0
|
|
10868
|
+
},
|
|
10869
|
+
trigger: {
|
|
10644
10870
|
type: String,
|
|
10645
|
-
default: "
|
|
10871
|
+
default: "hover"
|
|
10872
|
+
},
|
|
10873
|
+
autoplay: {
|
|
10874
|
+
type: Boolean,
|
|
10875
|
+
default: true
|
|
10876
|
+
},
|
|
10877
|
+
dots: {
|
|
10878
|
+
type: [String, Boolean],
|
|
10879
|
+
default: "bottom"
|
|
10880
|
+
// bottom/outside | false
|
|
10881
|
+
},
|
|
10882
|
+
arrow: {
|
|
10883
|
+
type: [String, Boolean],
|
|
10884
|
+
default: "hover"
|
|
10885
|
+
// hover/always | false
|
|
10886
|
+
},
|
|
10887
|
+
loop: {
|
|
10888
|
+
type: Boolean,
|
|
10889
|
+
default: true
|
|
10890
|
+
},
|
|
10891
|
+
vertical: {
|
|
10892
|
+
type: Boolean,
|
|
10893
|
+
default: false
|
|
10894
|
+
},
|
|
10895
|
+
draggable: {
|
|
10896
|
+
type: Boolean,
|
|
10897
|
+
default: true
|
|
10646
10898
|
}
|
|
10647
10899
|
};
|
|
10648
|
-
const COMPONENT_NAME$
|
|
10900
|
+
const COMPONENT_NAME$1$ = "vc-carousel";
|
|
10649
10901
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
10650
|
-
name: COMPONENT_NAME$
|
|
10902
|
+
name: COMPONENT_NAME$1$,
|
|
10903
|
+
props: props$1j,
|
|
10904
|
+
setup(props2, {
|
|
10905
|
+
slots,
|
|
10906
|
+
expose
|
|
10907
|
+
}) {
|
|
10908
|
+
const isHover = vue.ref(false);
|
|
10909
|
+
const wrapper = vue.ref(null);
|
|
10910
|
+
const content = vue.ref(null);
|
|
10911
|
+
const arrowDisplay = vue.computed(() => {
|
|
10912
|
+
return props2.arrow && !props2.vertical;
|
|
10913
|
+
});
|
|
10914
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
10915
|
+
const itemInStage = (item, index, items) => {
|
|
10916
|
+
const length = items.length;
|
|
10917
|
+
const isInStage = item.exposed.isInStage.value;
|
|
10918
|
+
if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
|
|
10919
|
+
return "left";
|
|
10920
|
+
} else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
|
|
10921
|
+
return "right";
|
|
10922
|
+
}
|
|
10923
|
+
return false;
|
|
10924
|
+
};
|
|
10925
|
+
const handleButtonEnter = (arrow) => {
|
|
10926
|
+
if (props2.vertical) return;
|
|
10927
|
+
carousel.items.value.forEach((item, index, items) => {
|
|
10928
|
+
if (arrow === itemInStage(item, index, items)) {
|
|
10929
|
+
item.exposed.isHover.value = true;
|
|
10930
|
+
}
|
|
10931
|
+
});
|
|
10932
|
+
};
|
|
10933
|
+
const handleButtonLeave = () => {
|
|
10934
|
+
if (props2.vertical) return;
|
|
10935
|
+
carousel.items.value.forEach((item) => {
|
|
10936
|
+
item.exposed.isHover.value = false;
|
|
10937
|
+
});
|
|
10938
|
+
};
|
|
10939
|
+
const handleDotHover = (index) => {
|
|
10940
|
+
if (props2.trigger === "hover" && index !== carousel.activeIndex.value) {
|
|
10941
|
+
carousel.activeIndex.value = index;
|
|
10942
|
+
}
|
|
10943
|
+
};
|
|
10944
|
+
const handleMouseEnter = () => {
|
|
10945
|
+
isHover.value = true;
|
|
10946
|
+
carousel.pauseTimer();
|
|
10947
|
+
};
|
|
10948
|
+
const handleMouseLeave = () => {
|
|
10949
|
+
isHover.value = false;
|
|
10950
|
+
carousel.startTimer();
|
|
10951
|
+
};
|
|
10952
|
+
const throttledArrowClick = throttle$1(carousel.setActiveItem);
|
|
10953
|
+
const throttledDotHover = throttle$1(handleDotHover);
|
|
10954
|
+
return () => {
|
|
10955
|
+
return vue.createVNode("div", {
|
|
10956
|
+
"ref": wrapper,
|
|
10957
|
+
"class": ["vc-carousel", `is-${carousel.direction.value}`],
|
|
10958
|
+
"onMousedown": vue.withModifiers(carousel.handleStart, ["stop", "prevent"]),
|
|
10959
|
+
"onMousemove": vue.withModifiers(carousel.handleMove, ["stop", "prevent"]),
|
|
10960
|
+
"onMouseup": vue.withModifiers(carousel.handleEnd, ["stop", "prevent"]),
|
|
10961
|
+
"onMouseenter": vue.withModifiers(handleMouseEnter, ["stop"]),
|
|
10962
|
+
"onMouseleave": vue.withModifiers(handleMouseLeave, ["stop"])
|
|
10963
|
+
}, [vue.createVNode("div", {
|
|
10964
|
+
"ref": content,
|
|
10965
|
+
"class": "vc-carousel__wrapper",
|
|
10966
|
+
"style": {
|
|
10967
|
+
height: props2.height ? `${props2.height}px` : "auto"
|
|
10968
|
+
}
|
|
10969
|
+
}, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
10970
|
+
"mode": "left-part"
|
|
10971
|
+
}, {
|
|
10972
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
10973
|
+
"type": "button",
|
|
10974
|
+
"class": "vc-carousel__arrow is-left-arrow",
|
|
10975
|
+
"onMouseenter": () => handleButtonEnter("left"),
|
|
10976
|
+
"onMouseleave": handleButtonLeave,
|
|
10977
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ["stop"])
|
|
10978
|
+
}, [vue.createVNode(Icon, {
|
|
10979
|
+
"type": "left"
|
|
10980
|
+
}, null)]), [[vue.vShow, (props2.arrow === "always" || isHover.value) && (props2.loop || carousel.activeIndex.value > 0)]])]
|
|
10981
|
+
}), arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
10982
|
+
"mode": "right-part"
|
|
10983
|
+
}, {
|
|
10984
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
10985
|
+
"type": "button",
|
|
10986
|
+
"class": "vc-carousel__arrow is-right-arrow",
|
|
10987
|
+
"onMouseenter": () => handleButtonEnter("right"),
|
|
10988
|
+
"onMouseleave": handleButtonLeave,
|
|
10989
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ["stop"])
|
|
10990
|
+
}, [vue.createVNode(Icon, {
|
|
10991
|
+
"type": "right"
|
|
10992
|
+
}, null)]), [[vue.vShow, (props2.arrow === "always" || isHover.value) && (props2.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
|
|
10993
|
+
}), slots.default?.()]), props2.dots && vue.createVNode("ul", {
|
|
10994
|
+
"class": ["vc-carousel__dots", ...carousel.dotsClasses.value]
|
|
10995
|
+
}, [carousel.items.value.map((item, index) => vue.createVNode("li", {
|
|
10996
|
+
"key": index,
|
|
10997
|
+
"class": ["vc-carousel__dot", `is-${carousel.direction.value}`, {
|
|
10998
|
+
"is-active": index === carousel.activeIndex.value
|
|
10999
|
+
}],
|
|
11000
|
+
"onMouseenter": () => throttledDotHover(index),
|
|
11001
|
+
"onClick": () => carousel.handleDotClick(index)
|
|
11002
|
+
}, [vue.createVNode("button", {
|
|
11003
|
+
"class": "vc-carousel__button"
|
|
11004
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
|
|
11005
|
+
};
|
|
11006
|
+
}
|
|
11007
|
+
});
|
|
11008
|
+
const props$1i = {
|
|
11009
|
+
name: String,
|
|
11010
|
+
label: {
|
|
11011
|
+
type: [String, Number],
|
|
11012
|
+
default: ""
|
|
11013
|
+
},
|
|
11014
|
+
// card大小
|
|
11015
|
+
width: {
|
|
11016
|
+
type: [Number, String],
|
|
11017
|
+
default: "70%"
|
|
11018
|
+
},
|
|
11019
|
+
// card之间间距, 或者滑动时候的间距
|
|
11020
|
+
gutter: {
|
|
11021
|
+
type: Number,
|
|
11022
|
+
default: 0
|
|
11023
|
+
},
|
|
11024
|
+
scale: {
|
|
11025
|
+
type: Number,
|
|
11026
|
+
default: 0.83
|
|
11027
|
+
}
|
|
11028
|
+
};
|
|
11029
|
+
const TRANSFORM = prefixStyle("transform").camel;
|
|
11030
|
+
const useCarouselItem = (expose) => {
|
|
11031
|
+
const instance = vue.getCurrentInstance();
|
|
11032
|
+
const carousel = vue.inject("vc-carousel", {});
|
|
11033
|
+
const props2 = instance.props;
|
|
11034
|
+
const translate = vue.ref(0);
|
|
11035
|
+
const currentScale = vue.ref(1);
|
|
11036
|
+
const isHover = vue.ref(false);
|
|
11037
|
+
const isActive = vue.ref(false);
|
|
11038
|
+
const isReady = vue.ref(false);
|
|
11039
|
+
const isInStage = vue.ref(false);
|
|
11040
|
+
const isAnimating = vue.ref(false);
|
|
11041
|
+
const isVertical = vue.computed(() => {
|
|
11042
|
+
return carousel.props.vertical;
|
|
11043
|
+
});
|
|
11044
|
+
const isCard = vue.computed(() => {
|
|
11045
|
+
return carousel.props.card;
|
|
11046
|
+
});
|
|
11047
|
+
const isMove = vue.computed(() => {
|
|
11048
|
+
return carousel.offset.value !== 0;
|
|
11049
|
+
});
|
|
11050
|
+
const itemGutter = vue.computed(() => {
|
|
11051
|
+
return props2.gutter || carousel.props.gutter || 0;
|
|
11052
|
+
});
|
|
11053
|
+
const itemStyle = vue.computed(() => {
|
|
11054
|
+
const translateType = isVertical.value ? "translateY" : "translateX";
|
|
11055
|
+
if (carousel.props.card) {
|
|
11056
|
+
return {
|
|
11057
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
11058
|
+
width: props2.width
|
|
11059
|
+
};
|
|
11060
|
+
} else {
|
|
11061
|
+
return {
|
|
11062
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
11063
|
+
width: itemGutter.value ? props2.width : "100%"
|
|
11064
|
+
};
|
|
11065
|
+
}
|
|
11066
|
+
});
|
|
11067
|
+
vue.onBeforeMount(() => {
|
|
11068
|
+
carousel.add?.(instance);
|
|
11069
|
+
if (!isCard.value && itemGutter.value && carousel.props.loop) {
|
|
11070
|
+
throw new VcError("carousel", "slide模式下loop不能为true");
|
|
11071
|
+
}
|
|
11072
|
+
});
|
|
11073
|
+
vue.onBeforeUnmount(() => {
|
|
11074
|
+
carousel.remove?.(instance);
|
|
11075
|
+
});
|
|
11076
|
+
const processIndex = (index, activeIndex, length) => {
|
|
11077
|
+
if (activeIndex === 0 && index === length - 1) {
|
|
11078
|
+
return -1;
|
|
11079
|
+
} else if (activeIndex === length - 1 && index === 0) {
|
|
11080
|
+
return length;
|
|
11081
|
+
} else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
|
|
11082
|
+
return length + 1;
|
|
11083
|
+
} else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
|
|
11084
|
+
return -2;
|
|
11085
|
+
}
|
|
11086
|
+
return index;
|
|
11087
|
+
};
|
|
11088
|
+
const calcCardTranslate = (index, activeIndex) => {
|
|
11089
|
+
let value;
|
|
11090
|
+
const widthNumber = +props2.width / 100;
|
|
11091
|
+
const parentW = carousel.wrapper.value.offsetWidth;
|
|
11092
|
+
if (isInStage.value) {
|
|
11093
|
+
if (index === activeIndex) {
|
|
11094
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
11095
|
+
} else if (index > activeIndex) {
|
|
11096
|
+
value = parentW * (1 + widthNumber * props2.scale) / 2 + itemGutter.value;
|
|
11097
|
+
} else {
|
|
11098
|
+
value = -(parentW * ((widthNumber * props2.scale - 1) / 2 + widthNumber)) - itemGutter.value;
|
|
11099
|
+
}
|
|
11100
|
+
} else if (index < activeIndex) {
|
|
11101
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
11102
|
+
} else {
|
|
11103
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
11104
|
+
}
|
|
11105
|
+
return value;
|
|
11106
|
+
};
|
|
11107
|
+
const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
|
|
11108
|
+
const { length } = carousel.items.value;
|
|
11109
|
+
const offset = wrapperWidth - (instance.vnode?.el?.offsetWidth || 0);
|
|
11110
|
+
const gutter = itemGutter.value;
|
|
11111
|
+
if (!gutter || isVertical.value) return 0;
|
|
11112
|
+
let slideOffset = 0;
|
|
11113
|
+
if (length === 1) {
|
|
11114
|
+
return offset / 2;
|
|
11115
|
+
}
|
|
11116
|
+
if (activeIndex == 0) {
|
|
11117
|
+
if (index - activeIndex === 0) {
|
|
11118
|
+
slideOffset = gutter;
|
|
11119
|
+
} else if (index - activeIndex === 1) {
|
|
11120
|
+
slideOffset = -offset + gutter * 2;
|
|
11121
|
+
}
|
|
11122
|
+
}
|
|
11123
|
+
if (activeIndex !== 0 && activeIndex != length - 1) {
|
|
11124
|
+
if (index - activeIndex === 0) {
|
|
11125
|
+
slideOffset = offset / 2;
|
|
11126
|
+
} else if (index - activeIndex === 1) {
|
|
11127
|
+
slideOffset = -offset / 2 + gutter;
|
|
11128
|
+
} else if (index - activeIndex === -1) {
|
|
11129
|
+
slideOffset = offset * 3 / 2 - gutter;
|
|
11130
|
+
}
|
|
11131
|
+
}
|
|
11132
|
+
if (activeIndex == length - 1) {
|
|
11133
|
+
if (index - activeIndex === 0) {
|
|
11134
|
+
slideOffset = offset - gutter;
|
|
11135
|
+
} else if (index - activeIndex === -1) {
|
|
11136
|
+
slideOffset = offset * 2 - gutter * 2;
|
|
11137
|
+
}
|
|
11138
|
+
}
|
|
11139
|
+
return slideOffset;
|
|
11140
|
+
};
|
|
11141
|
+
const calcTranslate = (index, activeIndex) => {
|
|
11142
|
+
const distance = carousel.vnode.el[isVertical.value ? "offsetHeight" : "offsetWidth"];
|
|
11143
|
+
const slideOffset = calcSlideOffset(index, activeIndex, distance);
|
|
11144
|
+
return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
|
|
11145
|
+
};
|
|
11146
|
+
const reset = (index, activeIndex, oldIndex) => {
|
|
11147
|
+
const { length } = carousel.items.value;
|
|
11148
|
+
if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
|
|
11149
|
+
isAnimating.value = index === activeIndex || index === oldIndex;
|
|
11150
|
+
if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
|
|
11151
|
+
isAnimating.value = true;
|
|
11152
|
+
}
|
|
11153
|
+
}
|
|
11154
|
+
if (index !== activeIndex && length > 2 && carousel.props.loop) {
|
|
11155
|
+
index = processIndex(index, activeIndex, length);
|
|
11156
|
+
}
|
|
11157
|
+
if (isCard.value) {
|
|
11158
|
+
if (isVertical.value) {
|
|
11159
|
+
throw new VcError("carousel", "卡片模式不支持垂直方向");
|
|
11160
|
+
}
|
|
11161
|
+
isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
11162
|
+
isActive.value = index === activeIndex;
|
|
11163
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
11164
|
+
currentScale.value = isActive.value ? 1 : props2.scale;
|
|
11165
|
+
} else {
|
|
11166
|
+
isActive.value = index === activeIndex;
|
|
11167
|
+
translate.value = calcTranslate(index, activeIndex);
|
|
11168
|
+
}
|
|
11169
|
+
isReady.value = true;
|
|
11170
|
+
};
|
|
11171
|
+
const handleItemClick = () => {
|
|
11172
|
+
if (parent && isCard.value) {
|
|
11173
|
+
const index = carousel.items.value.indexOf(instance);
|
|
11174
|
+
carousel.setActiveItem(index);
|
|
11175
|
+
}
|
|
11176
|
+
};
|
|
11177
|
+
expose({
|
|
11178
|
+
reset,
|
|
11179
|
+
isInStage,
|
|
11180
|
+
isHover,
|
|
11181
|
+
isActive
|
|
11182
|
+
});
|
|
11183
|
+
return {
|
|
11184
|
+
translate,
|
|
11185
|
+
currentScale,
|
|
11186
|
+
isHover,
|
|
11187
|
+
isActive,
|
|
11188
|
+
isReady,
|
|
11189
|
+
isInStage,
|
|
11190
|
+
isAnimating,
|
|
11191
|
+
isVertical,
|
|
11192
|
+
isCard,
|
|
11193
|
+
isMove,
|
|
11194
|
+
itemGutter,
|
|
11195
|
+
itemStyle,
|
|
11196
|
+
reset,
|
|
11197
|
+
handleItemClick
|
|
11198
|
+
};
|
|
11199
|
+
};
|
|
11200
|
+
const COMPONENT_NAME$1_ = "vc-carousel-item";
|
|
11201
|
+
const CarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
11202
|
+
name: COMPONENT_NAME$1_,
|
|
10651
11203
|
props: props$1i,
|
|
11204
|
+
setup(_, {
|
|
11205
|
+
slots,
|
|
11206
|
+
expose
|
|
11207
|
+
}) {
|
|
11208
|
+
const it = useCarouselItem(expose);
|
|
11209
|
+
return () => {
|
|
11210
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
11211
|
+
"class": ["vc-carousel-item", {
|
|
11212
|
+
"is-active": it.isActive.value,
|
|
11213
|
+
"is-card": it.isCard.value,
|
|
11214
|
+
"is-in-stage": it.isInStage.value,
|
|
11215
|
+
"is-hover": it.isHover.value,
|
|
11216
|
+
"is-animating": it.isAnimating.value && !it.isMove.value
|
|
11217
|
+
}],
|
|
11218
|
+
"style": it.itemStyle.value,
|
|
11219
|
+
"onClick": it.handleItemClick
|
|
11220
|
+
}, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
|
|
11221
|
+
"class": "vc-carousel-item__mask"
|
|
11222
|
+
}, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
11223
|
+
};
|
|
11224
|
+
}
|
|
11225
|
+
});
|
|
11226
|
+
const COMPONENT_NAME$1Z = "vcm-carousel";
|
|
11227
|
+
const MCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
11228
|
+
name: COMPONENT_NAME$1Z,
|
|
11229
|
+
props: {
|
|
11230
|
+
...props$1j,
|
|
11231
|
+
dots: {
|
|
11232
|
+
type: [String, Boolean],
|
|
11233
|
+
default: false
|
|
11234
|
+
},
|
|
11235
|
+
indicator: {
|
|
11236
|
+
type: Boolean,
|
|
11237
|
+
default: true
|
|
11238
|
+
}
|
|
11239
|
+
},
|
|
10652
11240
|
setup(props2, {
|
|
10653
|
-
slots
|
|
11241
|
+
slots,
|
|
11242
|
+
expose
|
|
10654
11243
|
}) {
|
|
11244
|
+
const wrapper = vue.ref(null);
|
|
11245
|
+
const content = vue.ref(null);
|
|
11246
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
11247
|
+
let scrollStatus = 0;
|
|
11248
|
+
const handleTouchStart = (e) => {
|
|
11249
|
+
carousel.handleStart(e.touches[0]);
|
|
11250
|
+
scrollStatus = 0;
|
|
11251
|
+
};
|
|
11252
|
+
const handleTouchMove = (e) => {
|
|
11253
|
+
const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
|
|
11254
|
+
const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
|
|
11255
|
+
if (!props2.vertical && absX > absY && scrollStatus !== 1) {
|
|
11256
|
+
e.preventDefault();
|
|
11257
|
+
carousel.handleMove(e.touches[0]);
|
|
11258
|
+
scrollStatus = 2;
|
|
11259
|
+
return;
|
|
11260
|
+
}
|
|
11261
|
+
if (props2.vertical && absY > absX) {
|
|
11262
|
+
e.preventDefault();
|
|
11263
|
+
carousel.handleMove(e.touches[0]);
|
|
11264
|
+
return;
|
|
11265
|
+
}
|
|
11266
|
+
if (scrollStatus === 0) {
|
|
11267
|
+
scrollStatus = 1;
|
|
11268
|
+
}
|
|
11269
|
+
};
|
|
11270
|
+
const handleTouchEnd = () => {
|
|
11271
|
+
carousel.handleEnd();
|
|
11272
|
+
scrollStatus = 0;
|
|
11273
|
+
};
|
|
10655
11274
|
return () => {
|
|
10656
11275
|
return vue.createVNode("div", {
|
|
10657
|
-
"
|
|
10658
|
-
|
|
11276
|
+
"ref": wrapper,
|
|
11277
|
+
"class": ["vcm-carousel", `is-${carousel.direction.value}`],
|
|
11278
|
+
"onTouchstart": vue.withModifiers(handleTouchStart, ["stop"]),
|
|
11279
|
+
"onTouchmove": vue.withModifiers(handleTouchMove, ["stop"]),
|
|
11280
|
+
"onTouchend": vue.withModifiers(handleTouchEnd, ["stop"])
|
|
11281
|
+
}, [vue.createVNode("div", {
|
|
11282
|
+
"ref": content,
|
|
11283
|
+
"style": {
|
|
11284
|
+
height: props2.height ? `${props2.height}px` : "auto"
|
|
11285
|
+
},
|
|
11286
|
+
"class": "vcm-carousel__wrapper"
|
|
11287
|
+
}, [slots.default?.()]), props2.dots && vue.createVNode("ul", {
|
|
11288
|
+
"class": ["vcm-carousel__dots", ...carousel.dotsClasses.value]
|
|
11289
|
+
}, [carousel.items.value.map((_, index) => vue.createVNode("li", {
|
|
11290
|
+
"key": index,
|
|
11291
|
+
"class": ["vcm-carousel__dot", "is-" + carousel.direction.value, {
|
|
11292
|
+
"is-active": index === carousel.activeIndex.value
|
|
11293
|
+
}],
|
|
11294
|
+
"onClick": (e) => {
|
|
11295
|
+
e.stopPropagation();
|
|
11296
|
+
carousel.handleDotClick(index);
|
|
11297
|
+
}
|
|
11298
|
+
}, [vue.createVNode("button", {
|
|
11299
|
+
"class": "vcm-carousel__button"
|
|
11300
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props2.card && props2.indicator && vue.createVNode("div", {
|
|
11301
|
+
"class": "vcm-carousel__indicator"
|
|
11302
|
+
}, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
|
|
11303
|
+
};
|
|
11304
|
+
}
|
|
11305
|
+
});
|
|
11306
|
+
const COMPONENT_NAME$1Y = "vcm-carousel-item";
|
|
11307
|
+
const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
11308
|
+
name: COMPONENT_NAME$1Y,
|
|
11309
|
+
props: props$1i,
|
|
11310
|
+
setup(_, {
|
|
11311
|
+
slots,
|
|
11312
|
+
expose
|
|
11313
|
+
}) {
|
|
11314
|
+
const it = useCarouselItem(expose);
|
|
11315
|
+
return () => {
|
|
11316
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
11317
|
+
"style": it.itemStyle.value,
|
|
11318
|
+
"class": {
|
|
11319
|
+
"vcm-carousel-item": true,
|
|
11320
|
+
"is-active": it.isActive.value,
|
|
11321
|
+
"is-card": it.isCard.value,
|
|
11322
|
+
"is-animating": it.isAnimating.value && !it.isMove.value,
|
|
11323
|
+
"is-in-stage": it.isInStage.value
|
|
11324
|
+
},
|
|
11325
|
+
"onClick": it.handleItemClick
|
|
11326
|
+
}, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
|
|
11327
|
+
"class": "vcm-carousel-item__mask"
|
|
11328
|
+
}, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
10659
11329
|
};
|
|
10660
11330
|
}
|
|
10661
11331
|
});
|
|
10662
|
-
const MCarousel = Carousel;
|
|
10663
11332
|
const getSelectedData = (value = [], source = []) => {
|
|
10664
11333
|
const label = [];
|
|
10665
11334
|
const data = [];
|
|
@@ -10932,9 +11601,9 @@ var Vc = (function (exports, vue) {
|
|
|
10932
11601
|
expose?.(exposed);
|
|
10933
11602
|
return exposed;
|
|
10934
11603
|
};
|
|
10935
|
-
const COMPONENT_NAME$
|
|
11604
|
+
const COMPONENT_NAME$1X = "vc-input";
|
|
10936
11605
|
const Input$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10937
|
-
name: COMPONENT_NAME$
|
|
11606
|
+
name: COMPONENT_NAME$1X,
|
|
10938
11607
|
inheritAttrs: false,
|
|
10939
11608
|
props: {
|
|
10940
11609
|
...props$1h,
|
|
@@ -11265,9 +11934,9 @@ var Vc = (function (exports, vue) {
|
|
|
11265
11934
|
handleStepper
|
|
11266
11935
|
};
|
|
11267
11936
|
};
|
|
11268
|
-
const COMPONENT_NAME$
|
|
11937
|
+
const COMPONENT_NAME$1W = "vc-input-number";
|
|
11269
11938
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
11270
|
-
name: COMPONENT_NAME$
|
|
11939
|
+
name: COMPONENT_NAME$1W,
|
|
11271
11940
|
props: props$1g,
|
|
11272
11941
|
inheritAttrs: false,
|
|
11273
11942
|
setup(props2, {
|
|
@@ -11327,9 +11996,9 @@ var Vc = (function (exports, vue) {
|
|
|
11327
11996
|
default: true
|
|
11328
11997
|
}
|
|
11329
11998
|
};
|
|
11330
|
-
const COMPONENT_NAME$
|
|
11999
|
+
const COMPONENT_NAME$1V = "vc-input-search";
|
|
11331
12000
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
11332
|
-
name: COMPONENT_NAME$
|
|
12001
|
+
name: COMPONENT_NAME$1V,
|
|
11333
12002
|
props: props$1f,
|
|
11334
12003
|
inheritAttrs: false,
|
|
11335
12004
|
setup(props2, {
|
|
@@ -11717,9 +12386,9 @@ var Vc = (function (exports, vue) {
|
|
|
11717
12386
|
default: () => null
|
|
11718
12387
|
}
|
|
11719
12388
|
};
|
|
11720
|
-
const COMPONENT_NAME$
|
|
12389
|
+
const COMPONENT_NAME$1U = "vc-customer";
|
|
11721
12390
|
const Customer = vue.defineComponent({
|
|
11722
|
-
name: COMPONENT_NAME$
|
|
12391
|
+
name: COMPONENT_NAME$1U,
|
|
11723
12392
|
props: props$1c,
|
|
11724
12393
|
setup(props2, context) {
|
|
11725
12394
|
return () => vue.h(() => {
|
|
@@ -11792,7 +12461,7 @@ var Vc = (function (exports, vue) {
|
|
|
11792
12461
|
return this.target.finally(callback);
|
|
11793
12462
|
}
|
|
11794
12463
|
}
|
|
11795
|
-
const COMPONENT_NAME$
|
|
12464
|
+
const COMPONENT_NAME$1T = "vc-portal";
|
|
11796
12465
|
class Portal {
|
|
11797
12466
|
/**
|
|
11798
12467
|
* 清理Portals类型组件
|
|
@@ -11842,7 +12511,7 @@ var Vc = (function (exports, vue) {
|
|
|
11842
12511
|
this.wrapper = wrapper;
|
|
11843
12512
|
this.globalOptions = {
|
|
11844
12513
|
...options,
|
|
11845
|
-
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$
|
|
12514
|
+
name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1T)
|
|
11846
12515
|
};
|
|
11847
12516
|
}
|
|
11848
12517
|
popup(propsData, options) {
|
|
@@ -11935,12 +12604,12 @@ var Vc = (function (exports, vue) {
|
|
|
11935
12604
|
components,
|
|
11936
12605
|
uses,
|
|
11937
12606
|
slots,
|
|
11938
|
-
parent,
|
|
12607
|
+
parent: parent2,
|
|
11939
12608
|
propsData,
|
|
11940
12609
|
...rest
|
|
11941
12610
|
} = options;
|
|
11942
12611
|
let useAllNodes = fragment;
|
|
11943
|
-
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$
|
|
12612
|
+
const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1T)}` : name$;
|
|
11944
12613
|
const container = document.createElement(tag);
|
|
11945
12614
|
const root = typeof el2 === "object" ? el2 : document.querySelector(el2 || "body");
|
|
11946
12615
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -11974,8 +12643,8 @@ var Vc = (function (exports, vue) {
|
|
|
11974
12643
|
} else {
|
|
11975
12644
|
const wrapper = this.wrapper;
|
|
11976
12645
|
const app = vue.createApp({
|
|
11977
|
-
name: COMPONENT_NAME$
|
|
11978
|
-
parent,
|
|
12646
|
+
name: COMPONENT_NAME$1T,
|
|
12647
|
+
parent: parent2,
|
|
11979
12648
|
setup() {
|
|
11980
12649
|
if (alive) {
|
|
11981
12650
|
const handleExtra = (e) => {
|
|
@@ -12083,9 +12752,9 @@ var Vc = (function (exports, vue) {
|
|
|
12083
12752
|
default: "div"
|
|
12084
12753
|
}
|
|
12085
12754
|
};
|
|
12086
|
-
const COMPONENT_NAME$
|
|
12755
|
+
const COMPONENT_NAME$1S = "vc-portal-view";
|
|
12087
12756
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
12088
|
-
name: COMPONENT_NAME$
|
|
12757
|
+
name: COMPONENT_NAME$1S,
|
|
12089
12758
|
props: props$1b,
|
|
12090
12759
|
setup(props2, {
|
|
12091
12760
|
slots
|
|
@@ -12099,9 +12768,9 @@ var Vc = (function (exports, vue) {
|
|
|
12099
12768
|
};
|
|
12100
12769
|
}
|
|
12101
12770
|
});
|
|
12102
|
-
const COMPONENT_NAME$
|
|
12771
|
+
const COMPONENT_NAME$1R = "vc-popover-wrapper";
|
|
12103
12772
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
12104
|
-
name: COMPONENT_NAME$
|
|
12773
|
+
name: COMPONENT_NAME$1R,
|
|
12105
12774
|
props: props$1e,
|
|
12106
12775
|
emits: ["portal-fulfilled", "close"],
|
|
12107
12776
|
setup(props2, {
|
|
@@ -12323,9 +12992,9 @@ var Vc = (function (exports, vue) {
|
|
|
12323
12992
|
const PopoverPortal = new Portal(PopoverWrapper, {
|
|
12324
12993
|
leaveDelay: 0
|
|
12325
12994
|
});
|
|
12326
|
-
const COMPONENT_NAME$
|
|
12995
|
+
const COMPONENT_NAME$1Q = "vc-popover";
|
|
12327
12996
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
12328
|
-
name: COMPONENT_NAME$
|
|
12997
|
+
name: COMPONENT_NAME$1Q,
|
|
12329
12998
|
props: props$1d,
|
|
12330
12999
|
emits: ["update:modelValue", "visible-change", "ready", "close"],
|
|
12331
13000
|
setup(props2, {
|
|
@@ -12453,9 +13122,9 @@ var Vc = (function (exports, vue) {
|
|
|
12453
13122
|
const Popover = Object.assign(Popover$1, {
|
|
12454
13123
|
open: PopoverPortal.popup.bind(PopoverPortal)
|
|
12455
13124
|
});
|
|
12456
|
-
const COMPONENT_NAME$
|
|
13125
|
+
const COMPONENT_NAME$1P = "vc-cascader-column";
|
|
12457
13126
|
const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
|
|
12458
|
-
name: COMPONENT_NAME$
|
|
13127
|
+
name: COMPONENT_NAME$1P,
|
|
12459
13128
|
emits: ["click", "change"],
|
|
12460
13129
|
props: {
|
|
12461
13130
|
data: {
|
|
@@ -12658,9 +13327,9 @@ var Vc = (function (exports, vue) {
|
|
|
12658
13327
|
default: true
|
|
12659
13328
|
}
|
|
12660
13329
|
};
|
|
12661
|
-
const COMPONENT_NAME$
|
|
13330
|
+
const COMPONENT_NAME$1O = "vc-cascader";
|
|
12662
13331
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
12663
|
-
name: COMPONENT_NAME$
|
|
13332
|
+
name: COMPONENT_NAME$1O,
|
|
12664
13333
|
inheritAttrs: false,
|
|
12665
13334
|
props: props$19,
|
|
12666
13335
|
emits: ["update:modelValue", "visible-change", "ready", "change", "close"],
|
|
@@ -12947,9 +13616,9 @@ var Vc = (function (exports, vue) {
|
|
|
12947
13616
|
watchShallow: Boolean,
|
|
12948
13617
|
manualUpdate: Boolean
|
|
12949
13618
|
};
|
|
12950
|
-
const COMPONENT_NAME$
|
|
13619
|
+
const COMPONENT_NAME$1N = "vc-chart";
|
|
12951
13620
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
12952
|
-
name: COMPONENT_NAME$
|
|
13621
|
+
name: COMPONENT_NAME$1N,
|
|
12953
13622
|
props: props$18,
|
|
12954
13623
|
emits: [...EVENTS$1, "ready"],
|
|
12955
13624
|
setup(props2, {
|
|
@@ -13176,9 +13845,9 @@ var Vc = (function (exports, vue) {
|
|
|
13176
13845
|
computedLabel
|
|
13177
13846
|
};
|
|
13178
13847
|
};
|
|
13179
|
-
const COMPONENT_NAME$
|
|
13848
|
+
const COMPONENT_NAME$1M = "vc-checkbox";
|
|
13180
13849
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
13181
|
-
name: COMPONENT_NAME$
|
|
13850
|
+
name: COMPONENT_NAME$1M,
|
|
13182
13851
|
props: props$17,
|
|
13183
13852
|
emits: ["update:modelValue", "change"],
|
|
13184
13853
|
setup(props2, {
|
|
@@ -13260,9 +13929,9 @@ var Vc = (function (exports, vue) {
|
|
|
13260
13929
|
reset
|
|
13261
13930
|
};
|
|
13262
13931
|
};
|
|
13263
|
-
const COMPONENT_NAME$
|
|
13932
|
+
const COMPONENT_NAME$1L = "vc-checkbox-group";
|
|
13264
13933
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
13265
|
-
name: COMPONENT_NAME$
|
|
13934
|
+
name: COMPONENT_NAME$1L,
|
|
13266
13935
|
props: props$16,
|
|
13267
13936
|
emits: ["update:modelValue", "change"],
|
|
13268
13937
|
setup(props2, {
|
|
@@ -13277,9 +13946,9 @@ var Vc = (function (exports, vue) {
|
|
|
13277
13946
|
};
|
|
13278
13947
|
}
|
|
13279
13948
|
});
|
|
13280
|
-
const COMPONENT_NAME$
|
|
13949
|
+
const COMPONENT_NAME$1K = "vcm-checkbox";
|
|
13281
13950
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
13282
|
-
name: COMPONENT_NAME$
|
|
13951
|
+
name: COMPONENT_NAME$1K,
|
|
13283
13952
|
props: props$17,
|
|
13284
13953
|
emits: ["update:modelValue", "change"],
|
|
13285
13954
|
setup(props2, {
|
|
@@ -13316,9 +13985,9 @@ var Vc = (function (exports, vue) {
|
|
|
13316
13985
|
};
|
|
13317
13986
|
}
|
|
13318
13987
|
});
|
|
13319
|
-
const COMPONENT_NAME$
|
|
13988
|
+
const COMPONENT_NAME$1J = "vcm-checkbox-group";
|
|
13320
13989
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
13321
|
-
name: COMPONENT_NAME$
|
|
13990
|
+
name: COMPONENT_NAME$1J,
|
|
13322
13991
|
props: props$16,
|
|
13323
13992
|
emits: ["update:modelValue", "change"],
|
|
13324
13993
|
setup(props2, {
|
|
@@ -13368,9 +14037,9 @@ var Vc = (function (exports, vue) {
|
|
|
13368
14037
|
// 这个相当于Modal中的onCancel,支持Promise
|
|
13369
14038
|
onBeforeClose: Function
|
|
13370
14039
|
};
|
|
13371
|
-
const COMPONENT_NAME$
|
|
14040
|
+
const COMPONENT_NAME$1I = "vc-message";
|
|
13372
14041
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
13373
|
-
name: COMPONENT_NAME$
|
|
14042
|
+
name: COMPONENT_NAME$1I,
|
|
13374
14043
|
emits: ["before-close", "close", "portal-fulfilled"],
|
|
13375
14044
|
props: props$15,
|
|
13376
14045
|
setup(props2, {
|
|
@@ -13613,9 +14282,9 @@ var Vc = (function (exports, vue) {
|
|
|
13613
14282
|
};
|
|
13614
14283
|
return () => vue.h(props2.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
13615
14284
|
};
|
|
13616
|
-
const COMPONENT_NAME$
|
|
14285
|
+
const COMPONENT_NAME$1H = "vc-clipboard";
|
|
13617
14286
|
const Clipboard$1 = vue.defineComponent({
|
|
13618
|
-
name: COMPONENT_NAME$
|
|
14287
|
+
name: COMPONENT_NAME$1H,
|
|
13619
14288
|
props: props$14,
|
|
13620
14289
|
setup() {
|
|
13621
14290
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -13647,9 +14316,9 @@ var Vc = (function (exports, vue) {
|
|
|
13647
14316
|
const MTransitionScale = TransitionScale;
|
|
13648
14317
|
const MTransitionSlide = TransitionSlide;
|
|
13649
14318
|
const MTransitionZoom = TransitionZoom;
|
|
13650
|
-
const COMPONENT_NAME$
|
|
14319
|
+
const COMPONENT_NAME$1G = "vcm-toast";
|
|
13651
14320
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
13652
|
-
name: COMPONENT_NAME$
|
|
14321
|
+
name: COMPONENT_NAME$1G,
|
|
13653
14322
|
emits: ["close", "portal-fulfilled"],
|
|
13654
14323
|
props: props$13,
|
|
13655
14324
|
setup(props2, {
|
|
@@ -13748,9 +14417,9 @@ var Vc = (function (exports, vue) {
|
|
|
13748
14417
|
const warning$2 = create$3({ mode: "warning" });
|
|
13749
14418
|
const error$2 = create$3({ mode: "error" });
|
|
13750
14419
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
|
|
13751
|
-
const COMPONENT_NAME$
|
|
14420
|
+
const COMPONENT_NAME$1F = "vcm-clipboard";
|
|
13752
14421
|
const MClipboard$1 = vue.defineComponent({
|
|
13753
|
-
name: COMPONENT_NAME$
|
|
14422
|
+
name: COMPONENT_NAME$1F,
|
|
13754
14423
|
props: props$14,
|
|
13755
14424
|
setup() {
|
|
13756
14425
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -13779,9 +14448,9 @@ var Vc = (function (exports, vue) {
|
|
|
13779
14448
|
default: false
|
|
13780
14449
|
}
|
|
13781
14450
|
};
|
|
13782
|
-
const COMPONENT_NAME$
|
|
14451
|
+
const COMPONENT_NAME$1E = "vc-collapse";
|
|
13783
14452
|
const Collapse = vue.defineComponent({
|
|
13784
|
-
name: COMPONENT_NAME$
|
|
14453
|
+
name: COMPONENT_NAME$1E,
|
|
13785
14454
|
props: props$12,
|
|
13786
14455
|
emits: ["update:moodelValue", "change"],
|
|
13787
14456
|
setup(props2, { slots, emit }) {
|
|
@@ -13893,9 +14562,9 @@ var Vc = (function (exports, vue) {
|
|
|
13893
14562
|
function _isSlot$3(s) {
|
|
13894
14563
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13895
14564
|
}
|
|
13896
|
-
const COMPONENT_NAME$
|
|
14565
|
+
const COMPONENT_NAME$1D = "vc-expand";
|
|
13897
14566
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
13898
|
-
name: COMPONENT_NAME$
|
|
14567
|
+
name: COMPONENT_NAME$1D,
|
|
13899
14568
|
props: props$10,
|
|
13900
14569
|
setup(props2, {
|
|
13901
14570
|
slots
|
|
@@ -13922,9 +14591,9 @@ var Vc = (function (exports, vue) {
|
|
|
13922
14591
|
};
|
|
13923
14592
|
}
|
|
13924
14593
|
});
|
|
13925
|
-
const COMPONENT_NAME$
|
|
14594
|
+
const COMPONENT_NAME$1C = "vc-collapse-item";
|
|
13926
14595
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
13927
|
-
name: COMPONENT_NAME$
|
|
14596
|
+
name: COMPONENT_NAME$1C,
|
|
13928
14597
|
props: props$11,
|
|
13929
14598
|
setup(props2, {
|
|
13930
14599
|
slots,
|
|
@@ -13994,9 +14663,9 @@ var Vc = (function (exports, vue) {
|
|
|
13994
14663
|
default: "div"
|
|
13995
14664
|
}
|
|
13996
14665
|
};
|
|
13997
|
-
const COMPONENT_NAME$
|
|
14666
|
+
const COMPONENT_NAME$1B = "vc-color-picker";
|
|
13998
14667
|
const ColorPicker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
13999
|
-
name: COMPONENT_NAME$
|
|
14668
|
+
name: COMPONENT_NAME$1B,
|
|
14000
14669
|
props: props$$,
|
|
14001
14670
|
setup(props2, {
|
|
14002
14671
|
slots
|
|
@@ -14053,9 +14722,9 @@ var Vc = (function (exports, vue) {
|
|
|
14053
14722
|
function _isSlot$2(s) {
|
|
14054
14723
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
14055
14724
|
}
|
|
14056
|
-
const COMPONENT_NAME$
|
|
14725
|
+
const COMPONENT_NAME$1A = "vc-countdown";
|
|
14057
14726
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
14058
|
-
name: COMPONENT_NAME$
|
|
14727
|
+
name: COMPONENT_NAME$1A,
|
|
14059
14728
|
props: props$_,
|
|
14060
14729
|
emits: ["change", "complete", "error"],
|
|
14061
14730
|
setup(props2, {
|
|
@@ -14067,6 +14736,7 @@ var Vc = (function (exports, vue) {
|
|
|
14067
14736
|
const minute = vue.ref("");
|
|
14068
14737
|
const second = vue.ref("");
|
|
14069
14738
|
const millisecond = vue.ref("");
|
|
14739
|
+
const isComplete = vue.ref(false);
|
|
14070
14740
|
const showResult = vue.computed(() => {
|
|
14071
14741
|
return !props2.render && !slots.default;
|
|
14072
14742
|
});
|
|
@@ -14132,15 +14802,18 @@ var Vc = (function (exports, vue) {
|
|
|
14132
14802
|
millisecond.value = String(Math.floor(timestamp % 1e3 / (1e3 / msDividend.value)));
|
|
14133
14803
|
if (timestamp <= 0) {
|
|
14134
14804
|
stop();
|
|
14135
|
-
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
|
|
14805
|
+
if (!isComplete.value) {
|
|
14806
|
+
isComplete.value = true;
|
|
14807
|
+
emit("change", {
|
|
14808
|
+
timestamp: 0,
|
|
14809
|
+
day: "00",
|
|
14810
|
+
hour: "00",
|
|
14811
|
+
minute: "00",
|
|
14812
|
+
second: "00",
|
|
14813
|
+
millisecond: "00"
|
|
14814
|
+
});
|
|
14815
|
+
emit("complete");
|
|
14816
|
+
}
|
|
14144
14817
|
} else {
|
|
14145
14818
|
emit("change", {
|
|
14146
14819
|
timestamp,
|
|
@@ -14155,6 +14828,8 @@ var Vc = (function (exports, vue) {
|
|
|
14155
14828
|
const start = () => {
|
|
14156
14829
|
if (targetTimestamp.value) {
|
|
14157
14830
|
timer && clearInterval(timer);
|
|
14831
|
+
isComplete.value = false;
|
|
14832
|
+
run();
|
|
14158
14833
|
timer = setInterval(run, T.value);
|
|
14159
14834
|
}
|
|
14160
14835
|
};
|
|
@@ -14311,9 +14986,9 @@ var Vc = (function (exports, vue) {
|
|
|
14311
14986
|
function _isSlot$1(s) {
|
|
14312
14987
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
14313
14988
|
}
|
|
14314
|
-
const COMPONENT_NAME$
|
|
14989
|
+
const COMPONENT_NAME$1z = "vc-counter";
|
|
14315
14990
|
const Counter = /* @__PURE__ */ vue.defineComponent({
|
|
14316
|
-
name: COMPONENT_NAME$
|
|
14991
|
+
name: COMPONENT_NAME$1z,
|
|
14317
14992
|
props: props$Z,
|
|
14318
14993
|
emits: ["begin", "complete", "change"],
|
|
14319
14994
|
setup(props2, {
|
|
@@ -15561,9 +16236,9 @@ var Vc = (function (exports, vue) {
|
|
|
15561
16236
|
}
|
|
15562
16237
|
return view;
|
|
15563
16238
|
};
|
|
15564
|
-
const COMPONENT_NAME$
|
|
16239
|
+
const COMPONENT_NAME$1y = "vc-date-confirm";
|
|
15565
16240
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
15566
|
-
name: COMPONENT_NAME$
|
|
16241
|
+
name: COMPONENT_NAME$1y,
|
|
15567
16242
|
props: {
|
|
15568
16243
|
showTime: {
|
|
15569
16244
|
type: Boolean,
|
|
@@ -15624,9 +16299,9 @@ var Vc = (function (exports, vue) {
|
|
|
15624
16299
|
};
|
|
15625
16300
|
}
|
|
15626
16301
|
});
|
|
15627
|
-
const COMPONENT_NAME$
|
|
16302
|
+
const COMPONENT_NAME$1x = "vc-date-header";
|
|
15628
16303
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
15629
|
-
name: COMPONENT_NAME$
|
|
16304
|
+
name: COMPONENT_NAME$1x,
|
|
15630
16305
|
props: {
|
|
15631
16306
|
panelDate: Date,
|
|
15632
16307
|
showNext: {
|
|
@@ -15707,9 +16382,9 @@ var Vc = (function (exports, vue) {
|
|
|
15707
16382
|
};
|
|
15708
16383
|
}
|
|
15709
16384
|
});
|
|
15710
|
-
const COMPONENT_NAME$
|
|
16385
|
+
const COMPONENT_NAME$1w = "vc-date-table";
|
|
15711
16386
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
15712
|
-
name: COMPONENT_NAME$
|
|
16387
|
+
name: COMPONENT_NAME$1w,
|
|
15713
16388
|
props: {
|
|
15714
16389
|
value: Array,
|
|
15715
16390
|
firstDayOfWeek: {
|
|
@@ -15909,9 +16584,9 @@ var Vc = (function (exports, vue) {
|
|
|
15909
16584
|
};
|
|
15910
16585
|
}
|
|
15911
16586
|
});
|
|
15912
|
-
const COMPONENT_NAME$
|
|
16587
|
+
const COMPONENT_NAME$1v = "vc-month-table";
|
|
15913
16588
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
15914
|
-
name: COMPONENT_NAME$
|
|
16589
|
+
name: COMPONENT_NAME$1v,
|
|
15915
16590
|
props: {
|
|
15916
16591
|
value: Array,
|
|
15917
16592
|
panelDate: Date,
|
|
@@ -16037,7 +16712,7 @@ var Vc = (function (exports, vue) {
|
|
|
16037
16712
|
};
|
|
16038
16713
|
}
|
|
16039
16714
|
});
|
|
16040
|
-
const COMPONENT_NAME$
|
|
16715
|
+
const COMPONENT_NAME$1u = "vc-quarter-table";
|
|
16041
16716
|
const getMonthRange = (panelDate, quarter) => {
|
|
16042
16717
|
const year = panelDate.getFullYear();
|
|
16043
16718
|
const [startMonth, endMonth] = [quarter * 3, quarter * 3 + 2];
|
|
@@ -16064,7 +16739,7 @@ var Vc = (function (exports, vue) {
|
|
|
16064
16739
|
}
|
|
16065
16740
|
};
|
|
16066
16741
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
16067
|
-
name: COMPONENT_NAME$
|
|
16742
|
+
name: COMPONENT_NAME$1u,
|
|
16068
16743
|
props: {
|
|
16069
16744
|
value: Array,
|
|
16070
16745
|
panelDate: Date,
|
|
@@ -16182,9 +16857,9 @@ var Vc = (function (exports, vue) {
|
|
|
16182
16857
|
};
|
|
16183
16858
|
}
|
|
16184
16859
|
});
|
|
16185
|
-
const COMPONENT_NAME$
|
|
16860
|
+
const COMPONENT_NAME$1t = "vc-shortcuts-select";
|
|
16186
16861
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
16187
|
-
name: COMPONENT_NAME$
|
|
16862
|
+
name: COMPONENT_NAME$1t,
|
|
16188
16863
|
props: {
|
|
16189
16864
|
panelDate: Date,
|
|
16190
16865
|
config: Array,
|
|
@@ -16221,9 +16896,9 @@ var Vc = (function (exports, vue) {
|
|
|
16221
16896
|
};
|
|
16222
16897
|
}
|
|
16223
16898
|
});
|
|
16224
|
-
const COMPONENT_NAME$
|
|
16899
|
+
const COMPONENT_NAME$1s = "vc-time-select";
|
|
16225
16900
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
16226
|
-
name: COMPONENT_NAME$
|
|
16901
|
+
name: COMPONENT_NAME$1s,
|
|
16227
16902
|
props: {
|
|
16228
16903
|
hours: {
|
|
16229
16904
|
type: [Number, String],
|
|
@@ -16499,9 +17174,9 @@ var Vc = (function (exports, vue) {
|
|
|
16499
17174
|
};
|
|
16500
17175
|
}
|
|
16501
17176
|
});
|
|
16502
|
-
const COMPONENT_NAME$
|
|
17177
|
+
const COMPONENT_NAME$1r = "vc-year-table";
|
|
16503
17178
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
16504
|
-
name: COMPONENT_NAME$
|
|
17179
|
+
name: COMPONENT_NAME$1r,
|
|
16505
17180
|
props: {
|
|
16506
17181
|
value: Array,
|
|
16507
17182
|
panelDate: Date,
|
|
@@ -16617,9 +17292,9 @@ var Vc = (function (exports, vue) {
|
|
|
16617
17292
|
}
|
|
16618
17293
|
return true;
|
|
16619
17294
|
};
|
|
16620
|
-
const COMPONENT_NAME$
|
|
17295
|
+
const COMPONENT_NAME$1q = "vc-date-range-panel";
|
|
16621
17296
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
16622
|
-
name: COMPONENT_NAME$
|
|
17297
|
+
name: COMPONENT_NAME$1q,
|
|
16623
17298
|
props: {
|
|
16624
17299
|
...props$W,
|
|
16625
17300
|
confirm: {
|
|
@@ -16980,9 +17655,9 @@ var Vc = (function (exports, vue) {
|
|
|
16980
17655
|
};
|
|
16981
17656
|
}
|
|
16982
17657
|
});
|
|
16983
|
-
const COMPONENT_NAME$
|
|
17658
|
+
const COMPONENT_NAME$1p = "vc-date-panel";
|
|
16984
17659
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
16985
|
-
name: COMPONENT_NAME$
|
|
17660
|
+
name: COMPONENT_NAME$1p,
|
|
16986
17661
|
props: {
|
|
16987
17662
|
...props$W,
|
|
16988
17663
|
type: String,
|
|
@@ -17181,9 +17856,9 @@ var Vc = (function (exports, vue) {
|
|
|
17181
17856
|
const endYear = value[1].getFullYear();
|
|
17182
17857
|
return startYear === endYear;
|
|
17183
17858
|
};
|
|
17184
|
-
const COMPONENT_NAME$
|
|
17859
|
+
const COMPONENT_NAME$1o = "vc-monthrange-panel";
|
|
17185
17860
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17186
|
-
name: COMPONENT_NAME$
|
|
17861
|
+
name: COMPONENT_NAME$1o,
|
|
17187
17862
|
props: {
|
|
17188
17863
|
...props$W,
|
|
17189
17864
|
confirm: {
|
|
@@ -17353,9 +18028,9 @@ var Vc = (function (exports, vue) {
|
|
|
17353
18028
|
const endYear = value[1].getFullYear();
|
|
17354
18029
|
return startYear === endYear;
|
|
17355
18030
|
};
|
|
17356
|
-
const COMPONENT_NAME$
|
|
18031
|
+
const COMPONENT_NAME$1n = "vc-quarterrange-panel";
|
|
17357
18032
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17358
|
-
name: COMPONENT_NAME$
|
|
18033
|
+
name: COMPONENT_NAME$1n,
|
|
17359
18034
|
props: {
|
|
17360
18035
|
...props$W,
|
|
17361
18036
|
confirm: {
|
|
@@ -17586,9 +18261,9 @@ var Vc = (function (exports, vue) {
|
|
|
17586
18261
|
seconds
|
|
17587
18262
|
};
|
|
17588
18263
|
};
|
|
17589
|
-
const COMPONENT_NAME$
|
|
18264
|
+
const COMPONENT_NAME$1m = "vc-timerange-panel";
|
|
17590
18265
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17591
|
-
name: COMPONENT_NAME$
|
|
18266
|
+
name: COMPONENT_NAME$1m,
|
|
17592
18267
|
props: props$V,
|
|
17593
18268
|
emits: ["pick", "clear", "ok"],
|
|
17594
18269
|
setup(props2, {
|
|
@@ -17686,9 +18361,9 @@ var Vc = (function (exports, vue) {
|
|
|
17686
18361
|
};
|
|
17687
18362
|
}
|
|
17688
18363
|
});
|
|
17689
|
-
const COMPONENT_NAME$
|
|
18364
|
+
const COMPONENT_NAME$1l = "vc-time-panel";
|
|
17690
18365
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
17691
|
-
name: COMPONENT_NAME$
|
|
18366
|
+
name: COMPONENT_NAME$1l,
|
|
17692
18367
|
props: props$V,
|
|
17693
18368
|
emits: ["pick", "clear", "ok"],
|
|
17694
18369
|
setup(props2, {
|
|
@@ -17740,7 +18415,7 @@ var Vc = (function (exports, vue) {
|
|
|
17740
18415
|
};
|
|
17741
18416
|
}
|
|
17742
18417
|
});
|
|
17743
|
-
const COMPONENT_NAME$
|
|
18418
|
+
const COMPONENT_NAME$1k = "vc-date-picker";
|
|
17744
18419
|
const getPanel$1 = (type) => {
|
|
17745
18420
|
if (["daterange", "datetimerange"].includes(type)) {
|
|
17746
18421
|
return DateRangePanel;
|
|
@@ -17751,7 +18426,7 @@ var Vc = (function (exports, vue) {
|
|
|
17751
18426
|
}
|
|
17752
18427
|
return DatePanel;
|
|
17753
18428
|
};
|
|
17754
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
18429
|
+
const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
|
|
17755
18430
|
const props2 = vue.getCurrentInstance().props;
|
|
17756
18431
|
const icon = vue.ref("date");
|
|
17757
18432
|
const panel = vue.shallowRef({});
|
|
@@ -17787,9 +18462,9 @@ var Vc = (function (exports, vue) {
|
|
|
17787
18462
|
}
|
|
17788
18463
|
}
|
|
17789
18464
|
};
|
|
17790
|
-
const COMPONENT_NAME$
|
|
18465
|
+
const COMPONENT_NAME$1j = "vc-divider";
|
|
17791
18466
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
17792
|
-
name: COMPONENT_NAME$
|
|
18467
|
+
name: COMPONENT_NAME$1j,
|
|
17793
18468
|
props: props$U,
|
|
17794
18469
|
setup(props2, {
|
|
17795
18470
|
slots
|
|
@@ -17918,7 +18593,7 @@ var Vc = (function (exports, vue) {
|
|
|
17918
18593
|
barTo: props$S.to,
|
|
17919
18594
|
...pick(props$S, barKeys)
|
|
17920
18595
|
};
|
|
17921
|
-
const COMPONENT_NAME$
|
|
18596
|
+
const COMPONENT_NAME$1i = "vc-scroller-track";
|
|
17922
18597
|
const BAR_MAP = {
|
|
17923
18598
|
vertical: {
|
|
17924
18599
|
scroll: "scrollTop",
|
|
@@ -17938,7 +18613,7 @@ var Vc = (function (exports, vue) {
|
|
|
17938
18613
|
}
|
|
17939
18614
|
};
|
|
17940
18615
|
const Track$1 = /* @__PURE__ */ vue.defineComponent({
|
|
17941
|
-
name: COMPONENT_NAME$
|
|
18616
|
+
name: COMPONENT_NAME$1i,
|
|
17942
18617
|
props: props$T,
|
|
17943
18618
|
emits: ["change"],
|
|
17944
18619
|
inheritAttrs: false,
|
|
@@ -18100,9 +18775,9 @@ var Vc = (function (exports, vue) {
|
|
|
18100
18775
|
};
|
|
18101
18776
|
}
|
|
18102
18777
|
});
|
|
18103
|
-
const COMPONENT_NAME$
|
|
18778
|
+
const COMPONENT_NAME$1h = "vc-scroller-bar";
|
|
18104
18779
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
18105
|
-
name: COMPONENT_NAME$
|
|
18780
|
+
name: COMPONENT_NAME$1h,
|
|
18106
18781
|
props: props$S,
|
|
18107
18782
|
emits: ["change"],
|
|
18108
18783
|
setup(props2, {
|
|
@@ -18333,9 +19008,9 @@ var Vc = (function (exports, vue) {
|
|
|
18333
19008
|
refreshPosition
|
|
18334
19009
|
};
|
|
18335
19010
|
};
|
|
18336
|
-
const COMPONENT_NAME$
|
|
19011
|
+
const COMPONENT_NAME$1g = "vc-scroller";
|
|
18337
19012
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
18338
|
-
name: COMPONENT_NAME$
|
|
19013
|
+
name: COMPONENT_NAME$1g,
|
|
18339
19014
|
props: props$R,
|
|
18340
19015
|
emits: ["scroll"],
|
|
18341
19016
|
setup(props2, {
|
|
@@ -18393,9 +19068,9 @@ var Vc = (function (exports, vue) {
|
|
|
18393
19068
|
};
|
|
18394
19069
|
}
|
|
18395
19070
|
});
|
|
18396
|
-
const COMPONENT_NAME$
|
|
19071
|
+
const COMPONENT_NAME$1f = "vc-scroller-wheel";
|
|
18397
19072
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
18398
|
-
name: COMPONENT_NAME$
|
|
19073
|
+
name: COMPONENT_NAME$1f,
|
|
18399
19074
|
props: Object.assign({}, props$R, {
|
|
18400
19075
|
stopPropagation: {
|
|
18401
19076
|
type: Boolean,
|
|
@@ -18576,9 +19251,9 @@ var Vc = (function (exports, vue) {
|
|
|
18576
19251
|
type: Function
|
|
18577
19252
|
}
|
|
18578
19253
|
};
|
|
18579
|
-
const COMPONENT_NAME$
|
|
19254
|
+
const COMPONENT_NAME$1e = "vc-drawer";
|
|
18580
19255
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
18581
|
-
name: COMPONENT_NAME$
|
|
19256
|
+
name: COMPONENT_NAME$1e,
|
|
18582
19257
|
props: props$Q,
|
|
18583
19258
|
emits: ["close", "update:modelValue", "visible-change"],
|
|
18584
19259
|
setup(props2, {
|
|
@@ -18750,9 +19425,9 @@ var Vc = (function (exports, vue) {
|
|
|
18750
19425
|
default: false
|
|
18751
19426
|
}
|
|
18752
19427
|
};
|
|
18753
|
-
const COMPONENT_NAME$
|
|
19428
|
+
const COMPONENT_NAME$1d = "vc-dropdown";
|
|
18754
19429
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
18755
|
-
name: COMPONENT_NAME$
|
|
19430
|
+
name: COMPONENT_NAME$1d,
|
|
18756
19431
|
props: props$P,
|
|
18757
19432
|
inheritAttrs: false,
|
|
18758
19433
|
emits: ["update:modelValue", "ready", "close", "visible-change", "click"],
|
|
@@ -18815,9 +19490,9 @@ var Vc = (function (exports, vue) {
|
|
|
18815
19490
|
};
|
|
18816
19491
|
}
|
|
18817
19492
|
});
|
|
18818
|
-
const COMPONENT_NAME$
|
|
19493
|
+
const COMPONENT_NAME$1c = "vc-dropdown-menu";
|
|
18819
19494
|
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
18820
|
-
name: COMPONENT_NAME$
|
|
19495
|
+
name: COMPONENT_NAME$1c,
|
|
18821
19496
|
setup(_, {
|
|
18822
19497
|
slots
|
|
18823
19498
|
}) {
|
|
@@ -18828,9 +19503,9 @@ var Vc = (function (exports, vue) {
|
|
|
18828
19503
|
};
|
|
18829
19504
|
}
|
|
18830
19505
|
});
|
|
18831
|
-
const COMPONENT_NAME$
|
|
19506
|
+
const COMPONENT_NAME$1b = "vc-dropdown-item";
|
|
18832
19507
|
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
18833
|
-
name: COMPONENT_NAME$
|
|
19508
|
+
name: COMPONENT_NAME$1b,
|
|
18834
19509
|
emits: ["click"],
|
|
18835
19510
|
props: {
|
|
18836
19511
|
value: {
|
|
@@ -19029,9 +19704,9 @@ var Vc = (function (exports, vue) {
|
|
|
19029
19704
|
["link", "upload/video", "upload/image", "undo", "redo"]
|
|
19030
19705
|
]
|
|
19031
19706
|
};
|
|
19032
|
-
const COMPONENT_NAME$
|
|
19707
|
+
const COMPONENT_NAME$1a = "vc-editor-toolbar";
|
|
19033
19708
|
const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
19034
|
-
name: COMPONENT_NAME$
|
|
19709
|
+
name: COMPONENT_NAME$1a,
|
|
19035
19710
|
props: {
|
|
19036
19711
|
options: [Array, Object],
|
|
19037
19712
|
elementId: String
|
|
@@ -19231,9 +19906,9 @@ var Vc = (function (exports, vue) {
|
|
|
19231
19906
|
default: "div"
|
|
19232
19907
|
}
|
|
19233
19908
|
};
|
|
19234
|
-
const COMPONENT_NAME$
|
|
19909
|
+
const COMPONENT_NAME$19 = "vc-image-preview";
|
|
19235
19910
|
const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19236
|
-
name: COMPONENT_NAME$
|
|
19911
|
+
name: COMPONENT_NAME$19,
|
|
19237
19912
|
props: props$O,
|
|
19238
19913
|
setup(props2, {
|
|
19239
19914
|
slots
|
|
@@ -19423,9 +20098,9 @@ var Vc = (function (exports, vue) {
|
|
|
19423
20098
|
default: false
|
|
19424
20099
|
}
|
|
19425
20100
|
};
|
|
19426
|
-
const COMPONENT_NAME$
|
|
20101
|
+
const COMPONENT_NAME$18 = "vc-upload";
|
|
19427
20102
|
const Upload$1 = vue.defineComponent({
|
|
19428
|
-
name: COMPONENT_NAME$
|
|
20103
|
+
name: COMPONENT_NAME$18,
|
|
19429
20104
|
props: props$N,
|
|
19430
20105
|
emits: [
|
|
19431
20106
|
"message",
|
|
@@ -19948,9 +20623,9 @@ var Vc = (function (exports, vue) {
|
|
|
19948
20623
|
default: true
|
|
19949
20624
|
}
|
|
19950
20625
|
};
|
|
19951
|
-
const COMPONENT_NAME$
|
|
20626
|
+
const COMPONENT_NAME$17 = "vc-editor";
|
|
19952
20627
|
const Editor$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19953
|
-
name: COMPONENT_NAME$
|
|
20628
|
+
name: COMPONENT_NAME$17,
|
|
19954
20629
|
props: props$M,
|
|
19955
20630
|
defaults: defaults$3,
|
|
19956
20631
|
emits: ["ready", "blur", "focus", "input", "update:modelValue", "change"],
|
|
@@ -20131,7 +20806,7 @@ var Vc = (function (exports, vue) {
|
|
|
20131
20806
|
};
|
|
20132
20807
|
}
|
|
20133
20808
|
});
|
|
20134
|
-
const COMPONENT_NAME$
|
|
20809
|
+
const COMPONENT_NAME$16 = "vc-editor-view";
|
|
20135
20810
|
const setImages = (v) => {
|
|
20136
20811
|
if (!v) return;
|
|
20137
20812
|
const IMG_REGX = /<img.*?(?:>|\/>)/gi;
|
|
@@ -20148,7 +20823,7 @@ var Vc = (function (exports, vue) {
|
|
|
20148
20823
|
return;
|
|
20149
20824
|
};
|
|
20150
20825
|
const EditorView = /* @__PURE__ */ vue.defineComponent({
|
|
20151
|
-
name: COMPONENT_NAME$
|
|
20826
|
+
name: COMPONENT_NAME$16,
|
|
20152
20827
|
props: {
|
|
20153
20828
|
value: {
|
|
20154
20829
|
type: String,
|
|
@@ -20356,9 +21031,9 @@ var Vc = (function (exports, vue) {
|
|
|
20356
21031
|
validateField
|
|
20357
21032
|
});
|
|
20358
21033
|
};
|
|
20359
|
-
const COMPONENT_NAME$
|
|
21034
|
+
const COMPONENT_NAME$15 = "vc-form";
|
|
20360
21035
|
const Form = vue.defineComponent({
|
|
20361
|
-
name: COMPONENT_NAME$
|
|
21036
|
+
name: COMPONENT_NAME$15,
|
|
20362
21037
|
props: props$L,
|
|
20363
21038
|
setup(props2, { slots, expose }) {
|
|
20364
21039
|
useForm(expose);
|
|
@@ -20701,9 +21376,9 @@ var Vc = (function (exports, vue) {
|
|
|
20701
21376
|
labelPosition
|
|
20702
21377
|
};
|
|
20703
21378
|
};
|
|
20704
|
-
const COMPONENT_NAME$
|
|
21379
|
+
const COMPONENT_NAME$14 = "vc-form-item";
|
|
20705
21380
|
const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20706
|
-
name: COMPONENT_NAME$
|
|
21381
|
+
name: COMPONENT_NAME$14,
|
|
20707
21382
|
props: props$K,
|
|
20708
21383
|
setup(props2, {
|
|
20709
21384
|
slots,
|
|
@@ -20769,9 +21444,9 @@ var Vc = (function (exports, vue) {
|
|
|
20769
21444
|
default: false
|
|
20770
21445
|
}
|
|
20771
21446
|
};
|
|
20772
|
-
const COMPONENT_NAME$
|
|
21447
|
+
const COMPONENT_NAME$13 = "vcm-form";
|
|
20773
21448
|
const MForm = vue.defineComponent({
|
|
20774
|
-
name: COMPONENT_NAME$
|
|
21449
|
+
name: COMPONENT_NAME$13,
|
|
20775
21450
|
props: props$J,
|
|
20776
21451
|
setup(props2, { slots, expose }) {
|
|
20777
21452
|
useForm(expose, {
|
|
@@ -20798,9 +21473,9 @@ var Vc = (function (exports, vue) {
|
|
|
20798
21473
|
default: 12
|
|
20799
21474
|
}
|
|
20800
21475
|
};
|
|
20801
|
-
const COMPONENT_NAME$
|
|
21476
|
+
const COMPONENT_NAME$12 = "vcm-form-item";
|
|
20802
21477
|
const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
20803
|
-
name: COMPONENT_NAME$
|
|
21478
|
+
name: COMPONENT_NAME$12,
|
|
20804
21479
|
props: props$I,
|
|
20805
21480
|
setup(props2, {
|
|
20806
21481
|
slots,
|
|
@@ -20854,9 +21529,9 @@ var Vc = (function (exports, vue) {
|
|
|
20854
21529
|
};
|
|
20855
21530
|
}
|
|
20856
21531
|
});
|
|
20857
|
-
const COMPONENT_NAME
|
|
21532
|
+
const COMPONENT_NAME$11 = "vc-fragment";
|
|
20858
21533
|
const Fragment = vue.defineComponent({
|
|
20859
|
-
name: COMPONENT_NAME
|
|
21534
|
+
name: COMPONENT_NAME$11,
|
|
20860
21535
|
setup(_, { slots }) {
|
|
20861
21536
|
return () => vue.h(vue.Fragment, slots.default?.());
|
|
20862
21537
|
}
|
|
@@ -20890,9 +21565,9 @@ var Vc = (function (exports, vue) {
|
|
|
20890
21565
|
default: () => ({})
|
|
20891
21566
|
}
|
|
20892
21567
|
};
|
|
20893
|
-
const COMPONENT_NAME$
|
|
21568
|
+
const COMPONENT_NAME$10 = "vc-snapshot";
|
|
20894
21569
|
const Snapshot = /* @__PURE__ */ vue.defineComponent({
|
|
20895
|
-
name: COMPONENT_NAME$
|
|
21570
|
+
name: COMPONENT_NAME$10,
|
|
20896
21571
|
props: props$H,
|
|
20897
21572
|
emits: ["ready"],
|
|
20898
21573
|
setup(props2, {
|
|
@@ -21044,7 +21719,7 @@ var Vc = (function (exports, vue) {
|
|
|
21044
21719
|
}
|
|
21045
21720
|
}
|
|
21046
21721
|
const IMGStore$1 = new IMGStore();
|
|
21047
|
-
const COMPONENT_NAME
|
|
21722
|
+
const COMPONENT_NAME$$ = "vc-image";
|
|
21048
21723
|
let isSupportObjectFit = false;
|
|
21049
21724
|
window.addEventListener("DOMContentLoaded", () => {
|
|
21050
21725
|
isSupportObjectFit = !IS_SERVER$3 && document.documentElement.style.objectFit !== void 0;
|
|
@@ -21057,7 +21732,7 @@ var Vc = (function (exports, vue) {
|
|
|
21057
21732
|
SCALE_DOWN: "scale-down"
|
|
21058
21733
|
};
|
|
21059
21734
|
const Image$1$1 = /* @__PURE__ */ vue.defineComponent({
|
|
21060
|
-
name: COMPONENT_NAME
|
|
21735
|
+
name: COMPONENT_NAME$$,
|
|
21061
21736
|
inheritAttrs: false,
|
|
21062
21737
|
props: props$G,
|
|
21063
21738
|
setup(props2, {
|
|
@@ -21265,9 +21940,9 @@ var Vc = (function (exports, vue) {
|
|
|
21265
21940
|
default: "div"
|
|
21266
21941
|
}
|
|
21267
21942
|
};
|
|
21268
|
-
const COMPONENT_NAME$
|
|
21943
|
+
const COMPONENT_NAME$_ = "vc-image-crop";
|
|
21269
21944
|
const ImageCrop = /* @__PURE__ */ vue.defineComponent({
|
|
21270
|
-
name: COMPONENT_NAME$
|
|
21945
|
+
name: COMPONENT_NAME$_,
|
|
21271
21946
|
props: props$F,
|
|
21272
21947
|
setup(props2, {
|
|
21273
21948
|
slots
|
|
@@ -21287,9 +21962,9 @@ var Vc = (function (exports, vue) {
|
|
|
21287
21962
|
default: "div"
|
|
21288
21963
|
}
|
|
21289
21964
|
};
|
|
21290
|
-
const COMPONENT_NAME$
|
|
21965
|
+
const COMPONENT_NAME$Z = "vc-image-processing";
|
|
21291
21966
|
const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
|
|
21292
|
-
name: COMPONENT_NAME$
|
|
21967
|
+
name: COMPONENT_NAME$Z,
|
|
21293
21968
|
props: props$E,
|
|
21294
21969
|
setup(props2, {
|
|
21295
21970
|
slots
|
|
@@ -21302,9 +21977,9 @@ var Vc = (function (exports, vue) {
|
|
|
21302
21977
|
}
|
|
21303
21978
|
});
|
|
21304
21979
|
const MImageProcessing = ImageProcessing;
|
|
21305
|
-
const COMPONENT_NAME$
|
|
21980
|
+
const COMPONENT_NAME$Y = "vcm-input";
|
|
21306
21981
|
const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
21307
|
-
name: COMPONENT_NAME$
|
|
21982
|
+
name: COMPONENT_NAME$Y,
|
|
21308
21983
|
inheritAttrs: false,
|
|
21309
21984
|
props: {
|
|
21310
21985
|
...props$1h,
|
|
@@ -21391,9 +22066,9 @@ var Vc = (function (exports, vue) {
|
|
|
21391
22066
|
};
|
|
21392
22067
|
}
|
|
21393
22068
|
});
|
|
21394
|
-
const COMPONENT_NAME$
|
|
22069
|
+
const COMPONENT_NAME$X = "vcm-input-number";
|
|
21395
22070
|
const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
21396
|
-
name: COMPONENT_NAME$
|
|
22071
|
+
name: COMPONENT_NAME$X,
|
|
21397
22072
|
props: props$1g,
|
|
21398
22073
|
inheritAttrs: false,
|
|
21399
22074
|
setup(props2, {
|
|
@@ -21439,9 +22114,9 @@ var Vc = (function (exports, vue) {
|
|
|
21439
22114
|
};
|
|
21440
22115
|
}
|
|
21441
22116
|
});
|
|
21442
|
-
const COMPONENT_NAME$
|
|
22117
|
+
const COMPONENT_NAME$W = "vcm-input-search";
|
|
21443
22118
|
const MInputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
21444
|
-
name: COMPONENT_NAME$
|
|
22119
|
+
name: COMPONENT_NAME$W,
|
|
21445
22120
|
props: {
|
|
21446
22121
|
...props$1f,
|
|
21447
22122
|
cancelText: {
|
|
@@ -21515,9 +22190,9 @@ var Vc = (function (exports, vue) {
|
|
|
21515
22190
|
default: true
|
|
21516
22191
|
}
|
|
21517
22192
|
};
|
|
21518
|
-
const COMPONENT_NAME$
|
|
22193
|
+
const COMPONENT_NAME$V = "vcm-list";
|
|
21519
22194
|
const MList = vue.defineComponent({
|
|
21520
|
-
name: COMPONENT_NAME$
|
|
22195
|
+
name: COMPONENT_NAME$V,
|
|
21521
22196
|
props: props$D,
|
|
21522
22197
|
setup(props2, { slots }) {
|
|
21523
22198
|
vue.provide("vc-list", { props: props2 });
|
|
@@ -21568,10 +22243,10 @@ var Vc = (function (exports, vue) {
|
|
|
21568
22243
|
// MListItem是否独立存在
|
|
21569
22244
|
alone: Boolean
|
|
21570
22245
|
};
|
|
21571
|
-
const COMPONENT_NAME$
|
|
22246
|
+
const COMPONENT_NAME$U = "vcm-list-item";
|
|
21572
22247
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
21573
22248
|
const MListItem = /* @__PURE__ */ vue.defineComponent({
|
|
21574
|
-
name: COMPONENT_NAME$
|
|
22249
|
+
name: COMPONENT_NAME$U,
|
|
21575
22250
|
props: props$C,
|
|
21576
22251
|
emits: ["click"],
|
|
21577
22252
|
setup(props2, {
|
|
@@ -21655,11 +22330,11 @@ var Vc = (function (exports, vue) {
|
|
|
21655
22330
|
default: false
|
|
21656
22331
|
}
|
|
21657
22332
|
};
|
|
21658
|
-
const COMPONENT_NAME$
|
|
22333
|
+
const COMPONENT_NAME$T = "vc-marquee";
|
|
21659
22334
|
const ANIMATION = prefixStyle("animation").camel;
|
|
21660
22335
|
const TRANSFORM_KEBAB = prefixStyle("transform").kebab;
|
|
21661
22336
|
const Marquee = /* @__PURE__ */ vue.defineComponent({
|
|
21662
|
-
name: COMPONENT_NAME$
|
|
22337
|
+
name: COMPONENT_NAME$T,
|
|
21663
22338
|
props: props$B,
|
|
21664
22339
|
setup(props2, {
|
|
21665
22340
|
slots
|
|
@@ -21720,9 +22395,9 @@ var Vc = (function (exports, vue) {
|
|
|
21720
22395
|
default: true
|
|
21721
22396
|
}
|
|
21722
22397
|
};
|
|
21723
|
-
const COMPONENT_NAME$
|
|
22398
|
+
const COMPONENT_NAME$S = "vc-resizer";
|
|
21724
22399
|
const Resizer = vue.defineComponent({
|
|
21725
|
-
name: COMPONENT_NAME$
|
|
22400
|
+
name: COMPONENT_NAME$S,
|
|
21726
22401
|
props: props$A,
|
|
21727
22402
|
emits: ["resize"],
|
|
21728
22403
|
setup(props2, { emit, slots, expose }) {
|
|
@@ -21888,10 +22563,10 @@ var Vc = (function (exports, vue) {
|
|
|
21888
22563
|
type: Function
|
|
21889
22564
|
}
|
|
21890
22565
|
};
|
|
21891
|
-
const COMPONENT_NAME$
|
|
22566
|
+
const COMPONENT_NAME$R = "vc-modal";
|
|
21892
22567
|
let zIndexNumber = 1002;
|
|
21893
22568
|
const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
21894
|
-
name: COMPONENT_NAME$
|
|
22569
|
+
name: COMPONENT_NAME$R,
|
|
21895
22570
|
emits: ["update:modelValue", "close", "portal-fulfilled", "visible-change", "ok", "cancel"],
|
|
21896
22571
|
props: props$z,
|
|
21897
22572
|
setup(props2, {
|
|
@@ -22281,9 +22956,9 @@ var Vc = (function (exports, vue) {
|
|
|
22281
22956
|
type: Function
|
|
22282
22957
|
}
|
|
22283
22958
|
};
|
|
22284
|
-
const COMPONENT_NAME$
|
|
22959
|
+
const COMPONENT_NAME$Q = "vc-modal";
|
|
22285
22960
|
const MModalView = /* @__PURE__ */ vue.defineComponent({
|
|
22286
|
-
name: COMPONENT_NAME$
|
|
22961
|
+
name: COMPONENT_NAME$Q,
|
|
22287
22962
|
emits: ["update:modelValue", "portal-fulfilled", "close", "ok", "cancel"],
|
|
22288
22963
|
props: props$y,
|
|
22289
22964
|
setup(props2, {
|
|
@@ -22478,9 +23153,9 @@ var Vc = (function (exports, vue) {
|
|
|
22478
23153
|
// 这个相当于Modal中的onCancel,支持Promise
|
|
22479
23154
|
onBeforeClose: Function
|
|
22480
23155
|
};
|
|
22481
|
-
const COMPONENT_NAME$
|
|
23156
|
+
const COMPONENT_NAME$P = "vc-notice";
|
|
22482
23157
|
const NoticeView = /* @__PURE__ */ vue.defineComponent({
|
|
22483
|
-
name: COMPONENT_NAME$
|
|
23158
|
+
name: COMPONENT_NAME$P,
|
|
22484
23159
|
props: props$x,
|
|
22485
23160
|
emits: ["portal-fulfilled", "close", "before-close"],
|
|
22486
23161
|
setup(props2, {
|
|
@@ -22646,9 +23321,9 @@ var Vc = (function (exports, vue) {
|
|
|
22646
23321
|
default: "div"
|
|
22647
23322
|
}
|
|
22648
23323
|
};
|
|
22649
|
-
const COMPONENT_NAME$
|
|
23324
|
+
const COMPONENT_NAME$O = "vc-option";
|
|
22650
23325
|
const Option$1 = /* @__PURE__ */ vue.defineComponent({
|
|
22651
|
-
name: COMPONENT_NAME$
|
|
23326
|
+
name: COMPONENT_NAME$O,
|
|
22652
23327
|
props: props$w,
|
|
22653
23328
|
setup(props2, {
|
|
22654
23329
|
slots
|
|
@@ -22726,9 +23401,9 @@ var Vc = (function (exports, vue) {
|
|
|
22726
23401
|
type: [String, Number]
|
|
22727
23402
|
}
|
|
22728
23403
|
};
|
|
22729
|
-
const COMPONENT_NAME$
|
|
23404
|
+
const COMPONENT_NAME$N = "vc-tag";
|
|
22730
23405
|
const Tag = /* @__PURE__ */ vue.defineComponent({
|
|
22731
|
-
name: COMPONENT_NAME$
|
|
23406
|
+
name: COMPONENT_NAME$N,
|
|
22732
23407
|
props: props$u,
|
|
22733
23408
|
emits: ["close", "change"],
|
|
22734
23409
|
setup(props2, {
|
|
@@ -22795,9 +23470,9 @@ var Vc = (function (exports, vue) {
|
|
|
22795
23470
|
render: [Function],
|
|
22796
23471
|
row: Object
|
|
22797
23472
|
};
|
|
22798
|
-
const COMPONENT_NAME$
|
|
23473
|
+
const COMPONENT_NAME$M = "vc-select-option";
|
|
22799
23474
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
22800
|
-
name: COMPONENT_NAME$
|
|
23475
|
+
name: COMPONENT_NAME$M,
|
|
22801
23476
|
props: props$t,
|
|
22802
23477
|
setup(props2, {
|
|
22803
23478
|
slots,
|
|
@@ -22886,9 +23561,9 @@ var Vc = (function (exports, vue) {
|
|
|
22886
23561
|
row: Object,
|
|
22887
23562
|
render: [Function]
|
|
22888
23563
|
};
|
|
22889
|
-
const COMPONENT_NAME$
|
|
23564
|
+
const COMPONENT_NAME$L = "vc-select-option-group";
|
|
22890
23565
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
22891
|
-
name: COMPONENT_NAME$
|
|
23566
|
+
name: COMPONENT_NAME$L,
|
|
22892
23567
|
props: props$s,
|
|
22893
23568
|
setup(props2, {
|
|
22894
23569
|
slots
|
|
@@ -22915,9 +23590,9 @@ var Vc = (function (exports, vue) {
|
|
|
22915
23590
|
};
|
|
22916
23591
|
}
|
|
22917
23592
|
});
|
|
22918
|
-
const COMPONENT_NAME$
|
|
23593
|
+
const COMPONENT_NAME$K = "vc-select-all";
|
|
22919
23594
|
const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
22920
|
-
name: COMPONENT_NAME$
|
|
23595
|
+
name: COMPONENT_NAME$K,
|
|
22921
23596
|
props: {
|
|
22922
23597
|
data: {
|
|
22923
23598
|
type: Array,
|
|
@@ -22971,9 +23646,9 @@ var Vc = (function (exports, vue) {
|
|
|
22971
23646
|
};
|
|
22972
23647
|
}
|
|
22973
23648
|
});
|
|
22974
|
-
const COMPONENT_NAME$
|
|
23649
|
+
const COMPONENT_NAME$J = "vc-select";
|
|
22975
23650
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
22976
|
-
name: COMPONENT_NAME$
|
|
23651
|
+
name: COMPONENT_NAME$J,
|
|
22977
23652
|
props: props$1a,
|
|
22978
23653
|
emits: ["ready", "close", "visible-change", "clear", "change", "update:modelValue"],
|
|
22979
23654
|
setup(props2, {
|
|
@@ -23254,9 +23929,9 @@ var Vc = (function (exports, vue) {
|
|
|
23254
23929
|
};
|
|
23255
23930
|
}
|
|
23256
23931
|
});
|
|
23257
|
-
const COMPONENT_NAME$
|
|
23932
|
+
const COMPONENT_NAME$I = "vc-pagination";
|
|
23258
23933
|
const Pagination = /* @__PURE__ */ vue.defineComponent({
|
|
23259
|
-
name: COMPONENT_NAME$
|
|
23934
|
+
name: COMPONENT_NAME$I,
|
|
23260
23935
|
props: props$v,
|
|
23261
23936
|
emits: ["update:current", "change", "page-size-change"],
|
|
23262
23937
|
setup(props2, {
|
|
@@ -23447,9 +24122,9 @@ var Vc = (function (exports, vue) {
|
|
|
23447
24122
|
default: "div"
|
|
23448
24123
|
}
|
|
23449
24124
|
};
|
|
23450
|
-
const COMPONENT_NAME$
|
|
24125
|
+
const COMPONENT_NAME$H = "vc-picker";
|
|
23451
24126
|
const Picker$1 = /* @__PURE__ */ vue.defineComponent({
|
|
23452
|
-
name: COMPONENT_NAME$
|
|
24127
|
+
name: COMPONENT_NAME$H,
|
|
23453
24128
|
props: props$r,
|
|
23454
24129
|
setup(props2, {
|
|
23455
24130
|
slots
|
|
@@ -23507,9 +24182,9 @@ var Vc = (function (exports, vue) {
|
|
|
23507
24182
|
width: [String, Number],
|
|
23508
24183
|
portalClass: [String, Object]
|
|
23509
24184
|
};
|
|
23510
|
-
const COMPONENT_NAME$
|
|
24185
|
+
const COMPONENT_NAME$G = "vc-popconfirm";
|
|
23511
24186
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
23512
|
-
name: COMPONENT_NAME$
|
|
24187
|
+
name: COMPONENT_NAME$G,
|
|
23513
24188
|
props: props$q,
|
|
23514
24189
|
inheritAttrs: false,
|
|
23515
24190
|
emits: ["update:modelValue", "visible-change", "ready", "close", "cancel", "ok"],
|
|
@@ -23669,9 +24344,9 @@ var Vc = (function (exports, vue) {
|
|
|
23669
24344
|
})
|
|
23670
24345
|
}
|
|
23671
24346
|
};
|
|
23672
|
-
const COMPONENT_NAME$
|
|
24347
|
+
const COMPONENT_NAME$F = "vc-popup";
|
|
23673
24348
|
const MPopup = /* @__PURE__ */ vue.defineComponent({
|
|
23674
|
-
name: COMPONENT_NAME$
|
|
24349
|
+
name: COMPONENT_NAME$F,
|
|
23675
24350
|
props: props$p,
|
|
23676
24351
|
emits: ["update:modelValue", "close", "portal-fulfilled", "visible-change"],
|
|
23677
24352
|
setup(props2, {
|
|
@@ -23780,9 +24455,9 @@ var Vc = (function (exports, vue) {
|
|
|
23780
24455
|
default: "div"
|
|
23781
24456
|
}
|
|
23782
24457
|
};
|
|
23783
|
-
const COMPONENT_NAME$
|
|
24458
|
+
const COMPONENT_NAME$E = "vc-print";
|
|
23784
24459
|
const Print = /* @__PURE__ */ vue.defineComponent({
|
|
23785
|
-
name: COMPONENT_NAME$
|
|
24460
|
+
name: COMPONENT_NAME$E,
|
|
23786
24461
|
props: props$o,
|
|
23787
24462
|
setup(props2, {
|
|
23788
24463
|
expose,
|
|
@@ -23853,7 +24528,7 @@ var Vc = (function (exports, vue) {
|
|
|
23853
24528
|
},
|
|
23854
24529
|
strokeColor: {
|
|
23855
24530
|
type: String,
|
|
23856
|
-
default: "#
|
|
24531
|
+
default: "#456CF6"
|
|
23857
24532
|
},
|
|
23858
24533
|
trackColor: {
|
|
23859
24534
|
type: String,
|
|
@@ -23872,9 +24547,9 @@ var Vc = (function (exports, vue) {
|
|
|
23872
24547
|
})
|
|
23873
24548
|
}
|
|
23874
24549
|
};
|
|
23875
|
-
const COMPONENT_NAME$
|
|
24550
|
+
const COMPONENT_NAME$D = "vc-progress-circle";
|
|
23876
24551
|
const Circle$1 = /* @__PURE__ */ vue.defineComponent({
|
|
23877
|
-
name: COMPONENT_NAME$
|
|
24552
|
+
name: COMPONENT_NAME$D,
|
|
23878
24553
|
props: props$n,
|
|
23879
24554
|
setup(props2, {
|
|
23880
24555
|
slots
|
|
@@ -23931,9 +24606,9 @@ var Vc = (function (exports, vue) {
|
|
|
23931
24606
|
};
|
|
23932
24607
|
}
|
|
23933
24608
|
});
|
|
23934
|
-
const COMPONENT_NAME$
|
|
24609
|
+
const COMPONENT_NAME$C = "vc-progress-line";
|
|
23935
24610
|
const Line$2 = /* @__PURE__ */ vue.defineComponent({
|
|
23936
|
-
name: COMPONENT_NAME$
|
|
24611
|
+
name: COMPONENT_NAME$C,
|
|
23937
24612
|
props: props$n,
|
|
23938
24613
|
setup(props2) {
|
|
23939
24614
|
const colorStyle = vue.computed(() => {
|
|
@@ -23977,9 +24652,9 @@ var Vc = (function (exports, vue) {
|
|
|
23977
24652
|
function _isSlot(s) {
|
|
23978
24653
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
23979
24654
|
}
|
|
23980
|
-
const COMPONENT_NAME$
|
|
24655
|
+
const COMPONENT_NAME$B = "vc-progress";
|
|
23981
24656
|
const Progress = /* @__PURE__ */ vue.defineComponent({
|
|
23982
|
-
name: COMPONENT_NAME$
|
|
24657
|
+
name: COMPONENT_NAME$B,
|
|
23983
24658
|
props: props$n,
|
|
23984
24659
|
setup(props2, {
|
|
23985
24660
|
slots
|
|
@@ -24135,9 +24810,9 @@ var Vc = (function (exports, vue) {
|
|
|
24135
24810
|
computedLabel
|
|
24136
24811
|
};
|
|
24137
24812
|
};
|
|
24138
|
-
const COMPONENT_NAME$
|
|
24813
|
+
const COMPONENT_NAME$A = "vc-radio";
|
|
24139
24814
|
const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
24140
|
-
name: COMPONENT_NAME$
|
|
24815
|
+
name: COMPONENT_NAME$A,
|
|
24141
24816
|
props: props$m,
|
|
24142
24817
|
emits: ["update:modelValue", "change"],
|
|
24143
24818
|
setup(props2, {
|
|
@@ -24178,9 +24853,9 @@ var Vc = (function (exports, vue) {
|
|
|
24178
24853
|
};
|
|
24179
24854
|
}
|
|
24180
24855
|
});
|
|
24181
|
-
const COMPONENT_NAME$
|
|
24856
|
+
const COMPONENT_NAME$z = "vc-radio-button";
|
|
24182
24857
|
const RadioButton = /* @__PURE__ */ vue.defineComponent({
|
|
24183
|
-
name: COMPONENT_NAME$
|
|
24858
|
+
name: COMPONENT_NAME$z,
|
|
24184
24859
|
props: {
|
|
24185
24860
|
...props$m,
|
|
24186
24861
|
labelStyle: [String, Object],
|
|
@@ -24288,9 +24963,9 @@ var Vc = (function (exports, vue) {
|
|
|
24288
24963
|
reset
|
|
24289
24964
|
};
|
|
24290
24965
|
};
|
|
24291
|
-
const COMPONENT_NAME$
|
|
24966
|
+
const COMPONENT_NAME$y = "vc-radio-group";
|
|
24292
24967
|
const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
24293
|
-
name: COMPONENT_NAME$
|
|
24968
|
+
name: COMPONENT_NAME$y,
|
|
24294
24969
|
props: props$l,
|
|
24295
24970
|
emits: ["update:modelValue", "change"],
|
|
24296
24971
|
setup(props2, {
|
|
@@ -24308,9 +24983,9 @@ var Vc = (function (exports, vue) {
|
|
|
24308
24983
|
};
|
|
24309
24984
|
}
|
|
24310
24985
|
});
|
|
24311
|
-
const COMPONENT_NAME$
|
|
24986
|
+
const COMPONENT_NAME$x = "vcm-radio";
|
|
24312
24987
|
const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
24313
|
-
name: COMPONENT_NAME$
|
|
24988
|
+
name: COMPONENT_NAME$x,
|
|
24314
24989
|
props: props$m,
|
|
24315
24990
|
emits: ["update:modelValue", "change"],
|
|
24316
24991
|
setup(props2, {
|
|
@@ -24351,9 +25026,9 @@ var Vc = (function (exports, vue) {
|
|
|
24351
25026
|
};
|
|
24352
25027
|
}
|
|
24353
25028
|
});
|
|
24354
|
-
const COMPONENT_NAME$
|
|
25029
|
+
const COMPONENT_NAME$w = "vcm-radio-group";
|
|
24355
25030
|
const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
24356
|
-
name: COMPONENT_NAME$
|
|
25031
|
+
name: COMPONENT_NAME$w,
|
|
24357
25032
|
props: props$l,
|
|
24358
25033
|
emits: ["update:modelValue", "change"],
|
|
24359
25034
|
setup(props2, {
|
|
@@ -24415,9 +25090,9 @@ var Vc = (function (exports, vue) {
|
|
|
24415
25090
|
default: () => ({})
|
|
24416
25091
|
}
|
|
24417
25092
|
};
|
|
24418
|
-
const COMPONENT_NAME$
|
|
25093
|
+
const COMPONENT_NAME$v = "vc-rate";
|
|
24419
25094
|
const Rate = /* @__PURE__ */ vue.defineComponent({
|
|
24420
|
-
name: COMPONENT_NAME$
|
|
25095
|
+
name: COMPONENT_NAME$v,
|
|
24421
25096
|
props: props$k,
|
|
24422
25097
|
emits: ["update:modelValue", "change"],
|
|
24423
25098
|
setup(props2, {
|
|
@@ -24612,9 +25287,9 @@ var Vc = (function (exports, vue) {
|
|
|
24612
25287
|
renderPlaceholder: Function,
|
|
24613
25288
|
renderRefresh: Function
|
|
24614
25289
|
};
|
|
24615
|
-
const COMPONENT_NAME$
|
|
25290
|
+
const COMPONENT_NAME$u = "vc-recycle-list-scroll-state";
|
|
24616
25291
|
const ScrollState = /* @__PURE__ */ vue.defineComponent({
|
|
24617
|
-
name: COMPONENT_NAME$
|
|
25292
|
+
name: COMPONENT_NAME$u,
|
|
24618
25293
|
setup(_, {
|
|
24619
25294
|
slots
|
|
24620
25295
|
}) {
|
|
@@ -24738,10 +25413,10 @@ var Vc = (function (exports, vue) {
|
|
|
24738
25413
|
);
|
|
24739
25414
|
return keys;
|
|
24740
25415
|
};
|
|
24741
|
-
const COMPONENT_NAME$
|
|
25416
|
+
const COMPONENT_NAME$t = "vc-recycle-list-container";
|
|
24742
25417
|
const transformKey = prefixStyle("transform").camel;
|
|
24743
25418
|
const Container$1 = /* @__PURE__ */ vue.defineComponent({
|
|
24744
|
-
name: COMPONENT_NAME$
|
|
25419
|
+
name: COMPONENT_NAME$t,
|
|
24745
25420
|
props: props$i,
|
|
24746
25421
|
emits: ["refresh"],
|
|
24747
25422
|
setup(props2, {
|
|
@@ -24834,9 +25509,9 @@ var Vc = (function (exports, vue) {
|
|
|
24834
25509
|
};
|
|
24835
25510
|
}
|
|
24836
25511
|
});
|
|
24837
|
-
const COMPONENT_NAME$
|
|
25512
|
+
const COMPONENT_NAME$s = "vc-recycle-list";
|
|
24838
25513
|
const RecycleList = /* @__PURE__ */ vue.defineComponent({
|
|
24839
|
-
name: COMPONENT_NAME$
|
|
25514
|
+
name: COMPONENT_NAME$s,
|
|
24840
25515
|
props: props$j,
|
|
24841
25516
|
emits: ["scroll", "row-resize"],
|
|
24842
25517
|
setup(props2, {
|
|
@@ -25361,9 +26036,9 @@ var Vc = (function (exports, vue) {
|
|
|
25361
26036
|
default: "div"
|
|
25362
26037
|
}
|
|
25363
26038
|
};
|
|
25364
|
-
const COMPONENT_NAME$
|
|
26039
|
+
const COMPONENT_NAME$r = "vc-slider";
|
|
25365
26040
|
const Slider = /* @__PURE__ */ vue.defineComponent({
|
|
25366
|
-
name: COMPONENT_NAME$
|
|
26041
|
+
name: COMPONENT_NAME$r,
|
|
25367
26042
|
props: props$h,
|
|
25368
26043
|
setup(props2, {
|
|
25369
26044
|
slots
|
|
@@ -25382,9 +26057,9 @@ var Vc = (function (exports, vue) {
|
|
|
25382
26057
|
default: "div"
|
|
25383
26058
|
}
|
|
25384
26059
|
};
|
|
25385
|
-
const COMPONENT_NAME$
|
|
26060
|
+
const COMPONENT_NAME$q = "vc-sort-list";
|
|
25386
26061
|
const SortList = /* @__PURE__ */ vue.defineComponent({
|
|
25387
|
-
name: COMPONENT_NAME$
|
|
26062
|
+
name: COMPONENT_NAME$q,
|
|
25388
26063
|
props: props$g,
|
|
25389
26064
|
setup(props2, {
|
|
25390
26065
|
slots
|
|
@@ -25403,9 +26078,9 @@ var Vc = (function (exports, vue) {
|
|
|
25403
26078
|
default: "div"
|
|
25404
26079
|
}
|
|
25405
26080
|
};
|
|
25406
|
-
const COMPONENT_NAME$
|
|
26081
|
+
const COMPONENT_NAME$p = "vc-steps";
|
|
25407
26082
|
const Steps = /* @__PURE__ */ vue.defineComponent({
|
|
25408
|
-
name: COMPONENT_NAME$
|
|
26083
|
+
name: COMPONENT_NAME$p,
|
|
25409
26084
|
props: props$f,
|
|
25410
26085
|
setup(props2, {
|
|
25411
26086
|
slots
|
|
@@ -25525,9 +26200,9 @@ var Vc = (function (exports, vue) {
|
|
|
25525
26200
|
reset
|
|
25526
26201
|
};
|
|
25527
26202
|
};
|
|
25528
|
-
const COMPONENT_NAME$
|
|
26203
|
+
const COMPONENT_NAME$o = "vc-switch";
|
|
25529
26204
|
const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
25530
|
-
name: COMPONENT_NAME$
|
|
26205
|
+
name: COMPONENT_NAME$o,
|
|
25531
26206
|
props: props$e,
|
|
25532
26207
|
// click -> onClick要被拦截,此处不能放置
|
|
25533
26208
|
emits: ["update:modelValue", "change", "click"],
|
|
@@ -25598,9 +26273,9 @@ var Vc = (function (exports, vue) {
|
|
|
25598
26273
|
};
|
|
25599
26274
|
}
|
|
25600
26275
|
});
|
|
25601
|
-
const COMPONENT_NAME$
|
|
26276
|
+
const COMPONENT_NAME$n = "vcm-switch";
|
|
25602
26277
|
const MSwitch = /* @__PURE__ */ vue.defineComponent({
|
|
25603
|
-
name: COMPONENT_NAME$
|
|
26278
|
+
name: COMPONENT_NAME$n,
|
|
25604
26279
|
props: props$e,
|
|
25605
26280
|
// click -> onClick要被拦截,此处不能放置
|
|
25606
26281
|
emits: ["update:modelValue", "change", "click"],
|
|
@@ -25736,9 +26411,9 @@ var Vc = (function (exports, vue) {
|
|
|
25736
26411
|
};
|
|
25737
26412
|
const columnsToRowsEffect = (v) => {
|
|
25738
26413
|
let maxLevel = 1;
|
|
25739
|
-
const traverse = (column,
|
|
25740
|
-
if (
|
|
25741
|
-
column.level =
|
|
26414
|
+
const traverse = (column, parent2) => {
|
|
26415
|
+
if (parent2) {
|
|
26416
|
+
column.level = parent2.level + 1;
|
|
25742
26417
|
if (maxLevel < column.level) {
|
|
25743
26418
|
maxLevel = column.level;
|
|
25744
26419
|
}
|
|
@@ -25792,8 +26467,8 @@ var Vc = (function (exports, vue) {
|
|
|
25792
26467
|
level: baseLevel = 0
|
|
25793
26468
|
} = opts;
|
|
25794
26469
|
const isNil = (array) => !(Array.isArray(array) && array.length);
|
|
25795
|
-
function _walker(
|
|
25796
|
-
cb(
|
|
26470
|
+
function _walker(parent2, children, level) {
|
|
26471
|
+
cb(parent2, children, level);
|
|
25797
26472
|
children.forEach((item) => {
|
|
25798
26473
|
if (item[lazyKey]) {
|
|
25799
26474
|
cb(item, null, level + 1);
|
|
@@ -26006,8 +26681,8 @@ var Vc = (function (exports, vue) {
|
|
|
26006
26681
|
const res = {};
|
|
26007
26682
|
walkTreeNode(
|
|
26008
26683
|
data,
|
|
26009
|
-
(
|
|
26010
|
-
const parentId = getRowValue(
|
|
26684
|
+
(parent2, children, level) => {
|
|
26685
|
+
const parentId = getRowValue(parent2, primaryKey);
|
|
26011
26686
|
if (Array.isArray(children)) {
|
|
26012
26687
|
res[parentId] = {
|
|
26013
26688
|
children: children.map((row) => getRowValue(row, primaryKey)),
|
|
@@ -26147,9 +26822,9 @@ var Vc = (function (exports, vue) {
|
|
|
26147
26822
|
this.store.states.treeData[key].expanded = true;
|
|
26148
26823
|
walkTreeNode(
|
|
26149
26824
|
data,
|
|
26150
|
-
(
|
|
26151
|
-
const id = getRowValue(
|
|
26152
|
-
Object.defineProperty(
|
|
26825
|
+
(parent2, _, level) => {
|
|
26826
|
+
const id = getRowValue(parent2, primaryKey);
|
|
26827
|
+
Object.defineProperty(parent2, "__KEY__", {
|
|
26153
26828
|
value: `${level}__${id}`,
|
|
26154
26829
|
writable: false
|
|
26155
26830
|
});
|
|
@@ -26442,13 +27117,13 @@ var Vc = (function (exports, vue) {
|
|
|
26442
27117
|
* @param index ~
|
|
26443
27118
|
* @param parent ~
|
|
26444
27119
|
*/
|
|
26445
|
-
insertColumn(column, index,
|
|
27120
|
+
insertColumn(column, index, parent2) {
|
|
26446
27121
|
let array = this.states._columns;
|
|
26447
|
-
if (
|
|
26448
|
-
array =
|
|
27122
|
+
if (parent2) {
|
|
27123
|
+
array = parent2.children;
|
|
26449
27124
|
if (!array) {
|
|
26450
27125
|
array = [];
|
|
26451
|
-
|
|
27126
|
+
parent2.children = array;
|
|
26452
27127
|
}
|
|
26453
27128
|
}
|
|
26454
27129
|
if (typeof index !== "undefined") {
|
|
@@ -26465,10 +27140,10 @@ var Vc = (function (exports, vue) {
|
|
|
26465
27140
|
this.scheduleLayout();
|
|
26466
27141
|
}
|
|
26467
27142
|
}
|
|
26468
|
-
removeColumn(column,
|
|
27143
|
+
removeColumn(column, parent2) {
|
|
26469
27144
|
let array = this.states._columns;
|
|
26470
|
-
if (
|
|
26471
|
-
array =
|
|
27145
|
+
if (parent2) {
|
|
27146
|
+
array = parent2.children || [];
|
|
26472
27147
|
}
|
|
26473
27148
|
if (array) {
|
|
26474
27149
|
array.splice(array.indexOf(column), 1);
|
|
@@ -26701,9 +27376,9 @@ var Vc = (function (exports, vue) {
|
|
|
26701
27376
|
});
|
|
26702
27377
|
return states;
|
|
26703
27378
|
};
|
|
26704
|
-
const COMPONENT_NAME$
|
|
27379
|
+
const COMPONENT_NAME$m = "vc-table-normal-list";
|
|
26705
27380
|
const NormalList = /* @__PURE__ */ vue.defineComponent({
|
|
26706
|
-
name: COMPONENT_NAME$
|
|
27381
|
+
name: COMPONENT_NAME$m,
|
|
26707
27382
|
props: {
|
|
26708
27383
|
data: {
|
|
26709
27384
|
type: Array,
|
|
@@ -27217,6 +27892,10 @@ var Vc = (function (exports, vue) {
|
|
|
27217
27892
|
const allowDrag = vue.computed(() => {
|
|
27218
27893
|
return typeof props2.resizable === "boolean" ? props2.resizable : props2.border;
|
|
27219
27894
|
});
|
|
27895
|
+
const dragLineClass = vue.computed(() => {
|
|
27896
|
+
if (props2.border || !props2.resizable) return;
|
|
27897
|
+
return "has-drag-line";
|
|
27898
|
+
});
|
|
27220
27899
|
const states = useStates({
|
|
27221
27900
|
columns: "columns",
|
|
27222
27901
|
isAllSelected: "isAllSelected",
|
|
@@ -27449,7 +28128,7 @@ var Vc = (function (exports, vue) {
|
|
|
27449
28128
|
"style": [getHeaderCellStyle(rowIndex, columnIndex, columns, column), {
|
|
27450
28129
|
width: `${column.realWidth}px`
|
|
27451
28130
|
}],
|
|
27452
|
-
"class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), "vc-table__th"],
|
|
28131
|
+
"class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), column.resizable && dragLineClass.value, "vc-table__th"],
|
|
27453
28132
|
"key": column.id
|
|
27454
28133
|
}, [vue.createVNode("div", {
|
|
27455
28134
|
"class": [
|
|
@@ -27693,9 +28372,9 @@ var Vc = (function (exports, vue) {
|
|
|
27693
28372
|
default: void 0
|
|
27694
28373
|
}
|
|
27695
28374
|
};
|
|
27696
|
-
const COMPONENT_NAME$
|
|
28375
|
+
const COMPONENT_NAME$l = "vc-table";
|
|
27697
28376
|
const Table$1 = /* @__PURE__ */ vue.defineComponent({
|
|
27698
|
-
name: COMPONENT_NAME$
|
|
28377
|
+
name: COMPONENT_NAME$l,
|
|
27699
28378
|
props: props$d,
|
|
27700
28379
|
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"],
|
|
27701
28380
|
setup(props2, {
|
|
@@ -28432,9 +29111,9 @@ var Vc = (function (exports, vue) {
|
|
|
28432
29111
|
}) {
|
|
28433
29112
|
const instance = vue.getCurrentInstance();
|
|
28434
29113
|
const table = vue.inject("vc-table");
|
|
28435
|
-
const
|
|
28436
|
-
const isSubColumn = table !==
|
|
28437
|
-
const columnId = vue.ref((
|
|
29114
|
+
const parent2 = vue.inject("vc-table-column", table);
|
|
29115
|
+
const isSubColumn = table !== parent2;
|
|
29116
|
+
const columnId = vue.ref((parent2.tableId || parent2.columnId) + getUid("column"));
|
|
28438
29117
|
const realWidth = vue.computed(() => {
|
|
28439
29118
|
return parseWidth(props2.width);
|
|
28440
29119
|
});
|
|
@@ -28560,13 +29239,13 @@ var Vc = (function (exports, vue) {
|
|
|
28560
29239
|
registerWatchers();
|
|
28561
29240
|
});
|
|
28562
29241
|
vue.onMounted(() => {
|
|
28563
|
-
const children = isSubColumn ?
|
|
29242
|
+
const children = isSubColumn ? parent2.vnode.el.children : parent2.hiddenColumns.value.children;
|
|
28564
29243
|
const columnIndex = [...children].indexOf(instance.vnode.el);
|
|
28565
|
-
table.store.insertColumn(columnConfig, columnIndex, isSubColumn &&
|
|
29244
|
+
table.store.insertColumn(columnConfig, columnIndex, isSubColumn && parent2.columnConfig);
|
|
28566
29245
|
});
|
|
28567
29246
|
vue.onUnmounted(() => {
|
|
28568
29247
|
if (!instance.parent) return;
|
|
28569
|
-
table.store.removeColumn(columnConfig, isSubColumn &&
|
|
29248
|
+
table.store.removeColumn(columnConfig, isSubColumn && parent2.columnConfig);
|
|
28570
29249
|
});
|
|
28571
29250
|
vue.provide("vc-table-column", {
|
|
28572
29251
|
columnId,
|
|
@@ -28811,9 +29490,9 @@ var Vc = (function (exports, vue) {
|
|
|
28811
29490
|
handleChange
|
|
28812
29491
|
};
|
|
28813
29492
|
};
|
|
28814
|
-
const COMPONENT_NAME$
|
|
29493
|
+
const COMPONENT_NAME$k = "vc-tabs";
|
|
28815
29494
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
28816
|
-
name: COMPONENT_NAME$
|
|
29495
|
+
name: COMPONENT_NAME$k,
|
|
28817
29496
|
props: props$c,
|
|
28818
29497
|
emits: ["update:modelValue", "change", "click"],
|
|
28819
29498
|
setup(props2, {
|
|
@@ -29042,9 +29721,9 @@ var Vc = (function (exports, vue) {
|
|
|
29042
29721
|
currentValue
|
|
29043
29722
|
};
|
|
29044
29723
|
};
|
|
29045
|
-
const COMPONENT_NAME$
|
|
29724
|
+
const COMPONENT_NAME$j = "vc-tabs-pane";
|
|
29046
29725
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
29047
|
-
name: COMPONENT_NAME$
|
|
29726
|
+
name: COMPONENT_NAME$j,
|
|
29048
29727
|
props: props$b,
|
|
29049
29728
|
setup(_, {
|
|
29050
29729
|
slots
|
|
@@ -29095,9 +29774,9 @@ var Vc = (function (exports, vue) {
|
|
|
29095
29774
|
default: false
|
|
29096
29775
|
}
|
|
29097
29776
|
};
|
|
29098
|
-
const COMPONENT_NAME$
|
|
29777
|
+
const COMPONENT_NAME$i = "vcm-tabs";
|
|
29099
29778
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
29100
|
-
name: COMPONENT_NAME$
|
|
29779
|
+
name: COMPONENT_NAME$i,
|
|
29101
29780
|
props: props$a,
|
|
29102
29781
|
emits: ["update:modelValue", "change", "click"],
|
|
29103
29782
|
setup(props2, {
|
|
@@ -29325,9 +30004,9 @@ var Vc = (function (exports, vue) {
|
|
|
29325
30004
|
};
|
|
29326
30005
|
}
|
|
29327
30006
|
});
|
|
29328
|
-
const COMPONENT_NAME$
|
|
30007
|
+
const COMPONENT_NAME$h = "vcm-tabs-pane";
|
|
29329
30008
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
29330
|
-
name: COMPONENT_NAME$
|
|
30009
|
+
name: COMPONENT_NAME$h,
|
|
29331
30010
|
props: props$b,
|
|
29332
30011
|
setup(_, {
|
|
29333
30012
|
slots
|
|
@@ -29386,9 +30065,9 @@ var Vc = (function (exports, vue) {
|
|
|
29386
30065
|
default: "dark"
|
|
29387
30066
|
}
|
|
29388
30067
|
};
|
|
29389
|
-
const COMPONENT_NAME$
|
|
30068
|
+
const COMPONENT_NAME$g = "vc-text";
|
|
29390
30069
|
const Text$2 = /* @__PURE__ */ vue.defineComponent({
|
|
29391
|
-
name: COMPONENT_NAME$
|
|
30070
|
+
name: COMPONENT_NAME$g,
|
|
29392
30071
|
props: props$9,
|
|
29393
30072
|
setup(props2, {
|
|
29394
30073
|
emit
|
|
@@ -29747,9 +30426,9 @@ var Vc = (function (exports, vue) {
|
|
|
29747
30426
|
type: [Object, Array]
|
|
29748
30427
|
}
|
|
29749
30428
|
};
|
|
29750
|
-
const COMPONENT_NAME$
|
|
30429
|
+
const COMPONENT_NAME$f = "vc-textarea";
|
|
29751
30430
|
const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
29752
|
-
name: COMPONENT_NAME$
|
|
30431
|
+
name: COMPONENT_NAME$f,
|
|
29753
30432
|
props: Object.assign({}, props$8, {
|
|
29754
30433
|
indicator: {
|
|
29755
30434
|
type: [Boolean, Object],
|
|
@@ -29802,9 +30481,9 @@ var Vc = (function (exports, vue) {
|
|
|
29802
30481
|
};
|
|
29803
30482
|
}
|
|
29804
30483
|
});
|
|
29805
|
-
const COMPONENT_NAME$
|
|
30484
|
+
const COMPONENT_NAME$e = "vcm-textarea";
|
|
29806
30485
|
const MTextarea = /* @__PURE__ */ vue.defineComponent({
|
|
29807
|
-
name: COMPONENT_NAME$
|
|
30486
|
+
name: COMPONENT_NAME$e,
|
|
29808
30487
|
props: Object.assign({}, props$8, {
|
|
29809
30488
|
align: {
|
|
29810
30489
|
type: String,
|
|
@@ -29885,9 +30564,9 @@ var Vc = (function (exports, vue) {
|
|
|
29885
30564
|
type: [String, Object]
|
|
29886
30565
|
}
|
|
29887
30566
|
};
|
|
29888
|
-
const COMPONENT_NAME$
|
|
30567
|
+
const COMPONENT_NAME$d = "vc-theme";
|
|
29889
30568
|
const Theme$1 = vue.defineComponent({
|
|
29890
|
-
name: COMPONENT_NAME$
|
|
30569
|
+
name: COMPONENT_NAME$d,
|
|
29891
30570
|
props: props$7,
|
|
29892
30571
|
setup(props2, { slots }) {
|
|
29893
30572
|
const themeId = getUid("vc-theme");
|
|
@@ -29969,9 +30648,9 @@ var Vc = (function (exports, vue) {
|
|
|
29969
30648
|
};
|
|
29970
30649
|
}
|
|
29971
30650
|
});
|
|
29972
|
-
const COMPONENT_NAME$
|
|
30651
|
+
const COMPONENT_NAME$c = "vc-theme-view";
|
|
29973
30652
|
const ThemeView = vue.defineComponent({
|
|
29974
|
-
name: COMPONENT_NAME$
|
|
30653
|
+
name: COMPONENT_NAME$c,
|
|
29975
30654
|
props: props$7,
|
|
29976
30655
|
setup(props2, { slots }) {
|
|
29977
30656
|
return () => {
|
|
@@ -29986,9 +30665,9 @@ var Vc = (function (exports, vue) {
|
|
|
29986
30665
|
};
|
|
29987
30666
|
}
|
|
29988
30667
|
});
|
|
29989
|
-
const COMPONENT_NAME$
|
|
30668
|
+
const COMPONENT_NAME$b = "vc-theme-text";
|
|
29990
30669
|
const ThemeText = vue.defineComponent({
|
|
29991
|
-
name: COMPONENT_NAME$
|
|
30670
|
+
name: COMPONENT_NAME$b,
|
|
29992
30671
|
props: props$7,
|
|
29993
30672
|
setup(props2, { slots }) {
|
|
29994
30673
|
return () => {
|
|
@@ -30003,9 +30682,9 @@ var Vc = (function (exports, vue) {
|
|
|
30003
30682
|
};
|
|
30004
30683
|
}
|
|
30005
30684
|
});
|
|
30006
|
-
const COMPONENT_NAME$
|
|
30685
|
+
const COMPONENT_NAME$a = "vc-theme-image";
|
|
30007
30686
|
const ThemeImage = vue.defineComponent({
|
|
30008
|
-
name: COMPONENT_NAME$
|
|
30687
|
+
name: COMPONENT_NAME$a,
|
|
30009
30688
|
props: props$7,
|
|
30010
30689
|
setup(props2, { slots }) {
|
|
30011
30690
|
return () => {
|
|
@@ -30053,12 +30732,12 @@ var Vc = (function (exports, vue) {
|
|
|
30053
30732
|
default: false
|
|
30054
30733
|
}
|
|
30055
30734
|
};
|
|
30056
|
-
const COMPONENT_NAME$
|
|
30735
|
+
const COMPONENT_NAME$9 = "vc-time-picker";
|
|
30057
30736
|
const getPanel = (type) => {
|
|
30058
30737
|
const isRange = type === "timerange";
|
|
30059
30738
|
return isRange ? TimeRangePanel : TimePanel;
|
|
30060
30739
|
};
|
|
30061
|
-
const TimePicker = createPicker(COMPONENT_NAME$
|
|
30740
|
+
const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
|
|
30062
30741
|
const props2 = vue.getCurrentInstance().props;
|
|
30063
30742
|
const icon = vue.ref("icon");
|
|
30064
30743
|
const panel = vue.shallowRef({});
|
|
@@ -30089,9 +30768,9 @@ var Vc = (function (exports, vue) {
|
|
|
30089
30768
|
default: "div"
|
|
30090
30769
|
}
|
|
30091
30770
|
};
|
|
30092
|
-
const COMPONENT_NAME$
|
|
30771
|
+
const COMPONENT_NAME$8 = "vc-timeline";
|
|
30093
30772
|
const Timeline = /* @__PURE__ */ vue.defineComponent({
|
|
30094
|
-
name: COMPONENT_NAME$
|
|
30773
|
+
name: COMPONENT_NAME$8,
|
|
30095
30774
|
props: props$5,
|
|
30096
30775
|
setup(props2, {
|
|
30097
30776
|
slots
|
|
@@ -30112,9 +30791,9 @@ var Vc = (function (exports, vue) {
|
|
|
30112
30791
|
default: "div"
|
|
30113
30792
|
}
|
|
30114
30793
|
};
|
|
30115
|
-
const COMPONENT_NAME$
|
|
30794
|
+
const COMPONENT_NAME$7 = "vc-touch";
|
|
30116
30795
|
const Touch = /* @__PURE__ */ vue.defineComponent({
|
|
30117
|
-
name: COMPONENT_NAME$
|
|
30796
|
+
name: COMPONENT_NAME$7,
|
|
30118
30797
|
props: props$4,
|
|
30119
30798
|
setup(props2, {
|
|
30120
30799
|
slots
|
|
@@ -30175,10 +30854,10 @@ var Vc = (function (exports, vue) {
|
|
|
30175
30854
|
node.states.checked = false;
|
|
30176
30855
|
node.states.indeterminate = false;
|
|
30177
30856
|
}
|
|
30178
|
-
const
|
|
30179
|
-
if (!
|
|
30857
|
+
const parent2 = node.parentNode;
|
|
30858
|
+
if (!parent2 || parent2.states.level === 0) return;
|
|
30180
30859
|
if (!node.store.checkStrictly) {
|
|
30181
|
-
reInitChecked(
|
|
30860
|
+
reInitChecked(parent2);
|
|
30182
30861
|
}
|
|
30183
30862
|
};
|
|
30184
30863
|
const getPropertyFromData = (node, prop) => {
|
|
@@ -30271,21 +30950,21 @@ var Vc = (function (exports, vue) {
|
|
|
30271
30950
|
this.updateLeafState();
|
|
30272
30951
|
}
|
|
30273
30952
|
getNextSiblingNode() {
|
|
30274
|
-
const
|
|
30275
|
-
if (
|
|
30276
|
-
const index =
|
|
30953
|
+
const parent2 = this.parentNode;
|
|
30954
|
+
if (parent2) {
|
|
30955
|
+
const index = parent2.childNodes.indexOf(this);
|
|
30277
30956
|
if (index > -1) {
|
|
30278
|
-
return
|
|
30957
|
+
return parent2.childNodes[index + 1];
|
|
30279
30958
|
}
|
|
30280
30959
|
}
|
|
30281
30960
|
return null;
|
|
30282
30961
|
}
|
|
30283
30962
|
getPreviousSiblingNode() {
|
|
30284
|
-
const
|
|
30285
|
-
if (
|
|
30286
|
-
const index =
|
|
30963
|
+
const parent2 = this.parentNode;
|
|
30964
|
+
if (parent2) {
|
|
30965
|
+
const index = parent2.childNodes.indexOf(this);
|
|
30287
30966
|
if (index > -1) {
|
|
30288
|
-
return index > 0 ?
|
|
30967
|
+
return index > 0 ? parent2.childNodes[index - 1] : null;
|
|
30289
30968
|
}
|
|
30290
30969
|
}
|
|
30291
30970
|
return null;
|
|
@@ -30307,8 +30986,8 @@ var Vc = (function (exports, vue) {
|
|
|
30307
30986
|
}
|
|
30308
30987
|
}
|
|
30309
30988
|
contains(target, deep = true) {
|
|
30310
|
-
const walk = function(
|
|
30311
|
-
const children =
|
|
30989
|
+
const walk = function(parent2) {
|
|
30990
|
+
const children = parent2.childNodes || [];
|
|
30312
30991
|
let result = false;
|
|
30313
30992
|
for (let i = 0, j = children.length; i < j; i++) {
|
|
30314
30993
|
const child = children[i];
|
|
@@ -30322,9 +31001,9 @@ var Vc = (function (exports, vue) {
|
|
|
30322
31001
|
return walk(this);
|
|
30323
31002
|
}
|
|
30324
31003
|
remove() {
|
|
30325
|
-
const
|
|
30326
|
-
if (
|
|
30327
|
-
|
|
31004
|
+
const parent2 = this.parentNode;
|
|
31005
|
+
if (parent2) {
|
|
31006
|
+
parent2.removeChild(this);
|
|
30328
31007
|
}
|
|
30329
31008
|
}
|
|
30330
31009
|
insertChild(states, index, batch) {
|
|
@@ -30397,10 +31076,10 @@ var Vc = (function (exports, vue) {
|
|
|
30397
31076
|
async expand(expandParent) {
|
|
30398
31077
|
const done = () => {
|
|
30399
31078
|
if (expandParent) {
|
|
30400
|
-
let
|
|
30401
|
-
while (
|
|
30402
|
-
|
|
30403
|
-
|
|
31079
|
+
let parent2 = this.parentNode;
|
|
31080
|
+
while (parent2 && parent2.states.level > 0) {
|
|
31081
|
+
parent2.states.expanded = true;
|
|
31082
|
+
parent2 = parent2.parentNode;
|
|
30404
31083
|
}
|
|
30405
31084
|
}
|
|
30406
31085
|
this.states.expanded = true;
|
|
@@ -30477,10 +31156,10 @@ var Vc = (function (exports, vue) {
|
|
|
30477
31156
|
handleDescendants();
|
|
30478
31157
|
}
|
|
30479
31158
|
}
|
|
30480
|
-
const
|
|
30481
|
-
if (!
|
|
31159
|
+
const parent2 = this.parentNode;
|
|
31160
|
+
if (!parent2 || parent2.states.level === 0) return;
|
|
30482
31161
|
if (!recursion) {
|
|
30483
|
-
reInitChecked(
|
|
31162
|
+
reInitChecked(parent2);
|
|
30484
31163
|
}
|
|
30485
31164
|
}
|
|
30486
31165
|
getChildren(forceInit = false) {
|
|
@@ -30618,21 +31297,68 @@ var Vc = (function (exports, vue) {
|
|
|
30618
31297
|
parentNode.insertChild({ data });
|
|
30619
31298
|
}
|
|
30620
31299
|
}
|
|
31300
|
+
/**
|
|
31301
|
+
* 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
|
|
31302
|
+
* 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
|
|
31303
|
+
* @param checkedValues ~
|
|
31304
|
+
* @returns ~
|
|
31305
|
+
*/
|
|
31306
|
+
_getCascadeCheckedAnchorIds(checkedValues) {
|
|
31307
|
+
const checkedSet = new Set(checkedValues);
|
|
31308
|
+
const nodesMap = this.nodesMap;
|
|
31309
|
+
const anchors = [];
|
|
31310
|
+
for (const id of checkedValues) {
|
|
31311
|
+
const node = nodesMap[id];
|
|
31312
|
+
if (!node) continue;
|
|
31313
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
31314
|
+
(child) => checkedSet.has(child.getter.value)
|
|
31315
|
+
);
|
|
31316
|
+
if (!hasSelectedChildInSet) {
|
|
31317
|
+
anchors.push(id);
|
|
31318
|
+
}
|
|
31319
|
+
}
|
|
31320
|
+
anchors.sort((a, b) => {
|
|
31321
|
+
const na = nodesMap[a];
|
|
31322
|
+
const nb = nodesMap[b];
|
|
31323
|
+
if (!na || !nb) return 0;
|
|
31324
|
+
return nb.states.level - na.states.level;
|
|
31325
|
+
});
|
|
31326
|
+
return anchors;
|
|
31327
|
+
}
|
|
30621
31328
|
_initDefaultCheckedNodes() {
|
|
30622
31329
|
const checkedValues = this.checkedValues || [];
|
|
30623
31330
|
const nodesMap = this.nodesMap;
|
|
30624
|
-
|
|
31331
|
+
if (this.checkStrictly) {
|
|
31332
|
+
checkedValues.forEach((id) => {
|
|
31333
|
+
const node = nodesMap[id];
|
|
31334
|
+
if (node) {
|
|
31335
|
+
node.setChecked(true, false);
|
|
31336
|
+
}
|
|
31337
|
+
});
|
|
31338
|
+
return;
|
|
31339
|
+
}
|
|
31340
|
+
const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
|
|
31341
|
+
anchorIds.forEach((id) => {
|
|
30625
31342
|
const node = nodesMap[id];
|
|
30626
31343
|
if (node) {
|
|
30627
|
-
node.setChecked(true,
|
|
31344
|
+
node.setChecked(true, true);
|
|
30628
31345
|
}
|
|
30629
31346
|
});
|
|
30630
31347
|
}
|
|
30631
31348
|
_initDefaultCheckedNode(node) {
|
|
30632
31349
|
const checkedValues = this.checkedValues || [];
|
|
30633
31350
|
const nodeValue = node.getter.value;
|
|
30634
|
-
if (checkedValues.indexOf(nodeValue)
|
|
30635
|
-
|
|
31351
|
+
if (checkedValues.indexOf(nodeValue) === -1) return;
|
|
31352
|
+
if (this.checkStrictly) {
|
|
31353
|
+
node.setChecked(true, false);
|
|
31354
|
+
return;
|
|
31355
|
+
}
|
|
31356
|
+
const checkedSet = new Set(checkedValues);
|
|
31357
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
31358
|
+
(child) => checkedSet.has(child.getter.value)
|
|
31359
|
+
);
|
|
31360
|
+
if (!hasSelectedChildInSet) {
|
|
31361
|
+
node.setChecked(true, true);
|
|
30636
31362
|
}
|
|
30637
31363
|
}
|
|
30638
31364
|
setCheckedValues(newVal) {
|
|
@@ -30730,10 +31456,10 @@ var Vc = (function (exports, vue) {
|
|
|
30730
31456
|
node.setChecked(false, false);
|
|
30731
31457
|
}
|
|
30732
31458
|
} else {
|
|
30733
|
-
let
|
|
30734
|
-
while (
|
|
30735
|
-
cache[
|
|
30736
|
-
|
|
31459
|
+
let parent2 = node.parentNode;
|
|
31460
|
+
while (parent2 && parent2.states.level > 0) {
|
|
31461
|
+
cache[parent2.states.data[key]] = true;
|
|
31462
|
+
parent2 = parent2.parentNode;
|
|
30737
31463
|
}
|
|
30738
31464
|
if (node.states.isLeaf || this.checkStrictly) {
|
|
30739
31465
|
node.setChecked(true, false);
|
|
@@ -30855,9 +31581,9 @@ var Vc = (function (exports, vue) {
|
|
|
30855
31581
|
default: true
|
|
30856
31582
|
}
|
|
30857
31583
|
};
|
|
30858
|
-
const COMPONENT_NAME$
|
|
31584
|
+
const COMPONENT_NAME$6 = "vc-tree-node";
|
|
30859
31585
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
30860
|
-
name: COMPONENT_NAME$
|
|
31586
|
+
name: COMPONENT_NAME$6,
|
|
30861
31587
|
props: props$3,
|
|
30862
31588
|
emits: ["node-expand"],
|
|
30863
31589
|
setup(props2, {
|
|
@@ -31350,9 +32076,9 @@ var Vc = (function (exports, vue) {
|
|
|
31350
32076
|
default: () => KEY_VALUE
|
|
31351
32077
|
}
|
|
31352
32078
|
};
|
|
31353
|
-
const COMPONENT_NAME$
|
|
32079
|
+
const COMPONENT_NAME$5 = "vc-tree";
|
|
31354
32080
|
const Tree2 = /* @__PURE__ */ vue.defineComponent({
|
|
31355
|
-
name: COMPONENT_NAME$
|
|
32081
|
+
name: COMPONENT_NAME$5,
|
|
31356
32082
|
props: props$2,
|
|
31357
32083
|
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"],
|
|
31358
32084
|
setup(props2, {
|
|
@@ -31411,10 +32137,10 @@ var Vc = (function (exports, vue) {
|
|
|
31411
32137
|
const node = store.getNode(data);
|
|
31412
32138
|
if (!node) return [];
|
|
31413
32139
|
const path = [node.states.data];
|
|
31414
|
-
let
|
|
31415
|
-
while (
|
|
31416
|
-
path.push(
|
|
31417
|
-
|
|
32140
|
+
let parent2 = node.parentNode;
|
|
32141
|
+
while (parent2 && parent2 !== root) {
|
|
32142
|
+
path.push(parent2.states.data);
|
|
32143
|
+
parent2 = parent2.parentNode;
|
|
31418
32144
|
}
|
|
31419
32145
|
return path.reverse();
|
|
31420
32146
|
};
|
|
@@ -31546,6 +32272,217 @@ var Vc = (function (exports, vue) {
|
|
|
31546
32272
|
};
|
|
31547
32273
|
}
|
|
31548
32274
|
});
|
|
32275
|
+
const COMPONENT_NAME$4 = "vc-tree-select-content";
|
|
32276
|
+
const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
|
|
32277
|
+
name: COMPONENT_NAME$4,
|
|
32278
|
+
props: {
|
|
32279
|
+
value: {
|
|
32280
|
+
type: Array,
|
|
32281
|
+
required: true
|
|
32282
|
+
},
|
|
32283
|
+
data: {
|
|
32284
|
+
type: Array,
|
|
32285
|
+
default: () => []
|
|
32286
|
+
},
|
|
32287
|
+
checkStrictly: {
|
|
32288
|
+
type: Boolean,
|
|
32289
|
+
default: false
|
|
32290
|
+
},
|
|
32291
|
+
renderNodeLabel: Function
|
|
32292
|
+
},
|
|
32293
|
+
emits: ["change"],
|
|
32294
|
+
setup(props2, {
|
|
32295
|
+
emit
|
|
32296
|
+
}) {
|
|
32297
|
+
return () => {
|
|
32298
|
+
return vue.createVNode(Scroller, {
|
|
32299
|
+
"class": "vc-tree-select__options",
|
|
32300
|
+
"max-height": "200px"
|
|
32301
|
+
}, {
|
|
32302
|
+
default: () => [vue.createVNode(Tree2, {
|
|
32303
|
+
"model-value": props2.value,
|
|
32304
|
+
"expanded-values": props2.value,
|
|
32305
|
+
"data": props2.data,
|
|
32306
|
+
"checkStrictly": props2.checkStrictly,
|
|
32307
|
+
"allowDispatch": false,
|
|
32308
|
+
"showCheckbox": true,
|
|
32309
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
32310
|
+
"onChange": (_, data) => emit("change", _, data)
|
|
32311
|
+
}, null)]
|
|
32312
|
+
});
|
|
32313
|
+
};
|
|
32314
|
+
}
|
|
32315
|
+
});
|
|
32316
|
+
const COMPONENT_NAME$3 = "vc-tree-select-content-cascader";
|
|
32317
|
+
const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
|
|
32318
|
+
name: COMPONENT_NAME$3,
|
|
32319
|
+
props: {
|
|
32320
|
+
value: {
|
|
32321
|
+
type: Array,
|
|
32322
|
+
required: true
|
|
32323
|
+
},
|
|
32324
|
+
data: {
|
|
32325
|
+
type: Array,
|
|
32326
|
+
default: () => []
|
|
32327
|
+
},
|
|
32328
|
+
checkStrictly: {
|
|
32329
|
+
type: Boolean,
|
|
32330
|
+
default: false
|
|
32331
|
+
},
|
|
32332
|
+
renderNodeLabel: Function,
|
|
32333
|
+
numerable: {
|
|
32334
|
+
type: Boolean,
|
|
32335
|
+
default: false
|
|
32336
|
+
},
|
|
32337
|
+
separator: {
|
|
32338
|
+
type: String,
|
|
32339
|
+
default: ","
|
|
32340
|
+
},
|
|
32341
|
+
max: {
|
|
32342
|
+
type: Number,
|
|
32343
|
+
default: 1
|
|
32344
|
+
},
|
|
32345
|
+
nullValue: {
|
|
32346
|
+
type: [Number, String, Object],
|
|
32347
|
+
default: void 0
|
|
32348
|
+
}
|
|
32349
|
+
},
|
|
32350
|
+
emits: ["change"],
|
|
32351
|
+
setup(props2, {
|
|
32352
|
+
emit
|
|
32353
|
+
}) {
|
|
32354
|
+
const treeRef = vue.ref(null);
|
|
32355
|
+
const currentValue = vue.ref([]);
|
|
32356
|
+
const rebuildData = vue.computed(() => {
|
|
32357
|
+
if (!props2.data.length) return [];
|
|
32358
|
+
let temp = props2.data;
|
|
32359
|
+
const data = [];
|
|
32360
|
+
currentValue.value.forEach((cur) => {
|
|
32361
|
+
const col = temp;
|
|
32362
|
+
data.push(col);
|
|
32363
|
+
const next = (temp.find((i) => i.value == cur) || {}).children || [];
|
|
32364
|
+
temp = next;
|
|
32365
|
+
});
|
|
32366
|
+
data.push(temp);
|
|
32367
|
+
return data;
|
|
32368
|
+
});
|
|
32369
|
+
const panelTick = vue.ref(0);
|
|
32370
|
+
const columns = vue.computed(() => Array.from({
|
|
32371
|
+
length: currentValue.value.length + 1
|
|
32372
|
+
}).map((_, index) => index));
|
|
32373
|
+
const handleHover = (value, columnIndex) => {
|
|
32374
|
+
const len = currentValue.value.length - columnIndex;
|
|
32375
|
+
currentValue.value.splice(columnIndex, len, value);
|
|
32376
|
+
};
|
|
32377
|
+
const sync = async () => {
|
|
32378
|
+
await vue.nextTick();
|
|
32379
|
+
const tree = treeRef.value;
|
|
32380
|
+
if (!tree) return;
|
|
32381
|
+
const data = {
|
|
32382
|
+
checkedNodes: tree.getCheckedNodes(),
|
|
32383
|
+
checkedValues: tree.getCheckedValues(),
|
|
32384
|
+
halfCheckedNodes: tree.getHalfCheckedNodes(),
|
|
32385
|
+
halfCheckedValues: tree.getHalfCheckedValues()
|
|
32386
|
+
};
|
|
32387
|
+
panelTick.value++;
|
|
32388
|
+
emit("change", null, data);
|
|
32389
|
+
};
|
|
32390
|
+
const getNodeState = (item) => {
|
|
32391
|
+
const tree = treeRef.value;
|
|
32392
|
+
if (!tree) {
|
|
32393
|
+
return {
|
|
32394
|
+
checked: false,
|
|
32395
|
+
indeterminate: false
|
|
32396
|
+
};
|
|
32397
|
+
}
|
|
32398
|
+
const node = tree.getNode(item);
|
|
32399
|
+
if (!node) {
|
|
32400
|
+
return {
|
|
32401
|
+
checked: false,
|
|
32402
|
+
indeterminate: false
|
|
32403
|
+
};
|
|
32404
|
+
}
|
|
32405
|
+
return {
|
|
32406
|
+
checked: !!node.states.checked,
|
|
32407
|
+
indeterminate: !!node.states.indeterminate
|
|
32408
|
+
};
|
|
32409
|
+
};
|
|
32410
|
+
const hasChildren = (item) => {
|
|
32411
|
+
return !!(item.children && item.children.length > 0);
|
|
32412
|
+
};
|
|
32413
|
+
const handleCheckboxChange = async (v, item) => {
|
|
32414
|
+
const tree = treeRef.value;
|
|
32415
|
+
if (!tree) return;
|
|
32416
|
+
tree.setChecked(item, v, !props2.checkStrictly);
|
|
32417
|
+
sync();
|
|
32418
|
+
};
|
|
32419
|
+
const handleLabelClick = (v, item) => {
|
|
32420
|
+
const tree = treeRef.value;
|
|
32421
|
+
if (!tree) return;
|
|
32422
|
+
tree.setChecked(item, v, !props2.checkStrictly);
|
|
32423
|
+
sync();
|
|
32424
|
+
};
|
|
32425
|
+
return () => {
|
|
32426
|
+
return vue.createVNode("div", {
|
|
32427
|
+
"class": "vc-tree-select__cascader"
|
|
32428
|
+
}, [vue.createVNode(Tree2, {
|
|
32429
|
+
"ref": treeRef,
|
|
32430
|
+
"class": "vc-tree-select__cascader-tree-hidden",
|
|
32431
|
+
"model-value": props2.value,
|
|
32432
|
+
"expanded-values": props2.value,
|
|
32433
|
+
"data": props2.data,
|
|
32434
|
+
"checkStrictly": props2.checkStrictly,
|
|
32435
|
+
"allowDispatch": false,
|
|
32436
|
+
"showCheckbox": true,
|
|
32437
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
32438
|
+
"numerable": props2.numerable,
|
|
32439
|
+
"separator": props2.separator,
|
|
32440
|
+
"max": props2.max,
|
|
32441
|
+
"nullValue": props2.nullValue
|
|
32442
|
+
}, null), vue.createVNode("div", {
|
|
32443
|
+
"class": "vc-tree-select__cascader-columns"
|
|
32444
|
+
}, [columns.value.map((columnIndex) => {
|
|
32445
|
+
const col = rebuildData.value[columnIndex];
|
|
32446
|
+
if (!col || !col.length) return null;
|
|
32447
|
+
return vue.createVNode("div", {
|
|
32448
|
+
"class": "vc-tree-select__cascader-column",
|
|
32449
|
+
"key": columnIndex
|
|
32450
|
+
}, [vue.createVNode("div", {
|
|
32451
|
+
"class": "vc-tree-select__cascader-column-wrapper"
|
|
32452
|
+
}, [col.map((item) => {
|
|
32453
|
+
const state = getNodeState(item);
|
|
32454
|
+
const isSelect = currentValue.value[columnIndex] === item.value;
|
|
32455
|
+
const child = hasChildren(item);
|
|
32456
|
+
return vue.createVNode("div", {
|
|
32457
|
+
"key": item.value,
|
|
32458
|
+
"class": ["vc-tree-select__cascader-item", {
|
|
32459
|
+
"is-select": isSelect
|
|
32460
|
+
}],
|
|
32461
|
+
"onMouseenter": () => handleHover(item.value, columnIndex),
|
|
32462
|
+
"onClick": () => handleLabelClick(!state.checked, item)
|
|
32463
|
+
}, [vue.createVNode("span", {
|
|
32464
|
+
"class": "vc-tree-select__cascader-checkbox",
|
|
32465
|
+
"onClick": (e) => e.stopPropagation()
|
|
32466
|
+
}, [vue.createVNode(Checkbox, {
|
|
32467
|
+
"modelValue": state.checked,
|
|
32468
|
+
"indeterminate": state.indeterminate,
|
|
32469
|
+
"disabled": !!item.disabled,
|
|
32470
|
+
"onChange": (v) => handleCheckboxChange(v, item)
|
|
32471
|
+
}, null)]), vue.createVNode("span", {
|
|
32472
|
+
"class": "vc-tree-select__cascader-label"
|
|
32473
|
+
}, [props2.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
|
|
32474
|
+
"render": props2.renderNodeLabel,
|
|
32475
|
+
"store": treeRef.value.getNode(item),
|
|
32476
|
+
"row": item
|
|
32477
|
+
}, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
|
|
32478
|
+
"type": "right",
|
|
32479
|
+
"class": "vc-tree-select__cascader-icon"
|
|
32480
|
+
}, null) : null]);
|
|
32481
|
+
})])]);
|
|
32482
|
+
})])]);
|
|
32483
|
+
};
|
|
32484
|
+
}
|
|
32485
|
+
});
|
|
31549
32486
|
const treeKeys = [
|
|
31550
32487
|
"checkStrictly",
|
|
31551
32488
|
"data",
|
|
@@ -31554,7 +32491,18 @@ var Vc = (function (exports, vue) {
|
|
|
31554
32491
|
];
|
|
31555
32492
|
const props$1 = {
|
|
31556
32493
|
...props$1a,
|
|
31557
|
-
...pick(props$2, treeKeys)
|
|
32494
|
+
...pick(props$2, treeKeys),
|
|
32495
|
+
autoWidth: {
|
|
32496
|
+
type: Boolean,
|
|
32497
|
+
default: void 0
|
|
32498
|
+
},
|
|
32499
|
+
/**
|
|
32500
|
+
* 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
|
|
32501
|
+
*/
|
|
32502
|
+
cascader: {
|
|
32503
|
+
type: Boolean,
|
|
32504
|
+
default: false
|
|
32505
|
+
}
|
|
31558
32506
|
};
|
|
31559
32507
|
const COMPONENT_NAME$2 = "vc-tree-select";
|
|
31560
32508
|
const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -31577,12 +32525,37 @@ var Vc = (function (exports, vue) {
|
|
|
31577
32525
|
const searchValue = vue.ref("");
|
|
31578
32526
|
const searchRegex = vue.ref(new RegExp(""));
|
|
31579
32527
|
const currentValue = vue.ref([]);
|
|
32528
|
+
const currentValueGroups = vue.computed(() => {
|
|
32529
|
+
if (props2.checkStrictly) return;
|
|
32530
|
+
if (!props2.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
|
|
32531
|
+
return [];
|
|
32532
|
+
}
|
|
32533
|
+
const pathMap = /* @__PURE__ */ new Map();
|
|
32534
|
+
const traverse = (data, path = []) => {
|
|
32535
|
+
data.forEach((item) => {
|
|
32536
|
+
const v = item.value;
|
|
32537
|
+
if (v == null) return;
|
|
32538
|
+
const fullPath = [...path, v];
|
|
32539
|
+
pathMap.set(v, fullPath);
|
|
32540
|
+
if (item.children?.length) traverse(item.children, fullPath);
|
|
32541
|
+
});
|
|
32542
|
+
};
|
|
32543
|
+
traverse(props2.data);
|
|
32544
|
+
const allPaths = currentValue.value.map((v) => pathMap.get(v)).filter(Boolean);
|
|
32545
|
+
return allPaths.filter((path) => !allPaths.some((other) => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
|
|
32546
|
+
});
|
|
31580
32547
|
const source = vue.computed(() => {
|
|
31581
32548
|
return flattenData$1(props2.data, {
|
|
31582
32549
|
parent: true,
|
|
31583
32550
|
cascader: true
|
|
31584
32551
|
});
|
|
31585
32552
|
});
|
|
32553
|
+
const labelMap = vue.computed(() => {
|
|
32554
|
+
return source.value.reduce((pre, cur) => {
|
|
32555
|
+
pre[cur.value] = cur.label || "";
|
|
32556
|
+
return pre;
|
|
32557
|
+
}, {});
|
|
32558
|
+
});
|
|
31586
32559
|
const icon = vue.computed(() => {
|
|
31587
32560
|
return isActive.value ? "up" : "down";
|
|
31588
32561
|
});
|
|
@@ -31599,17 +32572,34 @@ var Vc = (function (exports, vue) {
|
|
|
31599
32572
|
"is-disabled": props2.disabled
|
|
31600
32573
|
};
|
|
31601
32574
|
});
|
|
31602
|
-
const
|
|
32575
|
+
const displayTags = vue.computed(() => {
|
|
31603
32576
|
if (!props2.data.length) {
|
|
31604
32577
|
return [];
|
|
31605
32578
|
}
|
|
31606
|
-
|
|
32579
|
+
if (props2.checkStrictly) {
|
|
32580
|
+
return currentValue.value.map((v) => ({
|
|
32581
|
+
value: v,
|
|
32582
|
+
label: labelMap.value[v] || ""
|
|
32583
|
+
}));
|
|
32584
|
+
}
|
|
32585
|
+
return (currentValueGroups.value || []).map((path) => {
|
|
32586
|
+
const value = path[path.length - 1];
|
|
32587
|
+
const label = path.map((v) => labelMap.value[v] || "").filter(Boolean).join(" / ");
|
|
32588
|
+
return {
|
|
32589
|
+
path,
|
|
32590
|
+
value,
|
|
32591
|
+
label
|
|
32592
|
+
};
|
|
32593
|
+
});
|
|
31607
32594
|
});
|
|
31608
32595
|
const collapseTagCount = vue.computed(() => {
|
|
31609
32596
|
if (!props2.maxTags) return 0;
|
|
31610
|
-
const v =
|
|
32597
|
+
const v = displayTags.value.length - props2.maxTags;
|
|
31611
32598
|
return v < 0 ? 0 : v;
|
|
31612
32599
|
});
|
|
32600
|
+
const autoWidth = vue.computed(() => {
|
|
32601
|
+
return typeof props2.autoWidth === "boolean" ? props2.autoWidth : !!props2.cascader;
|
|
32602
|
+
});
|
|
31613
32603
|
const sync = () => {
|
|
31614
32604
|
const v = toModelValue(currentValue.value, {
|
|
31615
32605
|
modelValue: props2.modelValue,
|
|
@@ -31618,8 +32608,9 @@ var Vc = (function (exports, vue) {
|
|
|
31618
32608
|
separator: props2.separator,
|
|
31619
32609
|
nullValue: props2.nullValue
|
|
31620
32610
|
});
|
|
31621
|
-
|
|
31622
|
-
emit("
|
|
32611
|
+
const labels = displayTags.value.map((item) => item.label);
|
|
32612
|
+
emit("update:modelValue", v, labels);
|
|
32613
|
+
emit("change", v, labels);
|
|
31623
32614
|
formItem?.change?.(currentValue.value);
|
|
31624
32615
|
};
|
|
31625
32616
|
const _loadData = debounce(function() {
|
|
@@ -31638,8 +32629,15 @@ var Vc = (function (exports, vue) {
|
|
|
31638
32629
|
const close = () => {
|
|
31639
32630
|
isActive.value = false;
|
|
31640
32631
|
};
|
|
31641
|
-
const handleClose = (
|
|
31642
|
-
|
|
32632
|
+
const handleClose = (item) => {
|
|
32633
|
+
if (props2.checkStrictly) {
|
|
32634
|
+
const index = currentValue.value.findIndex((v) => v === item.value);
|
|
32635
|
+
if (index === -1) return;
|
|
32636
|
+
currentValue.value = currentValue.value.filter((_, i) => i !== index);
|
|
32637
|
+
} else if (item.path) {
|
|
32638
|
+
const remaining = (currentValueGroups.value || []).filter((p) => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
|
|
32639
|
+
currentValue.value = [...new Set(remaining.flat())];
|
|
32640
|
+
}
|
|
31643
32641
|
sync();
|
|
31644
32642
|
};
|
|
31645
32643
|
const handleClear = (e) => {
|
|
@@ -31676,6 +32674,7 @@ var Vc = (function (exports, vue) {
|
|
|
31676
32674
|
multiple,
|
|
31677
32675
|
isActive,
|
|
31678
32676
|
current: currentValue,
|
|
32677
|
+
currentValueGroups,
|
|
31679
32678
|
// for portal
|
|
31680
32679
|
toggle(v) {
|
|
31681
32680
|
v = typeof v === "boolean" ? v : !isActive.value;
|
|
@@ -31690,7 +32689,7 @@ var Vc = (function (exports, vue) {
|
|
|
31690
32689
|
"trigger": props2.trigger,
|
|
31691
32690
|
"tag": props2.tag,
|
|
31692
32691
|
"placement": props2.placement,
|
|
31693
|
-
"
|
|
32692
|
+
"autoWidth": autoWidth.value,
|
|
31694
32693
|
"disabled": props2.disabled,
|
|
31695
32694
|
"portalClass": [["is-padding-none", props2.portalClass]],
|
|
31696
32695
|
"class": [classes.value, its.value.class, "vc-tree-select"],
|
|
@@ -31707,22 +32706,22 @@ var Vc = (function (exports, vue) {
|
|
|
31707
32706
|
return vue.createVNode(Input$1, {
|
|
31708
32707
|
"id": props2.id,
|
|
31709
32708
|
"disabled": props2.disabled,
|
|
31710
|
-
"modelValue":
|
|
32709
|
+
"modelValue": displayTags.value[0]?.label || props2.extra,
|
|
31711
32710
|
"allow-dispatch": false,
|
|
31712
32711
|
"class": "vc-tree-select__input",
|
|
31713
32712
|
"readonly": true,
|
|
31714
32713
|
"placeholder": its.value.attrs?.placeholder || "请选择"
|
|
31715
32714
|
}, {
|
|
31716
|
-
content: multiple.value &&
|
|
32715
|
+
content: multiple.value && displayTags.value.length > 0 ? () => {
|
|
31717
32716
|
return vue.createVNode("div", {
|
|
31718
32717
|
"class": [classes.value, "vc-tree-select__tags"]
|
|
31719
|
-
}, [
|
|
32718
|
+
}, [displayTags.value.slice(0, props2.maxTags).map((item) => {
|
|
31720
32719
|
return vue.createVNode(Tag, {
|
|
31721
|
-
"key": item,
|
|
32720
|
+
"key": item.path ? item.path.join("-") : item.value,
|
|
31722
32721
|
"closable": !props2.disabled,
|
|
31723
|
-
"onClose": () => handleClose(
|
|
32722
|
+
"onClose": () => handleClose(item)
|
|
31724
32723
|
}, {
|
|
31725
|
-
default: () => [
|
|
32724
|
+
default: () => [item.label]
|
|
31726
32725
|
});
|
|
31727
32726
|
}), collapseTagCount.value ? vue.createVNode(Tag, null, {
|
|
31728
32727
|
default: () => [`+${collapseTagCount.value}...`]
|
|
@@ -31755,16 +32754,23 @@ var Vc = (function (exports, vue) {
|
|
|
31755
32754
|
}, [vue.createVNode(Spin, {
|
|
31756
32755
|
"size": 16
|
|
31757
32756
|
}, null)]), vue.createVNode(Scroller, {
|
|
31758
|
-
"class": "vc-tree-select__options",
|
|
32757
|
+
"class": ["vc-tree-select__options", props2.cascader && "is-cascader"],
|
|
31759
32758
|
"max-height": "200px"
|
|
31760
32759
|
}, {
|
|
31761
|
-
default: () => [vue.createVNode(
|
|
31762
|
-
"
|
|
31763
|
-
"
|
|
32760
|
+
default: () => [props2.cascader ? vue.createVNode(TreeSelectContentCascader, {
|
|
32761
|
+
"value": currentValue.value,
|
|
32762
|
+
"data": props2.data,
|
|
32763
|
+
"checkStrictly": props2.checkStrictly,
|
|
32764
|
+
"renderNodeLabel": props2.renderNodeLabel,
|
|
32765
|
+
"numerable": props2.numerable,
|
|
32766
|
+
"separator": props2.separator,
|
|
32767
|
+
"max": props2.max,
|
|
32768
|
+
"nullValue": props2.nullValue,
|
|
32769
|
+
"onChange": handleChange
|
|
32770
|
+
}, null) : vue.createVNode(TreeSelectContent, {
|
|
32771
|
+
"value": currentValue.value,
|
|
31764
32772
|
"data": props2.data,
|
|
31765
32773
|
"checkStrictly": props2.checkStrictly,
|
|
31766
|
-
"allowDispatch": false,
|
|
31767
|
-
"showCheckbox": true,
|
|
31768
32774
|
"renderNodeLabel": props2.renderNodeLabel,
|
|
31769
32775
|
"onChange": handleChange
|
|
31770
32776
|
}, null)]
|
|
@@ -32333,8 +33339,8 @@ var Vc = (function (exports, vue) {
|
|
|
32333
33339
|
MCard,
|
|
32334
33340
|
Carousel,
|
|
32335
33341
|
MCarousel,
|
|
32336
|
-
|
|
32337
|
-
|
|
33342
|
+
CarouselItem,
|
|
33343
|
+
MCarouselItem,
|
|
32338
33344
|
Cascader,
|
|
32339
33345
|
MCascader,
|
|
32340
33346
|
// MCascaderView,
|
|
@@ -138686,6 +139692,7 @@ ${r}
|
|
|
138686
139692
|
exports.Calendar = Calendar$1;
|
|
138687
139693
|
exports.Card = Card;
|
|
138688
139694
|
exports.Carousel = Carousel;
|
|
139695
|
+
exports.CarouselItem = CarouselItem;
|
|
138689
139696
|
exports.Cascader = Cascader;
|
|
138690
139697
|
exports.Chart = Chart;
|
|
138691
139698
|
exports.Checkbox = Checkbox;
|
|
@@ -138732,6 +139739,7 @@ ${r}
|
|
|
138732
139739
|
exports.MCalendar = MCalendar;
|
|
138733
139740
|
exports.MCard = MCard;
|
|
138734
139741
|
exports.MCarousel = MCarousel;
|
|
139742
|
+
exports.MCarouselItem = MCarouselItem;
|
|
138735
139743
|
exports.MCascader = MCascader;
|
|
138736
139744
|
exports.MChart = MChart;
|
|
138737
139745
|
exports.MCheckbox = MCheckbox;
|