@deot/vc 1.0.28 → 1.0.29

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.
@@ -26130,9 +26130,9 @@
26130
26130
  default: "div"
26131
26131
  }
26132
26132
  };
26133
- const COMPONENT_NAME$20 = "vc-action-sheet";
26133
+ const COMPONENT_NAME$22 = "vc-action-sheet";
26134
26134
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
26135
- name: COMPONENT_NAME$20,
26135
+ name: COMPONENT_NAME$22,
26136
26136
  props: props$1q,
26137
26137
  setup(props2, {
26138
26138
  slots
@@ -26312,9 +26312,9 @@
26312
26312
  }
26313
26313
  }
26314
26314
  const IconManager = new Manager();
26315
- const COMPONENT_NAME$1$ = "vc-icon";
26315
+ const COMPONENT_NAME$21 = "vc-icon";
26316
26316
  const Icon = /* @__PURE__ */ vue.defineComponent({
26317
- name: COMPONENT_NAME$1$,
26317
+ name: COMPONENT_NAME$21,
26318
26318
  props: props$1o,
26319
26319
  setup(props2) {
26320
26320
  const viewBox = vue.ref("0 0 1024 1024");
@@ -26510,9 +26510,9 @@
26510
26510
  }
26511
26511
  };
26512
26512
  };
26513
- const COMPONENT_NAME$1_ = "vc-transition";
26513
+ const COMPONENT_NAME$20 = "vc-transition";
26514
26514
  const Transition = vue.defineComponent({
26515
- name: COMPONENT_NAME$1_,
26515
+ name: COMPONENT_NAME$20,
26516
26516
  props: props$1n,
26517
26517
  // 当不声明emits的情况下,事件存在于attrs中
26518
26518
  inheritAttrs: false,
@@ -26532,9 +26532,9 @@
26532
26532
  };
26533
26533
  }
26534
26534
  });
26535
- const COMPONENT_NAME$1Z = "vc-transition-collapse";
26535
+ const COMPONENT_NAME$1$ = "vc-transition-collapse";
26536
26536
  const TransitionCollapse = vue.defineComponent({
26537
- name: COMPONENT_NAME$1Z,
26537
+ name: COMPONENT_NAME$1$,
26538
26538
  props: props$1n,
26539
26539
  // 当不声明emits的情况下,事件存在于attrs中
26540
26540
  inheritAttrs: false,
@@ -26652,9 +26652,9 @@
26652
26652
  };
26653
26653
  }
26654
26654
  });
26655
- const COMPONENT_NAME$1Y = "vc-transition-fade";
26655
+ const COMPONENT_NAME$1_ = "vc-transition-fade";
26656
26656
  const TransitionFade = vue.defineComponent({
26657
- name: COMPONENT_NAME$1Y,
26657
+ name: COMPONENT_NAME$1_,
26658
26658
  props: {
26659
26659
  ...props$1n,
26660
26660
  // inheritAttrs必须是false
@@ -26688,9 +26688,9 @@
26688
26688
  };
26689
26689
  }
26690
26690
  });
26691
- const COMPONENT_NAME$1X = "vc-transition-scale";
26691
+ const COMPONENT_NAME$1Z = "vc-transition-scale";
26692
26692
  const TransitionScale = vue.defineComponent({
26693
- name: COMPONENT_NAME$1X,
26693
+ name: COMPONENT_NAME$1Z,
26694
26694
  props: {
26695
26695
  ...props$1n,
26696
26696
  mode: {
@@ -26729,9 +26729,9 @@
26729
26729
  };
26730
26730
  }
26731
26731
  });
26732
- const COMPONENT_NAME$1W = "vc-transition-slide";
26732
+ const COMPONENT_NAME$1Y = "vc-transition-slide";
26733
26733
  const TransitionSlide = vue.defineComponent({
26734
- name: COMPONENT_NAME$1W,
26734
+ name: COMPONENT_NAME$1Y,
26735
26735
  props: {
26736
26736
  ...props$1n,
26737
26737
  mode: {
@@ -26770,9 +26770,9 @@
26770
26770
  };
26771
26771
  }
26772
26772
  });
26773
- const COMPONENT_NAME$1V = "vc-transition-zoom";
26773
+ const COMPONENT_NAME$1X = "vc-transition-zoom";
26774
26774
  const TransitionZoom = vue.defineComponent({
26775
- name: COMPONENT_NAME$1V,
26775
+ name: COMPONENT_NAME$1X,
26776
26776
  props: {
26777
26777
  ...props$1n,
26778
26778
  mode: {
@@ -26811,7 +26811,7 @@
26811
26811
  };
26812
26812
  }
26813
26813
  });
26814
- const COMPONENT_NAME$1U = "vc-alert";
26814
+ const COMPONENT_NAME$1W = "vc-alert";
26815
26815
  const THEME_MAP = {
26816
26816
  info: ["#2B72FD", "#91d5ff", "#e6f7ff"],
26817
26817
  success: ["#52c41a", "#b7eb8f", "#f6ffed"],
@@ -26819,7 +26819,7 @@
26819
26819
  warning: ["#ffbf00", "#ffe58f", "#fffbe6"]
26820
26820
  };
