@deot/vc 1.0.27 → 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,
@@ -34645,6 +34785,8 @@
34645
34785
  "is-validating": validateState.value === "validating",
34646
34786
  "is-inline": form.props.inline,
34647
34787
  "is-nest": isNest.value,
34788
+ "is-alone": !props2.showMessage,
34789
+ // 用于单独去除form-item的默认margin_bottom
34648
34790
  [`is-${labelPosition.value}`]: true
34649
34791
  };
34650
34792
  });
@@ -35967,6 +36109,9 @@
35967
36109
  type: Boolean,
35968
36110
  default: false
35969
36111
  },
36112
+ // draggable为true时有效
36113
+ x: Number,
36114
+ y: Number,
35970
36115
  okText: {
35971
36116
  type: [String, Boolean],
35972
36117
  default: "确定"
@@ -36020,8 +36165,8 @@
36020
36165
  const header = vue.shallowRef();
36021
36166
  const scroller = vue.shallowRef();
36022
36167
  const resizer = vue.shallowRef();
36023
- const x = vue.ref(0);
36024
- const y = vue.ref(0);
36168
+ const x = vue.ref(props2.x);
36169
+ const y = vue.ref(props2.y);
36025
36170
  const isActive = vue.ref(false);
36026
36171
  const MAX_HEIGHT2 = IS_SERVER$3 ? 0 : window.innerHeight - 20;
36027
36172
  const MAX_WIDTH2 = IS_SERVER$3 ? 0 : window.innerWidth - 20;
@@ -36061,8 +36206,8 @@
36061
36206
  });
36062
36207
  const draggableStyle = vue.computed(() => {
36063
36208
  if (IS_SERVER$3 || !props2.draggable) return {};
36064
- const left = x.value || window.innerWidth / 2 - defaultSize.value.width / 2;
36065
- 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;
36066
36211
  return {
36067
36212
  left: `${left}px`,
36068
36213
  top: `${top}px`
@@ -37545,22 +37690,171 @@
37545
37690
  });
37546
37691
  const MPicker = Picker;
37547
37692
  const props$p = {
37548
- 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: {
37549
37706
  type: String,
37550
- default: "div"
37551
- }
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]
37552
37736
  };
37553
37737
  const COMPONENT_NAME$C = "vc-popconfirm";
37554
37738
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
37555
37739
  name: COMPONENT_NAME$C,
37556
37740
  props: props$p,
37741
+ inheritAttrs: false,
37742
+ emits: ["update:modelValue", "visible-change", "ready", "close", "cancel", "ok"],
37557
37743
  setup(props2, {
37558
- slots
37744
+ slots,
37745
+ emit
37559
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
+ };
37560
37805
  return () => {
37561
- return vue.createVNode("div", {
37562
- "class": "vc-popconfirm"
37563
- }, [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
+ });
37564
37858
  };
37565
37859
  }
37566
37860
  });
@@ -39035,6 +39329,18 @@
39035
39329
  uncheckedText: {
39036
39330
  type: String,
39037
39331
  default: ""
39332
+ },
39333
+ width: {
39334
+ type: Number,
39335
+ default: 36
39336
+ },
39337
+ height: {
39338
+ type: Number,
39339
+ default: 20
39340
+ },
39341
+ borderWidth: {
39342
+ type: Number,
39343
+ default: 1
39038
39344
  }
39039
39345
  };
