@deot/vc-components 1.0.25 → 1.0.27

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
@@ -11,8 +11,8 @@ const $ = require('@deot/helper-dom');
11
11
  const vcHooks = require('@deot/vc-hooks');
12
12
  const helperWheel = require('@deot/helper-wheel');
13
13
  const helperValidator = require('@deot/helper-validator');
14
- const helperCache = require('@deot/helper-cache');
15
14
  const PhotoSwipeLightbox = require('photoswipe/lightbox');
15
+ const helperCache = require('@deot/helper-cache');
16
16
  const Load = require('@deot/helper-load');
17
17
  const helperScheduler = require('@deot/helper-scheduler');
18
18
  const lodash = require('lodash');
@@ -103,9 +103,9 @@ const props$1q = {
103
103
 
104
104
  /** @jsxImportSource vue */
105
105
 
106
- const COMPONENT_NAME$1$ = 'vc-action-sheet';
106
+ const COMPONENT_NAME$20 = 'vc-action-sheet';
107
107
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
108
- name: COMPONENT_NAME$1$,
108
+ name: COMPONENT_NAME$20,
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$1$ = 'vc-icon';
296
296
  const Icon = /* @__PURE__ */ vue.defineComponent({
297
- name: COMPONENT_NAME$1_,
297
+ name: COMPONENT_NAME$1$,
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$1Z = "vc-transition";
496
+ const COMPONENT_NAME$1_ = "vc-transition";
497
497
  const Transition = vue.defineComponent({
498
- name: COMPONENT_NAME$1Z,
498
+ name: COMPONENT_NAME$1_,
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$1Y = "vc-transition-collapse";
519
+ const COMPONENT_NAME$1Z = "vc-transition-collapse";
520
520
  const TransitionCollapse = vue.defineComponent({
521
- name: COMPONENT_NAME$1Y,
521
+ name: COMPONENT_NAME$1Z,
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$1X = "vc-transition-fade";
640
+ const COMPONENT_NAME$1Y = "vc-transition-fade";
641
641
  const TransitionFade = vue.defineComponent({
642
- name: COMPONENT_NAME$1X,
642
+ name: COMPONENT_NAME$1Y,
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$1W = "vc-transition-scale";
677
+ const COMPONENT_NAME$1X = "vc-transition-scale";
678
678
  const TransitionScale = vue.defineComponent({
679
- name: COMPONENT_NAME$1W,
679
+ name: COMPONENT_NAME$1X,
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$1V = "vc-transition-slide";
719
+ const COMPONENT_NAME$1W = "vc-transition-slide";
720
720
  const TransitionSlide = vue.defineComponent({
721
- name: COMPONENT_NAME$1V,
721
+ name: COMPONENT_NAME$1W,
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$1U = "vc-transition-zoom";
761
+ const COMPONENT_NAME$1V = "vc-transition-zoom";
762
762
  const TransitionZoom = vue.defineComponent({
763
- name: COMPONENT_NAME$1U,
763
+ name: COMPONENT_NAME$1V,
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$1T = 'vc-alert';
805
+ const COMPONENT_NAME$1U = '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$1T,
815
+ name: COMPONENT_NAME$1U,
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$1S = 'vc-artboard';
914
+ const COMPONENT_NAME$1T = 'vc-artboard';
915
915
  const Artboard = /* @__PURE__ */ vue.defineComponent({
916
- name: COMPONENT_NAME$1S,
916
+ name: COMPONENT_NAME$1T,
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$1R = 'vc-spin';
955
+ const COMPONENT_NAME$1S = 'vc-spin';
956
956
  const Spin = /* @__PURE__ */ vue.defineComponent({
957
- name: COMPONENT_NAME$1R,
957
+ name: COMPONENT_NAME$1S,
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$1Q = "vc-debounce";
1008
+ const COMPONENT_NAME$1R = "vc-debounce";
1009
1009
  const Debounce = vue.defineComponent({
1010
- name: COMPONENT_NAME$1Q,
1010
+ name: COMPONENT_NAME$1R,
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$1P = 'vc-button';
1082
+ const COMPONENT_NAME$1Q = 'vc-button';
1083
1083
  const Button = /* @__PURE__ */ vue.defineComponent({
1084
- name: COMPONENT_NAME$1P,
1084
+ name: COMPONENT_NAME$1Q,
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$1O = 'vc-button-group';
1166
+ const COMPONENT_NAME$1P = 'vc-button-group';
1167
1167
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
1168
- name: COMPONENT_NAME$1O,
1168
+ name: COMPONENT_NAME$1P,
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$1N = 'vc-calendar';
1202
+ const COMPONENT_NAME$1O = 'vc-calendar';
1203
1203
  const Calendar = /* @__PURE__ */ vue.defineComponent({
1204
- name: COMPONENT_NAME$1N,
1204
+ name: COMPONENT_NAME$1O,
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$1M = 'vc-card';
1242
+ const COMPONENT_NAME$1N = 'vc-card';
1243
1243
  const Card = /* @__PURE__ */ vue.defineComponent({
1244
- name: COMPONENT_NAME$1M,
1244
+ name: COMPONENT_NAME$1N,
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$1L = 'vc-carousel';
1280
+ const COMPONENT_NAME$1M = 'vc-carousel';
1281
1281
  const Carousel = /* @__PURE__ */ vue.defineComponent({
1282
- name: COMPONENT_NAME$1L,
1282
+ name: COMPONENT_NAME$1M,
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$1K = 'vc-cascader';
1306
+ const COMPONENT_NAME$1L = 'vc-cascader';
1307
1307
  const Cascader = /* @__PURE__ */ vue.defineComponent({
1308
- name: COMPONENT_NAME$1K,
1308
+ name: COMPONENT_NAME$1L,
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$1J = 'vc-chart';
1377
+ const COMPONENT_NAME$1K = 'vc-chart';
1378
1378
  const Chart = /* @__PURE__ */ vue.defineComponent({
1379
- name: COMPONENT_NAME$1J,
1379
+ name: COMPONENT_NAME$1K,
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$1I = 'vc-checkbox';
1611
+ const COMPONENT_NAME$1J = 'vc-checkbox';
1612
1612
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
1613
- name: COMPONENT_NAME$1I,
1613
+ name: COMPONENT_NAME$1J,
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$1H = 'vc-checkbox-group';
1700
+ const COMPONENT_NAME$1I = 'vc-checkbox-group';
1701
1701
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
1702
- name: COMPONENT_NAME$1H,
1702
+ name: COMPONENT_NAME$1I,
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$1G = 'vcm-checkbox';
1720
+ const COMPONENT_NAME$1H = 'vcm-checkbox';
1721
1721
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
1722
- name: COMPONENT_NAME$1G,
1722
+ name: COMPONENT_NAME$1H,
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$1F = 'vcm-checkbox-group';
1762
+ const COMPONENT_NAME$1G = 'vcm-checkbox-group';
1763
1763
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
1764
- name: COMPONENT_NAME$1F,
1764
+ name: COMPONENT_NAME$1G,
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$1E = "vc-customer";
1823
+ const COMPONENT_NAME$1F = "vc-customer";
1824
1824
  const Customer = vue.defineComponent({
1825
- name: COMPONENT_NAME$1E,
1825
+ name: COMPONENT_NAME$1F,
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$1D = 'vc-message';
1836
+ const COMPONENT_NAME$1E = 'vc-message';
1837
1837
  const MessageView = /* @__PURE__ */ vue.defineComponent({
1838
- name: COMPONENT_NAME$1D,
1838
+ name: COMPONENT_NAME$1E,
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$1C = "vc-portal";
1985
+ const COMPONENT_NAME$1D = "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$1C)
2037
+ name: options?.name || wrapper.name || Utils__namespace.getUid(COMPONENT_NAME$1D)
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$1C)}` : name$;
2136
+ const name = multiple ? `${name$}__${Utils__namespace.getUid(COMPONENT_NAME$1D)}` : 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$1C,
2170
+ name: COMPONENT_NAME$1D,
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$1B = 'vc-portal-view';
2282
+ const COMPONENT_NAME$1C = '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$1B,
2288
+ name: COMPONENT_NAME$1C,
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$1A = "vc-clipboard";
2459
+ const COMPONENT_NAME$1B = "vc-clipboard";
2460
2460
  const Clipboard$1 = vue.defineComponent({
2461
- name: COMPONENT_NAME$1A,
2461
+ name: COMPONENT_NAME$1B,
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$1z = 'vcm-toast';
2501
+ const COMPONENT_NAME$1A = 'vcm-toast';
2502
2502
  const MToastView = /* @__PURE__ */ vue.defineComponent({
2503
- name: COMPONENT_NAME$1z,
2503
+ name: COMPONENT_NAME$1A,
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$1y = "vcm-clipboard";
2605
+ const COMPONENT_NAME$1z = "vcm-clipboard";
2606
2606
  const MClipboard$1 = vue.defineComponent({
2607
- name: COMPONENT_NAME$1y,
2607
+ name: COMPONENT_NAME$1z,
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$1x = "vc-collapse";
2639
+ const COMPONENT_NAME$1y = "vc-collapse";
2640
2640
  const Collapse = vue.defineComponent({
2641
- name: COMPONENT_NAME$1x,
2641
+ name: COMPONENT_NAME$1y,
2642
2642
  props: props$15,
2643
2643
  emits: ["update:moodelValue", "change"],
2644
2644
  setup(props, { slots, emit }) {
@@ -2755,9 +2755,9 @@ const props$13 = {
2755
2755
  function _isSlot$3(s) {
2756
2756
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
2757
2757
  }
2758
- const COMPONENT_NAME$1w = 'vc-expand';
2758
+ const COMPONENT_NAME$1x = 'vc-expand';
2759
2759
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
2760
- name: COMPONENT_NAME$1w,
2760
+ name: COMPONENT_NAME$1x,
2761
2761
  props: props$13,
2762
2762
  setup(props, {
2763
2763
  slots
@@ -2787,9 +2787,9 @@ const Expand$1 = /* @__PURE__ */ vue.defineComponent({
2787
2787
 
2788
2788
  /** @jsxImportSource vue */
2789
2789
 
2790
- const COMPONENT_NAME$1v = 'vc-collapse-item';
2790
+ const COMPONENT_NAME$1w = 'vc-collapse-item';
2791
2791
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
2792
- name: COMPONENT_NAME$1v,
2792
+ name: COMPONENT_NAME$1w,
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$1u = 'vc-color-picker';
2867
+ const COMPONENT_NAME$1v = 'vc-color-picker';
2868
2868
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
2869
- name: COMPONENT_NAME$1u,
2869
+ name: COMPONENT_NAME$1v,
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$1t = 'vc-countdown';
2893
+ const COMPONENT_NAME$1u = 'vc-countdown';
2894
2894
  const Countdown = /* @__PURE__ */ vue.defineComponent({
2895
- name: COMPONENT_NAME$1t,
2895
+ name: COMPONENT_NAME$1u,
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$1s = 'vc-input';
3345
+ const COMPONENT_NAME$1t = 'vc-input';
3346
3346
  const Input = /* @__PURE__ */ vue.defineComponent({
3347
- name: COMPONENT_NAME$1s,
3347
+ name: COMPONENT_NAME$1t,
3348
3348
  inheritAttrs: false,
3349
3349
  props: {
3350
3350
  ...props$$,
@@ -3678,9 +3678,9 @@ const useInputNumber = () => {
3678
3678
 
3679
3679
  /** @jsxImportSource vue */
3680
3680
 
3681
- const COMPONENT_NAME$1r = 'vc-input-number';
3681
+ const COMPONENT_NAME$1s = 'vc-input-number';
3682
3682
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
3683
- name: COMPONENT_NAME$1r,
3683
+ name: COMPONENT_NAME$1s,
3684
3684
  props: props$X,
3685
3685
  inheritAttrs: false,
3686
3686
  setup(props, {
@@ -3744,9 +3744,9 @@ const props$W = {
3744
3744
 
3745
3745
  /** @jsxImportSource vue */
3746
3746
 
3747
- const COMPONENT_NAME$1q = 'vc-input-search';
3747
+ const COMPONENT_NAME$1r = 'vc-input-search';
3748
3748
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
3749
- name: COMPONENT_NAME$1q,
3749
+ name: COMPONENT_NAME$1r,
3750
3750
  props: props$W,
3751
3751
  inheritAttrs: false,
3752
3752
  setup(props, {
@@ -4037,9 +4037,9 @@ const usePos = () => {
4037
4037
  function _isSlot$2(s) {
4038
4038
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
4039
4039
  }
4040
- const COMPONENT_NAME$1p = 'vc-popover-wrapper';
4040
+ const COMPONENT_NAME$1q = 'vc-popover-wrapper';
4041
4041
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
4042
- name: COMPONENT_NAME$1p,
4042
+ name: COMPONENT_NAME$1q,
4043
4043
  props: props$_,
4044
4044
  emits: ['portal-fulfilled', 'close'],
4045
4045
  setup(props, {
@@ -4289,9 +4289,9 @@ const PopoverPortal = new Portal(PopoverWrapper);
4289
4289
 
4290
4290
  /** @jsxImportSource vue */
4291
4291
 
4292
- const COMPONENT_NAME$1o = 'vc-popover';
4292
+ const COMPONENT_NAME$1p = 'vc-popover';
4293
4293
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
4294
- name: COMPONENT_NAME$1o,
4294
+ name: COMPONENT_NAME$1p,
4295
4295
  props: props$Z,
4296
4296
  emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
4297
4297
  setup(props, {
@@ -5392,9 +5392,9 @@ const getTimeType = type => {
5392
5392
  }
5393
5393
  return view;
5394
5394
  };
5395
- const COMPONENT_NAME$1n = 'vc-date-confirm';
5395
+ const COMPONENT_NAME$1o = 'vc-date-confirm';
5396
5396
  const Confirm = /* @__PURE__ */ vue.defineComponent({
5397
- name: COMPONENT_NAME$1n,
5397
+ name: COMPONENT_NAME$1o,
5398
5398
  props: {
5399
5399
  showTime: {
5400
5400
  type: Boolean,
@@ -5458,9 +5458,9 @@ const Confirm = /* @__PURE__ */ vue.defineComponent({
5458
5458
 
5459
5459
  /** @jsxImportSource vue */
5460
5460
 
5461
- const COMPONENT_NAME$1m = 'vc-date-header';
5461
+ const COMPONENT_NAME$1n = 'vc-date-header';
5462
5462
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
5463
- name: COMPONENT_NAME$1m,
5463
+ name: COMPONENT_NAME$1n,
5464
5464
  props: {
5465
5465
  panelDate: Date,
5466
5466
  showNext: {
@@ -5544,9 +5544,9 @@ const DateHeader = /* @__PURE__ */ vue.defineComponent({
5544
5544
 
5545
5545
  /** @jsxImportSource vue */
5546
5546
 
5547
- const COMPONENT_NAME$1l = 'vc-date-table';
5547
+ const COMPONENT_NAME$1m = 'vc-date-table';
5548
5548
  const DateTable = /* @__PURE__ */ vue.defineComponent({
5549
- name: COMPONENT_NAME$1l,
5549
+ name: COMPONENT_NAME$1m,
5550
5550
  props: {
5551
5551
  value: Array,
5552
5552
  firstDayOfWeek: {
@@ -5755,9 +5755,9 @@ const DateTable = /* @__PURE__ */ vue.defineComponent({
5755
5755
 
5756
5756
  /** @jsxImportSource vue */
5757
5757
 
5758
- const COMPONENT_NAME$1k = 'vc-month-table';
5758
+ const COMPONENT_NAME$1l = 'vc-month-table';
5759
5759
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
5760
- name: COMPONENT_NAME$1k,
5760
+ name: COMPONENT_NAME$1l,
5761
5761
  props: {
5762
5762
  value: Array,
5763
5763
  panelDate: Date,
@@ -5889,7 +5889,7 @@ const MonthTable = /* @__PURE__ */ vue.defineComponent({
5889
5889
 
5890
5890
  /** @jsxImportSource vue */
5891
5891
 
5892
- const COMPONENT_NAME$1j = 'vc-quarter-table';
5892
+ const COMPONENT_NAME$1k = 'vc-quarter-table';
5893
5893
 
5894
5894
  /**
5895
5895
  * 获取季度对应的月份范围
@@ -5923,7 +5923,7 @@ const getQuarterRangeByMonth = value => {
5923
5923
  }
5924
5924
  };
5925
5925
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
5926
- name: COMPONENT_NAME$1j,
5926
+ name: COMPONENT_NAME$1k,
5927
5927
  props: {
5928
5928
  value: Array,
5929
5929
  panelDate: Date,
@@ -6046,9 +6046,9 @@ const QuarterTable = /* @__PURE__ */ vue.defineComponent({
6046
6046
 
6047
6047
  /** @jsxImportSource vue */
6048
6048
 
6049
- const COMPONENT_NAME$1i = 'vc-shortcuts-select';
6049
+ const COMPONENT_NAME$1j = 'vc-shortcuts-select';
6050
6050
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
6051
- name: COMPONENT_NAME$1i,
6051
+ name: COMPONENT_NAME$1j,
6052
6052
  props: {
6053
6053
  panelDate: Date,
6054
6054
  config: Array,
@@ -6088,9 +6088,9 @@ const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
6088
6088
 
6089
6089
  /** @jsxImportSource vue */
6090
6090
 
6091
- const COMPONENT_NAME$1h = 'vc-time-select';
6091
+ const COMPONENT_NAME$1i = 'vc-time-select';
6092
6092
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
6093
- name: COMPONENT_NAME$1h,
6093
+ name: COMPONENT_NAME$1i,
6094
6094
  props: {
6095
6095
  hours: {
6096
6096
  type: [Number, String],
@@ -6369,9 +6369,9 @@ const TimeSelect = /* @__PURE__ */ vue.defineComponent({
6369
6369
 
6370
6370
  /** @jsxImportSource vue */
6371
6371
 
6372
- const COMPONENT_NAME$1g = 'vc-year-table';
6372
+ const COMPONENT_NAME$1h = 'vc-year-table';
6373
6373
  const YearTable = /* @__PURE__ */ vue.defineComponent({
6374
- name: COMPONENT_NAME$1g,
6374
+ name: COMPONENT_NAME$1h,
6375
6375
  props: {
6376
6376
  value: Array,
6377
6377
  panelDate: Date,
@@ -6494,9 +6494,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
6494
6494
  }
6495
6495
  return true;
6496
6496
  };
6497
- const COMPONENT_NAME$1f = 'vc-date-range-panel';
6497
+ const COMPONENT_NAME$1g = 'vc-date-range-panel';
6498
6498
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
6499
- name: COMPONENT_NAME$1f,
6499
+ name: COMPONENT_NAME$1g,
6500
6500
  props: {
6501
6501
  ...props$V,
6502
6502
  confirm: {
@@ -6875,9 +6875,9 @@ const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
6875
6875
 
6876
6876
  /** @jsxImportSource vue */
6877
6877
 
6878
- const COMPONENT_NAME$1e = 'vc-date-panel';
6878
+ const COMPONENT_NAME$1f = 'vc-date-panel';
6879
6879
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
6880
- name: COMPONENT_NAME$1e,
6880
+ name: COMPONENT_NAME$1f,
6881
6881
  props: {
6882
6882
  ...props$V,
6883
6883
  type: String,
@@ -7085,9 +7085,9 @@ const isEqualYear$1 = value => {
7085
7085
  const endYear = value[1].getFullYear();
7086
7086
  return startYear === endYear;
7087
7087
  };
7088
- const COMPONENT_NAME$1d = 'vc-monthrange-panel';
7088
+ const COMPONENT_NAME$1e = 'vc-monthrange-panel';
7089
7089
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
7090
- name: COMPONENT_NAME$1d,
7090
+ name: COMPONENT_NAME$1e,
7091
7091
  props: {
7092
7092
  ...props$V,
7093
7093
  confirm: {
@@ -7262,9 +7262,9 @@ const isEqualYear = value => {
7262
7262
  const endYear = value[1].getFullYear();
7263
7263
  return startYear === endYear;
7264
7264
  };
7265
- const COMPONENT_NAME$1c = 'vc-quarterrange-panel';
7265
+ const COMPONENT_NAME$1d = 'vc-quarterrange-panel';
7266
7266
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
7267
- name: COMPONENT_NAME$1c,
7267
+ name: COMPONENT_NAME$1d,
7268
7268
  props: {
7269
7269
  ...props$V,
7270
7270
  confirm: {
@@ -7503,9 +7503,9 @@ const getComparedDate = (leftDate, rightDate) => {
7503
7503
  seconds
7504
7504
  };
7505
7505
  };
7506
- const COMPONENT_NAME$1b = 'vc-timerange-panel';
7506
+ const COMPONENT_NAME$1c = 'vc-timerange-panel';
7507
7507
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
7508
- name: COMPONENT_NAME$1b,
7508
+ name: COMPONENT_NAME$1c,
7509
7509
  props: props$U,
7510
7510
  emits: ['pick', 'clear', 'ok'],
7511
7511
  setup(props, {
@@ -7604,9 +7604,9 @@ const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
7604
7604
 
7605
7605
  /** @jsxImportSource vue */
7606
7606
 
7607
- const COMPONENT_NAME$1a = 'vc-time-panel';
7607
+ const COMPONENT_NAME$1b = 'vc-time-panel';
7608
7608
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
7609
- name: COMPONENT_NAME$1a,
7609
+ name: COMPONENT_NAME$1b,
7610
7610
  props: props$U,
7611
7611
  emits: ['pick', 'clear', 'ok'],
7612
7612
  setup(props, {
@@ -7661,7 +7661,7 @@ const TimePanel = /* @__PURE__ */ vue.defineComponent({
7661
7661
 
7662
7662
  /** @jsxImportSource vue */
7663
7663
 
7664
- const COMPONENT_NAME$19 = 'vc-date-picker';
7664
+ const COMPONENT_NAME$1a = 'vc-date-picker';
7665
7665
  const getPanel$1 = type => {
7666
7666
  if (['daterange', 'datetimerange'].includes(type)) {
7667
7667
  return DateRangePanel;
@@ -7672,7 +7672,7 @@ const getPanel$1 = type => {
7672
7672
  }
7673
7673
  return DatePanel;
7674
7674
  };
7675
- const DatePicker = createPicker(COMPONENT_NAME$19, props$10, () => {
7675
+ const DatePicker = createPicker(COMPONENT_NAME$1a, props$10, () => {
7676
7676
  const props = vue.getCurrentInstance().props;
7677
7677
  const icon = vue.ref('date');
7678
7678
  const panel = vue.shallowRef({});
@@ -7705,9 +7705,9 @@ const props$T = {
7705
7705
 
7706
7706
  /** @jsxImportSource vue */
7707
7707
 
7708
- const COMPONENT_NAME$18 = 'vc-divider';
7708
+ const COMPONENT_NAME$19 = 'vc-divider';
7709
7709
  const Divider = /* @__PURE__ */ vue.defineComponent({
7710
- name: COMPONENT_NAME$18,
7710
+ name: COMPONENT_NAME$19,
7711
7711
  props: props$T,
7712
7712
  setup(props, {
7713
7713
  slots
@@ -7862,7 +7862,7 @@ const props$Q = {
7862
7862
 
7863
7863
  /** @jsxImportSource vue */
7864
7864
 
7865
- const COMPONENT_NAME$17 = 'vc-scroller-track';
7865
+ const COMPONENT_NAME$18 = 'vc-scroller-track';
7866
7866
  const BAR_MAP = {
7867
7867
  vertical: {
7868
7868
  scroll: 'scrollTop',
@@ -7882,7 +7882,7 @@ const BAR_MAP = {
7882
7882
  }
7883
7883
  };
7884
7884
  const Track = /* @__PURE__ */ vue.defineComponent({
7885
- name: COMPONENT_NAME$17,
7885
+ name: COMPONENT_NAME$18,
7886
7886
  props: props$S,
7887
7887
  emits: ['change'],
7888
7888
  inheritAttrs: false,
@@ -8072,9 +8072,9 @@ const Track = /* @__PURE__ */ vue.defineComponent({
8072
8072
 
8073
8073
  /** @jsxImportSource vue */
8074
8074
 
8075
- const COMPONENT_NAME$16 = 'vc-scroller-bar';
8075
+ const COMPONENT_NAME$17 = 'vc-scroller-bar';
8076
8076
  const Bar = /* @__PURE__ */ vue.defineComponent({
8077
- name: COMPONENT_NAME$16,
8077
+ name: COMPONENT_NAME$17,
8078
8078
  props: props$R,
8079
8079
  emits: ['change'],
8080
8080
  setup(props, {
@@ -8289,7 +8289,7 @@ const useScroller = (expose) => {
8289
8289
 
8290
8290
  /** @jsxImportSource vue */
8291
8291
 
8292
- const COMPONENT_NAME$15 = 'vc-scroller';
8292
+ const COMPONENT_NAME$16 = 'vc-scroller';
8293
8293
 
8294
8294
  /**
8295
8295
  * 作为备选方案,目前推荐使用ScrollerWheel
@@ -8300,7 +8300,7 @@ const COMPONENT_NAME$15 = 'vc-scroller';
8300
8300
  * 2. 增加了一层嵌套
8301
8301
  */
8302
8302
  const Scroller = /* @__PURE__ */ vue.defineComponent({
8303
- name: COMPONENT_NAME$15,
8303
+ name: COMPONENT_NAME$16,
8304
8304
  props: props$Q,
8305
8305
  emits: ['scroll'],
8306
8306
  setup(props, {
@@ -8361,7 +8361,7 @@ const Scroller = /* @__PURE__ */ vue.defineComponent({
8361
8361
 
8362
8362
  /** @jsxImportSource vue */
8363
8363
 
8364
- const COMPONENT_NAME$14 = 'vc-scroller-wheel';
8364
+ const COMPONENT_NAME$15 = 'vc-scroller-wheel';
8365
8365
 
8366
8366
  /**
8367
8367
  * 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
@@ -8383,7 +8383,7 @@ const COMPONENT_NAME$14 = 'vc-scroller-wheel';
8383
8383
  * 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
8384
8384
  */
8385
8385
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
8386
- name: COMPONENT_NAME$14,
8386
+ name: COMPONENT_NAME$15,
8387
8387
  props: Object.assign(props$Q, {
8388
8388
  stopPropagation: {
8389
8389
  type: Boolean,
@@ -8572,9 +8572,9 @@ const props$P = {
8572
8572
 
8573
8573
  /** @jsxImportSource vue */
8574
8574
 
8575
- const COMPONENT_NAME$13 = 'vc-drawer';
8575
+ const COMPONENT_NAME$14 = 'vc-drawer';
8576
8576
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
8577
- name: COMPONENT_NAME$13,
8577
+ name: COMPONENT_NAME$14,
8578
8578
  props: props$P,
8579
8579
  emits: ['close', 'update:modelValue', 'visible-change'],
8580
8580
  setup(props, {
@@ -8750,9 +8750,9 @@ const props$O = {
8750
8750
 
8751
8751
  /** @jsxImportSource vue */
8752
8752
 
8753
- const COMPONENT_NAME$12 = 'vc-dropdown';
8753
+ const COMPONENT_NAME$13 = 'vc-dropdown';
8754
8754
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
8755
- name: COMPONENT_NAME$12,
8755
+ name: COMPONENT_NAME$13,
8756
8756
  props: props$O,
8757
8757
  setup(props, {
8758
8758
  slots
@@ -8776,9 +8776,9 @@ const props$N = {
8776
8776
 
8777
8777
  /** @jsxImportSource vue */
8778
8778
 
8779
- const COMPONENT_NAME$11 = 'vc-editor';
8779
+ const COMPONENT_NAME$12 = 'vc-editor';
8780
8780
  const Editor = /* @__PURE__ */ vue.defineComponent({
8781
- name: COMPONENT_NAME$11,
8781
+ name: COMPONENT_NAME$12,
8782
8782
  props: props$N,
8783
8783
  setup(props, {
8784
8784
  slots
@@ -8922,9 +8922,9 @@ const useForm = (expose, options = {}) => {
8922
8922
  });
8923
8923
  };
8924
8924
 
8925
- const COMPONENT_NAME$10 = "vc-form";
8925
+ const COMPONENT_NAME$11 = "vc-form";
8926
8926
  const Form = vue.defineComponent({
8927
- name: COMPONENT_NAME$10,
8927
+ name: COMPONENT_NAME$11,
8928
8928
  props: props$M,
8929
8929
  setup(props, { slots, expose }) {
8930
8930
  useForm(expose);
@@ -9249,9 +9249,9 @@ const useFormItem = (expose) => {
9249
9249
 
9250
9250
  /** @jsxImportSource vue */
9251
9251
 
9252
- const COMPONENT_NAME$$ = 'vc-form-item';
9252
+ const COMPONENT_NAME$10 = 'vc-form-item';
9253
9253
  const FormItem = /* @__PURE__ */ vue.defineComponent({
9254
- name: COMPONENT_NAME$$,
9254
+ name: COMPONENT_NAME$10,
9255
9255
  props: props$L,
9256
9256
  setup(props, {
9257
9257
  slots,
@@ -9316,9 +9316,9 @@ const props$K = {
9316
9316
  }
9317
9317
  };
9318
9318
 
9319
- const COMPONENT_NAME$_ = "vcm-form";
9319
+ const COMPONENT_NAME$$ = "vcm-form";
9320
9320
  const MForm = vue.defineComponent({
9321
- name: COMPONENT_NAME$_,
9321
+ name: COMPONENT_NAME$$,
9322
9322
  props: props$K,
9323
9323
  setup(props, { slots, expose }) {
9324
9324
  useForm(expose, {
@@ -9349,9 +9349,9 @@ const props$J = {
9349
9349
 
9350
9350
  /** @jsxImportSource vue */
9351
9351
 
9352
- const COMPONENT_NAME$Z = 'vcm-form-item';
9352
+ const COMPONENT_NAME$_ = 'vcm-form-item';
9353
9353
  const MFormItem = /* @__PURE__ */ vue.defineComponent({
9354
- name: COMPONENT_NAME$Z,
9354
+ name: COMPONENT_NAME$_,
9355
9355
  props: props$J,
9356
9356
  setup(props, {
9357
9357
  slots,
@@ -9405,9 +9405,9 @@ const MFormItem = /* @__PURE__ */ vue.defineComponent({
9405
9405
  }
9406
9406
  });
9407
9407
 
9408
- const COMPONENT_NAME$Y = "vc-fragment";
9408
+ const COMPONENT_NAME$Z = "vc-fragment";
9409
9409
  const Fragment = vue.defineComponent({
9410
- name: COMPONENT_NAME$Y,
9410
+ name: COMPONENT_NAME$Z,
9411
9411
  setup(_, { slots }) {
9412
9412
  return () => vue.h(vue.Fragment, slots.default?.());
9413
9413
  }
@@ -9424,9 +9424,9 @@ const props$I = {
9424
9424
 
9425
9425
  /** @jsxImportSource vue */
9426
9426
 
9427
- const COMPONENT_NAME$X = 'vc-html-to-image';
9427
+ const COMPONENT_NAME$Y = 'vc-html-to-image';
9428
9428
  const HTMLToImage = /* @__PURE__ */ vue.defineComponent({
9429
- name: COMPONENT_NAME$X,
9429
+ name: COMPONENT_NAME$Y,
9430
9430
  props: props$I,
9431
9431
  setup(props, {
9432
9432
  slots
@@ -9444,10 +9444,113 @@ const MHTMLToImage = HTMLToImage;
9444
9444
  const MIcon = Icon;
9445
9445
 
9446
9446
  const props$H = {
9447
+ tag: {
9448
+ type: String,
9449
+ default: "div"
9450
+ }
9451
+ };
9452
+
9453
+ /** @jsxImportSource vue */
9454
+
9455
+ const COMPONENT_NAME$X = 'vc-image-preview';
9456
+ const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
9457
+ name: COMPONENT_NAME$X,
9458
+ props: props$H,
9459
+ setup(props, {
9460
+ slots
9461
+ }) {
9462
+ return () => {
9463
+ return vue.createVNode("div", {
9464
+ "class": "vc-image-preview"
9465
+ }, [slots?.default?.()]);
9466
+ };
9467
+ }
9468
+ });
9469
+
9470
+ const MAX_WIDTH = window.innerWidth;
9471
+ const MAX_HEIGHT = window.innerHeight;
9472
+ const getFitSize = (src) => {
9473
+ return new Promise((resolve) => {
9474
+ const img = new Image();
9475
+ let width;
9476
+ let height;
9477
+ img.onload = () => {
9478
+ const owidth = img.naturalWidth || img.width;
9479
+ const oheight = img.naturalHeight || img.height;
9480
+ if (owidth > oheight) {
9481
+ width = Math.min(MAX_WIDTH, owidth);
9482
+ height = width / owidth * oheight;
9483
+ resolve({
9484
+ width,
9485
+ height
9486
+ });
9487
+ } else {
9488
+ height = Math.min(MAX_HEIGHT, oheight);
9489
+ width = height / oheight * owidth;
9490
+ resolve({
9491
+ width,
9492
+ height
9493
+ });
9494
+ }
9495
+ };
9496
+ img.onerror = () => resolve({});
9497
+ img.src = src;
9498
+ });
9499
+ };
9500
+ const open$1 = async (options) => {
9501
+ const e = VcInstance.globalEvent;
9502
+ const data = options.data.map((i) => {
9503
+ if (typeof i === "string") {
9504
+ return {
9505
+ src: i
9506
+ };
9507
+ }
9508
+ return {
9509
+ ...i,
9510
+ src: i.source || i.src
9511
+ };
9512
+ });
9513
+ for (let i = 0; i < data.length; i++) {
9514
+ if (!data[i].width) {
9515
+ data[i] = {
9516
+ ...data[i],
9517
+ ...await getFitSize(data[i].src)
9518
+ };
9519
+ }
9520
+ }
9521
+ const lightbox = new PhotoSwipeLightbox({
9522
+ pswpModule: () => import('photoswipe'),
9523
+ closeTitle: "关闭(Esc)",
9524
+ zoomTitle: "缩放",
9525
+ arrowPrevTitle: "上一张",
9526
+ arrowNextTitle: "下一张",
9527
+ errorMsg: "网络异常 图片加载失败",
9528
+ indexIndicatorSep: " / ",
9529
+ initialZoomLevel: "fit"
9530
+ });
9531
+ lightbox.init();
9532
+ lightbox.loadAndOpen(
9533
+ options.current || 0,
9534
+ data,
9535
+ // 下面无效,需要给官方支持
9536
+ {
9537
+ x: e?.clientX,
9538
+ y: e?.clientY
9539
+ }
9540
+ );
9541
+ };
9542
+
9543
+ const ImagePreview = Object.assign(ImagePreview$1, { open: open$1 });
9544
+
9545
+ const props$G = {
9447
9546
  src: String,
9448
9547
  fit: String,
9449
9548
  lazy: Boolean,
9450
- wrapper: [Object, String]
9549
+ wrapper: [Object, String],
9550
+ previewable: {
9551
+ type: Boolean,
9552
+ default: true
9553
+ }
9451
9554
  };
9452
9555
 
9453
9556
  class IMGStore {
@@ -9517,7 +9620,7 @@ const ObjectFit = {
9517
9620
  const Image$1 = /* @__PURE__ */ vue.defineComponent({
9518
9621
  name: COMPONENT_NAME$W,
9519
9622
  inheritAttrs: false,
9520
- props: props$H,
9623
+ props: props$G,
9521
9624
  setup(props, {
9522
9625
  slots,
9523
9626
  emit
@@ -9666,6 +9769,14 @@ const Image$1 = /* @__PURE__ */ vue.defineComponent({
9666
9769
  const alignCenter = vue.computed(() => {
9667
9770
  return !isSupportObjectFit && props.fit !== ObjectFit.FILL;
9668
9771
  });
9772
+ const handlePreview = () => {
9773
+ if (!props.previewable) return;
9774
+ ImagePreview.open({
9775
+ current: 0,
9776
+ data: [props.src],
9777
+ onClose() {}
9778
+ });
9779
+ };
9669
9780
  vue.watch(() => props.src, v => {
9670
9781
  if (!v && !isLoading.value) {
9671
9782
  isLoading.value = true;
@@ -9686,7 +9797,9 @@ const Image$1 = /* @__PURE__ */ vue.defineComponent({
9686
9797
  return () => {
9687
9798
  return vue.createVNode("div", {
9688
9799
  "style": its.value.style,
9689
- "class": [its.value.class, 'vc-image']
9800
+ "class": [its.value.class, {
9801
+ 'is-allow-preview': props.previewable
9802
+ }, 'vc-image']
9690
9803
  }, [isLoading.value && (slots.placeholder ? slots.placeholder() : vue.createVNode("div", {
9691
9804
  "class": [{
9692
9805
  'is-auto': isAuto.value
@@ -9704,6 +9817,8 @@ const Image$1 = /* @__PURE__ */ vue.defineComponent({
9704
9817
  // 包含所有on*都会被绑定, 且listeners中覆盖将由listener内触发(inheritAttrs: false)
9705
9818
  ...its.value.attrs,
9706
9819
  ...its.value.listeners
9820
+ }, {
9821
+ "onClick": handlePreview
9707
9822
  }), null)]);
9708
9823
  };
9709
9824
  }
@@ -9711,7 +9826,7 @@ const Image$1 = /* @__PURE__ */ vue.defineComponent({
9711
9826
 
9712
9827
  const MImage = Image$1;
9713
9828
 
9714
- const props$G = {
9829
+ const props$F = {
9715
9830
  tag: {
9716
9831
  type: String,
9717
9832
  default: "div"
@@ -9723,7 +9838,7 @@ const props$G = {
9723
9838
  const COMPONENT_NAME$V = 'vc-image-crop';
9724
9839
  const ImageCrop = /* @__PURE__ */ vue.defineComponent({
9725
9840
  name: COMPONENT_NAME$V,
9726
- props: props$G,
9841
+ props: props$F,
9727
9842
  setup(props, {
9728
9843
  slots
9729
9844
  }) {
@@ -9737,105 +9852,6 @@ const ImageCrop = /* @__PURE__ */ vue.defineComponent({
9737
9852
 
9738
9853
  const MImageCrop = ImageCrop;
9739
9854
 
9740
- const props$F = {
9741
- tag: {
9742
- type: String,
9743
- default: "div"
9744
- }
9745
- };
9746
-
9747
- /** @jsxImportSource vue */
9748
-
9749
- const COMPONENT_NAME$U = 'vc-image-preview';
9750
- const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
9751
- name: COMPONENT_NAME$U,
9752
- props: props$F,
9753
- setup(props, {
9754
- slots
9755
- }) {
9756
- return () => {
9757
- return vue.createVNode("div", {
9758
- "class": "vc-image-preview"
9759
- }, [slots?.default?.()]);
9760
- };
9761
- }
9762
- });
9763
-
9764
- const MAX_WIDTH = window.innerWidth;
9765
- const MAX_HEIGHT = window.innerHeight;
9766
- const getFitSize = (src) => {
9767
- return new Promise((resolve) => {
9768
- const img = new Image();
9769
- let width;
9770
- let height;
9771
- img.onload = () => {
9772
- const owidth = img.naturalWidth || img.width;
9773
- const oheight = img.naturalHeight || img.height;
9774
- if (owidth > oheight) {
9775
- width = Math.min(MAX_WIDTH, owidth);
9776
- height = width / owidth * oheight;
9777
- resolve({
9778
- width,
9779
- height
9780
- });
9781
- } else {
9782
- height = Math.min(MAX_HEIGHT, oheight);
9783
- width = height / oheight * owidth;
9784
- resolve({
9785
- width,
9786
- height
9787
- });
9788
- }
9789
- };
9790
- img.onerror = () => resolve({});
9791
- img.src = src;
9792
- });
9793
- };
9794
- const open$1 = async (options) => {
9795
- const e = VcInstance.globalEvent;
9796
- const data = options.data.map((i) => {
9797
- if (typeof i === "string") {
9798
- return {
9799
- src: i
9800
- };
9801
- }
9802
- return {
9803
- ...i,
9804
- src: i.source || i.src
9805
- };
9806
- });
9807
- for (let i = 0; i < data.length; i++) {
9808
- if (!data[i].width) {
9809
- data[i] = {
9810
- ...data[i],
9811
- ...await getFitSize(data[i].src)
9812
- };
9813
- }
9814
- }
9815
- const lightbox = new PhotoSwipeLightbox({
9816
- pswpModule: () => import('photoswipe'),
9817
- closeTitle: "关闭(Esc)",
9818
- zoomTitle: "缩放",
9819
- arrowPrevTitle: "上一张",
9820
- arrowNextTitle: "下一张",
9821
- errorMsg: "网络异常 图片加载失败",
9822
- indexIndicatorSep: " / ",
9823
- initialZoomLevel: "fit"
9824
- });
9825
- lightbox.init();
9826
- lightbox.loadAndOpen(
9827
- options.current || 0,
9828
- data,
9829
- // 下面无效,需要给官方支持
9830
- {
9831
- x: e?.clientX,
9832
- y: e?.clientY
9833
- }
9834
- );
9835
- };
9836
-
9837
- const ImagePreview = Object.assign(ImagePreview$1, { open: open$1 });
9838
-
9839
9855
  const MImagePreview = ImagePreview;
9840
9856
 
9841
9857
  const props$E = {
@@ -9847,9 +9863,9 @@ const props$E = {
9847
9863
 
9848
9864
  /** @jsxImportSource vue */
9849
9865
 
9850
- const COMPONENT_NAME$T = 'vc-image-processing';
9866
+ const COMPONENT_NAME$U = 'vc-image-processing';
9851
9867
  const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
9852
- name: COMPONENT_NAME$T,
9868
+ name: COMPONENT_NAME$U,
9853
9869
  props: props$E,
9854
9870
  setup(props, {
9855
9871
  slots
@@ -9866,9 +9882,9 @@ const MImageProcessing = ImageProcessing;
9866
9882
 
9867
9883
  /** @jsxImportSource vue */
9868
9884
 
9869
- const COMPONENT_NAME$S = 'vcm-input';
9885
+ const COMPONENT_NAME$T = 'vcm-input';
9870
9886
  const MInput = /* @__PURE__ */ vue.defineComponent({
9871
- name: COMPONENT_NAME$S,
9887
+ name: COMPONENT_NAME$T,
9872
9888
  inheritAttrs: false,
9873
9889
  props: {
9874
9890
  ...props$$,
@@ -9957,9 +9973,9 @@ const MInput = /* @__PURE__ */ vue.defineComponent({
9957
9973
 
9958
9974
  /** @jsxImportSource vue */
9959
9975
 
9960
- const COMPONENT_NAME$R = 'vcm-input-number';
9976
+ const COMPONENT_NAME$S = 'vcm-input-number';
9961
9977
  const MInputNumber = /* @__PURE__ */ vue.defineComponent({
9962
- name: COMPONENT_NAME$R,
9978
+ name: COMPONENT_NAME$S,
9963
9979
  props: props$X,
9964
9980
  inheritAttrs: false,
9965
9981
  setup(props, {
@@ -10008,9 +10024,9 @@ const MInputNumber = /* @__PURE__ */ vue.defineComponent({
10008
10024
 
10009
10025
  /** @jsxImportSource vue */
10010
10026
 
10011
- const COMPONENT_NAME$Q = 'vcm-input-search';
10027
+ const COMPONENT_NAME$R = 'vcm-input-search';
10012
10028
  const MInputSearch = /* @__PURE__ */ vue.defineComponent({
10013
- name: COMPONENT_NAME$Q,
10029
+ name: COMPONENT_NAME$R,
10014
10030
  props: {
10015
10031
  ...props$W,
10016
10032
  cancelText: {
@@ -10087,9 +10103,9 @@ const props$D = {
10087
10103
  }
10088
10104
  };
10089
10105
 
10090
- const COMPONENT_NAME$P = "vcm-list";
10106
+ const COMPONENT_NAME$Q = "vcm-list";
10091
10107
  const MList = vue.defineComponent({
10092
- name: COMPONENT_NAME$P,
10108
+ name: COMPONENT_NAME$Q,
10093
10109
  props: props$D,
10094
10110
  setup(props, { slots }) {
10095
10111
  vue.provide("vc-list", { props });
@@ -10144,10 +10160,10 @@ const props$C = {
10144
10160
 
10145
10161
  /** @jsxImportSource vue */
10146
10162
 
10147
- const COMPONENT_NAME$O = 'vcm-list-item';
10163
+ const COMPONENT_NAME$P = 'vcm-list-item';
10148
10164
  const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
10149
10165
  const MListItem = /* @__PURE__ */ vue.defineComponent({
10150
- name: COMPONENT_NAME$O,
10166
+ name: COMPONENT_NAME$P,
10151
10167
  props: props$C,
10152
10168
  emits: ['click'],
10153
10169
  setup(props, {
@@ -10241,11 +10257,11 @@ const props$B = {
10241
10257
 
10242
10258
  /** @jsxImportSource vue */
10243
10259
 
10244
- const COMPONENT_NAME$N = 'vc-marquee';
10260
+ const COMPONENT_NAME$O = 'vc-marquee';
10245
10261
  const ANIMATION = $.prefixStyle('animation').camel;
10246
10262
  const TRANSFORM_KEBAB = $.prefixStyle('transform').kebab;
10247
10263
  const Marquee = /* @__PURE__ */ vue.defineComponent({
10248
- name: COMPONENT_NAME$N,
10264
+ name: COMPONENT_NAME$O,
10249
10265
  props: props$B,
10250
10266
  setup(props, {
10251
10267
  slots
@@ -10313,9 +10329,9 @@ const props$A = {
10313
10329
  }
10314
10330
  };
10315
10331
 
10316
- const COMPONENT_NAME$M = "vc-resizer";
10332
+ const COMPONENT_NAME$N = "vc-resizer";
10317
10333
  const Resizer = vue.defineComponent({
10318
- name: COMPONENT_NAME$M,
10334
+ name: COMPONENT_NAME$N,
10319
10335
  props: props$A,
10320
10336
  emit: ["resize", "change"],
10321
10337
  setup(props, { emit, slots, expose }) {
@@ -10473,10 +10489,10 @@ const props$z = {
10473
10489
 
10474
10490
  /** @jsxImportSource vue */
10475
10491
 
10476
- const COMPONENT_NAME$L = 'vc-modal';
10492
+ const COMPONENT_NAME$M = 'vc-modal';
10477
10493
  let zIndexNumber = 1002;
10478
10494
  const ModalView = /* @__PURE__ */ vue.defineComponent({
10479
- name: COMPONENT_NAME$L,
10495
+ name: COMPONENT_NAME$M,
10480
10496
  emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
10481
10497
  props: props$z,
10482
10498
  setup(props, {
@@ -10915,9 +10931,9 @@ const props$y = {
10915
10931
 
10916
10932
  /** @jsxImportSource vue */
10917
10933
 
10918
- const COMPONENT_NAME$K = 'vc-modal';
10934
+ const COMPONENT_NAME$L = 'vc-modal';
10919
10935
  const MModalView = /* @__PURE__ */ vue.defineComponent({
10920
- name: COMPONENT_NAME$K,
10936
+ name: COMPONENT_NAME$L,
10921
10937
  emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
10922
10938
  props: props$y,
10923
10939
  setup(props, {
@@ -11129,9 +11145,9 @@ const props$x = {
11129
11145
 
11130
11146
  /** @jsxImportSource vue */
11131
11147
 
11132
- const COMPONENT_NAME$J = 'vc-notice';
11148
+ const COMPONENT_NAME$K = 'vc-notice';
11133
11149
  const NoticeView = /* @__PURE__ */ vue.defineComponent({
11134
- name: COMPONENT_NAME$J,
11150
+ name: COMPONENT_NAME$K,
11135
11151
  props: props$x,
11136
11152
  emits: ['portal-fulfilled', 'close', 'before-close'],
11137
11153
  setup(props, {
@@ -11304,9 +11320,9 @@ const props$w = {
11304
11320
 
11305
11321
  /** @jsxImportSource vue */
11306
11322
 
11307
- const COMPONENT_NAME$I = 'vc-option';
11323
+ const COMPONENT_NAME$J = 'vc-option';
11308
11324
  const Option$1 = /* @__PURE__ */ vue.defineComponent({
11309
- name: COMPONENT_NAME$I,
11325
+ name: COMPONENT_NAME$J,
11310
11326
  props: props$w,
11311
11327
  setup(props, {
11312
11328
  slots
@@ -11419,9 +11435,9 @@ const props$u = {
11419
11435
 
11420
11436
  /** @jsxImportSource vue */
11421
11437
 
11422
- const COMPONENT_NAME$H = 'vc-tag';
11438
+ const COMPONENT_NAME$I = 'vc-tag';
11423
11439
  const Tag = /* @__PURE__ */ vue.defineComponent({
11424
- name: COMPONENT_NAME$H,
11440
+ name: COMPONENT_NAME$I,
11425
11441
  props: props$u,
11426
11442
  emits: ['close', 'change'],
11427
11443
  setup(props, {
@@ -11490,9 +11506,9 @@ const props$t = {
11490
11506
 
11491
11507
  /** @jsxImportSource vue */
11492
11508
 
11493
- const COMPONENT_NAME$G = 'vc-select-option';
11509
+ const COMPONENT_NAME$H = 'vc-select-option';
11494
11510
  const Option = /* @__PURE__ */ vue.defineComponent({
11495
- name: COMPONENT_NAME$G,
11511
+ name: COMPONENT_NAME$H,
11496
11512
  props: props$t,
11497
11513
  setup(props, {
11498
11514
  slots
@@ -11565,9 +11581,9 @@ const props$s = {
11565
11581
 
11566
11582
  /** @jsxImportSource vue */
11567
11583
 
11568
- const COMPONENT_NAME$F = 'vc-select-option-group';
11584
+ const COMPONENT_NAME$G = 'vc-select-option-group';
11569
11585
  const OptionGroup = /* @__PURE__ */ vue.defineComponent({
11570
- name: COMPONENT_NAME$F,
11586
+ name: COMPONENT_NAME$G,
11571
11587
  props: props$s,
11572
11588
  setup(props, {
11573
11589
  slots
@@ -11665,9 +11681,9 @@ const props$r = {
11665
11681
  function _isSlot$1(s) {
11666
11682
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
11667
11683
  }
11668
- const COMPONENT_NAME$E = 'vc-select';
11684
+ const COMPONENT_NAME$F = 'vc-select';
11669
11685
  const Select = /* @__PURE__ */ vue.defineComponent({
11670
- name: COMPONENT_NAME$E,
11686
+ name: COMPONENT_NAME$F,
11671
11687
  props: props$r,
11672
11688
  emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
11673
11689
  setup(props, {
@@ -11914,9 +11930,9 @@ const Select = /* @__PURE__ */ vue.defineComponent({
11914
11930
 
11915
11931
  /** @jsxImportSource vue */
11916
11932
 
11917
- const COMPONENT_NAME$D = 'vc-pagination';
11933
+ const COMPONENT_NAME$E = 'vc-pagination';
11918
11934
  const Pagination = /* @__PURE__ */ vue.defineComponent({
11919
- name: COMPONENT_NAME$D,
11935
+ name: COMPONENT_NAME$E,
11920
11936
  props: props$v,
11921
11937
  emits: ['update:current', 'change', 'page-size-change'],
11922
11938
  setup(props, {
@@ -12114,9 +12130,9 @@ const props$q = {
12114
12130
 
12115
12131
  /** @jsxImportSource vue */
12116
12132
 
12117
- const COMPONENT_NAME$C = 'vc-picker';
12133
+ const COMPONENT_NAME$D = 'vc-picker';
12118
12134
  const Picker = /* @__PURE__ */ vue.defineComponent({
12119
- name: COMPONENT_NAME$C,
12135
+ name: COMPONENT_NAME$D,
12120
12136
  props: props$q,
12121
12137
  setup(props, {
12122
12138
  slots
@@ -12140,9 +12156,9 @@ const props$p = {
12140
12156
 
12141
12157
  /** @jsxImportSource vue */
12142
12158
 
12143
- const COMPONENT_NAME$B = 'vc-popconfirm';
12159
+ const COMPONENT_NAME$C = 'vc-popconfirm';
12144
12160
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
12145
- name: COMPONENT_NAME$B,
12161
+ name: COMPONENT_NAME$C,
12146
12162
  props: props$p,
12147
12163
  setup(props, {
12148
12164
  slots
@@ -12168,9 +12184,9 @@ const props$o = {
12168
12184
 
12169
12185
  /** @jsxImportSource vue */
12170
12186
 
12171
- const COMPONENT_NAME$A = 'vc-popup';
12187
+ const COMPONENT_NAME$B = 'vc-popup';
12172
12188
  const Popup = /* @__PURE__ */ vue.defineComponent({
12173
- name: COMPONENT_NAME$A,
12189
+ name: COMPONENT_NAME$B,
12174
12190
  props: props$o,
12175
12191
  setup(props, {
12176
12192
  slots
@@ -12197,9 +12213,9 @@ const props$n = {
12197
12213
 
12198
12214
  /** @jsxImportSource vue */
12199
12215
 
12200
- const COMPONENT_NAME$z = 'vc-print';
12216
+ const COMPONENT_NAME$A = 'vc-print';
12201
12217
  const Print = /* @__PURE__ */ vue.defineComponent({
12202
- name: COMPONENT_NAME$z,
12218
+ name: COMPONENT_NAME$A,
12203
12219
  props: props$n,
12204
12220
  setup(props, {
12205
12221
  expose,
@@ -12301,9 +12317,9 @@ const props$m = {
12301
12317
 
12302
12318
  /** @jsxImportSource vue */
12303
12319
 
12304
- const COMPONENT_NAME$y = 'vc-progress-circle';
12320
+ const COMPONENT_NAME$z = 'vc-progress-circle';
12305
12321
  const Circle = /* @__PURE__ */ vue.defineComponent({
12306
- name: COMPONENT_NAME$y,
12322
+ name: COMPONENT_NAME$z,
12307
12323
  props: props$m,
12308
12324
  setup(props, {
12309
12325
  slots
@@ -12363,9 +12379,9 @@ const Circle = /* @__PURE__ */ vue.defineComponent({
12363
12379
 
12364
12380
  /** @jsxImportSource vue */
12365
12381
 
12366
- const COMPONENT_NAME$x = 'vc-progress-line';
12382
+ const COMPONENT_NAME$y = 'vc-progress-line';
12367
12383
  const Line = /* @__PURE__ */ vue.defineComponent({
12368
- name: COMPONENT_NAME$x,
12384
+ name: COMPONENT_NAME$y,
12369
12385
  props: props$m,
12370
12386
  setup(props) {
12371
12387
  const colorStyle = vue.computed(() => {
@@ -12412,9 +12428,9 @@ const Line = /* @__PURE__ */ vue.defineComponent({
12412
12428
  function _isSlot(s) {
12413
12429
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
12414
12430
  }
12415
- const COMPONENT_NAME$w = 'vc-progress';
12431
+ const COMPONENT_NAME$x = 'vc-progress';
12416
12432
  const Progress = /* @__PURE__ */ vue.defineComponent({
12417
- name: COMPONENT_NAME$w,
12433
+ name: COMPONENT_NAME$x,
12418
12434
  props: props$m,
12419
12435
  setup(props, {
12420
12436
  slots
@@ -12572,9 +12588,9 @@ const useRadio = () => {
12572
12588
 
12573
12589
  /** @jsxImportSource vue */
12574
12590
 
12575
- const COMPONENT_NAME$v = 'vc-radio';
12591
+ const COMPONENT_NAME$w = 'vc-radio';
12576
12592
  const Radio = /* @__PURE__ */ vue.defineComponent({
12577
- name: COMPONENT_NAME$v,
12593
+ name: COMPONENT_NAME$w,
12578
12594
  props: props$l,
12579
12595
  emits: ['update:modelValue', 'change'],
12580
12596
  setup(props, {
@@ -12685,9 +12701,9 @@ const useRadioGroup = () => {
12685
12701
 
12686
12702
  /** @jsxImportSource vue */
12687
12703
 
12688
- const COMPONENT_NAME$u = 'vc-radio-group';
12704
+ const COMPONENT_NAME$v = 'vc-radio-group';
12689
12705
  const RadioGroup = /* @__PURE__ */ vue.defineComponent({
12690
- name: COMPONENT_NAME$u,
12706
+ name: COMPONENT_NAME$v,
12691
12707
  props: props$k,
12692
12708
  emits: ['update:modelValue', 'change'],
12693
12709
  setup(props, {
@@ -12708,9 +12724,9 @@ const RadioGroup = /* @__PURE__ */ vue.defineComponent({
12708
12724
 
12709
12725
  /** @jsxImportSource vue */
12710
12726
 
12711
- const COMPONENT_NAME$t = 'vcm-radio';
12727
+ const COMPONENT_NAME$u = 'vcm-radio';
12712
12728
  const MRadio = /* @__PURE__ */ vue.defineComponent({
12713
- name: COMPONENT_NAME$t,
12729
+ name: COMPONENT_NAME$u,
12714
12730
  props: props$l,
12715
12731
  emits: ['update:modelValue', 'change'],
12716
12732
  setup(props, {
@@ -12751,9 +12767,9 @@ const MRadio = /* @__PURE__ */ vue.defineComponent({
12751
12767
 
12752
12768
  /** @jsxImportSource vue */
12753
12769
 
12754
- const COMPONENT_NAME$s = 'vcm-radio-group';
12770
+ const COMPONENT_NAME$t = 'vcm-radio-group';
12755
12771
  const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
12756
- name: COMPONENT_NAME$s,
12772
+ name: COMPONENT_NAME$t,
12757
12773
  props: props$k,
12758
12774
  emits: ['update:modelValue', 'change'],
12759
12775
  setup(props, {
@@ -12782,9 +12798,9 @@ const props$j = {
12782
12798
 
12783
12799
  /** @jsxImportSource vue */
12784
12800
 
12785
- const COMPONENT_NAME$r = 'vc-rate';
12801
+ const COMPONENT_NAME$s = 'vc-rate';
12786
12802
  const Rate = /* @__PURE__ */ vue.defineComponent({
12787
- name: COMPONENT_NAME$r,
12803
+ name: COMPONENT_NAME$s,
12788
12804
  props: props$j,
12789
12805
  setup(props, {
12790
12806
  slots
@@ -12852,9 +12868,9 @@ const props$i = {
12852
12868
 
12853
12869
  /** @jsxImportSource vue */
12854
12870
 
12855
- const COMPONENT_NAME$q = 'vc-recycle-list-scroll-state';
12871
+ const COMPONENT_NAME$r = 'vc-recycle-list-scroll-state';
12856
12872
  const ScrollState = /* @__PURE__ */ vue.defineComponent({
12857
- name: COMPONENT_NAME$q,
12873
+ name: COMPONENT_NAME$r,
12858
12874
  setup(_, {
12859
12875
  slots
12860
12876
  }) {
@@ -12984,12 +13000,12 @@ const useDirectionKeys = () => {
12984
13000
 
12985
13001
  /** @jsxImportSource vue */
12986
13002
 
12987
- const COMPONENT_NAME$p = 'vc-recycle-list-container';
13003
+ const COMPONENT_NAME$q = 'vc-recycle-list-container';
12988
13004
 
12989
13005
  // TODO: 抽离
12990
13006
  const transformKey = $__namespace.prefixStyle('transform').camel;
12991
13007
  const Container = /* @__PURE__ */ vue.defineComponent({
12992
- name: COMPONENT_NAME$p,
13008
+ name: COMPONENT_NAME$q,
12993
13009
  props: props$h,
12994
13010
  emits: ['refresh'],
12995
13011
  setup(props, {
@@ -13087,9 +13103,9 @@ const Container = /* @__PURE__ */ vue.defineComponent({
13087
13103
 
13088
13104
  /** @jsxImportSource vue */
13089
13105
 
13090
- const COMPONENT_NAME$o = 'vc-recycle-list';
13106
+ const COMPONENT_NAME$p = 'vc-recycle-list';
13091
13107
  const RecycleList = /* @__PURE__ */ vue.defineComponent({
13092
- name: COMPONENT_NAME$o,
13108
+ name: COMPONENT_NAME$p,
13093
13109
  props: props$i,
13094
13110
  emits: ['scroll', 'row-resize'],
13095
13111
  setup(props, {
@@ -13661,9 +13677,9 @@ const props$g = {
13661
13677
 
13662
13678
  /** @jsxImportSource vue */
13663
13679
 
13664
- const COMPONENT_NAME$n = 'vc-slider';
13680
+ const COMPONENT_NAME$o = 'vc-slider';
13665
13681
  const Slider = /* @__PURE__ */ vue.defineComponent({
13666
- name: COMPONENT_NAME$n,
13682
+ name: COMPONENT_NAME$o,
13667
13683
  props: props$g,
13668
13684
  setup(props, {
13669
13685
  slots
@@ -13687,9 +13703,9 @@ const props$f = {
13687
13703
 
13688
13704
  /** @jsxImportSource vue */
13689
13705
 
13690
- const COMPONENT_NAME$m = 'vc-sort-list';
13706
+ const COMPONENT_NAME$n = 'vc-sort-list';
13691
13707
  const SortList = /* @__PURE__ */ vue.defineComponent({
13692
- name: COMPONENT_NAME$m,
13708
+ name: COMPONENT_NAME$n,
13693
13709
  props: props$f,
13694
13710
  setup(props, {
13695
13711
  slots
@@ -13713,9 +13729,9 @@ const props$e = {
13713
13729
 
13714
13730
  /** @jsxImportSource vue */
13715
13731
 
13716
- const COMPONENT_NAME$l = 'vc-steps';
13732
+ const COMPONENT_NAME$m = 'vc-steps';
13717
13733
  const Steps = /* @__PURE__ */ vue.defineComponent({
13718
- name: COMPONENT_NAME$l,
13734
+ name: COMPONENT_NAME$m,
13719
13735
  props: props$e,
13720
13736
  setup(props, {
13721
13737
  slots
@@ -13828,9 +13844,9 @@ const useSwitch = (expose) => {
13828
13844
 
13829
13845
  /** @jsxImportSource vue */
13830
13846
 
13831
- const COMPONENT_NAME$k = 'vc-switch';
13847
+ const COMPONENT_NAME$l = 'vc-switch';
13832
13848
  const Switch = /* @__PURE__ */ vue.defineComponent({
13833
- name: COMPONENT_NAME$k,
13849
+ name: COMPONENT_NAME$l,
13834
13850
  props: props$d,
13835
13851
  // click -> onClick要被拦截,此处不能放置
13836
13852
  emits: ['update:modelValue', 'change', 'click'],
@@ -13867,9 +13883,9 @@ const Switch = /* @__PURE__ */ vue.defineComponent({
13867
13883
 
13868
13884
  /** @jsxImportSource vue */
13869
13885
 
13870
- const COMPONENT_NAME$j = 'vcm-switch';
13886
+ const COMPONENT_NAME$k = 'vcm-switch';
13871
13887
  const MSwitch = /* @__PURE__ */ vue.defineComponent({
13872
- name: COMPONENT_NAME$j,
13888
+ name: COMPONENT_NAME$k,
13873
13889
  props: props$d,
13874
13890
  // click -> onClick要被拦截,此处不能放置
13875
13891
  emits: ['update:modelValue', 'change', 'click'],
@@ -14982,9 +14998,9 @@ const useStates = (mapper, $store) => {
14982
14998
 
14983
14999
  /** @jsxImportSource vue */
14984
15000
 
14985
- const COMPONENT_NAME$i = 'vc-table-normal-list';
15001
+ const COMPONENT_NAME$j = 'vc-table-normal-list';
14986
15002
  const NormalList = /* @__PURE__ */ vue.defineComponent({
14987
- name: COMPONENT_NAME$i,
15003
+ name: COMPONENT_NAME$j,
14988
15004
  props: {
14989
15005
  data: {
14990
15006
  type: Array,
@@ -15824,9 +15840,9 @@ const props$c = {
15824
15840
 
15825
15841
  /** @jsxImportSource vue */
15826
15842
 
15827
- const COMPONENT_NAME$h = 'vc-table';
15843
+ const COMPONENT_NAME$i = 'vc-table';
15828
15844
  const Table = /* @__PURE__ */ vue.defineComponent({
15829
- name: COMPONENT_NAME$h,
15845
+ name: COMPONENT_NAME$i,
15830
15846
  props: props$c,
15831
15847
  emits: ['select', 'select-all', 'selection-change', 'cell-mouse-enter', 'cell-mouse-leave', 'cell-click', 'cell-dblclick', 'row-click', 'row-contextmenu', 'row-dblclick', 'header-click', 'header-contextmenu', 'current-change', 'header-dragend ', 'expand-change', 'sort-change'],
15832
15848
  setup(props, {
@@ -16461,9 +16477,9 @@ const getFitIndex = (options = {}) => {
16461
16477
 
16462
16478
  /** @jsxImportSource vue */
16463
16479
 
16464
- const COMPONENT_NAME$g = 'vc-text';
16480
+ const COMPONENT_NAME$h = 'vc-text';
16465
16481
  const Text = /* @__PURE__ */ vue.defineComponent({
16466
- name: COMPONENT_NAME$g,
16482
+ name: COMPONENT_NAME$h,
16467
16483
  props: props$b,
16468
16484
  setup(props, {
16469
16485
  emit
@@ -17158,9 +17174,9 @@ const useTabs = (options = {}) => {
17158
17174
 
17159
17175
  /** @jsxImportSource vue */
17160
17176
 
17161
- const COMPONENT_NAME$f = 'vc-tabs';
17177
+ const COMPONENT_NAME$g = 'vc-tabs';
17162
17178
  const Tabs = /* @__PURE__ */ vue.defineComponent({
17163
- name: COMPONENT_NAME$f,
17179
+ name: COMPONENT_NAME$g,
17164
17180
  props: props$a,
17165
17181
  emits: ['update:modelValue', 'change', 'click'],
17166
17182
  setup(props, {
@@ -17408,9 +17424,9 @@ const useTabsPane = () => {
17408
17424
 
17409
17425
  /** @jsxImportSource vue */
17410
17426
 
17411
- const COMPONENT_NAME$e = 'vc-tabs-pane';
17427
+ const COMPONENT_NAME$f = 'vc-tabs-pane';
17412
17428
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
17413
- name: COMPONENT_NAME$e,
17429
+ name: COMPONENT_NAME$f,
17414
17430
  props: props$9,
17415
17431
  setup(_, {
17416
17432
  slots
@@ -17465,9 +17481,9 @@ const props$8 = {
17465
17481
 
17466
17482
  /** @jsxImportSource vue */
17467
17483
 
17468
- const COMPONENT_NAME$d = 'vcm-tabs';
17484
+ const COMPONENT_NAME$e = 'vcm-tabs';
17469
17485
  const MTabs = /* @__PURE__ */ vue.defineComponent({
17470
- name: COMPONENT_NAME$d,
17486
+ name: COMPONENT_NAME$e,
17471
17487
  props: props$8,
17472
17488
  emits: ['update:modelValue', 'change', 'click'],
17473
17489
  setup(props, {
@@ -17732,9 +17748,9 @@ const MTabs = /* @__PURE__ */ vue.defineComponent({
17732
17748
 
17733
17749
  /** @jsxImportSource vue */
17734
17750
 
17735
- const COMPONENT_NAME$c = 'vcm-tabs-pane';
17751
+ const COMPONENT_NAME$d = 'vcm-tabs-pane';
17736
17752
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
17737
- name: COMPONENT_NAME$c,
17753
+ name: COMPONENT_NAME$d,
17738
17754
  props: props$9,
17739
17755
  setup(_, {
17740
17756
  slots
@@ -18035,9 +18051,9 @@ const props$7 = {
18035
18051
 
18036
18052
  /** @jsxImportSource vue */
18037
18053
 
18038
- const COMPONENT_NAME$b = 'vc-textarea';
18054
+ const COMPONENT_NAME$c = 'vc-textarea';
18039
18055
  const Textarea = /* @__PURE__ */ vue.defineComponent({
18040
- name: COMPONENT_NAME$b,
18056
+ name: COMPONENT_NAME$c,
18041
18057
  props: Object.assign(props$7, {
18042
18058
  indicator: {
18043
18059
  type: [Boolean, Object],
@@ -18093,9 +18109,9 @@ const Textarea = /* @__PURE__ */ vue.defineComponent({
18093
18109
 
18094
18110
  /** @jsxImportSource vue */
18095
18111
 
18096
- const COMPONENT_NAME$a = 'vcm-textarea';
18112
+ const COMPONENT_NAME$b = 'vcm-textarea';
18097
18113
  const MTextarea = /* @__PURE__ */ vue.defineComponent({
18098
- name: COMPONENT_NAME$a,
18114
+ name: COMPONENT_NAME$b,
18099
18115
  props: Object.assign(props$7, {
18100
18116
  align: {
18101
18117
  type: String,
@@ -18178,9 +18194,9 @@ const props$6 = {
18178
18194
  }
18179
18195
  };
18180
18196
 
18181
- const COMPONENT_NAME$9 = "vc-theme";
18197
+ const COMPONENT_NAME$a = "vc-theme";
18182
18198
  const Theme = vue.defineComponent({
18183
- name: COMPONENT_NAME$9,
18199
+ name: COMPONENT_NAME$a,
18184
18200
  props: props$6,
18185
18201
  setup(props, { slots }) {
18186
18202
  const themeId = Utils__namespace.getUid("vc-theme");
@@ -18266,9 +18282,9 @@ const Theme = vue.defineComponent({
18266
18282
  }
18267
18283
  });
18268
18284
 
18269
- const COMPONENT_NAME$8 = "vc-theme-view";
18285
+ const COMPONENT_NAME$9 = "vc-theme-view";
18270
18286
  const ThemeView = vue.defineComponent({
18271
- name: COMPONENT_NAME$8,
18287
+ name: COMPONENT_NAME$9,
18272
18288
  props: props$6,
18273
18289
  setup(props, { slots }) {
18274
18290
  return () => {
@@ -18284,9 +18300,9 @@ const ThemeView = vue.defineComponent({
18284
18300
  }
18285
18301
  });
18286
18302
 
18287
- const COMPONENT_NAME$7 = "vc-theme-text";
18303
+ const COMPONENT_NAME$8 = "vc-theme-text";
18288
18304
  const ThemeText = vue.defineComponent({
18289
- name: COMPONENT_NAME$7,
18305
+ name: COMPONENT_NAME$8,
18290
18306
  props: props$6,
18291
18307
  setup(props, { slots }) {
18292
18308
  return () => {
@@ -18302,9 +18318,9 @@ const ThemeText = vue.defineComponent({
18302
18318
  }
18303
18319
  });
18304
18320
 
18305
- const COMPONENT_NAME$6 = "vc-theme-image";
18321
+ const COMPONENT_NAME$7 = "vc-theme-image";
18306
18322
  const ThemeImage = vue.defineComponent({
18307
- name: COMPONENT_NAME$6,
18323
+ name: COMPONENT_NAME$7,
18308
18324
  props: props$6,
18309
18325
  setup(props, { slots }) {
18310
18326
  return () => {
@@ -18352,12 +18368,12 @@ const props$5 = {
18352
18368
 
18353
18369
  /** @jsxImportSource vue */
18354
18370
 
18355
- const COMPONENT_NAME$5 = 'vc-time-picker';
18371
+ const COMPONENT_NAME$6 = 'vc-time-picker';
18356
18372
  const getPanel = type => {
18357
18373
  const isRange = type === 'timerange';
18358
18374
  return isRange ? TimeRangePanel : TimePanel;
18359
18375
  };
18360
- const TimePicker = createPicker(COMPONENT_NAME$5, props$5, () => {
18376
+ const TimePicker = createPicker(COMPONENT_NAME$6, props$5, () => {
18361
18377
  const props = vue.getCurrentInstance().props;
18362
18378
  const icon = vue.ref('icon');
18363
18379
  const panel = vue.shallowRef({});
@@ -18392,9 +18408,9 @@ const props$4 = {
18392
18408
 
18393
18409
  /** @jsxImportSource vue */
18394
18410
 
18395
- const COMPONENT_NAME$4 = 'vc-timeline';
18411
+ const COMPONENT_NAME$5 = 'vc-timeline';
18396
18412
  const Timeline = /* @__PURE__ */ vue.defineComponent({
18397
- name: COMPONENT_NAME$4,
18413
+ name: COMPONENT_NAME$5,
18398
18414
  props: props$4,
18399
18415
  setup(props, {
18400
18416
  slots
@@ -18421,9 +18437,9 @@ const props$3 = {
18421
18437
 
18422
18438
  /** @jsxImportSource vue */
18423
18439
 
18424
- const COMPONENT_NAME$3 = 'vc-touch';
18440
+ const COMPONENT_NAME$4 = 'vc-touch';
18425
18441
  const Touch = /* @__PURE__ */ vue.defineComponent({
18426
- name: COMPONENT_NAME$3,
18442
+ name: COMPONENT_NAME$4,
18427
18443
  props: props$3,
18428
18444
  setup(props, {
18429
18445
  slots
@@ -18447,9 +18463,9 @@ const props$2 = {
18447
18463
 
18448
18464
  /** @jsxImportSource vue */
18449
18465
 
18450
- const COMPONENT_NAME$2 = 'vc-tree';
18466
+ const COMPONENT_NAME$3 = 'vc-tree';
18451
18467
  const Tree = /* @__PURE__ */ vue.defineComponent({
18452
- name: COMPONENT_NAME$2,
18468
+ name: COMPONENT_NAME$3,
18453
18469
  props: props$2,
18454
18470
  setup(props, {
18455
18471
  slots
@@ -18559,9 +18575,9 @@ const props$1 = {
18559
18575
  }
18560
18576
  };
18561
18577
 
18562
- const COMPONENT_NAME$1 = "vc-upload";
18578
+ const COMPONENT_NAME$2 = "vc-upload";
18563
18579
  const Upload = vue.defineComponent({
18564
- name: COMPONENT_NAME$1,
18580
+ name: COMPONENT_NAME$2,
18565
18581
  props: props$1,
18566
18582
  emits: [
18567
18583
  "message",
@@ -18947,6 +18963,104 @@ const props = {
18947
18963
  gallery: Boolean
18948
18964
  };
18949
18965
 
18966
+ /** @jsxImportSource vue */
18967
+
18968
+ const COMPONENT_NAME$1 = 'vc-steps';
18969
+ const ImageItem = /* @__PURE__ */ vue.defineComponent({
18970
+ name: COMPONENT_NAME$1,
18971
+ props: {
18972
+ imageClass: [String, Object, Array],
18973
+ disabled: Boolean,
18974
+ row: Object,
18975
+ imagePreviewOptions: {
18976
+ type: Object,
18977
+ default: () => ({})
18978
+ },
18979
+ index: [String, Number],
18980
+ data: {
18981
+ type: Array,
18982
+ default: () => []
18983
+ },
18984
+ keyValue: Object
18985
+ },
18986
+ emits: ['open', 'close', 'delete'],
18987
+ setup(props, {
18988
+ slots,
18989
+ emit
18990
+ }) {
18991
+ const instance = vue.getCurrentInstance();
18992
+ const current = vue.computed(() => {
18993
+ if (props.row?.status === 0) return -1;
18994
+ const v = props.data.filter(i => i.status !== 0);
18995
+ return v.findIndex(i => {
18996
+ const a = i[props.keyValue.value] || i;
18997
+ const b = props.row?.[props.keyValue.value] || props.row;
18998
+ return a === b;
18999
+ });
19000
+ });
19001
+ // 拿到可预览的图片,供预览组件使用
19002
+ const getPreviewData = () => {
19003
+ return props.data.map(i => i?.[props.keyValue.value]);
19004
+ };
19005
+ const previewByPS = (e, index) => {
19006
+ emit('open');
19007
+ ImagePreview.open({
19008
+ current: index,
19009
+ data: getPreviewData(),
19010
+ onClose: () => emit('close')
19011
+ });
19012
+ };
19013
+ const handlePreview = e => {
19014
+ /**
19015
+ * 渐进增强
19016
+ */
19017
+ let {
19018
+ enhancer
19019
+ } = VcInstance.options.ImagePreview || {};
19020
+ enhancer = props.imagePreviewOptions.enhancer || enhancer || (() => false);
19021
+ const images = getPreviewData().map(item => ({
19022
+ src: item
19023
+ }));
19024
+ enhancer(current.value, images, instance) || previewByPS(e, current.value);
19025
+ };
19026
+ const handleDel = () => {
19027
+ emit('delete');
19028
+ };
19029
+ return () => {
19030
+ const row = props.row;
19031
+ return vue.createVNode("div", {
19032
+ "class": [{
19033
+ 'is-error': row.status == 0
19034
+ }, 'vc-upload-image-item']
19035
+ }, [slots.default ? slots.default({
19036
+ it: row,
19037
+ current: current.value
19038
+ }) : vue.createVNode(vue.Fragment, null, [!row.errorFlag && typeof row[props.keyValue.value] === 'string' ? vue.createVNode(Image$1, {
19039
+ "src": row[props.keyValue.value],
19040
+ "class": [props.imageClass, 'vc-upload-image-item__content'],
19041
+ "fit": "cover",
19042
+ "previewable": false,
19043
+ "onClick": handlePreview
19044
+ }, null) : vue.createVNode("div", {
19045
+ "class": [props.imageClass, 'vc-upload-image-item__content']
19046
+ }, [row.percent && row.percent != 100 ? vue.createVNode(Progress, {
19047
+ "percent": row.percent,
19048
+ "show-text": false,
19049
+ "status": "normal",
19050
+ "style": "width: 100%;padding: 0 5px"
19051
+ }, null) : !row[props.keyValue.value] && row.percent === 100 && !row.errorFlag ? vue.createVNode("p", {
19052
+ "style": "line-height: 1; padding: 5px"
19053
+ }, [vue.createTextVNode("\u670D\u52A1\u5668\u6B63\u5728\u63A5\u6536...")]) : row.status == 0 ? vue.createVNode("div", {
19054
+ "style": "padding: 5px"
19055
+ }, [vue.createTextVNode("\u4E0A\u4F20\u5931\u8D25")]) : null]), (!props.disabled || row.errorFlag) && vue.createVNode(Icon, {
19056
+ "type": "close-small",
19057
+ "class": "vc-upload-picker__delete",
19058
+ "onClick": handleDel
19059
+ }, null)])]);
19060
+ };
19061
+ }
19062
+ });
19063
+
18950
19064
  const recognizer = (url) => {
18951
19065
  const reg = /\.(jpe?g|png|gif|bmp|webp|image|heic|mp4|mov|avi|mpg|mpeg|rmvb)/ig;
18952
19066
  const result = url.match(reg);
@@ -19198,7 +19312,7 @@ const COMPONENT_NAME = 'vc-upload-picker';
19198
19312
  const UploadPicker = /* @__PURE__ */ vue.defineComponent({
19199
19313
  name: COMPONENT_NAME,
19200
19314
  props: props,
19201
- emits: ['update:modelValue', 'file-success', 'file-start', 'success', 'error', 'complete', 'change', 'remove-before'],
19315
+ emits: ['update:modelValue', 'file-success', 'file-start', 'file-before', 'file-error', 'success', 'error', 'complete', 'change', 'remove-before'],
19202
19316
  setup(props, {
19203
19317
  slots,
19204
19318
  expose
@@ -19210,8 +19324,7 @@ const UploadPicker = /* @__PURE__ */ vue.defineComponent({
19210
19324
  case 'image':
19211
19325
  pre.push({
19212
19326
  type: cur,
19213
- item: 'div'
19214
- // item: ImageItem
19327
+ item: ImageItem
19215
19328
  });
19216
19329
  return pre;
19217
19330
  case 'video':
@@ -19260,7 +19373,7 @@ const UploadPicker = /* @__PURE__ */ vue.defineComponent({
19260
19373
  const Item = picker.item;
19261
19374
  return vue.createVNode(Item, {
19262
19375
  "key": typeof item === 'object' ? item.uid : item,
19263
- "it": item,
19376
+ "row": item,
19264
19377
  "disabled": props.disabled,
19265
19378
  "image-preview-options": props.imagePreviewOptions,
19266
19379
  "imageClass": props.imageClass,
@@ -19268,18 +19381,19 @@ const UploadPicker = /* @__PURE__ */ vue.defineComponent({
19268
19381
  "audioClass": props.audioClass,
19269
19382
  "fileClass": props.fileClass,
19270
19383
  "index": index,
19271
- "data": item,
19384
+ "keyValue": props.keyValue,
19385
+ "data": base.currentValue.value[picker.type],
19272
19386
  "class": "vc-upload-picker__item",
19273
19387
  "onDelete": () => base.handleDelete(index, picker.type)
19274
19388
  }, {
19275
- default: scopeData => {
19276
- return slots.default ? slots.default({
19389
+ default: slots.default ? scopeData => {
19390
+ return slots?.default?.({
19277
19391
  it: scopeData?.it,
19278
19392
  current: scopeData?.current,
19279
19393
  index,
19280
19394
  name: picker.type
19281
- }) : scopeData;
19282
- }
19395
+ });
19396
+ } : null
19283
19397
  });
19284
19398
  }), vue.withDirectives(vue.createVNode(Upload, vue.mergeProps(base.currentUploadOptions.value[picker.type], {
19285
19399
  "max": base.dynamicMax[picker.type],