26821
26821
  const Alert = /* @__PURE__ */ vue.defineComponent({
26822
- name: COMPONENT_NAME$1U,
26822
+ name: COMPONENT_NAME$1W,
26823
26823
  props: props$1p,
26824
26824
  setup(props2, {
26825
26825
  slots,
@@ -26912,9 +26912,9 @@
26912
26912
  default: "div"
26913
26913
  }
26914
26914
  };
26915
- const COMPONENT_NAME$1T = "vc-artboard";
26915
+ const COMPONENT_NAME$1V = "vc-artboard";
26916
26916
  const Artboard = /* @__PURE__ */ vue.defineComponent({
26917
- name: COMPONENT_NAME$1T,
26917
+ name: COMPONENT_NAME$1V,
26918
26918
  props: props$1m,
26919
26919
  setup(props2, {
26920
26920
  slots
@@ -26948,9 +26948,9 @@
26948
26948
  default: false
26949
26949
  }
26950
26950
  };
26951
- const COMPONENT_NAME$1S = "vc-spin";
26951
+ const COMPONENT_NAME$1U = "vc-spin";
26952
26952
  const Spin = /* @__PURE__ */ vue.defineComponent({
26953
- name: COMPONENT_NAME$1S,
26953
+ name: COMPONENT_NAME$1U,
26954
26954
  props: props$1l,
26955
26955
  setup(props2, {
26956
26956
  slots
@@ -26999,9 +26999,9 @@
26999
26999
  },
27000
27000
  exclude: RegExp
27001
27001
  };
27002
- const COMPONENT_NAME$1R = "vc-debounce";
27002
+ const COMPONENT_NAME$1T = "vc-debounce";
27003
27003
  const Debounce = vue.defineComponent({
27004
- name: COMPONENT_NAME$1R,
27004
+ name: COMPONENT_NAME$1T,
27005
27005
  props: props$1k,
27006
27006
  /**
27007
27007
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
@@ -27069,9 +27069,9 @@
27069
27069
  default: "button"
27070
27070
  }
27071
27071
  };
27072
- const COMPONENT_NAME$1Q = "vc-button";
27072
+ const COMPONENT_NAME$1S = "vc-button";
27073
27073
  const Button = /* @__PURE__ */ vue.defineComponent({
27074
- name: COMPONENT_NAME$1Q,
27074
+ name: COMPONENT_NAME$1S,
27075
27075
  emits: ["click"],
27076
27076
  props: props$1j,
27077
27077
  setup(props2, {
@@ -27149,9 +27149,9 @@
27149
27149
  default: false
27150
27150
  }
27151
27151
  };
27152
- const COMPONENT_NAME$1P = "vc-button-group";
27152
+ const COMPONENT_NAME$1R = "vc-button-group";
27153
27153
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
27154
- name: COMPONENT_NAME$1P,
27154
+ name: COMPONENT_NAME$1R,
27155
27155
  props: props$1i,
27156
27156
  setup(props2, {
27157
27157
  slots
@@ -27180,9 +27180,9 @@
27180
27180
  default: "div"
27181
27181
  }
27182
27182
  };
27183
- const COMPONENT_NAME$1O = "vc-calendar";
27183
+ const COMPONENT_NAME$1Q = "vc-calendar";
27184
27184
  const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
27185
- name: COMPONENT_NAME$1O,
27185
+ name: COMPONENT_NAME$1Q,
27186
27186
  props: props$1h,
27187
27187
  setup(props2, {
27188
27188
  slots
@@ -27215,9 +27215,9 @@
27215
27215
  type: String
27216
27216
  }
27217
27217
  };
27218
- const COMPONENT_NAME$1N = "vc-card";
27218
+ const COMPONENT_NAME$1P = "vc-card";
27219
27219
  const Card = /* @__PURE__ */ vue.defineComponent({
27220
- name: COMPONENT_NAME$1N,
27220
+ name: COMPONENT_NAME$1P,
27221
27221
  props: props$1g,
27222
27222
  setup(props2, {
27223
27223
  slots
@@ -27248,9 +27248,9 @@
27248
27248
  default: "div"
27249
27249
  }
27250
27250
  };
27251
- const COMPONENT_NAME$1M = "vc-carousel";
27251
+ const COMPONENT_NAME$1O = "vc-carousel";
27252
27252
  const Carousel = /* @__PURE__ */ vue.defineComponent({
27253
- name: COMPONENT_NAME$1M,
27253
+ name: COMPONENT_NAME$1O,
27254
27254
  props: props$1f,
27255
27255
  setup(props2, {
27256
27256
  slots
@@ -27269,9 +27269,9 @@
27269
27269
  default: "div"
27270
27270
  }
27271
27271
  };
27272
- const COMPONENT_NAME$1L = "vc-cascader";
27272
+ const COMPONENT_NAME$1N = "vc-cascader";
27273
27273
  const Cascader = /* @__PURE__ */ vue.defineComponent({
27274
- name: COMPONENT_NAME$1L,
27274
+ name: COMPONENT_NAME$1N,
27275
27275
  props: props$1e,
27276
27276
  setup(props2, {
27277
27277
  slots
@@ -27334,9 +27334,9 @@
27334
27334
  watchShallow: Boolean,
27335
27335
  manualUpdate: Boolean
27336
27336
  };
27337
- const COMPONENT_NAME$1K = "vc-chart";
27337
+ const COMPONENT_NAME$1M = "vc-chart";
27338
27338
  const Chart = /* @__PURE__ */ vue.defineComponent({
27339
- name: COMPONENT_NAME$1K,
27339
+ name: COMPONENT_NAME$1M,
27340
27340
  props: props$1d,
27341
27341
  emits: [...EVENTS, "ready"],
27342
27342
  setup(props2, {
@@ -27558,9 +27558,9 @@
27558
27558
  computedLabel
27559
27559
  };
27560
27560
  };
27561
- const COMPONENT_NAME$1J = "vc-checkbox";
27561
+ const COMPONENT_NAME$1L = "vc-checkbox";
27562
27562
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
27563
- name: COMPONENT_NAME$1J,
27563
+ name: COMPONENT_NAME$1L,
27564
27564
  props: props$1c,
27565
27565
  emits: ["update:modelValue", "change"],
27566
27566
  setup(props2, {
@@ -27642,9 +27642,9 @@
27642
27642
  reset
27643
27643
  };
27644
27644
  };
27645
- const COMPONENT_NAME$1I = "vc-checkbox-group";
27645
+ const COMPONENT_NAME$1K = "vc-checkbox-group";
27646
27646
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
27647
- name: COMPONENT_NAME$1I,
27647
+ name: COMPONENT_NAME$1K,
27648
27648
  props: props$1b,
27649
27649
  emits: ["update:modelValue", "change"],
27650
27650
  setup(props2, {
@@ -27659,9 +27659,9 @@
27659
27659
  };
27660
27660
  }
27661
27661
  });
27662
- const COMPONENT_NAME$1H = "vcm-checkbox";
27662
+ const COMPONENT_NAME$1J = "vcm-checkbox";
27663
27663
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
27664
- name: COMPONENT_NAME$1H,
27664
+ name: COMPONENT_NAME$1J,
27665
27665
  props: props$1c,
27666
27666
  emits: ["update:modelValue", "change"],
27667
27667
  setup(props2, {
@@ -27698,9 +27698,9 @@
27698
27698
  };
27699
27699
  }
27700
27700
  });
27701
- const COMPONENT_NAME$1G = "vcm-checkbox-group";
27701
+ const COMPONENT_NAME$1I = "vcm-checkbox-group";
27702
27702
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
27703
- name: COMPONENT_NAME$1G,
27703
+ name: COMPONENT_NAME$1I,
27704
27704
  props: props$1b,
27705
27705
  emits: ["update:modelValue", "change"],
27706
27706
  setup(props2, {
@@ -27756,9 +27756,9 @@
27756
27756
  default: () => null
27757
27757
  }
27758
27758
  };
27759
- const COMPONENT_NAME$1F = "vc-customer";
27759
+ const COMPONENT_NAME$1H = "vc-customer";
27760
27760
  const Customer = vue.defineComponent({
27761
- name: COMPONENT_NAME$1F,
27761
+ name: COMPONENT_NAME$1H,
27762
27762
  props: props$19,
27763
27763
  setup(props2, context) {
27764
27764
  return () => vue.h(() => {
@@ -27766,9 +27766,9 @@
27766
27766
  });
27767
27767
  }
27768
27768
  });
27769
- const COMPONENT_NAME$1E = "vc-message";
27769
+ const COMPONENT_NAME$1G = "vc-message";
27770
27770
  const MessageView = /* @__PURE__ */ vue.defineComponent({
27771
- name: COMPONENT_NAME$1E,
27771
+ name: COMPONENT_NAME$1G,
27772
27772
  emits: ["before-close", "close", "portal-fulfilled"],
27773
27773
  props: props$1a,
27774
27774
  setup(props2, {
@@ -27911,7 +27911,7 @@
27911
27911
  return this.target.finally(callback);
27912
27912
  }
27913
27913
  }
27914
- const COMPONENT_NAME$1D = "vc-portal";
27914
+ const COMPONENT_NAME$1F = "vc-portal";
27915
27915
  class Portal {
27916
27916
  /**
27917
27917
  * 清理Portals类型组件
@@ -27963,7 +27963,7 @@
27963
27963
  this.wrapper = wrapper;
27964
27964
  this.globalOptions = {
27965
27965
  ...options,
27966
- name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1D)
27966
+ name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1F)
27967
27967
  };
27968
27968
  }
27969
27969
  popup(propsData, options) {
@@ -28062,7 +28062,7 @@
28062
28062
  ...rest
28063
28063
  } = options;
28064
28064
  let useAllNodes = fragment;
28065
- const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1D)}` : name$;
28065
+ const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1F)}` : name$;
28066
28066
  const container = document.createElement(tag);
28067
28067
  const root = typeof el2 === "object" ? el2 : document.querySelector(el2 || "body");
28068
28068
  !alive && Portal.leafs.get(name)?.destroy();
@@ -28096,7 +28096,7 @@
28096
28096
  } else {
28097
28097
  const wrapper = this.wrapper;
28098
28098
  const app = vue.createApp({
28099
- name: COMPONENT_NAME$1D,
28099
+ name: COMPONENT_NAME$1F,
28100
28100
  parent,
28101
28101
  setup() {
28102
28102
  if (alive) {
@@ -28206,9 +28206,9 @@
28206
28206
  default: "div"
28207
28207
  }
28208
28208
  };
28209
- const COMPONENT_NAME$1C = "vc-portal-view";
28209
+ const COMPONENT_NAME$1E = "vc-portal-view";
28210
28210
  const PortalView = /* @__PURE__ */ vue.defineComponent({
28211
- name: COMPONENT_NAME$1C,
28211
+ name: COMPONENT_NAME$1E,
28212
28212
  props: props$18,
28213
28213
  setup(props2, {
28214
28214
  slots
@@ -28371,9 +28371,9 @@
28371
28371
  };
28372
28372
  return () => vue.h(props2.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
28373
28373
  };
28374
- const COMPONENT_NAME$1B = "vc-clipboard";
28374
+ const COMPONENT_NAME$1D = "vc-clipboard";
28375
28375
  const Clipboard$1 = vue.defineComponent({
28376
- name: COMPONENT_NAME$1B,
28376
+ name: COMPONENT_NAME$1D,
28377
28377
  props: props$17,
28378
28378
  setup() {
28379
28379
  return useClipboard((content) => Message.success({ content }));
@@ -28405,9 +28405,9 @@
28405
28405
  const MTransitionScale = TransitionScale;
28406
28406
  const MTransitionSlide = TransitionSlide;
28407
28407
  const MTransitionZoom = TransitionZoom;
28408
- const COMPONENT_NAME$1A = "vcm-toast";
28408
+ const COMPONENT_NAME$1C = "vcm-toast";
28409
28409
  const MToastView = /* @__PURE__ */ vue.defineComponent({
28410
- name: COMPONENT_NAME$1A,
28410
+ name: COMPONENT_NAME$1C,
28411
28411
  emits: ["close", "portal-fulfilled"],
28412
28412
  props: props$16,
28413
28413
  setup(props2, {
@@ -28506,9 +28506,9 @@
28506
28506
  const warning$2 = create$3({ mode: "warning" });
28507
28507
  const error$2 = create$3({ mode: "error" });
28508
28508
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
28509
- const COMPONENT_NAME$1z = "vcm-clipboard";
28509
+ const COMPONENT_NAME$1B = "vcm-clipboard";
28510
28510
  const MClipboard$1 = vue.defineComponent({
28511
- name: COMPONENT_NAME$1z,
28511
+ name: COMPONENT_NAME$1B,
28512
28512
  props: props$17,
28513
28513
  setup() {
28514
28514
  return useClipboard((content) => MToast.info({ content }));
@@ -28537,9 +28537,9 @@
28537
28537
  default: false
28538
28538
  }
28539
28539
  };
28540
- const COMPONENT_NAME$1y = "vc-collapse";
28540
+ const COMPONENT_NAME$1A = "vc-collapse";
28541
28541
  const Collapse = vue.defineComponent({
28542
- name: COMPONENT_NAME$1y,
28542
+ name: COMPONENT_NAME$1A,
28543
28543
  props: props$15,
28544
28544
  emits: ["update:moodelValue", "change"],
28545
28545
  setup(props2, { slots, emit }) {
@@ -28648,12 +28648,12 @@
28648
28648
  default: true
28649
28649
  }
28650
28650
  };
28651
- function _isSlot$3(s) {
28651
+ function _isSlot$2(s) {
28652
28652
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
28653
28653
  }
28654
- const COMPONENT_NAME$1x = "vc-expand";
28654
+ const COMPONENT_NAME$1z = "vc-expand";
28655
28655
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
28656
- name: COMPONENT_NAME$1x,
28656
+ name: COMPONENT_NAME$1z,
28657
28657
  props: props$13,
28658
28658
  setup(props2, {
28659
28659
  slots
@@ -28672,7 +28672,7 @@
28672
28672
  enter: 200,
28673
28673
  leave: 200
28674
28674
  }
28675
- }, _isSlot$3(_slot = vue.withDirectives(vue.createVNode(Content, null, {
28675
+ }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
28676
28676
  default: () => [(props2.alive || !props2.alive && isActive.value) && slots.default?.()]
28677
28677
  }), [[vue.vShow, isActive.value]])) ? _slot : {
28678
28678
  default: () => [_slot]
@@ -28680,9 +28680,9 @@
28680
28680
  };
28681
28681
  }
28682
28682
  });
28683
- const COMPONENT_NAME$1w = "vc-collapse-item";
28683
+ const COMPONENT_NAME$1y = "vc-collapse-item";
28684
28684
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
28685
- name: COMPONENT_NAME$1w,
28685
+ name: COMPONENT_NAME$1y,
28686
28686
  props: props$14,
28687
28687
  setup(props2, {
28688
28688
  slots,
@@ -28752,9 +28752,9 @@
28752
28752
  default: "div"
28753
28753
  }
28754
28754
  };
28755
- const COMPONENT_NAME$1v = "vc-color-picker";
28755
+ const COMPONENT_NAME$1x = "vc-color-picker";
28756
28756
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
28757
- name: COMPONENT_NAME$1v,
28757
+ name: COMPONENT_NAME$1x,
28758
28758
  props: props$12,
28759
28759
  setup(props2, {
28760
28760
  slots
@@ -28773,9 +28773,9 @@
28773
28773
  default: "div"
28774
28774
  }
28775
28775
  };
28776
- const COMPONENT_NAME$1u = "vc-countdown";
28776
+ const COMPONENT_NAME$1w = "vc-countdown";
28777
28777
  const Countdown = /* @__PURE__ */ vue.defineComponent({
28778
- name: COMPONENT_NAME$1u,
28778
+ name: COMPONENT_NAME$1w,
28779
28779
  props: props$11,
28780
28780
  setup(props2, {
28781
28781
  slots
@@ -29213,9 +29213,9 @@
29213
29213
  expose?.(exposed);
29214
29214
  return exposed;
29215
29215
  };
29216
- const COMPONENT_NAME$1t = "vc-input";
29216
+ const COMPONENT_NAME$1v = "vc-input";
29217
29217
  const Input = /* @__PURE__ */ vue.defineComponent({
29218
- name: COMPONENT_NAME$1t,
29218
+ name: COMPONENT_NAME$1v,
29219
29219
  inheritAttrs: false,
29220
29220
  props: {
29221
29221
  ...props$$,
@@ -29228,7 +29228,8 @@
29228
29228
  emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "paste", "keydown", "keypress", "keyup", "enter", "tip"],
29229
29229
  setup(props2, {
29230
29230
  slots,
29231
- expose
29231
+ expose,
29232
+ attrs
29232
29233
  }) {
29233
29234
  const input = vue.ref();
29234
29235
  useNativeEmitter(input, expose);
@@ -29296,9 +29297,9 @@
29296
29297
  }, classes.value]
29297
29298
  }, [slots.prepend?.() || props2.prepend && vue.createVNode(Icon, {
29298
29299
  "type": props2.prepend
29299
- }, null)]), vue.createVNode("div", {
29300
+ }, null)]), vue.createVNode("div", vue.mergeProps({
29300
29301
  "class": ["vc-input__content", classes.value]
29301
- }, [slots.content?.() || renderInput(false)]), !props2.disabled && props2.clearable && vue.createVNode(TransitionFade, null, {
29302
+ }, slots.content ? it.value.listeners : {}), [slots.content ? slots.content() : renderInput(false)]), !props2.disabled && props2.clearable && vue.createVNode(TransitionFade, null, {
29302
29303
  default: () => [vue.createVNode(Icon, {
29303
29304
  "class": "vc-input__icon-clear",
29304
29305
  "type": "clear",
@@ -29545,9 +29546,9 @@
29545
29546
  handleStepper
29546
29547
  };
29547
29548
  };
29548
- const COMPONENT_NAME$1s = "vc-input-number";
29549
+ const COMPONENT_NAME$1u = "vc-input-number";
29549
29550
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
29550
- name: COMPONENT_NAME$1s,
29551
+ name: COMPONENT_NAME$1u,
29551
29552
  props: props$X,
29552
29553
  inheritAttrs: false,
29553
29554
  setup(props2, {
@@ -29607,9 +29608,9 @@
29607
29608
  default: true
29608
29609
  }
29609
29610
  };
29610
- const COMPONENT_NAME$1r = "vc-input-search";
29611
+ const COMPONENT_NAME$1t = "vc-input-search";
29611
29612
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
29612
- name: COMPONENT_NAME$1r,
29613
+ name: COMPONENT_NAME$1t,
29613
29614
  props: props$W,
29614
29615
  inheritAttrs: false,
29615
29616
  setup(props2, {
@@ -29893,12 +29894,9 @@
29893
29894
  getRect
29894
29895
  };
29895
29896
  };
29896
- function _isSlot$2(s) {
29897
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
29898
- }
29899
- const COMPONENT_NAME$1q = "vc-popover-wrapper";
29897
+ const COMPONENT_NAME$1s = "vc-popover-wrapper";
29900
29898
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
29901
- name: COMPONENT_NAME$1q,
29899
+ name: COMPONENT_NAME$1s,
29902
29900
  props: props$_,
29903
29901
  emits: ["portal-fulfilled", "close"],
29904
29902
  setup(props2, {
@@ -29958,7 +29956,7 @@
29958
29956
  return container;
29959
29957
  }
29960
29958
  };
29961
- const setPopupStyle = () => {
29959
+ const setPopupStyle = debounce$1(() => {
29962
29960
  if (!vnode.el) return;
29963
29961
  const triggerEl = getHackContainer();
29964
29962
  const {
@@ -29992,7 +29990,10 @@
29992
29990
  wrapperW.value = {
29993
29991
  width: `${triggerEl.getBoundingClientRect().width}px`
29994
29992
  };
29995
- };
29993
+ }, 50, {
29994
+ leading: true,
29995
+ trailing: false
29996
+ });
29996
29997
  let timer;
29997
29998
  let isPressMouse = false;
29998
29999
  const handleTriggerChange = (e) => {
@@ -30036,7 +30037,7 @@
30036
30037
  switch (direction[0]) {
30037
30038
  case "top":
30038
30039
  case "bottom":
30039
- if (left + vnode.el.offsetWidth >= window.innerWidth) {
30040
+ if (left + vnode.el.offsetWidth > window.innerWidth) {
30040
30041
  wrapperStyle.value = {
30041
30042
  ...wrapperStyle.value,
30042
30043
  left: `${window.innerWidth - vnode.el.offsetWidth}px`
@@ -30082,7 +30083,6 @@
30082
30083
  }
30083
30084
  });
30084
30085
  return () => {
30085
- let _slot;
30086
30086
  return vue.createVNode(TransitionScale, {
30087
30087
  "mode": props2.animation || "part",
30088
30088
  "duration": {
@@ -30090,35 +30090,37 @@
30090
30090
  leave: 150
30091
30091
  },
30092
30092
  "onAfterLeave": handleRemove
30093
- }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode("div", {
30094
- "style": [wrapperStyle.value, wrapperW.value, props2.portalStyle],
30095
- "class": [wrapperClasses.value, props2.portalClass, "vc-popover-wrapper"],
30096
- "onMousedown": () => !props2.hover && handleMouseDown(),
30097
- "onMouseenter": (e) => props2.hover && handleChange(e, {
30098
- visible: true
30099
- }),
30100
- "onMouseleave": (e) => props2.hover && handleChange(e, {
30101
- visible: false
30102
- })
30103
- }, [vue.createVNode("div", {
30104
- "class": [themeClasses.value, "vc-popover-wrapper__container"]
30105
- }, [props2.arrow && vue.createVNode("div", {
30106
- "style": arrowStyle.value,
30107
- "class": [themeClasses.value, posClasses.value, "vc-popover-wrapper__arrow"]
30108
- }, null), slots.content ? slots.content() : typeof props2.content === "function" ? vue.createVNode(Customer, {
30109
- "render": props2.content
30110
- }, null) : vue.createVNode("div", {
30111
- "innerHTML": props2.content
30112
- }, null)])]), [[vue.vShow, isActive.value]])) ? _slot : {
30113
- default: () => [_slot]
30093
+ }, {
30094
+ default: () => [vue.withDirectives(vue.createVNode("div", {
30095
+ "style": [wrapperStyle.value, wrapperW.value, props2.portalStyle],
30096
+ "class": [wrapperClasses.value, props2.portalClass, "vc-popover-wrapper"],
30097
+ "onMousedown": () => !props2.hover && handleMouseDown(),
30098
+ "onMouseenter": (e) => props2.hover && handleChange(e, {
30099
+ visible: true
30100
+ }),
30101
+ "onMouseleave": (e) => props2.hover && handleChange(e, {
30102
+ visible: false
30103
+ })
30104
+ }, [vue.createVNode("div", {
30105
+ "class": [themeClasses.value, "vc-popover-wrapper__container"]
30106
+ }, [props2.arrow && vue.createVNode("div", {
30107
+ "style": arrowStyle.value,
30108
+ "class": [themeClasses.value, posClasses.value, "vc-popover-wrapper__arrow"]
30109
+ }, null), slots.content ? slots.content() : typeof props2.content === "function" ? vue.createVNode(Customer, {
30110
+ "render": props2.content
30111
+ }, null) : vue.createVNode("div", {
30112
+ "innerHTML": props2.content
30113
+ }, null)])]), [[vue.vShow, isActive.value]])]
30114
30114
  });
30115
30115
  };
30116
30116
  }
30117
30117
  });
30118
- const PopoverPortal = new Portal(PopoverWrapper);
30119
- const COMPONENT_NAME$1p = "vc-popover";
30118
+ const PopoverPortal = new Portal(PopoverWrapper, {
30119
+ leaveDelay: 0
30120
+ });
30121
+ const COMPONENT_NAME$1r = "vc-popover";
30120
30122
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
30121
- name: COMPONENT_NAME$1p,
30123
+ name: COMPONENT_NAME$1r,
30122
30124
  props: props$Z,
30123
30125
  emits: ["update:modelValue", "visible-change", "ready", "close"],
30124
30126
  setup(props2, {
@@ -31194,9 +31196,9 @@
31194
31196
  }
31195
31197
  return view;
31196
31198
  };
31197
- const COMPONENT_NAME$1o = "vc-date-confirm";
31199
+ const COMPONENT_NAME$1q = "vc-date-confirm";
31198
31200
  const Confirm = /* @__PURE__ */ vue.defineComponent({
31199
- name: COMPONENT_NAME$1o,
31201
+ name: COMPONENT_NAME$1q,
31200
31202
  props: {
31201
31203
  showTime: {
31202
31204
  type: Boolean,
@@ -31257,9 +31259,9 @@
31257
31259
  };
31258
31260
  }
31259
31261
  });
31260
- const COMPONENT_NAME$1n = "vc-date-header";
31262
+ const COMPONENT_NAME$1p = "vc-date-header";
31261
31263
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
31262
- name: COMPONENT_NAME$1n,
31264
+ name: COMPONENT_NAME$1p,
31263
31265
  props: {
31264
31266
  panelDate: Date,
31265
31267
  showNext: {
@@ -31340,9 +31342,9 @@
31340
31342
  };
31341
31343
  }
31342
31344
  });
31343
- const COMPONENT_NAME$1m = "vc-date-table";
31345
+ const COMPONENT_NAME$1o = "vc-date-table";
31344
31346
  const DateTable = /* @__PURE__ */ vue.defineComponent({
31345
- name: COMPONENT_NAME$1m,
31347
+ name: COMPONENT_NAME$1o,
31346
31348
  props: {
31347
31349
  value: Array,
31348
31350
  firstDayOfWeek: {
@@ -31542,9 +31544,9 @@
31542
31544
  };
31543
31545
  }
31544
31546
  });
31545
- const COMPONENT_NAME$1l = "vc-month-table";
31547
+ const COMPONENT_NAME$1n = "vc-month-table";
31546
31548
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
31547
- name: COMPONENT_NAME$1l,
31549
+ name: COMPONENT_NAME$1n,
31548
31550
  props: {
31549
31551
  value: Array,
31550
31552
  panelDate: Date,
@@ -31670,7 +31672,7 @@
31670
31672
  };
31671
31673
  }
31672
31674
  });
31673
- const COMPONENT_NAME$1k = "vc-quarter-table";
31675
+ const COMPONENT_NAME$1m = "vc-quarter-table";
31674
31676
  const getMonthRange = (panelDate, quarter) => {
31675
31677
  const year = panelDate.getFullYear();
31676
31678
  const [startMonth, endMonth] = [quarter * 3, quarter * 3 + 2];
@@ -31697,7 +31699,7 @@
31697
31699
  }
31698
31700
  };
31699
31701
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
31700
- name: COMPONENT_NAME$1k,
31702
+ name: COMPONENT_NAME$1m,
31701
31703
  props: {
31702
31704
  value: Array,
31703
31705
  panelDate: Date,
@@ -31815,9 +31817,9 @@
31815
31817
  };
31816
31818
  }
31817
31819
  });
31818
- const COMPONENT_NAME$1j = "vc-shortcuts-select";
31820
+ const COMPONENT_NAME$1l = "vc-shortcuts-select";
31819
31821
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
31820
- name: COMPONENT_NAME$1j,
31822
+ name: COMPONENT_NAME$1l,
31821
31823
  props: {
31822
31824
  panelDate: Date,
31823
31825
  config: Array,
@@ -31854,9 +31856,9 @@
31854
31856
  };
31855
31857
  }
31856
31858
  });
31857
- const COMPONENT_NAME$1i = "vc-time-select";
31859
+ const COMPONENT_NAME$1k = "vc-time-select";
31858
31860
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
31859
- name: COMPONENT_NAME$1i,
31861
+ name: COMPONENT_NAME$1k,
31860
31862
  props: {
31861
31863
  hours: {
31862
31864
  type: [Number, String],
@@ -32131,9 +32133,9 @@
32131
32133
  };
32132
32134
  }
32133
32135
  });
32134
- const COMPONENT_NAME$1h = "vc-year-table";
32136
+ const COMPONENT_NAME$1j = "vc-year-table";
32135
32137
  const YearTable = /* @__PURE__ */ vue.defineComponent({
32136
- name: COMPONENT_NAME$1h,
32138
+ name: COMPONENT_NAME$1j,
32137
32139
  props: {
32138
32140
  value: Array,
32139
32141
  panelDate: Date,
@@ -32249,9 +32251,9 @@
32249
32251
  }
32250
32252
  return true;
32251
32253
  };
32252
- const COMPONENT_NAME$1g = "vc-date-range-panel";
32254
+ const COMPONENT_NAME$1i = "vc-date-range-panel";
32253
32255
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
32254
- name: COMPONENT_NAME$1g,
32256
+ name: COMPONENT_NAME$1i,
32255
32257
  props: {
32256
32258
  ...props$V,
32257
32259
  confirm: {
@@ -32612,9 +32614,9 @@
32612
32614
  };
32613
32615
  }
32614
32616
  });
32615
- const COMPONENT_NAME$1f = "vc-date-panel";
32617
+ const COMPONENT_NAME$1h = "vc-date-panel";
32616
32618
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
32617
- name: COMPONENT_NAME$1f,
32619
+ name: COMPONENT_NAME$1h,
32618
32620
  props: {
32619
32621
  ...props$V,
32620
32622
  type: String,
@@ -32813,9 +32815,9 @@
32813
32815
  const endYear = value[1].getFullYear();
32814
32816
  return startYear === endYear;
32815
32817
  };
32816
- const COMPONENT_NAME$1e = "vc-monthrange-panel";
32818
+ const COMPONENT_NAME$1g = "vc-monthrange-panel";
32817
32819
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
32818
- name: COMPONENT_NAME$1e,
32820
+ name: COMPONENT_NAME$1g,
32819
32821
  props: {
32820
32822
  ...props$V,
32821
32823
  confirm: {
@@ -32985,9 +32987,9 @@
32985
32987
  const endYear = value[1].getFullYear();
32986
32988
  return startYear === endYear;
32987
32989
  };
32988
- const COMPONENT_NAME$1d = "vc-quarterrange-panel";
32990
+ const COMPONENT_NAME$1f = "vc-quarterrange-panel";
32989
32991
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
32990
- name: COMPONENT_NAME$1d,
32992
+ name: COMPONENT_NAME$1f,
32991
32993
  props: {
32992
32994
  ...props$V,
32993
32995
  confirm: {
@@ -33218,9 +33220,9 @@
33218
33220
  seconds
33219
33221
  };
33220
33222
  };
33221
- const COMPONENT_NAME$1c = "vc-timerange-panel";
33223
+ const COMPONENT_NAME$1e = "vc-timerange-panel";
33222
33224
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
33223
- name: COMPONENT_NAME$1c,
33225
+ name: COMPONENT_NAME$1e,
33224
33226
  props: props$U,
33225
33227
  emits: ["pick", "clear", "ok"],
33226
33228
  setup(props2, {
@@ -33316,9 +33318,9 @@
33316
33318
  };
33317
33319
  }
33318
33320
  });
33319
- const COMPONENT_NAME$1b = "vc-time-panel";
33321
+ const COMPONENT_NAME$1d = "vc-time-panel";
33320
33322
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
33321
- name: COMPONENT_NAME$1b,
33323
+ name: COMPONENT_NAME$1d,
33322
33324
  props: props$U,
33323
33325
  emits: ["pick", "clear", "ok"],
33324
33326
  setup(props2, {
@@ -33369,7 +33371,7 @@
33369
33371
  };
33370
33372
  }
33371
33373
  });
33372
- const COMPONENT_NAME$1a = "vc-date-picker";
33374
+ const COMPONENT_NAME$1c = "vc-date-picker";
33373
33375
  const getPanel$1 = (type) => {
33374
33376
  if (["daterange", "datetimerange"].includes(type)) {
33375
33377
  return DateRangePanel;
@@ -33380,7 +33382,7 @@
33380
33382
  }
33381
33383
  return DatePanel;
33382
33384
  };
33383
- const DatePicker = createPicker(COMPONENT_NAME$1a, props$10, () => {
33385
+ const DatePicker = createPicker(COMPONENT_NAME$1c, props$10, () => {
33384
33386
  const props2 = vue.getCurrentInstance().props;
33385
33387
  const icon = vue.ref("date");
33386
33388
  const panel = vue.shallowRef({});
@@ -33408,9 +33410,9 @@
33408
33410
  default: "div"
33409
33411
  }
33410
33412
  };
33411
- const COMPONENT_NAME$19 = "vc-divider";
33413
+ const COMPONENT_NAME$1b = "vc-divider";
33412
33414
  const Divider = /* @__PURE__ */ vue.defineComponent({
33413
- name: COMPONENT_NAME$19,
33415
+ name: COMPONENT_NAME$1b,
33414
33416
  props: props$T,
33415
33417
  setup(props2, {
33416
33418
  slots
@@ -33557,7 +33559,7 @@
33557
33559
  barTo: props$R.to,
33558
33560
  ...pick(props$R, barKeys)
33559
33561
  };
33560
- const COMPONENT_NAME$18 = "vc-scroller-track";
33562
+ const COMPONENT_NAME$1a = "vc-scroller-track";
33561
33563
  const BAR_MAP = {
33562
33564
  vertical: {
33563
33565
  scroll: "scrollTop",
@@ -33577,7 +33579,7 @@
33577
33579
  }
33578
33580
  };
33579
33581
  const Track$1 = /* @__PURE__ */ vue.defineComponent({
33580
- name: COMPONENT_NAME$18,
33582
+ name: COMPONENT_NAME$1a,
33581
33583
  props: props$S,
33582
33584
  emits: ["change"],
33583
33585
  inheritAttrs: false,
@@ -33739,9 +33741,9 @@
33739
33741
  };
33740
33742
  }
33741
33743
  });
33742
- const COMPONENT_NAME$17 = "vc-scroller-bar";
33744
+ const COMPONENT_NAME$19 = "vc-scroller-bar";
33743
33745
  const Bar = /* @__PURE__ */ vue.defineComponent({
33744
- name: COMPONENT_NAME$17,
33746
+ name: COMPONENT_NAME$19,
33745
33747
  props: props$R,
33746
33748
  emits: ["change"],
33747
33749
  setup(props2, {
@@ -33952,9 +33954,9 @@
33952
33954
  refreshPosition
33953
33955
  };
33954
33956
  };
33955
- const COMPONENT_NAME$16 = "vc-scroller";
33957
+ const COMPONENT_NAME$18 = "vc-scroller";
33956
33958
  const Scroller = /* @__PURE__ */ vue.defineComponent({
33957
- name: COMPONENT_NAME$16,
33959
+ name: COMPONENT_NAME$18,
33958
33960
  props: props$Q,
33959
33961
  emits: ["scroll"],
33960
33962
  setup(props2, {
@@ -34012,9 +34014,9 @@
34012
34014
  };
34013
34015
  }
34014
34016
  });
34015
- const COMPONENT_NAME$15 = "vc-scroller-wheel";
34017
+ const COMPONENT_NAME$17 = "vc-scroller-wheel";
34016
34018
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
34017
- name: COMPONENT_NAME$15,
34019
+ name: COMPONENT_NAME$17,
34018
34020
  props: Object.assign(props$Q, {
34019
34021
  stopPropagation: {
34020
34022
  type: Boolean,
@@ -34195,9 +34197,9 @@
34195
34197
  type: Function
34196
34198
  }
34197
34199
  };
34198
- const COMPONENT_NAME$14 = "vc-drawer";
34200
+ const COMPONENT_NAME$16 = "vc-drawer";
34199
34201
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
34200
- name: COMPONENT_NAME$14,
34202
+ name: COMPONENT_NAME$16,
34201
34203
  props: props$P,
34202
34204
  emits: ["close", "update:modelValue", "visible-change"],
34203
34205
  setup(props2, {
@@ -34351,26 +34353,164 @@
34351
34353
  const MDrawer = Drawer;
34352
34354
  const MDrawerView = DrawerView;
34353
34355
  const props$O = {
34354
- tag: {
34356
+ modelValue: {
34357
+ type: Boolean,
34358
+ default: false
34359
+ },
34360
+ portalClass: [String, Object],
34361
+ placement: {
34355
34362
  type: String,
34356
- default: "div"
34363
+ default: "bottom"
34364
+ },
34365
+ trigger: {
34366
+ type: String,
34367
+ default: "hover"
34368
+ },
34369
+ arrow: {
34370
+ type: Boolean,
34371
+ default: false
34357
34372
  }
34358
34373
  };
34359
- const COMPONENT_NAME$13 = "vc-dropdown";
34374
+ const COMPONENT_NAME$15 = "vc-dropdown";
34360
34375
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
34361
- name: COMPONENT_NAME$13,
34376
+ name: COMPONENT_NAME$15,
34362
34377
  props: props$O,
34378
+ inheritAttrs: false,
34379
+ emits: ["update:modelValue", "ready", "close", "visible-change", "click"],
34363
34380
  setup(props2, {
34381
+ slots,
34382
+ emit,
34383
+ expose
34384
+ }) {
34385
+ const its = useAttrs({
34386
+ merge: false
34387
+ });
34388
+ const isActive = vue.ref(false);
34389
+ const dropdownId = vue.ref(getUid("dropdown"));
34390
+ const inherit = vue.computed(() => {
34391
+ return {
34392
+ style: its.value.style,
34393
+ class: its.value.class
34394
+ };
34395
+ });
34396
+ const attrs = vue.computed(() => {
34397
+ return its.value.attrs;
34398
+ });
34399
+ vue.watch(() => props2.modelValue, (v) => {
34400
+ isActive.value = v;
34401
+ }, {
34402
+ immediate: true
34403
+ });
34404
+ const sync = () => {
34405
+ emit("update:modelValue", isActive.value);
34406
+ emit("visible-change", isActive.value);
34407
+ };
34408
+ const handleChange = (v) => {
34409
+ isActive.value = v;
34410
+ sync();
34411
+ };
34412
+ const close = () => {
34413
+ isActive.value = false;
34414
+ sync();
34415
+ };
34416
+ expose({
34417
+ close,
34418
+ dropdownId
34419
+ });
34420
+ return () => {
34421
+ return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
34422
+ "modelValue": isActive.value,
34423
+ "placement": props2.placement,
34424
+ "trigger": props2.trigger,
34425
+ "arrow": props2.arrow,
34426
+ "portalClass": ["is-padding-none", "vc-dropdown-wrapper", props2.portalClass],
34427
+ "class": ["vc-dropdown", inherit.value.class],
34428
+ "style": inherit.value.style,
34429
+ "onReady": () => emit("ready"),
34430
+ "onClose": () => emit("close"),
34431
+ "onVisibleChange": handleChange
34432
+ }), {
34433
+ default: () => slots?.default?.(),
34434
+ content: () => slots?.content?.()
34435
+ });
34436
+ };
34437
+ }
34438
+ });
34439
+ const COMPONENT_NAME$14 = "vc-dropdown-menu";
34440
+ const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
34441
+ name: COMPONENT_NAME$14,
34442
+ setup(_, {
34364
34443
  slots
34365
34444
  }) {
34366
34445
  return () => {
34367
- return vue.createVNode("div", {
34368
- "class": "vc-dropdown"
34446
+ return vue.createVNode("ul", {
34447
+ "class": "vc-dropdown-menu"
34369
34448
  }, [slots?.default?.()]);
34370
34449
  };
34371
34450
  }
34372
34451
  });
34452
+ const COMPONENT_NAME$13 = "vc-dropdown-item";
34453
+ const DropdownItem = /* @__PURE__ */ vue.defineComponent({
34454
+ name: COMPONENT_NAME$13,
34455
+ props: {
34456
+ value: {
34457
+ type: [String, Number],
34458
+ value: void 0
34459
+ },
34460
+ label: {
34461
+ type: [String, Number],
34462
+ value: void 0
34463
+ },
34464
+ disabled: {
34465
+ type: Boolean,
34466
+ default: false
34467
+ },
34468
+ selected: {
34469
+ type: Boolean,
34470
+ default: false
34471
+ },
34472
+ divided: {
34473
+ type: Boolean,
34474
+ default: false
34475
+ },
34476
+ closable: {
34477
+ type: Boolean,
34478
+ default: true
34479
+ }
34480
+ },
34481
+ setup(props2, {
34482
+ slots,
34483
+ emit
34484
+ }) {
34485
+ const owner = getInstance$1("dropdown", "dropdownId");
34486
+ const currentValue = vue.computed(() => {
34487
+ const v = typeof props2.value === "undefined" || props2.value === "" ? props2.label : props2.value;
34488
+ return v;
34489
+ });
34490
+ const classes = vue.computed(() => {
34491
+ return {
34492
+ "is-selected": props2.selected,
34493
+ "is-divided": props2.divided,
34494
+ "is-disabled": props2.disabled
34495
+ };
34496
+ });
34497
+ const handleClick = (e) => {
34498
+ if (props2.disabled) return;
34499
+ emit("click", currentValue.value, e);
34500
+ owner.emit("click", currentValue.value, e);
34501
+ props2.closable && owner.exposed?.close();
34502
+ };
34503
+ return () => {
34504
+ return vue.createVNode("li", {
34505
+ "class": [classes.value, "vc-dropdown-item"],
34506
+ "onClick": handleClick
34507
+ }, [slots.default ? slots.default?.() : props2.label]);
34508
+ };
34509
+ }
34510
+ });
34373
34511
  const MDropdown = Dropdown;
34512
+ const MDropdownMenu = DropdownMenu;
34513
+ const MDropdownItem = DropdownItem;
34374
34514
  const props$N = {
34375
34515
  tag: {
34376
34516
  type: String,
@@ -35969,6 +36109,9 @@
35969
36109
  type: Boolean,
35970
36110
  default: false
35971
36111
  },
36112
+ // draggable为true时有效
36113
+ x: Number,
36114
+ y: Number,
35972
36115
  okText: {
35973
36116
  type: [String, Boolean],
35974
36117
  default: "确定"
@@ -36022,8 +36165,8 @@
36022
36165
  const header = vue.shallowRef();
36023
36166
  const scroller = vue.shallowRef();
36024
36167
  const resizer = vue.shallowRef();
36025
- const x = vue.ref(0);
36026
- const y = vue.ref(0);
36168
+ const x = vue.ref(props2.x);
36169
+ const y = vue.ref(props2.y);
36027
36170
  const isActive = vue.ref(false);
36028
36171
  const MAX_HEIGHT2 = IS_SERVER$3 ? 0 : window.innerHeight - 20;
36029
36172
  const MAX_WIDTH2 = IS_SERVER$3 ? 0 : window.innerWidth - 20;
@@ -36063,8 +36206,8 @@
36063
36206
  });
36064
36207
  const draggableStyle = vue.computed(() => {
36065
36208
  if (IS_SERVER$3 || !props2.draggable) return {};
36066
- const left = x.value || window.innerWidth / 2 - defaultSize.value.width / 2;
36067
- const top = y.value || window.innerHeight / 2 - defaultSize.value.height / 2;
36209
+ const left = typeof x.value === "undefined" ? window.innerWidth / 2 - defaultSize.value.width / 2 : x.value;
36210
+ const top = typeof y.value === "undefined" ? window.innerHeight / 2 - defaultSize.value.height / 2 : y.value;
36068
36211
  return {
36069
36212
  left: `${left}px`,
36070
36213
  top: `${top}px`
@@ -37547,22 +37690,171 @@
37547
37690
  });
37548
37691
  const MPicker = Picker;
37549
37692
  const props$p = {
37550
- tag: {
37693
+ title: {
37694
+ type: [String, Function],
37695
+ default: ""
37696
+ },
37697
+ content: {
37698
+ type: [String, Function],
37699
+ default: ""
37700
+ },
37701
+ modelValue: {
37702
+ type: Boolean,
37703
+ default: false
37704
+ },
37705
+ placement: {
37551
37706
  type: String,
37552
- default: "div"
37553
- }
37707
+ default: "top"
37708
+ },
37709
+ trigger: {
37710
+ type: String,
37711
+ default: "click"
37712
+ },
37713
+ okText: {
37714
+ type: String,
37715
+ default: "确定"
37716
+ },
37717
+ cancelText: {
37718
+ type: String,
37719
+ default: "取消"
37720
+ },
37721
+ okType: {
37722
+ type: String,
37723
+ default: "primary"
37724
+ },
37725
+ cancelType: {
37726
+ type: String,
37727
+ default: "default"
37728
+ },
37729
+ type: {
37730
+ type: String,
37731
+ default: "warning",
37732
+ validator: (v) => /(warning|info|success|error)/.test(v)
37733
+ },
37734
+ width: [String, Number],
37735
+ portalClass: [String, Object]
37554
37736
  };
37555
37737
  const COMPONENT_NAME$C = "vc-popconfirm";
37556
37738
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
37557
37739
  name: COMPONENT_NAME$C,
37558
37740
  props: props$p,
37741
+ inheritAttrs: false,
37742
+ emits: ["update:modelValue", "visible-change", "ready", "close", "cancel", "ok"],
37559
37743
  setup(props2, {
37560
- slots
37744
+ slots,
37745
+ emit
37561
37746
  }) {
37747
+ const instance = vue.getCurrentInstance();
37748
+ const its = useAttrs({
37749
+ merge: false
37750
+ });
37751
+ const isActive = vue.ref(false);
37752
+ const contentStyle = vue.computed(() => {
37753
+ return props2.content || !!slots.content ? {
37754
+ marginBottom: "15px"
37755
+ } : {};
37756
+ });
37757
+ const inherit = vue.computed(() => {
37758
+ return {
37759
+ style: its.value.style,
37760
+ class: its.value.class
37761
+ };
37762
+ });
37763
+ const attrs = vue.computed(() => {
37764
+ return its.value.attrs;
37765
+ });
37766
+ vue.watch(() => props2.modelValue, (v) => {
37767
+ isActive.value = v;
37768
+ }, {
37769
+ immediate: true
37770
+ });
37771
+ const sync = () => {
37772
+ emit("update:modelValue", isActive.value);
37773
+ emit("visible-change", isActive.value);
37774
+ };
37775
+ const handleBefore = (e, hook) => {
37776
+ e.stopPropagation();
37777
+ e.preventDefault();
37778
+ if (!isActive.value) return;
37779
+ const fn = hook && hook(e);
37780
+ if (fn && fn.then) {
37781
+ return fn.then((res) => {
37782
+ isActive.value = false;
37783
+ sync();
37784
+ return res;
37785
+ });
37786
+ } else if (!fn || fn === true) {
37787
+ isActive.value = false;
37788
+ sync();
37789
+ }
37790
+ };
37791
+ const handleOk = (...rest) => {
37792
+ const ok = instance.vnode.props?.onOk || (() => {
37793
+ });
37794
+ return ok(...rest);
37795
+ };
37796
+ const handleCancel = (...rest) => {
37797
+ const cancel = instance.vnode.props?.onCancel || (() => {
37798
+ });
37799
+ return cancel(...rest);
37800
+ };
37801
+ const handleChange = (v) => {
37802
+ isActive.value = v;
37803
+ sync();
37804
+ };
37562
37805
  return () => {
37563
- return vue.createVNode("div", {
37564
- "class": "vc-popconfirm"
37565
- }, [slots?.default?.()]);
37806
+ return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
37807
+ "modelValue": isActive.value,
37808
+ "placement": props2.placement,
37809
+ "trigger": props2.trigger,
37810
+ "portalClass": ["is-padding-none", "vc-popconfirm-wrapper", props2.portalClass],
37811
+ "class": ["vc-popconfirm", inherit.value.class],
37812
+ "style": inherit.value.style,
37813
+ "onReady": () => emit("ready"),
37814
+ "onClose": () => emit("close"),
37815
+ "onVisibleChange": handleChange
37816
+ }), {
37817
+ default: () => slots?.default?.(),
37818
+ content: () => {
37819
+ return vue.createVNode("div", {
37820
+ "style": [{
37821
+ width: `${props2.width}px`
37822
+ }],
37823
+ "class": "vc-popconfirm__wrapper"
37824
+ }, [vue.createVNode("div", {
37825
+ "class": "vc-popconfirm__title"
37826
+ }, [slots.icon ? slots.icon() : vue.createVNode(Icon, {
37827
+ "type": props2.type,
37828
+ "class": [`is-${props2.type}`, "vc-popconfirm__icon"]
37829
+ }, null), vue.createVNode("div", null, [slots.title ? slots.title() : typeof props2.title === "string" ? vue.createVNode("div", {
37830
+ "innerHTML": props2.title
37831
+ }, null) : typeof props2.title === "function" ? vue.createVNode(Customer, {
37832
+ "render": props2.title
37833
+ }, null) : null])]), vue.createVNode("div", {
37834
+ "style": contentStyle.value,
37835
+ "class": "vc-popconfirm__content"
37836
+ }, [slots.content ? slots.content() : typeof props2.content === "string" ? vue.createVNode("div", {
37837
+ "innerHTML": props2.content
37838
+ }, null) : typeof props2.content === "function" ? vue.createVNode(Customer, {
37839
+ "render": props2.content
37840
+ }, null) : null]), vue.createVNode("div", {
37841
+ "class": "vc-popconfirm__footer"
37842
+ }, [vue.createVNode(Button, {
37843
+ "type": props2.cancelType,
37844
+ "style": "margin-right: 8px;",
37845
+ "size": "small",
37846
+ "onClick": (e) => handleBefore(e, handleCancel)
37847
+ }, {
37848
+ default: () => [props2.cancelText]
37849
+ }), vue.createVNode(Button, {
37850
+ "type": props2.okType,
37851
+ "size": "small",
37852
+ "onClick": (e) => handleBefore(e, handleOk)
37853
+ }, {
37854
+ default: () => [props2.okText]
37855
+ })])]);
37856
+ }
37857
+ });
37566
37858
  };
37567
37859
  }
37568
37860
  });
@@ -40328,6 +40620,78 @@
40328
40620
  };
40329
40621
  }
40330
40622
  });
40623
+ const HIDDEN_TEXT_STYLE = `
40624
+ position: absolute!important;
40625
+ word-break: break-all!important;
40626
+ overflow: auto!important;
40627
+ opacity: 1!important;
40628
+ z-index: -1000!important;
40629
+ top: 0!important;
40630
+ right: 100px!important;
40631
+ `;
40632
+ const SIZING_STYLE$1 = [
40633
+ "letter-spacing",
40634
+ "line-height",
40635
+ "padding-top",
40636
+ "padding-bottom",
40637
+ "font-family",
40638
+ "font-weight",
40639
+ "font-size",
40640
+ "text-rendering",
40641
+ "text-transform",
40642
+ "width",
40643
+ // 'text-indent', // 需要额外计算
40644
+ "padding-left",
40645
+ "padding-right",
40646
+ "border-width",
40647
+ "box-sizing"
40648
+ ];
40649
+ let hiddenEl$1;
40650
+ const getFitIndex = (options = {}) => {
40651
+ const { el: el2, line, value, suffix, indent = 0 } = options;
40652
+ let lineHeight = parseInt(getStyle$1(el2, "line-height"), 10);
40653
+ if (!hiddenEl$1) {
40654
+ hiddenEl$1 = document.createElement("div");
40655
+ document.body.appendChild(hiddenEl$1);
40656
+ }
40657
+ el2.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el2.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
40658
+ const {
40659
+ paddingSize,
40660
+ borderSize,
40661
+ boxSizing,
40662
+ sizingStyle
40663
+ } = utils.getComputedStyle(el2, SIZING_STYLE$1);
40664
+ const textIndent = `text-indent: ${parseInt(getStyle$1(el2, "text-indent"), 10) + indent}px;`;
40665
+ hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
40666
+ let sideHeight = paddingSize || 0;
40667
+ boxSizing === "border-box" && (sideHeight += borderSize);
40668
+ if (Number.isNaN(lineHeight)) {
40669
+ hiddenEl$1.innerText = ".";
40670
+ lineHeight = hiddenEl$1.clientHeight - sideHeight;
40671
+ }
40672
+ let endIndex = -1;
40673
+ const strs = (typeof value === "number" ? `${value}` : value || "").split("");
40674
+ let innerText = "";
40675
+ for (let i = 0; i < strs.length; i++) {
40676
+ innerText += strs[i];
40677
+ hiddenEl$1.innerText = innerText;
40678
+ if (endIndex === -1 && hiddenEl$1.clientHeight - sideHeight > lineHeight * line) {
40679
+ endIndex = i;
40680
+ break;
40681
+ }
40682
+ }
40683
+ if (endIndex >= 0 && endIndex <= strs.length - 1) {
40684
+ for (let i = endIndex - 1; i >= 0; i--) {
40685
+ innerText = innerText.substring(0, i);
40686
+ hiddenEl$1.innerText = innerText + suffix;
40687
+ if (hiddenEl$1.clientHeight - sideHeight <= lineHeight * line) {
40688
+ endIndex = i;
40689
+ break;
40690
+ }
40691
+ }
40692
+ }
40693
+ return endIndex;
40694
+ };
40331
40695
  const TableBody = /* @__PURE__ */ vue.defineComponent({
40332
40696
  name: "vc-table-body",
40333
40697
  props: {
@@ -40436,10 +40800,13 @@
40436
40800
  column
40437
40801
  });
40438
40802
  }
40439
- return cellStyle;
40803
+ return {
40804
+ ...cellStyle,
40805
+ ...column.style
40806
+ };
40440
40807
  };
40441
40808
  const getCellClass = (rowIndex, columnIndex, row, column) => {
40442
- const classes = [column.realAlign, column.className];
40809
+ const classes = [column.realAlign, column.class];
40443
40810
  if (isColumnHidden(columnIndex)) {
40444
40811
  classes.push("is-hidden");
40445
40812
  }
@@ -40456,24 +40823,43 @@
40456
40823
  }
40457
40824
  return classes.join(" ");
40458
40825
  };
40459
- const handleCellMouseEnter = (e, row) => {
40826
+ let poper;
40827
+ const handleCellMouseEnter = (e, row, column) => {
40460
40828
  const cell = getCell(e);
40829
+ const hoverState = {
40830
+ cell,
40831
+ column,
40832
+ row
40833
+ };
40461
40834
  if (cell) {
40462
- const column = getColumnByCell(states.columns, cell);
40463
- const hoverState = {
40464
- cell,
40465
- column,
40466
- row
40467
- };
40468
40835
  table.hoverState.value = hoverState;
40469
40836
  table.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, e);
40470
40837
  }
40838
+ const el2 = e.target.querySelector(".vc-table__text-line");
40839
+ if (!el2) return;
40840
+ const value = `${row[column.prop]}`;
40841
+ const endIndex = getFitIndex({
40842
+ el: el2,
40843
+ value,
40844
+ line: column.line,
40845
+ suffix: "..."
40846
+ });
40847
+ if (endIndex > 0 && endIndex < value.length - 1) {
40848
+ poper && poper.destroy();
40849
+ poper = Popover.open({
40850
+ el: document.body,
40851
+ triggerEl: el2,
40852
+ hover: true,
40853
+ alone: true,
40854
+ autoWidth: true,
40855
+ content: value
40856
+ });
40857
+ }
40471
40858
  };
40472
- const handleCellMouseLeave = (e) => {
40859
+ const handleCellMouseLeave = (e, row, column) => {
40473
40860
  const cell = getCell(e);
40474
40861
  if (!cell) return;
40475
- const oldHoverState = table.hoverState.value || {};
40476
- table.emit("cell-mouse-leave", oldHoverState.row, oldHoverState.column, oldHoverState.cell, e);
40862
+ table.emit("cell-mouse-leave", row, column, cell, e);
40477
40863
  };
40478
40864
  const handleMouseEnter = debounce$1((index) => {
40479
40865
  table.store.setHoverRow(index);
@@ -40544,8 +40930,8 @@
40544
40930
  "key": column.id,
40545
40931
  "style": [getCellStyle(rowIndex, columnIndex, row, column), sizeStyle],
40546
40932
  "class": [getCellClass(rowIndex, columnIndex, row, column), "vc-table__td"],
40547
- "onMouseenter": (e) => handleCellMouseEnter(e, row),
40548
- "onMouseleave": (e) => handleCellMouseLeave(e)
40933
+ "onMouseenter": (e) => handleCellMouseEnter(e, row, column),
40934
+ "onMouseleave": (e) => handleCellMouseLeave(e, row, column)
40549
40935
  }, [renderCell({
40550
40936
  row,
40551
40937
  column,
@@ -40601,7 +40987,11 @@
40601
40987
  allowRender.value = true;
40602
40988
  }
40603
40989
  });
40604
- vue.onBeforeUnmount(() => (timer && clearTimeout(timer), allowRender.value = false));
40990
+ vue.onBeforeUnmount(() => {
40991
+ poper && poper.destroy();
40992
+ timer && clearTimeout(timer);
40993
+ allowRender.value = false;
40994
+ });
40605
40995
  return () => {
40606
40996
  if (!allowRender.value) return;
40607
40997
  return vue.createVNode("div", {
@@ -40728,10 +41118,13 @@
40728
41118
  column
40729
41119
  });
40730
41120
  }
40731
- return headerCellStyle;
41121
+ return {
41122
+ ...headerCellStyle,
41123
+ ...column.style
41124
+ };
40732
41125
  };
40733
41126
  const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
40734
- const classes = [column.id, column.order, column.realHeaderAlign, column.className, column.labelClass];
41127
+ const classes = [column.id, column.order, column.realHeaderAlign, column.class, column.labelClass];
40735
41128
  if (rowIndex === 0 && columnsHidden.value[columnIndex]) {
40736
41129
  classes.push("is-hidden");
40737
41130
  }
@@ -41639,190 +42032,6 @@
41639
42032
  };
41640
42033
  }
41641
42034
  });
41642
- const props$b = {
41643
- tag: {
41644
- type: String,
41645
- default: "div"
41646
- },
41647
- value: {
41648
- type: String,
41649
- default: ""
41650
- },
41651
- line: {
41652
- type: Number,
41653
- default: 0
41654
- },
41655
- // TODO: 是否改为tail-indent来表示尾部缩进
41656
- indent: {
41657
- type: Number,
41658
- default: 0
41659
- },
41660
- resize: {
41661
- type: [Boolean, Number],
41662
- default: 100
41663
- },
41664
- suffix: {
41665
- type: String,
41666
- default: "..."
41667
- },
41668
- placement: {
41669
- type: String,
41670
- default: "top"
41671
- },
41672
- portalClass: [Object, String, Array],
41673
- portalStyle: [Object, String, Array],
41674
- renderRow: {
41675
- type: Function,
41676
- default: (props$) => {
41677
- return props$.value;
41678
- }
41679
- }
41680
- };
41681
- const HIDDEN_TEXT_STYLE = `
41682
- position: absolute!important;
41683
- word-break: break-all!important;
41684
- overflow: auto!important;
41685
- opacity: 0!important;
41686
- z-index: -1000!important;
41687
- top: 0!important;
41688
- right: 0!important;
41689
- `;
41690
- const SIZING_STYLE$1 = [
41691
- "letter-spacing",
41692
- "line-height",
41693
- "padding-top",
41694
- "padding-bottom",
41695
- "font-family",
41696
- "font-weight",
41697
- "font-size",
41698
- "text-rendering",
41699
- "text-transform",
41700
- "width",
41701
- // 'text-indent', // 需要额外计算
41702
- "padding-left",
41703
- "padding-right",
41704
- "border-width",
41705
- "box-sizing"
41706
- ];
41707
- let hiddenEl$1;
41708
- const getFitIndex = (options = {}) => {
41709
- const { el: el2, line, value, suffix, indent } = options;
41710
- let lineHeight = parseInt(getStyle$1(el2, "line-height"), 10);
41711
- if (!hiddenEl$1) {
41712
- hiddenEl$1 = document.createElement("div");
41713
- document.body.appendChild(hiddenEl$1);
41714
- }
41715
- el2.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el2.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
41716
- const {
41717
- paddingSize,
41718
- borderSize,
41719
- boxSizing,
41720
- sizingStyle
41721
- } = utils.getComputedStyle(el2, SIZING_STYLE$1);
41722
- const textIndent = `text-indent: ${parseInt(getStyle$1(el2, "text-indent"), 10) + indent}px;`;
41723
- hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
41724
- let sideHeight = paddingSize || 0;
41725
- boxSizing === "border-box" && (sideHeight += borderSize);
41726
- if (Number.isNaN(lineHeight)) {
41727
- hiddenEl$1.innerText = ".";
41728
- lineHeight = hiddenEl$1.clientHeight - sideHeight;
41729
- }
41730
- let endIndex = 0;
41731
- hiddenEl$1.innerText = suffix;
41732
- (value || "").split("").forEach((item, i) => {
41733
- let old = hiddenEl$1.innerText;
41734
- old = old.substring(0, old.length - suffix.length);
41735
- hiddenEl$1.innerText = old + item + suffix;
41736
- if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
41737
- endIndex = i;
41738
- }
41739
- });
41740
- return endIndex;
41741
- };
41742
- const COMPONENT_NAME$h = "vc-text";
41743
- const Text = /* @__PURE__ */ vue.defineComponent({
41744
- name: COMPONENT_NAME$h,
41745
- props: props$b,
41746
- setup(props2, {
41747
- emit
41748
- }) {
41749
- const instance = vue.getCurrentInstance();
41750
- const isActive = vue.ref(false);
41751
- const endIndex = vue.ref(0);
41752
- const styles = vue.computed(() => {
41753
- return {
41754
- cursor: endIndex.value === 0 ? "unset" : "pointer"
41755
- };
41756
- });
41757
- const calcPosition = () => {
41758
- const {
41759
- suffix,
41760
- line,
41761
- value,
41762
- indent
41763
- } = props2;
41764
- if (line === 0) {
41765
- endIndex.value = 0;
41766
- isActive.value = true;
41767
- } else {
41768
- endIndex.value = getFitIndex({
41769
- el: instance.vnode.el,
41770
- line,
41771
- value,
41772
- suffix,
41773
- indent
41774
- });
41775
- isActive.value = true;
41776
- }
41777
- emit("clip", endIndex.value);
41778
- };
41779
- const handleResize = props2.resize === true || props2.resize === 0 ? calcPosition : debounce$1(calcPosition, props2.resize || 0);
41780
- let poper;
41781
- const handleMouseOver = (e) => {
41782
- if (endIndex.value > 0) {
41783
- poper = Popover.open({
41784
- el: document.body,
41785
- name: "vc-text-popover",
41786
- // 确保不重复创建
41787
- triggerEl: e.target,
41788
- hover: true,
41789
- theme: "dark",
41790
- placement: props2.placement,
41791
- portalClass: props2.portalClass,
41792
- portalStyle: [props2.portalStyle || `width: ${e.target.clientWidth}px`, "word-break: break-all"],
41793
- content: props2.value
41794
- });
41795
- }
41796
- };
41797
- const handleMouseOut = () => {
41798
- };
41799
- ["value", "indent", "line"].forEach((key) => {
41800
- vue.watch(() => props2[key], calcPosition);
41801
- });
41802
- vue.onMounted(() => {
41803
- props2.resize !== false && Resize.on(instance.vnode.el, handleResize);
41804
- });
41805
- vue.onBeforeUnmount(() => {
41806
- props2.resize !== false && Resize.off(instance.vnode.el, handleResize);
41807
- poper?.destroy?.();
41808
- });
41809
- const Content = props2.tag;
41810
- return () => {
41811
- return vue.createVNode(Content, {
41812
- "class": "vc-text",
41813
- "style": styles.value,
41814
- "onMouseover": handleMouseOver,
41815
- "onMouseout": handleMouseOut
41816
- }, {
41817
- default: () => [isActive.value ? vue.createVNode(Customer, {
41818
- "value": endIndex.value > 0 ? `${props2.value.slice(0, endIndex.value)}${props2.suffix}` : props2.value,
41819
- "index": endIndex.value,
41820
- "render": props2.renderRow
41821
- }, null) : null]
41822
- });
41823
- };
41824
- }
41825
- });
41826
42035
  const cellStarts = {
41827
42036
  default: {
41828
42037
  order: ""
@@ -41830,8 +42039,7 @@
41830
42039
  selection: {
41831
42040
  width: 60,
41832
42041
  minWidth: 60,
41833
- order: "",
41834
- className: "vc-table-column--selection"
42042
+ order: ""
41835
42043
  },
41836
42044
  expand: {
41837
42045
  width: 60,
@@ -41875,7 +42083,8 @@
41875
42083
  }, null), [[vue.vShow, store.states.expandSelectable || level === 0]]);