39040
39346
  const useSwitch = (expose) => {
@@ -39113,28 +39419,65 @@
39113
39419
  expose
39114
39420
  }) {
39115
39421
  const {
39422
+ checked,
39116
39423
  classes,
39117
39424
  currentValue,
39118
39425
  isLoading,
39119
39426
  handleToggle
39120
39427
  } = useSwitch(expose);
39428
+ const size = vue.computed(() => {
39429
+ return props2.height - props2.borderWidth * 4;
39430
+ });
39431
+ const lefts = vue.computed(() => {
39432
+ return {
39433
+ inner: checked.value ? props2.width - props2.borderWidth * 3 - size.value : props2.borderWidth,
39434
+ loading: checked.value ? props2.height - props2.borderWidth * 2 : props2.borderWidth * 2
39435
+ };
39436
+ });
39437
+ const contentOffset = vue.computed(() => {
39438
+ return Math.max(props2.height / 2, size.value) + props2.borderWidth * 2;
39439
+ });
39121
39440
  return () => {
39122
- return vue.createVNode("span", {
39123
- "class": [classes.value, "vc-switch"],
39441
+ return vue.createVNode("div", {
39442
+ "style": {
39443
+ width: `${props2.width}px`
39444
+ },
39445
+ "class": [classes.value, "vc-switch"]
39446
+ }, [vue.createVNode("span", {
39447
+ "style": {
39448
+ height: `${props2.height}px`,
39449
+ borderWidth: `${props2.borderWidth}px`
39450
+ },
39451
+ "class": "vc-switch__wrapper",
39124
39452
  "onClick": handleToggle
39125
39453
  }, [vue.createVNode("input", {
39126
39454
  "name": props2.name,
39127
39455
  "value": currentValue.value,
39128
39456
  "type": "hidden"
39129
39457
  }, null), vue.createVNode("span", {
39130
- "class": "vc-switch__content"
39458
+ "class": "vc-switch__content",
39459
+ "style": {
39460
+ left: `${checked.value ? props2.height / 4 : contentOffset.value}px`,
39461
+ right: `${checked.value ? contentOffset.value : props2.height / 4}px`,
39462
+ top: 0,
39463
+ bottom: 0
39464
+ }
39131
39465
  }, [currentValue.value === props2.checkedValue ? slots.checked ? slots.checked() : props2.checkedText : null, currentValue.value === props2.uncheckedValue ? slots.unchecked ? slots.unchecked() : props2.uncheckedText : null]), vue.createVNode("span", {
39132
- "class": "vc-switch__inner"
39466
+ "class": "vc-switch__inner",
39467
+ "style": {
39468
+ width: `${size.value}px`,
39469
+ height: `${size.value}px`,
39470
+ left: `${lefts.value.inner}px`,
39471
+ top: `${props2.borderWidth}px`
39472
+ }
39133
39473
  }, null), isLoading.value && vue.createVNode(Spin, {
39134
39474
  "size": 14,
39135
39475
  "foreground": "#fff",
39136
- "class": "vc-switch__loading"
39137
- }, null)]);
39476
+ "class": "vc-switch__loading",
39477
+ "style": {
39478
+ left: `${lefts.value.loading}px`
39479
+ }
39480
+ }, null)])]);
39138
39481
  };
39139
39482
  }
39140
39483
  });
@@ -40277,6 +40620,78 @@
40277
40620
  };
40278
40621
  }
40279
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
+ };
40280
40695
  const TableBody = /* @__PURE__ */ vue.defineComponent({
40281
40696
  name: "vc-table-body",
40282
40697
  props: {
@@ -40385,10 +40800,13 @@
40385
40800
  column
40386
40801
  });
40387
40802
  }
40388
- return cellStyle;
40803
+ return {
40804
+ ...cellStyle,
40805
+ ...column.style
40806
+ };
40389
40807
  };
40390
40808
  const getCellClass = (rowIndex, columnIndex, row, column) => {
40391
- const classes = [column.realAlign, column.className];
40809
+ const classes = [column.realAlign, column.class];
40392
40810
  if (isColumnHidden(columnIndex)) {
40393
40811
  classes.push("is-hidden");
40394
40812
  }
@@ -40405,24 +40823,43 @@
40405
40823
  }
40406
40824
  return classes.join(" ");
40407
40825
  };
40408
- const handleCellMouseEnter = (e, row) => {
40826
+ let poper;
40827
+ const handleCellMouseEnter = (e, row, column) => {
40409
40828
  const cell = getCell(e);
40829
+ const hoverState = {
40830
+ cell,
40831
+ column,
40832
+ row
40833
+ };
40410
40834
  if (cell) {
40411
- const column = getColumnByCell(states.columns, cell);
40412
- const hoverState = {
40413
- cell,
40414
- column,
40415
- row
40416
- };
40417
40835
  table.hoverState.value = hoverState;
40418
40836
  table.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, e);
40419
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
+ }
40420
40858
  };
