@deot/vc-components 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.
package/dist/index.cjs CHANGED
@@ -103,9 +103,9 @@ const props$1q = {
103
103
 
104
104
  /** @jsxImportSource vue */
105
105
 
106
- const COMPONENT_NAME$20 = 'vc-action-sheet';
106
+ const COMPONENT_NAME$22 = 'vc-action-sheet';
107
107
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
108
- name: COMPONENT_NAME$20,
108
+ name: COMPONENT_NAME$22,
109
109
  props: props$1q,
110
110
  setup(props, {
111
111
  slots
@@ -292,9 +292,9 @@ const IconManager = new Manager();
292
292
 
293
293
  /** @jsxImportSource vue */
294
294
 
295
- const COMPONENT_NAME$1$ = 'vc-icon';
295
+ const COMPONENT_NAME$21 = 'vc-icon';
296
296
  const Icon = /* @__PURE__ */ vue.defineComponent({
297
- name: COMPONENT_NAME$1$,
297
+ name: COMPONENT_NAME$21,
298
298
  props: props$1o,
299
299
  setup(props) {
300
300
  const viewBox = vue.ref('0 0 1024 1024');
@@ -493,9 +493,9 @@ const useTransition = () => {
493
493
  };
494
494
  };
495
495
 
496
- const COMPONENT_NAME$1_ = "vc-transition";
496
+ const COMPONENT_NAME$20 = "vc-transition";
497
497
  const Transition = vue.defineComponent({
498
- name: COMPONENT_NAME$1_,
498
+ name: COMPONENT_NAME$20,
499
499
  props: props$1n,
500
500
  // 当不声明emits的情况下,事件存在于attrs中
501
501
  inheritAttrs: false,
@@ -516,9 +516,9 @@ const Transition = vue.defineComponent({
516
516
  }
517
517
  });
518
518
 
519
- const COMPONENT_NAME$1Z = "vc-transition-collapse";
519
+ const COMPONENT_NAME$1$ = "vc-transition-collapse";
520
520
  const TransitionCollapse = vue.defineComponent({
521
- name: COMPONENT_NAME$1Z,
521
+ name: COMPONENT_NAME$1$,
522
522
  props: props$1n,
523
523
  // 当不声明emits的情况下,事件存在于attrs中
524
524
  inheritAttrs: false,
@@ -637,9 +637,9 @@ const TransitionCollapse = vue.defineComponent({
637
637
  }
638
638
  });
639
639
 
640
- const COMPONENT_NAME$1Y = "vc-transition-fade";
640
+ const COMPONENT_NAME$1_ = "vc-transition-fade";
641
641
  const TransitionFade = vue.defineComponent({
642
- name: COMPONENT_NAME$1Y,
642
+ name: COMPONENT_NAME$1_,
643
643
  props: {
644
644
  ...props$1n,
645
645
  // inheritAttrs必须是false
@@ -674,9 +674,9 @@ const TransitionFade = vue.defineComponent({
674
674
  }
675
675
  });
676
676
 
677
- const COMPONENT_NAME$1X = "vc-transition-scale";
677
+ const COMPONENT_NAME$1Z = "vc-transition-scale";
678
678
  const TransitionScale = vue.defineComponent({
679
- name: COMPONENT_NAME$1X,
679
+ name: COMPONENT_NAME$1Z,
680
680
  props: {
681
681
  ...props$1n,
682
682
  mode: {
@@ -716,9 +716,9 @@ const TransitionScale = vue.defineComponent({
716
716
  }
717
717
  });
718
718
 
719
- const COMPONENT_NAME$1W = "vc-transition-slide";
719
+ const COMPONENT_NAME$1Y = "vc-transition-slide";
720
720
  const TransitionSlide = vue.defineComponent({
721
- name: COMPONENT_NAME$1W,
721
+ name: COMPONENT_NAME$1Y,
722
722
  props: {
723
723
  ...props$1n,
724
724
  mode: {
@@ -758,9 +758,9 @@ const TransitionSlide = vue.defineComponent({
758
758
  }
759
759
  });
760
760
 
761
- const COMPONENT_NAME$1V = "vc-transition-zoom";
761
+ const COMPONENT_NAME$1X = "vc-transition-zoom";
762
762
  const TransitionZoom = vue.defineComponent({
763
- name: COMPONENT_NAME$1V,
763
+ name: COMPONENT_NAME$1X,
764
764
  props: {
765
765
  ...props$1n,
766
766
  mode: {
@@ -802,7 +802,7 @@ const TransitionZoom = vue.defineComponent({
802
802
 
803
803
  /** @jsxImportSource vue */
804
804
 
805
- const COMPONENT_NAME$1U = 'vc-alert';
805
+ const COMPONENT_NAME$1W = 'vc-alert';
806
806
 
807
807
  // [color, borderColor, backgroundColor], -> CSS
808
808
  const THEME_MAP = {
@@ -812,7 +812,7 @@ const THEME_MAP = {
812
812
  warning: ['#ffbf00', '#ffe58f', '#fffbe6']
813
813
  };
814
814
  const Alert = /* @__PURE__ */ vue.defineComponent({
815
- name: COMPONENT_NAME$1U,
815
+ name: COMPONENT_NAME$1W,
816
816
  props: props$1p,
817
817
  setup(props, {
818
818
  slots,
@@ -911,9 +911,9 @@ const props$1m = {
911
911
 
912
912
  /** @jsxImportSource vue */
913
913
 
914
- const COMPONENT_NAME$1T = 'vc-artboard';
914
+ const COMPONENT_NAME$1V = 'vc-artboard';
915
915
  const Artboard = /* @__PURE__ */ vue.defineComponent({
916
- name: COMPONENT_NAME$1T,
916
+ name: COMPONENT_NAME$1V,
917
917
  props: props$1m,
918
918
  setup(props, {
919
919
  slots
@@ -952,9 +952,9 @@ const props$1l = {
952
952
 
953
953
  /** @jsxImportSource vue */
954
954
 
955
- const COMPONENT_NAME$1S = 'vc-spin';
955
+ const COMPONENT_NAME$1U = 'vc-spin';
956
956
  const Spin = /* @__PURE__ */ vue.defineComponent({
957
- name: COMPONENT_NAME$1S,
957
+ name: COMPONENT_NAME$1U,
958
958
  props: props$1l,
959
959
  setup(props, {
960
960
  slots
@@ -1005,9 +1005,9 @@ const props$1k = {
1005
1005
  exclude: RegExp
1006
1006
  };
1007
1007
 
1008
- const COMPONENT_NAME$1R = "vc-debounce";
1008
+ const COMPONENT_NAME$1T = "vc-debounce";
1009
1009
  const Debounce = vue.defineComponent({
1010
- name: COMPONENT_NAME$1R,
1010
+ name: COMPONENT_NAME$1T,
1011
1011
  props: props$1k,
1012
1012
  /**
1013
1013
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
@@ -1079,9 +1079,9 @@ const props$1j = {
1079
1079
 
1080
1080
  /** @jsxImportSource vue */
1081
1081
 
1082
- const COMPONENT_NAME$1Q = 'vc-button';
1082
+ const COMPONENT_NAME$1S = 'vc-button';
1083
1083
  const Button = /* @__PURE__ */ vue.defineComponent({
1084
- name: COMPONENT_NAME$1Q,
1084
+ name: COMPONENT_NAME$1S,
1085
1085
  emits: ['click'],
1086
1086
  props: props$1j,
1087
1087
  setup(props, {
@@ -1163,9 +1163,9 @@ const props$1i = {
1163
1163
 
1164
1164
  /** @jsxImportSource vue */
1165
1165
 
1166
- const COMPONENT_NAME$1P = 'vc-button-group';
1166
+ const COMPONENT_NAME$1R = 'vc-button-group';
1167
1167
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
1168
- name: COMPONENT_NAME$1P,
1168
+ name: COMPONENT_NAME$1R,
1169
1169
  props: props$1i,
1170
1170
  setup(props, {
1171
1171
  slots
@@ -1199,9 +1199,9 @@ const props$1h = {
1199
1199
 
1200
1200
  /** @jsxImportSource vue */
1201
1201
 
1202
- const COMPONENT_NAME$1O = 'vc-calendar';
1202
+ const COMPONENT_NAME$1Q = 'vc-calendar';
1203
1203
  const Calendar = /* @__PURE__ */ vue.defineComponent({
1204
- name: COMPONENT_NAME$1O,
1204
+ name: COMPONENT_NAME$1Q,
1205
1205
  props: props$1h,
1206
1206
  setup(props, {
1207
1207
  slots
@@ -1239,9 +1239,9 @@ const props$1g = {
1239
1239
 
1240
1240
  /** @jsxImportSource vue */
1241
1241
 
1242
- const COMPONENT_NAME$1N = 'vc-card';
1242
+ const COMPONENT_NAME$1P = 'vc-card';
1243
1243
  const Card = /* @__PURE__ */ vue.defineComponent({
1244
- name: COMPONENT_NAME$1N,
1244
+ name: COMPONENT_NAME$1P,
1245
1245
  props: props$1g,
1246
1246
  setup(props, {
1247
1247
  slots
@@ -1277,9 +1277,9 @@ const props$1f = {
1277
1277
 
1278
1278
  /** @jsxImportSource vue */
1279
1279
 
1280
- const COMPONENT_NAME$1M = 'vc-carousel';
1280
+ const COMPONENT_NAME$1O = 'vc-carousel';
1281
1281
  const Carousel = /* @__PURE__ */ vue.defineComponent({
1282
- name: COMPONENT_NAME$1M,
1282
+ name: COMPONENT_NAME$1O,
1283
1283
  props: props$1f,
1284
1284
  setup(props, {
1285
1285
  slots
@@ -1303,9 +1303,9 @@ const props$1e = {
1303
1303
 
1304
1304
  /** @jsxImportSource vue */
1305
1305
 
1306
- const COMPONENT_NAME$1L = 'vc-cascader';
1306
+ const COMPONENT_NAME$1N = 'vc-cascader';
1307
1307
  const Cascader = /* @__PURE__ */ vue.defineComponent({
1308
- name: COMPONENT_NAME$1L,
1308
+ name: COMPONENT_NAME$1N,
1309
1309
  props: props$1e,
1310
1310
  setup(props, {
1311
1311
  slots
@@ -1374,9 +1374,9 @@ const props$1d = {
1374
1374
 
1375
1375
  /** @jsxImportSource vue */
1376
1376
 
1377
- const COMPONENT_NAME$1K = 'vc-chart';
1377
+ const COMPONENT_NAME$1M = 'vc-chart';
1378
1378
  const Chart = /* @__PURE__ */ vue.defineComponent({
1379
- name: COMPONENT_NAME$1K,
1379
+ name: COMPONENT_NAME$1M,
1380
1380
  props: props$1d,
1381
1381
  emits: [...EVENTS, 'ready'],
1382
1382
  setup(props, {
@@ -1608,9 +1608,9 @@ const useCheckbox = () => {
1608
1608
 
1609
1609
  /** @jsxImportSource vue */
1610
1610
 
1611
- const COMPONENT_NAME$1J = 'vc-checkbox';
1611
+ const COMPONENT_NAME$1L = 'vc-checkbox';
1612
1612
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
1613
- name: COMPONENT_NAME$1J,
1613
+ name: COMPONENT_NAME$1L,
1614
1614
  props: props$1c,
1615
1615
  emits: ['update:modelValue', 'change'],
1616
1616
  setup(props, {
@@ -1697,9 +1697,9 @@ const useCheckboxGroup = () => {
1697
1697
 
1698
1698
  /** @jsxImportSource vue */
1699
1699
 
1700
- const COMPONENT_NAME$1I = 'vc-checkbox-group';
1700
+ const COMPONENT_NAME$1K = 'vc-checkbox-group';
1701
1701
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
1702
- name: COMPONENT_NAME$1I,
1702
+ name: COMPONENT_NAME$1K,
1703
1703
  props: props$1b,
1704
1704
  emits: ['update:modelValue', 'change'],
1705
1705
  setup(props, {
@@ -1717,9 +1717,9 @@ const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
1717
1717
 
1718
1718
  /** @jsxImportSource vue */
1719
1719
 
1720
- const COMPONENT_NAME$1H = 'vcm-checkbox';
1720
+ const COMPONENT_NAME$1J = 'vcm-checkbox';
1721
1721
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
1722
- name: COMPONENT_NAME$1H,
1722
+ name: COMPONENT_NAME$1J,
1723
1723
  props: props$1c,
1724
1724
  emits: ['update:modelValue', 'change'],
1725
1725
  setup(props, {
@@ -1759,9 +1759,9 @@ const MCheckbox = /* @__PURE__ */ vue.defineComponent({
1759
1759
 
1760
1760
  /** @jsxImportSource vue */
1761
1761
 
1762
- const COMPONENT_NAME$1G = 'vcm-checkbox-group';
1762
+ const COMPONENT_NAME$1I = 'vcm-checkbox-group';
1763
1763
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
1764
- name: COMPONENT_NAME$1G,
1764
+ name: COMPONENT_NAME$1I,
1765
1765
  props: props$1b,
1766
1766
  emits: ['update:modelValue', 'change'],
1767
1767
  setup(props, {
@@ -1820,9 +1820,9 @@ const props$19 = {
1820
1820
  }
1821
1821
  };
1822
1822
 
1823
- const COMPONENT_NAME$1F = "vc-customer";
1823
+ const COMPONENT_NAME$1H = "vc-customer";
1824
1824
  const Customer = vue.defineComponent({
1825
- name: COMPONENT_NAME$1F,
1825
+ name: COMPONENT_NAME$1H,
1826
1826
  props: props$19,
1827
1827
  setup(props, context) {
1828
1828
  return () => vue.h(() => {
@@ -1833,9 +1833,9 @@ const Customer = vue.defineComponent({
1833
1833
 
1834
1834
  /** @jsxImportSource vue */
1835
1835
 
1836
- const COMPONENT_NAME$1E = 'vc-message';
1836
+ const COMPONENT_NAME$1G = 'vc-message';
1837
1837
  const MessageView = /* @__PURE__ */ vue.defineComponent({
1838
- name: COMPONENT_NAME$1E,
1838
+ name: COMPONENT_NAME$1G,
1839
1839
  emits: ['before-close', 'close', 'portal-fulfilled'],
1840
1840
  props: props$1a,
1841
1841
  setup(props, {
@@ -1982,7 +1982,7 @@ class PortalLeaf {
1982
1982
  }
1983
1983
  }
1984
1984
 
1985
- const COMPONENT_NAME$1D = "vc-portal";
1985
+ const COMPONENT_NAME$1F = "vc-portal";
1986
1986
  class Portal {
1987
1987
  /**
1988
1988
  * 清理Portals类型组件
@@ -2034,7 +2034,7 @@ class Portal {
2034
2034
  this.wrapper = wrapper;
2035
2035
  this.globalOptions = {
2036
2036
  ...options,
2037
- name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1D)
2037
+ name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1F)
2038
2038
  };
2039
2039
  }
2040
2040
  popup(propsData, options) {
@@ -2133,7 +2133,7 @@ class Portal {
2133
2133
  ...rest
2134
2134
  } = options;
2135
2135
  let useAllNodes = fragment;
2136
- const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1D)}` : name$;
2136
+ const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1F)}` : name$;
2137
2137
  const container = document.createElement(tag);
2138
2138
  const root = typeof el === "object" ? el : document.querySelector(el || "body");
2139
2139
  !alive && Portal.leafs.get(name)?.destroy();
@@ -2167,7 +2167,7 @@ class Portal {
2167
2167
  } else {
2168
2168
  const wrapper = this.wrapper;
2169
2169
  const app = vue.createApp({
2170
- name: COMPONENT_NAME$1D,
2170
+ name: COMPONENT_NAME$1F,
2171
2171
  parent,
2172
2172
  setup() {
2173
2173
  if (alive) {
@@ -2279,13 +2279,13 @@ const props$18 = {
2279
2279
  }
2280
2280
  };
2281
2281
 
2282
- const COMPONENT_NAME$1C = 'vc-portal-view';
2282
+ const COMPONENT_NAME$1E = 'vc-portal-view';
2283
2283
 
2284
2284
  /**
2285
2285
  * 写法不同,但与vue@2.x 保持一致
2286
2286
  */
2287
2287
  const PortalView = /* @__PURE__ */ vue.defineComponent({
2288
- name: COMPONENT_NAME$1C,
2288
+ name: COMPONENT_NAME$1E,
2289
2289
  props: props$18,
2290
2290
  setup(props, {
2291
2291
  slots
@@ -2456,9 +2456,9 @@ const useClipboard = (done) => {
2456
2456
  return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
2457
2457
  };
2458
2458
 
2459
- const COMPONENT_NAME$1B = "vc-clipboard";
2459
+ const COMPONENT_NAME$1D = "vc-clipboard";
2460
2460
  const Clipboard$1 = vue.defineComponent({
2461
- name: COMPONENT_NAME$1B,
2461
+ name: COMPONENT_NAME$1D,
2462
2462
  props: props$17,
2463
2463
  setup() {
2464
2464
  return useClipboard((content) => Message.success({ content }));
@@ -2498,9 +2498,9 @@ const MTransitionZoom = TransitionZoom;
2498
2498
 
2499
2499
  /** @jsxImportSource vue */
2500
2500
 
2501
- const COMPONENT_NAME$1A = 'vcm-toast';
2501
+ const COMPONENT_NAME$1C = 'vcm-toast';
2502
2502
  const MToastView = /* @__PURE__ */ vue.defineComponent({
2503
- name: COMPONENT_NAME$1A,
2503
+ name: COMPONENT_NAME$1C,
2504
2504
  emits: ['close', 'portal-fulfilled'],
2505
2505
  props: props$16,
2506
2506
  setup(props, {
@@ -2602,9 +2602,9 @@ const warning$2 = create$3({ mode: "warning" });
2602
2602
  const error$2 = create$3({ mode: "error" });
2603
2603
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
2604
2604
 
2605
- const COMPONENT_NAME$1z = "vcm-clipboard";
2605
+ const COMPONENT_NAME$1B = "vcm-clipboard";
2606
2606
  const MClipboard$1 = vue.defineComponent({
2607
- name: COMPONENT_NAME$1z,
2607
+ name: COMPONENT_NAME$1B,
2608
2608
  props: props$17,
2609
2609
  setup() {
2610
2610
  return useClipboard((content) => MToast.info({ content }));
@@ -2636,9 +2636,9 @@ const props$15 = {
2636
2636
  }
2637
2637
  };
2638
2638
 
2639
- const COMPONENT_NAME$1y = "vc-collapse";
2639
+ const COMPONENT_NAME$1A = "vc-collapse";
2640
2640
  const Collapse = vue.defineComponent({
2641
- name: COMPONENT_NAME$1y,
2641
+ name: COMPONENT_NAME$1A,
2642
2642
  props: props$15,
2643
2643
  emits: ["update:moodelValue", "change"],
2644
2644
  setup(props, { slots, emit }) {
@@ -2752,12 +2752,12 @@ const props$13 = {
2752
2752
 
2753
2753
  /** @jsxImportSource vue */
2754
2754
 
2755
- function _isSlot$3(s) {
2755
+ function _isSlot$2(s) {
2756
2756
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
2757
2757
  }
2758
- const COMPONENT_NAME$1x = 'vc-expand';
2758
+ const COMPONENT_NAME$1z = 'vc-expand';
2759
2759
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
2760
- name: COMPONENT_NAME$1x,
2760
+ name: COMPONENT_NAME$1z,
2761
2761
  props: props$13,
2762
2762
  setup(props, {
2763
2763
  slots
@@ -2776,7 +2776,7 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
2776
2776
  enter: 200,
2777
2777
  leave: 200
2778
2778
  }
2779
- }, _isSlot$3(_slot = vue.withDirectives(vue.createVNode(Content, null, {
2779
+ }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode(Content, null, {
2780
2780
  default: () => [(props.alive || !props.alive && isActive.value) && slots.default?.()]
2781
2781
  }), [[vue.vShow, isActive.value]])) ? _slot : {
2782
2782
  default: () => [_slot]
@@ -2787,9 +2787,9 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
2787
2787
 
2788
2788
  /** @jsxImportSource vue */
2789
2789
 
2790
- const COMPONENT_NAME$1w = 'vc-collapse-item';
2790
+ const COMPONENT_NAME$1y = 'vc-collapse-item';
2791
2791
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
2792
- name: COMPONENT_NAME$1w,
2792
+ name: COMPONENT_NAME$1y,
2793
2793
  props: props$14,
2794
2794
  setup(props, {
2795
2795
  slots,
@@ -2864,9 +2864,9 @@ const props$12 = {
2864
2864
 
2865
2865
  /** @jsxImportSource vue */
2866
2866
 
2867
- const COMPONENT_NAME$1v = 'vc-color-picker';
2867
+ const COMPONENT_NAME$1x = 'vc-color-picker';
2868
2868
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
2869
- name: COMPONENT_NAME$1v,
2869
+ name: COMPONENT_NAME$1x,
2870
2870
  props: props$12,
2871
2871
  setup(props, {
2872
2872
  slots
@@ -2890,9 +2890,9 @@ const props$11 = {
2890
2890
 
2891
2891
  /** @jsxImportSource vue */
2892
2892
 
2893
- const COMPONENT_NAME$1u = 'vc-countdown';
2893
+ const COMPONENT_NAME$1w = 'vc-countdown';
2894
2894
  const Countdown = /* @__PURE__ */ vue.defineComponent({
2895
- name: COMPONENT_NAME$1u,
2895
+ name: COMPONENT_NAME$1w,
2896
2896
  props: props$11,
2897
2897
  setup(props, {
2898
2898
  slots
@@ -3342,9 +3342,9 @@ const useNativeEmitter = (input, expose) => {
3342
3342
 
3343
3343
  /** @jsxImportSource vue */
3344
3344
 
3345
- const COMPONENT_NAME$1t = 'vc-input';
3345
+ const COMPONENT_NAME$1v = 'vc-input';
3346
3346
  const Input = /* @__PURE__ */ vue.defineComponent({
3347
- name: COMPONENT_NAME$1t,
3347
+ name: COMPONENT_NAME$1v,
3348
3348
  inheritAttrs: false,
3349
3349
  props: {
3350
3350
  ...props$$,
@@ -3357,7 +3357,8 @@ const Input = /* @__PURE__ */ vue.defineComponent({
3357
3357
  emits: ['update:modelValue', 'input', 'change', 'focus', 'blur', 'clear', 'paste', 'keydown', 'keypress', 'keyup', 'enter', 'tip'],
3358
3358
  setup(props, {
3359
3359
  slots,
3360
- expose
3360
+ expose,
3361
+ attrs
3361
3362
  }) {
3362
3363
  const input = vue.ref();
3363
3364
  useNativeEmitter(input, expose);
@@ -3424,9 +3425,9 @@ const Input = /* @__PURE__ */ vue.defineComponent({
3424
3425
  }, classes.value]
3425
3426
  }, [slots.prepend?.() || props.prepend && vue.createVNode(Icon, {
3426
3427
  "type": props.prepend
3427
- }, null)]), vue.createVNode("div", {
3428
+ }, null)]), vue.createVNode("div", vue.mergeProps({
3428
3429
  "class": ['vc-input__content', classes.value]
3429
- }, [slots.content?.() || renderInput(false)]), !props.disabled && props.clearable && vue.createVNode(TransitionFade, null, {
3430
+ }, slots.content ? it.value.listeners : {}), [slots.content ? slots.content() : renderInput(false)]), !props.disabled && props.clearable && vue.createVNode(TransitionFade, null, {
3430
3431
  default: () => [vue.createVNode(Icon, {
3431
3432
  "class": "vc-input__icon-clear",
3432
3433
  "type": "clear",
@@ -3678,9 +3679,9 @@ const useInputNumber = () => {
3678
3679
 
3679
3680
  /** @jsxImportSource vue */
3680
3681
 
3681
- const COMPONENT_NAME$1s = 'vc-input-number';
3682
+ const COMPONENT_NAME$1u = 'vc-input-number';
3682
3683
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
3683
- name: COMPONENT_NAME$1s,
3684
+ name: COMPONENT_NAME$1u,
3684
3685
  props: props$X,
3685
3686
  inheritAttrs: false,
3686
3687
  setup(props, {
@@ -3744,9 +3745,9 @@ const props$W = {
3744
3745
 
3745
3746
  /** @jsxImportSource vue */
3746
3747
 
3747
- const COMPONENT_NAME$1r = 'vc-input-search';
3748
+ const COMPONENT_NAME$1t = 'vc-input-search';
3748
3749
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
3749
- name: COMPONENT_NAME$1r,
3750
+ name: COMPONENT_NAME$1t,
3750
3751
  props: props$W,
3751
3752
  inheritAttrs: false,
3752
3753
  setup(props, {
@@ -4034,12 +4035,9 @@ const usePos = () => {
4034
4035
 
4035
4036
  /** @jsxImportSource vue */
4036
4037
 
4037
- function _isSlot$2(s) {
4038
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
4039
- }
4040
- const COMPONENT_NAME$1q = 'vc-popover-wrapper';
4038
+ const COMPONENT_NAME$1s = 'vc-popover-wrapper';
4041
4039
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
4042
- name: COMPONENT_NAME$1q,
4040
+ name: COMPONENT_NAME$1s,
4043
4041
  props: props$_,
4044
4042
  emits: ['portal-fulfilled', 'close'],
4045
4043
  setup(props, {
@@ -4101,7 +4099,12 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
4101
4099
  return container;
4102
4100
  }
4103
4101
  };
4104
- const setPopupStyle = () => {
4102
+
4103
+ /**
4104
+ * 添加debounce解决连续setPopupStyle的情况
4105
+ * 待排查
4106
+ */
4107
+ const setPopupStyle = lodashEs.debounce(() => {
4105
4108
  if (!vnode.el) return;
4106
4109
  const triggerEl = getHackContainer();
4107
4110
  const {
@@ -4131,13 +4134,15 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
4131
4134
  fitPos.value = result;
4132
4135
  wrapperStyle.value = $wrapperStyle;
4133
4136
  arrowStyle.value = $arrowStyle;
4134
-
4135
4137
  // 自适应高度
4136
4138
  if (props.autoWidth) return;
4137
4139
  wrapperW.value = {
4138
4140
  width: `${triggerEl.getBoundingClientRect().width}px`
4139
4141
  };
4140
- };
4142
+ }, 50, {
4143
+ leading: true,
4144
+ trailing: false
4145
+ });
4141
4146
  let timer;
4142
4147
  let isPressMouse = false;
4143
4148
  const handleTriggerChange = e => {
@@ -4192,7 +4197,7 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
4192
4197
  switch (direction[0]) {
4193
4198
  case 'top':
4194
4199
  case 'bottom':
4195
- if (left + vnode.el.offsetWidth >= window.innerWidth) {
4200
+ if (left + vnode.el.offsetWidth > window.innerWidth) {
4196
4201
  wrapperStyle.value = {
4197
4202
  ...wrapperStyle.value,
4198
4203
  left: `${window.innerWidth - vnode.el.offsetWidth}px`
@@ -4252,7 +4257,6 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
4252
4257
  }
4253
4258
  });
4254
4259
  return () => {
4255
- let _slot;
4256
4260
  return vue.createVNode(TransitionScale, {
4257
4261
  "mode": props.animation || 'part',
4258
4262
  "duration": {
@@ -4260,38 +4264,40 @@ const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
4260
4264
  leave: 150
4261
4265
  },
4262
4266
  "onAfterLeave": handleRemove
4263
- }, _isSlot$2(_slot = vue.withDirectives(vue.createVNode("div", {
4264
- "style": [wrapperStyle.value, wrapperW.value, props.portalStyle],
4265
- "class": [wrapperClasses.value, props.portalClass, 'vc-popover-wrapper'],
4266
- "onMousedown": () => !props.hover && handleMouseDown(),
4267
- "onMouseenter": e => props.hover && handleChange(e, {
4268
- visible: true
4269
- }),
4270
- "onMouseleave": e => props.hover && handleChange(e, {
4271
- visible: false
4272
- })
4273
- }, [vue.createVNode("div", {
4274
- "class": [themeClasses.value, 'vc-popover-wrapper__container']
4275
- }, [props.arrow && vue.createVNode("div", {
4276
- "style": arrowStyle.value,
4277
- "class": [themeClasses.value, posClasses.value, 'vc-popover-wrapper__arrow']
4278
- }, null), slots.content ? slots.content() : typeof props.content === 'function' ? vue.createVNode(Customer, {
4279
- "render": props.content
4280
- }, null) : vue.createVNode("div", {
4281
- "innerHTML": props.content
4282
- }, null)])]), [[vue.vShow, isActive.value]])) ? _slot : {
4283
- default: () => [_slot]
4267
+ }, {
4268
+ default: () => [vue.withDirectives(vue.createVNode("div", {
4269
+ "style": [wrapperStyle.value, wrapperW.value, props.portalStyle],
4270
+ "class": [wrapperClasses.value, props.portalClass, 'vc-popover-wrapper'],
4271
+ "onMousedown": () => !props.hover && handleMouseDown(),
4272
+ "onMouseenter": e => props.hover && handleChange(e, {
4273
+ visible: true
4274
+ }),
4275
+ "onMouseleave": e => props.hover && handleChange(e, {
4276
+ visible: false
4277
+ })
4278
+ }, [vue.createVNode("div", {
4279
+ "class": [themeClasses.value, 'vc-popover-wrapper__container']
4280
+ }, [props.arrow && vue.createVNode("div", {
4281
+ "style": arrowStyle.value,
4282
+ "class": [themeClasses.value, posClasses.value, 'vc-popover-wrapper__arrow']
4283
+ }, null), slots.content ? slots.content() : typeof props.content === 'function' ? vue.createVNode(Customer, {
4284
+ "render": props.content
4285
+ }, null) : vue.createVNode("div", {
4286
+ "innerHTML": props.content
4287
+ }, null)])]), [[vue.vShow, isActive.value]])]
4284
4288
  });
4285
4289
  };
4286
4290
  }
4287
4291
  });
4288
- const PopoverPortal = new Portal(PopoverWrapper);
4292
+ const PopoverPortal = new Portal(PopoverWrapper, {
4293
+ leaveDelay: 0
4294
+ });
4289
4295
 
4290
4296
  /** @jsxImportSource vue */
4291
4297
 
4292
- const COMPONENT_NAME$1p = 'vc-popover';
4298
+ const COMPONENT_NAME$1r = 'vc-popover';
4293
4299
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
4294
- name: COMPONENT_NAME$1p,
4300
+ name: COMPONENT_NAME$1r,
4295
4301
  props: props$Z,
4296
4302
  emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
4297
4303
  setup(props, {
@@ -5392,9 +5398,9 @@ const getTimeType = type => {
5392
5398
  }
5393
5399
  return view;
5394
5400
  };
5395
- const COMPONENT_NAME$1o = 'vc-date-confirm';
5401
+ const COMPONENT_NAME$1q = 'vc-date-confirm';
5396
5402
  const Confirm = /* @__PURE__ */ vue.defineComponent({
5397
- name: COMPONENT_NAME$1o,
5403
+ name: COMPONENT_NAME$1q,
5398
5404
  props: {
5399
5405
  showTime: {
5400
5406
  type: Boolean,
@@ -5458,9 +5464,9 @@ const Confirm = /* @__PURE__ */ vue.defineComponent({
5458
5464
 
5459
5465
  /** @jsxImportSource vue */
5460
5466
 
5461
- const COMPONENT_NAME$1n = 'vc-date-header';
5467
+ const COMPONENT_NAME$1p = 'vc-date-header';
5462
5468
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
5463
- name: COMPONENT_NAME$1n,
5469
+ name: COMPONENT_NAME$1p,
5464
5470
  props: {
5465
5471
  panelDate: Date,
5466
5472
  showNext: {
@@ -5544,9 +5550,9 @@ const DateHeader = /* @__PURE__ */ vue.defineComponent({
5544
5550
 
5545
5551
  /** @jsxImportSource vue */
5546
5552
 
5547
- const COMPONENT_NAME$1m = 'vc-date-table';
5553
+ const COMPONENT_NAME$1o = 'vc-date-table';
5548
5554
  const DateTable = /* @__PURE__ */ vue.defineComponent({
5549
- name: COMPONENT_NAME$1m,
5555
+ name: COMPONENT_NAME$1o,
5550
5556
  props: {
5551
5557
  value: Array,
5552
5558
  firstDayOfWeek: {
@@ -5755,9 +5761,9 @@ const DateTable = /* @__PURE__ */ vue.defineComponent({
5755
5761
 
5756
5762
  /** @jsxImportSource vue */
5757
5763
 
5758
- const COMPONENT_NAME$1l = 'vc-month-table';
5764
+ const COMPONENT_NAME$1n = 'vc-month-table';
5759
5765
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
5760
- name: COMPONENT_NAME$1l,
5766
+ name: COMPONENT_NAME$1n,
5761
5767
  props: {
5762
5768
  value: Array,
5763
5769
  panelDate: Date,
@@ -5889,7 +5895,7 @@ const MonthTable = /* @__PURE__ */ vue.defineComponent({
5889
5895
 
5890
5896
  /** @jsxImportSource vue */
5891
5897
 
5892
- const COMPONENT_NAME$1k = 'vc-quarter-table';
5898
+ const COMPONENT_NAME$1m = 'vc-quarter-table';
5893
5899
 
5894
5900
  /**
5895
5901
  * 获取季度对应的月份范围
@@ -5923,7 +5929,7 @@ const getQuarterRangeByMonth = value => {
5923
5929
  }
5924
5930
  };
5925
5931
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
5926
- name: COMPONENT_NAME$1k,
5932
+ name: COMPONENT_NAME$1m,
5927
5933
  props: {
5928
5934
  value: Array,
5929
5935
  panelDate: Date,
@@ -6046,9 +6052,9 @@ const QuarterTable = /* @__PURE__ */ vue.defineComponent({
6046
6052
 
6047
6053
  /** @jsxImportSource vue */
6048
6054
 
6049
- const COMPONENT_NAME$1j = 'vc-shortcuts-select';
6055
+ const COMPONENT_NAME$1l = 'vc-shortcuts-select';
6050
6056
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
6051
- name: COMPONENT_NAME$1j,
6057
+ name: COMPONENT_NAME$1l,
6052
6058
  props: {
6053
6059
  panelDate: Date,
6054
6060
  config: Array,
@@ -6088,9 +6094,9 @@ const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
6088
6094
 
6089
6095
  /** @jsxImportSource vue */
6090
6096
 
6091
- const COMPONENT_NAME$1i = 'vc-time-select';
6097
+ const COMPONENT_NAME$1k = 'vc-time-select';
6092
6098
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
6093
- name: COMPONENT_NAME$1i,
6099
+ name: COMPONENT_NAME$1k,
6094
6100
  props: {
6095
6101
  hours: {
6096
6102
  type: [Number, String],
@@ -6369,9 +6375,9 @@ const TimeSelect = /* @__PURE__ */ vue.defineComponent({
6369
6375
 
6370
6376
  /** @jsxImportSource vue */
6371
6377
 
6372
- const COMPONENT_NAME$1h = 'vc-year-table';
6378
+ const COMPONENT_NAME$1j = 'vc-year-table';
6373
6379
  const YearTable = /* @__PURE__ */ vue.defineComponent({
6374
- name: COMPONENT_NAME$1h,
6380
+ name: COMPONENT_NAME$1j,
6375
6381
  props: {
6376
6382
  value: Array,
6377
6383
  panelDate: Date,
@@ -6494,9 +6500,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
6494
6500
  }
6495
6501
  return true;
6496
6502
  };
6497
- const COMPONENT_NAME$1g = 'vc-date-range-panel';
6503
+ const COMPONENT_NAME$1i = 'vc-date-range-panel';
6498
6504
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
6499
- name: COMPONENT_NAME$1g,
6505
+ name: COMPONENT_NAME$1i,
6500
6506
  props: {
6501
6507
  ...props$V,
6502
6508
  confirm: {
@@ -6875,9 +6881,9 @@ const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
6875
6881
 
6876
6882
  /** @jsxImportSource vue */
6877
6883
 
6878
- const COMPONENT_NAME$1f = 'vc-date-panel';
6884
+ const COMPONENT_NAME$1h = 'vc-date-panel';
6879
6885
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
6880
- name: COMPONENT_NAME$1f,
6886
+ name: COMPONENT_NAME$1h,
6881
6887
  props: {
6882
6888
  ...props$V,
6883
6889
  type: String,
@@ -7085,9 +7091,9 @@ const isEqualYear$1 = value => {
7085
7091
  const endYear = value[1].getFullYear();
7086
7092
  return startYear === endYear;
7087
7093
  };
7088
- const COMPONENT_NAME$1e = 'vc-monthrange-panel';
7094
+ const COMPONENT_NAME$1g = 'vc-monthrange-panel';
7089
7095
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
7090
- name: COMPONENT_NAME$1e,
7096
+ name: COMPONENT_NAME$1g,
7091
7097
  props: {
7092
7098
  ...props$V,
7093
7099
  confirm: {
@@ -7262,9 +7268,9 @@ const isEqualYear = value => {
7262
7268
  const endYear = value[1].getFullYear();
7263
7269
  return startYear === endYear;
7264
7270
  };
7265
- const COMPONENT_NAME$1d = 'vc-quarterrange-panel';
7271
+ const COMPONENT_NAME$1f = 'vc-quarterrange-panel';
7266
7272
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
7267
- name: COMPONENT_NAME$1d,
7273
+ name: COMPONENT_NAME$1f,
7268
7274
  props: {
7269
7275
  ...props$V,
7270
7276
  confirm: {
@@ -7503,9 +7509,9 @@ const getComparedDate = (leftDate, rightDate) => {
7503
7509
  seconds
7504
7510
  };
7505
7511
  };
7506
- const COMPONENT_NAME$1c = 'vc-timerange-panel';
7512
+ const COMPONENT_NAME$1e = 'vc-timerange-panel';
7507
7513
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
7508
- name: COMPONENT_NAME$1c,
7514
+ name: COMPONENT_NAME$1e,
7509
7515
  props: props$U,
7510
7516
  emits: ['pick', 'clear', 'ok'],
7511
7517
  setup(props, {
@@ -7604,9 +7610,9 @@ const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
7604
7610
 
7605
7611
  /** @jsxImportSource vue */
7606
7612
 
7607
- const COMPONENT_NAME$1b = 'vc-time-panel';
7613
+ const COMPONENT_NAME$1d = 'vc-time-panel';
7608
7614
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
7609
- name: COMPONENT_NAME$1b,
7615
+ name: COMPONENT_NAME$1d,
7610
7616
  props: props$U,
7611
7617
  emits: ['pick', 'clear', 'ok'],
7612
7618
  setup(props, {
@@ -7661,7 +7667,7 @@ const TimePanel = /* @__PURE__ */ vue.defineComponent({
7661
7667
 
7662
7668
  /** @jsxImportSource vue */
7663
7669
 
7664
- const COMPONENT_NAME$1a = 'vc-date-picker';
7670
+ const COMPONENT_NAME$1c = 'vc-date-picker';
7665
7671
  const getPanel$1 = type => {
7666
7672
  if (['daterange', 'datetimerange'].includes(type)) {
7667
7673
  return DateRangePanel;
@@ -7672,7 +7678,7 @@ const getPanel$1 = type => {
7672
7678
  }
7673
7679
  return DatePanel;
7674
7680
  };
7675
- const DatePicker = createPicker(COMPONENT_NAME$1a, props$10, () => {
7681
+ const DatePicker = createPicker(COMPONENT_NAME$1c, props$10, () => {
7676
7682
  const props = vue.getCurrentInstance().props;
7677
7683
  const icon = vue.ref('date');
7678
7684
  const panel = vue.shallowRef({});
@@ -7705,9 +7711,9 @@ const props$T = {
7705
7711
 
7706
7712
  /** @jsxImportSource vue */
7707
7713
 
7708
- const COMPONENT_NAME$19 = 'vc-divider';
7714
+ const COMPONENT_NAME$1b = 'vc-divider';
7709
7715
  const Divider = /* @__PURE__ */ vue.defineComponent({
7710
- name: COMPONENT_NAME$19,
7716
+ name: COMPONENT_NAME$1b,
7711
7717
  props: props$T,
7712
7718
  setup(props, {
7713
7719
  slots
@@ -7862,7 +7868,7 @@ const props$Q = {
7862
7868
 
7863
7869
  /** @jsxImportSource vue */
7864
7870
 
7865
- const COMPONENT_NAME$18 = 'vc-scroller-track';
7871
+ const COMPONENT_NAME$1a = 'vc-scroller-track';
7866
7872
  const BAR_MAP = {
7867
7873
  vertical: {
7868
7874
  scroll: 'scrollTop',
@@ -7882,7 +7888,7 @@ const BAR_MAP = {
7882
7888
  }
7883
7889
  };
7884
7890
  const Track = /* @__PURE__ */ vue.defineComponent({
7885
- name: COMPONENT_NAME$18,
7891
+ name: COMPONENT_NAME$1a,
7886
7892
  props: props$S,
7887
7893
  emits: ['change'],
7888
7894
  inheritAttrs: false,
@@ -8072,9 +8078,9 @@ const Track = /* @__PURE__ */ vue.defineComponent({
8072
8078
 
8073
8079
  /** @jsxImportSource vue */
8074
8080
 
8075
- const COMPONENT_NAME$17 = 'vc-scroller-bar';
8081
+ const COMPONENT_NAME$19 = 'vc-scroller-bar';
8076
8082
  const Bar = /* @__PURE__ */ vue.defineComponent({
8077
- name: COMPONENT_NAME$17,
8083
+ name: COMPONENT_NAME$19,
8078
8084
  props: props$R,
8079
8085
  emits: ['change'],
8080
8086
  setup(props, {
@@ -8289,7 +8295,7 @@ const useScroller = (expose) => {
8289
8295
 
8290
8296
  /** @jsxImportSource vue */
8291
8297
 
8292
- const COMPONENT_NAME$16 = 'vc-scroller';
8298
+ const COMPONENT_NAME$18 = 'vc-scroller';
8293
8299
 
8294
8300
  /**
8295
8301
  * 作为备选方案,目前推荐使用ScrollerWheel
@@ -8300,7 +8306,7 @@ const COMPONENT_NAME$16 = 'vc-scroller';
8300
8306
  * 2. 增加了一层嵌套
8301
8307
  */
8302
8308
  const Scroller = /* @__PURE__ */ vue.defineComponent({
8303
- name: COMPONENT_NAME$16,
8309
+ name: COMPONENT_NAME$18,
8304
8310
  props: props$Q,
8305
8311
  emits: ['scroll'],
8306
8312
  setup(props, {
@@ -8361,7 +8367,7 @@ const Scroller = /* @__PURE__ */ vue.defineComponent({
8361
8367
 
8362
8368
  /** @jsxImportSource vue */
8363
8369
 
8364
- const COMPONENT_NAME$15 = 'vc-scroller-wheel';
8370
+ const COMPONENT_NAME$17 = 'vc-scroller-wheel';
8365
8371
 
8366
8372
  /**
8367
8373
  * 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
@@ -8383,7 +8389,7 @@ const COMPONENT_NAME$15 = 'vc-scroller-wheel';
8383
8389
  * 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
8384
8390
  */
8385
8391
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
8386
- name: COMPONENT_NAME$15,
8392
+ name: COMPONENT_NAME$17,
8387
8393
  props: Object.assign(props$Q, {
8388
8394
  stopPropagation: {
8389
8395
  type: Boolean,
@@ -8572,9 +8578,9 @@ const props$P = {
8572
8578
 
8573
8579
  /** @jsxImportSource vue */
8574
8580
 
8575
- const COMPONENT_NAME$14 = 'vc-drawer';
8581
+ const COMPONENT_NAME$16 = 'vc-drawer';
8576
8582
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
8577
- name: COMPONENT_NAME$14,
8583
+ name: COMPONENT_NAME$16,
8578
8584
  props: props$P,
8579
8585
  emits: ['close', 'update:modelValue', 'visible-change'],
8580
8586
  setup(props, {
@@ -8742,30 +8748,178 @@ const MDrawer = Drawer;
8742
8748
  const MDrawerView = DrawerView;
8743
8749
 
8744
8750
  const props$O = {
8745
- tag: {
8751
+ modelValue: {
8752
+ type: Boolean,
8753
+ default: false
8754
+ },
8755
+ portalClass: [String, Object],
8756
+ placement: {
8746
8757
  type: String,
8747
- default: "div"
8758
+ default: "bottom"
8759
+ },
8760
+ trigger: {
8761
+ type: String,
8762
+ default: "hover"
8763
+ },
8764
+ arrow: {
8765
+ type: Boolean,
8766
+ default: false
8748
8767
  }
8749
8768
  };
8750
8769
 
8751
8770
  /** @jsxImportSource vue */
8752
8771
 
8753
- const COMPONENT_NAME$13 = 'vc-dropdown';
8772
+ const COMPONENT_NAME$15 = 'vc-dropdown';
8754
8773
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
8755
- name: COMPONENT_NAME$13,
8774
+ name: COMPONENT_NAME$15,
8756
8775
  props: props$O,
8776
+ inheritAttrs: false,
8777
+ emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
8757
8778
  setup(props, {
8779
+ slots,
8780
+ emit,
8781
+ expose
8782
+ }) {
8783
+ const its = vcHooks.useAttrs({
8784
+ merge: false
8785
+ });
8786
+ const isActive = vue.ref(false);
8787
+ const dropdownId = vue.ref(Utils.getUid('dropdown'));
8788
+ const inherit = vue.computed(() => {
8789
+ return {
8790
+ style: its.value.style,
8791
+ class: its.value.class
8792
+ };
8793
+ });
8794
+ const attrs = vue.computed(() => {
8795
+ return its.value.attrs;
8796
+ });
8797
+ vue.watch(() => props.modelValue, v => {
8798
+ isActive.value = v;
8799
+ }, {
8800
+ immediate: true
8801
+ });
8802
+
8803
+ /**
8804
+ * v-model 同步, 外部的数据改变时不会触发
8805
+ */
8806
+ const sync = () => {
8807
+ emit('update:modelValue', isActive.value);
8808
+ emit('visible-change', isActive.value);
8809
+ };
8810
+ const handleChange = v => {
8811
+ isActive.value = v;
8812
+ sync();
8813
+ };
8814
+ const close = () => {
8815
+ isActive.value = false;
8816
+ sync();
8817
+ };
8818
+ expose({
8819
+ close,
8820
+ dropdownId
8821
+ });
8822
+ return () => {
8823
+ return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
8824
+ "modelValue": isActive.value,
8825
+ "placement": props.placement,
8826
+ "trigger": props.trigger,
8827
+ "arrow": props.arrow,
8828
+ "portalClass": ['is-padding-none', 'vc-dropdown-wrapper', props.portalClass],
8829
+ "class": ['vc-dropdown', inherit.value.class],
8830
+ "style": inherit.value.style,
8831
+ "onReady": () => emit('ready'),
8832
+ "onClose": () => emit('close'),
8833
+ "onVisibleChange": handleChange
8834
+ }), {
8835
+ default: () => slots?.default?.(),
8836
+ content: () => slots?.content?.()
8837
+ });
8838
+ };
8839
+ }
8840
+ });
8841
+
8842
+ /** @jsxImportSource vue */
8843
+
8844
+ const COMPONENT_NAME$14 = 'vc-dropdown-menu';
8845
+ const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
8846
+ name: COMPONENT_NAME$14,
8847
+ setup(_, {
8758
8848
  slots
8759
8849
  }) {
8760
8850
  return () => {
8761
- return vue.createVNode("div", {
8762
- "class": "vc-dropdown"
8851
+ return vue.createVNode("ul", {
8852
+ "class": "vc-dropdown-menu"
8763
8853
  }, [slots?.default?.()]);
8764
8854
  };
8765
8855
  }
8766
8856
  });
8767
8857
 
8858
+ /** @jsxImportSource vue */
8859
+
8860
+ const COMPONENT_NAME$13 = 'vc-dropdown-item';
8861
+ const DropdownItem = /* @__PURE__ */ vue.defineComponent({
8862
+ name: COMPONENT_NAME$13,
8863
+ props: {
8864
+ value: {
8865
+ type: [String, Number],
8866
+ value: undefined
8867
+ },
8868
+ label: {
8869
+ type: [String, Number],
8870
+ value: undefined
8871
+ },
8872
+ disabled: {
8873
+ type: Boolean,
8874
+ default: false
8875
+ },
8876
+ selected: {
8877
+ type: Boolean,
8878
+ default: false
8879
+ },
8880
+ divided: {
8881
+ type: Boolean,
8882
+ default: false
8883
+ },
8884
+ closable: {
8885
+ type: Boolean,
8886
+ default: true
8887
+ }
8888
+ },
8889
+ setup(props, {
8890
+ slots,
8891
+ emit
8892
+ }) {
8893
+ const owner = vcHooks.getInstance('dropdown', 'dropdownId');
8894
+ const currentValue = vue.computed(() => {
8895
+ const v = typeof props.value === 'undefined' || props.value === '' ? props.label : props.value;
8896
+ return v;
8897
+ });
8898
+ const classes = vue.computed(() => {
8899
+ return {
8900
+ 'is-selected': props.selected,
8901
+ 'is-divided': props.divided,
8902
+ 'is-disabled': props.disabled
8903
+ };
8904
+ });
8905
+ const handleClick = e => {
8906
+ if (props.disabled) return;
8907
+ emit('click', currentValue.value, e);
8908
+ owner.emit('click', currentValue.value, e);
8909
+ props.closable && owner.exposed?.close();
8910
+ };
8911
+ return () => {
8912
+ return vue.createVNode("li", {
8913
+ "class": [classes.value, 'vc-dropdown-item'],
8914
+ "onClick": handleClick
8915
+ }, [slots.default ? slots.default?.() : props.label]);
8916
+ };
8917
+ }
8918
+ });
8919
+
8768
8920
  const MDropdown = Dropdown;
8921
+ const MDropdownMenu = DropdownMenu;
8922
+ const MDropdownItem = DropdownItem;
8769
8923
 
8770
8924
  const props$N = {
8771
8925
  tag: {
@@ -9051,6 +9205,8 @@ const useFormItem = (expose) => {
9051
9205
  "is-validating": validateState.value === "validating",
9052
9206
  "is-inline": form.props.inline,
9053
9207
  "is-nest": isNest.value,
9208
+ "is-alone": !props.showMessage,
9209
+ // 用于单独去除form-item的默认margin_bottom
9054
9210
  [`is-${labelPosition.value}`]: true
9055
9211
  };
9056
9212
  });
@@ -10450,6 +10606,9 @@ const props$z = {
10450
10606
  type: Boolean,
10451
10607
  default: false
10452
10608
  },
10609
+ // draggable为true时有效
10610
+ x: Number,
10611
+ y: Number,
10453
10612
  okText: {
10454
10613
  type: [String, Boolean],
10455
10614
  default: "确定"
@@ -10507,8 +10666,8 @@ const ModalView = /* @__PURE__ */ vue.defineComponent({
10507
10666
  const header = vue.shallowRef();
10508
10667
  const scroller = vue.shallowRef();
10509
10668
  const resizer = vue.shallowRef();
10510
- const x = vue.ref(0);
10511
- const y = vue.ref(0);
10669
+ const x = vue.ref(props.x);
10670
+ const y = vue.ref(props.y);
10512
10671
  const isActive = vue.ref(false);
10513
10672
 
10514
10673
  // 注: 服务端渲染为0, 在客服端激活前,展示端存在问题【高度不定】
@@ -10550,8 +10709,8 @@ const ModalView = /* @__PURE__ */ vue.defineComponent({
10550
10709
  });
10551
10710
  const draggableStyle = vue.computed(() => {
10552
10711
  if (vcShared.IS_SERVER || !props.draggable) return {};
10553
- const left = x.value || window.innerWidth / 2 - defaultSize.value.width / 2;
10554
- const top = y.value || window.innerHeight / 2 - defaultSize.value.height / 2;
10712
+ const left = typeof x.value === 'undefined' ? window.innerWidth / 2 - defaultSize.value.width / 2 : x.value;
10713
+ const top = typeof y.value === 'undefined' ? window.innerHeight / 2 - defaultSize.value.height / 2 : y.value;
10555
10714
  return {
10556
10715
  left: `${left}px`,
10557
10716
  top: `${top}px`
@@ -12148,10 +12307,49 @@ const Picker = /* @__PURE__ */ vue.defineComponent({
12148
12307
  const MPicker = Picker;
12149
12308
 
12150
12309
  const props$p = {
12151
- tag: {
12310
+ title: {
12311
+ type: [String, Function],
12312
+ default: ""
12313
+ },
12314
+ content: {
12315
+ type: [String, Function],
12316
+ default: ""
12317
+ },
12318
+ modelValue: {
12319
+ type: Boolean,
12320
+ default: false
12321
+ },
12322
+ placement: {
12152
12323
  type: String,
12153
- default: "div"
12154
- }
12324
+ default: "top"
12325
+ },
12326
+ trigger: {
12327
+ type: String,
12328
+ default: "click"
12329
+ },
12330
+ okText: {
12331
+ type: String,
12332
+ default: "确定"
12333
+ },
12334
+ cancelText: {
12335
+ type: String,
12336
+ default: "取消"
12337
+ },
12338
+ okType: {
12339
+ type: String,
12340
+ default: "primary"
12341
+ },
12342
+ cancelType: {
12343
+ type: String,
12344
+ default: "default"
12345
+ },
12346
+ type: {
12347
+ type: String,
12348
+ default: "warning",
12349
+ validator: (v) => /(warning|info|success|error)/.test(v)
12350
+ },
12351
+ width: [String, Number],
12352
+ portalClass: [String, Object]
12155
12353
  };
12156
12354
 
12157
12355
  /** @jsxImportSource vue */
@@ -12160,13 +12358,125 @@ const COMPONENT_NAME$C = 'vc-popconfirm';
12160
12358
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
12161
12359
  name: COMPONENT_NAME$C,
12162
12360
  props: props$p,
12361
+ inheritAttrs: false,
12362
+ emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
12163
12363
  setup(props, {
12164
- slots
12364
+ slots,
12365
+ emit
12165
12366
  }) {
12367
+ const instance = vue.getCurrentInstance();
12368
+ const its = vcHooks.useAttrs({
12369
+ merge: false
12370
+ });
12371
+ const isActive = vue.ref(false);
12372
+ const contentStyle = vue.computed(() => {
12373
+ return props.content || !!slots.content ? {
12374
+ marginBottom: '15px'
12375
+ } : {};
12376
+ });
12377
+ const inherit = vue.computed(() => {
12378
+ return {
12379
+ style: its.value.style,
12380
+ class: its.value.class
12381
+ };
12382
+ });
12383
+ const attrs = vue.computed(() => {
12384
+ return its.value.attrs;
12385
+ });
12386
+ vue.watch(() => props.modelValue, v => {
12387
+ isActive.value = v;
12388
+ }, {
12389
+ immediate: true
12390
+ });
12391
+
12392
+ /**
12393
+ * v-model 同步, 外部的数据改变时不会触发
12394
+ */
12395
+ const sync = () => {
12396
+ emit('update:modelValue', isActive.value);
12397
+ emit('visible-change', isActive.value);
12398
+ };
12399
+ const handleBefore = (e, hook) => {
12400
+ e.stopPropagation();
12401
+ e.preventDefault();
12402
+ if (!isActive.value) return;
12403
+ const fn = hook && hook(e);
12404
+ if (fn && fn.then) {
12405
+ return fn.then(res => {
12406
+ isActive.value = false;
12407
+ sync();
12408
+ return res;
12409
+ });
12410
+ } else if (!fn || fn === true) {
12411
+ isActive.value = false;
12412
+ sync();
12413
+ }
12414
+ };
12415
+ const handleOk = (...rest) => {
12416
+ const ok = instance.vnode.props?.onOk || (() => {});
12417
+ return ok(...rest);
12418
+ };
12419
+ const handleCancel = (...rest) => {
12420
+ const cancel = instance.vnode.props?.onCancel || (() => {});
12421
+ return cancel(...rest);
12422
+ };
12423
+ const handleChange = v => {
12424
+ isActive.value = v;
12425
+ sync();
12426
+ };
12166
12427
  return () => {
12167
- return vue.createVNode("div", {
12168
- "class": "vc-popconfirm"
12169
- }, [slots?.default?.()]);
12428
+ return vue.createVNode(Popover, vue.mergeProps(attrs.value, {
12429
+ "modelValue": isActive.value,
12430
+ "placement": props.placement,
12431
+ "trigger": props.trigger,
12432
+ "portalClass": ['is-padding-none', 'vc-popconfirm-wrapper', props.portalClass],
12433
+ "class": ['vc-popconfirm', inherit.value.class],
12434
+ "style": inherit.value.style,
12435
+ "onReady": () => emit('ready'),
12436
+ "onClose": () => emit('close'),
12437
+ "onVisibleChange": handleChange
12438
+ }), {
12439
+ default: () => slots?.default?.(),
12440
+ content: () => {
12441
+ return vue.createVNode("div", {
12442
+ "style": [{
12443
+ width: `${props.width}px`
12444
+ }],
12445
+ "class": "vc-popconfirm__wrapper"
12446
+ }, [vue.createVNode("div", {
12447
+ "class": "vc-popconfirm__title"
12448
+ }, [slots.icon ? slots.icon() : vue.createVNode(Icon, {
12449
+ "type": props.type,
12450
+ "class": [`is-${props.type}`, 'vc-popconfirm__icon']
12451
+ }, null), vue.createVNode("div", null, [slots.title ? slots.title() : typeof props.title === 'string' ? vue.createVNode("div", {
12452
+ "innerHTML": props.title
12453
+ }, null) : typeof props.title === 'function' ? vue.createVNode(Customer, {
12454
+ "render": props.title
12455
+ }, null) : null])]), vue.createVNode("div", {
12456
+ "style": contentStyle.value,
12457
+ "class": "vc-popconfirm__content"
12458
+ }, [slots.content ? slots.content() : typeof props.content === 'string' ? vue.createVNode("div", {
12459
+ "innerHTML": props.content
12460
+ }, null) : typeof props.content === 'function' ? vue.createVNode(Customer, {
12461
+ "render": props.content
12462
+ }, null) : null]), vue.createVNode("div", {
12463
+ "class": "vc-popconfirm__footer"
12464
+ }, [vue.createVNode(Button, {
12465
+ "type": props.cancelType,
12466
+ "style": "margin-right: 8px;",
12467
+ "size": "small",
12468
+ "onClick": e => handleBefore(e, handleCancel)
12469
+ }, {
12470
+ default: () => [props.cancelText]
12471
+ }), vue.createVNode(Button, {
12472
+ "type": props.okType,
12473
+ "size": "small",
12474
+ "onClick": e => handleBefore(e, handleOk)
12475
+ }, {
12476
+ default: () => [props.okText]
12477
+ })])]);
12478
+ }
12479
+ });
12170
12480
  };
12171
12481
  }
12172
12482
  });
@@ -13773,6 +14083,18 @@ const props$d = {
13773
14083
  uncheckedText: {
13774
14084
  type: String,
13775
14085
  default: ""
14086
+ },
14087
+ width: {
14088
+ type: Number,
14089
+ default: 36
14090
+ },
14091
+ height: {
14092
+ type: Number,
14093
+ default: 20
14094
+ },
14095
+ borderWidth: {
14096
+ type: Number,
14097
+ default: 1
13776
14098
  }
13777
14099
  };
13778
14100
 
@@ -13855,28 +14177,65 @@ const Switch = /* @__PURE__ */ vue.defineComponent({
13855
14177
  expose
13856
14178
  }) {
13857
14179
  const {
14180
+ checked,
13858
14181
  classes,
13859
14182
  currentValue,
13860
14183
  isLoading,
13861
14184
  handleToggle
13862
14185
  } = useSwitch(expose);
14186
+ const size = vue.computed(() => {
14187
+ return props.height - props.borderWidth * 4;
14188
+ });
14189
+ const lefts = vue.computed(() => {
14190
+ return {
14191
+ inner: checked.value ? props.width - props.borderWidth * 3 - size.value : props.borderWidth,
14192
+ loading: checked.value ? props.height - props.borderWidth * 2 : props.borderWidth * 2
14193
+ };
14194
+ });
14195
+ const contentOffset = vue.computed(() => {
14196
+ return Math.max(props.height / 2, size.value) + props.borderWidth * 2;
14197
+ });
13863
14198
  return () => {
13864
- return vue.createVNode("span", {
13865
- "class": [classes.value, 'vc-switch'],
14199
+ return vue.createVNode("div", {
14200
+ "style": {
14201
+ width: `${props.width}px`
14202
+ },
14203
+ "class": [classes.value, 'vc-switch']
14204
+ }, [vue.createVNode("span", {
14205
+ "style": {
14206
+ height: `${props.height}px`,
14207
+ borderWidth: `${props.borderWidth}px`
14208
+ },
14209
+ "class": "vc-switch__wrapper",
13866
14210
  "onClick": handleToggle
13867
14211
  }, [vue.createVNode("input", {
13868
14212
  "name": props.name,
13869
14213
  "value": currentValue.value,
13870
14214
  "type": "hidden"
13871
14215
  }, null), vue.createVNode("span", {
13872
- "class": "vc-switch__content"
14216
+ "class": "vc-switch__content",
14217
+ "style": {
14218
+ left: `${checked.value ? props.height / 4 : contentOffset.value}px`,
14219
+ right: `${checked.value ? contentOffset.value : props.height / 4}px`,
14220
+ top: 0,
14221
+ bottom: 0
14222
+ }
13873
14223
  }, [currentValue.value === props.checkedValue ? slots.checked ? slots.checked() : props.checkedText : null, currentValue.value === props.uncheckedValue ? slots.unchecked ? slots.unchecked() : props.uncheckedText : null]), vue.createVNode("span", {
13874
- "class": "vc-switch__inner"
14224
+ "class": "vc-switch__inner",
14225
+ "style": {
14226
+ width: `${size.value}px`,
14227
+ height: `${size.value}px`,
14228
+ left: `${lefts.value.inner}px`,
14229
+ top: `${props.borderWidth}px`
14230
+ }
13875
14231
  }, null), isLoading.value && vue.createVNode(Spin, {
13876
14232
  "size": 14,
13877
14233
  "foreground": "#fff",
13878
- "class": "vc-switch__loading"
13879
- }, null)]);
14234
+ "class": "vc-switch__loading",
14235
+ "style": {
14236
+ left: `${lefts.value.loading}px`
14237
+ }
14238
+ }, null)])]);
13880
14239
  };
13881
14240
  }
13882
14241
  });
@@ -15035,6 +15394,79 @@ const NormalList = /* @__PURE__ */ vue.defineComponent({
15035
15394
  }
15036
15395
  });
15037
15396
 
15397
+ const HIDDEN_TEXT_STYLE = `
15398
+ position: absolute!important;
15399
+ word-break: break-all!important;
15400
+ overflow: auto!important;
15401
+ opacity: 1!important;
15402
+ z-index: -1000!important;
15403
+ top: 0!important;
15404
+ right: 100px!important;
15405
+ `;
15406
+ const SIZING_STYLE$1 = [
15407
+ "letter-spacing",
15408
+ "line-height",
15409
+ "padding-top",
15410
+ "padding-bottom",
15411
+ "font-family",
15412
+ "font-weight",
15413
+ "font-size",
15414
+ "text-rendering",
15415
+ "text-transform",
15416
+ "width",
15417
+ // 'text-indent', // 需要额外计算
15418
+ "padding-left",
15419
+ "padding-right",
15420
+ "border-width",
15421
+ "box-sizing"
15422
+ ];
15423
+ let hiddenEl$1;
15424
+ const getFitIndex = (options = {}) => {
15425
+ const { el, line, value, suffix, indent = 0 } = options;
15426
+ let lineHeight = parseInt($.getStyle(el, "line-height"), 10);
15427
+ if (!hiddenEl$1) {
15428
+ hiddenEl$1 = document.createElement("div");
15429
+ document.body.appendChild(hiddenEl$1);
15430
+ }
15431
+ el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
15432
+ const {
15433
+ paddingSize,
15434
+ borderSize,
15435
+ boxSizing,
15436
+ sizingStyle
15437
+ } = vcShared.Utils.getComputedStyle(el, SIZING_STYLE$1);
15438
+ const textIndent = `text-indent: ${parseInt($.getStyle(el, "text-indent"), 10) + indent}px;`;
15439
+ hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
15440
+ let sideHeight = paddingSize || 0;
15441
+ boxSizing === "border-box" && (sideHeight += borderSize);
15442
+ if (Number.isNaN(lineHeight)) {
15443
+ hiddenEl$1.innerText = ".";
15444
+ lineHeight = hiddenEl$1.clientHeight - sideHeight;
15445
+ }
15446
+ let endIndex = -1;
15447
+ const strs = (typeof value === "number" ? `${value}` : value || "").split("");
15448
+ let innerText = "";
15449
+ for (let i = 0; i < strs.length; i++) {
15450
+ innerText += strs[i];
15451
+ hiddenEl$1.innerText = innerText;
15452
+ if (endIndex === -1 && hiddenEl$1.clientHeight - sideHeight > lineHeight * line) {
15453
+ endIndex = i;
15454
+ break;
15455
+ }
15456
+ }
15457
+ if (endIndex >= 0 && endIndex <= strs.length - 1) {
15458
+ for (let i = endIndex - 1; i >= 0; i--) {
15459
+ innerText = innerText.substring(0, i);
15460
+ hiddenEl$1.innerText = innerText + suffix;
15461
+ if (hiddenEl$1.clientHeight - sideHeight <= lineHeight * line) {
15462
+ endIndex = i;
15463
+ break;
15464
+ }
15465
+ }
15466
+ }
15467
+ return endIndex;
15468
+ };
15469
+
15038
15470
  const TableBody = /* @__PURE__ */ vue.defineComponent({
15039
15471
  name: 'vc-table-body',
15040
15472
  props: {
@@ -15143,10 +15575,13 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
15143
15575
  column
15144
15576
  });
15145
15577
  }
15146
- return cellStyle;
15578
+ return {
15579
+ ...cellStyle,
15580
+ ...column.style
15581
+ };
15147
15582
  };
15148
15583
  const getCellClass = (rowIndex, columnIndex, row, column) => {
15149
- const classes = [column.realAlign, column.className];
15584
+ const classes = [column.realAlign, column.class];
15150
15585
  if (isColumnHidden(columnIndex)) {
15151
15586
  classes.push('is-hidden');
15152
15587
  }
@@ -15163,24 +15598,44 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
15163
15598
  }
15164
15599
  return classes.join(' ');
15165
15600
  };
15166
- const handleCellMouseEnter = (e, row) => {
15601
+ let poper;
15602
+ const handleCellMouseEnter = (e, row, column) => {
15167
15603
  const cell = getCell(e);
15604
+ const hoverState = {
15605
+ cell,
15606
+ column,
15607
+ row
15608
+ };
15168
15609
  if (cell) {
15169
- const column = getColumnByCell(states.columns, cell);
15170
- const hoverState = {
15171
- cell,
15172
- column,
15173
- row
15174
- };
15175
15610
  table.hoverState.value = hoverState;
15176
15611
  table.emit('cell-mouse-enter', hoverState.row, hoverState.column, hoverState.cell, e);
15177
15612
  }
15613
+ // 判断是否text-overflow, 如果是就显示tooltip
15614
+ const el = e.target.querySelector('.vc-table__text-line');
15615
+ if (!el) return;
15616
+ const value = `${row[column.prop]}`;
15617
+ const endIndex = getFitIndex({
15618
+ el,
15619
+ value,
15620
+ line: column.line,
15621
+ suffix: '...'
15622
+ });
15623
+ if (endIndex > 0 && endIndex < value.length - 1) {
15624
+ poper && poper.destroy();
15625
+ poper = Popover.open({
15626
+ el: document.body,
15627
+ triggerEl: el,
15628
+ hover: true,
15629
+ alone: true,
15630
+ autoWidth: true,
15631
+ content: value
15632
+ });
15633
+ }
15178
15634
  };
15179
- const handleCellMouseLeave = e => {
15635
+ const handleCellMouseLeave = (e, row, column) => {
15180
15636
  const cell = getCell(e);
15181
15637
  if (!cell) return;
15182
- const oldHoverState = table.hoverState.value || {};
15183
- table.emit('cell-mouse-leave', oldHoverState.row, oldHoverState.column, oldHoverState.cell, e);
15638
+ table.emit('cell-mouse-leave', row, column, cell, e);
15184
15639
  };
15185
15640
  const handleMouseEnter = lodashEs.debounce(index => {
15186
15641
  table.store.setHoverRow(index);
@@ -15251,8 +15706,8 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
15251
15706
  "key": column.id,
15252
15707
  "style": [getCellStyle(rowIndex, columnIndex, row, column), sizeStyle],
15253
15708
  "class": [getCellClass(rowIndex, columnIndex, row, column), 'vc-table__td'],
15254
- "onMouseenter": e => handleCellMouseEnter(e, row),
15255
- "onMouseleave": e => handleCellMouseLeave(e)
15709
+ "onMouseenter": e => handleCellMouseEnter(e, row, column),
15710
+ "onMouseleave": e => handleCellMouseLeave(e, row, column)
15256
15711
  }, [renderCell({
15257
15712
  row,
15258
15713
  column,
@@ -15308,7 +15763,11 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
15308
15763
  allowRender.value = true;
15309
15764
  }
15310
15765
  });
15311
- vue.onBeforeUnmount(() => (timer && clearTimeout(timer), allowRender.value = false));
15766
+ vue.onBeforeUnmount(() => {
15767
+ poper && poper.destroy();
15768
+ timer && clearTimeout(timer);
15769
+ allowRender.value = false;
15770
+ });
15312
15771
  return () => {
15313
15772
  if (!allowRender.value) return;
15314
15773
  return vue.createVNode("div", {
@@ -15435,10 +15894,13 @@ const TableHeader = /* @__PURE__ */ vue.defineComponent({
15435
15894
  column
15436
15895
  });
15437
15896
  }
15438
- return headerCellStyle;
15897
+ return {
15898
+ ...headerCellStyle,
15899
+ ...column.style
15900
+ };
15439
15901
  };
15440
15902
  const getHeaderCellClass = (rowIndex, columnIndex, row, column) => {
15441
- const classes = [column.id, column.order, column.realHeaderAlign, column.className, column.labelClass];
15903
+ const classes = [column.id, column.order, column.realHeaderAlign, column.class, column.labelClass];
15442
15904
  if (rowIndex === 0 && columnsHidden.value[columnIndex]) {
15443
15905
  classes.push('is-hidden');
15444
15906
  }
@@ -16373,210 +16835,19 @@ const Table = /* @__PURE__ */ vue.defineComponent({
16373
16835
  }
16374
16836
  });
16375
16837
 
16376
- const props$b = {
16377
- tag: {
16378
- type: String,
16379
- default: "div"
16380
- },
16381
- value: {
16382
- type: String,
16383
- default: ""
16384
- },
16385
- line: {
16386
- type: Number,
16387
- default: 0
16388
- },
16389
- // TODO: 是否改为tail-indent来表示尾部缩进
16390
- indent: {
16391
- type: Number,
16392
- default: 0
16838
+ const cellStarts = {
16839
+ default: {
16840
+ order: ''
16393
16841
  },
16394
- resize: {
16395
- type: [Boolean, Number],
16396
- default: 100
16842
+ selection: {
16843
+ width: 60,
16844
+ minWidth: 60,
16845
+ order: ''
16397
16846
  },
16398
- suffix: {
16399
- type: String,
16400
- default: "..."
16401
- },
16402
- placement: {
16403
- type: String,
16404
- default: "top"
16405
- },
16406
- portalClass: [Object, String, Array],
16407
- portalStyle: [Object, String, Array],
16408
- renderRow: {
16409
- type: Function,
16410
- default: (props$) => {
16411
- return props$.value;
16412
- }
16413
- }
16414
- };
16415
-
16416
- const HIDDEN_TEXT_STYLE = `
16417
- position: absolute!important;
16418
- word-break: break-all!important;
16419
- overflow: auto!important;
16420
- opacity: 0!important;
16421
- z-index: -1000!important;
16422
- top: 0!important;
16423
- right: 0!important;
16424
- `;
16425
- const SIZING_STYLE$1 = [
16426
- "letter-spacing",
16427
- "line-height",
16428
- "padding-top",
16429
- "padding-bottom",
16430
- "font-family",
16431
- "font-weight",
16432
- "font-size",
16433
- "text-rendering",
16434
- "text-transform",
16435
- "width",
16436
- // 'text-indent', // 需要额外计算
16437
- "padding-left",
16438
- "padding-right",
16439
- "border-width",
16440
- "box-sizing"
16441
- ];
16442
- let hiddenEl$1;
16443
- const getFitIndex = (options = {}) => {
16444
- const { el, line, value, suffix, indent } = options;
16445
- let lineHeight = parseInt($.getStyle(el, "line-height"), 10);
16446
- if (!hiddenEl$1) {
16447
- hiddenEl$1 = document.createElement("div");
16448
- document.body.appendChild(hiddenEl$1);
16449
- }
16450
- el.getAttribute("wrap") ? hiddenEl$1.setAttribute("wrap", el.getAttribute("wrap")) : hiddenEl$1.removeAttribute("wrap");
16451
- const {
16452
- paddingSize,
16453
- borderSize,
16454
- boxSizing,
16455
- sizingStyle
16456
- } = vcShared.Utils.getComputedStyle(el, SIZING_STYLE$1);
16457
- const textIndent = `text-indent: ${parseInt($.getStyle(el, "text-indent"), 10) + indent}px;`;
16458
- hiddenEl$1.setAttribute("style", `${sizingStyle};${textIndent};${HIDDEN_TEXT_STYLE}`);
16459
- let sideHeight = paddingSize || 0;
16460
- boxSizing === "border-box" && (sideHeight += borderSize);
16461
- if (Number.isNaN(lineHeight)) {
16462
- hiddenEl$1.innerText = ".";
16463
- lineHeight = hiddenEl$1.clientHeight - sideHeight;
16464
- }
16465
- let endIndex = 0;
16466
- hiddenEl$1.innerText = suffix;
16467
- (value || "").split("").forEach((item, i) => {
16468
- let old = hiddenEl$1.innerText;
16469
- old = old.substring(0, old.length - suffix.length);
16470
- hiddenEl$1.innerText = old + item + suffix;
16471
- if (hiddenEl$1.clientHeight - sideHeight > lineHeight * line && endIndex === 0) {
16472
- endIndex = i;
16473
- }
16474
- });
16475
- return endIndex;
16476
- };
16477
-
16478
- /** @jsxImportSource vue */
16479
-
16480
- const COMPONENT_NAME$h = 'vc-text';
16481
- const Text = /* @__PURE__ */ vue.defineComponent({
16482
- name: COMPONENT_NAME$h,
16483
- props: props$b,
16484
- setup(props, {
16485
- emit
16486
- }) {
16487
- const instance = vue.getCurrentInstance();
16488
- const isActive = vue.ref(false);
16489
- const endIndex = vue.ref(0);
16490
- const styles = vue.computed(() => {
16491
- return {
16492
- cursor: endIndex.value === 0 ? 'unset' : 'pointer'
16493
- };
16494
- });
16495
- const calcPosition = () => {
16496
- const {
16497
- suffix,
16498
- line,
16499
- value,
16500
- indent
16501
- } = props;
16502
- if (line === 0) {
16503
- endIndex.value = 0;
16504
- isActive.value = true;
16505
- } else {
16506
- endIndex.value = getFitIndex({
16507
- el: instance.vnode.el,
16508
- line,
16509
- value,
16510
- suffix,
16511
- indent
16512
- });
16513
- isActive.value = true;
16514
- }
16515
- emit('clip', endIndex.value);
16516
- };
16517
- const handleResize = props.resize === true || props.resize === 0 ? calcPosition : lodashEs.debounce(calcPosition, props.resize || 0);
16518
- let poper;
16519
- const handleMouseOver = e => {
16520
- if (endIndex.value > 0) {
16521
- poper = Popover.open({
16522
- el: document.body,
16523
- name: 'vc-text-popover',
16524
- // 确保不重复创建
16525
- triggerEl: e.target,
16526
- hover: true,
16527
- theme: 'dark',
16528
- placement: props.placement,
16529
- portalClass: props.portalClass,
16530
- portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
16531
- content: props.value
16532
- });
16533
- }
16534
- };
16535
- const handleMouseOut = () => {
16536
- // Do.
16537
- };
16538
- ['value', 'indent', 'line'].forEach(key => {
16539
- vue.watch(() => props[key], calcPosition);
16540
- });
16541
- vue.onMounted(() => {
16542
- props.resize !== false && helperResize.Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
16543
- });
16544
- vue.onBeforeUnmount(() => {
16545
- props.resize !== false && helperResize.Resize.off(instance.vnode.el, handleResize);
16546
- poper?.destroy?.();
16547
- });
16548
- const Content = props.tag;
16549
- return () => {
16550
- return vue.createVNode(Content, {
16551
- "class": "vc-text",
16552
- "style": styles.value,
16553
- "onMouseover": handleMouseOver,
16554
- "onMouseout": handleMouseOut
16555
- }, {
16556
- default: () => [isActive.value ? vue.createVNode(Customer, {
16557
- "value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
16558
- "index": endIndex.value,
16559
- "render": props.renderRow
16560
- }, null) : null]
16561
- });
16562
- };
16563
- }
16564
- });
16565
-
16566
- const cellStarts = {
16567
- default: {
16568
- order: ''
16569
- },
16570
- selection: {
16571
- width: 60,
16572
- minWidth: 60,
16573
- order: '',
16574
- className: 'vc-table-column--selection'
16575
- },
16576
- expand: {
16577
- width: 60,
16578
- minWidth: 60,
16579
- order: ''
16847
+ expand: {
16848
+ width: 60,
16849
+ minWidth: 60,
16850
+ order: ''
16580
16851
  },
16581
16852
  index: {
16582
16853
  width: 60,
@@ -16617,7 +16888,8 @@ const cellForced = {
16617
16888
  }, null), [[vue.vShow, store.states.expandSelectable || level === 0]]);
16618
16889
  },
16619
16890
  sortable: false,
16620
- resizable: false
16891
+ resizable: false,
16892
+ class: 'vc-table__selection-column'
16621
16893
  },
16622
16894
  index: {
16623
16895
  renderHeader(h, {
@@ -16667,7 +16939,7 @@ const cellForced = {
16667
16939
  },
16668
16940
  sortable: false,
16669
16941
  resizable: false,
16670
- className: 'vc-table__expand-column'
16942
+ class: 'vc-table__expand-column'
16671
16943
  }
16672
16944
  };
16673
16945
 
@@ -16687,17 +16959,13 @@ const defaultRenderCell = (rowData = {}) => {
16687
16959
  }
16688
16960
  const line = column.line || VcInstance.options.TableColumn?.line;
16689
16961
  if (line && value) {
16690
- const base = rowData.isHead || rowData.isTail ? 36 : 24; // 目前gap是12
16691
16962
  const style = {
16692
- // 目前左右pading为10
16693
- // TODO: 含有border还要-1
16694
- width: (column.realWidth || column.width) - base + 'px'
16963
+ '-webkit-line-clamp': line
16695
16964
  };
16696
- return vue.createVNode(Text, {
16697
- "style": style,
16698
- "line": line,
16699
- "value": `${value}`
16700
- }, null);
16965
+ return vue.createVNode("div", {
16966
+ "class": "vc-table__text-line",
16967
+ "style": style
16968
+ }, [value]);
16701
16969
  }
16702
16970
  return value;
16703
16971
  };
@@ -16745,6 +17013,7 @@ const treeCellPrefix = ({
16745
17013
 
16746
17014
  const TableColumn = /* @__PURE__ */ vue.defineComponent({
16747
17015
  name: 'vc-table-column',
17016
+ inheritAttrs: false,
16748
17017
  props: {
16749
17018
  type: {
16750
17019
  type: String,
@@ -16756,7 +17025,6 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
16756
17025
  default: 0
16757
17026
  },
16758
17027
  label: String,
16759
- customClass: String,
16760
17028
  labelClass: String,
16761
17029
  prop: String,
16762
17030
  width: Number,
@@ -16793,7 +17061,8 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
16793
17061
  tooltip: [String, Function]
16794
17062
  },
16795
17063
  setup(props, {
16796
- slots
17064
+ slots,
17065
+ attrs
16797
17066
  }) {
16798
17067
  const instance = vue.getCurrentInstance();
16799
17068
  const table = vue.inject('vc-table');
@@ -16843,7 +17112,7 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
16843
17112
  Object.keys(source).forEach(prop => {
16844
17113
  const value = source[prop];
16845
17114
  if (value !== undefined) {
16846
- column[prop] = prop === 'customClass' ? `${column[prop]} ${value}` : value;
17115
+ column[prop] = prop === 'class' ? `${column[prop] ? `${column[prop]} ` : ''}${value}` : value;
16847
17116
  }
16848
17117
  });
16849
17118
  return column;
@@ -16913,7 +17182,7 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
16913
17182
  // 存在树形数组,且当前行无箭头图标且处于当前展开列,表格对齐
16914
17183
  if (!lodashEs.isEmpty(table.store.states.treeData) && !prefix && data.isExpandColumn) {
16915
17184
  prefix = vue.createVNode("span", {
16916
- "class": "vc-table-un-expand__indent"
17185
+ "class": "vc-table__unexpand__indent"
16917
17186
  }, null);
16918
17187
  }
16919
17188
  const {
@@ -16929,6 +17198,8 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
16929
17198
  const defaults = {
16930
17199
  colspan: 1,
16931
17200
  rowspan: 1,
17201
+ class: attrs.class,
17202
+ style: attrs.style,
16932
17203
  ...cellStarts[props.type],
16933
17204
  id: columnId.value,
16934
17205
  realAlign,
@@ -17015,7 +17286,7 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
17015
17286
  const MTable = Table;
17016
17287
  const MTableColumn = TableColumn;
17017
17288
 
17018
- const props$a = {
17289
+ const props$b = {
17019
17290
  type: {
17020
17291
  type: String,
17021
17292
  validator: (v) => /^(line|card)$/.test(v),
@@ -17174,10 +17445,10 @@ const useTabs = (options = {}) => {
17174
17445
 
17175
17446
  /** @jsxImportSource vue */
17176
17447
 
17177
- const COMPONENT_NAME$g = 'vc-tabs';
17448
+ const COMPONENT_NAME$h = 'vc-tabs';
17178
17449
  const Tabs = /* @__PURE__ */ vue.defineComponent({
17179
- name: COMPONENT_NAME$g,
17180
- props: props$a,
17450
+ name: COMPONENT_NAME$h,
17451
+ props: props$b,
17181
17452
  emits: ['update:modelValue', 'change', 'click'],
17182
17453
  setup(props, {
17183
17454
  slots
@@ -17342,7 +17613,7 @@ const Tabs = /* @__PURE__ */ vue.defineComponent({
17342
17613
  }
17343
17614
  });
17344
17615
 
17345
- const props$9 = {
17616
+ const props$a = {
17346
17617
  value: {
17347
17618
  type: [String, Number]
17348
17619
  },
@@ -17424,10 +17695,10 @@ const useTabsPane = () => {
17424
17695
 
17425
17696
  /** @jsxImportSource vue */
17426
17697
 
17427
- const COMPONENT_NAME$f = 'vc-tabs-pane';
17698
+ const COMPONENT_NAME$g = 'vc-tabs-pane';
17428
17699
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
17429
- name: COMPONENT_NAME$f,
17430
- props: props$9,
17700
+ name: COMPONENT_NAME$g,
17701
+ props: props$a,
17431
17702
  setup(_, {
17432
17703
  slots
17433
17704
  }) {
@@ -17442,8 +17713,8 @@ const TabsPane = /* @__PURE__ */ vue.defineComponent({
17442
17713
  }
17443
17714
  });
17444
17715
 
17445
- const props$8 = {
17446
- ...props$a,
17716
+ const props$9 = {
17717
+ ...props$b,
17447
17718
  theme: {
17448
17719
  type: String,
17449
17720
  default: "light",
@@ -17481,10 +17752,10 @@ const props$8 = {
17481
17752
 
17482
17753
  /** @jsxImportSource vue */
17483
17754
 
17484
- const COMPONENT_NAME$e = 'vcm-tabs';
17755
+ const COMPONENT_NAME$f = 'vcm-tabs';
17485
17756
  const MTabs = /* @__PURE__ */ vue.defineComponent({
17486
- name: COMPONENT_NAME$e,
17487
- props: props$8,
17757
+ name: COMPONENT_NAME$f,
17758
+ props: props$9,
17488
17759
  emits: ['update:modelValue', 'change', 'click'],
17489
17760
  setup(props, {
17490
17761
  slots
@@ -17748,10 +18019,10 @@ const MTabs = /* @__PURE__ */ vue.defineComponent({
17748
18019
 
17749
18020
  /** @jsxImportSource vue */
17750
18021
 
17751
- const COMPONENT_NAME$d = 'vcm-tabs-pane';
18022
+ const COMPONENT_NAME$e = 'vcm-tabs-pane';
17752
18023
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
17753
- name: COMPONENT_NAME$d,
17754
- props: props$9,
18024
+ name: COMPONENT_NAME$e,
18025
+ props: props$a,
17755
18026
  setup(_, {
17756
18027
  slots
17757
18028
  }) {
@@ -17768,6 +18039,134 @@ const MTabsPane = /* @__PURE__ */ vue.defineComponent({
17768
18039
 
17769
18040
  const MTag = Tag;
17770
18041
 
18042
+ const props$8 = {
18043
+ tag: {
18044
+ type: String,
18045
+ default: "div"
18046
+ },
18047
+ value: {
18048
+ type: String,
18049
+ default: ""
18050
+ },
18051
+ line: {
18052
+ type: Number,
18053
+ default: 0
18054
+ },
18055
+ // TODO: 是否改为tail-indent来表示尾部缩进
18056
+ indent: {
18057
+ type: Number,
18058
+ default: 0
18059
+ },
18060
+ resize: {
18061
+ type: [Boolean, Number],
18062
+ default: 100
18063
+ },
18064
+ suffix: {
18065
+ type: String,
18066
+ default: "..."
18067
+ },
18068
+ placement: {
18069
+ type: String,
18070
+ default: "top"
18071
+ },
18072
+ portalClass: [Object, String, Array],
18073
+ portalStyle: [Object, String, Array],
18074
+ renderRow: {
18075
+ type: Function,
18076
+ default: (props$) => {
18077
+ return props$.value;
18078
+ }
18079
+ }
18080
+ };
18081
+
18082
+ /** @jsxImportSource vue */
18083
+
18084
+ const COMPONENT_NAME$d = 'vc-text';
18085
+ const Text = /* @__PURE__ */ vue.defineComponent({
18086
+ name: COMPONENT_NAME$d,
18087
+ props: props$8,
18088
+ setup(props, {
18089
+ emit
18090
+ }) {
18091
+ const instance = vue.getCurrentInstance();
18092
+ const isActive = vue.ref(false);
18093
+ const endIndex = vue.ref(-1);
18094
+ const styles = vue.computed(() => {
18095
+ return {
18096
+ cursor: endIndex.value <= 0 ? 'unset' : 'pointer'
18097
+ };
18098
+ });
18099
+ const calcPosition = () => {
18100
+ const {
18101
+ suffix,
18102
+ line,
18103
+ value,
18104
+ indent
18105
+ } = props;
18106
+ if (line === 0) {
18107
+ endIndex.value = -1;
18108
+ isActive.value = true;
18109
+ } else {
18110
+ endIndex.value = getFitIndex({
18111
+ el: instance.vnode.el,
18112
+ line,
18113
+ value,
18114
+ suffix,
18115
+ indent
18116
+ });
18117
+ isActive.value = true;
18118
+ }
18119
+ emit('clip', endIndex.value);
18120
+ };
18121
+ const handleResize = props.resize === true || props.resize === 0 ? calcPosition : lodashEs.debounce(calcPosition, props.resize || 0);
18122
+ let poper;
18123
+ const handleMouseOver = e => {
18124
+ if (endIndex.value > 0) {
18125
+ poper = Popover.open({
18126
+ el: document.body,
18127
+ name: 'vc-text-popover',
18128
+ // 确保不重复创建
18129
+ triggerEl: e.target,
18130
+ hover: true,
18131
+ theme: 'dark',
18132
+ placement: props.placement,
18133
+ portalClass: props.portalClass,
18134
+ portalStyle: [props.portalStyle || `width: ${e.target.clientWidth}px`, 'word-break: break-all'],
18135
+ content: props.value
18136
+ });
18137
+ }
18138
+ };
18139
+ const handleMouseOut = () => {
18140
+ // Do.
18141
+ };
18142
+ ['value', 'indent', 'line'].forEach(key => {
18143
+ vue.watch(() => props[key], calcPosition);
18144
+ });
18145
+ vue.onMounted(() => {
18146
+ props.resize !== false && helperResize.Resize.on(instance.vnode.el, handleResize); // 首次会执行一次
18147
+ });
18148
+ vue.onBeforeUnmount(() => {
18149
+ props.resize !== false && helperResize.Resize.off(instance.vnode.el, handleResize);
18150
+ poper?.destroy?.();
18151
+ });
18152
+ const Content = props.tag;
18153
+ return () => {
18154
+ return vue.createVNode(Content, {
18155
+ "class": "vc-text",
18156
+ "style": styles.value,
18157
+ "onMouseover": handleMouseOver,
18158
+ "onMouseout": handleMouseOut
18159
+ }, {
18160
+ default: () => [isActive.value ? vue.createVNode(Customer, {
18161
+ "value": endIndex.value > 0 ? `${props.value.slice(0, endIndex.value)}${props.suffix}` : props.value,
18162
+ "index": endIndex.value,
18163
+ "render": props.renderRow
18164
+ }, null) : null]
18165
+ });
18166
+ };
18167
+ }
18168
+ });
18169
+
17771
18170
  const MText = Text;
17772
18171
 
17773
18172
  const HIDDEN_TEXTAREA_STYLE = `
@@ -19447,6 +19846,8 @@ exports.Divider = Divider;
19447
19846
  exports.Drawer = Drawer;
19448
19847
  exports.DrawerView = DrawerView;
19449
19848
  exports.Dropdown = Dropdown;
19849
+ exports.DropdownItem = DropdownItem;
19850
+ exports.DropdownMenu = DropdownMenu;
19450
19851
  exports.Editor = Editor;
19451
19852
  exports.Expand = Expand$1;
19452
19853
  exports.Form = Form;
@@ -19488,6 +19889,8 @@ exports.MDivider = MDivider;
19488
19889
  exports.MDrawer = MDrawer;
19489
19890
  exports.MDrawerView = MDrawerView;
19490
19891
  exports.MDropdown = MDropdown;
19892
+ exports.MDropdownItem = MDropdownItem;
19893
+ exports.MDropdownMenu = MDropdownMenu;
19491
19894
  exports.MEditor = MEditor;
19492
19895
  exports.MExpand = MExpand;
19493
19896
  exports.MForm = MForm;