41876
42084
  },
41877
42085
  sortable: false,
41878
- resizable: false
42086
+ resizable: false,
42087
+ class: "vc-table__selection-column"
41879
42088
  },
41880
42089
  index: {
41881
42090
  renderHeader(h2, {
@@ -41925,7 +42134,7 @@
41925
42134
  },
41926
42135
  sortable: false,
41927
42136
  resizable: false,
41928
- className: "vc-table__expand-column"
42137
+ class: "vc-table__expand-column"
41929
42138
  }
41930
42139
  };
41931
42140
  const defaultRenderCell = (rowData = {}) => {
@@ -41943,17 +42152,13 @@
41943
42152
  }
41944
42153
  const line = column.line || VcInstance.options.TableColumn?.line;
41945
42154
  if (line && value) {
41946
- const base = rowData.isHead || rowData.isTail ? 36 : 24;
41947
42155
  const style2 = {
41948
- // 目前左右pading为10
41949
- // TODO: 含有border还要-1
41950
- width: (column.realWidth || column.width) - base + "px"
42156
+ "-webkit-line-clamp": line
41951
42157
  };
41952
- return vue.createVNode(Text, {
41953
- "style": style2,
41954
- "line": line,
41955
- "value": `${value}`
41956
- }, null);
42158
+ return vue.createVNode("div", {
42159
+ "class": "vc-table__text-line",
42160
+ "style": style2
42161
+ }, [value]);
41957
42162
  }