40421
- const handleCellMouseLeave = (e) => {
40859
+ const handleCellMouseLeave = (e, row, column) => {
40422
40860
  const cell = getCell(e);
40423
40861
  if (!cell) return;
40424
- const oldHoverState = table.hoverState.value || {};
40425
- table.emit("cell-mouse-leave", oldHoverState.row, oldHoverState.column, oldHoverState.cell, e);
40862
+ table.emit("cell-mouse-leave", row, column, cell, e);
40426
40863
  };
40427
40864
  const handleMouseEnter = debounce$1((index) => {
40428
40865
  table.store.setHoverRow(index);
@@ -40493,8 +40930,8 @@
40493
40930
  "key": column.id,
40494
40931
  "style": [getCellStyle(rowIndex, columnIndex, row, column), sizeStyle],
40495
40932
  "class": [getCellClass(rowIndex, columnIndex, row, column), "vc-table__td"],
40496
- "onMouseenter": (e) => handleCellMouseEnter(e, row),
40497
- "onMouseleave": (e) => handleCellMouseLeave(e)
40933
+ "onMouseenter": (e) => handleCellMouseEnter(e, row, column),
40934
+ "onMouseleave": (e) => handleCellMouseLeave(e, row, column)
40498
40935
  }, [renderCell({
40499
40936
  row,
40500
40937
  column,
@@ -40550,7 +40987,11 @@
40550
40987
  allowRender.value = true;
40551
40988
  }
40552
40989
  });
40553
- vue.onBeforeUnmount(() => (timer && clearTimeout(timer), allowRender.value = false));
40990
+ vue.onBeforeUnmount(() => {
40991
+ poper && poper.destroy();
40992
+ timer && clearTimeout(timer);
40993
+ allowRender.value = false;
40994
+ });
40554
40995
  return () => {
40555
40996
  if (!allowRender.value) return;
40556
40997
  return vue.createVNode("div", {
@@ -40677,10 +41118,13 @@
40677
41118
  column
40678
41119
  });
40679
41120
  }
40680
- return headerCellStyle;
41121
+ return {
41122
+ ...headerCellStyle,
41123
+ ...column.style
41124
+ };
40681
41125
  };
40682
41126
  const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
40683
- 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];
40684
41128
  if (rowIndex === 0 && columnsHidden.value[columnIndex]) {
40685
41129
  classes.push("is-hidden");
40686
41130
  }
@@ -41588,190 +42032,6 @@
41588
42032
  };
41589
42033
  }
41590
42034
  });
