@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.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { reactive, defineComponent, createVNode, inject, shallowRef, ref, computed, onMounted, onBeforeUnmount, provide, nextTick, watch, getCurrentInstance, TransitionGroup, Transition as Transition$1, h,
|
|
1
|
+
import { reactive, defineComponent, createVNode, inject, shallowRef, ref, computed, onMounted, onBeforeUnmount, provide, nextTick, watch, getCurrentInstance, TransitionGroup, Transition as Transition$1, h, withModifiers, withDirectives, vShow, onBeforeMount, createTextVNode, mergeProps, createApp, Fragment as Fragment$1, Teleport, onUnmounted, isVNode, toRaw, onUpdated, resolveComponent, useAttrs as useAttrs$1 } from 'vue';
|
|
2
2
|
import * as $ from '@deot/helper-dom';
|
|
3
|
-
import { getScroller as getScroller$1, composedPath, scrollIntoView,
|
|
3
|
+
import { getScroller as getScroller$1, prefixStyle, composedPath, scrollIntoView, getStyle, removeClass, addClass, hasClass } from '@deot/helper-dom';
|
|
4
4
|
import * as Utils from '@deot/helper-utils';
|
|
5
5
|
import { raf, getUid, preZero, getPropByPath, throttle as throttle$1, hasOwn } from '@deot/helper-utils';
|
|
6
|
-
import { debounce, cloneDeep, pick, isEqualWith, startCase,
|
|
7
|
-
import { useAttrs, useScrollbar, getInstance } from '@deot/vc-hooks';
|
|
6
|
+
import { debounce, throttle, cloneDeep, pick, isEqualWith, startCase, concat, max, merge, isEmpty as isEmpty$1, kebabCase, difference } from 'lodash-es';
|
|
8
7
|
import { Resize } from '@deot/helper-resize';
|
|
8
|
+
import { useAttrs, useScrollbar, getInstance } from '@deot/vc-hooks';
|
|
9
9
|
import { Utils as Utils$1, IS_SERVER as IS_SERVER$1 } from '@deot/vc-shared';
|
|
10
10
|
import { Wheel } from '@deot/helper-wheel';
|
|
11
11
|
import * as Load from '@deot/helper-load';
|
|
@@ -90,7 +90,7 @@ class Instance {
|
|
|
90
90
|
}
|
|
91
91
|
const VcInstance = new Instance();
|
|
92
92
|
|
|
93
|
-
const props$
|
|
93
|
+
const props$1v = {
|
|
94
94
|
tag: {
|
|
95
95
|
type: String,
|
|
96
96
|
default: "div"
|
|
@@ -99,10 +99,10 @@ const props$1u = {
|
|
|
99
99
|
|
|
100
100
|
/** @jsxImportSource vue */
|
|
101
101
|
|
|
102
|
-
const COMPONENT_NAME$
|
|
102
|
+
const COMPONENT_NAME$2g = 'vc-action-sheet';
|
|
103
103
|
const ActionSheet = /* @__PURE__ */ defineComponent({
|
|
104
|
-
name: COMPONENT_NAME$
|
|
105
|
-
props: props$
|
|
104
|
+
name: COMPONENT_NAME$2g,
|
|
105
|
+
props: props$1v,
|
|
106
106
|
setup(props, {
|
|
107
107
|
slots
|
|
108
108
|
}) {
|
|
@@ -116,7 +116,7 @@ const ActionSheet = /* @__PURE__ */ defineComponent({
|
|
|
116
116
|
|
|
117
117
|
const MActionSheet = ActionSheet;
|
|
118
118
|
|
|
119
|
-
const props$
|
|
119
|
+
const props$1u = {
|
|
120
120
|
modelValue: {
|
|
121
121
|
type: Boolean,
|
|
122
122
|
default: false
|
|
@@ -178,11 +178,11 @@ const isWheel = (el) => {
|
|
|
178
178
|
|
|
179
179
|
/** @jsxImportSource vue */
|
|
180
180
|
|
|
181
|
-
const COMPONENT_NAME$
|
|
181
|
+
const COMPONENT_NAME$2f = 'vc-affix';
|
|
182
182
|
const Affix = /* @__PURE__ */ defineComponent({
|
|
183
|
-
name: COMPONENT_NAME$
|
|
183
|
+
name: COMPONENT_NAME$2f,
|
|
184
184
|
emits: ['update:modelValue'],
|
|
185
|
-
props: props$
|
|
185
|
+
props: props$1u,
|
|
186
186
|
setup(props, {
|
|
187
187
|
slots,
|
|
188
188
|
expose,
|
|
@@ -348,7 +348,7 @@ const Affix = /* @__PURE__ */ defineComponent({
|
|
|
348
348
|
|
|
349
349
|
const MAffix = Affix;
|
|
350
350
|
|
|
351
|
-
const props$
|
|
351
|
+
const props$1t = {
|
|
352
352
|
modelValue: {
|
|
353
353
|
type: Boolean,
|
|
354
354
|
default: true
|
|
@@ -375,7 +375,7 @@ const props$1s = {
|
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
377
|
|
|
378
|
-
const props$
|
|
378
|
+
const props$1s = {
|
|
379
379
|
type: String,
|
|
380
380
|
inherit: {
|
|
381
381
|
type: Boolean,
|
|
@@ -512,10 +512,10 @@ const IconManager = new Manager();
|
|
|
512
512
|
|
|
513
513
|
/** @jsxImportSource vue */
|
|
514
514
|
|
|
515
|
-
const COMPONENT_NAME$
|
|
515
|
+
const COMPONENT_NAME$2e = 'vc-icon';
|
|
516
516
|
const Icon = /* @__PURE__ */ defineComponent({
|
|
517
|
-
name: COMPONENT_NAME$
|
|
518
|
-
props: props$
|
|
517
|
+
name: COMPONENT_NAME$2e,
|
|
518
|
+
props: props$1s,
|
|
519
519
|
setup(props) {
|
|
520
520
|
const viewBox = ref('0 0 1024 1024');
|
|
521
521
|
const path = ref([]);
|
|
@@ -548,7 +548,7 @@ const Icon = /* @__PURE__ */ defineComponent({
|
|
|
548
548
|
}
|
|
549
549
|
});
|
|
550
550
|
|
|
551
|
-
const props$
|
|
551
|
+
const props$1r = {
|
|
552
552
|
/**
|
|
553
553
|
* 进入/离开持续时间
|
|
554
554
|
* {enter: 300, leave: 300}
|
|
@@ -713,10 +713,10 @@ const useTransition = () => {
|
|
|
713
713
|
};
|
|
714
714
|
};
|
|
715
715
|
|
|
716
|
-
const COMPONENT_NAME$
|
|
716
|
+
const COMPONENT_NAME$2d = "vc-transition";
|
|
717
717
|
const Transition = defineComponent({
|
|
718
|
-
name: COMPONENT_NAME$
|
|
719
|
-
props: props$
|
|
718
|
+
name: COMPONENT_NAME$2d,
|
|
719
|
+
props: props$1r,
|
|
720
720
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
721
721
|
inheritAttrs: false,
|
|
722
722
|
setup(props, { slots, attrs }) {
|
|
@@ -736,10 +736,10 @@ const Transition = defineComponent({
|
|
|
736
736
|
}
|
|
737
737
|
});
|
|
738
738
|
|
|
739
|
-
const COMPONENT_NAME$
|
|
739
|
+
const COMPONENT_NAME$2c = "vc-transition-collapse";
|
|
740
740
|
const TransitionCollapse = defineComponent({
|
|
741
|
-
name: COMPONENT_NAME$
|
|
742
|
-
props: props$
|
|
741
|
+
name: COMPONENT_NAME$2c,
|
|
742
|
+
props: props$1r,
|
|
743
743
|
// 当不声明emits的情况下,事件存在于attrs中
|
|
744
744
|
inheritAttrs: false,
|
|
745
745
|
setup(props, { slots, attrs: _attrs }) {
|
|
@@ -853,11 +853,11 @@ const TransitionCollapse = defineComponent({
|
|
|
853
853
|
}
|
|
854
854
|
});
|
|
855
855
|
|
|
856
|
-
const COMPONENT_NAME$
|
|
856
|
+
const COMPONENT_NAME$2b = "vc-transition-fade";
|
|
857
857
|
const TransitionFade = defineComponent({
|
|
858
|
-
name: COMPONENT_NAME$
|
|
858
|
+
name: COMPONENT_NAME$2b,
|
|
859
859
|
props: {
|
|
860
|
-
...props$
|
|
860
|
+
...props$1r,
|
|
861
861
|
// inheritAttrs必须是false
|
|
862
862
|
style: {
|
|
863
863
|
type: Object,
|
|
@@ -890,11 +890,11 @@ const TransitionFade = defineComponent({
|
|
|
890
890
|
}
|
|
891
891
|
});
|
|
892
892
|
|
|
893
|
-
const COMPONENT_NAME$
|
|
893
|
+
const COMPONENT_NAME$2a = "vc-transition-scale";
|
|
894
894
|
const TransitionScale = defineComponent({
|
|
895
|
-
name: COMPONENT_NAME$
|
|
895
|
+
name: COMPONENT_NAME$2a,
|
|
896
896
|
props: {
|
|
897
|
-
...props$
|
|
897
|
+
...props$1r,
|
|
898
898
|
mode: {
|
|
899
899
|
type: String,
|
|
900
900
|
default: "both",
|
|
@@ -932,11 +932,11 @@ const TransitionScale = defineComponent({
|
|
|
932
932
|
}
|
|
933
933
|
});
|
|
934
934
|
|
|
935
|
-
const COMPONENT_NAME$
|
|
935
|
+
const COMPONENT_NAME$29 = "vc-transition-slide";
|
|
936
936
|
const TransitionSlide = defineComponent({
|
|
937
|
-
name: COMPONENT_NAME$
|
|
937
|
+
name: COMPONENT_NAME$29,
|
|
938
938
|
props: {
|
|
939
|
-
...props$
|
|
939
|
+
...props$1r,
|
|
940
940
|
mode: {
|
|
941
941
|
type: String,
|
|
942
942
|
default: "left",
|
|
@@ -974,11 +974,11 @@ const TransitionSlide = defineComponent({
|
|
|
974
974
|
}
|
|
975
975
|
});
|
|
976
976
|
|
|
977
|
-
const COMPONENT_NAME$
|
|
977
|
+
const COMPONENT_NAME$28 = "vc-transition-zoom";
|
|
978
978
|
const TransitionZoom = defineComponent({
|
|
979
|
-
name: COMPONENT_NAME$
|
|
979
|
+
name: COMPONENT_NAME$28,
|
|
980
980
|
props: {
|
|
981
|
-
...props$
|
|
981
|
+
...props$1r,
|
|
982
982
|
mode: {
|
|
983
983
|
type: String,
|
|
984
984
|
default: "x",
|
|
@@ -1018,7 +1018,7 @@ const TransitionZoom = defineComponent({
|
|
|
1018
1018
|
|
|
1019
1019
|
/** @jsxImportSource vue */
|
|
1020
1020
|
|
|
1021
|
-
const COMPONENT_NAME$
|
|
1021
|
+
const COMPONENT_NAME$27 = 'vc-alert';
|
|
1022
1022
|
|
|
1023
1023
|
// [color, borderColor, backgroundColor], -> CSS
|
|
1024
1024
|
const THEME_MAP = {
|
|
@@ -1028,8 +1028,8 @@ const THEME_MAP = {
|
|
|
1028
1028
|
warning: ['#ffbf00', '#ffe58f', '#fffbe6']
|
|
1029
1029
|
};
|
|
1030
1030
|
const Alert = /* @__PURE__ */ defineComponent({
|
|
1031
|
-
name: COMPONENT_NAME$
|
|
1032
|
-
props: props$
|
|
1031
|
+
name: COMPONENT_NAME$27,
|
|
1032
|
+
props: props$1t,
|
|
1033
1033
|
setup(props, {
|
|
1034
1034
|
slots,
|
|
1035
1035
|
emit
|
|
@@ -1118,7 +1118,7 @@ const Alert = /* @__PURE__ */ defineComponent({
|
|
|
1118
1118
|
|
|
1119
1119
|
const MAlert = Alert;
|
|
1120
1120
|
|
|
1121
|
-
const props$
|
|
1121
|
+
const props$1q = {
|
|
1122
1122
|
// canvas配置参数
|
|
1123
1123
|
options: Object,
|
|
1124
1124
|
width: {
|
|
@@ -1134,10 +1134,10 @@ const props$1p = {
|
|
|
1134
1134
|
/** @jsxImportSource vue */
|
|
1135
1135
|
|
|
1136
1136
|
const isTouch = typeof document !== 'undefined' && 'ontouchend' in document;
|
|
1137
|
-
const COMPONENT_NAME$
|
|
1137
|
+
const COMPONENT_NAME$26 = 'vc-artboard';
|
|
1138
1138
|
const Artboard = /* @__PURE__ */ defineComponent({
|
|
1139
|
-
name: COMPONENT_NAME$
|
|
1140
|
-
props: props$
|
|
1139
|
+
name: COMPONENT_NAME$26,
|
|
1140
|
+
props: props$1q,
|
|
1141
1141
|
setup(props, {
|
|
1142
1142
|
emit,
|
|
1143
1143
|
expose
|
|
@@ -1340,7 +1340,7 @@ const Artboard = /* @__PURE__ */ defineComponent({
|
|
|
1340
1340
|
|
|
1341
1341
|
const MArtboard = Artboard;
|
|
1342
1342
|
|
|
1343
|
-
const props$
|
|
1343
|
+
const props$1p = {
|
|
1344
1344
|
size: {
|
|
1345
1345
|
type: Number,
|
|
1346
1346
|
default: 28
|
|
@@ -1364,10 +1364,10 @@ const props$1o = {
|
|
|
1364
1364
|
|
|
1365
1365
|
/** @jsxImportSource vue */
|
|
1366
1366
|
|
|
1367
|
-
const COMPONENT_NAME$
|
|
1367
|
+
const COMPONENT_NAME$25 = 'vc-spin';
|
|
1368
1368
|
const Spin = /* @__PURE__ */ defineComponent({
|
|
1369
|
-
name: COMPONENT_NAME$
|
|
1370
|
-
props: props$
|
|
1369
|
+
name: COMPONENT_NAME$25,
|
|
1370
|
+
props: props$1p,
|
|
1371
1371
|
setup(props, {
|
|
1372
1372
|
slots
|
|
1373
1373
|
}) {
|
|
@@ -1401,7 +1401,7 @@ const Spin = /* @__PURE__ */ defineComponent({
|
|
|
1401
1401
|
}
|
|
1402
1402
|
});
|
|
1403
1403
|
|
|
1404
|
-
const props$
|
|
1404
|
+
const props$1o = {
|
|
1405
1405
|
wait: {
|
|
1406
1406
|
type: Number,
|
|
1407
1407
|
default: 250
|
|
@@ -1417,10 +1417,10 @@ const props$1n = {
|
|
|
1417
1417
|
exclude: RegExp
|
|
1418
1418
|
};
|
|
1419
1419
|
|
|
1420
|
-
const COMPONENT_NAME$
|
|
1420
|
+
const COMPONENT_NAME$24 = "vc-debounce";
|
|
1421
1421
|
const Debounce = defineComponent({
|
|
1422
|
-
name: COMPONENT_NAME$
|
|
1423
|
-
props: props$
|
|
1422
|
+
name: COMPONENT_NAME$24,
|
|
1423
|
+
props: props$1o,
|
|
1424
1424
|
/**
|
|
1425
1425
|
* 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
|
|
1426
1426
|
* 如事件onClick
|
|
@@ -1460,7 +1460,7 @@ const Debounce = defineComponent({
|
|
|
1460
1460
|
}
|
|
1461
1461
|
});
|
|
1462
1462
|
|
|
1463
|
-
const props$
|
|
1463
|
+
const props$1n = {
|
|
1464
1464
|
tag: {
|
|
1465
1465
|
type: String,
|
|
1466
1466
|
default: "button"
|
|
@@ -1492,11 +1492,11 @@ const props$1m = {
|
|
|
1492
1492
|
|
|
1493
1493
|
/** @jsxImportSource vue */
|
|
1494
1494
|
|
|
1495
|
-
const COMPONENT_NAME$
|
|
1495
|
+
const COMPONENT_NAME$23 = 'vc-button';
|
|
1496
1496
|
const Button = /* @__PURE__ */ defineComponent({
|
|
1497
|
-
name: COMPONENT_NAME$
|
|
1497
|
+
name: COMPONENT_NAME$23,
|
|
1498
1498
|
emits: ['click'],
|
|
1499
|
-
props: props$
|
|
1499
|
+
props: props$1n,
|
|
1500
1500
|
setup(props, {
|
|
1501
1501
|
slots
|
|
1502
1502
|
}) {
|
|
@@ -1557,7 +1557,7 @@ const Button = /* @__PURE__ */ defineComponent({
|
|
|
1557
1557
|
}
|
|
1558
1558
|
});
|
|
1559
1559
|
|
|
1560
|
-
const props$
|
|
1560
|
+
const props$1m = {
|
|
1561
1561
|
vertical: {
|
|
1562
1562
|
type: Boolean,
|
|
1563
1563
|
default: false
|
|
@@ -1578,10 +1578,10 @@ const props$1l = {
|
|
|
1578
1578
|
|
|
1579
1579
|
/** @jsxImportSource vue */
|
|
1580
1580
|
|
|
1581
|
-
const COMPONENT_NAME$
|
|
1581
|
+
const COMPONENT_NAME$22 = 'vc-button-group';
|
|
1582
1582
|
const ButtonGroup = /* @__PURE__ */ defineComponent({
|
|
1583
|
-
name: COMPONENT_NAME$
|
|
1584
|
-
props: props$
|
|
1583
|
+
name: COMPONENT_NAME$22,
|
|
1584
|
+
props: props$1m,
|
|
1585
1585
|
setup(props, {
|
|
1586
1586
|
slots
|
|
1587
1587
|
}) {
|
|
@@ -1605,7 +1605,7 @@ const ButtonGroup = /* @__PURE__ */ defineComponent({
|
|
|
1605
1605
|
const MButton = Button;
|
|
1606
1606
|
const MButtonGroup = ButtonGroup;
|
|
1607
1607
|
|
|
1608
|
-
const props$
|
|
1608
|
+
const props$1l = {
|
|
1609
1609
|
tag: {
|
|
1610
1610
|
type: String,
|
|
1611
1611
|
default: "div"
|
|
@@ -1614,10 +1614,10 @@ const props$1k = {
|
|
|
1614
1614
|
|
|
1615
1615
|
/** @jsxImportSource vue */
|
|
1616
1616
|
|
|
1617
|
-
const COMPONENT_NAME$
|
|
1617
|
+
const COMPONENT_NAME$21 = 'vc-calendar';
|
|
1618
1618
|
const Calendar = /* @__PURE__ */ defineComponent({
|
|
1619
|
-
name: COMPONENT_NAME$
|
|
1620
|
-
props: props$
|
|
1619
|
+
name: COMPONENT_NAME$21,
|
|
1620
|
+
props: props$1l,
|
|
1621
1621
|
setup(props, {
|
|
1622
1622
|
slots
|
|
1623
1623
|
}) {
|
|
@@ -1631,7 +1631,7 @@ const Calendar = /* @__PURE__ */ defineComponent({
|
|
|
1631
1631
|
|
|
1632
1632
|
const MCalendar = Calendar;
|
|
1633
1633
|
|
|
1634
|
-
const props$
|
|
1634
|
+
const props$1k = {
|
|
1635
1635
|
border: {
|
|
1636
1636
|
type: Boolean,
|
|
1637
1637
|
default: true
|
|
@@ -1654,10 +1654,10 @@ const props$1j = {
|
|
|
1654
1654
|
|
|
1655
1655
|
/** @jsxImportSource vue */
|
|
1656
1656
|
|
|
1657
|
-
const COMPONENT_NAME$
|
|
1657
|
+
const COMPONENT_NAME$20 = 'vc-card';
|
|
1658
1658
|
const Card = /* @__PURE__ */ defineComponent({
|
|
1659
|
-
name: COMPONENT_NAME$
|
|
1660
|
-
props: props$
|
|
1659
|
+
name: COMPONENT_NAME$20,
|
|
1660
|
+
props: props$1k,
|
|
1661
1661
|
setup(props, {
|
|
1662
1662
|
slots
|
|
1663
1663
|
}) {
|
|
@@ -1683,31 +1683,736 @@ const Card = /* @__PURE__ */ defineComponent({
|
|
|
1683
1683
|
|
|
1684
1684
|
const MCard = Card;
|
|
1685
1685
|
|
|
1686
|
-
const
|
|
1687
|
-
|
|
1686
|
+
const DRAG_CLICK_SUPPRESS_PX = 5;
|
|
1687
|
+
const swallowNextClickFromDrag = () => {
|
|
1688
|
+
let invoked = false;
|
|
1689
|
+
const options = { capture: true, once: true };
|
|
1690
|
+
const swallow = (e) => {
|
|
1691
|
+
invoked = true;
|
|
1692
|
+
e.preventDefault();
|
|
1693
|
+
e.stopPropagation();
|
|
1694
|
+
e.stopImmediatePropagation();
|
|
1695
|
+
};
|
|
1696
|
+
document.addEventListener("click", swallow, options);
|
|
1697
|
+
setTimeout(() => !invoked && document.removeEventListener("click", swallow, options), 0);
|
|
1698
|
+
};
|
|
1699
|
+
const useCarousel = (wrapper, content, expose) => {
|
|
1700
|
+
const instance = getCurrentInstance();
|
|
1701
|
+
const props = instance.props;
|
|
1702
|
+
const { emit } = instance;
|
|
1703
|
+
const items = ref([]);
|
|
1704
|
+
const activeIndex = ref(-1);
|
|
1705
|
+
const timer = ref(null);
|
|
1706
|
+
const offset = ref(0);
|
|
1707
|
+
const carouselId = ref(getUid("carousel"));
|
|
1708
|
+
const start = ref();
|
|
1709
|
+
const startX = ref();
|
|
1710
|
+
const startY = ref();
|
|
1711
|
+
const dragMovedPastThreshold = ref(false);
|
|
1712
|
+
const allowTransition = ref(false);
|
|
1713
|
+
const direction = computed(() => {
|
|
1714
|
+
return props.vertical ? "vertical" : "horizontal";
|
|
1715
|
+
});
|
|
1716
|
+
const hasLabel = computed(() => {
|
|
1717
|
+
return items.value.some((item) => item.props.label.toString().length > 0);
|
|
1718
|
+
});
|
|
1719
|
+
const dotsClasses = computed(() => {
|
|
1720
|
+
const classes = ["is-" + direction.value];
|
|
1721
|
+
if (hasLabel.value) {
|
|
1722
|
+
classes.push("is-labels");
|
|
1723
|
+
}
|
|
1724
|
+
if (props.dots === "outside" || props.card) {
|
|
1725
|
+
classes.push("is-outside");
|
|
1726
|
+
}
|
|
1727
|
+
return classes;
|
|
1728
|
+
});
|
|
1729
|
+
const resetItems = (oldIndex) => {
|
|
1730
|
+
items.value.forEach((item, index) => {
|
|
1731
|
+
item.exposed?.reset?.(index, activeIndex.value, oldIndex);
|
|
1732
|
+
});
|
|
1733
|
+
};
|
|
1734
|
+
const playSlides = () => {
|
|
1735
|
+
allowTransition.value = true;
|
|
1736
|
+
if (activeIndex.value < items.value.length - 1) {
|
|
1737
|
+
activeIndex.value++;
|
|
1738
|
+
} else if (props.loop) {
|
|
1739
|
+
activeIndex.value = 0;
|
|
1740
|
+
}
|
|
1741
|
+
};
|
|
1742
|
+
const pauseTimer = () => {
|
|
1743
|
+
if (timer.value) {
|
|
1744
|
+
clearInterval(timer.value);
|
|
1745
|
+
timer.value = null;
|
|
1746
|
+
}
|
|
1747
|
+
};
|
|
1748
|
+
const startTimer = () => {
|
|
1749
|
+
if (props.t <= 0 || !props.autoplay || timer.value) return;
|
|
1750
|
+
timer.value = setInterval(playSlides, props.t);
|
|
1751
|
+
};
|
|
1752
|
+
const setActiveItem = (index) => {
|
|
1753
|
+
if (typeof index === "string") {
|
|
1754
|
+
const filteredItems = items.value.filter((item) => item.props.name === index);
|
|
1755
|
+
if (filteredItems.length > 0) {
|
|
1756
|
+
index = items.value.indexOf(filteredItems[0]);
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
index = Number(index);
|
|
1760
|
+
if (isNaN(index) || index !== Math.floor(index)) {
|
|
1761
|
+
throw new VcError("carousel", "索引必须是整数");
|
|
1762
|
+
}
|
|
1763
|
+
const length = items.value.length;
|
|
1764
|
+
const oldIndex = activeIndex.value;
|
|
1765
|
+
if (index < 0) {
|
|
1766
|
+
activeIndex.value = props.loop ? length - 1 : 0;
|
|
1767
|
+
} else if (index >= length) {
|
|
1768
|
+
activeIndex.value = props.loop ? 0 : length - 1;
|
|
1769
|
+
} else {
|
|
1770
|
+
activeIndex.value = index;
|
|
1771
|
+
}
|
|
1772
|
+
if (oldIndex === activeIndex.value) {
|
|
1773
|
+
resetItems(oldIndex);
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
const prev = () => {
|
|
1777
|
+
setActiveItem(activeIndex.value - 1);
|
|
1778
|
+
};
|
|
1779
|
+
const next = () => {
|
|
1780
|
+
setActiveItem(activeIndex.value + 1);
|
|
1781
|
+
};
|
|
1782
|
+
const handleDotClick = (index) => {
|
|
1783
|
+
activeIndex.value = index;
|
|
1784
|
+
};
|
|
1785
|
+
const handleStart = (e) => {
|
|
1786
|
+
allowTransition.value = true;
|
|
1787
|
+
if (!props.draggable) return;
|
|
1788
|
+
pauseTimer();
|
|
1789
|
+
start.value = true;
|
|
1790
|
+
dragMovedPastThreshold.value = false;
|
|
1791
|
+
startX.value = e.screenX;
|
|
1792
|
+
startY.value = e.screenY;
|
|
1793
|
+
};
|
|
1794
|
+
const handleMove = (e) => {
|
|
1795
|
+
if (!start.value || !props.draggable) return;
|
|
1796
|
+
offset.value = !props.vertical ? e.screenX - startX.value : e.screenY - startY.value;
|
|
1797
|
+
if (Math.abs(offset.value) > DRAG_CLICK_SUPPRESS_PX) {
|
|
1798
|
+
dragMovedPastThreshold.value = true;
|
|
1799
|
+
}
|
|
1800
|
+
resetItems();
|
|
1801
|
+
};
|
|
1802
|
+
const handleEnd = () => {
|
|
1803
|
+
if (!props.draggable) return;
|
|
1804
|
+
const shouldSwallowClick = dragMovedPastThreshold.value;
|
|
1805
|
+
start.value = false;
|
|
1806
|
+
startTimer();
|
|
1807
|
+
const $offset = Math.abs(offset.value);
|
|
1808
|
+
const $direction = offset.value > 0;
|
|
1809
|
+
offset.value = 0;
|
|
1810
|
+
if ($offset > 5) {
|
|
1811
|
+
$direction && prev();
|
|
1812
|
+
!$direction && next();
|
|
1813
|
+
} else {
|
|
1814
|
+
resetItems();
|
|
1815
|
+
}
|
|
1816
|
+
if (shouldSwallowClick) {
|
|
1817
|
+
swallowNextClickFromDrag();
|
|
1818
|
+
}
|
|
1819
|
+
dragMovedPastThreshold.value = false;
|
|
1820
|
+
};
|
|
1821
|
+
watch(
|
|
1822
|
+
() => items.value,
|
|
1823
|
+
(v) => {
|
|
1824
|
+
if (v.length > 0) setActiveItem(props.initialIndex);
|
|
1825
|
+
}
|
|
1826
|
+
);
|
|
1827
|
+
watch(
|
|
1828
|
+
() => activeIndex.value,
|
|
1829
|
+
(v, oldV) => {
|
|
1830
|
+
resetItems(oldV);
|
|
1831
|
+
emit("change", v, oldV);
|
|
1832
|
+
}
|
|
1833
|
+
);
|
|
1834
|
+
watch(
|
|
1835
|
+
() => props.autoplay,
|
|
1836
|
+
(v) => {
|
|
1837
|
+
v ? startTimer() : pauseTimer();
|
|
1838
|
+
}
|
|
1839
|
+
);
|
|
1840
|
+
watch(
|
|
1841
|
+
() => props.loop,
|
|
1842
|
+
() => {
|
|
1843
|
+
setActiveItem(activeIndex.value);
|
|
1844
|
+
}
|
|
1845
|
+
);
|
|
1846
|
+
watch(
|
|
1847
|
+
() => props.t,
|
|
1848
|
+
() => {
|
|
1849
|
+
pauseTimer();
|
|
1850
|
+
startTimer();
|
|
1851
|
+
}
|
|
1852
|
+
);
|
|
1853
|
+
onMounted(() => {
|
|
1854
|
+
nextTick(() => {
|
|
1855
|
+
if (wrapper.value) Resize.on(wrapper.value, resetItems);
|
|
1856
|
+
if (props.initialIndex < items.value.length && props.initialIndex >= 0) {
|
|
1857
|
+
activeIndex.value = props.initialIndex;
|
|
1858
|
+
}
|
|
1859
|
+
startTimer();
|
|
1860
|
+
});
|
|
1861
|
+
});
|
|
1862
|
+
onBeforeUnmount(() => {
|
|
1863
|
+
if (wrapper.value) Resize.off(wrapper.value, resetItems);
|
|
1864
|
+
pauseTimer();
|
|
1865
|
+
startTimer();
|
|
1866
|
+
});
|
|
1867
|
+
const add = (item) => {
|
|
1868
|
+
if (!item) return;
|
|
1869
|
+
nextTick(() => {
|
|
1870
|
+
if (content.value) {
|
|
1871
|
+
const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
|
|
1872
|
+
items.value.splice(index, 0, item);
|
|
1873
|
+
return;
|
|
1874
|
+
}
|
|
1875
|
+
items.value.push(item);
|
|
1876
|
+
});
|
|
1877
|
+
};
|
|
1878
|
+
const remove = (item) => {
|
|
1879
|
+
if (!item) return;
|
|
1880
|
+
items.value.splice(items.value.indexOf(item), 1);
|
|
1881
|
+
};
|
|
1882
|
+
provide("vc-carousel", {
|
|
1883
|
+
props,
|
|
1884
|
+
items,
|
|
1885
|
+
offset,
|
|
1886
|
+
allowTransition,
|
|
1887
|
+
setActiveItem,
|
|
1888
|
+
wrapper,
|
|
1889
|
+
content,
|
|
1890
|
+
add,
|
|
1891
|
+
remove
|
|
1892
|
+
});
|
|
1893
|
+
expose({
|
|
1894
|
+
setActiveItem,
|
|
1895
|
+
prev,
|
|
1896
|
+
next
|
|
1897
|
+
});
|
|
1898
|
+
return {
|
|
1899
|
+
carouselId,
|
|
1900
|
+
allowTransition,
|
|
1901
|
+
items,
|
|
1902
|
+
activeIndex,
|
|
1903
|
+
offset,
|
|
1904
|
+
direction,
|
|
1905
|
+
hasLabel,
|
|
1906
|
+
dotsClasses,
|
|
1907
|
+
start,
|
|
1908
|
+
startX,
|
|
1909
|
+
startY,
|
|
1910
|
+
handleStart,
|
|
1911
|
+
handleMove,
|
|
1912
|
+
handleEnd,
|
|
1913
|
+
handleDotClick,
|
|
1914
|
+
prev,
|
|
1915
|
+
next,
|
|
1916
|
+
setActiveItem,
|
|
1917
|
+
pauseTimer,
|
|
1918
|
+
startTimer
|
|
1919
|
+
};
|
|
1920
|
+
};
|
|
1921
|
+
|
|
1922
|
+
const props$1j = {
|
|
1923
|
+
t: {
|
|
1924
|
+
type: Number,
|
|
1925
|
+
default: 3e3
|
|
1926
|
+
},
|
|
1927
|
+
card: Boolean,
|
|
1928
|
+
gutter: {
|
|
1929
|
+
type: Number,
|
|
1930
|
+
default: 0
|
|
1931
|
+
},
|
|
1932
|
+
height: [String, Number],
|
|
1933
|
+
initialIndex: {
|
|
1934
|
+
type: Number,
|
|
1935
|
+
default: 0
|
|
1936
|
+
},
|
|
1937
|
+
trigger: {
|
|
1688
1938
|
type: String,
|
|
1689
|
-
default: "
|
|
1939
|
+
default: "hover"
|
|
1940
|
+
},
|
|
1941
|
+
autoplay: {
|
|
1942
|
+
type: Boolean,
|
|
1943
|
+
default: true
|
|
1944
|
+
},
|
|
1945
|
+
dots: {
|
|
1946
|
+
type: [String, Boolean],
|
|
1947
|
+
default: "bottom"
|
|
1948
|
+
// bottom/outside | false
|
|
1949
|
+
},
|
|
1950
|
+
arrow: {
|
|
1951
|
+
type: [String, Boolean],
|
|
1952
|
+
default: "hover"
|
|
1953
|
+
// hover/always | false
|
|
1954
|
+
},
|
|
1955
|
+
loop: {
|
|
1956
|
+
type: Boolean,
|
|
1957
|
+
default: true
|
|
1958
|
+
},
|
|
1959
|
+
vertical: {
|
|
1960
|
+
type: Boolean,
|
|
1961
|
+
default: false
|
|
1962
|
+
},
|
|
1963
|
+
draggable: {
|
|
1964
|
+
type: Boolean,
|
|
1965
|
+
default: true
|
|
1690
1966
|
}
|
|
1691
1967
|
};
|
|
1692
1968
|
|
|
1693
1969
|
/** @jsxImportSource vue */
|
|
1694
1970
|
|
|
1695
|
-
const COMPONENT_NAME$
|
|
1971
|
+
const COMPONENT_NAME$1$ = 'vc-carousel';
|
|
1696
1972
|
const Carousel = /* @__PURE__ */ defineComponent({
|
|
1697
|
-
name: COMPONENT_NAME$
|
|
1973
|
+
name: COMPONENT_NAME$1$,
|
|
1974
|
+
props: props$1j,
|
|
1975
|
+
setup(props, {
|
|
1976
|
+
slots,
|
|
1977
|
+
expose
|
|
1978
|
+
}) {
|
|
1979
|
+
const isHover = ref(false);
|
|
1980
|
+
const wrapper = ref(null);
|
|
1981
|
+
const content = ref(null);
|
|
1982
|
+
const arrowDisplay = computed(() => {
|
|
1983
|
+
return props.arrow && !props.vertical;
|
|
1984
|
+
});
|
|
1985
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
1986
|
+
const itemInStage = (item, index, items) => {
|
|
1987
|
+
const length = items.length;
|
|
1988
|
+
const isInStage = item.exposed.isInStage.value;
|
|
1989
|
+
if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
|
|
1990
|
+
return 'left';
|
|
1991
|
+
} else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
|
|
1992
|
+
return 'right';
|
|
1993
|
+
}
|
|
1994
|
+
return false;
|
|
1995
|
+
};
|
|
1996
|
+
const handleButtonEnter = arrow => {
|
|
1997
|
+
if (props.vertical) return;
|
|
1998
|
+
carousel.items.value.forEach((item, index, items) => {
|
|
1999
|
+
if (arrow === itemInStage(item, index, items)) {
|
|
2000
|
+
item.exposed.isHover.value = true;
|
|
2001
|
+
}
|
|
2002
|
+
});
|
|
2003
|
+
};
|
|
2004
|
+
const handleButtonLeave = () => {
|
|
2005
|
+
if (props.vertical) return;
|
|
2006
|
+
carousel.items.value.forEach(item => {
|
|
2007
|
+
item.exposed.isHover.value = false;
|
|
2008
|
+
});
|
|
2009
|
+
};
|
|
2010
|
+
const handleDotHover = index => {
|
|
2011
|
+
if (props.trigger === 'hover' && index !== carousel.activeIndex.value) {
|
|
2012
|
+
carousel.activeIndex.value = index;
|
|
2013
|
+
}
|
|
2014
|
+
};
|
|
2015
|
+
const handleMouseEnter = () => {
|
|
2016
|
+
isHover.value = true;
|
|
2017
|
+
carousel.pauseTimer();
|
|
2018
|
+
};
|
|
2019
|
+
const handleMouseLeave = () => {
|
|
2020
|
+
isHover.value = false;
|
|
2021
|
+
carousel.startTimer();
|
|
2022
|
+
};
|
|
2023
|
+
const throttledArrowClick = throttle(carousel.setActiveItem);
|
|
2024
|
+
const throttledDotHover = throttle(handleDotHover);
|
|
2025
|
+
return () => {
|
|
2026
|
+
return createVNode("div", {
|
|
2027
|
+
"ref": wrapper,
|
|
2028
|
+
"class": ['vc-carousel', `is-${carousel.direction.value}`],
|
|
2029
|
+
"onMousedown": withModifiers(carousel.handleStart, ['stop', 'prevent']),
|
|
2030
|
+
"onMousemove": withModifiers(carousel.handleMove, ['stop', 'prevent']),
|
|
2031
|
+
"onMouseup": withModifiers(carousel.handleEnd, ['stop', 'prevent']),
|
|
2032
|
+
"onMouseenter": withModifiers(handleMouseEnter, ['stop']),
|
|
2033
|
+
"onMouseleave": withModifiers(handleMouseLeave, ['stop'])
|
|
2034
|
+
}, [createVNode("div", {
|
|
2035
|
+
"ref": content,
|
|
2036
|
+
"class": "vc-carousel__wrapper",
|
|
2037
|
+
"style": {
|
|
2038
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
2039
|
+
}
|
|
2040
|
+
}, [arrowDisplay.value && createVNode(TransitionSlide, {
|
|
2041
|
+
"mode": "left-part"
|
|
2042
|
+
}, {
|
|
2043
|
+
default: () => [withDirectives(createVNode("button", {
|
|
2044
|
+
"type": "button",
|
|
2045
|
+
"class": "vc-carousel__arrow is-left-arrow",
|
|
2046
|
+
"onMouseenter": () => handleButtonEnter('left'),
|
|
2047
|
+
"onMouseleave": handleButtonLeave,
|
|
2048
|
+
"onClick": withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ['stop'])
|
|
2049
|
+
}, [createVNode(Icon, {
|
|
2050
|
+
"type": "left"
|
|
2051
|
+
}, null)]), [[vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value > 0)]])]
|
|
2052
|
+
}), arrowDisplay.value && createVNode(TransitionSlide, {
|
|
2053
|
+
"mode": "right-part"
|
|
2054
|
+
}, {
|
|
2055
|
+
default: () => [withDirectives(createVNode("button", {
|
|
2056
|
+
"type": "button",
|
|
2057
|
+
"class": "vc-carousel__arrow is-right-arrow",
|
|
2058
|
+
"onMouseenter": () => handleButtonEnter('right'),
|
|
2059
|
+
"onMouseleave": handleButtonLeave,
|
|
2060
|
+
"onClick": withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ['stop'])
|
|
2061
|
+
}, [createVNode(Icon, {
|
|
2062
|
+
"type": "right"
|
|
2063
|
+
}, null)]), [[vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
|
|
2064
|
+
}), slots.default?.()]), props.dots && createVNode("ul", {
|
|
2065
|
+
"class": ['vc-carousel__dots', ...carousel.dotsClasses.value]
|
|
2066
|
+
}, [carousel.items.value.map((item, index) => createVNode("li", {
|
|
2067
|
+
"key": index,
|
|
2068
|
+
"class": ['vc-carousel__dot', `is-${carousel.direction.value}`, {
|
|
2069
|
+
'is-active': index === carousel.activeIndex.value
|
|
2070
|
+
}],
|
|
2071
|
+
"onMouseenter": () => throttledDotHover(index),
|
|
2072
|
+
"onClick": () => carousel.handleDotClick(index)
|
|
2073
|
+
}, [createVNode("button", {
|
|
2074
|
+
"class": "vc-carousel__button"
|
|
2075
|
+
}, [carousel.hasLabel.value && createVNode("span", null, [item.props.label])])]))])]);
|
|
2076
|
+
};
|
|
2077
|
+
}
|
|
2078
|
+
});
|
|
2079
|
+
|
|
2080
|
+
const props$1i = {
|
|
2081
|
+
name: String,
|
|
2082
|
+
label: {
|
|
2083
|
+
type: [String, Number],
|
|
2084
|
+
default: ""
|
|
2085
|
+
},
|
|
2086
|
+
// card大小
|
|
2087
|
+
width: {
|
|
2088
|
+
type: [Number, String],
|
|
2089
|
+
default: "70%"
|
|
2090
|
+
},
|
|
2091
|
+
// card之间间距, 或者滑动时候的间距
|
|
2092
|
+
gutter: {
|
|
2093
|
+
type: Number,
|
|
2094
|
+
default: 0
|
|
2095
|
+
},
|
|
2096
|
+
scale: {
|
|
2097
|
+
type: Number,
|
|
2098
|
+
default: 0.83
|
|
2099
|
+
}
|
|
2100
|
+
};
|
|
2101
|
+
|
|
2102
|
+
const TRANSFORM = prefixStyle("transform").camel;
|
|
2103
|
+
const useCarouselItem = (expose) => {
|
|
2104
|
+
const instance = getCurrentInstance();
|
|
2105
|
+
const carousel = inject("vc-carousel", {});
|
|
2106
|
+
const props = instance.props;
|
|
2107
|
+
const translate = ref(0);
|
|
2108
|
+
const currentScale = ref(1);
|
|
2109
|
+
const isHover = ref(false);
|
|
2110
|
+
const isActive = ref(false);
|
|
2111
|
+
const isReady = ref(false);
|
|
2112
|
+
const isInStage = ref(false);
|
|
2113
|
+
const isAnimating = ref(false);
|
|
2114
|
+
const isVertical = computed(() => {
|
|
2115
|
+
return carousel.props.vertical;
|
|
2116
|
+
});
|
|
2117
|
+
const isCard = computed(() => {
|
|
2118
|
+
return carousel.props.card;
|
|
2119
|
+
});
|
|
2120
|
+
const isMove = computed(() => {
|
|
2121
|
+
return carousel.offset.value !== 0;
|
|
2122
|
+
});
|
|
2123
|
+
const itemGutter = computed(() => {
|
|
2124
|
+
return props.gutter || carousel.props.gutter || 0;
|
|
2125
|
+
});
|
|
2126
|
+
const itemStyle = computed(() => {
|
|
2127
|
+
const translateType = isVertical.value ? "translateY" : "translateX";
|
|
2128
|
+
if (carousel.props.card) {
|
|
2129
|
+
return {
|
|
2130
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
2131
|
+
width: props.width
|
|
2132
|
+
};
|
|
2133
|
+
} else {
|
|
2134
|
+
return {
|
|
2135
|
+
[TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
|
|
2136
|
+
width: itemGutter.value ? props.width : "100%"
|
|
2137
|
+
};
|
|
2138
|
+
}
|
|
2139
|
+
});
|
|
2140
|
+
onBeforeMount(() => {
|
|
2141
|
+
carousel.add?.(instance);
|
|
2142
|
+
if (!isCard.value && itemGutter.value && carousel.props.loop) {
|
|
2143
|
+
throw new VcError("carousel", "slide模式下loop不能为true");
|
|
2144
|
+
}
|
|
2145
|
+
});
|
|
2146
|
+
onBeforeUnmount(() => {
|
|
2147
|
+
carousel.remove?.(instance);
|
|
2148
|
+
});
|
|
2149
|
+
const processIndex = (index, activeIndex, length) => {
|
|
2150
|
+
if (activeIndex === 0 && index === length - 1) {
|
|
2151
|
+
return -1;
|
|
2152
|
+
} else if (activeIndex === length - 1 && index === 0) {
|
|
2153
|
+
return length;
|
|
2154
|
+
} else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
|
|
2155
|
+
return length + 1;
|
|
2156
|
+
} else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
|
|
2157
|
+
return -2;
|
|
2158
|
+
}
|
|
2159
|
+
return index;
|
|
2160
|
+
};
|
|
2161
|
+
const calcCardTranslate = (index, activeIndex) => {
|
|
2162
|
+
let value;
|
|
2163
|
+
const widthNumber = +props.width / 100;
|
|
2164
|
+
const parentW = carousel.wrapper.value.offsetWidth;
|
|
2165
|
+
if (isInStage.value) {
|
|
2166
|
+
if (index === activeIndex) {
|
|
2167
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
2168
|
+
} else if (index > activeIndex) {
|
|
2169
|
+
value = parentW * (1 + widthNumber * props.scale) / 2 + itemGutter.value;
|
|
2170
|
+
} else {
|
|
2171
|
+
value = -(parentW * ((widthNumber * props.scale - 1) / 2 + widthNumber)) - itemGutter.value;
|
|
2172
|
+
}
|
|
2173
|
+
} else if (index < activeIndex) {
|
|
2174
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
2175
|
+
} else {
|
|
2176
|
+
value = parentW * (1 - widthNumber) / 2;
|
|
2177
|
+
}
|
|
2178
|
+
return value;
|
|
2179
|
+
};
|
|
2180
|
+
const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
|
|
2181
|
+
const { length } = carousel.items.value;
|
|
2182
|
+
const offset = wrapperWidth - (carousel.wrapper?.value?.offsetWidth || 0);
|
|
2183
|
+
const gutter = itemGutter.value;
|
|
2184
|
+
if (!gutter || isVertical.value) return 0;
|
|
2185
|
+
let slideOffset = 0;
|
|
2186
|
+
if (length === 1) {
|
|
2187
|
+
return offset / 2;
|
|
2188
|
+
}
|
|
2189
|
+
if (activeIndex == 0) {
|
|
2190
|
+
if (index - activeIndex === 0) {
|
|
2191
|
+
slideOffset = gutter;
|
|
2192
|
+
} else if (index - activeIndex === 1) {
|
|
2193
|
+
slideOffset = -offset + gutter * 2;
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
if (activeIndex !== 0 && activeIndex != length - 1) {
|
|
2197
|
+
if (index - activeIndex === 0) {
|
|
2198
|
+
slideOffset = offset / 2;
|
|
2199
|
+
} else if (index - activeIndex === 1) {
|
|
2200
|
+
slideOffset = -offset / 2 + gutter;
|
|
2201
|
+
} else if (index - activeIndex === -1) {
|
|
2202
|
+
slideOffset = offset * 3 / 2 - gutter;
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
if (activeIndex == length - 1) {
|
|
2206
|
+
if (index - activeIndex === 0) {
|
|
2207
|
+
slideOffset = offset - gutter;
|
|
2208
|
+
} else if (index - activeIndex === -1) {
|
|
2209
|
+
slideOffset = offset * 2 - gutter * 2;
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
return slideOffset;
|
|
2213
|
+
};
|
|
2214
|
+
const calcTranslate = (index, activeIndex) => {
|
|
2215
|
+
const distance = carousel.wrapper.value[isVertical.value ? "offsetHeight" : "offsetWidth"];
|
|
2216
|
+
const slideOffset = calcSlideOffset(index, activeIndex, distance);
|
|
2217
|
+
return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
|
|
2218
|
+
};
|
|
2219
|
+
const reset = (index, activeIndex, oldIndex) => {
|
|
2220
|
+
const { length } = carousel.items.value;
|
|
2221
|
+
if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
|
|
2222
|
+
isAnimating.value = index === activeIndex || index === oldIndex;
|
|
2223
|
+
if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
|
|
2224
|
+
isAnimating.value = true;
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
if (index !== activeIndex && length > 2 && carousel.props.loop) {
|
|
2228
|
+
index = processIndex(index, activeIndex, length);
|
|
2229
|
+
}
|
|
2230
|
+
if (isCard.value) {
|
|
2231
|
+
if (isVertical.value) {
|
|
2232
|
+
throw new VcError("carousel", "卡片模式不支持垂直方向");
|
|
2233
|
+
}
|
|
2234
|
+
isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
|
|
2235
|
+
isActive.value = index === activeIndex;
|
|
2236
|
+
translate.value = calcCardTranslate(index, activeIndex);
|
|
2237
|
+
currentScale.value = isActive.value ? 1 : props.scale;
|
|
2238
|
+
} else {
|
|
2239
|
+
isActive.value = index === activeIndex;
|
|
2240
|
+
translate.value = calcTranslate(index, activeIndex);
|
|
2241
|
+
}
|
|
2242
|
+
isReady.value = true;
|
|
2243
|
+
};
|
|
2244
|
+
const handleItemClick = () => {
|
|
2245
|
+
if (parent && isCard.value) {
|
|
2246
|
+
const index = carousel.items.value.indexOf(instance);
|
|
2247
|
+
carousel.setActiveItem(index);
|
|
2248
|
+
}
|
|
2249
|
+
};
|
|
2250
|
+
expose({
|
|
2251
|
+
reset,
|
|
2252
|
+
isInStage,
|
|
2253
|
+
isHover,
|
|
2254
|
+
isActive
|
|
2255
|
+
});
|
|
2256
|
+
return {
|
|
2257
|
+
translate,
|
|
2258
|
+
currentScale,
|
|
2259
|
+
isHover,
|
|
2260
|
+
isActive,
|
|
2261
|
+
isReady,
|
|
2262
|
+
isInStage,
|
|
2263
|
+
isAnimating,
|
|
2264
|
+
isVertical,
|
|
2265
|
+
isCard,
|
|
2266
|
+
isMove,
|
|
2267
|
+
itemGutter,
|
|
2268
|
+
itemStyle,
|
|
2269
|
+
reset,
|
|
2270
|
+
handleItemClick
|
|
2271
|
+
};
|
|
2272
|
+
};
|
|
2273
|
+
|
|
2274
|
+
/** @jsxImportSource vue */
|
|
2275
|
+
|
|
2276
|
+
const COMPONENT_NAME$1_ = 'vc-carousel-item';
|
|
2277
|
+
const CarouselItem = /* @__PURE__ */ defineComponent({
|
|
2278
|
+
name: COMPONENT_NAME$1_,
|
|
1698
2279
|
props: props$1i,
|
|
2280
|
+
setup(_, {
|
|
2281
|
+
slots,
|
|
2282
|
+
expose
|
|
2283
|
+
}) {
|
|
2284
|
+
const it = useCarouselItem(expose);
|
|
2285
|
+
return () => {
|
|
2286
|
+
return withDirectives(createVNode("div", {
|
|
2287
|
+
"class": ['vc-carousel-item', {
|
|
2288
|
+
'is-active': it.isActive.value,
|
|
2289
|
+
'is-card': it.isCard.value,
|
|
2290
|
+
'is-in-stage': it.isInStage.value,
|
|
2291
|
+
'is-hover': it.isHover.value,
|
|
2292
|
+
'is-animating': it.isAnimating.value && !it.isMove.value
|
|
2293
|
+
}],
|
|
2294
|
+
"style": it.itemStyle.value,
|
|
2295
|
+
"onClick": it.handleItemClick
|
|
2296
|
+
}, [it.isCard.value && withDirectives(createVNode("div", {
|
|
2297
|
+
"class": "vc-carousel-item__mask"
|
|
2298
|
+
}, null), [[vShow, !it.isActive.value]]), slots.default?.()]), [[vShow, it.isReady.value]]);
|
|
2299
|
+
};
|
|
2300
|
+
}
|
|
2301
|
+
});
|
|
2302
|
+
|
|
2303
|
+
/** @jsxImportSource vue */
|
|
2304
|
+
|
|
2305
|
+
const COMPONENT_NAME$1Z = 'vcm-carousel';
|
|
2306
|
+
const MCarousel = /* @__PURE__ */ defineComponent({
|
|
2307
|
+
name: COMPONENT_NAME$1Z,
|
|
2308
|
+
props: {
|
|
2309
|
+
...props$1j,
|
|
2310
|
+
dots: {
|
|
2311
|
+
type: [String, Boolean],
|
|
2312
|
+
default: false
|
|
2313
|
+
},
|
|
2314
|
+
indicator: {
|
|
2315
|
+
type: Boolean,
|
|
2316
|
+
default: true
|
|
2317
|
+
}
|
|
2318
|
+
},
|
|
1699
2319
|
setup(props, {
|
|
1700
|
-
slots
|
|
2320
|
+
slots,
|
|
2321
|
+
expose
|
|
1701
2322
|
}) {
|
|
2323
|
+
const wrapper = ref(null);
|
|
2324
|
+
const content = ref(null);
|
|
2325
|
+
const carousel = useCarousel(wrapper, content, expose);
|
|
2326
|
+
let scrollStatus = 0;
|
|
2327
|
+
const handleTouchStart = e => {
|
|
2328
|
+
carousel.handleStart(e.touches[0]);
|
|
2329
|
+
scrollStatus = 0;
|
|
2330
|
+
};
|
|
2331
|
+
const handleTouchMove = e => {
|
|
2332
|
+
const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
|
|
2333
|
+
const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
|
|
2334
|
+
if (!props.vertical && absX > absY && scrollStatus !== 1) {
|
|
2335
|
+
e.preventDefault();
|
|
2336
|
+
carousel.handleMove(e.touches[0]);
|
|
2337
|
+
scrollStatus = 2;
|
|
2338
|
+
return;
|
|
2339
|
+
}
|
|
2340
|
+
if (props.vertical && absY > absX) {
|
|
2341
|
+
e.preventDefault();
|
|
2342
|
+
carousel.handleMove(e.touches[0]);
|
|
2343
|
+
return;
|
|
2344
|
+
}
|
|
2345
|
+
if (scrollStatus === 0) {
|
|
2346
|
+
scrollStatus = 1;
|
|
2347
|
+
}
|
|
2348
|
+
};
|
|
2349
|
+
|
|
2350
|
+
// e.changedTouches[0]
|
|
2351
|
+
const handleTouchEnd = () => {
|
|
2352
|
+
carousel.handleEnd();
|
|
2353
|
+
scrollStatus = 0;
|
|
2354
|
+
};
|
|
1702
2355
|
return () => {
|
|
1703
2356
|
return createVNode("div", {
|
|
1704
|
-
"
|
|
1705
|
-
|
|
2357
|
+
"ref": wrapper,
|
|
2358
|
+
"class": ['vcm-carousel', `is-${carousel.direction.value}`],
|
|
2359
|
+
"onTouchstart": withModifiers(handleTouchStart, ['stop']),
|
|
2360
|
+
"onTouchmove": withModifiers(handleTouchMove, ['stop']),
|
|
2361
|
+
"onTouchend": withModifiers(handleTouchEnd, ['stop'])
|
|
2362
|
+
}, [createVNode("div", {
|
|
2363
|
+
"ref": content,
|
|
2364
|
+
"style": {
|
|
2365
|
+
height: props.height ? `${props.height}px` : 'auto'
|
|
2366
|
+
},
|
|
2367
|
+
"class": "vcm-carousel__wrapper"
|
|
2368
|
+
}, [slots.default?.()]), props.dots && createVNode("ul", {
|
|
2369
|
+
"class": ['vcm-carousel__dots', ...carousel.dotsClasses.value]
|
|
2370
|
+
}, [carousel.items.value.map((_, index) => createVNode("li", {
|
|
2371
|
+
"key": index,
|
|
2372
|
+
"class": ['vcm-carousel__dot', 'is-' + carousel.direction.value, {
|
|
2373
|
+
'is-active': index === carousel.activeIndex.value
|
|
2374
|
+
}],
|
|
2375
|
+
"onClick": e => {
|
|
2376
|
+
e.stopPropagation();
|
|
2377
|
+
carousel.handleDotClick(index);
|
|
2378
|
+
}
|
|
2379
|
+
}, [createVNode("button", {
|
|
2380
|
+
"class": "vcm-carousel__button"
|
|
2381
|
+
}, [carousel.hasLabel.value && createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props.card && props.indicator && createVNode("div", {
|
|
2382
|
+
"class": "vcm-carousel__indicator"
|
|
2383
|
+
}, [createVNode("span", null, [carousel.activeIndex.value + 1]), createVNode("span", null, [createTextVNode(" / ")]), createVNode("span", null, [carousel.items.value.length])])]);
|
|
1706
2384
|
};
|
|
1707
2385
|
}
|
|
1708
2386
|
});
|
|
1709
2387
|
|
|
1710
|
-
|
|
2388
|
+
/** @jsxImportSource vue */
|
|
2389
|
+
|
|
2390
|
+
const COMPONENT_NAME$1Y = 'vcm-carousel-item';
|
|
2391
|
+
const MCarouselItem = /* @__PURE__ */ defineComponent({
|
|
2392
|
+
name: COMPONENT_NAME$1Y,
|
|
2393
|
+
props: props$1i,
|
|
2394
|
+
setup(_, {
|
|
2395
|
+
slots,
|
|
2396
|
+
expose
|
|
2397
|
+
}) {
|
|
2398
|
+
const it = useCarouselItem(expose);
|
|
2399
|
+
return () => {
|
|
2400
|
+
return withDirectives(createVNode("div", {
|
|
2401
|
+
"style": it.itemStyle.value,
|
|
2402
|
+
"class": {
|
|
2403
|
+
'vcm-carousel-item': true,
|
|
2404
|
+
'is-active': it.isActive.value,
|
|
2405
|
+
'is-card': it.isCard.value,
|
|
2406
|
+
'is-animating': it.isAnimating.value && !it.isMove.value,
|
|
2407
|
+
'is-in-stage': it.isInStage.value
|
|
2408
|
+
},
|
|
2409
|
+
"onClick": it.handleItemClick
|
|
2410
|
+
}, [it.isCard.value && !it.isActive.value && createVNode("div", {
|
|
2411
|
+
"class": "vcm-carousel-item__mask"
|
|
2412
|
+
}, null), slots.default?.()]), [[vShow, it.isReady.value]]);
|
|
2413
|
+
};
|
|
2414
|
+
}
|
|
2415
|
+
});
|
|
1711
2416
|
|
|
1712
2417
|
const getSelectedData = (value = [], source = []) => {
|
|
1713
2418
|
const label = [];
|
|
@@ -1988,9 +2693,9 @@ const useNativeEmitter = (input, expose) => {
|
|
|
1988
2693
|
|
|
1989
2694
|
/** @jsxImportSource vue */
|
|
1990
2695
|
|
|
1991
|
-
const COMPONENT_NAME$
|
|
2696
|
+
const COMPONENT_NAME$1X = 'vc-input';
|
|
1992
2697
|
const Input = /* @__PURE__ */ defineComponent({
|
|
1993
|
-
name: COMPONENT_NAME$
|
|
2698
|
+
name: COMPONENT_NAME$1X,
|
|
1994
2699
|
inheritAttrs: false,
|
|
1995
2700
|
props: {
|
|
1996
2701
|
...props$1h,
|
|
@@ -2325,9 +3030,9 @@ const useInputNumber = () => {
|
|
|
2325
3030
|
|
|
2326
3031
|
/** @jsxImportSource vue */
|
|
2327
3032
|
|
|
2328
|
-
const COMPONENT_NAME$
|
|
3033
|
+
const COMPONENT_NAME$1W = 'vc-input-number';
|
|
2329
3034
|
const InputNumber = /* @__PURE__ */ defineComponent({
|
|
2330
|
-
name: COMPONENT_NAME$
|
|
3035
|
+
name: COMPONENT_NAME$1W,
|
|
2331
3036
|
props: props$1g,
|
|
2332
3037
|
inheritAttrs: false,
|
|
2333
3038
|
setup(props, {
|
|
@@ -2391,9 +3096,9 @@ const props$1f = {
|
|
|
2391
3096
|
|
|
2392
3097
|
/** @jsxImportSource vue */
|
|
2393
3098
|
|
|
2394
|
-
const COMPONENT_NAME$
|
|
3099
|
+
const COMPONENT_NAME$1V = 'vc-input-search';
|
|
2395
3100
|
const InputSearch = /* @__PURE__ */ defineComponent({
|
|
2396
|
-
name: COMPONENT_NAME$
|
|
3101
|
+
name: COMPONENT_NAME$1V,
|
|
2397
3102
|
props: props$1f,
|
|
2398
3103
|
inheritAttrs: false,
|
|
2399
3104
|
setup(props, {
|
|
@@ -2786,9 +3491,9 @@ const props$1c = {
|
|
|
2786
3491
|
}
|
|
2787
3492
|
};
|
|
2788
3493
|
|
|
2789
|
-
const COMPONENT_NAME$
|
|
3494
|
+
const COMPONENT_NAME$1U = "vc-customer";
|
|
2790
3495
|
const Customer = defineComponent({
|
|
2791
|
-
name: COMPONENT_NAME$
|
|
3496
|
+
name: COMPONENT_NAME$1U,
|
|
2792
3497
|
props: props$1c,
|
|
2793
3498
|
setup(props, context) {
|
|
2794
3499
|
return () => h(() => {
|
|
@@ -2864,7 +3569,7 @@ class PortalLeaf {
|
|
|
2864
3569
|
}
|
|
2865
3570
|
}
|
|
2866
3571
|
|
|
2867
|
-
const COMPONENT_NAME$
|
|
3572
|
+
const COMPONENT_NAME$1T = "vc-portal";
|
|
2868
3573
|
class Portal {
|
|
2869
3574
|
/**
|
|
2870
3575
|
* 清理Portals类型组件
|
|
@@ -2914,7 +3619,7 @@ class Portal {
|
|
|
2914
3619
|
this.wrapper = wrapper;
|
|
2915
3620
|
this.globalOptions = {
|
|
2916
3621
|
...options,
|
|
2917
|
-
name: options?.name || wrapper.name || Utils.getUid(COMPONENT_NAME$
|
|
3622
|
+
name: options?.name || wrapper.name || Utils.getUid(COMPONENT_NAME$1T)
|
|
2918
3623
|
};
|
|
2919
3624
|
}
|
|
2920
3625
|
popup(propsData, options) {
|
|
@@ -3012,7 +3717,7 @@ class Portal {
|
|
|
3012
3717
|
...rest
|
|
3013
3718
|
} = options;
|
|
3014
3719
|
let useAllNodes = fragment;
|
|
3015
|
-
const name = multiple ? `${name$}__${Utils.getUid(COMPONENT_NAME$
|
|
3720
|
+
const name = multiple ? `${name$}__${Utils.getUid(COMPONENT_NAME$1T)}` : name$;
|
|
3016
3721
|
const container = document.createElement(tag);
|
|
3017
3722
|
const root = typeof el === "object" ? el : document.querySelector(el || "body");
|
|
3018
3723
|
!alive && Portal.leafs.get(name)?.destroy();
|
|
@@ -3046,7 +3751,7 @@ class Portal {
|
|
|
3046
3751
|
} else {
|
|
3047
3752
|
const wrapper = this.wrapper;
|
|
3048
3753
|
const app = createApp({
|
|
3049
|
-
name: COMPONENT_NAME$
|
|
3754
|
+
name: COMPONENT_NAME$1T,
|
|
3050
3755
|
parent,
|
|
3051
3756
|
setup() {
|
|
3052
3757
|
if (alive) {
|
|
@@ -3157,13 +3862,13 @@ const props$1b = {
|
|
|
3157
3862
|
}
|
|
3158
3863
|
};
|
|
3159
3864
|
|
|
3160
|
-
const COMPONENT_NAME$
|
|
3865
|
+
const COMPONENT_NAME$1S = 'vc-portal-view';
|
|
3161
3866
|
|
|
3162
3867
|
/**
|
|
3163
3868
|
* 写法不同,但与vue@2.x 保持一致
|
|
3164
3869
|
*/
|
|
3165
3870
|
const PortalView = /* @__PURE__ */ defineComponent({
|
|
3166
|
-
name: COMPONENT_NAME$
|
|
3871
|
+
name: COMPONENT_NAME$1S,
|
|
3167
3872
|
props: props$1b,
|
|
3168
3873
|
setup(props, {
|
|
3169
3874
|
slots
|
|
@@ -3183,9 +3888,9 @@ const PortalView = /* @__PURE__ */ defineComponent({
|
|
|
3183
3888
|
|
|
3184
3889
|
/** @jsxImportSource vue */
|
|
3185
3890
|
|
|
3186
|
-
const COMPONENT_NAME$
|
|
3891
|
+
const COMPONENT_NAME$1R = 'vc-popover-wrapper';
|
|
3187
3892
|
const PopoverWrapper = /* @__PURE__ */ defineComponent({
|
|
3188
|
-
name: COMPONENT_NAME$
|
|
3893
|
+
name: COMPONENT_NAME$1R,
|
|
3189
3894
|
props: props$1e,
|
|
3190
3895
|
emits: ['portal-fulfilled', 'close'],
|
|
3191
3896
|
setup(props, {
|
|
@@ -3443,9 +4148,9 @@ const PopoverPortal = new Portal(PopoverWrapper, {
|
|
|
3443
4148
|
|
|
3444
4149
|
/** @jsxImportSource vue */
|
|
3445
4150
|
|
|
3446
|
-
const COMPONENT_NAME$
|
|
4151
|
+
const COMPONENT_NAME$1Q = 'vc-popover';
|
|
3447
4152
|
const Popover$1 = /* @__PURE__ */ defineComponent({
|
|
3448
|
-
name: COMPONENT_NAME$
|
|
4153
|
+
name: COMPONENT_NAME$1Q,
|
|
3449
4154
|
props: props$1d,
|
|
3450
4155
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
|
|
3451
4156
|
setup(props, {
|
|
@@ -3589,9 +4294,9 @@ const Popover = Object.assign(Popover$1, {
|
|
|
3589
4294
|
|
|
3590
4295
|
/** @jsxImportSource vue */
|
|
3591
4296
|
|
|
3592
|
-
const COMPONENT_NAME$
|
|
4297
|
+
const COMPONENT_NAME$1P = 'vc-cascader-column';
|
|
3593
4298
|
const CascaderColumn = /* @__PURE__ */ defineComponent({
|
|
3594
|
-
name: COMPONENT_NAME$
|
|
4299
|
+
name: COMPONENT_NAME$1P,
|
|
3595
4300
|
emits: ['click', 'change'],
|
|
3596
4301
|
props: {
|
|
3597
4302
|
data: {
|
|
@@ -3799,9 +4504,9 @@ const props$19 = {
|
|
|
3799
4504
|
|
|
3800
4505
|
/** @jsxImportSource vue */
|
|
3801
4506
|
|
|
3802
|
-
const COMPONENT_NAME$
|
|
4507
|
+
const COMPONENT_NAME$1O = 'vc-cascader';
|
|
3803
4508
|
const Cascader = /* @__PURE__ */ defineComponent({
|
|
3804
|
-
name: COMPONENT_NAME$
|
|
4509
|
+
name: COMPONENT_NAME$1O,
|
|
3805
4510
|
inheritAttrs: false,
|
|
3806
4511
|
props: props$19,
|
|
3807
4512
|
emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
|
|
@@ -4153,9 +4858,9 @@ const props$18 = {
|
|
|
4153
4858
|
|
|
4154
4859
|
/** @jsxImportSource vue */
|
|
4155
4860
|
|
|
4156
|
-
const COMPONENT_NAME$
|
|
4861
|
+
const COMPONENT_NAME$1N = 'vc-chart';
|
|
4157
4862
|
const Chart = /* @__PURE__ */ defineComponent({
|
|
4158
|
-
name: COMPONENT_NAME$
|
|
4863
|
+
name: COMPONENT_NAME$1N,
|
|
4159
4864
|
props: props$18,
|
|
4160
4865
|
emits: [...EVENTS, 'ready'],
|
|
4161
4866
|
setup(props, {
|
|
@@ -4394,9 +5099,9 @@ const useCheckbox = () => {
|
|
|
4394
5099
|
|
|
4395
5100
|
/** @jsxImportSource vue */
|
|
4396
5101
|
|
|
4397
|
-
const COMPONENT_NAME$
|
|
5102
|
+
const COMPONENT_NAME$1M = 'vc-checkbox';
|
|
4398
5103
|
const Checkbox = /* @__PURE__ */ defineComponent({
|
|
4399
|
-
name: COMPONENT_NAME$
|
|
5104
|
+
name: COMPONENT_NAME$1M,
|
|
4400
5105
|
props: props$17,
|
|
4401
5106
|
emits: ['update:modelValue', 'change'],
|
|
4402
5107
|
setup(props, {
|
|
@@ -4483,9 +5188,9 @@ const useCheckboxGroup = () => {
|
|
|
4483
5188
|
|
|
4484
5189
|
/** @jsxImportSource vue */
|
|
4485
5190
|
|
|
4486
|
-
const COMPONENT_NAME$
|
|
5191
|
+
const COMPONENT_NAME$1L = 'vc-checkbox-group';
|
|
4487
5192
|
const CheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
4488
|
-
name: COMPONENT_NAME$
|
|
5193
|
+
name: COMPONENT_NAME$1L,
|
|
4489
5194
|
props: props$16,
|
|
4490
5195
|
emits: ['update:modelValue', 'change'],
|
|
4491
5196
|
setup(props, {
|
|
@@ -4503,9 +5208,9 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
|
4503
5208
|
|
|
4504
5209
|
/** @jsxImportSource vue */
|
|
4505
5210
|
|
|
4506
|
-
const COMPONENT_NAME$
|
|
5211
|
+
const COMPONENT_NAME$1K = 'vcm-checkbox';
|
|
4507
5212
|
const MCheckbox = /* @__PURE__ */ defineComponent({
|
|
4508
|
-
name: COMPONENT_NAME$
|
|
5213
|
+
name: COMPONENT_NAME$1K,
|
|
4509
5214
|
props: props$17,
|
|
4510
5215
|
emits: ['update:modelValue', 'change'],
|
|
4511
5216
|
setup(props, {
|
|
@@ -4545,9 +5250,9 @@ const MCheckbox = /* @__PURE__ */ defineComponent({
|
|
|
4545
5250
|
|
|
4546
5251
|
/** @jsxImportSource vue */
|
|
4547
5252
|
|
|
4548
|
-
const COMPONENT_NAME$
|
|
5253
|
+
const COMPONENT_NAME$1J = 'vcm-checkbox-group';
|
|
4549
5254
|
const MCheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
4550
|
-
name: COMPONENT_NAME$
|
|
5255
|
+
name: COMPONENT_NAME$1J,
|
|
4551
5256
|
props: props$16,
|
|
4552
5257
|
emits: ['update:modelValue', 'change'],
|
|
4553
5258
|
setup(props, {
|
|
@@ -4601,9 +5306,9 @@ const props$15 = {
|
|
|
4601
5306
|
|
|
4602
5307
|
/** @jsxImportSource vue */
|
|
4603
5308
|
|
|
4604
|
-
const COMPONENT_NAME$
|
|
5309
|
+
const COMPONENT_NAME$1I = 'vc-message';
|
|
4605
5310
|
const MessageView = /* @__PURE__ */ defineComponent({
|
|
4606
|
-
name: COMPONENT_NAME$
|
|
5311
|
+
name: COMPONENT_NAME$1I,
|
|
4607
5312
|
emits: ['before-close', 'close', 'portal-fulfilled'],
|
|
4608
5313
|
props: props$15,
|
|
4609
5314
|
setup(props, {
|
|
@@ -4852,9 +5557,9 @@ const useClipboard = (done) => {
|
|
|
4852
5557
|
return () => h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
|
|
4853
5558
|
};
|
|
4854
5559
|
|
|
4855
|
-
const COMPONENT_NAME$
|
|
5560
|
+
const COMPONENT_NAME$1H = "vc-clipboard";
|
|
4856
5561
|
const Clipboard$1 = defineComponent({
|
|
4857
|
-
name: COMPONENT_NAME$
|
|
5562
|
+
name: COMPONENT_NAME$1H,
|
|
4858
5563
|
props: props$14,
|
|
4859
5564
|
setup() {
|
|
4860
5565
|
return useClipboard((content) => Message.success({ content }));
|
|
@@ -4894,9 +5599,9 @@ const MTransitionZoom = TransitionZoom;
|
|
|
4894
5599
|
|
|
4895
5600
|
/** @jsxImportSource vue */
|
|
4896
5601
|
|
|
4897
|
-
const COMPONENT_NAME$
|
|
5602
|
+
const COMPONENT_NAME$1G = 'vcm-toast';
|
|
4898
5603
|
const MToastView = /* @__PURE__ */ defineComponent({
|
|
4899
|
-
name: COMPONENT_NAME$
|
|
5604
|
+
name: COMPONENT_NAME$1G,
|
|
4900
5605
|
emits: ['close', 'portal-fulfilled'],
|
|
4901
5606
|
props: props$13,
|
|
4902
5607
|
setup(props, {
|
|
@@ -4998,9 +5703,9 @@ const warning$2 = create$3({ mode: "warning" });
|
|
|
4998
5703
|
const error$2 = create$3({ mode: "error" });
|
|
4999
5704
|
const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
|
|
5000
5705
|
|
|
5001
|
-
const COMPONENT_NAME$
|
|
5706
|
+
const COMPONENT_NAME$1F = "vcm-clipboard";
|
|
5002
5707
|
const MClipboard$1 = defineComponent({
|
|
5003
|
-
name: COMPONENT_NAME$
|
|
5708
|
+
name: COMPONENT_NAME$1F,
|
|
5004
5709
|
props: props$14,
|
|
5005
5710
|
setup() {
|
|
5006
5711
|
return useClipboard((content) => MToast.info({ content }));
|
|
@@ -5032,9 +5737,9 @@ const props$12 = {
|
|
|
5032
5737
|
}
|
|
5033
5738
|
};
|
|
5034
5739
|
|
|
5035
|
-
const COMPONENT_NAME$
|
|
5740
|
+
const COMPONENT_NAME$1E = "vc-collapse";
|
|
5036
5741
|
const Collapse = defineComponent({
|
|
5037
|
-
name: COMPONENT_NAME$
|
|
5742
|
+
name: COMPONENT_NAME$1E,
|
|
5038
5743
|
props: props$12,
|
|
5039
5744
|
emits: ["update:moodelValue", "change"],
|
|
5040
5745
|
setup(props, { slots, emit }) {
|
|
@@ -5151,9 +5856,9 @@ const props$10 = {
|
|
|
5151
5856
|
function _isSlot$3(s) {
|
|
5152
5857
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
5153
5858
|
}
|
|
5154
|
-
const COMPONENT_NAME$
|
|
5859
|
+
const COMPONENT_NAME$1D = 'vc-expand';
|
|
5155
5860
|
const Expand$1 = /* @__PURE__ */ defineComponent({
|
|
5156
|
-
name: COMPONENT_NAME$
|
|
5861
|
+
name: COMPONENT_NAME$1D,
|
|
5157
5862
|
props: props$10,
|
|
5158
5863
|
setup(props, {
|
|
5159
5864
|
slots
|
|
@@ -5183,9 +5888,9 @@ const Expand$1 = /* @__PURE__ */ defineComponent({
|
|
|
5183
5888
|
|
|
5184
5889
|
/** @jsxImportSource vue */
|
|
5185
5890
|
|
|
5186
|
-
const COMPONENT_NAME$
|
|
5891
|
+
const COMPONENT_NAME$1C = 'vc-collapse-item';
|
|
5187
5892
|
const CollapseItem = /* @__PURE__ */ defineComponent({
|
|
5188
|
-
name: COMPONENT_NAME$
|
|
5893
|
+
name: COMPONENT_NAME$1C,
|
|
5189
5894
|
props: props$11,
|
|
5190
5895
|
setup(props, {
|
|
5191
5896
|
slots,
|
|
@@ -5260,9 +5965,9 @@ const props$$ = {
|
|
|
5260
5965
|
|
|
5261
5966
|
/** @jsxImportSource vue */
|
|
5262
5967
|
|
|
5263
|
-
const COMPONENT_NAME$
|
|
5968
|
+
const COMPONENT_NAME$1B = 'vc-color-picker';
|
|
5264
5969
|
const ColorPicker = /* @__PURE__ */ defineComponent({
|
|
5265
|
-
name: COMPONENT_NAME$
|
|
5970
|
+
name: COMPONENT_NAME$1B,
|
|
5266
5971
|
props: props$$,
|
|
5267
5972
|
setup(props, {
|
|
5268
5973
|
slots
|
|
@@ -5325,9 +6030,9 @@ const formatter = (format, arr) => {
|
|
|
5325
6030
|
function _isSlot$2(s) {
|
|
5326
6031
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
5327
6032
|
}
|
|
5328
|
-
const COMPONENT_NAME$
|
|
6033
|
+
const COMPONENT_NAME$1A = 'vc-countdown';
|
|
5329
6034
|
const Countdown = /* @__PURE__ */ defineComponent({
|
|
5330
|
-
name: COMPONENT_NAME$
|
|
6035
|
+
name: COMPONENT_NAME$1A,
|
|
5331
6036
|
props: props$_,
|
|
5332
6037
|
emits: ['change', 'complete', 'error'],
|
|
5333
6038
|
setup(props, {
|
|
@@ -5600,9 +6305,9 @@ const value2separated = (value, options) => {
|
|
|
5600
6305
|
function _isSlot$1(s) {
|
|
5601
6306
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
5602
6307
|
}
|
|
5603
|
-
const COMPONENT_NAME$
|
|
6308
|
+
const COMPONENT_NAME$1z = 'vc-counter';
|
|
5604
6309
|
const Counter = /* @__PURE__ */ defineComponent({
|
|
5605
|
-
name: COMPONENT_NAME$
|
|
6310
|
+
name: COMPONENT_NAME$1z,
|
|
5606
6311
|
props: props$Z,
|
|
5607
6312
|
emits: ['begin', 'complete', 'change'],
|
|
5608
6313
|
setup(props, {
|
|
@@ -6865,9 +7570,9 @@ const getTimeType = type => {
|
|
|
6865
7570
|
}
|
|
6866
7571
|
return view;
|
|
6867
7572
|
};
|
|
6868
|
-
const COMPONENT_NAME$
|
|
7573
|
+
const COMPONENT_NAME$1y = 'vc-date-confirm';
|
|
6869
7574
|
const Confirm = /* @__PURE__ */ defineComponent({
|
|
6870
|
-
name: COMPONENT_NAME$
|
|
7575
|
+
name: COMPONENT_NAME$1y,
|
|
6871
7576
|
props: {
|
|
6872
7577
|
showTime: {
|
|
6873
7578
|
type: Boolean,
|
|
@@ -6931,9 +7636,9 @@ const Confirm = /* @__PURE__ */ defineComponent({
|
|
|
6931
7636
|
|
|
6932
7637
|
/** @jsxImportSource vue */
|
|
6933
7638
|
|
|
6934
|
-
const COMPONENT_NAME$
|
|
7639
|
+
const COMPONENT_NAME$1x = 'vc-date-header';
|
|
6935
7640
|
const DateHeader = /* @__PURE__ */ defineComponent({
|
|
6936
|
-
name: COMPONENT_NAME$
|
|
7641
|
+
name: COMPONENT_NAME$1x,
|
|
6937
7642
|
props: {
|
|
6938
7643
|
panelDate: Date,
|
|
6939
7644
|
showNext: {
|
|
@@ -7017,9 +7722,9 @@ const DateHeader = /* @__PURE__ */ defineComponent({
|
|
|
7017
7722
|
|
|
7018
7723
|
/** @jsxImportSource vue */
|
|
7019
7724
|
|
|
7020
|
-
const COMPONENT_NAME$
|
|
7725
|
+
const COMPONENT_NAME$1w = 'vc-date-table';
|
|
7021
7726
|
const DateTable = /* @__PURE__ */ defineComponent({
|
|
7022
|
-
name: COMPONENT_NAME$
|
|
7727
|
+
name: COMPONENT_NAME$1w,
|
|
7023
7728
|
props: {
|
|
7024
7729
|
value: Array,
|
|
7025
7730
|
firstDayOfWeek: {
|
|
@@ -7228,9 +7933,9 @@ const DateTable = /* @__PURE__ */ defineComponent({
|
|
|
7228
7933
|
|
|
7229
7934
|
/** @jsxImportSource vue */
|
|
7230
7935
|
|
|
7231
|
-
const COMPONENT_NAME$
|
|
7936
|
+
const COMPONENT_NAME$1v = 'vc-month-table';
|
|
7232
7937
|
const MonthTable = /* @__PURE__ */ defineComponent({
|
|
7233
|
-
name: COMPONENT_NAME$
|
|
7938
|
+
name: COMPONENT_NAME$1v,
|
|
7234
7939
|
props: {
|
|
7235
7940
|
value: Array,
|
|
7236
7941
|
panelDate: Date,
|
|
@@ -7362,7 +8067,7 @@ const MonthTable = /* @__PURE__ */ defineComponent({
|
|
|
7362
8067
|
|
|
7363
8068
|
/** @jsxImportSource vue */
|
|
7364
8069
|
|
|
7365
|
-
const COMPONENT_NAME$
|
|
8070
|
+
const COMPONENT_NAME$1u = 'vc-quarter-table';
|
|
7366
8071
|
|
|
7367
8072
|
/**
|
|
7368
8073
|
* 获取季度对应的月份范围
|
|
@@ -7396,7 +8101,7 @@ const getQuarterRangeByMonth = value => {
|
|
|
7396
8101
|
}
|
|
7397
8102
|
};
|
|
7398
8103
|
const QuarterTable = /* @__PURE__ */ defineComponent({
|
|
7399
|
-
name: COMPONENT_NAME$
|
|
8104
|
+
name: COMPONENT_NAME$1u,
|
|
7400
8105
|
props: {
|
|
7401
8106
|
value: Array,
|
|
7402
8107
|
panelDate: Date,
|
|
@@ -7519,9 +8224,9 @@ const QuarterTable = /* @__PURE__ */ defineComponent({
|
|
|
7519
8224
|
|
|
7520
8225
|
/** @jsxImportSource vue */
|
|
7521
8226
|
|
|
7522
|
-
const COMPONENT_NAME$
|
|
8227
|
+
const COMPONENT_NAME$1t = 'vc-shortcuts-select';
|
|
7523
8228
|
const ShortcutsSelect = /* @__PURE__ */ defineComponent({
|
|
7524
|
-
name: COMPONENT_NAME$
|
|
8229
|
+
name: COMPONENT_NAME$1t,
|
|
7525
8230
|
props: {
|
|
7526
8231
|
panelDate: Date,
|
|
7527
8232
|
config: Array,
|
|
@@ -7561,9 +8266,9 @@ const ShortcutsSelect = /* @__PURE__ */ defineComponent({
|
|
|
7561
8266
|
|
|
7562
8267
|
/** @jsxImportSource vue */
|
|
7563
8268
|
|
|
7564
|
-
const COMPONENT_NAME$
|
|
8269
|
+
const COMPONENT_NAME$1s = 'vc-time-select';
|
|
7565
8270
|
const TimeSelect = /* @__PURE__ */ defineComponent({
|
|
7566
|
-
name: COMPONENT_NAME$
|
|
8271
|
+
name: COMPONENT_NAME$1s,
|
|
7567
8272
|
props: {
|
|
7568
8273
|
hours: {
|
|
7569
8274
|
type: [Number, String],
|
|
@@ -7843,9 +8548,9 @@ const TimeSelect = /* @__PURE__ */ defineComponent({
|
|
|
7843
8548
|
|
|
7844
8549
|
/** @jsxImportSource vue */
|
|
7845
8550
|
|
|
7846
|
-
const COMPONENT_NAME$
|
|
8551
|
+
const COMPONENT_NAME$1r = 'vc-year-table';
|
|
7847
8552
|
const YearTable = /* @__PURE__ */ defineComponent({
|
|
7848
|
-
name: COMPONENT_NAME$
|
|
8553
|
+
name: COMPONENT_NAME$1r,
|
|
7849
8554
|
props: {
|
|
7850
8555
|
value: Array,
|
|
7851
8556
|
panelDate: Date,
|
|
@@ -7968,9 +8673,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
|
|
|
7968
8673
|
}
|
|
7969
8674
|
return true;
|
|
7970
8675
|
};
|
|
7971
|
-
const COMPONENT_NAME$
|
|
8676
|
+
const COMPONENT_NAME$1q = 'vc-date-range-panel';
|
|
7972
8677
|
const DateRangePanel = /* @__PURE__ */ defineComponent({
|
|
7973
|
-
name: COMPONENT_NAME$
|
|
8678
|
+
name: COMPONENT_NAME$1q,
|
|
7974
8679
|
props: {
|
|
7975
8680
|
...props$W,
|
|
7976
8681
|
confirm: {
|
|
@@ -8349,9 +9054,9 @@ const DateRangePanel = /* @__PURE__ */ defineComponent({
|
|
|
8349
9054
|
|
|
8350
9055
|
/** @jsxImportSource vue */
|
|
8351
9056
|
|
|
8352
|
-
const COMPONENT_NAME$
|
|
9057
|
+
const COMPONENT_NAME$1p = 'vc-date-panel';
|
|
8353
9058
|
const DatePanel = /* @__PURE__ */ defineComponent({
|
|
8354
|
-
name: COMPONENT_NAME$
|
|
9059
|
+
name: COMPONENT_NAME$1p,
|
|
8355
9060
|
props: {
|
|
8356
9061
|
...props$W,
|
|
8357
9062
|
type: String,
|
|
@@ -8559,9 +9264,9 @@ const isEqualYear$1 = value => {
|
|
|
8559
9264
|
const endYear = value[1].getFullYear();
|
|
8560
9265
|
return startYear === endYear;
|
|
8561
9266
|
};
|
|
8562
|
-
const COMPONENT_NAME$
|
|
9267
|
+
const COMPONENT_NAME$1o = 'vc-monthrange-panel';
|
|
8563
9268
|
const MonthRangePanel = /* @__PURE__ */ defineComponent({
|
|
8564
|
-
name: COMPONENT_NAME$
|
|
9269
|
+
name: COMPONENT_NAME$1o,
|
|
8565
9270
|
props: {
|
|
8566
9271
|
...props$W,
|
|
8567
9272
|
confirm: {
|
|
@@ -8736,9 +9441,9 @@ const isEqualYear = value => {
|
|
|
8736
9441
|
const endYear = value[1].getFullYear();
|
|
8737
9442
|
return startYear === endYear;
|
|
8738
9443
|
};
|
|
8739
|
-
const COMPONENT_NAME$
|
|
9444
|
+
const COMPONENT_NAME$1n = 'vc-quarterrange-panel';
|
|
8740
9445
|
const QuarterRangePanel = /* @__PURE__ */ defineComponent({
|
|
8741
|
-
name: COMPONENT_NAME$
|
|
9446
|
+
name: COMPONENT_NAME$1n,
|
|
8742
9447
|
props: {
|
|
8743
9448
|
...props$W,
|
|
8744
9449
|
confirm: {
|
|
@@ -8977,9 +9682,9 @@ const getComparedDate = (leftDate, rightDate) => {
|
|
|
8977
9682
|
seconds
|
|
8978
9683
|
};
|
|
8979
9684
|
};
|
|
8980
|
-
const COMPONENT_NAME$
|
|
9685
|
+
const COMPONENT_NAME$1m = 'vc-timerange-panel';
|
|
8981
9686
|
const TimeRangePanel = /* @__PURE__ */ defineComponent({
|
|
8982
|
-
name: COMPONENT_NAME$
|
|
9687
|
+
name: COMPONENT_NAME$1m,
|
|
8983
9688
|
props: props$V,
|
|
8984
9689
|
emits: ['pick', 'clear', 'ok'],
|
|
8985
9690
|
setup(props, {
|
|
@@ -9080,9 +9785,9 @@ const TimeRangePanel = /* @__PURE__ */ defineComponent({
|
|
|
9080
9785
|
|
|
9081
9786
|
/** @jsxImportSource vue */
|
|
9082
9787
|
|
|
9083
|
-
const COMPONENT_NAME$
|
|
9788
|
+
const COMPONENT_NAME$1l = 'vc-time-panel';
|
|
9084
9789
|
const TimePanel = /* @__PURE__ */ defineComponent({
|
|
9085
|
-
name: COMPONENT_NAME$
|
|
9790
|
+
name: COMPONENT_NAME$1l,
|
|
9086
9791
|
props: props$V,
|
|
9087
9792
|
emits: ['pick', 'clear', 'ok'],
|
|
9088
9793
|
setup(props, {
|
|
@@ -9138,7 +9843,7 @@ const TimePanel = /* @__PURE__ */ defineComponent({
|
|
|
9138
9843
|
|
|
9139
9844
|
/** @jsxImportSource vue */
|
|
9140
9845
|
|
|
9141
|
-
const COMPONENT_NAME$
|
|
9846
|
+
const COMPONENT_NAME$1k = 'vc-date-picker';
|
|
9142
9847
|
const getPanel$1 = type => {
|
|
9143
9848
|
if (['daterange', 'datetimerange'].includes(type)) {
|
|
9144
9849
|
return DateRangePanel;
|
|
@@ -9149,7 +9854,7 @@ const getPanel$1 = type => {
|
|
|
9149
9854
|
}
|
|
9150
9855
|
return DatePanel;
|
|
9151
9856
|
};
|
|
9152
|
-
const DatePicker = createPicker(COMPONENT_NAME$
|
|
9857
|
+
const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
|
|
9153
9858
|
const props = getCurrentInstance().props;
|
|
9154
9859
|
const icon = ref('date');
|
|
9155
9860
|
const panel = shallowRef({});
|
|
@@ -9190,9 +9895,9 @@ const props$U = {
|
|
|
9190
9895
|
|
|
9191
9896
|
/** @jsxImportSource vue */
|
|
9192
9897
|
|
|
9193
|
-
const COMPONENT_NAME$
|
|
9898
|
+
const COMPONENT_NAME$1j = 'vc-divider';
|
|
9194
9899
|
const Divider = /* @__PURE__ */ defineComponent({
|
|
9195
|
-
name: COMPONENT_NAME$
|
|
9900
|
+
name: COMPONENT_NAME$1j,
|
|
9196
9901
|
props: props$U,
|
|
9197
9902
|
setup(props, {
|
|
9198
9903
|
slots
|
|
@@ -9328,7 +10033,7 @@ const props$R = {
|
|
|
9328
10033
|
|
|
9329
10034
|
/** @jsxImportSource vue */
|
|
9330
10035
|
|
|
9331
|
-
const COMPONENT_NAME$
|
|
10036
|
+
const COMPONENT_NAME$1i = 'vc-scroller-track';
|
|
9332
10037
|
const BAR_MAP = {
|
|
9333
10038
|
vertical: {
|
|
9334
10039
|
scroll: 'scrollTop',
|
|
@@ -9348,7 +10053,7 @@ const BAR_MAP = {
|
|
|
9348
10053
|
}
|
|
9349
10054
|
};
|
|
9350
10055
|
const Track = /* @__PURE__ */ defineComponent({
|
|
9351
|
-
name: COMPONENT_NAME$
|
|
10056
|
+
name: COMPONENT_NAME$1i,
|
|
9352
10057
|
props: props$T,
|
|
9353
10058
|
emits: ['change'],
|
|
9354
10059
|
inheritAttrs: false,
|
|
@@ -9538,9 +10243,9 @@ const Track = /* @__PURE__ */ defineComponent({
|
|
|
9538
10243
|
|
|
9539
10244
|
/** @jsxImportSource vue */
|
|
9540
10245
|
|
|
9541
|
-
const COMPONENT_NAME$
|
|
10246
|
+
const COMPONENT_NAME$1h = 'vc-scroller-bar';
|
|
9542
10247
|
const Bar = /* @__PURE__ */ defineComponent({
|
|
9543
|
-
name: COMPONENT_NAME$
|
|
10248
|
+
name: COMPONENT_NAME$1h,
|
|
9544
10249
|
props: props$S,
|
|
9545
10250
|
emits: ['change'],
|
|
9546
10251
|
setup(props, {
|
|
@@ -9775,7 +10480,7 @@ const useScroller = (expose) => {
|
|
|
9775
10480
|
|
|
9776
10481
|
/** @jsxImportSource vue */
|
|
9777
10482
|
|
|
9778
|
-
const COMPONENT_NAME$
|
|
10483
|
+
const COMPONENT_NAME$1g = 'vc-scroller';
|
|
9779
10484
|
|
|
9780
10485
|
/**
|
|
9781
10486
|
* 作为备选方案,目前推荐使用ScrollerWheel
|
|
@@ -9786,7 +10491,7 @@ const COMPONENT_NAME$1e = 'vc-scroller';
|
|
|
9786
10491
|
* 2. 增加了一层嵌套
|
|
9787
10492
|
*/
|
|
9788
10493
|
const Scroller = /* @__PURE__ */ defineComponent({
|
|
9789
|
-
name: COMPONENT_NAME$
|
|
10494
|
+
name: COMPONENT_NAME$1g,
|
|
9790
10495
|
props: props$R,
|
|
9791
10496
|
emits: ['scroll'],
|
|
9792
10497
|
setup(props, {
|
|
@@ -9847,7 +10552,7 @@ const Scroller = /* @__PURE__ */ defineComponent({
|
|
|
9847
10552
|
|
|
9848
10553
|
/** @jsxImportSource vue */
|
|
9849
10554
|
|
|
9850
|
-
const COMPONENT_NAME$
|
|
10555
|
+
const COMPONENT_NAME$1f = 'vc-scroller-wheel';
|
|
9851
10556
|
|
|
9852
10557
|
/**
|
|
9853
10558
|
* 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
|
|
@@ -9869,7 +10574,7 @@ const COMPONENT_NAME$1d = 'vc-scroller-wheel';
|
|
|
9869
10574
|
* 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
|
|
9870
10575
|
*/
|
|
9871
10576
|
const ScrollerWheel = /* @__PURE__ */ defineComponent({
|
|
9872
|
-
name: COMPONENT_NAME$
|
|
10577
|
+
name: COMPONENT_NAME$1f,
|
|
9873
10578
|
props: Object.assign({}, props$R, {
|
|
9874
10579
|
stopPropagation: {
|
|
9875
10580
|
type: Boolean,
|
|
@@ -10058,9 +10763,9 @@ const props$Q = {
|
|
|
10058
10763
|
|
|
10059
10764
|
/** @jsxImportSource vue */
|
|
10060
10765
|
|
|
10061
|
-
const COMPONENT_NAME$
|
|
10766
|
+
const COMPONENT_NAME$1e = 'vc-drawer';
|
|
10062
10767
|
const DrawerView = /* @__PURE__ */ defineComponent({
|
|
10063
|
-
name: COMPONENT_NAME$
|
|
10768
|
+
name: COMPONENT_NAME$1e,
|
|
10064
10769
|
props: props$Q,
|
|
10065
10770
|
emits: ['close', 'update:modelValue', 'visible-change'],
|
|
10066
10771
|
setup(props, {
|
|
@@ -10249,9 +10954,9 @@ const props$P = {
|
|
|
10249
10954
|
|
|
10250
10955
|
/** @jsxImportSource vue */
|
|
10251
10956
|
|
|
10252
|
-
const COMPONENT_NAME$
|
|
10957
|
+
const COMPONENT_NAME$1d = 'vc-dropdown';
|
|
10253
10958
|
const Dropdown = /* @__PURE__ */ defineComponent({
|
|
10254
|
-
name: COMPONENT_NAME$
|
|
10959
|
+
name: COMPONENT_NAME$1d,
|
|
10255
10960
|
props: props$P,
|
|
10256
10961
|
inheritAttrs: false,
|
|
10257
10962
|
emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
|
|
@@ -10321,9 +11026,9 @@ const Dropdown = /* @__PURE__ */ defineComponent({
|
|
|
10321
11026
|
|
|
10322
11027
|
/** @jsxImportSource vue */
|
|
10323
11028
|
|
|
10324
|
-
const COMPONENT_NAME$
|
|
11029
|
+
const COMPONENT_NAME$1c = 'vc-dropdown-menu';
|
|
10325
11030
|
const DropdownMenu = /* @__PURE__ */ defineComponent({
|
|
10326
|
-
name: COMPONENT_NAME$
|
|
11031
|
+
name: COMPONENT_NAME$1c,
|
|
10327
11032
|
setup(_, {
|
|
10328
11033
|
slots
|
|
10329
11034
|
}) {
|
|
@@ -10337,9 +11042,9 @@ const DropdownMenu = /* @__PURE__ */ defineComponent({
|
|
|
10337
11042
|
|
|
10338
11043
|
/** @jsxImportSource vue */
|
|
10339
11044
|
|
|
10340
|
-
const COMPONENT_NAME$
|
|
11045
|
+
const COMPONENT_NAME$1b = 'vc-dropdown-item';
|
|
10341
11046
|
const DropdownItem = /* @__PURE__ */ defineComponent({
|
|
10342
|
-
name: COMPONENT_NAME$
|
|
11047
|
+
name: COMPONENT_NAME$1b,
|
|
10343
11048
|
emits: ['click'],
|
|
10344
11049
|
props: {
|
|
10345
11050
|
value: {
|
|
@@ -10544,9 +11249,9 @@ const defaults = {
|
|
|
10544
11249
|
|
|
10545
11250
|
/** @jsxImportSource vue */
|
|
10546
11251
|
|
|
10547
|
-
const COMPONENT_NAME$
|
|
11252
|
+
const COMPONENT_NAME$1a = 'vc-editor-toolbar';
|
|
10548
11253
|
const EditorToolbar = /* @__PURE__ */ defineComponent({
|
|
10549
|
-
name: COMPONENT_NAME$
|
|
11254
|
+
name: COMPONENT_NAME$1a,
|
|
10550
11255
|
props: {
|
|
10551
11256
|
options: [Array, Object],
|
|
10552
11257
|
elementId: String
|
|
@@ -10754,9 +11459,9 @@ const props$O = {
|
|
|
10754
11459
|
|
|
10755
11460
|
/** @jsxImportSource vue */
|
|
10756
11461
|
|
|
10757
|
-
const COMPONENT_NAME$
|
|
11462
|
+
const COMPONENT_NAME$19 = 'vc-image-preview';
|
|
10758
11463
|
const ImagePreview$1 = /* @__PURE__ */ defineComponent({
|
|
10759
|
-
name: COMPONENT_NAME$
|
|
11464
|
+
name: COMPONENT_NAME$19,
|
|
10760
11465
|
props: props$O,
|
|
10761
11466
|
setup(props, {
|
|
10762
11467
|
slots
|
|
@@ -10951,9 +11656,9 @@ const props$N = {
|
|
|
10951
11656
|
}
|
|
10952
11657
|
};
|
|
10953
11658
|
|
|
10954
|
-
const COMPONENT_NAME$
|
|
11659
|
+
const COMPONENT_NAME$18 = "vc-upload";
|
|
10955
11660
|
const Upload$1 = defineComponent({
|
|
10956
|
-
name: COMPONENT_NAME$
|
|
11661
|
+
name: COMPONENT_NAME$18,
|
|
10957
11662
|
props: props$N,
|
|
10958
11663
|
emits: [
|
|
10959
11664
|
"message",
|
|
@@ -11487,9 +12192,9 @@ const props$M = {
|
|
|
11487
12192
|
|
|
11488
12193
|
/** @jsxImportSource vue */
|
|
11489
12194
|
|
|
11490
|
-
const COMPONENT_NAME$
|
|
12195
|
+
const COMPONENT_NAME$17 = 'vc-editor';
|
|
11491
12196
|
const Editor = /* @__PURE__ */ defineComponent({
|
|
11492
|
-
name: COMPONENT_NAME$
|
|
12197
|
+
name: COMPONENT_NAME$17,
|
|
11493
12198
|
props: props$M,
|
|
11494
12199
|
defaults,
|
|
11495
12200
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
@@ -11678,7 +12383,7 @@ const Editor = /* @__PURE__ */ defineComponent({
|
|
|
11678
12383
|
|
|
11679
12384
|
/** @jsxImportSource vue */
|
|
11680
12385
|
|
|
11681
|
-
const COMPONENT_NAME$
|
|
12386
|
+
const COMPONENT_NAME$16 = 'vc-editor-view';
|
|
11682
12387
|
const setImages = v => {
|
|
11683
12388
|
if (!v) return;
|
|
11684
12389
|
const IMG_REGX = /<img.*?(?:>|\/>)/gi;
|
|
@@ -11696,7 +12401,7 @@ const setImages = v => {
|
|
|
11696
12401
|
return;
|
|
11697
12402
|
};
|
|
11698
12403
|
const EditorView = /* @__PURE__ */ defineComponent({
|
|
11699
|
-
name: COMPONENT_NAME$
|
|
12404
|
+
name: COMPONENT_NAME$16,
|
|
11700
12405
|
props: {
|
|
11701
12406
|
value: {
|
|
11702
12407
|
type: String,
|
|
@@ -11911,9 +12616,9 @@ const useForm = (expose, options = {}) => {
|
|
|
11911
12616
|
});
|
|
11912
12617
|
};
|
|
11913
12618
|
|
|
11914
|
-
const COMPONENT_NAME$
|
|
12619
|
+
const COMPONENT_NAME$15 = "vc-form";
|
|
11915
12620
|
const Form = defineComponent({
|
|
11916
|
-
name: COMPONENT_NAME$
|
|
12621
|
+
name: COMPONENT_NAME$15,
|
|
11917
12622
|
props: props$L,
|
|
11918
12623
|
setup(props, { slots, expose }) {
|
|
11919
12624
|
useForm(expose);
|
|
@@ -12261,9 +12966,9 @@ const useFormItem = (expose) => {
|
|
|
12261
12966
|
|
|
12262
12967
|
/** @jsxImportSource vue */
|
|
12263
12968
|
|
|
12264
|
-
const COMPONENT_NAME$
|
|
12969
|
+
const COMPONENT_NAME$14 = 'vc-form-item';
|
|
12265
12970
|
const FormItem = /* @__PURE__ */ defineComponent({
|
|
12266
|
-
name: COMPONENT_NAME$
|
|
12971
|
+
name: COMPONENT_NAME$14,
|
|
12267
12972
|
props: props$K,
|
|
12268
12973
|
setup(props, {
|
|
12269
12974
|
slots,
|
|
@@ -12331,9 +13036,9 @@ const props$J = {
|
|
|
12331
13036
|
}
|
|
12332
13037
|
};
|
|
12333
13038
|
|
|
12334
|
-
const COMPONENT_NAME$
|
|
13039
|
+
const COMPONENT_NAME$13 = "vcm-form";
|
|
12335
13040
|
const MForm = defineComponent({
|
|
12336
|
-
name: COMPONENT_NAME$
|
|
13041
|
+
name: COMPONENT_NAME$13,
|
|
12337
13042
|
props: props$J,
|
|
12338
13043
|
setup(props, { slots, expose }) {
|
|
12339
13044
|
useForm(expose, {
|
|
@@ -12364,9 +13069,9 @@ const props$I = {
|
|
|
12364
13069
|
|
|
12365
13070
|
/** @jsxImportSource vue */
|
|
12366
13071
|
|
|
12367
|
-
const COMPONENT_NAME$
|
|
13072
|
+
const COMPONENT_NAME$12 = 'vcm-form-item';
|
|
12368
13073
|
const MFormItem = /* @__PURE__ */ defineComponent({
|
|
12369
|
-
name: COMPONENT_NAME$
|
|
13074
|
+
name: COMPONENT_NAME$12,
|
|
12370
13075
|
props: props$I,
|
|
12371
13076
|
setup(props, {
|
|
12372
13077
|
slots,
|
|
@@ -12421,9 +13126,9 @@ const MFormItem = /* @__PURE__ */ defineComponent({
|
|
|
12421
13126
|
}
|
|
12422
13127
|
});
|
|
12423
13128
|
|
|
12424
|
-
const COMPONENT_NAME
|
|
13129
|
+
const COMPONENT_NAME$11 = "vc-fragment";
|
|
12425
13130
|
const Fragment = defineComponent({
|
|
12426
|
-
name: COMPONENT_NAME
|
|
13131
|
+
name: COMPONENT_NAME$11,
|
|
12427
13132
|
setup(_, { slots }) {
|
|
12428
13133
|
return () => h(Fragment$1, slots.default?.());
|
|
12429
13134
|
}
|
|
@@ -12462,9 +13167,9 @@ const props$H = {
|
|
|
12462
13167
|
|
|
12463
13168
|
/** @jsxImportSource vue */
|
|
12464
13169
|
|
|
12465
|
-
const COMPONENT_NAME$
|
|
13170
|
+
const COMPONENT_NAME$10 = 'vc-snapshot';
|
|
12466
13171
|
const Snapshot = /* @__PURE__ */ defineComponent({
|
|
12467
|
-
name: COMPONENT_NAME$
|
|
13172
|
+
name: COMPONENT_NAME$10,
|
|
12468
13173
|
props: props$H,
|
|
12469
13174
|
emits: ['ready'],
|
|
12470
13175
|
setup(props, {
|
|
@@ -12623,7 +13328,7 @@ const IMGStore$1 = new IMGStore();
|
|
|
12623
13328
|
|
|
12624
13329
|
/** @jsxImportSource vue */
|
|
12625
13330
|
|
|
12626
|
-
const COMPONENT_NAME
|
|
13331
|
+
const COMPONENT_NAME$$ = 'vc-image';
|
|
12627
13332
|
let isSupportObjectFit = false;
|
|
12628
13333
|
window.addEventListener('DOMContentLoaded', () => {
|
|
12629
13334
|
isSupportObjectFit = !IS_SERVER$1 && document.documentElement.style.objectFit !== undefined;
|
|
@@ -12636,7 +13341,7 @@ const ObjectFit = {
|
|
|
12636
13341
|
SCALE_DOWN: 'scale-down'
|
|
12637
13342
|
};
|
|
12638
13343
|
const Image$1 = /* @__PURE__ */ defineComponent({
|
|
12639
|
-
name: COMPONENT_NAME
|
|
13344
|
+
name: COMPONENT_NAME$$,
|
|
12640
13345
|
inheritAttrs: false,
|
|
12641
13346
|
props: props$G,
|
|
12642
13347
|
setup(props, {
|
|
@@ -12853,9 +13558,9 @@ const props$F = {
|
|
|
12853
13558
|
|
|
12854
13559
|
/** @jsxImportSource vue */
|
|
12855
13560
|
|
|
12856
|
-
const COMPONENT_NAME$
|
|
13561
|
+
const COMPONENT_NAME$_ = 'vc-image-crop';
|
|
12857
13562
|
const ImageCrop = /* @__PURE__ */ defineComponent({
|
|
12858
|
-
name: COMPONENT_NAME$
|
|
13563
|
+
name: COMPONENT_NAME$_,
|
|
12859
13564
|
props: props$F,
|
|
12860
13565
|
setup(props, {
|
|
12861
13566
|
slots
|
|
@@ -12881,9 +13586,9 @@ const props$E = {
|
|
|
12881
13586
|
|
|
12882
13587
|
/** @jsxImportSource vue */
|
|
12883
13588
|
|
|
12884
|
-
const COMPONENT_NAME$
|
|
13589
|
+
const COMPONENT_NAME$Z = 'vc-image-processing';
|
|
12885
13590
|
const ImageProcessing = /* @__PURE__ */ defineComponent({
|
|
12886
|
-
name: COMPONENT_NAME$
|
|
13591
|
+
name: COMPONENT_NAME$Z,
|
|
12887
13592
|
props: props$E,
|
|
12888
13593
|
setup(props, {
|
|
12889
13594
|
slots
|
|
@@ -12900,9 +13605,9 @@ const MImageProcessing = ImageProcessing;
|
|
|
12900
13605
|
|
|
12901
13606
|
/** @jsxImportSource vue */
|
|
12902
13607
|
|
|
12903
|
-
const COMPONENT_NAME$
|
|
13608
|
+
const COMPONENT_NAME$Y = 'vcm-input';
|
|
12904
13609
|
const MInput = /* @__PURE__ */ defineComponent({
|
|
12905
|
-
name: COMPONENT_NAME$
|
|
13610
|
+
name: COMPONENT_NAME$Y,
|
|
12906
13611
|
inheritAttrs: false,
|
|
12907
13612
|
props: {
|
|
12908
13613
|
...props$1h,
|
|
@@ -12991,9 +13696,9 @@ const MInput = /* @__PURE__ */ defineComponent({
|
|
|
12991
13696
|
|
|
12992
13697
|
/** @jsxImportSource vue */
|
|
12993
13698
|
|
|
12994
|
-
const COMPONENT_NAME$
|
|
13699
|
+
const COMPONENT_NAME$X = 'vcm-input-number';
|
|
12995
13700
|
const MInputNumber = /* @__PURE__ */ defineComponent({
|
|
12996
|
-
name: COMPONENT_NAME$
|
|
13701
|
+
name: COMPONENT_NAME$X,
|
|
12997
13702
|
props: props$1g,
|
|
12998
13703
|
inheritAttrs: false,
|
|
12999
13704
|
setup(props, {
|
|
@@ -13042,9 +13747,9 @@ const MInputNumber = /* @__PURE__ */ defineComponent({
|
|
|
13042
13747
|
|
|
13043
13748
|
/** @jsxImportSource vue */
|
|
13044
13749
|
|
|
13045
|
-
const COMPONENT_NAME$
|
|
13750
|
+
const COMPONENT_NAME$W = 'vcm-input-search';
|
|
13046
13751
|
const MInputSearch = /* @__PURE__ */ defineComponent({
|
|
13047
|
-
name: COMPONENT_NAME$
|
|
13752
|
+
name: COMPONENT_NAME$W,
|
|
13048
13753
|
props: {
|
|
13049
13754
|
...props$1f,
|
|
13050
13755
|
cancelText: {
|
|
@@ -13121,9 +13826,9 @@ const props$D = {
|
|
|
13121
13826
|
}
|
|
13122
13827
|
};
|
|
13123
13828
|
|
|
13124
|
-
const COMPONENT_NAME$
|
|
13829
|
+
const COMPONENT_NAME$V = "vcm-list";
|
|
13125
13830
|
const MList = defineComponent({
|
|
13126
|
-
name: COMPONENT_NAME$
|
|
13831
|
+
name: COMPONENT_NAME$V,
|
|
13127
13832
|
props: props$D,
|
|
13128
13833
|
setup(props, { slots }) {
|
|
13129
13834
|
provide("vc-list", { props });
|
|
@@ -13178,10 +13883,10 @@ const props$C = {
|
|
|
13178
13883
|
|
|
13179
13884
|
/** @jsxImportSource vue */
|
|
13180
13885
|
|
|
13181
|
-
const COMPONENT_NAME$
|
|
13886
|
+
const COMPONENT_NAME$U = 'vcm-list-item';
|
|
13182
13887
|
const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
|
|
13183
13888
|
const MListItem = /* @__PURE__ */ defineComponent({
|
|
13184
|
-
name: COMPONENT_NAME$
|
|
13889
|
+
name: COMPONENT_NAME$U,
|
|
13185
13890
|
props: props$C,
|
|
13186
13891
|
emits: ['click'],
|
|
13187
13892
|
setup(props, {
|
|
@@ -13275,11 +13980,11 @@ const props$B = {
|
|
|
13275
13980
|
|
|
13276
13981
|
/** @jsxImportSource vue */
|
|
13277
13982
|
|
|
13278
|
-
const COMPONENT_NAME$
|
|
13983
|
+
const COMPONENT_NAME$T = 'vc-marquee';
|
|
13279
13984
|
const ANIMATION = prefixStyle('animation').camel;
|
|
13280
13985
|
const TRANSFORM_KEBAB = prefixStyle('transform').kebab;
|
|
13281
13986
|
const Marquee = /* @__PURE__ */ defineComponent({
|
|
13282
|
-
name: COMPONENT_NAME$
|
|
13987
|
+
name: COMPONENT_NAME$T,
|
|
13283
13988
|
props: props$B,
|
|
13284
13989
|
setup(props, {
|
|
13285
13990
|
slots
|
|
@@ -13347,9 +14052,9 @@ const props$A = {
|
|
|
13347
14052
|
}
|
|
13348
14053
|
};
|
|
13349
14054
|
|
|
13350
|
-
const COMPONENT_NAME$
|
|
14055
|
+
const COMPONENT_NAME$S = "vc-resizer";
|
|
13351
14056
|
const Resizer = defineComponent({
|
|
13352
|
-
name: COMPONENT_NAME$
|
|
14057
|
+
name: COMPONENT_NAME$S,
|
|
13353
14058
|
props: props$A,
|
|
13354
14059
|
emits: ["resize"],
|
|
13355
14060
|
setup(props, { emit, slots, expose }) {
|
|
@@ -13519,10 +14224,10 @@ const props$z = {
|
|
|
13519
14224
|
|
|
13520
14225
|
/** @jsxImportSource vue */
|
|
13521
14226
|
|
|
13522
|
-
const COMPONENT_NAME$
|
|
14227
|
+
const COMPONENT_NAME$R = 'vc-modal';
|
|
13523
14228
|
let zIndexNumber = 1002;
|
|
13524
14229
|
const ModalView = /* @__PURE__ */ defineComponent({
|
|
13525
|
-
name: COMPONENT_NAME$
|
|
14230
|
+
name: COMPONENT_NAME$R,
|
|
13526
14231
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
|
|
13527
14232
|
props: props$z,
|
|
13528
14233
|
setup(props, {
|
|
@@ -13961,9 +14666,9 @@ const props$y = {
|
|
|
13961
14666
|
|
|
13962
14667
|
/** @jsxImportSource vue */
|
|
13963
14668
|
|
|
13964
|
-
const COMPONENT_NAME$
|
|
14669
|
+
const COMPONENT_NAME$Q = 'vc-modal';
|
|
13965
14670
|
const MModalView = /* @__PURE__ */ defineComponent({
|
|
13966
|
-
name: COMPONENT_NAME$
|
|
14671
|
+
name: COMPONENT_NAME$Q,
|
|
13967
14672
|
emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
|
|
13968
14673
|
props: props$y,
|
|
13969
14674
|
setup(props, {
|
|
@@ -14175,9 +14880,9 @@ const props$x = {
|
|
|
14175
14880
|
|
|
14176
14881
|
/** @jsxImportSource vue */
|
|
14177
14882
|
|
|
14178
|
-
const COMPONENT_NAME$
|
|
14883
|
+
const COMPONENT_NAME$P = 'vc-notice';
|
|
14179
14884
|
const NoticeView = /* @__PURE__ */ defineComponent({
|
|
14180
|
-
name: COMPONENT_NAME$
|
|
14885
|
+
name: COMPONENT_NAME$P,
|
|
14181
14886
|
props: props$x,
|
|
14182
14887
|
emits: ['portal-fulfilled', 'close', 'before-close'],
|
|
14183
14888
|
setup(props, {
|
|
@@ -14350,9 +15055,9 @@ const props$w = {
|
|
|
14350
15055
|
|
|
14351
15056
|
/** @jsxImportSource vue */
|
|
14352
15057
|
|
|
14353
|
-
const COMPONENT_NAME$
|
|
15058
|
+
const COMPONENT_NAME$O = 'vc-option';
|
|
14354
15059
|
const Option$1 = /* @__PURE__ */ defineComponent({
|
|
14355
|
-
name: COMPONENT_NAME$
|
|
15060
|
+
name: COMPONENT_NAME$O,
|
|
14356
15061
|
props: props$w,
|
|
14357
15062
|
setup(props, {
|
|
14358
15063
|
slots
|
|
@@ -14436,9 +15141,9 @@ const props$u = {
|
|
|
14436
15141
|
|
|
14437
15142
|
/** @jsxImportSource vue */
|
|
14438
15143
|
|
|
14439
|
-
const COMPONENT_NAME$
|
|
15144
|
+
const COMPONENT_NAME$N = 'vc-tag';
|
|
14440
15145
|
const Tag = /* @__PURE__ */ defineComponent({
|
|
14441
|
-
name: COMPONENT_NAME$
|
|
15146
|
+
name: COMPONENT_NAME$N,
|
|
14442
15147
|
props: props$u,
|
|
14443
15148
|
emits: ['close', 'change'],
|
|
14444
15149
|
setup(props, {
|
|
@@ -14509,9 +15214,9 @@ const props$t = {
|
|
|
14509
15214
|
|
|
14510
15215
|
/** @jsxImportSource vue */
|
|
14511
15216
|
|
|
14512
|
-
const COMPONENT_NAME$
|
|
15217
|
+
const COMPONENT_NAME$M = 'vc-select-option';
|
|
14513
15218
|
const Option = /* @__PURE__ */ defineComponent({
|
|
14514
|
-
name: COMPONENT_NAME$
|
|
15219
|
+
name: COMPONENT_NAME$M,
|
|
14515
15220
|
props: props$t,
|
|
14516
15221
|
setup(props, {
|
|
14517
15222
|
slots,
|
|
@@ -14606,9 +15311,9 @@ const props$s = {
|
|
|
14606
15311
|
|
|
14607
15312
|
/** @jsxImportSource vue */
|
|
14608
15313
|
|
|
14609
|
-
const COMPONENT_NAME$
|
|
15314
|
+
const COMPONENT_NAME$L = 'vc-select-option-group';
|
|
14610
15315
|
const OptionGroup = /* @__PURE__ */ defineComponent({
|
|
14611
|
-
name: COMPONENT_NAME$
|
|
15316
|
+
name: COMPONENT_NAME$L,
|
|
14612
15317
|
props: props$s,
|
|
14613
15318
|
setup(props, {
|
|
14614
15319
|
slots
|
|
@@ -14638,9 +15343,9 @@ const OptionGroup = /* @__PURE__ */ defineComponent({
|
|
|
14638
15343
|
|
|
14639
15344
|
/** @jsxImportSource vue */
|
|
14640
15345
|
|
|
14641
|
-
const COMPONENT_NAME$
|
|
15346
|
+
const COMPONENT_NAME$K = 'vc-select-all';
|
|
14642
15347
|
const SelectAll = /* @__PURE__ */ defineComponent({
|
|
14643
|
-
name: COMPONENT_NAME$
|
|
15348
|
+
name: COMPONENT_NAME$K,
|
|
14644
15349
|
props: {
|
|
14645
15350
|
data: {
|
|
14646
15351
|
type: Array,
|
|
@@ -14710,9 +15415,9 @@ const SelectAll = /* @__PURE__ */ defineComponent({
|
|
|
14710
15415
|
|
|
14711
15416
|
/** @jsxImportSource vue */
|
|
14712
15417
|
|
|
14713
|
-
const COMPONENT_NAME$
|
|
15418
|
+
const COMPONENT_NAME$J = 'vc-select';
|
|
14714
15419
|
const Select = /* @__PURE__ */ defineComponent({
|
|
14715
|
-
name: COMPONENT_NAME$
|
|
15420
|
+
name: COMPONENT_NAME$J,
|
|
14716
15421
|
props: props$1a,
|
|
14717
15422
|
emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
|
|
14718
15423
|
setup(props, {
|
|
@@ -15006,9 +15711,9 @@ const Select = /* @__PURE__ */ defineComponent({
|
|
|
15006
15711
|
|
|
15007
15712
|
/** @jsxImportSource vue */
|
|
15008
15713
|
|
|
15009
|
-
const COMPONENT_NAME$
|
|
15714
|
+
const COMPONENT_NAME$I = 'vc-pagination';
|
|
15010
15715
|
const Pagination = /* @__PURE__ */ defineComponent({
|
|
15011
|
-
name: COMPONENT_NAME$
|
|
15716
|
+
name: COMPONENT_NAME$I,
|
|
15012
15717
|
props: props$v,
|
|
15013
15718
|
emits: ['update:current', 'change', 'page-size-change'],
|
|
15014
15719
|
setup(props, {
|
|
@@ -15206,9 +15911,9 @@ const props$r = {
|
|
|
15206
15911
|
|
|
15207
15912
|
/** @jsxImportSource vue */
|
|
15208
15913
|
|
|
15209
|
-
const COMPONENT_NAME$
|
|
15914
|
+
const COMPONENT_NAME$H = 'vc-picker';
|
|
15210
15915
|
const Picker = /* @__PURE__ */ defineComponent({
|
|
15211
|
-
name: COMPONENT_NAME$
|
|
15916
|
+
name: COMPONENT_NAME$H,
|
|
15212
15917
|
props: props$r,
|
|
15213
15918
|
setup(props, {
|
|
15214
15919
|
slots
|
|
@@ -15271,9 +15976,9 @@ const props$q = {
|
|
|
15271
15976
|
|
|
15272
15977
|
/** @jsxImportSource vue */
|
|
15273
15978
|
|
|
15274
|
-
const COMPONENT_NAME$
|
|
15979
|
+
const COMPONENT_NAME$G = 'vc-popconfirm';
|
|
15275
15980
|
const Popconfirm = /* @__PURE__ */ defineComponent({
|
|
15276
|
-
name: COMPONENT_NAME$
|
|
15981
|
+
name: COMPONENT_NAME$G,
|
|
15277
15982
|
props: props$q,
|
|
15278
15983
|
inheritAttrs: false,
|
|
15279
15984
|
emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
|
|
@@ -15441,9 +16146,9 @@ const props$p = {
|
|
|
15441
16146
|
|
|
15442
16147
|
/** @jsxImportSource vue */
|
|
15443
16148
|
|
|
15444
|
-
const COMPONENT_NAME$
|
|
16149
|
+
const COMPONENT_NAME$F = 'vc-popup';
|
|
15445
16150
|
const MPopup = /* @__PURE__ */ defineComponent({
|
|
15446
|
-
name: COMPONENT_NAME$
|
|
16151
|
+
name: COMPONENT_NAME$F,
|
|
15447
16152
|
props: props$p,
|
|
15448
16153
|
emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change'],
|
|
15449
16154
|
setup(props, {
|
|
@@ -15570,9 +16275,9 @@ const props$o = {
|
|
|
15570
16275
|
|
|
15571
16276
|
/** @jsxImportSource vue */
|
|
15572
16277
|
|
|
15573
|
-
const COMPONENT_NAME$
|
|
16278
|
+
const COMPONENT_NAME$E = 'vc-print';
|
|
15574
16279
|
const Print = /* @__PURE__ */ defineComponent({
|
|
15575
|
-
name: COMPONENT_NAME$
|
|
16280
|
+
name: COMPONENT_NAME$E,
|
|
15576
16281
|
props: props$o,
|
|
15577
16282
|
setup(props, {
|
|
15578
16283
|
expose,
|
|
@@ -15652,7 +16357,7 @@ const props$n = {
|
|
|
15652
16357
|
},
|
|
15653
16358
|
strokeColor: {
|
|
15654
16359
|
type: String,
|
|
15655
|
-
default: "#
|
|
16360
|
+
default: "#456CF6"
|
|
15656
16361
|
},
|
|
15657
16362
|
trackColor: {
|
|
15658
16363
|
type: String,
|
|
@@ -15674,9 +16379,9 @@ const props$n = {
|
|
|
15674
16379
|
|
|
15675
16380
|
/** @jsxImportSource vue */
|
|
15676
16381
|
|
|
15677
|
-
const COMPONENT_NAME$
|
|
16382
|
+
const COMPONENT_NAME$D = 'vc-progress-circle';
|
|
15678
16383
|
const Circle = /* @__PURE__ */ defineComponent({
|
|
15679
|
-
name: COMPONENT_NAME$
|
|
16384
|
+
name: COMPONENT_NAME$D,
|
|
15680
16385
|
props: props$n,
|
|
15681
16386
|
setup(props, {
|
|
15682
16387
|
slots
|
|
@@ -15736,9 +16441,9 @@ const Circle = /* @__PURE__ */ defineComponent({
|
|
|
15736
16441
|
|
|
15737
16442
|
/** @jsxImportSource vue */
|
|
15738
16443
|
|
|
15739
|
-
const COMPONENT_NAME$
|
|
16444
|
+
const COMPONENT_NAME$C = 'vc-progress-line';
|
|
15740
16445
|
const Line = /* @__PURE__ */ defineComponent({
|
|
15741
|
-
name: COMPONENT_NAME$
|
|
16446
|
+
name: COMPONENT_NAME$C,
|
|
15742
16447
|
props: props$n,
|
|
15743
16448
|
setup(props) {
|
|
15744
16449
|
const colorStyle = computed(() => {
|
|
@@ -15785,9 +16490,9 @@ const Line = /* @__PURE__ */ defineComponent({
|
|
|
15785
16490
|
function _isSlot(s) {
|
|
15786
16491
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
15787
16492
|
}
|
|
15788
|
-
const COMPONENT_NAME$
|
|
16493
|
+
const COMPONENT_NAME$B = 'vc-progress';
|
|
15789
16494
|
const Progress = /* @__PURE__ */ defineComponent({
|
|
15790
|
-
name: COMPONENT_NAME$
|
|
16495
|
+
name: COMPONENT_NAME$B,
|
|
15791
16496
|
props: props$n,
|
|
15792
16497
|
setup(props, {
|
|
15793
16498
|
slots
|
|
@@ -15949,9 +16654,9 @@ const useRadio = () => {
|
|
|
15949
16654
|
|
|
15950
16655
|
/** @jsxImportSource vue */
|
|
15951
16656
|
|
|
15952
|
-
const COMPONENT_NAME$
|
|
16657
|
+
const COMPONENT_NAME$A = 'vc-radio';
|
|
15953
16658
|
const Radio = /* @__PURE__ */ defineComponent({
|
|
15954
|
-
name: COMPONENT_NAME$
|
|
16659
|
+
name: COMPONENT_NAME$A,
|
|
15955
16660
|
props: props$m,
|
|
15956
16661
|
emits: ['update:modelValue', 'change'],
|
|
15957
16662
|
setup(props, {
|
|
@@ -15995,9 +16700,9 @@ const Radio = /* @__PURE__ */ defineComponent({
|
|
|
15995
16700
|
|
|
15996
16701
|
/** @jsxImportSource vue */
|
|
15997
16702
|
|
|
15998
|
-
const COMPONENT_NAME$
|
|
16703
|
+
const COMPONENT_NAME$z = 'vc-radio-button';
|
|
15999
16704
|
const RadioButton = /* @__PURE__ */ defineComponent({
|
|
16000
|
-
name: COMPONENT_NAME$
|
|
16705
|
+
name: COMPONENT_NAME$z,
|
|
16001
16706
|
props: {
|
|
16002
16707
|
...props$m,
|
|
16003
16708
|
labelStyle: [String, Object],
|
|
@@ -16110,9 +16815,9 @@ const useRadioGroup = () => {
|
|
|
16110
16815
|
|
|
16111
16816
|
/** @jsxImportSource vue */
|
|
16112
16817
|
|
|
16113
|
-
const COMPONENT_NAME$
|
|
16818
|
+
const COMPONENT_NAME$y = 'vc-radio-group';
|
|
16114
16819
|
const RadioGroup = /* @__PURE__ */ defineComponent({
|
|
16115
|
-
name: COMPONENT_NAME$
|
|
16820
|
+
name: COMPONENT_NAME$y,
|
|
16116
16821
|
props: props$l,
|
|
16117
16822
|
emits: ['update:modelValue', 'change'],
|
|
16118
16823
|
setup(props, {
|
|
@@ -16133,9 +16838,9 @@ const RadioGroup = /* @__PURE__ */ defineComponent({
|
|
|
16133
16838
|
|
|
16134
16839
|
/** @jsxImportSource vue */
|
|
16135
16840
|
|
|
16136
|
-
const COMPONENT_NAME$
|
|
16841
|
+
const COMPONENT_NAME$x = 'vcm-radio';
|
|
16137
16842
|
const MRadio = /* @__PURE__ */ defineComponent({
|
|
16138
|
-
name: COMPONENT_NAME$
|
|
16843
|
+
name: COMPONENT_NAME$x,
|
|
16139
16844
|
props: props$m,
|
|
16140
16845
|
emits: ['update:modelValue', 'change'],
|
|
16141
16846
|
setup(props, {
|
|
@@ -16179,9 +16884,9 @@ const MRadio = /* @__PURE__ */ defineComponent({
|
|
|
16179
16884
|
|
|
16180
16885
|
/** @jsxImportSource vue */
|
|
16181
16886
|
|
|
16182
|
-
const COMPONENT_NAME$
|
|
16887
|
+
const COMPONENT_NAME$w = 'vcm-radio-group';
|
|
16183
16888
|
const MRadioGroup = /* @__PURE__ */ defineComponent({
|
|
16184
|
-
name: COMPONENT_NAME$
|
|
16889
|
+
name: COMPONENT_NAME$w,
|
|
16185
16890
|
props: props$l,
|
|
16186
16891
|
emits: ['update:modelValue', 'change'],
|
|
16187
16892
|
setup(props, {
|
|
@@ -16248,9 +16953,9 @@ const props$k = {
|
|
|
16248
16953
|
|
|
16249
16954
|
/** @jsxImportSource vue */
|
|
16250
16955
|
|
|
16251
|
-
const COMPONENT_NAME$
|
|
16956
|
+
const COMPONENT_NAME$v = 'vc-rate';
|
|
16252
16957
|
const Rate = /* @__PURE__ */ defineComponent({
|
|
16253
|
-
name: COMPONENT_NAME$
|
|
16958
|
+
name: COMPONENT_NAME$v,
|
|
16254
16959
|
props: props$k,
|
|
16255
16960
|
emits: ['update:modelValue', 'change'],
|
|
16256
16961
|
setup(props, {
|
|
@@ -16452,9 +17157,9 @@ const props$j = {
|
|
|
16452
17157
|
|
|
16453
17158
|
/** @jsxImportSource vue */
|
|
16454
17159
|
|
|
16455
|
-
const COMPONENT_NAME$
|
|
17160
|
+
const COMPONENT_NAME$u = 'vc-recycle-list-scroll-state';
|
|
16456
17161
|
const ScrollState = /* @__PURE__ */ defineComponent({
|
|
16457
|
-
name: COMPONENT_NAME$
|
|
17162
|
+
name: COMPONENT_NAME$u,
|
|
16458
17163
|
setup(_, {
|
|
16459
17164
|
slots
|
|
16460
17165
|
}) {
|
|
@@ -16584,12 +17289,12 @@ const useDirectionKeys = () => {
|
|
|
16584
17289
|
|
|
16585
17290
|
/** @jsxImportSource vue */
|
|
16586
17291
|
|
|
16587
|
-
const COMPONENT_NAME$
|
|
17292
|
+
const COMPONENT_NAME$t = 'vc-recycle-list-container';
|
|
16588
17293
|
|
|
16589
17294
|
// TODO: 抽离
|
|
16590
17295
|
const transformKey = $.prefixStyle('transform').camel;
|
|
16591
17296
|
const Container = /* @__PURE__ */ defineComponent({
|
|
16592
|
-
name: COMPONENT_NAME$
|
|
17297
|
+
name: COMPONENT_NAME$t,
|
|
16593
17298
|
props: props$i,
|
|
16594
17299
|
emits: ['refresh'],
|
|
16595
17300
|
setup(props, {
|
|
@@ -16687,9 +17392,9 @@ const Container = /* @__PURE__ */ defineComponent({
|
|
|
16687
17392
|
|
|
16688
17393
|
/** @jsxImportSource vue */
|
|
16689
17394
|
|
|
16690
|
-
const COMPONENT_NAME$
|
|
17395
|
+
const COMPONENT_NAME$s = 'vc-recycle-list';
|
|
16691
17396
|
const RecycleList = /* @__PURE__ */ defineComponent({
|
|
16692
|
-
name: COMPONENT_NAME$
|
|
17397
|
+
name: COMPONENT_NAME$s,
|
|
16693
17398
|
props: props$j,
|
|
16694
17399
|
emits: ['scroll', 'row-resize'],
|
|
16695
17400
|
setup(props, {
|
|
@@ -17263,9 +17968,9 @@ const props$h = {
|
|
|
17263
17968
|
|
|
17264
17969
|
/** @jsxImportSource vue */
|
|
17265
17970
|
|
|
17266
|
-
const COMPONENT_NAME$
|
|
17971
|
+
const COMPONENT_NAME$r = 'vc-slider';
|
|
17267
17972
|
const Slider = /* @__PURE__ */ defineComponent({
|
|
17268
|
-
name: COMPONENT_NAME$
|
|
17973
|
+
name: COMPONENT_NAME$r,
|
|
17269
17974
|
props: props$h,
|
|
17270
17975
|
setup(props, {
|
|
17271
17976
|
slots
|
|
@@ -17289,9 +17994,9 @@ const props$g = {
|
|
|
17289
17994
|
|
|
17290
17995
|
/** @jsxImportSource vue */
|
|
17291
17996
|
|
|
17292
|
-
const COMPONENT_NAME$
|
|
17997
|
+
const COMPONENT_NAME$q = 'vc-sort-list';
|
|
17293
17998
|
const SortList = /* @__PURE__ */ defineComponent({
|
|
17294
|
-
name: COMPONENT_NAME$
|
|
17999
|
+
name: COMPONENT_NAME$q,
|
|
17295
18000
|
props: props$g,
|
|
17296
18001
|
setup(props, {
|
|
17297
18002
|
slots
|
|
@@ -17315,9 +18020,9 @@ const props$f = {
|
|
|
17315
18020
|
|
|
17316
18021
|
/** @jsxImportSource vue */
|
|
17317
18022
|
|
|
17318
|
-
const COMPONENT_NAME$
|
|
18023
|
+
const COMPONENT_NAME$p = 'vc-steps';
|
|
17319
18024
|
const Steps = /* @__PURE__ */ defineComponent({
|
|
17320
|
-
name: COMPONENT_NAME$
|
|
18025
|
+
name: COMPONENT_NAME$p,
|
|
17321
18026
|
props: props$f,
|
|
17322
18027
|
setup(props, {
|
|
17323
18028
|
slots
|
|
@@ -17443,9 +18148,9 @@ const useSwitch = (expose) => {
|
|
|
17443
18148
|
|
|
17444
18149
|
/** @jsxImportSource vue */
|
|
17445
18150
|
|
|
17446
|
-
const COMPONENT_NAME$
|
|
18151
|
+
const COMPONENT_NAME$o = 'vc-switch';
|
|
17447
18152
|
const Switch = /* @__PURE__ */ defineComponent({
|
|
17448
|
-
name: COMPONENT_NAME$
|
|
18153
|
+
name: COMPONENT_NAME$o,
|
|
17449
18154
|
props: props$e,
|
|
17450
18155
|
// click -> onClick要被拦截,此处不能放置
|
|
17451
18156
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -17519,9 +18224,9 @@ const Switch = /* @__PURE__ */ defineComponent({
|
|
|
17519
18224
|
|
|
17520
18225
|
/** @jsxImportSource vue */
|
|
17521
18226
|
|
|
17522
|
-
const COMPONENT_NAME$
|
|
18227
|
+
const COMPONENT_NAME$n = 'vcm-switch';
|
|
17523
18228
|
const MSwitch = /* @__PURE__ */ defineComponent({
|
|
17524
|
-
name: COMPONENT_NAME$
|
|
18229
|
+
name: COMPONENT_NAME$n,
|
|
17525
18230
|
props: props$e,
|
|
17526
18231
|
// click -> onClick要被拦截,此处不能放置
|
|
17527
18232
|
emits: ['update:modelValue', 'change', 'click'],
|
|
@@ -18634,9 +19339,9 @@ const useStates = (mapper, $store) => {
|
|
|
18634
19339
|
|
|
18635
19340
|
/** @jsxImportSource vue */
|
|
18636
19341
|
|
|
18637
|
-
const COMPONENT_NAME$
|
|
19342
|
+
const COMPONENT_NAME$m = 'vc-table-normal-list';
|
|
18638
19343
|
const NormalList = /* @__PURE__ */ defineComponent({
|
|
18639
|
-
name: COMPONENT_NAME$
|
|
19344
|
+
name: COMPONENT_NAME$m,
|
|
18640
19345
|
props: {
|
|
18641
19346
|
data: {
|
|
18642
19347
|
type: Array,
|
|
@@ -19637,9 +20342,9 @@ const props$d = {
|
|
|
19637
20342
|
|
|
19638
20343
|
/** @jsxImportSource vue */
|
|
19639
20344
|
|
|
19640
|
-
const COMPONENT_NAME$
|
|
20345
|
+
const COMPONENT_NAME$l = 'vc-table';
|
|
19641
20346
|
const Table = /* @__PURE__ */ defineComponent({
|
|
19642
|
-
name: COMPONENT_NAME$
|
|
20347
|
+
name: COMPONENT_NAME$l,
|
|
19643
20348
|
props: props$d,
|
|
19644
20349
|
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'],
|
|
19645
20350
|
setup(props, {
|
|
@@ -20842,9 +21547,9 @@ const useTabs = (options = {}) => {
|
|
|
20842
21547
|
|
|
20843
21548
|
/** @jsxImportSource vue */
|
|
20844
21549
|
|
|
20845
|
-
const COMPONENT_NAME$
|
|
21550
|
+
const COMPONENT_NAME$k = 'vc-tabs';
|
|
20846
21551
|
const Tabs = /* @__PURE__ */ defineComponent({
|
|
20847
|
-
name: COMPONENT_NAME$
|
|
21552
|
+
name: COMPONENT_NAME$k,
|
|
20848
21553
|
props: props$c,
|
|
20849
21554
|
emits: ['update:modelValue', 'change', 'click'],
|
|
20850
21555
|
setup(props, {
|
|
@@ -21097,9 +21802,9 @@ const useTabsPane = () => {
|
|
|
21097
21802
|
|
|
21098
21803
|
/** @jsxImportSource vue */
|
|
21099
21804
|
|
|
21100
|
-
const COMPONENT_NAME$
|
|
21805
|
+
const COMPONENT_NAME$j = 'vc-tabs-pane';
|
|
21101
21806
|
const TabsPane = /* @__PURE__ */ defineComponent({
|
|
21102
|
-
name: COMPONENT_NAME$
|
|
21807
|
+
name: COMPONENT_NAME$j,
|
|
21103
21808
|
props: props$b,
|
|
21104
21809
|
setup(_, {
|
|
21105
21810
|
slots
|
|
@@ -21154,9 +21859,9 @@ const props$a = {
|
|
|
21154
21859
|
|
|
21155
21860
|
/** @jsxImportSource vue */
|
|
21156
21861
|
|
|
21157
|
-
const COMPONENT_NAME$
|
|
21862
|
+
const COMPONENT_NAME$i = 'vcm-tabs';
|
|
21158
21863
|
const MTabs = /* @__PURE__ */ defineComponent({
|
|
21159
|
-
name: COMPONENT_NAME$
|
|
21864
|
+
name: COMPONENT_NAME$i,
|
|
21160
21865
|
props: props$a,
|
|
21161
21866
|
emits: ['update:modelValue', 'change', 'click'],
|
|
21162
21867
|
setup(props, {
|
|
@@ -21421,9 +22126,9 @@ const MTabs = /* @__PURE__ */ defineComponent({
|
|
|
21421
22126
|
|
|
21422
22127
|
/** @jsxImportSource vue */
|
|
21423
22128
|
|
|
21424
|
-
const COMPONENT_NAME$
|
|
22129
|
+
const COMPONENT_NAME$h = 'vcm-tabs-pane';
|
|
21425
22130
|
const MTabsPane = /* @__PURE__ */ defineComponent({
|
|
21426
|
-
name: COMPONENT_NAME$
|
|
22131
|
+
name: COMPONENT_NAME$h,
|
|
21427
22132
|
props: props$b,
|
|
21428
22133
|
setup(_, {
|
|
21429
22134
|
slots
|
|
@@ -21487,9 +22192,9 @@ const props$9 = {
|
|
|
21487
22192
|
|
|
21488
22193
|
/** @jsxImportSource vue */
|
|
21489
22194
|
|
|
21490
|
-
const COMPONENT_NAME$
|
|
22195
|
+
const COMPONENT_NAME$g = 'vc-text';
|
|
21491
22196
|
const Text = /* @__PURE__ */ defineComponent({
|
|
21492
|
-
name: COMPONENT_NAME$
|
|
22197
|
+
name: COMPONENT_NAME$g,
|
|
21493
22198
|
props: props$9,
|
|
21494
22199
|
setup(props, {
|
|
21495
22200
|
emit
|
|
@@ -21856,9 +22561,9 @@ const props$8 = {
|
|
|
21856
22561
|
|
|
21857
22562
|
/** @jsxImportSource vue */
|
|
21858
22563
|
|
|
21859
|
-
const COMPONENT_NAME$
|
|
22564
|
+
const COMPONENT_NAME$f = 'vc-textarea';
|
|
21860
22565
|
const Textarea = /* @__PURE__ */ defineComponent({
|
|
21861
|
-
name: COMPONENT_NAME$
|
|
22566
|
+
name: COMPONENT_NAME$f,
|
|
21862
22567
|
props: Object.assign({}, props$8, {
|
|
21863
22568
|
indicator: {
|
|
21864
22569
|
type: [Boolean, Object],
|
|
@@ -21914,9 +22619,9 @@ const Textarea = /* @__PURE__ */ defineComponent({
|
|
|
21914
22619
|
|
|
21915
22620
|
/** @jsxImportSource vue */
|
|
21916
22621
|
|
|
21917
|
-
const COMPONENT_NAME$
|
|
22622
|
+
const COMPONENT_NAME$e = 'vcm-textarea';
|
|
21918
22623
|
const MTextarea = /* @__PURE__ */ defineComponent({
|
|
21919
|
-
name: COMPONENT_NAME$
|
|
22624
|
+
name: COMPONENT_NAME$e,
|
|
21920
22625
|
props: Object.assign({}, props$8, {
|
|
21921
22626
|
align: {
|
|
21922
22627
|
type: String,
|
|
@@ -21999,9 +22704,9 @@ const props$7 = {
|
|
|
21999
22704
|
}
|
|
22000
22705
|
};
|
|
22001
22706
|
|
|
22002
|
-
const COMPONENT_NAME$
|
|
22707
|
+
const COMPONENT_NAME$d = "vc-theme";
|
|
22003
22708
|
const Theme = defineComponent({
|
|
22004
|
-
name: COMPONENT_NAME$
|
|
22709
|
+
name: COMPONENT_NAME$d,
|
|
22005
22710
|
props: props$7,
|
|
22006
22711
|
setup(props, { slots }) {
|
|
22007
22712
|
const themeId = Utils.getUid("vc-theme");
|
|
@@ -22084,9 +22789,9 @@ const Theme = defineComponent({
|
|
|
22084
22789
|
}
|
|
22085
22790
|
});
|
|
22086
22791
|
|
|
22087
|
-
const COMPONENT_NAME$
|
|
22792
|
+
const COMPONENT_NAME$c = "vc-theme-view";
|
|
22088
22793
|
const ThemeView = defineComponent({
|
|
22089
|
-
name: COMPONENT_NAME$
|
|
22794
|
+
name: COMPONENT_NAME$c,
|
|
22090
22795
|
props: props$7,
|
|
22091
22796
|
setup(props, { slots }) {
|
|
22092
22797
|
return () => {
|
|
@@ -22102,9 +22807,9 @@ const ThemeView = defineComponent({
|
|
|
22102
22807
|
}
|
|
22103
22808
|
});
|
|
22104
22809
|
|
|
22105
|
-
const COMPONENT_NAME$
|
|
22810
|
+
const COMPONENT_NAME$b = "vc-theme-text";
|
|
22106
22811
|
const ThemeText = defineComponent({
|
|
22107
|
-
name: COMPONENT_NAME$
|
|
22812
|
+
name: COMPONENT_NAME$b,
|
|
22108
22813
|
props: props$7,
|
|
22109
22814
|
setup(props, { slots }) {
|
|
22110
22815
|
return () => {
|
|
@@ -22120,9 +22825,9 @@ const ThemeText = defineComponent({
|
|
|
22120
22825
|
}
|
|
22121
22826
|
});
|
|
22122
22827
|
|
|
22123
|
-
const COMPONENT_NAME$
|
|
22828
|
+
const COMPONENT_NAME$a = "vc-theme-image";
|
|
22124
22829
|
const ThemeImage = defineComponent({
|
|
22125
|
-
name: COMPONENT_NAME$
|
|
22830
|
+
name: COMPONENT_NAME$a,
|
|
22126
22831
|
props: props$7,
|
|
22127
22832
|
setup(props, { slots }) {
|
|
22128
22833
|
return () => {
|
|
@@ -22174,12 +22879,12 @@ const props$6 = {
|
|
|
22174
22879
|
|
|
22175
22880
|
/** @jsxImportSource vue */
|
|
22176
22881
|
|
|
22177
|
-
const COMPONENT_NAME$
|
|
22882
|
+
const COMPONENT_NAME$9 = 'vc-time-picker';
|
|
22178
22883
|
const getPanel = type => {
|
|
22179
22884
|
const isRange = type === 'timerange';
|
|
22180
22885
|
return isRange ? TimeRangePanel : TimePanel;
|
|
22181
22886
|
};
|
|
22182
|
-
const TimePicker = createPicker(COMPONENT_NAME$
|
|
22887
|
+
const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
|
|
22183
22888
|
const props = getCurrentInstance().props;
|
|
22184
22889
|
const icon = ref('icon');
|
|
22185
22890
|
const panel = shallowRef({});
|
|
@@ -22215,9 +22920,9 @@ const props$5 = {
|
|
|
22215
22920
|
|
|
22216
22921
|
/** @jsxImportSource vue */
|
|
22217
22922
|
|
|
22218
|
-
const COMPONENT_NAME$
|
|
22923
|
+
const COMPONENT_NAME$8 = 'vc-timeline';
|
|
22219
22924
|
const Timeline = /* @__PURE__ */ defineComponent({
|
|
22220
|
-
name: COMPONENT_NAME$
|
|
22925
|
+
name: COMPONENT_NAME$8,
|
|
22221
22926
|
props: props$5,
|
|
22222
22927
|
setup(props, {
|
|
22223
22928
|
slots
|
|
@@ -22244,9 +22949,9 @@ const props$4 = {
|
|
|
22244
22949
|
|
|
22245
22950
|
/** @jsxImportSource vue */
|
|
22246
22951
|
|
|
22247
|
-
const COMPONENT_NAME$
|
|
22952
|
+
const COMPONENT_NAME$7 = 'vc-touch';
|
|
22248
22953
|
const Touch = /* @__PURE__ */ defineComponent({
|
|
22249
|
-
name: COMPONENT_NAME$
|
|
22954
|
+
name: COMPONENT_NAME$7,
|
|
22250
22955
|
props: props$4,
|
|
22251
22956
|
setup(props, {
|
|
22252
22957
|
slots
|
|
@@ -22754,21 +23459,68 @@ class TreeStore {
|
|
|
22754
23459
|
parentNode.insertChild({ data });
|
|
22755
23460
|
}
|
|
22756
23461
|
}
|
|
23462
|
+
/**
|
|
23463
|
+
* 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
|
|
23464
|
+
* 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
|
|
23465
|
+
* @param checkedValues ~
|
|
23466
|
+
* @returns ~
|
|
23467
|
+
*/
|
|
23468
|
+
_getCascadeCheckedAnchorIds(checkedValues) {
|
|
23469
|
+
const checkedSet = new Set(checkedValues);
|
|
23470
|
+
const nodesMap = this.nodesMap;
|
|
23471
|
+
const anchors = [];
|
|
23472
|
+
for (const id of checkedValues) {
|
|
23473
|
+
const node = nodesMap[id];
|
|
23474
|
+
if (!node) continue;
|
|
23475
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
23476
|
+
(child) => checkedSet.has(child.getter.value)
|
|
23477
|
+
);
|
|
23478
|
+
if (!hasSelectedChildInSet) {
|
|
23479
|
+
anchors.push(id);
|
|
23480
|
+
}
|
|
23481
|
+
}
|
|
23482
|
+
anchors.sort((a, b) => {
|
|
23483
|
+
const na = nodesMap[a];
|
|
23484
|
+
const nb = nodesMap[b];
|
|
23485
|
+
if (!na || !nb) return 0;
|
|
23486
|
+
return nb.states.level - na.states.level;
|
|
23487
|
+
});
|
|
23488
|
+
return anchors;
|
|
23489
|
+
}
|
|
22757
23490
|
_initDefaultCheckedNodes() {
|
|
22758
23491
|
const checkedValues = this.checkedValues || [];
|
|
22759
23492
|
const nodesMap = this.nodesMap;
|
|
22760
|
-
|
|
23493
|
+
if (this.checkStrictly) {
|
|
23494
|
+
checkedValues.forEach((id) => {
|
|
23495
|
+
const node = nodesMap[id];
|
|
23496
|
+
if (node) {
|
|
23497
|
+
node.setChecked(true, false);
|
|
23498
|
+
}
|
|
23499
|
+
});
|
|
23500
|
+
return;
|
|
23501
|
+
}
|
|
23502
|
+
const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
|
|
23503
|
+
anchorIds.forEach((id) => {
|
|
22761
23504
|
const node = nodesMap[id];
|
|
22762
23505
|
if (node) {
|
|
22763
|
-
node.setChecked(true,
|
|
23506
|
+
node.setChecked(true, true);
|
|
22764
23507
|
}
|
|
22765
23508
|
});
|
|
22766
23509
|
}
|
|
22767
23510
|
_initDefaultCheckedNode(node) {
|
|
22768
23511
|
const checkedValues = this.checkedValues || [];
|
|
22769
23512
|
const nodeValue = node.getter.value;
|
|
22770
|
-
if (checkedValues.indexOf(nodeValue)
|
|
22771
|
-
|
|
23513
|
+
if (checkedValues.indexOf(nodeValue) === -1) return;
|
|
23514
|
+
if (this.checkStrictly) {
|
|
23515
|
+
node.setChecked(true, false);
|
|
23516
|
+
return;
|
|
23517
|
+
}
|
|
23518
|
+
const checkedSet = new Set(checkedValues);
|
|
23519
|
+
const hasSelectedChildInSet = node.childNodes.some(
|
|
23520
|
+
(child) => checkedSet.has(child.getter.value)
|
|
23521
|
+
);
|
|
23522
|
+
if (!hasSelectedChildInSet) {
|
|
23523
|
+
node.setChecked(true, true);
|
|
22772
23524
|
}
|
|
22773
23525
|
}
|
|
22774
23526
|
setCheckedValues(newVal) {
|
|
@@ -22996,9 +23748,9 @@ const props$3 = {
|
|
|
22996
23748
|
|
|
22997
23749
|
/** @jsxImportSource vue */
|
|
22998
23750
|
|
|
22999
|
-
const COMPONENT_NAME$
|
|
23751
|
+
const COMPONENT_NAME$6 = 'vc-tree-node';
|
|
23000
23752
|
const TreeNodeContent = /* @__PURE__ */ defineComponent({
|
|
23001
|
-
name: COMPONENT_NAME$
|
|
23753
|
+
name: COMPONENT_NAME$6,
|
|
23002
23754
|
props: props$3,
|
|
23003
23755
|
emits: ['node-expand'],
|
|
23004
23756
|
setup(props, {
|
|
@@ -23497,9 +24249,9 @@ const props$2 = {
|
|
|
23497
24249
|
|
|
23498
24250
|
/** @jsxImportSource vue */
|
|
23499
24251
|
|
|
23500
|
-
const COMPONENT_NAME$
|
|
24252
|
+
const COMPONENT_NAME$5 = 'vc-tree';
|
|
23501
24253
|
const Tree = /* @__PURE__ */ defineComponent({
|
|
23502
|
-
name: COMPONENT_NAME$
|
|
24254
|
+
name: COMPONENT_NAME$5,
|
|
23503
24255
|
props: props$2,
|
|
23504
24256
|
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'],
|
|
23505
24257
|
setup(props, {
|
|
@@ -23694,6 +24446,225 @@ const Tree = /* @__PURE__ */ defineComponent({
|
|
|
23694
24446
|
}
|
|
23695
24447
|
});
|
|
23696
24448
|
|
|
24449
|
+
/** @jsxImportSource vue */
|
|
24450
|
+
|
|
24451
|
+
const COMPONENT_NAME$4 = 'vc-tree-select-content';
|
|
24452
|
+
const TreeSelectContent = /* @__PURE__ */ defineComponent({
|
|
24453
|
+
name: COMPONENT_NAME$4,
|
|
24454
|
+
props: {
|
|
24455
|
+
value: {
|
|
24456
|
+
type: Array,
|
|
24457
|
+
required: true
|
|
24458
|
+
},
|
|
24459
|
+
data: {
|
|
24460
|
+
type: Array,
|
|
24461
|
+
default: () => []
|
|
24462
|
+
},
|
|
24463
|
+
checkStrictly: {
|
|
24464
|
+
type: Boolean,
|
|
24465
|
+
default: false
|
|
24466
|
+
},
|
|
24467
|
+
renderNodeLabel: Function
|
|
24468
|
+
},
|
|
24469
|
+
emits: ['change'],
|
|
24470
|
+
setup(props, {
|
|
24471
|
+
emit
|
|
24472
|
+
}) {
|
|
24473
|
+
return () => {
|
|
24474
|
+
return createVNode(Scroller, {
|
|
24475
|
+
"class": "vc-tree-select__options",
|
|
24476
|
+
"max-height": "200px"
|
|
24477
|
+
}, {
|
|
24478
|
+
default: () => [createVNode(Tree, {
|
|
24479
|
+
"model-value": props.value,
|
|
24480
|
+
"expanded-values": props.value,
|
|
24481
|
+
"data": props.data,
|
|
24482
|
+
"checkStrictly": props.checkStrictly,
|
|
24483
|
+
"allowDispatch": false,
|
|
24484
|
+
"showCheckbox": true,
|
|
24485
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
24486
|
+
"onChange": (_, data) => emit('change', _, data)
|
|
24487
|
+
}, null)]
|
|
24488
|
+
});
|
|
24489
|
+
};
|
|
24490
|
+
}
|
|
24491
|
+
});
|
|
24492
|
+
|
|
24493
|
+
/** @jsxImportSource vue */
|
|
24494
|
+
|
|
24495
|
+
const COMPONENT_NAME$3 = 'vc-tree-select-content-cascader';
|
|
24496
|
+
const TreeSelectContentCascader = /* @__PURE__ */ defineComponent({
|
|
24497
|
+
name: COMPONENT_NAME$3,
|
|
24498
|
+
props: {
|
|
24499
|
+
value: {
|
|
24500
|
+
type: Array,
|
|
24501
|
+
required: true
|
|
24502
|
+
},
|
|
24503
|
+
data: {
|
|
24504
|
+
type: Array,
|
|
24505
|
+
default: () => []
|
|
24506
|
+
},
|
|
24507
|
+
checkStrictly: {
|
|
24508
|
+
type: Boolean,
|
|
24509
|
+
default: false
|
|
24510
|
+
},
|
|
24511
|
+
renderNodeLabel: Function,
|
|
24512
|
+
numerable: {
|
|
24513
|
+
type: Boolean,
|
|
24514
|
+
default: false
|
|
24515
|
+
},
|
|
24516
|
+
separator: {
|
|
24517
|
+
type: String,
|
|
24518
|
+
default: ','
|
|
24519
|
+
},
|
|
24520
|
+
max: {
|
|
24521
|
+
type: Number,
|
|
24522
|
+
default: 1
|
|
24523
|
+
},
|
|
24524
|
+
nullValue: {
|
|
24525
|
+
type: [Number, String, Object],
|
|
24526
|
+
default: void 0
|
|
24527
|
+
}
|
|
24528
|
+
},
|
|
24529
|
+
emits: ['change'],
|
|
24530
|
+
setup(props, {
|
|
24531
|
+
emit
|
|
24532
|
+
}) {
|
|
24533
|
+
const treeRef = ref(null);
|
|
24534
|
+
/** hover 展开路径,与 Cascader 一致 */
|
|
24535
|
+
const currentValue = ref([]);
|
|
24536
|
+
const rebuildData = computed(() => {
|
|
24537
|
+
if (!props.data.length) return [];
|
|
24538
|
+
let temp = props.data;
|
|
24539
|
+
const data = [];
|
|
24540
|
+
currentValue.value.forEach(cur => {
|
|
24541
|
+
const col = temp;
|
|
24542
|
+
data.push(col);
|
|
24543
|
+
const next = (temp.find(i => i.value == cur) || {}).children || [];
|
|
24544
|
+
temp = next;
|
|
24545
|
+
});
|
|
24546
|
+
data.push(temp);
|
|
24547
|
+
return data;
|
|
24548
|
+
});
|
|
24549
|
+
/** 驱动列区在 TreeStore 更新后重绘 */
|
|
24550
|
+
const panelTick = ref(0);
|
|
24551
|
+
const columns = computed(() => Array.from({
|
|
24552
|
+
length: currentValue.value.length + 1
|
|
24553
|
+
}).map((_, index) => index));
|
|
24554
|
+
const handleHover = (value, columnIndex) => {
|
|
24555
|
+
const len = currentValue.value.length - columnIndex;
|
|
24556
|
+
currentValue.value.splice(columnIndex, len, value);
|
|
24557
|
+
};
|
|
24558
|
+
const sync = async () => {
|
|
24559
|
+
await nextTick();
|
|
24560
|
+
const tree = treeRef.value;
|
|
24561
|
+
if (!tree) return;
|
|
24562
|
+
const data = {
|
|
24563
|
+
checkedNodes: tree.getCheckedNodes(),
|
|
24564
|
+
checkedValues: tree.getCheckedValues(),
|
|
24565
|
+
halfCheckedNodes: tree.getHalfCheckedNodes(),
|
|
24566
|
+
halfCheckedValues: tree.getHalfCheckedValues()
|
|
24567
|
+
};
|
|
24568
|
+
panelTick.value++;
|
|
24569
|
+
emit('change', null, data);
|
|
24570
|
+
};
|
|
24571
|
+
const getNodeState = item => {
|
|
24572
|
+
const tree = treeRef.value;
|
|
24573
|
+
if (!tree) {
|
|
24574
|
+
return {
|
|
24575
|
+
checked: false,
|
|
24576
|
+
indeterminate: false
|
|
24577
|
+
};
|
|
24578
|
+
}
|
|
24579
|
+
const node = tree.getNode(item);
|
|
24580
|
+
if (!node) {
|
|
24581
|
+
return {
|
|
24582
|
+
checked: false,
|
|
24583
|
+
indeterminate: false
|
|
24584
|
+
};
|
|
24585
|
+
}
|
|
24586
|
+
return {
|
|
24587
|
+
checked: !!node.states.checked,
|
|
24588
|
+
indeterminate: !!node.states.indeterminate
|
|
24589
|
+
};
|
|
24590
|
+
};
|
|
24591
|
+
const hasChildren = item => {
|
|
24592
|
+
return !!(item.children && item.children.length > 0);
|
|
24593
|
+
};
|
|
24594
|
+
const handleCheckboxChange = async (v, item) => {
|
|
24595
|
+
const tree = treeRef.value;
|
|
24596
|
+
if (!tree) return;
|
|
24597
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
24598
|
+
sync();
|
|
24599
|
+
};
|
|
24600
|
+
const handleLabelClick = (v, item) => {
|
|
24601
|
+
const tree = treeRef.value;
|
|
24602
|
+
if (!tree) return;
|
|
24603
|
+
tree.setChecked(item, v, !props.checkStrictly);
|
|
24604
|
+
sync();
|
|
24605
|
+
};
|
|
24606
|
+
return () => {
|
|
24607
|
+
return createVNode("div", {
|
|
24608
|
+
"class": "vc-tree-select__cascader"
|
|
24609
|
+
}, [createVNode(Tree, {
|
|
24610
|
+
"ref": treeRef,
|
|
24611
|
+
"class": "vc-tree-select__cascader-tree-hidden",
|
|
24612
|
+
"model-value": props.value,
|
|
24613
|
+
"expanded-values": props.value,
|
|
24614
|
+
"data": props.data,
|
|
24615
|
+
"checkStrictly": props.checkStrictly,
|
|
24616
|
+
"allowDispatch": false,
|
|
24617
|
+
"showCheckbox": true,
|
|
24618
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
24619
|
+
"numerable": props.numerable,
|
|
24620
|
+
"separator": props.separator,
|
|
24621
|
+
"max": props.max,
|
|
24622
|
+
"nullValue": props.nullValue
|
|
24623
|
+
}, null), createVNode("div", {
|
|
24624
|
+
"class": "vc-tree-select__cascader-columns"
|
|
24625
|
+
}, [columns.value.map(columnIndex => {
|
|
24626
|
+
const col = rebuildData.value[columnIndex];
|
|
24627
|
+
if (!col || !col.length) return null;
|
|
24628
|
+
return createVNode("div", {
|
|
24629
|
+
"class": "vc-tree-select__cascader-column",
|
|
24630
|
+
"key": columnIndex
|
|
24631
|
+
}, [createVNode("div", {
|
|
24632
|
+
"class": "vc-tree-select__cascader-column-wrapper"
|
|
24633
|
+
}, [col.map(item => {
|
|
24634
|
+
const state = getNodeState(item);
|
|
24635
|
+
const isSelect = currentValue.value[columnIndex] === item.value;
|
|
24636
|
+
const child = hasChildren(item);
|
|
24637
|
+
return createVNode("div", {
|
|
24638
|
+
"key": item.value,
|
|
24639
|
+
"class": ['vc-tree-select__cascader-item', {
|
|
24640
|
+
'is-select': isSelect
|
|
24641
|
+
}],
|
|
24642
|
+
"onMouseenter": () => handleHover(item.value, columnIndex),
|
|
24643
|
+
"onClick": () => handleLabelClick(!state.checked, item)
|
|
24644
|
+
}, [createVNode("span", {
|
|
24645
|
+
"class": "vc-tree-select__cascader-checkbox",
|
|
24646
|
+
"onClick": e => e.stopPropagation()
|
|
24647
|
+
}, [createVNode(Checkbox, {
|
|
24648
|
+
"modelValue": state.checked,
|
|
24649
|
+
"indeterminate": state.indeterminate,
|
|
24650
|
+
"disabled": !!item.disabled,
|
|
24651
|
+
"onChange": v => handleCheckboxChange(v, item)
|
|
24652
|
+
}, null)]), createVNode("span", {
|
|
24653
|
+
"class": "vc-tree-select__cascader-label"
|
|
24654
|
+
}, [props.renderNodeLabel && treeRef.value?.getNode?.(item) ? createVNode(Customer, {
|
|
24655
|
+
"render": props.renderNodeLabel,
|
|
24656
|
+
"store": treeRef.value.getNode(item),
|
|
24657
|
+
"row": item
|
|
24658
|
+
}, null) : createVNode("span", null, [item.label])]), child ? createVNode(Icon, {
|
|
24659
|
+
"type": "right",
|
|
24660
|
+
"class": "vc-tree-select__cascader-icon"
|
|
24661
|
+
}, null) : null]);
|
|
24662
|
+
})])]);
|
|
24663
|
+
})])]);
|
|
24664
|
+
};
|
|
24665
|
+
}
|
|
24666
|
+
});
|
|
24667
|
+
|
|
23697
24668
|
const treeKeys = [
|
|
23698
24669
|
"checkStrictly",
|
|
23699
24670
|
"data",
|
|
@@ -23702,7 +24673,18 @@ const treeKeys = [
|
|
|
23702
24673
|
];
|
|
23703
24674
|
const props$1 = {
|
|
23704
24675
|
...props$1a,
|
|
23705
|
-
...pick(props$2, treeKeys)
|
|
24676
|
+
...pick(props$2, treeKeys),
|
|
24677
|
+
autoWidth: {
|
|
24678
|
+
type: Boolean,
|
|
24679
|
+
default: void 0
|
|
24680
|
+
},
|
|
24681
|
+
/**
|
|
24682
|
+
* 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
|
|
24683
|
+
*/
|
|
24684
|
+
cascader: {
|
|
24685
|
+
type: Boolean,
|
|
24686
|
+
default: false
|
|
24687
|
+
}
|
|
23706
24688
|
};
|
|
23707
24689
|
|
|
23708
24690
|
/** @jsxImportSource vue */
|
|
@@ -23728,12 +24710,37 @@ const TreeSelect = /* @__PURE__ */ defineComponent({
|
|
|
23728
24710
|
const searchValue = ref('');
|
|
23729
24711
|
const searchRegex = ref(new RegExp(''));
|
|
23730
24712
|
const currentValue = ref([]);
|
|
24713
|
+
const currentValueGroups = computed(() => {
|
|
24714
|
+
if (props.checkStrictly) return;
|
|
24715
|
+
if (!props.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
|
|
24716
|
+
return [];
|
|
24717
|
+
}
|
|
24718
|
+
const pathMap = new Map();
|
|
24719
|
+
const traverse = (data, path = []) => {
|
|
24720
|
+
data.forEach(item => {
|
|
24721
|
+
const v = item.value;
|
|
24722
|
+
if (v == null) return;
|
|
24723
|
+
const fullPath = [...path, v];
|
|
24724
|
+
pathMap.set(v, fullPath);
|
|
24725
|
+
if (item.children?.length) traverse(item.children, fullPath);
|
|
24726
|
+
});
|
|
24727
|
+
};
|
|
24728
|
+
traverse(props.data);
|
|
24729
|
+
const allPaths = currentValue.value.map(v => pathMap.get(v)).filter(Boolean);
|
|
24730
|
+
return allPaths.filter(path => !allPaths.some(other => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
|
|
24731
|
+
});
|
|
23731
24732
|
const source = computed(() => {
|
|
23732
24733
|
return flattenData$1(props.data, {
|
|
23733
24734
|
parent: true,
|
|
23734
24735
|
cascader: true
|
|
23735
24736
|
});
|
|
23736
24737
|
});
|
|
24738
|
+
const labelMap = computed(() => {
|
|
24739
|
+
return source.value.reduce((pre, cur) => {
|
|
24740
|
+
pre[cur.value] = cur.label || '';
|
|
24741
|
+
return pre;
|
|
24742
|
+
}, {});
|
|
24743
|
+
});
|
|
23737
24744
|
const icon = computed(() => {
|
|
23738
24745
|
return isActive.value ? 'up' : 'down';
|
|
23739
24746
|
});
|
|
@@ -23750,17 +24757,34 @@ const TreeSelect = /* @__PURE__ */ defineComponent({
|
|
|
23750
24757
|
'is-disabled': props.disabled
|
|
23751
24758
|
};
|
|
23752
24759
|
});
|
|
23753
|
-
const
|
|
24760
|
+
const displayTags = computed(() => {
|
|
23754
24761
|
if (!props.data.length) {
|
|
23755
24762
|
return [];
|
|
23756
24763
|
}
|
|
23757
|
-
|
|
24764
|
+
if (props.checkStrictly) {
|
|
24765
|
+
return currentValue.value.map(v => ({
|
|
24766
|
+
value: v,
|
|
24767
|
+
label: labelMap.value[v] || ''
|
|
24768
|
+
}));
|
|
24769
|
+
}
|
|
24770
|
+
return (currentValueGroups.value || []).map(path => {
|
|
24771
|
+
const value = path[path.length - 1];
|
|
24772
|
+
const label = path.map(v => labelMap.value[v] || '').filter(Boolean).join(' / ');
|
|
24773
|
+
return {
|
|
24774
|
+
path,
|
|
24775
|
+
value,
|
|
24776
|
+
label
|
|
24777
|
+
};
|
|
24778
|
+
});
|
|
23758
24779
|
});
|
|
23759
24780
|
const collapseTagCount = computed(() => {
|
|
23760
24781
|
if (!props.maxTags) return 0;
|
|
23761
|
-
const v =
|
|
24782
|
+
const v = displayTags.value.length - props.maxTags;
|
|
23762
24783
|
return v < 0 ? 0 : v;
|
|
23763
24784
|
});
|
|
24785
|
+
const autoWidth = computed(() => {
|
|
24786
|
+
return typeof props.autoWidth === 'boolean' ? props.autoWidth : !!props.cascader;
|
|
24787
|
+
});
|
|
23764
24788
|
|
|
23765
24789
|
/**
|
|
23766
24790
|
* v-model 同步, 外部的数据改变时不会触发
|
|
@@ -23773,8 +24797,9 @@ const TreeSelect = /* @__PURE__ */ defineComponent({
|
|
|
23773
24797
|
separator: props.separator,
|
|
23774
24798
|
nullValue: props.nullValue
|
|
23775
24799
|
});
|
|
23776
|
-
|
|
23777
|
-
emit('
|
|
24800
|
+
const labels = displayTags.value.map(item => item.label);
|
|
24801
|
+
emit('update:modelValue', v, labels);
|
|
24802
|
+
emit('change', v, labels);
|
|
23778
24803
|
|
|
23779
24804
|
// form表单
|
|
23780
24805
|
formItem?.change?.(currentValue.value);
|
|
@@ -23799,8 +24824,15 @@ const TreeSelect = /* @__PURE__ */ defineComponent({
|
|
|
23799
24824
|
const close = () => {
|
|
23800
24825
|
isActive.value = false;
|
|
23801
24826
|
};
|
|
23802
|
-
const handleClose =
|
|
23803
|
-
|
|
24827
|
+
const handleClose = item => {
|
|
24828
|
+
if (props.checkStrictly) {
|
|
24829
|
+
const index = currentValue.value.findIndex(v => v === item.value);
|
|
24830
|
+
if (index === -1) return;
|
|
24831
|
+
currentValue.value = currentValue.value.filter((_, i) => i !== index);
|
|
24832
|
+
} else if (item.path) {
|
|
24833
|
+
const remaining = (currentValueGroups.value || []).filter(p => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
|
|
24834
|
+
currentValue.value = [...new Set(remaining.flat())];
|
|
24835
|
+
}
|
|
23804
24836
|
sync();
|
|
23805
24837
|
};
|
|
23806
24838
|
const handleClear = e => {
|
|
@@ -23837,6 +24869,7 @@ const TreeSelect = /* @__PURE__ */ defineComponent({
|
|
|
23837
24869
|
multiple,
|
|
23838
24870
|
isActive,
|
|
23839
24871
|
current: currentValue,
|
|
24872
|
+
currentValueGroups,
|
|
23840
24873
|
// for portal
|
|
23841
24874
|
toggle(v) {
|
|
23842
24875
|
v = typeof v === 'boolean' ? v : !isActive.value;
|
|
@@ -23851,7 +24884,7 @@ const TreeSelect = /* @__PURE__ */ defineComponent({
|
|
|
23851
24884
|
"trigger": props.trigger,
|
|
23852
24885
|
"tag": props.tag,
|
|
23853
24886
|
"placement": props.placement,
|
|
23854
|
-
"
|
|
24887
|
+
"autoWidth": autoWidth.value,
|
|
23855
24888
|
"disabled": props.disabled,
|
|
23856
24889
|
"portalClass": [['is-padding-none', props.portalClass]],
|
|
23857
24890
|
"class": [classes.value, its.value.class, 'vc-tree-select'],
|
|
@@ -23868,22 +24901,22 @@ const TreeSelect = /* @__PURE__ */ defineComponent({
|
|
|
23868
24901
|
return createVNode(Input, {
|
|
23869
24902
|
"id": props.id,
|
|
23870
24903
|
"disabled": props.disabled,
|
|
23871
|
-
"modelValue":
|
|
24904
|
+
"modelValue": displayTags.value[0]?.label || props.extra,
|
|
23872
24905
|
"allow-dispatch": false,
|
|
23873
24906
|
"class": "vc-tree-select__input",
|
|
23874
24907
|
"readonly": true,
|
|
23875
24908
|
"placeholder": its.value.attrs?.placeholder || '请选择'
|
|
23876
24909
|
}, {
|
|
23877
|
-
content: multiple.value &&
|
|
24910
|
+
content: multiple.value && displayTags.value.length > 0 ? () => {
|
|
23878
24911
|
return createVNode("div", {
|
|
23879
24912
|
"class": [classes.value, 'vc-tree-select__tags']
|
|
23880
|
-
}, [
|
|
24913
|
+
}, [displayTags.value.slice(0, props.maxTags).map(item => {
|
|
23881
24914
|
return createVNode(Tag, {
|
|
23882
|
-
"key": item,
|
|
24915
|
+
"key": item.path ? item.path.join('-') : item.value,
|
|
23883
24916
|
"closable": !props.disabled,
|
|
23884
|
-
"onClose": () => handleClose(
|
|
24917
|
+
"onClose": () => handleClose(item)
|
|
23885
24918
|
}, {
|
|
23886
|
-
default: () => [
|
|
24919
|
+
default: () => [item.label]
|
|
23887
24920
|
});
|
|
23888
24921
|
}), collapseTagCount.value ? createVNode(Tag, null, {
|
|
23889
24922
|
default: () => [`+${collapseTagCount.value}...`]
|
|
@@ -23916,16 +24949,23 @@ const TreeSelect = /* @__PURE__ */ defineComponent({
|
|
|
23916
24949
|
}, [createVNode(Spin, {
|
|
23917
24950
|
"size": 16
|
|
23918
24951
|
}, null)]), createVNode(Scroller, {
|
|
23919
|
-
"class":
|
|
24952
|
+
"class": ['vc-tree-select__options', props.cascader && 'is-cascader'],
|
|
23920
24953
|
"max-height": "200px"
|
|
23921
24954
|
}, {
|
|
23922
|
-
default: () => [createVNode(
|
|
23923
|
-
"
|
|
23924
|
-
"
|
|
24955
|
+
default: () => [props.cascader ? createVNode(TreeSelectContentCascader, {
|
|
24956
|
+
"value": currentValue.value,
|
|
24957
|
+
"data": props.data,
|
|
24958
|
+
"checkStrictly": props.checkStrictly,
|
|
24959
|
+
"renderNodeLabel": props.renderNodeLabel,
|
|
24960
|
+
"numerable": props.numerable,
|
|
24961
|
+
"separator": props.separator,
|
|
24962
|
+
"max": props.max,
|
|
24963
|
+
"nullValue": props.nullValue,
|
|
24964
|
+
"onChange": handleChange
|
|
24965
|
+
}, null) : createVNode(TreeSelectContent, {
|
|
24966
|
+
"value": currentValue.value,
|
|
23925
24967
|
"data": props.data,
|
|
23926
24968
|
"checkStrictly": props.checkStrictly,
|
|
23927
|
-
"allowDispatch": false,
|
|
23928
|
-
"showCheckbox": true,
|
|
23929
24969
|
"renderNodeLabel": props.renderNodeLabel,
|
|
23930
24970
|
"onChange": handleChange
|
|
23931
24971
|
}, null)]
|
|
@@ -24492,4 +25532,4 @@ const UploadPicker = /* @__PURE__ */ defineComponent({
|
|
|
24492
25532
|
|
|
24493
25533
|
const MUploadPicker = UploadPicker;
|
|
24494
25534
|
|
|
24495
|
-
export { ActionSheet, Affix, Alert, Artboard, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Chart, Checkbox, CheckboxGroup, Clipboard, Collapse, CollapseItem, ColorPicker, Countdown, Counter, Customer, DatePicker, Debounce, Divider, Drawer, DrawerView, Dropdown, DropdownItem, DropdownMenu, Editor, EditorView, Expand$1 as Expand, Form, FormItem, Fragment, Icon, IconManager, Image$1 as Image, ImageCrop, ImagePreview, ImageProcessing, Input, InputNumber, InputSearch, MList as List, MListItem as ListItem, MActionSheet, MAffix, MAlert, MArtboard, MButton, MButtonGroup, MCalendar, MCard, MCarousel, MCascader, MChart, MCheckbox, MCheckboxGroup, MClipboard, MCollapse, MCollapseItem, MColorPicker, MCountdown, MCounter, MCustomer, MDatePicker, Debounce as MDebounce, MDivider, MDrawer, MDrawerView, MDropdown, MDropdownItem, MDropdownMenu, MEditor, MEditorView, MExpand, MForm, MFormItem, MFragment, MIcon, MImage, MImageCrop, MImagePreview, MImageProcessing, MInput, MInputNumber, MInputSearch, MList, MListItem, MMarquee, MMessage, modal as MModal, MModalView, MNotice, MOption, MPagination, MPicker, MPopconfirm, MPopover, MPopup, MPortal, MPrint, MProgress, MRadio, MRadioButton, MRadioGroup, MRate, MRecycleList, MResizer, MScroller, MSelect, MSlider, MSnapshot, MSortList, MSpin, MSteps, MSwitch, MTable, MTableColumn, MTabs, MTabsPane, MTag, MText, MTextarea, MTimePicker, MTimeline, MToast, MToastView, MTouch, MTransition, MTransitionCollapse, MTransitionFade, MTransitionScale, MTransitionSlide, MTransitionZoom, MTree, MTreeSelect, MUpload, MUploadPicker, Marquee, Message, MessageView, Modal, ModalView, Notice, NoticeView, Option$1 as Option, Pagination, Picker, Popconfirm, Popover, Popup, Portal, PortalView, Print, Progress, Radio, RadioButton, RadioGroup, Rate, RecycleList, Resizer, Scroller, ScrollerWheel, Select, Slider, Snapshot, SortList, Spin, Steps, Switch, Table, TableColumn, Tabs, TabsPane, Tag, Text, Textarea, Theme, ThemeImage, ThemeText, ThemeView, TimePicker, Timeline, Toast, ToastView, Touch, Transition, TransitionCollapse, TransitionFade, TransitionScale, TransitionSlide, TransitionZoom, Tree, TreeSelect, Upload, UploadPicker, VcError, VcInstance };
|
|
25535
|
+
export { ActionSheet, Affix, Alert, Artboard, Button, ButtonGroup, Calendar, Card, Carousel, CarouselItem, Cascader, Chart, Checkbox, CheckboxGroup, Clipboard, Collapse, CollapseItem, ColorPicker, Countdown, Counter, Customer, DatePicker, Debounce, Divider, Drawer, DrawerView, Dropdown, DropdownItem, DropdownMenu, Editor, EditorView, Expand$1 as Expand, Form, FormItem, Fragment, Icon, IconManager, Image$1 as Image, ImageCrop, ImagePreview, ImageProcessing, Input, InputNumber, InputSearch, MList as List, MListItem as ListItem, MActionSheet, MAffix, MAlert, MArtboard, MButton, MButtonGroup, MCalendar, MCard, MCarousel, MCarouselItem, MCascader, MChart, MCheckbox, MCheckboxGroup, MClipboard, MCollapse, MCollapseItem, MColorPicker, MCountdown, MCounter, MCustomer, MDatePicker, Debounce as MDebounce, MDivider, MDrawer, MDrawerView, MDropdown, MDropdownItem, MDropdownMenu, MEditor, MEditorView, MExpand, MForm, MFormItem, MFragment, MIcon, MImage, MImageCrop, MImagePreview, MImageProcessing, MInput, MInputNumber, MInputSearch, MList, MListItem, MMarquee, MMessage, modal as MModal, MModalView, MNotice, MOption, MPagination, MPicker, MPopconfirm, MPopover, MPopup, MPortal, MPrint, MProgress, MRadio, MRadioButton, MRadioGroup, MRate, MRecycleList, MResizer, MScroller, MSelect, MSlider, MSnapshot, MSortList, MSpin, MSteps, MSwitch, MTable, MTableColumn, MTabs, MTabsPane, MTag, MText, MTextarea, MTimePicker, MTimeline, MToast, MToastView, MTouch, MTransition, MTransitionCollapse, MTransitionFade, MTransitionScale, MTransitionSlide, MTransitionZoom, MTree, MTreeSelect, MUpload, MUploadPicker, Marquee, Message, MessageView, Modal, ModalView, Notice, NoticeView, Option$1 as Option, Pagination, Picker, Popconfirm, Popover, Popup, Portal, PortalView, Print, Progress, Radio, RadioButton, RadioGroup, Rate, RecycleList, Resizer, Scroller, ScrollerWheel, Select, Slider, Snapshot, SortList, Spin, Steps, Switch, Table, TableColumn, Tabs, TabsPane, Tag, Text, Textarea, Theme, ThemeImage, ThemeText, ThemeView, TimePicker, Timeline, Toast, ToastView, Touch, Transition, TransitionCollapse, TransitionFade, TransitionScale, TransitionSlide, TransitionZoom, Tree, TreeSelect, Upload, UploadPicker, VcError, VcInstance };
|