41958
42163
  return value;
41959
42164
  };
@@ -41998,6 +42203,7 @@
41998
42203
  };
41999
42204
  const TableColumn = /* @__PURE__ */ vue.defineComponent({
42000
42205
  name: "vc-table-column",
42206
+ inheritAttrs: false,
42001
42207
  props: {
42002
42208
  type: {
42003
42209
  type: String,
@@ -42009,7 +42215,6 @@
42009
42215
  default: 0
42010
42216
  },
42011
42217
  label: String,
42012
- customClass: String,
42013
42218
  labelClass: String,
42014
42219
  prop: String,
42015
42220
  width: Number,
@@ -42046,7 +42251,8 @@
42046
42251
  tooltip: [String, Function]
42047
42252
  },
42048
42253
  setup(props2, {
42049
- slots
42254
+ slots,
42255
+ attrs
42050
42256
  }) {
42051
42257
  const instance = vue.getCurrentInstance();
42052
42258
  const table = vue.inject("vc-table");
@@ -42083,7 +42289,7 @@
42083
42289
  Object.keys(source).forEach((prop) => {
42084
42290
  const value = source[prop];
42085
42291
  if (value !== void 0) {
42086
- column[prop] = prop === "customClass" ? `${column[prop]} ${value}` : value;
42292
+ column[prop] = prop === "class" ? `${column[prop] ? `${column[prop]} ` : ""}${value}` : value;
42087
42293
  }
42088
42294
  });
42089
42295
  return column;
@@ -42128,7 +42334,7 @@
42128
42334
  };
42129
42335
  if (!isEmpty$1(table.store.states.treeData) && !prefix2 && data.isExpandColumn) {
42130
42336
  prefix2 = vue.createVNode("span", {
42131
- "class": "vc-table-un-expand__indent"
42337
+ "class": "vc-table__unexpand__indent"
42132
42338
  }, null);
42133
42339
  }
42134
42340
  const {
@@ -42144,6 +42350,8 @@
42144
42350
  const defaults2 = {
42145
42351
  colspan: 1,
42146
42352
  rowspan: 1,
42353
+ class: attrs.class,
42354
+ style: attrs.style,
42147
42355
  ...cellStarts[props2.type],
42148
42356
  id: columnId.value,
42149
42357
  realAlign,
@@ -42215,7 +42423,7 @@
42215
42423
  });
42216
42424
  const MTable = Table;
42217
42425
  const MTableColumn = TableColumn;
42218
- const props$a = {
42426
+ const props$b = {
42219
42427
  type: {
42220
42428
  type: String,
42221
42429
  validator: (v) => /^(line|card)$/.test(v),
@@ -42370,10 +42578,10 @@
42370
42578
  handleChange
42371
42579
  };
42372
42580
  };
42373
- const COMPONENT_NAME$g = "vc-tabs";
42581
+ const COMPONENT_NAME$h = "vc-tabs";
42374
42582
  const Tabs = /* @__PURE__ */ vue.defineComponent({
42375
- name: COMPONENT_NAME$g,
42376
- props: props$a,
42583
+ name: COMPONENT_NAME$h,
42584
+ props: props$b,
42377
42585
  emits: ["update:modelValue", "change", "click"],
42378
42586
  setup(props2, {
42379
42587
  slots
@@ -42518,7 +42726,7 @@
42518
42726
  };
42519
42727
  }
42520
42728
  });
42521
- const props$9 = {
42729
+ const props$a = {
42522
42730
  value: {
42523
42731
  type: [String, Number]
42524
42732
  },
@@ -42596,10 +42804,10 @@
42596
42804
  currentValue
42597
42805
  };
42598
42806
  };
42599
- const COMPONENT_NAME$f = "vc-tabs-pane";
42807
+ const COMPONENT_NAME$g = "vc-tabs-pane";
42600
42808
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
42601
- name: COMPONENT_NAME$f,
42602
- props: props$9,
42809
+ name: COMPONENT_NAME$g,
42810
+ props: props$a,
42603
42811
  setup(_, {
42604
42812
  slots
42605
42813
  }) {
@@ -42613,8 +42821,8 @@
42613
42821
  };
42614
42822
  }
42615
42823
  });
