@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.
@@ -14,31 +14,38 @@ var VcComponents = (function (exports, vue) {
14
14
 
15
15
  const nil = void 0;
16
16
  const defaults$3 = {
17
- UploadPicker: {
18
- enhancer: nil
19
- },
20
17
  Editor: {
21
18
  options: nil,
22
19
  enhancer: nil
23
20
  },
24
- Theme: {
25
- variables: VARIABLES
26
- },
27
21
  Portal: {
28
22
  install: nil
29
23
  },
30
- Upload: {
31
- onRequest: nil,
32
- onResponse: nil,
33
- onMessage: nil
34
- },
35
- TableColumn: {
36
- line: nil
24
+ RecycleList: {
25
+ renderRefresh: nil,
26
+ renderPlaceholder: nil,
27
+ renderLoading: nil,
28
+ renderComplete: nil,
29
+ renderEmpty: nil
37
30
  },
38
31
  Snapshot: {
39
32
  options: nil,
40
33
  source: nil,
41
34
  download: nil
35
+ },
36
+ TableColumn: {
37
+ line: nil
38
+ },
39
+ Theme: {
40
+ variables: VARIABLES
41
+ },
42
+ Upload: {
43
+ onRequest: nil,
44
+ onResponse: nil,
45
+ onMessage: nil
46
+ },
47
+ UploadPicker: {
48
+ enhancer: nil
42
49
  }
43
50
  };
44
51
 
@@ -67,7 +74,7 @@ var VcComponents = (function (exports, vue) {
67
74
  }
68
75
  const VcInstance = new Instance();
69
76
 
70
- const props$1t = {
77
+ const props$1u = {
71
78
  tag: {
72
79
  type: String,
73
80
  default: "div"
@@ -76,10 +83,10 @@ var VcComponents = (function (exports, vue) {
76
83
 
77
84
  /** @jsxImportSource vue */
78
85
 
79
- const COMPONENT_NAME$29 = 'vc-action-sheet';
86
+ const COMPONENT_NAME$2a = 'vc-action-sheet';
80
87
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
81
- name: COMPONENT_NAME$29,
82
- props: props$1t,
88
+ name: COMPONENT_NAME$2a,
89
+ props: props$1u,
83
90
  setup(props, {
84
91
  slots
85
92
  }) {
@@ -93,7 +100,7 @@ var VcComponents = (function (exports, vue) {
93
100
 
94
101
  const MActionSheet = ActionSheet;
95
102
 
96
- const props$1s = {
103
+ const props$1t = {
97
104
  modelValue: {
98
105
  type: Boolean,
99
106
  default: false
@@ -371,11 +378,11 @@ var VcComponents = (function (exports, vue) {
371
378
 
372
379
  /** @jsxImportSource vue */
373
380
 
374
- const COMPONENT_NAME$28 = 'vc-affix';
381
+ const COMPONENT_NAME$29 = 'vc-affix';
375
382
  const Affix = /* @__PURE__ */ vue.defineComponent({
376
- name: COMPONENT_NAME$28,
383
+ name: COMPONENT_NAME$29,
377
384
  emits: ['update:modelValue'],
378
- props: props$1s,
385
+ props: props$1t,
379
386
  setup(props, {
380
387
  slots,
381
388
  expose,
@@ -541,7 +548,7 @@ var VcComponents = (function (exports, vue) {
541
548
 
542
549
  const MAffix = Affix;
543
550
 
544
- const props$1r = {
551
+ const props$1s = {
545
552
  modelValue: {
546
553
  type: Boolean,
547
554
  default: true
@@ -568,7 +575,7 @@ var VcComponents = (function (exports, vue) {
568
575
  }
569
576
  };
570
577
 
571
- const props$1q = {
578
+ const props$1r = {
572
579
  type: String,
573
580
  inherit: {
574
581
  type: Boolean,
@@ -705,10 +712,10 @@ var VcComponents = (function (exports, vue) {
705
712
 
706
713
  /** @jsxImportSource vue */
707
714
 
708
- const COMPONENT_NAME$27 = 'vc-icon';
715
+ const COMPONENT_NAME$28 = 'vc-icon';
709
716
  const Icon = /* @__PURE__ */ vue.defineComponent({
710
- name: COMPONENT_NAME$27,
711
- props: props$1q,
717
+ name: COMPONENT_NAME$28,
718
+ props: props$1r,
712
719
  setup(props) {
713
720
  const viewBox = vue.ref('0 0 1024 1024');
714
721
  const path = vue.ref([]);
@@ -741,7 +748,7 @@ var VcComponents = (function (exports, vue) {
741
748
  }
742
749
  });
743
750
 
744
- const props$1p = {
751
+ const props$1q = {
745
752
  /**
746
753
  * 进入/离开持续时间
747
754
  * {enter: 300, leave: 300}
@@ -906,10 +913,10 @@ var VcComponents = (function (exports, vue) {
906
913
  };
907
914
  };
908
915
 
909
- const COMPONENT_NAME$26 = "vc-transition";
916
+ const COMPONENT_NAME$27 = "vc-transition";
910
917
  const Transition = vue.defineComponent({
911
- name: COMPONENT_NAME$26,
912
- props: props$1p,
918
+ name: COMPONENT_NAME$27,
919
+ props: props$1q,
913
920
  // 当不声明emits的情况下,事件存在于attrs中
914
921
  inheritAttrs: false,
915
922
  setup(props, { slots, attrs }) {
@@ -929,10 +936,10 @@ var VcComponents = (function (exports, vue) {
929
936
  }
930
937
  });
931
938
 
932
- const COMPONENT_NAME$25 = "vc-transition-collapse";
939
+ const COMPONENT_NAME$26 = "vc-transition-collapse";
933
940
  const TransitionCollapse = vue.defineComponent({
934
- name: COMPONENT_NAME$25,
935
- props: props$1p,
941
+ name: COMPONENT_NAME$26,
942
+ props: props$1q,
936
943
  // 当不声明emits的情况下,事件存在于attrs中
937
944
  inheritAttrs: false,
938
945
  setup(props, { slots, attrs: _attrs }) {
@@ -1046,11 +1053,11 @@ var VcComponents = (function (exports, vue) {
1046
1053
  }
1047
1054
  });
1048
1055
 
1049
- const COMPONENT_NAME$24 = "vc-transition-fade";
1056
+ const COMPONENT_NAME$25 = "vc-transition-fade";
1050
1057
  const TransitionFade = vue.defineComponent({
1051
- name: COMPONENT_NAME$24,
1058
+ name: COMPONENT_NAME$25,
1052
1059
  props: {
1053
- ...props$1p,
1060
+ ...props$1q,
1054
1061
  // inheritAttrs必须是false
1055
1062
  style: {
1056
1063
  type: Object,
@@ -1083,11 +1090,11 @@ var VcComponents = (function (exports, vue) {
1083
1090
  }
1084
1091
  });
1085
1092
 
1086
- const COMPONENT_NAME$23 = "vc-transition-scale";
1093
+ const COMPONENT_NAME$24 = "vc-transition-scale";
1087
1094
  const TransitionScale = vue.defineComponent({
1088
- name: COMPONENT_NAME$23,
1095
+ name: COMPONENT_NAME$24,
1089
1096
  props: {
1090
- ...props$1p,
1097
+ ...props$1q,
1091
1098
  mode: {
1092
1099
  type: String,
1093
1100
  default: "both",
@@ -1125,11 +1132,11 @@ var VcComponents = (function (exports, vue) {
1125
1132
  }
1126
1133
  });
1127
1134
 
1128
- const COMPONENT_NAME$22 = "vc-transition-slide";
1135
+ const COMPONENT_NAME$23 = "vc-transition-slide";
1129
1136
  const TransitionSlide = vue.defineComponent({
1130
- name: COMPONENT_NAME$22,
1137
+ name: COMPONENT_NAME$23,
1131
1138
  props: {
1132
- ...props$1p,
1139
+ ...props$1q,
1133
1140
  mode: {
1134
1141
  type: String,
1135
1142
  default: "left",
@@ -1167,11 +1174,11 @@ var VcComponents = (function (exports, vue) {
1167
1174
  }
1168
1175
  });
1169
1176
 
1170
- const COMPONENT_NAME$21 = "vc-transition-zoom";
1177
+ const COMPONENT_NAME$22 = "vc-transition-zoom";
1171
1178
  const TransitionZoom = vue.defineComponent({
1172
- name: COMPONENT_NAME$21,
1179
+ name: COMPONENT_NAME$22,
1173
1180
  props: {
1174
- ...props$1p,
1181
+ ...props$1q,
1175
1182
  mode: {
1176
1183
  type: String,
1177
1184
  default: "x",
@@ -1211,7 +1218,7 @@ var VcComponents = (function (exports, vue) {
1211
1218
 
1212
1219
  /** @jsxImportSource vue */
1213
1220
 
1214
- const COMPONENT_NAME$20 = 'vc-alert';
1221
+ const COMPONENT_NAME$21 = 'vc-alert';
1215
1222
 
1216
1223
  // [color, borderColor, backgroundColor], -> CSS
1217
1224
  const THEME_MAP = {
@@ -1221,8 +1228,8 @@ var VcComponents = (function (exports, vue) {
1221
1228
  warning: ['#ffbf00', '#ffe58f', '#fffbe6']
1222
1229
  };
1223
1230
  const Alert = /* @__PURE__ */ vue.defineComponent({
1224
- name: COMPONENT_NAME$20,
1225
- props: props$1r,
1231
+ name: COMPONENT_NAME$21,
1232
+ props: props$1s,
1226
1233
  setup(props, {
1227
1234
  slots,
1228
1235
  emit
@@ -1437,7 +1444,7 @@ var VcComponents = (function (exports, vue) {
1437
1444
  return flatten$1(value, JSON.parse);
1438
1445
  };
1439
1446
 
1440
- const props$1o = {
1447
+ const props$1p = {
1441
1448
  // canvas配置参数
1442
1449
  options: Object,
1443
1450
  width: {
@@ -1453,10 +1460,10 @@ var VcComponents = (function (exports, vue) {
1453
1460
  /** @jsxImportSource vue */
1454
1461
 
1455
1462
  const isTouch = typeof document !== 'undefined' && 'ontouchend' in document;
1456
- const COMPONENT_NAME$1$ = 'vc-artboard';
1463
+ const COMPONENT_NAME$20 = 'vc-artboard';
1457
1464
  const Artboard = /* @__PURE__ */ vue.defineComponent({
1458
- name: COMPONENT_NAME$1$,
1459
- props: props$1o,
1465
+ name: COMPONENT_NAME$20,
1466
+ props: props$1p,
1460
1467
  setup(props, {
1461
1468
  emit,
1462
1469
  expose
@@ -1659,7 +1666,7 @@ var VcComponents = (function (exports, vue) {
1659
1666
 
1660
1667
  const MArtboard = Artboard;
1661
1668
 
1662
- const props$1n = {
1669
+ const props$1o = {
1663
1670
  size: {
1664
1671
  type: Number,
1665
1672
  default: 28
@@ -1683,10 +1690,10 @@ var VcComponents = (function (exports, vue) {
1683
1690
 
1684
1691
  /** @jsxImportSource vue */
1685
1692
 
1686
- const COMPONENT_NAME$1_ = 'vc-spin';
1693
+ const COMPONENT_NAME$1$ = 'vc-spin';
1687
1694
  const Spin = /* @__PURE__ */ vue.defineComponent({
1688
- name: COMPONENT_NAME$1_,
1689
- props: props$1n,
1695
+ name: COMPONENT_NAME$1$,
1696
+ props: props$1o,
1690
1697
  setup(props, {
1691
1698
  slots
1692
1699
  }) {
@@ -6758,7 +6765,7 @@ var VcComponents = (function (exports, vue) {
6758
6765
  });
6759
6766
  }
6760
6767
 
6761
- const props$1m = {
6768
+ const props$1n = {
6762
6769
  wait: {
6763
6770
  type: Number,
6764
6771
  default: 250
@@ -6774,10 +6781,10 @@ var VcComponents = (function (exports, vue) {
6774
6781
  exclude: RegExp
6775
6782
  };
6776
6783
 
6777
- const COMPONENT_NAME$1Z = "vc-debounce";
6784
+ const COMPONENT_NAME$1_ = "vc-debounce";
6778
6785
  const Debounce = vue.defineComponent({
6779
- name: COMPONENT_NAME$1Z,
6780
- props: props$1m,
6786
+ name: COMPONENT_NAME$1_,
6787
+ props: props$1n,
6781
6788
  /**
6782
6789
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
6783
6790
  * 如事件onClick
@@ -6817,7 +6824,7 @@ var VcComponents = (function (exports, vue) {
6817
6824
  }
6818
6825
  });
6819
6826
 
6820
- const props$1l = {
6827
+ const props$1m = {
6821
6828
  tag: {
6822
6829
  type: String,
6823
6830
  default: "button"
@@ -6849,11 +6856,11 @@ var VcComponents = (function (exports, vue) {
6849
6856
 
6850
6857
  /** @jsxImportSource vue */
6851
6858
 
6852
- const COMPONENT_NAME$1Y = 'vc-button';
6859
+ const COMPONENT_NAME$1Z = 'vc-button';
6853
6860
  const Button = /* @__PURE__ */ vue.defineComponent({
6854
- name: COMPONENT_NAME$1Y,
6861
+ name: COMPONENT_NAME$1Z,
6855
6862
  emits: ['click'],
6856
- props: props$1l,
6863
+ props: props$1m,
6857
6864
  setup(props, {
6858
6865
  slots
6859
6866
  }) {
@@ -6914,7 +6921,7 @@ var VcComponents = (function (exports, vue) {
6914
6921
  }
6915
6922
  });
6916
6923
 
6917
- const props$1k = {
6924
+ const props$1l = {
6918
6925
  vertical: {
6919
6926
  type: Boolean,
6920
6927
  default: false
@@ -6935,10 +6942,10 @@ var VcComponents = (function (exports, vue) {
6935
6942
 
6936
6943
  /** @jsxImportSource vue */
6937
6944
 
6938
- const COMPONENT_NAME$1X = 'vc-button-group';
6945
+ const COMPONENT_NAME$1Y = 'vc-button-group';
6939
6946
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
6940
- name: COMPONENT_NAME$1X,
6941
- props: props$1k,
6947
+ name: COMPONENT_NAME$1Y,
6948
+ props: props$1l,
6942
6949
  setup(props, {
6943
6950
  slots
6944
6951
  }) {
@@ -6962,7 +6969,7 @@ var VcComponents = (function (exports, vue) {
6962
6969
  const MButton = Button;
6963
6970
  const MButtonGroup = ButtonGroup;
6964
6971
 
6965
- const props$1j = {
6972
+ const props$1k = {
6966
6973
  tag: {
6967
6974
  type: String,
6968
6975
  default: "div"
@@ -6971,10 +6978,10 @@ var VcComponents = (function (exports, vue) {
6971
6978
 
6972
6979
  /** @jsxImportSource vue */
6973
6980
 
6974
- const COMPONENT_NAME$1W = 'vc-calendar';
6981
+ const COMPONENT_NAME$1X = 'vc-calendar';
6975
6982
  const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
6976
- name: COMPONENT_NAME$1W,
6977
- props: props$1j,
6983
+ name: COMPONENT_NAME$1X,
6984
+ props: props$1k,
6978
6985
  setup(props, {
6979
6986
  slots
6980
6987
  }) {
@@ -6988,7 +6995,7 @@ var VcComponents = (function (exports, vue) {
6988
6995
 
6989
6996
  const MCalendar = Calendar$1;
6990
6997
 
6991
- const props$1i = {
6998
+ const props$1j = {
6992
6999
  border: {
6993
7000
  type: Boolean,
6994
7001
  default: true
@@ -7011,10 +7018,10 @@ var VcComponents = (function (exports, vue) {
7011
7018
 
7012
7019
  /** @jsxImportSource vue */
7013
7020
 
7014
- const COMPONENT_NAME$1V = 'vc-card';
7021
+ const COMPONENT_NAME$1W = 'vc-card';
7015
7022
  const Card = /* @__PURE__ */ vue.defineComponent({
7016
- name: COMPONENT_NAME$1V,
7017
- props: props$1i,
7023
+ name: COMPONENT_NAME$1W,
7024
+ props: props$1j,
7018
7025
  setup(props, {
7019
7026
  slots
7020
7027
  }) {
@@ -7040,7 +7047,7 @@ var VcComponents = (function (exports, vue) {
7040
7047
 
7041
7048
  const MCard = Card;
7042
7049
 
7043
- const props$1h = {
7050
+ const props$1i = {
7044
7051
  tag: {
7045
7052
  type: String,
7046
7053
  default: "div"
@@ -7049,10 +7056,10 @@ var VcComponents = (function (exports, vue) {
7049
7056
 
7050
7057
  /** @jsxImportSource vue */
7051
7058
 
7052
- const COMPONENT_NAME$1U = 'vc-carousel';
7059
+ const COMPONENT_NAME$1V = 'vc-carousel';
7053
7060
  const Carousel = /* @__PURE__ */ vue.defineComponent({
7054
- name: COMPONENT_NAME$1U,
7055
- props: props$1h,
7061
+ name: COMPONENT_NAME$1V,
7062
+ props: props$1i,
7056
7063
  setup(props, {
7057
7064
  slots
7058
7065
  }) {
@@ -7156,7 +7163,7 @@ var VcComponents = (function (exports, vue) {
7156
7163
  });
7157
7164
  };
7158
7165
 
7159
- const props$1g = {
7166
+ const props$1h = {
7160
7167
  // Array, 作为select等数组存放临时值
7161
7168
  modelValue: [String, Number, Array],
7162
7169
  disabled: {
@@ -7408,12 +7415,12 @@ var VcComponents = (function (exports, vue) {
7408
7415
 
7409
7416
  /** @jsxImportSource vue */
7410
7417
 
7411
- const COMPONENT_NAME$1T = 'vc-input';
7418
+ const COMPONENT_NAME$1U = 'vc-input';
7412
7419
  const Input$1 = /* @__PURE__ */ vue.defineComponent({
7413
- name: COMPONENT_NAME$1T,
7420
+ name: COMPONENT_NAME$1U,
7414
7421
  inheritAttrs: false,
7415
7422
  props: {
7416
- ...props$1g,
7423
+ ...props$1h,
7417
7424
  indicator: {
7418
7425
  type: [Boolean, Object],
7419
7426
  default: false
@@ -7515,8 +7522,8 @@ var VcComponents = (function (exports, vue) {
7515
7522
  }
7516
7523
  });
7517
7524
 
7518
- const props$1f = {
7519
- ...props$1g,
7525
+ const props$1g = {
7526
+ ...props$1h,
7520
7527
  min: {
7521
7528
  type: Number,
7522
7529
  default: 0
@@ -7745,10 +7752,10 @@ var VcComponents = (function (exports, vue) {
7745
7752
 
7746
7753
  /** @jsxImportSource vue */
7747
7754
 
7748
- const COMPONENT_NAME$1S = 'vc-input-number';
7755
+ const COMPONENT_NAME$1T = 'vc-input-number';
7749
7756
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
7750
- name: COMPONENT_NAME$1S,
7751
- props: props$1f,
7757
+ name: COMPONENT_NAME$1T,
7758
+ props: props$1g,
7752
7759
  inheritAttrs: false,
7753
7760
  setup(props, {
7754
7761
  slots,
@@ -7801,8 +7808,8 @@ var VcComponents = (function (exports, vue) {
7801
7808
  }
7802
7809
  });
7803
7810
 
7804
- const props$1e = {
7805
- ...props$1g,
7811
+ const props$1f = {
7812
+ ...props$1h,
7806
7813
  enterText: {
7807
7814
  type: [Boolean, String],
7808
7815
  default: true
@@ -7811,10 +7818,10 @@ var VcComponents = (function (exports, vue) {
7811
7818
 
7812
7819
  /** @jsxImportSource vue */
7813
7820
 
7814
- const COMPONENT_NAME$1R = 'vc-input-search';
7821
+ const COMPONENT_NAME$1S = 'vc-input-search';
7815
7822
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
7816
- name: COMPONENT_NAME$1R,
7817
- props: props$1e,
7823
+ name: COMPONENT_NAME$1S,
7824
+ props: props$1f,
7818
7825
  inheritAttrs: false,
7819
7826
  setup(props, {
7820
7827
  emit,
@@ -7846,7 +7853,7 @@ var VcComponents = (function (exports, vue) {
7846
7853
  }
7847
7854
  });
7848
7855
 
7849
- const props$1d = {
7856
+ const props$1e = {
7850
7857
  modelValue: Boolean,
7851
7858
  animation: String,
7852
7859
  placement: {
@@ -7925,7 +7932,7 @@ var VcComponents = (function (exports, vue) {
7925
7932
  "autoWidth",
7926
7933
  "always"
7927
7934
  ];
7928
- const props$1c = {
7935
+ const props$1d = {
7929
7936
  trigger: {
7930
7937
  type: String,
7931
7938
  default: "hover",
@@ -7943,7 +7950,7 @@ var VcComponents = (function (exports, vue) {
7943
7950
  type: Boolean,
7944
7951
  default: true
7945
7952
  },
7946
- ...pick(props$1d, wrapperKeys)
7953
+ ...pick(props$1e, wrapperKeys)
7947
7954
  };
7948
7955
 
7949
7956
  class Resize {
@@ -8262,17 +8269,17 @@ var VcComponents = (function (exports, vue) {
8262
8269
  };
8263
8270
  };
8264
8271
 
8265
- const props$1b = {
8272
+ const props$1c = {
8266
8273
  render: {
8267
8274
  type: Function,
8268
8275
  default: () => null
8269
8276
  }
8270
8277
  };
8271
8278
 
8272
- const COMPONENT_NAME$1Q = "vc-customer";
8279
+ const COMPONENT_NAME$1R = "vc-customer";
8273
8280
  const Customer = vue.defineComponent({
8274
- name: COMPONENT_NAME$1Q,
8275
- props: props$1b,
8281
+ name: COMPONENT_NAME$1R,
8282
+ props: props$1c,
8276
8283
  setup(props, context) {
8277
8284
  return () => vue.h(() => {
8278
8285
  return props.render(context.attrs, context);
@@ -8406,7 +8413,7 @@ var VcComponents = (function (exports, vue) {
8406
8413
  }
8407
8414
  }
8408
8415
 
8409
- const COMPONENT_NAME$1P = "vc-portal";
8416
+ const COMPONENT_NAME$1Q = "vc-portal";
8410
8417
  class Portal {
8411
8418
  /**
8412
8419
  * 清理Portals类型组件
@@ -8456,7 +8463,7 @@ var VcComponents = (function (exports, vue) {
8456
8463
  this.wrapper = wrapper;
8457
8464
  this.globalOptions = {
8458
8465
  ...options,
8459
- name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1P)
8466
+ name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1Q)
8460
8467
  };
8461
8468
  }
8462
8469
  popup(propsData, options) {
@@ -8554,7 +8561,7 @@ var VcComponents = (function (exports, vue) {
8554
8561
  ...rest
8555
8562
  } = options;
8556
8563
  let useAllNodes = fragment;
8557
- const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1P)}` : name$;
8564
+ const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1Q)}` : name$;
8558
8565
  const container = document.createElement(tag);
8559
8566
  const root = typeof el === "object" ? el : document.querySelector(el || "body");
8560
8567
  !alive && Portal.leafs.get(name)?.destroy();
@@ -8588,7 +8595,7 @@ var VcComponents = (function (exports, vue) {
8588
8595
  } else {
8589
8596
  const wrapper = this.wrapper;
8590
8597
  const app = vue.createApp({
8591
- name: COMPONENT_NAME$1P,
8598
+ name: COMPONENT_NAME$1Q,
8592
8599
  parent,
8593
8600
  setup() {
8594
8601
  if (alive) {
@@ -8692,21 +8699,21 @@ var VcComponents = (function (exports, vue) {
8692
8699
  }
8693
8700
  }
8694
8701
 
8695
- const props$1a = {
8702
+ const props$1b = {
8696
8703
  tag: {
8697
8704
  type: String,
8698
8705
  default: "div"
8699
8706
  }
8700
8707
  };
8701
8708
 
8702
- const COMPONENT_NAME$1O = 'vc-portal-view';
8709
+ const COMPONENT_NAME$1P = 'vc-portal-view';
8703
8710
 
8704
8711
  /**
8705
8712
  * 写法不同,但与vue@2.x 保持一致
8706
8713
  */
8707
8714
  const PortalView = /* @__PURE__ */ vue.defineComponent({
8708
- name: COMPONENT_NAME$1O,
8709
- props: props$1a,
8715
+ name: COMPONENT_NAME$1P,
8716
+ props: props$1b,
8710
8717
  setup(props, {
8711
8718
  slots
8712
8719
  }) {
@@ -8725,10 +8732,10 @@ var VcComponents = (function (exports, vue) {
8725
8732
 
8726
8733
  /** @jsxImportSource vue */
8727
8734
 
8728
- const COMPONENT_NAME$1N = 'vc-popover-wrapper';
8735
+ const COMPONENT_NAME$1O = 'vc-popover-wrapper';
8729
8736
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
8730
- name: COMPONENT_NAME$1N,
8731
- props: props$1d,
8737
+ name: COMPONENT_NAME$1O,
8738
+ props: props$1e,
8732
8739
  emits: ['portal-fulfilled', 'close'],
8733
8740
  setup(props, {
8734
8741
  emit,
@@ -8985,10 +8992,10 @@ var VcComponents = (function (exports, vue) {
8985
8992
 
8986
8993
  /** @jsxImportSource vue */
8987
8994
 
8988
- const COMPONENT_NAME$1M = 'vc-popover';
8995
+ const COMPONENT_NAME$1N = 'vc-popover';
8989
8996
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
8990
- name: COMPONENT_NAME$1M,
8991
- props: props$1c,
8997
+ name: COMPONENT_NAME$1N,
8998
+ props: props$1d,
8992
8999
  emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
8993
9000
  setup(props, {
8994
9001
  emit,
@@ -9131,9 +9138,9 @@ var VcComponents = (function (exports, vue) {
9131
9138
 
9132
9139
  /** @jsxImportSource vue */
9133
9140
 
9134
- const COMPONENT_NAME$1L = 'vc-cascader-column';
9141
+ const COMPONENT_NAME$1M = 'vc-cascader-column';
9135
9142
  const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
9136
- name: COMPONENT_NAME$1L,
9143
+ name: COMPONENT_NAME$1M,
9137
9144
  emits: ['click', 'change'],
9138
9145
  props: {
9139
9146
  data: {
@@ -9251,9 +9258,9 @@ var VcComponents = (function (exports, vue) {
9251
9258
  "portal",
9252
9259
  "portalClass"
9253
9260
  ];
9254
- const props$19 = {
9255
- ...pick(props$1c, popoverKeys$1),
9256
- ...pick(props$1g, inputKeys$2),
9261
+ const props$1a = {
9262
+ ...pick(props$1d, popoverKeys$1),
9263
+ ...pick(props$1h, inputKeys$2),
9257
9264
  renderOption: [Function],
9258
9265
  renderOptionGroup: [Function],
9259
9266
  data: {
@@ -9319,8 +9326,8 @@ var VcComponents = (function (exports, vue) {
9319
9326
  label: String
9320
9327
  };
9321
9328
 
9322
- const props$18 = {
9323
- ...props$19,
9329
+ const props$19 = {
9330
+ ...props$1a,
9324
9331
  data: {
9325
9332
  type: Array,
9326
9333
  default: () => []
@@ -9341,11 +9348,11 @@ var VcComponents = (function (exports, vue) {
9341
9348
 
9342
9349
  /** @jsxImportSource vue */
9343
9350
 
9344
- const COMPONENT_NAME$1K = 'vc-cascader';
9351
+ const COMPONENT_NAME$1L = 'vc-cascader';
9345
9352
  const Cascader = /* @__PURE__ */ vue.defineComponent({
9346
- name: COMPONENT_NAME$1K,
9353
+ name: COMPONENT_NAME$1L,
9347
9354
  inheritAttrs: false,
9348
- props: props$18,
9355
+ props: props$19,
9349
9356
  emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
9350
9357
  setup(props, {
9351
9358
  emit,
@@ -9681,7 +9688,7 @@ var VcComponents = (function (exports, vue) {
9681
9688
  "contextmenu"
9682
9689
  ];
9683
9690
 
9684
- const props$17 = {
9691
+ const props$18 = {
9685
9692
  options: Object,
9686
9693
  pluginOptions: Object,
9687
9694
  theme: [String, Object],
@@ -9696,10 +9703,10 @@ var VcComponents = (function (exports, vue) {
9696
9703
 
9697
9704
  /** @jsxImportSource vue */
9698
9705
 
9699
- const COMPONENT_NAME$1J = 'vc-chart';
9706
+ const COMPONENT_NAME$1K = 'vc-chart';
9700
9707
  const Chart = /* @__PURE__ */ vue.defineComponent({
9701
- name: COMPONENT_NAME$1J,
9702
- props: props$17,
9708
+ name: COMPONENT_NAME$1K,
9709
+ props: props$18,
9703
9710
  emits: [...EVENTS$1, 'ready'],
9704
9711
  setup(props, {
9705
9712
  emit,
@@ -9803,6 +9810,8 @@ var VcComponents = (function (exports, vue) {
9803
9810
  }
9804
9811
  });
9805
9812
  });
9813
+
9814
+ // 如果存在内存泄漏,chart.value.getOption() 获取配置项,查看series参数等情况
9806
9815
  expose({
9807
9816
  chart,
9808
9817
  refresh
@@ -9819,7 +9828,7 @@ var VcComponents = (function (exports, vue) {
9819
9828
 
9820
9829
  const MChart = Chart;
9821
9830
 
9822
- const props$16 = {
9831
+ const props$17 = {
9823
9832
  disabled: {
9824
9833
  type: Boolean,
9825
9834
  default: false
@@ -9935,10 +9944,10 @@ var VcComponents = (function (exports, vue) {
9935
9944
 
9936
9945
  /** @jsxImportSource vue */
9937
9946
 
9938
- const COMPONENT_NAME$1I = 'vc-checkbox';
9947
+ const COMPONENT_NAME$1J = 'vc-checkbox';
9939
9948
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
9940
- name: COMPONENT_NAME$1I,
9941
- props: props$16,
9949
+ name: COMPONENT_NAME$1J,
9950
+ props: props$17,
9942
9951
  emits: ['update:modelValue', 'change'],
9943
9952
  setup(props, {
9944
9953
  slots
@@ -9975,7 +9984,7 @@ var VcComponents = (function (exports, vue) {
9975
9984
  }
9976
9985
  });
9977
9986
 
9978
- const props$15 = {
9987
+ const props$16 = {
9979
9988
  modelValue: {
9980
9989
  type: Array,
9981
9990
  default: () => []
@@ -10024,10 +10033,10 @@ var VcComponents = (function (exports, vue) {
10024
10033
 
10025
10034
  /** @jsxImportSource vue */
10026
10035
 
10027
- const COMPONENT_NAME$1H = 'vc-checkbox-group';
10036
+ const COMPONENT_NAME$1I = 'vc-checkbox-group';
10028
10037
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
10029
- name: COMPONENT_NAME$1H,
10030
- props: props$15,
10038
+ name: COMPONENT_NAME$1I,
10039
+ props: props$16,
10031
10040
  emits: ['update:modelValue', 'change'],
10032
10041
  setup(props, {
10033
10042
  slots
@@ -10044,10 +10053,10 @@ var VcComponents = (function (exports, vue) {
10044
10053
 
10045
10054
  /** @jsxImportSource vue */
10046
10055
 
10047
- const COMPONENT_NAME$1G = 'vcm-checkbox';
10056
+ const COMPONENT_NAME$1H = 'vcm-checkbox';
10048
10057
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
10049
- name: COMPONENT_NAME$1G,
10050
- props: props$16,
10058
+ name: COMPONENT_NAME$1H,
10059
+ props: props$17,
10051
10060
  emits: ['update:modelValue', 'change'],
10052
10061
  setup(props, {
10053
10062
  slots
@@ -10086,10 +10095,10 @@ var VcComponents = (function (exports, vue) {
10086
10095
 
10087
10096
  /** @jsxImportSource vue */
10088
10097
 
10089
- const COMPONENT_NAME$1F = 'vcm-checkbox-group';
10098
+ const COMPONENT_NAME$1G = 'vcm-checkbox-group';
10090
10099
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
10091
- name: COMPONENT_NAME$1F,
10092
- props: props$15,
10100
+ name: COMPONENT_NAME$1G,
10101
+ props: props$16,
10093
10102
  emits: ['update:modelValue', 'change'],
10094
10103
  setup(props, {
10095
10104
  slots
@@ -10104,7 +10113,7 @@ var VcComponents = (function (exports, vue) {
10104
10113
  }
10105
10114
  });
10106
10115
 
10107
- const props$14 = {
10116
+ const props$15 = {
10108
10117
  content: [String, Function],
10109
10118
  mask: {
10110
10119
  type: Boolean,
@@ -10142,11 +10151,11 @@ var VcComponents = (function (exports, vue) {
10142
10151
 
10143
10152
  /** @jsxImportSource vue */
10144
10153
 
10145
- const COMPONENT_NAME$1E = 'vc-message';
10154
+ const COMPONENT_NAME$1F = 'vc-message';
10146
10155
  const MessageView = /* @__PURE__ */ vue.defineComponent({
10147
- name: COMPONENT_NAME$1E,
10156
+ name: COMPONENT_NAME$1F,
10148
10157
  emits: ['before-close', 'close', 'portal-fulfilled'],
10149
- props: props$14,
10158
+ props: props$15,
10150
10159
  setup(props, {
10151
10160
  emit,
10152
10161
  expose
@@ -10276,7 +10285,7 @@ var VcComponents = (function (exports, vue) {
10276
10285
  const error$3 = create$7({ mode: "error" });
10277
10286
  const Message = Object.assign(MessageView, { destroy: destroy$5, info: info$3, success: success$3, loading: loading$1, warning: warning$3, error: error$3 });
10278
10287
 
10279
- const props$13 = {
10288
+ const props$14 = {
10280
10289
  value: String,
10281
10290
  tag: {
10282
10291
  type: [String, Object, Function],
@@ -10393,10 +10402,10 @@ var VcComponents = (function (exports, vue) {
10393
10402
  return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
10394
10403
  };
10395
10404
 
10396
- const COMPONENT_NAME$1D = "vc-clipboard";
10405
+ const COMPONENT_NAME$1E = "vc-clipboard";
10397
10406
  const Clipboard$2 = vue.defineComponent({
10398
- name: COMPONENT_NAME$1D,
10399
- props: props$13,
10407
+ name: COMPONENT_NAME$1E,
10408
+ props: props$14,
10400
10409
  setup() {
10401
10410
  return useClipboard((content) => Message.success({ content }));
10402
10411
  }
@@ -10404,7 +10413,7 @@ var VcComponents = (function (exports, vue) {
10404
10413
 
10405
10414
  const Clipboard$1 = Object.assign(Clipboard$2, group);
10406
10415
 
10407
- const props$12 = {
10416
+ const props$13 = {
10408
10417
  content: [String, Function],
10409
10418
  maskClosable: {
10410
10419
  type: Boolean,
@@ -10435,11 +10444,11 @@ var VcComponents = (function (exports, vue) {
10435
10444
 
10436
10445
  /** @jsxImportSource vue */
10437
10446
 
10438
- const COMPONENT_NAME$1C = 'vcm-toast';
10447
+ const COMPONENT_NAME$1D = 'vcm-toast';
10439
10448
  const MToastView = /* @__PURE__ */ vue.defineComponent({
10440
- name: COMPONENT_NAME$1C,
10449
+ name: COMPONENT_NAME$1D,
10441
10450
  emits: ['close', 'portal-fulfilled'],
10442
- props: props$12,
10451
+ props: props$13,
10443
10452
  setup(props, {
10444
10453
  emit,
10445
10454
  expose
@@ -10539,10 +10548,10 @@ var VcComponents = (function (exports, vue) {
10539
10548
  const error$2 = create$6({ mode: "error" });
10540
10549
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
10541
10550
 
10542
- const COMPONENT_NAME$1B = "vcm-clipboard";
10551
+ const COMPONENT_NAME$1C = "vcm-clipboard";
10543
10552
  const MClipboard$1 = vue.defineComponent({
10544
- name: COMPONENT_NAME$1B,
10545
- props: props$13,
10553
+ name: COMPONENT_NAME$1C,
10554
+ props: props$14,
10546
10555
  setup() {
10547
10556
  return useClipboard((content) => MToast.info({ content }));
10548
10557
  }
@@ -10550,7 +10559,7 @@ var VcComponents = (function (exports, vue) {
10550
10559
 
10551
10560
  const MClipboard = Object.assign(MClipboard$1, group);
10552
10561
 
10553
- const props$11 = {
10562
+ const props$12 = {
10554
10563
  tag: {
10555
10564
  type: String,
10556
10565
  default: "div"
@@ -10573,10 +10582,10 @@ var VcComponents = (function (exports, vue) {
10573
10582
  }
10574
10583
  };
10575
10584
 
10576
- const COMPONENT_NAME$1A = "vc-collapse";
10585
+ const COMPONENT_NAME$1B = "vc-collapse";
10577
10586
  const Collapse = vue.defineComponent({
10578
- name: COMPONENT_NAME$1A,
10579
- props: props$11,
10587
+ name: COMPONENT_NAME$1B,
10588
+ props: props$12,
10580
10589
  emits: ["update:moodelValue", "change"],
10581
10590
  setup(props, { slots, emit }) {
10582
10591
  const instance = vue.getCurrentInstance();
@@ -10661,7 +10670,7 @@ var VcComponents = (function (exports, vue) {
10661
10670
  }
10662
10671
  });
10663
10672
 
10664
- const props$10 = {
10673
+ const props$11 = {
10665
10674
  tag: {
10666
10675
  type: String,
10667
10676
  default: "div"
@@ -10671,7 +10680,7 @@ var VcComponents = (function (exports, vue) {
10671
10680
  }
10672
10681
  };
10673
10682
 
10674
- const props$$ = {
10683
+ const props$10 = {
10675
10684
  tag: {
10676
10685
  type: String,
10677
10686
  default: "div"
@@ -10689,13 +10698,13 @@ var VcComponents = (function (exports, vue) {
10689
10698
 
10690
10699
  /** @jsxImportSource vue */
10691
10700
 
10692
- function _isSlot$2(s) {
10701
+ function _isSlot$3(s) {
10693
10702
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
10694
10703
  }
10695
- const COMPONENT_NAME$1z = 'vc-expand';
10704
+ const COMPONENT_NAME$1A = 'vc-expand';
10696
10705
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
10697
- name: COMPONENT_NAME$1z,
10698
- props: props$$,
10706
+ name: COMPONENT_NAME$1A,
10707
+ props: props$10,
10699
10708
  setup(props, {
10700
10709
  slots
10701
10710
  }) {
@@ -10713,7 +10722,7 @@ var VcComponents = (function (exports, vue) {
10713
10722
  enter: 200,
10714
10723
  leave: 200
10715
10724
  }
10716
- }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
10725
+ }, _isSlot$3(_slot = vue.withDirectives(vue.createVNode(Content, null, {
10717
10726
  default: () => [(props.alive || !props.alive && isActive.value) && slots.default?.()]
10718
10727
  }), [[vue.vShow, isActive.value]])) ? _slot : {
10719
10728
  default: () => [_slot]
@@ -10724,10 +10733,10 @@ var VcComponents = (function (exports, vue) {
10724
10733
 
10725
10734
  /** @jsxImportSource vue */
10726
10735
 
10727
- const COMPONENT_NAME$1y = 'vc-collapse-item';
10736
+ const COMPONENT_NAME$1z = 'vc-collapse-item';
10728
10737
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
10729
- name: COMPONENT_NAME$1y,
10730
- props: props$10,
10738
+ name: COMPONENT_NAME$1z,
10739
+ props: props$11,
10731
10740
  setup(props, {
10732
10741
  slots,
10733
10742
  expose
@@ -10792,7 +10801,7 @@ var VcComponents = (function (exports, vue) {
10792
10801
  const MCollapse = Collapse;
10793
10802
  const MCollapseItem = CollapseItem;
10794
10803
 
10795
- const props$_ = {
10804
+ const props$$ = {
10796
10805
  tag: {
10797
10806
  type: String,
10798
10807
  default: "div"
@@ -10801,10 +10810,10 @@ var VcComponents = (function (exports, vue) {
10801
10810
 
10802
10811
  /** @jsxImportSource vue */
10803
10812
 
10804
- const COMPONENT_NAME$1x = 'vc-color-picker';
10813
+ const COMPONENT_NAME$1y = 'vc-color-picker';
10805
10814
  const ColorPicker$1 = /* @__PURE__ */ vue.defineComponent({
10806
- name: COMPONENT_NAME$1x,
10807
- props: props$_,
10815
+ name: COMPONENT_NAME$1y,
10816
+ props: props$$,
10808
10817
  setup(props, {
10809
10818
  slots
10810
10819
  }) {
@@ -10818,7 +10827,7 @@ var VcComponents = (function (exports, vue) {
10818
10827
 
10819
10828
  const MColorPicker = ColorPicker$1;
10820
10829
 
10821
- const props$Z = {
10830
+ const props$_ = {
10822
10831
  tag: {
10823
10832
  type: String,
10824
10833
  default: "span"
@@ -10863,14 +10872,14 @@ var VcComponents = (function (exports, vue) {
10863
10872
 
10864
10873
  /** @jsxImportSource vue */
10865
10874
 
10866
- function _isSlot$1(s) {
10875
+ function _isSlot$2(s) {
10867
10876
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
10868
10877
  }
10869
- const COMPONENT_NAME$1w = 'vc-countdown';
10878
+ const COMPONENT_NAME$1x = 'vc-countdown';
10870
10879
  const Countdown = /* @__PURE__ */ vue.defineComponent({
10871
- name: COMPONENT_NAME$1w,
10872
- props: props$Z,
10873
- emits: ['change', 'finish', 'error'],
10880
+ name: COMPONENT_NAME$1x,
10881
+ props: props$_,
10882
+ emits: ['change', 'complete', 'error'],
10874
10883
  setup(props, {
10875
10884
  emit,
10876
10885
  slots
@@ -10960,7 +10969,7 @@ var VcComponents = (function (exports, vue) {
10960
10969
  second: '00',
10961
10970
  millisecond: '00'
10962
10971
  });
10963
- emit('finish');
10972
+ emit('complete');
10964
10973
  } else {
10965
10974
  emit('change', {
10966
10975
  timestamp,
@@ -10998,7 +11007,7 @@ var VcComponents = (function (exports, vue) {
10998
11007
  return (// @ts-ignore
10999
11008
  vue.createVNode(Content, {
11000
11009
  "class": "vc-countdown"
11001
- }, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
11010
+ }, _isSlot$2(_slot = slots.default(binds.value)) ? _slot : {
11002
11011
  default: () => [_slot]
11003
11012
  })
11004
11013
  );
@@ -11021,6 +11030,345 @@ var VcComponents = (function (exports, vue) {
11021
11030
 
11022
11031
  const MCountdown = Countdown;
11023
11032
 
11033
+ const props$Z = {
11034
+ tag: {
11035
+ type: String,
11036
+ default: "span"
11037
+ },
11038
+ value: [Number, String],
11039
+ placeholder: String,
11040
+ precision: {
11041
+ type: Number,
11042
+ default: 0
11043
+ },
11044
+ duration: {
11045
+ type: Number,
11046
+ default: 500
11047
+ },
11048
+ decimal: {
11049
+ type: String,
11050
+ default: "."
11051
+ },
11052
+ separator: {
11053
+ type: String,
11054
+ default: ","
11055
+ },
11056
+ numerals: {
11057
+ type: Array,
11058
+ default: () => []
11059
+ },
11060
+ smartEasingThreshold: {
11061
+ type: Number,
11062
+ default: 999
11063
+ },
11064
+ smartEasingAmount: {
11065
+ type: Number,
11066
+ default: 333
11067
+ },
11068
+ easing: {
11069
+ type: [Function, Boolean],
11070
+ default: true
11071
+ },
11072
+ // 10.90 -> 10.9
11073
+ zeroless: {
11074
+ type: Boolean,
11075
+ default: false
11076
+ },
11077
+ // 为true时,自行管理start/update
11078
+ controllable: {
11079
+ type: Boolean,
11080
+ default: false
11081
+ },
11082
+ render: Function
11083
+ };
11084
+
11085
+ const separated2value = (value, options) => {
11086
+ if (typeof value === "number" || typeof value !== "string") return value;
11087
+ const escapeRegExp = (s) => s.replace(/([.,' ])/g, "\\$1");
11088
+ const sep = escapeRegExp(options.separator);
11089
+ const dec = escapeRegExp(options.decimal);
11090
+ const num = (value || "").replace(new RegExp(sep, "g"), "").replace(new RegExp(dec, "g"), ".");
11091
+ return parseFloat(num);
11092
+ };
11093
+ const value2separated = (value, options) => {
11094
+ const num = typeof value === "number" ? value : parseFloat(value);
11095
+ if (value === "" || Number.isNaN(num)) {
11096
+ return {
11097
+ negative: "",
11098
+ integer: "",
11099
+ decimal: "",
11100
+ separated: "",
11101
+ float: "",
11102
+ value: ""
11103
+ };
11104
+ }
11105
+ const negative = num < 0 ? "-" : "";
11106
+ let [integer, decimal = ""] = `${Math.abs(num)}`.split(".");
11107
+ let separated = integer;
11108
+ if (options.separator) {
11109
+ let v = "";
11110
+ let j = 0;
11111
+ const factor = 3;
11112
+ for (let i = 0, len = separated.length; i < len; ++i) {
11113
+ if (i !== 0 && j % factor === 0) {
11114
+ v = options.separator + v;
11115
+ }
11116
+ j++;
11117
+ v = separated[len - i - 1] + v;
11118
+ }
11119
+ separated = v;
11120
+ }
11121
+ const precision$ = options.zeroless ? Math.min(options.precision, decimal.length) : options.precision;
11122
+ if (precision$) {
11123
+ decimal = decimal.slice(0, precision$).padEnd(precision$, "0");
11124
+ } else {
11125
+ decimal = "";
11126
+ }
11127
+ if (options?.numerals?.length) {
11128
+ separated = separated.replace(/[0-9]/g, (w) => options.numerals[+w]);
11129
+ decimal = decimal.replace(/[0-9]/g, (w) => options.numerals[+w]);
11130
+ }
11131
+ const _decimal = decimal ? options.decimal + decimal : "";
11132
+ return {
11133
+ negative,
11134
+ integer,
11135
+ decimal,
11136
+ separated,
11137
+ float: `${negative}${integer}${_decimal}`,
11138
+ value: `${negative}${separated}${_decimal}`
11139
+ };
11140
+ };
11141
+
11142
+ /** @jsxImportSource vue */
11143
+
11144
+ function _isSlot$1(s) {
11145
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
11146
+ }
11147
+ const COMPONENT_NAME$1w = 'vc-counter';
11148
+ const Counter = /* @__PURE__ */ vue.defineComponent({
11149
+ name: COMPONENT_NAME$1w,
11150
+ props: props$Z,
11151
+ emits: ['begin', 'complete', 'change'],
11152
+ setup(props, {
11153
+ emit,
11154
+ expose,
11155
+ slots
11156
+ }) {
11157
+ const startTime = vue.ref(null);
11158
+ const duration = vue.ref(props.duration);
11159
+ const remaining = vue.ref(duration.value);
11160
+ const startVal = vue.ref(0);
11161
+ const endVal = vue.ref(separated2value(props.value, props));
11162
+ const frameVal = vue.ref(startVal.value);
11163
+ const finalEndVal = vue.ref(null);
11164
+ const useEasing = vue.ref(!!props.easing);
11165
+ const isStart = vue.ref(false);
11166
+ const isPaused = vue.ref(false);
11167
+ const isComplete = vue.ref(false);
11168
+ const countdown = vue.ref(false);
11169
+ const rAF = vue.ref(null);
11170
+ const prints = vue.reactive({
11171
+ negative: '',
11172
+ integer: '',
11173
+ decimal: '',
11174
+ separated: '',
11175
+ float: '',
11176
+ value: ''
11177
+ });
11178
+
11179
+ // t: current time, b: beginning value, c: change in value, d: duration
11180
+ const easing = vue.computed(() => {
11181
+ return typeof props.easing === 'function' ? props.easing : (t, b, c, d) => c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
11182
+ });
11183
+ const displayValue = vue.computed(() => {
11184
+ if (props.value === '' || typeof props.value !== 'string' && typeof props.value !== 'number') {
11185
+ return props.placeholder;
11186
+ }
11187
+ return prints.value;
11188
+ });
11189
+ const binds = vue.computed(() => {
11190
+ return {
11191
+ ...prints,
11192
+ value: displayValue.value
11193
+ };
11194
+ });
11195
+ const determineDirectionAndSmartEasing = () => {
11196
+ const v = finalEndVal.value !== null ? finalEndVal.value : endVal.value;
11197
+ countdown.value = startVal.value > v;
11198
+ const animateAmount = v - startVal.value;
11199
+ if (Math.abs(animateAmount) > props.smartEasingThreshold && props.easing) {
11200
+ finalEndVal.value = v;
11201
+ const up = countdown.value ? 1 : -1;
11202
+ endVal.value = v + up * props.smartEasingAmount;
11203
+ duration.value = duration.value / 2;
11204
+ } else {
11205
+ endVal.value = v;
11206
+ finalEndVal.value = null;
11207
+ }
11208
+ if (finalEndVal.value !== null) {
11209
+ useEasing.value = false;
11210
+ } else {
11211
+ useEasing.value = !!props.easing;
11212
+ }
11213
+ };
11214
+ const run = () => {
11215
+ const done = timestamp => {
11216
+ if (!startTime.value) {
11217
+ startTime.value = timestamp;
11218
+ }
11219
+ const progress = timestamp - startTime.value;
11220
+ remaining.value = duration.value - progress;
11221
+ if (useEasing.value) {
11222
+ if (countdown.value) {
11223
+ frameVal.value = startVal.value - easing.value(progress, 0, startVal.value - endVal.value, duration.value);
11224
+ } else {
11225
+ frameVal.value = easing.value(progress, startVal.value, endVal.value - startVal.value, duration.value);
11226
+ }
11227
+ } else {
11228
+ frameVal.value = startVal.value + (endVal.value - startVal.value) * (progress / duration.value);
11229
+ }
11230
+ const wentPast = countdown.value ? frameVal.value < endVal.value : frameVal.value > endVal.value;
11231
+ frameVal.value = wentPast ? endVal.value : frameVal.value;
11232
+ print(frameVal.value);
11233
+ if (progress < duration.value) {
11234
+ rAF.value = requestAnimationFrame(done);
11235
+ } else if (finalEndVal.value !== null) {
11236
+ update(finalEndVal.value);
11237
+ } else {
11238
+ emit('complete');
11239
+ isComplete.value = true;
11240
+ }
11241
+ };
11242
+ determineDirectionAndSmartEasing();
11243
+ rAF.value = requestAnimationFrame(done);
11244
+ };
11245
+ const print = num => {
11246
+ Object.assign(prints, value2separated(num, props));
11247
+ emit('change', prints);
11248
+ };
11249
+ const resetDuration = () => {
11250
+ startTime.value = null;
11251
+ duration.value = props.duration;
11252
+ remaining.value = duration.value;
11253
+ };
11254
+ const cancel = () => {
11255
+ if (rAF.value === null || typeof rAF.value === 'undefined') return;
11256
+ cancelAnimationFrame(rAF.value);
11257
+ };
11258
+ const start = () => {
11259
+ if (isComplete.value || isStart.value) return;
11260
+ cancel();
11261
+ resetDuration();
11262
+ isPaused.value = false;
11263
+ isComplete.value = false;
11264
+ startVal.value = 0;
11265
+ frameVal.value = 0;
11266
+ isStart.value = true;
11267
+ emit('begin');
11268
+ if (duration.value > 0) {
11269
+ run();
11270
+ } else {
11271
+ print(endVal.value);
11272
+ }
11273
+ };
11274
+ const pause = () => {
11275
+ if (isComplete.value) return;
11276
+ if (!isPaused.value) {
11277
+ cancel();
11278
+ }
11279
+ isPaused.value = true;
11280
+ };
11281
+ const resume = () => {
11282
+ if (isComplete.value) return;
11283
+ if (isPaused.value) {
11284
+ startTime.value = null;
11285
+ duration.value = remaining.value;
11286
+ startVal.value = frameVal.value;
11287
+ run();
11288
+ }
11289
+ isPaused.value = false;
11290
+ };
11291
+ const update = newEndVal => {
11292
+ if (!isStart.value) return;
11293
+ cancel();
11294
+ startTime.value = null;
11295
+ endVal.value = +newEndVal;
11296
+ if (endVal.value === frameVal.value) {
11297
+ return;
11298
+ }
11299
+ startVal.value = frameVal.value;
11300
+ if (finalEndVal.value === null) {
11301
+ resetDuration();
11302
+ }
11303
+ finalEndVal.value = null;
11304
+ run();
11305
+ };
11306
+ const end = () => {
11307
+ if (isComplete.value) return;
11308
+ cancel();
11309
+ resetDuration();
11310
+ startVal.value = +props.value;
11311
+ frameVal.value = startVal.value;
11312
+ print(frameVal.value);
11313
+ emit('complete');
11314
+ isComplete.value = true;
11315
+ };
11316
+ const restart = () => {
11317
+ isStart.value = false;
11318
+ isComplete.value = false;
11319
+ start();
11320
+ };
11321
+ vue.watch(() => props.value, () => {
11322
+ if (props.controllable || !isStart.value) return;
11323
+ update(props.value);
11324
+ });
11325
+ vue.watch(() => props.precision, () => {
11326
+ if (props.controllable || !isStart.value || !isComplete.value) return;
11327
+ print(+props.value);
11328
+ });
11329
+ expose({
11330
+ start,
11331
+ pause,
11332
+ resume,
11333
+ update,
11334
+ end,
11335
+ restart,
11336
+ cancel,
11337
+ print
11338
+ });
11339
+ vue.onMounted(() => !props.controllable && start());
11340
+ vue.onBeforeUnmount(cancel);
11341
+ const Content = props.tag;
11342
+ return () => {
11343
+ if (slots.default) {
11344
+ let _slot;
11345
+ return (// @ts-ignore
11346
+ vue.createVNode(Content, {
11347
+ "class": "vc-counter"
11348
+ }, _isSlot$1(_slot = slots.default(binds.value)) ? _slot : {
11349
+ default: () => [_slot]
11350
+ })
11351
+ );
11352
+ }
11353
+ if (props.render) {
11354
+ return vue.createVNode(Customer, vue.mergeProps({
11355
+ "class": "vc-counter",
11356
+ "render": props.render
11357
+ }, binds.value), null);
11358
+ }
11359
+ return (// @ts-ignore
11360
+ vue.createVNode(Content, {
11361
+ "class": "vc-counter"
11362
+ }, {
11363
+ default: () => [displayValue.value]
11364
+ })
11365
+ );
11366
+ };
11367
+ }
11368
+ });
11369
+
11370
+ const MCounter = Counter;
11371
+
11024
11372
  const props$Y = {
11025
11373
  type: {
11026
11374
  type: String,
@@ -11044,8 +11392,8 @@ var VcComponents = (function (exports, vue) {
11044
11392
  "portalClass"
11045
11393
  ];
11046
11394
  const props$X = {
11047
- ...pick(props$1c, popoverKeys),
11048
- ...pick(props$1g, inputKeys$1),
11395
+ ...pick(props$1d, popoverKeys),
11396
+ ...pick(props$1h, inputKeys$1),
11049
11397
  type: String,
11050
11398
  placeholder: String,
11051
11399
  clearable: {
@@ -21480,7 +21828,7 @@ var VcComponents = (function (exports, vue) {
21480
21828
  name: COMPONENT_NAME$V,
21481
21829
  inheritAttrs: false,
21482
21830
  props: {
21483
- ...props$1g,
21831
+ ...props$1h,
21484
21832
  right: {
21485
21833
  type: Boolean,
21486
21834
  default: false
@@ -21569,7 +21917,7 @@ var VcComponents = (function (exports, vue) {
21569
21917
  const COMPONENT_NAME$U = 'vcm-input-number';
21570
21918
  const MInputNumber = /* @__PURE__ */ vue.defineComponent({
21571
21919
  name: COMPONENT_NAME$U,
21572
- props: props$1f,
21920
+ props: props$1g,
21573
21921
  inheritAttrs: false,
21574
21922
  setup(props, {
21575
21923
  slots,
@@ -21621,7 +21969,7 @@ var VcComponents = (function (exports, vue) {
21621
21969
  const MInputSearch = /* @__PURE__ */ vue.defineComponent({
21622
21970
  name: COMPONENT_NAME$T,
21623
21971
  props: {
21624
- ...props$1e,
21972
+ ...props$1f,
21625
21973
  cancelText: {
21626
21974
  type: String,
21627
21975
  default: '取消'
@@ -23207,7 +23555,7 @@ var VcComponents = (function (exports, vue) {
23207
23555
  const COMPONENT_NAME$H = 'vc-select';
23208
23556
  const Select = /* @__PURE__ */ vue.defineComponent({
23209
23557
  name: COMPONENT_NAME$H,
23210
- props: props$19,
23558
+ props: props$1a,
23211
23559
  emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
23212
23560
  setup(props, {
23213
23561
  emit,
@@ -25032,7 +25380,7 @@ var VcComponents = (function (exports, vue) {
25032
25380
  },
25033
25381
  scrollerOptions: Object,
25034
25382
  renderEmpty: Function,
25035
- renderFinish: Function,
25383
+ renderComplete: Function,
25036
25384
  renderLoading: Function,
25037
25385
  renderPlaceholder: Function,
25038
25386
  renderRefresh: Function
@@ -25066,9 +25414,9 @@ var VcComponents = (function (exports, vue) {
25066
25414
  }, [vue.createVNode(Spin, {
25067
25415
  "size": 20
25068
25416
  }, null)]))]), owner.isEnd.value && (owner.data.length ? vue.createVNode("div", {
25069
- "class": "vc-recycle-list__finish"
25070
- }, [slots.finish?.() || owner.renderer.value.finish ? vue.createVNode(Customer, {
25071
- "render": owner.renderer.value.finish
25417
+ "class": "vc-recycle-list__complete"
25418
+ }, [slots.complete?.() || owner.renderer.value.complete ? vue.createVNode(Customer, {
25419
+ "render": owner.renderer.value.complete
25072
25420
  }, null) : vue.createVNode("div", {
25073
25421
  "class": "vc-recycle-list__center"
25074
25422
  }, [vue.createTextVNode("\u5DF2\u5168\u90E8\u52A0\u8F7D~")])]) : vue.createVNode("div", {
@@ -25364,7 +25712,7 @@ var VcComponents = (function (exports, vue) {
25364
25712
  refresh: props.renderRefresh || globalProps.renderRefresh,
25365
25713
  placeholder: props.renderPlaceholder || globalProps.renderPlaceholder,
25366
25714
  loading: props.renderLoading || globalProps.renderLoading,
25367
- finish: props.renderFinish || globalProps.renderFinish,
25715
+ complete: props.renderComplete || globalProps.renderComplete,
25368
25716
  empty: props.renderEmpty || globalProps.renderEmpty
25369
25717
  };
25370
25718
  });
@@ -30400,7 +30748,7 @@ var VcComponents = (function (exports, vue) {
30400
30748
  "controllable"
30401
30749
  ];
30402
30750
  const props$8 = {
30403
- ...pick(props$1g, inputKeys),
30751
+ ...pick(props$1h, inputKeys),
30404
30752
  wrap: {
30405
30753
  type: String,
30406
30754
  validator: (v) => /(soft|hard)/.test(v),
@@ -31993,7 +32341,7 @@ var VcComponents = (function (exports, vue) {
31993
32341
  "allowDispatch"
31994
32342
  ];
31995
32343
  const props$2 = {
31996
- ...pick(props$19, selectKeys),
32344
+ ...pick(props$1a, selectKeys),
31997
32345
  ...pick(props$3, treeNodeContentKeys),
31998
32346
  // 暂不支持,仅作为默认值
31999
32347
  max: {
@@ -32266,7 +32614,7 @@ var VcComponents = (function (exports, vue) {
32266
32614
  "renderNodeLabel"
32267
32615
  ];
32268
32616
  const props$1 = {
32269
- ...props$19,
32617
+ ...props$1a,
32270
32618
  ...pick(props$2, treeKeys)
32271
32619
  };
32272
32620
 
@@ -137438,6 +137786,7 @@ ${imported}
137438
137786
  exports.CollapseItem = CollapseItem;
137439
137787
  exports.ColorPicker = ColorPicker$1;
137440
137788
  exports.Countdown = Countdown;
137789
+ exports.Counter = Counter;
137441
137790
  exports.Customer = Customer;
137442
137791
  exports.DatePicker = DatePicker;
137443
137792
  exports.Debounce = Debounce;
@@ -137482,6 +137831,7 @@ ${imported}
137482
137831
  exports.MCollapseItem = MCollapseItem;
137483
137832
  exports.MColorPicker = MColorPicker;
137484
137833
  exports.MCountdown = MCountdown;
137834
+ exports.MCounter = MCounter;
137485
137835
  exports.MCustomer = MCustomer;
137486
137836
  exports.MDatePicker = MDatePicker;
137487
137837
  exports.MDebounce = Debounce;