@deot/vc-components 1.0.63 → 1.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -6,8 +6,8 @@ const vue = require('vue');
6
6
  const $ = require('@deot/helper-dom');
7
7
  const Utils = require('@deot/helper-utils');
8
8
  const lodashEs = require('lodash-es');
9
- const vcHooks = require('@deot/vc-hooks');
10
9
  const helperResize = require('@deot/helper-resize');
10
+ const vcHooks = require('@deot/vc-hooks');
11
11
  const vcShared = require('@deot/vc-shared');
12
12
  const helperWheel = require('@deot/helper-wheel');
13
13
  const Load = require('@deot/helper-load');
@@ -112,7 +112,7 @@ class Instance {
112
112
  }
113
113
  const VcInstance = new Instance();
114
114
 
115
- const props$1u = {
115
+ const props$1v = {
116
116
  tag: {
117
117
  type: String,
118
118
  default: "div"
@@ -121,10 +121,10 @@ const props$1u = {
121
121
 
122
122
  /** @jsxImportSource vue */
123
123
 
124
- const COMPONENT_NAME$2b = 'vc-action-sheet';
124
+ const COMPONENT_NAME$2g = 'vc-action-sheet';
125
125
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
126
- name: COMPONENT_NAME$2b,
127
- props: props$1u,
126
+ name: COMPONENT_NAME$2g,
127
+ props: props$1v,
128
128
  setup(props, {
129
129
  slots
130
130
  }) {
@@ -138,7 +138,7 @@ const ActionSheet = /* @__PURE__ */ vue.defineComponent({
138
138
 
139
139
  const MActionSheet = ActionSheet;
140
140
 
141
- const props$1t = {
141
+ const props$1u = {
142
142
  modelValue: {
143
143
  type: Boolean,
144
144
  default: false
@@ -200,11 +200,11 @@ const isWheel = (el) => {
200
200
 
201
201
  /** @jsxImportSource vue */
202
202
 
203
- const COMPONENT_NAME$2a = 'vc-affix';
203
+ const COMPONENT_NAME$2f = 'vc-affix';
204
204
  const Affix = /* @__PURE__ */ vue.defineComponent({
205
- name: COMPONENT_NAME$2a,
205
+ name: COMPONENT_NAME$2f,
206
206
  emits: ['update:modelValue'],
207
- props: props$1t,
207
+ props: props$1u,
208
208
  setup(props, {
209
209
  slots,
210
210
  expose,
@@ -370,7 +370,7 @@ const Affix = /* @__PURE__ */ vue.defineComponent({
370
370
 
371
371
  const MAffix = Affix;
372
372
 
373
- const props$1s = {
373
+ const props$1t = {
374
374
  modelValue: {
375
375
  type: Boolean,
376
376
  default: true
@@ -397,7 +397,7 @@ const props$1s = {
397
397
  }
398
398
  };
399
399
 
400
- const props$1r = {
400
+ const props$1s = {
401
401
  type: String,
402
402
  inherit: {
403
403
  type: Boolean,
@@ -534,10 +534,10 @@ const IconManager = new Manager();
534
534
 
535
535
  /** @jsxImportSource vue */
536
536
 
537
- const COMPONENT_NAME$29 = 'vc-icon';
537
+ const COMPONENT_NAME$2e = 'vc-icon';
538
538
  const Icon = /* @__PURE__ */ vue.defineComponent({
539
- name: COMPONENT_NAME$29,
540
- props: props$1r,
539
+ name: COMPONENT_NAME$2e,
540
+ props: props$1s,
541
541
  setup(props) {
542
542
  const viewBox = vue.ref('0 0 1024 1024');
543
543
  const path = vue.ref([]);
@@ -570,7 +570,7 @@ const Icon = /* @__PURE__ */ vue.defineComponent({
570
570
  }
571
571
  });
572
572
 
573
- const props$1q = {
573
+ const props$1r = {
574
574
  /**
575
575
  * 进入/离开持续时间
576
576
  * {enter: 300, leave: 300}
@@ -735,10 +735,10 @@ const useTransition = () => {
735
735
  };
736
736
  };
737
737
 
738
- const COMPONENT_NAME$28 = "vc-transition";
738
+ const COMPONENT_NAME$2d = "vc-transition";
739
739
  const Transition = vue.defineComponent({
740
- name: COMPONENT_NAME$28,
741
- props: props$1q,
740
+ name: COMPONENT_NAME$2d,
741
+ props: props$1r,
742
742
  // 当不声明emits的情况下,事件存在于attrs中
743
743
  inheritAttrs: false,
744
744
  setup(props, { slots, attrs }) {
@@ -758,10 +758,10 @@ const Transition = vue.defineComponent({
758
758
  }
759
759
  });
760
760
 
761
- const COMPONENT_NAME$27 = "vc-transition-collapse";
761
+ const COMPONENT_NAME$2c = "vc-transition-collapse";
762
762
  const TransitionCollapse = vue.defineComponent({
763
- name: COMPONENT_NAME$27,
764
- props: props$1q,
763
+ name: COMPONENT_NAME$2c,
764
+ props: props$1r,
765
765
  // 当不声明emits的情况下,事件存在于attrs中
766
766
  inheritAttrs: false,
767
767
  setup(props, { slots, attrs: _attrs }) {
@@ -875,11 +875,11 @@ const TransitionCollapse = vue.defineComponent({
875
875
  }
876
876
  });
877
877
 
878
- const COMPONENT_NAME$26 = "vc-transition-fade";
878
+ const COMPONENT_NAME$2b = "vc-transition-fade";
879
879
  const TransitionFade = vue.defineComponent({
880
- name: COMPONENT_NAME$26,
880
+ name: COMPONENT_NAME$2b,
881
881
  props: {
882
- ...props$1q,
882
+ ...props$1r,
883
883
  // inheritAttrs必须是false
884
884
  style: {
885
885
  type: Object,
@@ -912,11 +912,11 @@ const TransitionFade = vue.defineComponent({
912
912
  }
913
913
  });
914
914
 
915
- const COMPONENT_NAME$25 = "vc-transition-scale";
915
+ const COMPONENT_NAME$2a = "vc-transition-scale";
916
916
  const TransitionScale = vue.defineComponent({
917
- name: COMPONENT_NAME$25,
917
+ name: COMPONENT_NAME$2a,
918
918
  props: {
919
- ...props$1q,
919
+ ...props$1r,
920
920
  mode: {
921
921
  type: String,
922
922
  default: "both",
@@ -954,11 +954,11 @@ const TransitionScale = vue.defineComponent({
954
954
  }
955
955
  });
956
956
 
957
- const COMPONENT_NAME$24 = "vc-transition-slide";
957
+ const COMPONENT_NAME$29 = "vc-transition-slide";
958
958
  const TransitionSlide = vue.defineComponent({
959
- name: COMPONENT_NAME$24,
959
+ name: COMPONENT_NAME$29,
960
960
  props: {
961
- ...props$1q,
961
+ ...props$1r,
962
962
  mode: {
963
963
  type: String,
964
964
  default: "left",
@@ -996,11 +996,11 @@ const TransitionSlide = vue.defineComponent({
996
996
  }
997
997
  });
998
998
 
999
- const COMPONENT_NAME$23 = "vc-transition-zoom";
999
+ const COMPONENT_NAME$28 = "vc-transition-zoom";
1000
1000
  const TransitionZoom = vue.defineComponent({
1001
- name: COMPONENT_NAME$23,
1001
+ name: COMPONENT_NAME$28,
1002
1002
  props: {
1003
- ...props$1q,
1003
+ ...props$1r,
1004
1004
  mode: {
1005
1005
  type: String,
1006
1006
  default: "x",
@@ -1040,7 +1040,7 @@ const TransitionZoom = vue.defineComponent({
1040
1040
 
1041
1041
  /** @jsxImportSource vue */
1042
1042
 
1043
- const COMPONENT_NAME$22 = 'vc-alert';
1043
+ const COMPONENT_NAME$27 = 'vc-alert';
1044
1044
 
1045
1045
  // [color, borderColor, backgroundColor], -> CSS
1046
1046
  const THEME_MAP = {
@@ -1050,8 +1050,8 @@ const THEME_MAP = {
1050
1050
  warning: ['#ffbf00', '#ffe58f', '#fffbe6']
1051
1051
  };
1052
1052
  const Alert = /* @__PURE__ */ vue.defineComponent({
1053
- name: COMPONENT_NAME$22,
1054
- props: props$1s,
1053
+ name: COMPONENT_NAME$27,
1054
+ props: props$1t,
1055
1055
  setup(props, {
1056
1056
  slots,
1057
1057
  emit
@@ -1140,7 +1140,7 @@ const Alert = /* @__PURE__ */ vue.defineComponent({
1140
1140
 
1141
1141
  const MAlert = Alert;
1142
1142
 
1143
- const props$1p = {
1143
+ const props$1q = {
1144
1144
  // canvas配置参数
1145
1145
  options: Object,
1146
1146
  width: {
@@ -1156,10 +1156,10 @@ const props$1p = {
1156
1156
  /** @jsxImportSource vue */
1157
1157
 
1158
1158
  const isTouch = typeof document !== 'undefined' && 'ontouchend' in document;
1159
- const COMPONENT_NAME$21 = 'vc-artboard';
1159
+ const COMPONENT_NAME$26 = 'vc-artboard';
1160
1160
  const Artboard = /* @__PURE__ */ vue.defineComponent({
1161
- name: COMPONENT_NAME$21,
1162
- props: props$1p,
1161
+ name: COMPONENT_NAME$26,
1162
+ props: props$1q,
1163
1163
  setup(props, {
1164
1164
  emit,
1165
1165
  expose
@@ -1362,7 +1362,7 @@ const Artboard = /* @__PURE__ */ vue.defineComponent({
1362
1362
 
1363
1363
  const MArtboard = Artboard;
1364
1364
 
1365
- const props$1o = {
1365
+ const props$1p = {
1366
1366
  size: {
1367
1367
  type: Number,
1368
1368
  default: 28
@@ -1386,10 +1386,10 @@ const props$1o = {
1386
1386
 
1387
1387
  /** @jsxImportSource vue */
1388
1388
 
1389
- const COMPONENT_NAME$20 = 'vc-spin';
1389
+ const COMPONENT_NAME$25 = 'vc-spin';
1390
1390
  const Spin = /* @__PURE__ */ vue.defineComponent({
1391
- name: COMPONENT_NAME$20,
1392
- props: props$1o,
1391
+ name: COMPONENT_NAME$25,
1392
+ props: props$1p,
1393
1393
  setup(props, {
1394
1394
  slots
1395
1395
  }) {
@@ -1423,7 +1423,7 @@ const Spin = /* @__PURE__ */ vue.defineComponent({
1423
1423
  }
1424
1424
  });
1425
1425
 
1426
- const props$1n = {
1426
+ const props$1o = {
1427
1427
  wait: {
1428
1428
  type: Number,
1429
1429
  default: 250
@@ -1439,10 +1439,10 @@ const props$1n = {
1439
1439
  exclude: RegExp
1440
1440
  };
1441
1441
 
1442
- const COMPONENT_NAME$1$ = "vc-debounce";
1442
+ const COMPONENT_NAME$24 = "vc-debounce";
1443
1443
  const Debounce = vue.defineComponent({
1444
- name: COMPONENT_NAME$1$,
1445
- props: props$1n,
1444
+ name: COMPONENT_NAME$24,
1445
+ props: props$1o,
1446
1446
  /**
1447
1447
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
1448
1448
  * 如事件onClick
@@ -1482,7 +1482,7 @@ const Debounce = vue.defineComponent({
1482
1482
  }
1483
1483
  });
1484
1484
 
1485
- const props$1m = {
1485
+ const props$1n = {
1486
1486
  tag: {
1487
1487
  type: String,
1488
1488
  default: "button"
@@ -1514,11 +1514,11 @@ const props$1m = {
1514
1514
 
1515
1515
  /** @jsxImportSource vue */
1516
1516
 
1517
- const COMPONENT_NAME$1_ = 'vc-button';
1517
+ const COMPONENT_NAME$23 = 'vc-button';
1518
1518
  const Button = /* @__PURE__ */ vue.defineComponent({
1519
- name: COMPONENT_NAME$1_,
1519
+ name: COMPONENT_NAME$23,
1520
1520
  emits: ['click'],
1521
- props: props$1m,
1521
+ props: props$1n,
1522
1522
  setup(props, {
1523
1523
  slots
1524
1524
  }) {
@@ -1579,7 +1579,7 @@ const Button = /* @__PURE__ */ vue.defineComponent({
1579
1579
  }
1580
1580
  });
1581
1581
 
1582
- const props$1l = {
1582
+ const props$1m = {
1583
1583
  vertical: {
1584
1584
  type: Boolean,
1585
1585
  default: false
@@ -1600,10 +1600,10 @@ const props$1l = {
1600
1600
 
1601
1601
  /** @jsxImportSource vue */
1602
1602
 
1603
- const COMPONENT_NAME$1Z = 'vc-button-group';
1603
+ const COMPONENT_NAME$22 = 'vc-button-group';
1604
1604
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
1605
- name: COMPONENT_NAME$1Z,
1606
- props: props$1l,
1605
+ name: COMPONENT_NAME$22,
1606
+ props: props$1m,
1607
1607
  setup(props, {
1608
1608
  slots
1609
1609
  }) {
@@ -1627,7 +1627,7 @@ const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
1627
1627
  const MButton = Button;
1628
1628
  const MButtonGroup = ButtonGroup;
1629
1629
 
1630
- const props$1k = {
1630
+ const props$1l = {
1631
1631
  tag: {
1632
1632
  type: String,
1633
1633
  default: "div"
@@ -1636,10 +1636,10 @@ const props$1k = {
1636
1636
 
1637
1637
  /** @jsxImportSource vue */
1638
1638
 
1639
- const COMPONENT_NAME$1Y = 'vc-calendar';
1639
+ const COMPONENT_NAME$21 = 'vc-calendar';
1640
1640
  const Calendar = /* @__PURE__ */ vue.defineComponent({
1641
- name: COMPONENT_NAME$1Y,
1642
- props: props$1k,
1641
+ name: COMPONENT_NAME$21,
1642
+ props: props$1l,
1643
1643
  setup(props, {
1644
1644
  slots
1645
1645
  }) {
@@ -1653,7 +1653,7 @@ const Calendar = /* @__PURE__ */ vue.defineComponent({
1653
1653
 
1654
1654
  const MCalendar = Calendar;
1655
1655
 
1656
- const props$1j = {
1656
+ const props$1k = {
1657
1657
  border: {
1658
1658
  type: Boolean,
1659
1659
  default: true
@@ -1676,10 +1676,10 @@ const props$1j = {
1676
1676
 
1677
1677
  /** @jsxImportSource vue */
1678
1678
 
1679
- const COMPONENT_NAME$1X = 'vc-card';
1679
+ const COMPONENT_NAME$20 = 'vc-card';
1680
1680
  const Card = /* @__PURE__ */ vue.defineComponent({
1681
- name: COMPONENT_NAME$1X,
1682
- props: props$1j,
1681
+ name: COMPONENT_NAME$20,
1682
+ props: props$1k,
1683
1683
  setup(props, {
1684
1684
  slots
1685
1685
  }) {
@@ -1705,31 +1705,713 @@ const Card = /* @__PURE__ */ vue.defineComponent({
1705
1705
 
1706
1706
  const MCard = Card;
1707
1707
 
1708
- const props$1i = {
1709
- tag: {
1708
+ const useCarousel = (wrapper, content, expose) => {
1709
+ const instance = vue.getCurrentInstance();
1710
+ const props = instance.props;
1711
+ const { emit } = instance;
1712
+ const items = vue.ref([]);
1713
+ const activeIndex = vue.ref(-1);
1714
+ const timer = vue.ref(null);
1715
+ const offset = vue.ref(0);
1716
+ const carouselId = vue.ref(Utils.getUid("carousel"));
1717
+ const start = vue.ref();
1718
+ const startX = vue.ref();
1719
+ const startY = vue.ref();
1720
+ const allowTransition = vue.ref(false);
1721
+ const direction = vue.computed(() => {
1722
+ return props.vertical ? "vertical" : "horizontal";
1723
+ });
1724
+ const hasLabel = vue.computed(() => {
1725
+ return items.value.some((item) => item.props.label.toString().length > 0);
1726
+ });
1727
+ const dotsClasses = vue.computed(() => {
1728
+ const classes = ["is-" + direction.value];
1729
+ if (hasLabel.value) {
1730
+ classes.push("is-labels");
1731
+ }
1732
+ if (props.dots === "outside" || props.card) {
1733
+ classes.push("is-outside");
1734
+ }
1735
+ return classes;
1736
+ });
1737
+ const resetItems = (oldIndex) => {
1738
+ items.value.forEach((item, index) => {
1739
+ item.exposed?.reset?.(index, activeIndex.value, oldIndex);
1740
+ });
1741
+ };
1742
+ const playSlides = () => {
1743
+ allowTransition.value = true;
1744
+ if (activeIndex.value < items.value.length - 1) {
1745
+ activeIndex.value++;
1746
+ } else if (props.loop) {
1747
+ activeIndex.value = 0;
1748
+ }
1749
+ };
1750
+ const pauseTimer = () => {
1751
+ if (timer.value) {
1752
+ clearInterval(timer.value);
1753
+ timer.value = null;
1754
+ }
1755
+ };
1756
+ const startTimer = () => {
1757
+ if (props.t <= 0 || !props.autoplay || timer.value) return;
1758
+ timer.value = setInterval(playSlides, props.t);
1759
+ };
1760
+ const setActiveItem = (index) => {
1761
+ if (typeof index === "string") {
1762
+ const filteredItems = items.value.filter((item) => item.props.name === index);
1763
+ if (filteredItems.length > 0) {
1764
+ index = items.value.indexOf(filteredItems[0]);
1765
+ }
1766
+ }
1767
+ index = Number(index);
1768
+ if (isNaN(index) || index !== Math.floor(index)) {
1769
+ throw new VcError("carousel", "索引必须是整数");
1770
+ }
1771
+ const length = items.value.length;
1772
+ const oldIndex = activeIndex.value;
1773
+ if (index < 0) {
1774
+ activeIndex.value = props.loop ? length - 1 : 0;
1775
+ } else if (index >= length) {
1776
+ activeIndex.value = props.loop ? 0 : length - 1;
1777
+ } else {
1778
+ activeIndex.value = index;
1779
+ }
1780
+ if (oldIndex === activeIndex.value) {
1781
+ resetItems(oldIndex);
1782
+ }
1783
+ };
1784
+ const prev = () => {
1785
+ setActiveItem(activeIndex.value - 1);
1786
+ };
1787
+ const next = () => {
1788
+ setActiveItem(activeIndex.value + 1);
1789
+ };
1790
+ const handleDotClick = (index) => {
1791
+ activeIndex.value = index;
1792
+ };
1793
+ const handleStart = (e) => {
1794
+ allowTransition.value = true;
1795
+ if (!props.draggable) return;
1796
+ pauseTimer();
1797
+ start.value = true;
1798
+ startX.value = e.screenX;
1799
+ startY.value = e.screenY;
1800
+ };
1801
+ const handleMove = (e) => {
1802
+ if (!start.value || !props.draggable) return;
1803
+ offset.value = !props.vertical ? e.screenX - startX.value : e.screenY - startY.value;
1804
+ resetItems();
1805
+ };
1806
+ const handleEnd = () => {
1807
+ if (!props.draggable) return;
1808
+ start.value = false;
1809
+ startTimer();
1810
+ const $offset = Math.abs(offset.value);
1811
+ const $direction = offset.value > 0;
1812
+ offset.value = 0;
1813
+ if ($offset > 5) {
1814
+ $direction && prev();
1815
+ !$direction && next();
1816
+ } else {
1817
+ resetItems();
1818
+ }
1819
+ };
1820
+ vue.watch(
1821
+ () => items.value,
1822
+ (v) => {
1823
+ if (v.length > 0) setActiveItem(props.initialIndex);
1824
+ }
1825
+ );
1826
+ vue.watch(
1827
+ () => activeIndex.value,
1828
+ (v, oldV) => {
1829
+ resetItems(oldV);
1830
+ emit("change", v, oldV);
1831
+ }
1832
+ );
1833
+ vue.watch(
1834
+ () => props.autoplay,
1835
+ (v) => {
1836
+ v ? startTimer() : pauseTimer();
1837
+ }
1838
+ );
1839
+ vue.watch(
1840
+ () => props.loop,
1841
+ () => {
1842
+ setActiveItem(activeIndex.value);
1843
+ }
1844
+ );
1845
+ vue.watch(
1846
+ () => props.t,
1847
+ () => {
1848
+ pauseTimer();
1849
+ startTimer();
1850
+ }
1851
+ );
1852
+ vue.onMounted(() => {
1853
+ vue.nextTick(() => {
1854
+ if (wrapper.value) helperResize.Resize.on(wrapper.value, resetItems);
1855
+ if (props.initialIndex < items.value.length && props.initialIndex >= 0) {
1856
+ activeIndex.value = props.initialIndex;
1857
+ }
1858
+ startTimer();
1859
+ });
1860
+ });
1861
+ vue.onBeforeUnmount(() => {
1862
+ if (wrapper.value) helperResize.Resize.off(wrapper.value, resetItems);
1863
+ pauseTimer();
1864
+ startTimer();
1865
+ });
1866
+ const add = (item) => {
1867
+ if (!item) return;
1868
+ vue.nextTick(() => {
1869
+ if (content.value) {
1870
+ const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
1871
+ items.value.splice(index, 0, item);
1872
+ return;
1873
+ }
1874
+ items.value.push(item);
1875
+ });
1876
+ };
1877
+ const remove = (item) => {
1878
+ if (!item) return;
1879
+ items.value.splice(items.value.indexOf(item), 1);
1880
+ };
1881
+ vue.provide("vc-carousel", {
1882
+ props,
1883
+ items,
1884
+ offset,
1885
+ allowTransition,
1886
+ setActiveItem,
1887
+ wrapper,
1888
+ content,
1889
+ add,
1890
+ remove
1891
+ });
1892
+ expose({
1893
+ setActiveItem,
1894
+ prev,
1895
+ next
1896
+ });
1897
+ return {
1898
+ carouselId,
1899
+ allowTransition,
1900
+ items,
1901
+ activeIndex,
1902
+ offset,
1903
+ direction,
1904
+ hasLabel,
1905
+ dotsClasses,
1906
+ start,
1907
+ startX,
1908
+ startY,
1909
+ handleStart,
1910
+ handleMove,
1911
+ handleEnd,
1912
+ handleDotClick,
1913
+ prev,
1914
+ next,
1915
+ setActiveItem,
1916
+ pauseTimer,
1917
+ startTimer
1918
+ };
1919
+ };
1920
+
1921
+ const props$1j = {
1922
+ t: {
1923
+ type: Number,
1924
+ default: 3e3
1925
+ },
1926
+ card: Boolean,
1927
+ gutter: {
1928
+ type: Number,
1929
+ default: 0
1930
+ },
1931
+ height: [String, Number],
1932
+ initialIndex: {
1933
+ type: Number,
1934
+ default: 0
1935
+ },
1936
+ trigger: {
1710
1937
  type: String,
1711
- default: "div"
1938
+ default: "hover"
1939
+ },
1940
+ autoplay: {
1941
+ type: Boolean,
1942
+ default: true
1943
+ },
1944
+ dots: {
1945
+ type: [String, Boolean],
1946
+ default: "bottom"
1947
+ // bottom/outside | false
1948
+ },
1949
+ arrow: {
1950
+ type: [String, Boolean],
1951
+ default: "hover"
1952
+ // hover/always | false
1953
+ },
1954
+ loop: {
1955
+ type: Boolean,
1956
+ default: true
1957
+ },
1958
+ vertical: {
1959
+ type: Boolean,
1960
+ default: false
1961
+ },
1962
+ draggable: {
1963
+ type: Boolean,
1964
+ default: true
1712
1965
  }
1713
1966
  };
1714
1967
 
1715
1968
  /** @jsxImportSource vue */
1716
1969
 
1717
- const COMPONENT_NAME$1W = 'vc-carousel';
1970
+ const COMPONENT_NAME$1$ = 'vc-carousel';
1718
1971
  const Carousel = /* @__PURE__ */ vue.defineComponent({
1719
- name: COMPONENT_NAME$1W,
1972
+ name: COMPONENT_NAME$1$,
1973
+ props: props$1j,
1974
+ setup(props, {
1975
+ slots,
1976
+ expose
1977
+ }) {
1978
+ const isHover = vue.ref(false);
1979
+ const wrapper = vue.ref(null);
1980
+ const content = vue.ref(null);
1981
+ const arrowDisplay = vue.computed(() => {
1982
+ return props.arrow && !props.vertical;
1983
+ });
1984
+ const carousel = useCarousel(wrapper, content, expose);
1985
+ const itemInStage = (item, index, items) => {
1986
+ const length = items.length;
1987
+ const isInStage = item.exposed.isInStage.value;
1988
+ if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
1989
+ return 'left';
1990
+ } else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
1991
+ return 'right';
1992
+ }
1993
+ return false;
1994
+ };
1995
+ const handleButtonEnter = arrow => {
1996
+ if (props.vertical) return;
1997
+ carousel.items.value.forEach((item, index, items) => {
1998
+ if (arrow === itemInStage(item, index, items)) {
1999
+ item.exposed.isHover.value = true;
2000
+ }
2001
+ });
2002
+ };
2003
+ const handleButtonLeave = () => {
2004
+ if (props.vertical) return;
2005
+ carousel.items.value.forEach(item => {
2006
+ item.exposed.isHover.value = false;
2007
+ });
2008
+ };
2009
+ const handleDotHover = index => {
2010
+ if (props.trigger === 'hover' && index !== carousel.activeIndex.value) {
2011
+ carousel.activeIndex.value = index;
2012
+ }
2013
+ };
2014
+ const handleMouseEnter = () => {
2015
+ isHover.value = true;
2016
+ carousel.pauseTimer();
2017
+ };
2018
+ const handleMouseLeave = () => {
2019
+ isHover.value = false;
2020
+ carousel.startTimer();
2021
+ };
2022
+ const throttledArrowClick = lodashEs.throttle(carousel.setActiveItem);
2023
+ const throttledDotHover = lodashEs.throttle(handleDotHover);
2024
+ return () => {
2025
+ return vue.createVNode("div", {
2026
+ "ref": wrapper,
2027
+ "class": ['vc-carousel', `is-${carousel.direction.value}`],
2028
+ "onMousedown": vue.withModifiers(carousel.handleStart, ['stop', 'prevent']),
2029
+ "onMousemove": vue.withModifiers(carousel.handleMove, ['stop', 'prevent']),
2030
+ "onMouseup": vue.withModifiers(carousel.handleEnd, ['stop', 'prevent']),
2031
+ "onMouseenter": vue.withModifiers(handleMouseEnter, ['stop']),
2032
+ "onMouseleave": vue.withModifiers(handleMouseLeave, ['stop'])
2033
+ }, [vue.createVNode("div", {
2034
+ "ref": content,
2035
+ "class": "vc-carousel__wrapper",
2036
+ "style": {
2037
+ height: props.height ? `${props.height}px` : 'auto'
2038
+ }
2039
+ }, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
2040
+ "mode": "left-part"
2041
+ }, {
2042
+ default: () => [vue.withDirectives(vue.createVNode("button", {
2043
+ "type": "button",
2044
+ "class": "vc-carousel__arrow is-left-arrow",
2045
+ "onMouseenter": () => handleButtonEnter('left'),
2046
+ "onMouseleave": handleButtonLeave,
2047
+ "onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ['stop'])
2048
+ }, [vue.createVNode(Icon, {
2049
+ "type": "left"
2050
+ }, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value > 0)]])]
2051
+ }), arrowDisplay.value && vue.createVNode(TransitionSlide, {
2052
+ "mode": "right-part"
2053
+ }, {
2054
+ default: () => [vue.withDirectives(vue.createVNode("button", {
2055
+ "type": "button",
2056
+ "class": "vc-carousel__arrow is-right-arrow",
2057
+ "onMouseenter": () => handleButtonEnter('right'),
2058
+ "onMouseleave": handleButtonLeave,
2059
+ "onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ['stop'])
2060
+ }, [vue.createVNode(Icon, {
2061
+ "type": "right"
2062
+ }, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
2063
+ }), slots.default?.()]), props.dots && vue.createVNode("ul", {
2064
+ "class": ['vc-carousel__dots', ...carousel.dotsClasses.value]
2065
+ }, [carousel.items.value.map((item, index) => vue.createVNode("li", {
2066
+ "key": index,
2067
+ "class": ['vc-carousel__dot', `is-${carousel.direction.value}`, {
2068
+ 'is-active': index === carousel.activeIndex.value
2069
+ }],
2070
+ "onMouseenter": () => throttledDotHover(index),
2071
+ "onClick": () => carousel.handleDotClick(index)
2072
+ }, [vue.createVNode("button", {
2073
+ "class": "vc-carousel__button"
2074
+ }, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
2075
+ };
2076
+ }
2077
+ });
2078
+
2079
+ const props$1i = {
2080
+ name: String,
2081
+ label: {
2082
+ type: [String, Number],
2083
+ default: ""
2084
+ },
2085
+ // card大小
2086
+ width: {
2087
+ type: [Number, String],
2088
+ default: "70%"
2089
+ },
2090
+ // card之间间距, 或者滑动时候的间距
2091
+ gutter: {
2092
+ type: Number,
2093
+ default: 0
2094
+ },
2095
+ scale: {
2096
+ type: Number,
2097
+ default: 0.83
2098
+ }
2099
+ };
2100
+
2101
+ const TRANSFORM = $.prefixStyle("transform").camel;
2102
+ const useCarouselItem = (expose) => {
2103
+ const instance = vue.getCurrentInstance();
2104
+ const carousel = vue.inject("vc-carousel", {});
2105
+ const props = instance.props;
2106
+ const translate = vue.ref(0);
2107
+ const currentScale = vue.ref(1);
2108
+ const isHover = vue.ref(false);
2109
+ const isActive = vue.ref(false);
2110
+ const isReady = vue.ref(false);
2111
+ const isInStage = vue.ref(false);
2112
+ const isAnimating = vue.ref(false);
2113
+ const isVertical = vue.computed(() => {
2114
+ return carousel.props.vertical;
2115
+ });
2116
+ const isCard = vue.computed(() => {
2117
+ return carousel.props.card;
2118
+ });
2119
+ const isMove = vue.computed(() => {
2120
+ return carousel.offset.value !== 0;
2121
+ });
2122
+ const itemGutter = vue.computed(() => {
2123
+ return props.gutter || carousel.props.gutter || 0;
2124
+ });
2125
+ const itemStyle = vue.computed(() => {
2126
+ const translateType = isVertical.value ? "translateY" : "translateX";
2127
+ if (carousel.props.card) {
2128
+ return {
2129
+ [TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
2130
+ width: props.width
2131
+ };
2132
+ } else {
2133
+ return {
2134
+ [TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
2135
+ width: itemGutter.value ? props.width : "100%"
2136
+ };
2137
+ }
2138
+ });
2139
+ vue.onBeforeMount(() => {
2140
+ carousel.add?.(instance);
2141
+ if (!isCard.value && itemGutter.value && carousel.props.loop) {
2142
+ throw new VcError("carousel", "slide模式下loop不能为true");
2143
+ }
2144
+ });
2145
+ vue.onBeforeUnmount(() => {
2146
+ carousel.remove?.(instance);
2147
+ });
2148
+ const processIndex = (index, activeIndex, length) => {
2149
+ if (activeIndex === 0 && index === length - 1) {
2150
+ return -1;
2151
+ } else if (activeIndex === length - 1 && index === 0) {
2152
+ return length;
2153
+ } else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
2154
+ return length + 1;
2155
+ } else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
2156
+ return -2;
2157
+ }
2158
+ return index;
2159
+ };
2160
+ const calcCardTranslate = (index, activeIndex) => {
2161
+ let value;
2162
+ const widthNumber = +props.width / 100;
2163
+ const parentW = carousel.wrapper.value.offsetWidth;
2164
+ if (isInStage.value) {
2165
+ if (index === activeIndex) {
2166
+ value = parentW * (1 - widthNumber) / 2;
2167
+ } else if (index > activeIndex) {
2168
+ value = parentW * (1 + widthNumber * props.scale) / 2 + itemGutter.value;
2169
+ } else {
2170
+ value = -(parentW * ((widthNumber * props.scale - 1) / 2 + widthNumber)) - itemGutter.value;
2171
+ }
2172
+ } else if (index < activeIndex) {
2173
+ value = parentW * (1 - widthNumber) / 2;
2174
+ } else {
2175
+ value = parentW * (1 - widthNumber) / 2;
2176
+ }
2177
+ return value;
2178
+ };
2179
+ const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
2180
+ const { length } = carousel.items.value;
2181
+ const offset = wrapperWidth - (instance.vnode?.el?.offsetWidth || 0);
2182
+ const gutter = itemGutter.value;
2183
+ if (!gutter || isVertical.value) return 0;
2184
+ let slideOffset = 0;
2185
+ if (length === 1) {
2186
+ return offset / 2;
2187
+ }
2188
+ if (activeIndex == 0) {
2189
+ if (index - activeIndex === 0) {
2190
+ slideOffset = gutter;
2191
+ } else if (index - activeIndex === 1) {
2192
+ slideOffset = -offset + gutter * 2;
2193
+ }
2194
+ }
2195
+ if (activeIndex !== 0 && activeIndex != length - 1) {
2196
+ if (index - activeIndex === 0) {
2197
+ slideOffset = offset / 2;
2198
+ } else if (index - activeIndex === 1) {
2199
+ slideOffset = -offset / 2 + gutter;
2200
+ } else if (index - activeIndex === -1) {
2201
+ slideOffset = offset * 3 / 2 - gutter;
2202
+ }
2203
+ }
2204
+ if (activeIndex == length - 1) {
2205
+ if (index - activeIndex === 0) {
2206
+ slideOffset = offset - gutter;
2207
+ } else if (index - activeIndex === -1) {
2208
+ slideOffset = offset * 2 - gutter * 2;
2209
+ }
2210
+ }
2211
+ return slideOffset;
2212
+ };
2213
+ const calcTranslate = (index, activeIndex) => {
2214
+ const distance = carousel.vnode.el[isVertical.value ? "offsetHeight" : "offsetWidth"];
2215
+ const slideOffset = calcSlideOffset(index, activeIndex, distance);
2216
+ return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
2217
+ };
2218
+ const reset = (index, activeIndex, oldIndex) => {
2219
+ const { length } = carousel.items.value;
2220
+ if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
2221
+ isAnimating.value = index === activeIndex || index === oldIndex;
2222
+ if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
2223
+ isAnimating.value = true;
2224
+ }
2225
+ }
2226
+ if (index !== activeIndex && length > 2 && carousel.props.loop) {
2227
+ index = processIndex(index, activeIndex, length);
2228
+ }
2229
+ if (isCard.value) {
2230
+ if (isVertical.value) {
2231
+ throw new VcError("carousel", "卡片模式不支持垂直方向");
2232
+ }
2233
+ isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
2234
+ isActive.value = index === activeIndex;
2235
+ translate.value = calcCardTranslate(index, activeIndex);
2236
+ currentScale.value = isActive.value ? 1 : props.scale;
2237
+ } else {
2238
+ isActive.value = index === activeIndex;
2239
+ translate.value = calcTranslate(index, activeIndex);
2240
+ }
2241
+ isReady.value = true;
2242
+ };
2243
+ const handleItemClick = () => {
2244
+ if (parent && isCard.value) {
2245
+ const index = carousel.items.value.indexOf(instance);
2246
+ carousel.setActiveItem(index);
2247
+ }
2248
+ };
2249
+ expose({
2250
+ reset,
2251
+ isInStage,
2252
+ isHover,
2253
+ isActive
2254
+ });
2255
+ return {
2256
+ translate,
2257
+ currentScale,
2258
+ isHover,
2259
+ isActive,
2260
+ isReady,
2261
+ isInStage,
2262
+ isAnimating,
2263
+ isVertical,
2264
+ isCard,
2265
+ isMove,
2266
+ itemGutter,
2267
+ itemStyle,
2268
+ reset,
2269
+ handleItemClick
2270
+ };
2271
+ };
2272
+
2273
+ /** @jsxImportSource vue */
2274
+
2275
+ const COMPONENT_NAME$1_ = 'vc-carousel-item';
2276
+ const CarouselItem = /* @__PURE__ */ vue.defineComponent({
2277
+ name: COMPONENT_NAME$1_,
1720
2278
  props: props$1i,
2279
+ setup(_, {
2280
+ slots,
2281
+ expose
2282
+ }) {
2283
+ const it = useCarouselItem(expose);
2284
+ return () => {
2285
+ return vue.withDirectives(vue.createVNode("div", {
2286
+ "class": ['vc-carousel-item', {
2287
+ 'is-active': it.isActive.value,
2288
+ 'is-card': it.isCard.value,
2289
+ 'is-in-stage': it.isInStage.value,
2290
+ 'is-hover': it.isHover.value,
2291
+ 'is-animating': it.isAnimating.value && !it.isMove.value
2292
+ }],
2293
+ "style": it.itemStyle.value,
2294
+ "onClick": it.handleItemClick
2295
+ }, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
2296
+ "class": "vc-carousel-item__mask"
2297
+ }, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
2298
+ };
2299
+ }
2300
+ });
2301
+
2302
+ /** @jsxImportSource vue */
2303
+
2304
+ const COMPONENT_NAME$1Z = 'vcm-carousel';
2305
+ const MCarousel = /* @__PURE__ */ vue.defineComponent({
2306
+ name: COMPONENT_NAME$1Z,
2307
+ props: {
2308
+ ...props$1j,
2309
+ dots: {
2310
+ type: [String, Boolean],
2311
+ default: false
2312
+ },
2313
+ indicator: {
2314
+ type: Boolean,
2315
+ default: true
2316
+ }
2317
+ },
1721
2318
  setup(props, {
1722
- slots
2319
+ slots,
2320
+ expose
1723
2321
  }) {
2322
+ const wrapper = vue.ref(null);
2323
+ const content = vue.ref(null);
2324
+ const carousel = useCarousel(wrapper, content, expose);
2325
+ let scrollStatus = 0;
2326
+ const handleTouchStart = e => {
2327
+ carousel.handleStart(e.touches[0]);
2328
+ scrollStatus = 0;
2329
+ };
2330
+ const handleTouchMove = e => {
2331
+ const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
2332
+ const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
2333
+ if (!props.vertical && absX > absY && scrollStatus !== 1) {
2334
+ e.preventDefault();
2335
+ carousel.handleMove(e.touches[0]);
2336
+ scrollStatus = 2;
2337
+ return;
2338
+ }
2339
+ if (props.vertical && absY > absX) {
2340
+ e.preventDefault();
2341
+ carousel.handleMove(e.touches[0]);
2342
+ return;
2343
+ }
2344
+ if (scrollStatus === 0) {
2345
+ scrollStatus = 1;
2346
+ }
2347
+ };
2348
+
2349
+ // e.changedTouches[0]
2350
+ const handleTouchEnd = () => {
2351
+ carousel.handleEnd();
2352
+ scrollStatus = 0;
2353
+ };
1724
2354
  return () => {
1725
2355
  return vue.createVNode("div", {
1726
- "class": "vc-carousel"
1727
- }, [slots?.default?.()]);
2356
+ "ref": wrapper,
2357
+ "class": ['vcm-carousel', `is-${carousel.direction.value}`],
2358
+ "onTouchstart": vue.withModifiers(handleTouchStart, ['stop']),
2359
+ "onTouchmove": vue.withModifiers(handleTouchMove, ['stop']),
2360
+ "onTouchend": vue.withModifiers(handleTouchEnd, ['stop'])
2361
+ }, [vue.createVNode("div", {
2362
+ "ref": content,
2363
+ "style": {
2364
+ height: props.height ? `${props.height}px` : 'auto'
2365
+ },
2366
+ "class": "vcm-carousel__wrapper"
2367
+ }, [slots.default?.()]), props.dots && vue.createVNode("ul", {
2368
+ "class": ['vcm-carousel__dots', ...carousel.dotsClasses.value]
2369
+ }, [carousel.items.value.map((_, index) => vue.createVNode("li", {
2370
+ "key": index,
2371
+ "class": ['vcm-carousel__dot', 'is-' + carousel.direction.value, {
2372
+ 'is-active': index === carousel.activeIndex.value
2373
+ }],
2374
+ "onClick": e => {
2375
+ e.stopPropagation();
2376
+ carousel.handleDotClick(index);
2377
+ }
2378
+ }, [vue.createVNode("button", {
2379
+ "class": "vcm-carousel__button"
2380
+ }, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props.card && props.indicator && vue.createVNode("div", {
2381
+ "class": "vcm-carousel__indicator"
2382
+ }, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
1728
2383
  };
1729
2384
  }
1730
2385
  });
1731
2386
 
1732
- const MCarousel = Carousel;
2387
+ /** @jsxImportSource vue */
2388
+
2389
+ const COMPONENT_NAME$1Y = 'vcm-carousel-item';
2390
+ const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
2391
+ name: COMPONENT_NAME$1Y,
2392
+ props: props$1i,
2393
+ setup(_, {
2394
+ slots,
2395
+ expose
2396
+ }) {
2397
+ const it = useCarouselItem(expose);
2398
+ return () => {
2399
+ return vue.withDirectives(vue.createVNode("div", {
2400
+ "style": it.itemStyle.value,
2401
+ "class": {
2402
+ 'vcm-carousel-item': true,
2403
+ 'is-active': it.isActive.value,
2404
+ 'is-card': it.isCard.value,
2405
+ 'is-animating': it.isAnimating.value && !it.isMove.value,
2406
+ 'is-in-stage': it.isInStage.value
2407
+ },
2408
+ "onClick": it.handleItemClick
2409
+ }, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
2410
+ "class": "vcm-carousel-item__mask"
2411
+ }, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
2412
+ };
2413
+ }
2414
+ });
1733
2415
 
1734
2416
  const getSelectedData = (value = [], source = []) => {
1735
2417
  const label = [];
@@ -2010,9 +2692,9 @@ const useNativeEmitter = (input, expose) => {
2010
2692
 
2011
2693
  /** @jsxImportSource vue */
2012
2694
 
2013
- const COMPONENT_NAME$1V = 'vc-input';
2695
+ const COMPONENT_NAME$1X = 'vc-input';
2014
2696
  const Input = /* @__PURE__ */ vue.defineComponent({
2015
- name: COMPONENT_NAME$1V,
2697
+ name: COMPONENT_NAME$1X,
2016
2698
  inheritAttrs: false,
2017
2699
  props: {
2018
2700
  ...props$1h,
@@ -2347,9 +3029,9 @@ const useInputNumber = () => {
2347
3029
 
2348
3030
  /** @jsxImportSource vue */
2349
3031
 
2350
- const COMPONENT_NAME$1U = 'vc-input-number';
3032
+ const COMPONENT_NAME$1W = 'vc-input-number';
2351
3033
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
2352
- name: COMPONENT_NAME$1U,
3034
+ name: COMPONENT_NAME$1W,
2353
3035
  props: props$1g,
2354
3036
  inheritAttrs: false,
2355
3037
  setup(props, {
@@ -2413,9 +3095,9 @@ const props$1f = {
2413
3095
 
2414
3096
  /** @jsxImportSource vue */
2415
3097
 
2416
- const COMPONENT_NAME$1T = 'vc-input-search';
3098
+ const COMPONENT_NAME$1V = 'vc-input-search';
2417
3099
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
2418
- name: COMPONENT_NAME$1T,
3100
+ name: COMPONENT_NAME$1V,
2419
3101
  props: props$1f,
2420
3102
  inheritAttrs: false,
2421
3103
  setup(props, {
@@ -2808,9 +3490,9 @@ const props$1c = {
2808
3490
  }
2809
3491
  };
2810
3492
 
2811
- const COMPONENT_NAME$1S = "vc-customer";
3493
+ const COMPONENT_NAME$1U = "vc-customer";
2812
3494
  const Customer = vue.defineComponent({
2813
- name: COMPONENT_NAME$1S,
3495
+ name: COMPONENT_NAME$1U,
2814
3496
  props: props$1c,
2815
3497
  setup(props, context) {
2816
3498
  return () => vue.h(() => {
@@ -2886,7 +3568,7 @@ class PortalLeaf {
2886
3568
  }
2887
3569
  }
2888
3570
 
2889
- const COMPONENT_NAME$1R = "vc-portal";
3571
+ const COMPONENT_NAME$1T = "vc-portal";
2890
3572
  class Portal {
2891
3573
  /**
2892
3574
  * 清理Portals类型组件
@@ -2936,7 +3618,7 @@ class Portal {
2936
3618
  this.wrapper = wrapper;
2937
3619
  this.globalOptions = {
2938
3620
  ...options,
2939
- name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1R)
3621
+ name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1T)
2940
3622
  };
2941
3623
  }
2942
3624
  popup(propsData, options) {
@@ -3034,7 +3716,7 @@ class Portal {
3034
3716
  ...rest
3035
3717
  } = options;
3036
3718
  let useAllNodes = fragment;
3037
- const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1R)}` : name$;
3719
+ const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1T)}` : name$;
3038
3720
  const container = document.createElement(tag);
3039
3721
  const root = typeof el === "object" ? el : document.querySelector(el || "body");
3040
3722
  !alive && Portal.leafs.get(name)?.destroy();
@@ -3068,7 +3750,7 @@ class Portal {
3068
3750
  } else {
3069
3751
  const wrapper = this.wrapper;
3070
3752
  const app = vue.createApp({
3071
- name: COMPONENT_NAME$1R,
3753
+ name: COMPONENT_NAME$1T,
3072
3754
  parent,
3073
3755
  setup() {
3074
3756
  if (alive) {
@@ -3179,13 +3861,13 @@ const props$1b = {
3179
3861
  }
3180
3862
  };
3181
3863
 
3182
- const COMPONENT_NAME$1Q = 'vc-portal-view';
3864
+ const COMPONENT_NAME$1S = 'vc-portal-view';
3183
3865
 
3184
3866
  /**
3185
3867
  * 写法不同,但与vue@2.x 保持一致
3186
3868
  */
3187
3869
  const PortalView = /* @__PURE__ */ vue.defineComponent({
3188
- name: COMPONENT_NAME$1Q,
3870
+ name: COMPONENT_NAME$1S,
3189
3871
  props: props$1b,
3190
3872
  setup(props, {
3191
3873
  slots
@@ -3205,9 +3887,9 @@ const PortalView = /* @__PURE__ */ vue.defineComponent({
3205
3887
 
3206
3888
  /** @jsxImportSource vue */
3207
3889
 
3208
- const COMPONENT_NAME$1P = 'vc-popover-wrapper';
3890
+ const COMPONENT_NAME$1R = 'vc-popover-wrapper';
3209
3891
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
3210
- name: COMPONENT_NAME$1P,
3892
+ name: COMPONENT_NAME$1R,
3211
3893
  props: props$1e,
3212
3894
  emits: ['portal-fulfilled', 'close'],
3213
3895
  setup(props, {
@@ -3465,9 +4147,9 @@ const PopoverPortal = new Portal(PopoverWrapper, {
3465
4147
 
3466
4148
  /** @jsxImportSource vue */
3467
4149
 
3468
- const COMPONENT_NAME$1O = 'vc-popover';
4150
+ const COMPONENT_NAME$1Q = 'vc-popover';
3469
4151
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
3470
- name: COMPONENT_NAME$1O,
4152
+ name: COMPONENT_NAME$1Q,
3471
4153
  props: props$1d,
3472
4154
  emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
3473
4155
  setup(props, {
@@ -3611,9 +4293,9 @@ const Popover = Object.assign(Popover$1, {
3611
4293
 
3612
4294
  /** @jsxImportSource vue */
3613
4295
 
3614
- const COMPONENT_NAME$1N = 'vc-cascader-column';
4296
+ const COMPONENT_NAME$1P = 'vc-cascader-column';
3615
4297
  const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
3616
- name: COMPONENT_NAME$1N,
4298
+ name: COMPONENT_NAME$1P,
3617
4299
  emits: ['click', 'change'],
3618
4300
  props: {
3619
4301
  data: {
@@ -3821,9 +4503,9 @@ const props$19 = {
3821
4503
 
3822
4504
  /** @jsxImportSource vue */
3823
4505
 
3824
- const COMPONENT_NAME$1M = 'vc-cascader';
4506
+ const COMPONENT_NAME$1O = 'vc-cascader';
3825
4507
  const Cascader = /* @__PURE__ */ vue.defineComponent({
3826
- name: COMPONENT_NAME$1M,
4508
+ name: COMPONENT_NAME$1O,
3827
4509
  inheritAttrs: false,
3828
4510
  props: props$19,
3829
4511
  emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
@@ -4175,9 +4857,9 @@ const props$18 = {
4175
4857
 
4176
4858
  /** @jsxImportSource vue */
4177
4859
 
4178
- const COMPONENT_NAME$1L = 'vc-chart';
4860
+ const COMPONENT_NAME$1N = 'vc-chart';
4179
4861
  const Chart = /* @__PURE__ */ vue.defineComponent({
4180
- name: COMPONENT_NAME$1L,
4862
+ name: COMPONENT_NAME$1N,
4181
4863
  props: props$18,
4182
4864
  emits: [...EVENTS, 'ready'],
4183
4865
  setup(props, {
@@ -4416,9 +5098,9 @@ const useCheckbox = () => {
4416
5098
 
4417
5099
  /** @jsxImportSource vue */
4418
5100
 
4419
- const COMPONENT_NAME$1K = 'vc-checkbox';
5101
+ const COMPONENT_NAME$1M = 'vc-checkbox';
4420
5102
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
4421
- name: COMPONENT_NAME$1K,
5103
+ name: COMPONENT_NAME$1M,
4422
5104
  props: props$17,
4423
5105
  emits: ['update:modelValue', 'change'],
4424
5106
  setup(props, {
@@ -4505,9 +5187,9 @@ const useCheckboxGroup = () => {
4505
5187
 
4506
5188
  /** @jsxImportSource vue */
4507
5189
 
4508
- const COMPONENT_NAME$1J = 'vc-checkbox-group';
5190
+ const COMPONENT_NAME$1L = 'vc-checkbox-group';
4509
5191
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4510
- name: COMPONENT_NAME$1J,
5192
+ name: COMPONENT_NAME$1L,
4511
5193
  props: props$16,
4512
5194
  emits: ['update:modelValue', 'change'],
4513
5195
  setup(props, {
@@ -4525,9 +5207,9 @@ const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4525
5207
 
4526
5208
  /** @jsxImportSource vue */
4527
5209
 
4528
- const COMPONENT_NAME$1I = 'vcm-checkbox';
5210
+ const COMPONENT_NAME$1K = 'vcm-checkbox';
4529
5211
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
4530
- name: COMPONENT_NAME$1I,
5212
+ name: COMPONENT_NAME$1K,
4531
5213
  props: props$17,
4532
5214
  emits: ['update:modelValue', 'change'],
4533
5215
  setup(props, {
@@ -4567,9 +5249,9 @@ const MCheckbox = /* @__PURE__ */ vue.defineComponent({
4567
5249
 
4568
5250
  /** @jsxImportSource vue */
4569
5251
 
4570
- const COMPONENT_NAME$1H = 'vcm-checkbox-group';
5252
+ const COMPONENT_NAME$1J = 'vcm-checkbox-group';
4571
5253
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4572
- name: COMPONENT_NAME$1H,
5254
+ name: COMPONENT_NAME$1J,
4573
5255
  props: props$16,
4574
5256
  emits: ['update:modelValue', 'change'],
4575
5257
  setup(props, {
@@ -4623,9 +5305,9 @@ const props$15 = {
4623
5305
 
4624
5306
  /** @jsxImportSource vue */
4625
5307
 
4626
- const COMPONENT_NAME$1G = 'vc-message';
5308
+ const COMPONENT_NAME$1I = 'vc-message';
4627
5309
  const MessageView = /* @__PURE__ */ vue.defineComponent({
4628
- name: COMPONENT_NAME$1G,
5310
+ name: COMPONENT_NAME$1I,
4629
5311
  emits: ['before-close', 'close', 'portal-fulfilled'],
4630
5312
  props: props$15,
4631
5313
  setup(props, {
@@ -4874,9 +5556,9 @@ const useClipboard = (done) => {
4874
5556
  return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
4875
5557
  };
4876
5558
 
4877
- const COMPONENT_NAME$1F = "vc-clipboard";
5559
+ const COMPONENT_NAME$1H = "vc-clipboard";
4878
5560
  const Clipboard$1 = vue.defineComponent({
4879
- name: COMPONENT_NAME$1F,
5561
+ name: COMPONENT_NAME$1H,
4880
5562
  props: props$14,
4881
5563
  setup() {
4882
5564
  return useClipboard((content) => Message.success({ content }));
@@ -4916,9 +5598,9 @@ const MTransitionZoom = TransitionZoom;
4916
5598
 
4917
5599
  /** @jsxImportSource vue */
4918
5600
 
4919
- const COMPONENT_NAME$1E = 'vcm-toast';
5601
+ const COMPONENT_NAME$1G = 'vcm-toast';
4920
5602
  const MToastView = /* @__PURE__ */ vue.defineComponent({
4921
- name: COMPONENT_NAME$1E,
5603
+ name: COMPONENT_NAME$1G,
4922
5604
  emits: ['close', 'portal-fulfilled'],
4923
5605
  props: props$13,
4924
5606
  setup(props, {
@@ -5020,9 +5702,9 @@ const warning$2 = create$3({ mode: "warning" });
5020
5702
  const error$2 = create$3({ mode: "error" });
5021
5703
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
5022
5704
 
5023
- const COMPONENT_NAME$1D = "vcm-clipboard";
5705
+ const COMPONENT_NAME$1F = "vcm-clipboard";
5024
5706
  const MClipboard$1 = vue.defineComponent({
5025
- name: COMPONENT_NAME$1D,
5707
+ name: COMPONENT_NAME$1F,
5026
5708
  props: props$14,
5027
5709
  setup() {
5028
5710
  return useClipboard((content) => MToast.info({ content }));
@@ -5054,9 +5736,9 @@ const props$12 = {
5054
5736
  }
5055
5737
  };
5056
5738
 
5057
- const COMPONENT_NAME$1C = "vc-collapse";
5739
+ const COMPONENT_NAME$1E = "vc-collapse";
5058
5740
  const Collapse = vue.defineComponent({
5059
- name: COMPONENT_NAME$1C,
5741
+ name: COMPONENT_NAME$1E,
5060
5742
  props: props$12,
5061
5743
  emits: ["update:moodelValue", "change"],
5062
5744
  setup(props, { slots, emit }) {
@@ -5173,9 +5855,9 @@ const props$10 = {
5173
5855
  function _isSlot$3(s) {
5174
5856
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
5175
5857
  }
5176
- const COMPONENT_NAME$1B = 'vc-expand';
5858
+ const COMPONENT_NAME$1D = 'vc-expand';
5177
5859
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
5178
- name: COMPONENT_NAME$1B,
5860
+ name: COMPONENT_NAME$1D,
5179
5861
  props: props$10,
5180
5862
  setup(props, {
5181
5863
  slots
@@ -5205,9 +5887,9 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
5205
5887
 
5206
5888
  /** @jsxImportSource vue */
5207
5889
 
5208
- const COMPONENT_NAME$1A = 'vc-collapse-item';
5890
+ const COMPONENT_NAME$1C = 'vc-collapse-item';
5209
5891
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
5210
- name: COMPONENT_NAME$1A,
5892
+ name: COMPONENT_NAME$1C,
5211
5893
  props: props$11,
5212
5894
  setup(props, {
5213
5895
  slots,
@@ -5282,9 +5964,9 @@ const props$$ = {
5282
5964
 
5283
5965
  /** @jsxImportSource vue */
5284
5966
 
5285
- const COMPONENT_NAME$1z = 'vc-color-picker';
5967
+ const COMPONENT_NAME$1B = 'vc-color-picker';
5286
5968
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
5287
- name: COMPONENT_NAME$1z,
5969
+ name: COMPONENT_NAME$1B,
5288
5970
  props: props$$,
5289
5971
  setup(props, {
5290
5972
  slots
@@ -5347,9 +6029,9 @@ const formatter = (format, arr) => {
5347
6029
  function _isSlot$2(s) {
5348
6030
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
5349
6031
  }
5350
- const COMPONENT_NAME$1y = 'vc-countdown';
6032
+ const COMPONENT_NAME$1A = 'vc-countdown';
5351
6033
  const Countdown = /* @__PURE__ */ vue.defineComponent({
5352
- name: COMPONENT_NAME$1y,
6034
+ name: COMPONENT_NAME$1A,
5353
6035
  props: props$_,
5354
6036
  emits: ['change', 'complete', 'error'],
5355
6037
  setup(props, {
@@ -5622,9 +6304,9 @@ const value2separated = (value, options) => {
5622
6304
  function _isSlot$1(s) {
5623
6305
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
5624
6306
  }
5625
- const COMPONENT_NAME$1x = 'vc-counter';
6307
+ const COMPONENT_NAME$1z = 'vc-counter';
5626
6308
  const Counter = /* @__PURE__ */ vue.defineComponent({
5627
- name: COMPONENT_NAME$1x,
6309
+ name: COMPONENT_NAME$1z,
5628
6310
  props: props$Z,
5629
6311
  emits: ['begin', 'complete', 'change'],
5630
6312
  setup(props, {
@@ -6887,9 +7569,9 @@ const getTimeType = type => {
6887
7569
  }
6888
7570
  return view;
6889
7571
  };
6890
- const COMPONENT_NAME$1w = 'vc-date-confirm';
7572
+ const COMPONENT_NAME$1y = 'vc-date-confirm';
6891
7573
  const Confirm = /* @__PURE__ */ vue.defineComponent({
6892
- name: COMPONENT_NAME$1w,
7574
+ name: COMPONENT_NAME$1y,
6893
7575
  props: {
6894
7576
  showTime: {
6895
7577
  type: Boolean,
@@ -6953,9 +7635,9 @@ const Confirm = /* @__PURE__ */ vue.defineComponent({
6953
7635
 
6954
7636
  /** @jsxImportSource vue */
6955
7637
 
6956
- const COMPONENT_NAME$1v = 'vc-date-header';
7638
+ const COMPONENT_NAME$1x = 'vc-date-header';
6957
7639
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
6958
- name: COMPONENT_NAME$1v,
7640
+ name: COMPONENT_NAME$1x,
6959
7641
  props: {
6960
7642
  panelDate: Date,
6961
7643
  showNext: {
@@ -7039,9 +7721,9 @@ const DateHeader = /* @__PURE__ */ vue.defineComponent({
7039
7721
 
7040
7722
  /** @jsxImportSource vue */
7041
7723
 
7042
- const COMPONENT_NAME$1u = 'vc-date-table';
7724
+ const COMPONENT_NAME$1w = 'vc-date-table';
7043
7725
  const DateTable = /* @__PURE__ */ vue.defineComponent({
7044
- name: COMPONENT_NAME$1u,
7726
+ name: COMPONENT_NAME$1w,
7045
7727
  props: {
7046
7728
  value: Array,
7047
7729
  firstDayOfWeek: {
@@ -7250,9 +7932,9 @@ const DateTable = /* @__PURE__ */ vue.defineComponent({
7250
7932
 
7251
7933
  /** @jsxImportSource vue */
7252
7934
 
7253
- const COMPONENT_NAME$1t = 'vc-month-table';
7935
+ const COMPONENT_NAME$1v = 'vc-month-table';
7254
7936
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
7255
- name: COMPONENT_NAME$1t,
7937
+ name: COMPONENT_NAME$1v,
7256
7938
  props: {
7257
7939
  value: Array,
7258
7940
  panelDate: Date,
@@ -7384,7 +8066,7 @@ const MonthTable = /* @__PURE__ */ vue.defineComponent({
7384
8066
 
7385
8067
  /** @jsxImportSource vue */
7386
8068
 
7387
- const COMPONENT_NAME$1s = 'vc-quarter-table';
8069
+ const COMPONENT_NAME$1u = 'vc-quarter-table';
7388
8070
 
7389
8071
  /**
7390
8072
  * 获取季度对应的月份范围
@@ -7418,7 +8100,7 @@ const getQuarterRangeByMonth = value => {
7418
8100
  }
7419
8101
  };
7420
8102
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
7421
- name: COMPONENT_NAME$1s,
8103
+ name: COMPONENT_NAME$1u,
7422
8104
  props: {
7423
8105
  value: Array,
7424
8106
  panelDate: Date,
@@ -7541,9 +8223,9 @@ const QuarterTable = /* @__PURE__ */ vue.defineComponent({
7541
8223
 
7542
8224
  /** @jsxImportSource vue */
7543
8225
 
7544
- const COMPONENT_NAME$1r = 'vc-shortcuts-select';
8226
+ const COMPONENT_NAME$1t = 'vc-shortcuts-select';
7545
8227
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
7546
- name: COMPONENT_NAME$1r,
8228
+ name: COMPONENT_NAME$1t,
7547
8229
  props: {
7548
8230
  panelDate: Date,
7549
8231
  config: Array,
@@ -7583,9 +8265,9 @@ const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
7583
8265
 
7584
8266
  /** @jsxImportSource vue */
7585
8267
 
7586
- const COMPONENT_NAME$1q = 'vc-time-select';
8268
+ const COMPONENT_NAME$1s = 'vc-time-select';
7587
8269
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
7588
- name: COMPONENT_NAME$1q,
8270
+ name: COMPONENT_NAME$1s,
7589
8271
  props: {
7590
8272
  hours: {
7591
8273
  type: [Number, String],
@@ -7865,9 +8547,9 @@ const TimeSelect = /* @__PURE__ */ vue.defineComponent({
7865
8547
 
7866
8548
  /** @jsxImportSource vue */
7867
8549
 
7868
- const COMPONENT_NAME$1p = 'vc-year-table';
8550
+ const COMPONENT_NAME$1r = 'vc-year-table';
7869
8551
  const YearTable = /* @__PURE__ */ vue.defineComponent({
7870
- name: COMPONENT_NAME$1p,
8552
+ name: COMPONENT_NAME$1r,
7871
8553
  props: {
7872
8554
  value: Array,
7873
8555
  panelDate: Date,
@@ -7990,9 +8672,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
7990
8672
  }
7991
8673
  return true;
7992
8674
  };
7993
- const COMPONENT_NAME$1o = 'vc-date-range-panel';
8675
+ const COMPONENT_NAME$1q = 'vc-date-range-panel';
7994
8676
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
7995
- name: COMPONENT_NAME$1o,
8677
+ name: COMPONENT_NAME$1q,
7996
8678
  props: {
7997
8679
  ...props$W,
7998
8680
  confirm: {
@@ -8371,9 +9053,9 @@ const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
8371
9053
 
8372
9054
  /** @jsxImportSource vue */
8373
9055
 
8374
- const COMPONENT_NAME$1n = 'vc-date-panel';
9056
+ const COMPONENT_NAME$1p = 'vc-date-panel';
8375
9057
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
8376
- name: COMPONENT_NAME$1n,
9058
+ name: COMPONENT_NAME$1p,
8377
9059
  props: {
8378
9060
  ...props$W,
8379
9061
  type: String,
@@ -8581,9 +9263,9 @@ const isEqualYear$1 = value => {
8581
9263
  const endYear = value[1].getFullYear();
8582
9264
  return startYear === endYear;
8583
9265
  };
8584
- const COMPONENT_NAME$1m = 'vc-monthrange-panel';
9266
+ const COMPONENT_NAME$1o = 'vc-monthrange-panel';
8585
9267
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
8586
- name: COMPONENT_NAME$1m,
9268
+ name: COMPONENT_NAME$1o,
8587
9269
  props: {
8588
9270
  ...props$W,
8589
9271
  confirm: {
@@ -8758,9 +9440,9 @@ const isEqualYear = value => {
8758
9440
  const endYear = value[1].getFullYear();
8759
9441
  return startYear === endYear;
8760
9442
  };
8761
- const COMPONENT_NAME$1l = 'vc-quarterrange-panel';
9443
+ const COMPONENT_NAME$1n = 'vc-quarterrange-panel';
8762
9444
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
8763
- name: COMPONENT_NAME$1l,
9445
+ name: COMPONENT_NAME$1n,
8764
9446
  props: {
8765
9447
  ...props$W,
8766
9448
  confirm: {
@@ -8999,9 +9681,9 @@ const getComparedDate = (leftDate, rightDate) => {
8999
9681
  seconds
9000
9682
  };
9001
9683
  };
9002
- const COMPONENT_NAME$1k = 'vc-timerange-panel';
9684
+ const COMPONENT_NAME$1m = 'vc-timerange-panel';
9003
9685
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
9004
- name: COMPONENT_NAME$1k,
9686
+ name: COMPONENT_NAME$1m,
9005
9687
  props: props$V,
9006
9688
  emits: ['pick', 'clear', 'ok'],
9007
9689
  setup(props, {
@@ -9102,9 +9784,9 @@ const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
9102
9784
 
9103
9785
  /** @jsxImportSource vue */
9104
9786
 
9105
- const COMPONENT_NAME$1j = 'vc-time-panel';
9787
+ const COMPONENT_NAME$1l = 'vc-time-panel';
9106
9788
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
9107
- name: COMPONENT_NAME$1j,
9789
+ name: COMPONENT_NAME$1l,
9108
9790
  props: props$V,
9109
9791
  emits: ['pick', 'clear', 'ok'],
9110
9792
  setup(props, {
@@ -9160,7 +9842,7 @@ const TimePanel = /* @__PURE__ */ vue.defineComponent({
9160
9842
 
9161
9843
  /** @jsxImportSource vue */
9162
9844
 
9163
- const COMPONENT_NAME$1i = 'vc-date-picker';
9845
+ const COMPONENT_NAME$1k = 'vc-date-picker';
9164
9846
  const getPanel$1 = type => {
9165
9847
  if (['daterange', 'datetimerange'].includes(type)) {
9166
9848
  return DateRangePanel;
@@ -9171,7 +9853,7 @@ const getPanel$1 = type => {
9171
9853
  }
9172
9854
  return DatePanel;
9173
9855
  };
9174
- const DatePicker = createPicker(COMPONENT_NAME$1i, props$Y, () => {
9856
+ const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
9175
9857
  const props = vue.getCurrentInstance().props;
9176
9858
  const icon = vue.ref('date');
9177
9859
  const panel = vue.shallowRef({});
@@ -9212,9 +9894,9 @@ const props$U = {
9212
9894
 
9213
9895
  /** @jsxImportSource vue */
9214
9896
 
9215
- const COMPONENT_NAME$1h = 'vc-divider';
9897
+ const COMPONENT_NAME$1j = 'vc-divider';
9216
9898
  const Divider = /* @__PURE__ */ vue.defineComponent({
9217
- name: COMPONENT_NAME$1h,
9899
+ name: COMPONENT_NAME$1j,
9218
9900
  props: props$U,
9219
9901
  setup(props, {
9220
9902
  slots
@@ -9350,7 +10032,7 @@ const props$R = {
9350
10032
 
9351
10033
  /** @jsxImportSource vue */
9352
10034
 
9353
- const COMPONENT_NAME$1g = 'vc-scroller-track';
10035
+ const COMPONENT_NAME$1i = 'vc-scroller-track';
9354
10036
  const BAR_MAP = {
9355
10037
  vertical: {
9356
10038
  scroll: 'scrollTop',
@@ -9370,7 +10052,7 @@ const BAR_MAP = {
9370
10052
  }
9371
10053
  };
9372
10054
  const Track = /* @__PURE__ */ vue.defineComponent({
9373
- name: COMPONENT_NAME$1g,
10055
+ name: COMPONENT_NAME$1i,
9374
10056
  props: props$T,
9375
10057
  emits: ['change'],
9376
10058
  inheritAttrs: false,
@@ -9560,9 +10242,9 @@ const Track = /* @__PURE__ */ vue.defineComponent({
9560
10242
 
9561
10243
  /** @jsxImportSource vue */
9562
10244
 
9563
- const COMPONENT_NAME$1f = 'vc-scroller-bar';
10245
+ const COMPONENT_NAME$1h = 'vc-scroller-bar';
9564
10246
  const Bar = /* @__PURE__ */ vue.defineComponent({
9565
- name: COMPONENT_NAME$1f,
10247
+ name: COMPONENT_NAME$1h,
9566
10248
  props: props$S,
9567
10249
  emits: ['change'],
9568
10250
  setup(props, {
@@ -9797,7 +10479,7 @@ const useScroller = (expose) => {
9797
10479
 
9798
10480
  /** @jsxImportSource vue */
9799
10481
 
9800
- const COMPONENT_NAME$1e = 'vc-scroller';
10482
+ const COMPONENT_NAME$1g = 'vc-scroller';
9801
10483
 
9802
10484
  /**
9803
10485
  * 作为备选方案,目前推荐使用ScrollerWheel
@@ -9808,7 +10490,7 @@ const COMPONENT_NAME$1e = 'vc-scroller';
9808
10490
  * 2. 增加了一层嵌套
9809
10491
  */
9810
10492
  const Scroller = /* @__PURE__ */ vue.defineComponent({
9811
- name: COMPONENT_NAME$1e,
10493
+ name: COMPONENT_NAME$1g,
9812
10494
  props: props$R,
9813
10495
  emits: ['scroll'],
9814
10496
  setup(props, {
@@ -9869,7 +10551,7 @@ const Scroller = /* @__PURE__ */ vue.defineComponent({
9869
10551
 
9870
10552
  /** @jsxImportSource vue */
9871
10553
 
9872
- const COMPONENT_NAME$1d = 'vc-scroller-wheel';
10554
+ const COMPONENT_NAME$1f = 'vc-scroller-wheel';
9873
10555
 
9874
10556
  /**
9875
10557
  * 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
@@ -9891,7 +10573,7 @@ const COMPONENT_NAME$1d = 'vc-scroller-wheel';
9891
10573
  * 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
9892
10574
  */
9893
10575
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
9894
- name: COMPONENT_NAME$1d,
10576
+ name: COMPONENT_NAME$1f,
9895
10577
  props: Object.assign({}, props$R, {
9896
10578
  stopPropagation: {
9897
10579
  type: Boolean,
@@ -10080,9 +10762,9 @@ const props$Q = {
10080
10762
 
10081
10763
  /** @jsxImportSource vue */
10082
10764
 
10083
- const COMPONENT_NAME$1c = 'vc-drawer';
10765
+ const COMPONENT_NAME$1e = 'vc-drawer';
10084
10766
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
10085
- name: COMPONENT_NAME$1c,
10767
+ name: COMPONENT_NAME$1e,
10086
10768
  props: props$Q,
10087
10769
  emits: ['close', 'update:modelValue', 'visible-change'],
10088
10770
  setup(props, {
@@ -10271,9 +10953,9 @@ const props$P = {
10271
10953
 
10272
10954
  /** @jsxImportSource vue */
10273
10955
 
10274
- const COMPONENT_NAME$1b = 'vc-dropdown';
10956
+ const COMPONENT_NAME$1d = 'vc-dropdown';
10275
10957
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
10276
- name: COMPONENT_NAME$1b,
10958
+ name: COMPONENT_NAME$1d,
10277
10959
  props: props$P,
10278
10960
  inheritAttrs: false,
10279
10961
  emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
@@ -10343,9 +11025,9 @@ const Dropdown = /* @__PURE__ */ vue.defineComponent({
10343
11025
 
10344
11026
  /** @jsxImportSource vue */
10345
11027
 
10346
- const COMPONENT_NAME$1a = 'vc-dropdown-menu';
11028
+ const COMPONENT_NAME$1c = 'vc-dropdown-menu';
10347
11029
  const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
10348
- name: COMPONENT_NAME$1a,
11030
+ name: COMPONENT_NAME$1c,
10349
11031
  setup(_, {
10350
11032
  slots
10351
11033
  }) {
@@ -10359,9 +11041,9 @@ const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
10359
11041
 
10360
11042
  /** @jsxImportSource vue */
10361
11043
 
10362
- const COMPONENT_NAME$19 = 'vc-dropdown-item';
11044
+ const COMPONENT_NAME$1b = 'vc-dropdown-item';
10363
11045
  const DropdownItem = /* @__PURE__ */ vue.defineComponent({
10364
- name: COMPONENT_NAME$19,
11046
+ name: COMPONENT_NAME$1b,
10365
11047
  emits: ['click'],
10366
11048
  props: {
10367
11049
  value: {
@@ -10566,9 +11248,9 @@ const defaults = {
10566
11248
 
10567
11249
  /** @jsxImportSource vue */
10568
11250
 
10569
- const COMPONENT_NAME$18 = 'vc-editor-toolbar';
11251
+ const COMPONENT_NAME$1a = 'vc-editor-toolbar';
10570
11252
  const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
10571
- name: COMPONENT_NAME$18,
11253
+ name: COMPONENT_NAME$1a,
10572
11254
  props: {
10573
11255
  options: [Array, Object],
10574
11256
  elementId: String
@@ -10776,9 +11458,9 @@ const props$O = {
10776
11458
 
10777
11459
  /** @jsxImportSource vue */
10778
11460
 
10779
- const COMPONENT_NAME$17 = 'vc-image-preview';
11461
+ const COMPONENT_NAME$19 = 'vc-image-preview';
10780
11462
  const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
10781
- name: COMPONENT_NAME$17,
11463
+ name: COMPONENT_NAME$19,
10782
11464
  props: props$O,
10783
11465
  setup(props, {
10784
11466
  slots
@@ -10973,9 +11655,9 @@ const props$N = {
10973
11655
  }
10974
11656
  };
10975
11657
 
10976
- const COMPONENT_NAME$16 = "vc-upload";
11658
+ const COMPONENT_NAME$18 = "vc-upload";
10977
11659
  const Upload$1 = vue.defineComponent({
10978
- name: COMPONENT_NAME$16,
11660
+ name: COMPONENT_NAME$18,
10979
11661
  props: props$N,
10980
11662
  emits: [
10981
11663
  "message",
@@ -11509,9 +12191,9 @@ const props$M = {
11509
12191
 
11510
12192
  /** @jsxImportSource vue */
11511
12193
 
11512
- const COMPONENT_NAME$15 = 'vc-editor';
12194
+ const COMPONENT_NAME$17 = 'vc-editor';
11513
12195
  const Editor = /* @__PURE__ */ vue.defineComponent({
11514
- name: COMPONENT_NAME$15,
12196
+ name: COMPONENT_NAME$17,
11515
12197
  props: props$M,
11516
12198
  defaults,
11517
12199
  emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
@@ -11700,7 +12382,7 @@ const Editor = /* @__PURE__ */ vue.defineComponent({
11700
12382
 
11701
12383
  /** @jsxImportSource vue */
11702
12384
 
11703
- const COMPONENT_NAME$14 = 'vc-editor-view';
12385
+ const COMPONENT_NAME$16 = 'vc-editor-view';
11704
12386
  const setImages = v => {
11705
12387
  if (!v) return;
11706
12388
  const IMG_REGX = /<img.*?(?:>|\/>)/gi;
@@ -11718,7 +12400,7 @@ const setImages = v => {
11718
12400
  return;
11719
12401
  };
11720
12402
  const EditorView = /* @__PURE__ */ vue.defineComponent({
11721
- name: COMPONENT_NAME$14,
12403
+ name: COMPONENT_NAME$16,
11722
12404
  props: {
11723
12405
  value: {
11724
12406
  type: String,
@@ -11933,9 +12615,9 @@ const useForm = (expose, options = {}) => {
11933
12615
  });
11934
12616
  };
11935
12617
 
11936
- const COMPONENT_NAME$13 = "vc-form";
12618
+ const COMPONENT_NAME$15 = "vc-form";
11937
12619
  const Form = vue.defineComponent({
11938
- name: COMPONENT_NAME$13,
12620
+ name: COMPONENT_NAME$15,
11939
12621
  props: props$L,
11940
12622
  setup(props, { slots, expose }) {
11941
12623
  useForm(expose);
@@ -12283,9 +12965,9 @@ const useFormItem = (expose) => {
12283
12965
 
12284
12966
  /** @jsxImportSource vue */
12285
12967
 
12286
- const COMPONENT_NAME$12 = 'vc-form-item';
12968
+ const COMPONENT_NAME$14 = 'vc-form-item';
12287
12969
  const FormItem = /* @__PURE__ */ vue.defineComponent({
12288
- name: COMPONENT_NAME$12,
12970
+ name: COMPONENT_NAME$14,
12289
12971
  props: props$K,
12290
12972
  setup(props, {
12291
12973
  slots,
@@ -12353,9 +13035,9 @@ const props$J = {
12353
13035
  }
12354
13036
  };
12355
13037
 
12356
- const COMPONENT_NAME$11 = "vcm-form";
13038
+ const COMPONENT_NAME$13 = "vcm-form";
12357
13039
  const MForm = vue.defineComponent({
12358
- name: COMPONENT_NAME$11,
13040
+ name: COMPONENT_NAME$13,
12359
13041
  props: props$J,
12360
13042
  setup(props, { slots, expose }) {
12361
13043
  useForm(expose, {
@@ -12386,9 +13068,9 @@ const props$I = {
12386
13068
 
12387
13069
  /** @jsxImportSource vue */
12388
13070
 
12389
- const COMPONENT_NAME$10 = 'vcm-form-item';
13071
+ const COMPONENT_NAME$12 = 'vcm-form-item';
12390
13072
  const MFormItem = /* @__PURE__ */ vue.defineComponent({
12391
- name: COMPONENT_NAME$10,
13073
+ name: COMPONENT_NAME$12,
12392
13074
  props: props$I,
12393
13075
  setup(props, {
12394
13076
  slots,
@@ -12443,9 +13125,9 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
12443
13125
  }
12444
13126
  });
12445
13127
 
12446
- const COMPONENT_NAME$$ = "vc-fragment";
13128
+ const COMPONENT_NAME$11 = "vc-fragment";
12447
13129
  const Fragment = vue.defineComponent({
12448
- name: COMPONENT_NAME$$,
13130
+ name: COMPONENT_NAME$11,
12449
13131
  setup(_, { slots }) {
12450
13132
  return () => vue.h(vue.Fragment, slots.default?.());
12451
13133
  }
@@ -12484,9 +13166,9 @@ const props$H = {
12484
13166
 
12485
13167
  /** @jsxImportSource vue */
12486
13168
 
12487
- const COMPONENT_NAME$_ = 'vc-snapshot';
13169
+ const COMPONENT_NAME$10 = 'vc-snapshot';
12488
13170
  const Snapshot = /* @__PURE__ */ vue.defineComponent({
12489
- name: COMPONENT_NAME$_,
13171
+ name: COMPONENT_NAME$10,
12490
13172
  props: props$H,
12491
13173
  emits: ['ready'],
12492
13174
  setup(props, {
@@ -12645,7 +13327,7 @@ const IMGStore$1 = new IMGStore();
12645
13327
 
12646
13328
  /** @jsxImportSource vue */
12647
13329
 
12648
- const COMPONENT_NAME$Z = 'vc-image';
13330
+ const COMPONENT_NAME$$ = 'vc-image';
12649
13331
  let isSupportObjectFit = false;
12650
13332
  window.addEventListener('DOMContentLoaded', () => {
12651
13333
  isSupportObjectFit = !vcShared.IS_SERVER && document.documentElement.style.objectFit !== undefined;
@@ -12658,7 +13340,7 @@ const ObjectFit = {
12658
13340
  SCALE_DOWN: 'scale-down'
12659
13341
  };
12660
13342
  const Image$1 = /* @__PURE__ */ vue.defineComponent({
12661
- name: COMPONENT_NAME$Z,
13343
+ name: COMPONENT_NAME$$,
12662
13344
  inheritAttrs: false,
12663
13345
  props: props$G,
12664
13346
  setup(props, {
@@ -12875,9 +13557,9 @@ const props$F = {
12875
13557
 
12876
13558
  /** @jsxImportSource vue */
12877
13559
 
12878
- const COMPONENT_NAME$Y = 'vc-image-crop';
13560
+ const COMPONENT_NAME$_ = 'vc-image-crop';
12879
13561
  const ImageCrop = /* @__PURE__ */ vue.defineComponent({
12880
- name: COMPONENT_NAME$Y,
13562
+ name: COMPONENT_NAME$_,
12881
13563
  props: props$F,
12882
13564
  setup(props, {
12883
13565
  slots
@@ -12903,9 +13585,9 @@ const props$E = {
12903
13585
 
12904
13586
  /** @jsxImportSource vue */
12905
13587
 
12906
- const COMPONENT_NAME$X = 'vc-image-processing';
13588
+ const COMPONENT_NAME$Z = 'vc-image-processing';
12907
13589
  const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
12908
- name: COMPONENT_NAME$X,
13590
+ name: COMPONENT_NAME$Z,
12909
13591
  props: props$E,
12910
13592
  setup(props, {
12911
13593
  slots
@@ -12922,9 +13604,9 @@ const MImageProcessing = ImageProcessing;
12922
13604
 
12923
13605
  /** @jsxImportSource vue */
12924
13606
 
12925
- const COMPONENT_NAME$W = 'vcm-input';
13607
+ const COMPONENT_NAME$Y = 'vcm-input';
12926
13608
  const MInput = /* @__PURE__ */ vue.defineComponent({
12927
- name: COMPONENT_NAME$W,
13609
+ name: COMPONENT_NAME$Y,
12928
13610
  inheritAttrs: false,
12929
13611
  props: {
12930
13612
  ...props$1h,
@@ -13013,9 +13695,9 @@ const MInput = /* @__PURE__ */ vue.defineComponent({
13013
13695
 
13014
13696
  /** @jsxImportSource vue */
13015
13697
 
13016
- const COMPONENT_NAME$V = 'vcm-input-number';
13698
+ const COMPONENT_NAME$X = 'vcm-input-number';
13017
13699
  const MInputNumber = /* @__PURE__ */ vue.defineComponent({
13018
- name: COMPONENT_NAME$V,
13700
+ name: COMPONENT_NAME$X,
13019
13701
  props: props$1g,
13020
13702
  inheritAttrs: false,
13021
13703
  setup(props, {
@@ -13064,9 +13746,9 @@ const MInputNumber = /* @__PURE__ */ vue.defineComponent({
13064
13746
 
13065
13747
  /** @jsxImportSource vue */
13066
13748
 
13067
- const COMPONENT_NAME$U = 'vcm-input-search';
13749
+ const COMPONENT_NAME$W = 'vcm-input-search';
13068
13750
  const MInputSearch = /* @__PURE__ */ vue.defineComponent({
13069
- name: COMPONENT_NAME$U,
13751
+ name: COMPONENT_NAME$W,
13070
13752
  props: {
13071
13753
  ...props$1f,
13072
13754
  cancelText: {
@@ -13143,9 +13825,9 @@ const props$D = {
13143
13825
  }
13144
13826
  };
13145
13827
 
13146
- const COMPONENT_NAME$T = "vcm-list";
13828
+ const COMPONENT_NAME$V = "vcm-list";
13147
13829
  const MList = vue.defineComponent({
13148
- name: COMPONENT_NAME$T,
13830
+ name: COMPONENT_NAME$V,
13149
13831
  props: props$D,
13150
13832
  setup(props, { slots }) {
13151
13833
  vue.provide("vc-list", { props });
@@ -13200,10 +13882,10 @@ const props$C = {
13200
13882
 
13201
13883
  /** @jsxImportSource vue */
13202
13884
 
13203
- const COMPONENT_NAME$S = 'vcm-list-item';
13885
+ const COMPONENT_NAME$U = 'vcm-list-item';
13204
13886
  const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
13205
13887
  const MListItem = /* @__PURE__ */ vue.defineComponent({
13206
- name: COMPONENT_NAME$S,
13888
+ name: COMPONENT_NAME$U,
13207
13889
  props: props$C,
13208
13890
  emits: ['click'],
13209
13891
  setup(props, {
@@ -13297,11 +13979,11 @@ const props$B = {
13297
13979
 
13298
13980
  /** @jsxImportSource vue */
13299
13981
 
13300
- const COMPONENT_NAME$R = 'vc-marquee';
13982
+ const COMPONENT_NAME$T = 'vc-marquee';
13301
13983
  const ANIMATION = $.prefixStyle('animation').camel;
13302
13984
  const TRANSFORM_KEBAB = $.prefixStyle('transform').kebab;
13303
13985
  const Marquee = /* @__PURE__ */ vue.defineComponent({
13304
- name: COMPONENT_NAME$R,
13986
+ name: COMPONENT_NAME$T,
13305
13987
  props: props$B,
13306
13988
  setup(props, {
13307
13989
  slots
@@ -13369,9 +14051,9 @@ const props$A = {
13369
14051
  }
13370
14052
  };
13371
14053
 
13372
- const COMPONENT_NAME$Q = "vc-resizer";
14054
+ const COMPONENT_NAME$S = "vc-resizer";
13373
14055
  const Resizer = vue.defineComponent({
13374
- name: COMPONENT_NAME$Q,
14056
+ name: COMPONENT_NAME$S,
13375
14057
  props: props$A,
13376
14058
  emits: ["resize"],
13377
14059
  setup(props, { emit, slots, expose }) {
@@ -13541,10 +14223,10 @@ const props$z = {
13541
14223
 
13542
14224
  /** @jsxImportSource vue */
13543
14225
 
13544
- const COMPONENT_NAME$P = 'vc-modal';
14226
+ const COMPONENT_NAME$R = 'vc-modal';
13545
14227
  let zIndexNumber = 1002;
13546
14228
  const ModalView = /* @__PURE__ */ vue.defineComponent({
13547
- name: COMPONENT_NAME$P,
14229
+ name: COMPONENT_NAME$R,
13548
14230
  emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
13549
14231
  props: props$z,
13550
14232
  setup(props, {
@@ -13983,9 +14665,9 @@ const props$y = {
13983
14665
 
13984
14666
  /** @jsxImportSource vue */
13985
14667
 
13986
- const COMPONENT_NAME$O = 'vc-modal';
14668
+ const COMPONENT_NAME$Q = 'vc-modal';
13987
14669
  const MModalView = /* @__PURE__ */ vue.defineComponent({
13988
- name: COMPONENT_NAME$O,
14670
+ name: COMPONENT_NAME$Q,
13989
14671
  emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
13990
14672
  props: props$y,
13991
14673
  setup(props, {
@@ -14197,9 +14879,9 @@ const props$x = {
14197
14879
 
14198
14880
  /** @jsxImportSource vue */
14199
14881
 
14200
- const COMPONENT_NAME$N = 'vc-notice';
14882
+ const COMPONENT_NAME$P = 'vc-notice';
14201
14883
  const NoticeView = /* @__PURE__ */ vue.defineComponent({
14202
- name: COMPONENT_NAME$N,
14884
+ name: COMPONENT_NAME$P,
14203
14885
  props: props$x,
14204
14886
  emits: ['portal-fulfilled', 'close', 'before-close'],
14205
14887
  setup(props, {
@@ -14372,9 +15054,9 @@ const props$w = {
14372
15054
 
14373
15055
  /** @jsxImportSource vue */
14374
15056
 
14375
- const COMPONENT_NAME$M = 'vc-option';
15057
+ const COMPONENT_NAME$O = 'vc-option';
14376
15058
  const Option$1 = /* @__PURE__ */ vue.defineComponent({
14377
- name: COMPONENT_NAME$M,
15059
+ name: COMPONENT_NAME$O,
14378
15060
  props: props$w,
14379
15061
  setup(props, {
14380
15062
  slots
@@ -14458,9 +15140,9 @@ const props$u = {
14458
15140
 
14459
15141
  /** @jsxImportSource vue */
14460
15142
 
14461
- const COMPONENT_NAME$L = 'vc-tag';
15143
+ const COMPONENT_NAME$N = 'vc-tag';
14462
15144
  const Tag = /* @__PURE__ */ vue.defineComponent({
14463
- name: COMPONENT_NAME$L,
15145
+ name: COMPONENT_NAME$N,
14464
15146
  props: props$u,
14465
15147
  emits: ['close', 'change'],
14466
15148
  setup(props, {
@@ -14531,9 +15213,9 @@ const props$t = {
14531
15213
 
14532
15214
  /** @jsxImportSource vue */
14533
15215
 
14534
- const COMPONENT_NAME$K = 'vc-select-option';
15216
+ const COMPONENT_NAME$M = 'vc-select-option';
14535
15217
  const Option = /* @__PURE__ */ vue.defineComponent({
14536
- name: COMPONENT_NAME$K,
15218
+ name: COMPONENT_NAME$M,
14537
15219
  props: props$t,
14538
15220
  setup(props, {
14539
15221
  slots,
@@ -14628,9 +15310,9 @@ const props$s = {
14628
15310
 
14629
15311
  /** @jsxImportSource vue */
14630
15312
 
14631
- const COMPONENT_NAME$J = 'vc-select-option-group';
15313
+ const COMPONENT_NAME$L = 'vc-select-option-group';
14632
15314
  const OptionGroup = /* @__PURE__ */ vue.defineComponent({
14633
- name: COMPONENT_NAME$J,
15315
+ name: COMPONENT_NAME$L,
14634
15316
  props: props$s,
14635
15317
  setup(props, {
14636
15318
  slots
@@ -14660,9 +15342,9 @@ const OptionGroup = /* @__PURE__ */ vue.defineComponent({
14660
15342
 
14661
15343
  /** @jsxImportSource vue */
14662
15344
 
14663
- const COMPONENT_NAME$I = 'vc-select-all';
15345
+ const COMPONENT_NAME$K = 'vc-select-all';
14664
15346
  const SelectAll = /* @__PURE__ */ vue.defineComponent({
14665
- name: COMPONENT_NAME$I,
15347
+ name: COMPONENT_NAME$K,
14666
15348
  props: {
14667
15349
  data: {
14668
15350
  type: Array,
@@ -14732,9 +15414,9 @@ const SelectAll = /* @__PURE__ */ vue.defineComponent({
14732
15414
 
14733
15415
  /** @jsxImportSource vue */
14734
15416
 
14735
- const COMPONENT_NAME$H = 'vc-select';
15417
+ const COMPONENT_NAME$J = 'vc-select';
14736
15418
  const Select = /* @__PURE__ */ vue.defineComponent({
14737
- name: COMPONENT_NAME$H,
15419
+ name: COMPONENT_NAME$J,
14738
15420
  props: props$1a,
14739
15421
  emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
14740
15422
  setup(props, {
@@ -15028,9 +15710,9 @@ const Select = /* @__PURE__ */ vue.defineComponent({
15028
15710
 
15029
15711
  /** @jsxImportSource vue */
15030
15712
 
15031
- const COMPONENT_NAME$G = 'vc-pagination';
15713
+ const COMPONENT_NAME$I = 'vc-pagination';
15032
15714
  const Pagination = /* @__PURE__ */ vue.defineComponent({
15033
- name: COMPONENT_NAME$G,
15715
+ name: COMPONENT_NAME$I,
15034
15716
  props: props$v,
15035
15717
  emits: ['update:current', 'change', 'page-size-change'],
15036
15718
  setup(props, {
@@ -15228,9 +15910,9 @@ const props$r = {
15228
15910
 
15229
15911
  /** @jsxImportSource vue */
15230
15912
 
15231
- const COMPONENT_NAME$F = 'vc-picker';
15913
+ const COMPONENT_NAME$H = 'vc-picker';
15232
15914
  const Picker = /* @__PURE__ */ vue.defineComponent({
15233
- name: COMPONENT_NAME$F,
15915
+ name: COMPONENT_NAME$H,
15234
15916
  props: props$r,
15235
15917
  setup(props, {
15236
15918
  slots
@@ -15293,9 +15975,9 @@ const props$q = {
15293
15975
 
15294
15976
  /** @jsxImportSource vue */
15295
15977
 
15296
- const COMPONENT_NAME$E = 'vc-popconfirm';
15978
+ const COMPONENT_NAME$G = 'vc-popconfirm';
15297
15979
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
15298
- name: COMPONENT_NAME$E,
15980
+ name: COMPONENT_NAME$G,
15299
15981
  props: props$q,
15300
15982
  inheritAttrs: false,
15301
15983
  emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
@@ -15463,9 +16145,9 @@ const props$p = {
15463
16145
 
15464
16146
  /** @jsxImportSource vue */
15465
16147
 
15466
- const COMPONENT_NAME$D = 'vc-popup';
16148
+ const COMPONENT_NAME$F = 'vc-popup';
15467
16149
  const MPopup = /* @__PURE__ */ vue.defineComponent({
15468
- name: COMPONENT_NAME$D,
16150
+ name: COMPONENT_NAME$F,
15469
16151
  props: props$p,
15470
16152
  emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change'],
15471
16153
  setup(props, {
@@ -15592,9 +16274,9 @@ const props$o = {
15592
16274
 
15593
16275
  /** @jsxImportSource vue */
15594
16276
 
15595
- const COMPONENT_NAME$C = 'vc-print';
16277
+ const COMPONENT_NAME$E = 'vc-print';
15596
16278
  const Print = /* @__PURE__ */ vue.defineComponent({
15597
- name: COMPONENT_NAME$C,
16279
+ name: COMPONENT_NAME$E,
15598
16280
  props: props$o,
15599
16281
  setup(props, {
15600
16282
  expose,
@@ -15674,7 +16356,7 @@ const props$n = {
15674
16356
  },
15675
16357
  strokeColor: {
15676
16358
  type: String,
15677
- default: "#2d8cf0"
16359
+ default: "#456CF6"
15678
16360
  },
15679
16361
  trackColor: {
15680
16362
  type: String,
@@ -15696,9 +16378,9 @@ const props$n = {
15696
16378
 
15697
16379
  /** @jsxImportSource vue */
15698
16380
 
15699
- const COMPONENT_NAME$B = 'vc-progress-circle';
16381
+ const COMPONENT_NAME$D = 'vc-progress-circle';
15700
16382
  const Circle = /* @__PURE__ */ vue.defineComponent({
15701
- name: COMPONENT_NAME$B,
16383
+ name: COMPONENT_NAME$D,
15702
16384
  props: props$n,
15703
16385
  setup(props, {
15704
16386
  slots
@@ -15758,9 +16440,9 @@ const Circle = /* @__PURE__ */ vue.defineComponent({
15758
16440
 
15759
16441
  /** @jsxImportSource vue */
15760
16442
 
15761
- const COMPONENT_NAME$A = 'vc-progress-line';
16443
+ const COMPONENT_NAME$C = 'vc-progress-line';
15762
16444
  const Line = /* @__PURE__ */ vue.defineComponent({
15763
- name: COMPONENT_NAME$A,
16445
+ name: COMPONENT_NAME$C,
15764
16446
  props: props$n,
15765
16447
  setup(props) {
15766
16448
  const colorStyle = vue.computed(() => {
@@ -15807,9 +16489,9 @@ const Line = /* @__PURE__ */ vue.defineComponent({
15807
16489
  function _isSlot(s) {
15808
16490
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
15809
16491
  }
15810
- const COMPONENT_NAME$z = 'vc-progress';
16492
+ const COMPONENT_NAME$B = 'vc-progress';
15811
16493
  const Progress = /* @__PURE__ */ vue.defineComponent({
15812
- name: COMPONENT_NAME$z,
16494
+ name: COMPONENT_NAME$B,
15813
16495
  props: props$n,
15814
16496
  setup(props, {
15815
16497
  slots
@@ -15971,9 +16653,9 @@ const useRadio = () => {
15971
16653
 
15972
16654
  /** @jsxImportSource vue */
15973
16655
 
15974
- const COMPONENT_NAME$y = 'vc-radio';
16656
+ const COMPONENT_NAME$A = 'vc-radio';
15975
16657
  const Radio = /* @__PURE__ */ vue.defineComponent({
15976
- name: COMPONENT_NAME$y,
16658
+ name: COMPONENT_NAME$A,
15977
16659
  props: props$m,
15978
16660
  emits: ['update:modelValue', 'change'],
15979
16661
  setup(props, {
@@ -16017,9 +16699,9 @@ const Radio = /* @__PURE__ */ vue.defineComponent({
16017
16699
 
16018
16700
  /** @jsxImportSource vue */
16019
16701
 
16020
- const COMPONENT_NAME$x = 'vc-radio-button';
16702
+ const COMPONENT_NAME$z = 'vc-radio-button';
16021
16703
  const RadioButton = /* @__PURE__ */ vue.defineComponent({
16022
- name: COMPONENT_NAME$x,
16704
+ name: COMPONENT_NAME$z,
16023
16705
  props: {
16024
16706
  ...props$m,
16025
16707
  labelStyle: [String, Object],
@@ -16132,9 +16814,9 @@ const useRadioGroup = () => {
16132
16814
 
16133
16815
  /** @jsxImportSource vue */
16134
16816
 
16135
- const COMPONENT_NAME$w = 'vc-radio-group';
16817
+ const COMPONENT_NAME$y = 'vc-radio-group';
16136
16818
  const RadioGroup = /* @__PURE__ */ vue.defineComponent({
16137
- name: COMPONENT_NAME$w,
16819
+ name: COMPONENT_NAME$y,
16138
16820
  props: props$l,
16139
16821
  emits: ['update:modelValue', 'change'],
16140
16822
  setup(props, {
@@ -16155,9 +16837,9 @@ const RadioGroup = /* @__PURE__ */ vue.defineComponent({
16155
16837
 
16156
16838
  /** @jsxImportSource vue */
16157
16839
 
16158
- const COMPONENT_NAME$v = 'vcm-radio';
16840
+ const COMPONENT_NAME$x = 'vcm-radio';
16159
16841
  const MRadio = /* @__PURE__ */ vue.defineComponent({
16160
- name: COMPONENT_NAME$v,
16842
+ name: COMPONENT_NAME$x,
16161
16843
  props: props$m,
16162
16844
  emits: ['update:modelValue', 'change'],
16163
16845
  setup(props, {
@@ -16201,9 +16883,9 @@ const MRadio = /* @__PURE__ */ vue.defineComponent({
16201
16883
 
16202
16884
  /** @jsxImportSource vue */
16203
16885
 
16204
- const COMPONENT_NAME$u = 'vcm-radio-group';
16886
+ const COMPONENT_NAME$w = 'vcm-radio-group';
16205
16887
  const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
16206
- name: COMPONENT_NAME$u,
16888
+ name: COMPONENT_NAME$w,
16207
16889
  props: props$l,
16208
16890
  emits: ['update:modelValue', 'change'],
16209
16891
  setup(props, {
@@ -16270,9 +16952,9 @@ const props$k = {
16270
16952
 
16271
16953
  /** @jsxImportSource vue */
16272
16954
 
16273
- const COMPONENT_NAME$t = 'vc-rate';
16955
+ const COMPONENT_NAME$v = 'vc-rate';
16274
16956
  const Rate = /* @__PURE__ */ vue.defineComponent({
16275
- name: COMPONENT_NAME$t,
16957
+ name: COMPONENT_NAME$v,
16276
16958
  props: props$k,
16277
16959
  emits: ['update:modelValue', 'change'],
16278
16960
  setup(props, {
@@ -16474,9 +17156,9 @@ const props$j = {
16474
17156
 
16475
17157
  /** @jsxImportSource vue */
16476
17158
 
16477
- const COMPONENT_NAME$s = 'vc-recycle-list-scroll-state';
17159
+ const COMPONENT_NAME$u = 'vc-recycle-list-scroll-state';
16478
17160
  const ScrollState = /* @__PURE__ */ vue.defineComponent({
16479
- name: COMPONENT_NAME$s,
17161
+ name: COMPONENT_NAME$u,
16480
17162
  setup(_, {
16481
17163
  slots
16482
17164
  }) {
@@ -16606,12 +17288,12 @@ const useDirectionKeys = () => {
16606
17288
 
16607
17289
  /** @jsxImportSource vue */
16608
17290
 
16609
- const COMPONENT_NAME$r = 'vc-recycle-list-container';
17291
+ const COMPONENT_NAME$t = 'vc-recycle-list-container';
16610
17292
 
16611
17293
  // TODO: 抽离
16612
17294
  const transformKey = $__namespace.prefixStyle('transform').camel;
16613
17295
  const Container = /* @__PURE__ */ vue.defineComponent({
16614
- name: COMPONENT_NAME$r,
17296
+ name: COMPONENT_NAME$t,
16615
17297
  props: props$i,
16616
17298
  emits: ['refresh'],
16617
17299
  setup(props, {
@@ -16709,9 +17391,9 @@ const Container = /* @__PURE__ */ vue.defineComponent({
16709
17391
 
16710
17392
  /** @jsxImportSource vue */
16711
17393
 
16712
- const COMPONENT_NAME$q = 'vc-recycle-list';
17394
+ const COMPONENT_NAME$s = 'vc-recycle-list';
16713
17395
  const RecycleList = /* @__PURE__ */ vue.defineComponent({
16714
- name: COMPONENT_NAME$q,
17396
+ name: COMPONENT_NAME$s,
16715
17397
  props: props$j,
16716
17398
  emits: ['scroll', 'row-resize'],
16717
17399
  setup(props, {
@@ -17285,9 +17967,9 @@ const props$h = {
17285
17967
 
17286
17968
  /** @jsxImportSource vue */
17287
17969
 
17288
- const COMPONENT_NAME$p = 'vc-slider';
17970
+ const COMPONENT_NAME$r = 'vc-slider';
17289
17971
  const Slider = /* @__PURE__ */ vue.defineComponent({
17290
- name: COMPONENT_NAME$p,
17972
+ name: COMPONENT_NAME$r,
17291
17973
  props: props$h,
17292
17974
  setup(props, {
17293
17975
  slots
@@ -17311,9 +17993,9 @@ const props$g = {
17311
17993
 
17312
17994
  /** @jsxImportSource vue */
17313
17995
 
17314
- const COMPONENT_NAME$o = 'vc-sort-list';
17996
+ const COMPONENT_NAME$q = 'vc-sort-list';
17315
17997
  const SortList = /* @__PURE__ */ vue.defineComponent({
17316
- name: COMPONENT_NAME$o,
17998
+ name: COMPONENT_NAME$q,
17317
17999
  props: props$g,
17318
18000
  setup(props, {
17319
18001
  slots
@@ -17337,9 +18019,9 @@ const props$f = {
17337
18019
 
17338
18020
  /** @jsxImportSource vue */
17339
18021
 
17340
- const COMPONENT_NAME$n = 'vc-steps';
18022
+ const COMPONENT_NAME$p = 'vc-steps';
17341
18023
  const Steps = /* @__PURE__ */ vue.defineComponent({
17342
- name: COMPONENT_NAME$n,
18024
+ name: COMPONENT_NAME$p,
17343
18025
  props: props$f,
17344
18026
  setup(props, {
17345
18027
  slots
@@ -17465,9 +18147,9 @@ const useSwitch = (expose) => {
17465
18147
 
17466
18148
  /** @jsxImportSource vue */
17467
18149
 
17468
- const COMPONENT_NAME$m = 'vc-switch';
18150
+ const COMPONENT_NAME$o = 'vc-switch';
17469
18151
  const Switch = /* @__PURE__ */ vue.defineComponent({
17470
- name: COMPONENT_NAME$m,
18152
+ name: COMPONENT_NAME$o,
17471
18153
  props: props$e,
17472
18154
  // click -> onClick要被拦截,此处不能放置
17473
18155
  emits: ['update:modelValue', 'change', 'click'],
@@ -17541,9 +18223,9 @@ const Switch = /* @__PURE__ */ vue.defineComponent({
17541
18223
 
17542
18224
  /** @jsxImportSource vue */
17543
18225
 
17544
- const COMPONENT_NAME$l = 'vcm-switch';
18226
+ const COMPONENT_NAME$n = 'vcm-switch';
17545
18227
  const MSwitch = /* @__PURE__ */ vue.defineComponent({
17546
- name: COMPONENT_NAME$l,
18228
+ name: COMPONENT_NAME$n,
17547
18229
  props: props$e,
17548
18230
  // click -> onClick要被拦截,此处不能放置
17549
18231
  emits: ['update:modelValue', 'change', 'click'],
@@ -18656,9 +19338,9 @@ const useStates = (mapper, $store) => {
18656
19338
 
18657
19339
  /** @jsxImportSource vue */
18658
19340
 
18659
- const COMPONENT_NAME$k = 'vc-table-normal-list';
19341
+ const COMPONENT_NAME$m = 'vc-table-normal-list';
18660
19342
  const NormalList = /* @__PURE__ */ vue.defineComponent({
18661
- name: COMPONENT_NAME$k,
19343
+ name: COMPONENT_NAME$m,
18662
19344
  props: {
18663
19345
  data: {
18664
19346
  type: Array,
@@ -19659,9 +20341,9 @@ const props$d = {
19659
20341
 
19660
20342
  /** @jsxImportSource vue */
19661
20343
 
19662
- const COMPONENT_NAME$j = 'vc-table';
20344
+ const COMPONENT_NAME$l = 'vc-table';
19663
20345
  const Table = /* @__PURE__ */ vue.defineComponent({
19664
- name: COMPONENT_NAME$j,
20346
+ name: COMPONENT_NAME$l,
19665
20347
  props: props$d,
19666
20348
  emits: ['select', 'select-all', 'selection-change', 'cell-mouse-enter', 'cell-mouse-leave', 'cell-click', 'cell-dblclick', 'row-click', 'row-contextmenu', 'row-dblclick', 'header-click', 'header-contextmenu', 'current-change', 'header-dragend', 'expand-change', 'sort-change', 'update:sort'],
19667
20349
  setup(props, {
@@ -20864,9 +21546,9 @@ const useTabs = (options = {}) => {
20864
21546
 
20865
21547
  /** @jsxImportSource vue */
20866
21548
 
20867
- const COMPONENT_NAME$i = 'vc-tabs';
21549
+ const COMPONENT_NAME$k = 'vc-tabs';
20868
21550
  const Tabs = /* @__PURE__ */ vue.defineComponent({
20869
- name: COMPONENT_NAME$i,
21551
+ name: COMPONENT_NAME$k,
20870
21552
  props: props$c,
20871
21553
  emits: ['update:modelValue', 'change', 'click'],
20872
21554
  setup(props, {
@@ -21119,9 +21801,9 @@ const useTabsPane = () => {
21119
21801
 
21120
21802
  /** @jsxImportSource vue */
21121
21803
 
21122
- const COMPONENT_NAME$h = 'vc-tabs-pane';
21804
+ const COMPONENT_NAME$j = 'vc-tabs-pane';
21123
21805
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
21124
- name: COMPONENT_NAME$h,
21806
+ name: COMPONENT_NAME$j,
21125
21807
  props: props$b,
21126
21808
  setup(_, {
21127
21809
  slots
@@ -21176,9 +21858,9 @@ const props$a = {
21176
21858
 
21177
21859
  /** @jsxImportSource vue */
21178
21860
 
21179
- const COMPONENT_NAME$g = 'vcm-tabs';
21861
+ const COMPONENT_NAME$i = 'vcm-tabs';
21180
21862
  const MTabs = /* @__PURE__ */ vue.defineComponent({
21181
- name: COMPONENT_NAME$g,
21863
+ name: COMPONENT_NAME$i,
21182
21864
  props: props$a,
21183
21865
  emits: ['update:modelValue', 'change', 'click'],
21184
21866
  setup(props, {
@@ -21443,9 +22125,9 @@ const MTabs = /* @__PURE__ */ vue.defineComponent({
21443
22125
 
21444
22126
  /** @jsxImportSource vue */
21445
22127
 
21446
- const COMPONENT_NAME$f = 'vcm-tabs-pane';
22128
+ const COMPONENT_NAME$h = 'vcm-tabs-pane';
21447
22129
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
21448
- name: COMPONENT_NAME$f,
22130
+ name: COMPONENT_NAME$h,
21449
22131
  props: props$b,
21450
22132
  setup(_, {
21451
22133
  slots
@@ -21509,9 +22191,9 @@ const props$9 = {
21509
22191
 
21510
22192
  /** @jsxImportSource vue */
21511
22193
 
21512
- const COMPONENT_NAME$e = 'vc-text';
22194
+ const COMPONENT_NAME$g = 'vc-text';
21513
22195
  const Text = /* @__PURE__ */ vue.defineComponent({
21514
- name: COMPONENT_NAME$e,
22196
+ name: COMPONENT_NAME$g,
21515
22197
  props: props$9,
21516
22198
  setup(props, {
21517
22199
  emit
@@ -21878,9 +22560,9 @@ const props$8 = {
21878
22560
 
21879
22561
  /** @jsxImportSource vue */
21880
22562
 
21881
- const COMPONENT_NAME$d = 'vc-textarea';
22563
+ const COMPONENT_NAME$f = 'vc-textarea';
21882
22564
  const Textarea = /* @__PURE__ */ vue.defineComponent({
21883
- name: COMPONENT_NAME$d,
22565
+ name: COMPONENT_NAME$f,
21884
22566
  props: Object.assign({}, props$8, {
21885
22567
  indicator: {
21886
22568
  type: [Boolean, Object],
@@ -21936,9 +22618,9 @@ const Textarea = /* @__PURE__ */ vue.defineComponent({
21936
22618
 
21937
22619
  /** @jsxImportSource vue */
21938
22620
 
21939
- const COMPONENT_NAME$c = 'vcm-textarea';
22621
+ const COMPONENT_NAME$e = 'vcm-textarea';
21940
22622
  const MTextarea = /* @__PURE__ */ vue.defineComponent({
21941
- name: COMPONENT_NAME$c,
22623
+ name: COMPONENT_NAME$e,
21942
22624
  props: Object.assign({}, props$8, {
21943
22625
  align: {
21944
22626
  type: String,
@@ -22021,9 +22703,9 @@ const props$7 = {
22021
22703
  }
22022
22704
  };
22023
22705
 
22024
- const COMPONENT_NAME$b = "vc-theme";
22706
+ const COMPONENT_NAME$d = "vc-theme";
22025
22707
  const Theme = vue.defineComponent({
22026
- name: COMPONENT_NAME$b,
22708
+ name: COMPONENT_NAME$d,
22027
22709
  props: props$7,
22028
22710
  setup(props, { slots }) {
22029
22711
  const themeId = Utils__namespace.getUid("vc-theme");
@@ -22106,9 +22788,9 @@ const Theme = vue.defineComponent({
22106
22788
  }
22107
22789
  });
22108
22790
 
22109
- const COMPONENT_NAME$a = "vc-theme-view";
22791
+ const COMPONENT_NAME$c = "vc-theme-view";
22110
22792
  const ThemeView = vue.defineComponent({
22111
- name: COMPONENT_NAME$a,
22793
+ name: COMPONENT_NAME$c,
22112
22794
  props: props$7,
22113
22795
  setup(props, { slots }) {
22114
22796
  return () => {
@@ -22124,9 +22806,9 @@ const ThemeView = vue.defineComponent({
22124
22806
  }
22125
22807
  });
22126
22808
 
22127
- const COMPONENT_NAME$9 = "vc-theme-text";
22809
+ const COMPONENT_NAME$b = "vc-theme-text";
22128
22810
  const ThemeText = vue.defineComponent({
22129
- name: COMPONENT_NAME$9,
22811
+ name: COMPONENT_NAME$b,
22130
22812
  props: props$7,
22131
22813
  setup(props, { slots }) {
22132
22814
  return () => {
@@ -22142,9 +22824,9 @@ const ThemeText = vue.defineComponent({
22142
22824
  }
22143
22825
  });
22144
22826
 
22145
- const COMPONENT_NAME$8 = "vc-theme-image";
22827
+ const COMPONENT_NAME$a = "vc-theme-image";
22146
22828
  const ThemeImage = vue.defineComponent({
22147
- name: COMPONENT_NAME$8,
22829
+ name: COMPONENT_NAME$a,
22148
22830
  props: props$7,
22149
22831
  setup(props, { slots }) {
22150
22832
  return () => {
@@ -22196,12 +22878,12 @@ const props$6 = {
22196
22878
 
22197
22879
  /** @jsxImportSource vue */
22198
22880
 
22199
- const COMPONENT_NAME$7 = 'vc-time-picker';
22881
+ const COMPONENT_NAME$9 = 'vc-time-picker';
22200
22882
  const getPanel = type => {
22201
22883
  const isRange = type === 'timerange';
22202
22884
  return isRange ? TimeRangePanel : TimePanel;
22203
22885
  };
22204
- const TimePicker = createPicker(COMPONENT_NAME$7, props$6, () => {
22886
+ const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
22205
22887
  const props = vue.getCurrentInstance().props;
22206
22888
  const icon = vue.ref('icon');
22207
22889
  const panel = vue.shallowRef({});
@@ -22237,9 +22919,9 @@ const props$5 = {
22237
22919
 
22238
22920
  /** @jsxImportSource vue */
22239
22921
 
22240
- const COMPONENT_NAME$6 = 'vc-timeline';
22922
+ const COMPONENT_NAME$8 = 'vc-timeline';
22241
22923
  const Timeline = /* @__PURE__ */ vue.defineComponent({
22242
- name: COMPONENT_NAME$6,
22924
+ name: COMPONENT_NAME$8,
22243
22925
  props: props$5,
22244
22926
  setup(props, {
22245
22927
  slots
@@ -22266,9 +22948,9 @@ const props$4 = {
22266
22948
 
22267
22949
  /** @jsxImportSource vue */
22268
22950
 
22269
- const COMPONENT_NAME$5 = 'vc-touch';
22951
+ const COMPONENT_NAME$7 = 'vc-touch';
22270
22952
  const Touch = /* @__PURE__ */ vue.defineComponent({
22271
- name: COMPONENT_NAME$5,
22953
+ name: COMPONENT_NAME$7,
22272
22954
  props: props$4,
22273
22955
  setup(props, {
22274
22956
  slots
@@ -22776,21 +23458,68 @@ class TreeStore {
22776
23458
  parentNode.insertChild({ data });
22777
23459
  }
22778
23460
  }
23461
+ /**
23462
+ * 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
23463
+ * 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
23464
+ * @param checkedValues ~
23465
+ * @returns ~
23466
+ */
23467
+ _getCascadeCheckedAnchorIds(checkedValues) {
23468
+ const checkedSet = new Set(checkedValues);
23469
+ const nodesMap = this.nodesMap;
23470
+ const anchors = [];
23471
+ for (const id of checkedValues) {
23472
+ const node = nodesMap[id];
23473
+ if (!node) continue;
23474
+ const hasSelectedChildInSet = node.childNodes.some(
23475
+ (child) => checkedSet.has(child.getter.value)
23476
+ );
23477
+ if (!hasSelectedChildInSet) {
23478
+ anchors.push(id);
23479
+ }
23480
+ }
23481
+ anchors.sort((a, b) => {
23482
+ const na = nodesMap[a];
23483
+ const nb = nodesMap[b];
23484
+ if (!na || !nb) return 0;
23485
+ return nb.states.level - na.states.level;
23486
+ });
23487
+ return anchors;
23488
+ }
22779
23489
  _initDefaultCheckedNodes() {
22780
23490
  const checkedValues = this.checkedValues || [];
22781
23491
  const nodesMap = this.nodesMap;
22782
- checkedValues.forEach((id) => {
23492
+ if (this.checkStrictly) {
23493
+ checkedValues.forEach((id) => {
23494
+ const node = nodesMap[id];
23495
+ if (node) {
23496
+ node.setChecked(true, false);
23497
+ }
23498
+ });
23499
+ return;
23500
+ }
23501
+ const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
23502
+ anchorIds.forEach((id) => {
22783
23503
  const node = nodesMap[id];
22784
23504
  if (node) {
22785
- node.setChecked(true, !this.checkStrictly);
23505
+ node.setChecked(true, true);
22786
23506
  }
22787
23507
  });
22788
23508
  }
22789
23509
  _initDefaultCheckedNode(node) {
22790
23510
  const checkedValues = this.checkedValues || [];
22791
23511
  const nodeValue = node.getter.value;
22792
- if (checkedValues.indexOf(nodeValue) !== -1) {
22793
- node.setChecked(true, !this.checkStrictly);
23512
+ if (checkedValues.indexOf(nodeValue) === -1) return;
23513
+ if (this.checkStrictly) {
23514
+ node.setChecked(true, false);
23515
+ return;
23516
+ }
23517
+ const checkedSet = new Set(checkedValues);
23518
+ const hasSelectedChildInSet = node.childNodes.some(
23519
+ (child) => checkedSet.has(child.getter.value)
23520
+ );
23521
+ if (!hasSelectedChildInSet) {
23522
+ node.setChecked(true, true);
22794
23523
  }
22795
23524
  }
22796
23525
  setCheckedValues(newVal) {
@@ -23018,9 +23747,9 @@ const props$3 = {
23018
23747
 
23019
23748
  /** @jsxImportSource vue */
23020
23749
 
23021
- const COMPONENT_NAME$4 = 'vc-tree-node';
23750
+ const COMPONENT_NAME$6 = 'vc-tree-node';
23022
23751
  const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
23023
- name: COMPONENT_NAME$4,
23752
+ name: COMPONENT_NAME$6,
23024
23753
  props: props$3,
23025
23754
  emits: ['node-expand'],
23026
23755
  setup(props, {
@@ -23519,9 +24248,9 @@ const props$2 = {
23519
24248
 
23520
24249
  /** @jsxImportSource vue */
23521
24250
 
23522
- const COMPONENT_NAME$3 = 'vc-tree';
24251
+ const COMPONENT_NAME$5 = 'vc-tree';
23523
24252
  const Tree = /* @__PURE__ */ vue.defineComponent({
23524
- name: COMPONENT_NAME$3,
24253
+ name: COMPONENT_NAME$5,
23525
24254
  props: props$2,
23526
24255
  emits: ['update:modelValue', 'change', 'check-change', 'current-change', 'node-click', 'node-contextmenu', 'node-collapse', 'node-expand', 'check', 'node-drag-start', 'node-drag-end', 'node-drop', 'node-drag-leave', 'node-drag-enter', 'node-drag-over'],
23527
24256
  setup(props, {
@@ -23716,6 +24445,225 @@ const Tree = /* @__PURE__ */ vue.defineComponent({
23716
24445
  }
23717
24446
  });
23718
24447
 
24448
+ /** @jsxImportSource vue */
24449
+
24450
+ const COMPONENT_NAME$4 = 'vc-tree-select-content';
24451
+ const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
24452
+ name: COMPONENT_NAME$4,
24453
+ props: {
24454
+ value: {
24455
+ type: Array,
24456
+ required: true
24457
+ },
24458
+ data: {
24459
+ type: Array,
24460
+ default: () => []
24461
+ },
24462
+ checkStrictly: {
24463
+ type: Boolean,
24464
+ default: false
24465
+ },
24466
+ renderNodeLabel: Function
24467
+ },
24468
+ emits: ['change'],
24469
+ setup(props, {
24470
+ emit
24471
+ }) {
24472
+ return () => {
24473
+ return vue.createVNode(Scroller, {
24474
+ "class": "vc-tree-select__options",
24475
+ "max-height": "200px"
24476
+ }, {
24477
+ default: () => [vue.createVNode(Tree, {
24478
+ "model-value": props.value,
24479
+ "expanded-values": props.value,
24480
+ "data": props.data,
24481
+ "checkStrictly": props.checkStrictly,
24482
+ "allowDispatch": false,
24483
+ "showCheckbox": true,
24484
+ "renderNodeLabel": props.renderNodeLabel,
24485
+ "onChange": (_, data) => emit('change', _, data)
24486
+ }, null)]
24487
+ });
24488
+ };
24489
+ }
24490
+ });
24491
+
24492
+ /** @jsxImportSource vue */
24493
+
24494
+ const COMPONENT_NAME$3 = 'vc-tree-select-content-cascader';
24495
+ const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
24496
+ name: COMPONENT_NAME$3,
24497
+ props: {
24498
+ value: {
24499
+ type: Array,
24500
+ required: true
24501
+ },
24502
+ data: {
24503
+ type: Array,
24504
+ default: () => []
24505
+ },
24506
+ checkStrictly: {
24507
+ type: Boolean,
24508
+ default: false
24509
+ },
24510
+ renderNodeLabel: Function,
24511
+ numerable: {
24512
+ type: Boolean,
24513
+ default: false
24514
+ },
24515
+ separator: {
24516
+ type: String,
24517
+ default: ','
24518
+ },
24519
+ max: {
24520
+ type: Number,
24521
+ default: 1
24522
+ },
24523
+ nullValue: {
24524
+ type: [Number, String, Object],
24525
+ default: void 0
24526
+ }
24527
+ },
24528
+ emits: ['change'],
24529
+ setup(props, {
24530
+ emit
24531
+ }) {
24532
+ const treeRef = vue.ref(null);
24533
+ /** hover 展开路径,与 Cascader 一致 */
24534
+ const currentValue = vue.ref([]);
24535
+ const rebuildData = vue.computed(() => {
24536
+ if (!props.data.length) return [];
24537
+ let temp = props.data;
24538
+ const data = [];
24539
+ currentValue.value.forEach(cur => {
24540
+ const col = temp;
24541
+ data.push(col);
24542
+ const next = (temp.find(i => i.value == cur) || {}).children || [];
24543
+ temp = next;
24544
+ });
24545
+ data.push(temp);
24546
+ return data;
24547
+ });
24548
+ /** 驱动列区在 TreeStore 更新后重绘 */
24549
+ const panelTick = vue.ref(0);
24550
+ const columns = vue.computed(() => Array.from({
24551
+ length: currentValue.value.length + 1
24552
+ }).map((_, index) => index));
24553
+ const handleHover = (value, columnIndex) => {
24554
+ const len = currentValue.value.length - columnIndex;
24555
+ currentValue.value.splice(columnIndex, len, value);
24556
+ };
24557
+ const sync = async () => {
24558
+ await vue.nextTick();
24559
+ const tree = treeRef.value;
24560
+ if (!tree) return;
24561
+ const data = {
24562
+ checkedNodes: tree.getCheckedNodes(),
24563
+ checkedValues: tree.getCheckedValues(),
24564
+ halfCheckedNodes: tree.getHalfCheckedNodes(),
24565
+ halfCheckedValues: tree.getHalfCheckedValues()
24566
+ };
24567
+ panelTick.value++;
24568
+ emit('change', null, data);
24569
+ };
24570
+ const getNodeState = item => {
24571
+ const tree = treeRef.value;
24572
+ if (!tree) {
24573
+ return {
24574
+ checked: false,
24575
+ indeterminate: false
24576
+ };
24577
+ }
24578
+ const node = tree.getNode(item);
24579
+ if (!node) {
24580
+ return {
24581
+ checked: false,
24582
+ indeterminate: false
24583
+ };
24584
+ }
24585
+ return {
24586
+ checked: !!node.states.checked,
24587
+ indeterminate: !!node.states.indeterminate
24588
+ };
24589
+ };
24590
+ const hasChildren = item => {
24591
+ return !!(item.children && item.children.length > 0);
24592
+ };
24593
+ const handleCheckboxChange = async (v, item) => {
24594
+ const tree = treeRef.value;
24595
+ if (!tree) return;
24596
+ tree.setChecked(item, v, !props.checkStrictly);
24597
+ sync();
24598
+ };
24599
+ const handleLabelClick = (v, item) => {
24600
+ const tree = treeRef.value;
24601
+ if (!tree) return;
24602
+ tree.setChecked(item, v, !props.checkStrictly);
24603
+ sync();
24604
+ };
24605
+ return () => {
24606
+ return vue.createVNode("div", {
24607
+ "class": "vc-tree-select__cascader"
24608
+ }, [vue.createVNode(Tree, {
24609
+ "ref": treeRef,
24610
+ "class": "vc-tree-select__cascader-tree-hidden",
24611
+ "model-value": props.value,
24612
+ "expanded-values": props.value,
24613
+ "data": props.data,
24614
+ "checkStrictly": props.checkStrictly,
24615
+ "allowDispatch": false,
24616
+ "showCheckbox": true,
24617
+ "renderNodeLabel": props.renderNodeLabel,
24618
+ "numerable": props.numerable,
24619
+ "separator": props.separator,
24620
+ "max": props.max,
24621
+ "nullValue": props.nullValue
24622
+ }, null), vue.createVNode("div", {
24623
+ "class": "vc-tree-select__cascader-columns"
24624
+ }, [columns.value.map(columnIndex => {
24625
+ const col = rebuildData.value[columnIndex];
24626
+ if (!col || !col.length) return null;
24627
+ return vue.createVNode("div", {
24628
+ "class": "vc-tree-select__cascader-column",
24629
+ "key": columnIndex
24630
+ }, [vue.createVNode("div", {
24631
+ "class": "vc-tree-select__cascader-column-wrapper"
24632
+ }, [col.map(item => {
24633
+ const state = getNodeState(item);
24634
+ const isSelect = currentValue.value[columnIndex] === item.value;
24635
+ const child = hasChildren(item);
24636
+ return vue.createVNode("div", {
24637
+ "key": item.value,
24638
+ "class": ['vc-tree-select__cascader-item', {
24639
+ 'is-select': isSelect
24640
+ }],
24641
+ "onMouseenter": () => handleHover(item.value, columnIndex),
24642
+ "onClick": () => handleLabelClick(!state.checked, item)
24643
+ }, [vue.createVNode("span", {
24644
+ "class": "vc-tree-select__cascader-checkbox",
24645
+ "onClick": e => e.stopPropagation()
24646
+ }, [vue.createVNode(Checkbox, {
24647
+ "modelValue": state.checked,
24648
+ "indeterminate": state.indeterminate,
24649
+ "disabled": !!item.disabled,
24650
+ "onChange": v => handleCheckboxChange(v, item)
24651
+ }, null)]), vue.createVNode("span", {
24652
+ "class": "vc-tree-select__cascader-label"
24653
+ }, [props.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
24654
+ "render": props.renderNodeLabel,
24655
+ "store": treeRef.value.getNode(item),
24656
+ "row": item
24657
+ }, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
24658
+ "type": "right",
24659
+ "class": "vc-tree-select__cascader-icon"
24660
+ }, null) : null]);
24661
+ })])]);
24662
+ })])]);
24663
+ };
24664
+ }
24665
+ });
24666
+
23719
24667
  const treeKeys = [
23720
24668
  "checkStrictly",
23721
24669
  "data",
@@ -23724,7 +24672,18 @@ const treeKeys = [
23724
24672
  ];
23725
24673
  const props$1 = {
23726
24674
  ...props$1a,
23727
- ...lodashEs.pick(props$2, treeKeys)
24675
+ ...lodashEs.pick(props$2, treeKeys),
24676
+ autoWidth: {
24677
+ type: Boolean,
24678
+ default: void 0
24679
+ },
24680
+ /**
24681
+ * 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
24682
+ */
24683
+ cascader: {
24684
+ type: Boolean,
24685
+ default: false
24686
+ }
23728
24687
  };
23729
24688
 
23730
24689
  /** @jsxImportSource vue */
@@ -23750,12 +24709,37 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
23750
24709
  const searchValue = vue.ref('');
23751
24710
  const searchRegex = vue.ref(new RegExp(''));
23752
24711
  const currentValue = vue.ref([]);
24712
+ const currentValueGroups = vue.computed(() => {
24713
+ if (props.checkStrictly) return;
24714
+ if (!props.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
24715
+ return [];
24716
+ }
24717
+ const pathMap = new Map();
24718
+ const traverse = (data, path = []) => {
24719
+ data.forEach(item => {
24720
+ const v = item.value;
24721
+ if (v == null) return;
24722
+ const fullPath = [...path, v];
24723
+ pathMap.set(v, fullPath);
24724
+ if (item.children?.length) traverse(item.children, fullPath);
24725
+ });
24726
+ };
24727
+ traverse(props.data);
24728
+ const allPaths = currentValue.value.map(v => pathMap.get(v)).filter(Boolean);
24729
+ return allPaths.filter(path => !allPaths.some(other => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
24730
+ });
23753
24731
  const source = vue.computed(() => {
23754
24732
  return flattenData$1(props.data, {
23755
24733
  parent: true,
23756
24734
  cascader: true
23757
24735
  });
23758
24736
  });
24737
+ const labelMap = vue.computed(() => {
24738
+ return source.value.reduce((pre, cur) => {
24739
+ pre[cur.value] = cur.label || '';
24740
+ return pre;
24741
+ }, {});
24742
+ });
23759
24743
  const icon = vue.computed(() => {
23760
24744
  return isActive.value ? 'up' : 'down';
23761
24745
  });
@@ -23772,17 +24756,34 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
23772
24756
  'is-disabled': props.disabled
23773
24757
  };
23774
24758
  });
23775
- const currentLabel = vue.computed(() => {
24759
+ const displayTags = vue.computed(() => {
23776
24760
  if (!props.data.length) {
23777
24761
  return [];
23778
24762
  }
23779
- return currentValue.value.map(getLabel.bind(null, source.value));
24763
+ if (props.checkStrictly) {
24764
+ return currentValue.value.map(v => ({
24765
+ value: v,
24766
+ label: labelMap.value[v] || ''
24767
+ }));
24768
+ }
24769
+ return (currentValueGroups.value || []).map(path => {
24770
+ const value = path[path.length - 1];
24771
+ const label = path.map(v => labelMap.value[v] || '').filter(Boolean).join(' / ');
24772
+ return {
24773
+ path,
24774
+ value,
24775
+ label
24776
+ };
24777
+ });
23780
24778
  });
23781
24779
  const collapseTagCount = vue.computed(() => {
23782
24780
  if (!props.maxTags) return 0;
23783
- const v = currentValue.value.length - props.maxTags;
24781
+ const v = displayTags.value.length - props.maxTags;
23784
24782
  return v < 0 ? 0 : v;
23785
24783
  });
24784
+ const autoWidth = vue.computed(() => {
24785
+ return typeof props.autoWidth === 'boolean' ? props.autoWidth : !!props.cascader;
24786
+ });
23786
24787
 
23787
24788
  /**
23788
24789
  * v-model 同步, 外部的数据改变时不会触发
@@ -23795,8 +24796,9 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
23795
24796
  separator: props.separator,
23796
24797
  nullValue: props.nullValue
23797
24798
  });
23798
- emit('update:modelValue', v, currentLabel.value);
23799
- emit('change', v, currentLabel.value);
24799
+ const labels = displayTags.value.map(item => item.label);
24800
+ emit('update:modelValue', v, labels);
24801
+ emit('change', v, labels);
23800
24802
 
23801
24803
  // form表单
23802
24804
  formItem?.change?.(currentValue.value);
@@ -23821,8 +24823,15 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
23821
24823
  const close = () => {
23822
24824
  isActive.value = false;
23823
24825
  };
23824
- const handleClose = index => {
23825
- currentValue.value.splice(index, 1);
24826
+ const handleClose = item => {
24827
+ if (props.checkStrictly) {
24828
+ const index = currentValue.value.findIndex(v => v === item.value);
24829
+ if (index === -1) return;
24830
+ currentValue.value = currentValue.value.filter((_, i) => i !== index);
24831
+ } else if (item.path) {
24832
+ const remaining = (currentValueGroups.value || []).filter(p => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
24833
+ currentValue.value = [...new Set(remaining.flat())];
24834
+ }
23826
24835
  sync();
23827
24836
  };
23828
24837
  const handleClear = e => {
@@ -23859,6 +24868,7 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
23859
24868
  multiple,
23860
24869
  isActive,
23861
24870
  current: currentValue,
24871
+ currentValueGroups,
23862
24872
  // for portal
23863
24873
  toggle(v) {
23864
24874
  v = typeof v === 'boolean' ? v : !isActive.value;
@@ -23873,7 +24883,7 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
23873
24883
  "trigger": props.trigger,
23874
24884
  "tag": props.tag,
23875
24885
  "placement": props.placement,
23876
- "auto-width": props.autoWidth,
24886
+ "autoWidth": autoWidth.value,
23877
24887
  "disabled": props.disabled,
23878
24888
  "portalClass": [['is-padding-none', props.portalClass]],
23879
24889
  "class": [classes.value, its.value.class, 'vc-tree-select'],
@@ -23890,22 +24900,22 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
23890
24900
  return vue.createVNode(Input, {
23891
24901
  "id": props.id,
23892
24902
  "disabled": props.disabled,
23893
- "modelValue": currentLabel.value[0] || props.extra,
24903
+ "modelValue": displayTags.value[0]?.label || props.extra,
23894
24904
  "allow-dispatch": false,
23895
24905
  "class": "vc-tree-select__input",
23896
24906
  "readonly": true,
23897
24907
  "placeholder": its.value.attrs?.placeholder || '请选择'
23898
24908
  }, {
23899
- content: multiple.value && currentValue.value && currentValue.value.length > 0 ? () => {
24909
+ content: multiple.value && displayTags.value.length > 0 ? () => {
23900
24910
  return vue.createVNode("div", {
23901
24911
  "class": [classes.value, 'vc-tree-select__tags']
23902
- }, [currentValue.value.slice(0, props.maxTags).map((item, index) => {
24912
+ }, [displayTags.value.slice(0, props.maxTags).map(item => {
23903
24913
  return vue.createVNode(Tag, {
23904
- "key": item,
24914
+ "key": item.path ? item.path.join('-') : item.value,
23905
24915
  "closable": !props.disabled,
23906
- "onClose": () => handleClose(index)
24916
+ "onClose": () => handleClose(item)
23907
24917
  }, {
23908
- default: () => [currentLabel.value[index] || '']
24918
+ default: () => [item.label]
23909
24919
  });
23910
24920
  }), collapseTagCount.value ? vue.createVNode(Tag, null, {
23911
24921
  default: () => [`+${collapseTagCount.value}...`]
@@ -23938,16 +24948,23 @@ const TreeSelect = /* @__PURE__ */ vue.defineComponent({
23938
24948
  }, [vue.createVNode(Spin, {
23939
24949
  "size": 16
23940
24950
  }, null)]), vue.createVNode(Scroller, {
23941
- "class": "vc-tree-select__options",
24951
+ "class": ['vc-tree-select__options', props.cascader && 'is-cascader'],
23942
24952
  "max-height": "200px"
23943
24953
  }, {
23944
- default: () => [vue.createVNode(Tree, {
23945
- "model-value": currentValue.value,
23946
- "expanded-values": currentValue.value,
24954
+ default: () => [props.cascader ? vue.createVNode(TreeSelectContentCascader, {
24955
+ "value": currentValue.value,
24956
+ "data": props.data,
24957
+ "checkStrictly": props.checkStrictly,
24958
+ "renderNodeLabel": props.renderNodeLabel,
24959
+ "numerable": props.numerable,
24960
+ "separator": props.separator,
24961
+ "max": props.max,
24962
+ "nullValue": props.nullValue,
24963
+ "onChange": handleChange
24964
+ }, null) : vue.createVNode(TreeSelectContent, {
24965
+ "value": currentValue.value,
23947
24966
  "data": props.data,
23948
24967
  "checkStrictly": props.checkStrictly,
23949
- "allowDispatch": false,
23950
- "showCheckbox": true,
23951
24968
  "renderNodeLabel": props.renderNodeLabel,
23952
24969
  "onChange": handleChange
23953
24970
  }, null)]
@@ -24523,6 +25540,7 @@ exports.ButtonGroup = ButtonGroup;
24523
25540
  exports.Calendar = Calendar;
24524
25541
  exports.Card = Card;
24525
25542
  exports.Carousel = Carousel;
25543
+ exports.CarouselItem = CarouselItem;
24526
25544
  exports.Cascader = Cascader;
24527
25545
  exports.Chart = Chart;
24528
25546
  exports.Checkbox = Checkbox;
@@ -24568,6 +25586,7 @@ exports.MButtonGroup = MButtonGroup;
24568
25586
  exports.MCalendar = MCalendar;
24569
25587
  exports.MCard = MCard;
24570
25588
  exports.MCarousel = MCarousel;
25589
+ exports.MCarouselItem = MCarouselItem;
24571
25590
  exports.MCascader = MCascader;
24572
25591
  exports.MChart = MChart;
24573
25592
  exports.MCheckbox = MCheckbox;