42616
- const props$8 = {
42617
- ...props$a,
42824
+ const props$9 = {
42825
+ ...props$b,
42618
42826
  theme: {
42619
42827
  type: String,
42620
42828
  default: "light",
@@ -42649,10 +42857,10 @@
42649
42857
  default: false
42650
42858
  }
42651
42859
  };
42652
- const COMPONENT_NAME$e = "vcm-tabs";
42860
+ const COMPONENT_NAME$f = "vcm-tabs";
42653
42861
  const MTabs = /* @__PURE__ */ vue.defineComponent({
42654
- name: COMPONENT_NAME$e,
42655
- props: props$8,
42862
+ name: COMPONENT_NAME$f,
42863
+ props: props$9,
42656
42864
  emits: ["update:modelValue", "change", "click"],
42657
42865
  setup(props2, {
42658
42866
  slots
@@ -42879,10 +43087,10 @@
42879
43087
  };
42880
43088
  }
42881
43089
  });
42882
- const COMPONENT_NAME$d = "vcm-tabs-pane";
43090
+ const COMPONENT_NAME$e = "vcm-tabs-pane";
42883
43091
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
42884
- name: COMPONENT_NAME$d,
42885
- props: props$9,
43092
+ name: COMPONENT_NAME$e,
43093
+ props: props$a,
42886
43094
  setup(_, {
42887
43095
  slots
42888
43096
  }) {
@@ -42897,6 +43105,129 @@
42897
43105
  }
42898
43106
  });
