@deot/vc-components 1.0.63 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1381 -339
- package/dist/index.d.ts +386 -101
- package/dist/index.iife.js +1443 -401
- package/dist/index.js +1383 -343
- package/dist/index.style.css +2 -2
- package/dist/index.umd.cjs +1443 -401
- package/package.json +1 -1
package/dist/index.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,736 @@ const Card = /* @__PURE__ */ vue.defineComponent({
|
|
|
1705
1705
|
|
|
1706
1706
|
const MCard = Card;
|
|
1707
1707
|
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1708
|
+
const DRAG_CLICK_SUPPRESS_PX = 5;
|
|
1709
|
+
const swallowNextClickFromDrag = () => {
|
|
1710
|
+
let invoked = false;
|
|
1711
|
+
const options = { capture: true, once: true };
|
|
1712
|
+
const swallow = (e) => {
|
|
1713
|
+
invoked = true;
|
|
1714
|
+
e.preventDefault();
|
|
1715
|
+
e.stopPropagation();
|
|
1716
|
+
e.stopImmediatePropagation();
|
|
1717
|
+
};
|
|
1718
|
+
document.addEventListener("click", swallow, options);
|
|
1719
|
+
setTimeout(() => !invoked && document.removeEventListener("click", swallow, options), 0);
|
|
1720
|
+
};
|
|
1721
|
+
const useCarousel = (wrapper, content, expose) => {
|
|
1722
|
+
const instance = vue.getCurrentInstance();
|
|
1723
|
+
const props = instance.props;
|
|
1724
|
+
const { emit } = instance;
|
|
1725
|
+
const items = vue.ref([]);
|
|
1726
|
+
const activeIndex = vue.ref(-1);
|
|
1727
|
+
const timer = vue.ref(null);
|
|
1728
|
+
const offset = vue.ref(0);
|
|
1729
|
+
const carouselId = vue.ref(Utils.getUid("carousel"));
|
|
1730
|
+
const start = vue.ref();
|
|
1731
|
+
const startX = vue.ref();
|
|
1732
|
+
const startY = vue.ref();
|
|
1733
|
+
const dragMovedPastThreshold = vue.ref(false);
|
|
1734
|
+
const allowTransition = vue.ref(false);
|
|
1735
|
+
const direction = vue.computed(() => {
|
|
1736
|
+
return props.vertical ? "vertical" : "horizontal";
|
|
1737
|
+
});
|
|
1738
|
+
const hasLabel = vue.computed(() => {
|
|
1739
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
1740
|
+
});
|
|
1741
|
+
const dotsClasses = vue.computed(() => {
|
|
1742
|
+
const classes = ["is-" + direction.value];
|
|
1743
|
+
if (hasLabel.value) {
|
|
1744
|
+
classes.push("is-labels");
|
|
1745
|
+
}
|
|
1746
|
+
if (props.dots === "outside" || props.card) {
|
|
1747
|
+
classes.push("is-outside");
|
|
1748
|
+
}
|
|
1749
|
+
return classes;
|
|
1750
|
+
});
|
|
1751
|
+
const resetItems = (oldIndex) => {
|
|
1752
|
+
items.value.forEach((item, index) => {
|
|
1753
|
+
item.exposed?.reset?.(index, activeIndex.value, oldIndex);
|
|
1754
|
+
});
|
|
1755
|
+
};
|
|
1756
|
+
const playSlides = () => {
|
|
1757
|
+
allowTransition.value = true;
|
|
1758
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
1759
|
+
activeIndex.value++;
|
|
1760
|
+
} else if (props.loop) {
|
|
1761
|
+
activeIndex.value = 0;
|
|
1762
|
+
}
|
|
1763
|
+
};
|
|
1764
|
+
const pauseTimer = () => {
|
|
1765
|
+
if (timer.value) {
|
|
1766
|
+
clearInterval(timer.value);
|
|
1767
|
+
timer.value = null;
|
|
1768
|
+
}
|
|
1769
|
+
};
|
|
1770
|
+
const startTimer = () => {
|
|
1771
|
+
if (props.t <= 0 || !props.autoplay || timer.value) return;
|
|
1772
|
+
timer.value = setInterval(playSlides, props.t);
|
|
1773
|
+
};
|
|
1774
|
+
const setActiveItem = (index) => {
|
|
1775
|
+
if (typeof index === "string") {
|
|
1776
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
1777
|
+
if (filteredItems.length > 0) {
|
|
1778
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
index = Number(index);
|
|
1782
|
+
if (isNaN(index) || index !== Math.floor(index)) {
|
|
1783
|
+
throw new VcError("carousel", "索引必须是整数");
|
|
1784
|
+
}
|
|
1785
|
+
const length = items.value.length;
|
|
1786
|
+
const oldIndex = activeIndex.value;
|
|
1787
|
+
if (index < 0) {
|
|
1788
|
+
activeIndex.value = props.loop ? length - 1 : 0;
|
|
1789
|
+
} else if (index >= length) {
|
|
1790
|
+
activeIndex.value = props.loop ? 0 : length - 1;
|
|
1791
|
+
} else {
|
|
1792
|
+
activeIndex.value = index;
|
|
1793
|
+
}
|
|
1794
|
+
if (oldIndex === activeIndex.value) {
|
|
1795
|
+
resetItems(oldIndex);
|
|
1796
|
+
}
|
|
1797
|
+
};
|
|
1798
|
+
const prev = () => {
|
|
1799
|
+
setActiveItem(activeIndex.value - 1);
|
|
1800
|
+
};
|
|
1801
|
+
const next = () => {
|
|
1802
|
+
setActiveItem(activeIndex.value + 1);
|
|
1803
|
+
};
|
|
1804
|
+
const handleDotClick = (index) => {
|
|
1805
|
+
activeIndex.value = index;
|
|
1806
|
+
};
|
|
1807
|
+
const handleStart = (e) => {
|
|
1808
|
+
allowTransition.value = true;
|
|
1809
|
+
if (!props.draggable) return;
|
|
1810
|
+
pauseTimer();
|
|
1811
|
+
start.value = true;
|
|
1812
|
+
dragMovedPastThreshold.value = false;
|
|
1813
|
+
startX.value = e.screenX;
|
|
1814
|
+
startY.value = e.screenY;
|
|
1815
|
+
};
|
|
1816
|
+
const handleMove = (e) => {
|
|
1817
|
+
if (!start.value || !props.draggable) return;
|
|
1818
|
+
offset.value = !props.vertical ? e.screenX - startX.value : e.screenY - startY.value;
|
|
1819
|
+
if (Math.abs(offset.value) > DRAG_CLICK_SUPPRESS_PX) {
|
|
1820
|
+
dragMovedPastThreshold.value = true;
|
|
1821
|
+
}
|
|
1822
|
+
resetItems();
|
|
1823
|
+
};
|
|
1824
|
+
const handleEnd = () => {
|
|
1825
|
+
if (!props.draggable) return;
|
|
1826
|
+
const shouldSwallowClick = dragMovedPastThreshold.value;
|
|
1827
|
+
start.value = false;
|
|
1828
|
+
startTimer();
|
|
1829
|
+
const $offset = Math.abs(offset.value);
|
|
1830
|
+
const $direction = offset.value > 0;
|
|
1831
|
+
offset.value = 0;
|
|
1832
|
+
if ($offset > 5) {
|
|
1833
|
+
$direction && prev();
|
|
1834
|
+
!$direction && next();
|
|
1835
|
+
} else {
|
|
1836
|
+
resetItems();
|
|
1837
|
+
}
|
|
1838
|
+
if (shouldSwallowClick) {
|
|
1839
|
+
swallowNextClickFromDrag();
|
|
1840
|
+
}
|
|
1841
|
+
dragMovedPastThreshold.value = false;
|
|
1842
|
+
};
|
|
1843
|
+
vue.watch(
|
|
1844
|
+
() => items.value,
|
|
1845
|
+
(v) => {
|
|
1846
|
+
if (v.length > 0) setActiveItem(props.initialIndex);
|
|
1847
|
+
}
|
|
1848
|
+
);
|
|
1849
|
+
vue.watch(
|
|
1850
|
+
() => activeIndex.value,
|
|
1851
|
+
(v, oldV) => {
|
|
1852
|
+
resetItems(oldV);
|
|
1853
|
+
emit("change", v, oldV);
|
|
1854
|
+
}
|
|
1855
|
+
);
|
|
1856
|
+
vue.watch(
|
|
1857
|
+
() => props.autoplay,
|
|
1858
|
+
(v) => {
|
|
1859
|
+
v ? startTimer() : pauseTimer();
|
|
1860
|
+
}
|
|
1861
|
+
);
|
|
1862
|
+
vue.watch(
|
|
1863
|
+
() => props.loop,
|
|
1864
|
+
() => {
|
|
1865
|
+
setActiveItem(activeIndex.value);
|
|
1866
|
+
}
|
|
1867
|
+
);
|
|
1868
|
+
vue.watch(
|
|
1869
|
+
() => props.t,
|
|
1870
|
+
() => {
|
|
1871
|
+
pauseTimer();
|
|
1872
|
+
startTimer();
|
|
1873
|
+
}
|
|
1874
|
+
);
|
|
1875
|
+
vue.onMounted(() => {
|
|
1876
|
+
vue.nextTick(() => {
|
|
1877
|
+
if (wrapper.value) helperResize.Resize.on(wrapper.value, resetItems);
|
|
1878
|
+
if (props.initialIndex < items.value.length && props.initialIndex >= 0) {
|
|
1879
|
+
activeIndex.value = props.initialIndex;
|
|
1880
|
+
}
|
|
1881
|
+
startTimer();
|
|
1882
|
+
});
|
|
1883
|
+
});
|
|
1884
|
+
vue.onBeforeUnmount(() => {
|
|
1885
|
+
if (wrapper.value) helperResize.Resize.off(wrapper.value, resetItems);
|
|
1886
|
+
pauseTimer();
|
|
1887
|
+
startTimer();
|
|
1888
|
+
});
|
|
1889
|
+
const add = (item) => {
|
|
1890
|
+
if (!item) return;
|
|
1891
|
+
vue.nextTick(() => {
|
|
1892
|
+
if (content.value) {
|
|
1893
|
+
const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
|
|
1894
|
+
items.value.splice(index, 0, item);
|
|
1895
|
+
return;
|
|
1896
|
+
}
|
|
1897
|
+
items.value.push(item);
|
|
1898
|
+
});
|
|
1899
|
+
};
|
|
1900
|
+
const remove = (item) => {
|
|
1901
|
+
if (!item) return;
|
|
1902
|
+
items.value.splice(items.value.indexOf(item), 1);
|
|
1903
|
+
};
|
|
1904
|
+
vue.provide("vc-carousel", {
|
|
1905
|
+
props,
|
|
1906
|
+
items,
|
|
1907
|
+
offset,
|
|
1908
|
+
allowTransition,
|
|
1909
|
+
setActiveItem,
|
|
1910
|
+
wrapper,
|
|
1911
|
+
content,
|
|
1912
|
+
add,
|
|
1913
|
+
remove
|
|
1914
|
+
});
|
|
1915
|
+
expose({
|
|
1916
|
+
setActiveItem,
|
|
1917
|
+
prev,
|
|
1918
|
+
next
|
|
1919
|
+
});
|
|
1920
|
+
return {
|
|
1921
|
+
carouselId,
|
|
1922
|
+
allowTransition,
|
|
1923
|
+
items,
|
|
1924
|
+
activeIndex,
|
|
1925
|
+
offset,
|
|
1926
|
+
direction,
|
|
1927
|
+
hasLabel,
|
|
1928
|
+
dotsClasses,
|
|
1929
|
+
start,
|
|
1930
|
+
startX,
|
|
1931
|
+
startY,
|
|
1932
|
+
handleStart,
|
|
1933
|
+
handleMove,
|
|
1934
|
+
handleEnd,
|
|
1935
|
+
handleDotClick,
|
|
1936
|
+
prev,
|
|
1937
|
+
next,
|
|
1938
|
+
setActiveItem,
|
|
1939
|
+
pauseTimer,
|
|
1940
|
+
startTimer
|
|
1941
|
+
};
|
|
1942
|
+
};
|
|
1943
|
+
|
|
1944
|
+
const props$1j = {
|
|
1945
|
+
t: {
|
|
1946
|
+
type: Number,
|
|
1947
|
+
default: 3e3
|
|
1948
|
+
},
|
|
1949
|
+
card: Boolean,
|
|
1950
|
+
gutter: {
|
|
1951
|
+
type: Number,
|
|
1952
|
+
default: 0
|
|
1953
|
+
},
|
|
1954
|
+
height: [String, Number],
|
|
1955
|
+
initialIndex: {
|
|
1956
|
+
type: Number,
|
|
1957
|
+
default: 0
|
|
1958
|
+
},
|
|
1959
|
+
trigger: {
|
|
1710
1960
|
type: String,
|
|
1711
|
-
default: "
|
|
1961
|
+
default: "hover"
|
|
1962
|
+
},
|
|
1963
|
+
autoplay: {
|
|
1964
|
+
type: Boolean,
|
|
1965
|
+
default: true
|
|
1966
|
+
},
|
|
1967
|
+
dots: {
|
|
1968
|
+
type: [String, Boolean],
|
|
1969
|
+
default: "bottom"
|
|
1970
|
+
// bottom/outside | false
|
|
1971
|
+
},
|
|
1972
|
+
arrow: {
|
|
1973
|
+
type: [String, Boolean],
|
|
1974
|
+
default: "hover"
|
|
1975
|
+
// hover/always | false
|
|
1976
|
+
},
|
|
1977
|
+
loop: {
|
|
1978
|
+
type: Boolean,
|
|
1979
|
+
default: true
|
|
1980
|
+
},
|
|
1981
|
+
vertical: {
|
|
1982
|
+
type: Boolean,
|
|
1983
|
+
default: false
|
|
1984
|
+
},
|
|
1985
|
+
draggable: {
|
|
1986
|
+
type: Boolean,
|
|
1987
|
+
default: true
|
|
1712
1988
|
}
|
|
1713
1989
|
};
|
|
1714
1990
|
|
|
1715
1991
|
/** @jsxImportSource vue */
|
|
1716
1992
|
|
|
1717
|
-
const COMPONENT_NAME$
|
|
1993
|
+
const COMPONENT_NAME$1$ = 'vc-carousel';
|
|
1718
1994
|
const Carousel = /* @__PURE__ */ vue.defineComponent({
|
|
1719
|
-
name: COMPONENT_NAME$
|
|
1995
|
+
name: COMPONENT_NAME$1$,
|
|
1996
|
+
props: props$1j,
|
|
1997
|
+
setup(props, {
|
|
1998
|
+
slots,
|
|
1999
|
+
expose
|
|
2000
|
+
}) {
|
|
2001
|
+
const isHover = vue.ref(false);
|
|
2002
|
+
const wrapper = vue.ref(null);
|
|
2003
|
+
const content = vue.ref(null);
|
|
2004
|
+
const arrowDisplay = vue.computed(() => {
|
|
2005
|
+
return props.arrow && !props.vertical;
|
|
2006
|
+
});
|
|
2007
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
2008
|
+
const itemInStage = (item, index, items) => {
|
|
2009
|
+
const length = items.length;
|
|
2010
|
+
const isInStage = item.exposed.isInStage.value;
|
|
2011
|
+
if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
|
|
2012
|
+
return 'left';
|
|
2013
|
+
} else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
|
|
2014
|
+
return 'right';
|
|
2015
|
+
}
|
|
2016
|
+
return false;
|
|
2017
|
+
};
|
|
2018
|
+
const handleButtonEnter = arrow => {
|
|
2019
|
+
if (props.vertical) return;
|
|
2020
|
+
carousel.items.value.forEach((item, index, items) => {
|
|
2021
|
+
if (arrow === itemInStage(item, index, items)) {
|
|
2022
|
+
item.exposed.isHover.value = true;
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2025
|
+
};
|
|
2026
|
+
const handleButtonLeave = () => {
|
|
2027
|
+
if (props.vertical) return;
|
|
2028
|
+
carousel.items.value.forEach(item => {
|
|
2029
|
+
item.exposed.isHover.value = false;
|
|
2030
|
+
});
|
|
2031
|
+
};
|
|
2032
|
+
const handleDotHover = index => {
|
|
2033
|
+
if (props.trigger === 'hover' && index !== carousel.activeIndex.value) {
|
|
2034
|
+
carousel.activeIndex.value = index;
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2037
|
+
const handleMouseEnter = () => {
|
|
2038
|
+
isHover.value = true;
|
|
2039
|
+
carousel.pauseTimer();
|
|
2040
|
+
};
|
|
2041
|
+
const handleMouseLeave = () => {
|
|
2042
|
+
isHover.value = false;
|
|
2043
|
+
carousel.startTimer();
|
|
2044
|
+
};
|
|
2045
|
+
const throttledArrowClick = lodashEs.throttle(carousel.setActiveItem);
|
|
2046
|
+
const throttledDotHover = lodashEs.throttle(handleDotHover);
|
|
2047
|
+
return () => {
|
|
2048
|
+
return vue.createVNode("div", {
|
|
2049
|
+
"ref": wrapper,
|
|
2050
|
+
"class": ['vc-carousel', `is-${carousel.direction.value}`],
|
|
2051
|
+
"onMousedown": vue.withModifiers(carousel.handleStart, ['stop', 'prevent']),
|
|
2052
|
+
"onMousemove": vue.withModifiers(carousel.handleMove, ['stop', 'prevent']),
|
|
2053
|
+
"onMouseup": vue.withModifiers(carousel.handleEnd, ['stop', 'prevent']),
|
|
2054
|
+
"onMouseenter": vue.withModifiers(handleMouseEnter, ['stop']),
|
|
2055
|
+
"onMouseleave": vue.withModifiers(handleMouseLeave, ['stop'])
|
|
2056
|
+
}, [vue.createVNode("div", {
|
|
2057
|
+
"ref": content,
|
|
2058
|
+
"class": "vc-carousel__wrapper",
|
|
2059
|
+
"style": {
|
|
2060
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
2061
|
+
}
|
|
2062
|
+
}, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
2063
|
+
"mode": "left-part"
|
|
2064
|
+
}, {
|
|
2065
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
2066
|
+
"type": "button",
|
|
2067
|
+
"class": "vc-carousel__arrow is-left-arrow",
|
|
2068
|
+
"onMouseenter": () => handleButtonEnter('left'),
|
|
2069
|
+
"onMouseleave": handleButtonLeave,
|
|
2070
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ['stop'])
|
|
2071
|
+
}, [vue.createVNode(Icon, {
|
|
2072
|
+
"type": "left"
|
|
2073
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value > 0)]])]
|
|
2074
|
+
}), arrowDisplay.value && vue.createVNode(TransitionSlide, {
|
|
2075
|
+
"mode": "right-part"
|
|
2076
|
+
}, {
|
|
2077
|
+
default: () => [vue.withDirectives(vue.createVNode("button", {
|
|
2078
|
+
"type": "button",
|
|
2079
|
+
"class": "vc-carousel__arrow is-right-arrow",
|
|
2080
|
+
"onMouseenter": () => handleButtonEnter('right'),
|
|
2081
|
+
"onMouseleave": handleButtonLeave,
|
|
2082
|
+
"onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ['stop'])
|
|
2083
|
+
}, [vue.createVNode(Icon, {
|
|
2084
|
+
"type": "right"
|
|
2085
|
+
}, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
|
|
2086
|
+
}), slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
2087
|
+
"class": ['vc-carousel__dots', ...carousel.dotsClasses.value]
|
|
2088
|
+
}, [carousel.items.value.map((item, index) => vue.createVNode("li", {
|
|
2089
|
+
"key": index,
|
|
2090
|
+
"class": ['vc-carousel__dot', `is-${carousel.direction.value}`, {
|
|
2091
|
+
'is-active': index === carousel.activeIndex.value
|
|
2092
|
+
}],
|
|
2093
|
+
"onMouseenter": () => throttledDotHover(index),
|
|
2094
|
+
"onClick": () => carousel.handleDotClick(index)
|
|
2095
|
+
}, [vue.createVNode("button", {
|
|
2096
|
+
"class": "vc-carousel__button"
|
|
2097
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
|
|
2098
|
+
};
|
|
2099
|
+
}
|
|
2100
|
+
});
|
|
2101
|
+
|
|
2102
|
+
const props$1i = {
|
|
2103
|
+
name: String,
|
|
2104
|
+
label: {
|
|
2105
|
+
type: [String, Number],
|
|
2106
|
+
default: ""
|
|
2107
|
+
},
|
|
2108
|
+
// card大小
|
|
2109
|
+
width: {
|
|
2110
|
+
type: [Number, String],
|
|
2111
|
+
default: "70%"
|
|
2112
|
+
},
|
|
2113
|
+
// card之间间距, 或者滑动时候的间距
|
|
2114
|
+
gutter: {
|
|
2115
|
+
type: Number,
|
|
2116
|
+
default: 0
|
|
2117
|
+
},
|
|
2118
|
+
scale: {
|
|
2119
|
+
type: Number,
|
|
2120
|
+
default: 0.83
|
|
2121
|
+
}
|
|
2122
|
+
};
|
|
2123
|
+
|
|
2124
|
+
const TRANSFORM = $.prefixStyle("transform").camel;
|
|
2125
|
+
const useCarouselItem = (expose) => {
|
|
2126
|
+
const instance = vue.getCurrentInstance();
|
|
2127
|
+
const carousel = vue.inject("vc-carousel", {});
|
|
2128
|
+
const props = instance.props;
|
|
2129
|
+
const translate = vue.ref(0);
|
|
2130
|
+
const currentScale = vue.ref(1);
|
|
2131
|
+
const isHover = vue.ref(false);
|
|
2132
|
+
const isActive = vue.ref(false);
|
|
2133
|
+
const isReady = vue.ref(false);
|
|
2134
|
+
const isInStage = vue.ref(false);
|
|
2135
|
+
const isAnimating = vue.ref(false);
|
|
2136
|
+
const isVertical = vue.computed(() => {
|
|
2137
|
+
return carousel.props.vertical;
|
|
2138
|
+
});
|
|
2139
|
+
const isCard = vue.computed(() => {
|
|
2140
|
+
return carousel.props.card;
|
|
2141
|
+
});
|
|
2142
|
+
const isMove = vue.computed(() => {
|
|
2143
|
+
return carousel.offset.value !== 0;
|
|
2144
|
+
});
|
|
2145
|
+
const itemGutter = vue.computed(() => {
|
|
2146
|
+
return props.gutter || carousel.props.gutter || 0;
|
|
2147
|
+
});
|
|
2148
|
+
const itemStyle = vue.computed(() => {
|
|
2149
|
+
const translateType = isVertical.value ? "translateY" : "translateX";
|
|
2150
|
+
if (carousel.props.card) {
|
|
2151
|
+
return {
|
|
2152
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
2153
|
+
width: props.width
|
|
2154
|
+
};
|
|
2155
|
+
} else {
|
|
2156
|
+
return {
|
|
2157
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
2158
|
+
width: itemGutter.value ? props.width : "100%"
|
|
2159
|
+
};
|
|
2160
|
+
}
|
|
2161
|
+
});
|
|
2162
|
+
vue.onBeforeMount(() => {
|
|
2163
|
+
carousel.add?.(instance);
|
|
2164
|
+
if (!isCard.value && itemGutter.value && carousel.props.loop) {
|
|
2165
|
+
throw new VcError("carousel", "slide模式下loop不能为true");
|
|
2166
|
+
}
|
|
2167
|
+
});
|
|
2168
|
+
vue.onBeforeUnmount(() => {
|
|
2169
|
+
carousel.remove?.(instance);
|
|
2170
|
+
});
|
|
2171
|
+
const processIndex = (index, activeIndex, length) => {
|
|
2172
|
+
if (activeIndex === 0 && index === length - 1) {
|
|
2173
|
+
return -1;
|
|
2174
|
+
} else if (activeIndex === length - 1 && index === 0) {
|
|
2175
|
+
return length;
|
|
2176
|
+
} else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
|
|
2177
|
+
return length + 1;
|
|
2178
|
+
} else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
|
|
2179
|
+
return -2;
|
|
2180
|
+
}
|
|
2181
|
+
return index;
|
|
2182
|
+
};
|
|
2183
|
+
const calcCardTranslate = (index, activeIndex) => {
|
|
2184
|
+
let value;
|
|
2185
|
+
const widthNumber = +props.width / 100;
|
|
2186
|
+
const parentW = carousel.wrapper.value.offsetWidth;
|
|
2187
|
+
if (isInStage.value) {
|
|
2188
|
+
if (index === activeIndex) {
|
|
2189
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
2190
|
+
} else if (index > activeIndex) {
|
|
2191
|
+
value = parentW * (1 + widthNumber * props.scale) / 2 + itemGutter.value;
|
|
2192
|
+
} else {
|
|
2193
|
+
value = -(parentW * ((widthNumber * props.scale - 1) / 2 + widthNumber)) - itemGutter.value;
|
|
2194
|
+
}
|
|
2195
|
+
} else if (index < activeIndex) {
|
|
2196
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
2197
|
+
} else {
|
|
2198
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
2199
|
+
}
|
|
2200
|
+
return value;
|
|
2201
|
+
};
|
|
2202
|
+
const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
|
|
2203
|
+
const { length } = carousel.items.value;
|
|
2204
|
+
const offset = wrapperWidth - (carousel.wrapper?.value?.offsetWidth || 0);
|
|
2205
|
+
const gutter = itemGutter.value;
|
|
2206
|
+
if (!gutter || isVertical.value) return 0;
|
|
2207
|
+
let slideOffset = 0;
|
|
2208
|
+
if (length === 1) {
|
|
2209
|
+
return offset / 2;
|
|
2210
|
+
}
|
|
2211
|
+
if (activeIndex == 0) {
|
|
2212
|
+
if (index - activeIndex === 0) {
|
|
2213
|
+
slideOffset = gutter;
|
|
2214
|
+
} else if (index - activeIndex === 1) {
|
|
2215
|
+
slideOffset = -offset + gutter * 2;
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
if (activeIndex !== 0 && activeIndex != length - 1) {
|
|
2219
|
+
if (index - activeIndex === 0) {
|
|
2220
|
+
slideOffset = offset / 2;
|
|
2221
|
+
} else if (index - activeIndex === 1) {
|
|
2222
|
+
slideOffset = -offset / 2 + gutter;
|
|
2223
|
+
} else if (index - activeIndex === -1) {
|
|
2224
|
+
slideOffset = offset * 3 / 2 - gutter;
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
if (activeIndex == length - 1) {
|
|
2228
|
+
if (index - activeIndex === 0) {
|
|
2229
|
+
slideOffset = offset - gutter;
|
|
2230
|
+
} else if (index - activeIndex === -1) {
|
|
2231
|
+
slideOffset = offset * 2 - gutter * 2;
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
return slideOffset;
|
|
2235
|
+
};
|
|
2236
|
+
const calcTranslate = (index, activeIndex) => {
|
|
2237
|
+
const distance = carousel.wrapper.value[isVertical.value ? "offsetHeight" : "offsetWidth"];
|
|
2238
|
+
const slideOffset = calcSlideOffset(index, activeIndex, distance);
|
|
2239
|
+
return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
|
|
2240
|
+
};
|
|
2241
|
+
const reset = (index, activeIndex, oldIndex) => {
|
|
2242
|
+
const { length } = carousel.items.value;
|
|
2243
|
+
if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
|
|
2244
|
+
isAnimating.value = index === activeIndex || index === oldIndex;
|
|
2245
|
+
if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
|
|
2246
|
+
isAnimating.value = true;
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
if (index !== activeIndex && length > 2 && carousel.props.loop) {
|
|
2250
|
+
index = processIndex(index, activeIndex, length);
|
|
2251
|
+
}
|
|
2252
|
+
if (isCard.value) {
|
|
2253
|
+
if (isVertical.value) {
|
|
2254
|
+
throw new VcError("carousel", "卡片模式不支持垂直方向");
|
|
2255
|
+
}
|
|
2256
|
+
isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
2257
|
+
isActive.value = index === activeIndex;
|
|
2258
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
2259
|
+
currentScale.value = isActive.value ? 1 : props.scale;
|
|
2260
|
+
} else {
|
|
2261
|
+
isActive.value = index === activeIndex;
|
|
2262
|
+
translate.value = calcTranslate(index, activeIndex);
|
|
2263
|
+
}
|
|
2264
|
+
isReady.value = true;
|
|
2265
|
+
};
|
|
2266
|
+
const handleItemClick = () => {
|
|
2267
|
+
if (parent && isCard.value) {
|
|
2268
|
+
const index = carousel.items.value.indexOf(instance);
|
|
2269
|
+
carousel.setActiveItem(index);
|
|
2270
|
+
}
|
|
2271
|
+
};
|
|
2272
|
+
expose({
|
|
2273
|
+
reset,
|
|
2274
|
+
isInStage,
|
|
2275
|
+
isHover,
|
|
2276
|
+
isActive
|
|
2277
|
+
});
|
|
2278
|
+
return {
|
|
2279
|
+
translate,
|
|
2280
|
+
currentScale,
|
|
2281
|
+
isHover,
|
|
2282
|
+
isActive,
|
|
2283
|
+
isReady,
|
|
2284
|
+
isInStage,
|
|
2285
|
+
isAnimating,
|
|
2286
|
+
isVertical,
|
|
2287
|
+
isCard,
|
|
2288
|
+
isMove,
|
|
2289
|
+
itemGutter,
|
|
2290
|
+
itemStyle,
|
|
2291
|
+
reset,
|
|
2292
|
+
handleItemClick
|
|
2293
|
+
};
|
|
2294
|
+
};
|
|
2295
|
+
|
|
2296
|
+
/** @jsxImportSource vue */
|
|
2297
|
+
|
|
2298
|
+
const COMPONENT_NAME$1_ = 'vc-carousel-item';
|
|
2299
|
+
const CarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
2300
|
+
name: COMPONENT_NAME$1_,
|
|
1720
2301
|
props: props$1i,
|
|
2302
|
+
setup(_, {
|
|
2303
|
+
slots,
|
|
2304
|
+
expose
|
|
2305
|
+
}) {
|
|
2306
|
+
const it = useCarouselItem(expose);
|
|
2307
|
+
return () => {
|
|
2308
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
2309
|
+
"class": ['vc-carousel-item', {
|
|
2310
|
+
'is-active': it.isActive.value,
|
|
2311
|
+
'is-card': it.isCard.value,
|
|
2312
|
+
'is-in-stage': it.isInStage.value,
|
|
2313
|
+
'is-hover': it.isHover.value,
|
|
2314
|
+
'is-animating': it.isAnimating.value && !it.isMove.value
|
|
2315
|
+
}],
|
|
2316
|
+
"style": it.itemStyle.value,
|
|
2317
|
+
"onClick": it.handleItemClick
|
|
2318
|
+
}, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
|
|
2319
|
+
"class": "vc-carousel-item__mask"
|
|
2320
|
+
}, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
2321
|
+
};
|
|
2322
|
+
}
|
|
2323
|
+
});
|
|
2324
|
+
|
|
2325
|
+
/** @jsxImportSource vue */
|
|
2326
|
+
|
|
2327
|
+
const COMPONENT_NAME$1Z = 'vcm-carousel';
|
|
2328
|
+
const MCarousel = /* @__PURE__ */ vue.defineComponent({
|
|
2329
|
+
name: COMPONENT_NAME$1Z,
|
|
2330
|
+
props: {
|
|
2331
|
+
...props$1j,
|
|
2332
|
+
dots: {
|
|
2333
|
+
type: [String, Boolean],
|
|
2334
|
+
default: false
|
|
2335
|
+
},
|
|
2336
|
+
indicator: {
|
|
2337
|
+
type: Boolean,
|
|
2338
|
+
default: true
|
|
2339
|
+
}
|
|
2340
|
+
},
|
|
1721
2341
|
setup(props, {
|
|
1722
|
-
slots
|
|
2342
|
+
slots,
|
|
2343
|
+
expose
|
|
1723
2344
|
}) {
|
|
2345
|
+
const wrapper = vue.ref(null);
|
|
2346
|
+
const content = vue.ref(null);
|
|
2347
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
2348
|
+
let scrollStatus = 0;
|
|
2349
|
+
const handleTouchStart = e => {
|
|
2350
|
+
carousel.handleStart(e.touches[0]);
|
|
2351
|
+
scrollStatus = 0;
|
|
2352
|
+
};
|
|
2353
|
+
const handleTouchMove = e => {
|
|
2354
|
+
const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
|
|
2355
|
+
const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
|
|
2356
|
+
if (!props.vertical && absX > absY && scrollStatus !== 1) {
|
|
2357
|
+
e.preventDefault();
|
|
2358
|
+
carousel.handleMove(e.touches[0]);
|
|
2359
|
+
scrollStatus = 2;
|
|
2360
|
+
return;
|
|
2361
|
+
}
|
|
2362
|
+
if (props.vertical && absY > absX) {
|
|
2363
|
+
e.preventDefault();
|
|
2364
|
+
carousel.handleMove(e.touches[0]);
|
|
2365
|
+
return;
|
|
2366
|
+
}
|
|
2367
|
+
if (scrollStatus === 0) {
|
|
2368
|
+
scrollStatus = 1;
|
|
2369
|
+
}
|
|
2370
|
+
};
|
|
2371
|
+
|
|
2372
|
+
// e.changedTouches[0]
|
|
2373
|
+
const handleTouchEnd = () => {
|
|
2374
|
+
carousel.handleEnd();
|
|
2375
|
+
scrollStatus = 0;
|
|
2376
|
+
};
|
|
1724
2377
|
return () => {
|
|
1725
2378
|
return vue.createVNode("div", {
|
|
1726
|
-
"
|
|
1727
|
-
|
|
2379
|
+
"ref": wrapper,
|
|
2380
|
+
"class": ['vcm-carousel', `is-${carousel.direction.value}`],
|
|
2381
|
+
"onTouchstart": vue.withModifiers(handleTouchStart, ['stop']),
|
|
2382
|
+
"onTouchmove": vue.withModifiers(handleTouchMove, ['stop']),
|
|
2383
|
+
"onTouchend": vue.withModifiers(handleTouchEnd, ['stop'])
|
|
2384
|
+
}, [vue.createVNode("div", {
|
|
2385
|
+
"ref": content,
|
|
2386
|
+
"style": {
|
|
2387
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
2388
|
+
},
|
|
2389
|
+
"class": "vcm-carousel__wrapper"
|
|
2390
|
+
}, [slots.default?.()]), props.dots && vue.createVNode("ul", {
|
|
2391
|
+
"class": ['vcm-carousel__dots', ...carousel.dotsClasses.value]
|
|
2392
|
+
}, [carousel.items.value.map((_, index) => vue.createVNode("li", {
|
|
2393
|
+
"key": index,
|
|
2394
|
+
"class": ['vcm-carousel__dot', 'is-' + carousel.direction.value, {
|
|
2395
|
+
'is-active': index === carousel.activeIndex.value
|
|
2396
|
+
}],
|
|
2397
|
+
"onClick": e => {
|
|
2398
|
+
e.stopPropagation();
|
|
2399
|
+
carousel.handleDotClick(index);
|
|
2400
|
+
}
|
|
2401
|
+
}, [vue.createVNode("button", {
|
|
2402
|
+
"class": "vcm-carousel__button"
|
|
2403
|
+
}, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props.card && props.indicator && vue.createVNode("div", {
|
|
2404
|
+
"class": "vcm-carousel__indicator"
|
|
2405
|
+
}, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
|
|
1728
2406
|
};
|
|
1729
2407
|
}
|
|
1730
2408
|
});
|
|
1731
2409
|
|
|
1732
|
-
|
|
2410
|
+
/** @jsxImportSource vue */
|
|
2411
|
+
|
|
2412
|
+
const COMPONENT_NAME$1Y = 'vcm-carousel-item';
|
|
2413
|
+
const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
|
|
2414
|
+
name: COMPONENT_NAME$1Y,
|
|
2415
|
+
props: props$1i,
|
|
2416
|
+
setup(_, {
|
|
2417
|
+
slots,
|
|
2418
|
+
expose
|
|
2419
|
+
}) {
|
|
2420
|
+
const it = useCarouselItem(expose);
|
|
2421
|
+
return () => {
|
|
2422
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
2423
|
+
"style": it.itemStyle.value,
|
|
2424
|
+
"class": {
|
|
2425
|
+
'vcm-carousel-item': true,
|
|
2426
|
+
'is-active': it.isActive.value,
|
|
2427
|
+
'is-card': it.isCard.value,
|
|
2428
|
+
'is-animating': it.isAnimating.value && !it.isMove.value,
|
|
2429
|
+
'is-in-stage': it.isInStage.value
|
|
2430
|
+
},
|
|
2431
|
+
"onClick": it.handleItemClick
|
|
2432
|
+
}, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
|
|
2433
|
+
"class": "vcm-carousel-item__mask"
|
|
2434
|
+
}, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
|
|
2435
|
+
};
|
|
2436
|
+
}
|
|
2437
|
+
});
|
|
1733
2438
|
|
|
1734
2439
|
const getSelectedData = (value = [], source = []) => {
|
|
1735
2440
|
const label = [];
|
|
@@ -2010,9 +2715,9 @@ const useNativeEmitter = (input, expose) => {
|
|
|
2010
2715
|
|
|
2011
2716
|
/** @jsxImportSource vue */
|
|
2012
2717
|
|
|
2013
|
-
const COMPONENT_NAME$
|
|
2718
|
+
const COMPONENT_NAME$1X = 'vc-input';
|
|
2014
2719
|
const Input = /* @__PURE__ */ vue.defineComponent({
|
|
2015
|
-
name: COMPONENT_NAME$
|
|
2720
|
+
name: COMPONENT_NAME$1X,
|
|
2016
2721
|
inheritAttrs: false,
|
|
2017
2722
|
props: {
|
|
2018
2723
|
...props$1h,
|
|
@@ -2347,9 +3052,9 @@ const useInputNumber = () => {
|
|
|
2347
3052
|
|
|
2348
3053
|
/** @jsxImportSource vue */
|
|
2349
3054
|
|
|
2350
|
-
const COMPONENT_NAME$
|
|
3055
|
+
const COMPONENT_NAME$1W = 'vc-input-number';
|
|
2351
3056
|
const InputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
2352
|
-
name: COMPONENT_NAME$
|
|
3057
|
+
name: COMPONENT_NAME$1W,
|
|
2353
3058
|
props: props$1g,
|
|
2354
3059
|
inheritAttrs: false,
|
|
2355
3060
|
setup(props, {
|
|
@@ -2413,9 +3118,9 @@ const props$1f = {
|
|
|
2413
3118
|
|
|
2414
3119
|
/** @jsxImportSource vue */
|
|
2415
3120
|
|
|
2416
|
-
const COMPONENT_NAME$
|
|
3121
|
+
const COMPONENT_NAME$1V = 'vc-input-search';
|
|
2417
3122
|
const InputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
2418
|
-
name: COMPONENT_NAME$
|
|
3123
|
+
name: COMPONENT_NAME$1V,
|
|
2419
3124
|
props: props$1f,
|
|
2420
3125
|
inheritAttrs: false,
|
|
2421
3126
|
setup(props, {
|
|
@@ -2808,9 +3513,9 @@ const props$1c = {
|
|
|
2808
3513
|
}
|
|
2809
3514
|
};
|
|
2810
3515
|
|
|
2811
|
-
const COMPONENT_NAME$
|
|
3516
|
+
const COMPONENT_NAME$1U = "vc-customer";
|
|
2812
3517
|
const Customer = vue.defineComponent({
|
|
2813
|
-
name: COMPONENT_NAME$
|
|
3518
|
+
name: COMPONENT_NAME$1U,
|
|
2814
3519
|
props: props$1c,
|
|
2815
3520
|
setup(props, context) {
|
|
2816
3521
|
return () => vue.h(() => {
|
|
@@ -2886,7 +3591,7 @@ class PortalLeaf {
|
|
|
2886
3591
|
}
|
|
2887
3592
|
}
|
|
2888
3593
|
|
|
2889
|
-
const COMPONENT_NAME$
|
|
3594
|
+
const COMPONENT_NAME$1T = "vc-portal";
|
|
2890
3595
|
class Portal {
|
|
2891
3596
|
/**
|
|
2892
3597
|
* 清理Portals类型组件
|
|
@@ -2936,7 +3641,7 @@ class Portal {
|
|
|
2936
3641
|
this.wrapper = wrapper;
|
|
2937
3642
|
this.globalOptions = {
|
|
2938
3643
|
...options,
|
|
2939
|
-
name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$
|
|
3644
|
+
name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1T)
|
|
2940
3645
|
};
|
|
2941
3646
|
}
|
|
2942
3647
|
popup(propsData, options) {
|
|
@@ -3034,7 +3739,7 @@ class Portal {
|
|
|
3034
3739
|
...rest
|
|
3035
3740
|
} = options;
|
|
3036
3741
|
let useAllNodes = fragment;
|
|
3037
|
-
const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$
|
|
3742
|
+
const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1T)}` : name$;
|
|
3038
3743
|
const container = document.createElement(tag);
|
|
3039
3744
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
3040
3745
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -3068,7 +3773,7 @@ class Portal {
|
|
|
3068
3773
|
} else {
|
|
3069
3774
|
const wrapper = this.wrapper;
|
|
3070
3775
|
const app = vue.createApp({
|
|
3071
|
-
name: COMPONENT_NAME$
|
|
3776
|
+
name: COMPONENT_NAME$1T,
|
|
3072
3777
|
parent,
|
|
3073
3778
|
setup() {
|
|
3074
3779
|
if (alive) {
|
|
@@ -3179,13 +3884,13 @@ const props$1b = {
|
|
|
3179
3884
|
}
|
|
3180
3885
|
};
|
|
3181
3886
|
|
|
3182
|
-
const COMPONENT_NAME$
|
|
3887
|
+
const COMPONENT_NAME$1S = 'vc-portal-view';
|
|
3183
3888
|
|
|
3184
3889
|
/**
|
|
3185
3890
|
* 写法不同,但与vue@2.x 保持一致
|
|
3186
3891
|
*/
|
|
3187
3892
|
const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
3188
|
-
name: COMPONENT_NAME$
|
|
3893
|
+
name: COMPONENT_NAME$1S,
|
|
3189
3894
|
props: props$1b,
|
|
3190
3895
|
setup(props, {
|
|
3191
3896
|
slots
|
|
@@ -3205,9 +3910,9 @@ const PortalView = /* @__PURE__ */ vue.defineComponent({
|
|
|
3205
3910
|
|
|
3206
3911
|
/** @jsxImportSource vue */
|
|
3207
3912
|
|
|
3208
|
-
const COMPONENT_NAME$
|
|
3913
|
+
const COMPONENT_NAME$1R = 'vc-popover-wrapper';
|
|
3209
3914
|
const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
|
|
3210
|
-
name: COMPONENT_NAME$
|
|
3915
|
+
name: COMPONENT_NAME$1R,
|
|
3211
3916
|
props: props$1e,
|
|
3212
3917
|
emits: ['portal-fulfilled', 'close'],
|
|
3213
3918
|
setup(props, {
|
|
@@ -3465,9 +4170,9 @@ const PopoverPortal = new Portal(PopoverWrapper, {
|
|
|
3465
4170
|
|
|
3466
4171
|
/** @jsxImportSource vue */
|
|
3467
4172
|
|
|
3468
|
-
const COMPONENT_NAME$
|
|
4173
|
+
const COMPONENT_NAME$1Q = 'vc-popover';
|
|
3469
4174
|
const Popover$1 = /* @__PURE__ */ vue.defineComponent({
|
|
3470
|
-
name: COMPONENT_NAME$
|
|
4175
|
+
name: COMPONENT_NAME$1Q,
|
|
3471
4176
|
props: props$1d,
|
|
3472
4177
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
3473
4178
|
setup(props, {
|
|
@@ -3611,9 +4316,9 @@ const Popover = Object.assign(Popover$1, {
|
|
|
3611
4316
|
|
|
3612
4317
|
/** @jsxImportSource vue */
|
|
3613
4318
|
|
|
3614
|
-
const COMPONENT_NAME$
|
|
4319
|
+
const COMPONENT_NAME$1P = 'vc-cascader-column';
|
|
3615
4320
|
const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
|
|
3616
|
-
name: COMPONENT_NAME$
|
|
4321
|
+
name: COMPONENT_NAME$1P,
|
|
3617
4322
|
emits: ['click', 'change'],
|
|
3618
4323
|
props: {
|
|
3619
4324
|
data: {
|
|
@@ -3821,9 +4526,9 @@ const props$19 = {
|
|
|
3821
4526
|
|
|
3822
4527
|
/** @jsxImportSource vue */
|
|
3823
4528
|
|
|
3824
|
-
const COMPONENT_NAME$
|
|
4529
|
+
const COMPONENT_NAME$1O = 'vc-cascader';
|
|
3825
4530
|
const Cascader = /* @__PURE__ */ vue.defineComponent({
|
|
3826
|
-
name: COMPONENT_NAME$
|
|
4531
|
+
name: COMPONENT_NAME$1O,
|
|
3827
4532
|
inheritAttrs: false,
|
|
3828
4533
|
props: props$19,
|
|
3829
4534
|
emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
|
|
@@ -4175,9 +4880,9 @@ const props$18 = {
|
|
|
4175
4880
|
|
|
4176
4881
|
/** @jsxImportSource vue */
|
|
4177
4882
|
|
|
4178
|
-
const COMPONENT_NAME$
|
|
4883
|
+
const COMPONENT_NAME$1N = 'vc-chart';
|
|
4179
4884
|
const Chart = /* @__PURE__ */ vue.defineComponent({
|
|
4180
|
-
name: COMPONENT_NAME$
|
|
4885
|
+
name: COMPONENT_NAME$1N,
|
|
4181
4886
|
props: props$18,
|
|
4182
4887
|
emits: [...EVENTS, 'ready'],
|
|
4183
4888
|
setup(props, {
|
|
@@ -4416,9 +5121,9 @@ const useCheckbox = () => {
|
|
|
4416
5121
|
|
|
4417
5122
|
/** @jsxImportSource vue */
|
|
4418
5123
|
|
|
4419
|
-
const COMPONENT_NAME$
|
|
5124
|
+
const COMPONENT_NAME$1M = 'vc-checkbox';
|
|
4420
5125
|
const Checkbox = /* @__PURE__ */ vue.defineComponent({
|
|
4421
|
-
name: COMPONENT_NAME$
|
|
5126
|
+
name: COMPONENT_NAME$1M,
|
|
4422
5127
|
props: props$17,
|
|
4423
5128
|
emits: ['update:modelValue', 'change'],
|
|
4424
5129
|
setup(props, {
|
|
@@ -4505,9 +5210,9 @@ const useCheckboxGroup = () => {
|
|
|
4505
5210
|
|
|
4506
5211
|
/** @jsxImportSource vue */
|
|
4507
5212
|
|
|
4508
|
-
const COMPONENT_NAME$
|
|
5213
|
+
const COMPONENT_NAME$1L = 'vc-checkbox-group';
|
|
4509
5214
|
const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
4510
|
-
name: COMPONENT_NAME$
|
|
5215
|
+
name: COMPONENT_NAME$1L,
|
|
4511
5216
|
props: props$16,
|
|
4512
5217
|
emits: ['update:modelValue', 'change'],
|
|
4513
5218
|
setup(props, {
|
|
@@ -4525,9 +5230,9 @@ const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
|
4525
5230
|
|
|
4526
5231
|
/** @jsxImportSource vue */
|
|
4527
5232
|
|
|
4528
|
-
const COMPONENT_NAME$
|
|
5233
|
+
const COMPONENT_NAME$1K = 'vcm-checkbox';
|
|
4529
5234
|
const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
4530
|
-
name: COMPONENT_NAME$
|
|
5235
|
+
name: COMPONENT_NAME$1K,
|
|
4531
5236
|
props: props$17,
|
|
4532
5237
|
emits: ['update:modelValue', 'change'],
|
|
4533
5238
|
setup(props, {
|
|
@@ -4567,9 +5272,9 @@ const MCheckbox = /* @__PURE__ */ vue.defineComponent({
|
|
|
4567
5272
|
|
|
4568
5273
|
/** @jsxImportSource vue */
|
|
4569
5274
|
|
|
4570
|
-
const COMPONENT_NAME$
|
|
5275
|
+
const COMPONENT_NAME$1J = 'vcm-checkbox-group';
|
|
4571
5276
|
const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
|
|
4572
|
-
name: COMPONENT_NAME$
|
|
5277
|
+
name: COMPONENT_NAME$1J,
|
|
4573
5278
|
props: props$16,
|
|
4574
5279
|
emits: ['update:modelValue', 'change'],
|
|
4575
5280
|
setup(props, {
|
|
@@ -4623,9 +5328,9 @@ const props$15 = {
|
|
|
4623
5328
|
|
|
4624
5329
|
/** @jsxImportSource vue */
|
|
4625
5330
|
|
|
4626
|
-
const COMPONENT_NAME$
|
|
5331
|
+
const COMPONENT_NAME$1I = 'vc-message';
|
|
4627
5332
|
const MessageView = /* @__PURE__ */ vue.defineComponent({
|
|
4628
|
-
name: COMPONENT_NAME$
|
|
5333
|
+
name: COMPONENT_NAME$1I,
|
|
4629
5334
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
4630
5335
|
props: props$15,
|
|
4631
5336
|
setup(props, {
|
|
@@ -4874,9 +5579,9 @@ const useClipboard = (done) => {
|
|
|
4874
5579
|
return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
4875
5580
|
};
|
|
4876
5581
|
|
|
4877
|
-
const COMPONENT_NAME$
|
|
5582
|
+
const COMPONENT_NAME$1H = "vc-clipboard";
|
|
4878
5583
|
const Clipboard$1 = vue.defineComponent({
|
|
4879
|
-
name: COMPONENT_NAME$
|
|
5584
|
+
name: COMPONENT_NAME$1H,
|
|
4880
5585
|
props: props$14,
|
|
4881
5586
|
setup() {
|
|
4882
5587
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -4916,9 +5621,9 @@ const MTransitionZoom = TransitionZoom;
|
|
|
4916
5621
|
|
|
4917
5622
|
/** @jsxImportSource vue */
|
|
4918
5623
|
|
|
4919
|
-
const COMPONENT_NAME$
|
|
5624
|
+
const COMPONENT_NAME$1G = 'vcm-toast';
|
|
4920
5625
|
const MToastView = /* @__PURE__ */ vue.defineComponent({
|
|
4921
|
-
name: COMPONENT_NAME$
|
|
5626
|
+
name: COMPONENT_NAME$1G,
|
|
4922
5627
|
emits: ['close', 'portal-fulfilled'],
|
|
4923
5628
|
props: props$13,
|
|
4924
5629
|
setup(props, {
|
|
@@ -5020,9 +5725,9 @@ const warning$2 = create$3({ mode: "warning" });
|
|
|
5020
5725
|
const error$2 = create$3({ mode: "error" });
|
|
5021
5726
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
|
|
5022
5727
|
|
|
5023
|
-
const COMPONENT_NAME$
|
|
5728
|
+
const COMPONENT_NAME$1F = "vcm-clipboard";
|
|
5024
5729
|
const MClipboard$1 = vue.defineComponent({
|
|
5025
|
-
name: COMPONENT_NAME$
|
|
5730
|
+
name: COMPONENT_NAME$1F,
|
|
5026
5731
|
props: props$14,
|
|
5027
5732
|
setup() {
|
|
5028
5733
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -5054,9 +5759,9 @@ const props$12 = {
|
|
|
5054
5759
|
}
|
|
5055
5760
|
};
|
|
5056
5761
|
|
|
5057
|
-
const COMPONENT_NAME$
|
|
5762
|
+
const COMPONENT_NAME$1E = "vc-collapse";
|
|
5058
5763
|
const Collapse = vue.defineComponent({
|
|
5059
|
-
name: COMPONENT_NAME$
|
|
5764
|
+
name: COMPONENT_NAME$1E,
|
|
5060
5765
|
props: props$12,
|
|
5061
5766
|
emits: ["update:moodelValue", "change"],
|
|
5062
5767
|
setup(props, { slots, emit }) {
|
|
@@ -5173,9 +5878,9 @@ const props$10 = {
|
|
|
5173
5878
|
function _isSlot$3(s) {
|
|
5174
5879
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
5175
5880
|
}
|
|
5176
|
-
const COMPONENT_NAME$
|
|
5881
|
+
const COMPONENT_NAME$1D = 'vc-expand';
|
|
5177
5882
|
const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
5178
|
-
name: COMPONENT_NAME$
|
|
5883
|
+
name: COMPONENT_NAME$1D,
|
|
5179
5884
|
props: props$10,
|
|
5180
5885
|
setup(props, {
|
|
5181
5886
|
slots
|
|
@@ -5205,9 +5910,9 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
5205
5910
|
|
|
5206
5911
|
/** @jsxImportSource vue */
|
|
5207
5912
|
|
|
5208
|
-
const COMPONENT_NAME$
|
|
5913
|
+
const COMPONENT_NAME$1C = 'vc-collapse-item';
|
|
5209
5914
|
const CollapseItem = /* @__PURE__ */ vue.defineComponent({
|
|
5210
|
-
name: COMPONENT_NAME$
|
|
5915
|
+
name: COMPONENT_NAME$1C,
|
|
5211
5916
|
props: props$11,
|
|
5212
5917
|
setup(props, {
|
|
5213
5918
|
slots,
|
|
@@ -5282,9 +5987,9 @@ const props$$ = {
|
|
|
5282
5987
|
|
|
5283
5988
|
/** @jsxImportSource vue */
|
|
5284
5989
|
|
|
5285
|
-
const COMPONENT_NAME$
|
|
5990
|
+
const COMPONENT_NAME$1B = 'vc-color-picker';
|
|
5286
5991
|
const ColorPicker = /* @__PURE__ */ vue.defineComponent({
|
|
5287
|
-
name: COMPONENT_NAME$
|
|
5992
|
+
name: COMPONENT_NAME$1B,
|
|
5288
5993
|
props: props$$,
|
|
5289
5994
|
setup(props, {
|
|
5290
5995
|
slots
|
|
@@ -5347,9 +6052,9 @@ const formatter = (format, arr) => {
|
|
|
5347
6052
|
function _isSlot$2(s) {
|
|
5348
6053
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
5349
6054
|
}
|
|
5350
|
-
const COMPONENT_NAME$
|
|
6055
|
+
const COMPONENT_NAME$1A = 'vc-countdown';
|
|
5351
6056
|
const Countdown = /* @__PURE__ */ vue.defineComponent({
|
|
5352
|
-
name: COMPONENT_NAME$
|
|
6057
|
+
name: COMPONENT_NAME$1A,
|
|
5353
6058
|
props: props$_,
|
|
5354
6059
|
emits: ['change', 'complete', 'error'],
|
|
5355
6060
|
setup(props, {
|
|
@@ -5622,9 +6327,9 @@ const value2separated = (value, options) => {
|
|
|
5622
6327
|
function _isSlot$1(s) {
|
|
5623
6328
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
5624
6329
|
}
|
|
5625
|
-
const COMPONENT_NAME$
|
|
6330
|
+
const COMPONENT_NAME$1z = 'vc-counter';
|
|
5626
6331
|
const Counter = /* @__PURE__ */ vue.defineComponent({
|
|
5627
|
-
name: COMPONENT_NAME$
|
|
6332
|
+
name: COMPONENT_NAME$1z,
|
|
5628
6333
|
props: props$Z,
|
|
5629
6334
|
emits: ['begin', 'complete', 'change'],
|
|
5630
6335
|
setup(props, {
|
|
@@ -6887,9 +7592,9 @@ const getTimeType = type => {
|
|
|
6887
7592
|
}
|
|
6888
7593
|
return view;
|
|
6889
7594
|
};
|
|
6890
|
-
const COMPONENT_NAME$
|
|
7595
|
+
const COMPONENT_NAME$1y = 'vc-date-confirm';
|
|
6891
7596
|
const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
6892
|
-
name: COMPONENT_NAME$
|
|
7597
|
+
name: COMPONENT_NAME$1y,
|
|
6893
7598
|
props: {
|
|
6894
7599
|
showTime: {
|
|
6895
7600
|
type: Boolean,
|
|
@@ -6953,9 +7658,9 @@ const Confirm = /* @__PURE__ */ vue.defineComponent({
|
|
|
6953
7658
|
|
|
6954
7659
|
/** @jsxImportSource vue */
|
|
6955
7660
|
|
|
6956
|
-
const COMPONENT_NAME$
|
|
7661
|
+
const COMPONENT_NAME$1x = 'vc-date-header';
|
|
6957
7662
|
const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
6958
|
-
name: COMPONENT_NAME$
|
|
7663
|
+
name: COMPONENT_NAME$1x,
|
|
6959
7664
|
props: {
|
|
6960
7665
|
panelDate: Date,
|
|
6961
7666
|
showNext: {
|
|
@@ -7039,9 +7744,9 @@ const DateHeader = /* @__PURE__ */ vue.defineComponent({
|
|
|
7039
7744
|
|
|
7040
7745
|
/** @jsxImportSource vue */
|
|
7041
7746
|
|
|
7042
|
-
const COMPONENT_NAME$
|
|
7747
|
+
const COMPONENT_NAME$1w = 'vc-date-table';
|
|
7043
7748
|
const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
7044
|
-
name: COMPONENT_NAME$
|
|
7749
|
+
name: COMPONENT_NAME$1w,
|
|
7045
7750
|
props: {
|
|
7046
7751
|
value: Array,
|
|
7047
7752
|
firstDayOfWeek: {
|
|
@@ -7250,9 +7955,9 @@ const DateTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
7250
7955
|
|
|
7251
7956
|
/** @jsxImportSource vue */
|
|
7252
7957
|
|
|
7253
|
-
const COMPONENT_NAME$
|
|
7958
|
+
const COMPONENT_NAME$1v = 'vc-month-table';
|
|
7254
7959
|
const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
7255
|
-
name: COMPONENT_NAME$
|
|
7960
|
+
name: COMPONENT_NAME$1v,
|
|
7256
7961
|
props: {
|
|
7257
7962
|
value: Array,
|
|
7258
7963
|
panelDate: Date,
|
|
@@ -7384,7 +8089,7 @@ const MonthTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
7384
8089
|
|
|
7385
8090
|
/** @jsxImportSource vue */
|
|
7386
8091
|
|
|
7387
|
-
const COMPONENT_NAME$
|
|
8092
|
+
const COMPONENT_NAME$1u = 'vc-quarter-table';
|
|
7388
8093
|
|
|
7389
8094
|
/**
|
|
7390
8095
|
* 获取季度对应的月份范围
|
|
@@ -7418,7 +8123,7 @@ const getQuarterRangeByMonth = value => {
|
|
|
7418
8123
|
}
|
|
7419
8124
|
};
|
|
7420
8125
|
const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
7421
|
-
name: COMPONENT_NAME$
|
|
8126
|
+
name: COMPONENT_NAME$1u,
|
|
7422
8127
|
props: {
|
|
7423
8128
|
value: Array,
|
|
7424
8129
|
panelDate: Date,
|
|
@@ -7541,9 +8246,9 @@ const QuarterTable = /* @__PURE__ */ vue.defineComponent({
|
|
|
7541
8246
|
|
|
7542
8247
|
/** @jsxImportSource vue */
|
|
7543
8248
|
|
|
7544
|
-
const COMPONENT_NAME$
|
|
8249
|
+
const COMPONENT_NAME$1t = 'vc-shortcuts-select';
|
|
7545
8250
|
const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
7546
|
-
name: COMPONENT_NAME$
|
|
8251
|
+
name: COMPONENT_NAME$1t,
|
|
7547
8252
|
props: {
|
|
7548
8253
|
panelDate: Date,
|
|
7549
8254
|
config: Array,
|
|
@@ -7583,9 +8288,9 @@ const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
7583
8288
|
|
|
7584
8289
|
/** @jsxImportSource vue */
|
|
7585
8290
|
|
|
7586
|
-
const COMPONENT_NAME$
|
|
8291
|
+
const COMPONENT_NAME$1s = 'vc-time-select';
|
|
7587
8292
|
const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
7588
|
-
name: COMPONENT_NAME$
|
|
8293
|
+
name: COMPONENT_NAME$1s,
|
|
7589
8294
|
props: {
|
|
7590
8295
|
hours: {
|
|
7591
8296
|
type: [Number, String],
|
|
@@ -7865,9 +8570,9 @@ const TimeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
7865
8570
|
|
|
7866
8571
|
/** @jsxImportSource vue */
|
|
7867
8572
|
|
|
7868
|
-
const COMPONENT_NAME$
|
|
8573
|
+
const COMPONENT_NAME$1r = 'vc-year-table';
|
|
7869
8574
|
const YearTable = /* @__PURE__ */ vue.defineComponent({
|
|
7870
|
-
name: COMPONENT_NAME$
|
|
8575
|
+
name: COMPONENT_NAME$1r,
|
|
7871
8576
|
props: {
|
|
7872
8577
|
value: Array,
|
|
7873
8578
|
panelDate: Date,
|
|
@@ -7990,9 +8695,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
|
|
|
7990
8695
|
}
|
|
7991
8696
|
return true;
|
|
7992
8697
|
};
|
|
7993
|
-
const COMPONENT_NAME$
|
|
8698
|
+
const COMPONENT_NAME$1q = 'vc-date-range-panel';
|
|
7994
8699
|
const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
7995
|
-
name: COMPONENT_NAME$
|
|
8700
|
+
name: COMPONENT_NAME$1q,
|
|
7996
8701
|
props: {
|
|
7997
8702
|
...props$W,
|
|
7998
8703
|
confirm: {
|
|
@@ -8371,9 +9076,9 @@ const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
8371
9076
|
|
|
8372
9077
|
/** @jsxImportSource vue */
|
|
8373
9078
|
|
|
8374
|
-
const COMPONENT_NAME$
|
|
9079
|
+
const COMPONENT_NAME$1p = 'vc-date-panel';
|
|
8375
9080
|
const DatePanel = /* @__PURE__ */ vue.defineComponent({
|
|
8376
|
-
name: COMPONENT_NAME$
|
|
9081
|
+
name: COMPONENT_NAME$1p,
|
|
8377
9082
|
props: {
|
|
8378
9083
|
...props$W,
|
|
8379
9084
|
type: String,
|
|
@@ -8581,9 +9286,9 @@ const isEqualYear$1 = value => {
|
|
|
8581
9286
|
const endYear = value[1].getFullYear();
|
|
8582
9287
|
return startYear === endYear;
|
|
8583
9288
|
};
|
|
8584
|
-
const COMPONENT_NAME$
|
|
9289
|
+
const COMPONENT_NAME$1o = 'vc-monthrange-panel';
|
|
8585
9290
|
const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
8586
|
-
name: COMPONENT_NAME$
|
|
9291
|
+
name: COMPONENT_NAME$1o,
|
|
8587
9292
|
props: {
|
|
8588
9293
|
...props$W,
|
|
8589
9294
|
confirm: {
|
|
@@ -8758,9 +9463,9 @@ const isEqualYear = value => {
|
|
|
8758
9463
|
const endYear = value[1].getFullYear();
|
|
8759
9464
|
return startYear === endYear;
|
|
8760
9465
|
};
|
|
8761
|
-
const COMPONENT_NAME$
|
|
9466
|
+
const COMPONENT_NAME$1n = 'vc-quarterrange-panel';
|
|
8762
9467
|
const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
8763
|
-
name: COMPONENT_NAME$
|
|
9468
|
+
name: COMPONENT_NAME$1n,
|
|
8764
9469
|
props: {
|
|
8765
9470
|
...props$W,
|
|
8766
9471
|
confirm: {
|
|
@@ -8999,9 +9704,9 @@ const getComparedDate = (leftDate, rightDate) => {
|
|
|
8999
9704
|
seconds
|
|
9000
9705
|
};
|
|
9001
9706
|
};
|
|
9002
|
-
const COMPONENT_NAME$
|
|
9707
|
+
const COMPONENT_NAME$1m = 'vc-timerange-panel';
|
|
9003
9708
|
const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
9004
|
-
name: COMPONENT_NAME$
|
|
9709
|
+
name: COMPONENT_NAME$1m,
|
|
9005
9710
|
props: props$V,
|
|
9006
9711
|
emits: ['pick', 'clear', 'ok'],
|
|
9007
9712
|
setup(props, {
|
|
@@ -9102,9 +9807,9 @@ const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
9102
9807
|
|
|
9103
9808
|
/** @jsxImportSource vue */
|
|
9104
9809
|
|
|
9105
|
-
const COMPONENT_NAME$
|
|
9810
|
+
const COMPONENT_NAME$1l = 'vc-time-panel';
|
|
9106
9811
|
const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
9107
|
-
name: COMPONENT_NAME$
|
|
9812
|
+
name: COMPONENT_NAME$1l,
|
|
9108
9813
|
props: props$V,
|
|
9109
9814
|
emits: ['pick', 'clear', 'ok'],
|
|
9110
9815
|
setup(props, {
|
|
@@ -9160,7 +9865,7 @@ const TimePanel = /* @__PURE__ */ vue.defineComponent({
|
|
|
9160
9865
|
|
|
9161
9866
|
/** @jsxImportSource vue */
|
|
9162
9867
|
|
|
9163
|
-
const COMPONENT_NAME$
|
|
9868
|
+
const COMPONENT_NAME$1k = 'vc-date-picker';
|
|
9164
9869
|
const getPanel$1 = type => {
|
|
9165
9870
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
9166
9871
|
return DateRangePanel;
|
|
@@ -9171,7 +9876,7 @@ const getPanel$1 = type => {
|
|
|
9171
9876
|
}
|
|
9172
9877
|
return DatePanel;
|
|
9173
9878
|
};
|
|
9174
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
9879
|
+
const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
|
|
9175
9880
|
const props = vue.getCurrentInstance().props;
|
|
9176
9881
|
const icon = vue.ref('date');
|
|
9177
9882
|
const panel = vue.shallowRef({});
|
|
@@ -9212,9 +9917,9 @@ const props$U = {
|
|
|
9212
9917
|
|
|
9213
9918
|
/** @jsxImportSource vue */
|
|
9214
9919
|
|
|
9215
|
-
const COMPONENT_NAME$
|
|
9920
|
+
const COMPONENT_NAME$1j = 'vc-divider';
|
|
9216
9921
|
const Divider = /* @__PURE__ */ vue.defineComponent({
|
|
9217
|
-
name: COMPONENT_NAME$
|
|
9922
|
+
name: COMPONENT_NAME$1j,
|
|
9218
9923
|
props: props$U,
|
|
9219
9924
|
setup(props, {
|
|
9220
9925
|
slots
|
|
@@ -9350,7 +10055,7 @@ const props$R = {
|
|
|
9350
10055
|
|
|
9351
10056
|
/** @jsxImportSource vue */
|
|
9352
10057
|
|
|
9353
|
-
const COMPONENT_NAME$
|
|
10058
|
+
const COMPONENT_NAME$1i = 'vc-scroller-track';
|
|
9354
10059
|
const BAR_MAP = {
|
|
9355
10060
|
vertical: {
|
|
9356
10061
|
scroll: 'scrollTop',
|
|
@@ -9370,7 +10075,7 @@ const BAR_MAP = {
|
|
|
9370
10075
|
}
|
|
9371
10076
|
};
|
|
9372
10077
|
const Track = /* @__PURE__ */ vue.defineComponent({
|
|
9373
|
-
name: COMPONENT_NAME$
|
|
10078
|
+
name: COMPONENT_NAME$1i,
|
|
9374
10079
|
props: props$T,
|
|
9375
10080
|
emits: ['change'],
|
|
9376
10081
|
inheritAttrs: false,
|
|
@@ -9560,9 +10265,9 @@ const Track = /* @__PURE__ */ vue.defineComponent({
|
|
|
9560
10265
|
|
|
9561
10266
|
/** @jsxImportSource vue */
|
|
9562
10267
|
|
|
9563
|
-
const COMPONENT_NAME$
|
|
10268
|
+
const COMPONENT_NAME$1h = 'vc-scroller-bar';
|
|
9564
10269
|
const Bar = /* @__PURE__ */ vue.defineComponent({
|
|
9565
|
-
name: COMPONENT_NAME$
|
|
10270
|
+
name: COMPONENT_NAME$1h,
|
|
9566
10271
|
props: props$S,
|
|
9567
10272
|
emits: ['change'],
|
|
9568
10273
|
setup(props, {
|
|
@@ -9797,7 +10502,7 @@ const useScroller = (expose) => {
|
|
|
9797
10502
|
|
|
9798
10503
|
/** @jsxImportSource vue */
|
|
9799
10504
|
|
|
9800
|
-
const COMPONENT_NAME$
|
|
10505
|
+
const COMPONENT_NAME$1g = 'vc-scroller';
|
|
9801
10506
|
|
|
9802
10507
|
/**
|
|
9803
10508
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -9808,7 +10513,7 @@ const COMPONENT_NAME$1e = 'vc-scroller';
|
|
|
9808
10513
|
* 2. 增加了一层嵌套
|
|
9809
10514
|
*/
|
|
9810
10515
|
const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
9811
|
-
name: COMPONENT_NAME$
|
|
10516
|
+
name: COMPONENT_NAME$1g,
|
|
9812
10517
|
props: props$R,
|
|
9813
10518
|
emits: ['scroll'],
|
|
9814
10519
|
setup(props, {
|
|
@@ -9869,7 +10574,7 @@ const Scroller = /* @__PURE__ */ vue.defineComponent({
|
|
|
9869
10574
|
|
|
9870
10575
|
/** @jsxImportSource vue */
|
|
9871
10576
|
|
|
9872
|
-
const COMPONENT_NAME$
|
|
10577
|
+
const COMPONENT_NAME$1f = 'vc-scroller-wheel';
|
|
9873
10578
|
|
|
9874
10579
|
/**
|
|
9875
10580
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -9891,7 +10596,7 @@ const COMPONENT_NAME$1d = 'vc-scroller-wheel';
|
|
|
9891
10596
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
9892
10597
|
*/
|
|
9893
10598
|
const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
|
|
9894
|
-
name: COMPONENT_NAME$
|
|
10599
|
+
name: COMPONENT_NAME$1f,
|
|
9895
10600
|
props: Object.assign({}, props$R, {
|
|
9896
10601
|
stopPropagation: {
|
|
9897
10602
|
type: Boolean,
|
|
@@ -10080,9 +10785,9 @@ const props$Q = {
|
|
|
10080
10785
|
|
|
10081
10786
|
/** @jsxImportSource vue */
|
|
10082
10787
|
|
|
10083
|
-
const COMPONENT_NAME$
|
|
10788
|
+
const COMPONENT_NAME$1e = 'vc-drawer';
|
|
10084
10789
|
const DrawerView = /* @__PURE__ */ vue.defineComponent({
|
|
10085
|
-
name: COMPONENT_NAME$
|
|
10790
|
+
name: COMPONENT_NAME$1e,
|
|
10086
10791
|
props: props$Q,
|
|
10087
10792
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
10088
10793
|
setup(props, {
|
|
@@ -10271,9 +10976,9 @@ const props$P = {
|
|
|
10271
10976
|
|
|
10272
10977
|
/** @jsxImportSource vue */
|
|
10273
10978
|
|
|
10274
|
-
const COMPONENT_NAME$
|
|
10979
|
+
const COMPONENT_NAME$1d = 'vc-dropdown';
|
|
10275
10980
|
const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
10276
|
-
name: COMPONENT_NAME$
|
|
10981
|
+
name: COMPONENT_NAME$1d,
|
|
10277
10982
|
props: props$P,
|
|
10278
10983
|
inheritAttrs: false,
|
|
10279
10984
|
emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
|
|
@@ -10343,9 +11048,9 @@ const Dropdown = /* @__PURE__ */ vue.defineComponent({
|
|
|
10343
11048
|
|
|
10344
11049
|
/** @jsxImportSource vue */
|
|
10345
11050
|
|
|
10346
|
-
const COMPONENT_NAME$
|
|
11051
|
+
const COMPONENT_NAME$1c = 'vc-dropdown-menu';
|
|
10347
11052
|
const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
10348
|
-
name: COMPONENT_NAME$
|
|
11053
|
+
name: COMPONENT_NAME$1c,
|
|
10349
11054
|
setup(_, {
|
|
10350
11055
|
slots
|
|
10351
11056
|
}) {
|
|
@@ -10359,9 +11064,9 @@ const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
|
|
|
10359
11064
|
|
|
10360
11065
|
/** @jsxImportSource vue */
|
|
10361
11066
|
|
|
10362
|
-
const COMPONENT_NAME$
|
|
11067
|
+
const COMPONENT_NAME$1b = 'vc-dropdown-item';
|
|
10363
11068
|
const DropdownItem = /* @__PURE__ */ vue.defineComponent({
|
|
10364
|
-
name: COMPONENT_NAME$
|
|
11069
|
+
name: COMPONENT_NAME$1b,
|
|
10365
11070
|
emits: ['click'],
|
|
10366
11071
|
props: {
|
|
10367
11072
|
value: {
|
|
@@ -10566,9 +11271,9 @@ const defaults = {
|
|
|
10566
11271
|
|
|
10567
11272
|
/** @jsxImportSource vue */
|
|
10568
11273
|
|
|
10569
|
-
const COMPONENT_NAME$
|
|
11274
|
+
const COMPONENT_NAME$1a = 'vc-editor-toolbar';
|
|
10570
11275
|
const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
10571
|
-
name: COMPONENT_NAME$
|
|
11276
|
+
name: COMPONENT_NAME$1a,
|
|
10572
11277
|
props: {
|
|
10573
11278
|
options: [Array, Object],
|
|
10574
11279
|
elementId: String
|
|
@@ -10776,9 +11481,9 @@ const props$O = {
|
|
|
10776
11481
|
|
|
10777
11482
|
/** @jsxImportSource vue */
|
|
10778
11483
|
|
|
10779
|
-
const COMPONENT_NAME$
|
|
11484
|
+
const COMPONENT_NAME$19 = 'vc-image-preview';
|
|
10780
11485
|
const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
|
|
10781
|
-
name: COMPONENT_NAME$
|
|
11486
|
+
name: COMPONENT_NAME$19,
|
|
10782
11487
|
props: props$O,
|
|
10783
11488
|
setup(props, {
|
|
10784
11489
|
slots
|
|
@@ -10973,9 +11678,9 @@ const props$N = {
|
|
|
10973
11678
|
}
|
|
10974
11679
|
};
|
|
10975
11680
|
|
|
10976
|
-
const COMPONENT_NAME$
|
|
11681
|
+
const COMPONENT_NAME$18 = "vc-upload";
|
|
10977
11682
|
const Upload$1 = vue.defineComponent({
|
|
10978
|
-
name: COMPONENT_NAME$
|
|
11683
|
+
name: COMPONENT_NAME$18,
|
|
10979
11684
|
props: props$N,
|
|
10980
11685
|
emits: [
|
|
10981
11686
|
"message",
|
|
@@ -11509,9 +12214,9 @@ const props$M = {
|
|
|
11509
12214
|
|
|
11510
12215
|
/** @jsxImportSource vue */
|
|
11511
12216
|
|
|
11512
|
-
const COMPONENT_NAME$
|
|
12217
|
+
const COMPONENT_NAME$17 = 'vc-editor';
|
|
11513
12218
|
const Editor = /* @__PURE__ */ vue.defineComponent({
|
|
11514
|
-
name: COMPONENT_NAME$
|
|
12219
|
+
name: COMPONENT_NAME$17,
|
|
11515
12220
|
props: props$M,
|
|
11516
12221
|
defaults,
|
|
11517
12222
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
@@ -11700,7 +12405,7 @@ const Editor = /* @__PURE__ */ vue.defineComponent({
|
|
|
11700
12405
|
|
|
11701
12406
|
/** @jsxImportSource vue */
|
|
11702
12407
|
|
|
11703
|
-
const COMPONENT_NAME$
|
|
12408
|
+
const COMPONENT_NAME$16 = 'vc-editor-view';
|
|
11704
12409
|
const setImages = v => {
|
|
11705
12410
|
if (!v) return;
|
|
11706
12411
|
const IMG_REGX = /<img.*?(?:>|\/>)/gi;
|
|
@@ -11718,7 +12423,7 @@ const setImages = v => {
|
|
|
11718
12423
|
return;
|
|
11719
12424
|
};
|
|
11720
12425
|
const EditorView = /* @__PURE__ */ vue.defineComponent({
|
|
11721
|
-
name: COMPONENT_NAME$
|
|
12426
|
+
name: COMPONENT_NAME$16,
|
|
11722
12427
|
props: {
|
|
11723
12428
|
value: {
|
|
11724
12429
|
type: String,
|
|
@@ -11933,9 +12638,9 @@ const useForm = (expose, options = {}) => {
|
|
|
11933
12638
|
});
|
|
11934
12639
|
};
|
|
11935
12640
|
|
|
11936
|
-
const COMPONENT_NAME$
|
|
12641
|
+
const COMPONENT_NAME$15 = "vc-form";
|
|
11937
12642
|
const Form = vue.defineComponent({
|
|
11938
|
-
name: COMPONENT_NAME$
|
|
12643
|
+
name: COMPONENT_NAME$15,
|
|
11939
12644
|
props: props$L,
|
|
11940
12645
|
setup(props, { slots, expose }) {
|
|
11941
12646
|
useForm(expose);
|
|
@@ -12283,9 +12988,9 @@ const useFormItem = (expose) => {
|
|
|
12283
12988
|
|
|
12284
12989
|
/** @jsxImportSource vue */
|
|
12285
12990
|
|
|
12286
|
-
const COMPONENT_NAME$
|
|
12991
|
+
const COMPONENT_NAME$14 = 'vc-form-item';
|
|
12287
12992
|
const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
12288
|
-
name: COMPONENT_NAME$
|
|
12993
|
+
name: COMPONENT_NAME$14,
|
|
12289
12994
|
props: props$K,
|
|
12290
12995
|
setup(props, {
|
|
12291
12996
|
slots,
|
|
@@ -12353,9 +13058,9 @@ const props$J = {
|
|
|
12353
13058
|
}
|
|
12354
13059
|
};
|
|
12355
13060
|
|
|
12356
|
-
const COMPONENT_NAME$
|
|
13061
|
+
const COMPONENT_NAME$13 = "vcm-form";
|
|
12357
13062
|
const MForm = vue.defineComponent({
|
|
12358
|
-
name: COMPONENT_NAME$
|
|
13063
|
+
name: COMPONENT_NAME$13,
|
|
12359
13064
|
props: props$J,
|
|
12360
13065
|
setup(props, { slots, expose }) {
|
|
12361
13066
|
useForm(expose, {
|
|
@@ -12386,9 +13091,9 @@ const props$I = {
|
|
|
12386
13091
|
|
|
12387
13092
|
/** @jsxImportSource vue */
|
|
12388
13093
|
|
|
12389
|
-
const COMPONENT_NAME$
|
|
13094
|
+
const COMPONENT_NAME$12 = 'vcm-form-item';
|
|
12390
13095
|
const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
12391
|
-
name: COMPONENT_NAME$
|
|
13096
|
+
name: COMPONENT_NAME$12,
|
|
12392
13097
|
props: props$I,
|
|
12393
13098
|
setup(props, {
|
|
12394
13099
|
slots,
|
|
@@ -12443,9 +13148,9 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
12443
13148
|
}
|
|
12444
13149
|
});
|
|
12445
13150
|
|
|
12446
|
-
const COMPONENT_NAME
|
|
13151
|
+
const COMPONENT_NAME$11 = "vc-fragment";
|
|
12447
13152
|
const Fragment = vue.defineComponent({
|
|
12448
|
-
name: COMPONENT_NAME
|
|
13153
|
+
name: COMPONENT_NAME$11,
|
|
12449
13154
|
setup(_, { slots }) {
|
|
12450
13155
|
return () => vue.h(vue.Fragment, slots.default?.());
|
|
12451
13156
|
}
|
|
@@ -12484,9 +13189,9 @@ const props$H = {
|
|
|
12484
13189
|
|
|
12485
13190
|
/** @jsxImportSource vue */
|
|
12486
13191
|
|
|
12487
|
-
const COMPONENT_NAME$
|
|
13192
|
+
const COMPONENT_NAME$10 = 'vc-snapshot';
|
|
12488
13193
|
const Snapshot = /* @__PURE__ */ vue.defineComponent({
|
|
12489
|
-
name: COMPONENT_NAME$
|
|
13194
|
+
name: COMPONENT_NAME$10,
|
|
12490
13195
|
props: props$H,
|
|
12491
13196
|
emits: ['ready'],
|
|
12492
13197
|
setup(props, {
|
|
@@ -12645,7 +13350,7 @@ const IMGStore$1 = new IMGStore();
|
|
|
12645
13350
|
|
|
12646
13351
|
/** @jsxImportSource vue */
|
|
12647
13352
|
|
|
12648
|
-
const COMPONENT_NAME
|
|
13353
|
+
const COMPONENT_NAME$$ = 'vc-image';
|
|
12649
13354
|
let isSupportObjectFit = false;
|
|
12650
13355
|
window.addEventListener('DOMContentLoaded', () => {
|
|
12651
13356
|
isSupportObjectFit = !vcShared.IS_SERVER && document.documentElement.style.objectFit !== undefined;
|
|
@@ -12658,7 +13363,7 @@ const ObjectFit = {
|
|
|
12658
13363
|
SCALE_DOWN: 'scale-down'
|
|
12659
13364
|
};
|
|
12660
13365
|
const Image$1 = /* @__PURE__ */ vue.defineComponent({
|
|
12661
|
-
name: COMPONENT_NAME
|
|
13366
|
+
name: COMPONENT_NAME$$,
|
|
12662
13367
|
inheritAttrs: false,
|
|
12663
13368
|
props: props$G,
|
|
12664
13369
|
setup(props, {
|
|
@@ -12875,9 +13580,9 @@ const props$F = {
|
|
|
12875
13580
|
|
|
12876
13581
|
/** @jsxImportSource vue */
|
|
12877
13582
|
|
|
12878
|
-
const COMPONENT_NAME$
|
|
13583
|
+
const COMPONENT_NAME$_ = 'vc-image-crop';
|
|
12879
13584
|
const ImageCrop = /* @__PURE__ */ vue.defineComponent({
|
|
12880
|
-
name: COMPONENT_NAME$
|
|
13585
|
+
name: COMPONENT_NAME$_,
|
|
12881
13586
|
props: props$F,
|
|
12882
13587
|
setup(props, {
|
|
12883
13588
|
slots
|
|
@@ -12903,9 +13608,9 @@ const props$E = {
|
|
|
12903
13608
|
|
|
12904
13609
|
/** @jsxImportSource vue */
|
|
12905
13610
|
|
|
12906
|
-
const COMPONENT_NAME$
|
|
13611
|
+
const COMPONENT_NAME$Z = 'vc-image-processing';
|
|
12907
13612
|
const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
|
|
12908
|
-
name: COMPONENT_NAME$
|
|
13613
|
+
name: COMPONENT_NAME$Z,
|
|
12909
13614
|
props: props$E,
|
|
12910
13615
|
setup(props, {
|
|
12911
13616
|
slots
|
|
@@ -12922,9 +13627,9 @@ const MImageProcessing = ImageProcessing;
|
|
|
12922
13627
|
|
|
12923
13628
|
/** @jsxImportSource vue */
|
|
12924
13629
|
|
|
12925
|
-
const COMPONENT_NAME$
|
|
13630
|
+
const COMPONENT_NAME$Y = 'vcm-input';
|
|
12926
13631
|
const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
12927
|
-
name: COMPONENT_NAME$
|
|
13632
|
+
name: COMPONENT_NAME$Y,
|
|
12928
13633
|
inheritAttrs: false,
|
|
12929
13634
|
props: {
|
|
12930
13635
|
...props$1h,
|
|
@@ -13013,9 +13718,9 @@ const MInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
13013
13718
|
|
|
13014
13719
|
/** @jsxImportSource vue */
|
|
13015
13720
|
|
|
13016
|
-
const COMPONENT_NAME$
|
|
13721
|
+
const COMPONENT_NAME$X = 'vcm-input-number';
|
|
13017
13722
|
const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
13018
|
-
name: COMPONENT_NAME$
|
|
13723
|
+
name: COMPONENT_NAME$X,
|
|
13019
13724
|
props: props$1g,
|
|
13020
13725
|
inheritAttrs: false,
|
|
13021
13726
|
setup(props, {
|
|
@@ -13064,9 +13769,9 @@ const MInputNumber = /* @__PURE__ */ vue.defineComponent({
|
|
|
13064
13769
|
|
|
13065
13770
|
/** @jsxImportSource vue */
|
|
13066
13771
|
|
|
13067
|
-
const COMPONENT_NAME$
|
|
13772
|
+
const COMPONENT_NAME$W = 'vcm-input-search';
|
|
13068
13773
|
const MInputSearch = /* @__PURE__ */ vue.defineComponent({
|
|
13069
|
-
name: COMPONENT_NAME$
|
|
13774
|
+
name: COMPONENT_NAME$W,
|
|
13070
13775
|
props: {
|
|
13071
13776
|
...props$1f,
|
|
13072
13777
|
cancelText: {
|
|
@@ -13143,9 +13848,9 @@ const props$D = {
|
|
|
13143
13848
|
}
|
|
13144
13849
|
};
|
|
13145
13850
|
|
|
13146
|
-
const COMPONENT_NAME$
|
|
13851
|
+
const COMPONENT_NAME$V = "vcm-list";
|
|
13147
13852
|
const MList = vue.defineComponent({
|
|
13148
|
-
name: COMPONENT_NAME$
|
|
13853
|
+
name: COMPONENT_NAME$V,
|
|
13149
13854
|
props: props$D,
|
|
13150
13855
|
setup(props, { slots }) {
|
|
13151
13856
|
vue.provide("vc-list", { props });
|
|
@@ -13200,10 +13905,10 @@ const props$C = {
|
|
|
13200
13905
|
|
|
13201
13906
|
/** @jsxImportSource vue */
|
|
13202
13907
|
|
|
13203
|
-
const COMPONENT_NAME$
|
|
13908
|
+
const COMPONENT_NAME$U = 'vcm-list-item';
|
|
13204
13909
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
13205
13910
|
const MListItem = /* @__PURE__ */ vue.defineComponent({
|
|
13206
|
-
name: COMPONENT_NAME$
|
|
13911
|
+
name: COMPONENT_NAME$U,
|
|
13207
13912
|
props: props$C,
|
|
13208
13913
|
emits: ['click'],
|
|
13209
13914
|
setup(props, {
|
|
@@ -13297,11 +14002,11 @@ const props$B = {
|
|
|
13297
14002
|
|
|
13298
14003
|
/** @jsxImportSource vue */
|
|
13299
14004
|
|
|
13300
|
-
const COMPONENT_NAME$
|
|
14005
|
+
const COMPONENT_NAME$T = 'vc-marquee';
|
|
13301
14006
|
const ANIMATION = $.prefixStyle('animation').camel;
|
|
13302
14007
|
const TRANSFORM_KEBAB = $.prefixStyle('transform').kebab;
|
|
13303
14008
|
const Marquee = /* @__PURE__ */ vue.defineComponent({
|
|
13304
|
-
name: COMPONENT_NAME$
|
|
14009
|
+
name: COMPONENT_NAME$T,
|
|
13305
14010
|
props: props$B,
|
|
13306
14011
|
setup(props, {
|
|
13307
14012
|
slots
|
|
@@ -13369,9 +14074,9 @@ const props$A = {
|
|
|
13369
14074
|
}
|
|
13370
14075
|
};
|
|
13371
14076
|
|
|
13372
|
-
const COMPONENT_NAME$
|
|
14077
|
+
const COMPONENT_NAME$S = "vc-resizer";
|
|
13373
14078
|
const Resizer = vue.defineComponent({
|
|
13374
|
-
name: COMPONENT_NAME$
|
|
14079
|
+
name: COMPONENT_NAME$S,
|
|
13375
14080
|
props: props$A,
|
|
13376
14081
|
emits: ["resize"],
|
|
13377
14082
|
setup(props, { emit, slots, expose }) {
|
|
@@ -13541,10 +14246,10 @@ const props$z = {
|
|
|
13541
14246
|
|
|
13542
14247
|
/** @jsxImportSource vue */
|
|
13543
14248
|
|
|
13544
|
-
const COMPONENT_NAME$
|
|
14249
|
+
const COMPONENT_NAME$R = 'vc-modal';
|
|
13545
14250
|
let zIndexNumber = 1002;
|
|
13546
14251
|
const ModalView = /* @__PURE__ */ vue.defineComponent({
|
|
13547
|
-
name: COMPONENT_NAME$
|
|
14252
|
+
name: COMPONENT_NAME$R,
|
|
13548
14253
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
|
|
13549
14254
|
props: props$z,
|
|
13550
14255
|
setup(props, {
|
|
@@ -13983,9 +14688,9 @@ const props$y = {
|
|
|
13983
14688
|
|
|
13984
14689
|
/** @jsxImportSource vue */
|
|
13985
14690
|
|
|
13986
|
-
const COMPONENT_NAME$
|
|
14691
|
+
const COMPONENT_NAME$Q = 'vc-modal';
|
|
13987
14692
|
const MModalView = /* @__PURE__ */ vue.defineComponent({
|
|
13988
|
-
name: COMPONENT_NAME$
|
|
14693
|
+
name: COMPONENT_NAME$Q,
|
|
13989
14694
|
emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
|
|
13990
14695
|
props: props$y,
|
|
13991
14696
|
setup(props, {
|
|
@@ -14197,9 +14902,9 @@ const props$x = {
|
|
|
14197
14902
|
|
|
14198
14903
|
/** @jsxImportSource vue */
|
|
14199
14904
|
|
|
14200
|
-
const COMPONENT_NAME$
|
|
14905
|
+
const COMPONENT_NAME$P = 'vc-notice';
|
|
14201
14906
|
const NoticeView = /* @__PURE__ */ vue.defineComponent({
|
|
14202
|
-
name: COMPONENT_NAME$
|
|
14907
|
+
name: COMPONENT_NAME$P,
|
|
14203
14908
|
props: props$x,
|
|
14204
14909
|
emits: ['portal-fulfilled', 'close', 'before-close'],
|
|
14205
14910
|
setup(props, {
|
|
@@ -14372,9 +15077,9 @@ const props$w = {
|
|
|
14372
15077
|
|
|
14373
15078
|
/** @jsxImportSource vue */
|
|
14374
15079
|
|
|
14375
|
-
const COMPONENT_NAME$
|
|
15080
|
+
const COMPONENT_NAME$O = 'vc-option';
|
|
14376
15081
|
const Option$1 = /* @__PURE__ */ vue.defineComponent({
|
|
14377
|
-
name: COMPONENT_NAME$
|
|
15082
|
+
name: COMPONENT_NAME$O,
|
|
14378
15083
|
props: props$w,
|
|
14379
15084
|
setup(props, {
|
|
14380
15085
|
slots
|
|
@@ -14458,9 +15163,9 @@ const props$u = {
|
|
|
14458
15163
|
|
|
14459
15164
|
/** @jsxImportSource vue */
|
|
14460
15165
|
|
|
14461
|
-
const COMPONENT_NAME$
|
|
15166
|
+
const COMPONENT_NAME$N = 'vc-tag';
|
|
14462
15167
|
const Tag = /* @__PURE__ */ vue.defineComponent({
|
|
14463
|
-
name: COMPONENT_NAME$
|
|
15168
|
+
name: COMPONENT_NAME$N,
|
|
14464
15169
|
props: props$u,
|
|
14465
15170
|
emits: ['close', 'change'],
|
|
14466
15171
|
setup(props, {
|
|
@@ -14531,9 +15236,9 @@ const props$t = {
|
|
|
14531
15236
|
|
|
14532
15237
|
/** @jsxImportSource vue */
|
|
14533
15238
|
|
|
14534
|
-
const COMPONENT_NAME$
|
|
15239
|
+
const COMPONENT_NAME$M = 'vc-select-option';
|
|
14535
15240
|
const Option = /* @__PURE__ */ vue.defineComponent({
|
|
14536
|
-
name: COMPONENT_NAME$
|
|
15241
|
+
name: COMPONENT_NAME$M,
|
|
14537
15242
|
props: props$t,
|
|
14538
15243
|
setup(props, {
|
|
14539
15244
|
slots,
|
|
@@ -14628,9 +15333,9 @@ const props$s = {
|
|
|
14628
15333
|
|
|
14629
15334
|
/** @jsxImportSource vue */
|
|
14630
15335
|
|
|
14631
|
-
const COMPONENT_NAME$
|
|
15336
|
+
const COMPONENT_NAME$L = 'vc-select-option-group';
|
|
14632
15337
|
const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
14633
|
-
name: COMPONENT_NAME$
|
|
15338
|
+
name: COMPONENT_NAME$L,
|
|
14634
15339
|
props: props$s,
|
|
14635
15340
|
setup(props, {
|
|
14636
15341
|
slots
|
|
@@ -14660,9 +15365,9 @@ const OptionGroup = /* @__PURE__ */ vue.defineComponent({
|
|
|
14660
15365
|
|
|
14661
15366
|
/** @jsxImportSource vue */
|
|
14662
15367
|
|
|
14663
|
-
const COMPONENT_NAME$
|
|
15368
|
+
const COMPONENT_NAME$K = 'vc-select-all';
|
|
14664
15369
|
const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
14665
|
-
name: COMPONENT_NAME$
|
|
15370
|
+
name: COMPONENT_NAME$K,
|
|
14666
15371
|
props: {
|
|
14667
15372
|
data: {
|
|
14668
15373
|
type: Array,
|
|
@@ -14732,9 +15437,9 @@ const SelectAll = /* @__PURE__ */ vue.defineComponent({
|
|
|
14732
15437
|
|
|
14733
15438
|
/** @jsxImportSource vue */
|
|
14734
15439
|
|
|
14735
|
-
const COMPONENT_NAME$
|
|
15440
|
+
const COMPONENT_NAME$J = 'vc-select';
|
|
14736
15441
|
const Select = /* @__PURE__ */ vue.defineComponent({
|
|
14737
|
-
name: COMPONENT_NAME$
|
|
15442
|
+
name: COMPONENT_NAME$J,
|
|
14738
15443
|
props: props$1a,
|
|
14739
15444
|
emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
|
|
14740
15445
|
setup(props, {
|
|
@@ -15028,9 +15733,9 @@ const Select = /* @__PURE__ */ vue.defineComponent({
|
|
|
15028
15733
|
|
|
15029
15734
|
/** @jsxImportSource vue */
|
|
15030
15735
|
|
|
15031
|
-
const COMPONENT_NAME$
|
|
15736
|
+
const COMPONENT_NAME$I = 'vc-pagination';
|
|
15032
15737
|
const Pagination = /* @__PURE__ */ vue.defineComponent({
|
|
15033
|
-
name: COMPONENT_NAME$
|
|
15738
|
+
name: COMPONENT_NAME$I,
|
|
15034
15739
|
props: props$v,
|
|
15035
15740
|
emits: ['update:current', 'change', 'page-size-change'],
|
|
15036
15741
|
setup(props, {
|
|
@@ -15228,9 +15933,9 @@ const props$r = {
|
|
|
15228
15933
|
|
|
15229
15934
|
/** @jsxImportSource vue */
|
|
15230
15935
|
|
|
15231
|
-
const COMPONENT_NAME$
|
|
15936
|
+
const COMPONENT_NAME$H = 'vc-picker';
|
|
15232
15937
|
const Picker = /* @__PURE__ */ vue.defineComponent({
|
|
15233
|
-
name: COMPONENT_NAME$
|
|
15938
|
+
name: COMPONENT_NAME$H,
|
|
15234
15939
|
props: props$r,
|
|
15235
15940
|
setup(props, {
|
|
15236
15941
|
slots
|
|
@@ -15293,9 +15998,9 @@ const props$q = {
|
|
|
15293
15998
|
|
|
15294
15999
|
/** @jsxImportSource vue */
|
|
15295
16000
|
|
|
15296
|
-
const COMPONENT_NAME$
|
|
16001
|
+
const COMPONENT_NAME$G = 'vc-popconfirm';
|
|
15297
16002
|
const Popconfirm = /* @__PURE__ */ vue.defineComponent({
|
|
15298
|
-
name: COMPONENT_NAME$
|
|
16003
|
+
name: COMPONENT_NAME$G,
|
|
15299
16004
|
props: props$q,
|
|
15300
16005
|
inheritAttrs: false,
|
|
15301
16006
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
|
|
@@ -15463,9 +16168,9 @@ const props$p = {
|
|
|
15463
16168
|
|
|
15464
16169
|
/** @jsxImportSource vue */
|
|
15465
16170
|
|
|
15466
|
-
const COMPONENT_NAME$
|
|
16171
|
+
const COMPONENT_NAME$F = 'vc-popup';
|
|
15467
16172
|
const MPopup = /* @__PURE__ */ vue.defineComponent({
|
|
15468
|
-
name: COMPONENT_NAME$
|
|
16173
|
+
name: COMPONENT_NAME$F,
|
|
15469
16174
|
props: props$p,
|
|
15470
16175
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change'],
|
|
15471
16176
|
setup(props, {
|
|
@@ -15592,9 +16297,9 @@ const props$o = {
|
|
|
15592
16297
|
|
|
15593
16298
|
/** @jsxImportSource vue */
|
|
15594
16299
|
|
|
15595
|
-
const COMPONENT_NAME$
|
|
16300
|
+
const COMPONENT_NAME$E = 'vc-print';
|
|
15596
16301
|
const Print = /* @__PURE__ */ vue.defineComponent({
|
|
15597
|
-
name: COMPONENT_NAME$
|
|
16302
|
+
name: COMPONENT_NAME$E,
|
|
15598
16303
|
props: props$o,
|
|
15599
16304
|
setup(props, {
|
|
15600
16305
|
expose,
|
|
@@ -15674,7 +16379,7 @@ const props$n = {
|
|
|
15674
16379
|
},
|
|
15675
16380
|
strokeColor: {
|
|
15676
16381
|
type: String,
|
|
15677
|
-
default: "#
|
|
16382
|
+
default: "#456CF6"
|
|
15678
16383
|
},
|
|
15679
16384
|
trackColor: {
|
|
15680
16385
|
type: String,
|
|
@@ -15696,9 +16401,9 @@ const props$n = {
|
|
|
15696
16401
|
|
|
15697
16402
|
/** @jsxImportSource vue */
|
|
15698
16403
|
|
|
15699
|
-
const COMPONENT_NAME$
|
|
16404
|
+
const COMPONENT_NAME$D = 'vc-progress-circle';
|
|
15700
16405
|
const Circle = /* @__PURE__ */ vue.defineComponent({
|
|
15701
|
-
name: COMPONENT_NAME$
|
|
16406
|
+
name: COMPONENT_NAME$D,
|
|
15702
16407
|
props: props$n,
|
|
15703
16408
|
setup(props, {
|
|
15704
16409
|
slots
|
|
@@ -15758,9 +16463,9 @@ const Circle = /* @__PURE__ */ vue.defineComponent({
|
|
|
15758
16463
|
|
|
15759
16464
|
/** @jsxImportSource vue */
|
|
15760
16465
|
|
|
15761
|
-
const COMPONENT_NAME$
|
|
16466
|
+
const COMPONENT_NAME$C = 'vc-progress-line';
|
|
15762
16467
|
const Line = /* @__PURE__ */ vue.defineComponent({
|
|
15763
|
-
name: COMPONENT_NAME$
|
|
16468
|
+
name: COMPONENT_NAME$C,
|
|
15764
16469
|
props: props$n,
|
|
15765
16470
|
setup(props) {
|
|
15766
16471
|
const colorStyle = vue.computed(() => {
|
|
@@ -15807,9 +16512,9 @@ const Line = /* @__PURE__ */ vue.defineComponent({
|
|
|
15807
16512
|
function _isSlot(s) {
|
|
15808
16513
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
15809
16514
|
}
|
|
15810
|
-
const COMPONENT_NAME$
|
|
16515
|
+
const COMPONENT_NAME$B = 'vc-progress';
|
|
15811
16516
|
const Progress = /* @__PURE__ */ vue.defineComponent({
|
|
15812
|
-
name: COMPONENT_NAME$
|
|
16517
|
+
name: COMPONENT_NAME$B,
|
|
15813
16518
|
props: props$n,
|
|
15814
16519
|
setup(props, {
|
|
15815
16520
|
slots
|
|
@@ -15971,9 +16676,9 @@ const useRadio = () => {
|
|
|
15971
16676
|
|
|
15972
16677
|
/** @jsxImportSource vue */
|
|
15973
16678
|
|
|
15974
|
-
const COMPONENT_NAME$
|
|
16679
|
+
const COMPONENT_NAME$A = 'vc-radio';
|
|
15975
16680
|
const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
15976
|
-
name: COMPONENT_NAME$
|
|
16681
|
+
name: COMPONENT_NAME$A,
|
|
15977
16682
|
props: props$m,
|
|
15978
16683
|
emits: ['update:modelValue', 'change'],
|
|
15979
16684
|
setup(props, {
|
|
@@ -16017,9 +16722,9 @@ const Radio = /* @__PURE__ */ vue.defineComponent({
|
|
|
16017
16722
|
|
|
16018
16723
|
/** @jsxImportSource vue */
|
|
16019
16724
|
|
|
16020
|
-
const COMPONENT_NAME$
|
|
16725
|
+
const COMPONENT_NAME$z = 'vc-radio-button';
|
|
16021
16726
|
const RadioButton = /* @__PURE__ */ vue.defineComponent({
|
|
16022
|
-
name: COMPONENT_NAME$
|
|
16727
|
+
name: COMPONENT_NAME$z,
|
|
16023
16728
|
props: {
|
|
16024
16729
|
...props$m,
|
|
16025
16730
|
labelStyle: [String, Object],
|
|
@@ -16132,9 +16837,9 @@ const useRadioGroup = () => {
|
|
|
16132
16837
|
|
|
16133
16838
|
/** @jsxImportSource vue */
|
|
16134
16839
|
|
|
16135
|
-
const COMPONENT_NAME$
|
|
16840
|
+
const COMPONENT_NAME$y = 'vc-radio-group';
|
|
16136
16841
|
const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
16137
|
-
name: COMPONENT_NAME$
|
|
16842
|
+
name: COMPONENT_NAME$y,
|
|
16138
16843
|
props: props$l,
|
|
16139
16844
|
emits: ['update:modelValue', 'change'],
|
|
16140
16845
|
setup(props, {
|
|
@@ -16155,9 +16860,9 @@ const RadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
|
16155
16860
|
|
|
16156
16861
|
/** @jsxImportSource vue */
|
|
16157
16862
|
|
|
16158
|
-
const COMPONENT_NAME$
|
|
16863
|
+
const COMPONENT_NAME$x = 'vcm-radio';
|
|
16159
16864
|
const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
16160
|
-
name: COMPONENT_NAME$
|
|
16865
|
+
name: COMPONENT_NAME$x,
|
|
16161
16866
|
props: props$m,
|
|
16162
16867
|
emits: ['update:modelValue', 'change'],
|
|
16163
16868
|
setup(props, {
|
|
@@ -16201,9 +16906,9 @@ const MRadio = /* @__PURE__ */ vue.defineComponent({
|
|
|
16201
16906
|
|
|
16202
16907
|
/** @jsxImportSource vue */
|
|
16203
16908
|
|
|
16204
|
-
const COMPONENT_NAME$
|
|
16909
|
+
const COMPONENT_NAME$w = 'vcm-radio-group';
|
|
16205
16910
|
const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
|
|
16206
|
-
name: COMPONENT_NAME$
|
|
16911
|
+
name: COMPONENT_NAME$w,
|
|
16207
16912
|
props: props$l,
|
|
16208
16913
|
emits: ['update:modelValue', 'change'],
|
|
16209
16914
|
setup(props, {
|
|
@@ -16270,9 +16975,9 @@ const props$k = {
|
|
|
16270
16975
|
|
|
16271
16976
|
/** @jsxImportSource vue */
|
|
16272
16977
|
|
|
16273
|
-
const COMPONENT_NAME$
|
|
16978
|
+
const COMPONENT_NAME$v = 'vc-rate';
|
|
16274
16979
|
const Rate = /* @__PURE__ */ vue.defineComponent({
|
|
16275
|
-
name: COMPONENT_NAME$
|
|
16980
|
+
name: COMPONENT_NAME$v,
|
|
16276
16981
|
props: props$k,
|
|
16277
16982
|
emits: ['update:modelValue', 'change'],
|
|
16278
16983
|
setup(props, {
|
|
@@ -16474,9 +17179,9 @@ const props$j = {
|
|
|
16474
17179
|
|
|
16475
17180
|
/** @jsxImportSource vue */
|
|
16476
17181
|
|
|
16477
|
-
const COMPONENT_NAME$
|
|
17182
|
+
const COMPONENT_NAME$u = 'vc-recycle-list-scroll-state';
|
|
16478
17183
|
const ScrollState = /* @__PURE__ */ vue.defineComponent({
|
|
16479
|
-
name: COMPONENT_NAME$
|
|
17184
|
+
name: COMPONENT_NAME$u,
|
|
16480
17185
|
setup(_, {
|
|
16481
17186
|
slots
|
|
16482
17187
|
}) {
|
|
@@ -16606,12 +17311,12 @@ const useDirectionKeys = () => {
|
|
|
16606
17311
|
|
|
16607
17312
|
/** @jsxImportSource vue */
|
|
16608
17313
|
|
|
16609
|
-
const COMPONENT_NAME$
|
|
17314
|
+
const COMPONENT_NAME$t = 'vc-recycle-list-container';
|
|
16610
17315
|
|
|
16611
17316
|
// TODO: 抽离
|
|
16612
17317
|
const transformKey = $__namespace.prefixStyle('transform').camel;
|
|
16613
17318
|
const Container = /* @__PURE__ */ vue.defineComponent({
|
|
16614
|
-
name: COMPONENT_NAME$
|
|
17319
|
+
name: COMPONENT_NAME$t,
|
|
16615
17320
|
props: props$i,
|
|
16616
17321
|
emits: ['refresh'],
|
|
16617
17322
|
setup(props, {
|
|
@@ -16709,9 +17414,9 @@ const Container = /* @__PURE__ */ vue.defineComponent({
|
|
|
16709
17414
|
|
|
16710
17415
|
/** @jsxImportSource vue */
|
|
16711
17416
|
|
|
16712
|
-
const COMPONENT_NAME$
|
|
17417
|
+
const COMPONENT_NAME$s = 'vc-recycle-list';
|
|
16713
17418
|
const RecycleList = /* @__PURE__ */ vue.defineComponent({
|
|
16714
|
-
name: COMPONENT_NAME$
|
|
17419
|
+
name: COMPONENT_NAME$s,
|
|
16715
17420
|
props: props$j,
|
|
16716
17421
|
emits: ['scroll', 'row-resize'],
|
|
16717
17422
|
setup(props, {
|
|
@@ -17285,9 +17990,9 @@ const props$h = {
|
|
|
17285
17990
|
|
|
17286
17991
|
/** @jsxImportSource vue */
|
|
17287
17992
|
|
|
17288
|
-
const COMPONENT_NAME$
|
|
17993
|
+
const COMPONENT_NAME$r = 'vc-slider';
|
|
17289
17994
|
const Slider = /* @__PURE__ */ vue.defineComponent({
|
|
17290
|
-
name: COMPONENT_NAME$
|
|
17995
|
+
name: COMPONENT_NAME$r,
|
|
17291
17996
|
props: props$h,
|
|
17292
17997
|
setup(props, {
|
|
17293
17998
|
slots
|
|
@@ -17311,9 +18016,9 @@ const props$g = {
|
|
|
17311
18016
|
|
|
17312
18017
|
/** @jsxImportSource vue */
|
|
17313
18018
|
|
|
17314
|
-
const COMPONENT_NAME$
|
|
18019
|
+
const COMPONENT_NAME$q = 'vc-sort-list';
|
|
17315
18020
|
const SortList = /* @__PURE__ */ vue.defineComponent({
|
|
17316
|
-
name: COMPONENT_NAME$
|
|
18021
|
+
name: COMPONENT_NAME$q,
|
|
17317
18022
|
props: props$g,
|
|
17318
18023
|
setup(props, {
|
|
17319
18024
|
slots
|
|
@@ -17337,9 +18042,9 @@ const props$f = {
|
|
|
17337
18042
|
|
|
17338
18043
|
/** @jsxImportSource vue */
|
|
17339
18044
|
|
|
17340
|
-
const COMPONENT_NAME$
|
|
18045
|
+
const COMPONENT_NAME$p = 'vc-steps';
|
|
17341
18046
|
const Steps = /* @__PURE__ */ vue.defineComponent({
|
|
17342
|
-
name: COMPONENT_NAME$
|
|
18047
|
+
name: COMPONENT_NAME$p,
|
|
17343
18048
|
props: props$f,
|
|
17344
18049
|
setup(props, {
|
|
17345
18050
|
slots
|
|
@@ -17465,9 +18170,9 @@ const useSwitch = (expose) => {
|
|
|
17465
18170
|
|
|
17466
18171
|
/** @jsxImportSource vue */
|
|
17467
18172
|
|
|
17468
|
-
const COMPONENT_NAME$
|
|
18173
|
+
const COMPONENT_NAME$o = 'vc-switch';
|
|
17469
18174
|
const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
17470
|
-
name: COMPONENT_NAME$
|
|
18175
|
+
name: COMPONENT_NAME$o,
|
|
17471
18176
|
props: props$e,
|
|
17472
18177
|
// click -> onClick要被拦截,此处不能放置
|
|
17473
18178
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -17541,9 +18246,9 @@ const Switch = /* @__PURE__ */ vue.defineComponent({
|
|
|
17541
18246
|
|
|
17542
18247
|
/** @jsxImportSource vue */
|
|
17543
18248
|
|
|
17544
|
-
const COMPONENT_NAME$
|
|
18249
|
+
const COMPONENT_NAME$n = 'vcm-switch';
|
|
17545
18250
|
const MSwitch = /* @__PURE__ */ vue.defineComponent({
|
|
17546
|
-
name: COMPONENT_NAME$
|
|
18251
|
+
name: COMPONENT_NAME$n,
|
|
17547
18252
|
props: props$e,
|
|
17548
18253
|
// click -> onClick要被拦截,此处不能放置
|
|
17549
18254
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -18656,9 +19361,9 @@ const useStates = (mapper, $store) => {
|
|
|
18656
19361
|
|
|
18657
19362
|
/** @jsxImportSource vue */
|
|
18658
19363
|
|
|
18659
|
-
const COMPONENT_NAME$
|
|
19364
|
+
const COMPONENT_NAME$m = 'vc-table-normal-list';
|
|
18660
19365
|
const NormalList = /* @__PURE__ */ vue.defineComponent({
|
|
18661
|
-
name: COMPONENT_NAME$
|
|
19366
|
+
name: COMPONENT_NAME$m,
|
|
18662
19367
|
props: {
|
|
18663
19368
|
data: {
|
|
18664
19369
|
type: Array,
|
|
@@ -19659,9 +20364,9 @@ const props$d = {
|
|
|
19659
20364
|
|
|
19660
20365
|
/** @jsxImportSource vue */
|
|
19661
20366
|
|
|
19662
|
-
const COMPONENT_NAME$
|
|
20367
|
+
const COMPONENT_NAME$l = 'vc-table';
|
|
19663
20368
|
const Table = /* @__PURE__ */ vue.defineComponent({
|
|
19664
|
-
name: COMPONENT_NAME$
|
|
20369
|
+
name: COMPONENT_NAME$l,
|
|
19665
20370
|
props: props$d,
|
|
19666
20371
|
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'],
|
|
19667
20372
|
setup(props, {
|
|
@@ -20864,9 +21569,9 @@ const useTabs = (options = {}) => {
|
|
|
20864
21569
|
|
|
20865
21570
|
/** @jsxImportSource vue */
|
|
20866
21571
|
|
|
20867
|
-
const COMPONENT_NAME$
|
|
21572
|
+
const COMPONENT_NAME$k = 'vc-tabs';
|
|
20868
21573
|
const Tabs = /* @__PURE__ */ vue.defineComponent({
|
|
20869
|
-
name: COMPONENT_NAME$
|
|
21574
|
+
name: COMPONENT_NAME$k,
|
|
20870
21575
|
props: props$c,
|
|
20871
21576
|
emits: ['update:modelValue', 'change', 'click'],
|
|
20872
21577
|
setup(props, {
|
|
@@ -21119,9 +21824,9 @@ const useTabsPane = () => {
|
|
|
21119
21824
|
|
|
21120
21825
|
/** @jsxImportSource vue */
|
|
21121
21826
|
|
|
21122
|
-
const COMPONENT_NAME$
|
|
21827
|
+
const COMPONENT_NAME$j = 'vc-tabs-pane';
|
|
21123
21828
|
const TabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
21124
|
-
name: COMPONENT_NAME$
|
|
21829
|
+
name: COMPONENT_NAME$j,
|
|
21125
21830
|
props: props$b,
|
|
21126
21831
|
setup(_, {
|
|
21127
21832
|
slots
|
|
@@ -21176,9 +21881,9 @@ const props$a = {
|
|
|
21176
21881
|
|
|
21177
21882
|
/** @jsxImportSource vue */
|
|
21178
21883
|
|
|
21179
|
-
const COMPONENT_NAME$
|
|
21884
|
+
const COMPONENT_NAME$i = 'vcm-tabs';
|
|
21180
21885
|
const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
21181
|
-
name: COMPONENT_NAME$
|
|
21886
|
+
name: COMPONENT_NAME$i,
|
|
21182
21887
|
props: props$a,
|
|
21183
21888
|
emits: ['update:modelValue', 'change', 'click'],
|
|
21184
21889
|
setup(props, {
|
|
@@ -21443,9 +22148,9 @@ const MTabs = /* @__PURE__ */ vue.defineComponent({
|
|
|
21443
22148
|
|
|
21444
22149
|
/** @jsxImportSource vue */
|
|
21445
22150
|
|
|
21446
|
-
const COMPONENT_NAME$
|
|
22151
|
+
const COMPONENT_NAME$h = 'vcm-tabs-pane';
|
|
21447
22152
|
const MTabsPane = /* @__PURE__ */ vue.defineComponent({
|
|
21448
|
-
name: COMPONENT_NAME$
|
|
22153
|
+
name: COMPONENT_NAME$h,
|
|
21449
22154
|
props: props$b,
|
|
21450
22155
|
setup(_, {
|
|
21451
22156
|
slots
|
|
@@ -21509,9 +22214,9 @@ const props$9 = {
|
|
|
21509
22214
|
|
|
21510
22215
|
/** @jsxImportSource vue */
|
|
21511
22216
|
|
|
21512
|
-
const COMPONENT_NAME$
|
|
22217
|
+
const COMPONENT_NAME$g = 'vc-text';
|
|
21513
22218
|
const Text = /* @__PURE__ */ vue.defineComponent({
|
|
21514
|
-
name: COMPONENT_NAME$
|
|
22219
|
+
name: COMPONENT_NAME$g,
|
|
21515
22220
|
props: props$9,
|
|
21516
22221
|
setup(props, {
|
|
21517
22222
|
emit
|
|
@@ -21878,9 +22583,9 @@ const props$8 = {
|
|
|
21878
22583
|
|
|
21879
22584
|
/** @jsxImportSource vue */
|
|
21880
22585
|
|
|
21881
|
-
const COMPONENT_NAME$
|
|
22586
|
+
const COMPONENT_NAME$f = 'vc-textarea';
|
|
21882
22587
|
const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
21883
|
-
name: COMPONENT_NAME$
|
|
22588
|
+
name: COMPONENT_NAME$f,
|
|
21884
22589
|
props: Object.assign({}, props$8, {
|
|
21885
22590
|
indicator: {
|
|
21886
22591
|
type: [Boolean, Object],
|
|
@@ -21936,9 +22641,9 @@ const Textarea = /* @__PURE__ */ vue.defineComponent({
|
|
|
21936
22641
|
|
|
21937
22642
|
/** @jsxImportSource vue */
|
|
21938
22643
|
|
|
21939
|
-
const COMPONENT_NAME$
|
|
22644
|
+
const COMPONENT_NAME$e = 'vcm-textarea';
|
|
21940
22645
|
const MTextarea = /* @__PURE__ */ vue.defineComponent({
|
|
21941
|
-
name: COMPONENT_NAME$
|
|
22646
|
+
name: COMPONENT_NAME$e,
|
|
21942
22647
|
props: Object.assign({}, props$8, {
|
|
21943
22648
|
align: {
|
|
21944
22649
|
type: String,
|
|
@@ -22021,9 +22726,9 @@ const props$7 = {
|
|
|
22021
22726
|
}
|
|
22022
22727
|
};
|
|
22023
22728
|
|
|
22024
|
-
const COMPONENT_NAME$
|
|
22729
|
+
const COMPONENT_NAME$d = "vc-theme";
|
|
22025
22730
|
const Theme = vue.defineComponent({
|
|
22026
|
-
name: COMPONENT_NAME$
|
|
22731
|
+
name: COMPONENT_NAME$d,
|
|
22027
22732
|
props: props$7,
|
|
22028
22733
|
setup(props, { slots }) {
|
|
22029
22734
|
const themeId = Utils__namespace.getUid("vc-theme");
|
|
@@ -22106,9 +22811,9 @@ const Theme = vue.defineComponent({
|
|
|
22106
22811
|
}
|
|
22107
22812
|
});
|
|
22108
22813
|
|
|
22109
|
-
const COMPONENT_NAME$
|
|
22814
|
+
const COMPONENT_NAME$c = "vc-theme-view";
|
|
22110
22815
|
const ThemeView = vue.defineComponent({
|
|
22111
|
-
name: COMPONENT_NAME$
|
|
22816
|
+
name: COMPONENT_NAME$c,
|
|
22112
22817
|
props: props$7,
|
|
22113
22818
|
setup(props, { slots }) {
|
|
22114
22819
|
return () => {
|
|
@@ -22124,9 +22829,9 @@ const ThemeView = vue.defineComponent({
|
|
|
22124
22829
|
}
|
|
22125
22830
|
});
|
|
22126
22831
|
|
|
22127
|
-
const COMPONENT_NAME$
|
|
22832
|
+
const COMPONENT_NAME$b = "vc-theme-text";
|
|
22128
22833
|
const ThemeText = vue.defineComponent({
|
|
22129
|
-
name: COMPONENT_NAME$
|
|
22834
|
+
name: COMPONENT_NAME$b,
|
|
22130
22835
|
props: props$7,
|
|
22131
22836
|
setup(props, { slots }) {
|
|
22132
22837
|
return () => {
|
|
@@ -22142,9 +22847,9 @@ const ThemeText = vue.defineComponent({
|
|
|
22142
22847
|
}
|
|
22143
22848
|
});
|
|
22144
22849
|
|
|
22145
|
-
const COMPONENT_NAME$
|
|
22850
|
+
const COMPONENT_NAME$a = "vc-theme-image";
|
|
22146
22851
|
const ThemeImage = vue.defineComponent({
|
|
22147
|
-
name: COMPONENT_NAME$
|
|
22852
|
+
name: COMPONENT_NAME$a,
|
|
22148
22853
|
props: props$7,
|
|
22149
22854
|
setup(props, { slots }) {
|
|
22150
22855
|
return () => {
|
|
@@ -22196,12 +22901,12 @@ const props$6 = {
|
|
|
22196
22901
|
|
|
22197
22902
|
/** @jsxImportSource vue */
|
|
22198
22903
|
|
|
22199
|
-
const COMPONENT_NAME$
|
|
22904
|
+
const COMPONENT_NAME$9 = 'vc-time-picker';
|
|
22200
22905
|
const getPanel = type => {
|
|
22201
22906
|
const isRange = type === 'timerange';
|
|
22202
22907
|
return isRange ? TimeRangePanel : TimePanel;
|
|
22203
22908
|
};
|
|
22204
|
-
const TimePicker = createPicker(COMPONENT_NAME$
|
|
22909
|
+
const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
|
|
22205
22910
|
const props = vue.getCurrentInstance().props;
|
|
22206
22911
|
const icon = vue.ref('icon');
|
|
22207
22912
|
const panel = vue.shallowRef({});
|
|
@@ -22237,9 +22942,9 @@ const props$5 = {
|
|
|
22237
22942
|
|
|
22238
22943
|
/** @jsxImportSource vue */
|
|
22239
22944
|
|
|
22240
|
-
const COMPONENT_NAME$
|
|
22945
|
+
const COMPONENT_NAME$8 = 'vc-timeline';
|
|
22241
22946
|
const Timeline = /* @__PURE__ */ vue.defineComponent({
|
|
22242
|
-
name: COMPONENT_NAME$
|
|
22947
|
+
name: COMPONENT_NAME$8,
|
|
22243
22948
|
props: props$5,
|
|
22244
22949
|
setup(props, {
|
|
22245
22950
|
slots
|
|
@@ -22266,9 +22971,9 @@ const props$4 = {
|
|
|
22266
22971
|
|
|
22267
22972
|
/** @jsxImportSource vue */
|
|
22268
22973
|
|
|
22269
|
-
const COMPONENT_NAME$
|
|
22974
|
+
const COMPONENT_NAME$7 = 'vc-touch';
|
|
22270
22975
|
const Touch = /* @__PURE__ */ vue.defineComponent({
|
|
22271
|
-
name: COMPONENT_NAME$
|
|
22976
|
+
name: COMPONENT_NAME$7,
|
|
22272
22977
|
props: props$4,
|
|
22273
22978
|
setup(props, {
|
|
22274
22979
|
slots
|
|
@@ -22776,21 +23481,68 @@ class TreeStore {
|
|
|
22776
23481
|
parentNode.insertChild({ data });
|
|
22777
23482
|
}
|
|
22778
23483
|
}
|
|
23484
|
+
/**
|
|
23485
|
+
* 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
|
|
23486
|
+
* 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
|
|
23487
|
+
* @param checkedValues ~
|
|
23488
|
+
* @returns ~
|
|
23489
|
+
*/
|
|
23490
|
+
_getCascadeCheckedAnchorIds(checkedValues) {
|
|
23491
|
+
const checkedSet = new Set(checkedValues);
|
|
23492
|
+
const nodesMap = this.nodesMap;
|
|
23493
|
+
const anchors = [];
|
|
23494
|
+
for (const id of checkedValues) {
|
|
23495
|
+
const node = nodesMap[id];
|
|
23496
|
+
if (!node) continue;
|
|
23497
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
23498
|
+
(child) => checkedSet.has(child.getter.value)
|
|
23499
|
+
);
|
|
23500
|
+
if (!hasSelectedChildInSet) {
|
|
23501
|
+
anchors.push(id);
|
|
23502
|
+
}
|
|
23503
|
+
}
|
|
23504
|
+
anchors.sort((a, b) => {
|
|
23505
|
+
const na = nodesMap[a];
|
|
23506
|
+
const nb = nodesMap[b];
|
|
23507
|
+
if (!na || !nb) return 0;
|
|
23508
|
+
return nb.states.level - na.states.level;
|
|
23509
|
+
});
|
|
23510
|
+
return anchors;
|
|
23511
|
+
}
|
|
22779
23512
|
_initDefaultCheckedNodes() {
|
|
22780
23513
|
const checkedValues = this.checkedValues || [];
|
|
22781
23514
|
const nodesMap = this.nodesMap;
|
|
22782
|
-
|
|
23515
|
+
if (this.checkStrictly) {
|
|
23516
|
+
checkedValues.forEach((id) => {
|
|
23517
|
+
const node = nodesMap[id];
|
|
23518
|
+
if (node) {
|
|
23519
|
+
node.setChecked(true, false);
|
|
23520
|
+
}
|
|
23521
|
+
});
|
|
23522
|
+
return;
|
|
23523
|
+
}
|
|
23524
|
+
const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
|
|
23525
|
+
anchorIds.forEach((id) => {
|
|
22783
23526
|
const node = nodesMap[id];
|
|
22784
23527
|
if (node) {
|
|
22785
|
-
node.setChecked(true,
|
|
23528
|
+
node.setChecked(true, true);
|
|
22786
23529
|
}
|
|
22787
23530
|
});
|
|
22788
23531
|
}
|
|
22789
23532
|
_initDefaultCheckedNode(node) {
|
|
22790
23533
|
const checkedValues = this.checkedValues || [];
|
|
22791
23534
|
const nodeValue = node.getter.value;
|
|
22792
|
-
if (checkedValues.indexOf(nodeValue)
|
|
22793
|
-
|
|
23535
|
+
if (checkedValues.indexOf(nodeValue) === -1) return;
|
|
23536
|
+
if (this.checkStrictly) {
|
|
23537
|
+
node.setChecked(true, false);
|
|
23538
|
+
return;
|
|
23539
|
+
}
|
|
23540
|
+
const checkedSet = new Set(checkedValues);
|
|
23541
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
23542
|
+
(child) => checkedSet.has(child.getter.value)
|
|
23543
|
+
);
|
|
23544
|
+
if (!hasSelectedChildInSet) {
|
|
23545
|
+
node.setChecked(true, true);
|
|
22794
23546
|
}
|
|
22795
23547
|
}
|
|
22796
23548
|
setCheckedValues(newVal) {
|
|
@@ -23018,9 +23770,9 @@ const props$3 = {
|
|
|
23018
23770
|
|
|
23019
23771
|
/** @jsxImportSource vue */
|
|
23020
23772
|
|
|
23021
|
-
const COMPONENT_NAME$
|
|
23773
|
+
const COMPONENT_NAME$6 = 'vc-tree-node';
|
|
23022
23774
|
const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
|
|
23023
|
-
name: COMPONENT_NAME$
|
|
23775
|
+
name: COMPONENT_NAME$6,
|
|
23024
23776
|
props: props$3,
|
|
23025
23777
|
emits: ['node-expand'],
|
|
23026
23778
|
setup(props, {
|
|
@@ -23519,9 +24271,9 @@ const props$2 = {
|
|
|
23519
24271
|
|
|
23520
24272
|
/** @jsxImportSource vue */
|
|
23521
24273
|
|
|
23522
|
-
const COMPONENT_NAME$
|
|
24274
|
+
const COMPONENT_NAME$5 = 'vc-tree';
|
|
23523
24275
|
const Tree = /* @__PURE__ */ vue.defineComponent({
|
|
23524
|
-
name: COMPONENT_NAME$
|
|
24276
|
+
name: COMPONENT_NAME$5,
|
|
23525
24277
|
props: props$2,
|
|
23526
24278
|
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'],
|
|
23527
24279
|
setup(props, {
|
|
@@ -23716,6 +24468,225 @@ const Tree = /* @__PURE__ */ vue.defineComponent({
|
|
|
23716
24468
|
}
|
|
23717
24469
|
});
|
|
23718
24470
|
|
|
24471
|
+
/** @jsxImportSource vue */
|
|
24472
|
+
|
|
24473
|
+
const COMPONENT_NAME$4 = 'vc-tree-select-content';
|
|
24474
|
+
const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
|
|
24475
|
+
name: COMPONENT_NAME$4,
|
|
24476
|
+
props: {
|
|
24477
|
+
value: {
|
|
24478
|
+
type: Array,
|
|
24479
|
+
required: true
|
|
24480
|
+
},
|
|
24481
|
+
data: {
|
|
24482
|
+
type: Array,
|
|
24483
|
+
default: () => []
|
|
24484
|
+
},
|
|
24485
|
+
checkStrictly: {
|
|
24486
|
+
type: Boolean,
|
|
24487
|
+
default: false
|
|
24488
|
+
},
|
|
24489
|
+
renderNodeLabel: Function
|
|
24490
|
+
},
|
|
24491
|
+
emits: ['change'],
|
|
24492
|
+
setup(props, {
|
|
24493
|
+
emit
|
|
24494
|
+
}) {
|
|
24495
|
+
return () => {
|
|
24496
|
+
return vue.createVNode(Scroller, {
|
|
24497
|
+
"class": "vc-tree-select__options",
|
|
24498
|
+
"max-height": "200px"
|
|
24499
|
+
}, {
|
|
24500
|
+
default: () => [vue.createVNode(Tree, {
|
|
24501
|
+
"model-value": props.value,
|
|
24502
|
+
"expanded-values": props.value,
|
|
24503
|
+
"data": props.data,
|
|
24504
|
+
"checkStrictly": props.checkStrictly,
|
|
24505
|
+
"allowDispatch": false,
|
|
24506
|
+
"showCheckbox": true,
|
|
24507
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
24508
|
+
"onChange": (_, data) => emit('change', _, data)
|
|
24509
|
+
}, null)]
|
|
24510
|
+
});
|
|
24511
|
+
};
|
|
24512
|
+
}
|
|
24513
|
+
});
|
|
24514
|
+
|
|
24515
|
+
/** @jsxImportSource vue */
|
|
24516
|
+
|
|
24517
|
+
const COMPONENT_NAME$3 = 'vc-tree-select-content-cascader';
|
|
24518
|
+
const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
|
|
24519
|
+
name: COMPONENT_NAME$3,
|
|
24520
|
+
props: {
|
|
24521
|
+
value: {
|
|
24522
|
+
type: Array,
|
|
24523
|
+
required: true
|
|
24524
|
+
},
|
|
24525
|
+
data: {
|
|
24526
|
+
type: Array,
|
|
24527
|
+
default: () => []
|
|
24528
|
+
},
|
|
24529
|
+
checkStrictly: {
|
|
24530
|
+
type: Boolean,
|
|
24531
|
+
default: false
|
|
24532
|
+
},
|
|
24533
|
+
renderNodeLabel: Function,
|
|
24534
|
+
numerable: {
|
|
24535
|
+
type: Boolean,
|
|
24536
|
+
default: false
|
|
24537
|
+
},
|
|
24538
|
+
separator: {
|
|
24539
|
+
type: String,
|
|
24540
|
+
default: ','
|
|
24541
|
+
},
|
|
24542
|
+
max: {
|
|
24543
|
+
type: Number,
|
|
24544
|
+
default: 1
|
|
24545
|
+
},
|
|
24546
|
+
nullValue: {
|
|
24547
|
+
type: [Number, String, Object],
|
|
24548
|
+
default: void 0
|
|
24549
|
+
}
|
|
24550
|
+
},
|
|
24551
|
+
emits: ['change'],
|
|
24552
|
+
setup(props, {
|
|
24553
|
+
emit
|
|
24554
|
+
}) {
|
|
24555
|
+
const treeRef = vue.ref(null);
|
|
24556
|
+
/** hover 展开路径,与 Cascader 一致 */
|
|
24557
|
+
const currentValue = vue.ref([]);
|
|
24558
|
+
const rebuildData = vue.computed(() => {
|
|
24559
|
+
if (!props.data.length) return [];
|
|
24560
|
+
let temp = props.data;
|
|
24561
|
+
const data = [];
|
|
24562
|
+
currentValue.value.forEach(cur => {
|
|
24563
|
+
const col = temp;
|
|
24564
|
+
data.push(col);
|
|
24565
|
+
const next = (temp.find(i => i.value == cur) || {}).children || [];
|
|
24566
|
+
temp = next;
|
|
24567
|
+
});
|
|
24568
|
+
data.push(temp);
|
|
24569
|
+
return data;
|
|
24570
|
+
});
|
|
24571
|
+
/** 驱动列区在 TreeStore 更新后重绘 */
|
|
24572
|
+
const panelTick = vue.ref(0);
|
|
24573
|
+
const columns = vue.computed(() => Array.from({
|
|
24574
|
+
length: currentValue.value.length + 1
|
|
24575
|
+
}).map((_, index) => index));
|
|
24576
|
+
const handleHover = (value, columnIndex) => {
|
|
24577
|
+
const len = currentValue.value.length - columnIndex;
|
|
24578
|
+
currentValue.value.splice(columnIndex, len, value);
|
|
24579
|
+
};
|
|
24580
|
+
const sync = async () => {
|
|
24581
|
+
await vue.nextTick();
|
|
24582
|
+
const tree = treeRef.value;
|
|
24583
|
+
if (!tree) return;
|
|
24584
|
+
const data = {
|
|
24585
|
+
checkedNodes: tree.getCheckedNodes(),
|
|
24586
|
+
checkedValues: tree.getCheckedValues(),
|
|
24587
|
+
halfCheckedNodes: tree.getHalfCheckedNodes(),
|
|
24588
|
+
halfCheckedValues: tree.getHalfCheckedValues()
|
|
24589
|
+
};
|
|
24590
|
+
panelTick.value++;
|
|
24591
|
+
emit('change', null, data);
|
|
24592
|
+
};
|
|
24593
|
+
const getNodeState = item => {
|
|
24594
|
+
const tree = treeRef.value;
|
|
24595
|
+
if (!tree) {
|
|
24596
|
+
return {
|
|
24597
|
+
checked: false,
|
|
24598
|
+
indeterminate: false
|
|
24599
|
+
};
|
|
24600
|
+
}
|
|
24601
|
+
const node = tree.getNode(item);
|
|
24602
|
+
if (!node) {
|
|
24603
|
+
return {
|
|
24604
|
+
checked: false,
|
|
24605
|
+
indeterminate: false
|
|
24606
|
+
};
|
|
24607
|
+
}
|
|
24608
|
+
return {
|
|
24609
|
+
checked: !!node.states.checked,
|
|
24610
|
+
indeterminate: !!node.states.indeterminate
|
|
24611
|
+
};
|
|
24612
|
+
};
|
|
24613
|
+
const hasChildren = item => {
|
|
24614
|
+
return !!(item.children && item.children.length > 0);
|
|
24615
|
+
};
|
|
24616
|
+
const handleCheckboxChange = async (v, item) => {
|
|
24617
|
+
const tree = treeRef.value;
|
|
24618
|
+
if (!tree) return;
|
|
24619
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
24620
|
+
sync();
|
|
24621
|
+
};
|
|
24622
|
+
const handleLabelClick = (v, item) => {
|
|
24623
|
+
const tree = treeRef.value;
|
|
24624
|
+
if (!tree) return;
|
|
24625
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
24626
|
+
sync();
|
|
24627
|
+
};
|
|
24628
|
+
return () => {
|
|
24629
|
+
return vue.createVNode("div", {
|
|
24630
|
+
"class": "vc-tree-select__cascader"
|
|
24631
|
+
}, [vue.createVNode(Tree, {
|
|
24632
|
+
"ref": treeRef,
|
|
24633
|
+
"class": "vc-tree-select__cascader-tree-hidden",
|
|
24634
|
+
"model-value": props.value,
|
|
24635
|
+
"expanded-values": props.value,
|
|
24636
|
+
"data": props.data,
|
|
24637
|
+
"checkStrictly": props.checkStrictly,
|
|
24638
|
+
"allowDispatch": false,
|
|
24639
|
+
"showCheckbox": true,
|
|
24640
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
24641
|
+
"numerable": props.numerable,
|
|
24642
|
+
"separator": props.separator,
|
|
24643
|
+
"max": props.max,
|
|
24644
|
+
"nullValue": props.nullValue
|
|
24645
|
+
}, null), vue.createVNode("div", {
|
|
24646
|
+
"class": "vc-tree-select__cascader-columns"
|
|
24647
|
+
}, [columns.value.map(columnIndex => {
|
|
24648
|
+
const col = rebuildData.value[columnIndex];
|
|
24649
|
+
if (!col || !col.length) return null;
|
|
24650
|
+
return vue.createVNode("div", {
|
|
24651
|
+
"class": "vc-tree-select__cascader-column",
|
|
24652
|
+
"key": columnIndex
|
|
24653
|
+
}, [vue.createVNode("div", {
|
|
24654
|
+
"class": "vc-tree-select__cascader-column-wrapper"
|
|
24655
|
+
}, [col.map(item => {
|
|
24656
|
+
const state = getNodeState(item);
|
|
24657
|
+
const isSelect = currentValue.value[columnIndex] === item.value;
|
|
24658
|
+
const child = hasChildren(item);
|
|
24659
|
+
return vue.createVNode("div", {
|
|
24660
|
+
"key": item.value,
|
|
24661
|
+
"class": ['vc-tree-select__cascader-item', {
|
|
24662
|
+
'is-select': isSelect
|
|
24663
|
+
}],
|
|
24664
|
+
"onMouseenter": () => handleHover(item.value, columnIndex),
|
|
24665
|
+
"onClick": () => handleLabelClick(!state.checked, item)
|
|
24666
|
+
}, [vue.createVNode("span", {
|
|
24667
|
+
"class": "vc-tree-select__cascader-checkbox",
|
|
24668
|
+
"onClick": e => e.stopPropagation()
|
|
24669
|
+
}, [vue.createVNode(Checkbox, {
|
|
24670
|
+
"modelValue": state.checked,
|
|
24671
|
+
"indeterminate": state.indeterminate,
|
|
24672
|
+
"disabled": !!item.disabled,
|
|
24673
|
+
"onChange": v => handleCheckboxChange(v, item)
|
|
24674
|
+
}, null)]), vue.createVNode("span", {
|
|
24675
|
+
"class": "vc-tree-select__cascader-label"
|
|
24676
|
+
}, [props.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
|
|
24677
|
+
"render": props.renderNodeLabel,
|
|
24678
|
+
"store": treeRef.value.getNode(item),
|
|
24679
|
+
"row": item
|
|
24680
|
+
}, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
|
|
24681
|
+
"type": "right",
|
|
24682
|
+
"class": "vc-tree-select__cascader-icon"
|
|
24683
|
+
}, null) : null]);
|
|
24684
|
+
})])]);
|
|
24685
|
+
})])]);
|
|
24686
|
+
};
|
|
24687
|
+
}
|
|
24688
|
+
});
|
|
24689
|
+
|
|
23719
24690
|
const treeKeys = [
|
|
23720
24691
|
"checkStrictly",
|
|
23721
24692
|
"data",
|
|
@@ -23724,7 +24695,18 @@ const treeKeys = [
|
|
|
23724
24695
|
];
|
|
23725
24696
|
const props$1 = {
|
|
23726
24697
|
...props$1a,
|
|
23727
|
-
...lodashEs.pick(props$2, treeKeys)
|
|
24698
|
+
...lodashEs.pick(props$2, treeKeys),
|
|
24699
|
+
autoWidth: {
|
|
24700
|
+
type: Boolean,
|
|
24701
|
+
default: void 0
|
|
24702
|
+
},
|
|
24703
|
+
/**
|
|
24704
|
+
* 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
|
|
24705
|
+
*/
|
|
24706
|
+
cascader: {
|
|
24707
|
+
type: Boolean,
|
|
24708
|
+
default: false
|
|
24709
|
+
}
|
|
23728
24710
|
};
|
|
23729
24711
|
|
|
23730
24712
|
/** @jsxImportSource vue */
|
|
@@ -23750,12 +24732,37 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23750
24732
|
const searchValue = vue.ref('');
|
|
23751
24733
|
const searchRegex = vue.ref(new RegExp(''));
|
|
23752
24734
|
const currentValue = vue.ref([]);
|
|
24735
|
+
const currentValueGroups = vue.computed(() => {
|
|
24736
|
+
if (props.checkStrictly) return;
|
|
24737
|
+
if (!props.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
|
|
24738
|
+
return [];
|
|
24739
|
+
}
|
|
24740
|
+
const pathMap = new Map();
|
|
24741
|
+
const traverse = (data, path = []) => {
|
|
24742
|
+
data.forEach(item => {
|
|
24743
|
+
const v = item.value;
|
|
24744
|
+
if (v == null) return;
|
|
24745
|
+
const fullPath = [...path, v];
|
|
24746
|
+
pathMap.set(v, fullPath);
|
|
24747
|
+
if (item.children?.length) traverse(item.children, fullPath);
|
|
24748
|
+
});
|
|
24749
|
+
};
|
|
24750
|
+
traverse(props.data);
|
|
24751
|
+
const allPaths = currentValue.value.map(v => pathMap.get(v)).filter(Boolean);
|
|
24752
|
+
return allPaths.filter(path => !allPaths.some(other => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
|
|
24753
|
+
});
|
|
23753
24754
|
const source = vue.computed(() => {
|
|
23754
24755
|
return flattenData$1(props.data, {
|
|
23755
24756
|
parent: true,
|
|
23756
24757
|
cascader: true
|
|
23757
24758
|
});
|
|
23758
24759
|
});
|
|
24760
|
+
const labelMap = vue.computed(() => {
|
|
24761
|
+
return source.value.reduce((pre, cur) => {
|
|
24762
|
+
pre[cur.value] = cur.label || '';
|
|
24763
|
+
return pre;
|
|
24764
|
+
}, {});
|
|
24765
|
+
});
|
|
23759
24766
|
const icon = vue.computed(() => {
|
|
23760
24767
|
return isActive.value ? 'up' : 'down';
|
|
23761
24768
|
});
|
|
@@ -23772,17 +24779,34 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23772
24779
|
'is-disabled': props.disabled
|
|
23773
24780
|
};
|
|
23774
24781
|
});
|
|
23775
|
-
const
|
|
24782
|
+
const displayTags = vue.computed(() => {
|
|
23776
24783
|
if (!props.data.length) {
|
|
23777
24784
|
return [];
|
|
23778
24785
|
}
|
|
23779
|
-
|
|
24786
|
+
if (props.checkStrictly) {
|
|
24787
|
+
return currentValue.value.map(v => ({
|
|
24788
|
+
value: v,
|
|
24789
|
+
label: labelMap.value[v] || ''
|
|
24790
|
+
}));
|
|
24791
|
+
}
|
|
24792
|
+
return (currentValueGroups.value || []).map(path => {
|
|
24793
|
+
const value = path[path.length - 1];
|
|
24794
|
+
const label = path.map(v => labelMap.value[v] || '').filter(Boolean).join(' / ');
|
|
24795
|
+
return {
|
|
24796
|
+
path,
|
|
24797
|
+
value,
|
|
24798
|
+
label
|
|
24799
|
+
};
|
|
24800
|
+
});
|
|
23780
24801
|
});
|
|
23781
24802
|
const collapseTagCount = vue.computed(() => {
|
|
23782
24803
|
if (!props.maxTags) return 0;
|
|
23783
|
-
const v =
|
|
24804
|
+
const v = displayTags.value.length - props.maxTags;
|
|
23784
24805
|
return v < 0 ? 0 : v;
|
|
23785
24806
|
});
|
|
24807
|
+
const autoWidth = vue.computed(() => {
|
|
24808
|
+
return typeof props.autoWidth === 'boolean' ? props.autoWidth : !!props.cascader;
|
|
24809
|
+
});
|
|
23786
24810
|
|
|
23787
24811
|
/**
|
|
23788
24812
|
* v-model 同步, 外部的数据改变时不会触发
|
|
@@ -23795,8 +24819,9 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23795
24819
|
separator: props.separator,
|
|
23796
24820
|
nullValue: props.nullValue
|
|
23797
24821
|
});
|
|
23798
|
-
|
|
23799
|
-
emit('
|
|
24822
|
+
const labels = displayTags.value.map(item => item.label);
|
|
24823
|
+
emit('update:modelValue', v, labels);
|
|
24824
|
+
emit('change', v, labels);
|
|
23800
24825
|
|
|
23801
24826
|
// form表单
|
|
23802
24827
|
formItem?.change?.(currentValue.value);
|
|
@@ -23821,8 +24846,15 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23821
24846
|
const close = () => {
|
|
23822
24847
|
isActive.value = false;
|
|
23823
24848
|
};
|
|
23824
|
-
const handleClose =
|
|
23825
|
-
|
|
24849
|
+
const handleClose = item => {
|
|
24850
|
+
if (props.checkStrictly) {
|
|
24851
|
+
const index = currentValue.value.findIndex(v => v === item.value);
|
|
24852
|
+
if (index === -1) return;
|
|
24853
|
+
currentValue.value = currentValue.value.filter((_, i) => i !== index);
|
|
24854
|
+
} else if (item.path) {
|
|
24855
|
+
const remaining = (currentValueGroups.value || []).filter(p => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
|
|
24856
|
+
currentValue.value = [...new Set(remaining.flat())];
|
|
24857
|
+
}
|
|
23826
24858
|
sync();
|
|
23827
24859
|
};
|
|
23828
24860
|
const handleClear = e => {
|
|
@@ -23859,6 +24891,7 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23859
24891
|
multiple,
|
|
23860
24892
|
isActive,
|
|
23861
24893
|
current: currentValue,
|
|
24894
|
+
currentValueGroups,
|
|
23862
24895
|
// for portal
|
|
23863
24896
|
toggle(v) {
|
|
23864
24897
|
v = typeof v === 'boolean' ? v : !isActive.value;
|
|
@@ -23873,7 +24906,7 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23873
24906
|
"trigger": props.trigger,
|
|
23874
24907
|
"tag": props.tag,
|
|
23875
24908
|
"placement": props.placement,
|
|
23876
|
-
"
|
|
24909
|
+
"autoWidth": autoWidth.value,
|
|
23877
24910
|
"disabled": props.disabled,
|
|
23878
24911
|
"portalClass": [['is-padding-none', props.portalClass]],
|
|
23879
24912
|
"class": [classes.value, its.value.class, 'vc-tree-select'],
|
|
@@ -23890,22 +24923,22 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23890
24923
|
return vue.createVNode(Input, {
|
|
23891
24924
|
"id": props.id,
|
|
23892
24925
|
"disabled": props.disabled,
|
|
23893
|
-
"modelValue":
|
|
24926
|
+
"modelValue": displayTags.value[0]?.label || props.extra,
|
|
23894
24927
|
"allow-dispatch": false,
|
|
23895
24928
|
"class": "vc-tree-select__input",
|
|
23896
24929
|
"readonly": true,
|
|
23897
24930
|
"placeholder": its.value.attrs?.placeholder || '请选择'
|
|
23898
24931
|
}, {
|
|
23899
|
-
content: multiple.value &&
|
|
24932
|
+
content: multiple.value && displayTags.value.length > 0 ? () => {
|
|
23900
24933
|
return vue.createVNode("div", {
|
|
23901
24934
|
"class": [classes.value, 'vc-tree-select__tags']
|
|
23902
|
-
}, [
|
|
24935
|
+
}, [displayTags.value.slice(0, props.maxTags).map(item => {
|
|
23903
24936
|
return vue.createVNode(Tag, {
|
|
23904
|
-
"key": item,
|
|
24937
|
+
"key": item.path ? item.path.join('-') : item.value,
|
|
23905
24938
|
"closable": !props.disabled,
|
|
23906
|
-
"onClose": () => handleClose(
|
|
24939
|
+
"onClose": () => handleClose(item)
|
|
23907
24940
|
}, {
|
|
23908
|
-
default: () => [
|
|
24941
|
+
default: () => [item.label]
|
|
23909
24942
|
});
|
|
23910
24943
|
}), collapseTagCount.value ? vue.createVNode(Tag, null, {
|
|
23911
24944
|
default: () => [`+${collapseTagCount.value}...`]
|
|
@@ -23938,16 +24971,23 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
|
|
|
23938
24971
|
}, [vue.createVNode(Spin, {
|
|
23939
24972
|
"size": 16
|
|
23940
24973
|
}, null)]), vue.createVNode(Scroller, {
|
|
23941
|
-
"class":
|
|
24974
|
+
"class": ['vc-tree-select__options', props.cascader && 'is-cascader'],
|
|
23942
24975
|
"max-height": "200px"
|
|
23943
24976
|
}, {
|
|
23944
|
-
default: () => [vue.createVNode(
|
|
23945
|
-
"
|
|
23946
|
-
"
|
|
24977
|
+
default: () => [props.cascader ? vue.createVNode(TreeSelectContentCascader, {
|
|
24978
|
+
"value": currentValue.value,
|
|
24979
|
+
"data": props.data,
|
|
24980
|
+
"checkStrictly": props.checkStrictly,
|
|
24981
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
24982
|
+
"numerable": props.numerable,
|
|
24983
|
+
"separator": props.separator,
|
|
24984
|
+
"max": props.max,
|
|
24985
|
+
"nullValue": props.nullValue,
|
|
24986
|
+
"onChange": handleChange
|
|
24987
|
+
}, null) : vue.createVNode(TreeSelectContent, {
|
|
24988
|
+
"value": currentValue.value,
|
|
23947
24989
|
"data": props.data,
|
|
23948
24990
|
"checkStrictly": props.checkStrictly,
|
|
23949
|
-
"allowDispatch": false,
|
|
23950
|
-
"showCheckbox": true,
|
|
23951
24991
|
"renderNodeLabel": props.renderNodeLabel,
|
|
23952
24992
|
"onChange": handleChange
|
|
23953
24993
|
}, null)]
|
|
@@ -24523,6 +25563,7 @@ exports.ButtonGroup = ButtonGroup;
|
|
|
24523
25563
|
exports.Calendar = Calendar;
|
|
24524
25564
|
exports.Card = Card;
|
|
24525
25565
|
exports.Carousel = Carousel;
|
|
25566
|
+
exports.CarouselItem = CarouselItem;
|
|
24526
25567
|
exports.Cascader = Cascader;
|
|
24527
25568
|
exports.Chart = Chart;
|
|
24528
25569
|
exports.Checkbox = Checkbox;
|
|
@@ -24568,6 +25609,7 @@ exports.MButtonGroup = MButtonGroup;
|
|
|
24568
25609
|
exports.MCalendar = MCalendar;
|
|
24569
25610
|
exports.MCard = MCard;
|
|
24570
25611
|
exports.MCarousel = MCarousel;
|
|
25612
|
+
exports.MCarouselItem = MCarouselItem;
|
|
24571
25613
|
exports.MCascader = MCascader;
|
|
24572
25614
|
exports.MChart = MChart;
|
|
24573
25615
|
exports.MCheckbox = MCheckbox;
|