41591
- const props$b = {
41592
- tag: {
41593
- type: String,
41594
- default: "div"
41595
- },
41596
- value: {
41597
- type: String,
41598
- default: ""
41599
- },
41600
- line: {
41601
- type: Number,
41602
- default: 0
41603
- },
41604
- // TODO: 是否改为tail-indent来表示尾部缩进
41605
- indent: {
41606
- type: Number,
41607
- default: 0
41608
- },
41609
- resize: {
41610
- type: [Boolean, Number],
41611
- default: 100
41612
- },
41613
- suffix: {
41614
- type: String,
41615
- default: "..."
41616
- },
41617
- placement: {
41618
- type: String,
41619
- default: "top"
41620
- },
41621
- portalClass: [Object, String, Array],
41622
- portalStyle: [Object, String, Array],
41623
- renderRow: {
41624
- type: Function,
41625
- default: (props$) => {
41626
- return props$.value;
41627
- }
41628
- }
41629
- };
41630
- const HIDDEN_TEXT_STYLE = `
41631
- position: absolute!important;
41632
- word-break: break-all!important;
41633
- overflow: auto!important;
41634
- opacity: 0!important;
41635
- z-index: -1000!important;
41636
- top: 0!important;
41637
- right: 0!important;
41638
- `;
41639
- const SIZING_STYLE$1 = [
41640
- "letter-spacing",
41641
- "line-height",
41642
- "padding-top",
41643
- "padding-bottom",
41644
- "font-family",
41645
- "font-weight",
41646
- "font-size",
41647
- "text-rendering",
41648
- "text-transform",
41649
- "width",
41650
- // 'text-indent', // 需要额外计算
41651
- "padding-left",
41652
- "padding-right",
41653
- "border-width",
41654
- "box-sizing"
41655
- ];
41656
- let hiddenEl$1;
41657
- const getFitIndex = (options = {}) => {
41658
- const { el: el2, line, value, suffix, indent } = options;
41659
- let lineHeight = parseInt(getStyle$1(el2, "line-height"), 10);
41660
- if (!hiddenEl$1) {
41661
- hiddenEl$1 = document.createElement("div");
41662
- document.body.appendChild(hiddenEl$1);
41663
- }
41664
- el2.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el2.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
41665
- const {
41666
- paddingSize,
41667
- borderSize,
41668
- boxSizing,
41669
- sizingStyle
41670
- } = utils.getComputedStyle(el2, SIZING_STYLE$1);
41671
- const textIndent = `text-indent: ${parseInt(getStyle$1(el2, "text-indent"), 10) + indent}px;`;
41672
- hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
41673
- let sideHeight = paddingSize || 0;
41674
- boxSizing === "border-box" && (sideHeight += borderSize);
41675
- if (Number.isNaN(lineHeight)) {
41676
- hiddenEl$1.innerText = ".";
41677
- lineHeight = hiddenEl$1.clientHeight - sideHeight;
41678
- }
41679
- let endIndex = 0;
41680
- hiddenEl$1.innerText = suffix;
41681
- (value || "").split("").forEach((item, i) => {
41682
- let old = hiddenEl$1.innerText;
41683
- old = old.substring(0, old.length - suffix.length);
41684
- hiddenEl$1.innerText = old + item + suffix;
41685
- if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
41686
- endIndex = i;
41687
- }
41688
- });
41689
- return endIndex;
41690
- };
41691
- const COMPONENT_NAME$h = "vc-text";
41692
- const Text = /* @__PURE__ */ vue.defineComponent({
41693
- name: COMPONENT_NAME$h,
41694
- props: props$b,
41695
- setup(props2, {
41696
- emit
41697
- }) {
41698
- const instance = vue.getCurrentInstance();
41699
- const isActive = vue.ref(false);
41700
- const endIndex = vue.ref(0);
41701
- const styles = vue.computed(() => {
41702
- return {
41703
- cursor: endIndex.value === 0 ? "unset" : "pointer"
41704
- };
41705
- });
41706
- const calcPosition = () => {
41707
- const {
41708
- suffix,
41709
- line,
41710
- value,
41711
- indent
41712
- } = props2;
41713
- if (line === 0) {
41714
- endIndex.value = 0;
41715
- isActive.value = true;
41716
- } else {
41717
- endIndex.value = getFitIndex({
41718
- el: instance.vnode.el,
41719
- line,
41720
- value,
41721
- suffix,
41722
- indent
41723
- });
41724
- isActive.value = true;
41725
- }
41726
- emit("clip", endIndex.value);
41727
- };
41728
- const handleResize = props2.resize === true || props2.resize === 0 ? calcPosition : debounce$1(calcPosition, props2.resize || 0);
41729
- let poper;
41730
- const handleMouseOver = (e) => {
41731
- if (endIndex.value > 0) {
41732
- poper = Popover.open({
41733
- el: document.body,
41734
- name: "vc-text-popover",
41735
- // 确保不重复创建
41736
- triggerEl: e.target,
41737
- hover: true,
41738
- theme: "dark",
41739
- placement: props2.placement,
41740
- portalClass: props2.portalClass,
41741
- portalStyle: [props2.portalStyle || `width: ${e.target.clientWidth}px`, "word-break: break-all"],
41742
- content: props2.value
41743
- });
41744
- }
41745
- };
41746
- const handleMouseOut = () => {
41747
- };
41748
- ["value", "indent", "line"].forEach((key) => {
41749
- vue.watch(() => props2[key], calcPosition);
41750
- });
41751
- vue.onMounted(() => {
41752
- props2.resize !== false && Resize.on(instance.vnode.el, handleResize);
41753
- });
41754
- vue.onBeforeUnmount(() => {
41755
- props2.resize !== false && Resize.off(instance.vnode.el, handleResize);
41756
- poper?.destroy?.();
41757
- });
41758
- const Content = props2.tag;
41759
- return () => {
41760
- return vue.createVNode(Content, {
41761
- "class": "vc-text",
41762
- "style": styles.value,
41763
- "onMouseover": handleMouseOver,
41764
- "onMouseout": handleMouseOut
41765
- }, {
41766
- default: () => [isActive.value ? vue.createVNode(Customer, {
41767
- "value": endIndex.value > 0 ? `${props2.value.slice(0, endIndex.value)}${props2.suffix}` : props2.value,
41768
- "index": endIndex.value,
41769
- "render": props2.renderRow
41770
- }, null) : null]
41771
- });
41772
- };
41773
- }
41774
- });
41775
42035
  const cellStarts = {
41776
42036
  default: {
41777
42037
  order: ""
@@ -41779,8 +42039,7 @@
41779
42039
  selection: {
41780
42040
  width: 60,
41781
42041
  minWidth: 60,
41782
- order: "",
41783
- className: "vc-table-column--selection"
42042
+ order: ""
41784
42043
  },
41785
42044
  expand: {
41786
42045
  width: 60,
@@ -41824,7 +42083,8 @@
41824
42083
  }, null), [[vue.vShow, store.states.expandSelectable || level === 0]]);