42899
43107
  const MTag = Tag;
43108
+ const props$8 = {
43109
+ tag: {
43110
+ type: String,
43111
+ default: "div"
43112
+ },
43113
+ value: {
43114
+ type: String,
43115
+ default: ""
43116
+ },
43117
+ line: {
43118
+ type: Number,
43119
+ default: 0
43120
+ },
43121
+ // TODO: 是否改为tail-indent来表示尾部缩进
43122
+ indent: {
43123
+ type: Number,
43124
+ default: 0
43125
+ },
43126
+ resize: {
43127
+ type: [Boolean, Number],
43128
+ default: 100
43129
+ },
43130
+ suffix: {
43131
+ type: String,
43132
+ default: "..."
43133
+ },
43134
+ placement: {
43135
+ type: String,
43136
+ default: "top"
43137
+ },
43138
+ portalClass: [Object, String, Array],
43139
+ portalStyle: [Object, String, Array],
43140
+ renderRow: {
43141
+ type: Function,
43142
+ default: (props$) => {
43143
+ return props$.value;
43144
+ }
43145
+ }
43146
+ };
43147
+ const COMPONENT_NAME$d = "vc-text";
43148
+ const Text = /* @__PURE__ */ vue.defineComponent({
43149
+ name: COMPONENT_NAME$d,
43150
+ props: props$8,
43151
+ setup(props2, {
43152
+ emit
43153
+ }) {
43154
+ const instance = vue.getCurrentInstance();
43155
+ const isActive = vue.ref(false);
43156
+ const endIndex = vue.ref(-1);
43157
+ const styles = vue.computed(() => {
43158
+ return {
43159
+ cursor: endIndex.value <= 0 ? "unset" : "pointer"
43160
+ };
43161
+ });
43162
+ const calcPosition = () => {
43163
+ const {
43164
+ suffix,
43165
+ line,
43166
+ value,
43167
+ indent
43168
+ } = props2;
43169
+ if (line === 0) {
43170
+ endIndex.value = -1;
43171
+ isActive.value = true;
43172
+ } else {
43173
+ endIndex.value = getFitIndex({
43174
+ el: instance.vnode.el,
43175
+ line,
43176
+ value,
43177
+ suffix,
43178
+ indent
43179
+ });
43180
+ isActive.value = true;
43181
+ }
43182
+ emit("clip", endIndex.value);
43183
+ };
43184
+ const handleResize = props2.resize === true || props2.resize === 0 ? calcPosition : debounce$1(calcPosition, props2.resize || 0);
43185
+ let poper;
43186
+ const handleMouseOver = (e) => {
43187
+ if (endIndex.value > 0) {
43188
+ poper = Popover.open({
43189
+ el: document.body,
43190
+ name: "vc-text-popover",
43191
+ // 确保不重复创建
43192
+ triggerEl: e.target,
43193
+ hover: true,
43194
+ theme: "dark",
43195
+ placement: props2.placement,
43196
+ portalClass: props2.portalClass,
43197
+ portalStyle: [props2.portalStyle || `width: ${e.target.clientWidth}px`, "word-break: break-all"],
43198
+ content: props2.value
43199
+ });
43200
+ }
43201
+ };
43202
+ const handleMouseOut = () => {
43203
+ };
43204
+ ["value", "indent", "line"].forEach((key) => {
43205
+ vue.watch(() => props2[key], calcPosition);
43206
+ });
43207
+ vue.onMounted(() => {
43208
+ props2.resize !== false && Resize.on(instance.vnode.el, handleResize);
43209
+ });
43210
+ vue.onBeforeUnmount(() => {
43211
+ props2.resize !== false && Resize.off(instance.vnode.el, handleResize);
43212
+ poper?.destroy?.();
43213
+ });
43214
+ const Content = props2.tag;
43215
+ return () => {
43216
+ return vue.createVNode(Content, {
43217
+ "class": "vc-text",
43218
+ "style": styles.value,
43219
+ "onMouseover": handleMouseOver,
43220
+ "onMouseout": handleMouseOut
43221
+ }, {
43222
+ default: () => [isActive.value ? vue.createVNode(Customer, {
43223
+ "value": endIndex.value > 0 ? `${props2.value.slice(0, endIndex.value)}${props2.suffix}` : props2.value,
43224
+ "index": endIndex.value,
43225
+ "render": props2.renderRow
43226
+ }, null) : null]
43227
+ });
43228
+ };
43229
+ }
43230
+ });
42900
43231
  const MText = Text;
