@deot/vc-components 1.0.28 → 1.0.30

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.
@@ -67,9 +67,9 @@
67
67
 
68
68
  /** @jsxImportSource vue */
69
69
 
70
- const COMPONENT_NAME$20 = 'vc-action-sheet';
70
+ const COMPONENT_NAME$22 = 'vc-action-sheet';
71
71
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
72
- name: COMPONENT_NAME$20,
72
+ name: COMPONENT_NAME$22,
73
73
  props: props$1q,
74
74
  setup(props, {
75
75
  slots
@@ -256,9 +256,9 @@
256
256
 
257
257
  /** @jsxImportSource vue */
258
258
 
259
- const COMPONENT_NAME$1$ = 'vc-icon';
259
+ const COMPONENT_NAME$21 = 'vc-icon';
260
260
  const Icon = /* @__PURE__ */ vue.defineComponent({
261
- name: COMPONENT_NAME$1$,
261
+ name: COMPONENT_NAME$21,
262
262
  props: props$1o,
263
263
  setup(props) {
264
264
  const viewBox = vue.ref('0 0 1024 1024');
@@ -457,9 +457,9 @@
457
457
  };
458
458
  };
459
459
 
460
- const COMPONENT_NAME$1_ = "vc-transition";
460
+ const COMPONENT_NAME$20 = "vc-transition";
461
461
  const Transition = vue.defineComponent({
462
- name: COMPONENT_NAME$1_,
462
+ name: COMPONENT_NAME$20,
463
463
  props: props$1n,
464
464
  // 当不声明emits的情况下,事件存在于attrs中
465
465
  inheritAttrs: false,
@@ -480,9 +480,9 @@
480
480
  }
481
481
  });
482
482
 
483
- const COMPONENT_NAME$1Z = "vc-transition-collapse";
483
+ const COMPONENT_NAME$1$ = "vc-transition-collapse";
484
484
  const TransitionCollapse = vue.defineComponent({
485
- name: COMPONENT_NAME$1Z,
485
+ name: COMPONENT_NAME$1$,
486
486
  props: props$1n,
487
487
  // 当不声明emits的情况下,事件存在于attrs中
488
488
  inheritAttrs: false,
@@ -601,9 +601,9 @@
601
601
  }
602
602
  });
603
603
 
604
- const COMPONENT_NAME$1Y = "vc-transition-fade";
604
+ const COMPONENT_NAME$1_ = "vc-transition-fade";
605
605
  const TransitionFade = vue.defineComponent({
606
- name: COMPONENT_NAME$1Y,
606
+ name: COMPONENT_NAME$1_,
607
607
  props: {
608
608
  ...props$1n,
609
609
  // inheritAttrs必须是false
@@ -638,9 +638,9 @@
638
638
  }
639
639
  });
640
640
 
641
- const COMPONENT_NAME$1X = "vc-transition-scale";
641
+ const COMPONENT_NAME$1Z = "vc-transition-scale";
642
642
  const TransitionScale = vue.defineComponent({
643
- name: COMPONENT_NAME$1X,
643
+ name: COMPONENT_NAME$1Z,
644
644
  props: {
645
645
  ...props$1n,
646
646
  mode: {
@@ -680,9 +680,9 @@
680
680
  }
681
681
  });
682
682
 
683
- const COMPONENT_NAME$1W = "vc-transition-slide";
683
+ const COMPONENT_NAME$1Y = "vc-transition-slide";
684
684
  const TransitionSlide = vue.defineComponent({
685
- name: COMPONENT_NAME$1W,
685
+ name: COMPONENT_NAME$1Y,
686
686
  props: {
687
687
  ...props$1n,
688
688
  mode: {
@@ -722,9 +722,9 @@
722
722
  }
723
723
  });
724
724
 
725
- const COMPONENT_NAME$1V = "vc-transition-zoom";
725
+ const COMPONENT_NAME$1X = "vc-transition-zoom";
726
726
  const TransitionZoom = vue.defineComponent({
727
- name: COMPONENT_NAME$1V,
727
+ name: COMPONENT_NAME$1X,
728
728
  props: {
729
729
  ...props$1n,
730
730
  mode: {
@@ -766,7 +766,7 @@
766
766
 
767
767
  /** @jsxImportSource vue */
768
768
 
769
- const COMPONENT_NAME$1U = 'vc-alert';
769
+ const COMPONENT_NAME$1W = 'vc-alert';
770
770
 
771
771
  // [color, borderColor, backgroundColor], -> CSS
772
772
  const THEME_MAP = {
@@ -776,7 +776,7 @@
776
776
  warning: ['#ffbf00', '#ffe58f', '#fffbe6']
777
777
  };
778
778
  const Alert = /* @__PURE__ */ vue.defineComponent({
779
- name: COMPONENT_NAME$1U,
779
+ name: COMPONENT_NAME$1W,
780
780
  props: props$1p,
781
781
  setup(props, {
782
782
  slots,
@@ -875,9 +875,9 @@
875
875
 
876
876
  /** @jsxImportSource vue */
877
877
 
878
- const COMPONENT_NAME$1T = 'vc-artboard';
878
+ const COMPONENT_NAME$1V = 'vc-artboard';
879
879
  const Artboard = /* @__PURE__ */ vue.defineComponent({
880
- name: COMPONENT_NAME$1T,
880
+ name: COMPONENT_NAME$1V,
881
881
  props: props$1m,
882
882
  setup(props, {
883
883
  slots
@@ -916,9 +916,9 @@
916
916
 
917
917
  /** @jsxImportSource vue */
918
918
 
919
- const COMPONENT_NAME$1S = 'vc-spin';
919
+ const COMPONENT_NAME$1U = 'vc-spin';
920
920
  const Spin = /* @__PURE__ */ vue.defineComponent({
921
- name: COMPONENT_NAME$1S,
921
+ name: COMPONENT_NAME$1U,
922
922
  props: props$1l,
923
923
  setup(props, {
924
924
  slots
@@ -5774,9 +5774,9 @@
5774
5774
  exclude: RegExp
5775
5775
  };
5776
5776
 
5777
- const COMPONENT_NAME$1R = "vc-debounce";
5777
+ const COMPONENT_NAME$1T = "vc-debounce";
5778
5778
  const Debounce = vue.defineComponent({
5779
- name: COMPONENT_NAME$1R,
5779
+ name: COMPONENT_NAME$1T,
5780
5780
  props: props$1k,
5781
5781
  /**
5782
5782
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
@@ -5848,9 +5848,9 @@
5848
5848
 
5849
5849
  /** @jsxImportSource vue */
5850
5850
 
5851
- const COMPONENT_NAME$1Q = 'vc-button';
5851
+ const COMPONENT_NAME$1S = 'vc-button';
5852
5852
  const Button = /* @__PURE__ */ vue.defineComponent({
5853
- name: COMPONENT_NAME$1Q,
5853
+ name: COMPONENT_NAME$1S,
5854
5854
  emits: ['click'],
5855
5855
  props: props$1j,
5856
5856
  setup(props, {
@@ -5932,9 +5932,9 @@
5932
5932
 
5933
5933
  /** @jsxImportSource vue */
5934
5934
 
5935
- const COMPONENT_NAME$1P = 'vc-button-group';
5935
+ const COMPONENT_NAME$1R = 'vc-button-group';
5936
5936
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
5937
- name: COMPONENT_NAME$1P,
5937
+ name: COMPONENT_NAME$1R,
5938
5938
  props: props$1i,
5939
5939
  setup(props, {
5940
5940
  slots
@@ -5968,9 +5968,9 @@
5968
5968
 
5969
5969
  /** @jsxImportSource vue */
5970
5970
 
5971
- const COMPONENT_NAME$1O = 'vc-calendar';
5971
+ const COMPONENT_NAME$1Q = 'vc-calendar';
5972
5972
  const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
5973
- name: COMPONENT_NAME$1O,
5973
+ name: COMPONENT_NAME$1Q,
5974
5974
  props: props$1h,
5975
5975
  setup(props, {
5976
5976
  slots
@@ -6008,9 +6008,9 @@
6008
6008
 
6009
6009
  /** @jsxImportSource vue */
6010
6010
 
6011
- const COMPONENT_NAME$1N = 'vc-card';
6011
+ const COMPONENT_NAME$1P = 'vc-card';
6012
6012
  const Card = /* @__PURE__ */ vue.defineComponent({
6013
- name: COMPONENT_NAME$1N,
6013
+ name: COMPONENT_NAME$1P,
6014
6014
  props: props$1g,
6015
6015
  setup(props, {
6016
6016
  slots
@@ -6046,9 +6046,9 @@
6046
6046
 
6047
6047
  /** @jsxImportSource vue */
6048
6048
 
6049
- const COMPONENT_NAME$1M = 'vc-carousel';
6049
+ const COMPONENT_NAME$1O = 'vc-carousel';
6050
6050
  const Carousel = /* @__PURE__ */ vue.defineComponent({
6051
- name: COMPONENT_NAME$1M,
6051
+ name: COMPONENT_NAME$1O,
6052
6052
  props: props$1f,
6053
6053
  setup(props, {
6054
6054
  slots
@@ -6072,9 +6072,9 @@
6072
6072
 
6073
6073
  /** @jsxImportSource vue */
6074
6074
 
6075
- const COMPONENT_NAME$1L = 'vc-cascader';
6075
+ const COMPONENT_NAME$1N = 'vc-cascader';
6076
6076
  const Cascader = /* @__PURE__ */ vue.defineComponent({
6077
- name: COMPONENT_NAME$1L,
6077
+ name: COMPONENT_NAME$1N,
6078
6078
  props: props$1e,
6079
6079
  setup(props, {
6080
6080
  slots
@@ -6206,9 +6206,9 @@
6206
6206
 
6207
6207
  /** @jsxImportSource vue */
6208
6208
 
6209
- const COMPONENT_NAME$1K = 'vc-chart';
6209
+ const COMPONENT_NAME$1M = 'vc-chart';
6210
6210
  const Chart = /* @__PURE__ */ vue.defineComponent({
6211
- name: COMPONENT_NAME$1K,
6211
+ name: COMPONENT_NAME$1M,
6212
6212
  props: props$1d,
6213
6213
  emits: [...EVENTS, 'ready'],
6214
6214
  setup(props, {
@@ -6440,9 +6440,9 @@
6440
6440
 
6441
6441
  /** @jsxImportSource vue */
6442
6442
 
6443
- const COMPONENT_NAME$1J = 'vc-checkbox';
6443
+ const COMPONENT_NAME$1L = 'vc-checkbox';
6444
6444
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
6445
- name: COMPONENT_NAME$1J,
6445
+ name: COMPONENT_NAME$1L,
6446
6446
  props: props$1c,
6447
6447
  emits: ['update:modelValue', 'change'],
6448
6448
  setup(props, {
@@ -6529,9 +6529,9 @@
6529
6529
 
6530
6530
  /** @jsxImportSource vue */
6531
6531
 
6532
- const COMPONENT_NAME$1I = 'vc-checkbox-group';
6532
+ const COMPONENT_NAME$1K = 'vc-checkbox-group';
6533
6533
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
6534
- name: COMPONENT_NAME$1I,
6534
+ name: COMPONENT_NAME$1K,
6535
6535
  props: props$1b,
6536
6536
  emits: ['update:modelValue', 'change'],
6537
6537
  setup(props, {
@@ -6549,9 +6549,9 @@
6549
6549
 
6550
6550
  /** @jsxImportSource vue */
6551
6551
 
6552
- const COMPONENT_NAME$1H = 'vcm-checkbox';
6552
+ const COMPONENT_NAME$1J = 'vcm-checkbox';
6553
6553
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
6554
- name: COMPONENT_NAME$1H,
6554
+ name: COMPONENT_NAME$1J,
6555
6555
  props: props$1c,
6556
6556
  emits: ['update:modelValue', 'change'],
6557
6557
  setup(props, {
@@ -6591,9 +6591,9 @@
6591
6591
 
6592
6592
  /** @jsxImportSource vue */
6593
6593
 
6594
- const COMPONENT_NAME$1G = 'vcm-checkbox-group';
6594
+ const COMPONENT_NAME$1I = 'vcm-checkbox-group';
6595
6595
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
6596
- name: COMPONENT_NAME$1G,
6596
+ name: COMPONENT_NAME$1I,
6597
6597
  props: props$1b,
6598
6598
  emits: ['update:modelValue', 'change'],
6599
6599
  setup(props, {
@@ -6652,9 +6652,9 @@
6652
6652
  }
6653
6653
  };
6654
6654
 
6655
- const COMPONENT_NAME$1F = "vc-customer";
6655
+ const COMPONENT_NAME$1H = "vc-customer";
6656
6656
  const Customer = vue.defineComponent({
6657
- name: COMPONENT_NAME$1F,
6657
+ name: COMPONENT_NAME$1H,
6658
6658
  props: props$19,
6659
6659
  setup(props, context) {
6660
6660
  return () => vue.h(() => {
@@ -6665,9 +6665,9 @@
6665
6665
 
6666
6666
  /** @jsxImportSource vue */
6667
6667
 
6668
- const COMPONENT_NAME$1E = 'vc-message';
6668
+ const COMPONENT_NAME$1G = 'vc-message';
6669
6669
  const MessageView = /* @__PURE__ */ vue.defineComponent({
6670
- name: COMPONENT_NAME$1E,
6670
+ name: COMPONENT_NAME$1G,
6671
6671
  emits: ['before-close', 'close', 'portal-fulfilled'],
6672
6672
  props: props$1a,
6673
6673
  setup(props, {
@@ -7227,7 +7227,7 @@
7227
7227
  }
7228
7228
  }
7229
7229
 
7230
- const COMPONENT_NAME$1D = "vc-portal";
7230
+ const COMPONENT_NAME$1F = "vc-portal";
7231
7231
  class Portal {
7232
7232
  /**
7233
7233
  * 清理Portals类型组件
@@ -7279,7 +7279,7 @@
7279
7279
  this.wrapper = wrapper;
7280
7280
  this.globalOptions = {
7281
7281
  ...options,
7282
- name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1D)
7282
+ name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1F)
7283
7283
  };
7284
7284
  }
7285
7285
  popup(propsData, options) {
@@ -7378,7 +7378,7 @@
7378
7378
  ...rest
7379
7379
  } = options;
7380
7380
  let useAllNodes = fragment;
7381
- const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1D)}` : name$;
7381
+ const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1F)}` : name$;
7382
7382
  const container = document.createElement(tag);
7383
7383
  const root = typeof el === "object" ? el : document.querySelector(el || "body");
7384
7384
  !alive && Portal.leafs.get(name)?.destroy();
@@ -7412,7 +7412,7 @@
7412
7412
  } else {
7413
7413
  const wrapper = this.wrapper;
7414
7414
  const app = vue.createApp({
7415
- name: COMPONENT_NAME$1D,
7415
+ name: COMPONENT_NAME$1F,
7416
7416
  parent,
7417
7417
  setup() {
7418
7418
  if (alive) {
@@ -7524,13 +7524,13 @@
7524
7524
  }
7525
7525
  };
7526
7526
 
7527
- const COMPONENT_NAME$1C = 'vc-portal-view';
7527
+ const COMPONENT_NAME$1E = 'vc-portal-view';
7528
7528
 
7529
7529
  /**
7530
7530
  * 写法不同,但与vue@2.x 保持一致
7531
7531
  */
7532
7532
  const PortalView = /* @__PURE__ */ vue.defineComponent({
7533
- name: COMPONENT_NAME$1C,
7533
+ name: COMPONENT_NAME$1E,
7534
7534
  props: props$18,
7535
7535
  setup(props, {
7536
7536
  slots
@@ -7701,9 +7701,9 @@
7701
7701
  return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
7702
7702
  };
7703
7703
 
7704
- const COMPONENT_NAME$1B = "vc-clipboard";
7704
+ const COMPONENT_NAME$1D = "vc-clipboard";
7705
7705
  const Clipboard$1 = vue.defineComponent({
7706
- name: COMPONENT_NAME$1B,
7706
+ name: COMPONENT_NAME$1D,
7707
7707
  props: props$17,
7708
7708
  setup() {
7709
7709
  return useClipboard((content) => Message.success({ content }));
@@ -7743,9 +7743,9 @@
7743
7743
 
7744
7744
  /** @jsxImportSource vue */
7745
7745
 
7746
- const COMPONENT_NAME$1A = 'vcm-toast';
7746
+ const COMPONENT_NAME$1C = 'vcm-toast';
7747
7747
  const MToastView = /* @__PURE__ */ vue.defineComponent({
7748
- name: COMPONENT_NAME$1A,
7748
+ name: COMPONENT_NAME$1C,
7749
7749
  emits: ['close', 'portal-fulfilled'],
7750
7750
  props: props$16,
7751
7751
  setup(props, {
@@ -7847,9 +7847,9 @@
7847
7847
  const error$2 = create$6({ mode: "error" });
7848
7848
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
7849
7849
 
7850
- const COMPONENT_NAME$1z = "vcm-clipboard";
7850
+ const COMPONENT_NAME$1B = "vcm-clipboard";
7851
7851
  const MClipboard$1 = vue.defineComponent({
7852
- name: COMPONENT_NAME$1z,
7852
+ name: COMPONENT_NAME$1B,
7853
7853
  props: props$17,
7854
7854
  setup() {
7855
7855
  return useClipboard((content) => MToast.info({ content }));
@@ -7881,9 +7881,9 @@
7881
7881
  }
7882
7882
  };
7883
7883
 
7884
- const COMPONENT_NAME$1y = "vc-collapse";
7884
+ const COMPONENT_NAME$1A = "vc-collapse";
7885
7885
  const Collapse = vue.defineComponent({
7886
- name: COMPONENT_NAME$1y,
7886
+ name: COMPONENT_NAME$1A,
7887
7887
  props: props$15,
7888
7888
  emits: ["update:moodelValue", "change"],
7889
7889
  setup(props, { slots, emit }) {
@@ -7997,12 +7997,12 @@
7997
7997
 
7998
7998
  /** @jsxImportSource vue */
7999
7999
 
8000
- function _isSlot$3(s) {
8000
+ function _isSlot$2(s) {
8001
8001
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
8002
8002
  }
8003
- const COMPONENT_NAME$1x = 'vc-expand';
8003
+ const COMPONENT_NAME$1z = 'vc-expand';
8004
8004
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
8005
- name: COMPONENT_NAME$1x,
8005
+ name: COMPONENT_NAME$1z,
8006
8006
  props: props$13,
8007
8007
  setup(props, {
8008
8008
  slots
@@ -8021,7 +8021,7 @@
8021
8021
  enter: 200,
8022
8022
  leave: 200
8023
8023
  }
8024
- }, _isSlot$3(_slot = vue.withDirectives(vue.createVNode(Content, null, {
8024
+ }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
8025
8025
  default: () => [(props.alive || !props.alive && isActive.value) && slots.default?.()]
8026
8026
  }), [[vue.vShow, isActive.value]])) ? _slot : {
8027
8027
  default: () => [_slot]
@@ -8032,9 +8032,9 @@
8032
8032
 
8033
8033
  /** @jsxImportSource vue */
8034
8034
 
8035
- const COMPONENT_NAME$1w = 'vc-collapse-item';
8035
+ const COMPONENT_NAME$1y = 'vc-collapse-item';
8036
8036
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
8037
- name: COMPONENT_NAME$1w,
8037
+ name: COMPONENT_NAME$1y,
8038
8038
  props: props$14,
8039
8039
  setup(props, {
8040
8040
  slots,
@@ -8109,9 +8109,9 @@
8109
8109
 
8110
8110
  /** @jsxImportSource vue */
8111
8111
 
8112
- const COMPONENT_NAME$1v = 'vc-color-picker';
8112
+ const COMPONENT_NAME$1x = 'vc-color-picker';
8113
8113
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
8114
- name: COMPONENT_NAME$1v,
8114
+ name: COMPONENT_NAME$1x,
8115
8115
  props: props$12,
8116
8116
  setup(props, {
8117
8117
  slots
@@ -8135,9 +8135,9 @@
8135
8135
 
8136
8136
  /** @jsxImportSource vue */
8137
8137
 
8138
- const COMPONENT_NAME$1u = 'vc-countdown';
8138
+ const COMPONENT_NAME$1w = 'vc-countdown';
8139
8139
  const Countdown = /* @__PURE__ */ vue.defineComponent({
8140
- name: COMPONENT_NAME$1u,
8140
+ name: COMPONENT_NAME$1w,
8141
8141
  props: props$11,
8142
8142
  setup(props, {
8143
8143
  slots
@@ -8651,9 +8651,9 @@
8651
8651
 
8652
8652
  /** @jsxImportSource vue */
8653
8653
 
8654
- const COMPONENT_NAME$1t = 'vc-input';
8654
+ const COMPONENT_NAME$1v = 'vc-input';
8655
8655
  const Input = /* @__PURE__ */ vue.defineComponent({
8656
- name: COMPONENT_NAME$1t,
8656
+ name: COMPONENT_NAME$1v,
8657
8657
  inheritAttrs: false,
8658
8658
  props: {
8659
8659
  ...props$$,
@@ -8666,7 +8666,8 @@
8666
8666
  emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'clear', 'paste', 'keydown', 'keypress', 'keyup', 'enter', 'tip'],
8667
8667
  setup(props, {
8668
8668
  slots,
8669
- expose
8669
+ expose,
8670
+ attrs
8670
8671
  }) {
8671
8672
  const input = vue.ref();
8672
8673
  useNativeEmitter(input, expose);
@@ -8733,9 +8734,9 @@
8733
8734
  }, classes.value]
8734
8735
  }, [slots.prepend?.() || props.prepend && vue.createVNode(Icon, {
8735
8736
  "type": props.prepend
8736
- }, null)]), vue.createVNode("div", {
8737
+ }, null)]), vue.createVNode("div", vue.mergeProps({
8737
8738
  "class": ['vc-input__content', classes.value]
8738
- }, [slots.content?.() || renderInput(false)]), !props.disabled && props.clearable && vue.createVNode(TransitionFade, null, {
8739
+ }, slots.content ? it.value.listeners : {}), [slots.content ? slots.content() : renderInput(false)]), !props.disabled && props.clearable && vue.createVNode(TransitionFade, null, {
8739
8740
  default: () => [vue.createVNode(Icon, {
8740
8741
  "class": "vc-input__icon-clear",
8741
8742
  "type": "clear",
@@ -8987,9 +8988,9 @@
8987
8988
 
8988
8989
  /** @jsxImportSource vue */
8989
8990
 
8990
- const COMPONENT_NAME$1s = 'vc-input-number';
8991
+ const COMPONENT_NAME$1u = 'vc-input-number';
8991
8992
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
8992
- name: COMPONENT_NAME$1s,
8993
+ name: COMPONENT_NAME$1u,
8993
8994
  props: props$X,
8994
8995
  inheritAttrs: false,
8995
8996
  setup(props, {
@@ -9053,9 +9054,9 @@
9053
9054
 
9054
9055
  /** @jsxImportSource vue */
9055
9056
 
9056
- const COMPONENT_NAME$1r = 'vc-input-search';
9057
+ const COMPONENT_NAME$1t = 'vc-input-search';
9057
9058
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
9058
- name: COMPONENT_NAME$1r,
9059
+ name: COMPONENT_NAME$1t,
9059
9060
  props: props$W,
9060
9061
  inheritAttrs: false,
9061
9062
  setup(props, {
@@ -9343,12 +9344,9 @@
9343
9344
 
9344
9345
  /** @jsxImportSource vue */
9345
9346
 
9346
- function _isSlot$2(s) {
9347
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
9348
- }
9349
- const COMPONENT_NAME$1q = 'vc-popover-wrapper';
9347
+ const COMPONENT_NAME$1s = 'vc-popover-wrapper';
9350
9348
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
9351
- name: COMPONENT_NAME$1q,
9349
+ name: COMPONENT_NAME$1s,
9352
9350
  props: props$_,
9353
9351
  emits: ['portal-fulfilled', 'close'],
9354
9352
  setup(props, {
@@ -9410,7 +9408,12 @@
9410
9408
  return container;
9411
9409
  }
9412
9410
  };
9413
- const setPopupStyle = () => {
9411
+
9412
+ /**
9413
+ * 添加debounce解决连续setPopupStyle的情况
9414
+ * 待排查
9415
+ */
9416
+ const setPopupStyle = debounce$1(() => {
9414
9417
  if (!vnode.el) return;
9415
9418
  const triggerEl = getHackContainer();
9416
9419
  const {
@@ -9440,13 +9443,15 @@
9440
9443
  fitPos.value = result;
9441
9444
  wrapperStyle.value = $wrapperStyle;
9442
9445
  arrowStyle.value = $arrowStyle;
9443
-
9444
9446
  // 自适应高度
9445
9447
  if (props.autoWidth) return;
9446
9448
  wrapperW.value = {
9447
9449
  width: `${triggerEl.getBoundingClientRect().width}px`
9448
9450
  };
9449
- };
9451
+ }, 50, {
9452
+ leading: true,
9453
+ trailing: false
9454
+ });
9450
9455
  let timer;
9451
9456
  let isPressMouse = false;
9452
9457
  const handleTriggerChange = e => {
@@ -9501,7 +9506,7 @@
9501
9506
  switch (direction[0]) {
9502
9507
  case 'top':
9503
9508
  case 'bottom':
9504
- if (left + vnode.el.offsetWidth >= window.innerWidth) {
9509
+ if (left + vnode.el.offsetWidth > window.innerWidth) {
9505
9510
  wrapperStyle.value = {
9506
9511
  ...wrapperStyle.value,
9507
9512
  left: `${window.innerWidth - vnode.el.offsetWidth}px`
@@ -9561,7 +9566,6 @@
9561
9566
  }
9562
9567
  });
9563
9568
  return () => {
9564
- let _slot;
9565
9569
  return vue.createVNode(TransitionScale, {
9566
9570
  "mode": props.animation || 'part',
9567
9571
  "duration": {
@@ -9569,38 +9573,40 @@
9569
9573
  leave: 150
9570
9574
  },
9571
9575
  "onAfterLeave": handleRemove
9572
- }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode("div", {
9573
- "style": [wrapperStyle.value, wrapperW.value, props.portalStyle],
9574
- "class": [wrapperClasses.value, props.portalClass, 'vc-popover-wrapper'],
9575
- "onMousedown": () => !props.hover && handleMouseDown(),
9576
- "onMouseenter": e => props.hover && handleChange(e, {
9577
- visible: true
9578
- }),
9579
- "onMouseleave": e => props.hover && handleChange(e, {
9580
- visible: false
9581
- })
9582
- }, [vue.createVNode("div", {
9583
- "class": [themeClasses.value, 'vc-popover-wrapper__container']
9584
- }, [props.arrow && vue.createVNode("div", {
9585
- "style": arrowStyle.value,
9586
- "class": [themeClasses.value, posClasses.value, 'vc-popover-wrapper__arrow']
9587
- }, null), slots.content ? slots.content() : typeof props.content === 'function' ? vue.createVNode(Customer, {
9588
- "render": props.content
9589
- }, null) : vue.createVNode("div", {
9590
- "innerHTML": props.content
9591
- }, null)])]), [[vue.vShow, isActive.value]])) ? _slot : {
9592
- default: () => [_slot]
9576
+ }, {
9577
+ default: () => [vue.withDirectives(vue.createVNode("div", {
9578
+ "style": [wrapperStyle.value, wrapperW.value, props.portalStyle],
9579
+ "class": [wrapperClasses.value, props.portalClass, 'vc-popover-wrapper'],
9580
+ "onMousedown": () => !props.hover && handleMouseDown(),
9581
+ "onMouseenter": e => props.hover && handleChange(e, {
9582
+ visible: true
9583
+ }),
9584
+ "onMouseleave": e => props.hover && handleChange(e, {
9585
+ visible: false
9586
+ })
9587
+ }, [vue.createVNode("div", {
9588
+ "class": [themeClasses.value, 'vc-popover-wrapper__container']
9589
+ }, [props.arrow && vue.createVNode("div", {
9590
+ "style": arrowStyle.value,
9591
+ "class": [themeClasses.value, posClasses.value, 'vc-popover-wrapper__arrow']
9592
+ }, null), slots.content ? slots.content() : typeof props.content === 'function' ? vue.createVNode(Customer, {
9593
+ "render": props.content
9594
+ }, null) : vue.createVNode("div", {
9595
+ "innerHTML": props.content
9596
+ }, null)])]), [[vue.vShow, isActive.value]])]
9593
9597
  });
9594
9598
  };
9595
9599
  }
9596
9600
  });
9597
- const PopoverPortal = new Portal(PopoverWrapper);
9601
+ const PopoverPortal = new Portal(PopoverWrapper, {
9602
+ leaveDelay: 0
9603
+ });
9598
9604
 
9599
9605
  /** @jsxImportSource vue */
9600
9606
 
9601
- const COMPONENT_NAME$1p = 'vc-popover';
9607
+ const COMPONENT_NAME$1r = 'vc-popover';
9602
9608
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
9603
- name: COMPONENT_NAME$1p,
9609
+ name: COMPONENT_NAME$1r,
9604
9610
  props: props$Z,
9605
9611
  emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
9606
9612
  setup(props, {
@@ -10701,9 +10707,9 @@
10701
10707
  }
10702
10708
  return view;
10703
10709
  };
10704
- const COMPONENT_NAME$1o = 'vc-date-confirm';
10710
+ const COMPONENT_NAME$1q = 'vc-date-confirm';
10705
10711
  const Confirm = /* @__PURE__ */ vue.defineComponent({
10706
- name: COMPONENT_NAME$1o,
10712
+ name: COMPONENT_NAME$1q,
10707
10713
  props: {
10708
10714
  showTime: {
10709
10715
  type: Boolean,
@@ -10767,9 +10773,9 @@
10767
10773
 
10768
10774
  /** @jsxImportSource vue */
10769
10775
 
10770
- const COMPONENT_NAME$1n = 'vc-date-header';
10776
+ const COMPONENT_NAME$1p = 'vc-date-header';
10771
10777
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
10772
- name: COMPONENT_NAME$1n,
10778
+ name: COMPONENT_NAME$1p,
10773
10779
  props: {
10774
10780
  panelDate: Date,
10775
10781
  showNext: {
@@ -10853,9 +10859,9 @@
10853
10859
 
10854
10860
  /** @jsxImportSource vue */
10855
10861
 
10856
- const COMPONENT_NAME$1m = 'vc-date-table';
10862
+ const COMPONENT_NAME$1o = 'vc-date-table';
10857
10863
  const DateTable = /* @__PURE__ */ vue.defineComponent({
10858
- name: COMPONENT_NAME$1m,
10864
+ name: COMPONENT_NAME$1o,
10859
10865
  props: {
10860
10866
  value: Array,
10861
10867
  firstDayOfWeek: {
@@ -11064,9 +11070,9 @@
11064
11070
 
11065
11071
  /** @jsxImportSource vue */
11066
11072
 
11067
- const COMPONENT_NAME$1l = 'vc-month-table';
11073
+ const COMPONENT_NAME$1n = 'vc-month-table';
11068
11074
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
11069
- name: COMPONENT_NAME$1l,
11075
+ name: COMPONENT_NAME$1n,
11070
11076
  props: {
11071
11077
  value: Array,
11072
11078
  panelDate: Date,
@@ -11198,7 +11204,7 @@
11198
11204
 
11199
11205
  /** @jsxImportSource vue */
11200
11206
 
11201
- const COMPONENT_NAME$1k = 'vc-quarter-table';
11207
+ const COMPONENT_NAME$1m = 'vc-quarter-table';
11202
11208
 
11203
11209
  /**
11204
11210
  * 获取季度对应的月份范围
@@ -11232,7 +11238,7 @@
11232
11238
  }
11233
11239
  };
11234
11240
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
11235
- name: COMPONENT_NAME$1k,
11241
+ name: COMPONENT_NAME$1m,
11236
11242
  props: {
11237
11243
  value: Array,
11238
11244
  panelDate: Date,
@@ -11355,9 +11361,9 @@
11355
11361
 
11356
11362
  /** @jsxImportSource vue */
11357
11363
 
11358
- const COMPONENT_NAME$1j = 'vc-shortcuts-select';
11364
+ const COMPONENT_NAME$1l = 'vc-shortcuts-select';
11359
11365
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
11360
- name: COMPONENT_NAME$1j,
11366
+ name: COMPONENT_NAME$1l,
11361
11367
  props: {
11362
11368
  panelDate: Date,
11363
11369
  config: Array,
@@ -11397,9 +11403,9 @@
11397
11403
 
11398
11404
  /** @jsxImportSource vue */
11399
11405
 
11400
- const COMPONENT_NAME$1i = 'vc-time-select';
11406
+ const COMPONENT_NAME$1k = 'vc-time-select';
11401
11407
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
11402
- name: COMPONENT_NAME$1i,
11408
+ name: COMPONENT_NAME$1k,
11403
11409
  props: {
11404
11410
  hours: {
11405
11411
  type: [Number, String],
@@ -11678,9 +11684,9 @@
11678
11684
 
11679
11685
  /** @jsxImportSource vue */
11680
11686
 
11681
- const COMPONENT_NAME$1h = 'vc-year-table';
11687
+ const COMPONENT_NAME$1j = 'vc-year-table';
11682
11688
  const YearTable = /* @__PURE__ */ vue.defineComponent({
11683
- name: COMPONENT_NAME$1h,
11689
+ name: COMPONENT_NAME$1j,
11684
11690
  props: {
11685
11691
  value: Array,
11686
11692
  panelDate: Date,
@@ -11803,9 +11809,9 @@
11803
11809
  }
11804
11810
  return true;
11805
11811
  };
11806
- const COMPONENT_NAME$1g = 'vc-date-range-panel';
11812
+ const COMPONENT_NAME$1i = 'vc-date-range-panel';
11807
11813
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
11808
- name: COMPONENT_NAME$1g,
11814
+ name: COMPONENT_NAME$1i,
11809
11815
  props: {
11810
11816
  ...props$V,
11811
11817
  confirm: {
@@ -12184,9 +12190,9 @@
12184
12190
 
12185
12191
  /** @jsxImportSource vue */
12186
12192
 
12187
- const COMPONENT_NAME$1f = 'vc-date-panel';
12193
+ const COMPONENT_NAME$1h = 'vc-date-panel';
12188
12194
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
12189
- name: COMPONENT_NAME$1f,
12195
+ name: COMPONENT_NAME$1h,
12190
12196
  props: {
12191
12197
  ...props$V,
12192
12198
  type: String,
@@ -12394,9 +12400,9 @@
12394
12400
  const endYear = value[1].getFullYear();
12395
12401
  return startYear === endYear;
12396
12402
  };
12397
- const COMPONENT_NAME$1e = 'vc-monthrange-panel';
12403
+ const COMPONENT_NAME$1g = 'vc-monthrange-panel';
12398
12404
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
12399
- name: COMPONENT_NAME$1e,
12405
+ name: COMPONENT_NAME$1g,
12400
12406
  props: {
12401
12407
  ...props$V,
12402
12408
  confirm: {
@@ -12571,9 +12577,9 @@
12571
12577
  const endYear = value[1].getFullYear();
12572
12578
  return startYear === endYear;
12573
12579
  };
12574
- const COMPONENT_NAME$1d = 'vc-quarterrange-panel';
12580
+ const COMPONENT_NAME$1f = 'vc-quarterrange-panel';
12575
12581
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
12576
- name: COMPONENT_NAME$1d,
12582
+ name: COMPONENT_NAME$1f,
12577
12583
  props: {
12578
12584
  ...props$V,
12579
12585
  confirm: {
@@ -12812,9 +12818,9 @@
12812
12818
  seconds
12813
12819
  };
12814
12820
  };
12815
- const COMPONENT_NAME$1c = 'vc-timerange-panel';
12821
+ const COMPONENT_NAME$1e = 'vc-timerange-panel';
12816
12822
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
12817
- name: COMPONENT_NAME$1c,
12823
+ name: COMPONENT_NAME$1e,
12818
12824
  props: props$U,
12819
12825
  emits: ['pick', 'clear', 'ok'],
12820
12826
  setup(props, {
@@ -12913,9 +12919,9 @@
12913
12919
 
12914
12920
  /** @jsxImportSource vue */
12915
12921
 
12916
- const COMPONENT_NAME$1b = 'vc-time-panel';
12922
+ const COMPONENT_NAME$1d = 'vc-time-panel';
12917
12923
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
12918
- name: COMPONENT_NAME$1b,
12924
+ name: COMPONENT_NAME$1d,
12919
12925
  props: props$U,
12920
12926
  emits: ['pick', 'clear', 'ok'],
12921
12927
  setup(props, {
@@ -12970,7 +12976,7 @@
12970
12976
 
12971
12977
  /** @jsxImportSource vue */
12972
12978
 
12973
- const COMPONENT_NAME$1a = 'vc-date-picker';
12979
+ const COMPONENT_NAME$1c = 'vc-date-picker';
12974
12980
  const getPanel$1 = type => {
12975
12981
  if (['daterange', 'datetimerange'].includes(type)) {
12976
12982
  return DateRangePanel;
@@ -12981,7 +12987,7 @@
12981
12987
  }
12982
12988
  return DatePanel;
12983
12989
  };
12984
- const DatePicker = createPicker(COMPONENT_NAME$1a, props$10, () => {
12990
+ const DatePicker = createPicker(COMPONENT_NAME$1c, props$10, () => {
12985
12991
  const props = vue.getCurrentInstance().props;
12986
12992
  const icon = vue.ref('date');
12987
12993
  const panel = vue.shallowRef({});
@@ -13014,9 +13020,9 @@
13014
13020
 
13015
13021
  /** @jsxImportSource vue */
13016
13022
 
13017
- const COMPONENT_NAME$19 = 'vc-divider';
13023
+ const COMPONENT_NAME$1b = 'vc-divider';
13018
13024
  const Divider = /* @__PURE__ */ vue.defineComponent({
13019
- name: COMPONENT_NAME$19,
13025
+ name: COMPONENT_NAME$1b,
13020
13026
  props: props$T,
13021
13027
  setup(props, {
13022
13028
  slots
@@ -13171,7 +13177,7 @@
13171
13177
 
13172
13178
  /** @jsxImportSource vue */
13173
13179
 
13174
- const COMPONENT_NAME$18 = 'vc-scroller-track';
13180
+ const COMPONENT_NAME$1a = 'vc-scroller-track';
13175
13181
  const BAR_MAP = {
13176
13182
  vertical: {
13177
13183
  scroll: 'scrollTop',
@@ -13191,7 +13197,7 @@
13191
13197
  }
13192
13198
  };
13193
13199
  const Track$1 = /* @__PURE__ */ vue.defineComponent({
13194
- name: COMPONENT_NAME$18,
13200
+ name: COMPONENT_NAME$1a,
13195
13201
  props: props$S,
13196
13202
  emits: ['change'],
13197
13203
  inheritAttrs: false,
@@ -13381,9 +13387,9 @@
13381
13387
 
13382
13388
  /** @jsxImportSource vue */
13383
13389
 
13384
- const COMPONENT_NAME$17 = 'vc-scroller-bar';
13390
+ const COMPONENT_NAME$19 = 'vc-scroller-bar';
13385
13391
  const Bar = /* @__PURE__ */ vue.defineComponent({
13386
- name: COMPONENT_NAME$17,
13392
+ name: COMPONENT_NAME$19,
13387
13393
  props: props$R,
13388
13394
  emits: ['change'],
13389
13395
  setup(props, {
@@ -13598,7 +13604,7 @@
13598
13604
 
13599
13605
  /** @jsxImportSource vue */
13600
13606
 
13601
- const COMPONENT_NAME$16 = 'vc-scroller';
13607
+ const COMPONENT_NAME$18 = 'vc-scroller';
13602
13608
 
13603
13609
  /**
13604
13610
  * 作为备选方案,目前推荐使用ScrollerWheel
@@ -13609,7 +13615,7 @@
13609
13615
  * 2. 增加了一层嵌套
13610
13616
  */
13611
13617
  const Scroller = /* @__PURE__ */ vue.defineComponent({
13612
- name: COMPONENT_NAME$16,
13618
+ name: COMPONENT_NAME$18,
13613
13619
  props: props$Q,
13614
13620
  emits: ['scroll'],
13615
13621
  setup(props, {
@@ -14559,7 +14565,7 @@
14559
14565
 
14560
14566
  /** @jsxImportSource vue */
14561
14567
 
14562
- const COMPONENT_NAME$15 = 'vc-scroller-wheel';
14568
+ const COMPONENT_NAME$17 = 'vc-scroller-wheel';
14563
14569
 
14564
14570
  /**
14565
14571
  * 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
@@ -14581,7 +14587,7 @@
14581
14587
  * 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
14582
14588
  */
14583
14589
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
14584
- name: COMPONENT_NAME$15,
14590
+ name: COMPONENT_NAME$17,
14585
14591
  props: Object.assign(props$Q, {
14586
14592
  stopPropagation: {
14587
14593
  type: Boolean,
@@ -14770,9 +14776,9 @@
14770
14776
 
14771
14777
  /** @jsxImportSource vue */
14772
14778
 
14773
- const COMPONENT_NAME$14 = 'vc-drawer';
14779
+ const COMPONENT_NAME$16 = 'vc-drawer';
14774
14780
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
14775
- name: COMPONENT_NAME$14,
14781
+ name: COMPONENT_NAME$16,
14776
14782
  props: props$P,
14777
14783
  emits: ['close', 'update:modelValue', 'visible-change'],
14778
14784
  setup(props, {
@@ -14940,30 +14946,178 @@
14940
14946
  const MDrawerView = DrawerView;
14941
14947
 
14942
14948
  const props$O = {
14943
- tag: {
14949
+ modelValue: {
14950
+ type: Boolean,
14951
+ default: false
14952
+ },
14953
+ portalClass: [String, Object],
14954
+ placement: {
14944
14955
  type: String,
14945
- default: "div"
14956
+ default: "bottom"
14957
+ },
14958
+ trigger: {
14959
+ type: String,
14960
+ default: "hover"
14961
+ },
14962
+ arrow: {
14963
+ type: Boolean,
14964
+ default: false
14946
14965
  }
14947
14966
  };
14948
14967
 
14949
14968
  /** @jsxImportSource vue */
14950
14969
 
14951
- const COMPONENT_NAME$13 = 'vc-dropdown';
14970
+ const COMPONENT_NAME$15 = 'vc-dropdown';
14952
14971
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
14953
- name: COMPONENT_NAME$13,
14972
+ name: COMPONENT_NAME$15,
14954
14973
  props: props$O,
14974
+ inheritAttrs: false,
14975
+ emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
14955
14976
  setup(props, {
14977
+ slots,
14978
+ emit,
14979
+ expose
14980
+ }) {
14981
+ const its = useAttrs({
14982
+ merge: false
14983
+ });
14984
+ const isActive = vue.ref(false);
14985
+ const dropdownId = vue.ref(getUid('dropdown'));
14986
+ const inherit = vue.computed(() => {
14987
+ return {
14988
+ style: its.value.style,
14989
+ class: its.value.class
14990
+ };
14991
+ });
14992
+ const attrs = vue.computed(() => {
14993
+ return its.value.attrs;
14994
+ });
14995
+ vue.watch(() => props.modelValue, v => {
14996
+ isActive.value = v;
14997
+ }, {
14998
+ immediate: true
14999
+ });
15000
+
15001
+ /**
15002
+ * v-model 同步, 外部的数据改变时不会触发
15003
+ */
15004
+ const sync = () => {
15005
+ emit('update:modelValue', isActive.value);
15006
+ emit('visible-change', isActive.value);
15007
+ };
15008
+ const handleChange = v => {
15009
+ isActive.value = v;
15010
+ sync();
15011
+ };
15012
+ const close = () => {
15013
+ isActive.value = false;
15014
+ sync();
15015
+ };
15016
+ expose({
15017
+ close,
15018
+ dropdownId
15019
+ });
15020
+ return () => {
15021
+ return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
15022
+ "modelValue": isActive.value,
15023
+ "placement": props.placement,
15024
+ "trigger": props.trigger,
15025
+ "arrow": props.arrow,
15026
+ "portalClass": ['is-padding-none', 'vc-dropdown-wrapper', props.portalClass],
15027
+ "class": ['vc-dropdown', inherit.value.class],
15028
+ "style": inherit.value.style,
15029
+ "onReady": () => emit('ready'),
15030
+ "onClose": () => emit('close'),
15031
+ "onVisibleChange": handleChange
15032
+ }), {
15033
+ default: () => slots?.default?.(),
15034
+ content: () => slots?.content?.()
15035
+ });
15036
+ };
15037
+ }
15038
+ });
15039
+
15040
+ /** @jsxImportSource vue */
15041
+
15042
+ const COMPONENT_NAME$14 = 'vc-dropdown-menu';
15043
+ const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
15044
+ name: COMPONENT_NAME$14,
15045
+ setup(_, {
14956
15046
  slots
14957
15047
  }) {
14958
15048
  return () => {
14959
- return vue.createVNode("div", {
14960
- "class": "vc-dropdown"
15049
+ return vue.createVNode("ul", {
15050
+ "class": "vc-dropdown-menu"
14961
15051
  }, [slots?.default?.()]);
14962
15052
  };
14963
15053
  }
14964
15054
  });
14965
15055
 
15056
+ /** @jsxImportSource vue */
15057
+
15058
+ const COMPONENT_NAME$13 = 'vc-dropdown-item';
15059
+ const DropdownItem = /* @__PURE__ */ vue.defineComponent({
15060
+ name: COMPONENT_NAME$13,
15061
+ props: {
15062
+ value: {
15063
+ type: [String, Number],
15064
+ value: undefined
15065
+ },
15066
+ label: {
15067
+ type: [String, Number],
15068
+ value: undefined
15069
+ },
15070
+ disabled: {
15071
+ type: Boolean,
15072
+ default: false
15073
+ },
15074
+ selected: {
15075
+ type: Boolean,
15076
+ default: false
15077
+ },
15078
+ divided: {
15079
+ type: Boolean,
15080
+ default: false
15081
+ },
15082
+ closable: {
15083
+ type: Boolean,
15084
+ default: true
15085
+ }
15086
+ },
15087
+ setup(props, {
15088
+ slots,
15089
+ emit
15090
+ }) {
15091
+ const owner = getInstance$1('dropdown', 'dropdownId');
15092
+ const currentValue = vue.computed(() => {
15093
+ const v = typeof props.value === 'undefined' || props.value === '' ? props.label : props.value;
15094
+ return v;
15095
+ });
15096
+ const classes = vue.computed(() => {
15097
+ return {
15098
+ 'is-selected': props.selected,
15099
+ 'is-divided': props.divided,
15100
+ 'is-disabled': props.disabled
15101
+ };
15102
+ });
15103
+ const handleClick = e => {
15104
+ if (props.disabled) return;
15105
+ emit('click', currentValue.value, e);
15106
+ owner.emit('click', currentValue.value, e);
15107
+ props.closable && owner.exposed?.close();
15108
+ };
15109
+ return () => {
15110
+ return vue.createVNode("li", {
15111
+ "class": [classes.value, 'vc-dropdown-item'],
15112
+ "onClick": handleClick
15113
+ }, [slots.default ? slots.default?.() : props.label]);
15114
+ };
15115
+ }
15116
+ });
15117
+
14966
15118
  const MDropdown = Dropdown;
15119
+ const MDropdownMenu = DropdownMenu;
15120
+ const MDropdownItem = DropdownItem;
14967
15121
 
14968
15122
  const props$N = {
14969
15123
  tag: {
@@ -19161,6 +19315,9 @@
19161
19315
  type: Boolean,
19162
19316
  default: false
19163
19317
  },
19318
+ // draggable为true时有效
19319
+ x: Number,
19320
+ y: Number,
19164
19321
  okText: {
19165
19322
  type: [String, Boolean],
19166
19323
  default: "确定"
@@ -19218,8 +19375,8 @@
19218
19375
  const header = vue.shallowRef();
19219
19376
  const scroller = vue.shallowRef();
19220
19377
  const resizer = vue.shallowRef();
19221
- const x = vue.ref(0);
19222
- const y = vue.ref(0);
19378
+ const x = vue.ref(props.x);
19379
+ const y = vue.ref(props.y);
19223
19380
  const isActive = vue.ref(false);
19224
19381
 
19225
19382
  // 注: 服务端渲染为0, 在客服端激活前,展示端存在问题【高度不定】
@@ -19261,8 +19418,8 @@
19261
19418
  });
19262
19419
  const draggableStyle = vue.computed(() => {
19263
19420
  if (IS_SERVER$2 || !props.draggable) return {};
19264
- const left = x.value || window.innerWidth / 2 - defaultSize.value.width / 2;
19265
- const top = y.value || window.innerHeight / 2 - defaultSize.value.height / 2;
19421
+ const left = typeof x.value === 'undefined' ? window.innerWidth / 2 - defaultSize.value.width / 2 : x.value;
19422
+ const top = typeof y.value === 'undefined' ? window.innerHeight / 2 - defaultSize.value.height / 2 : y.value;
19266
19423
  return {
19267
19424
  left: `${left}px`,
19268
19425
  top: `${top}px`
@@ -20859,10 +21016,49 @@
20859
21016
  const MPicker = Picker;
20860
21017
 
20861
21018
  const props$p = {
20862
- tag: {
21019
+ title: {
21020
+ type: [String, Function],
21021
+ default: ""
21022
+ },
21023
+ content: {
21024
+ type: [String, Function],
21025
+ default: ""
21026
+ },
21027
+ modelValue: {
21028
+ type: Boolean,
21029
+ default: false
21030
+ },
21031
+ placement: {
20863
21032
  type: String,
20864
- default: "div"
20865
- }
21033
+ default: "top"
21034
+ },
21035
+ trigger: {
21036
+ type: String,
21037
+ default: "click"
21038
+ },
21039
+ okText: {
21040
+ type: String,
21041
+ default: "确定"
21042
+ },
21043
+ cancelText: {
21044
+ type: String,
21045
+ default: "取消"
21046
+ },
21047
+ okType: {
21048
+ type: String,
21049
+ default: "primary"
21050
+ },
21051
+ cancelType: {
21052
+ type: String,
21053
+ default: "default"
21054
+ },
21055
+ type: {
21056
+ type: String,
21057
+ default: "warning",
21058
+ validator: (v) => /(warning|info|success|error)/.test(v)
21059
+ },
21060
+ width: [String, Number],
21061
+ portalClass: [String, Object]
20866
21062
  };
20867
21063
 
20868
21064
  /** @jsxImportSource vue */
@@ -20871,13 +21067,125 @@
20871
21067
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
20872
21068
  name: COMPONENT_NAME$C,
20873
21069
  props: props$p,
21070
+ inheritAttrs: false,
21071
+ emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
20874
21072
  setup(props, {
20875
- slots
21073
+ slots,
21074
+ emit
20876
21075
  }) {
21076
+ const instance = vue.getCurrentInstance();
21077
+ const its = useAttrs({
21078
+ merge: false
21079
+ });
21080
+ const isActive = vue.ref(false);
21081
+ const contentStyle = vue.computed(() => {
21082
+ return props.content || !!slots.content ? {
21083
+ marginBottom: '15px'
21084
+ } : {};
21085
+ });
21086
+ const inherit = vue.computed(() => {
21087
+ return {
21088
+ style: its.value.style,
21089
+ class: its.value.class
21090
+ };
21091
+ });
21092
+ const attrs = vue.computed(() => {
21093
+ return its.value.attrs;
21094
+ });
21095
+ vue.watch(() => props.modelValue, v => {
21096
+ isActive.value = v;
21097
+ }, {
21098
+ immediate: true
21099
+ });
21100
+
21101
+ /**
21102
+ * v-model 同步, 外部的数据改变时不会触发
21103
+ */
21104
+ const sync = () => {
21105
+ emit('update:modelValue', isActive.value);
21106
+ emit('visible-change', isActive.value);
21107
+ };
21108
+ const handleBefore = (e, hook) => {
21109
+ e.stopPropagation();
21110
+ e.preventDefault();
21111
+ if (!isActive.value) return;
21112
+ const fn = hook && hook(e);
21113
+ if (fn && fn.then) {
21114
+ return fn.then(res => {
21115
+ isActive.value = false;
21116
+ sync();
21117
+ return res;
21118
+ });
21119
+ } else if (!fn || fn === true) {
21120
+ isActive.value = false;
21121
+ sync();
21122
+ }
21123
+ };
21124
+ const handleOk = (...rest) => {
21125
+ const ok = instance.vnode.props?.onOk || (() => {});
21126
+ return ok(...rest);
21127
+ };
21128
+ const handleCancel = (...rest) => {
21129
+ const cancel = instance.vnode.props?.onCancel || (() => {});
21130
+ return cancel(...rest);
21131
+ };
21132
+ const handleChange = v => {
21133
+ isActive.value = v;
21134
+ sync();
21135
+ };
20877
21136
  return () => {
20878
- return vue.createVNode("div", {
20879
- "class": "vc-popconfirm"
20880
- }, [slots?.default?.()]);
21137
+ return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
21138
+ "modelValue": isActive.value,
21139
+ "placement": props.placement,
21140
+ "trigger": props.trigger,
21141
+ "portalClass": ['is-padding-none', 'vc-popconfirm-wrapper', props.portalClass],
21142
+ "class": ['vc-popconfirm', inherit.value.class],
21143
+ "style": inherit.value.style,
21144
+ "onReady": () => emit('ready'),
21145
+ "onClose": () => emit('close'),
21146
+ "onVisibleChange": handleChange
21147
+ }), {
21148
+ default: () => slots?.default?.(),
21149
+ content: () => {
21150
+ return vue.createVNode("div", {
21151
+ "style": [{
21152
+ width: `${props.width}px`
21153
+ }],
21154
+ "class": "vc-popconfirm__wrapper"
21155
+ }, [vue.createVNode("div", {
21156
+ "class": "vc-popconfirm__title"
21157
+ }, [slots.icon ? slots.icon() : vue.createVNode(Icon, {
21158
+ "type": props.type,
21159
+ "class": [`is-${props.type}`, 'vc-popconfirm__icon']
21160
+ }, null), vue.createVNode("div", null, [slots.title ? slots.title() : typeof props.title === 'string' ? vue.createVNode("div", {
21161
+ "innerHTML": props.title
21162
+ }, null) : typeof props.title === 'function' ? vue.createVNode(Customer, {
21163
+ "render": props.title
21164
+ }, null) : null])]), vue.createVNode("div", {
21165
+ "style": contentStyle.value,
21166
+ "class": "vc-popconfirm__content"
21167
+ }, [slots.content ? slots.content() : typeof props.content === 'string' ? vue.createVNode("div", {
21168
+ "innerHTML": props.content
21169
+ }, null) : typeof props.content === 'function' ? vue.createVNode(Customer, {
21170
+ "render": props.content
21171
+ }, null) : null]), vue.createVNode("div", {
21172
+ "class": "vc-popconfirm__footer"
21173
+ }, [vue.createVNode(Button, {
21174
+ "type": props.cancelType,
21175
+ "style": "margin-right: 8px;",
21176
+ "size": "small",
21177
+ "onClick": e => handleBefore(e, handleCancel)
21178
+ }, {
21179
+ default: () => [props.cancelText]
21180
+ }), vue.createVNode(Button, {
21181
+ "type": props.okType,
21182
+ "size": "small",
21183
+ "onClick": e => handleBefore(e, handleOk)
21184
+ }, {
21185
+ default: () => [props.okText]
21186
+ })])]);
21187
+ }
21188
+ });
20881
21189
  };
20882
21190
  }
20883
21191
  });
@@ -41120,6 +41428,79 @@
41120
41428
  }
41121
41429
  });
41122
41430
 
41431
+ const HIDDEN_TEXT_STYLE = `
41432
+ position: absolute!important;
41433
+ word-break: break-all!important;
41434
+ overflow: auto!important;
41435
+ opacity: 0!important;
41436
+ z-index: -1000!important;
41437
+ top: 0!important;
41438
+ right: 0!important;
41439
+ `;
41440
+ const SIZING_STYLE$1 = [
41441
+ "letter-spacing",
41442
+ "line-height",
41443
+ "padding-top",
41444
+ "padding-bottom",
41445
+ "font-family",
41446
+ "font-weight",
41447
+ "font-size",
41448
+ "text-rendering",
41449
+ "text-transform",
41450
+ "width",
41451
+ // 'text-indent', // 需要额外计算
41452
+ "padding-left",
41453
+ "padding-right",
41454
+ "border-width",
41455
+ "box-sizing"
41456
+ ];
41457
+ let hiddenEl$1;
41458
+ const getFitIndex = (options = {}) => {
41459
+ const { el, line, value, suffix, indent = 0 } = options;
41460
+ let lineHeight = parseInt(getStyle$1(el, "line-height"), 10);
41461
+ if (!hiddenEl$1) {
41462
+ hiddenEl$1 = document.createElement("div");
41463
+ document.body.appendChild(hiddenEl$1);
41464
+ }
41465
+ el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
41466
+ const {
41467
+ paddingSize,
41468
+ borderSize,
41469
+ boxSizing,
41470
+ sizingStyle
41471
+ } = utils.getComputedStyle(el, SIZING_STYLE$1);
41472
+ const textIndent = `text-indent: ${parseInt(getStyle$1(el, "text-indent"), 10) + indent}px;`;
41473
+ hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
41474
+ let sideHeight = paddingSize || 0;
41475
+ boxSizing === "border-box" && (sideHeight += borderSize);
41476
+ if (Number.isNaN(lineHeight)) {
41477
+ hiddenEl$1.innerText = ".";
41478
+ lineHeight = hiddenEl$1.clientHeight - sideHeight;
41479
+ }
41480
+ let endIndex = -1;
41481
+ const strs = (typeof value === "number" ? `${value}` : value || "").split("");
41482
+ let innerText = "";
41483
+ for (let i = 0; i < strs.length; i++) {
41484
+ innerText += strs[i];
41485
+ hiddenEl$1.innerText = innerText;
41486
+ if (endIndex === -1 && hiddenEl$1.clientHeight - sideHeight > lineHeight * line) {
41487
+ endIndex = i;
41488
+ break;
41489
+ }
41490
+ }
41491
+ if (endIndex >= 0 && endIndex <= strs.length - 1) {
41492
+ for (let i = endIndex - 1; i >= 0; i--) {
41493
+ innerText = innerText.substring(0, i);
41494
+ hiddenEl$1.innerText = innerText + suffix;
41495
+ if (hiddenEl$1.clientHeight - sideHeight <= lineHeight * line) {
41496
+ endIndex = i;
41497
+ break;
41498
+ }
41499
+ }
41500
+ }
41501
+ return endIndex;
41502
+ };
41503
+
41123
41504
  const TableBody = /* @__PURE__ */ vue.defineComponent({
41124
41505
  name: 'vc-table-body',
41125
41506
  props: {
@@ -41228,10 +41609,13 @@
41228
41609
  column
41229
41610
  });
41230
41611
  }
41231
- return cellStyle;
41612
+ return {
41613
+ ...cellStyle,
41614
+ ...column.style
41615
+ };
41232
41616
  };
41233
41617
  const getCellClass = (rowIndex, columnIndex, row, column) => {
41234
- const classes = [column.realAlign, column.className];
41618
+ const classes = [column.realAlign, column.class];
41235
41619
  if (isColumnHidden(columnIndex)) {
41236
41620
  classes.push('is-hidden');
41237
41621
  }
@@ -41248,24 +41632,45 @@
41248
41632
  }
41249
41633
  return classes.join(' ');
41250
41634
  };
41251
- const handleCellMouseEnter = (e, row) => {
41635
+ let poper;
41636
+ const handleCellMouseEnter = (e, row, column) => {
41252
41637
  const cell = getCell(e);
41638
+ const hoverState = {
41639
+ cell,
41640
+ column,
41641
+ row
41642
+ };
41253
41643
  if (cell) {
41254
- const column = getColumnByCell(states.columns, cell);
41255
- const hoverState = {
41256
- cell,
41257
- column,
41258
- row
41259
- };
41260
41644
  table.hoverState.value = hoverState;
41261
41645
  table.emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, e);
41262
41646
  }
41647
+ // 判断是否text-overflow, 如果是就显示tooltip
41648
+ const el = e.target.querySelector('.vc-table__text-line');
41649
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
41650
+ if (!el || !line) return;
41651
+ const value = `${row[column.prop]}`;
41652
+ const endIndex = getFitIndex({
41653
+ el,
41654
+ value,
41655
+ line,
41656
+ suffix: '...'
41657
+ });
41658
+ if (endIndex > 0 && endIndex < value.length - 1) {
41659
+ poper && poper.destroy();
41660
+ poper = Popover.open({
41661
+ el: document.body,
41662
+ triggerEl: el,
41663
+ hover: true,
41664
+ alone: true,
41665
+ autoWidth: true,
41666
+ content: value
41667
+ });
41668
+ }
41263
41669
  };
41264
- const handleCellMouseLeave = e => {
41670
+ const handleCellMouseLeave = (e, row, column) => {
41265
41671
  const cell = getCell(e);
41266
41672
  if (!cell) return;
41267
- const oldHoverState = table.hoverState.value || {};
41268
- table.emit('cell-mouse-leave', oldHoverState.row, oldHoverState.column, oldHoverState.cell, e);
41673
+ table.emit('cell-mouse-leave', row, column, cell, e);
41269
41674
  };
41270
41675
  const handleMouseEnter = debounce$1(index => {
41271
41676
  table.store.setHoverRow(index);
@@ -41336,8 +41741,8 @@
41336
41741
  "key": column.id,
41337
41742
  "style": [getCellStyle(rowIndex, columnIndex, row, column), sizeStyle],
41338
41743
  "class": [getCellClass(rowIndex, columnIndex, row, column), 'vc-table__td'],
41339
- "onMouseenter": e => handleCellMouseEnter(e, row),
41340
- "onMouseleave": e => handleCellMouseLeave(e)
41744
+ "onMouseenter": e => handleCellMouseEnter(e, row, column),
41745
+ "onMouseleave": e => handleCellMouseLeave(e, row, column)
41341
41746
  }, [renderCell({
41342
41747
  row,
41343
41748
  column,
@@ -41393,7 +41798,11 @@
41393
41798
  allowRender.value = true;
41394
41799
  }
41395
41800
  });
41396
- vue.onBeforeUnmount(() => (timer && clearTimeout(timer), allowRender.value = false));
41801
+ vue.onBeforeUnmount(() => {
41802
+ poper && poper.destroy();
41803
+ timer && clearTimeout(timer);
41804
+ allowRender.value = false;
41805
+ });
41397
41806
  return () => {
41398
41807
  if (!allowRender.value) return;
41399
41808
  return vue.createVNode("div", {
@@ -41520,10 +41929,13 @@
41520
41929
  column
41521
41930
  });
41522
41931
  }
41523
- return headerCellStyle;
41932
+ return {
41933
+ ...headerCellStyle,
41934
+ ...column.style
41935
+ };
41524
41936
  };
41525
41937
  const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
41526
- const classes = [column.id, column.order, column.realHeaderAlign, column.className, column.labelClass];
41938
+ const classes = [column.id, column.order, column.realHeaderAlign, column.class, column.labelClass];
41527
41939
  if (rowIndex === 0 && columnsHidden.value[columnIndex]) {
41528
41940
  classes.push('is-hidden');
41529
41941
  }
@@ -42458,196 +42870,6 @@
42458
42870
  }
42459
42871
  });
42460
42872
 
42461
- const props$b = {
42462
- tag: {
42463
- type: String,
42464
- default: "div"
42465
- },
42466
- value: {
42467
- type: String,
42468
- default: ""
42469
- },
42470
- line: {
42471
- type: Number,
42472
- default: 0
42473
- },
42474
- // TODO: 是否改为tail-indent来表示尾部缩进
42475
- indent: {
42476
- type: Number,
42477
- default: 0
42478
- },
42479
- resize: {
42480
- type: [Boolean, Number],
42481
- default: 100
42482
- },
42483
- suffix: {
42484
- type: String,
42485
- default: "..."
42486
- },
42487
- placement: {
42488
- type: String,
42489
- default: "top"
42490
- },
42491
- portalClass: [Object, String, Array],
42492
- portalStyle: [Object, String, Array],
42493
- renderRow: {
42494
- type: Function,
42495
- default: (props$) => {
42496
- return props$.value;
42497
- }
42498
- }
42499
- };
42500
-
42501
- const HIDDEN_TEXT_STYLE = `
42502
- position: absolute!important;
42503
- word-break: break-all!important;
42504
- overflow: auto!important;
42505
- opacity: 0!important;
42506
- z-index: -1000!important;
42507
- top: 0!important;
42508
- right: 0!important;
42509
- `;
42510
- const SIZING_STYLE$1 = [
42511
- "letter-spacing",
42512
- "line-height",
42513
- "padding-top",
42514
- "padding-bottom",
42515
- "font-family",
42516
- "font-weight",
42517
- "font-size",
42518
- "text-rendering",
42519
- "text-transform",
42520
- "width",
42521
- // 'text-indent', // 需要额外计算
42522
- "padding-left",
42523
- "padding-right",
42524
- "border-width",
42525
- "box-sizing"
42526
- ];
42527
- let hiddenEl$1;
42528
- const getFitIndex = (options = {}) => {
42529
- const { el, line, value, suffix, indent } = options;
42530
- let lineHeight = parseInt(getStyle$1(el, "line-height"), 10);
42531
- if (!hiddenEl$1) {
42532
- hiddenEl$1 = document.createElement("div");
42533
- document.body.appendChild(hiddenEl$1);
42534
- }
42535
- el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
42536
- const {
42537
- paddingSize,
42538
- borderSize,
42539
- boxSizing,
42540
- sizingStyle
42541
- } = utils.getComputedStyle(el, SIZING_STYLE$1);
42542
- const textIndent = `text-indent: ${parseInt(getStyle$1(el, "text-indent"), 10) + indent}px;`;
42543
- hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
42544
- let sideHeight = paddingSize || 0;
42545
- boxSizing === "border-box" && (sideHeight += borderSize);
42546
- if (Number.isNaN(lineHeight)) {
42547
- hiddenEl$1.innerText = ".";
42548
- lineHeight = hiddenEl$1.clientHeight - sideHeight;
42549
- }
42550
- let endIndex = 0;
42551
- hiddenEl$1.innerText = suffix;
42552
- (value || "").split("").forEach((item, i) => {
42553
- let old = hiddenEl$1.innerText;
42554
- old = old.substring(0, old.length - suffix.length);
42555
- hiddenEl$1.innerText = old + item + suffix;
42556
- if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
42557
- endIndex = i;
42558
- }
42559
- });
42560
- return endIndex;
42561
- };
42562
-
42563
- /** @jsxImportSource vue */
42564
-
42565
- const COMPONENT_NAME$h = 'vc-text';
42566
- const Text = /* @__PURE__ */ vue.defineComponent({
42567
- name: COMPONENT_NAME$h,
42568
- props: props$b,
42569
- setup(props, {
42570
- emit
42571
- }) {
42572
- const instance = vue.getCurrentInstance();
42573
- const isActive = vue.ref(false);
42574
- const endIndex = vue.ref(0);
42575
- const styles = vue.computed(() => {
42576
- return {
42577
- cursor: endIndex.value === 0 ? 'unset' : 'pointer'
42578
- };
42579
- });
42580
- const calcPosition = () => {
42581
- const {
42582
- suffix,
42583
- line,
42584
- value,
42585
- indent
42586
- } = props;
42587
- if (line === 0) {
42588
- endIndex.value = 0;
42589
- isActive.value = true;
42590
- } else {
42591
- endIndex.value = getFitIndex({
42592
- el: instance.vnode.el,
42593
- line,
42594
- value,
42595
- suffix,
42596
- indent
42597
- });
42598
- isActive.value = true;
42599
- }
42600
- emit('clip', endIndex.value);
42601
- };
42602
- const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce$1(calcPosition, props.resize || 0);
42603
- let poper;
42604
- const handleMouseOver = e => {
42605
- if (endIndex.value > 0) {
42606
- poper = Popover.open({
42607
- el: document.body,
42608
- name: 'vc-text-popover',
42609
- // 确保不重复创建
42610
- triggerEl: e.target,
42611
- hover: true,
42612
- theme: 'dark',
42613
- placement: props.placement,
42614
- portalClass: props.portalClass,
42615
- portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
42616
- content: props.value
42617
- });
42618
- }
42619
- };
42620
- const handleMouseOut = () => {
42621
- // Do.
42622
- };
42623
- ['value', 'indent', 'line'].forEach(key => {
42624
- vue.watch(() => props[key], calcPosition);
42625
- });
42626
- vue.onMounted(() => {
42627
- props.resize !== false && Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
42628
- });
42629
- vue.onBeforeUnmount(() => {
42630
- props.resize !== false && Resize.off(instance.vnode.el, handleResize);
42631
- poper?.destroy?.();
42632
- });
42633
- const Content = props.tag;
42634
- return () => {
42635
- return vue.createVNode(Content, {
42636
- "class": "vc-text",
42637
- "style": styles.value,
42638
- "onMouseover": handleMouseOver,
42639
- "onMouseout": handleMouseOut
42640
- }, {
42641
- default: () => [isActive.value ? vue.createVNode(Customer, {
42642
- "value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
42643
- "index": endIndex.value,
42644
- "render": props.renderRow
42645
- }, null) : null]
42646
- });
42647
- };
42648
- }
42649
- });
42650
-
42651
42873
  const cellStarts = {
42652
42874
  default: {
42653
42875
  order: ''
@@ -42655,8 +42877,7 @@
42655
42877
  selection: {
42656
42878
  width: 60,
42657
42879
  minWidth: 60,
42658
- order: '',
42659
- className: 'vc-table-column--selection'
42880
+ order: ''
42660
42881
  },
42661
42882
  expand: {
42662
42883
  width: 60,
@@ -42702,7 +42923,8 @@
42702
42923
  }, null), [[vue.vShow, store.states.expandSelectable || level === 0]]);
42703
42924
  },
42704
42925
  sortable: false,
42705
- resizable: false
42926
+ resizable: false,
42927
+ class: 'vc-table__selection-column'
42706
42928
  },
42707
42929
  index: {
42708
42930
  renderHeader(h, {
@@ -42752,7 +42974,7 @@
42752
42974
  },
42753
42975
  sortable: false,
42754
42976
  resizable: false,
42755
- className: 'vc-table__expand-column'
42977
+ class: 'vc-table__expand-column'
42756
42978
  }
42757
42979
  };
42758
42980
 
@@ -42770,19 +42992,15 @@
42770
42992
  if (formatter) {
42771
42993
  return column.formatter(rowData);
42772
42994
  }
42773
- const line = column.line || VcInstance.options.TableColumn?.line;
42995
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
42774
42996
  if (line && value) {
42775
- const base = rowData.isHead || rowData.isTail ? 36 : 24; // 目前gap是12
42776
42997
  const style = {
42777
- // 目前左右pading为10
42778
- // TODO: 含有border还要-1
42779
- width: (column.realWidth || column.width) - base + 'px'
42998
+ '-webkit-line-clamp': line
42780
42999
  };
42781
- return vue.createVNode(Text, {
42782
- "style": style,
42783
- "line": line,
42784
- "value": `${value}`
42785
- }, null);
43000
+ return vue.createVNode("div", {
43001
+ "class": "vc-table__text-line",
43002
+ "style": style
43003
+ }, [value]);
42786
43004
  }
42787
43005
  return value;
42788
43006
  };
@@ -42830,18 +43048,14 @@
42830
43048
 
42831
43049
  const TableColumn = /* @__PURE__ */ vue.defineComponent({
42832
43050
  name: 'vc-table-column',
43051
+ inheritAttrs: false,
42833
43052
  props: {
42834
43053
  type: {
42835
43054
  type: String,
42836
43055
  default: 'default'
42837
43056
  },
42838
- // 默认只展示一行
42839
- line: {
42840
- type: Number,
42841
- default: 0
42842
- },
43057
+ line: Number,
42843
43058
  label: String,
42844
- customClass: String,
42845
43059
  labelClass: String,
42846
43060
  prop: String,
42847
43061
  width: Number,
@@ -42878,7 +43092,8 @@
42878
43092
  tooltip: [String, Function]
42879
43093
  },
42880
43094
  setup(props, {
42881
- slots
43095
+ slots,
43096
+ attrs
42882
43097
  }) {
42883
43098
  const instance = vue.getCurrentInstance();
42884
43099
  const table = vue.inject('vc-table');
@@ -42928,7 +43143,7 @@
42928
43143
  Object.keys(source).forEach(prop => {
42929
43144
  const value = source[prop];
42930
43145
  if (value !== undefined) {
42931
- column[prop] = prop === 'customClass' ? `${column[prop]} ${value}` : value;
43146
+ column[prop] = prop === 'class' ? `${column[prop] ? `${column[prop]} ` : ''}${value}` : value;
42932
43147
  }
42933
43148
  });
42934
43149
  return column;
@@ -42998,7 +43213,7 @@
42998
43213
  // 存在树形数组,且当前行无箭头图标且处于当前展开列,表格对齐
42999
43214
  if (!isEmpty$1(table.store.states.treeData) && !prefix && data.isExpandColumn) {
43000
43215
  prefix = vue.createVNode("span", {
43001
- "class": "vc-table-un-expand__indent"
43216
+ "class": "vc-table__unexpand__indent"
43002
43217
  }, null);
43003
43218
  }
43004
43219
  const {
@@ -43014,6 +43229,8 @@
43014
43229
  const defaults = {
43015
43230
  colspan: 1,
43016
43231
  rowspan: 1,
43232
+ class: attrs.class,
43233
+ style: attrs.style,
43017
43234
  ...cellStarts[props.type],
43018
43235
  id: columnId.value,
43019
43236
  realAlign,
@@ -43100,7 +43317,7 @@
43100
43317
  const MTable = Table;
43101
43318
  const MTableColumn = TableColumn;
43102
43319
 
43103
- const props$a = {
43320
+ const props$b = {
43104
43321
  type: {
43105
43322
  type: String,
43106
43323
  validator: (v) => /^(line|card)$/.test(v),
@@ -43259,10 +43476,10 @@
43259
43476
 
43260
43477
  /** @jsxImportSource vue */
43261
43478
 
43262
- const COMPONENT_NAME$g = 'vc-tabs';
43479
+ const COMPONENT_NAME$h = 'vc-tabs';
43263
43480
  const Tabs = /* @__PURE__ */ vue.defineComponent({
43264
- name: COMPONENT_NAME$g,
43265
- props: props$a,
43481
+ name: COMPONENT_NAME$h,
43482
+ props: props$b,
43266
43483
  emits: ['update:modelValue', 'change', 'click'],
43267
43484
  setup(props, {
43268
43485
  slots
@@ -43427,7 +43644,7 @@
43427
43644
  }
43428
43645
  });
43429
43646
 
43430
- const props$9 = {
43647
+ const props$a = {
43431
43648
  value: {
43432
43649
  type: [String, Number]
43433
43650
  },
@@ -43509,10 +43726,10 @@
43509
43726
 
43510
43727
  /** @jsxImportSource vue */
43511
43728
 
43512
- const COMPONENT_NAME$f = 'vc-tabs-pane';
43729
+ const COMPONENT_NAME$g = 'vc-tabs-pane';
43513
43730
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
43514
- name: COMPONENT_NAME$f,
43515
- props: props$9,
43731
+ name: COMPONENT_NAME$g,
43732
+ props: props$a,
43516
43733
  setup(_, {
43517
43734
  slots
43518
43735
  }) {
@@ -43527,8 +43744,8 @@
43527
43744
  }
43528
43745
  });
43529
43746
 
43530
- const props$8 = {
43531
- ...props$a,
43747
+ const props$9 = {
43748
+ ...props$b,
43532
43749
  theme: {
43533
43750
  type: String,
43534
43751
  default: "light",
@@ -43566,10 +43783,10 @@
43566
43783
 
43567
43784
  /** @jsxImportSource vue */
43568
43785
 
43569
- const COMPONENT_NAME$e = 'vcm-tabs';
43786
+ const COMPONENT_NAME$f = 'vcm-tabs';
43570
43787
  const MTabs = /* @__PURE__ */ vue.defineComponent({
43571
- name: COMPONENT_NAME$e,
43572
- props: props$8,
43788
+ name: COMPONENT_NAME$f,
43789
+ props: props$9,
43573
43790
  emits: ['update:modelValue', 'change', 'click'],
43574
43791
  setup(props, {
43575
43792
  slots
@@ -43833,10 +44050,10 @@
43833
44050
 
43834
44051
  /** @jsxImportSource vue */
43835
44052
 
43836
- const COMPONENT_NAME$d = 'vcm-tabs-pane';
44053
+ const COMPONENT_NAME$e = 'vcm-tabs-pane';
43837
44054
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
43838
- name: COMPONENT_NAME$d,
43839
- props: props$9,
44055
+ name: COMPONENT_NAME$e,
44056
+ props: props$a,
43840
44057
  setup(_, {
43841
44058
  slots
43842
44059
  }) {
@@ -43853,6 +44070,134 @@
43853
44070
 
43854
44071
  const MTag = Tag;
43855
44072
 
44073
+ const props$8 = {
44074
+ tag: {
44075
+ type: String,
44076
+ default: "div"
44077
+ },
44078
+ value: {
44079
+ type: String,
44080
+ default: ""
44081
+ },
44082
+ line: {
44083
+ type: Number,
44084
+ default: 0
44085
+ },
44086
+ // TODO: 是否改为tail-indent来表示尾部缩进
44087
+ indent: {
44088
+ type: Number,
44089
+ default: 0
44090
+ },
44091
+ resize: {
44092
+ type: [Boolean, Number],
44093
+ default: 100
44094
+ },
44095
+ suffix: {
44096
+ type: String,
44097
+ default: "..."
44098
+ },
44099
+ placement: {
44100
+ type: String,
44101
+ default: "top"
44102
+ },
44103
+ portalClass: [Object, String, Array],
44104
+ portalStyle: [Object, String, Array],
44105
+ renderRow: {
44106
+ type: Function,
44107
+ default: (props$) => {
44108
+ return props$.value;
44109
+ }
44110
+ }
44111
+ };
44112
+
44113
+ /** @jsxImportSource vue */
44114
+
44115
+ const COMPONENT_NAME$d = 'vc-text';
44116
+ const Text = /* @__PURE__ */ vue.defineComponent({
44117
+ name: COMPONENT_NAME$d,
44118
+ props: props$8,
44119
+ setup(props, {
44120
+ emit
44121
+ }) {
44122
+ const instance = vue.getCurrentInstance();
44123
+ const isActive = vue.ref(false);
44124
+ const endIndex = vue.ref(-1);
44125
+ const styles = vue.computed(() => {
44126
+ return {
44127
+ cursor: endIndex.value <= 0 ? 'unset' : 'pointer'
44128
+ };
44129
+ });
44130
+ const calcPosition = () => {
44131
+ const {
44132
+ suffix,
44133
+ line,
44134
+ value,
44135
+ indent
44136
+ } = props;
44137
+ if (line === 0) {
44138
+ endIndex.value = -1;
44139
+ isActive.value = true;
44140
+ } else {
44141
+ endIndex.value = getFitIndex({
44142
+ el: instance.vnode.el,
44143
+ line,
44144
+ value,
44145
+ suffix,
44146
+ indent
44147
+ });
44148
+ isActive.value = true;
44149
+ }
44150
+ emit('clip', endIndex.value);
44151
+ };
44152
+ const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce$1(calcPosition, props.resize || 0);
44153
+ let poper;
44154
+ const handleMouseOver = e => {
44155
+ if (endIndex.value > 0) {
44156
+ poper = Popover.open({
44157
+ el: document.body,
44158
+ name: 'vc-text-popover',
44159
+ // 确保不重复创建
44160
+ triggerEl: e.target,
44161
+ hover: true,
44162
+ theme: 'dark',
44163
+ placement: props.placement,
44164
+ portalClass: props.portalClass,
44165
+ portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
44166
+ content: props.value
44167
+ });
44168
+ }
44169
+ };
44170
+ const handleMouseOut = () => {
44171
+ // Do.
44172
+ };
44173
+ ['value', 'indent', 'line'].forEach(key => {
44174
+ vue.watch(() => props[key], calcPosition);
44175
+ });
44176
+ vue.onMounted(() => {
44177
+ props.resize !== false && Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
44178
+ });
44179
+ vue.onBeforeUnmount(() => {
44180
+ props.resize !== false && Resize.off(instance.vnode.el, handleResize);
44181
+ poper?.destroy?.();
44182
+ });
44183
+ const Content = props.tag;
44184
+ return () => {
44185
+ return vue.createVNode(Content, {
44186
+ "class": "vc-text",
44187
+ "style": styles.value,
44188
+ "onMouseover": handleMouseOver,
44189
+ "onMouseout": handleMouseOut
44190
+ }, {
44191
+ default: () => [isActive.value ? vue.createVNode(Customer, {
44192
+ "value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
44193
+ "index": endIndex.value,
44194
+ "render": props.renderRow
44195
+ }, null) : null]
44196
+ });
44197
+ };
44198
+ }
44199
+ });
44200
+
43856
44201
  const MText = Text;
43857
44202
 
43858
44203
  const HIDDEN_TEXTAREA_STYLE = `
@@ -132729,6 +133074,8 @@
132729
133074
  exports.Drawer = Drawer;
132730
133075
  exports.DrawerView = DrawerView;
132731
133076
  exports.Dropdown = Dropdown;
133077
+ exports.DropdownItem = DropdownItem;
133078
+ exports.DropdownMenu = DropdownMenu;
132732
133079
  exports.Editor = Editor;
132733
133080
  exports.Expand = Expand$1;
132734
133081
  exports.Form = Form;
@@ -132770,6 +133117,8 @@
132770
133117
  exports.MDrawer = MDrawer;
132771
133118
  exports.MDrawerView = MDrawerView;
132772
133119
  exports.MDropdown = MDropdown;
133120
+ exports.MDropdownItem = MDropdownItem;
133121
+ exports.MDropdownMenu = MDropdownMenu;
132773
133122
  exports.MEditor = MEditor;
132774
133123
  exports.MExpand = MExpand;
132775
133124
  exports.MForm = MForm;