@deot/vc-components 1.0.58 → 1.0.60

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
@@ -52,31 +52,38 @@ const VARIABLES = {};
52
52
 
53
53
  const nil = void 0;
54
54
  const defaults$2 = {
55
- UploadPicker: {
56
- enhancer: nil
57
- },
58
55
  Editor: {
59
56
  options: nil,
60
57
  enhancer: nil
61
58
  },
62
- Theme: {
63
- variables: VARIABLES
64
- },
65
59
  Portal: {
66
60
  install: nil
67
61
  },
68
- Upload: {
69
- onRequest: nil,
70
- onResponse: nil,
71
- onMessage: nil
72
- },
73
- TableColumn: {
74
- line: nil
62
+ RecycleList: {
63
+ renderRefresh: nil,
64
+ renderPlaceholder: nil,
65
+ renderLoading: nil,
66
+ renderComplete: nil,
67
+ renderEmpty: nil
75
68
  },
76
69
  Snapshot: {
77
70
  options: nil,
78
71
  source: nil,
79
72
  download: nil
73
+ },
74
+ TableColumn: {
75
+ line: nil
76
+ },
77
+ Theme: {
78
+ variables: VARIABLES
79
+ },
80
+ Upload: {
81
+ onRequest: nil,
82
+ onResponse: nil,
83
+ onMessage: nil
84
+ },
85
+ UploadPicker: {
86
+ enhancer: nil
80
87
  }
81
88
  };
82
89
 
@@ -105,7 +112,7 @@ class Instance {
105
112
  }
106
113
  const VcInstance = new Instance();
107
114
 
108
- const props$1t = {
115
+ const props$1u = {
109
116
  tag: {
110
117
  type: String,
111
118
  default: "div"
@@ -114,10 +121,10 @@ const props$1t = {
114
121
 
115
122
  /** @jsxImportSource vue */
116
123
 
117
- const COMPONENT_NAME$29 = 'vc-action-sheet';
124
+ const COMPONENT_NAME$2a = 'vc-action-sheet';
118
125
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
119
- name: COMPONENT_NAME$29,
120
- props: props$1t,
126
+ name: COMPONENT_NAME$2a,
127
+ props: props$1u,
121
128
  setup(props, {
122
129
  slots
123
130
  }) {
@@ -131,7 +138,7 @@ const ActionSheet = /* @__PURE__ */ vue.defineComponent({
131
138
 
132
139
  const MActionSheet = ActionSheet;
133
140
 
134
- const props$1s = {
141
+ const props$1t = {
135
142
  modelValue: {
136
143
  type: Boolean,
137
144
  default: false
@@ -193,11 +200,11 @@ const isWheel = (el) => {
193
200
 
194
201
  /** @jsxImportSource vue */
195
202
 
196
- const COMPONENT_NAME$28 = 'vc-affix';
203
+ const COMPONENT_NAME$29 = 'vc-affix';
197
204
  const Affix = /* @__PURE__ */ vue.defineComponent({
198
- name: COMPONENT_NAME$28,
205
+ name: COMPONENT_NAME$29,
199
206
  emits: ['update:modelValue'],
200
- props: props$1s,
207
+ props: props$1t,
201
208
  setup(props, {
202
209
  slots,
203
210
  expose,
@@ -363,7 +370,7 @@ const Affix = /* @__PURE__ */ vue.defineComponent({
363
370
 
364
371
  const MAffix = Affix;
365
372
 
366
- const props$1r = {
373
+ const props$1s = {
367
374
  modelValue: {
368
375
  type: Boolean,
369
376
  default: true
@@ -390,7 +397,7 @@ const props$1r = {
390
397
  }
391
398
  };
392
399
 
393
- const props$1q = {
400
+ const props$1r = {
394
401
  type: String,
395
402
  inherit: {
396
403
  type: Boolean,
@@ -527,10 +534,10 @@ const IconManager = new Manager();
527
534
 
528
535
  /** @jsxImportSource vue */
529
536
 
530
- const COMPONENT_NAME$27 = 'vc-icon';
537
+ const COMPONENT_NAME$28 = 'vc-icon';
531
538
  const Icon = /* @__PURE__ */ vue.defineComponent({
532
- name: COMPONENT_NAME$27,
533
- props: props$1q,
539
+ name: COMPONENT_NAME$28,
540
+ props: props$1r,
534
541
  setup(props) {
535
542
  const viewBox = vue.ref('0 0 1024 1024');
536
543
  const path = vue.ref([]);
@@ -563,7 +570,7 @@ const Icon = /* @__PURE__ */ vue.defineComponent({
563
570
  }
564
571
  });
565
572
 
566
- const props$1p = {
573
+ const props$1q = {
567
574
  /**
568
575
  * 进入/离开持续时间
569
576
  * {enter: 300, leave: 300}
@@ -728,10 +735,10 @@ const useTransition = () => {
728
735
  };
729
736
  };
730
737
 
731
- const COMPONENT_NAME$26 = "vc-transition";
738
+ const COMPONENT_NAME$27 = "vc-transition";
732
739
  const Transition = vue.defineComponent({
733
- name: COMPONENT_NAME$26,
734
- props: props$1p,
740
+ name: COMPONENT_NAME$27,
741
+ props: props$1q,
735
742
  // 当不声明emits的情况下,事件存在于attrs中
736
743
  inheritAttrs: false,
737
744
  setup(props, { slots, attrs }) {
@@ -751,10 +758,10 @@ const Transition = vue.defineComponent({
751
758
  }
752
759
  });
753
760
 
754
- const COMPONENT_NAME$25 = "vc-transition-collapse";
761
+ const COMPONENT_NAME$26 = "vc-transition-collapse";
755
762
  const TransitionCollapse = vue.defineComponent({
756
- name: COMPONENT_NAME$25,
757
- props: props$1p,
763
+ name: COMPONENT_NAME$26,
764
+ props: props$1q,
758
765
  // 当不声明emits的情况下,事件存在于attrs中
759
766
  inheritAttrs: false,
760
767
  setup(props, { slots, attrs: _attrs }) {
@@ -868,11 +875,11 @@ const TransitionCollapse = vue.defineComponent({
868
875
  }
869
876
  });
870
877
 
871
- const COMPONENT_NAME$24 = "vc-transition-fade";
878
+ const COMPONENT_NAME$25 = "vc-transition-fade";
872
879
  const TransitionFade = vue.defineComponent({
873
- name: COMPONENT_NAME$24,
880
+ name: COMPONENT_NAME$25,
874
881
  props: {
875
- ...props$1p,
882
+ ...props$1q,
876
883
  // inheritAttrs必须是false
877
884
  style: {
878
885
  type: Object,
@@ -905,11 +912,11 @@ const TransitionFade = vue.defineComponent({
905
912
  }
906
913
  });
907
914
 
908
- const COMPONENT_NAME$23 = "vc-transition-scale";
915
+ const COMPONENT_NAME$24 = "vc-transition-scale";
909
916
  const TransitionScale = vue.defineComponent({
910
- name: COMPONENT_NAME$23,
917
+ name: COMPONENT_NAME$24,
911
918
  props: {
912
- ...props$1p,
919
+ ...props$1q,
913
920
  mode: {
914
921
  type: String,
915
922
  default: "both",
@@ -947,11 +954,11 @@ const TransitionScale = vue.defineComponent({
947
954
  }
948
955
  });
949
956
 
950
- const COMPONENT_NAME$22 = "vc-transition-slide";
957
+ const COMPONENT_NAME$23 = "vc-transition-slide";
951
958
  const TransitionSlide = vue.defineComponent({
952
- name: COMPONENT_NAME$22,
959
+ name: COMPONENT_NAME$23,
953
960
  props: {
954
- ...props$1p,
961
+ ...props$1q,
955
962
  mode: {
956
963
  type: String,
957
964
  default: "left",
@@ -989,11 +996,11 @@ const TransitionSlide = vue.defineComponent({
989
996
  }
990
997
  });
991
998
 
992
- const COMPONENT_NAME$21 = "vc-transition-zoom";
999
+ const COMPONENT_NAME$22 = "vc-transition-zoom";
993
1000
  const TransitionZoom = vue.defineComponent({
994
- name: COMPONENT_NAME$21,
1001
+ name: COMPONENT_NAME$22,
995
1002
  props: {
996
- ...props$1p,
1003
+ ...props$1q,
997
1004
  mode: {
998
1005
  type: String,
999
1006
  default: "x",
@@ -1033,7 +1040,7 @@ const TransitionZoom = vue.defineComponent({
1033
1040
 
1034
1041
  /** @jsxImportSource vue */
1035
1042
 
1036
- const COMPONENT_NAME$20 = 'vc-alert';
1043
+ const COMPONENT_NAME$21 = 'vc-alert';
1037
1044
 
1038
1045
  // [color, borderColor, backgroundColor], -> CSS
1039
1046
  const THEME_MAP = {
@@ -1043,8 +1050,8 @@ const THEME_MAP = {
1043
1050
  warning: ['#ffbf00', '#ffe58f', '#fffbe6']
1044
1051
  };
1045
1052
  const Alert = /* @__PURE__ */ vue.defineComponent({
1046
- name: COMPONENT_NAME$20,
1047
- props: props$1r,
1053
+ name: COMPONENT_NAME$21,
1054
+ props: props$1s,
1048
1055
  setup(props, {
1049
1056
  slots,
1050
1057
  emit
@@ -1133,7 +1140,7 @@ const Alert = /* @__PURE__ */ vue.defineComponent({
1133
1140
 
1134
1141
  const MAlert = Alert;
1135
1142
 
1136
- const props$1o = {
1143
+ const props$1p = {
1137
1144
  // canvas配置参数
1138
1145
  options: Object,
1139
1146
  width: {
@@ -1149,10 +1156,10 @@ const props$1o = {
1149
1156
  /** @jsxImportSource vue */
1150
1157
 
1151
1158
  const isTouch = typeof document !== 'undefined' && 'ontouchend' in document;
1152
- const COMPONENT_NAME$1$ = 'vc-artboard';
1159
+ const COMPONENT_NAME$20 = 'vc-artboard';
1153
1160
  const Artboard = /* @__PURE__ */ vue.defineComponent({
1154
- name: COMPONENT_NAME$1$,
1155
- props: props$1o,
1161
+ name: COMPONENT_NAME$20,
1162
+ props: props$1p,
1156
1163
  setup(props, {
1157
1164
  emit,
1158
1165
  expose
@@ -1355,7 +1362,7 @@ const Artboard = /* @__PURE__ */ vue.defineComponent({
1355
1362
 
1356
1363
  const MArtboard = Artboard;
1357
1364
 
1358
- const props$1n = {
1365
+ const props$1o = {
1359
1366
  size: {
1360
1367
  type: Number,
1361
1368
  default: 28
@@ -1379,10 +1386,10 @@ const props$1n = {
1379
1386
 
1380
1387
  /** @jsxImportSource vue */
1381
1388
 
1382
- const COMPONENT_NAME$1_ = 'vc-spin';
1389
+ const COMPONENT_NAME$1$ = 'vc-spin';
1383
1390
  const Spin = /* @__PURE__ */ vue.defineComponent({
1384
- name: COMPONENT_NAME$1_,
1385
- props: props$1n,
1391
+ name: COMPONENT_NAME$1$,
1392
+ props: props$1o,
1386
1393
  setup(props, {
1387
1394
  slots
1388
1395
  }) {
@@ -1416,7 +1423,7 @@ const Spin = /* @__PURE__ */ vue.defineComponent({
1416
1423
  }
1417
1424
  });
1418
1425
 
1419
- const props$1m = {
1426
+ const props$1n = {
1420
1427
  wait: {
1421
1428
  type: Number,
1422
1429
  default: 250
@@ -1432,10 +1439,10 @@ const props$1m = {
1432
1439
  exclude: RegExp
1433
1440
  };
1434
1441
 
1435
- const COMPONENT_NAME$1Z = "vc-debounce";
1442
+ const COMPONENT_NAME$1_ = "vc-debounce";
1436
1443
  const Debounce = vue.defineComponent({
1437
- name: COMPONENT_NAME$1Z,
1438
- props: props$1m,
1444
+ name: COMPONENT_NAME$1_,
1445
+ props: props$1n,
1439
1446
  /**
1440
1447
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
1441
1448
  * 如事件onClick
@@ -1475,7 +1482,7 @@ const Debounce = vue.defineComponent({
1475
1482
  }
1476
1483
  });
1477
1484
 
1478
- const props$1l = {
1485
+ const props$1m = {
1479
1486
  tag: {
1480
1487
  type: String,
1481
1488
  default: "button"
@@ -1507,11 +1514,11 @@ const props$1l = {
1507
1514
 
1508
1515
  /** @jsxImportSource vue */
1509
1516
 
1510
- const COMPONENT_NAME$1Y = 'vc-button';
1517
+ const COMPONENT_NAME$1Z = 'vc-button';
1511
1518
  const Button = /* @__PURE__ */ vue.defineComponent({
1512
- name: COMPONENT_NAME$1Y,
1519
+ name: COMPONENT_NAME$1Z,
1513
1520
  emits: ['click'],
1514
- props: props$1l,
1521
+ props: props$1m,
1515
1522
  setup(props, {
1516
1523
  slots
1517
1524
  }) {
@@ -1572,7 +1579,7 @@ const Button = /* @__PURE__ */ vue.defineComponent({
1572
1579
  }
1573
1580
  });
1574
1581
 
1575
- const props$1k = {
1582
+ const props$1l = {
1576
1583
  vertical: {
1577
1584
  type: Boolean,
1578
1585
  default: false
@@ -1593,10 +1600,10 @@ const props$1k = {
1593
1600
 
1594
1601
  /** @jsxImportSource vue */
1595
1602
 
1596
- const COMPONENT_NAME$1X = 'vc-button-group';
1603
+ const COMPONENT_NAME$1Y = 'vc-button-group';
1597
1604
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
1598
- name: COMPONENT_NAME$1X,
1599
- props: props$1k,
1605
+ name: COMPONENT_NAME$1Y,
1606
+ props: props$1l,
1600
1607
  setup(props, {
1601
1608
  slots
1602
1609
  }) {
@@ -1620,7 +1627,7 @@ const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
1620
1627
  const MButton = Button;
1621
1628
  const MButtonGroup = ButtonGroup;
1622
1629
 
1623
- const props$1j = {
1630
+ const props$1k = {
1624
1631
  tag: {
1625
1632
  type: String,
1626
1633
  default: "div"
@@ -1629,10 +1636,10 @@ const props$1j = {
1629
1636
 
1630
1637
  /** @jsxImportSource vue */
1631
1638
 
1632
- const COMPONENT_NAME$1W = 'vc-calendar';
1639
+ const COMPONENT_NAME$1X = 'vc-calendar';
1633
1640
  const Calendar = /* @__PURE__ */ vue.defineComponent({
1634
- name: COMPONENT_NAME$1W,
1635
- props: props$1j,
1641
+ name: COMPONENT_NAME$1X,
1642
+ props: props$1k,
1636
1643
  setup(props, {
1637
1644
  slots
1638
1645
  }) {
@@ -1646,7 +1653,7 @@ const Calendar = /* @__PURE__ */ vue.defineComponent({
1646
1653
 
1647
1654
  const MCalendar = Calendar;
1648
1655
 
1649
- const props$1i = {
1656
+ const props$1j = {
1650
1657
  border: {
1651
1658
  type: Boolean,
1652
1659
  default: true
@@ -1669,10 +1676,10 @@ const props$1i = {
1669
1676
 
1670
1677
  /** @jsxImportSource vue */
1671
1678
 
1672
- const COMPONENT_NAME$1V = 'vc-card';
1679
+ const COMPONENT_NAME$1W = 'vc-card';
1673
1680
  const Card = /* @__PURE__ */ vue.defineComponent({
1674
- name: COMPONENT_NAME$1V,
1675
- props: props$1i,
1681
+ name: COMPONENT_NAME$1W,
1682
+ props: props$1j,
1676
1683
  setup(props, {
1677
1684
  slots
1678
1685
  }) {
@@ -1698,7 +1705,7 @@ const Card = /* @__PURE__ */ vue.defineComponent({
1698
1705
 
1699
1706
  const MCard = Card;
1700
1707
 
1701
- const props$1h = {
1708
+ const props$1i = {
1702
1709
  tag: {
1703
1710
  type: String,
1704
1711
  default: "div"
@@ -1707,10 +1714,10 @@ const props$1h = {
1707
1714
 
1708
1715
  /** @jsxImportSource vue */
1709
1716
 
1710
- const COMPONENT_NAME$1U = 'vc-carousel';
1717
+ const COMPONENT_NAME$1V = 'vc-carousel';
1711
1718
  const Carousel = /* @__PURE__ */ vue.defineComponent({
1712
- name: COMPONENT_NAME$1U,
1713
- props: props$1h,
1719
+ name: COMPONENT_NAME$1V,
1720
+ props: props$1i,
1714
1721
  setup(props, {
1715
1722
  slots
1716
1723
  }) {
@@ -1751,7 +1758,7 @@ const getSelectedData = (value = [], source = []) => {
1751
1758
  });
1752
1759
  };
1753
1760
 
1754
- const props$1g = {
1761
+ const props$1h = {
1755
1762
  // Array, 作为select等数组存放临时值
1756
1763
  modelValue: [String, Number, Array],
1757
1764
  disabled: {
@@ -2003,12 +2010,12 @@ const useNativeEmitter = (input, expose) => {
2003
2010
 
2004
2011
  /** @jsxImportSource vue */
2005
2012
 
2006
- const COMPONENT_NAME$1T = 'vc-input';
2013
+ const COMPONENT_NAME$1U = 'vc-input';
2007
2014
  const Input = /* @__PURE__ */ vue.defineComponent({
2008
- name: COMPONENT_NAME$1T,
2015
+ name: COMPONENT_NAME$1U,
2009
2016
  inheritAttrs: false,
2010
2017
  props: {
2011
- ...props$1g,
2018
+ ...props$1h,
2012
2019
  indicator: {
2013
2020
  type: [Boolean, Object],
2014
2021
  default: false
@@ -2110,8 +2117,8 @@ const Input = /* @__PURE__ */ vue.defineComponent({
2110
2117
  }
2111
2118
  });
2112
2119
 
2113
- const props$1f = {
2114
- ...props$1g,
2120
+ const props$1g = {
2121
+ ...props$1h,
2115
2122
  min: {
2116
2123
  type: Number,
2117
2124
  default: 0
@@ -2340,10 +2347,10 @@ const useInputNumber = () => {
2340
2347
 
2341
2348
  /** @jsxImportSource vue */
2342
2349
 
2343
- const COMPONENT_NAME$1S = 'vc-input-number';
2350
+ const COMPONENT_NAME$1T = 'vc-input-number';
2344
2351
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
2345
- name: COMPONENT_NAME$1S,
2346
- props: props$1f,
2352
+ name: COMPONENT_NAME$1T,
2353
+ props: props$1g,
2347
2354
  inheritAttrs: false,
2348
2355
  setup(props, {
2349
2356
  slots,
@@ -2396,8 +2403,8 @@ const InputNumber = /* @__PURE__ */ vue.defineComponent({
2396
2403
  }
2397
2404
  });
2398
2405
 
2399
- const props$1e = {
2400
- ...props$1g,
2406
+ const props$1f = {
2407
+ ...props$1h,
2401
2408
  enterText: {
2402
2409
  type: [Boolean, String],
2403
2410
  default: true
@@ -2406,10 +2413,10 @@ const props$1e = {
2406
2413
 
2407
2414
  /** @jsxImportSource vue */
2408
2415
 
2409
- const COMPONENT_NAME$1R = 'vc-input-search';
2416
+ const COMPONENT_NAME$1S = 'vc-input-search';
2410
2417
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
2411
- name: COMPONENT_NAME$1R,
2412
- props: props$1e,
2418
+ name: COMPONENT_NAME$1S,
2419
+ props: props$1f,
2413
2420
  inheritAttrs: false,
2414
2421
  setup(props, {
2415
2422
  emit,
@@ -2441,7 +2448,7 @@ const InputSearch = /* @__PURE__ */ vue.defineComponent({
2441
2448
  }
2442
2449
  });
2443
2450
 
2444
- const props$1d = {
2451
+ const props$1e = {
2445
2452
  modelValue: Boolean,
2446
2453
  animation: String,
2447
2454
  placement: {
@@ -2520,7 +2527,7 @@ const wrapperKeys = [
2520
2527
  "autoWidth",
2521
2528
  "always"
2522
2529
  ];
2523
- const props$1c = {
2530
+ const props$1d = {
2524
2531
  trigger: {
2525
2532
  type: String,
2526
2533
  default: "hover",
@@ -2538,7 +2545,7 @@ const props$1c = {
2538
2545
  type: Boolean,
2539
2546
  default: true
2540
2547
  },
2541
- ...lodashEs.pick(props$1d, wrapperKeys)
2548
+ ...lodashEs.pick(props$1e, wrapperKeys)
2542
2549
  };
2543
2550
 
2544
2551
  const EXTRA_DISTANCE = 4;
@@ -2794,17 +2801,17 @@ const usePos = () => {
2794
2801
  };
2795
2802
  };
2796
2803
 
2797
- const props$1b = {
2804
+ const props$1c = {
2798
2805
  render: {
2799
2806
  type: Function,
2800
2807
  default: () => null
2801
2808
  }
2802
2809
  };
2803
2810
 
2804
- const COMPONENT_NAME$1Q = "vc-customer";
2811
+ const COMPONENT_NAME$1R = "vc-customer";
2805
2812
  const Customer = vue.defineComponent({
2806
- name: COMPONENT_NAME$1Q,
2807
- props: props$1b,
2813
+ name: COMPONENT_NAME$1R,
2814
+ props: props$1c,
2808
2815
  setup(props, context) {
2809
2816
  return () => vue.h(() => {
2810
2817
  return props.render(context.attrs, context);
@@ -2879,7 +2886,7 @@ class PortalLeaf {
2879
2886
  }
2880
2887
  }
2881
2888
 
2882
- const COMPONENT_NAME$1P = "vc-portal";
2889
+ const COMPONENT_NAME$1Q = "vc-portal";
2883
2890
  class Portal {
2884
2891
  /**
2885
2892
  * 清理Portals类型组件
@@ -2929,7 +2936,7 @@ class Portal {
2929
2936
  this.wrapper = wrapper;
2930
2937
  this.globalOptions = {
2931
2938
  ...options,
2932
- name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1P)
2939
+ name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1Q)
2933
2940
  };
2934
2941
  }
2935
2942
  popup(propsData, options) {
@@ -3027,7 +3034,7 @@ class Portal {
3027
3034
  ...rest
3028
3035
  } = options;
3029
3036
  let useAllNodes = fragment;
3030
- const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1P)}` : name$;
3037
+ const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1Q)}` : name$;
3031
3038
  const container = document.createElement(tag);
3032
3039
  const root = typeof el === "object" ? el : document.querySelector(el || "body");
3033
3040
  !alive && Portal.leafs.get(name)?.destroy();
@@ -3061,7 +3068,7 @@ class Portal {
3061
3068
  } else {
3062
3069
  const wrapper = this.wrapper;
3063
3070
  const app = vue.createApp({
3064
- name: COMPONENT_NAME$1P,
3071
+ name: COMPONENT_NAME$1Q,
3065
3072
  parent,
3066
3073
  setup() {
3067
3074
  if (alive) {
@@ -3165,21 +3172,21 @@ class Portal {
3165
3172
  }
3166
3173
  }
3167
3174
 
3168
- const props$1a = {
3175
+ const props$1b = {
3169
3176
  tag: {
3170
3177
  type: String,
3171
3178
  default: "div"
3172
3179
  }
3173
3180
  };
3174
3181
 
3175
- const COMPONENT_NAME$1O = 'vc-portal-view';
3182
+ const COMPONENT_NAME$1P = 'vc-portal-view';
3176
3183
 
3177
3184
  /**
3178
3185
  * 写法不同,但与vue@2.x 保持一致
3179
3186
  */
3180
3187
  const PortalView = /* @__PURE__ */ vue.defineComponent({
3181
- name: COMPONENT_NAME$1O,
3182
- props: props$1a,
3188
+ name: COMPONENT_NAME$1P,
3189
+ props: props$1b,
3183
3190
  setup(props, {
3184
3191
  slots
3185
3192
  }) {
@@ -3198,10 +3205,10 @@ const PortalView = /* @__PURE__ */ vue.defineComponent({
3198
3205
 
3199
3206
  /** @jsxImportSource vue */
3200
3207
 
3201
- const COMPONENT_NAME$1N = 'vc-popover-wrapper';
3208
+ const COMPONENT_NAME$1O = 'vc-popover-wrapper';
3202
3209
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
3203
- name: COMPONENT_NAME$1N,
3204
- props: props$1d,
3210
+ name: COMPONENT_NAME$1O,
3211
+ props: props$1e,
3205
3212
  emits: ['portal-fulfilled', 'close'],
3206
3213
  setup(props, {
3207
3214
  emit,
@@ -3377,7 +3384,7 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
3377
3384
  * 同时close兼容portal设计
3378
3385
  */
3379
3386
  const handleRemove = () => {
3380
- !instance.isUnmounted && (emit('portal-fulfilled'), emit('close'));
3387
+ !instance.isUnmounted && (emit('close'), emit('portal-fulfilled'));
3381
3388
  };
3382
3389
 
3383
3390
  /**
@@ -3458,10 +3465,10 @@ const PopoverPortal = new Portal(PopoverWrapper, {
3458
3465
 
3459
3466
  /** @jsxImportSource vue */
3460
3467
 
3461
- const COMPONENT_NAME$1M = 'vc-popover';
3468
+ const COMPONENT_NAME$1N = 'vc-popover';
3462
3469
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
3463
- name: COMPONENT_NAME$1M,
3464
- props: props$1c,
3470
+ name: COMPONENT_NAME$1N,
3471
+ props: props$1d,
3465
3472
  emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
3466
3473
  setup(props, {
3467
3474
  emit,
@@ -3604,9 +3611,9 @@ const Popover = Object.assign(Popover$1, {
3604
3611
 
3605
3612
  /** @jsxImportSource vue */
3606
3613
 
3607
- const COMPONENT_NAME$1L = 'vc-cascader-column';
3614
+ const COMPONENT_NAME$1M = 'vc-cascader-column';
3608
3615
  const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
3609
- name: COMPONENT_NAME$1L,
3616
+ name: COMPONENT_NAME$1M,
3610
3617
  emits: ['click', 'change'],
3611
3618
  props: {
3612
3619
  data: {
@@ -3724,9 +3731,9 @@ const popoverKeys$1 = [
3724
3731
  "portal",
3725
3732
  "portalClass"
3726
3733
  ];
3727
- const props$19 = {
3728
- ...lodashEs.pick(props$1c, popoverKeys$1),
3729
- ...lodashEs.pick(props$1g, inputKeys$2),
3734
+ const props$1a = {
3735
+ ...lodashEs.pick(props$1d, popoverKeys$1),
3736
+ ...lodashEs.pick(props$1h, inputKeys$2),
3730
3737
  renderOption: [Function],
3731
3738
  renderOptionGroup: [Function],
3732
3739
  data: {
@@ -3792,8 +3799,8 @@ const props$19 = {
3792
3799
  label: String
3793
3800
  };
3794
3801
 
3795
- const props$18 = {
3796
- ...props$19,
3802
+ const props$19 = {
3803
+ ...props$1a,
3797
3804
  data: {
3798
3805
  type: Array,
3799
3806
  default: () => []
@@ -3814,11 +3821,11 @@ const props$18 = {
3814
3821
 
3815
3822
  /** @jsxImportSource vue */
3816
3823
 
3817
- const COMPONENT_NAME$1K = 'vc-cascader';
3824
+ const COMPONENT_NAME$1L = 'vc-cascader';
3818
3825
  const Cascader = /* @__PURE__ */ vue.defineComponent({
3819
- name: COMPONENT_NAME$1K,
3826
+ name: COMPONENT_NAME$1L,
3820
3827
  inheritAttrs: false,
3821
- props: props$18,
3828
+ props: props$19,
3822
3829
  emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
3823
3830
  setup(props, {
3824
3831
  emit,
@@ -4017,7 +4024,7 @@ const Cascader = /* @__PURE__ */ vue.defineComponent({
4017
4024
  separator: props.separator
4018
4025
  });
4019
4026
  if (!lodashEs.isEqualWith(currentValue.value, v)) {
4020
- currentValue.value = v;
4027
+ currentValue.value = [...v];
4021
4028
  }
4022
4029
  emit('close');
4023
4030
  };
@@ -4034,9 +4041,8 @@ const Cascader = /* @__PURE__ */ vue.defineComponent({
4034
4041
  numerable: props.numerable,
4035
4042
  separator: props.separator
4036
4043
  });
4037
- if (!lodashEs.isEqualWith(currentValue.value, v)) {
4038
- currentValue.value = v;
4039
- }
4044
+ // 不使用currentValue.value = v; 避免同步修改源数据,这里有取消操作
4045
+ currentValue.value = v && v.length > 0 ? [...v] : [];
4040
4046
  }, {
4041
4047
  immediate: true
4042
4048
  });
@@ -4154,7 +4160,7 @@ const EVENTS = [
4154
4160
  "contextmenu"
4155
4161
  ];
4156
4162
 
4157
- const props$17 = {
4163
+ const props$18 = {
4158
4164
  options: Object,
4159
4165
  pluginOptions: Object,
4160
4166
  theme: [String, Object],
@@ -4169,10 +4175,10 @@ const props$17 = {
4169
4175
 
4170
4176
  /** @jsxImportSource vue */
4171
4177
 
4172
- const COMPONENT_NAME$1J = 'vc-chart';
4178
+ const COMPONENT_NAME$1K = 'vc-chart';
4173
4179
  const Chart = /* @__PURE__ */ vue.defineComponent({
4174
- name: COMPONENT_NAME$1J,
4175
- props: props$17,
4180
+ name: COMPONENT_NAME$1K,
4181
+ props: props$18,
4176
4182
  emits: [...EVENTS, 'ready'],
4177
4183
  setup(props, {
4178
4184
  emit,
@@ -4276,6 +4282,8 @@ const Chart = /* @__PURE__ */ vue.defineComponent({
4276
4282
  }
4277
4283
  });
4278
4284
  });
4285
+
4286
+ // 如果存在内存泄漏,chart.value.getOption() 获取配置项,查看series参数等情况
4279
4287
  expose({
4280
4288
  chart,
4281
4289
  refresh
@@ -4292,7 +4300,7 @@ const Chart = /* @__PURE__ */ vue.defineComponent({
4292
4300
 
4293
4301
  const MChart = Chart;
4294
4302
 
4295
- const props$16 = {
4303
+ const props$17 = {
4296
4304
  disabled: {
4297
4305
  type: Boolean,
4298
4306
  default: false
@@ -4408,10 +4416,10 @@ const useCheckbox = () => {
4408
4416
 
4409
4417
  /** @jsxImportSource vue */
4410
4418
 
4411
- const COMPONENT_NAME$1I = 'vc-checkbox';
4419
+ const COMPONENT_NAME$1J = 'vc-checkbox';
4412
4420
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
4413
- name: COMPONENT_NAME$1I,
4414
- props: props$16,
4421
+ name: COMPONENT_NAME$1J,
4422
+ props: props$17,
4415
4423
  emits: ['update:modelValue', 'change'],
4416
4424
  setup(props, {
4417
4425
  slots
@@ -4448,7 +4456,7 @@ const Checkbox = /* @__PURE__ */ vue.defineComponent({
4448
4456
  }
4449
4457
  });
4450
4458
 
4451
- const props$15 = {
4459
+ const props$16 = {
4452
4460
  modelValue: {
4453
4461
  type: Array,
4454
4462
  default: () => []
@@ -4497,10 +4505,10 @@ const useCheckboxGroup = () => {
4497
4505
 
4498
4506
  /** @jsxImportSource vue */
4499
4507
 
4500
- const COMPONENT_NAME$1H = 'vc-checkbox-group';
4508
+ const COMPONENT_NAME$1I = 'vc-checkbox-group';
4501
4509
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4502
- name: COMPONENT_NAME$1H,
4503
- props: props$15,
4510
+ name: COMPONENT_NAME$1I,
4511
+ props: props$16,
4504
4512
  emits: ['update:modelValue', 'change'],
4505
4513
  setup(props, {
4506
4514
  slots
@@ -4517,10 +4525,10 @@ const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4517
4525
 
4518
4526
  /** @jsxImportSource vue */
4519
4527
 
4520
- const COMPONENT_NAME$1G = 'vcm-checkbox';
4528
+ const COMPONENT_NAME$1H = 'vcm-checkbox';
4521
4529
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
4522
- name: COMPONENT_NAME$1G,
4523
- props: props$16,
4530
+ name: COMPONENT_NAME$1H,
4531
+ props: props$17,
4524
4532
  emits: ['update:modelValue', 'change'],
4525
4533
  setup(props, {
4526
4534
  slots
@@ -4559,10 +4567,10 @@ const MCheckbox = /* @__PURE__ */ vue.defineComponent({
4559
4567
 
4560
4568
  /** @jsxImportSource vue */
4561
4569
 
4562
- const COMPONENT_NAME$1F = 'vcm-checkbox-group';
4570
+ const COMPONENT_NAME$1G = 'vcm-checkbox-group';
4563
4571
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4564
- name: COMPONENT_NAME$1F,
4565
- props: props$15,
4572
+ name: COMPONENT_NAME$1G,
4573
+ props: props$16,
4566
4574
  emits: ['update:modelValue', 'change'],
4567
4575
  setup(props, {
4568
4576
  slots
@@ -4577,7 +4585,7 @@ const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4577
4585
  }
4578
4586
  });
4579
4587
 
4580
- const props$14 = {
4588
+ const props$15 = {
4581
4589
  content: [String, Function],
4582
4590
  mask: {
4583
4591
  type: Boolean,
@@ -4615,11 +4623,11 @@ const props$14 = {
4615
4623
 
4616
4624
  /** @jsxImportSource vue */
4617
4625
 
4618
- const COMPONENT_NAME$1E = 'vc-message';
4626
+ const COMPONENT_NAME$1F = 'vc-message';
4619
4627
  const MessageView = /* @__PURE__ */ vue.defineComponent({
4620
- name: COMPONENT_NAME$1E,
4628
+ name: COMPONENT_NAME$1F,
4621
4629
  emits: ['before-close', 'close', 'portal-fulfilled'],
4622
- props: props$14,
4630
+ props: props$15,
4623
4631
  setup(props, {
4624
4632
  emit,
4625
4633
  expose
@@ -4749,7 +4757,7 @@ const warning$3 = create$4({ mode: "warning" });
4749
4757
  const error$3 = create$4({ mode: "error" });
4750
4758
  const Message = Object.assign(MessageView, { destroy: destroy$5, info: info$3, success: success$3, loading: loading$1, warning: warning$3, error: error$3 });
4751
4759
 
4752
- const props$13 = {
4760
+ const props$14 = {
4753
4761
  value: String,
4754
4762
  tag: {
4755
4763
  type: [String, Object, Function],
@@ -4866,10 +4874,10 @@ const useClipboard = (done) => {
4866
4874
  return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
4867
4875
  };
4868
4876
 
4869
- const COMPONENT_NAME$1D = "vc-clipboard";
4877
+ const COMPONENT_NAME$1E = "vc-clipboard";
4870
4878
  const Clipboard$1 = vue.defineComponent({
4871
- name: COMPONENT_NAME$1D,
4872
- props: props$13,
4879
+ name: COMPONENT_NAME$1E,
4880
+ props: props$14,
4873
4881
  setup() {
4874
4882
  return useClipboard((content) => Message.success({ content }));
4875
4883
  }
@@ -4877,7 +4885,7 @@ const Clipboard$1 = vue.defineComponent({
4877
4885
 
4878
4886
  const Clipboard = Object.assign(Clipboard$1, group);
4879
4887
 
4880
- const props$12 = {
4888
+ const props$13 = {
4881
4889
  content: [String, Function],
4882
4890
  maskClosable: {
4883
4891
  type: Boolean,
@@ -4908,11 +4916,11 @@ const MTransitionZoom = TransitionZoom;
4908
4916
 
4909
4917
  /** @jsxImportSource vue */
4910
4918
 
4911
- const COMPONENT_NAME$1C = 'vcm-toast';
4919
+ const COMPONENT_NAME$1D = 'vcm-toast';
4912
4920
  const MToastView = /* @__PURE__ */ vue.defineComponent({
4913
- name: COMPONENT_NAME$1C,
4921
+ name: COMPONENT_NAME$1D,
4914
4922
  emits: ['close', 'portal-fulfilled'],
4915
- props: props$12,
4923
+ props: props$13,
4916
4924
  setup(props, {
4917
4925
  emit,
4918
4926
  expose
@@ -5012,10 +5020,10 @@ const warning$2 = create$3({ mode: "warning" });
5012
5020
  const error$2 = create$3({ mode: "error" });
5013
5021
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
5014
5022
 
5015
- const COMPONENT_NAME$1B = "vcm-clipboard";
5023
+ const COMPONENT_NAME$1C = "vcm-clipboard";
5016
5024
  const MClipboard$1 = vue.defineComponent({
5017
- name: COMPONENT_NAME$1B,
5018
- props: props$13,
5025
+ name: COMPONENT_NAME$1C,
5026
+ props: props$14,
5019
5027
  setup() {
5020
5028
  return useClipboard((content) => MToast.info({ content }));
5021
5029
  }
@@ -5023,7 +5031,7 @@ const MClipboard$1 = vue.defineComponent({
5023
5031
 
5024
5032
  const MClipboard = Object.assign(MClipboard$1, group);
5025
5033
 
5026
- const props$11 = {
5034
+ const props$12 = {
5027
5035
  tag: {
5028
5036
  type: String,
5029
5037
  default: "div"
@@ -5046,10 +5054,10 @@ const props$11 = {
5046
5054
  }
5047
5055
  };
5048
5056
 
5049
- const COMPONENT_NAME$1A = "vc-collapse";
5057
+ const COMPONENT_NAME$1B = "vc-collapse";
5050
5058
  const Collapse = vue.defineComponent({
5051
- name: COMPONENT_NAME$1A,
5052
- props: props$11,
5059
+ name: COMPONENT_NAME$1B,
5060
+ props: props$12,
5053
5061
  emits: ["update:moodelValue", "change"],
5054
5062
  setup(props, { slots, emit }) {
5055
5063
  const instance = vue.getCurrentInstance();
@@ -5134,7 +5142,7 @@ const Collapse = vue.defineComponent({
5134
5142
  }
5135
5143
  });
5136
5144
 
5137
- const props$10 = {
5145
+ const props$11 = {
5138
5146
  tag: {
5139
5147
  type: String,
5140
5148
  default: "div"
@@ -5144,7 +5152,7 @@ const props$10 = {
5144
5152
  }
5145
5153
  };
5146
5154
 
5147
- const props$$ = {
5155
+ const props$10 = {
5148
5156
  tag: {
5149
5157
  type: String,
5150
5158
  default: "div"
@@ -5162,13 +5170,13 @@ const props$$ = {
5162
5170
 
5163
5171
  /** @jsxImportSource vue */
5164
5172
 
5165
- function _isSlot$2(s) {
5173
+ function _isSlot$3(s) {
5166
5174
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
5167
5175
  }
5168
- const COMPONENT_NAME$1z = 'vc-expand';
5176
+ const COMPONENT_NAME$1A = 'vc-expand';
5169
5177
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
5170
- name: COMPONENT_NAME$1z,
5171
- props: props$$,
5178
+ name: COMPONENT_NAME$1A,
5179
+ props: props$10,
5172
5180
  setup(props, {
5173
5181
  slots
5174
5182
  }) {
@@ -5186,7 +5194,7 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
5186
5194
  enter: 200,
5187
5195
  leave: 200
5188
5196
  }
5189
- }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
5197
+ }, _isSlot$3(_slot = vue.withDirectives(vue.createVNode(Content, null, {
5190
5198
  default: () => [(props.alive || !props.alive && isActive.value) && slots.default?.()]
5191
5199
  }), [[vue.vShow, isActive.value]])) ? _slot : {
5192
5200
  default: () => [_slot]
@@ -5197,10 +5205,10 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
5197
5205
 
5198
5206
  /** @jsxImportSource vue */
5199
5207
 
5200
- const COMPONENT_NAME$1y = 'vc-collapse-item';
5208
+ const COMPONENT_NAME$1z = 'vc-collapse-item';
5201
5209
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
5202
- name: COMPONENT_NAME$1y,
5203
- props: props$10,
5210
+ name: COMPONENT_NAME$1z,
5211
+ props: props$11,
5204
5212
  setup(props, {
5205
5213
  slots,
5206
5214
  expose
@@ -5265,7 +5273,7 @@ const CollapseItem = /* @__PURE__ */ vue.defineComponent({
5265
5273
  const MCollapse = Collapse;
5266
5274
  const MCollapseItem = CollapseItem;
5267
5275
 
5268
- const props$_ = {
5276
+ const props$$ = {
5269
5277
  tag: {
5270
5278
  type: String,
5271
5279
  default: "div"
@@ -5274,10 +5282,10 @@ const props$_ = {
5274
5282
 
5275
5283
  /** @jsxImportSource vue */
5276
5284
 
5277
- const COMPONENT_NAME$1x = 'vc-color-picker';
5285
+ const COMPONENT_NAME$1y = 'vc-color-picker';
5278
5286
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
5279
- name: COMPONENT_NAME$1x,
5280
- props: props$_,
5287
+ name: COMPONENT_NAME$1y,
5288
+ props: props$$,
5281
5289
  setup(props, {
5282
5290
  slots
5283
5291
  }) {
@@ -5291,7 +5299,7 @@ const ColorPicker = /* @__PURE__ */ vue.defineComponent({
5291
5299
 
5292
5300
  const MColorPicker = ColorPicker;
5293
5301
 
5294
- const props$Z = {
5302
+ const props$_ = {
5295
5303
  tag: {
5296
5304
  type: String,
5297
5305
  default: "span"
@@ -5336,14 +5344,14 @@ const formatter = (format, arr) => {
5336
5344
 
5337
5345
  /** @jsxImportSource vue */
5338
5346
 
5339
- function _isSlot$1(s) {
5347
+ function _isSlot$2(s) {
5340
5348
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
5341
5349
  }
5342
- const COMPONENT_NAME$1w = 'vc-countdown';
5350
+ const COMPONENT_NAME$1x = 'vc-countdown';
5343
5351
  const Countdown = /* @__PURE__ */ vue.defineComponent({
5344
- name: COMPONENT_NAME$1w,
5345
- props: props$Z,
5346
- emits: ['change', 'finish', 'error'],
5352
+ name: COMPONENT_NAME$1x,
5353
+ props: props$_,
5354
+ emits: ['change', 'complete', 'error'],
5347
5355
  setup(props, {
5348
5356
  emit,
5349
5357
  slots
@@ -5433,7 +5441,7 @@ const Countdown = /* @__PURE__ */ vue.defineComponent({
5433
5441
  second: '00',
5434
5442
  millisecond: '00'
5435
5443
  });
5436
- emit('finish');
5444
+ emit('complete');
5437
5445
  } else {
5438
5446
  emit('change', {
5439
5447
  timestamp,
@@ -5471,7 +5479,7 @@ const Countdown = /* @__PURE__ */ vue.defineComponent({
5471
5479
  return (// @ts-ignore
5472
5480
  vue.createVNode(Content, {
5473
5481
  "class": "vc-countdown"
5474
- }, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
5482
+ }, _isSlot$2(_slot = slots.default(binds.value)) ? _slot : {
5475
5483
  default: () => [_slot]
5476
5484
  })
5477
5485
  );
@@ -5494,6 +5502,345 @@ const Countdown = /* @__PURE__ */ vue.defineComponent({
5494
5502
 
5495
5503
  const MCountdown = Countdown;
5496
5504
 
5505
+ const props$Z = {
5506
+ tag: {
5507
+ type: String,
5508
+ default: "span"
5509
+ },
5510
+ value: [Number, String],
5511
+ placeholder: String,
5512
+ precision: {
5513
+ type: Number,
5514
+ default: 0
5515
+ },
5516
+ duration: {
5517
+ type: Number,
5518
+ default: 500
5519
+ },
5520
+ decimal: {
5521
+ type: String,
5522
+ default: "."
5523
+ },
5524
+ separator: {
5525
+ type: String,
5526
+ default: ","
5527
+ },
5528
+ numerals: {
5529
+ type: Array,
5530
+ default: () => []
5531
+ },
5532
+ smartEasingThreshold: {
5533
+ type: Number,
5534
+ default: 999
5535
+ },
5536
+ smartEasingAmount: {
5537
+ type: Number,
5538
+ default: 333
5539
+ },
5540
+ easing: {
5541
+ type: [Function, Boolean],
5542
+ default: true
5543
+ },
5544
+ // 10.90 -> 10.9
5545
+ zeroless: {
5546
+ type: Boolean,
5547
+ default: false
5548
+ },
5549
+ // 为true时,自行管理start/update
5550
+ controllable: {
5551
+ type: Boolean,
5552
+ default: false
5553
+ },
5554
+ render: Function
5555
+ };
5556
+
5557
+ const separated2value = (value, options) => {
5558
+ if (typeof value === "number" || typeof value !== "string") return value;
5559
+ const escapeRegExp = (s) => s.replace(/([.,' ])/g, "\\$1");
5560
+ const sep = escapeRegExp(options.separator);
5561
+ const dec = escapeRegExp(options.decimal);
5562
+ const num = (value || "").replace(new RegExp(sep, "g"), "").replace(new RegExp(dec, "g"), ".");
5563
+ return parseFloat(num);
5564
+ };
5565
+ const value2separated = (value, options) => {
5566
+ const num = typeof value === "number" ? value : parseFloat(value);
5567
+ if (value === "" || Number.isNaN(num)) {
5568
+ return {
5569
+ negative: "",
5570
+ integer: "",
5571
+ decimal: "",
5572
+ separated: "",
5573
+ float: "",
5574
+ value: ""
5575
+ };
5576
+ }
5577
+ const negative = num < 0 ? "-" : "";
5578
+ let [integer, decimal = ""] = `${Math.abs(num)}`.split(".");
5579
+ let separated = integer;
5580
+ if (options.separator) {
5581
+ let v = "";
5582
+ let j = 0;
5583
+ const factor = 3;
5584
+ for (let i = 0, len = separated.length; i < len; ++i) {
5585
+ if (i !== 0 && j % factor === 0) {
5586
+ v = options.separator + v;
5587
+ }
5588
+ j++;
5589
+ v = separated[len - i - 1] + v;
5590
+ }
5591
+ separated = v;
5592
+ }
5593
+ const precision$ = options.zeroless ? Math.min(options.precision, decimal.length) : options.precision;
5594
+ if (precision$) {
5595
+ decimal = decimal.slice(0, precision$).padEnd(precision$, "0");
5596
+ } else {
5597
+ decimal = "";
5598
+ }
5599
+ if (options?.numerals?.length) {
5600
+ separated = separated.replace(/[0-9]/g, (w) => options.numerals[+w]);
5601
+ decimal = decimal.replace(/[0-9]/g, (w) => options.numerals[+w]);
5602
+ }
5603
+ const _decimal = decimal ? options.decimal + decimal : "";
5604
+ return {
5605
+ negative,
5606
+ integer,
5607
+ decimal,
5608
+ separated,
5609
+ float: `${negative}${integer}${_decimal}`,
5610
+ value: `${negative}${separated}${_decimal}`
5611
+ };
5612
+ };
5613
+
5614
+ /** @jsxImportSource vue */
5615
+
5616
+ function _isSlot$1(s) {
5617
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
5618
+ }
5619
+ const COMPONENT_NAME$1w = 'vc-counter';
5620
+ const Counter = /* @__PURE__ */ vue.defineComponent({
5621
+ name: COMPONENT_NAME$1w,
5622
+ props: props$Z,
5623
+ emits: ['begin', 'complete', 'change'],
5624
+ setup(props, {
5625
+ emit,
5626
+ expose,
5627
+ slots
5628
+ }) {
5629
+ const startTime = vue.ref(null);
5630
+ const duration = vue.ref(props.duration);
5631
+ const remaining = vue.ref(duration.value);
5632
+ const startVal = vue.ref(0);
5633
+ const endVal = vue.ref(!props.value ? 0 : separated2value(props.value, props));
5634
+ const frameVal = vue.ref(startVal.value);
5635
+ const finalEndVal = vue.ref(null);
5636
+ const useEasing = vue.ref(!!props.easing);
5637
+ const isStart = vue.ref(false);
5638
+ const isPaused = vue.ref(false);
5639
+ const isComplete = vue.ref(false);
5640
+ const countdown = vue.ref(false);
5641
+ const rAF = vue.ref(null);
5642
+ const prints = vue.reactive({
5643
+ negative: '',
5644
+ integer: '',
5645
+ decimal: '',
5646
+ separated: '',
5647
+ float: '',
5648
+ value: ''
5649
+ });
5650
+
5651
+ // t: current time, b: beginning value, c: change in value, d: duration
5652
+ const easing = vue.computed(() => {
5653
+ return typeof props.easing === 'function' ? props.easing : (t, b, c, d) => c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
5654
+ });
5655
+ const displayValue = vue.computed(() => {
5656
+ if (props.value === '' || typeof props.value !== 'string' && typeof props.value !== 'number' || typeof props.value === 'string' && Number.isNaN(parseFloat(props.value))) {
5657
+ return props.placeholder;
5658
+ }
5659
+ return prints.value;
5660
+ });
5661
+ const binds = vue.computed(() => {
5662
+ return {
5663
+ ...prints,
5664
+ value: displayValue.value
5665
+ };
5666
+ });
5667
+ const determineDirectionAndSmartEasing = () => {
5668
+ const v = finalEndVal.value !== null ? finalEndVal.value : endVal.value;
5669
+ countdown.value = startVal.value > v;
5670
+ const animateAmount = v - startVal.value;
5671
+ if (Math.abs(animateAmount) > props.smartEasingThreshold && props.easing) {
5672
+ finalEndVal.value = v;
5673
+ const up = countdown.value ? 1 : -1;
5674
+ endVal.value = v + up * props.smartEasingAmount;
5675
+ duration.value = duration.value / 2;
5676
+ } else {
5677
+ endVal.value = v;
5678
+ finalEndVal.value = null;
5679
+ }
5680
+ if (finalEndVal.value !== null) {
5681
+ useEasing.value = false;
5682
+ } else {
5683
+ useEasing.value = !!props.easing;
5684
+ }
5685
+ };
5686
+ const run = () => {
5687
+ const done = timestamp => {
5688
+ if (!startTime.value) {
5689
+ startTime.value = timestamp;
5690
+ }
5691
+ const progress = timestamp - startTime.value;
5692
+ remaining.value = duration.value - progress;
5693
+ if (useEasing.value) {
5694
+ if (countdown.value) {
5695
+ frameVal.value = startVal.value - easing.value(progress, 0, startVal.value - endVal.value, duration.value);
5696
+ } else {
5697
+ frameVal.value = easing.value(progress, startVal.value, endVal.value - startVal.value, duration.value);
5698
+ }
5699
+ } else {
5700
+ frameVal.value = startVal.value + (endVal.value - startVal.value) * (progress / duration.value);
5701
+ }
5702
+ const wentPast = countdown.value ? frameVal.value < endVal.value : frameVal.value > endVal.value;
5703
+ frameVal.value = wentPast ? endVal.value : frameVal.value;
5704
+ print(frameVal.value);
5705
+ if (progress < duration.value) {
5706
+ rAF.value = requestAnimationFrame(done);
5707
+ } else if (finalEndVal.value !== null) {
5708
+ update(finalEndVal.value);
5709
+ } else {
5710
+ emit('complete');
5711
+ isComplete.value = true;
5712
+ }
5713
+ };
5714
+ determineDirectionAndSmartEasing();
5715
+ rAF.value = requestAnimationFrame(done);
5716
+ };
5717
+ const print = num => {
5718
+ Object.assign(prints, value2separated(num, props));
5719
+ emit('change', prints);
5720
+ };
5721
+ const resetDuration = () => {
5722
+ startTime.value = null;
5723
+ duration.value = props.duration;
5724
+ remaining.value = duration.value;
5725
+ };
5726
+ const cancel = () => {
5727
+ if (rAF.value === null || typeof rAF.value === 'undefined') return;
5728
+ cancelAnimationFrame(rAF.value);
5729
+ };
5730
+ const start = () => {
5731
+ if (isComplete.value || isStart.value) return;
5732
+ cancel();
5733
+ resetDuration();
5734
+ isPaused.value = false;
5735
+ isComplete.value = false;
5736
+ startVal.value = 0;
5737
+ frameVal.value = 0;
5738
+ isStart.value = true;
5739
+ emit('begin');
5740
+ if (duration.value > 0) {
5741
+ run();
5742
+ } else {
5743
+ print(endVal.value);
5744
+ }
5745
+ };
5746
+ const pause = () => {
5747
+ if (isComplete.value) return;
5748
+ if (!isPaused.value) {
5749
+ cancel();
5750
+ }
5751
+ isPaused.value = true;
5752
+ };
5753
+ const resume = () => {
5754
+ if (isComplete.value) return;
5755
+ if (isPaused.value) {
5756
+ startTime.value = null;
5757
+ duration.value = remaining.value;
5758
+ startVal.value = frameVal.value;
5759
+ run();
5760
+ }
5761
+ isPaused.value = false;
5762
+ };
5763
+ const update = newEndVal => {
5764
+ if (!isStart.value) return;
5765
+ cancel();
5766
+ startTime.value = null;
5767
+ endVal.value = +newEndVal;
5768
+ if (endVal.value === frameVal.value) {
5769
+ return;
5770
+ }
5771
+ startVal.value = frameVal.value;
5772
+ if (finalEndVal.value === null) {
5773
+ resetDuration();
5774
+ }
5775
+ finalEndVal.value = null;
5776
+ run();
5777
+ };
5778
+ const end = () => {
5779
+ if (isComplete.value) return;
5780
+ cancel();
5781
+ resetDuration();
5782
+ startVal.value = +props.value;
5783
+ frameVal.value = startVal.value;
5784
+ print(frameVal.value);
5785
+ emit('complete');
5786
+ isComplete.value = true;
5787
+ };
5788
+ const restart = () => {
5789
+ isStart.value = false;
5790
+ isComplete.value = false;
5791
+ start();
5792
+ };
5793
+ vue.watch(() => props.value, () => {
5794
+ if (props.controllable || !isStart.value) return;
5795
+ update(props.value);
5796
+ });
5797
+ vue.watch(() => props.precision, () => {
5798
+ if (props.controllable || !isStart.value || !isComplete.value) return;
5799
+ print(+props.value);
5800
+ });
5801
+ expose({
5802
+ start,
5803
+ pause,
5804
+ resume,
5805
+ update,
5806
+ end,
5807
+ restart,
5808
+ cancel,
5809
+ print
5810
+ });
5811
+ vue.onMounted(() => !props.controllable && start());
5812
+ vue.onBeforeUnmount(cancel);
5813
+ const Content = props.tag;
5814
+ return () => {
5815
+ if (slots.default) {
5816
+ let _slot;
5817
+ return (// @ts-ignore
5818
+ vue.createVNode(Content, {
5819
+ "class": "vc-counter"
5820
+ }, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
5821
+ default: () => [_slot]
5822
+ })
5823
+ );
5824
+ }
5825
+ if (props.render) {
5826
+ return vue.createVNode(Customer, vue.mergeProps({
5827
+ "class": "vc-counter",
5828
+ "render": props.render
5829
+ }, binds.value), null);
5830
+ }
5831
+ return (// @ts-ignore
5832
+ vue.createVNode(Content, {
5833
+ "class": "vc-counter"
5834
+ }, {
5835
+ default: () => [displayValue.value]
5836
+ })
5837
+ );
5838
+ };
5839
+ }
5840
+ });
5841
+
5842
+ const MCounter = Counter;
5843
+
5497
5844
  const props$Y = {
5498
5845
  type: {
5499
5846
  type: String,
@@ -5517,8 +5864,8 @@ const popoverKeys = [
5517
5864
  "portalClass"
5518
5865
  ];
5519
5866
  const props$X = {
5520
- ...lodashEs.pick(props$1c, popoverKeys),
5521
- ...lodashEs.pick(props$1g, inputKeys$1),
5867
+ ...lodashEs.pick(props$1d, popoverKeys),
5868
+ ...lodashEs.pick(props$1h, inputKeys$1),
5522
5869
  type: String,
5523
5870
  placeholder: String,
5524
5871
  clearable: {
@@ -10008,6 +10355,7 @@ const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
10008
10355
  const COMPONENT_NAME$18 = 'vc-dropdown-item';
10009
10356
  const DropdownItem = /* @__PURE__ */ vue.defineComponent({
10010
10357
  name: COMPONENT_NAME$18,
10358
+ emits: ['click'],
10011
10359
  props: {
10012
10360
  value: {
10013
10361
  type: [String, Number],
@@ -12564,7 +12912,7 @@ const MInput = /* @__PURE__ */ vue.defineComponent({
12564
12912
  name: COMPONENT_NAME$V,
12565
12913
  inheritAttrs: false,
12566
12914
  props: {
12567
- ...props$1g,
12915
+ ...props$1h,
12568
12916
  right: {
12569
12917
  type: Boolean,
12570
12918
  default: false
@@ -12653,7 +13001,7 @@ const MInput = /* @__PURE__ */ vue.defineComponent({
12653
13001
  const COMPONENT_NAME$U = 'vcm-input-number';
12654
13002
  const MInputNumber = /* @__PURE__ */ vue.defineComponent({
12655
13003
  name: COMPONENT_NAME$U,
12656
- props: props$1f,
13004
+ props: props$1g,
12657
13005
  inheritAttrs: false,
12658
13006
  setup(props, {
12659
13007
  slots,
@@ -12705,7 +13053,7 @@ const COMPONENT_NAME$T = 'vcm-input-search';
12705
13053
  const MInputSearch = /* @__PURE__ */ vue.defineComponent({
12706
13054
  name: COMPONENT_NAME$T,
12707
13055
  props: {
12708
- ...props$1e,
13056
+ ...props$1f,
12709
13057
  cancelText: {
12710
13058
  type: String,
12711
13059
  default: '取消'
@@ -14291,7 +14639,7 @@ const OptionGroup = /* @__PURE__ */ vue.defineComponent({
14291
14639
  const COMPONENT_NAME$H = 'vc-select';
14292
14640
  const Select = /* @__PURE__ */ vue.defineComponent({
14293
14641
  name: COMPONENT_NAME$H,
14294
- props: props$19,
14642
+ props: props$1a,
14295
14643
  emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
14296
14644
  setup(props, {
14297
14645
  emit,
@@ -16002,7 +16350,7 @@ const props$j = {
16002
16350
  },
16003
16351
  scrollerOptions: Object,
16004
16352
  renderEmpty: Function,
16005
- renderFinish: Function,
16353
+ renderComplete: Function,
16006
16354
  renderLoading: Function,
16007
16355
  renderPlaceholder: Function,
16008
16356
  renderRefresh: Function
@@ -16036,9 +16384,9 @@ const ScrollState = /* @__PURE__ */ vue.defineComponent({
16036
16384
  }, [vue.createVNode(Spin, {
16037
16385
  "size": 20
16038
16386
  }, null)]))]), owner.isEnd.value && (owner.data.length ? vue.createVNode("div", {
16039
- "class": "vc-recycle-list__finish"
16040
- }, [slots.finish?.() || owner.renderer.value.finish ? vue.createVNode(Customer, {
16041
- "render": owner.renderer.value.finish
16387
+ "class": "vc-recycle-list__complete"
16388
+ }, [slots.complete?.() || owner.renderer.value.complete ? vue.createVNode(Customer, {
16389
+ "render": owner.renderer.value.complete
16042
16390
  }, null) : vue.createVNode("div", {
16043
16391
  "class": "vc-recycle-list__center"
16044
16392
  }, [vue.createTextVNode("\u5DF2\u5168\u90E8\u52A0\u8F7D~")])]) : vue.createVNode("div", {
@@ -16334,7 +16682,7 @@ const RecycleList = /* @__PURE__ */ vue.defineComponent({
16334
16682
  refresh: props.renderRefresh || globalProps.renderRefresh,
16335
16683
  placeholder: props.renderPlaceholder || globalProps.renderPlaceholder,
16336
16684
  loading: props.renderLoading || globalProps.renderLoading,
16337
- finish: props.renderFinish || globalProps.renderFinish,
16685
+ complete: props.renderComplete || globalProps.renderComplete,
16338
16686
  empty: props.renderEmpty || globalProps.renderEmpty
16339
16687
  };
16340
16688
  });
@@ -21370,7 +21718,7 @@ const inputKeys = [
21370
21718
  "controllable"
21371
21719
  ];
21372
21720
  const props$8 = {
21373
- ...lodashEs.pick(props$1g, inputKeys),
21721
+ ...lodashEs.pick(props$1h, inputKeys),
21374
21722
  wrap: {
21375
21723
  type: String,
21376
21724
  validator: (v) => /(soft|hard)/.test(v),
@@ -22963,7 +23311,7 @@ const treeNodeContentKeys = [
22963
23311
  "allowDispatch"
22964
23312
  ];
22965
23313
  const props$2 = {
22966
- ...lodashEs.pick(props$19, selectKeys),
23314
+ ...lodashEs.pick(props$1a, selectKeys),
22967
23315
  ...lodashEs.pick(props$3, treeNodeContentKeys),
22968
23316
  // 暂不支持,仅作为默认值
22969
23317
  max: {
@@ -23236,7 +23584,7 @@ const treeKeys = [
23236
23584
  "renderNodeLabel"
23237
23585
  ];
23238
23586
  const props$1 = {
23239
- ...props$19,
23587
+ ...props$1a,
23240
23588
  ...lodashEs.pick(props$2, treeKeys)
23241
23589
  };
23242
23590
 
@@ -24045,6 +24393,7 @@ exports.Collapse = Collapse;
24045
24393
  exports.CollapseItem = CollapseItem;
24046
24394
  exports.ColorPicker = ColorPicker;
24047
24395
  exports.Countdown = Countdown;
24396
+ exports.Counter = Counter;
24048
24397
  exports.Customer = Customer;
24049
24398
  exports.DatePicker = DatePicker;
24050
24399
  exports.Debounce = Debounce;
@@ -24089,6 +24438,7 @@ exports.MCollapse = MCollapse;
24089
24438
  exports.MCollapseItem = MCollapseItem;
24090
24439
  exports.MColorPicker = MColorPicker;
24091
24440
  exports.MCountdown = MCountdown;
24441
+ exports.MCounter = MCounter;
24092
24442
  exports.MCustomer = MCustomer;
24093
24443
  exports.MDatePicker = MDatePicker;
24094
24444
  exports.MDebounce = Debounce;