@deot/vc-components 1.0.16 → 1.0.18

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.
@@ -19,6 +19,17 @@
19
19
  const defaults$2 = {
20
20
  Theme: {
21
21
  variables: VARIABLES
22
+ },
23
+ Portal: {
24
+ install: void 0
25
+ },
26
+ Upload: {
27
+ onRequest: void 0,
28
+ onResponse: void 0,
29
+ onMessage: void 0
30
+ },
31
+ TableColumn: {
32
+ line: void 0
22
33
  }
23
34
  };
24
35
 
@@ -56,9 +67,9 @@
56
67
 
57
68
  /** @jsxImportSource vue */
58
69
 
59
- const COMPONENT_NAME$1_ = 'vc-action-sheet';
70
+ const COMPONENT_NAME$1$ = 'vc-action-sheet';
60
71
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
61
- name: COMPONENT_NAME$1_,
72
+ name: COMPONENT_NAME$1$,
62
73
  props: props$1q,
63
74
  setup(props, {
64
75
  slots
@@ -245,9 +256,9 @@
245
256
 
246
257
  /** @jsxImportSource vue */
247
258
 
248
- const COMPONENT_NAME$1Z = 'vc-icon';
259
+ const COMPONENT_NAME$1_ = 'vc-icon';
249
260
  const Icon = /* @__PURE__ */ vue.defineComponent({
250
- name: COMPONENT_NAME$1Z,
261
+ name: COMPONENT_NAME$1_,
251
262
  props: props$1o,
252
263
  setup(props) {
253
264
  const viewBox = vue.ref('0 0 1024 1024');
@@ -446,9 +457,9 @@
446
457
  };
447
458
  };
448
459
 
449
- const COMPONENT_NAME$1Y = "vc-transition";
460
+ const COMPONENT_NAME$1Z = "vc-transition";
450
461
  const Transition = vue.defineComponent({
451
- name: COMPONENT_NAME$1Y,
462
+ name: COMPONENT_NAME$1Z,
452
463
  props: props$1n,
453
464
  // 当不声明emits的情况下,事件存在于attrs中
454
465
  inheritAttrs: false,
@@ -469,9 +480,9 @@
469
480
  }
470
481
  });
471
482
 
472
- const COMPONENT_NAME$1X = "vc-transition-collapse";
483
+ const COMPONENT_NAME$1Y = "vc-transition-collapse";
473
484
  const TransitionCollapse = vue.defineComponent({
474
- name: COMPONENT_NAME$1X,
485
+ name: COMPONENT_NAME$1Y,
475
486
  props: props$1n,
476
487
  // 当不声明emits的情况下,事件存在于attrs中
477
488
  inheritAttrs: false,
@@ -590,9 +601,9 @@
590
601
  }
591
602
  });
592
603
 
593
- const COMPONENT_NAME$1W = "vc-transition-fade";
604
+ const COMPONENT_NAME$1X = "vc-transition-fade";
594
605
  const TransitionFade = vue.defineComponent({
595
- name: COMPONENT_NAME$1W,
606
+ name: COMPONENT_NAME$1X,
596
607
  props: {
597
608
  ...props$1n,
598
609
  // inheritAttrs必须是false
@@ -627,9 +638,9 @@
627
638
  }
628
639
  });
629
640
 
630
- const COMPONENT_NAME$1V = "vc-transition-scale";
641
+ const COMPONENT_NAME$1W = "vc-transition-scale";
631
642
  const TransitionScale = vue.defineComponent({
632
- name: COMPONENT_NAME$1V,
643
+ name: COMPONENT_NAME$1W,
633
644
  props: {
634
645
  ...props$1n,
635
646
  mode: {
@@ -669,9 +680,9 @@
669
680
  }
670
681
  });
671
682
 
672
- const COMPONENT_NAME$1U = "vc-transition-slide";
683
+ const COMPONENT_NAME$1V = "vc-transition-slide";
673
684
  const TransitionSlide = vue.defineComponent({
674
- name: COMPONENT_NAME$1U,
685
+ name: COMPONENT_NAME$1V,
675
686
  props: {
676
687
  ...props$1n,
677
688
  mode: {
@@ -711,9 +722,9 @@
711
722
  }
712
723
  });
713
724
 
714
- const COMPONENT_NAME$1T = "vc-transition-zoom";
725
+ const COMPONENT_NAME$1U = "vc-transition-zoom";
715
726
  const TransitionZoom = vue.defineComponent({
716
- name: COMPONENT_NAME$1T,
727
+ name: COMPONENT_NAME$1U,
717
728
  props: {
718
729
  ...props$1n,
719
730
  mode: {
@@ -755,7 +766,7 @@
755
766
 
756
767
  /** @jsxImportSource vue */
757
768
 
758
- const COMPONENT_NAME$1S = 'vc-alert';
769
+ const COMPONENT_NAME$1T = 'vc-alert';
759
770
 
760
771
  // [color, borderColor, backgroundColor], -> CSS
761
772
  const THEME_MAP = {
@@ -765,7 +776,7 @@
765
776
  warning: ['#ffbf00', '#ffe58f', '#fffbe6']
766
777
  };
767
778
  const Alert = /* @__PURE__ */ vue.defineComponent({
768
- name: COMPONENT_NAME$1S,
779
+ name: COMPONENT_NAME$1T,
769
780
  props: props$1p,
770
781
  setup(props, {
771
782
  slots,
@@ -864,9 +875,9 @@
864
875
 
865
876
  /** @jsxImportSource vue */
866
877
 
867
- const COMPONENT_NAME$1R = 'vc-artboard';
878
+ const COMPONENT_NAME$1S = 'vc-artboard';
868
879
  const Artboard = /* @__PURE__ */ vue.defineComponent({
869
- name: COMPONENT_NAME$1R,
880
+ name: COMPONENT_NAME$1S,
870
881
  props: props$1m,
871
882
  setup(props, {
872
883
  slots
@@ -905,9 +916,9 @@
905
916
 
906
917
  /** @jsxImportSource vue */
907
918
 
908
- const COMPONENT_NAME$1Q = 'vc-spin';
919
+ const COMPONENT_NAME$1R = 'vc-spin';
909
920
  const Spin = /* @__PURE__ */ vue.defineComponent({
910
- name: COMPONENT_NAME$1Q,
921
+ name: COMPONENT_NAME$1R,
911
922
  props: props$1l,
912
923
  setup(props, {
913
924
  slots
@@ -5763,9 +5774,9 @@
5763
5774
  exclude: RegExp
5764
5775
  };
5765
5776
 
5766
- const COMPONENT_NAME$1P = "vc-debounce";
5777
+ const COMPONENT_NAME$1Q = "vc-debounce";
5767
5778
  const Debounce = vue.defineComponent({
5768
- name: COMPONENT_NAME$1P,
5779
+ name: COMPONENT_NAME$1Q,
5769
5780
  props: props$1k,
5770
5781
  /**
5771
5782
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
@@ -5837,9 +5848,9 @@
5837
5848
 
5838
5849
  /** @jsxImportSource vue */
5839
5850
 
5840
- const COMPONENT_NAME$1O = 'vc-button';
5851
+ const COMPONENT_NAME$1P = 'vc-button';
5841
5852
  const Button = /* @__PURE__ */ vue.defineComponent({
5842
- name: COMPONENT_NAME$1O,
5853
+ name: COMPONENT_NAME$1P,
5843
5854
  emits: ['click'],
5844
5855
  props: props$1j,
5845
5856
  setup(props, {
@@ -5919,9 +5930,9 @@
5919
5930
 
5920
5931
  /** @jsxImportSource vue */
5921
5932
 
5922
- const COMPONENT_NAME$1N = 'vc-button-group';
5933
+ const COMPONENT_NAME$1O = 'vc-button-group';
5923
5934
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
5924
- name: COMPONENT_NAME$1N,
5935
+ name: COMPONENT_NAME$1O,
5925
5936
  props: props$1i,
5926
5937
  setup(props, {
5927
5938
  slots
@@ -5955,9 +5966,9 @@
5955
5966
 
5956
5967
  /** @jsxImportSource vue */
5957
5968
 
5958
- const COMPONENT_NAME$1M = 'vc-calendar';
5969
+ const COMPONENT_NAME$1N = 'vc-calendar';
5959
5970
  const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
5960
- name: COMPONENT_NAME$1M,
5971
+ name: COMPONENT_NAME$1N,
5961
5972
  props: props$1h,
5962
5973
  setup(props, {
5963
5974
  slots
@@ -5995,9 +6006,9 @@
5995
6006
 
5996
6007
  /** @jsxImportSource vue */
5997
6008
 
5998
- const COMPONENT_NAME$1L = 'vc-card';
6009
+ const COMPONENT_NAME$1M = 'vc-card';
5999
6010
  const Card = /* @__PURE__ */ vue.defineComponent({
6000
- name: COMPONENT_NAME$1L,
6011
+ name: COMPONENT_NAME$1M,
6001
6012
  props: props$1g,
6002
6013
  setup(props, {
6003
6014
  slots
@@ -6033,9 +6044,9 @@
6033
6044
 
6034
6045
  /** @jsxImportSource vue */
6035
6046
 
6036
- const COMPONENT_NAME$1K = 'vc-carousel';
6047
+ const COMPONENT_NAME$1L = 'vc-carousel';
6037
6048
  const Carousel = /* @__PURE__ */ vue.defineComponent({
6038
- name: COMPONENT_NAME$1K,
6049
+ name: COMPONENT_NAME$1L,
6039
6050
  props: props$1f,
6040
6051
  setup(props, {
6041
6052
  slots
@@ -6059,9 +6070,9 @@
6059
6070
 
6060
6071
  /** @jsxImportSource vue */
6061
6072
 
6062
- const COMPONENT_NAME$1J = 'vc-cascader';
6073
+ const COMPONENT_NAME$1K = 'vc-cascader';
6063
6074
  const Cascader = /* @__PURE__ */ vue.defineComponent({
6064
- name: COMPONENT_NAME$1J,
6075
+ name: COMPONENT_NAME$1K,
6065
6076
  props: props$1e,
6066
6077
  setup(props, {
6067
6078
  slots
@@ -6193,9 +6204,9 @@
6193
6204
 
6194
6205
  /** @jsxImportSource vue */
6195
6206
 
6196
- const COMPONENT_NAME$1I = 'vc-chart';
6207
+ const COMPONENT_NAME$1J = 'vc-chart';
6197
6208
  const Chart = /* @__PURE__ */ vue.defineComponent({
6198
- name: COMPONENT_NAME$1I,
6209
+ name: COMPONENT_NAME$1J,
6199
6210
  props: props$1d,
6200
6211
  emits: [...EVENTS, 'ready'],
6201
6212
  setup(props, {
@@ -6426,9 +6437,9 @@
6426
6437
 
6427
6438
  /** @jsxImportSource vue */
6428
6439
 
6429
- const COMPONENT_NAME$1H = 'vc-checkbox';
6440
+ const COMPONENT_NAME$1I = 'vc-checkbox';
6430
6441
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
6431
- name: COMPONENT_NAME$1H,
6442
+ name: COMPONENT_NAME$1I,
6432
6443
  props: props$1c,
6433
6444
  emits: ['update:modelValue', 'change'],
6434
6445
  setup(props, {
@@ -6515,9 +6526,9 @@
6515
6526
 
6516
6527
  /** @jsxImportSource vue */
6517
6528
 
6518
- const COMPONENT_NAME$1G = 'vc-checkbox-group';
6529
+ const COMPONENT_NAME$1H = 'vc-checkbox-group';
6519
6530
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
6520
- name: COMPONENT_NAME$1G,
6531
+ name: COMPONENT_NAME$1H,
6521
6532
  props: props$1b,
6522
6533
  emits: ['update:modelValue', 'change'],
6523
6534
  setup(props, {
@@ -6535,9 +6546,9 @@
6535
6546
 
6536
6547
  /** @jsxImportSource vue */
6537
6548
 
6538
- const COMPONENT_NAME$1F = 'vcm-checkbox';
6549
+ const COMPONENT_NAME$1G = 'vcm-checkbox';
6539
6550
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
6540
- name: COMPONENT_NAME$1F,
6551
+ name: COMPONENT_NAME$1G,
6541
6552
  props: props$1c,
6542
6553
  emits: ['update:modelValue', 'change'],
6543
6554
  setup(props, {
@@ -6577,9 +6588,9 @@
6577
6588
 
6578
6589
  /** @jsxImportSource vue */
6579
6590
 
6580
- const COMPONENT_NAME$1E = 'vcm-checkbox-group';
6591
+ const COMPONENT_NAME$1F = 'vcm-checkbox-group';
6581
6592
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
6582
- name: COMPONENT_NAME$1E,
6593
+ name: COMPONENT_NAME$1F,
6583
6594
  props: props$1b,
6584
6595
  emits: ['update:modelValue', 'change'],
6585
6596
  setup(props, {
@@ -6638,9 +6649,9 @@
6638
6649
  }
6639
6650
  };
6640
6651
 
6641
- const COMPONENT_NAME$1D = "vc-customer";
6652
+ const COMPONENT_NAME$1E = "vc-customer";
6642
6653
  const Customer = vue.defineComponent({
6643
- name: COMPONENT_NAME$1D,
6654
+ name: COMPONENT_NAME$1E,
6644
6655
  props: props$19,
6645
6656
  setup(props, context) {
6646
6657
  return () => vue.h(() => {
@@ -6651,9 +6662,9 @@
6651
6662
 
6652
6663
  /** @jsxImportSource vue */
6653
6664
 
6654
- const COMPONENT_NAME$1C = 'vc-message';
6665
+ const COMPONENT_NAME$1D = 'vc-message';
6655
6666
  const MessageView = /* @__PURE__ */ vue.defineComponent({
6656
- name: COMPONENT_NAME$1C,
6667
+ name: COMPONENT_NAME$1D,
6657
6668
  emits: ['before-close', 'close', 'portal-fulfilled'],
6658
6669
  props: props$1a,
6659
6670
  setup(props, {
@@ -7213,7 +7224,7 @@
7213
7224
  }
7214
7225
  }
7215
7226
 
7216
- const COMPONENT_NAME$1B = "vc-portal";
7227
+ const COMPONENT_NAME$1C = "vc-portal";
7217
7228
  class Portal {
7218
7229
  /**
7219
7230
  * 清理Portals类型组件
@@ -7265,7 +7276,7 @@
7265
7276
  this.wrapper = wrapper;
7266
7277
  this.globalOptions = {
7267
7278
  ...options,
7268
- name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1B)
7279
+ name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1C)
7269
7280
  };
7270
7281
  }
7271
7282
  popup(propsData, options) {
@@ -7364,7 +7375,7 @@
7364
7375
  ...rest
7365
7376
  } = options;
7366
7377
  let useAllNodes = fragment;
7367
- const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1B)}` : name$;
7378
+ const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1C)}` : name$;
7368
7379
  const container = document.createElement(tag);
7369
7380
  const root = typeof el === "object" ? el : document.querySelector(el || "body");
7370
7381
  !alive && Portal.leafs.get(name)?.destroy();
@@ -7398,7 +7409,7 @@
7398
7409
  } else {
7399
7410
  const wrapper = this.wrapper;
7400
7411
  const app = vue.createApp({
7401
- name: COMPONENT_NAME$1B,
7412
+ name: COMPONENT_NAME$1C,
7402
7413
  parent,
7403
7414
  setup() {
7404
7415
  if (alive) {
@@ -7510,13 +7521,13 @@
7510
7521
  }
7511
7522
  };
7512
7523
 
7513
- const COMPONENT_NAME$1A = 'vc-portal-view';
7524
+ const COMPONENT_NAME$1B = 'vc-portal-view';
7514
7525
 
7515
7526
  /**
7516
7527
  * 写法不同,但与vue@2.x 保持一致
7517
7528
  */
7518
7529
  const PortalView = /* @__PURE__ */ vue.defineComponent({
7519
- name: COMPONENT_NAME$1A,
7530
+ name: COMPONENT_NAME$1B,
7520
7531
  props: props$18,
7521
7532
  setup(props, {
7522
7533
  slots
@@ -7687,9 +7698,9 @@
7687
7698
  return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
7688
7699
  };
7689
7700
 
7690
- const COMPONENT_NAME$1z = "vc-clipboard";
7701
+ const COMPONENT_NAME$1A = "vc-clipboard";
7691
7702
  const Clipboard$1 = vue.defineComponent({
7692
- name: COMPONENT_NAME$1z,
7703
+ name: COMPONENT_NAME$1A,
7693
7704
  props: props$17,
7694
7705
  setup() {
7695
7706
  return useClipboard((content) => Message.success({ content }));
@@ -7729,9 +7740,9 @@
7729
7740
 
7730
7741
  /** @jsxImportSource vue */
7731
7742
 
7732
- const COMPONENT_NAME$1y = 'vcm-toast';
7743
+ const COMPONENT_NAME$1z = 'vcm-toast';
7733
7744
  const MToastView = /* @__PURE__ */ vue.defineComponent({
7734
- name: COMPONENT_NAME$1y,
7745
+ name: COMPONENT_NAME$1z,
7735
7746
  emits: ['close', 'portal-fulfilled'],
7736
7747
  props: props$16,
7737
7748
  setup(props, {
@@ -7833,9 +7844,9 @@
7833
7844
  const error$2 = create$6({ mode: "error" });
7834
7845
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
7835
7846
 
7836
- const COMPONENT_NAME$1x = "vcm-clipboard";
7847
+ const COMPONENT_NAME$1y = "vcm-clipboard";
7837
7848
  const MClipboard$1 = vue.defineComponent({
7838
- name: COMPONENT_NAME$1x,
7849
+ name: COMPONENT_NAME$1y,
7839
7850
  props: props$17,
7840
7851
  setup() {
7841
7852
  return useClipboard((content) => MToast.info({ content }));
@@ -7867,9 +7878,9 @@
7867
7878
  }
7868
7879
  };
7869
7880
 
7870
- const COMPONENT_NAME$1w = "vc-collapse";
7881
+ const COMPONENT_NAME$1x = "vc-collapse";
7871
7882
  const Collapse = vue.defineComponent({
7872
- name: COMPONENT_NAME$1w,
7883
+ name: COMPONENT_NAME$1x,
7873
7884
  props: props$15,
7874
7885
  emits: ["update:moodelValue", "change"],
7875
7886
  setup(props, { slots, emit }) {
@@ -7986,9 +7997,9 @@
7986
7997
  function _isSlot$3(s) {
7987
7998
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
7988
7999
  }
7989
- const COMPONENT_NAME$1v = 'vc-expand';
8000
+ const COMPONENT_NAME$1w = 'vc-expand';
7990
8001
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
7991
- name: COMPONENT_NAME$1v,
8002
+ name: COMPONENT_NAME$1w,
7992
8003
  props: props$13,
7993
8004
  setup(props, {
7994
8005
  slots
@@ -8018,9 +8029,9 @@
8018
8029
 
8019
8030
  /** @jsxImportSource vue */
8020
8031
 
8021
- const COMPONENT_NAME$1u = 'vc-collapse-item';
8032
+ const COMPONENT_NAME$1v = 'vc-collapse-item';
8022
8033
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
8023
- name: COMPONENT_NAME$1u,
8034
+ name: COMPONENT_NAME$1v,
8024
8035
  props: props$14,
8025
8036
  setup(props, {
8026
8037
  slots,
@@ -8095,9 +8106,9 @@
8095
8106
 
8096
8107
  /** @jsxImportSource vue */
8097
8108
 
8098
- const COMPONENT_NAME$1t = 'vc-color-picker';
8109
+ const COMPONENT_NAME$1u = 'vc-color-picker';
8099
8110
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
8100
- name: COMPONENT_NAME$1t,
8111
+ name: COMPONENT_NAME$1u,
8101
8112
  props: props$12,
8102
8113
  setup(props, {
8103
8114
  slots
@@ -8121,9 +8132,9 @@
8121
8132
 
8122
8133
  /** @jsxImportSource vue */
8123
8134
 
8124
- const COMPONENT_NAME$1s = 'vc-countdown';
8135
+ const COMPONENT_NAME$1t = 'vc-countdown';
8125
8136
  const Countdown = /* @__PURE__ */ vue.defineComponent({
8126
- name: COMPONENT_NAME$1s,
8137
+ name: COMPONENT_NAME$1t,
8127
8138
  props: props$11,
8128
8139
  setup(props, {
8129
8140
  slots
@@ -8276,7 +8287,7 @@
8276
8287
  hover: Boolean,
8277
8288
  always: Boolean,
8278
8289
  portalClass: [Object, String, Array],
8279
- portalStyle: Object
8290
+ portalStyle: [Object, String]
8280
8291
  };
8281
8292
 
8282
8293
  const wrapperKeys = [
@@ -8314,7 +8325,7 @@
8314
8325
  ...pick(props$_, wrapperKeys)
8315
8326
  };
8316
8327
 
8317
- const inputKeys$1 = [
8328
+ const inputKeys$2 = [
8318
8329
  "id",
8319
8330
  "disabled"
8320
8331
  ];
@@ -8324,7 +8335,7 @@
8324
8335
  ];
8325
8336
  const props$Y = {
8326
8337
  ...pick(props$Z, popoverKeys$1),
8327
- ...pick(props$$, inputKeys$1),
8338
+ ...pick(props$$, inputKeys$2),
8328
8339
  type: String,
8329
8340
  placeholder: String,
8330
8341
  clearable: {
@@ -8636,9 +8647,9 @@
8636
8647
 
8637
8648
  /** @jsxImportSource vue */
8638
8649
 
8639
- const COMPONENT_NAME$1r = 'vc-input';
8650
+ const COMPONENT_NAME$1s = 'vc-input';
8640
8651
  const Input = /* @__PURE__ */ vue.defineComponent({
8641
- name: COMPONENT_NAME$1r,
8652
+ name: COMPONENT_NAME$1s,
8642
8653
  inheritAttrs: false,
8643
8654
  props: {
8644
8655
  ...props$$,
@@ -8972,9 +8983,9 @@
8972
8983
 
8973
8984
  /** @jsxImportSource vue */
8974
8985
 
8975
- const COMPONENT_NAME$1q = 'vc-input-number';
8986
+ const COMPONENT_NAME$1r = 'vc-input-number';
8976
8987
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
8977
- name: COMPONENT_NAME$1q,
8988
+ name: COMPONENT_NAME$1r,
8978
8989
  props: props$X,
8979
8990
  inheritAttrs: false,
8980
8991
  setup(props, {
@@ -9038,9 +9049,9 @@
9038
9049
 
9039
9050
  /** @jsxImportSource vue */
9040
9051
 
9041
- const COMPONENT_NAME$1p = 'vc-input-search';
9052
+ const COMPONENT_NAME$1q = 'vc-input-search';
9042
9053
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
9043
- name: COMPONENT_NAME$1p,
9054
+ name: COMPONENT_NAME$1q,
9044
9055
  props: props$W,
9045
9056
  inheritAttrs: false,
9046
9057
  setup(props, {
@@ -9331,9 +9342,9 @@
9331
9342
  function _isSlot$2(s) {
9332
9343
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
9333
9344
  }
9334
- const COMPONENT_NAME$1o = 'vc-popover-wrapper';
9345
+ const COMPONENT_NAME$1p = 'vc-popover-wrapper';
9335
9346
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
9336
- name: COMPONENT_NAME$1o,
9347
+ name: COMPONENT_NAME$1p,
9337
9348
  props: props$_,
9338
9349
  emits: ['portal-fulfilled', 'close'],
9339
9350
  setup(props, {
@@ -9585,9 +9596,9 @@
9585
9596
 
9586
9597
  /** @jsxImportSource vue */
9587
9598
 
9588
- const COMPONENT_NAME$1n = 'vc-popover';
9599
+ const COMPONENT_NAME$1o = 'vc-popover';
9589
9600
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
9590
- name: COMPONENT_NAME$1n,
9601
+ name: COMPONENT_NAME$1o,
9591
9602
  props: props$Z,
9592
9603
  emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
9593
9604
  setup(props, {
@@ -10688,9 +10699,9 @@
10688
10699
  }
10689
10700
  return view;
10690
10701
  };
10691
- const COMPONENT_NAME$1m = 'vc-date-confirm';
10702
+ const COMPONENT_NAME$1n = 'vc-date-confirm';
10692
10703
  const Confirm = /* @__PURE__ */ vue.defineComponent({
10693
- name: COMPONENT_NAME$1m,
10704
+ name: COMPONENT_NAME$1n,
10694
10705
  props: {
10695
10706
  showTime: {
10696
10707
  type: Boolean,
@@ -10754,9 +10765,9 @@
10754
10765
 
10755
10766
  /** @jsxImportSource vue */
10756
10767
 
10757
- const COMPONENT_NAME$1l = 'vc-date-header';
10768
+ const COMPONENT_NAME$1m = 'vc-date-header';
10758
10769
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
10759
- name: COMPONENT_NAME$1l,
10770
+ name: COMPONENT_NAME$1m,
10760
10771
  props: {
10761
10772
  panelDate: Date,
10762
10773
  showNext: {
@@ -10840,9 +10851,9 @@
10840
10851
 
10841
10852
  /** @jsxImportSource vue */
10842
10853
 
10843
- const COMPONENT_NAME$1k = 'vc-date-table';
10854
+ const COMPONENT_NAME$1l = 'vc-date-table';
10844
10855
  const DateTable = /* @__PURE__ */ vue.defineComponent({
10845
- name: COMPONENT_NAME$1k,
10856
+ name: COMPONENT_NAME$1l,
10846
10857
  props: {
10847
10858
  value: Array,
10848
10859
  firstDayOfWeek: {
@@ -11051,9 +11062,9 @@
11051
11062
 
11052
11063
  /** @jsxImportSource vue */
11053
11064
 
11054
- const COMPONENT_NAME$1j = 'vc-month-table';
11065
+ const COMPONENT_NAME$1k = 'vc-month-table';
11055
11066
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
11056
- name: COMPONENT_NAME$1j,
11067
+ name: COMPONENT_NAME$1k,
11057
11068
  props: {
11058
11069
  value: Array,
11059
11070
  panelDate: Date,
@@ -11185,7 +11196,7 @@
11185
11196
 
11186
11197
  /** @jsxImportSource vue */
11187
11198
 
11188
- const COMPONENT_NAME$1i = 'vc-quarter-table';
11199
+ const COMPONENT_NAME$1j = 'vc-quarter-table';
11189
11200
 
11190
11201
  /**
11191
11202
  * 获取季度对应的月份范围
@@ -11219,7 +11230,7 @@
11219
11230
  }
11220
11231
  };
11221
11232
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
11222
- name: COMPONENT_NAME$1i,
11233
+ name: COMPONENT_NAME$1j,
11223
11234
  props: {
11224
11235
  value: Array,
11225
11236
  panelDate: Date,
@@ -11342,9 +11353,9 @@
11342
11353
 
11343
11354
  /** @jsxImportSource vue */
11344
11355
 
11345
- const COMPONENT_NAME$1h = 'vc-shortcuts-select';
11356
+ const COMPONENT_NAME$1i = 'vc-shortcuts-select';
11346
11357
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
11347
- name: COMPONENT_NAME$1h,
11358
+ name: COMPONENT_NAME$1i,
11348
11359
  props: {
11349
11360
  panelDate: Date,
11350
11361
  config: Array,
@@ -11384,9 +11395,9 @@
11384
11395
 
11385
11396
  /** @jsxImportSource vue */
11386
11397
 
11387
- const COMPONENT_NAME$1g = 'vc-time-select';
11398
+ const COMPONENT_NAME$1h = 'vc-time-select';
11388
11399
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
11389
- name: COMPONENT_NAME$1g,
11400
+ name: COMPONENT_NAME$1h,
11390
11401
  props: {
11391
11402
  hours: {
11392
11403
  type: [Number, String],
@@ -11665,9 +11676,9 @@
11665
11676
 
11666
11677
  /** @jsxImportSource vue */
11667
11678
 
11668
- const COMPONENT_NAME$1f = 'vc-year-table';
11679
+ const COMPONENT_NAME$1g = 'vc-year-table';
11669
11680
  const YearTable = /* @__PURE__ */ vue.defineComponent({
11670
- name: COMPONENT_NAME$1f,
11681
+ name: COMPONENT_NAME$1g,
11671
11682
  props: {
11672
11683
  value: Array,
11673
11684
  panelDate: Date,
@@ -11790,9 +11801,9 @@
11790
11801
  }
11791
11802
  return true;
11792
11803
  };
11793
- const COMPONENT_NAME$1e = 'vc-date-range-panel';
11804
+ const COMPONENT_NAME$1f = 'vc-date-range-panel';
11794
11805
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
11795
- name: COMPONENT_NAME$1e,
11806
+ name: COMPONENT_NAME$1f,
11796
11807
  props: {
11797
11808
  ...props$V,
11798
11809
  confirm: {
@@ -12171,9 +12182,9 @@
12171
12182
 
12172
12183
  /** @jsxImportSource vue */
12173
12184
 
12174
- const COMPONENT_NAME$1d = 'vc-date-panel';
12185
+ const COMPONENT_NAME$1e = 'vc-date-panel';
12175
12186
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
12176
- name: COMPONENT_NAME$1d,
12187
+ name: COMPONENT_NAME$1e,
12177
12188
  props: {
12178
12189
  ...props$V,
12179
12190
  type: String,
@@ -12381,9 +12392,9 @@
12381
12392
  const endYear = value[1].getFullYear();
12382
12393
  return startYear === endYear;
12383
12394
  };
12384
- const COMPONENT_NAME$1c = 'vc-monthrange-panel';
12395
+ const COMPONENT_NAME$1d = 'vc-monthrange-panel';
12385
12396
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
12386
- name: COMPONENT_NAME$1c,
12397
+ name: COMPONENT_NAME$1d,
12387
12398
  props: {
12388
12399
  ...props$V,
12389
12400
  confirm: {
@@ -12558,9 +12569,9 @@
12558
12569
  const endYear = value[1].getFullYear();
12559
12570
  return startYear === endYear;
12560
12571
  };
12561
- const COMPONENT_NAME$1b = 'vc-quarterrange-panel';
12572
+ const COMPONENT_NAME$1c = 'vc-quarterrange-panel';
12562
12573
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
12563
- name: COMPONENT_NAME$1b,
12574
+ name: COMPONENT_NAME$1c,
12564
12575
  props: {
12565
12576
  ...props$V,
12566
12577
  confirm: {
@@ -12799,9 +12810,9 @@
12799
12810
  seconds
12800
12811
  };
12801
12812
  };
12802
- const COMPONENT_NAME$1a = 'vc-timerange-panel';
12813
+ const COMPONENT_NAME$1b = 'vc-timerange-panel';
12803
12814
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
12804
- name: COMPONENT_NAME$1a,
12815
+ name: COMPONENT_NAME$1b,
12805
12816
  props: props$U,
12806
12817
  emits: ['pick', 'clear', 'ok'],
12807
12818
  setup(props, {
@@ -12900,9 +12911,9 @@
12900
12911
 
12901
12912
  /** @jsxImportSource vue */
12902
12913
 
12903
- const COMPONENT_NAME$19 = 'vc-time-panel';
12914
+ const COMPONENT_NAME$1a = 'vc-time-panel';
12904
12915
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
12905
- name: COMPONENT_NAME$19,
12916
+ name: COMPONENT_NAME$1a,
12906
12917
  props: props$U,
12907
12918
  emits: ['pick', 'clear', 'ok'],
12908
12919
  setup(props, {
@@ -12957,7 +12968,7 @@
12957
12968
 
12958
12969
  /** @jsxImportSource vue */
12959
12970
 
12960
- const COMPONENT_NAME$18 = 'vc-date-picker';
12971
+ const COMPONENT_NAME$19 = 'vc-date-picker';
12961
12972
  const getPanel$1 = type => {
12962
12973
  if (['daterange', 'datetimerange'].includes(type)) {
12963
12974
  return DateRangePanel;
@@ -12968,7 +12979,7 @@
12968
12979
  }
12969
12980
  return DatePanel;
12970
12981
  };
12971
- const DatePicker = createPicker(COMPONENT_NAME$18, props$10, () => {
12982
+ const DatePicker = createPicker(COMPONENT_NAME$19, props$10, () => {
12972
12983
  const props = vue.getCurrentInstance().props;
12973
12984
  const icon = vue.ref('date');
12974
12985
  const panel = vue.shallowRef({});
@@ -13001,9 +13012,9 @@
13001
13012
 
13002
13013
  /** @jsxImportSource vue */
13003
13014
 
13004
- const COMPONENT_NAME$17 = 'vc-divider';
13015
+ const COMPONENT_NAME$18 = 'vc-divider';
13005
13016
  const Divider = /* @__PURE__ */ vue.defineComponent({
13006
- name: COMPONENT_NAME$17,
13017
+ name: COMPONENT_NAME$18,
13007
13018
  props: props$T,
13008
13019
  setup(props, {
13009
13020
  slots
@@ -13158,7 +13169,7 @@
13158
13169
 
13159
13170
  /** @jsxImportSource vue */
13160
13171
 
13161
- const COMPONENT_NAME$16 = 'vc-scroller-track';
13172
+ const COMPONENT_NAME$17 = 'vc-scroller-track';
13162
13173
  const BAR_MAP = {
13163
13174
  vertical: {
13164
13175
  scroll: 'scrollTop',
@@ -13178,7 +13189,7 @@
13178
13189
  }
13179
13190
  };
13180
13191
  const Track$1 = /* @__PURE__ */ vue.defineComponent({
13181
- name: COMPONENT_NAME$16,
13192
+ name: COMPONENT_NAME$17,
13182
13193
  props: props$S,
13183
13194
  emits: ['change'],
13184
13195
  inheritAttrs: false,
@@ -13368,9 +13379,9 @@
13368
13379
 
13369
13380
  /** @jsxImportSource vue */
13370
13381
 
13371
- const COMPONENT_NAME$15 = 'vc-scroller-bar';
13382
+ const COMPONENT_NAME$16 = 'vc-scroller-bar';
13372
13383
  const Bar = /* @__PURE__ */ vue.defineComponent({
13373
- name: COMPONENT_NAME$15,
13384
+ name: COMPONENT_NAME$16,
13374
13385
  props: props$R,
13375
13386
  emits: ['change'],
13376
13387
  setup(props, {
@@ -13585,7 +13596,7 @@
13585
13596
 
13586
13597
  /** @jsxImportSource vue */
13587
13598
 
13588
- const COMPONENT_NAME$14 = 'vc-scroller';
13599
+ const COMPONENT_NAME$15 = 'vc-scroller';
13589
13600
 
13590
13601
  /**
13591
13602
  * 作为备选方案,目前推荐使用ScrollerWheel
@@ -13596,7 +13607,7 @@
13596
13607
  * 2. 增加了一层嵌套
13597
13608
  */
13598
13609
  const Scroller = /* @__PURE__ */ vue.defineComponent({
13599
- name: COMPONENT_NAME$14,
13610
+ name: COMPONENT_NAME$15,
13600
13611
  props: props$Q,
13601
13612
  emits: ['scroll'],
13602
13613
  setup(props, {
@@ -14546,7 +14557,7 @@
14546
14557
 
14547
14558
  /** @jsxImportSource vue */
14548
14559
 
14549
- const COMPONENT_NAME$13 = 'vc-scroller-wheel';
14560
+ const COMPONENT_NAME$14 = 'vc-scroller-wheel';
14550
14561
 
14551
14562
  /**
14552
14563
  * 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
@@ -14568,7 +14579,7 @@
14568
14579
  * 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
14569
14580
  */
14570
14581
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
14571
- name: COMPONENT_NAME$13,
14582
+ name: COMPONENT_NAME$14,
14572
14583
  props: Object.assign(props$Q, {
14573
14584
  stopPropagation: {
14574
14585
  type: Boolean,
@@ -14747,9 +14758,9 @@
14747
14758
 
14748
14759
  /** @jsxImportSource vue */
14749
14760
 
14750
- const COMPONENT_NAME$12 = 'vc-drawer';
14761
+ const COMPONENT_NAME$13 = 'vc-drawer';
14751
14762
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
14752
- name: COMPONENT_NAME$12,
14763
+ name: COMPONENT_NAME$13,
14753
14764
  props: props$P,
14754
14765
  emits: ['close', 'update:modelValue', 'visible-change'],
14755
14766
  setup(props, {
@@ -14922,9 +14933,9 @@
14922
14933
 
14923
14934
  /** @jsxImportSource vue */
14924
14935
 
14925
- const COMPONENT_NAME$11 = 'vc-dropdown';
14936
+ const COMPONENT_NAME$12 = 'vc-dropdown';
14926
14937
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
14927
- name: COMPONENT_NAME$11,
14938
+ name: COMPONENT_NAME$12,
14928
14939
  props: props$O,
14929
14940
  setup(props, {
14930
14941
  slots
@@ -14948,9 +14959,9 @@
14948
14959
 
14949
14960
  /** @jsxImportSource vue */
14950
14961
 
14951
- const COMPONENT_NAME$10 = 'vc-editor';
14962
+ const COMPONENT_NAME$11 = 'vc-editor';
14952
14963
  const Editor = /* @__PURE__ */ vue.defineComponent({
14953
- name: COMPONENT_NAME$10,
14964
+ name: COMPONENT_NAME$11,
14954
14965
  props: props$N,
14955
14966
  setup(props, {
14956
14967
  slots
@@ -15094,9 +15105,9 @@
15094
15105
  });
15095
15106
  };
15096
15107
 
15097
- const COMPONENT_NAME$$ = "vc-form";
15108
+ const COMPONENT_NAME$10 = "vc-form";
15098
15109
  const Form = vue.defineComponent({
15099
- name: COMPONENT_NAME$$,
15110
+ name: COMPONENT_NAME$10,
15100
15111
  props: props$M,
15101
15112
  setup(props, { slots, expose }) {
15102
15113
  useForm(expose);
@@ -15548,9 +15559,9 @@
15548
15559
 
15549
15560
  /** @jsxImportSource vue */
15550
15561
 
15551
- const COMPONENT_NAME$_ = 'vc-form-item';
15562
+ const COMPONENT_NAME$$ = 'vc-form-item';
15552
15563
  const FormItem = /* @__PURE__ */ vue.defineComponent({
15553
- name: COMPONENT_NAME$_,
15564
+ name: COMPONENT_NAME$$,
15554
15565
  props: props$L,
15555
15566
  setup(props, {
15556
15567
  slots,
@@ -15615,9 +15626,9 @@
15615
15626
  }
15616
15627
  };
15617
15628
 
15618
- const COMPONENT_NAME$Z = "vcm-form";
15629
+ const COMPONENT_NAME$_ = "vcm-form";
15619
15630
  const MForm = vue.defineComponent({
15620
- name: COMPONENT_NAME$Z,
15631
+ name: COMPONENT_NAME$_,
15621
15632
  props: props$K,
15622
15633
  setup(props, { slots, expose }) {
15623
15634
  useForm(expose, {
@@ -15648,9 +15659,9 @@
15648
15659
 
15649
15660
  /** @jsxImportSource vue */
15650
15661
 
15651
- const COMPONENT_NAME$Y = 'vcm-form-item';
15662
+ const COMPONENT_NAME$Z = 'vcm-form-item';
15652
15663
  const MFormItem = /* @__PURE__ */ vue.defineComponent({
15653
- name: COMPONENT_NAME$Y,
15664
+ name: COMPONENT_NAME$Z,
15654
15665
  props: props$J,
15655
15666
  setup(props, {
15656
15667
  slots,
@@ -15704,9 +15715,9 @@
15704
15715
  }
15705
15716
  });
15706
15717
 
15707
- const COMPONENT_NAME$X = "vc-fragment";
15718
+ const COMPONENT_NAME$Y = "vc-fragment";
15708
15719
  const Fragment = vue.defineComponent({
15709
- name: COMPONENT_NAME$X,
15720
+ name: COMPONENT_NAME$Y,
15710
15721
  setup(_, { slots }) {
15711
15722
  return () => vue.h(vue.Fragment, slots.default?.());
15712
15723
  }
@@ -15723,9 +15734,9 @@
15723
15734
 
15724
15735
  /** @jsxImportSource vue */
15725
15736
 
15726
- const COMPONENT_NAME$W = 'vc-html-to-image';
15737
+ const COMPONENT_NAME$X = 'vc-html-to-image';
15727
15738
  const HTMLToImage = /* @__PURE__ */ vue.defineComponent({
15728
- name: COMPONENT_NAME$W,
15739
+ name: COMPONENT_NAME$X,
15729
15740
  props: props$I,
15730
15741
  setup(props, {
15731
15742
  slots
@@ -16183,7 +16194,7 @@
16183
16194
 
16184
16195
  /** @jsxImportSource vue */
16185
16196
 
16186
- const COMPONENT_NAME$V = 'vc-image';
16197
+ const COMPONENT_NAME$W = 'vc-image';
16187
16198
  let isSupportObjectFit = false;
16188
16199
  window.addEventListener('DOMContentLoaded', () => {
16189
16200
  isSupportObjectFit = !IS_SERVER$2 && document.documentElement.style.objectFit !== undefined;
@@ -16196,7 +16207,7 @@
16196
16207
  SCALE_DOWN: 'scale-down'
16197
16208
  };
16198
16209
  const Image$1 = /* @__PURE__ */ vue.defineComponent({
16199
- name: COMPONENT_NAME$V,
16210
+ name: COMPONENT_NAME$W,
16200
16211
  inheritAttrs: false,
16201
16212
  props: props$H,
16202
16213
  setup(props, {
@@ -16401,9 +16412,9 @@
16401
16412
 
16402
16413
  /** @jsxImportSource vue */
16403
16414
 
16404
- const COMPONENT_NAME$U = 'vc-image-crop';
16415
+ const COMPONENT_NAME$V = 'vc-image-crop';
16405
16416
  const ImageCrop = /* @__PURE__ */ vue.defineComponent({
16406
- name: COMPONENT_NAME$U,
16417
+ name: COMPONENT_NAME$V,
16407
16418
  props: props$G,
16408
16419
  setup(props, {
16409
16420
  slots
@@ -16427,9 +16438,9 @@
16427
16438
 
16428
16439
  /** @jsxImportSource vue */
16429
16440
 
16430
- const COMPONENT_NAME$T = 'vc-image-preview';
16441
+ const COMPONENT_NAME$U = 'vc-image-preview';
16431
16442
  const ImagePreview = /* @__PURE__ */ vue.defineComponent({
16432
- name: COMPONENT_NAME$T,
16443
+ name: COMPONENT_NAME$U,
16433
16444
  props: props$F,
16434
16445
  setup(props, {
16435
16446
  slots
@@ -16453,9 +16464,9 @@
16453
16464
 
16454
16465
  /** @jsxImportSource vue */
16455
16466
 
16456
- const COMPONENT_NAME$S = 'vc-image-processing';
16467
+ const COMPONENT_NAME$T = 'vc-image-processing';
16457
16468
  const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
16458
- name: COMPONENT_NAME$S,
16469
+ name: COMPONENT_NAME$T,
16459
16470
  props: props$E,
16460
16471
  setup(props, {
16461
16472
  slots
@@ -16472,9 +16483,9 @@
16472
16483
 
16473
16484
  /** @jsxImportSource vue */
16474
16485
 
16475
- const COMPONENT_NAME$R = 'vcm-input';
16486
+ const COMPONENT_NAME$S = 'vcm-input';
16476
16487
  const MInput = /* @__PURE__ */ vue.defineComponent({
16477
- name: COMPONENT_NAME$R,
16488
+ name: COMPONENT_NAME$S,
16478
16489
  inheritAttrs: false,
16479
16490
  props: {
16480
16491
  ...props$$,
@@ -16563,9 +16574,9 @@
16563
16574
 
16564
16575
  /** @jsxImportSource vue */
16565
16576
 
16566
- const COMPONENT_NAME$Q = 'vcm-input-number';
16577
+ const COMPONENT_NAME$R = 'vcm-input-number';
16567
16578
  const MInputNumber = /* @__PURE__ */ vue.defineComponent({
16568
- name: COMPONENT_NAME$Q,
16579
+ name: COMPONENT_NAME$R,
16569
16580
  props: props$X,
16570
16581
  inheritAttrs: false,
16571
16582
  setup(props, {
@@ -16614,9 +16625,9 @@
16614
16625
 
16615
16626
  /** @jsxImportSource vue */
16616
16627
 
16617
- const COMPONENT_NAME$P = 'vcm-input-search';
16628
+ const COMPONENT_NAME$Q = 'vcm-input-search';
16618
16629
  const MInputSearch = /* @__PURE__ */ vue.defineComponent({
16619
- name: COMPONENT_NAME$P,
16630
+ name: COMPONENT_NAME$Q,
16620
16631
  props: {
16621
16632
  ...props$W,
16622
16633
  cancelText: {
@@ -16693,9 +16704,9 @@
16693
16704
  }
16694
16705
  };
16695
16706
 
16696
- const COMPONENT_NAME$O = "vcm-list";
16707
+ const COMPONENT_NAME$P = "vcm-list";
16697
16708
  const MList = vue.defineComponent({
16698
- name: COMPONENT_NAME$O,
16709
+ name: COMPONENT_NAME$P,
16699
16710
  props: props$D,
16700
16711
  setup(props, { slots }) {
16701
16712
  vue.provide("vc-list", { props });
@@ -16750,10 +16761,10 @@
16750
16761
 
16751
16762
  /** @jsxImportSource vue */
16752
16763
 
16753
- const COMPONENT_NAME$N = 'vcm-list-item';
16764
+ const COMPONENT_NAME$O = 'vcm-list-item';
16754
16765
  const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
16755
16766
  const MListItem = /* @__PURE__ */ vue.defineComponent({
16756
- name: COMPONENT_NAME$N,
16767
+ name: COMPONENT_NAME$O,
16757
16768
  props: props$C,
16758
16769
  emits: ['click'],
16759
16770
  setup(props, {
@@ -16886,11 +16897,11 @@
16886
16897
 
16887
16898
  /** @jsxImportSource vue */
16888
16899
 
16889
- const COMPONENT_NAME$M = 'vc-marquee';
16900
+ const COMPONENT_NAME$N = 'vc-marquee';
16890
16901
  const ANIMATION = prefixStyle('animation').camel;
16891
16902
  const TRANSFORM_KEBAB = prefixStyle('transform').kebab;
16892
16903
  const Marquee = /* @__PURE__ */ vue.defineComponent({
16893
- name: COMPONENT_NAME$M,
16904
+ name: COMPONENT_NAME$N,
16894
16905
  props: props$B,
16895
16906
  setup(props, {
16896
16907
  slots
@@ -16958,9 +16969,9 @@
16958
16969
  }
16959
16970
  };
16960
16971
 
16961
- const COMPONENT_NAME$L = "vc-resizer";
16972
+ const COMPONENT_NAME$M = "vc-resizer";
16962
16973
  const Resizer = vue.defineComponent({
16963
- name: COMPONENT_NAME$L,
16974
+ name: COMPONENT_NAME$M,
16964
16975
  props: props$A,
16965
16976
  emit: ["resize", "change"],
16966
16977
  setup(props, { emit, slots, expose }) {
@@ -17107,10 +17118,10 @@
17107
17118
 
17108
17119
  /** @jsxImportSource vue */
17109
17120
 
17110
- const COMPONENT_NAME$K = 'vc-modal';
17121
+ const COMPONENT_NAME$L = 'vc-modal';
17111
17122
  let zIndexNumber = 1002;
17112
17123
  const ModalView = /* @__PURE__ */ vue.defineComponent({
17113
- name: COMPONENT_NAME$K,
17124
+ name: COMPONENT_NAME$L,
17114
17125
  emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
17115
17126
  props: props$z,
17116
17127
  setup(props, {
@@ -17537,9 +17548,9 @@
17537
17548
 
17538
17549
  /** @jsxImportSource vue */
17539
17550
 
17540
- const COMPONENT_NAME$J = 'vc-modal';
17551
+ const COMPONENT_NAME$K = 'vc-modal';
17541
17552
  const MModalView = /* @__PURE__ */ vue.defineComponent({
17542
- name: COMPONENT_NAME$J,
17553
+ name: COMPONENT_NAME$K,
17543
17554
  emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
17544
17555
  props: props$y,
17545
17556
  setup(props, {
@@ -17751,9 +17762,9 @@
17751
17762
 
17752
17763
  /** @jsxImportSource vue */
17753
17764
 
17754
- const COMPONENT_NAME$I = 'vc-notice';
17765
+ const COMPONENT_NAME$J = 'vc-notice';
17755
17766
  const NoticeView = /* @__PURE__ */ vue.defineComponent({
17756
- name: COMPONENT_NAME$I,
17767
+ name: COMPONENT_NAME$J,
17757
17768
  props: props$x,
17758
17769
  emits: ['portal-fulfilled', 'close', 'before-close'],
17759
17770
  setup(props, {
@@ -17926,9 +17937,9 @@
17926
17937
 
17927
17938
  /** @jsxImportSource vue */
17928
17939
 
17929
- const COMPONENT_NAME$H = 'vc-option';
17940
+ const COMPONENT_NAME$I = 'vc-option';
17930
17941
  const Option$1 = /* @__PURE__ */ vue.defineComponent({
17931
- name: COMPONENT_NAME$H,
17942
+ name: COMPONENT_NAME$I,
17932
17943
  props: props$w,
17933
17944
  setup(props, {
17934
17945
  slots
@@ -18041,9 +18052,9 @@
18041
18052
 
18042
18053
  /** @jsxImportSource vue */
18043
18054
 
18044
- const COMPONENT_NAME$G = 'vc-tag';
18055
+ const COMPONENT_NAME$H = 'vc-tag';
18045
18056
  const Tag = /* @__PURE__ */ vue.defineComponent({
18046
- name: COMPONENT_NAME$G,
18057
+ name: COMPONENT_NAME$H,
18047
18058
  props: props$u,
18048
18059
  emits: ['close', 'change'],
18049
18060
  setup(props, {
@@ -18112,9 +18123,9 @@
18112
18123
 
18113
18124
  /** @jsxImportSource vue */
18114
18125
 
18115
- const COMPONENT_NAME$F = 'vc-select-option';
18126
+ const COMPONENT_NAME$G = 'vc-select-option';
18116
18127
  const Option = /* @__PURE__ */ vue.defineComponent({
18117
- name: COMPONENT_NAME$F,
18128
+ name: COMPONENT_NAME$G,
18118
18129
  props: props$t,
18119
18130
  setup(props, {
18120
18131
  slots
@@ -18187,9 +18198,9 @@
18187
18198
 
18188
18199
  /** @jsxImportSource vue */
18189
18200
 
18190
- const COMPONENT_NAME$E = 'vc-select-option-group';
18201
+ const COMPONENT_NAME$F = 'vc-select-option-group';
18191
18202
  const OptionGroup = /* @__PURE__ */ vue.defineComponent({
18192
- name: COMPONENT_NAME$E,
18203
+ name: COMPONENT_NAME$F,
18193
18204
  props: props$s,
18194
18205
  setup(props, {
18195
18206
  slots
@@ -18208,7 +18219,7 @@
18208
18219
  }
18209
18220
  });
18210
18221
 
18211
- const inputKeys = [
18222
+ const inputKeys$1 = [
18212
18223
  "id",
18213
18224
  "disabled",
18214
18225
  "modelValue",
@@ -18220,7 +18231,7 @@
18220
18231
  ];
18221
18232
  const props$r = {
18222
18233
  ...pick(props$Z, popoverKeys),
18223
- ...pick(props$$, inputKeys),
18234
+ ...pick(props$$, inputKeys$1),
18224
18235
  data: {
18225
18236
  type: Array,
18226
18237
  default: () => []
@@ -18287,9 +18298,9 @@
18287
18298
  function _isSlot$1(s) {
18288
18299
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
18289
18300
  }
18290
- const COMPONENT_NAME$D = 'vc-select';
18301
+ const COMPONENT_NAME$E = 'vc-select';
18291
18302
  const Select = /* @__PURE__ */ vue.defineComponent({
18292
- name: COMPONENT_NAME$D,
18303
+ name: COMPONENT_NAME$E,
18293
18304
  props: props$r,
18294
18305
  emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
18295
18306
  setup(props, {
@@ -18533,9 +18544,9 @@
18533
18544
 
18534
18545
  /** @jsxImportSource vue */
18535
18546
 
18536
- const COMPONENT_NAME$C = 'vc-pagination';
18547
+ const COMPONENT_NAME$D = 'vc-pagination';
18537
18548
  const Pagination = /* @__PURE__ */ vue.defineComponent({
18538
- name: COMPONENT_NAME$C,
18549
+ name: COMPONENT_NAME$D,
18539
18550
  props: props$v,
18540
18551
  emits: ['update:current', 'change', 'page-size-change'],
18541
18552
  setup(props, {
@@ -18733,9 +18744,9 @@
18733
18744
 
18734
18745
  /** @jsxImportSource vue */
18735
18746
 
18736
- const COMPONENT_NAME$B = 'vc-picker';
18747
+ const COMPONENT_NAME$C = 'vc-picker';
18737
18748
  const Picker = /* @__PURE__ */ vue.defineComponent({
18738
- name: COMPONENT_NAME$B,
18749
+ name: COMPONENT_NAME$C,
18739
18750
  props: props$q,
18740
18751
  setup(props, {
18741
18752
  slots
@@ -18759,9 +18770,9 @@
18759
18770
 
18760
18771
  /** @jsxImportSource vue */
18761
18772
 
18762
- const COMPONENT_NAME$A = 'vc-popconfirm';
18773
+ const COMPONENT_NAME$B = 'vc-popconfirm';
18763
18774
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
18764
- name: COMPONENT_NAME$A,
18775
+ name: COMPONENT_NAME$B,
18765
18776
  props: props$p,
18766
18777
  setup(props, {
18767
18778
  slots
@@ -18787,9 +18798,9 @@
18787
18798
 
18788
18799
  /** @jsxImportSource vue */
18789
18800
 
18790
- const COMPONENT_NAME$z = 'vc-popup';
18801
+ const COMPONENT_NAME$A = 'vc-popup';
18791
18802
  const Popup = /* @__PURE__ */ vue.defineComponent({
18792
- name: COMPONENT_NAME$z,
18803
+ name: COMPONENT_NAME$A,
18793
18804
  props: props$o,
18794
18805
  setup(props, {
18795
18806
  slots
@@ -18816,9 +18827,9 @@
18816
18827
 
18817
18828
  /** @jsxImportSource vue */
18818
18829
 
18819
- const COMPONENT_NAME$y = 'vc-print';
18830
+ const COMPONENT_NAME$z = 'vc-print';
18820
18831
  const Print = /* @__PURE__ */ vue.defineComponent({
18821
- name: COMPONENT_NAME$y,
18832
+ name: COMPONENT_NAME$z,
18822
18833
  props: props$n,
18823
18834
  setup(props, {
18824
18835
  expose,
@@ -18920,9 +18931,9 @@
18920
18931
 
18921
18932
  /** @jsxImportSource vue */
18922
18933
 
18923
- const COMPONENT_NAME$x = 'vc-progress-circle';
18934
+ const COMPONENT_NAME$y = 'vc-progress-circle';
18924
18935
  const Circle$1 = /* @__PURE__ */ vue.defineComponent({
18925
- name: COMPONENT_NAME$x,
18936
+ name: COMPONENT_NAME$y,
18926
18937
  props: props$m,
18927
18938
  setup(props, {
18928
18939
  slots
@@ -18982,9 +18993,9 @@
18982
18993
 
18983
18994
  /** @jsxImportSource vue */
18984
18995
 
18985
- const COMPONENT_NAME$w = 'vc-progress-line';
18996
+ const COMPONENT_NAME$x = 'vc-progress-line';
18986
18997
  const Line$2 = /* @__PURE__ */ vue.defineComponent({
18987
- name: COMPONENT_NAME$w,
18998
+ name: COMPONENT_NAME$x,
18988
18999
  props: props$m,
18989
19000
  setup(props) {
18990
19001
  const colorStyle = vue.computed(() => {
@@ -19031,9 +19042,9 @@
19031
19042
  function _isSlot(s) {
19032
19043
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
19033
19044
  }
19034
- const COMPONENT_NAME$v = 'vc-progress';
19045
+ const COMPONENT_NAME$w = 'vc-progress';
19035
19046
  const Progress = /* @__PURE__ */ vue.defineComponent({
19036
- name: COMPONENT_NAME$v,
19047
+ name: COMPONENT_NAME$w,
19037
19048
  props: props$m,
19038
19049
  setup(props, {
19039
19050
  slots
@@ -19185,9 +19196,9 @@
19185
19196
 
19186
19197
  /** @jsxImportSource vue */
19187
19198
 
19188
- const COMPONENT_NAME$u = 'vc-radio';
19199
+ const COMPONENT_NAME$v = 'vc-radio';
19189
19200
  const Radio = /* @__PURE__ */ vue.defineComponent({
19190
- name: COMPONENT_NAME$u,
19201
+ name: COMPONENT_NAME$v,
19191
19202
  props: props$l,
19192
19203
  emits: ['update:modelValue', 'change'],
19193
19204
  setup(props, {
@@ -19298,9 +19309,9 @@
19298
19309
 
19299
19310
  /** @jsxImportSource vue */
19300
19311
 
19301
- const COMPONENT_NAME$t = 'vc-radio-group';
19312
+ const COMPONENT_NAME$u = 'vc-radio-group';
19302
19313
  const RadioGroup = /* @__PURE__ */ vue.defineComponent({
19303
- name: COMPONENT_NAME$t,
19314
+ name: COMPONENT_NAME$u,
19304
19315
  props: props$k,
19305
19316
  emits: ['update:modelValue', 'change'],
19306
19317
  setup(props, {
@@ -19322,9 +19333,9 @@
19322
19333
 
19323
19334
  /** @jsxImportSource vue */
19324
19335
 
19325
- const COMPONENT_NAME$s = 'vcm-radio';
19336
+ const COMPONENT_NAME$t = 'vcm-radio';
19326
19337
  const MRadio = /* @__PURE__ */ vue.defineComponent({
19327
- name: COMPONENT_NAME$s,
19338
+ name: COMPONENT_NAME$t,
19328
19339
  props: props$l,
19329
19340
  emits: ['update:modelValue', 'change'],
19330
19341
  setup(props, {
@@ -19365,9 +19376,9 @@
19365
19376
 
19366
19377
  /** @jsxImportSource vue */
19367
19378
 
19368
- const COMPONENT_NAME$r = 'vcm-radio-group';
19379
+ const COMPONENT_NAME$s = 'vcm-radio-group';
19369
19380
  const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
19370
- name: COMPONENT_NAME$r,
19381
+ name: COMPONENT_NAME$s,
19371
19382
  props: props$k,
19372
19383
  emits: ['update:modelValue', 'change'],
19373
19384
  setup(props, {
@@ -19396,9 +19407,9 @@
19396
19407
 
19397
19408
  /** @jsxImportSource vue */
19398
19409
 
19399
- const COMPONENT_NAME$q = 'vc-rate';
19410
+ const COMPONENT_NAME$r = 'vc-rate';
19400
19411
  const Rate = /* @__PURE__ */ vue.defineComponent({
19401
- name: COMPONENT_NAME$q,
19412
+ name: COMPONENT_NAME$r,
19402
19413
  props: props$j,
19403
19414
  setup(props, {
19404
19415
  slots
@@ -19580,9 +19591,9 @@
19580
19591
 
19581
19592
  /** @jsxImportSource vue */
19582
19593
 
19583
- const COMPONENT_NAME$p = 'vc-recycle-list-scroll-state';
19594
+ const COMPONENT_NAME$q = 'vc-recycle-list-scroll-state';
19584
19595
  const ScrollState = /* @__PURE__ */ vue.defineComponent({
19585
- name: COMPONENT_NAME$p,
19596
+ name: COMPONENT_NAME$q,
19586
19597
  setup(_, {
19587
19598
  slots
19588
19599
  }) {
@@ -19712,12 +19723,12 @@
19712
19723
 
19713
19724
  /** @jsxImportSource vue */
19714
19725
 
19715
- const COMPONENT_NAME$o = 'vc-recycle-list-container';
19726
+ const COMPONENT_NAME$p = 'vc-recycle-list-container';
19716
19727
 
19717
19728
  // TODO: 抽离
19718
19729
  const transformKey = prefixStyle('transform').camel;
19719
19730
  const Container = /* @__PURE__ */ vue.defineComponent({
19720
- name: COMPONENT_NAME$o,
19731
+ name: COMPONENT_NAME$p,
19721
19732
  props: props$h,
19722
19733
  emits: ['refresh'],
19723
19734
  setup(props, {
@@ -19815,9 +19826,9 @@
19815
19826
 
19816
19827
  /** @jsxImportSource vue */
19817
19828
 
19818
- const COMPONENT_NAME$n = 'vc-recycle-list';
19829
+ const COMPONENT_NAME$o = 'vc-recycle-list';
19819
19830
  const RecycleList = /* @__PURE__ */ vue.defineComponent({
19820
- name: COMPONENT_NAME$n,
19831
+ name: COMPONENT_NAME$o,
19821
19832
  props: props$i,
19822
19833
  emits: ['scroll', 'row-resize'],
19823
19834
  setup(props, {
@@ -19964,21 +19975,12 @@
19964
19975
  const current = props.inverted ? rebuildData.value[rebuildDataIndexMap.value[index]] : rebuildData.value[index];
19965
19976
  if (!current) return; // 受到`removeUnusedPlaceholders`影响,无效的会被回收
19966
19977
 
19967
- const oldSize = current.size;
19968
19978
  const dom = preloads.value[index] || curloads.value[props.inverted ? index : index - firstItemIndex.value];
19969
19979
  if (dom) {
19970
19980
  current.size = dom[K.offsetSize] || placeholderSize.value;
19971
19981
  } else if (current) {
19972
19982
  current.size = placeholderSize.value;
19973
19983
  }
19974
-
19975
- // 这样的考虑欠佳,待优化
19976
- if (oldSize !== current.size) {
19977
- emit('row-resize', {
19978
- index: current.id,
19979
- size: current.size
19980
- });
19981
- }
19982
19984
  };
19983
19985
  const refreshItemPosition = () => {
19984
19986
  const sizes = Array.from({
@@ -20208,6 +20210,13 @@
20208
20210
  leading: false,
20209
20211
  trailing: true
20210
20212
  });
20213
+ const handleRowChange = (e, row) => {
20214
+ emit('row-resize', {
20215
+ index: row.id,
20216
+ height: e.height,
20217
+ width: e.width
20218
+ });
20219
+ };
20211
20220
 
20212
20221
  // 设置初始数据
20213
20222
  const setDataSource = async (v, oldV) => {
@@ -20338,7 +20347,8 @@
20338
20347
  "data-column": item.column,
20339
20348
  "data-size": item.size,
20340
20349
  "data-position": item.position,
20341
- "onResize": handleResize
20350
+ "onResize": handleResize,
20351
+ "onChange": e => handleRowChange(e, item)
20342
20352
  }, {
20343
20353
  default: () => [slots.default?.({
20344
20354
  row: item.data || {},
@@ -20389,9 +20399,9 @@
20389
20399
 
20390
20400
  /** @jsxImportSource vue */
20391
20401
 
20392
- const COMPONENT_NAME$m = 'vc-slider';
20402
+ const COMPONENT_NAME$n = 'vc-slider';
20393
20403
  const Slider = /* @__PURE__ */ vue.defineComponent({
20394
- name: COMPONENT_NAME$m,
20404
+ name: COMPONENT_NAME$n,
20395
20405
  props: props$g,
20396
20406
  setup(props, {
20397
20407
  slots
@@ -20415,9 +20425,9 @@
20415
20425
 
20416
20426
  /** @jsxImportSource vue */
20417
20427
 
20418
- const COMPONENT_NAME$l = 'vc-sort-list';
20428
+ const COMPONENT_NAME$m = 'vc-sort-list';
20419
20429
  const SortList = /* @__PURE__ */ vue.defineComponent({
20420
- name: COMPONENT_NAME$l,
20430
+ name: COMPONENT_NAME$m,
20421
20431
  props: props$f,
20422
20432
  setup(props, {
20423
20433
  slots
@@ -20441,9 +20451,9 @@
20441
20451
 
20442
20452
  /** @jsxImportSource vue */
20443
20453
 
20444
- const COMPONENT_NAME$k = 'vc-steps';
20454
+ const COMPONENT_NAME$l = 'vc-steps';
20445
20455
  const Steps = /* @__PURE__ */ vue.defineComponent({
20446
- name: COMPONENT_NAME$k,
20456
+ name: COMPONENT_NAME$l,
20447
20457
  props: props$e,
20448
20458
  setup(props, {
20449
20459
  slots
@@ -20556,9 +20566,9 @@
20556
20566
 
20557
20567
  /** @jsxImportSource vue */
20558
20568
 
20559
- const COMPONENT_NAME$j = 'vc-switch';
20569
+ const COMPONENT_NAME$k = 'vc-switch';
20560
20570
  const Switch = /* @__PURE__ */ vue.defineComponent({
20561
- name: COMPONENT_NAME$j,
20571
+ name: COMPONENT_NAME$k,
20562
20572
  props: props$d,
20563
20573
  // click -> onClick要被拦截,此处不能放置
20564
20574
  emits: ['update:modelValue', 'change', 'click'],
@@ -20595,9 +20605,9 @@
20595
20605
 
20596
20606
  /** @jsxImportSource vue */
20597
20607
 
20598
- const COMPONENT_NAME$i = 'vcm-switch';
20608
+ const COMPONENT_NAME$j = 'vcm-switch';
20599
20609
  const MSwitch = /* @__PURE__ */ vue.defineComponent({
20600
- name: COMPONENT_NAME$i,
20610
+ name: COMPONENT_NAME$j,
20601
20611
  props: props$d,
20602
20612
  // click -> onClick要被拦截,此处不能放置
20603
20613
  emits: ['update:modelValue', 'change', 'click'],
@@ -38580,6 +38590,7 @@
38580
38590
  });
38581
38591
  }
38582
38592
  setData(data) {
38593
+ const { primaryKey } = this.table.props;
38583
38594
  const dataInstanceChanged = this.states._data !== data;
38584
38595
  this.states._data = data;
38585
38596
  this.states.data = data;
@@ -38591,19 +38602,22 @@
38591
38602
  });
38592
38603
  this.states.list = data.reduce((pre, row, index) => {
38593
38604
  const cache = caches.get(row) || { heightMap: {} };
38594
- pre.push({
38595
- rows: [
38596
- {
38597
- index,
38598
- data: row,
38599
- height: cache.height || "",
38600
- heightMap: {
38601
- left: cache.heightMap.left || "",
38602
- main: cache.heightMap.main || "",
38603
- right: cache.heightMap.right || ""
38604
- }
38605
+ const rows = [
38606
+ {
38607
+ index,
38608
+ data: row,
38609
+ height: cache.height || "",
38610
+ heightMap: {
38611
+ left: cache.heightMap.left || "",
38612
+ main: cache.heightMap.main || "",
38613
+ right: cache.heightMap.right || ""
38605
38614
  }
38606
- ],
38615
+ }
38616
+ ];
38617
+ const id = primaryKey ? rows.map((rowData) => getRowValue(rowData.data, primaryKey)).join(",") : index;
38618
+ pre.push({
38619
+ id: typeof id === "undefined" ? index : id,
38620
+ rows,
38607
38621
  expand: false
38608
38622
  });
38609
38623
  return pre;
@@ -38917,9 +38931,9 @@
38917
38931
 
38918
38932
  /** @jsxImportSource vue */
38919
38933
 
38920
- const COMPONENT_NAME$h = 'vc-table-normal-list';
38934
+ const COMPONENT_NAME$i = 'vc-table-normal-list';
38921
38935
  const NormalList = /* @__PURE__ */ vue.defineComponent({
38922
- name: COMPONENT_NAME$h,
38936
+ name: COMPONENT_NAME$i,
38923
38937
  props: {
38924
38938
  data: {
38925
38939
  type: Array,
@@ -38934,17 +38948,19 @@
38934
38948
  const handleResize = (e, index) => {
38935
38949
  emit('row-resize', {
38936
38950
  index,
38937
- size: e.height
38951
+ height: e.height,
38952
+ width: e.width
38938
38953
  });
38939
38954
  };
38940
38955
  return () => {
38941
- return props.data.map((row, index) => {
38956
+ return props.data.map((mergeData, index) => {
38942
38957
  return vue.createVNode(Resizer, {
38958
+ "key": mergeData.id,
38943
38959
  "fill": false,
38944
38960
  "onChange": e => handleResize(e, index)
38945
38961
  }, {
38946
38962
  default: () => [slots.default?.({
38947
- row,
38963
+ row: mergeData,
38948
38964
  index
38949
38965
  })]
38950
38966
  });
@@ -39093,32 +39109,6 @@
39093
39109
  table.hoverState.value = hoverState;
39094
39110
  table.emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, e);
39095
39111
  }
39096
-
39097
- // 判断是否text-overflow, 如果是就显示tooltip
39098
- const cellChild = e.target.querySelector('.vc-table__cell');
39099
- if (!(hasClass(cellChild, 'vc-popover') && cellChild.childNodes.length)) {
39100
- return;
39101
- }
39102
- // 使用范围宽度而不是滚动宽度来确定文本是否溢出,以解决潜在的FireFox bug
39103
- // https://bugzilla.mozilla.org/show_bug.cgi?id=1074543#c3
39104
- const range = document.createRange();
39105
- range.setStart(cellChild, 0);
39106
- range.setEnd(cellChild, cellChild.childNodes.length);
39107
- const rangeWidth = range.getBoundingClientRect().width;
39108
- const padding = (parseInt(cellChild.style.paddingLeft, 10) || 0) + (parseInt(cellChild.style.paddingRight, 10) || 0);
39109
- if (rangeWidth + padding > cellChild.offsetWidth || cellChild.scrollWidth > cellChild.offsetWidth) {
39110
- Popover.open({
39111
- el: document.body,
39112
- name: 'vc-table-popover',
39113
- // 确保不重复创建
39114
- triggerEl: cell,
39115
- hover: true,
39116
- theme: 'dark',
39117
- placement: 'top',
39118
- content: cell.innerText || cell.textContent,
39119
- alone: true
39120
- });
39121
- }
39122
39112
  };
39123
39113
  const handleCellMouseLeave = e => {
39124
39114
  const cell = getCell(e);
@@ -39206,13 +39196,14 @@
39206
39196
  })]);
39207
39197
  })]);
39208
39198
  };
39209
- const renderMergeRow = (mergeData, mergeIndex) => {
39199
+ const renderMergeRow = mergeData => {
39210
39200
  const {
39211
- rows
39201
+ rows,
39202
+ id
39212
39203
  } = mergeData;
39213
39204
  return vue.createVNode("div", {
39214
39205
  "class": "vc-table__merge-row",
39215
- "key": mergeIndex
39206
+ "key": id
39216
39207
  }, [rows.map(row => {
39217
39208
  return renderRow(row, row.index);
39218
39209
  })]);
@@ -39220,7 +39211,7 @@
39220
39211
  const handleMergeRowResize = v => {
39221
39212
  if (table.props.rowHeight) return;
39222
39213
  states.list[v.index].rows.forEach(row => {
39223
- row.heightMap[props.fixed || 'main'] = v.size;
39214
+ row.heightMap[props.fixed || 'main'] = v.height;
39224
39215
  const heights = [row.heightMap.main];
39225
39216
  if (states.leftFixedCount) {
39226
39217
  heights.push(row.heightMap.left);
@@ -39272,17 +39263,15 @@
39272
39263
  "style": props.heightStyle
39273
39264
  }, {
39274
39265
  default: ({
39275
- row,
39276
- index
39277
- }) => renderMergeRow(row, index)
39266
+ row
39267
+ }) => renderMergeRow(row)
39278
39268
  }) : vue.createVNode(NormalList, {
39279
39269
  "data": states.list,
39280
39270
  "onRowResize": handleMergeRowResize
39281
39271
  }, {
39282
39272
  default: ({
39283
- row,
39284
- index
39285
- }) => renderMergeRow(row, index)
39273
+ row
39274
+ }) => renderMergeRow(row)
39286
39275
  })]);
39287
39276
  };
39288
39277
  }
@@ -39776,9 +39765,9 @@
39776
39765
 
39777
39766
  /** @jsxImportSource vue */
39778
39767
 
39779
- const COMPONENT_NAME$g = 'vc-table';
39768
+ const COMPONENT_NAME$h = 'vc-table';
39780
39769
  const Table = /* @__PURE__ */ vue.defineComponent({
39781
- name: COMPONENT_NAME$g,
39770
+ name: COMPONENT_NAME$h,
39782
39771
  props: props$c,
39783
39772
  emits: ['select', 'select-all', 'selection-change', 'cell-mouse-enter', 'cell-mouse-leave', 'cell-click', 'cell-dblclick', 'row-click', 'row-contextmenu', 'row-dblclick', 'header-click', 'header-contextmenu', 'current-change', 'header-dragend ', 'expand-change', 'sort-change'],
39784
39773
  setup(props, {
@@ -40308,6 +40297,194 @@
40308
40297
  }
40309
40298
  });
40310
40299
 
40300
+ const props$b = {
40301
+ tag: {
40302
+ type: String,
40303
+ default: "div"
40304
+ },
40305
+ value: {
40306
+ type: String,
40307
+ default: ""
40308
+ },
40309
+ line: {
40310
+ type: Number,
40311
+ default: 0
40312
+ },
40313
+ // TODO: 是否改为tail-indent来表示尾部缩进
40314
+ indent: {
40315
+ type: Number,
40316
+ default: 0
40317
+ },
40318
+ resize: {
40319
+ type: [Boolean, Number],
40320
+ default: 100
40321
+ },
40322
+ suffix: {
40323
+ type: String,
40324
+ default: "..."
40325
+ },
40326
+ placement: {
40327
+ type: String,
40328
+ default: "top"
40329
+ },
40330
+ portalClass: [Object, String, Array],
40331
+ portalStyle: [Object, String, Array],
40332
+ renderRow: {
40333
+ type: Function,
40334
+ default: (props$) => {
40335
+ return props$.value;
40336
+ }
40337
+ }
40338
+ };
40339
+
40340
+ const HIDDEN_TEXT_STYLE = `
40341
+ position: absolute!important;
40342
+ word-break: break-all!important;
40343
+ overflow: auto!important;
40344
+ opacity: 0!important;
40345
+ z-index: -1000!important;
40346
+ top: 0!important;
40347
+ right: 0!important;
40348
+ `;
40349
+ const SIZING_STYLE$1 = [
40350
+ "letter-spacing",
40351
+ "line-height",
40352
+ "padding-top",
40353
+ "padding-bottom",
40354
+ "font-family",
40355
+ "font-weight",
40356
+ "font-size",
40357
+ "text-rendering",
40358
+ "text-transform",
40359
+ "width",
40360
+ // 'text-indent', // 需要额外计算
40361
+ "padding-left",
40362
+ "padding-right",
40363
+ "border-width",
40364
+ "box-sizing"
40365
+ ];
40366
+ let hiddenEl$1;
40367
+ const getFitIndex = (options = {}) => {
40368
+ const { el, line, value, suffix, indent } = options;
40369
+ let lineHeight = parseInt(getStyle$1(el, "line-height"), 10);
40370
+ if (!hiddenEl$1) {
40371
+ hiddenEl$1 = document.createElement("div");
40372
+ document.body.appendChild(hiddenEl$1);
40373
+ }
40374
+ el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
40375
+ const {
40376
+ paddingSize,
40377
+ borderSize,
40378
+ boxSizing,
40379
+ sizingStyle
40380
+ } = utils.getComputedStyle(el, SIZING_STYLE$1);
40381
+ const textIndent = `text-indent: ${parseInt(getStyle$1(el, "text-indent"), 10) + indent}px;`;
40382
+ hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
40383
+ let sideHeight = paddingSize || 0;
40384
+ boxSizing === "border-box" && (sideHeight += borderSize);
40385
+ if (Number.isNaN(lineHeight)) {
40386
+ hiddenEl$1.innerText = ".";
40387
+ lineHeight = hiddenEl$1.clientHeight - sideHeight;
40388
+ }
40389
+ let endIndex = 0;
40390
+ hiddenEl$1.innerText = suffix;
40391
+ value.split("").forEach((item, i) => {
40392
+ let old = hiddenEl$1.innerText;
40393
+ old = old.substring(0, old.length - suffix.length);
40394
+ hiddenEl$1.innerText = old + item + suffix;
40395
+ if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
40396
+ endIndex = i;
40397
+ }
40398
+ });
40399
+ return endIndex;
40400
+ };
40401
+
40402
+ /** @jsxImportSource vue */
40403
+
40404
+ const COMPONENT_NAME$g = 'vc-text';
40405
+ const Text = /* @__PURE__ */ vue.defineComponent({
40406
+ name: COMPONENT_NAME$g,
40407
+ props: props$b,
40408
+ setup(props, {
40409
+ emit
40410
+ }) {
40411
+ const instance = vue.getCurrentInstance();
40412
+ const isActive = vue.ref(false);
40413
+ const endIndex = vue.ref(0);
40414
+ const styles = vue.computed(() => {
40415
+ return {
40416
+ cursor: endIndex.value === 0 ? 'unset' : 'pointer'
40417
+ };
40418
+ });
40419
+ const calcPosition = () => {
40420
+ const {
40421
+ suffix,
40422
+ line,
40423
+ value,
40424
+ indent
40425
+ } = props;
40426
+ if (line === 0) {
40427
+ endIndex.value = 0;
40428
+ isActive.value = true;
40429
+ } else {
40430
+ endIndex.value = getFitIndex({
40431
+ el: instance.vnode.el,
40432
+ line,
40433
+ value,
40434
+ suffix,
40435
+ indent
40436
+ });
40437
+ isActive.value = true;
40438
+ }
40439
+ emit('clip', endIndex.value);
40440
+ };
40441
+ const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce$1(calcPosition, props.resize || 0);
40442
+ const handleMouseOver = e => {
40443
+ if (endIndex.value > 0) {
40444
+ Popover.open({
40445
+ el: document.body,
40446
+ name: 'vc-text-popover',
40447
+ // 确保不重复创建
40448
+ triggerEl: e.target,
40449
+ hover: true,
40450
+ theme: 'dark',
40451
+ placement: props.placement,
40452
+ portalClass: props.portalClass,
40453
+ portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
40454
+ content: props.value
40455
+ });
40456
+ }
40457
+ };
40458
+ const handleMouseOut = () => {
40459
+ // Do.
40460
+ };
40461
+ ['value', 'indent', 'line'].forEach(key => {
40462
+ vue.watch(() => props[key], calcPosition);
40463
+ });
40464
+ vue.onMounted(() => {
40465
+ props.resize !== false && Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
40466
+ });
40467
+ vue.onBeforeUnmount(() => {
40468
+ props.resize !== false && Resize.off(instance.vnode.el, handleResize);
40469
+ });
40470
+ const Content = props.tag;
40471
+ return () => {
40472
+ return vue.createVNode(Content, {
40473
+ "class": "vc-text",
40474
+ "style": styles.value,
40475
+ "onMouseover": handleMouseOver,
40476
+ "onMouseout": handleMouseOut
40477
+ }, {
40478
+ default: () => [isActive.value ? vue.createVNode(Customer, {
40479
+ "value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
40480
+ "index": endIndex.value,
40481
+ "render": props.renderRow
40482
+ }, null) : null]
40483
+ });
40484
+ };
40485
+ }
40486
+ });
40487
+
40311
40488
  const cellStarts = {
40312
40489
  default: {
40313
40490
  order: ''
@@ -40417,26 +40594,31 @@
40417
40594
  };
40418
40595
 
40419
40596
  // Cell默认渲染value 或 formatter
40420
- const defaultRenderCell = ({
40421
- row,
40422
- column = {},
40423
- rowIndex
40424
- }) => {
40597
+ const defaultRenderCell = (rowData = {}) => {
40598
+ const column = rowData.column;
40425
40599
  const {
40426
40600
  prop,
40427
40601
  formatter
40428
40602
  } = column;
40429
40603
  let value;
40430
40604
  if (prop) {
40431
- value = getPropByPath(row, prop).v;
40605
+ value = getPropByPath(rowData.row, prop).v;
40432
40606
  }
40433
40607
  if (formatter) {
40434
- return column.formatter({
40435
- row,
40436
- column,
40437
- value,
40438
- rowIndex
40439
- });
40608
+ return column.formatter(rowData);
40609
+ }
40610
+ const line = column.line || VcInstance.options.TableColumn?.line;
40611
+ if (line) {
40612
+ const style = {
40613
+ // 目前左右pading为10
40614
+ // TODO: 含有border还要-1
40615
+ width: (column.realWidth || column.width) - 20 + 'px'
40616
+ };
40617
+ return vue.createVNode(Text, {
40618
+ "style": style,
40619
+ "line": line,
40620
+ "value": value
40621
+ }, null);
40440
40622
  }
40441
40623
  return value;
40442
40624
  };
@@ -40489,6 +40671,11 @@
40489
40671
  type: String,
40490
40672
  default: 'default'
40491
40673
  },
40674
+ // 默认只展示一行
40675
+ line: {
40676
+ type: Number,
40677
+ default: 0
40678
+ },
40492
40679
  label: String,
40493
40680
  customClass: String,
40494
40681
  labelClass: String,
@@ -40503,7 +40690,6 @@
40503
40690
  columnKey: String,
40504
40691
  align: String,
40505
40692
  headerAlign: String,
40506
- showPopover: Boolean,
40507
40693
  fixed: [Boolean, String],
40508
40694
  formatter: Function,
40509
40695
  selectable: Function,
@@ -40651,12 +40837,6 @@
40651
40837
  "class": "vc-table-un-expand__indent"
40652
40838
  }, null);
40653
40839
  }
40654
- if (data.column.showPopover) {
40655
- $props.class += ' vc-popover';
40656
- $props.style = {
40657
- width: (data.column.realWidth || data.column.width) - 1 + 'px'
40658
- };
40659
- }
40660
40840
  const {
40661
40841
  placeholder
40662
40842
  } = table.props;
@@ -40756,7 +40936,7 @@
40756
40936
  const MTable = Table;
40757
40937
  const MTableColumn = TableColumn;
40758
40938
 
40759
- const props$b = {
40939
+ const props$a = {
40760
40940
  type: {
40761
40941
  type: String,
40762
40942
  validator: (v) => /^(line|card)$/.test(v),
@@ -40914,7 +41094,7 @@
40914
41094
  const COMPONENT_NAME$f = 'vc-tabs';
40915
41095
  const Tabs = /* @__PURE__ */ vue.defineComponent({
40916
41096
  name: COMPONENT_NAME$f,
40917
- props: props$b,
41097
+ props: props$a,
40918
41098
  emits: ['update:modelValue', 'change', 'click'],
40919
41099
  setup(props, {
40920
41100
  slots
@@ -41079,7 +41259,7 @@
41079
41259
  }
41080
41260
  });
41081
41261
 
41082
- const props$a = {
41262
+ const props$9 = {
41083
41263
  value: {
41084
41264
  type: [String, Number]
41085
41265
  },
@@ -41164,7 +41344,7 @@
41164
41344
  const COMPONENT_NAME$e = 'vc-tabs-pane';
41165
41345
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
41166
41346
  name: COMPONENT_NAME$e,
41167
- props: props$a,
41347
+ props: props$9,
41168
41348
  setup(_, {
41169
41349
  slots
41170
41350
  }) {
@@ -41179,8 +41359,8 @@
41179
41359
  }
41180
41360
  });
41181
41361
 
41182
- const props$9 = {
41183
- ...props$b,
41362
+ const props$8 = {
41363
+ ...props$a,
41184
41364
  theme: {
41185
41365
  type: String,
41186
41366
  default: "light",
@@ -41221,7 +41401,7 @@
41221
41401
  const COMPONENT_NAME$d = 'vcm-tabs';
41222
41402
  const MTabs = /* @__PURE__ */ vue.defineComponent({
41223
41403
  name: COMPONENT_NAME$d,
41224
- props: props$9,
41404
+ props: props$8,
41225
41405
  emits: ['update:modelValue', 'change', 'click'],
41226
41406
  setup(props, {
41227
41407
  slots
@@ -41488,7 +41668,7 @@
41488
41668
  const COMPONENT_NAME$c = 'vcm-tabs-pane';
41489
41669
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
41490
41670
  name: COMPONENT_NAME$c,
41491
- props: props$a,
41671
+ props: props$9,
41492
41672
  setup(_, {
41493
41673
  slots
41494
41674
  }) {
@@ -41505,56 +41685,18 @@
41505
41685
 
41506
41686
  const MTag = Tag;
41507
41687
 
41508
- const props$8 = {
41509
- tag: {
41510
- type: String,
41511
- default: "div"
41512
- },
41513
- value: {
41514
- type: String,
41515
- default: ""
41516
- },
41517
- line: {
41518
- type: Number,
41519
- default: 0
41520
- },
41521
- // TODO: 是否改为tail-indent来表示尾部缩进
41522
- indent: {
41523
- type: Number,
41524
- default: 0
41525
- },
41526
- resize: {
41527
- type: [Boolean, Number],
41528
- default: 100
41529
- },
41530
- suffix: {
41531
- type: String,
41532
- default: "..."
41533
- },
41534
- placement: {
41535
- type: String,
41536
- default: "top"
41537
- },
41538
- portalClassName: [Object, String, Array],
41539
- portalStyle: [Object, String, Array],
41540
- renderRow: {
41541
- type: Function,
41542
- // 函数式可以用于高亮显示
41543
- default: (props$) => {
41544
- const { value } = props$;
41545
- return vue.h("span", {}, value);
41546
- }
41547
- }
41548
- };
41688
+ const MText = Text;
41549
41689
 
41550
- const HIDDEN_TEXT_STYLE = `
41551
- position: absolute!important;
41552
- word-break: break-all!important;
41553
- overflow: auto!important;
41554
- opacity: 0!important;
41555
- z-index: -1000!important;
41556
- top: 0!important;
41557
- right: 0!important;
41690
+ const HIDDEN_TEXTAREA_STYLE = `
41691
+ min-height:0 !important;
41692
+ max-height:none !important;
41693
+ height:0 !important;
41694
+ visibility:hidden !important;
41695
+ overflow:hidden !important;
41696
+ position:absolute !important;
41697
+ z-index:-1000 !important;
41698
+ top:0 !important;
41699
+ right:0 !important
41558
41700
  `;
41559
41701
  const SIZING_STYLE = [
41560
41702
  "letter-spacing",
@@ -41567,18 +41709,18 @@
41567
41709
  "text-rendering",
41568
41710
  "text-transform",
41569
41711
  "width",
41570
- // 'text-indent', // 需要额外计算
41712
+ "text-indent",
41571
41713
  "padding-left",
41572
41714
  "padding-right",
41573
41715
  "border-width",
41574
41716
  "box-sizing"
41575
41717
  ];
41576
41718
  let hiddenEl;
41577
- const getFitIndex = (options = {}) => {
41578
- const { el, line, value, suffix, indent } = options;
41579
- let lineHeight = parseInt(getStyle$1(el, "line-height"), 10);
41719
+ const getComputedHeight = (options = {}) => {
41720
+ if (IS_SERVER$2) return {};
41721
+ const { el, minRows = null, maxRows = null } = options;
41580
41722
  if (!hiddenEl) {
41581
- hiddenEl = document.createElement("div");
41723
+ hiddenEl = document.createElement("textarea");
41582
41724
  document.body.appendChild(hiddenEl);
41583
41725
  }
41584
41726
  el.getAttribute("wrap") ? hiddenEl.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl.removeAttribute("wrap");
@@ -41588,141 +41730,343 @@
41588
41730
  boxSizing,
41589
41731
  sizingStyle
41590
41732
  } = utils.getComputedStyle(el, SIZING_STYLE);
41591
- const textIndent = `text-indent: ${parseInt(getStyle$1(el, "text-indent"), 10) + indent}px;`;
41592
- hiddenEl.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
41593
- let sideHeight = paddingSize || 0;
41594
- boxSizing === "border-box" && (sideHeight += borderSize);
41595
- if (Number.isNaN(lineHeight)) {
41596
- hiddenEl.innerText = ".";
41597
- lineHeight = hiddenEl.clientHeight - sideHeight;
41733
+ hiddenEl.setAttribute("style", `${sizingStyle};${HIDDEN_TEXTAREA_STYLE}`);
41734
+ hiddenEl.value = el.value || el.placeholder || "";
41735
+ let minHeight = Number.MIN_SAFE_INTEGER;
41736
+ let maxHeight = Number.MAX_SAFE_INTEGER;
41737
+ let height = hiddenEl.scrollHeight;
41738
+ let overflowY;
41739
+ if (boxSizing === "border-box") {
41740
+ height += borderSize;
41741
+ } else if (boxSizing === "content-box") {
41742
+ height -= paddingSize;
41743
+ }
41744
+ if (minRows !== null || maxRows !== null) {
41745
+ hiddenEl.value = " ";
41746
+ const singleRowHeight = hiddenEl.scrollHeight - paddingSize;
41747
+ if (minRows !== null) {
41748
+ minHeight = singleRowHeight * minRows;
41749
+ if (boxSizing === "border-box") {
41750
+ minHeight = minHeight + paddingSize + borderSize;
41751
+ }
41752
+ height = Math.max(minHeight, height);
41753
+ }
41754
+ if (maxRows !== null) {
41755
+ maxHeight = singleRowHeight * maxRows;
41756
+ if (boxSizing === "border-box") {
41757
+ maxHeight = maxHeight + paddingSize + borderSize;
41758
+ }
41759
+ overflowY = height > maxHeight ? "" : "hidden";
41760
+ height = Math.min(maxHeight, height);
41761
+ }
41762
+ }
41763
+ if (!maxRows) {
41764
+ overflowY = "hidden";
41598
41765
  }
41599
- let endIndex = 0;
41600
- hiddenEl.innerText = suffix;
41601
- value.split("").forEach((item, i) => {
41602
- let old = hiddenEl.innerText;
41603
- old = old.substring(0, old.length - suffix.length);
41604
- hiddenEl.innerText = old + item + suffix;
41605
- if (hiddenEl.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
41606
- endIndex = i;
41766
+ return {
41767
+ height: `${height}px`,
41768
+ minHeight: `${minHeight}px`,
41769
+ maxHeight: `${maxHeight}px`,
41770
+ overflowY
41771
+ };
41772
+ };
41773
+
41774
+ const useTextarea = (textarea, expose) => {
41775
+ const attrs = vue.useAttrs();
41776
+ const instance = vue.getCurrentInstance();
41777
+ const props = instance.props;
41778
+ const { emit } = instance;
41779
+ const formItem = vue.inject("vc-form-item", {});
41780
+ const currentValue = vue.ref(null);
41781
+ const isOnComposition = vue.ref(false);
41782
+ const isFocus = vue.ref(false);
41783
+ const calcTextareaStyle = vue.ref({});
41784
+ const contentStyle = vue.ref({});
41785
+ const currentMaxlength = vue.computed(() => {
41786
+ const value = currentValue.value;
41787
+ const { maxlength, bytes } = props;
41788
+ return Array.isArray(value) || !maxlength || !bytes ? maxlength : getFitMaxLength(value, maxlength);
41789
+ });
41790
+ const sync = (v, e, force) => {
41791
+ if (!force && v === currentValue.value) return;
41792
+ if (!props.controllable) {
41793
+ currentValue.value = v;
41607
41794
  }
41795
+ emit("update:modelValue", v, e);
41796
+ emit("input", v, e);
41797
+ emit("change", v, e);
41798
+ props.allowDispatch && formItem?.change?.(v);
41799
+ };
41800
+ const forceUpdate = () => {
41801
+ instance.proxy?.$forceUpdate?.();
41802
+ };
41803
+ const refresh = () => {
41804
+ if (!props.autosize) return;
41805
+ const { minRows, maxRows } = props.autosize;
41806
+ vue.nextTick(() => {
41807
+ calcTextareaStyle.value = getComputedHeight({
41808
+ el: textarea.value,
41809
+ minRows,
41810
+ maxRows
41811
+ });
41812
+ });
41813
+ };
41814
+ const handleKeydown = (e) => {
41815
+ emit("keydown", e);
41816
+ };
41817
+ const handleKeypress = (e) => {
41818
+ emit("keypress", e);
41819
+ };
41820
+ const handleKeyup = (e) => {
41821
+ if (e.keyCode == 13) {
41822
+ emit("enter", e);
41823
+ }
41824
+ emit("keyup", e);
41825
+ };
41826
+ const handleFocus = (e) => {
41827
+ isFocus.value = true;
41828
+ emit("focus", e);
41829
+ };
41830
+ const handleBlur = (e) => {
41831
+ isFocus.value = false;
41832
+ emit("blur", e);
41833
+ props.allowDispatch && formItem?.blur?.(currentValue.value);
41834
+ };
41835
+ const handleChange = (e) => {
41836
+ emit("change", e);
41837
+ };
41838
+ const handleInput = (e) => {
41839
+ if (isOnComposition.value) return;
41840
+ let value = textarea.value.value;
41841
+ if (typeof props.maxlength !== "undefined" && props.bytes && e.inputType !== "deleteContentBackward") {
41842
+ const fitValue = getFitValue(value, props.maxlength);
41843
+ if (value !== fitValue) {
41844
+ value = fitValue;
41845
+ }
41846
+ }
41847
+ sync(value, e, e.inputType === "insertFromPaste");
41848
+ forceUpdate();
41849
+ };
41850
+ const handleComposition = (e) => {
41851
+ if (e.type === "compositionstart") {
41852
+ isOnComposition.value = true;
41853
+ }
41854
+ if (e.type === "compositionend") {
41855
+ isOnComposition.value = false;
41856
+ handleInput(e);
41857
+ }
41858
+ };
41859
+ const handleResize = (e) => {
41860
+ contentStyle.value = {
41861
+ height: `${textarea.value ? textarea.value.offsetHeight : 0}px`
41862
+ };
41863
+ emit("resize", e);
41864
+ };
41865
+ const handlePaste = (e) => {
41866
+ emit("paste", e, e.clipboardData.getData("text"));
41867
+ };
41868
+ const classes = vue.computed(() => {
41869
+ return {
41870
+ "is-focus": isFocus.value,
41871
+ "is-disabled": props.disabled
41872
+ };
41608
41873
  });
41609
- return endIndex;
41874
+ const listeners = vue.computed(() => {
41875
+ return {
41876
+ onKeyup: handleKeyup,
41877
+ onKeypress: handleKeypress,
41878
+ onKeydown: handleKeydown,
41879
+ onFocus: handleFocus,
41880
+ onBlur: handleBlur,
41881
+ onCompositionstart: handleComposition,
41882
+ onCompositionupdate: handleComposition,
41883
+ onCompositionend: handleComposition,
41884
+ onInput: handleInput,
41885
+ onChange: handleChange,
41886
+ onPaste: handlePaste
41887
+ };
41888
+ });
41889
+ const binds = vue.computed(() => {
41890
+ return {
41891
+ id: props.id,
41892
+ autocomplete: attrs.autocomplete,
41893
+ spellcheck: attrs.spellcheck,
41894
+ placeholder: attrs.placeholder,
41895
+ readonly: attrs.readonly,
41896
+ name: attrs.name,
41897
+ autofocus: attrs.autofocus,
41898
+ disabled: props.disabled,
41899
+ maxlength: props.maxlength,
41900
+ rows: props.rows,
41901
+ wrap: props.wrap
41902
+ };
41903
+ });
41904
+ vue.watch(
41905
+ () => props.modelValue,
41906
+ (v) => {
41907
+ if (props.controllable || v !== currentValue.value) {
41908
+ currentValue.value = v;
41909
+ refresh();
41910
+ }
41911
+ },
41912
+ { immediate: true }
41913
+ );
41914
+ vue.onMounted(() => {
41915
+ Resize.on(textarea.value, handleResize);
41916
+ refresh();
41917
+ });
41918
+ vue.onBeforeUnmount(() => {
41919
+ Resize.off(textarea.value, handleResize);
41920
+ });
41921
+ const exposed = useNativeEmitter(textarea);
41922
+ expose?.({
41923
+ ...exposed,
41924
+ refresh
41925
+ });
41926
+ return {
41927
+ currentValue,
41928
+ isOnComposition,
41929
+ isFocus,
41930
+ calcTextareaStyle,
41931
+ contentStyle,
41932
+ classes,
41933
+ listeners,
41934
+ binds,
41935
+ currentMaxlength
41936
+ };
41937
+ };
41938
+
41939
+ const inputKeys = [
41940
+ "id",
41941
+ "disabled",
41942
+ "maxlength",
41943
+ "allowDispatch",
41944
+ "modelValue",
41945
+ "bytes",
41946
+ "controllable"
41947
+ ];
41948
+ const props$7 = {
41949
+ ...pick(props$$, inputKeys),
41950
+ wrap: {
41951
+ type: String,
41952
+ validator: (v) => /(soft|hard)/.test(v),
41953
+ default: "soft"
41954
+ },
41955
+ rows: {
41956
+ type: Number,
41957
+ default: 2
41958
+ },
41959
+ autosize: {
41960
+ type: [Boolean, Object],
41961
+ default: false
41962
+ },
41963
+ textareaStyle: {
41964
+ type: [Object, Array]
41965
+ }
41610
41966
  };
41611
41967
 
41612
41968
  /** @jsxImportSource vue */
41613
41969
 
41614
- const COMPONENT_NAME$b = 'vc-text';
41615
- const Text = /* @__PURE__ */ vue.defineComponent({
41970
+ const COMPONENT_NAME$b = 'vc-textarea';
41971
+ const Textarea = /* @__PURE__ */ vue.defineComponent({
41616
41972
  name: COMPONENT_NAME$b,
41617
- props: props$8,
41973
+ props: Object.assign(props$7, {
41974
+ indicator: {
41975
+ type: [Boolean, Object],
41976
+ default: false
41977
+ },
41978
+ indicateClass: String
41979
+ }),
41980
+ emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'clear', 'paste', 'keydown', 'keypress', 'keyup', 'enter', 'cancel', 'resize'],
41618
41981
  setup(props, {
41619
- emit
41982
+ expose
41620
41983
  }) {
41621
- const instance = vue.getCurrentInstance();
41622
- const isActive = vue.ref(false);
41623
- const endIndex = vue.ref(0);
41624
- const styles = vue.computed(() => {
41625
- return {
41626
- cursor: endIndex.value === 0 ? 'unset' : 'pointer'
41627
- };
41628
- });
41629
- const calcPosition = () => {
41630
- const {
41631
- suffix,
41632
- line,
41633
- value,
41634
- indent
41635
- } = props;
41636
- if (line === 0) {
41637
- endIndex.value = 0;
41638
- isActive.value = true;
41639
- } else {
41640
- endIndex.value = getFitIndex({
41641
- el: instance.vnode.el,
41642
- line,
41643
- value,
41644
- suffix,
41645
- indent
41646
- });
41647
- isActive.value = true;
41648
- }
41649
- emit('clip', endIndex.value);
41650
- };
41651
- const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce$1(calcPosition, props.resize || 0);
41652
- const handleMouseOver = e => {
41653
- if (endIndex.value > 0) {
41654
- Popover.open({
41655
- el: document.body,
41656
- name: 'vc-text-popover',
41657
- // 确保不重复创建
41658
- triggerEl: e.target,
41659
- hover: true,
41660
- theme: 'dark',
41661
- placement: props.placement,
41662
- portalClassName: props.portalClassName,
41663
- portalStyle: props.portalStyle || `width: ${e.target.clientWidth}px`,
41664
- content: props.value
41665
- });
41666
- }
41667
- };
41668
- const handleMouseOut = () => {
41669
- // Do.
41670
- };
41671
- ['value', 'indent', 'line'].forEach(key => {
41672
- vue.watch(() => props[key], calcPosition);
41673
- });
41674
- vue.onMounted(() => {
41675
- props.resize !== false && Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
41984
+ const textarea = vue.ref();
41985
+ const {
41986
+ currentValue,
41987
+ classes,
41988
+ contentStyle,
41989
+ listeners,
41990
+ binds,
41991
+ calcTextareaStyle,
41992
+ currentMaxlength
41993
+ } = useTextarea(textarea, expose);
41994
+ const indicatorNum = vue.computed(() => {
41995
+ const currentLength = (String(props.modelValue) || '').length;
41996
+ const extraLength = props.bytes ? getBytesSize(props.modelValue) || 0 : 0;
41997
+ const length = props.indicator && props.indicator.inverted ? props.maxlength + extraLength - currentLength : currentLength - extraLength;
41998
+ return `${length}/${props.maxlength}`;
41676
41999
  });
41677
- vue.onBeforeUnmount(() => {
41678
- props.resize !== false && Resize.off(instance.vnode.el, handleResize);
42000
+ const indicateInline = vue.computed(() => {
42001
+ return props.indicator && props.indicator.inline;
41679
42002
  });
41680
- const Content = props.tag;
41681
42003
  return () => {
41682
- return vue.createVNode(Content, {
41683
- "class": "vc-text",
41684
- "style": styles.value,
41685
- "onMouseover": handleMouseOver,
41686
- "onMouseout": handleMouseOut
41687
- }, {
41688
- default: () => [isActive.value ? vue.createVNode(Customer, {
41689
- "value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
41690
- "index": endIndex.value,
41691
- "render": props.renderRow
41692
- }, null) : null]
41693
- });
42004
+ return vue.createVNode("div", {
42005
+ "class": [classes.value, 'vc-textarea']
42006
+ }, [vue.createVNode("div", {
42007
+ "class": "vc-textarea__wrapper"
42008
+ }, [vue.createVNode("div", {
42009
+ "style": contentStyle.value,
42010
+ "class": ['vc-textarea__content']
42011
+ }, [vue.createVNode("textarea", vue.mergeProps({
42012
+ "ref": textarea
42013
+ }, binds.value, listeners.value, {
42014
+ "value": currentValue.value,
42015
+ "maxlength": currentMaxlength.value,
42016
+ "style": [props.textareaStyle, calcTextareaStyle.value]
42017
+ }), null)]), props.indicator && vue.createVNode("div", {
42018
+ "class": [props.indicateClass, {
42019
+ 'is-inline': indicateInline.value
42020
+ }, 'vc-textarea__indicator']
42021
+ }, [indicatorNum.value])])]);
41694
42022
  };
41695
42023
  }
41696
42024
  });
41697
42025
 
41698
- const MText = Text;
41699
-
41700
- const props$7 = {
41701
- tag: {
41702
- type: String,
41703
- default: "div"
41704
- }
41705
- };
41706
-
41707
42026
  /** @jsxImportSource vue */
41708
42027
 
41709
- const COMPONENT_NAME$a = 'vc-textarea';
41710
- const Textarea = /* @__PURE__ */ vue.defineComponent({
42028
+ const COMPONENT_NAME$a = 'vcm-textarea';
42029
+ const MTextarea = /* @__PURE__ */ vue.defineComponent({
41711
42030
  name: COMPONENT_NAME$a,
41712
- props: props$7,
42031
+ props: Object.assign(props$7, {
42032
+ align: {
42033
+ type: String,
42034
+ default: 'left'
42035
+ }
42036
+ }),
42037
+ emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'clear', 'paste', 'keydown', 'keypress', 'keyup', 'enter', 'cancel', 'resize'],
41713
42038
  setup(props, {
41714
- slots
42039
+ expose
41715
42040
  }) {
42041
+ const textarea = vue.ref();
42042
+ const {
42043
+ currentValue,
42044
+ classes,
42045
+ contentStyle,
42046
+ listeners,
42047
+ binds,
42048
+ calcTextareaStyle,
42049
+ currentMaxlength
42050
+ } = useTextarea(textarea, expose);
41716
42051
  return () => {
41717
42052
  return vue.createVNode("div", {
41718
- "class": "vc-textarea"
41719
- }, [slots?.default?.()]);
42053
+ "class": [classes.value, 'vcm-textarea']
42054
+ }, [vue.createVNode("div", {
42055
+ "class": "vcm-textarea__wrapper"
42056
+ }, [vue.createVNode("div", {
42057
+ "style": contentStyle.value,
42058
+ "class": ['vcm-textarea__content']
42059
+ }, [vue.createVNode("textarea", vue.mergeProps({
42060
+ "ref": textarea
42061
+ }, binds.value, listeners.value, {
42062
+ "value": currentValue.value,
42063
+ "maxlength": currentMaxlength.value,
42064
+ "style": [props.textareaStyle, calcTextareaStyle.value]
42065
+ }), null)])])]);
41720
42066
  };
41721
42067
  }
41722
42068
  });
41723
42069
 
41724
- const MTextarea = Textarea;
41725
-
41726
42070
  const props$6 = {
41727
42071
  tag: {
41728
42072
  type: String,