@deot/vc-components 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 +1378 -349
- package/dist/index.d.ts +386 -101
- package/dist/index.iife.js +1440 -411
- package/dist/index.js +1380 -353
- package/dist/index.style.css +2 -2
- package/dist/index.umd.cjs +1440 -411
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6,8 +6,8 @@ const vue = require('vue');
|
|
|
6
6
|
const $ = require('@deot/helper-dom');
|
|
7
7
|
const Utils = require('@deot/helper-utils');
|
|
8
8
|
const lodashEs = require('lodash-es');
|
|
9
|
-
const vcHooks = require('@deot/vc-hooks');
|
|
10
9
|
const helperResize = require('@deot/helper-resize');
|
|
10
|
+
const vcHooks = require('@deot/vc-hooks');
|
|
11
11
|
const vcShared = require('@deot/vc-shared');
|
|
12
12
|
const helperWheel = require('@deot/helper-wheel');
|
|
13
13
|
const Load = require('@deot/helper-load');
|
|
@@ -112,7 +112,7 @@ class Instance {
|
|
|
112
112
|
}
|
|
113
113
|
const VcInstance = new Instance();
|
|
114
114
|
|
|
115
|
-
const props$
|
|
115
|
+
const props$1v = {
|
|
116
116
|
tag: {
|
|
117
117
|
type: String,
|
|
118
118
|
default: "div"
|
|
@@ -121,10 +121,10 @@ const props$1u = {
|
|
|
121
121
|
|
|
122
122
|
/** @jsxImportSource vue */
|
|
123
123
|
|
|
124
|
-
const COMPONENT_NAME$
|
|
124
|
+
const COMPONENT_NAME$2g = 'vc-action-sheet';
|
|
125
125
|
const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
126
|
-
name: COMPONENT_NAME$
|
|
127
|
-
props: props$
|
|
126
|
+
name: COMPONENT_NAME$2g,
|
|
127
|
+
props: props$1v,
|
|
128
128
|
setup(props, {
|
|
129
129
|
slots
|
|
130
130
|
}) {
|
|
@@ -138,7 +138,7 @@ const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
|
138
138
|
|
|
139
139
|
const MActionSheet = ActionSheet;
|
|
140
140
|
|
|
141
|
-
const props$
|
|
141
|
+
const props$1u = {
|
|
142
142
|
modelValue: {
|
|
143
143
|
type: Boolean,
|
|
144
144
|
default: false
|
|
@@ -200,11 +200,11 @@ const isWheel = (el) => {
|
|
|
200
200
|
|
|
201
201
|
/** @jsxImportSource vue */
|
|
202
202
|
|
|
203
|
-
const COMPONENT_NAME$
|
|
203
|
+
const COMPONENT_NAME$2f = 'vc-affix';
|
|
204
204
|
const Affix = /* @__PURE__ */ vue.defineComponent({
|
|
205
|
-
name: COMPONENT_NAME$
|
|
205
|
+
name: COMPONENT_NAME$2f,
|
|
206
206
|
emits: ['update:modelValue'],
|
|
207
|
-
props: props$
|
|
207
|
+
props: props$1u,
|
|
208
208
|
setup(props, {
|
|
209
209
|
slots,
|
|
210
210
|
expose,
|
|
@@ -370,7 +370,7 @@ const Affix = /* @__PURE__ */ vue.defineComponent({
|
|
|
370
370
|
|
|
371
371
|
const MAffix = Affix;
|
|
372
372
|
|
|
373
|
-
const props$
|
|
373
|
+
const props$1t = {
|
|
374
374
|
modelValue: {
|
|
375
375
|
type: Boolean,
|
|
376
376
|
default: true
|
|
@@ -397,7 +397,7 @@ const props$1s = {
|
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
399
|
|
|
400
|
-
const props$
|
|
400
|
+
const props$1s = {
|
|
401
401
|
type: String,
|
|
402
402
|
inherit: {
|
|
403
403
|
type: Boolean,
|
|
@@ -534,10 +534,10 @@ const IconManager = new Manager();
|
|
|
534
534
|
|
|
535
535
|
/** @jsxImportSource vue */
|
|
536
536
|
|
|
537
|
-
const COMPONENT_NAME$
|
|
537
|
+
const COMPONENT_NAME$2e = 'vc-icon';
|
|
538
538
|
const Icon = /* @__PURE__ */ vue.defineComponent({
|
|
539
|
-
name: COMPONENT_NAME$
|
|
540
|
-
props: props$
|
|
539
|
+
name: COMPONENT_NAME$2e,
|
|
540
|
+
props: props$1s,
|
|
541
541
|
setup(props) {
|
|
542
542
|
const viewBox = vue.ref('0 0 1024 1024');
|
|
543
543
|
const path = vue.ref([]);
|
|
@@ -570,7 +570,7 @@ const Icon = /* @__PURE__ */ vue.defineComponent({
|
|
|
570
570
|
}
|
|
571
571
|
});
|
|
572
572
|
|
|
573
|
-
const props$
|
|
573
|
+
const props$1r = {
|
|
574
574
|
/**
|
|
575
575
|
* 进入/离开持续时间
|
|
576
576
|
* {enter: 300, leave: 300}
|
|
@@ -735,10 +735,10 @@ const useTransition = () => {
|
|
|
735
735
|
};
|
|
736
736
|
};
|
|
737
737
|
|
|
738
|
-
const COMPONENT_NAME$
|
|
738
|
+
const COMPONENT_NAME$2d = "vc-transition";
|
|
739
739
|
const Transition = vue.defineComponent({
|
|
740
|
-
name: COMPONENT_NAME$
|
|
741
|
-
props: props$
|
|
740
|
+
name: COMPONENT_NAME$2d,
|
|
741
|
+
props: props$1r,
|
|
742
742
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
743
743
|
inheritAttrs: false,
|
|
744
744
|
setup(props, { slots, attrs }) {
|
|
@@ -758,10 +758,10 @@ const Transition = vue.defineComponent({
|
|
|
758
758
|
}
|
|
759
759
|
});
|
|
760
760
|
|
|
761
|
-
const COMPONENT_NAME$
|
|
761
|
+
const COMPONENT_NAME$2c = "vc-transition-collapse";
|
|
762
762
|
const TransitionCollapse = vue.defineComponent({
|
|
763
|
-
name: COMPONENT_NAME$
|
|
764
|
-
props: props$
|
|
763
|
+
name: COMPONENT_NAME$2c,
|
|
764
|
+
props: props$1r,
|
|
765
765
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
766
766
|
inheritAttrs: false,
|
|
767
767
|
setup(props, { slots, attrs: _attrs }) {
|
|
@@ -875,11 +875,11 @@ const TransitionCollapse = vue.defineComponent({
|
|
|
875
875
|
}
|
|
876
876
|
});
|
|
877
877
|
|
|
878
|
-
const COMPONENT_NAME$
|
|
878
|
+
const COMPONENT_NAME$2b = "vc-transition-fade";
|
|
879
879
|
const TransitionFade = vue.defineComponent({
|
|
880
|
-
name: COMPONENT_NAME$
|
|
880
|
+
name: COMPONENT_NAME$2b,
|
|
881
881
|
props: {
|
|
882
|
-
...props$
|
|
882
|
+
...props$1r,
|
|
883
883
|
// inheritAttrs必须是false
|
|
884
884
|
style: {
|
|
885
885
|
type: Object,
|
|
@@ -912,11 +912,11 @@ const TransitionFade = vue.defineComponent({
|
|
|
912
912
|
}
|
|
913
913
|
});
|
|
914
914
|
|
|
915
|
-
const COMPONENT_NAME$
|
|
915
|
+
const COMPONENT_NAME$2a = "vc-transition-scale";
|
|
916
916
|
const TransitionScale = vue.defineComponent({
|
|
917
|
-
name: COMPONENT_NAME$
|
|
917
|
+
name: COMPONENT_NAME$2a,
|
|
918
918
|
props: {
|
|
919
|
-
...props$
|
|
919
|
+
...props$1r,
|
|
920
920
|
mode: {
|
|
921
921
|
type: String,
|
|
922
922
|
default: "both",
|
|
@@ -954,11 +954,11 @@ const TransitionScale = vue.defineComponent({
|
|
|
954
954
|
}
|
|
955
955
|
});
|
|
956
956
|
|
|
957
|
-
const COMPONENT_NAME$
|
|
957
|
+
const COMPONENT_NAME$29 = "vc-transition-slide";
|
|
958
958
|
const TransitionSlide = vue.defineComponent({
|
|
959
|
-
name: COMPONENT_NAME$
|
|
959
|
+
name: COMPONENT_NAME$29,
|
|
960
960
|
props: {
|
|
961
|
-
...props$
|
|
961
|
+
...props$1r,
|
|
962
962
|
mode: {
|
|
963
963
|
type: String,
|
|
964
964
|
default: "left",
|
|
@@ -996,11 +996,11 @@ const TransitionSlide = vue.defineComponent({
|
|
|
996
996
|
}
|
|
997
997
|
});
|
|
998
998
|
|
|
999
|
-
const COMPONENT_NAME$
|
|
999
|
+
const COMPONENT_NAME$28 = "vc-transition-zoom";
|
|
1000
1000
|
const TransitionZoom = vue.defineComponent({
|
|
1001
|
-
name: COMPONENT_NAME$
|
|
1001
|
+
name: COMPONENT_NAME$28,
|
|
1002
1002
|
props: {
|
|
1003
|
-
...props$
|
|
1003
|
+
...props$1r,
|
|
1004
1004
|
mode: {
|
|
1005
1005
|
type: String,
|
|
1006
1006
|
default: "x",
|
|
@@ -1040,7 +1040,7 @@ const TransitionZoom = vue.defineComponent({
|
|
|
1040
1040
|
|
|
1041
1041
|
/** @jsxImportSource vue */
|
|
1042
1042
|
|
|
1043
|
-
const COMPONENT_NAME$
|
|
1043
|
+
const COMPONENT_NAME$27 = 'vc-alert';
|
|
1044
1044
|
|
|
1045
1045
|
// [color, borderColor, backgroundColor], -> CSS
|
|
1046
1046
|
const THEME_MAP = {
|
|
@@ -1050,8 +1050,8 @@ const THEME_MAP = {
|
|
|
1050
1050
|
warning: ['#ffbf00', '#ffe58f', '#fffbe6']
|
|
1051
1051
|
};
|
|
1052
1052
|
const Alert = /* @__PURE__ */ vue.defineComponent({
|
|
1053
|
-
name: COMPONENT_NAME$
|
|
1054
|
-
props: props$
|
|
1053
|
+
name: COMPONENT_NAME$27,
|
|
1054
|
+
props: props$1t,
|
|
1055
1055
|
setup(props, {
|
|
1056
1056
|
slots,
|
|
1057
1057
|
emit
|
|
@@ -1140,7 +1140,7 @@ const Alert = /* @__PURE__ */ vue.defineComponent({
|
|
|
1140
1140
|
|
|
1141
1141
|
const MAlert = Alert;
|
|
1142
1142
|
|
|
1143
|
-
const props$
|
|
1143
|
+
const props$1q = {
|
|
1144
1144
|
// canvas配置参数
|
|
1145
1145
|
options: Object,
|
|
1146
1146
|
width: {
|
|
@@ -1156,10 +1156,10 @@ const props$1p = {
|
|
|
1156
1156
|
/** @jsxImportSource vue */
|
|
1157
1157
|
|
|
1158
1158
|
const isTouch = typeof document !== 'undefined' && 'ontouchend' in document;
|
|
1159
|
-
const COMPONENT_NAME$
|
|
1159
|
+
const COMPONENT_NAME$26 = 'vc-artboard';
|
|
1160
1160
|
const Artboard = /* @__PURE__ */ vue.defineComponent({
|
|
1161
|
-
name: COMPONENT_NAME$
|
|
1162
|
-
props: props$
|
|
1161
|
+
name: COMPONENT_NAME$26,
|
|
1162
|
+
props: props$1q,
|
|
1163
1163
|
setup(props, {
|
|
1164
1164
|
emit,
|
|
1165
1165
|
expose
|
|
@@ -1362,7 +1362,7 @@ const Artboard = /* @__PURE__ */ vue.defineComponent({
|
|
|
1362
1362
|
|
|
1363
1363
|
const MArtboard = Artboard;
|
|
1364
1364
|
|
|
1365
|
-
const props$
|
|
1365
|
+
const props$1p = {
|
|
1366
1366
|
size: {
|
|
1367
1367
|
type: Number,
|
|
1368
1368
|
default: 28
|
|
@@ -1386,10 +1386,10 @@ const props$1o = {
|
|
|
1386
1386
|
|
|
1387
1387
|
/** @jsxImportSource vue */
|
|
1388
1388
|
|
|
1389
|
-
const COMPONENT_NAME$
|
|
1389
|
+
const COMPONENT_NAME$25 = 'vc-spin';
|
|
1390
1390
|
const Spin = /* @__PURE__ */ vue.defineComponent({
|
|
1391
|
-
name: COMPONENT_NAME$
|
|
1392
|
-
props: props$
|
|
1391
|
+
name: COMPONENT_NAME$25,
|
|
1392
|
+
props: props$1p,
|
|
1393
1393
|
setup(props, {
|
|
1394
1394
|
slots
|
|
1395
1395
|
}) {
|
|
@@ -1423,7 +1423,7 @@ const Spin = /* @__PURE__ */ vue.defineComponent({
|
|
|
1423
1423
|
}
|
|
1424
1424
|
});
|
|
1425
1425
|
|
|
1426
|
-
const props$
|
|
1426
|
+
const props$1o = {
|
|
1427
1427
|
wait: {
|
|
1428
1428
|
type: Number,
|
|
1429
1429
|
default: 250
|
|
@@ -1439,10 +1439,10 @@ const props$1n = {
|
|
|
1439
1439
|
exclude: RegExp
|
|
1440
1440
|
};
|
|
1441
1441
|
|
|
1442
|
-
const COMPONENT_NAME$
|
|
1442
|
+
const COMPONENT_NAME$24 = "vc-debounce";
|
|
1443
1443
|
const Debounce = vue.defineComponent({
|
|
1444
|
-
name: COMPONENT_NAME$
|
|
1445
|
-
props: props$
|
|
1444
|
+
name: COMPONENT_NAME$24,
|
|
1445
|
+
props: props$1o,
|
|
1446
1446
|
/**
|
|
1447
1447
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
1448
1448
|
* 如事件onClick
|
|
@@ -1482,7 +1482,7 @@ const Debounce = vue.defineComponent({
|
|
|
1482
1482
|
}
|
|
1483
1483
|
});
|
|
1484
1484
|
|
|
1485
|
-
const props$
|
|
1485
|
+
const props$1n = {
|
|
1486
1486
|
tag: {
|
|
1487
1487
|
type: String,
|
|
1488
1488
|
default: "button"
|
|
@@ -1514,11 +1514,11 @@ const props$1m = {
|
|
|
1514
1514
|
|
|
1515
1515
|
/** @jsxImportSource vue */
|
|
1516
1516
|
|
|
1517
|
-
const COMPONENT_NAME$
|
|
1517
|
+
const COMPONENT_NAME$23 = 'vc-button';
|
|
1518
1518
|
const Button = /* @__PURE__ */ vue.defineComponent({
|
|
1519
|
-
name: COMPONENT_NAME$
|
|
1519
|
+
name: COMPONENT_NAME$23,
|
|
1520
1520
|
emits: ['click'],
|
|
1521
|
-
props: props$
|
|
1521
|
+
props: props$1n,
|
|
1522
1522
|
setup(props, {
|
|
1523
1523
|
slots
|
|
1524
1524
|
}) {
|
|
@@ -1579,7 +1579,7 @@ const Button = /* @__PURE__ */ vue.defineComponent({
|
|
|
1579
1579
|
}
|
|
1580
1580
|
});
|
|
1581
1581
|
|
|
1582
|
-
const props$
|
|
1582
|
+
const props$1m = {
|
|
1583
1583
|
vertical: {
|
|
1584
1584
|
type: Boolean,
|
|
1585
1585
|
default: false
|
|
@@ -1600,10 +1600,10 @@ const props$1l = {
|
|
|
1600
1600
|
|
|
1601
1601
|
/** @jsxImportSource vue */
|
|
1602
1602
|
|
|
1603
|
-
const COMPONENT_NAME$
|
|
1603
|
+
const COMPONENT_NAME$22 = 'vc-button-group';
|
|
1604
1604
|
const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
|
|
1605
|
-
name: COMPONENT_NAME$
|
|
1606
|
-
props: props$
|
|
1605
|
+
name: COMPONENT_NAME$22,
|
|
1606
|
+
props: props$1m,
|
|
1607
1607
|
setup(props, {
|
|
1608
1608
|
slots
|
|
1609
1609
|
}) {
|
|
@@ -1627,7 +1627,7 @@ const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
|
|
|
1627
1627
|
const MButton = Button;
|
|
1628
1628
|
const MButtonGroup = ButtonGroup;
|
|
1629
1629
|
|
|
1630
|
-
const props$
|
|
1630
|
+
const props$1l = {
|
|
1631
1631
|
tag: {
|
|
1632
1632
|
type: String,
|
|
1633
1633
|
default: "div"
|
|
@@ -1636,10 +1636,10 @@ const props$1k = {
|
|
|
1636
1636
|
|
|
1637
1637
|
/** @jsxImportSource vue */
|
|
1638
1638
|
|
|
1639
|
-
const COMPONENT_NAME$
|
|
1639
|
+
const COMPONENT_NAME$21 = 'vc-calendar';
|
|
1640
1640
|
const Calendar = /* @__PURE__ */ vue.defineComponent({
|
|
1641
|
-
name: COMPONENT_NAME$
|
|
1642
|
-
props: props$
|
|
1641
|
+
name: COMPONENT_NAME$21,
|
|
1642
|
+
props: props$1l,
|
|
1643
1643
|
setup(props, {
|
|
1644
1644
|
slots
|
|
1645
1645
|
}) {
|
|
@@ -1653,7 +1653,7 @@ const Calendar = /* @__PURE__ */ vue.defineComponent({
|
|
|
1653
1653
|
|
|
1654
1654
|
const MCalendar = Calendar;
|
|
1655
1655
|
|
|
1656
|
-
const props$
|
|
1656
|
+
const props$1k = {
|
|
1657
1657
|
border: {
|
|
1658
1658
|
type: Boolean,
|
|
1659
1659
|
default: true
|
|
@@ -1676,10 +1676,10 @@ const props$1j = {
|
|
|
1676
1676
|
|
|
1677
1677
|
/** @jsxImportSource vue */
|
|
1678
1678
|
|
|
1679
|
-
const COMPONENT_NAME$
|
|
1679
|
+
const COMPONENT_NAME$20 = 'vc-card';
|
|
1680
1680
|
const Card = /* @__PURE__ */ vue.defineComponent({
|
|
1681
|
-
name: COMPONENT_NAME$
|
|
1682
|
-
props: props$
|
|
1681
|
+
name: COMPONENT_NAME$20,
|
|
1682
|
+
props: props$1k,
|
|
1683
1683
|
setup(props, {
|
|
1684
1684
|
slots
|
|
1685
1685
|
}) {
|
|
@@ -1705,31 +1705,713 @@ const Card = /* @__PURE__ */ vue.defineComponent({
|
|
|
1705
1705
|
|
|
1706
1706
|
const MCard = Card;
|
|
1707
1707
|
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1708
|
+
const useCarousel = (wrapper, content, expose) => {
|
|
1709
|
+
const instance = vue.getCurrentInstance();
|
|
1710
|
+
const props = instance.props;
|
|
1711
|
+
const { emit } = instance;
|
|
1712
|
+
const items = vue.ref([]);
|
|
1713
|
+
const activeIndex = vue.ref(-1);
|
|
1714
|
+
const timer = vue.ref(null);
|
|
1715
|
+
const offset = vue.ref(0);
|
|
1716
|
+
const carouselId = vue.ref(Utils.getUid("carousel"));
|
|
1717
|
+
const start = vue.ref();
|
|
1718
|
+
const startX = vue.ref();
|
|
1719
|
+
const startY = vue.ref();
|
|
1720
|
+
const allowTransition = vue.ref(false);
|
|
1721
|
+
const direction = vue.computed(() => {
|
|
1722
|
+
return props.vertical ? "vertical" : "horizontal";
|
|
1723
|
+
});
|
|
1724
|
+
const hasLabel = vue.computed(() => {
|
|
1725
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
1726
|
+
});
|
|
1727
|
+
const dotsClasses = vue.computed(() => {
|
|
1728
|
+
const classes = ["is-" + direction.value];
|
|
1729
|
+
if (hasLabel.value) {
|
|
1730
|
+
classes.push("is-labels");
|
|
1731
|
+
}
|
|
1732
|
+
if (props.dots === "outside" || props.card) {
|
|
1733
|
+
classes.push("is-outside");
|
|
1734
|
+
}
|
|
1735
|
+
return classes;
|
|
1736
|
+
});
|
|
1737
|
+
const resetItems = (oldIndex) => {
|
|
1738
|
+
items.value.forEach((item, index) => {
|
|
1739
|
+
item.exposed?.reset?.(index, activeIndex.value, oldIndex);
|
|
1740
|
+
});
|
|
1741
|
+
};
|
|
1742
|
+
const playSlides = () => {
|
|
1743
|
+
allowTransition.value = true;
|
|
1744
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
1745
|
+
activeIndex.value++;
|
|
1746
|
+
} else if (props.loop) {
|
|
1747
|
+
activeIndex.value = 0;
|
|
1748
|
+
}
|
|
1749
|
+
};
|
|
1750
|
+
const pauseTimer = () => {
|
|
1751
|
+
if (timer.value) {
|
|
1752
|
+
clearInterval(timer.value);
|
|
1753
|
+
timer.value = null;
|
|
1754
|
+
}
|
|
1755
|
+
};
|
|
1756
|
+
const startTimer = () => {
|
|
1757
|
+
if (props.t <= 0 || !props.autoplay || timer.value) return;
|
|
1758
|
+
timer.value = setInterval(playSlides, props.t);
|
|
1759
|
+
};
|
|
1760
|
+
const setActiveItem = (index) => {
|
|
1761
|
+
if (typeof index === "string") {
|
|
1762
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
1763
|
+
if (filteredItems.length > 0) {
|
|
1764
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
index = Number(index);
|
|
1768
|
+
if (isNaN(index) || index !== Math.floor(index)) {
|
|
1769
|
+
throw new VcError("carousel", "索引必须是整数");
|
|
1770
|
+
}
|
|
1771
|
+
const length = items.value.length;
|
|
1772
|
+
const oldIndex = activeIndex.value;
|
|
1773
|
+
if (index < 0) {
|
|
1774
|
+
activeIndex.value = props.loop ? length - 1 : 0;
|
|
1775
|
+
} else if (index >= length) {
|
|
1776
|
+
activeIndex.value = props.loop ? 0 : length - 1;
|
|
1777
|
+
} else {
|
|
1778
|
+
activeIndex.value = index;
|
|
1779
|
+
}
|
|
1780
|
+
if (oldIndex === activeIndex.value) {
|
|
1781
|
+
resetItems(oldIndex);
|
|
1782
|
+
}
|
|
1783
|
+
};
|
|
1784
|
+
const prev = () => {
|
|
1785
|
+
setActiveItem(activeIndex.value - 1);
|
|
1786
|
+
};
|
|
1787
|
+
const next = () => {
|
|
1788
|
+
setActiveItem(activeIndex.value + 1);
|
|
1789
|
+
};
|
|
1790
|
+
const handleDotClick = (index) => {
|
|
1791
|
+
activeIndex.value = index;
|
|
1792
|
+
};
|
|
1793
|
+
const handleStart = (e) => {
|
|
1794
|
+
allowTransition.value = true;
|
|
1795
|
+
if (!props.draggable) return;
|
|
1796
|
+
pauseTimer();
|
|
1797
|
+
start.value = true;
|
|
1798
|
+
startX.value = e.screenX;
|
|
1799
|
+
startY.value = e.screenY;
|
|
1800
|
+
};
|
|
1801
|
+
const handleMove = (e) => {
|
|
1802
|
+
if (!start.value || !props.draggable) return;
|
|
1803
|
+
offset.value = !props.vertical ? e.screenX - startX.value : e.screenY - startY.value;
|
|
1804
|
+
resetItems();
|
|
1805
|
+
};
|
|
1806
|
+
const handleEnd = () => {
|
|
1807
|
+
if (!props.draggable) return;
|
|
1808
|
+
start.value = false;
|
|
1809
|
+
startTimer();
|
|
1810
|
+
const $offset = Math.abs(offset.value);
|
|
1811
|
+
const $direction = offset.value > 0;
|
|
1812
|
+
offset.value = 0;
|
|
1813
|
+
if ($offset > 5) {
|
|
1814
|
+
$direction && prev();
|
|
1815
|
+
!$direction && next();
|
|
1816
|
+
} else {
|
|
1817
|
+
resetItems();
|
|
1818
|
+
}
|
|
1819
|
+
};
|
|
1820
|
+
vue.watch(
|
|
1821
|
+
() => items.value,
|
|
1822
|
+
(v) => {
|
|
1823
|
+
if (v.length > 0) setActiveItem(props.initialIndex);
|
|
1824
|
+
}
|
|
1825
|
+
);
|
|
1826
|
+
vue.watch(
|
|
1827
|
+
() => activeIndex.value,
|
|
1828
|
+
(v, oldV) => {
|
|
1829
|
+
resetItems(oldV);
|
|
1830
|
+
emit("change", v, oldV);
|
|
1831
|
+
}
|
|
1832
|
+
);
|
|
1833
|
+
vue.watch(
|
|
1834
|
+
() => props.autoplay,
|
|
1835
|
+
(v) => {
|
|
1836
|
+
v ? startTimer() : pauseTimer();
|
|
1837
|
+
}
|
|
1838
|
+
);
|
|
1839
|
+
vue.watch(
|
|
1840
|
+
() => props.loop,
|
|
1841
|
+
() => {
|
|
1842
|
+
setActiveItem(activeIndex.value);
|
|
1843
|
+
}
|
|
1844
|
+
);
|
|
1845
|
+
vue.watch(
|
|
1846
|
+
() => props.t,
|
|
1847
|
+
() => {
|
|
1848
|
+
pauseTimer();
|
|
1849
|
+
startTimer();
|
|
1850
|
+
}
|
|
1851
|
+
);
|
|
1852
|
+
vue.onMounted(() => {
|
|
1853
|
+
vue.nextTick(() => {
|
|
1854
|
+
if (wrapper.value) helperResize.Resize.on(wrapper.value, resetItems);
|
|
1855
|
+
if (props.initialIndex < items.value.length && props.initialIndex >= 0) {
|
|
1856
|
+
activeIndex.value = props.initialIndex;
|
|
1857
|
+
}
|
|
1858
|
+
startTimer();
|
|
1859
|
+
});
|
|
1860
|
+
});
|
|
1861
|
+
vue.onBeforeUnmount(() => {
|
|
1862
|
+
if (wrapper.value) helperResize.Resize.off(wrapper.value, resetItems);
|
|
1863
|
+
pauseTimer();
|
|
1864
|
+
startTimer();
|
|
1865
|
+
});
|
|
1866
|
+
const add = (item) => {
|
|
1867
|
+
if (!item) return;
|
|
1868
|
+
vue.nextTick(() => {
|
|
1869
|
+
if (content.value) {
|
|
1870
|
+
const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
|
|
1871
|
+
items.value.splice(index, 0, item);
|
|
1872
|
+
return;
|
|
1873
|
+
}
|
|
1874
|
+
items.value.push(item);
|
|
1875
|
+
});
|
|
1876
|
+
};
|
|
1877
|
+
const remove = (item) => {
|
|
1878
|
+
if (!item) return;
|
|
1879
|
+
items.value.splice(items.value.indexOf(item), 1);
|
|
1880
|
+
};
|
|
1881
|
+
vue.provide("vc-carousel", {
|
|
1882
|
+
props,
|
|
1883
|
+
items,
|
|
1884
|
+
offset,
|
|
1885
|
+
allowTransition,
|
|
1886
|
+
setActiveItem,
|
|
1887
|
+
wrapper,
|
|
1888
|
+
content,
|
|
1889
|
+
add,
|
|
1890
|
+
remove
|
|
1891
|
+
});
|
|
1892
|
+
expose({
|
|
1893
|
+
setActiveItem,
|
|
1894
|
+
prev,
|
|
1895
|
+
next
|
|
1896
|
+
});
|
|
1897
|
+
return {
|
|
1898
|
+
carouselId,
|
|
1899
|
+
allowTransition,
|
|
1900
|
+
items,
|
|
1901
|
+
activeIndex,
|
|
1902
|
+
offset,
|
|
1903
|
+
direction,
|
|
1904
|
+
hasLabel,
|
|
1905
|
+
dotsClasses,
|
|
1906
|
+
start,
|
|
1907
|
+
startX,
|
|
1908
|
+
startY,
|
|
1909
|
+
handleStart,
|
|
1910
|
+
handleMove,
|
|
1911
|
+
handleEnd,
|
|
1912
|
+
handleDotClick,
|
|
1913
|
+
prev,
|
|
1914
|
+
next,
|
|
1915
|
+
setActiveItem,
|
|
1916
|
+
pauseTimer,
|
|
1917
|
+
startTimer
|
|
1918
|
+
};
|
|
1919
|
+
};
|
|
1920
|
+
|
|
1921
|
+
const props$1j = {
|
|
1922
|
+
t: {
|
|
1923
|
+
type: Number,
|
|
1924
|
+
default: 3e3
|
|
1925
|
+
},
|
|
1926
|
+
card: Boolean,
|
|
1927
|
+
gutter: {
|
|
1928
|
+
type: Number,
|
|
1929
|
+
default: 0
|
|
1930
|
+
},
|
|
1931
|
+
height: [String, Number],
|
|
1932
|
+
initialIndex: {
|
|
1933
|
+
type: Number,
|
|
1934
|
+
default: 0
|
|
1935
|
+
},
|
|
1936
|
+
trigger: {
|
|
1710
1937
|
type: String,
|
|
1711
|
-
default: "
|
|
1938
|
+
default: "hover"
|
|
1939
|
+
},
|
|
1940
|
+
autoplay: {
|
|
1941
|
+
type: Boolean,
|
|
1942
|
+
default: true
|
|
1943
|
+
},
|
|
1944
|
+
dots: {
|
|
1945
|
+
type: [String, Boolean],
|
|
1946
|
+
default: "bottom"
|
|
1947
|
+
// bottom/outside | false
|
|
1948
|
+
},
|
|
1949
|
+
arrow: {
|
|
1950
|
+
type: [String, Boolean],
|
|
1951
|
+
default: "hover"
|
|
1952
|
+
// hover/always | false
|
|
1953
|
+
},
|
|
1954
|
+
loop: {
|
|
1955
|
+
type: Boolean,
|
|
1956
|
+
default: true
|
|
1957
|
+
},
|
|
1958
|
+
vertical: {
|
|
1959
|
+
type: Boolean,
|
|
1960
|
+
default: false
|
|
1961
|
+
},
|
|
1962
|
+
draggable: {
|
|
1963
|
+
type: Boolean,
|
|
1964
|
+
default: true
|
|
1712
1965
|
}
|
|
1713
1966
|
};
|
|
1714
1967
|
|
|
1715
1968
|
/** @jsxImportSource vue */
|
|
1716
1969
|
|
|
1717
|
-
const COMPONENT_NAME$
|
|
1970
|
+
const COMPONENT_NAME$1$ = 'vc-carousel';
|
|
1718
1971
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
1719
|
-
name: COMPONENT_NAME$
|
|
1972
|
+
name: COMPONENT_NAME$1$,
|
|
1973
|
+
props: props$1j,
|
|
1974
|
+
setup(props, {
|
|
1975
|
+
slots,
|
|
1976
|
+
expose
|
|
1977
|
+
}) {
|
|
1978
|
+
const isHover = vue.ref(false);
|
|
1979
|
+
const wrapper = vue.ref(null);
|
|
1980
|
+
const content = vue.ref(null);
|
|
1981
|
+
const arrowDisplay = vue.computed(() => {
|
|
1982
|
+
return props.arrow && !props.vertical;
|
|
1983
|
+
});
|
|
1984
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
1985
|
+
const itemInStage = (item, index, items) => {
|
|
1986
|
+
const length = items.length;
|
|
1987
|
+
const isInStage = item.exposed.isInStage.value;
|
|
1988
|
+
if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
|
|
1989
|
+
return 'left';
|
|
1990
|
+
} else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
|
|
1991
|
+
return 'right';
|
|
1992
|
+
}
|
|
1993
|
+
return false;
|
|
1994
|
+
};
|
|
1995
|
+
const handleButtonEnter = arrow => {
|
|
1996
|
+
if (props.vertical) return;
|
|
1997
|
+
carousel.items.value.forEach((item, index, items) => {
|
|
1998
|
+
if (arrow === itemInStage(item, index, items)) {
|
|
1999
|
+
item.exposed.isHover.value = true;
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
2002
|
+
};
|
|
2003
|
+
const handleButtonLeave = () => {
|
|
2004
|
+
if (props.vertical) return;
|
|
2005
|
+
carousel.items.value.forEach(item => {
|
|
2006
|
+
item.exposed.isHover.value = false;
|
|
2007
|
+
});
|
|
2008
|
+
};
|
|
2009
|
+
const handleDotHover = index => {
|
|
2010
|
+
if (props.trigger === 'hover' && index !== carousel.activeIndex.value) {
|
|
2011
|
+
carousel.activeIndex.value = index;
|
|
2012
|
+
}
|
|
2013
|
+
};
|
|
2014
|
+
const handleMouseEnter = () => {
|
|
2015
|
+
isHover.value = true;
|
|
2016
|
+
carousel.pauseTimer();
|
|
2017
|
+
};
|
|
2018
|
+
const handleMouseLeave = () => {
|
|
2019
|
+
isHover.value = false;
|
|
2020
|
+
carousel.startTimer();
|
|
2021
|
+
};
|
|
2022
|
+
const throttledArrowClick = lodashEs.throttle(carousel.setActiveItem);
|
|
2023
|
+
const throttledDotHover = lodashEs.throttle(handleDotHover);
|
|
2024
|
+
return () => {
|
|
2025
|
+
return vue.createVNode("div", {
|
|
2026
|
+
"ref": wrapper,
|
|
2027
|
+
"class": ['vc-carousel', `is-${carousel.direction.value}`],
|
|
2028
|
+
"onMousedown": vue.withModifiers(carousel.handleStart, ['stop', 'prevent']),
|
|
2029
|
+
"onMousemove": vue.withModifiers(carousel.handleMove, ['stop', 'prevent']),
|
|
2030
|
+
"onMouseup": vue.withModifiers(carousel.handleEnd, ['stop', 'prevent']),
|
|
2031
|
+
"onMouseenter": vue.withModifiers(handleMouseEnter, ['stop']),
|
|
2032
|
+
"onMouseleave": vue.withModifiers(handleMouseLeave, ['stop'])
|
|
2033
|
+
}, [vue.createVNode("div", {
|
|
2034
|
+
"ref": content,
|
|
2035
|
+
"class": "vc-carousel__wrapper",
|
|
2036
|
+
"style": {
|
|
2037
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
2038
|
+
}
|
|
2039
|
+
}, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
2040
|
+
"mode": "left-part"
|
|
2041
|
+
}, {
|
|
2042
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
2043
|
+
"type": "button",
|
|
2044
|
+
"class": "vc-carousel__arrow is-left-arrow",
|
|
2045
|
+
"onMouseenter": () => handleButtonEnter('left'),
|
|
2046
|
+
"onMouseleave": handleButtonLeave,
|
|
2047
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ['stop'])
|
|
2048
|
+
}, [vue.createVNode(Icon, {
|
|
2049
|
+
"type": "left"
|
|
2050
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value > 0)]])]
|
|
2051
|
+
}), arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
2052
|
+
"mode": "right-part"
|
|
2053
|
+
}, {
|
|
2054
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
2055
|
+
"type": "button",
|
|
2056
|
+
"class": "vc-carousel__arrow is-right-arrow",
|
|
2057
|
+
"onMouseenter": () => handleButtonEnter('right'),
|
|
2058
|
+
"onMouseleave": handleButtonLeave,
|
|
2059
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ['stop'])
|
|
2060
|
+
}, [vue.createVNode(Icon, {
|
|
2061
|
+
"type": "right"
|
|
2062
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
|
|
2063
|
+
}), slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
2064
|
+
"class": ['vc-carousel__dots', ...carousel.dotsClasses.value]
|
|
2065
|
+
}, [carousel.items.value.map((item, index) => vue.createVNode("li", {
|
|
2066
|
+
"key": index,
|
|
2067
|
+
"class": ['vc-carousel__dot', `is-${carousel.direction.value}`, {
|
|
2068
|
+
'is-active': index === carousel.activeIndex.value
|
|
2069
|
+
}],
|
|
2070
|
+
"onMouseenter": () => throttledDotHover(index),
|
|
2071
|
+
"onClick": () => carousel.handleDotClick(index)
|
|
2072
|
+
}, [vue.createVNode("button", {
|
|
2073
|
+
"class": "vc-carousel__button"
|
|
2074
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
|
|
2075
|
+
};
|
|
2076
|
+
}
|
|
2077
|
+
});
|
|
2078
|
+
|
|
2079
|
+
const props$1i = {
|
|
2080
|
+
name: String,
|
|
2081
|
+
label: {
|
|
2082
|
+
type: [String, Number],
|
|
2083
|
+
default: ""
|
|
2084
|
+
},
|
|
2085
|
+
// card大小
|
|
2086
|
+
width: {
|
|
2087
|
+
type: [Number, String],
|
|
2088
|
+
default: "70%"
|
|
2089
|
+
},
|
|
2090
|
+
// card之间间距, 或者滑动时候的间距
|
|
2091
|
+
gutter: {
|
|
2092
|
+
type: Number,
|
|
2093
|
+
default: 0
|
|
2094
|
+
},
|
|
2095
|
+
scale: {
|
|
2096
|
+
type: Number,
|
|
2097
|
+
default: 0.83
|
|
2098
|
+
}
|
|
2099
|
+
};
|
|
2100
|
+
|
|
2101
|
+
const TRANSFORM = $.prefixStyle("transform").camel;
|
|
2102
|
+
const useCarouselItem = (expose) => {
|
|
2103
|
+
const instance = vue.getCurrentInstance();
|
|
2104
|
+
const carousel = vue.inject("vc-carousel", {});
|
|
2105
|
+
const props = instance.props;
|
|
2106
|
+
const translate = vue.ref(0);
|
|
2107
|
+
const currentScale = vue.ref(1);
|
|
2108
|
+
const isHover = vue.ref(false);
|
|
2109
|
+
const isActive = vue.ref(false);
|
|
2110
|
+
const isReady = vue.ref(false);
|
|
2111
|
+
const isInStage = vue.ref(false);
|
|
2112
|
+
const isAnimating = vue.ref(false);
|
|
2113
|
+
const isVertical = vue.computed(() => {
|
|
2114
|
+
return carousel.props.vertical;
|
|
2115
|
+
});
|
|
2116
|
+
const isCard = vue.computed(() => {
|
|
2117
|
+
return carousel.props.card;
|
|
2118
|
+
});
|
|
2119
|
+
const isMove = vue.computed(() => {
|
|
2120
|
+
return carousel.offset.value !== 0;
|
|
2121
|
+
});
|
|
2122
|
+
const itemGutter = vue.computed(() => {
|
|
2123
|
+
return props.gutter || carousel.props.gutter || 0;
|
|
2124
|
+
});
|
|
2125
|
+
const itemStyle = vue.computed(() => {
|
|
2126
|
+
const translateType = isVertical.value ? "translateY" : "translateX";
|
|
2127
|
+
if (carousel.props.card) {
|
|
2128
|
+
return {
|
|
2129
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
2130
|
+
width: props.width
|
|
2131
|
+
};
|
|
2132
|
+
} else {
|
|
2133
|
+
return {
|
|
2134
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
2135
|
+
width: itemGutter.value ? props.width : "100%"
|
|
2136
|
+
};
|
|
2137
|
+
}
|
|
2138
|
+
});
|
|
2139
|
+
vue.onBeforeMount(() => {
|
|
2140
|
+
carousel.add?.(instance);
|
|
2141
|
+
if (!isCard.value && itemGutter.value && carousel.props.loop) {
|
|
2142
|
+
throw new VcError("carousel", "slide模式下loop不能为true");
|
|
2143
|
+
}
|
|
2144
|
+
});
|
|
2145
|
+
vue.onBeforeUnmount(() => {
|
|
2146
|
+
carousel.remove?.(instance);
|
|
2147
|
+
});
|
|
2148
|
+
const processIndex = (index, activeIndex, length) => {
|
|
2149
|
+
if (activeIndex === 0 && index === length - 1) {
|
|
2150
|
+
return -1;
|
|
2151
|
+
} else if (activeIndex === length - 1 && index === 0) {
|
|
2152
|
+
return length;
|
|
2153
|
+
} else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
|
|
2154
|
+
return length + 1;
|
|
2155
|
+
} else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
|
|
2156
|
+
return -2;
|
|
2157
|
+
}
|
|
2158
|
+
return index;
|
|
2159
|
+
};
|
|
2160
|
+
const calcCardTranslate = (index, activeIndex) => {
|
|
2161
|
+
let value;
|
|
2162
|
+
const widthNumber = +props.width / 100;
|
|
2163
|
+
const parentW = carousel.wrapper.value.offsetWidth;
|
|
2164
|
+
if (isInStage.value) {
|
|
2165
|
+
if (index === activeIndex) {
|
|
2166
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
2167
|
+
} else if (index > activeIndex) {
|
|
2168
|
+
value = parentW * (1 + widthNumber * props.scale) / 2 + itemGutter.value;
|
|
2169
|
+
} else {
|
|
2170
|
+
value = -(parentW * ((widthNumber * props.scale - 1) / 2 + widthNumber)) - itemGutter.value;
|
|
2171
|
+
}
|
|
2172
|
+
} else if (index < activeIndex) {
|
|
2173
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
2174
|
+
} else {
|
|
2175
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
2176
|
+
}
|
|
2177
|
+
return value;
|
|
2178
|
+
};
|
|
2179
|
+
const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
|
|
2180
|
+
const { length } = carousel.items.value;
|
|
2181
|
+
const offset = wrapperWidth - (instance.vnode?.el?.offsetWidth || 0);
|
|
2182
|
+
const gutter = itemGutter.value;
|
|
2183
|
+
if (!gutter || isVertical.value) return 0;
|
|
2184
|
+
let slideOffset = 0;
|
|
2185
|
+
if (length === 1) {
|
|
2186
|
+
return offset / 2;
|
|
2187
|
+
}
|
|
2188
|
+
if (activeIndex == 0) {
|
|
2189
|
+
if (index - activeIndex === 0) {
|
|
2190
|
+
slideOffset = gutter;
|
|
2191
|
+
} else if (index - activeIndex === 1) {
|
|
2192
|
+
slideOffset = -offset + gutter * 2;
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
if (activeIndex !== 0 && activeIndex != length - 1) {
|
|
2196
|
+
if (index - activeIndex === 0) {
|
|
2197
|
+
slideOffset = offset / 2;
|
|
2198
|
+
} else if (index - activeIndex === 1) {
|
|
2199
|
+
slideOffset = -offset / 2 + gutter;
|
|
2200
|
+
} else if (index - activeIndex === -1) {
|
|
2201
|
+
slideOffset = offset * 3 / 2 - gutter;
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
if (activeIndex == length - 1) {
|
|
2205
|
+
if (index - activeIndex === 0) {
|
|
2206
|
+
slideOffset = offset - gutter;
|
|
2207
|
+
} else if (index - activeIndex === -1) {
|
|
2208
|
+
slideOffset = offset * 2 - gutter * 2;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
return slideOffset;
|
|
2212
|
+
};
|
|
2213
|
+
const calcTranslate = (index, activeIndex) => {
|
|
2214
|
+
const distance = carousel.vnode.el[isVertical.value ? "offsetHeight" : "offsetWidth"];
|
|
2215
|
+
const slideOffset = calcSlideOffset(index, activeIndex, distance);
|
|
2216
|
+
return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
|
|
2217
|
+
};
|
|
2218
|
+
const reset = (index, activeIndex, oldIndex) => {
|
|
2219
|
+
const { length } = carousel.items.value;
|
|
2220
|
+
if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
|
|
2221
|
+
isAnimating.value = index === activeIndex || index === oldIndex;
|
|
2222
|
+
if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
|
|
2223
|
+
isAnimating.value = true;
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
if (index !== activeIndex && length > 2 && carousel.props.loop) {
|
|
2227
|
+
index = processIndex(index, activeIndex, length);
|
|
2228
|
+
}
|
|
2229
|
+
if (isCard.value) {
|
|
2230
|
+
if (isVertical.value) {
|
|
2231
|
+
throw new VcError("carousel", "卡片模式不支持垂直方向");
|
|
2232
|
+
}
|
|
2233
|
+
isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
2234
|
+
isActive.value = index === activeIndex;
|
|
2235
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
2236
|
+
currentScale.value = isActive.value ? 1 : props.scale;
|
|
2237
|
+
} else {
|
|
2238
|
+
isActive.value = index === activeIndex;
|
|
2239
|
+
translate.value = calcTranslate(index, activeIndex);
|
|
2240
|
+
}
|
|
2241
|
+
isReady.value = true;
|
|
2242
|
+
};
|
|
2243
|
+
const handleItemClick = () => {
|
|
2244
|
+
if (parent && isCard.value) {
|
|
2245
|
+
const index = carousel.items.value.indexOf(instance);
|
|
2246
|
+
carousel.setActiveItem(index);
|
|
2247
|
+
}
|
|
2248
|
+
};
|
|
2249
|
+
expose({
|
|
2250
|
+
reset,
|
|
2251
|
+
isInStage,
|
|
2252
|
+
isHover,
|
|
2253
|
+
isActive
|
|
2254
|
+
});
|
|
2255
|
+
return {
|
|
2256
|
+
translate,
|
|
2257
|
+
currentScale,
|
|
2258
|
+
isHover,
|
|
2259
|
+
isActive,
|
|
2260
|
+
isReady,
|
|
2261
|
+
isInStage,
|
|
2262
|
+
isAnimating,
|
|
2263
|
+
isVertical,
|
|
2264
|
+
isCard,
|
|
2265
|
+
isMove,
|
|
2266
|
+
itemGutter,
|
|
2267
|
+
itemStyle,
|
|
2268
|
+
reset,
|
|
2269
|
+
handleItemClick
|
|
2270
|
+
};
|
|
2271
|
+
};
|
|
2272
|
+
|
|
2273
|
+
/** @jsxImportSource vue */
|
|
2274
|
+
|
|
2275
|
+
const COMPONENT_NAME$1_ = 'vc-carousel-item';
|
|
2276
|
+
const CarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
2277
|
+
name: COMPONENT_NAME$1_,
|
|
1720
2278
|
props: props$1i,
|
|
2279
|
+
setup(_, {
|
|
2280
|
+
slots,
|
|
2281
|
+
expose
|
|
2282
|
+
}) {
|
|
2283
|
+
const it = useCarouselItem(expose);
|
|
2284
|
+
return () => {
|
|
2285
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
2286
|
+
"class": ['vc-carousel-item', {
|
|
2287
|
+
'is-active': it.isActive.value,
|
|
2288
|
+
'is-card': it.isCard.value,
|
|
2289
|
+
'is-in-stage': it.isInStage.value,
|
|
2290
|
+
'is-hover': it.isHover.value,
|
|
2291
|
+
'is-animating': it.isAnimating.value && !it.isMove.value
|
|
2292
|
+
}],
|
|
2293
|
+
"style": it.itemStyle.value,
|
|
2294
|
+
"onClick": it.handleItemClick
|
|
2295
|
+
}, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
|
|
2296
|
+
"class": "vc-carousel-item__mask"
|
|
2297
|
+
}, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
2298
|
+
};
|
|
2299
|
+
}
|
|
2300
|
+
});
|
|
2301
|
+
|
|
2302
|
+
/** @jsxImportSource vue */
|
|
2303
|
+
|
|
2304
|
+
const COMPONENT_NAME$1Z = 'vcm-carousel';
|
|
2305
|
+
const MCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
2306
|
+
name: COMPONENT_NAME$1Z,
|
|
2307
|
+
props: {
|
|
2308
|
+
...props$1j,
|
|
2309
|
+
dots: {
|
|
2310
|
+
type: [String, Boolean],
|
|
2311
|
+
default: false
|
|
2312
|
+
},
|
|
2313
|
+
indicator: {
|
|
2314
|
+
type: Boolean,
|
|
2315
|
+
default: true
|
|
2316
|
+
}
|
|
2317
|
+
},
|
|
1721
2318
|
setup(props, {
|
|
1722
|
-
slots
|
|
2319
|
+
slots,
|
|
2320
|
+
expose
|
|
1723
2321
|
}) {
|
|
2322
|
+
const wrapper = vue.ref(null);
|
|
2323
|
+
const content = vue.ref(null);
|
|
2324
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
2325
|
+
let scrollStatus = 0;
|
|
2326
|
+
const handleTouchStart = e => {
|
|
2327
|
+
carousel.handleStart(e.touches[0]);
|
|
2328
|
+
scrollStatus = 0;
|
|
2329
|
+
};
|
|
2330
|
+
const handleTouchMove = e => {
|
|
2331
|
+
const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
|
|
2332
|
+
const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
|
|
2333
|
+
if (!props.vertical && absX > absY && scrollStatus !== 1) {
|
|
2334
|
+
e.preventDefault();
|
|
2335
|
+
carousel.handleMove(e.touches[0]);
|
|
2336
|
+
scrollStatus = 2;
|
|
2337
|
+
return;
|
|
2338
|
+
}
|
|
2339
|
+
if (props.vertical && absY > absX) {
|
|
2340
|
+
e.preventDefault();
|
|
2341
|
+
carousel.handleMove(e.touches[0]);
|
|
2342
|
+
return;
|
|
2343
|
+
}
|
|
2344
|
+
if (scrollStatus === 0) {
|
|
2345
|
+
scrollStatus = 1;
|
|
2346
|
+
}
|
|
2347
|
+
};
|
|
2348
|
+
|
|
2349
|
+
// e.changedTouches[0]
|
|
2350
|
+
const handleTouchEnd = () => {
|
|
2351
|
+
carousel.handleEnd();
|
|
2352
|
+
scrollStatus = 0;
|
|
2353
|
+
};
|
|
1724
2354
|
return () => {
|
|
1725
2355
|
return vue.createVNode("div", {
|
|
1726
|
-
"
|
|
1727
|
-
|
|
2356
|
+
"ref": wrapper,
|
|
2357
|
+
"class": ['vcm-carousel', `is-${carousel.direction.value}`],
|
|
2358
|
+
"onTouchstart": vue.withModifiers(handleTouchStart, ['stop']),
|
|
2359
|
+
"onTouchmove": vue.withModifiers(handleTouchMove, ['stop']),
|
|
2360
|
+
"onTouchend": vue.withModifiers(handleTouchEnd, ['stop'])
|
|
2361
|
+
}, [vue.createVNode("div", {
|
|
2362
|
+
"ref": content,
|
|
2363
|
+
"style": {
|
|
2364
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
2365
|
+
},
|
|
2366
|
+
"class": "vcm-carousel__wrapper"
|
|
2367
|
+
}, [slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
2368
|
+
"class": ['vcm-carousel__dots', ...carousel.dotsClasses.value]
|
|
2369
|
+
}, [carousel.items.value.map((_, index) => vue.createVNode("li", {
|
|
2370
|
+
"key": index,
|
|
2371
|
+
"class": ['vcm-carousel__dot', 'is-' + carousel.direction.value, {
|
|
2372
|
+
'is-active': index === carousel.activeIndex.value
|
|
2373
|
+
}],
|
|
2374
|
+
"onClick": e => {
|
|
2375
|
+
e.stopPropagation();
|
|
2376
|
+
carousel.handleDotClick(index);
|
|
2377
|
+
}
|
|
2378
|
+
}, [vue.createVNode("button", {
|
|
2379
|
+
"class": "vcm-carousel__button"
|
|
2380
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props.card && props.indicator && vue.createVNode("div", {
|
|
2381
|
+
"class": "vcm-carousel__indicator"
|
|
2382
|
+
}, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
|
|
1728
2383
|
};
|
|
1729
2384
|
}
|
|
1730
2385
|
});
|
|
1731
2386
|
|
|
1732
|
-
|
|
2387
|
+
/** @jsxImportSource vue */
|
|
2388
|
+
|
|
2389
|
+
const COMPONENT_NAME$1Y = 'vcm-carousel-item';
|
|
2390
|
+
const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
2391
|
+
name: COMPONENT_NAME$1Y,
|
|
2392
|
+
props: props$1i,
|
|
2393
|
+
setup(_, {
|
|
2394
|
+
slots,
|
|
2395
|
+
expose
|
|
2396
|
+
}) {
|
|
2397
|
+
const it = useCarouselItem(expose);
|
|
2398
|
+
return () => {
|
|
2399
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
2400
|
+
"style": it.itemStyle.value,
|
|
2401
|
+
"class": {
|
|
2402
|
+
'vcm-carousel-item': true,
|
|
2403
|
+
'is-active': it.isActive.value,
|
|
2404
|
+
'is-card': it.isCard.value,
|
|
2405
|
+
'is-animating': it.isAnimating.value && !it.isMove.value,
|
|
2406
|
+
'is-in-stage': it.isInStage.value
|
|
2407
|
+
},
|
|
2408
|
+
"onClick": it.handleItemClick
|
|
2409
|
+
}, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
|
|
2410
|
+
"class": "vcm-carousel-item__mask"
|
|
2411
|
+
}, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
2412
|
+
};
|
|
2413
|
+
}
|
|
2414
|
+
});
|
|
1733
2415
|
|
|
1734
2416
|
const getSelectedData = (value = [], source = []) => {
|
|
1735
2417
|
const label = [];
|
|
@@ -2010,9 +2692,9 @@ const useNativeEmitter = (input, expose) => {
|
|
|
2010
2692
|
|
|
2011
2693
|
/** @jsxImportSource vue */
|
|
2012
2694
|
|
|
2013
|
-
const COMPONENT_NAME$
|
|
2695
|
+
const COMPONENT_NAME$1X = 'vc-input';
|
|
2014
2696
|
const Input = /* @__PURE__ */ vue.defineComponent({
|
|
2015
|
-
name: COMPONENT_NAME$
|
|
2697
|
+
name: COMPONENT_NAME$1X,
|
|
2016
2698
|
inheritAttrs: false,
|
|
2017
2699
|
props: {
|
|
2018
2700
|
...props$1h,
|
|
@@ -2347,9 +3029,9 @@ const useInputNumber = () => {
|
|
|
2347
3029
|
|
|
2348
3030
|
/** @jsxImportSource vue */
|
|
2349
3031
|
|
|
2350
|
-
const COMPONENT_NAME$
|
|
3032
|
+
const COMPONENT_NAME$1W = 'vc-input-number';
|
|
2351
3033
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
2352
|
-
name: COMPONENT_NAME$
|
|
3034
|
+
name: COMPONENT_NAME$1W,
|
|
2353
3035
|
props: props$1g,
|
|
2354
3036
|
inheritAttrs: false,
|
|
2355
3037
|
setup(props, {
|
|
@@ -2413,9 +3095,9 @@ const props$1f = {
|
|
|
2413
3095
|
|
|
2414
3096
|
/** @jsxImportSource vue */
|
|
2415
3097
|
|
|
2416
|
-
const COMPONENT_NAME$
|
|
3098
|
+
const COMPONENT_NAME$1V = 'vc-input-search';
|
|
2417
3099
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
2418
|
-
name: COMPONENT_NAME$
|
|
3100
|
+
name: COMPONENT_NAME$1V,
|
|
2419
3101
|
props: props$1f,
|
|
2420
3102
|
inheritAttrs: false,
|
|
2421
3103
|
setup(props, {
|
|
@@ -2808,9 +3490,9 @@ const props$1c = {
|
|
|
2808
3490
|
}
|
|
2809
3491
|
};
|
|
2810
3492
|
|
|
2811
|
-
const COMPONENT_NAME$
|
|
3493
|
+
const COMPONENT_NAME$1U = "vc-customer";
|
|
2812
3494
|
const Customer = vue.defineComponent({
|
|
2813
|
-
name: COMPONENT_NAME$
|
|
3495
|
+
name: COMPONENT_NAME$1U,
|
|
2814
3496
|
props: props$1c,
|
|
2815
3497
|
setup(props, context) {
|
|
2816
3498
|
return () => vue.h(() => {
|
|
@@ -2886,7 +3568,7 @@ class PortalLeaf {
|
|
|
2886
3568
|
}
|
|
2887
3569
|
}
|
|
2888
3570
|
|
|
2889
|
-
const COMPONENT_NAME$
|
|
3571
|
+
const COMPONENT_NAME$1T = "vc-portal";
|
|
2890
3572
|
class Portal {
|
|
2891
3573
|
/**
|
|
2892
3574
|
* 清理Portals类型组件
|
|
@@ -2936,7 +3618,7 @@ class Portal {
|
|
|
2936
3618
|
this.wrapper = wrapper;
|
|
2937
3619
|
this.globalOptions = {
|
|
2938
3620
|
...options,
|
|
2939
|
-
name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$
|
|
3621
|
+
name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1T)
|
|
2940
3622
|
};
|
|
2941
3623
|
}
|
|
2942
3624
|
popup(propsData, options) {
|
|
@@ -3034,7 +3716,7 @@ class Portal {
|
|
|
3034
3716
|
...rest
|
|
3035
3717
|
} = options;
|
|
3036
3718
|
let useAllNodes = fragment;
|
|
3037
|
-
const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$
|
|
3719
|
+
const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1T)}` : name$;
|
|
3038
3720
|
const container = document.createElement(tag);
|
|
3039
3721
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
3040
3722
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -3068,7 +3750,7 @@ class Portal {
|
|
|
3068
3750
|
} else {
|
|
3069
3751
|
const wrapper = this.wrapper;
|
|
3070
3752
|
const app = vue.createApp({
|
|
3071
|
-
name: COMPONENT_NAME$
|
|
3753
|
+
name: COMPONENT_NAME$1T,
|
|
3072
3754
|
parent,
|
|
3073
3755
|
setup() {
|
|
3074
3756
|
if (alive) {
|
|
@@ -3179,13 +3861,13 @@ const props$1b = {
|
|
|
3179
3861
|
}
|
|
3180
3862
|
};
|
|
3181
3863
|
|
|
3182
|
-
const COMPONENT_NAME$
|
|
3864
|
+
const COMPONENT_NAME$1S = 'vc-portal-view';
|
|
3183
3865
|
|
|
3184
3866
|
/**
|
|
3185
3867
|
* 写法不同,但与vue@2.x 保持一致
|
|
3186
3868
|
*/
|
|
3187
3869
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
3188
|
-
name: COMPONENT_NAME$
|
|
3870
|
+
name: COMPONENT_NAME$1S,
|
|
3189
3871
|
props: props$1b,
|
|
3190
3872
|
setup(props, {
|
|
3191
3873
|
slots
|
|
@@ -3205,9 +3887,9 @@ const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
|
3205
3887
|
|
|
3206
3888
|
/** @jsxImportSource vue */
|
|
3207
3889
|
|
|
3208
|
-
const COMPONENT_NAME$
|
|
3890
|
+
const COMPONENT_NAME$1R = 'vc-popover-wrapper';
|
|
3209
3891
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
3210
|
-
name: COMPONENT_NAME$
|
|
3892
|
+
name: COMPONENT_NAME$1R,
|
|
3211
3893
|
props: props$1e,
|
|
3212
3894
|
emits: ['portal-fulfilled', 'close'],
|
|
3213
3895
|
setup(props, {
|
|
@@ -3465,9 +4147,9 @@ const PopoverPortal = new Portal(PopoverWrapper, {
|
|
|
3465
4147
|
|
|
3466
4148
|
/** @jsxImportSource vue */
|
|
3467
4149
|
|
|
3468
|
-
const COMPONENT_NAME$
|
|
4150
|
+
const COMPONENT_NAME$1Q = 'vc-popover';
|
|
3469
4151
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
3470
|
-
name: COMPONENT_NAME$
|
|
4152
|
+
name: COMPONENT_NAME$1Q,
|
|
3471
4153
|
props: props$1d,
|
|
3472
4154
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
3473
4155
|
setup(props, {
|
|
@@ -3611,9 +4293,9 @@ const Popover = Object.assign(Popover$1, {
|
|
|
3611
4293
|
|
|
3612
4294
|
/** @jsxImportSource vue */
|
|
3613
4295
|
|
|
3614
|
-
const COMPONENT_NAME$
|
|
4296
|
+
const COMPONENT_NAME$1P = 'vc-cascader-column';
|
|
3615
4297
|
const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
|
|
3616
|
-
name: COMPONENT_NAME$
|
|
4298
|
+
name: COMPONENT_NAME$1P,
|
|
3617
4299
|
emits: ['click', 'change'],
|
|
3618
4300
|
props: {
|
|
3619
4301
|
data: {
|
|
@@ -3821,9 +4503,9 @@ const props$19 = {
|
|
|
3821
4503
|
|
|
3822
4504
|
/** @jsxImportSource vue */
|
|
3823
4505
|
|
|
3824
|
-
const COMPONENT_NAME$
|
|
4506
|
+
const COMPONENT_NAME$1O = 'vc-cascader';
|
|
3825
4507
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
3826
|
-
name: COMPONENT_NAME$
|
|
4508
|
+
name: COMPONENT_NAME$1O,
|
|
3827
4509
|
inheritAttrs: false,
|
|
3828
4510
|
props: props$19,
|
|
3829
4511
|
emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
|
|
@@ -4175,9 +4857,9 @@ const props$18 = {
|
|
|
4175
4857
|
|
|
4176
4858
|
/** @jsxImportSource vue */
|
|
4177
4859
|
|
|
4178
|
-
const COMPONENT_NAME$
|
|
4860
|
+
const COMPONENT_NAME$1N = 'vc-chart';
|
|
4179
4861
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
4180
|
-
name: COMPONENT_NAME$
|
|
4862
|
+
name: COMPONENT_NAME$1N,
|
|
4181
4863
|
props: props$18,
|
|
4182
4864
|
emits: [...EVENTS, 'ready'],
|
|
4183
4865
|
setup(props, {
|
|
@@ -4416,9 +5098,9 @@ const useCheckbox = () => {
|
|
|
4416
5098
|
|
|
4417
5099
|
/** @jsxImportSource vue */
|
|
4418
5100
|
|
|
4419
|
-
const COMPONENT_NAME$
|
|
5101
|
+
const COMPONENT_NAME$1M = 'vc-checkbox';
|
|
4420
5102
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
4421
|
-
name: COMPONENT_NAME$
|
|
5103
|
+
name: COMPONENT_NAME$1M,
|
|
4422
5104
|
props: props$17,
|
|
4423
5105
|
emits: ['update:modelValue', 'change'],
|
|
4424
5106
|
setup(props, {
|
|
@@ -4505,9 +5187,9 @@ const useCheckboxGroup = () => {
|
|
|
4505
5187
|
|
|
4506
5188
|
/** @jsxImportSource vue */
|
|
4507
5189
|
|
|
4508
|
-
const COMPONENT_NAME$
|
|
5190
|
+
const COMPONENT_NAME$1L = 'vc-checkbox-group';
|
|
4509
5191
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
4510
|
-
name: COMPONENT_NAME$
|
|
5192
|
+
name: COMPONENT_NAME$1L,
|
|
4511
5193
|
props: props$16,
|
|
4512
5194
|
emits: ['update:modelValue', 'change'],
|
|
4513
5195
|
setup(props, {
|
|
@@ -4525,9 +5207,9 @@ const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
|
4525
5207
|
|
|
4526
5208
|
/** @jsxImportSource vue */
|
|
4527
5209
|
|
|
4528
|
-
const COMPONENT_NAME$
|
|
5210
|
+
const COMPONENT_NAME$1K = 'vcm-checkbox';
|
|
4529
5211
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
4530
|
-
name: COMPONENT_NAME$
|
|
5212
|
+
name: COMPONENT_NAME$1K,
|
|
4531
5213
|
props: props$17,
|
|
4532
5214
|
emits: ['update:modelValue', 'change'],
|
|
4533
5215
|
setup(props, {
|
|
@@ -4567,9 +5249,9 @@ const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
|
4567
5249
|
|
|
4568
5250
|
/** @jsxImportSource vue */
|
|
4569
5251
|
|
|
4570
|
-
const COMPONENT_NAME$
|
|
5252
|
+
const COMPONENT_NAME$1J = 'vcm-checkbox-group';
|
|
4571
5253
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
4572
|
-
name: COMPONENT_NAME$
|
|
5254
|
+
name: COMPONENT_NAME$1J,
|
|
4573
5255
|
props: props$16,
|
|
4574
5256
|
emits: ['update:modelValue', 'change'],
|
|
4575
5257
|
setup(props, {
|
|
@@ -4623,9 +5305,9 @@ const props$15 = {
|
|
|
4623
5305
|
|
|
4624
5306
|
/** @jsxImportSource vue */
|
|
4625
5307
|
|
|
4626
|
-
const COMPONENT_NAME$
|
|
5308
|
+
const COMPONENT_NAME$1I = 'vc-message';
|
|
4627
5309
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
4628
|
-
name: COMPONENT_NAME$
|
|
5310
|
+
name: COMPONENT_NAME$1I,
|
|
4629
5311
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
4630
5312
|
props: props$15,
|
|
4631
5313
|
setup(props, {
|
|
@@ -4874,9 +5556,9 @@ const useClipboard = (done) => {
|
|
|
4874
5556
|
return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
4875
5557
|
};
|
|
4876
5558
|
|
|
4877
|
-
const COMPONENT_NAME$
|
|
5559
|
+
const COMPONENT_NAME$1H = "vc-clipboard";
|
|
4878
5560
|
const Clipboard$1 = vue.defineComponent({
|
|
4879
|
-
name: COMPONENT_NAME$
|
|
5561
|
+
name: COMPONENT_NAME$1H,
|
|
4880
5562
|
props: props$14,
|
|
4881
5563
|
setup() {
|
|
4882
5564
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -4916,9 +5598,9 @@ const MTransitionZoom = TransitionZoom;
|
|
|
4916
5598
|
|
|
4917
5599
|
/** @jsxImportSource vue */
|
|
4918
5600
|
|
|
4919
|
-
const COMPONENT_NAME$
|
|
5601
|
+
const COMPONENT_NAME$1G = 'vcm-toast';
|
|
4920
5602
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
4921
|
-
name: COMPONENT_NAME$
|
|
5603
|
+
name: COMPONENT_NAME$1G,
|
|
4922
5604
|
emits: ['close', 'portal-fulfilled'],
|
|
4923
5605
|
props: props$13,
|
|
4924
5606
|
setup(props, {
|
|
@@ -5020,9 +5702,9 @@ const warning$2 = create$3({ mode: "warning" });
|
|
|
5020
5702
|
const error$2 = create$3({ mode: "error" });
|
|
5021
5703
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
|
|
5022
5704
|
|
|
5023
|
-
const COMPONENT_NAME$
|
|
5705
|
+
const COMPONENT_NAME$1F = "vcm-clipboard";
|
|
5024
5706
|
const MClipboard$1 = vue.defineComponent({
|
|
5025
|
-
name: COMPONENT_NAME$
|
|
5707
|
+
name: COMPONENT_NAME$1F,
|
|
5026
5708
|
props: props$14,
|
|
5027
5709
|
setup() {
|
|
5028
5710
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -5054,9 +5736,9 @@ const props$12 = {
|
|
|
5054
5736
|
}
|
|
5055
5737
|
};
|
|
5056
5738
|
|
|
5057
|
-
const COMPONENT_NAME$
|
|
5739
|
+
const COMPONENT_NAME$1E = "vc-collapse";
|
|
5058
5740
|
const Collapse = vue.defineComponent({
|
|
5059
|
-
name: COMPONENT_NAME$
|
|
5741
|
+
name: COMPONENT_NAME$1E,
|
|
5060
5742
|
props: props$12,
|
|
5061
5743
|
emits: ["update:moodelValue", "change"],
|
|
5062
5744
|
setup(props, { slots, emit }) {
|
|
@@ -5173,9 +5855,9 @@ const props$10 = {
|
|
|
5173
5855
|
function _isSlot$3(s) {
|
|
5174
5856
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
5175
5857
|
}
|
|
5176
|
-
const COMPONENT_NAME$
|
|
5858
|
+
const COMPONENT_NAME$1D = 'vc-expand';
|
|
5177
5859
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
5178
|
-
name: COMPONENT_NAME$
|
|
5860
|
+
name: COMPONENT_NAME$1D,
|
|
5179
5861
|
props: props$10,
|
|
5180
5862
|
setup(props, {
|
|
5181
5863
|
slots
|
|
@@ -5205,9 +5887,9 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5205
5887
|
|
|
5206
5888
|
/** @jsxImportSource vue */
|
|
5207
5889
|
|
|
5208
|
-
const COMPONENT_NAME$
|
|
5890
|
+
const COMPONENT_NAME$1C = 'vc-collapse-item';
|
|
5209
5891
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
5210
|
-
name: COMPONENT_NAME$
|
|
5892
|
+
name: COMPONENT_NAME$1C,
|
|
5211
5893
|
props: props$11,
|
|
5212
5894
|
setup(props, {
|
|
5213
5895
|
slots,
|
|
@@ -5282,9 +5964,9 @@ const props$$ = {
|
|
|
5282
5964
|
|
|
5283
5965
|
/** @jsxImportSource vue */
|
|
5284
5966
|
|
|
5285
|
-
const COMPONENT_NAME$
|
|
5967
|
+
const COMPONENT_NAME$1B = 'vc-color-picker';
|
|
5286
5968
|
const ColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
5287
|
-
name: COMPONENT_NAME$
|
|
5969
|
+
name: COMPONENT_NAME$1B,
|
|
5288
5970
|
props: props$$,
|
|
5289
5971
|
setup(props, {
|
|
5290
5972
|
slots
|
|
@@ -5347,9 +6029,9 @@ const formatter = (format, arr) => {
|
|
|
5347
6029
|
function _isSlot$2(s) {
|
|
5348
6030
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
5349
6031
|
}
|
|
5350
|
-
const COMPONENT_NAME$
|
|
6032
|
+
const COMPONENT_NAME$1A = 'vc-countdown';
|
|
5351
6033
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
5352
|
-
name: COMPONENT_NAME$
|
|
6034
|
+
name: COMPONENT_NAME$1A,
|
|
5353
6035
|
props: props$_,
|
|
5354
6036
|
emits: ['change', 'complete', 'error'],
|
|
5355
6037
|
setup(props, {
|
|
@@ -5361,6 +6043,7 @@ const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
5361
6043
|
const minute = vue.ref('');
|
|
5362
6044
|
const second = vue.ref('');
|
|
5363
6045
|
const millisecond = vue.ref('');
|
|
6046
|
+
const isComplete = vue.ref(false);
|
|
5364
6047
|
const showResult = vue.computed(() => {
|
|
5365
6048
|
return !props.render && !slots.default;
|
|
5366
6049
|
});
|
|
@@ -5433,15 +6116,18 @@ const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
5433
6116
|
|
|
5434
6117
|
if (timestamp <= 0) {
|
|
5435
6118
|
stop();
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
6119
|
+
if (!isComplete.value) {
|
|
6120
|
+
isComplete.value = true;
|
|
6121
|
+
emit('change', {
|
|
6122
|
+
timestamp: 0,
|
|
6123
|
+
day: '00',
|
|
6124
|
+
hour: '00',
|
|
6125
|
+
minute: '00',
|
|
6126
|
+
second: '00',
|
|
6127
|
+
millisecond: '00'
|
|
6128
|
+
});
|
|
6129
|
+
emit('complete');
|
|
6130
|
+
}
|
|
5445
6131
|
} else {
|
|
5446
6132
|
emit('change', {
|
|
5447
6133
|
timestamp,
|
|
@@ -5456,6 +6142,8 @@ const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
5456
6142
|
const start = () => {
|
|
5457
6143
|
if (targetTimestamp.value) {
|
|
5458
6144
|
timer && clearInterval(timer);
|
|
6145
|
+
isComplete.value = false;
|
|
6146
|
+
run(); // 立即执行一次,界面马上展示当前数值
|
|
5459
6147
|
timer = setInterval(run, T.value);
|
|
5460
6148
|
}
|
|
5461
6149
|
};
|
|
@@ -5616,9 +6304,9 @@ const value2separated = (value, options) => {
|
|
|
5616
6304
|
function _isSlot$1(s) {
|
|
5617
6305
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
5618
6306
|
}
|
|
5619
|
-
const COMPONENT_NAME$
|
|
6307
|
+
const COMPONENT_NAME$1z = 'vc-counter';
|
|
5620
6308
|
const Counter = /* @__PURE__ */ vue.defineComponent({
|
|
5621
|
-
name: COMPONENT_NAME$
|
|
6309
|
+
name: COMPONENT_NAME$1z,
|
|
5622
6310
|
props: props$Z,
|
|
5623
6311
|
emits: ['begin', 'complete', 'change'],
|
|
5624
6312
|
setup(props, {
|
|
@@ -6881,9 +7569,9 @@ const getTimeType = type => {
|
|
|
6881
7569
|
}
|
|
6882
7570
|
return view;
|
|
6883
7571
|
};
|
|
6884
|
-
const COMPONENT_NAME$
|
|
7572
|
+
const COMPONENT_NAME$1y = 'vc-date-confirm';
|
|
6885
7573
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
6886
|
-
name: COMPONENT_NAME$
|
|
7574
|
+
name: COMPONENT_NAME$1y,
|
|
6887
7575
|
props: {
|
|
6888
7576
|
showTime: {
|
|
6889
7577
|
type: Boolean,
|
|
@@ -6947,9 +7635,9 @@ const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
|
6947
7635
|
|
|
6948
7636
|
/** @jsxImportSource vue */
|
|
6949
7637
|
|
|
6950
|
-
const COMPONENT_NAME$
|
|
7638
|
+
const COMPONENT_NAME$1x = 'vc-date-header';
|
|
6951
7639
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
6952
|
-
name: COMPONENT_NAME$
|
|
7640
|
+
name: COMPONENT_NAME$1x,
|
|
6953
7641
|
props: {
|
|
6954
7642
|
panelDate: Date,
|
|
6955
7643
|
showNext: {
|
|
@@ -7033,9 +7721,9 @@ const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
|
7033
7721
|
|
|
7034
7722
|
/** @jsxImportSource vue */
|
|
7035
7723
|
|
|
7036
|
-
const COMPONENT_NAME$
|
|
7724
|
+
const COMPONENT_NAME$1w = 'vc-date-table';
|
|
7037
7725
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
7038
|
-
name: COMPONENT_NAME$
|
|
7726
|
+
name: COMPONENT_NAME$1w,
|
|
7039
7727
|
props: {
|
|
7040
7728
|
value: Array,
|
|
7041
7729
|
firstDayOfWeek: {
|
|
@@ -7244,9 +7932,9 @@ const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
7244
7932
|
|
|
7245
7933
|
/** @jsxImportSource vue */
|
|
7246
7934
|
|
|
7247
|
-
const COMPONENT_NAME$
|
|
7935
|
+
const COMPONENT_NAME$1v = 'vc-month-table';
|
|
7248
7936
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
7249
|
-
name: COMPONENT_NAME$
|
|
7937
|
+
name: COMPONENT_NAME$1v,
|
|
7250
7938
|
props: {
|
|
7251
7939
|
value: Array,
|
|
7252
7940
|
panelDate: Date,
|
|
@@ -7378,7 +8066,7 @@ const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
7378
8066
|
|
|
7379
8067
|
/** @jsxImportSource vue */
|
|
7380
8068
|
|
|
7381
|
-
const COMPONENT_NAME$
|
|
8069
|
+
const COMPONENT_NAME$1u = 'vc-quarter-table';
|
|
7382
8070
|
|
|
7383
8071
|
/**
|
|
7384
8072
|
* 获取季度对应的月份范围
|
|
@@ -7412,7 +8100,7 @@ const getQuarterRangeByMonth = value => {
|
|
|
7412
8100
|
}
|
|
7413
8101
|
};
|
|
7414
8102
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
7415
|
-
name: COMPONENT_NAME$
|
|
8103
|
+
name: COMPONENT_NAME$1u,
|
|
7416
8104
|
props: {
|
|
7417
8105
|
value: Array,
|
|
7418
8106
|
panelDate: Date,
|
|
@@ -7535,9 +8223,9 @@ const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
7535
8223
|
|
|
7536
8224
|
/** @jsxImportSource vue */
|
|
7537
8225
|
|
|
7538
|
-
const COMPONENT_NAME$
|
|
8226
|
+
const COMPONENT_NAME$1t = 'vc-shortcuts-select';
|
|
7539
8227
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
7540
|
-
name: COMPONENT_NAME$
|
|
8228
|
+
name: COMPONENT_NAME$1t,
|
|
7541
8229
|
props: {
|
|
7542
8230
|
panelDate: Date,
|
|
7543
8231
|
config: Array,
|
|
@@ -7577,9 +8265,9 @@ const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
7577
8265
|
|
|
7578
8266
|
/** @jsxImportSource vue */
|
|
7579
8267
|
|
|
7580
|
-
const COMPONENT_NAME$
|
|
8268
|
+
const COMPONENT_NAME$1s = 'vc-time-select';
|
|
7581
8269
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
7582
|
-
name: COMPONENT_NAME$
|
|
8270
|
+
name: COMPONENT_NAME$1s,
|
|
7583
8271
|
props: {
|
|
7584
8272
|
hours: {
|
|
7585
8273
|
type: [Number, String],
|
|
@@ -7859,9 +8547,9 @@ const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
7859
8547
|
|
|
7860
8548
|
/** @jsxImportSource vue */
|
|
7861
8549
|
|
|
7862
|
-
const COMPONENT_NAME$
|
|
8550
|
+
const COMPONENT_NAME$1r = 'vc-year-table';
|
|
7863
8551
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
7864
|
-
name: COMPONENT_NAME$
|
|
8552
|
+
name: COMPONENT_NAME$1r,
|
|
7865
8553
|
props: {
|
|
7866
8554
|
value: Array,
|
|
7867
8555
|
panelDate: Date,
|
|
@@ -7984,9 +8672,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
|
|
|
7984
8672
|
}
|
|
7985
8673
|
return true;
|
|
7986
8674
|
};
|
|
7987
|
-
const COMPONENT_NAME$
|
|
8675
|
+
const COMPONENT_NAME$1q = 'vc-date-range-panel';
|
|
7988
8676
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
7989
|
-
name: COMPONENT_NAME$
|
|
8677
|
+
name: COMPONENT_NAME$1q,
|
|
7990
8678
|
props: {
|
|
7991
8679
|
...props$W,
|
|
7992
8680
|
confirm: {
|
|
@@ -8365,9 +9053,9 @@ const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
8365
9053
|
|
|
8366
9054
|
/** @jsxImportSource vue */
|
|
8367
9055
|
|
|
8368
|
-
const COMPONENT_NAME$
|
|
9056
|
+
const COMPONENT_NAME$1p = 'vc-date-panel';
|
|
8369
9057
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
8370
|
-
name: COMPONENT_NAME$
|
|
9058
|
+
name: COMPONENT_NAME$1p,
|
|
8371
9059
|
props: {
|
|
8372
9060
|
...props$W,
|
|
8373
9061
|
type: String,
|
|
@@ -8575,9 +9263,9 @@ const isEqualYear$1 = value => {
|
|
|
8575
9263
|
const endYear = value[1].getFullYear();
|
|
8576
9264
|
return startYear === endYear;
|
|
8577
9265
|
};
|
|
8578
|
-
const COMPONENT_NAME$
|
|
9266
|
+
const COMPONENT_NAME$1o = 'vc-monthrange-panel';
|
|
8579
9267
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
8580
|
-
name: COMPONENT_NAME$
|
|
9268
|
+
name: COMPONENT_NAME$1o,
|
|
8581
9269
|
props: {
|
|
8582
9270
|
...props$W,
|
|
8583
9271
|
confirm: {
|
|
@@ -8752,9 +9440,9 @@ const isEqualYear = value => {
|
|
|
8752
9440
|
const endYear = value[1].getFullYear();
|
|
8753
9441
|
return startYear === endYear;
|
|
8754
9442
|
};
|
|
8755
|
-
const COMPONENT_NAME$
|
|
9443
|
+
const COMPONENT_NAME$1n = 'vc-quarterrange-panel';
|
|
8756
9444
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
8757
|
-
name: COMPONENT_NAME$
|
|
9445
|
+
name: COMPONENT_NAME$1n,
|
|
8758
9446
|
props: {
|
|
8759
9447
|
...props$W,
|
|
8760
9448
|
confirm: {
|
|
@@ -8993,9 +9681,9 @@ const getComparedDate = (leftDate, rightDate) => {
|
|
|
8993
9681
|
seconds
|
|
8994
9682
|
};
|
|
8995
9683
|
};
|
|
8996
|
-
const COMPONENT_NAME$
|
|
9684
|
+
const COMPONENT_NAME$1m = 'vc-timerange-panel';
|
|
8997
9685
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
8998
|
-
name: COMPONENT_NAME$
|
|
9686
|
+
name: COMPONENT_NAME$1m,
|
|
8999
9687
|
props: props$V,
|
|
9000
9688
|
emits: ['pick', 'clear', 'ok'],
|
|
9001
9689
|
setup(props, {
|
|
@@ -9096,9 +9784,9 @@ const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
9096
9784
|
|
|
9097
9785
|
/** @jsxImportSource vue */
|
|
9098
9786
|
|
|
9099
|
-
const COMPONENT_NAME$
|
|
9787
|
+
const COMPONENT_NAME$1l = 'vc-time-panel';
|
|
9100
9788
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
9101
|
-
name: COMPONENT_NAME$
|
|
9789
|
+
name: COMPONENT_NAME$1l,
|
|
9102
9790
|
props: props$V,
|
|
9103
9791
|
emits: ['pick', 'clear', 'ok'],
|
|
9104
9792
|
setup(props, {
|
|
@@ -9154,7 +9842,7 @@ const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
9154
9842
|
|
|
9155
9843
|
/** @jsxImportSource vue */
|
|
9156
9844
|
|
|
9157
|
-
const COMPONENT_NAME$
|
|
9845
|
+
const COMPONENT_NAME$1k = 'vc-date-picker';
|
|
9158
9846
|
const getPanel$1 = type => {
|
|
9159
9847
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
9160
9848
|
return DateRangePanel;
|
|
@@ -9165,7 +9853,7 @@ const getPanel$1 = type => {
|
|
|
9165
9853
|
}
|
|
9166
9854
|
return DatePanel;
|
|
9167
9855
|
};
|
|
9168
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
9856
|
+
const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
|
|
9169
9857
|
const props = vue.getCurrentInstance().props;
|
|
9170
9858
|
const icon = vue.ref('date');
|
|
9171
9859
|
const panel = vue.shallowRef({});
|
|
@@ -9206,9 +9894,9 @@ const props$U = {
|
|
|
9206
9894
|
|
|
9207
9895
|
/** @jsxImportSource vue */
|
|
9208
9896
|
|
|
9209
|
-
const COMPONENT_NAME$
|
|
9897
|
+
const COMPONENT_NAME$1j = 'vc-divider';
|
|
9210
9898
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
9211
|
-
name: COMPONENT_NAME$
|
|
9899
|
+
name: COMPONENT_NAME$1j,
|
|
9212
9900
|
props: props$U,
|
|
9213
9901
|
setup(props, {
|
|
9214
9902
|
slots
|
|
@@ -9344,7 +10032,7 @@ const props$R = {
|
|
|
9344
10032
|
|
|
9345
10033
|
/** @jsxImportSource vue */
|
|
9346
10034
|
|
|
9347
|
-
const COMPONENT_NAME$
|
|
10035
|
+
const COMPONENT_NAME$1i = 'vc-scroller-track';
|
|
9348
10036
|
const BAR_MAP = {
|
|
9349
10037
|
vertical: {
|
|
9350
10038
|
scroll: 'scrollTop',
|
|
@@ -9364,7 +10052,7 @@ const BAR_MAP = {
|
|
|
9364
10052
|
}
|
|
9365
10053
|
};
|
|
9366
10054
|
const Track = /* @__PURE__ */ vue.defineComponent({
|
|
9367
|
-
name: COMPONENT_NAME$
|
|
10055
|
+
name: COMPONENT_NAME$1i,
|
|
9368
10056
|
props: props$T,
|
|
9369
10057
|
emits: ['change'],
|
|
9370
10058
|
inheritAttrs: false,
|
|
@@ -9554,9 +10242,9 @@ const Track = /* @__PURE__ */ vue.defineComponent({
|
|
|
9554
10242
|
|
|
9555
10243
|
/** @jsxImportSource vue */
|
|
9556
10244
|
|
|
9557
|
-
const COMPONENT_NAME$
|
|
10245
|
+
const COMPONENT_NAME$1h = 'vc-scroller-bar';
|
|
9558
10246
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
9559
|
-
name: COMPONENT_NAME$
|
|
10247
|
+
name: COMPONENT_NAME$1h,
|
|
9560
10248
|
props: props$S,
|
|
9561
10249
|
emits: ['change'],
|
|
9562
10250
|
setup(props, {
|
|
@@ -9791,7 +10479,7 @@ const useScroller = (expose) => {
|
|
|
9791
10479
|
|
|
9792
10480
|
/** @jsxImportSource vue */
|
|
9793
10481
|
|
|
9794
|
-
const COMPONENT_NAME$
|
|
10482
|
+
const COMPONENT_NAME$1g = 'vc-scroller';
|
|
9795
10483
|
|
|
9796
10484
|
/**
|
|
9797
10485
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -9802,7 +10490,7 @@ const COMPONENT_NAME$1e = 'vc-scroller';
|
|
|
9802
10490
|
* 2. 增加了一层嵌套
|
|
9803
10491
|
*/
|
|
9804
10492
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
9805
|
-
name: COMPONENT_NAME$
|
|
10493
|
+
name: COMPONENT_NAME$1g,
|
|
9806
10494
|
props: props$R,
|
|
9807
10495
|
emits: ['scroll'],
|
|
9808
10496
|
setup(props, {
|
|
@@ -9863,7 +10551,7 @@ const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
|
9863
10551
|
|
|
9864
10552
|
/** @jsxImportSource vue */
|
|
9865
10553
|
|
|
9866
|
-
const COMPONENT_NAME$
|
|
10554
|
+
const COMPONENT_NAME$1f = 'vc-scroller-wheel';
|
|
9867
10555
|
|
|
9868
10556
|
/**
|
|
9869
10557
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -9885,7 +10573,7 @@ const COMPONENT_NAME$1d = 'vc-scroller-wheel';
|
|
|
9885
10573
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
9886
10574
|
*/
|
|
9887
10575
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
9888
|
-
name: COMPONENT_NAME$
|
|
10576
|
+
name: COMPONENT_NAME$1f,
|
|
9889
10577
|
props: Object.assign({}, props$R, {
|
|
9890
10578
|
stopPropagation: {
|
|
9891
10579
|
type: Boolean,
|
|
@@ -10074,9 +10762,9 @@ const props$Q = {
|
|
|
10074
10762
|
|
|
10075
10763
|
/** @jsxImportSource vue */
|
|
10076
10764
|
|
|
10077
|
-
const COMPONENT_NAME$
|
|
10765
|
+
const COMPONENT_NAME$1e = 'vc-drawer';
|
|
10078
10766
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
10079
|
-
name: COMPONENT_NAME$
|
|
10767
|
+
name: COMPONENT_NAME$1e,
|
|
10080
10768
|
props: props$Q,
|
|
10081
10769
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
10082
10770
|
setup(props, {
|
|
@@ -10265,9 +10953,9 @@ const props$P = {
|
|
|
10265
10953
|
|
|
10266
10954
|
/** @jsxImportSource vue */
|
|
10267
10955
|
|
|
10268
|
-
const COMPONENT_NAME$
|
|
10956
|
+
const COMPONENT_NAME$1d = 'vc-dropdown';
|
|
10269
10957
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
10270
|
-
name: COMPONENT_NAME$
|
|
10958
|
+
name: COMPONENT_NAME$1d,
|
|
10271
10959
|
props: props$P,
|
|
10272
10960
|
inheritAttrs: false,
|
|
10273
10961
|
emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
|
|
@@ -10337,9 +11025,9 @@ const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
10337
11025
|
|
|
10338
11026
|
/** @jsxImportSource vue */
|
|
10339
11027
|
|
|
10340
|
-
const COMPONENT_NAME$
|
|
11028
|
+
const COMPONENT_NAME$1c = 'vc-dropdown-menu';
|
|
10341
11029
|
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
10342
|
-
name: COMPONENT_NAME$
|
|
11030
|
+
name: COMPONENT_NAME$1c,
|
|
10343
11031
|
setup(_, {
|
|
10344
11032
|
slots
|
|
10345
11033
|
}) {
|
|
@@ -10353,9 +11041,9 @@ const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
|
10353
11041
|
|
|
10354
11042
|
/** @jsxImportSource vue */
|
|
10355
11043
|
|
|
10356
|
-
const COMPONENT_NAME$
|
|
11044
|
+
const COMPONENT_NAME$1b = 'vc-dropdown-item';
|
|
10357
11045
|
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
10358
|
-
name: COMPONENT_NAME$
|
|
11046
|
+
name: COMPONENT_NAME$1b,
|
|
10359
11047
|
emits: ['click'],
|
|
10360
11048
|
props: {
|
|
10361
11049
|
value: {
|
|
@@ -10560,9 +11248,9 @@ const defaults = {
|
|
|
10560
11248
|
|
|
10561
11249
|
/** @jsxImportSource vue */
|
|
10562
11250
|
|
|
10563
|
-
const COMPONENT_NAME$
|
|
11251
|
+
const COMPONENT_NAME$1a = 'vc-editor-toolbar';
|
|
10564
11252
|
const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
10565
|
-
name: COMPONENT_NAME$
|
|
11253
|
+
name: COMPONENT_NAME$1a,
|
|
10566
11254
|
props: {
|
|
10567
11255
|
options: [Array, Object],
|
|
10568
11256
|
elementId: String
|
|
@@ -10770,9 +11458,9 @@ const props$O = {
|
|
|
10770
11458
|
|
|
10771
11459
|
/** @jsxImportSource vue */
|
|
10772
11460
|
|
|
10773
|
-
const COMPONENT_NAME$
|
|
11461
|
+
const COMPONENT_NAME$19 = 'vc-image-preview';
|
|
10774
11462
|
const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10775
|
-
name: COMPONENT_NAME$
|
|
11463
|
+
name: COMPONENT_NAME$19,
|
|
10776
11464
|
props: props$O,
|
|
10777
11465
|
setup(props, {
|
|
10778
11466
|
slots
|
|
@@ -10967,9 +11655,9 @@ const props$N = {
|
|
|
10967
11655
|
}
|
|
10968
11656
|
};
|
|
10969
11657
|
|
|
10970
|
-
const COMPONENT_NAME$
|
|
11658
|
+
const COMPONENT_NAME$18 = "vc-upload";
|
|
10971
11659
|
const Upload$1 = vue.defineComponent({
|
|
10972
|
-
name: COMPONENT_NAME$
|
|
11660
|
+
name: COMPONENT_NAME$18,
|
|
10973
11661
|
props: props$N,
|
|
10974
11662
|
emits: [
|
|
10975
11663
|
"message",
|
|
@@ -11503,9 +12191,9 @@ const props$M = {
|
|
|
11503
12191
|
|
|
11504
12192
|
/** @jsxImportSource vue */
|
|
11505
12193
|
|
|
11506
|
-
const COMPONENT_NAME$
|
|
12194
|
+
const COMPONENT_NAME$17 = 'vc-editor';
|
|
11507
12195
|
const Editor = /* @__PURE__ */ vue.defineComponent({
|
|
11508
|
-
name: COMPONENT_NAME$
|
|
12196
|
+
name: COMPONENT_NAME$17,
|
|
11509
12197
|
props: props$M,
|
|
11510
12198
|
defaults,
|
|
11511
12199
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
@@ -11694,7 +12382,7 @@ const Editor = /* @__PURE__ */ vue.defineComponent({
|
|
|
11694
12382
|
|
|
11695
12383
|
/** @jsxImportSource vue */
|
|
11696
12384
|
|
|
11697
|
-
const COMPONENT_NAME$
|
|
12385
|
+
const COMPONENT_NAME$16 = 'vc-editor-view';
|
|
11698
12386
|
const setImages = v => {
|
|
11699
12387
|
if (!v) return;
|
|
11700
12388
|
const IMG_REGX = /<img.*?(?:>|\/>)/gi;
|
|
@@ -11712,7 +12400,7 @@ const setImages = v => {
|
|
|
11712
12400
|
return;
|
|
11713
12401
|
};
|
|
11714
12402
|
const EditorView = /* @__PURE__ */ vue.defineComponent({
|
|
11715
|
-
name: COMPONENT_NAME$
|
|
12403
|
+
name: COMPONENT_NAME$16,
|
|
11716
12404
|
props: {
|
|
11717
12405
|
value: {
|
|
11718
12406
|
type: String,
|
|
@@ -11927,9 +12615,9 @@ const useForm = (expose, options = {}) => {
|
|
|
11927
12615
|
});
|
|
11928
12616
|
};
|
|
11929
12617
|
|
|
11930
|
-
const COMPONENT_NAME$
|
|
12618
|
+
const COMPONENT_NAME$15 = "vc-form";
|
|
11931
12619
|
const Form = vue.defineComponent({
|
|
11932
|
-
name: COMPONENT_NAME$
|
|
12620
|
+
name: COMPONENT_NAME$15,
|
|
11933
12621
|
props: props$L,
|
|
11934
12622
|
setup(props, { slots, expose }) {
|
|
11935
12623
|
useForm(expose);
|
|
@@ -12277,9 +12965,9 @@ const useFormItem = (expose) => {
|
|
|
12277
12965
|
|
|
12278
12966
|
/** @jsxImportSource vue */
|
|
12279
12967
|
|
|
12280
|
-
const COMPONENT_NAME$
|
|
12968
|
+
const COMPONENT_NAME$14 = 'vc-form-item';
|
|
12281
12969
|
const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
12282
|
-
name: COMPONENT_NAME$
|
|
12970
|
+
name: COMPONENT_NAME$14,
|
|
12283
12971
|
props: props$K,
|
|
12284
12972
|
setup(props, {
|
|
12285
12973
|
slots,
|
|
@@ -12347,9 +13035,9 @@ const props$J = {
|
|
|
12347
13035
|
}
|
|
12348
13036
|
};
|
|
12349
13037
|
|
|
12350
|
-
const COMPONENT_NAME$
|
|
13038
|
+
const COMPONENT_NAME$13 = "vcm-form";
|
|
12351
13039
|
const MForm = vue.defineComponent({
|
|
12352
|
-
name: COMPONENT_NAME$
|
|
13040
|
+
name: COMPONENT_NAME$13,
|
|
12353
13041
|
props: props$J,
|
|
12354
13042
|
setup(props, { slots, expose }) {
|
|
12355
13043
|
useForm(expose, {
|
|
@@ -12380,9 +13068,9 @@ const props$I = {
|
|
|
12380
13068
|
|
|
12381
13069
|
/** @jsxImportSource vue */
|
|
12382
13070
|
|
|
12383
|
-
const COMPONENT_NAME$
|
|
13071
|
+
const COMPONENT_NAME$12 = 'vcm-form-item';
|
|
12384
13072
|
const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
12385
|
-
name: COMPONENT_NAME$
|
|
13073
|
+
name: COMPONENT_NAME$12,
|
|
12386
13074
|
props: props$I,
|
|
12387
13075
|
setup(props, {
|
|
12388
13076
|
slots,
|
|
@@ -12437,9 +13125,9 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
12437
13125
|
}
|
|
12438
13126
|
});
|
|
12439
13127
|
|
|
12440
|
-
const COMPONENT_NAME
|
|
13128
|
+
const COMPONENT_NAME$11 = "vc-fragment";
|
|
12441
13129
|
const Fragment = vue.defineComponent({
|
|
12442
|
-
name: COMPONENT_NAME
|
|
13130
|
+
name: COMPONENT_NAME$11,
|
|
12443
13131
|
setup(_, { slots }) {
|
|
12444
13132
|
return () => vue.h(vue.Fragment, slots.default?.());
|
|
12445
13133
|
}
|
|
@@ -12478,9 +13166,9 @@ const props$H = {
|
|
|
12478
13166
|
|
|
12479
13167
|
/** @jsxImportSource vue */
|
|
12480
13168
|
|
|
12481
|
-
const COMPONENT_NAME$
|
|
13169
|
+
const COMPONENT_NAME$10 = 'vc-snapshot';
|
|
12482
13170
|
const Snapshot = /* @__PURE__ */ vue.defineComponent({
|
|
12483
|
-
name: COMPONENT_NAME$
|
|
13171
|
+
name: COMPONENT_NAME$10,
|
|
12484
13172
|
props: props$H,
|
|
12485
13173
|
emits: ['ready'],
|
|
12486
13174
|
setup(props, {
|
|
@@ -12639,7 +13327,7 @@ const IMGStore$1 = new IMGStore();
|
|
|
12639
13327
|
|
|
12640
13328
|
/** @jsxImportSource vue */
|
|
12641
13329
|
|
|
12642
|
-
const COMPONENT_NAME
|
|
13330
|
+
const COMPONENT_NAME$$ = 'vc-image';
|
|
12643
13331
|
let isSupportObjectFit = false;
|
|
12644
13332
|
window.addEventListener('DOMContentLoaded', () => {
|
|
12645
13333
|
isSupportObjectFit = !vcShared.IS_SERVER && document.documentElement.style.objectFit !== undefined;
|
|
@@ -12652,7 +13340,7 @@ const ObjectFit = {
|
|
|
12652
13340
|
SCALE_DOWN: 'scale-down'
|
|
12653
13341
|
};
|
|
12654
13342
|
const Image$1 = /* @__PURE__ */ vue.defineComponent({
|
|
12655
|
-
name: COMPONENT_NAME
|
|
13343
|
+
name: COMPONENT_NAME$$,
|
|
12656
13344
|
inheritAttrs: false,
|
|
12657
13345
|
props: props$G,
|
|
12658
13346
|
setup(props, {
|
|
@@ -12869,9 +13557,9 @@ const props$F = {
|
|
|
12869
13557
|
|
|
12870
13558
|
/** @jsxImportSource vue */
|
|
12871
13559
|
|
|
12872
|
-
const COMPONENT_NAME$
|
|
13560
|
+
const COMPONENT_NAME$_ = 'vc-image-crop';
|
|
12873
13561
|
const ImageCrop = /* @__PURE__ */ vue.defineComponent({
|
|
12874
|
-
name: COMPONENT_NAME$
|
|
13562
|
+
name: COMPONENT_NAME$_,
|
|
12875
13563
|
props: props$F,
|
|
12876
13564
|
setup(props, {
|
|
12877
13565
|
slots
|
|
@@ -12897,9 +13585,9 @@ const props$E = {
|
|
|
12897
13585
|
|
|
12898
13586
|
/** @jsxImportSource vue */
|
|
12899
13587
|
|
|
12900
|
-
const COMPONENT_NAME$
|
|
13588
|
+
const COMPONENT_NAME$Z = 'vc-image-processing';
|
|
12901
13589
|
const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
|
|
12902
|
-
name: COMPONENT_NAME$
|
|
13590
|
+
name: COMPONENT_NAME$Z,
|
|
12903
13591
|
props: props$E,
|
|
12904
13592
|
setup(props, {
|
|
12905
13593
|
slots
|
|
@@ -12916,9 +13604,9 @@ const MImageProcessing = ImageProcessing;
|
|
|
12916
13604
|
|
|
12917
13605
|
/** @jsxImportSource vue */
|
|
12918
13606
|
|
|
12919
|
-
const COMPONENT_NAME$
|
|
13607
|
+
const COMPONENT_NAME$Y = 'vcm-input';
|
|
12920
13608
|
const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
12921
|
-
name: COMPONENT_NAME$
|
|
13609
|
+
name: COMPONENT_NAME$Y,
|
|
12922
13610
|
inheritAttrs: false,
|
|
12923
13611
|
props: {
|
|
12924
13612
|
...props$1h,
|
|
@@ -13007,9 +13695,9 @@ const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
13007
13695
|
|
|
13008
13696
|
/** @jsxImportSource vue */
|
|
13009
13697
|
|
|
13010
|
-
const COMPONENT_NAME$
|
|
13698
|
+
const COMPONENT_NAME$X = 'vcm-input-number';
|
|
13011
13699
|
const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
13012
|
-
name: COMPONENT_NAME$
|
|
13700
|
+
name: COMPONENT_NAME$X,
|
|
13013
13701
|
props: props$1g,
|
|
13014
13702
|
inheritAttrs: false,
|
|
13015
13703
|
setup(props, {
|
|
@@ -13058,9 +13746,9 @@ const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
|
13058
13746
|
|
|
13059
13747
|
/** @jsxImportSource vue */
|
|
13060
13748
|
|
|
13061
|
-
const COMPONENT_NAME$
|
|
13749
|
+
const COMPONENT_NAME$W = 'vcm-input-search';
|
|
13062
13750
|
const MInputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
13063
|
-
name: COMPONENT_NAME$
|
|
13751
|
+
name: COMPONENT_NAME$W,
|
|
13064
13752
|
props: {
|
|
13065
13753
|
...props$1f,
|
|
13066
13754
|
cancelText: {
|
|
@@ -13137,9 +13825,9 @@ const props$D = {
|
|
|
13137
13825
|
}
|
|
13138
13826
|
};
|
|
13139
13827
|
|
|
13140
|
-
const COMPONENT_NAME$
|
|
13828
|
+
const COMPONENT_NAME$V = "vcm-list";
|
|
13141
13829
|
const MList = vue.defineComponent({
|
|
13142
|
-
name: COMPONENT_NAME$
|
|
13830
|
+
name: COMPONENT_NAME$V,
|
|
13143
13831
|
props: props$D,
|
|
13144
13832
|
setup(props, { slots }) {
|
|
13145
13833
|
vue.provide("vc-list", { props });
|
|
@@ -13194,10 +13882,10 @@ const props$C = {
|
|
|
13194
13882
|
|
|
13195
13883
|
/** @jsxImportSource vue */
|
|
13196
13884
|
|
|
13197
|
-
const COMPONENT_NAME$
|
|
13885
|
+
const COMPONENT_NAME$U = 'vcm-list-item';
|
|
13198
13886
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
13199
13887
|
const MListItem = /* @__PURE__ */ vue.defineComponent({
|
|
13200
|
-
name: COMPONENT_NAME$
|
|
13888
|
+
name: COMPONENT_NAME$U,
|
|
13201
13889
|
props: props$C,
|
|
13202
13890
|
emits: ['click'],
|
|
13203
13891
|
setup(props, {
|
|
@@ -13291,11 +13979,11 @@ const props$B = {
|
|
|
13291
13979
|
|
|
13292
13980
|
/** @jsxImportSource vue */
|
|
13293
13981
|
|
|
13294
|
-
const COMPONENT_NAME$
|
|
13982
|
+
const COMPONENT_NAME$T = 'vc-marquee';
|
|
13295
13983
|
const ANIMATION = $.prefixStyle('animation').camel;
|
|
13296
13984
|
const TRANSFORM_KEBAB = $.prefixStyle('transform').kebab;
|
|
13297
13985
|
const Marquee = /* @__PURE__ */ vue.defineComponent({
|
|
13298
|
-
name: COMPONENT_NAME$
|
|
13986
|
+
name: COMPONENT_NAME$T,
|
|
13299
13987
|
props: props$B,
|
|
13300
13988
|
setup(props, {
|
|
13301
13989
|
slots
|
|
@@ -13363,9 +14051,9 @@ const props$A = {
|
|
|
13363
14051
|
}
|
|
13364
14052
|
};
|
|
13365
14053
|
|
|
13366
|
-
const COMPONENT_NAME$
|
|
14054
|
+
const COMPONENT_NAME$S = "vc-resizer";
|
|
13367
14055
|
const Resizer = vue.defineComponent({
|
|
13368
|
-
name: COMPONENT_NAME$
|
|
14056
|
+
name: COMPONENT_NAME$S,
|
|
13369
14057
|
props: props$A,
|
|
13370
14058
|
emits: ["resize"],
|
|
13371
14059
|
setup(props, { emit, slots, expose }) {
|
|
@@ -13535,10 +14223,10 @@ const props$z = {
|
|
|
13535
14223
|
|
|
13536
14224
|
/** @jsxImportSource vue */
|
|
13537
14225
|
|
|
13538
|
-
const COMPONENT_NAME$
|
|
14226
|
+
const COMPONENT_NAME$R = 'vc-modal';
|
|
13539
14227
|
let zIndexNumber = 1002;
|
|
13540
14228
|
const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
13541
|
-
name: COMPONENT_NAME$
|
|
14229
|
+
name: COMPONENT_NAME$R,
|
|
13542
14230
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
|
|
13543
14231
|
props: props$z,
|
|
13544
14232
|
setup(props, {
|
|
@@ -13977,9 +14665,9 @@ const props$y = {
|
|
|
13977
14665
|
|
|
13978
14666
|
/** @jsxImportSource vue */
|
|
13979
14667
|
|
|
13980
|
-
const COMPONENT_NAME$
|
|
14668
|
+
const COMPONENT_NAME$Q = 'vc-modal';
|
|
13981
14669
|
const MModalView = /* @__PURE__ */ vue.defineComponent({
|
|
13982
|
-
name: COMPONENT_NAME$
|
|
14670
|
+
name: COMPONENT_NAME$Q,
|
|
13983
14671
|
emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
|
|
13984
14672
|
props: props$y,
|
|
13985
14673
|
setup(props, {
|
|
@@ -14191,9 +14879,9 @@ const props$x = {
|
|
|
14191
14879
|
|
|
14192
14880
|
/** @jsxImportSource vue */
|
|
14193
14881
|
|
|
14194
|
-
const COMPONENT_NAME$
|
|
14882
|
+
const COMPONENT_NAME$P = 'vc-notice';
|
|
14195
14883
|
const NoticeView = /* @__PURE__ */ vue.defineComponent({
|
|
14196
|
-
name: COMPONENT_NAME$
|
|
14884
|
+
name: COMPONENT_NAME$P,
|
|
14197
14885
|
props: props$x,
|
|
14198
14886
|
emits: ['portal-fulfilled', 'close', 'before-close'],
|
|
14199
14887
|
setup(props, {
|
|
@@ -14366,9 +15054,9 @@ const props$w = {
|
|
|
14366
15054
|
|
|
14367
15055
|
/** @jsxImportSource vue */
|
|
14368
15056
|
|
|
14369
|
-
const COMPONENT_NAME$
|
|
15057
|
+
const COMPONENT_NAME$O = 'vc-option';
|
|
14370
15058
|
const Option$1 = /* @__PURE__ */ vue.defineComponent({
|
|
14371
|
-
name: COMPONENT_NAME$
|
|
15059
|
+
name: COMPONENT_NAME$O,
|
|
14372
15060
|
props: props$w,
|
|
14373
15061
|
setup(props, {
|
|
14374
15062
|
slots
|
|
@@ -14452,9 +15140,9 @@ const props$u = {
|
|
|
14452
15140
|
|
|
14453
15141
|
/** @jsxImportSource vue */
|
|
14454
15142
|
|
|
14455
|
-
const COMPONENT_NAME$
|
|
15143
|
+
const COMPONENT_NAME$N = 'vc-tag';
|
|
14456
15144
|
const Tag = /* @__PURE__ */ vue.defineComponent({
|
|
14457
|
-
name: COMPONENT_NAME$
|
|
15145
|
+
name: COMPONENT_NAME$N,
|
|
14458
15146
|
props: props$u,
|
|
14459
15147
|
emits: ['close', 'change'],
|
|
14460
15148
|
setup(props, {
|
|
@@ -14525,9 +15213,9 @@ const props$t = {
|
|
|
14525
15213
|
|
|
14526
15214
|
/** @jsxImportSource vue */
|
|
14527
15215
|
|
|
14528
|
-
const COMPONENT_NAME$
|
|
15216
|
+
const COMPONENT_NAME$M = 'vc-select-option';
|
|
14529
15217
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
14530
|
-
name: COMPONENT_NAME$
|
|
15218
|
+
name: COMPONENT_NAME$M,
|
|
14531
15219
|
props: props$t,
|
|
14532
15220
|
setup(props, {
|
|
14533
15221
|
slots,
|
|
@@ -14622,9 +15310,9 @@ const props$s = {
|
|
|
14622
15310
|
|
|
14623
15311
|
/** @jsxImportSource vue */
|
|
14624
15312
|
|
|
14625
|
-
const COMPONENT_NAME$
|
|
15313
|
+
const COMPONENT_NAME$L = 'vc-select-option-group';
|
|
14626
15314
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
14627
|
-
name: COMPONENT_NAME$
|
|
15315
|
+
name: COMPONENT_NAME$L,
|
|
14628
15316
|
props: props$s,
|
|
14629
15317
|
setup(props, {
|
|
14630
15318
|
slots
|
|
@@ -14654,9 +15342,9 @@ const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
|
14654
15342
|
|
|
14655
15343
|
/** @jsxImportSource vue */
|
|
14656
15344
|
|
|
14657
|
-
const COMPONENT_NAME$
|
|
15345
|
+
const COMPONENT_NAME$K = 'vc-select-all';
|
|
14658
15346
|
const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
14659
|
-
name: COMPONENT_NAME$
|
|
15347
|
+
name: COMPONENT_NAME$K,
|
|
14660
15348
|
props: {
|
|
14661
15349
|
data: {
|
|
14662
15350
|
type: Array,
|
|
@@ -14726,9 +15414,9 @@ const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
|
14726
15414
|
|
|
14727
15415
|
/** @jsxImportSource vue */
|
|
14728
15416
|
|
|
14729
|
-
const COMPONENT_NAME$
|
|
15417
|
+
const COMPONENT_NAME$J = 'vc-select';
|
|
14730
15418
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
14731
|
-
name: COMPONENT_NAME$
|
|
15419
|
+
name: COMPONENT_NAME$J,
|
|
14732
15420
|
props: props$1a,
|
|
14733
15421
|
emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
|
|
14734
15422
|
setup(props, {
|
|
@@ -15022,9 +15710,9 @@ const Select = /* @__PURE__ */ vue.defineComponent({
|
|
|
15022
15710
|
|
|
15023
15711
|
/** @jsxImportSource vue */
|
|
15024
15712
|
|
|
15025
|
-
const COMPONENT_NAME$
|
|
15713
|
+
const COMPONENT_NAME$I = 'vc-pagination';
|
|
15026
15714
|
const Pagination = /* @__PURE__ */ vue.defineComponent({
|
|
15027
|
-
name: COMPONENT_NAME$
|
|
15715
|
+
name: COMPONENT_NAME$I,
|
|
15028
15716
|
props: props$v,
|
|
15029
15717
|
emits: ['update:current', 'change', 'page-size-change'],
|
|
15030
15718
|
setup(props, {
|
|
@@ -15222,9 +15910,9 @@ const props$r = {
|
|
|
15222
15910
|
|
|
15223
15911
|
/** @jsxImportSource vue */
|
|
15224
15912
|
|
|
15225
|
-
const COMPONENT_NAME$
|
|
15913
|
+
const COMPONENT_NAME$H = 'vc-picker';
|
|
15226
15914
|
const Picker = /* @__PURE__ */ vue.defineComponent({
|
|
15227
|
-
name: COMPONENT_NAME$
|
|
15915
|
+
name: COMPONENT_NAME$H,
|
|
15228
15916
|
props: props$r,
|
|
15229
15917
|
setup(props, {
|
|
15230
15918
|
slots
|
|
@@ -15287,9 +15975,9 @@ const props$q = {
|
|
|
15287
15975
|
|
|
15288
15976
|
/** @jsxImportSource vue */
|
|
15289
15977
|
|
|
15290
|
-
const COMPONENT_NAME$
|
|
15978
|
+
const COMPONENT_NAME$G = 'vc-popconfirm';
|
|
15291
15979
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
15292
|
-
name: COMPONENT_NAME$
|
|
15980
|
+
name: COMPONENT_NAME$G,
|
|
15293
15981
|
props: props$q,
|
|
15294
15982
|
inheritAttrs: false,
|
|
15295
15983
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
|
|
@@ -15457,9 +16145,9 @@ const props$p = {
|
|
|
15457
16145
|
|
|
15458
16146
|
/** @jsxImportSource vue */
|
|
15459
16147
|
|
|
15460
|
-
const COMPONENT_NAME$
|
|
16148
|
+
const COMPONENT_NAME$F = 'vc-popup';
|
|
15461
16149
|
const MPopup = /* @__PURE__ */ vue.defineComponent({
|
|
15462
|
-
name: COMPONENT_NAME$
|
|
16150
|
+
name: COMPONENT_NAME$F,
|
|
15463
16151
|
props: props$p,
|
|
15464
16152
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change'],
|
|
15465
16153
|
setup(props, {
|
|
@@ -15586,9 +16274,9 @@ const props$o = {
|
|
|
15586
16274
|
|
|
15587
16275
|
/** @jsxImportSource vue */
|
|
15588
16276
|
|
|
15589
|
-
const COMPONENT_NAME$
|
|
16277
|
+
const COMPONENT_NAME$E = 'vc-print';
|
|
15590
16278
|
const Print = /* @__PURE__ */ vue.defineComponent({
|
|
15591
|
-
name: COMPONENT_NAME$
|
|
16279
|
+
name: COMPONENT_NAME$E,
|
|
15592
16280
|
props: props$o,
|
|
15593
16281
|
setup(props, {
|
|
15594
16282
|
expose,
|
|
@@ -15668,7 +16356,7 @@ const props$n = {
|
|
|
15668
16356
|
},
|
|
15669
16357
|
strokeColor: {
|
|
15670
16358
|
type: String,
|
|
15671
|
-
default: "#
|
|
16359
|
+
default: "#456CF6"
|
|
15672
16360
|
},
|
|
15673
16361
|
trackColor: {
|
|
15674
16362
|
type: String,
|
|
@@ -15690,9 +16378,9 @@ const props$n = {
|
|
|
15690
16378
|
|
|
15691
16379
|
/** @jsxImportSource vue */
|
|
15692
16380
|
|
|
15693
|
-
const COMPONENT_NAME$
|
|
16381
|
+
const COMPONENT_NAME$D = 'vc-progress-circle';
|
|
15694
16382
|
const Circle = /* @__PURE__ */ vue.defineComponent({
|
|
15695
|
-
name: COMPONENT_NAME$
|
|
16383
|
+
name: COMPONENT_NAME$D,
|
|
15696
16384
|
props: props$n,
|
|
15697
16385
|
setup(props, {
|
|
15698
16386
|
slots
|
|
@@ -15752,9 +16440,9 @@ const Circle = /* @__PURE__ */ vue.defineComponent({
|
|
|
15752
16440
|
|
|
15753
16441
|
/** @jsxImportSource vue */
|
|
15754
16442
|
|
|
15755
|
-
const COMPONENT_NAME$
|
|
16443
|
+
const COMPONENT_NAME$C = 'vc-progress-line';
|
|
15756
16444
|
const Line = /* @__PURE__ */ vue.defineComponent({
|
|
15757
|
-
name: COMPONENT_NAME$
|
|
16445
|
+
name: COMPONENT_NAME$C,
|
|
15758
16446
|
props: props$n,
|
|
15759
16447
|
setup(props) {
|
|
15760
16448
|
const colorStyle = vue.computed(() => {
|
|
@@ -15801,9 +16489,9 @@ const Line = /* @__PURE__ */ vue.defineComponent({
|
|
|
15801
16489
|
function _isSlot(s) {
|
|
15802
16490
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
15803
16491
|
}
|
|
15804
|
-
const COMPONENT_NAME$
|
|
16492
|
+
const COMPONENT_NAME$B = 'vc-progress';
|
|
15805
16493
|
const Progress = /* @__PURE__ */ vue.defineComponent({
|
|
15806
|
-
name: COMPONENT_NAME$
|
|
16494
|
+
name: COMPONENT_NAME$B,
|
|
15807
16495
|
props: props$n,
|
|
15808
16496
|
setup(props, {
|
|
15809
16497
|
slots
|
|
@@ -15965,9 +16653,9 @@ const useRadio = () => {
|
|
|
15965
16653
|
|
|
15966
16654
|
/** @jsxImportSource vue */
|
|
15967
16655
|
|
|
15968
|
-
const COMPONENT_NAME$
|
|
16656
|
+
const COMPONENT_NAME$A = 'vc-radio';
|
|
15969
16657
|
const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
15970
|
-
name: COMPONENT_NAME$
|
|
16658
|
+
name: COMPONENT_NAME$A,
|
|
15971
16659
|
props: props$m,
|
|
15972
16660
|
emits: ['update:modelValue', 'change'],
|
|
15973
16661
|
setup(props, {
|
|
@@ -16011,9 +16699,9 @@ const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
|
16011
16699
|
|
|
16012
16700
|
/** @jsxImportSource vue */
|
|
16013
16701
|
|
|
16014
|
-
const COMPONENT_NAME$
|
|
16702
|
+
const COMPONENT_NAME$z = 'vc-radio-button';
|
|
16015
16703
|
const RadioButton = /* @__PURE__ */ vue.defineComponent({
|
|
16016
|
-
name: COMPONENT_NAME$
|
|
16704
|
+
name: COMPONENT_NAME$z,
|
|
16017
16705
|
props: {
|
|
16018
16706
|
...props$m,
|
|
16019
16707
|
labelStyle: [String, Object],
|
|
@@ -16126,9 +16814,9 @@ const useRadioGroup = () => {
|
|
|
16126
16814
|
|
|
16127
16815
|
/** @jsxImportSource vue */
|
|
16128
16816
|
|
|
16129
|
-
const COMPONENT_NAME$
|
|
16817
|
+
const COMPONENT_NAME$y = 'vc-radio-group';
|
|
16130
16818
|
const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
16131
|
-
name: COMPONENT_NAME$
|
|
16819
|
+
name: COMPONENT_NAME$y,
|
|
16132
16820
|
props: props$l,
|
|
16133
16821
|
emits: ['update:modelValue', 'change'],
|
|
16134
16822
|
setup(props, {
|
|
@@ -16149,9 +16837,9 @@ const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
|
16149
16837
|
|
|
16150
16838
|
/** @jsxImportSource vue */
|
|
16151
16839
|
|
|
16152
|
-
const COMPONENT_NAME$
|
|
16840
|
+
const COMPONENT_NAME$x = 'vcm-radio';
|
|
16153
16841
|
const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
16154
|
-
name: COMPONENT_NAME$
|
|
16842
|
+
name: COMPONENT_NAME$x,
|
|
16155
16843
|
props: props$m,
|
|
16156
16844
|
emits: ['update:modelValue', 'change'],
|
|
16157
16845
|
setup(props, {
|
|
@@ -16195,9 +16883,9 @@ const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
|
16195
16883
|
|
|
16196
16884
|
/** @jsxImportSource vue */
|
|
16197
16885
|
|
|
16198
|
-
const COMPONENT_NAME$
|
|
16886
|
+
const COMPONENT_NAME$w = 'vcm-radio-group';
|
|
16199
16887
|
const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
16200
|
-
name: COMPONENT_NAME$
|
|
16888
|
+
name: COMPONENT_NAME$w,
|
|
16201
16889
|
props: props$l,
|
|
16202
16890
|
emits: ['update:modelValue', 'change'],
|
|
16203
16891
|
setup(props, {
|
|
@@ -16264,9 +16952,9 @@ const props$k = {
|
|
|
16264
16952
|
|
|
16265
16953
|
/** @jsxImportSource vue */
|
|
16266
16954
|
|
|
16267
|
-
const COMPONENT_NAME$
|
|
16955
|
+
const COMPONENT_NAME$v = 'vc-rate';
|
|
16268
16956
|
const Rate = /* @__PURE__ */ vue.defineComponent({
|
|
16269
|
-
name: COMPONENT_NAME$
|
|
16957
|
+
name: COMPONENT_NAME$v,
|
|
16270
16958
|
props: props$k,
|
|
16271
16959
|
emits: ['update:modelValue', 'change'],
|
|
16272
16960
|
setup(props, {
|
|
@@ -16468,9 +17156,9 @@ const props$j = {
|
|
|
16468
17156
|
|
|
16469
17157
|
/** @jsxImportSource vue */
|
|
16470
17158
|
|
|
16471
|
-
const COMPONENT_NAME$
|
|
17159
|
+
const COMPONENT_NAME$u = 'vc-recycle-list-scroll-state';
|
|
16472
17160
|
const ScrollState = /* @__PURE__ */ vue.defineComponent({
|
|
16473
|
-
name: COMPONENT_NAME$
|
|
17161
|
+
name: COMPONENT_NAME$u,
|
|
16474
17162
|
setup(_, {
|
|
16475
17163
|
slots
|
|
16476
17164
|
}) {
|
|
@@ -16600,12 +17288,12 @@ const useDirectionKeys = () => {
|
|
|
16600
17288
|
|
|
16601
17289
|
/** @jsxImportSource vue */
|
|
16602
17290
|
|
|
16603
|
-
const COMPONENT_NAME$
|
|
17291
|
+
const COMPONENT_NAME$t = 'vc-recycle-list-container';
|
|
16604
17292
|
|
|
16605
17293
|
// TODO: 抽离
|
|
16606
17294
|
const transformKey = $__namespace.prefixStyle('transform').camel;
|
|
16607
17295
|
const Container = /* @__PURE__ */ vue.defineComponent({
|
|
16608
|
-
name: COMPONENT_NAME$
|
|
17296
|
+
name: COMPONENT_NAME$t,
|
|
16609
17297
|
props: props$i,
|
|
16610
17298
|
emits: ['refresh'],
|
|
16611
17299
|
setup(props, {
|
|
@@ -16703,9 +17391,9 @@ const Container = /* @__PURE__ */ vue.defineComponent({
|
|
|
16703
17391
|
|
|
16704
17392
|
/** @jsxImportSource vue */
|
|
16705
17393
|
|
|
16706
|
-
const COMPONENT_NAME$
|
|
17394
|
+
const COMPONENT_NAME$s = 'vc-recycle-list';
|
|
16707
17395
|
const RecycleList = /* @__PURE__ */ vue.defineComponent({
|
|
16708
|
-
name: COMPONENT_NAME$
|
|
17396
|
+
name: COMPONENT_NAME$s,
|
|
16709
17397
|
props: props$j,
|
|
16710
17398
|
emits: ['scroll', 'row-resize'],
|
|
16711
17399
|
setup(props, {
|
|
@@ -17279,9 +17967,9 @@ const props$h = {
|
|
|
17279
17967
|
|
|
17280
17968
|
/** @jsxImportSource vue */
|
|
17281
17969
|
|
|
17282
|
-
const COMPONENT_NAME$
|
|
17970
|
+
const COMPONENT_NAME$r = 'vc-slider';
|
|
17283
17971
|
const Slider = /* @__PURE__ */ vue.defineComponent({
|
|
17284
|
-
name: COMPONENT_NAME$
|
|
17972
|
+
name: COMPONENT_NAME$r,
|
|
17285
17973
|
props: props$h,
|
|
17286
17974
|
setup(props, {
|
|
17287
17975
|
slots
|
|
@@ -17305,9 +17993,9 @@ const props$g = {
|
|
|
17305
17993
|
|
|
17306
17994
|
/** @jsxImportSource vue */
|
|
17307
17995
|
|
|
17308
|
-
const COMPONENT_NAME$
|
|
17996
|
+
const COMPONENT_NAME$q = 'vc-sort-list';
|
|
17309
17997
|
const SortList = /* @__PURE__ */ vue.defineComponent({
|
|
17310
|
-
name: COMPONENT_NAME$
|
|
17998
|
+
name: COMPONENT_NAME$q,
|
|
17311
17999
|
props: props$g,
|
|
17312
18000
|
setup(props, {
|
|
17313
18001
|
slots
|
|
@@ -17331,9 +18019,9 @@ const props$f = {
|
|
|
17331
18019
|
|
|
17332
18020
|
/** @jsxImportSource vue */
|
|
17333
18021
|
|
|
17334
|
-
const COMPONENT_NAME$
|
|
18022
|
+
const COMPONENT_NAME$p = 'vc-steps';
|
|
17335
18023
|
const Steps = /* @__PURE__ */ vue.defineComponent({
|
|
17336
|
-
name: COMPONENT_NAME$
|
|
18024
|
+
name: COMPONENT_NAME$p,
|
|
17337
18025
|
props: props$f,
|
|
17338
18026
|
setup(props, {
|
|
17339
18027
|
slots
|
|
@@ -17459,9 +18147,9 @@ const useSwitch = (expose) => {
|
|
|
17459
18147
|
|
|
17460
18148
|
/** @jsxImportSource vue */
|
|
17461
18149
|
|
|
17462
|
-
const COMPONENT_NAME$
|
|
18150
|
+
const COMPONENT_NAME$o = 'vc-switch';
|
|
17463
18151
|
const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
17464
|
-
name: COMPONENT_NAME$
|
|
18152
|
+
name: COMPONENT_NAME$o,
|
|
17465
18153
|
props: props$e,
|
|
17466
18154
|
// click -> onClick要被拦截,此处不能放置
|
|
17467
18155
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -17535,9 +18223,9 @@ const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
|
17535
18223
|
|
|
17536
18224
|
/** @jsxImportSource vue */
|
|
17537
18225
|
|
|
17538
|
-
const COMPONENT_NAME$
|
|
18226
|
+
const COMPONENT_NAME$n = 'vcm-switch';
|
|
17539
18227
|
const MSwitch = /* @__PURE__ */ vue.defineComponent({
|
|
17540
|
-
name: COMPONENT_NAME$
|
|
18228
|
+
name: COMPONENT_NAME$n,
|
|
17541
18229
|
props: props$e,
|
|
17542
18230
|
// click -> onClick要被拦截,此处不能放置
|
|
17543
18231
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -18650,9 +19338,9 @@ const useStates = (mapper, $store) => {
|
|
|
18650
19338
|
|
|
18651
19339
|
/** @jsxImportSource vue */
|
|
18652
19340
|
|
|
18653
|
-
const COMPONENT_NAME$
|
|
19341
|
+
const COMPONENT_NAME$m = 'vc-table-normal-list';
|
|
18654
19342
|
const NormalList = /* @__PURE__ */ vue.defineComponent({
|
|
18655
|
-
name: COMPONENT_NAME$
|
|
19343
|
+
name: COMPONENT_NAME$m,
|
|
18656
19344
|
props: {
|
|
18657
19345
|
data: {
|
|
18658
19346
|
type: Array,
|
|
@@ -19170,6 +19858,10 @@ const TableHeader = /* @__PURE__ */ vue.defineComponent({
|
|
|
19170
19858
|
const allowDrag = vue.computed(() => {
|
|
19171
19859
|
return typeof props.resizable === 'boolean' ? props.resizable : props.border;
|
|
19172
19860
|
});
|
|
19861
|
+
const dragLineClass = vue.computed(() => {
|
|
19862
|
+
if (props.border || !props.resizable) return;
|
|
19863
|
+
return 'has-drag-line';
|
|
19864
|
+
});
|
|
19173
19865
|
const states = useStates({
|
|
19174
19866
|
columns: 'columns',
|
|
19175
19867
|
isAllSelected: 'isAllSelected',
|
|
@@ -19403,7 +20095,7 @@ const TableHeader = /* @__PURE__ */ vue.defineComponent({
|
|
|
19403
20095
|
"style": [getHeaderCellStyle(rowIndex, columnIndex, columns, column), {
|
|
19404
20096
|
width: `${column.realWidth}px`
|
|
19405
20097
|
}],
|
|
19406
|
-
"class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), 'vc-table__th'],
|
|
20098
|
+
"class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), column.resizable && dragLineClass.value, 'vc-table__th'],
|
|
19407
20099
|
"key": column.id
|
|
19408
20100
|
}, [vue.createVNode("div", {
|
|
19409
20101
|
"class": ['vc-table__cell',
|
|
@@ -19649,9 +20341,9 @@ const props$d = {
|
|
|
19649
20341
|
|
|
19650
20342
|
/** @jsxImportSource vue */
|
|
19651
20343
|
|
|
19652
|
-
const COMPONENT_NAME$
|
|
20344
|
+
const COMPONENT_NAME$l = 'vc-table';
|
|
19653
20345
|
const Table = /* @__PURE__ */ vue.defineComponent({
|
|
19654
|
-
name: COMPONENT_NAME$
|
|
20346
|
+
name: COMPONENT_NAME$l,
|
|
19655
20347
|
props: props$d,
|
|
19656
20348
|
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'],
|
|
19657
20349
|
setup(props, {
|
|
@@ -20854,9 +21546,9 @@ const useTabs = (options = {}) => {
|
|
|
20854
21546
|
|
|
20855
21547
|
/** @jsxImportSource vue */
|
|
20856
21548
|
|
|
20857
|
-
const COMPONENT_NAME$
|
|
21549
|
+
const COMPONENT_NAME$k = 'vc-tabs';
|
|
20858
21550
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
20859
|
-
name: COMPONENT_NAME$
|
|
21551
|
+
name: COMPONENT_NAME$k,
|
|
20860
21552
|
props: props$c,
|
|
20861
21553
|
emits: ['update:modelValue', 'change', 'click'],
|
|
20862
21554
|
setup(props, {
|
|
@@ -21109,9 +21801,9 @@ const useTabsPane = () => {
|
|
|
21109
21801
|
|
|
21110
21802
|
/** @jsxImportSource vue */
|
|
21111
21803
|
|
|
21112
|
-
const COMPONENT_NAME$
|
|
21804
|
+
const COMPONENT_NAME$j = 'vc-tabs-pane';
|
|
21113
21805
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
21114
|
-
name: COMPONENT_NAME$
|
|
21806
|
+
name: COMPONENT_NAME$j,
|
|
21115
21807
|
props: props$b,
|
|
21116
21808
|
setup(_, {
|
|
21117
21809
|
slots
|
|
@@ -21166,9 +21858,9 @@ const props$a = {
|
|
|
21166
21858
|
|
|
21167
21859
|
/** @jsxImportSource vue */
|
|
21168
21860
|
|
|
21169
|
-
const COMPONENT_NAME$
|
|
21861
|
+
const COMPONENT_NAME$i = 'vcm-tabs';
|
|
21170
21862
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
21171
|
-
name: COMPONENT_NAME$
|
|
21863
|
+
name: COMPONENT_NAME$i,
|
|
21172
21864
|
props: props$a,
|
|
21173
21865
|
emits: ['update:modelValue', 'change', 'click'],
|
|
21174
21866
|
setup(props, {
|
|
@@ -21433,9 +22125,9 @@ const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
|
21433
22125
|
|
|
21434
22126
|
/** @jsxImportSource vue */
|
|
21435
22127
|
|
|
21436
|
-
const COMPONENT_NAME$
|
|
22128
|
+
const COMPONENT_NAME$h = 'vcm-tabs-pane';
|
|
21437
22129
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
21438
|
-
name: COMPONENT_NAME$
|
|
22130
|
+
name: COMPONENT_NAME$h,
|
|
21439
22131
|
props: props$b,
|
|
21440
22132
|
setup(_, {
|
|
21441
22133
|
slots
|
|
@@ -21499,9 +22191,9 @@ const props$9 = {
|
|
|
21499
22191
|
|
|
21500
22192
|
/** @jsxImportSource vue */
|
|
21501
22193
|
|
|
21502
|
-
const COMPONENT_NAME$
|
|
22194
|
+
const COMPONENT_NAME$g = 'vc-text';
|
|
21503
22195
|
const Text = /* @__PURE__ */ vue.defineComponent({
|
|
21504
|
-
name: COMPONENT_NAME$
|
|
22196
|
+
name: COMPONENT_NAME$g,
|
|
21505
22197
|
props: props$9,
|
|
21506
22198
|
setup(props, {
|
|
21507
22199
|
emit
|
|
@@ -21868,9 +22560,9 @@ const props$8 = {
|
|
|
21868
22560
|
|
|
21869
22561
|
/** @jsxImportSource vue */
|
|
21870
22562
|
|
|
21871
|
-
const COMPONENT_NAME$
|
|
22563
|
+
const COMPONENT_NAME$f = 'vc-textarea';
|
|
21872
22564
|
const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
21873
|
-
name: COMPONENT_NAME$
|
|
22565
|
+
name: COMPONENT_NAME$f,
|
|
21874
22566
|
props: Object.assign({}, props$8, {
|
|
21875
22567
|
indicator: {
|
|
21876
22568
|
type: [Boolean, Object],
|
|
@@ -21926,9 +22618,9 @@ const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
|
21926
22618
|
|
|
21927
22619
|
/** @jsxImportSource vue */
|
|
21928
22620
|
|
|
21929
|
-
const COMPONENT_NAME$
|
|
22621
|
+
const COMPONENT_NAME$e = 'vcm-textarea';
|
|
21930
22622
|
const MTextarea = /* @__PURE__ */ vue.defineComponent({
|
|
21931
|
-
name: COMPONENT_NAME$
|
|
22623
|
+
name: COMPONENT_NAME$e,
|
|
21932
22624
|
props: Object.assign({}, props$8, {
|
|
21933
22625
|
align: {
|
|
21934
22626
|
type: String,
|
|
@@ -22011,9 +22703,9 @@ const props$7 = {
|
|
|
22011
22703
|
}
|
|
22012
22704
|
};
|
|
22013
22705
|
|
|
22014
|
-
const COMPONENT_NAME$
|
|
22706
|
+
const COMPONENT_NAME$d = "vc-theme";
|
|
22015
22707
|
const Theme = vue.defineComponent({
|
|
22016
|
-
name: COMPONENT_NAME$
|
|
22708
|
+
name: COMPONENT_NAME$d,
|
|
22017
22709
|
props: props$7,
|
|
22018
22710
|
setup(props, { slots }) {
|
|
22019
22711
|
const themeId = Utils__namespace.getUid("vc-theme");
|
|
@@ -22096,9 +22788,9 @@ const Theme = vue.defineComponent({
|
|
|
22096
22788
|
}
|
|
22097
22789
|
});
|
|
22098
22790
|
|
|
22099
|
-
const COMPONENT_NAME$
|
|
22791
|
+
const COMPONENT_NAME$c = "vc-theme-view";
|
|
22100
22792
|
const ThemeView = vue.defineComponent({
|
|
22101
|
-
name: COMPONENT_NAME$
|
|
22793
|
+
name: COMPONENT_NAME$c,
|
|
22102
22794
|
props: props$7,
|
|
22103
22795
|
setup(props, { slots }) {
|
|
22104
22796
|
return () => {
|
|
@@ -22114,9 +22806,9 @@ const ThemeView = vue.defineComponent({
|
|
|
22114
22806
|
}
|
|
22115
22807
|
});
|
|
22116
22808
|
|
|
22117
|
-
const COMPONENT_NAME$
|
|
22809
|
+
const COMPONENT_NAME$b = "vc-theme-text";
|
|
22118
22810
|
const ThemeText = vue.defineComponent({
|
|
22119
|
-
name: COMPONENT_NAME$
|
|
22811
|
+
name: COMPONENT_NAME$b,
|
|
22120
22812
|
props: props$7,
|
|
22121
22813
|
setup(props, { slots }) {
|
|
22122
22814
|
return () => {
|
|
@@ -22132,9 +22824,9 @@ const ThemeText = vue.defineComponent({
|
|
|
22132
22824
|
}
|
|
22133
22825
|
});
|
|
22134
22826
|
|
|
22135
|
-
const COMPONENT_NAME$
|
|
22827
|
+
const COMPONENT_NAME$a = "vc-theme-image";
|
|
22136
22828
|
const ThemeImage = vue.defineComponent({
|
|
22137
|
-
name: COMPONENT_NAME$
|
|
22829
|
+
name: COMPONENT_NAME$a,
|
|
22138
22830
|
props: props$7,
|
|
22139
22831
|
setup(props, { slots }) {
|
|
22140
22832
|
return () => {
|
|
@@ -22186,12 +22878,12 @@ const props$6 = {
|
|
|
22186
22878
|
|
|
22187
22879
|
/** @jsxImportSource vue */
|
|
22188
22880
|
|
|
22189
|
-
const COMPONENT_NAME$
|
|
22881
|
+
const COMPONENT_NAME$9 = 'vc-time-picker';
|
|
22190
22882
|
const getPanel = type => {
|
|
22191
22883
|
const isRange = type === 'timerange';
|
|
22192
22884
|
return isRange ? TimeRangePanel : TimePanel;
|
|
22193
22885
|
};
|
|
22194
|
-
const TimePicker = createPicker(COMPONENT_NAME$
|
|
22886
|
+
const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
|
|
22195
22887
|
const props = vue.getCurrentInstance().props;
|
|
22196
22888
|
const icon = vue.ref('icon');
|
|
22197
22889
|
const panel = vue.shallowRef({});
|
|
@@ -22227,9 +22919,9 @@ const props$5 = {
|
|
|
22227
22919
|
|
|
22228
22920
|
/** @jsxImportSource vue */
|
|
22229
22921
|
|
|
22230
|
-
const COMPONENT_NAME$
|
|
22922
|
+
const COMPONENT_NAME$8 = 'vc-timeline';
|
|
22231
22923
|
const Timeline = /* @__PURE__ */ vue.defineComponent({
|
|
22232
|
-
name: COMPONENT_NAME$
|
|
22924
|
+
name: COMPONENT_NAME$8,
|
|
22233
22925
|
props: props$5,
|
|
22234
22926
|
setup(props, {
|
|
22235
22927
|
slots
|
|
@@ -22256,9 +22948,9 @@ const props$4 = {
|
|
|
22256
22948
|
|
|
22257
22949
|
/** @jsxImportSource vue */
|
|
22258
22950
|
|
|
22259
|
-
const COMPONENT_NAME$
|
|
22951
|
+
const COMPONENT_NAME$7 = 'vc-touch';
|
|
22260
22952
|
const Touch = /* @__PURE__ */ vue.defineComponent({
|
|
22261
|
-
name: COMPONENT_NAME$
|
|
22953
|
+
name: COMPONENT_NAME$7,
|
|
22262
22954
|
props: props$4,
|
|
22263
22955
|
setup(props, {
|
|
22264
22956
|
slots
|
|
@@ -22766,21 +23458,68 @@ class TreeStore {
|
|
|
22766
23458
|
parentNode.insertChild({ data });
|
|
22767
23459
|
}
|
|
22768
23460
|
}
|
|
23461
|
+
/**
|
|
23462
|
+
* 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
|
|
23463
|
+
* 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
|
|
23464
|
+
* @param checkedValues ~
|
|
23465
|
+
* @returns ~
|
|
23466
|
+
*/
|
|
23467
|
+
_getCascadeCheckedAnchorIds(checkedValues) {
|
|
23468
|
+
const checkedSet = new Set(checkedValues);
|
|
23469
|
+
const nodesMap = this.nodesMap;
|
|
23470
|
+
const anchors = [];
|
|
23471
|
+
for (const id of checkedValues) {
|
|
23472
|
+
const node = nodesMap[id];
|
|
23473
|
+
if (!node) continue;
|
|
23474
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
23475
|
+
(child) => checkedSet.has(child.getter.value)
|
|
23476
|
+
);
|
|
23477
|
+
if (!hasSelectedChildInSet) {
|
|
23478
|
+
anchors.push(id);
|
|
23479
|
+
}
|
|
23480
|
+
}
|
|
23481
|
+
anchors.sort((a, b) => {
|
|
23482
|
+
const na = nodesMap[a];
|
|
23483
|
+
const nb = nodesMap[b];
|
|
23484
|
+
if (!na || !nb) return 0;
|
|
23485
|
+
return nb.states.level - na.states.level;
|
|
23486
|
+
});
|
|
23487
|
+
return anchors;
|
|
23488
|
+
}
|
|
22769
23489
|
_initDefaultCheckedNodes() {
|
|
22770
23490
|
const checkedValues = this.checkedValues || [];
|
|
22771
23491
|
const nodesMap = this.nodesMap;
|
|
22772
|
-
|
|
23492
|
+
if (this.checkStrictly) {
|
|
23493
|
+
checkedValues.forEach((id) => {
|
|
23494
|
+
const node = nodesMap[id];
|
|
23495
|
+
if (node) {
|
|
23496
|
+
node.setChecked(true, false);
|
|
23497
|
+
}
|
|
23498
|
+
});
|
|
23499
|
+
return;
|
|
23500
|
+
}
|
|
23501
|
+
const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
|
|
23502
|
+
anchorIds.forEach((id) => {
|
|
22773
23503
|
const node = nodesMap[id];
|
|
22774
23504
|
if (node) {
|
|
22775
|
-
node.setChecked(true,
|
|
23505
|
+
node.setChecked(true, true);
|
|
22776
23506
|
}
|
|
22777
23507
|
});
|
|
22778
23508
|
}
|
|
22779
23509
|
_initDefaultCheckedNode(node) {
|
|
22780
23510
|
const checkedValues = this.checkedValues || [];
|
|
22781
23511
|
const nodeValue = node.getter.value;
|
|
22782
|
-
if (checkedValues.indexOf(nodeValue)
|
|
22783
|
-
|
|
23512
|
+
if (checkedValues.indexOf(nodeValue) === -1) return;
|
|
23513
|
+
if (this.checkStrictly) {
|
|
23514
|
+
node.setChecked(true, false);
|
|
23515
|
+
return;
|
|
23516
|
+
}
|
|
23517
|
+
const checkedSet = new Set(checkedValues);
|
|
23518
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
23519
|
+
(child) => checkedSet.has(child.getter.value)
|
|
23520
|
+
);
|
|
23521
|
+
if (!hasSelectedChildInSet) {
|
|
23522
|
+
node.setChecked(true, true);
|
|
22784
23523
|
}
|
|
22785
23524
|
}
|
|
22786
23525
|
setCheckedValues(newVal) {
|
|
@@ -23008,9 +23747,9 @@ const props$3 = {
|
|
|
23008
23747
|
|
|
23009
23748
|
/** @jsxImportSource vue */
|
|
23010
23749
|
|
|
23011
|
-
const COMPONENT_NAME$
|
|
23750
|
+
const COMPONENT_NAME$6 = 'vc-tree-node';
|
|
23012
23751
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
23013
|
-
name: COMPONENT_NAME$
|
|
23752
|
+
name: COMPONENT_NAME$6,
|
|
23014
23753
|
props: props$3,
|
|
23015
23754
|
emits: ['node-expand'],
|
|
23016
23755
|
setup(props, {
|
|
@@ -23509,9 +24248,9 @@ const props$2 = {
|
|
|
23509
24248
|
|
|
23510
24249
|
/** @jsxImportSource vue */
|
|
23511
24250
|
|
|
23512
|
-
const COMPONENT_NAME$
|
|
24251
|
+
const COMPONENT_NAME$5 = 'vc-tree';
|
|
23513
24252
|
const Tree = /* @__PURE__ */ vue.defineComponent({
|
|
23514
|
-
name: COMPONENT_NAME$
|
|
24253
|
+
name: COMPONENT_NAME$5,
|
|
23515
24254
|
props: props$2,
|
|
23516
24255
|
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'],
|
|
23517
24256
|
setup(props, {
|
|
@@ -23706,6 +24445,225 @@ const Tree = /* @__PURE__ */ vue.defineComponent({
|
|
|
23706
24445
|
}
|
|
23707
24446
|
});
|
|
23708
24447
|
|
|
24448
|
+
/** @jsxImportSource vue */
|
|
24449
|
+
|
|
24450
|
+
const COMPONENT_NAME$4 = 'vc-tree-select-content';
|
|
24451
|
+
const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
|
|
24452
|
+
name: COMPONENT_NAME$4,
|
|
24453
|
+
props: {
|
|
24454
|
+
value: {
|
|
24455
|
+
type: Array,
|
|
24456
|
+
required: true
|
|
24457
|
+
},
|
|
24458
|
+
data: {
|
|
24459
|
+
type: Array,
|
|
24460
|
+
default: () => []
|
|
24461
|
+
},
|
|
24462
|
+
checkStrictly: {
|
|
24463
|
+
type: Boolean,
|
|
24464
|
+
default: false
|
|
24465
|
+
},
|
|
24466
|
+
renderNodeLabel: Function
|
|
24467
|
+
},
|
|
24468
|
+
emits: ['change'],
|
|
24469
|
+
setup(props, {
|
|
24470
|
+
emit
|
|
24471
|
+
}) {
|
|
24472
|
+
return () => {
|
|
24473
|
+
return vue.createVNode(Scroller, {
|
|
24474
|
+
"class": "vc-tree-select__options",
|
|
24475
|
+
"max-height": "200px"
|
|
24476
|
+
}, {
|
|
24477
|
+
default: () => [vue.createVNode(Tree, {
|
|
24478
|
+
"model-value": props.value,
|
|
24479
|
+
"expanded-values": props.value,
|
|
24480
|
+
"data": props.data,
|
|
24481
|
+
"checkStrictly": props.checkStrictly,
|
|
24482
|
+
"allowDispatch": false,
|
|
24483
|
+
"showCheckbox": true,
|
|
24484
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
24485
|
+
"onChange": (_, data) => emit('change', _, data)
|
|
24486
|
+
}, null)]
|
|
24487
|
+
});
|
|
24488
|
+
};
|
|
24489
|
+
}
|
|
24490
|
+
});
|
|
24491
|
+
|
|
24492
|
+
/** @jsxImportSource vue */
|
|
24493
|
+
|
|
24494
|
+
const COMPONENT_NAME$3 = 'vc-tree-select-content-cascader';
|
|
24495
|
+
const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
|
|
24496
|
+
name: COMPONENT_NAME$3,
|
|
24497
|
+
props: {
|
|
24498
|
+
value: {
|
|
24499
|
+
type: Array,
|
|
24500
|
+
required: true
|
|
24501
|
+
},
|
|
24502
|
+
data: {
|
|
24503
|
+
type: Array,
|
|
24504
|
+
default: () => []
|
|
24505
|
+
},
|
|
24506
|
+
checkStrictly: {
|
|
24507
|
+
type: Boolean,
|
|
24508
|
+
default: false
|
|
24509
|
+
},
|
|
24510
|
+
renderNodeLabel: Function,
|
|
24511
|
+
numerable: {
|
|
24512
|
+
type: Boolean,
|
|
24513
|
+
default: false
|
|
24514
|
+
},
|
|
24515
|
+
separator: {
|
|
24516
|
+
type: String,
|
|
24517
|
+
default: ','
|
|
24518
|
+
},
|
|
24519
|
+
max: {
|
|
24520
|
+
type: Number,
|
|
24521
|
+
default: 1
|
|
24522
|
+
},
|
|
24523
|
+
nullValue: {
|
|
24524
|
+
type: [Number, String, Object],
|
|
24525
|
+
default: void 0
|
|
24526
|
+
}
|
|
24527
|
+
},
|
|
24528
|
+
emits: ['change'],
|
|
24529
|
+
setup(props, {
|
|
24530
|
+
emit
|
|
24531
|
+
}) {
|
|
24532
|
+
const treeRef = vue.ref(null);
|
|
24533
|
+
/** hover 展开路径,与 Cascader 一致 */
|
|
24534
|
+
const currentValue = vue.ref([]);
|
|
24535
|
+
const rebuildData = vue.computed(() => {
|
|
24536
|
+
if (!props.data.length) return [];
|
|
24537
|
+
let temp = props.data;
|
|
24538
|
+
const data = [];
|
|
24539
|
+
currentValue.value.forEach(cur => {
|
|
24540
|
+
const col = temp;
|
|
24541
|
+
data.push(col);
|
|
24542
|
+
const next = (temp.find(i => i.value == cur) || {}).children || [];
|
|
24543
|
+
temp = next;
|
|
24544
|
+
});
|
|
24545
|
+
data.push(temp);
|
|
24546
|
+
return data;
|
|
24547
|
+
});
|
|
24548
|
+
/** 驱动列区在 TreeStore 更新后重绘 */
|
|
24549
|
+
const panelTick = vue.ref(0);
|
|
24550
|
+
const columns = vue.computed(() => Array.from({
|
|
24551
|
+
length: currentValue.value.length + 1
|
|
24552
|
+
}).map((_, index) => index));
|
|
24553
|
+
const handleHover = (value, columnIndex) => {
|
|
24554
|
+
const len = currentValue.value.length - columnIndex;
|
|
24555
|
+
currentValue.value.splice(columnIndex, len, value);
|
|
24556
|
+
};
|
|
24557
|
+
const sync = async () => {
|
|
24558
|
+
await vue.nextTick();
|
|
24559
|
+
const tree = treeRef.value;
|
|
24560
|
+
if (!tree) return;
|
|
24561
|
+
const data = {
|
|
24562
|
+
checkedNodes: tree.getCheckedNodes(),
|
|
24563
|
+
checkedValues: tree.getCheckedValues(),
|
|
24564
|
+
halfCheckedNodes: tree.getHalfCheckedNodes(),
|
|
24565
|
+
halfCheckedValues: tree.getHalfCheckedValues()
|
|
24566
|
+
};
|
|
24567
|
+
panelTick.value++;
|
|
24568
|
+
emit('change', null, data);
|
|
24569
|
+
};
|
|
24570
|
+
const getNodeState = item => {
|
|
24571
|
+
const tree = treeRef.value;
|
|
24572
|
+
if (!tree) {
|
|
24573
|
+
return {
|
|
24574
|
+
checked: false,
|
|
24575
|
+
indeterminate: false
|
|
24576
|
+
};
|
|
24577
|
+
}
|
|
24578
|
+
const node = tree.getNode(item);
|
|
24579
|
+
if (!node) {
|
|
24580
|
+
return {
|
|
24581
|
+
checked: false,
|
|
24582
|
+
indeterminate: false
|
|
24583
|
+
};
|
|
24584
|
+
}
|
|
24585
|
+
return {
|
|
24586
|
+
checked: !!node.states.checked,
|
|
24587
|
+
indeterminate: !!node.states.indeterminate
|
|
24588
|
+
};
|
|
24589
|
+
};
|
|
24590
|
+
const hasChildren = item => {
|
|
24591
|
+
return !!(item.children && item.children.length > 0);
|
|
24592
|
+
};
|
|
24593
|
+
const handleCheckboxChange = async (v, item) => {
|
|
24594
|
+
const tree = treeRef.value;
|
|
24595
|
+
if (!tree) return;
|
|
24596
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
24597
|
+
sync();
|
|
24598
|
+
};
|
|
24599
|
+
const handleLabelClick = (v, item) => {
|
|
24600
|
+
const tree = treeRef.value;
|
|
24601
|
+
if (!tree) return;
|
|
24602
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
24603
|
+
sync();
|
|
24604
|
+
};
|
|
24605
|
+
return () => {
|
|
24606
|
+
return vue.createVNode("div", {
|
|
24607
|
+
"class": "vc-tree-select__cascader"
|
|
24608
|
+
}, [vue.createVNode(Tree, {
|
|
24609
|
+
"ref": treeRef,
|
|
24610
|
+
"class": "vc-tree-select__cascader-tree-hidden",
|
|
24611
|
+
"model-value": props.value,
|
|
24612
|
+
"expanded-values": props.value,
|
|
24613
|
+
"data": props.data,
|
|
24614
|
+
"checkStrictly": props.checkStrictly,
|
|
24615
|
+
"allowDispatch": false,
|
|
24616
|
+
"showCheckbox": true,
|
|
24617
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
24618
|
+
"numerable": props.numerable,
|
|
24619
|
+
"separator": props.separator,
|
|
24620
|
+
"max": props.max,
|
|
24621
|
+
"nullValue": props.nullValue
|
|
24622
|
+
}, null), vue.createVNode("div", {
|
|
24623
|
+
"class": "vc-tree-select__cascader-columns"
|
|
24624
|
+
}, [columns.value.map(columnIndex => {
|
|
24625
|
+
const col = rebuildData.value[columnIndex];
|
|
24626
|
+
if (!col || !col.length) return null;
|
|
24627
|
+
return vue.createVNode("div", {
|
|
24628
|
+
"class": "vc-tree-select__cascader-column",
|
|
24629
|
+
"key": columnIndex
|
|
24630
|
+
}, [vue.createVNode("div", {
|
|
24631
|
+
"class": "vc-tree-select__cascader-column-wrapper"
|
|
24632
|
+
}, [col.map(item => {
|
|
24633
|
+
const state = getNodeState(item);
|
|
24634
|
+
const isSelect = currentValue.value[columnIndex] === item.value;
|
|
24635
|
+
const child = hasChildren(item);
|
|
24636
|
+
return vue.createVNode("div", {
|
|
24637
|
+
"key": item.value,
|
|
24638
|
+
"class": ['vc-tree-select__cascader-item', {
|
|
24639
|
+
'is-select': isSelect
|
|
24640
|
+
}],
|
|
24641
|
+
"onMouseenter": () => handleHover(item.value, columnIndex),
|
|
24642
|
+
"onClick": () => handleLabelClick(!state.checked, item)
|
|
24643
|
+
}, [vue.createVNode("span", {
|
|
24644
|
+
"class": "vc-tree-select__cascader-checkbox",
|
|
24645
|
+
"onClick": e => e.stopPropagation()
|
|
24646
|
+
}, [vue.createVNode(Checkbox, {
|
|
24647
|
+
"modelValue": state.checked,
|
|
24648
|
+
"indeterminate": state.indeterminate,
|
|
24649
|
+
"disabled": !!item.disabled,
|
|
24650
|
+
"onChange": v => handleCheckboxChange(v, item)
|
|
24651
|
+
}, null)]), vue.createVNode("span", {
|
|
24652
|
+
"class": "vc-tree-select__cascader-label"
|
|
24653
|
+
}, [props.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
|
|
24654
|
+
"render": props.renderNodeLabel,
|
|
24655
|
+
"store": treeRef.value.getNode(item),
|
|
24656
|
+
"row": item
|
|
24657
|
+
}, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
|
|
24658
|
+
"type": "right",
|
|
24659
|
+
"class": "vc-tree-select__cascader-icon"
|
|
24660
|
+
}, null) : null]);
|
|
24661
|
+
})])]);
|
|
24662
|
+
})])]);
|
|
24663
|
+
};
|
|
24664
|
+
}
|
|
24665
|
+
});
|
|
24666
|
+
|
|
23709
24667
|
const treeKeys = [
|
|
23710
24668
|
"checkStrictly",
|
|
23711
24669
|
"data",
|
|
@@ -23714,7 +24672,18 @@ const treeKeys = [
|
|
|
23714
24672
|
];
|
|
23715
24673
|
const props$1 = {
|
|
23716
24674
|
...props$1a,
|
|
23717
|
-
...lodashEs.pick(props$2, treeKeys)
|
|
24675
|
+
...lodashEs.pick(props$2, treeKeys),
|
|
24676
|
+
autoWidth: {
|
|
24677
|
+
type: Boolean,
|
|
24678
|
+
default: void 0
|
|
24679
|
+
},
|
|
24680
|
+
/**
|
|
24681
|
+
* 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
|
|
24682
|
+
*/
|
|
24683
|
+
cascader: {
|
|
24684
|
+
type: Boolean,
|
|
24685
|
+
default: false
|
|
24686
|
+
}
|
|
23718
24687
|
};
|
|
23719
24688
|
|
|
23720
24689
|
/** @jsxImportSource vue */
|
|
@@ -23740,12 +24709,37 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23740
24709
|
const searchValue = vue.ref('');
|
|
23741
24710
|
const searchRegex = vue.ref(new RegExp(''));
|
|
23742
24711
|
const currentValue = vue.ref([]);
|
|
24712
|
+
const currentValueGroups = vue.computed(() => {
|
|
24713
|
+
if (props.checkStrictly) return;
|
|
24714
|
+
if (!props.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
|
|
24715
|
+
return [];
|
|
24716
|
+
}
|
|
24717
|
+
const pathMap = new Map();
|
|
24718
|
+
const traverse = (data, path = []) => {
|
|
24719
|
+
data.forEach(item => {
|
|
24720
|
+
const v = item.value;
|
|
24721
|
+
if (v == null) return;
|
|
24722
|
+
const fullPath = [...path, v];
|
|
24723
|
+
pathMap.set(v, fullPath);
|
|
24724
|
+
if (item.children?.length) traverse(item.children, fullPath);
|
|
24725
|
+
});
|
|
24726
|
+
};
|
|
24727
|
+
traverse(props.data);
|
|
24728
|
+
const allPaths = currentValue.value.map(v => pathMap.get(v)).filter(Boolean);
|
|
24729
|
+
return allPaths.filter(path => !allPaths.some(other => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
|
|
24730
|
+
});
|
|
23743
24731
|
const source = vue.computed(() => {
|
|
23744
24732
|
return flattenData$1(props.data, {
|
|
23745
24733
|
parent: true,
|
|
23746
24734
|
cascader: true
|
|
23747
24735
|
});
|
|
23748
24736
|
});
|
|
24737
|
+
const labelMap = vue.computed(() => {
|
|
24738
|
+
return source.value.reduce((pre, cur) => {
|
|
24739
|
+
pre[cur.value] = cur.label || '';
|
|
24740
|
+
return pre;
|
|
24741
|
+
}, {});
|
|
24742
|
+
});
|
|
23749
24743
|
const icon = vue.computed(() => {
|
|
23750
24744
|
return isActive.value ? 'up' : 'down';
|
|
23751
24745
|
});
|
|
@@ -23762,17 +24756,34 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23762
24756
|
'is-disabled': props.disabled
|
|
23763
24757
|
};
|
|
23764
24758
|
});
|
|
23765
|
-
const
|
|
24759
|
+
const displayTags = vue.computed(() => {
|
|
23766
24760
|
if (!props.data.length) {
|
|
23767
24761
|
return [];
|
|
23768
24762
|
}
|
|
23769
|
-
|
|
24763
|
+
if (props.checkStrictly) {
|
|
24764
|
+
return currentValue.value.map(v => ({
|
|
24765
|
+
value: v,
|
|
24766
|
+
label: labelMap.value[v] || ''
|
|
24767
|
+
}));
|
|
24768
|
+
}
|
|
24769
|
+
return (currentValueGroups.value || []).map(path => {
|
|
24770
|
+
const value = path[path.length - 1];
|
|
24771
|
+
const label = path.map(v => labelMap.value[v] || '').filter(Boolean).join(' / ');
|
|
24772
|
+
return {
|
|
24773
|
+
path,
|
|
24774
|
+
value,
|
|
24775
|
+
label
|
|
24776
|
+
};
|
|
24777
|
+
});
|
|
23770
24778
|
});
|
|
23771
24779
|
const collapseTagCount = vue.computed(() => {
|
|
23772
24780
|
if (!props.maxTags) return 0;
|
|
23773
|
-
const v =
|
|
24781
|
+
const v = displayTags.value.length - props.maxTags;
|
|
23774
24782
|
return v < 0 ? 0 : v;
|
|
23775
24783
|
});
|
|
24784
|
+
const autoWidth = vue.computed(() => {
|
|
24785
|
+
return typeof props.autoWidth === 'boolean' ? props.autoWidth : !!props.cascader;
|
|
24786
|
+
});
|
|
23776
24787
|
|
|
23777
24788
|
/**
|
|
23778
24789
|
* v-model 同步, 外部的数据改变时不会触发
|
|
@@ -23785,8 +24796,9 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23785
24796
|
separator: props.separator,
|
|
23786
24797
|
nullValue: props.nullValue
|
|
23787
24798
|
});
|
|
23788
|
-
|
|
23789
|
-
emit('
|
|
24799
|
+
const labels = displayTags.value.map(item => item.label);
|
|
24800
|
+
emit('update:modelValue', v, labels);
|
|
24801
|
+
emit('change', v, labels);
|
|
23790
24802
|
|
|
23791
24803
|
// form表单
|
|
23792
24804
|
formItem?.change?.(currentValue.value);
|
|
@@ -23811,8 +24823,15 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23811
24823
|
const close = () => {
|
|
23812
24824
|
isActive.value = false;
|
|
23813
24825
|
};
|
|
23814
|
-
const handleClose =
|
|
23815
|
-
|
|
24826
|
+
const handleClose = item => {
|
|
24827
|
+
if (props.checkStrictly) {
|
|
24828
|
+
const index = currentValue.value.findIndex(v => v === item.value);
|
|
24829
|
+
if (index === -1) return;
|
|
24830
|
+
currentValue.value = currentValue.value.filter((_, i) => i !== index);
|
|
24831
|
+
} else if (item.path) {
|
|
24832
|
+
const remaining = (currentValueGroups.value || []).filter(p => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
|
|
24833
|
+
currentValue.value = [...new Set(remaining.flat())];
|
|
24834
|
+
}
|
|
23816
24835
|
sync();
|
|
23817
24836
|
};
|
|
23818
24837
|
const handleClear = e => {
|
|
@@ -23849,6 +24868,7 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23849
24868
|
multiple,
|
|
23850
24869
|
isActive,
|
|
23851
24870
|
current: currentValue,
|
|
24871
|
+
currentValueGroups,
|
|
23852
24872
|
// for portal
|
|
23853
24873
|
toggle(v) {
|
|
23854
24874
|
v = typeof v === 'boolean' ? v : !isActive.value;
|
|
@@ -23863,7 +24883,7 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23863
24883
|
"trigger": props.trigger,
|
|
23864
24884
|
"tag": props.tag,
|
|
23865
24885
|
"placement": props.placement,
|
|
23866
|
-
"
|
|
24886
|
+
"autoWidth": autoWidth.value,
|
|
23867
24887
|
"disabled": props.disabled,
|
|
23868
24888
|
"portalClass": [['is-padding-none', props.portalClass]],
|
|
23869
24889
|
"class": [classes.value, its.value.class, 'vc-tree-select'],
|
|
@@ -23880,22 +24900,22 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23880
24900
|
return vue.createVNode(Input, {
|
|
23881
24901
|
"id": props.id,
|
|
23882
24902
|
"disabled": props.disabled,
|
|
23883
|
-
"modelValue":
|
|
24903
|
+
"modelValue": displayTags.value[0]?.label || props.extra,
|
|
23884
24904
|
"allow-dispatch": false,
|
|
23885
24905
|
"class": "vc-tree-select__input",
|
|
23886
24906
|
"readonly": true,
|
|
23887
24907
|
"placeholder": its.value.attrs?.placeholder || '请选择'
|
|
23888
24908
|
}, {
|
|
23889
|
-
content: multiple.value &&
|
|
24909
|
+
content: multiple.value && displayTags.value.length > 0 ? () => {
|
|
23890
24910
|
return vue.createVNode("div", {
|
|
23891
24911
|
"class": [classes.value, 'vc-tree-select__tags']
|
|
23892
|
-
}, [
|
|
24912
|
+
}, [displayTags.value.slice(0, props.maxTags).map(item => {
|
|
23893
24913
|
return vue.createVNode(Tag, {
|
|
23894
|
-
"key": item,
|
|
24914
|
+
"key": item.path ? item.path.join('-') : item.value,
|
|
23895
24915
|
"closable": !props.disabled,
|
|
23896
|
-
"onClose": () => handleClose(
|
|
24916
|
+
"onClose": () => handleClose(item)
|
|
23897
24917
|
}, {
|
|
23898
|
-
default: () => [
|
|
24918
|
+
default: () => [item.label]
|
|
23899
24919
|
});
|
|
23900
24920
|
}), collapseTagCount.value ? vue.createVNode(Tag, null, {
|
|
23901
24921
|
default: () => [`+${collapseTagCount.value}...`]
|
|
@@ -23928,16 +24948,23 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23928
24948
|
}, [vue.createVNode(Spin, {
|
|
23929
24949
|
"size": 16
|
|
23930
24950
|
}, null)]), vue.createVNode(Scroller, {
|
|
23931
|
-
"class":
|
|
24951
|
+
"class": ['vc-tree-select__options', props.cascader && 'is-cascader'],
|
|
23932
24952
|
"max-height": "200px"
|
|
23933
24953
|
}, {
|
|
23934
|
-
default: () => [vue.createVNode(
|
|
23935
|
-
"
|
|
23936
|
-
"
|
|
24954
|
+
default: () => [props.cascader ? vue.createVNode(TreeSelectContentCascader, {
|
|
24955
|
+
"value": currentValue.value,
|
|
24956
|
+
"data": props.data,
|
|
24957
|
+
"checkStrictly": props.checkStrictly,
|
|
24958
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
24959
|
+
"numerable": props.numerable,
|
|
24960
|
+
"separator": props.separator,
|
|
24961
|
+
"max": props.max,
|
|
24962
|
+
"nullValue": props.nullValue,
|
|
24963
|
+
"onChange": handleChange
|
|
24964
|
+
}, null) : vue.createVNode(TreeSelectContent, {
|
|
24965
|
+
"value": currentValue.value,
|
|
23937
24966
|
"data": props.data,
|
|
23938
24967
|
"checkStrictly": props.checkStrictly,
|
|
23939
|
-
"allowDispatch": false,
|
|
23940
|
-
"showCheckbox": true,
|
|
23941
24968
|
"renderNodeLabel": props.renderNodeLabel,
|
|
23942
24969
|
"onChange": handleChange
|
|
23943
24970
|
}, null)]
|
|
@@ -24513,6 +25540,7 @@ exports.ButtonGroup = ButtonGroup;
|
|
|
24513
25540
|
exports.Calendar = Calendar;
|
|
24514
25541
|
exports.Card = Card;
|
|
24515
25542
|
exports.Carousel = Carousel;
|
|
25543
|
+
exports.CarouselItem = CarouselItem;
|
|
24516
25544
|
exports.Cascader = Cascader;
|
|
24517
25545
|
exports.Chart = Chart;
|
|
24518
25546
|
exports.Checkbox = Checkbox;
|
|
@@ -24558,6 +25586,7 @@ exports.MButtonGroup = MButtonGroup;
|
|
|
24558
25586
|
exports.MCalendar = MCalendar;
|
|
24559
25587
|
exports.MCard = MCard;
|
|
24560
25588
|
exports.MCarousel = MCarousel;
|
|
25589
|
+
exports.MCarouselItem = MCarouselItem;
|
|
24561
25590
|
exports.MCascader = MCascader;
|
|
24562
25591
|
exports.MChart = MChart;
|
|
24563
25592
|
exports.MCheckbox = MCheckbox;
|