@deot/vc-components 1.0.58 → 1.0.59

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,
@@ -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,
@@ -4154,7 +4161,7 @@ const EVENTS = [
4154
4161
  "contextmenu"
4155
4162
  ];
4156
4163
 
4157
- const props$17 = {
4164
+ const props$18 = {
4158
4165
  options: Object,
4159
4166
  pluginOptions: Object,
4160
4167
  theme: [String, Object],
@@ -4169,10 +4176,10 @@ const props$17 = {
4169
4176
 
4170
4177
  /** @jsxImportSource vue */
4171
4178
 
4172
- const COMPONENT_NAME$1J = 'vc-chart';
4179
+ const COMPONENT_NAME$1K = 'vc-chart';
4173
4180
  const Chart = /* @__PURE__ */ vue.defineComponent({
4174
- name: COMPONENT_NAME$1J,
4175
- props: props$17,
4181
+ name: COMPONENT_NAME$1K,
4182
+ props: props$18,
4176
4183
  emits: [...EVENTS, 'ready'],
4177
4184
  setup(props, {
4178
4185
  emit,
@@ -4276,6 +4283,8 @@ const Chart = /* @__PURE__ */ vue.defineComponent({
4276
4283
  }
4277
4284
  });
4278
4285
  });
4286
+
4287
+ // 如果存在内存泄漏,chart.value.getOption() 获取配置项,查看series参数等情况
4279
4288
  expose({
4280
4289
  chart,
4281
4290
  refresh
@@ -4292,7 +4301,7 @@ const Chart = /* @__PURE__ */ vue.defineComponent({
4292
4301
 
4293
4302
  const MChart = Chart;
4294
4303
 
4295
- const props$16 = {
4304
+ const props$17 = {
4296
4305
  disabled: {
4297
4306
  type: Boolean,
4298
4307
  default: false
@@ -4408,10 +4417,10 @@ const useCheckbox = () => {
4408
4417
 
4409
4418
  /** @jsxImportSource vue */
4410
4419
 
4411
- const COMPONENT_NAME$1I = 'vc-checkbox';
4420
+ const COMPONENT_NAME$1J = 'vc-checkbox';
4412
4421
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
4413
- name: COMPONENT_NAME$1I,
4414
- props: props$16,
4422
+ name: COMPONENT_NAME$1J,
4423
+ props: props$17,
4415
4424
  emits: ['update:modelValue', 'change'],
4416
4425
  setup(props, {
4417
4426
  slots
@@ -4448,7 +4457,7 @@ const Checkbox = /* @__PURE__ */ vue.defineComponent({
4448
4457
  }
4449
4458
  });
4450
4459
 
4451
- const props$15 = {
4460
+ const props$16 = {
4452
4461
  modelValue: {
4453
4462
  type: Array,
4454
4463
  default: () => []
@@ -4497,10 +4506,10 @@ const useCheckboxGroup = () => {
4497
4506
 
4498
4507
  /** @jsxImportSource vue */
4499
4508
 
4500
- const COMPONENT_NAME$1H = 'vc-checkbox-group';
4509
+ const COMPONENT_NAME$1I = 'vc-checkbox-group';
4501
4510
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4502
- name: COMPONENT_NAME$1H,
4503
- props: props$15,
4511
+ name: COMPONENT_NAME$1I,
4512
+ props: props$16,
4504
4513
  emits: ['update:modelValue', 'change'],
4505
4514
  setup(props, {
4506
4515
  slots
@@ -4517,10 +4526,10 @@ const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4517
4526
 
4518
4527
  /** @jsxImportSource vue */
4519
4528
 
4520
- const COMPONENT_NAME$1G = 'vcm-checkbox';
4529
+ const COMPONENT_NAME$1H = 'vcm-checkbox';
4521
4530
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
4522
- name: COMPONENT_NAME$1G,
4523
- props: props$16,
4531
+ name: COMPONENT_NAME$1H,
4532
+ props: props$17,
4524
4533
  emits: ['update:modelValue', 'change'],
4525
4534
  setup(props, {
4526
4535
  slots
@@ -4559,10 +4568,10 @@ const MCheckbox = /* @__PURE__ */ vue.defineComponent({
4559
4568
 
4560
4569
  /** @jsxImportSource vue */
4561
4570
 
4562
- const COMPONENT_NAME$1F = 'vcm-checkbox-group';
4571
+ const COMPONENT_NAME$1G = 'vcm-checkbox-group';
4563
4572
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4564
- name: COMPONENT_NAME$1F,
4565
- props: props$15,
4573
+ name: COMPONENT_NAME$1G,
4574
+ props: props$16,
4566
4575
  emits: ['update:modelValue', 'change'],
4567
4576
  setup(props, {
4568
4577
  slots
@@ -4577,7 +4586,7 @@ const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
4577
4586
  }
4578
4587
  });
4579
4588
 
4580
- const props$14 = {
4589
+ const props$15 = {
4581
4590
  content: [String, Function],
4582
4591
  mask: {
4583
4592
  type: Boolean,
@@ -4615,11 +4624,11 @@ const props$14 = {
4615
4624
 
4616
4625
  /** @jsxImportSource vue */
4617
4626
 
4618
- const COMPONENT_NAME$1E = 'vc-message';
4627
+ const COMPONENT_NAME$1F = 'vc-message';
4619
4628
  const MessageView = /* @__PURE__ */ vue.defineComponent({
4620
- name: COMPONENT_NAME$1E,
4629
+ name: COMPONENT_NAME$1F,
4621
4630
  emits: ['before-close', 'close', 'portal-fulfilled'],
4622
- props: props$14,
4631
+ props: props$15,
4623
4632
  setup(props, {
4624
4633
  emit,
4625
4634
  expose
@@ -4749,7 +4758,7 @@ const warning$3 = create$4({ mode: "warning" });
4749
4758
  const error$3 = create$4({ mode: "error" });
4750
4759
  const Message = Object.assign(MessageView, { destroy: destroy$5, info: info$3, success: success$3, loading: loading$1, warning: warning$3, error: error$3 });
4751
4760
 
4752
- const props$13 = {
4761
+ const props$14 = {
4753
4762
  value: String,
4754
4763
  tag: {
4755
4764
  type: [String, Object, Function],
@@ -4866,10 +4875,10 @@ const useClipboard = (done) => {
4866
4875
  return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
4867
4876
  };
4868
4877
 
4869
- const COMPONENT_NAME$1D = "vc-clipboard";
4878
+ const COMPONENT_NAME$1E = "vc-clipboard";
4870
4879
  const Clipboard$1 = vue.defineComponent({
4871
- name: COMPONENT_NAME$1D,
4872
- props: props$13,
4880
+ name: COMPONENT_NAME$1E,
4881
+ props: props$14,
4873
4882
  setup() {
4874
4883
  return useClipboard((content) => Message.success({ content }));
4875
4884
  }
@@ -4877,7 +4886,7 @@ const Clipboard$1 = vue.defineComponent({
4877
4886
 
4878
4887
  const Clipboard = Object.assign(Clipboard$1, group);
4879
4888
 
4880
- const props$12 = {
4889
+ const props$13 = {
4881
4890
  content: [String, Function],
4882
4891
  maskClosable: {
4883
4892
  type: Boolean,
@@ -4908,11 +4917,11 @@ const MTransitionZoom = TransitionZoom;
4908
4917
 
4909
4918
  /** @jsxImportSource vue */
4910
4919
 
4911
- const COMPONENT_NAME$1C = 'vcm-toast';
4920
+ const COMPONENT_NAME$1D = 'vcm-toast';
4912
4921
  const MToastView = /* @__PURE__ */ vue.defineComponent({
4913
- name: COMPONENT_NAME$1C,
4922
+ name: COMPONENT_NAME$1D,
4914
4923
  emits: ['close', 'portal-fulfilled'],
4915
- props: props$12,
4924
+ props: props$13,
4916
4925
  setup(props, {
4917
4926
  emit,
4918
4927
  expose
@@ -5012,10 +5021,10 @@ const warning$2 = create$3({ mode: "warning" });
5012
5021
  const error$2 = create$3({ mode: "error" });
5013
5022
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
5014
5023
 
5015
- const COMPONENT_NAME$1B = "vcm-clipboard";
5024
+ const COMPONENT_NAME$1C = "vcm-clipboard";
5016
5025
  const MClipboard$1 = vue.defineComponent({
5017
- name: COMPONENT_NAME$1B,
5018
- props: props$13,
5026
+ name: COMPONENT_NAME$1C,
5027
+ props: props$14,
5019
5028
  setup() {
5020
5029
  return useClipboard((content) => MToast.info({ content }));
5021
5030
  }
@@ -5023,7 +5032,7 @@ const MClipboard$1 = vue.defineComponent({
5023
5032
 
5024
5033
  const MClipboard = Object.assign(MClipboard$1, group);
5025
5034
 
5026
- const props$11 = {
5035
+ const props$12 = {
5027
5036
  tag: {
5028
5037
  type: String,
5029
5038
  default: "div"
@@ -5046,10 +5055,10 @@ const props$11 = {
5046
5055
  }
5047
5056
  };
5048
5057
 
5049
- const COMPONENT_NAME$1A = "vc-collapse";
5058
+ const COMPONENT_NAME$1B = "vc-collapse";
5050
5059
  const Collapse = vue.defineComponent({
5051
- name: COMPONENT_NAME$1A,
5052
- props: props$11,
5060
+ name: COMPONENT_NAME$1B,
5061
+ props: props$12,
5053
5062
  emits: ["update:moodelValue", "change"],
5054
5063
  setup(props, { slots, emit }) {
5055
5064
  const instance = vue.getCurrentInstance();
@@ -5134,7 +5143,7 @@ const Collapse = vue.defineComponent({
5134
5143
  }
5135
5144
  });
5136
5145
 
5137
- const props$10 = {
5146
+ const props$11 = {
5138
5147
  tag: {
5139
5148
  type: String,
5140
5149
  default: "div"
@@ -5144,7 +5153,7 @@ const props$10 = {
5144
5153
  }
5145
5154
  };
5146
5155
 
5147
- const props$$ = {
5156
+ const props$10 = {
5148
5157
  tag: {
5149
5158
  type: String,
5150
5159
  default: "div"
@@ -5162,13 +5171,13 @@ const props$$ = {
5162
5171
 
5163
5172
  /** @jsxImportSource vue */
5164
5173
 
5165
- function _isSlot$2(s) {
5174
+ function _isSlot$3(s) {
5166
5175
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
5167
5176
  }
5168
- const COMPONENT_NAME$1z = 'vc-expand';
5177
+ const COMPONENT_NAME$1A = 'vc-expand';
5169
5178
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
5170
- name: COMPONENT_NAME$1z,
5171
- props: props$$,
5179
+ name: COMPONENT_NAME$1A,
5180
+ props: props$10,
5172
5181
  setup(props, {
5173
5182
  slots
5174
5183
  }) {
@@ -5186,7 +5195,7 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
5186
5195
  enter: 200,
5187
5196
  leave: 200
5188
5197
  }
5189
- }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
5198
+ }, _isSlot$3(_slot = vue.withDirectives(vue.createVNode(Content, null, {
5190
5199
  default: () => [(props.alive || !props.alive && isActive.value) && slots.default?.()]
5191
5200
  }), [[vue.vShow, isActive.value]])) ? _slot : {
5192
5201
  default: () => [_slot]
@@ -5197,10 +5206,10 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
5197
5206
 
5198
5207
  /** @jsxImportSource vue */
5199
5208
 
5200
- const COMPONENT_NAME$1y = 'vc-collapse-item';
5209
+ const COMPONENT_NAME$1z = 'vc-collapse-item';
5201
5210
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
5202
- name: COMPONENT_NAME$1y,
5203
- props: props$10,
5211
+ name: COMPONENT_NAME$1z,
5212
+ props: props$11,
5204
5213
  setup(props, {
5205
5214
  slots,
5206
5215
  expose
@@ -5265,7 +5274,7 @@ const CollapseItem = /* @__PURE__ */ vue.defineComponent({
5265
5274
  const MCollapse = Collapse;
5266
5275
  const MCollapseItem = CollapseItem;
5267
5276
 
5268
- const props$_ = {
5277
+ const props$$ = {
5269
5278
  tag: {
5270
5279
  type: String,
5271
5280
  default: "div"
@@ -5274,10 +5283,10 @@ const props$_ = {
5274
5283
 
5275
5284
  /** @jsxImportSource vue */
5276
5285
 
5277
- const COMPONENT_NAME$1x = 'vc-color-picker';
5286
+ const COMPONENT_NAME$1y = 'vc-color-picker';
5278
5287
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
5279
- name: COMPONENT_NAME$1x,
5280
- props: props$_,
5288
+ name: COMPONENT_NAME$1y,
5289
+ props: props$$,
5281
5290
  setup(props, {
5282
5291
  slots
5283
5292
  }) {
@@ -5291,7 +5300,7 @@ const ColorPicker = /* @__PURE__ */ vue.defineComponent({
5291
5300
 
5292
5301
  const MColorPicker = ColorPicker;
5293
5302
 
5294
- const props$Z = {
5303
+ const props$_ = {
5295
5304
  tag: {
5296
5305
  type: String,
5297
5306
  default: "span"
@@ -5336,14 +5345,14 @@ const formatter = (format, arr) => {
5336
5345
 
5337
5346
  /** @jsxImportSource vue */
5338
5347
 
5339
- function _isSlot$1(s) {
5348
+ function _isSlot$2(s) {
5340
5349
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
5341
5350
  }
5342
- const COMPONENT_NAME$1w = 'vc-countdown';
5351
+ const COMPONENT_NAME$1x = 'vc-countdown';
5343
5352
  const Countdown = /* @__PURE__ */ vue.defineComponent({
5344
- name: COMPONENT_NAME$1w,
5345
- props: props$Z,
5346
- emits: ['change', 'finish', 'error'],
5353
+ name: COMPONENT_NAME$1x,
5354
+ props: props$_,
5355
+ emits: ['change', 'complete', 'error'],
5347
5356
  setup(props, {
5348
5357
  emit,
5349
5358
  slots
@@ -5433,7 +5442,7 @@ const Countdown = /* @__PURE__ */ vue.defineComponent({
5433
5442
  second: '00',
5434
5443
  millisecond: '00'
5435
5444
  });
5436
- emit('finish');
5445
+ emit('complete');
5437
5446
  } else {
5438
5447
  emit('change', {
5439
5448
  timestamp,
@@ -5471,7 +5480,7 @@ const Countdown = /* @__PURE__ */ vue.defineComponent({
5471
5480
  return (// @ts-ignore
5472
5481
  vue.createVNode(Content, {
5473
5482
  "class": "vc-countdown"
5474
- }, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
5483
+ }, _isSlot$2(_slot = slots.default(binds.value)) ? _slot : {
5475
5484
  default: () => [_slot]
5476
5485
  })
5477
5486
  );
@@ -5494,6 +5503,345 @@ const Countdown = /* @__PURE__ */ vue.defineComponent({
5494
5503
 
5495
5504
  const MCountdown = Countdown;
5496
5505
 
5506
+ const props$Z = {
5507
+ tag: {
5508
+ type: String,
5509
+ default: "span"
5510
+ },
5511
+ value: [Number, String],
5512
+ placeholder: String,
5513
+ precision: {
5514
+ type: Number,
5515
+ default: 0
5516
+ },
5517
+ duration: {
5518
+ type: Number,
5519
+ default: 500
5520
+ },
5521
+ decimal: {
5522
+ type: String,
5523
+ default: "."
5524
+ },
5525
+ separator: {
5526
+ type: String,
5527
+ default: ","
5528
+ },
5529
+ numerals: {
5530
+ type: Array,
5531
+ default: () => []
5532
+ },
5533
+ smartEasingThreshold: {
5534
+ type: Number,
5535
+ default: 999
5536
+ },
5537
+ smartEasingAmount: {
5538
+ type: Number,
5539
+ default: 333
5540
+ },
5541
+ easing: {
5542
+ type: [Function, Boolean],
5543
+ default: true
5544
+ },
5545
+ // 10.90 -> 10.9
5546
+ zeroless: {
5547
+ type: Boolean,
5548
+ default: false
5549
+ },
5550
+ // 为true时,自行管理start/update
5551
+ controllable: {
5552
+ type: Boolean,
5553
+ default: false
5554
+ },
5555
+ render: Function
5556
+ };
5557
+
5558
+ const separated2value = (value, options) => {
5559
+ if (typeof value === "number" || typeof value !== "string") return value;
5560
+ const escapeRegExp = (s) => s.replace(/([.,' ])/g, "\\$1");
5561
+ const sep = escapeRegExp(options.separator);
5562
+ const dec = escapeRegExp(options.decimal);
5563
+ const num = (value || "").replace(new RegExp(sep, "g"), "").replace(new RegExp(dec, "g"), ".");
5564
+ return parseFloat(num);
5565
+ };
5566
+ const value2separated = (value, options) => {
5567
+ const num = typeof value === "number" ? value : parseFloat(value);
5568
+ if (value === "" || Number.isNaN(num)) {
5569
+ return {
5570
+ negative: "",
5571
+ integer: "",
5572
+ decimal: "",
5573
+ separated: "",
5574
+ float: "",
5575
+ value: ""
5576
+ };
5577
+ }
5578
+ const negative = num < 0 ? "-" : "";
5579
+ let [integer, decimal = ""] = `${Math.abs(num)}`.split(".");
5580
+ let separated = integer;
5581
+ if (options.separator) {
5582
+ let v = "";
5583
+ let j = 0;
5584
+ const factor = 3;
5585
+ for (let i = 0, len = separated.length; i < len; ++i) {
5586
+ if (i !== 0 && j % factor === 0) {
5587
+ v = options.separator + v;
5588
+ }
5589
+ j++;
5590
+ v = separated[len - i - 1] + v;
5591
+ }
5592
+ separated = v;
5593
+ }
5594
+ const precision$ = options.zeroless ? Math.min(options.precision, decimal.length) : options.precision;
5595
+ if (precision$) {
5596
+ decimal = decimal.slice(0, precision$).padEnd(precision$, "0");
5597
+ } else {
5598
+ decimal = "";
5599
+ }
5600
+ if (options?.numerals?.length) {
5601
+ separated = separated.replace(/[0-9]/g, (w) => options.numerals[+w]);
5602
+ decimal = decimal.replace(/[0-9]/g, (w) => options.numerals[+w]);
5603
+ }
5604
+ const _decimal = decimal ? options.decimal + decimal : "";
5605
+ return {
5606
+ negative,
5607
+ integer,
5608
+ decimal,
5609
+ separated,
5610
+ float: `${negative}${integer}${_decimal}`,
5611
+ value: `${negative}${separated}${_decimal}`
5612
+ };
5613
+ };
5614
+
5615
+ /** @jsxImportSource vue */
5616
+
5617
+ function _isSlot$1(s) {
5618
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
5619
+ }
5620
+ const COMPONENT_NAME$1w = 'vc-counter';
5621
+ const Counter = /* @__PURE__ */ vue.defineComponent({
5622
+ name: COMPONENT_NAME$1w,
5623
+ props: props$Z,
5624
+ emits: ['begin', 'complete', 'change'],
5625
+ setup(props, {
5626
+ emit,
5627
+ expose,
5628
+ slots
5629
+ }) {
5630
+ const startTime = vue.ref(null);
5631
+ const duration = vue.ref(props.duration);
5632
+ const remaining = vue.ref(duration.value);
5633
+ const startVal = vue.ref(0);
5634
+ const endVal = vue.ref(separated2value(props.value, props));
5635
+ const frameVal = vue.ref(startVal.value);
5636
+ const finalEndVal = vue.ref(null);
5637
+ const useEasing = vue.ref(!!props.easing);
5638
+ const isStart = vue.ref(false);
5639
+ const isPaused = vue.ref(false);
5640
+ const isComplete = vue.ref(false);
5641
+ const countdown = vue.ref(false);
5642
+ const rAF = vue.ref(null);
5643
+ const prints = vue.reactive({
5644
+ negative: '',
5645
+ integer: '',
5646
+ decimal: '',
5647
+ separated: '',
5648
+ float: '',
5649
+ value: ''
5650
+ });
5651
+
5652
+ // t: current time, b: beginning value, c: change in value, d: duration
5653
+ const easing = vue.computed(() => {
5654
+ return typeof props.easing === 'function' ? props.easing : (t, b, c, d) => c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
5655
+ });
5656
+ const displayValue = vue.computed(() => {
5657
+ if (props.value === '' || typeof props.value !== 'string' && typeof props.value !== 'number') {
5658
+ return props.placeholder;
5659
+ }
5660
+ return prints.value;
5661
+ });
5662
+ const binds = vue.computed(() => {
5663
+ return {
5664
+ ...prints,
5665
+ value: displayValue.value
5666
+ };
5667
+ });
5668
+ const determineDirectionAndSmartEasing = () => {
5669
+ const v = finalEndVal.value !== null ? finalEndVal.value : endVal.value;
5670
+ countdown.value = startVal.value > v;
5671
+ const animateAmount = v - startVal.value;
5672
+ if (Math.abs(animateAmount) > props.smartEasingThreshold && props.easing) {
5673
+ finalEndVal.value = v;
5674
+ const up = countdown.value ? 1 : -1;
5675
+ endVal.value = v + up * props.smartEasingAmount;
5676
+ duration.value = duration.value / 2;
5677
+ } else {
5678
+ endVal.value = v;
5679
+ finalEndVal.value = null;
5680
+ }
5681
+ if (finalEndVal.value !== null) {
5682
+ useEasing.value = false;
5683
+ } else {
5684
+ useEasing.value = !!props.easing;
5685
+ }
5686
+ };
5687
+ const run = () => {
5688
+ const done = timestamp => {
5689
+ if (!startTime.value) {
5690
+ startTime.value = timestamp;
5691
+ }
5692
+ const progress = timestamp - startTime.value;
5693
+ remaining.value = duration.value - progress;
5694
+ if (useEasing.value) {
5695
+ if (countdown.value) {
5696
+ frameVal.value = startVal.value - easing.value(progress, 0, startVal.value - endVal.value, duration.value);
5697
+ } else {
5698
+ frameVal.value = easing.value(progress, startVal.value, endVal.value - startVal.value, duration.value);
5699
+ }
5700
+ } else {
5701
+ frameVal.value = startVal.value + (endVal.value - startVal.value) * (progress / duration.value);
5702
+ }
5703
+ const wentPast = countdown.value ? frameVal.value < endVal.value : frameVal.value > endVal.value;
5704
+ frameVal.value = wentPast ? endVal.value : frameVal.value;
5705
+ print(frameVal.value);
5706
+ if (progress < duration.value) {
5707
+ rAF.value = requestAnimationFrame(done);
5708
+ } else if (finalEndVal.value !== null) {
5709
+ update(finalEndVal.value);
5710
+ } else {
5711
+ emit('complete');
5712
+ isComplete.value = true;
5713
+ }
5714
+ };
5715
+ determineDirectionAndSmartEasing();
5716
+ rAF.value = requestAnimationFrame(done);
5717
+ };
5718
+ const print = num => {
5719
+ Object.assign(prints, value2separated(num, props));
5720
+ emit('change', prints);
5721
+ };
5722
+ const resetDuration = () => {
5723
+ startTime.value = null;
5724
+ duration.value = props.duration;
5725
+ remaining.value = duration.value;
5726
+ };
5727
+ const cancel = () => {
5728
+ if (rAF.value === null || typeof rAF.value === 'undefined') return;
5729
+ cancelAnimationFrame(rAF.value);
5730
+ };
5731
+ const start = () => {
5732
+ if (isComplete.value || isStart.value) return;
5733
+ cancel();
5734
+ resetDuration();
5735
+ isPaused.value = false;
5736
+ isComplete.value = false;
5737
+ startVal.value = 0;
5738
+ frameVal.value = 0;
5739
+ isStart.value = true;
5740
+ emit('begin');
5741
+ if (duration.value > 0) {
5742
+ run();
5743
+ } else {
5744
+ print(endVal.value);
5745
+ }
5746
+ };
5747
+ const pause = () => {
5748
+ if (isComplete.value) return;
5749
+ if (!isPaused.value) {
5750
+ cancel();
5751
+ }
5752
+ isPaused.value = true;
5753
+ };
5754
+ const resume = () => {
5755
+ if (isComplete.value) return;
5756
+ if (isPaused.value) {
5757
+ startTime.value = null;
5758
+ duration.value = remaining.value;
5759
+ startVal.value = frameVal.value;
5760
+ run();
5761
+ }
5762
+ isPaused.value = false;
5763
+ };
5764
+ const update = newEndVal => {
5765
+ if (!isStart.value) return;
5766
+ cancel();
5767
+ startTime.value = null;
5768
+ endVal.value = +newEndVal;
5769
+ if (endVal.value === frameVal.value) {
5770
+ return;
5771
+ }
5772
+ startVal.value = frameVal.value;
5773
+ if (finalEndVal.value === null) {
5774
+ resetDuration();
5775
+ }
5776
+ finalEndVal.value = null;
5777
+ run();
5778
+ };
5779
+ const end = () => {
5780
+ if (isComplete.value) return;
5781
+ cancel();
5782
+ resetDuration();
5783
+ startVal.value = +props.value;
5784
+ frameVal.value = startVal.value;
5785
+ print(frameVal.value);
5786
+ emit('complete');
5787
+ isComplete.value = true;
5788
+ };
5789
+ const restart = () => {
5790
+ isStart.value = false;
5791
+ isComplete.value = false;
5792
+ start();
5793
+ };
5794
+ vue.watch(() => props.value, () => {
5795
+ if (props.controllable || !isStart.value) return;
5796
+ update(props.value);
5797
+ });
5798
+ vue.watch(() => props.precision, () => {
5799
+ if (props.controllable || !isStart.value || !isComplete.value) return;
5800
+ print(+props.value);
5801
+ });
5802
+ expose({
5803
+ start,
5804
+ pause,
5805
+ resume,
5806
+ update,
5807
+ end,
5808
+ restart,
5809
+ cancel,
5810
+ print
5811
+ });
5812
+ vue.onMounted(() => !props.controllable && start());
5813
+ vue.onBeforeUnmount(cancel);
5814
+ const Content = props.tag;
5815
+ return () => {
5816
+ if (slots.default) {
5817
+ let _slot;
5818
+ return (// @ts-ignore
5819
+ vue.createVNode(Content, {
5820
+ "class": "vc-counter"
5821
+ }, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
5822
+ default: () => [_slot]
5823
+ })
5824
+ );
5825
+ }
5826
+ if (props.render) {
5827
+ return vue.createVNode(Customer, vue.mergeProps({
5828
+ "class": "vc-counter",
5829
+ "render": props.render
5830
+ }, binds.value), null);
5831
+ }
5832
+ return (// @ts-ignore
5833
+ vue.createVNode(Content, {
5834
+ "class": "vc-counter"
5835
+ }, {
5836
+ default: () => [displayValue.value]
5837
+ })
5838
+ );
5839
+ };
5840
+ }
5841
+ });
5842
+
5843
+ const MCounter = Counter;
5844
+
5497
5845
  const props$Y = {
5498
5846
  type: {
5499
5847
  type: String,
@@ -5517,8 +5865,8 @@ const popoverKeys = [
5517
5865
  "portalClass"
5518
5866
  ];
5519
5867
  const props$X = {
5520
- ...lodashEs.pick(props$1c, popoverKeys),
5521
- ...lodashEs.pick(props$1g, inputKeys$1),
5868
+ ...lodashEs.pick(props$1d, popoverKeys),
5869
+ ...lodashEs.pick(props$1h, inputKeys$1),
5522
5870
  type: String,
5523
5871
  placeholder: String,
5524
5872
  clearable: {
@@ -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;