41825
42084
  },
41826
42085
  sortable: false,
41827
- resizable: false
42086
+ resizable: false,
42087
+ class: "vc-table__selection-column"
41828
42088
  },
41829
42089
  index: {
41830
42090
  renderHeader(h2, {
@@ -41874,7 +42134,7 @@
41874
42134
  },
41875
42135
  sortable: false,
41876
42136
  resizable: false,
41877
- className: "vc-table__expand-column"
42137
+ class: "vc-table__expand-column"
41878
42138
  }
41879
42139
  };
41880
42140
  const defaultRenderCell = (rowData = {}) => {
@@ -41892,17 +42152,13 @@
41892
42152
  }
41893
42153
  const line = column.line || VcInstance.options.TableColumn?.line;
41894
42154
  if (line && value) {
41895
- const base = rowData.isHead || rowData.isTail ? 36 : 24;
41896
42155
  const style2 = {
41897
- // 目前左右pading为10
41898
- // TODO: 含有border还要-1
41899
- width: (column.realWidth || column.width) - base + "px"
42156
+ "-webkit-line-clamp": line
41900
42157
  };
41901
- return vue.createVNode(Text, {
41902
- "style": style2,
41903
- "line": line,
41904
- "value": `${value}`
41905
- }, null);
42158
+ return vue.createVNode("div", {
42159
+ "class": "vc-table__text-line",
42160
+ "style": style2
42161
+ }, [value]);
41906
42162
  }
41907
42163
  return value;
41908
42164
  };
@@ -41947,6 +42203,7 @@
41947
42203
  };
41948
42204
  const TableColumn = /* @__PURE__ */ vue.defineComponent({
41949
42205
  name: "vc-table-column",
42206
+ inheritAttrs: false,
41950
42207
  props: {
41951
42208
  type: {
41952
42209
  type: String,
@@ -41958,7 +42215,6 @@
41958
42215
  default: 0
41959
42216
  },
41960
42217
  label: String,
41961
- customClass: String,
41962
42218
  labelClass: String,
41963
42219
  prop: String,
41964
42220
  width: Number,
@@ -41995,7 +42251,8 @@
41995
42251
  tooltip: [String, Function]
41996
42252
  },
41997
42253
  setup(props2, {
41998
- slots
42254
+ slots,
42255
+ attrs
41999
42256
  }) {
42000
42257
  const instance = vue.getCurrentInstance();
42001
42258
  const table = vue.inject("vc-table");
@@ -42032,7 +42289,7 @@
42032
42289
  Object.keys(source).forEach((prop) => {
42033
42290
  const value = source[prop];
42034
42291
  if (value !== void 0) {
42035
- column[prop] = prop === "customClass" ? `${column[prop]} ${value}` : value;
42292
+ column[prop] = prop === "class" ? `${column[prop] ? `${column[prop]} ` : ""}${value}` : value;
42036
42293
  }
42037
42294
  });
42038
42295
  return column;
@@ -42077,7 +42334,7 @@
42077
42334
  };
42078
42335
  if (!isEmpty$1(table.store.states.treeData) && !prefix2 && data.isExpandColumn) {
42079
42336
  prefix2 = vue.createVNode("span", {
42080
- "class": "vc-table-un-expand__indent"
42337
+ "class": "vc-table__unexpand__indent"
42081
42338
  }, null);
42082
42339
  }
42083
42340
  const {
@@ -42093,6 +42350,8 @@
42093
42350
  const defaults2 = {
42094
42351
  colspan: 1,
42095
42352
  rowspan: 1,
42353
+ class: attrs.class,
42354
+ style: attrs.style,
42096
42355
  ...cellStarts[props2.type],
42097
42356
  id: columnId.value,
42098
42357
  realAlign,
@@ -42164,7 +42423,7 @@
42164
42423
  });
42165
42424
  const MTable = Table;
42166
42425
  const MTableColumn = TableColumn;
42167
- const props$a = {
42426
+ const props$b = {
42168
42427
  type: {
42169
42428
  type: String,
42170
42429
  validator: (v) => /^(line|card)$/.test(v),
@@ -42319,10 +42578,10 @@
42319
42578
  handleChange
42320
42579
  };
42321
42580
  };
42322
- const COMPONENT_NAME$g = "vc-tabs";
42581
+ const COMPONENT_NAME$h = "vc-tabs";
42323
42582
  const Tabs = /* @__PURE__ */ vue.defineComponent({
42324
- name: COMPONENT_NAME$g,
42325
- props: props$a,
42583
+ name: COMPONENT_NAME$h,
42584
+ props: props$b,
42326
42585
  emits: ["update:modelValue", "change", "click"],
42327
42586
  setup(props2, {
42328
42587
  slots
@@ -42467,7 +42726,7 @@
42467
42726
  };
42468
42727
  }
42469
42728
  });
42470
- const props$9 = {
42729
+ const props$a = {
42471
42730
  value: {
42472
42731
  type: [String, Number]
42473
42732
  },
@@ -42545,10 +42804,10 @@
42545
42804
  currentValue
42546
42805
  };
42547
42806
  };
42548
- const COMPONENT_NAME$f = "vc-tabs-pane";
42807
+ const COMPONENT_NAME$g = "vc-tabs-pane";
42549
42808
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
42550
- name: COMPONENT_NAME$f,
42551
- props: props$9,
42809
+ name: COMPONENT_NAME$g,
42810
+ props: props$a,
42552
42811
  setup(_, {
42553
42812
  slots
42554
42813
  }) {
@@ -42562,8 +42821,8 @@
42562
42821
  };
42563
42822
  }
42564
42823
  });
