@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.
@@ -26127,9 +26127,9 @@ var Vc = (function (exports, vue) {
26127
26127
  default: "div"
26128
26128
  }
26129
26129
  };
26130
- const COMPONENT_NAME$20 = "vc-action-sheet";
26130
+ const COMPONENT_NAME$22 = "vc-action-sheet";
26131
26131
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
26132
- name: COMPONENT_NAME$20,
26132
+ name: COMPONENT_NAME$22,
26133
26133
  props: props$1q,
26134
26134
  setup(props2, {
26135
26135
  slots
@@ -26309,9 +26309,9 @@ var Vc = (function (exports, vue) {
26309
26309
  }
26310
26310
  }
26311
26311
  const IconManager = new Manager();
26312
- const COMPONENT_NAME$1$ = "vc-icon";
26312
+ const COMPONENT_NAME$21 = "vc-icon";
26313
26313
  const Icon = /* @__PURE__ */ vue.defineComponent({
26314
- name: COMPONENT_NAME$1$,
26314
+ name: COMPONENT_NAME$21,
26315
26315
  props: props$1o,
26316
26316
  setup(props2) {
26317
26317
  const viewBox = vue.ref("0 0 1024 1024");
@@ -26507,9 +26507,9 @@ var Vc = (function (exports, vue) {
26507
26507
  }
26508
26508
  };
26509
26509
  };
26510
- const COMPONENT_NAME$1_ = "vc-transition";
26510
+ const COMPONENT_NAME$20 = "vc-transition";
26511
26511
  const Transition = vue.defineComponent({
26512
- name: COMPONENT_NAME$1_,
26512
+ name: COMPONENT_NAME$20,
26513
26513
  props: props$1n,
26514
26514
  // 当不声明emits的情况下,事件存在于attrs中
26515
26515
  inheritAttrs: false,
@@ -26529,9 +26529,9 @@ var Vc = (function (exports, vue) {
26529
26529
  };
26530
26530
  }
26531
26531
  });
26532
- const COMPONENT_NAME$1Z = "vc-transition-collapse";
26532
+ const COMPONENT_NAME$1$ = "vc-transition-collapse";
26533
26533
  const TransitionCollapse = vue.defineComponent({
26534
- name: COMPONENT_NAME$1Z,
26534
+ name: COMPONENT_NAME$1$,
26535
26535
  props: props$1n,
26536
26536
  // 当不声明emits的情况下,事件存在于attrs中
26537
26537
  inheritAttrs: false,
@@ -26649,9 +26649,9 @@ var Vc = (function (exports, vue) {
26649
26649
  };
26650
26650
  }
26651
26651
  });
26652
- const COMPONENT_NAME$1Y = "vc-transition-fade";
26652
+ const COMPONENT_NAME$1_ = "vc-transition-fade";
26653
26653
  const TransitionFade = vue.defineComponent({
26654
- name: COMPONENT_NAME$1Y,
26654
+ name: COMPONENT_NAME$1_,
26655
26655
  props: {
26656
26656
  ...props$1n,
26657
26657
  // inheritAttrs必须是false
@@ -26685,9 +26685,9 @@ var Vc = (function (exports, vue) {
26685
26685
  };
26686
26686
  }
26687
26687
  });
26688
- const COMPONENT_NAME$1X = "vc-transition-scale";
26688
+ const COMPONENT_NAME$1Z = "vc-transition-scale";
26689
26689
  const TransitionScale = vue.defineComponent({
26690
- name: COMPONENT_NAME$1X,
26690
+ name: COMPONENT_NAME$1Z,
26691
26691
  props: {
26692
26692
  ...props$1n,
26693
26693
  mode: {
@@ -26726,9 +26726,9 @@ var Vc = (function (exports, vue) {
26726
26726
  };
26727
26727
  }
26728
26728
  });
26729
- const COMPONENT_NAME$1W = "vc-transition-slide";
26729
+ const COMPONENT_NAME$1Y = "vc-transition-slide";
26730
26730
  const TransitionSlide = vue.defineComponent({
26731
- name: COMPONENT_NAME$1W,
26731
+ name: COMPONENT_NAME$1Y,
26732
26732
  props: {
26733
26733
  ...props$1n,
26734
26734
  mode: {
@@ -26767,9 +26767,9 @@ var Vc = (function (exports, vue) {
26767
26767
  };
26768
26768
  }
26769
26769
  });
26770
- const COMPONENT_NAME$1V = "vc-transition-zoom";
26770
+ const COMPONENT_NAME$1X = "vc-transition-zoom";
26771
26771
  const TransitionZoom = vue.defineComponent({
26772
- name: COMPONENT_NAME$1V,
26772
+ name: COMPONENT_NAME$1X,
26773
26773
  props: {
26774
26774
  ...props$1n,
26775
26775
  mode: {
@@ -26808,7 +26808,7 @@ var Vc = (function (exports, vue) {
26808
26808
  };
26809
26809
  }
26810
26810
  });
26811
- const COMPONENT_NAME$1U = "vc-alert";
26811
+ const COMPONENT_NAME$1W = "vc-alert";
26812
26812
  const THEME_MAP = {
26813
26813
  info: ["#2B72FD", "#91d5ff", "#e6f7ff"],
26814
26814
  success: ["#52c41a", "#b7eb8f", "#f6ffed"],
@@ -26816,7 +26816,7 @@ var Vc = (function (exports, vue) {
26816
26816
  warning: ["#ffbf00", "#ffe58f", "#fffbe6"]
26817
26817
  };
26818
26818
  const Alert = /* @__PURE__ */ vue.defineComponent({
26819
- name: COMPONENT_NAME$1U,
26819
+ name: COMPONENT_NAME$1W,
26820
26820
  props: props$1p,
26821
26821
  setup(props2, {
26822
26822
  slots,
@@ -26909,9 +26909,9 @@ var Vc = (function (exports, vue) {
26909
26909
  default: "div"
26910
26910
  }
26911
26911
  };
26912
- const COMPONENT_NAME$1T = "vc-artboard";
26912
+ const COMPONENT_NAME$1V = "vc-artboard";
26913
26913
  const Artboard = /* @__PURE__ */ vue.defineComponent({
26914
- name: COMPONENT_NAME$1T,
26914
+ name: COMPONENT_NAME$1V,
26915
26915
  props: props$1m,
26916
26916
  setup(props2, {
26917
26917
  slots
@@ -26945,9 +26945,9 @@ var Vc = (function (exports, vue) {
26945
26945
  default: false
26946
26946
  }
26947
26947
  };
26948
- const COMPONENT_NAME$1S = "vc-spin";
26948
+ const COMPONENT_NAME$1U = "vc-spin";
26949
26949
  const Spin = /* @__PURE__ */ vue.defineComponent({
26950
- name: COMPONENT_NAME$1S,
26950
+ name: COMPONENT_NAME$1U,
26951
26951
  props: props$1l,
26952
26952
  setup(props2, {
26953
26953
  slots
@@ -26996,9 +26996,9 @@ var Vc = (function (exports, vue) {
26996
26996
  },
26997
26997
  exclude: RegExp
26998
26998
  };
26999
- const COMPONENT_NAME$1R = "vc-debounce";
26999
+ const COMPONENT_NAME$1T = "vc-debounce";
27000
27000
  const Debounce = vue.defineComponent({
27001
- name: COMPONENT_NAME$1R,
27001
+ name: COMPONENT_NAME$1T,
27002
27002
  props: props$1k,
27003
27003
  /**
27004
27004
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
@@ -27066,9 +27066,9 @@ var Vc = (function (exports, vue) {
27066
27066
  default: "button"
27067
27067
  }
27068
27068
  };
27069
- const COMPONENT_NAME$1Q = "vc-button";
27069
+ const COMPONENT_NAME$1S = "vc-button";
27070
27070
  const Button = /* @__PURE__ */ vue.defineComponent({
27071
- name: COMPONENT_NAME$1Q,
27071
+ name: COMPONENT_NAME$1S,
27072
27072
  emits: ["click"],
27073
27073
  props: props$1j,
27074
27074
  setup(props2, {
@@ -27146,9 +27146,9 @@ var Vc = (function (exports, vue) {
27146
27146
  default: false
27147
27147
  }
27148
27148
  };
27149
- const COMPONENT_NAME$1P = "vc-button-group";
27149
+ const COMPONENT_NAME$1R = "vc-button-group";
27150
27150
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
27151
- name: COMPONENT_NAME$1P,
27151
+ name: COMPONENT_NAME$1R,
27152
27152
  props: props$1i,
27153
27153
  setup(props2, {
27154
27154
  slots
@@ -27177,9 +27177,9 @@ var Vc = (function (exports, vue) {
27177
27177
  default: "div"
27178
27178
  }
27179
27179
  };
27180
- const COMPONENT_NAME$1O = "vc-calendar";
27180
+ const COMPONENT_NAME$1Q = "vc-calendar";
27181
27181
  const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
27182
- name: COMPONENT_NAME$1O,
27182
+ name: COMPONENT_NAME$1Q,
27183
27183
  props: props$1h,
27184
27184
  setup(props2, {
27185
27185
  slots
@@ -27212,9 +27212,9 @@ var Vc = (function (exports, vue) {
27212
27212
  type: String
27213
27213
  }
27214
27214
  };
27215
- const COMPONENT_NAME$1N = "vc-card";
27215
+ const COMPONENT_NAME$1P = "vc-card";
27216
27216
  const Card = /* @__PURE__ */ vue.defineComponent({
27217
- name: COMPONENT_NAME$1N,
27217
+ name: COMPONENT_NAME$1P,
27218
27218
  props: props$1g,
27219
27219
  setup(props2, {
27220
27220
  slots
@@ -27245,9 +27245,9 @@ var Vc = (function (exports, vue) {
27245
27245
  default: "div"
27246
27246
  }
27247
27247
  };
27248
- const COMPONENT_NAME$1M = "vc-carousel";
27248
+ const COMPONENT_NAME$1O = "vc-carousel";
27249
27249
  const Carousel = /* @__PURE__ */ vue.defineComponent({
27250
- name: COMPONENT_NAME$1M,
27250
+ name: COMPONENT_NAME$1O,
27251
27251
  props: props$1f,
27252
27252
  setup(props2, {
27253
27253
  slots
@@ -27266,9 +27266,9 @@ var Vc = (function (exports, vue) {
27266
27266
  default: "div"
27267
27267
  }
27268
27268
  };
27269
- const COMPONENT_NAME$1L = "vc-cascader";
27269
+ const COMPONENT_NAME$1N = "vc-cascader";
27270
27270
  const Cascader = /* @__PURE__ */ vue.defineComponent({
27271
- name: COMPONENT_NAME$1L,
27271
+ name: COMPONENT_NAME$1N,
27272
27272
  props: props$1e,
27273
27273
  setup(props2, {
27274
27274
  slots
@@ -27331,9 +27331,9 @@ var Vc = (function (exports, vue) {
27331
27331
  watchShallow: Boolean,
27332
27332
  manualUpdate: Boolean
27333
27333
  };
27334
- const COMPONENT_NAME$1K = "vc-chart";
27334
+ const COMPONENT_NAME$1M = "vc-chart";
27335
27335
  const Chart = /* @__PURE__ */ vue.defineComponent({
27336
- name: COMPONENT_NAME$1K,
27336
+ name: COMPONENT_NAME$1M,
27337
27337
  props: props$1d,
27338
27338
  emits: [...EVENTS, "ready"],
27339
27339
  setup(props2, {
@@ -27555,9 +27555,9 @@ var Vc = (function (exports, vue) {
27555
27555
  computedLabel
27556
27556
  };
27557
27557
  };
27558
- const COMPONENT_NAME$1J = "vc-checkbox";
27558
+ const COMPONENT_NAME$1L = "vc-checkbox";
27559
27559
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
27560
- name: COMPONENT_NAME$1J,
27560
+ name: COMPONENT_NAME$1L,
27561
27561
  props: props$1c,
27562
27562
  emits: ["update:modelValue", "change"],
27563
27563
  setup(props2, {
@@ -27639,9 +27639,9 @@ var Vc = (function (exports, vue) {
27639
27639
  reset
27640
27640
  };
27641
27641
  };
27642
- const COMPONENT_NAME$1I = "vc-checkbox-group";
27642
+ const COMPONENT_NAME$1K = "vc-checkbox-group";
27643
27643
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
27644
- name: COMPONENT_NAME$1I,
27644
+ name: COMPONENT_NAME$1K,
27645
27645
  props: props$1b,
27646
27646
  emits: ["update:modelValue", "change"],
27647
27647
  setup(props2, {
@@ -27656,9 +27656,9 @@ var Vc = (function (exports, vue) {
27656
27656
  };
27657
27657
  }
27658
27658
  });
27659
- const COMPONENT_NAME$1H = "vcm-checkbox";
27659
+ const COMPONENT_NAME$1J = "vcm-checkbox";
27660
27660
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
27661
- name: COMPONENT_NAME$1H,
27661
+ name: COMPONENT_NAME$1J,
27662
27662
  props: props$1c,
27663
27663
  emits: ["update:modelValue", "change"],
27664
27664
  setup(props2, {
@@ -27695,9 +27695,9 @@ var Vc = (function (exports, vue) {
27695
27695
  };
27696
27696
  }
27697
27697
  });
27698
- const COMPONENT_NAME$1G = "vcm-checkbox-group";
27698
+ const COMPONENT_NAME$1I = "vcm-checkbox-group";
27699
27699
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
27700
- name: COMPONENT_NAME$1G,
27700
+ name: COMPONENT_NAME$1I,
27701
27701
  props: props$1b,
27702
27702
  emits: ["update:modelValue", "change"],
27703
27703
  setup(props2, {
@@ -27753,9 +27753,9 @@ var Vc = (function (exports, vue) {
27753
27753
  default: () => null
27754
27754
  }
27755
27755
  };
27756
- const COMPONENT_NAME$1F = "vc-customer";
27756
+ const COMPONENT_NAME$1H = "vc-customer";
27757
27757
  const Customer = vue.defineComponent({
27758
- name: COMPONENT_NAME$1F,
27758
+ name: COMPONENT_NAME$1H,
27759
27759
  props: props$19,
27760
27760
  setup(props2, context) {
27761
27761
  return () => vue.h(() => {
@@ -27763,9 +27763,9 @@ var Vc = (function (exports, vue) {
27763
27763
  });
27764
27764
  }
27765
27765
  });
27766
- const COMPONENT_NAME$1E = "vc-message";
27766
+ const COMPONENT_NAME$1G = "vc-message";
27767
27767
  const MessageView = /* @__PURE__ */ vue.defineComponent({
27768
- name: COMPONENT_NAME$1E,
27768
+ name: COMPONENT_NAME$1G,
27769
27769
  emits: ["before-close", "close", "portal-fulfilled"],
27770
27770
  props: props$1a,
27771
27771
  setup(props2, {
@@ -27908,7 +27908,7 @@ var Vc = (function (exports, vue) {
27908
27908
  return this.target.finally(callback);
27909
27909
  }
27910
27910
  }
27911
- const COMPONENT_NAME$1D = "vc-portal";
27911
+ const COMPONENT_NAME$1F = "vc-portal";
27912
27912
  class Portal {
27913
27913
  /**
27914
27914
  * 清理Portals类型组件
@@ -27960,7 +27960,7 @@ var Vc = (function (exports, vue) {
27960
27960
  this.wrapper = wrapper;
27961
27961
  this.globalOptions = {
27962
27962
  ...options,
27963
- name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1D)
27963
+ name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1F)
27964
27964
  };
27965
27965
  }
27966
27966
  popup(propsData, options) {
@@ -28059,7 +28059,7 @@ var Vc = (function (exports, vue) {
28059
28059
  ...rest
28060
28060
  } = options;
28061
28061
  let useAllNodes = fragment;
28062
- const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1D)}` : name$;
28062
+ const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1F)}` : name$;
28063
28063
  const container = document.createElement(tag);
28064
28064
  const root = typeof el2 === "object" ? el2 : document.querySelector(el2 || "body");
28065
28065
  !alive && Portal.leafs.get(name)?.destroy();
@@ -28093,7 +28093,7 @@ var Vc = (function (exports, vue) {
28093
28093
  } else {
28094
28094
  const wrapper = this.wrapper;
28095
28095
  const app = vue.createApp({
28096
- name: COMPONENT_NAME$1D,
28096
+ name: COMPONENT_NAME$1F,
28097
28097
  parent,
28098
28098
  setup() {
28099
28099
  if (alive) {
@@ -28203,9 +28203,9 @@ var Vc = (function (exports, vue) {
28203
28203
  default: "div"
28204
28204
  }
28205
28205
  };
28206
- const COMPONENT_NAME$1C = "vc-portal-view";
28206
+ const COMPONENT_NAME$1E = "vc-portal-view";
28207
28207
  const PortalView = /* @__PURE__ */ vue.defineComponent({
28208
- name: COMPONENT_NAME$1C,
28208
+ name: COMPONENT_NAME$1E,
28209
28209
  props: props$18,
28210
28210
  setup(props2, {
28211
28211
  slots
@@ -28368,9 +28368,9 @@ var Vc = (function (exports, vue) {
28368
28368
  };
28369
28369
  return () => vue.h(props2.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
28370
28370
  };
28371
- const COMPONENT_NAME$1B = "vc-clipboard";
28371
+ const COMPONENT_NAME$1D = "vc-clipboard";
28372
28372
  const Clipboard$1 = vue.defineComponent({
28373
- name: COMPONENT_NAME$1B,
28373
+ name: COMPONENT_NAME$1D,
28374
28374
  props: props$17,
28375
28375
  setup() {
28376
28376
  return useClipboard((content) => Message.success({ content }));
@@ -28402,9 +28402,9 @@ var Vc = (function (exports, vue) {
28402
28402
  const MTransitionScale = TransitionScale;
28403
28403
  const MTransitionSlide = TransitionSlide;
28404
28404
  const MTransitionZoom = TransitionZoom;
28405
- const COMPONENT_NAME$1A = "vcm-toast";
28405
+ const COMPONENT_NAME$1C = "vcm-toast";
28406
28406
  const MToastView = /* @__PURE__ */ vue.defineComponent({
28407
- name: COMPONENT_NAME$1A,
28407
+ name: COMPONENT_NAME$1C,
28408
28408
  emits: ["close", "portal-fulfilled"],
28409
28409
  props: props$16,
28410
28410
  setup(props2, {
@@ -28503,9 +28503,9 @@ var Vc = (function (exports, vue) {
28503
28503
  const warning$2 = create$3({ mode: "warning" });
28504
28504
  const error$2 = create$3({ mode: "error" });
28505
28505
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
28506
- const COMPONENT_NAME$1z = "vcm-clipboard";
28506
+ const COMPONENT_NAME$1B = "vcm-clipboard";
28507
28507
  const MClipboard$1 = vue.defineComponent({
28508
- name: COMPONENT_NAME$1z,
28508
+ name: COMPONENT_NAME$1B,
28509
28509
  props: props$17,
28510
28510
  setup() {
28511
28511
  return useClipboard((content) => MToast.info({ content }));
@@ -28534,9 +28534,9 @@ var Vc = (function (exports, vue) {
28534
28534
  default: false
28535
28535
  }
28536
28536
  };
28537
- const COMPONENT_NAME$1y = "vc-collapse";
28537
+ const COMPONENT_NAME$1A = "vc-collapse";
28538
28538
  const Collapse = vue.defineComponent({
28539
- name: COMPONENT_NAME$1y,
28539
+ name: COMPONENT_NAME$1A,
28540
28540
  props: props$15,
28541
28541
  emits: ["update:moodelValue", "change"],
28542
28542
  setup(props2, { slots, emit }) {
@@ -28645,12 +28645,12 @@ var Vc = (function (exports, vue) {
28645
28645
  default: true
28646
28646
  }
28647
28647
  };
28648
- function _isSlot$3(s) {
28648
+ function _isSlot$2(s) {
28649
28649
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
28650
28650
  }
28651
- const COMPONENT_NAME$1x = "vc-expand";
28651
+ const COMPONENT_NAME$1z = "vc-expand";
28652
28652
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
28653
- name: COMPONENT_NAME$1x,
28653
+ name: COMPONENT_NAME$1z,
28654
28654
  props: props$13,
28655
28655
  setup(props2, {
28656
28656
  slots
@@ -28669,7 +28669,7 @@ var Vc = (function (exports, vue) {
28669
28669
  enter: 200,
28670
28670
  leave: 200
28671
28671
  }
28672
- }, _isSlot$3(_slot = vue.withDirectives(vue.createVNode(Content, null, {
28672
+ }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
28673
28673
  default: () => [(props2.alive || !props2.alive && isActive.value) && slots.default?.()]
28674
28674
  }), [[vue.vShow, isActive.value]])) ? _slot : {
28675
28675
  default: () => [_slot]
@@ -28677,9 +28677,9 @@ var Vc = (function (exports, vue) {
28677
28677
  };
28678
28678
  }
28679
28679
  });
28680
- const COMPONENT_NAME$1w = "vc-collapse-item";
28680
+ const COMPONENT_NAME$1y = "vc-collapse-item";
28681
28681
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
28682
- name: COMPONENT_NAME$1w,
28682
+ name: COMPONENT_NAME$1y,
28683
28683
  props: props$14,
28684
28684
  setup(props2, {
28685
28685
  slots,
@@ -28749,9 +28749,9 @@ var Vc = (function (exports, vue) {
28749
28749
  default: "div"
28750
28750
  }
28751
28751
  };
28752
- const COMPONENT_NAME$1v = "vc-color-picker";
28752
+ const COMPONENT_NAME$1x = "vc-color-picker";
28753
28753
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
28754
- name: COMPONENT_NAME$1v,
28754
+ name: COMPONENT_NAME$1x,
28755
28755
  props: props$12,
28756
28756
  setup(props2, {
28757
28757
  slots
@@ -28770,9 +28770,9 @@ var Vc = (function (exports, vue) {
28770
28770
  default: "div"
28771
28771
  }
28772
28772
  };
28773
- const COMPONENT_NAME$1u = "vc-countdown";
28773
+ const COMPONENT_NAME$1w = "vc-countdown";
28774
28774
  const Countdown = /* @__PURE__ */ vue.defineComponent({
28775
- name: COMPONENT_NAME$1u,
28775
+ name: COMPONENT_NAME$1w,
28776
28776
  props: props$11,
28777
28777
  setup(props2, {
28778
28778
  slots
@@ -29210,9 +29210,9 @@ var Vc = (function (exports, vue) {
29210
29210
  expose?.(exposed);
29211
29211
  return exposed;
29212
29212
  };
29213
- const COMPONENT_NAME$1t = "vc-input";
29213
+ const COMPONENT_NAME$1v = "vc-input";
29214
29214
  const Input = /* @__PURE__ */ vue.defineComponent({
29215
- name: COMPONENT_NAME$1t,
29215
+ name: COMPONENT_NAME$1v,
29216
29216
  inheritAttrs: false,
29217
29217
  props: {
29218
29218
  ...props$$,
@@ -29225,7 +29225,8 @@ var Vc = (function (exports, vue) {
29225
29225
  emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "paste", "keydown", "keypress", "keyup", "enter", "tip"],
29226
29226
  setup(props2, {
29227
29227
  slots,
29228
- expose
29228
+ expose,
29229
+ attrs
29229
29230
  }) {
29230
29231
  const input = vue.ref();
29231
29232
  useNativeEmitter(input, expose);
@@ -29293,9 +29294,9 @@ var Vc = (function (exports, vue) {
29293
29294
  }, classes.value]
29294
29295
  }, [slots.prepend?.() || props2.prepend && vue.createVNode(Icon, {
29295
29296
  "type": props2.prepend
29296
- }, null)]), vue.createVNode("div", {
29297
+ }, null)]), vue.createVNode("div", vue.mergeProps({
29297
29298
  "class": ["vc-input__content", classes.value]
29298
- }, [slots.content?.() || renderInput(false)]), !props2.disabled && props2.clearable && vue.createVNode(TransitionFade, null, {
29299
+ }, slots.content ? it.value.listeners : {}), [slots.content ? slots.content() : renderInput(false)]), !props2.disabled && props2.clearable && vue.createVNode(TransitionFade, null, {
29299
29300
  default: () => [vue.createVNode(Icon, {
29300
29301
  "class": "vc-input__icon-clear",
29301
29302
  "type": "clear",
@@ -29542,9 +29543,9 @@ var Vc = (function (exports, vue) {
29542
29543
  handleStepper
29543
29544
  };
29544
29545
  };
29545
- const COMPONENT_NAME$1s = "vc-input-number";
29546
+ const COMPONENT_NAME$1u = "vc-input-number";
29546
29547
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
29547
- name: COMPONENT_NAME$1s,
29548
+ name: COMPONENT_NAME$1u,
29548
29549
  props: props$X,
29549
29550
  inheritAttrs: false,
29550
29551
  setup(props2, {
@@ -29604,9 +29605,9 @@ var Vc = (function (exports, vue) {
29604
29605
  default: true
29605
29606
  }
29606
29607
  };
29607
- const COMPONENT_NAME$1r = "vc-input-search";
29608
+ const COMPONENT_NAME$1t = "vc-input-search";
29608
29609
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
29609
- name: COMPONENT_NAME$1r,
29610
+ name: COMPONENT_NAME$1t,
29610
29611
  props: props$W,
29611
29612
  inheritAttrs: false,
29612
29613
  setup(props2, {
@@ -29890,12 +29891,9 @@ var Vc = (function (exports, vue) {
29890
29891
  getRect
29891
29892
  };
29892
29893
  };
29893
- function _isSlot$2(s) {
29894
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
29895
- }
29896
- const COMPONENT_NAME$1q = "vc-popover-wrapper";
29894
+ const COMPONENT_NAME$1s = "vc-popover-wrapper";
29897
29895
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
29898
- name: COMPONENT_NAME$1q,
29896
+ name: COMPONENT_NAME$1s,
29899
29897
  props: props$_,
29900
29898
  emits: ["portal-fulfilled", "close"],
29901
29899
  setup(props2, {
@@ -29955,7 +29953,7 @@ var Vc = (function (exports, vue) {
29955
29953
  return container;
29956
29954
  }
29957
29955
  };
29958
- const setPopupStyle = () => {
29956
+ const setPopupStyle = debounce$1(() => {
29959
29957
  if (!vnode.el) return;
29960
29958
  const triggerEl = getHackContainer();
29961
29959
  const {
@@ -29989,7 +29987,10 @@ var Vc = (function (exports, vue) {
29989
29987
  wrapperW.value = {
29990
29988
  width: `${triggerEl.getBoundingClientRect().width}px`
29991
29989
  };
29992
- };
29990
+ }, 50, {
29991
+ leading: true,
29992
+ trailing: false
29993
+ });
29993
29994
  let timer;
29994
29995
  let isPressMouse = false;
29995
29996
  const handleTriggerChange = (e) => {
@@ -30033,7 +30034,7 @@ var Vc = (function (exports, vue) {
30033
30034
  switch (direction[0]) {
30034
30035
  case "top":
30035
30036
  case "bottom":
30036
- if (left + vnode.el.offsetWidth >= window.innerWidth) {
30037
+ if (left + vnode.el.offsetWidth > window.innerWidth) {
30037
30038
  wrapperStyle.value = {
30038
30039
  ...wrapperStyle.value,
30039
30040
  left: `${window.innerWidth - vnode.el.offsetWidth}px`
@@ -30079,7 +30080,6 @@ var Vc = (function (exports, vue) {
30079
30080
  }
30080
30081
  });
30081
30082
  return () => {
30082
- let _slot;
30083
30083
  return vue.createVNode(TransitionScale, {
30084
30084
  "mode": props2.animation || "part",
30085
30085
  "duration": {
@@ -30087,35 +30087,37 @@ var Vc = (function (exports, vue) {
30087
30087
  leave: 150
30088
30088
  },
30089
30089
  "onAfterLeave": handleRemove
30090
- }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode("div", {
30091
- "style": [wrapperStyle.value, wrapperW.value, props2.portalStyle],
30092
- "class": [wrapperClasses.value, props2.portalClass, "vc-popover-wrapper"],
30093
- "onMousedown": () => !props2.hover && handleMouseDown(),
30094
- "onMouseenter": (e) => props2.hover && handleChange(e, {
30095
- visible: true
30096
- }),
30097
- "onMouseleave": (e) => props2.hover && handleChange(e, {
30098
- visible: false
30099
- })
30100
- }, [vue.createVNode("div", {
30101
- "class": [themeClasses.value, "vc-popover-wrapper__container"]
30102
- }, [props2.arrow && vue.createVNode("div", {
30103
- "style": arrowStyle.value,
30104
- "class": [themeClasses.value, posClasses.value, "vc-popover-wrapper__arrow"]
30105
- }, null), slots.content ? slots.content() : typeof props2.content === "function" ? vue.createVNode(Customer, {
30106
- "render": props2.content
30107
- }, null) : vue.createVNode("div", {
30108
- "innerHTML": props2.content
30109
- }, null)])]), [[vue.vShow, isActive.value]])) ? _slot : {
30110
- default: () => [_slot]
30090
+ }, {
30091
+ default: () => [vue.withDirectives(vue.createVNode("div", {
30092
+ "style": [wrapperStyle.value, wrapperW.value, props2.portalStyle],
30093
+ "class": [wrapperClasses.value, props2.portalClass, "vc-popover-wrapper"],
30094
+ "onMousedown": () => !props2.hover && handleMouseDown(),
30095
+ "onMouseenter": (e) => props2.hover && handleChange(e, {
30096
+ visible: true
30097
+ }),
30098
+ "onMouseleave": (e) => props2.hover && handleChange(e, {
30099
+ visible: false
30100
+ })
30101
+ }, [vue.createVNode("div", {
30102
+ "class": [themeClasses.value, "vc-popover-wrapper__container"]
30103
+ }, [props2.arrow && vue.createVNode("div", {
30104
+ "style": arrowStyle.value,
30105
+ "class": [themeClasses.value, posClasses.value, "vc-popover-wrapper__arrow"]
30106
+ }, null), slots.content ? slots.content() : typeof props2.content === "function" ? vue.createVNode(Customer, {
30107
+ "render": props2.content
30108
+ }, null) : vue.createVNode("div", {
30109
+ "innerHTML": props2.content
30110
+ }, null)])]), [[vue.vShow, isActive.value]])]
30111
30111
  });
30112
30112
  };
30113
30113
  }
30114
30114
  });
30115
- const PopoverPortal = new Portal(PopoverWrapper);
30116
- const COMPONENT_NAME$1p = "vc-popover";
30115
+ const PopoverPortal = new Portal(PopoverWrapper, {
30116
+ leaveDelay: 0
30117
+ });
30118
+ const COMPONENT_NAME$1r = "vc-popover";
30117
30119
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
30118
- name: COMPONENT_NAME$1p,
30120
+ name: COMPONENT_NAME$1r,
30119
30121
  props: props$Z,
30120
30122
  emits: ["update:modelValue", "visible-change", "ready", "close"],
30121
30123
  setup(props2, {
@@ -31191,9 +31193,9 @@ var Vc = (function (exports, vue) {
31191
31193
  }
31192
31194
  return view;
31193
31195
  };
31194
- const COMPONENT_NAME$1o = "vc-date-confirm";
31196
+ const COMPONENT_NAME$1q = "vc-date-confirm";
31195
31197
  const Confirm = /* @__PURE__ */ vue.defineComponent({
31196
- name: COMPONENT_NAME$1o,
31198
+ name: COMPONENT_NAME$1q,
31197
31199
  props: {
31198
31200
  showTime: {
31199
31201
  type: Boolean,
@@ -31254,9 +31256,9 @@ var Vc = (function (exports, vue) {
31254
31256
  };
31255
31257
  }
31256
31258
  });
31257
- const COMPONENT_NAME$1n = "vc-date-header";
31259
+ const COMPONENT_NAME$1p = "vc-date-header";
31258
31260
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
31259
- name: COMPONENT_NAME$1n,
31261
+ name: COMPONENT_NAME$1p,
31260
31262
  props: {
31261
31263
  panelDate: Date,
31262
31264
  showNext: {
@@ -31337,9 +31339,9 @@ var Vc = (function (exports, vue) {
31337
31339
  };
31338
31340
  }
31339
31341
  });
31340
- const COMPONENT_NAME$1m = "vc-date-table";
31342
+ const COMPONENT_NAME$1o = "vc-date-table";
31341
31343
  const DateTable = /* @__PURE__ */ vue.defineComponent({
31342
- name: COMPONENT_NAME$1m,
31344
+ name: COMPONENT_NAME$1o,
31343
31345
  props: {
31344
31346
  value: Array,
31345
31347
  firstDayOfWeek: {
@@ -31539,9 +31541,9 @@ var Vc = (function (exports, vue) {
31539
31541
  };
31540
31542
  }
31541
31543
  });
31542
- const COMPONENT_NAME$1l = "vc-month-table";
31544
+ const COMPONENT_NAME$1n = "vc-month-table";
31543
31545
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
31544
- name: COMPONENT_NAME$1l,
31546
+ name: COMPONENT_NAME$1n,
31545
31547
  props: {
31546
31548
  value: Array,
31547
31549
  panelDate: Date,
@@ -31667,7 +31669,7 @@ var Vc = (function (exports, vue) {
31667
31669
  };
31668
31670
  }
31669
31671
  });
31670
- const COMPONENT_NAME$1k = "vc-quarter-table";
31672
+ const COMPONENT_NAME$1m = "vc-quarter-table";
31671
31673
  const getMonthRange = (panelDate, quarter) => {
31672
31674
  const year = panelDate.getFullYear();
31673
31675
  const [startMonth, endMonth] = [quarter * 3, quarter * 3 + 2];
@@ -31694,7 +31696,7 @@ var Vc = (function (exports, vue) {
31694
31696
  }
31695
31697
  };
31696
31698
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
31697
- name: COMPONENT_NAME$1k,
31699
+ name: COMPONENT_NAME$1m,
31698
31700
  props: {
31699
31701
  value: Array,
31700
31702
  panelDate: Date,
@@ -31812,9 +31814,9 @@ var Vc = (function (exports, vue) {
31812
31814
  };
31813
31815
  }
31814
31816
  });
31815
- const COMPONENT_NAME$1j = "vc-shortcuts-select";
31817
+ const COMPONENT_NAME$1l = "vc-shortcuts-select";
31816
31818
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
31817
- name: COMPONENT_NAME$1j,
31819
+ name: COMPONENT_NAME$1l,
31818
31820
  props: {
31819
31821
  panelDate: Date,
31820
31822
  config: Array,
@@ -31851,9 +31853,9 @@ var Vc = (function (exports, vue) {
31851
31853
  };
31852
31854
  }
31853
31855
  });
31854
- const COMPONENT_NAME$1i = "vc-time-select";
31856
+ const COMPONENT_NAME$1k = "vc-time-select";
31855
31857
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
31856
- name: COMPONENT_NAME$1i,
31858
+ name: COMPONENT_NAME$1k,
31857
31859
  props: {
31858
31860
  hours: {
31859
31861
  type: [Number, String],
@@ -32128,9 +32130,9 @@ var Vc = (function (exports, vue) {
32128
32130
  };
32129
32131
  }
32130
32132
  });
32131
- const COMPONENT_NAME$1h = "vc-year-table";
32133
+ const COMPONENT_NAME$1j = "vc-year-table";
32132
32134
  const YearTable = /* @__PURE__ */ vue.defineComponent({
32133
- name: COMPONENT_NAME$1h,
32135
+ name: COMPONENT_NAME$1j,
32134
32136
  props: {
32135
32137
  value: Array,
32136
32138
  panelDate: Date,
@@ -32246,9 +32248,9 @@ var Vc = (function (exports, vue) {
32246
32248
  }
32247
32249
  return true;
32248
32250
  };
32249
- const COMPONENT_NAME$1g = "vc-date-range-panel";
32251
+ const COMPONENT_NAME$1i = "vc-date-range-panel";
32250
32252
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
32251
- name: COMPONENT_NAME$1g,
32253
+ name: COMPONENT_NAME$1i,
32252
32254
  props: {
32253
32255
  ...props$V,
32254
32256
  confirm: {
@@ -32609,9 +32611,9 @@ var Vc = (function (exports, vue) {
32609
32611
  };
32610
32612
  }
32611
32613
  });
32612
- const COMPONENT_NAME$1f = "vc-date-panel";
32614
+ const COMPONENT_NAME$1h = "vc-date-panel";
32613
32615
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
32614
- name: COMPONENT_NAME$1f,
32616
+ name: COMPONENT_NAME$1h,
32615
32617
  props: {
32616
32618
  ...props$V,
32617
32619
  type: String,
@@ -32810,9 +32812,9 @@ var Vc = (function (exports, vue) {
32810
32812
  const endYear = value[1].getFullYear();
32811
32813
  return startYear === endYear;
32812
32814
  };
32813
- const COMPONENT_NAME$1e = "vc-monthrange-panel";
32815
+ const COMPONENT_NAME$1g = "vc-monthrange-panel";
32814
32816
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
32815
- name: COMPONENT_NAME$1e,
32817
+ name: COMPONENT_NAME$1g,
32816
32818
  props: {
32817
32819
  ...props$V,
32818
32820
  confirm: {
@@ -32982,9 +32984,9 @@ var Vc = (function (exports, vue) {
32982
32984
  const endYear = value[1].getFullYear();
32983
32985
  return startYear === endYear;
32984
32986
  };
32985
- const COMPONENT_NAME$1d = "vc-quarterrange-panel";
32987
+ const COMPONENT_NAME$1f = "vc-quarterrange-panel";
32986
32988
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
32987
- name: COMPONENT_NAME$1d,
32989
+ name: COMPONENT_NAME$1f,
32988
32990
  props: {
32989
32991
  ...props$V,
32990
32992
  confirm: {
@@ -33215,9 +33217,9 @@ var Vc = (function (exports, vue) {
33215
33217
  seconds
33216
33218
  };
33217
33219
  };
33218
- const COMPONENT_NAME$1c = "vc-timerange-panel";
33220
+ const COMPONENT_NAME$1e = "vc-timerange-panel";
33219
33221
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
33220
- name: COMPONENT_NAME$1c,
33222
+ name: COMPONENT_NAME$1e,
33221
33223
  props: props$U,
33222
33224
  emits: ["pick", "clear", "ok"],
33223
33225
  setup(props2, {
@@ -33313,9 +33315,9 @@ var Vc = (function (exports, vue) {
33313
33315
  };
33314
33316
  }
33315
33317
  });
33316
- const COMPONENT_NAME$1b = "vc-time-panel";
33318
+ const COMPONENT_NAME$1d = "vc-time-panel";
33317
33319
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
33318
- name: COMPONENT_NAME$1b,
33320
+ name: COMPONENT_NAME$1d,
33319
33321
  props: props$U,
33320
33322
  emits: ["pick", "clear", "ok"],
33321
33323
  setup(props2, {
@@ -33366,7 +33368,7 @@ var Vc = (function (exports, vue) {
33366
33368
  };
33367
33369
  }
33368
33370
  });
33369
- const COMPONENT_NAME$1a = "vc-date-picker";
33371
+ const COMPONENT_NAME$1c = "vc-date-picker";
33370
33372
  const getPanel$1 = (type) => {
33371
33373
  if (["daterange", "datetimerange"].includes(type)) {
33372
33374
  return DateRangePanel;
@@ -33377,7 +33379,7 @@ var Vc = (function (exports, vue) {
33377
33379
  }
33378
33380
  return DatePanel;
33379
33381
  };
33380
- const DatePicker = createPicker(COMPONENT_NAME$1a, props$10, () => {
33382
+ const DatePicker = createPicker(COMPONENT_NAME$1c, props$10, () => {
33381
33383
  const props2 = vue.getCurrentInstance().props;
33382
33384
  const icon = vue.ref("date");
33383
33385
  const panel = vue.shallowRef({});
@@ -33405,9 +33407,9 @@ var Vc = (function (exports, vue) {
33405
33407
  default: "div"
33406
33408
  }
33407
33409
  };
33408
- const COMPONENT_NAME$19 = "vc-divider";
33410
+ const COMPONENT_NAME$1b = "vc-divider";
33409
33411
  const Divider = /* @__PURE__ */ vue.defineComponent({
33410
- name: COMPONENT_NAME$19,
33412
+ name: COMPONENT_NAME$1b,
33411
33413
  props: props$T,
33412
33414
  setup(props2, {
33413
33415
  slots
@@ -33554,7 +33556,7 @@ var Vc = (function (exports, vue) {
33554
33556
  barTo: props$R.to,
33555
33557
  ...pick(props$R, barKeys)
33556
33558
  };
33557
- const COMPONENT_NAME$18 = "vc-scroller-track";
33559
+ const COMPONENT_NAME$1a = "vc-scroller-track";
33558
33560
  const BAR_MAP = {
33559
33561
  vertical: {
33560
33562
  scroll: "scrollTop",
@@ -33574,7 +33576,7 @@ var Vc = (function (exports, vue) {
33574
33576
  }
33575
33577
  };
33576
33578
  const Track$1 = /* @__PURE__ */ vue.defineComponent({
33577
- name: COMPONENT_NAME$18,
33579
+ name: COMPONENT_NAME$1a,
33578
33580
  props: props$S,
33579
33581
  emits: ["change"],
33580
33582
  inheritAttrs: false,
@@ -33736,9 +33738,9 @@ var Vc = (function (exports, vue) {
33736
33738
  };
33737
33739
  }
33738
33740
  });
33739
- const COMPONENT_NAME$17 = "vc-scroller-bar";
33741
+ const COMPONENT_NAME$19 = "vc-scroller-bar";
33740
33742
  const Bar = /* @__PURE__ */ vue.defineComponent({
33741
- name: COMPONENT_NAME$17,
33743
+ name: COMPONENT_NAME$19,
33742
33744
  props: props$R,
33743
33745
  emits: ["change"],
33744
33746
  setup(props2, {
@@ -33949,9 +33951,9 @@ var Vc = (function (exports, vue) {
33949
33951
  refreshPosition
33950
33952
  };
33951
33953
  };
33952
- const COMPONENT_NAME$16 = "vc-scroller";
33954
+ const COMPONENT_NAME$18 = "vc-scroller";
33953
33955
  const Scroller = /* @__PURE__ */ vue.defineComponent({
33954
- name: COMPONENT_NAME$16,
33956
+ name: COMPONENT_NAME$18,
33955
33957
  props: props$Q,
33956
33958
  emits: ["scroll"],
33957
33959
  setup(props2, {
@@ -34009,9 +34011,9 @@ var Vc = (function (exports, vue) {
34009
34011
  };
34010
34012
  }
34011
34013
  });
34012
- const COMPONENT_NAME$15 = "vc-scroller-wheel";
34014
+ const COMPONENT_NAME$17 = "vc-scroller-wheel";
34013
34015
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
34014
- name: COMPONENT_NAME$15,
34016
+ name: COMPONENT_NAME$17,
34015
34017
  props: Object.assign(props$Q, {
34016
34018
  stopPropagation: {
34017
34019
  type: Boolean,
@@ -34192,9 +34194,9 @@ var Vc = (function (exports, vue) {
34192
34194
  type: Function
34193
34195
  }
34194
34196
  };
34195
- const COMPONENT_NAME$14 = "vc-drawer";
34197
+ const COMPONENT_NAME$16 = "vc-drawer";
34196
34198
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
34197
- name: COMPONENT_NAME$14,
34199
+ name: COMPONENT_NAME$16,
34198
34200
  props: props$P,
34199
34201
  emits: ["close", "update:modelValue", "visible-change"],
34200
34202
  setup(props2, {
@@ -34348,26 +34350,164 @@ var Vc = (function (exports, vue) {
34348
34350
  const MDrawer = Drawer;
34349
34351
  const MDrawerView = DrawerView;
34350
34352
  const props$O = {
34351
- tag: {
34353
+ modelValue: {
34354
+ type: Boolean,
34355
+ default: false
34356
+ },
34357
+ portalClass: [String, Object],
34358
+ placement: {
34352
34359
  type: String,
34353
- default: "div"
34360
+ default: "bottom"
34361
+ },
34362
+ trigger: {
34363
+ type: String,
34364
+ default: "hover"
34365
+ },
34366
+ arrow: {
34367
+ type: Boolean,
34368
+ default: false
34354
34369
  }
34355
34370
  };
34356
- const COMPONENT_NAME$13 = "vc-dropdown";
34371
+ const COMPONENT_NAME$15 = "vc-dropdown";
34357
34372
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
34358
- name: COMPONENT_NAME$13,
34373
+ name: COMPONENT_NAME$15,
34359
34374
  props: props$O,
34375
+ inheritAttrs: false,
34376
+ emits: ["update:modelValue", "ready", "close", "visible-change", "click"],
34360
34377
  setup(props2, {
34378
+ slots,
34379
+ emit,
34380
+ expose
34381
+ }) {
34382
+ const its = useAttrs({
34383
+ merge: false
34384
+ });
34385
+ const isActive = vue.ref(false);
34386
+ const dropdownId = vue.ref(getUid("dropdown"));
34387
+ const inherit = vue.computed(() => {
34388
+ return {
34389
+ style: its.value.style,
34390
+ class: its.value.class
34391
+ };
34392
+ });
34393
+ const attrs = vue.computed(() => {
34394
+ return its.value.attrs;
34395
+ });
34396
+ vue.watch(() => props2.modelValue, (v) => {
34397
+ isActive.value = v;
34398
+ }, {
34399
+ immediate: true
34400
+ });
34401
+ const sync = () => {
34402
+ emit("update:modelValue", isActive.value);
34403
+ emit("visible-change", isActive.value);
34404
+ };
34405
+ const handleChange = (v) => {
34406
+ isActive.value = v;
34407
+ sync();
34408
+ };
34409
+ const close = () => {
34410
+ isActive.value = false;
34411
+ sync();
34412
+ };
34413
+ expose({
34414
+ close,
34415
+ dropdownId
34416
+ });
34417
+ return () => {
34418
+ return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
34419
+ "modelValue": isActive.value,
34420
+ "placement": props2.placement,
34421
+ "trigger": props2.trigger,
34422
+ "arrow": props2.arrow,
34423
+ "portalClass": ["is-padding-none", "vc-dropdown-wrapper", props2.portalClass],
34424
+ "class": ["vc-dropdown", inherit.value.class],
34425
+ "style": inherit.value.style,
34426
+ "onReady": () => emit("ready"),
34427
+ "onClose": () => emit("close"),
34428
+ "onVisibleChange": handleChange
34429
+ }), {
34430
+ default: () => slots?.default?.(),
34431
+ content: () => slots?.content?.()
34432
+ });
34433
+ };
34434
+ }
34435
+ });
34436
+ const COMPONENT_NAME$14 = "vc-dropdown-menu";
34437
+ const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
34438
+ name: COMPONENT_NAME$14,
34439
+ setup(_, {
34361
34440
  slots
34362
34441
  }) {
34363
34442
  return () => {
34364
- return vue.createVNode("div", {
34365
- "class": "vc-dropdown"
34443
+ return vue.createVNode("ul", {
34444
+ "class": "vc-dropdown-menu"
34366
34445
  }, [slots?.default?.()]);
34367
34446
  };
34368
34447
  }
34369
34448
  });
34449
+ const COMPONENT_NAME$13 = "vc-dropdown-item";
34450
+ const DropdownItem = /* @__PURE__ */ vue.defineComponent({
34451
+ name: COMPONENT_NAME$13,
34452
+ props: {
34453
+ value: {
34454
+ type: [String, Number],
34455
+ value: void 0
34456
+ },
34457
+ label: {
34458
+ type: [String, Number],
34459
+ value: void 0
34460
+ },
34461
+ disabled: {
34462
+ type: Boolean,
34463
+ default: false
34464
+ },
34465
+ selected: {
34466
+ type: Boolean,
34467
+ default: false
34468
+ },
34469
+ divided: {
34470
+ type: Boolean,
34471
+ default: false
34472
+ },
34473
+ closable: {
34474
+ type: Boolean,
34475
+ default: true
34476
+ }
34477
+ },
34478
+ setup(props2, {
34479
+ slots,
34480
+ emit
34481
+ }) {
34482
+ const owner = getInstance$1("dropdown", "dropdownId");
34483
+ const currentValue = vue.computed(() => {
34484
+ const v = typeof props2.value === "undefined" || props2.value === "" ? props2.label : props2.value;
34485
+ return v;
34486
+ });
34487
+ const classes = vue.computed(() => {
34488
+ return {
34489
+ "is-selected": props2.selected,
34490
+ "is-divided": props2.divided,
34491
+ "is-disabled": props2.disabled
34492
+ };
34493
+ });
34494
+ const handleClick = (e) => {
34495
+ if (props2.disabled) return;
34496
+ emit("click", currentValue.value, e);
34497
+ owner.emit("click", currentValue.value, e);
34498
+ props2.closable && owner.exposed?.close();
34499
+ };
34500
+ return () => {
34501
+ return vue.createVNode("li", {
34502
+ "class": [classes.value, "vc-dropdown-item"],
34503
+ "onClick": handleClick
34504
+ }, [slots.default ? slots.default?.() : props2.label]);
34505
+ };
34506
+ }
34507
+ });
34370
34508
  const MDropdown = Dropdown;
34509
+ const MDropdownMenu = DropdownMenu;
34510
+ const MDropdownItem = DropdownItem;
34371
34511
  const props$N = {
34372
34512
  tag: {
34373
34513
  type: String,
@@ -35966,6 +36106,9 @@ var Vc = (function (exports, vue) {
35966
36106
  type: Boolean,
35967
36107
  default: false
35968
36108
  },
36109
+ // draggable为true时有效
36110
+ x: Number,
36111
+ y: Number,
35969
36112
  okText: {
35970
36113
  type: [String, Boolean],
35971
36114
  default: "确定"
@@ -36019,8 +36162,8 @@ var Vc = (function (exports, vue) {
36019
36162
  const header = vue.shallowRef();
36020
36163
  const scroller = vue.shallowRef();
36021
36164
  const resizer = vue.shallowRef();
36022
- const x = vue.ref(0);
36023
- const y = vue.ref(0);
36165
+ const x = vue.ref(props2.x);
36166
+ const y = vue.ref(props2.y);
36024
36167
  const isActive = vue.ref(false);
36025
36168
  const MAX_HEIGHT2 = IS_SERVER$3 ? 0 : window.innerHeight - 20;
36026
36169
  const MAX_WIDTH2 = IS_SERVER$3 ? 0 : window.innerWidth - 20;
@@ -36060,8 +36203,8 @@ var Vc = (function (exports, vue) {
36060
36203
  });
36061
36204
  const draggableStyle = vue.computed(() => {
36062
36205
  if (IS_SERVER$3 || !props2.draggable) return {};
36063
- const left = x.value || window.innerWidth / 2 - defaultSize.value.width / 2;
36064
- const top = y.value || window.innerHeight / 2 - defaultSize.value.height / 2;
36206
+ const left = typeof x.value === "undefined" ? window.innerWidth / 2 - defaultSize.value.width / 2 : x.value;
36207
+ const top = typeof y.value === "undefined" ? window.innerHeight / 2 - defaultSize.value.height / 2 : y.value;
36065
36208
  return {
36066
36209
  left: `${left}px`,
36067
36210
  top: `${top}px`
@@ -37544,22 +37687,171 @@ var Vc = (function (exports, vue) {
37544
37687
  });
37545
37688
  const MPicker = Picker;
37546
37689
  const props$p = {
37547
- tag: {
37690
+ title: {
37691
+ type: [String, Function],
37692
+ default: ""
37693
+ },
37694
+ content: {
37695
+ type: [String, Function],
37696
+ default: ""
37697
+ },
37698
+ modelValue: {
37699
+ type: Boolean,
37700
+ default: false
37701
+ },
37702
+ placement: {
37548
37703
  type: String,
37549
- default: "div"
37550
- }
37704
+ default: "top"
37705
+ },
37706
+ trigger: {
37707
+ type: String,
37708
+ default: "click"
37709
+ },
37710
+ okText: {
37711
+ type: String,
37712
+ default: "确定"
37713
+ },
37714
+ cancelText: {
37715
+ type: String,
37716
+ default: "取消"
37717
+ },
37718
+ okType: {
37719
+ type: String,
37720
+ default: "primary"
37721
+ },
37722
+ cancelType: {
37723
+ type: String,
37724
+ default: "default"
37725
+ },
37726
+ type: {
37727
+ type: String,
37728
+ default: "warning",
37729
+ validator: (v) => /(warning|info|success|error)/.test(v)
37730
+ },
37731
+ width: [String, Number],
37732
+ portalClass: [String, Object]
37551
37733
  };
37552
37734
  const COMPONENT_NAME$C = "vc-popconfirm";
37553
37735
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
37554
37736
  name: COMPONENT_NAME$C,
37555
37737
  props: props$p,
37738
+ inheritAttrs: false,
37739
+ emits: ["update:modelValue", "visible-change", "ready", "close", "cancel", "ok"],
37556
37740
  setup(props2, {
37557
- slots
37741
+ slots,
37742
+ emit
37558
37743
  }) {
37744
+ const instance = vue.getCurrentInstance();
37745
+ const its = useAttrs({
37746
+ merge: false
37747
+ });
37748
+ const isActive = vue.ref(false);
37749
+ const contentStyle = vue.computed(() => {
37750
+ return props2.content || !!slots.content ? {
37751
+ marginBottom: "15px"
37752
+ } : {};
37753
+ });
37754
+ const inherit = vue.computed(() => {
37755
+ return {
37756
+ style: its.value.style,
37757
+ class: its.value.class
37758
+ };
37759
+ });
37760
+ const attrs = vue.computed(() => {
37761
+ return its.value.attrs;
37762
+ });
37763
+ vue.watch(() => props2.modelValue, (v) => {
37764
+ isActive.value = v;
37765
+ }, {
37766
+ immediate: true
37767
+ });
37768
+ const sync = () => {
37769
+ emit("update:modelValue", isActive.value);
37770
+ emit("visible-change", isActive.value);
37771
+ };
37772
+ const handleBefore = (e, hook) => {
37773
+ e.stopPropagation();
37774
+ e.preventDefault();
37775
+ if (!isActive.value) return;
37776
+ const fn = hook && hook(e);
37777
+ if (fn && fn.then) {
37778
+ return fn.then((res) => {
37779
+ isActive.value = false;
37780
+ sync();
37781
+ return res;
37782
+ });
37783
+ } else if (!fn || fn === true) {
37784
+ isActive.value = false;
37785
+ sync();
37786
+ }
37787
+ };
37788
+ const handleOk = (...rest) => {
37789
+ const ok = instance.vnode.props?.onOk || (() => {
37790
+ });
37791
+ return ok(...rest);
37792
+ };
37793
+ const handleCancel = (...rest) => {
37794
+ const cancel = instance.vnode.props?.onCancel || (() => {
37795
+ });
37796
+ return cancel(...rest);
37797
+ };
37798
+ const handleChange = (v) => {
37799
+ isActive.value = v;
37800
+ sync();
37801
+ };
37559
37802
  return () => {
37560
- return vue.createVNode("div", {
37561
- "class": "vc-popconfirm"
37562
- }, [slots?.default?.()]);
37803
+ return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
37804
+ "modelValue": isActive.value,
37805
+ "placement": props2.placement,
37806
+ "trigger": props2.trigger,
37807
+ "portalClass": ["is-padding-none", "vc-popconfirm-wrapper", props2.portalClass],
37808
+ "class": ["vc-popconfirm", inherit.value.class],
37809
+ "style": inherit.value.style,
37810
+ "onReady": () => emit("ready"),
37811
+ "onClose": () => emit("close"),
37812
+ "onVisibleChange": handleChange
37813
+ }), {
37814
+ default: () => slots?.default?.(),
37815
+ content: () => {
37816
+ return vue.createVNode("div", {
37817
+ "style": [{
37818
+ width: `${props2.width}px`
37819
+ }],
37820
+ "class": "vc-popconfirm__wrapper"
37821
+ }, [vue.createVNode("div", {
37822
+ "class": "vc-popconfirm__title"
37823
+ }, [slots.icon ? slots.icon() : vue.createVNode(Icon, {
37824
+ "type": props2.type,
37825
+ "class": [`is-${props2.type}`, "vc-popconfirm__icon"]
37826
+ }, null), vue.createVNode("div", null, [slots.title ? slots.title() : typeof props2.title === "string" ? vue.createVNode("div", {
37827
+ "innerHTML": props2.title
37828
+ }, null) : typeof props2.title === "function" ? vue.createVNode(Customer, {
37829
+ "render": props2.title
37830
+ }, null) : null])]), vue.createVNode("div", {
37831
+ "style": contentStyle.value,
37832
+ "class": "vc-popconfirm__content"
37833
+ }, [slots.content ? slots.content() : typeof props2.content === "string" ? vue.createVNode("div", {
37834
+ "innerHTML": props2.content
37835
+ }, null) : typeof props2.content === "function" ? vue.createVNode(Customer, {
37836
+ "render": props2.content
37837
+ }, null) : null]), vue.createVNode("div", {
37838
+ "class": "vc-popconfirm__footer"
37839
+ }, [vue.createVNode(Button, {
37840
+ "type": props2.cancelType,
37841
+ "style": "margin-right: 8px;",
37842
+ "size": "small",
37843
+ "onClick": (e) => handleBefore(e, handleCancel)
37844
+ }, {
37845
+ default: () => [props2.cancelText]
37846
+ }), vue.createVNode(Button, {
37847
+ "type": props2.okType,
37848
+ "size": "small",
37849
+ "onClick": (e) => handleBefore(e, handleOk)
37850
+ }, {
37851
+ default: () => [props2.okText]
37852
+ })])]);
37853
+ }
37854
+ });
37563
37855
  };
37564
37856
  }
37565
37857
  });
@@ -40325,6 +40617,78 @@ var Vc = (function (exports, vue) {
40325
40617
  };
40326
40618
  }
40327
40619
  });
40620
+ const HIDDEN_TEXT_STYLE = `
40621
+ position: absolute!important;
40622
+ word-break: break-all!important;
40623
+ overflow: auto!important;
40624
+ opacity: 1!important;
40625
+ z-index: -1000!important;
40626
+ top: 0!important;
40627
+ right: 100px!important;
40628
+ `;
40629
+ const SIZING_STYLE$1 = [
40630
+ "letter-spacing",
40631
+ "line-height",
40632
+ "padding-top",
40633
+ "padding-bottom",
40634
+ "font-family",
40635
+ "font-weight",
40636
+ "font-size",
40637
+ "text-rendering",
40638
+ "text-transform",
40639
+ "width",
40640
+ // 'text-indent', // 需要额外计算
40641
+ "padding-left",
40642
+ "padding-right",
40643
+ "border-width",
40644
+ "box-sizing"
40645
+ ];
40646
+ let hiddenEl$1;
40647
+ const getFitIndex = (options = {}) => {
40648
+ const { el: el2, line, value, suffix, indent = 0 } = options;
40649
+ let lineHeight = parseInt(getStyle$1(el2, "line-height"), 10);
40650
+ if (!hiddenEl$1) {
40651
+ hiddenEl$1 = document.createElement("div");
40652
+ document.body.appendChild(hiddenEl$1);
40653
+ }
40654
+ el2.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el2.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
40655
+ const {
40656
+ paddingSize,
40657
+ borderSize,
40658
+ boxSizing,
40659
+ sizingStyle
40660
+ } = utils.getComputedStyle(el2, SIZING_STYLE$1);
40661
+ const textIndent = `text-indent: ${parseInt(getStyle$1(el2, "text-indent"), 10) + indent}px;`;
40662
+ hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
40663
+ let sideHeight = paddingSize || 0;
40664
+ boxSizing === "border-box" && (sideHeight += borderSize);
40665
+ if (Number.isNaN(lineHeight)) {
40666
+ hiddenEl$1.innerText = ".";
40667
+ lineHeight = hiddenEl$1.clientHeight - sideHeight;
40668
+ }
40669
+ let endIndex = -1;
40670
+ const strs = (typeof value === "number" ? `${value}` : value || "").split("");
40671
+ let innerText = "";
40672
+ for (let i = 0; i < strs.length; i++) {
40673
+ innerText += strs[i];
40674
+ hiddenEl$1.innerText = innerText;
40675
+ if (endIndex === -1 && hiddenEl$1.clientHeight - sideHeight > lineHeight * line) {
40676
+ endIndex = i;
40677
+ break;
40678
+ }
40679
+ }
40680
+ if (endIndex >= 0 && endIndex <= strs.length - 1) {
40681
+ for (let i = endIndex - 1; i >= 0; i--) {
40682
+ innerText = innerText.substring(0, i);
40683
+ hiddenEl$1.innerText = innerText + suffix;
40684
+ if (hiddenEl$1.clientHeight - sideHeight <= lineHeight * line) {
40685
+ endIndex = i;
40686
+ break;
40687
+ }
40688
+ }
40689
+ }
40690
+ return endIndex;
40691
+ };
40328
40692
  const TableBody = /* @__PURE__ */ vue.defineComponent({
40329
40693
  name: "vc-table-body",
40330
40694
  props: {
@@ -40433,10 +40797,13 @@ var Vc = (function (exports, vue) {
40433
40797
  column
40434
40798
  });
40435
40799
  }
40436
- return cellStyle;
40800
+ return {
40801
+ ...cellStyle,
40802
+ ...column.style
40803
+ };
40437
40804
  };
40438
40805
  const getCellClass = (rowIndex, columnIndex, row, column) => {
40439
- const classes = [column.realAlign, column.className];
40806
+ const classes = [column.realAlign, column.class];
40440
40807
  if (isColumnHidden(columnIndex)) {
40441
40808
  classes.push("is-hidden");
40442
40809
  }
@@ -40453,24 +40820,43 @@ var Vc = (function (exports, vue) {
40453
40820
  }
40454
40821
  return classes.join(" ");
40455
40822
  };
40456
- const handleCellMouseEnter = (e, row) => {
40823
+ let poper;
40824
+ const handleCellMouseEnter = (e, row, column) => {
40457
40825
  const cell = getCell(e);
40826
+ const hoverState = {
40827
+ cell,
40828
+ column,
40829
+ row
40830
+ };
40458
40831
  if (cell) {
40459
- const column = getColumnByCell(states.columns, cell);
40460
- const hoverState = {
40461
- cell,
40462
- column,
40463
- row
40464
- };
40465
40832
  table.hoverState.value = hoverState;
40466
40833
  table.emit("cell-mouse-enter", hoverState.row, hoverState.column, hoverState.cell, e);
40467
40834
  }
40835
+ const el2 = e.target.querySelector(".vc-table__text-line");
40836
+ if (!el2) return;
40837
+ const value = `${row[column.prop]}`;
40838
+ const endIndex = getFitIndex({
40839
+ el: el2,
40840
+ value,
40841
+ line: column.line,
40842
+ suffix: "..."
40843
+ });
40844
+ if (endIndex > 0 && endIndex < value.length - 1) {
40845
+ poper && poper.destroy();
40846
+ poper = Popover.open({
40847
+ el: document.body,
40848
+ triggerEl: el2,
40849
+ hover: true,
40850
+ alone: true,
40851
+ autoWidth: true,
40852
+ content: value
40853
+ });
40854
+ }
40468
40855
  };
40469
- const handleCellMouseLeave = (e) => {
40856
+ const handleCellMouseLeave = (e, row, column) => {
40470
40857
  const cell = getCell(e);
40471
40858
  if (!cell) return;
40472
- const oldHoverState = table.hoverState.value || {};
40473
- table.emit("cell-mouse-leave", oldHoverState.row, oldHoverState.column, oldHoverState.cell, e);
40859
+ table.emit("cell-mouse-leave", row, column, cell, e);
40474
40860
  };
40475
40861
  const handleMouseEnter = debounce$1((index) => {
40476
40862
  table.store.setHoverRow(index);
@@ -40541,8 +40927,8 @@ var Vc = (function (exports, vue) {
40541
40927
  "key": column.id,
40542
40928
  "style": [getCellStyle(rowIndex, columnIndex, row, column), sizeStyle],
40543
40929
  "class": [getCellClass(rowIndex, columnIndex, row, column), "vc-table__td"],
40544
- "onMouseenter": (e) => handleCellMouseEnter(e, row),
40545
- "onMouseleave": (e) => handleCellMouseLeave(e)
40930
+ "onMouseenter": (e) => handleCellMouseEnter(e, row, column),
40931
+ "onMouseleave": (e) => handleCellMouseLeave(e, row, column)
40546
40932
  }, [renderCell({
40547
40933
  row,
40548
40934
  column,
@@ -40598,7 +40984,11 @@ var Vc = (function (exports, vue) {
40598
40984
  allowRender.value = true;
40599
40985
  }
40600
40986
  });
40601
- vue.onBeforeUnmount(() => (timer && clearTimeout(timer), allowRender.value = false));
40987
+ vue.onBeforeUnmount(() => {
40988
+ poper && poper.destroy();
40989
+ timer && clearTimeout(timer);
40990
+ allowRender.value = false;
40991
+ });
40602
40992
  return () => {
40603
40993
  if (!allowRender.value) return;
40604
40994
  return vue.createVNode("div", {
@@ -40725,10 +41115,13 @@ var Vc = (function (exports, vue) {
40725
41115
  column
40726
41116
  });
40727
41117
  }
40728
- return headerCellStyle;
41118
+ return {
41119
+ ...headerCellStyle,
41120
+ ...column.style
41121
+ };
40729
41122
  };
40730
41123
  const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
40731
- const classes = [column.id, column.order, column.realHeaderAlign, column.className, column.labelClass];
41124
+ const classes = [column.id, column.order, column.realHeaderAlign, column.class, column.labelClass];
40732
41125
  if (rowIndex === 0 && columnsHidden.value[columnIndex]) {
40733
41126
  classes.push("is-hidden");
40734
41127
  }
@@ -41636,190 +42029,6 @@ var Vc = (function (exports, vue) {
41636
42029
  };
41637
42030
  }
41638
42031
  });
41639
- const props$b = {
41640
- tag: {
41641
- type: String,
41642
- default: "div"
41643
- },
41644
- value: {
41645
- type: String,
41646
- default: ""
41647
- },
41648
- line: {
41649
- type: Number,
41650
- default: 0
41651
- },
41652
- // TODO: 是否改为tail-indent来表示尾部缩进
41653
- indent: {
41654
- type: Number,
41655
- default: 0
41656
- },
41657
- resize: {
41658
- type: [Boolean, Number],
41659
- default: 100
41660
- },
41661
- suffix: {
41662
- type: String,
41663
- default: "..."
41664
- },
41665
- placement: {
41666
- type: String,
41667
- default: "top"
41668
- },
41669
- portalClass: [Object, String, Array],
41670
- portalStyle: [Object, String, Array],
41671
- renderRow: {
41672
- type: Function,
41673
- default: (props$) => {
41674
- return props$.value;
41675
- }
41676
- }
41677
- };
41678
- const HIDDEN_TEXT_STYLE = `
41679
- position: absolute!important;
41680
- word-break: break-all!important;
41681
- overflow: auto!important;
41682
- opacity: 0!important;
41683
- z-index: -1000!important;
41684
- top: 0!important;
41685
- right: 0!important;
41686
- `;
41687
- const SIZING_STYLE$1 = [
41688
- "letter-spacing",
41689
- "line-height",
41690
- "padding-top",
41691
- "padding-bottom",
41692
- "font-family",
41693
- "font-weight",
41694
- "font-size",
41695
- "text-rendering",
41696
- "text-transform",
41697
- "width",
41698
- // 'text-indent', // 需要额外计算
41699
- "padding-left",
41700
- "padding-right",
41701
- "border-width",
41702
- "box-sizing"
41703
- ];
41704
- let hiddenEl$1;
41705
- const getFitIndex = (options = {}) => {
41706
- const { el: el2, line, value, suffix, indent } = options;
41707
- let lineHeight = parseInt(getStyle$1(el2, "line-height"), 10);
41708
- if (!hiddenEl$1) {
41709
- hiddenEl$1 = document.createElement("div");
41710
- document.body.appendChild(hiddenEl$1);
41711
- }
41712
- el2.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el2.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
41713
- const {
41714
- paddingSize,
41715
- borderSize,
41716
- boxSizing,
41717
- sizingStyle
41718
- } = utils.getComputedStyle(el2, SIZING_STYLE$1);
41719
- const textIndent = `text-indent: ${parseInt(getStyle$1(el2, "text-indent"), 10) + indent}px;`;
41720
- hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
41721
- let sideHeight = paddingSize || 0;
41722
- boxSizing === "border-box" && (sideHeight += borderSize);
41723
- if (Number.isNaN(lineHeight)) {
41724
- hiddenEl$1.innerText = ".";
41725
- lineHeight = hiddenEl$1.clientHeight - sideHeight;
41726
- }
41727
- let endIndex = 0;
41728
- hiddenEl$1.innerText = suffix;
41729
- (value || "").split("").forEach((item, i) => {
41730
- let old = hiddenEl$1.innerText;
41731
- old = old.substring(0, old.length - suffix.length);
41732
- hiddenEl$1.innerText = old + item + suffix;
41733
- if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
41734
- endIndex = i;
41735
- }
41736
- });
41737
- return endIndex;
41738
- };
41739
- const COMPONENT_NAME$h = "vc-text";
41740
- const Text = /* @__PURE__ */ vue.defineComponent({
41741
- name: COMPONENT_NAME$h,
41742
- props: props$b,
41743
- setup(props2, {
41744
- emit
41745
- }) {
41746
- const instance = vue.getCurrentInstance();
41747
- const isActive = vue.ref(false);
41748
- const endIndex = vue.ref(0);
41749
- const styles = vue.computed(() => {
41750
- return {
41751
- cursor: endIndex.value === 0 ? "unset" : "pointer"
41752
- };
41753
- });
41754
- const calcPosition = () => {
41755
- const {
41756
- suffix,
41757
- line,
41758
- value,
41759
- indent
41760
- } = props2;
41761
- if (line === 0) {
41762
- endIndex.value = 0;
41763
- isActive.value = true;
41764
- } else {
41765
- endIndex.value = getFitIndex({
41766
- el: instance.vnode.el,
41767
- line,
41768
- value,
41769
- suffix,
41770
- indent
41771
- });
41772
- isActive.value = true;
41773
- }
41774
- emit("clip", endIndex.value);
41775
- };
41776
- const handleResize = props2.resize === true || props2.resize === 0 ? calcPosition : debounce$1(calcPosition, props2.resize || 0);
41777
- let poper;
41778
- const handleMouseOver = (e) => {
41779
- if (endIndex.value > 0) {
41780
- poper = Popover.open({
41781
- el: document.body,
41782
- name: "vc-text-popover",
41783
- // 确保不重复创建
41784
- triggerEl: e.target,
41785
- hover: true,
41786
- theme: "dark",
41787
- placement: props2.placement,
41788
- portalClass: props2.portalClass,
41789
- portalStyle: [props2.portalStyle || `width: ${e.target.clientWidth}px`, "word-break: break-all"],
41790
- content: props2.value
41791
- });
41792
- }
41793
- };
41794
- const handleMouseOut = () => {
41795
- };
41796
- ["value", "indent", "line"].forEach((key) => {
41797
- vue.watch(() => props2[key], calcPosition);
41798
- });
41799
- vue.onMounted(() => {
41800
- props2.resize !== false && Resize.on(instance.vnode.el, handleResize);
41801
- });
41802
- vue.onBeforeUnmount(() => {
41803
- props2.resize !== false && Resize.off(instance.vnode.el, handleResize);
41804
- poper?.destroy?.();
41805
- });
41806
- const Content = props2.tag;
41807
- return () => {
41808
- return vue.createVNode(Content, {
41809
- "class": "vc-text",
41810
- "style": styles.value,
41811
- "onMouseover": handleMouseOver,
41812
- "onMouseout": handleMouseOut
41813
- }, {
41814
- default: () => [isActive.value ? vue.createVNode(Customer, {
41815
- "value": endIndex.value > 0 ? `${props2.value.slice(0, endIndex.value)}${props2.suffix}` : props2.value,
41816
- "index": endIndex.value,
41817
- "render": props2.renderRow
41818
- }, null) : null]
41819
- });
41820
- };
41821
- }
41822
- });
41823
42032
  const cellStarts = {
41824
42033
  default: {
41825
42034
  order: ""
@@ -41827,8 +42036,7 @@ var Vc = (function (exports, vue) {
41827
42036
  selection: {
41828
42037
  width: 60,
41829
42038
  minWidth: 60,
41830
- order: "",
41831
- className: "vc-table-column--selection"
42039
+ order: ""
41832
42040
  },
41833
42041
  expand: {
41834
42042
  width: 60,
@@ -41872,7 +42080,8 @@ var Vc = (function (exports, vue) {
41872
42080
  }, null), [[vue.vShow, store.states.expandSelectable || level === 0]]);
41873
42081
  },
41874
42082
  sortable: false,
41875
- resizable: false
42083
+ resizable: false,
42084
+ class: "vc-table__selection-column"
41876
42085
  },
41877
42086
  index: {
41878
42087
  renderHeader(h2, {
@@ -41922,7 +42131,7 @@ var Vc = (function (exports, vue) {
41922
42131
  },
41923
42132
  sortable: false,
41924
42133
  resizable: false,
41925
- className: "vc-table__expand-column"
42134
+ class: "vc-table__expand-column"
41926
42135
  }
41927
42136
  };
41928
42137
  const defaultRenderCell = (rowData = {}) => {
@@ -41940,17 +42149,13 @@ var Vc = (function (exports, vue) {
41940
42149
  }
41941
42150
  const line = column.line || VcInstance.options.TableColumn?.line;
41942
42151
  if (line && value) {
41943
- const base = rowData.isHead || rowData.isTail ? 36 : 24;
41944
42152
  const style2 = {
41945
- // 目前左右pading为10
41946
- // TODO: 含有border还要-1
41947
- width: (column.realWidth || column.width) - base + "px"
42153
+ "-webkit-line-clamp": line
41948
42154
  };
41949
- return vue.createVNode(Text, {
41950
- "style": style2,
41951
- "line": line,
41952
- "value": `${value}`
41953
- }, null);
42155
+ return vue.createVNode("div", {
42156
+ "class": "vc-table__text-line",
42157
+ "style": style2
42158
+ }, [value]);
41954
42159
  }
41955
42160
  return value;
41956
42161
  };
@@ -41995,6 +42200,7 @@ var Vc = (function (exports, vue) {
41995
42200
  };
41996
42201
  const TableColumn = /* @__PURE__ */ vue.defineComponent({
41997
42202
  name: "vc-table-column",
42203
+ inheritAttrs: false,
41998
42204
  props: {
41999
42205
  type: {
42000
42206
  type: String,
@@ -42006,7 +42212,6 @@ var Vc = (function (exports, vue) {
42006
42212
  default: 0
42007
42213
  },
42008
42214
  label: String,
42009
- customClass: String,
42010
42215
  labelClass: String,
42011
42216
  prop: String,
42012
42217
  width: Number,
@@ -42043,7 +42248,8 @@ var Vc = (function (exports, vue) {
42043
42248
  tooltip: [String, Function]
42044
42249
  },
42045
42250
  setup(props2, {
42046
- slots
42251
+ slots,
42252
+ attrs
42047
42253
  }) {
42048
42254
  const instance = vue.getCurrentInstance();
42049
42255
  const table = vue.inject("vc-table");
@@ -42080,7 +42286,7 @@ var Vc = (function (exports, vue) {
42080
42286
  Object.keys(source).forEach((prop) => {
42081
42287
  const value = source[prop];
42082
42288
  if (value !== void 0) {
42083
- column[prop] = prop === "customClass" ? `${column[prop]} ${value}` : value;
42289
+ column[prop] = prop === "class" ? `${column[prop] ? `${column[prop]} ` : ""}${value}` : value;
42084
42290
  }
42085
42291
  });
42086
42292
  return column;
@@ -42125,7 +42331,7 @@ var Vc = (function (exports, vue) {
42125
42331
  };
42126
42332
  if (!isEmpty$1(table.store.states.treeData) && !prefix2 && data.isExpandColumn) {
42127
42333
  prefix2 = vue.createVNode("span", {
42128
- "class": "vc-table-un-expand__indent"
42334
+ "class": "vc-table__unexpand__indent"
42129
42335
  }, null);
42130
42336
  }
42131
42337
  const {
@@ -42141,6 +42347,8 @@ var Vc = (function (exports, vue) {
42141
42347
  const defaults2 = {
42142
42348
  colspan: 1,
42143
42349
  rowspan: 1,
42350
+ class: attrs.class,
42351
+ style: attrs.style,
42144
42352
  ...cellStarts[props2.type],
42145
42353
  id: columnId.value,
42146
42354
  realAlign,
@@ -42212,7 +42420,7 @@ var Vc = (function (exports, vue) {
42212
42420
  });
42213
42421
  const MTable = Table;
42214
42422
  const MTableColumn = TableColumn;
42215
- const props$a = {
42423
+ const props$b = {
42216
42424
  type: {
42217
42425
  type: String,
42218
42426
  validator: (v) => /^(line|card)$/.test(v),
@@ -42367,10 +42575,10 @@ var Vc = (function (exports, vue) {
42367
42575
  handleChange
42368
42576
  };
42369
42577
  };
42370
- const COMPONENT_NAME$g = "vc-tabs";
42578
+ const COMPONENT_NAME$h = "vc-tabs";
42371
42579
  const Tabs = /* @__PURE__ */ vue.defineComponent({
42372
- name: COMPONENT_NAME$g,
42373
- props: props$a,
42580
+ name: COMPONENT_NAME$h,
42581
+ props: props$b,
42374
42582
  emits: ["update:modelValue", "change", "click"],
42375
42583
  setup(props2, {
42376
42584
  slots
@@ -42515,7 +42723,7 @@ var Vc = (function (exports, vue) {
42515
42723
  };
42516
42724
  }
42517
42725
  });
42518
- const props$9 = {
42726
+ const props$a = {
42519
42727
  value: {
42520
42728
  type: [String, Number]
42521
42729
  },
@@ -42593,10 +42801,10 @@ var Vc = (function (exports, vue) {
42593
42801
  currentValue
42594
42802
  };
42595
42803
  };
42596
- const COMPONENT_NAME$f = "vc-tabs-pane";
42804
+ const COMPONENT_NAME$g = "vc-tabs-pane";
42597
42805
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
42598
- name: COMPONENT_NAME$f,
42599
- props: props$9,
42806
+ name: COMPONENT_NAME$g,
42807
+ props: props$a,
42600
42808
  setup(_, {
42601
42809
  slots
42602
42810
  }) {
@@ -42610,8 +42818,8 @@ var Vc = (function (exports, vue) {
42610
42818
  };
42611
42819
  }
42612
42820
  });
42613
- const props$8 = {
42614
- ...props$a,
42821
+ const props$9 = {
42822
+ ...props$b,
42615
42823
  theme: {
42616
42824
  type: String,
42617
42825
  default: "light",
@@ -42646,10 +42854,10 @@ var Vc = (function (exports, vue) {
42646
42854
  default: false
42647
42855
  }
42648
42856
  };
42649
- const COMPONENT_NAME$e = "vcm-tabs";
42857
+ const COMPONENT_NAME$f = "vcm-tabs";
42650
42858
  const MTabs = /* @__PURE__ */ vue.defineComponent({
42651
- name: COMPONENT_NAME$e,
42652
- props: props$8,
42859
+ name: COMPONENT_NAME$f,
42860
+ props: props$9,
42653
42861
  emits: ["update:modelValue", "change", "click"],
42654
42862
  setup(props2, {
42655
42863
  slots
@@ -42876,10 +43084,10 @@ var Vc = (function (exports, vue) {
42876
43084
  };
42877
43085
  }
42878
43086
  });
42879
- const COMPONENT_NAME$d = "vcm-tabs-pane";
43087
+ const COMPONENT_NAME$e = "vcm-tabs-pane";
42880
43088
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
42881
- name: COMPONENT_NAME$d,
42882
- props: props$9,
43089
+ name: COMPONENT_NAME$e,
43090
+ props: props$a,
42883
43091
  setup(_, {
42884
43092
  slots
42885
43093
  }) {
@@ -42894,6 +43102,129 @@ var Vc = (function (exports, vue) {
42894
43102
  }
42895
43103
  });
42896
43104
  const MTag = Tag;
43105
+ const props$8 = {
43106
+ tag: {
43107
+ type: String,
43108
+ default: "div"
43109
+ },
43110
+ value: {
43111
+ type: String,
43112
+ default: ""
43113
+ },
43114
+ line: {
43115
+ type: Number,
43116
+ default: 0
43117
+ },
43118
+ // TODO: 是否改为tail-indent来表示尾部缩进
43119
+ indent: {
43120
+ type: Number,
43121
+ default: 0
43122
+ },
43123
+ resize: {
43124
+ type: [Boolean, Number],
43125
+ default: 100
43126
+ },
43127
+ suffix: {
43128
+ type: String,
43129
+ default: "..."
43130
+ },
43131
+ placement: {
43132
+ type: String,
43133
+ default: "top"
43134
+ },
43135
+ portalClass: [Object, String, Array],
43136
+ portalStyle: [Object, String, Array],
43137
+ renderRow: {
43138
+ type: Function,
43139
+ default: (props$) => {
43140
+ return props$.value;
43141
+ }
43142
+ }
43143
+ };
43144
+ const COMPONENT_NAME$d = "vc-text";
43145
+ const Text = /* @__PURE__ */ vue.defineComponent({
43146
+ name: COMPONENT_NAME$d,
43147
+ props: props$8,
43148
+ setup(props2, {
43149
+ emit
43150
+ }) {
43151
+ const instance = vue.getCurrentInstance();
43152
+ const isActive = vue.ref(false);
43153
+ const endIndex = vue.ref(-1);
43154
+ const styles = vue.computed(() => {
43155
+ return {
43156
+ cursor: endIndex.value <= 0 ? "unset" : "pointer"
43157
+ };
43158
+ });
43159
+ const calcPosition = () => {
43160
+ const {
43161
+ suffix,
43162
+ line,
43163
+ value,
43164
+ indent
43165
+ } = props2;
43166
+ if (line === 0) {
43167
+ endIndex.value = -1;
43168
+ isActive.value = true;
43169
+ } else {
43170
+ endIndex.value = getFitIndex({
43171
+ el: instance.vnode.el,
43172
+ line,
43173
+ value,
43174
+ suffix,
43175
+ indent
43176
+ });
43177
+ isActive.value = true;
43178
+ }
43179
+ emit("clip", endIndex.value);
43180
+ };
43181
+ const handleResize = props2.resize === true || props2.resize === 0 ? calcPosition : debounce$1(calcPosition, props2.resize || 0);
43182
+ let poper;
43183
+ const handleMouseOver = (e) => {
43184
+ if (endIndex.value > 0) {
43185
+ poper = Popover.open({
43186
+ el: document.body,
43187
+ name: "vc-text-popover",
43188
+ // 确保不重复创建
43189
+ triggerEl: e.target,
43190
+ hover: true,
43191
+ theme: "dark",
43192
+ placement: props2.placement,
43193
+ portalClass: props2.portalClass,
43194
+ portalStyle: [props2.portalStyle || `width: ${e.target.clientWidth}px`, "word-break: break-all"],
43195
+ content: props2.value
43196
+ });
43197
+ }
43198
+ };
43199
+ const handleMouseOut = () => {
43200
+ };
43201
+ ["value", "indent", "line"].forEach((key) => {
43202
+ vue.watch(() => props2[key], calcPosition);
43203
+ });
43204
+ vue.onMounted(() => {
43205
+ props2.resize !== false && Resize.on(instance.vnode.el, handleResize);
43206
+ });
43207
+ vue.onBeforeUnmount(() => {
43208
+ props2.resize !== false && Resize.off(instance.vnode.el, handleResize);
43209
+ poper?.destroy?.();
43210
+ });
43211
+ const Content = props2.tag;
43212
+ return () => {
43213
+ return vue.createVNode(Content, {
43214
+ "class": "vc-text",
43215
+ "style": styles.value,
43216
+ "onMouseover": handleMouseOver,
43217
+ "onMouseout": handleMouseOut
43218
+ }, {
43219
+ default: () => [isActive.value ? vue.createVNode(Customer, {
43220
+ "value": endIndex.value > 0 ? `${props2.value.slice(0, endIndex.value)}${props2.suffix}` : props2.value,
43221
+ "index": endIndex.value,
43222
+ "render": props2.renderRow
43223
+ }, null) : null]
43224
+ });
43225
+ };
43226
+ }
43227
+ });
42897
43228
  const MText = Text;
42898
43229
  const HIDDEN_TEXTAREA_STYLE = `
42899
43230
  min-height:0 !important;
@@ -44549,10 +44880,10 @@ var Vc = (function (exports, vue) {
44549
44880
  MDrawerView,
44550
44881
  Dropdown,
44551
44882
  MDropdown,
44552
- // DropdownItem,
44553
- // MDropdownItem,
44554
- // DropdownMenu,
44555
- // MDropdownMenu,
44883
+ DropdownItem,
44884
+ MDropdownItem,
44885
+ DropdownMenu,
44886
+ MDropdownMenu,
44556
44887
  Editor,
44557
44888
  MEditor,
44558
44889
  // EditorView,
@@ -131921,6 +132252,8 @@ var Vc = (function (exports, vue) {
131921
132252
  exports.Drawer = Drawer;
131922
132253
  exports.DrawerView = DrawerView;
131923
132254
  exports.Dropdown = Dropdown;
132255
+ exports.DropdownItem = DropdownItem;
132256
+ exports.DropdownMenu = DropdownMenu;
131924
132257
  exports.Editor = Editor;
131925
132258
  exports.Expand = Expand$1;
131926
132259
  exports.Form = Form;
@@ -131962,6 +132295,8 @@ var Vc = (function (exports, vue) {
131962
132295
  exports.MDrawer = MDrawer;
131963
132296
  exports.MDrawerView = MDrawerView;
131964
132297
  exports.MDropdown = MDropdown;
132298
+ exports.MDropdownItem = MDropdownItem;
132299
+ exports.MDropdownMenu = MDropdownMenu;
131965
132300
  exports.MEditor = MEditor;
131966
132301
  exports.MExpand = MExpand;
131967
132302
  exports.MForm = MForm;