42901
43232
  const HIDDEN_TEXTAREA_STYLE = `
42902
43233
  min-height:0 !important;
@@ -44552,10 +44883,10 @@
44552
44883
  MDrawerView,
44553
44884
  Dropdown,
44554
44885
  MDropdown,
44555
- // DropdownItem,
44556
- // MDropdownItem,
44557
- // DropdownMenu,
44558
- // MDropdownMenu,
44886
+ DropdownItem,
44887
+ MDropdownItem,
44888
+ DropdownMenu,
44889
+ MDropdownMenu,
44559
44890
  Editor,
44560
44891
  MEditor,
44561
44892
  // EditorView,
@@ -131924,6 +132255,8 @@
131924
132255
  exports.Drawer = Drawer;
131925
132256
  exports.DrawerView = DrawerView;
131926
132257
  exports.Dropdown = Dropdown;
132258
+ exports.DropdownItem = DropdownItem;
132259
+ exports.DropdownMenu = DropdownMenu;
131927
132260
  exports.Editor = Editor;
131928
132261
  exports.Expand = Expand$1;
131929
132262
  exports.Form = Form;
@@ -131965,6 +132298,8 @@
131965
132298
  exports.MDrawer = MDrawer;
131966
132299
  exports.MDrawerView = MDrawerView;
131967
132300
  exports.MDropdown = MDropdown;
132301
+ exports.MDropdownItem = MDropdownItem;
132302
+ exports.MDropdownMenu = MDropdownMenu;
131968
132303
  exports.MEditor = MEditor;
131969
132304
  exports.MExpand = MExpand;
131970
132305
  exports.MForm = MForm;