42565
- const props$8 = {
42566
- ...props$a,
42824
+ const props$9 = {
42825
+ ...props$b,
42567
42826
  theme: {
42568
42827
  type: String,
42569
42828
  default: "light",
@@ -42598,10 +42857,10 @@
42598
42857
  default: false
42599
42858
  }
42600
42859
  };
42601
- const COMPONENT_NAME$e = "vcm-tabs";
42860
+ const COMPONENT_NAME$f = "vcm-tabs";
42602
42861
  const MTabs = /* @__PURE__ */ vue.defineComponent({
42603
- name: COMPONENT_NAME$e,
42604
- props: props$8,
42862
+ name: COMPONENT_NAME$f,
42863
+ props: props$9,
42605
42864
  emits: ["update:modelValue", "change", "click"],
42606
42865
  setup(props2, {
42607
42866
  slots
@@ -42828,10 +43087,10 @@
42828
43087
  };
42829
43088
  }
42830
43089
  });
42831
- const COMPONENT_NAME$d = "vcm-tabs-pane";
43090
+ const COMPONENT_NAME$e = "vcm-tabs-pane";
42832
43091
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
42833
- name: COMPONENT_NAME$d,
42834
- props: props$9,
43092
+ name: COMPONENT_NAME$e,
43093
+ props: props$a,
42835
43094
  setup(_, {
42836
43095
  slots
42837
43096
  }) {
@@ -42846,6 +43105,129 @@
42846
43105
  }
42847
43106
  });
42848
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
+ });
42849
43231
  const MText = Text;
42850
43232
  const HIDDEN_TEXTAREA_STYLE = `
42851
43233
  min-height:0 !important;
@@ -44501,10 +44883,10 @@
44501
44883
  MDrawerView,
44502
44884
  Dropdown,
44503
44885
  MDropdown,
44504
- // DropdownItem,
44505
- // MDropdownItem,
44506
- // DropdownMenu,
44507
- // MDropdownMenu,
44886
+ DropdownItem,
44887
+ MDropdownItem,
44888
+ DropdownMenu,
44889
+ MDropdownMenu,
44508
44890
  Editor,
44509
44891
  MEditor,
44510
44892
  // EditorView,
@@ -131873,6 +132255,8 @@
131873
132255
  exports.Drawer = Drawer;
131874
132256
  exports.DrawerView = DrawerView;
131875
132257
  exports.Dropdown = Dropdown;
132258
+ exports.DropdownItem = DropdownItem;
132259
+ exports.DropdownMenu = DropdownMenu;
131876
132260
  exports.Editor = Editor;
131877
132261
  exports.Expand = Expand$1;
131878
132262
  exports.Form = Form;
@@ -131914,6 +132298,8 @@
131914
132298
  exports.MDrawer = MDrawer;
131915
132299
  exports.MDrawerView = MDrawerView;
131916
132300
  exports.MDropdown = MDropdown;
132301
+ exports.MDropdownItem = MDropdownItem;
132302
+ exports.MDropdownMenu = MDropdownMenu;
131917
132303
  exports.MEditor = MEditor;
131918
132304
  exports.MExpand = MExpand;
131919
132305
  exports.MForm = MForm;