@deot/vc-components 1.0.24 → 1.0.26

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.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive, defineComponent, createVNode, ref, watch, getCurrentInstance, computed, TransitionGroup, Transition as Transition$1, h, inject, onMounted, provide, shallowRef, onUnmounted, withDirectives, vShow, createApp, onBeforeUnmount, Fragment as Fragment$1, Teleport, withModifiers, nextTick, isVNode, onBeforeMount, mergeProps, createTextVNode, toRaw, onUpdated, useAttrs as useAttrs$1 } from 'vue';
1
+ import { reactive, defineComponent, createVNode, ref, watch, getCurrentInstance, computed, TransitionGroup, Transition as Transition$1, h, inject, provide, shallowRef, onMounted, onUnmounted, withDirectives, vShow, createApp, onBeforeUnmount, Fragment as Fragment$1, Teleport, withModifiers, nextTick, isVNode, onBeforeMount, mergeProps, createTextVNode, toRaw, onUpdated, useAttrs as useAttrs$1 } from 'vue';
2
2
  import { debounce, isEqualWith, pick, startCase, throttle, cloneDeep, max, merge as merge$1, isEmpty as isEmpty$1, kebabCase } from 'lodash-es';
3
3
  import { Resize } from '@deot/helper-resize';
4
4
  import { Utils as Utils$1, IS_SERVER as IS_SERVER$1 } from '@deot/vc-shared';
@@ -9,6 +9,7 @@ import { composedPath, scrollIntoView, prefixStyle, removeClass, addClass, hasCl
9
9
  import { useAttrs, useScrollbar, getInstance } from '@deot/vc-hooks';
10
10
  import { Wheel } from '@deot/helper-wheel';
11
11
  import { Validator } from '@deot/helper-validator';
12
+ import PhotoSwipeLightbox from 'photoswipe/lightbox';
12
13
  import { Storage } from '@deot/helper-cache';
13
14
  import * as Load from '@deot/helper-load';
14
15
  import { style } from '@deot/helper-load';
@@ -80,9 +81,9 @@ const props$1q = {
80
81
 
81
82
  /** @jsxImportSource vue */
82
83
 
83
- const COMPONENT_NAME$1$ = 'vc-action-sheet';
84
+ const COMPONENT_NAME$20 = 'vc-action-sheet';
84
85
  const ActionSheet = /* @__PURE__ */ defineComponent({
85
- name: COMPONENT_NAME$1$,
86
+ name: COMPONENT_NAME$20,
86
87
  props: props$1q,
87
88
  setup(props, {
88
89
  slots
@@ -269,9 +270,9 @@ const IconManager = new Manager();
269
270
 
270
271
  /** @jsxImportSource vue */
271
272
 
272
- const COMPONENT_NAME$1_ = 'vc-icon';
273
+ const COMPONENT_NAME$1$ = 'vc-icon';
273
274
  const Icon = /* @__PURE__ */ defineComponent({
274
- name: COMPONENT_NAME$1_,
275
+ name: COMPONENT_NAME$1$,
275
276
  props: props$1o,
276
277
  setup(props) {
277
278
  const viewBox = ref('0 0 1024 1024');
@@ -470,9 +471,9 @@ const useTransition = () => {
470
471
  };
471
472
  };
472
473
 
473
- const COMPONENT_NAME$1Z = "vc-transition";
474
+ const COMPONENT_NAME$1_ = "vc-transition";
474
475
  const Transition = defineComponent({
475
- name: COMPONENT_NAME$1Z,
476
+ name: COMPONENT_NAME$1_,
476
477
  props: props$1n,
477
478
  // 当不声明emits的情况下,事件存在于attrs中
478
479
  inheritAttrs: false,
@@ -493,9 +494,9 @@ const Transition = defineComponent({
493
494
  }
494
495
  });
495
496
 
496
- const COMPONENT_NAME$1Y = "vc-transition-collapse";
497
+ const COMPONENT_NAME$1Z = "vc-transition-collapse";
497
498
  const TransitionCollapse = defineComponent({
498
- name: COMPONENT_NAME$1Y,
499
+ name: COMPONENT_NAME$1Z,
499
500
  props: props$1n,
500
501
  // 当不声明emits的情况下,事件存在于attrs中
501
502
  inheritAttrs: false,
@@ -614,9 +615,9 @@ const TransitionCollapse = defineComponent({
614
615
  }
615
616
  });
616
617
 
617
- const COMPONENT_NAME$1X = "vc-transition-fade";
618
+ const COMPONENT_NAME$1Y = "vc-transition-fade";
618
619
  const TransitionFade = defineComponent({
619
- name: COMPONENT_NAME$1X,
620
+ name: COMPONENT_NAME$1Y,
620
621
  props: {
621
622
  ...props$1n,
622
623
  // inheritAttrs必须是false
@@ -651,9 +652,9 @@ const TransitionFade = defineComponent({
651
652
  }
652
653
  });
653
654
 
654
- const COMPONENT_NAME$1W = "vc-transition-scale";
655
+ const COMPONENT_NAME$1X = "vc-transition-scale";
655
656
  const TransitionScale = defineComponent({
656
- name: COMPONENT_NAME$1W,
657
+ name: COMPONENT_NAME$1X,
657
658
  props: {
658
659
  ...props$1n,
659
660
  mode: {
@@ -693,9 +694,9 @@ const TransitionScale = defineComponent({
693
694
  }
694
695
  });
695
696
 
696
- const COMPONENT_NAME$1V = "vc-transition-slide";
697
+ const COMPONENT_NAME$1W = "vc-transition-slide";
697
698
  const TransitionSlide = defineComponent({
698
- name: COMPONENT_NAME$1V,
699
+ name: COMPONENT_NAME$1W,
699
700
  props: {
700
701
  ...props$1n,
701
702
  mode: {
@@ -735,9 +736,9 @@ const TransitionSlide = defineComponent({
735
736
  }
736
737
  });
737
738
 
738
- const COMPONENT_NAME$1U = "vc-transition-zoom";
739
+ const COMPONENT_NAME$1V = "vc-transition-zoom";
739
740
  const TransitionZoom = defineComponent({
740
- name: COMPONENT_NAME$1U,
741
+ name: COMPONENT_NAME$1V,
741
742
  props: {
742
743
  ...props$1n,
743
744
  mode: {
@@ -779,7 +780,7 @@ const TransitionZoom = defineComponent({
779
780
 
780
781
  /** @jsxImportSource vue */
781
782
 
782
- const COMPONENT_NAME$1T = 'vc-alert';
783
+ const COMPONENT_NAME$1U = 'vc-alert';
783
784
 
784
785
  // [color, borderColor, backgroundColor], -> CSS
785
786
  const THEME_MAP = {
@@ -789,7 +790,7 @@ const THEME_MAP = {
789
790
  warning: ['#ffbf00', '#ffe58f', '#fffbe6']
790
791
  };
791
792
  const Alert = /* @__PURE__ */ defineComponent({
792
- name: COMPONENT_NAME$1T,
793
+ name: COMPONENT_NAME$1U,
793
794
  props: props$1p,
794
795
  setup(props, {
795
796
  slots,
@@ -888,9 +889,9 @@ const props$1m = {
888
889
 
889
890
  /** @jsxImportSource vue */
890
891
 
891
- const COMPONENT_NAME$1S = 'vc-artboard';
892
+ const COMPONENT_NAME$1T = 'vc-artboard';
892
893
  const Artboard = /* @__PURE__ */ defineComponent({
893
- name: COMPONENT_NAME$1S,
894
+ name: COMPONENT_NAME$1T,
894
895
  props: props$1m,
895
896
  setup(props, {
896
897
  slots
@@ -929,9 +930,9 @@ const props$1l = {
929
930
 
930
931
  /** @jsxImportSource vue */
931
932
 
932
- const COMPONENT_NAME$1R = 'vc-spin';
933
+ const COMPONENT_NAME$1S = 'vc-spin';
933
934
  const Spin = /* @__PURE__ */ defineComponent({
934
- name: COMPONENT_NAME$1R,
935
+ name: COMPONENT_NAME$1S,
935
936
  props: props$1l,
936
937
  setup(props, {
937
938
  slots
@@ -982,9 +983,9 @@ const props$1k = {
982
983
  exclude: RegExp
983
984
  };
984
985
 
985
- const COMPONENT_NAME$1Q = "vc-debounce";
986
+ const COMPONENT_NAME$1R = "vc-debounce";
986
987
  const Debounce = defineComponent({
987
- name: COMPONENT_NAME$1Q,
988
+ name: COMPONENT_NAME$1R,
988
989
  props: props$1k,
989
990
  /**
990
991
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
@@ -1056,16 +1057,16 @@ const props$1j = {
1056
1057
 
1057
1058
  /** @jsxImportSource vue */
1058
1059
 
1059
- const COMPONENT_NAME$1P = 'vc-button';
1060
+ const COMPONENT_NAME$1Q = 'vc-button';
1060
1061
  const Button = /* @__PURE__ */ defineComponent({
1061
- name: COMPONENT_NAME$1P,
1062
+ name: COMPONENT_NAME$1Q,
1062
1063
  emits: ['click'],
1063
1064
  props: props$1j,
1064
1065
  setup(props, {
1065
1066
  slots
1066
1067
  }) {
1067
1068
  const vm = getCurrentInstance();
1068
- const hasSlot = ref(true);
1069
+ const isHover = ref(false);
1069
1070
  const isLoading = ref(false);
1070
1071
  const group = inject('vc-button-group', {
1071
1072
  size: 'medium',
@@ -1074,10 +1075,11 @@ const Button = /* @__PURE__ */ defineComponent({
1074
1075
  });
1075
1076
  const classes = computed(() => ({
1076
1077
  'is-circle': props.circle || group.circle,
1077
- 'is-alone': !hasSlot.value,
1078
+ 'is-alone': !slots?.default,
1078
1079
  'is-round': props.round,
1079
1080
  'is-long': props.long,
1080
1081
  'is-disabled': props.disabled,
1082
+ 'is-hover': isHover.value,
1081
1083
  [`is-${props.size}`]: true,
1082
1084
  [`is-${props.type}`]: true
1083
1085
  }));
@@ -1090,9 +1092,6 @@ const Button = /* @__PURE__ */ defineComponent({
1090
1092
  });
1091
1093
  }
1092
1094
  };
1093
- onMounted(() => {
1094
- hasSlot.value = slots.default !== undefined;
1095
- });
1096
1095
  return () => {
1097
1096
  return createVNode(Debounce, {
1098
1097
  "tag": props.tag,
@@ -1103,15 +1102,19 @@ const Button = /* @__PURE__ */ defineComponent({
1103
1102
  "wait": props.wait,
1104
1103
  "disabled": props.disabled,
1105
1104
  "type": props.htmlType,
1106
- "onClick": handleClick
1105
+ "onClick": handleClick,
1106
+ "onMouseenter": () => isHover.value = true,
1107
+ "onMouseleave": () => isHover.value = false
1107
1108
  }, {
1108
1109
  default: () => [props.icon && createVNode(Icon, {
1109
1110
  "type": props.icon
1110
- }, null), isLoading.value && createVNode(Spin, {
1111
+ }, null), slots.icon && slots?.icon?.({
1112
+ hover: isHover.value
1113
+ }), isLoading.value && createVNode(Spin, {
1111
1114
  "size": 12,
1112
1115
  "foreground": props.type === 'default' ? '#ccc' : '#fff',
1113
1116
  "class": "vc-button__loading"
1114
- }, null), hasSlot.value && createVNode("span", null, [slots?.default?.()])]
1117
+ }, null), slots?.default && createVNode("span", null, [slots?.default?.()])]
1115
1118
  });
1116
1119
  };
1117
1120
  }
@@ -1138,9 +1141,9 @@ const props$1i = {
1138
1141
 
1139
1142
  /** @jsxImportSource vue */
1140
1143
 
1141
- const COMPONENT_NAME$1O = 'vc-button-group';
1144
+ const COMPONENT_NAME$1P = 'vc-button-group';
1142
1145
  const ButtonGroup = /* @__PURE__ */ defineComponent({
1143
- name: COMPONENT_NAME$1O,
1146
+ name: COMPONENT_NAME$1P,
1144
1147
  props: props$1i,
1145
1148
  setup(props, {
1146
1149
  slots
@@ -1174,9 +1177,9 @@ const props$1h = {
1174
1177
 
1175
1178
  /** @jsxImportSource vue */
1176
1179
 
1177
- const COMPONENT_NAME$1N = 'vc-calendar';
1180
+ const COMPONENT_NAME$1O = 'vc-calendar';
1178
1181
  const Calendar = /* @__PURE__ */ defineComponent({
1179
- name: COMPONENT_NAME$1N,
1182
+ name: COMPONENT_NAME$1O,
1180
1183
  props: props$1h,
1181
1184
  setup(props, {
1182
1185
  slots
@@ -1214,9 +1217,9 @@ const props$1g = {
1214
1217
 
1215
1218
  /** @jsxImportSource vue */
1216
1219
 
1217
- const COMPONENT_NAME$1M = 'vc-card';
1220
+ const COMPONENT_NAME$1N = 'vc-card';
1218
1221
  const Card = /* @__PURE__ */ defineComponent({
1219
- name: COMPONENT_NAME$1M,
1222
+ name: COMPONENT_NAME$1N,
1220
1223
  props: props$1g,
1221
1224
  setup(props, {
1222
1225
  slots
@@ -1252,9 +1255,9 @@ const props$1f = {
1252
1255
 
1253
1256
  /** @jsxImportSource vue */
1254
1257
 
1255
- const COMPONENT_NAME$1L = 'vc-carousel';
1258
+ const COMPONENT_NAME$1M = 'vc-carousel';
1256
1259
  const Carousel = /* @__PURE__ */ defineComponent({
1257
- name: COMPONENT_NAME$1L,
1260
+ name: COMPONENT_NAME$1M,
1258
1261
  props: props$1f,
1259
1262
  setup(props, {
1260
1263
  slots
@@ -1278,9 +1281,9 @@ const props$1e = {
1278
1281
 
1279
1282
  /** @jsxImportSource vue */
1280
1283
 
1281
- const COMPONENT_NAME$1K = 'vc-cascader';
1284
+ const COMPONENT_NAME$1L = 'vc-cascader';
1282
1285
  const Cascader = /* @__PURE__ */ defineComponent({
1283
- name: COMPONENT_NAME$1K,
1286
+ name: COMPONENT_NAME$1L,
1284
1287
  props: props$1e,
1285
1288
  setup(props, {
1286
1289
  slots
@@ -1349,9 +1352,9 @@ const props$1d = {
1349
1352
 
1350
1353
  /** @jsxImportSource vue */
1351
1354
 
1352
- const COMPONENT_NAME$1J = 'vc-chart';
1355
+ const COMPONENT_NAME$1K = 'vc-chart';
1353
1356
  const Chart = /* @__PURE__ */ defineComponent({
1354
- name: COMPONENT_NAME$1J,
1357
+ name: COMPONENT_NAME$1K,
1355
1358
  props: props$1d,
1356
1359
  emits: [...EVENTS, 'ready'],
1357
1360
  setup(props, {
@@ -1527,7 +1530,8 @@ const useCheckbox = () => {
1527
1530
  "is-indeterminate": props.indeterminate,
1528
1531
  "is-checked": checked.value,
1529
1532
  "is-disabled": props.disabled,
1530
- "is-focus": isFocus.value
1533
+ "is-focus": isFocus.value,
1534
+ "is-error": !!formItem?.message?.value
1531
1535
  };
1532
1536
  });
1533
1537
  watch(
@@ -1582,9 +1586,9 @@ const useCheckbox = () => {
1582
1586
 
1583
1587
  /** @jsxImportSource vue */
1584
1588
 
1585
- const COMPONENT_NAME$1I = 'vc-checkbox';
1589
+ const COMPONENT_NAME$1J = 'vc-checkbox';
1586
1590
  const Checkbox = /* @__PURE__ */ defineComponent({
1587
- name: COMPONENT_NAME$1I,
1591
+ name: COMPONENT_NAME$1J,
1588
1592
  props: props$1c,
1589
1593
  emits: ['update:modelValue', 'change'],
1590
1594
  setup(props, {
@@ -1671,9 +1675,9 @@ const useCheckboxGroup = () => {
1671
1675
 
1672
1676
  /** @jsxImportSource vue */
1673
1677
 
1674
- const COMPONENT_NAME$1H = 'vc-checkbox-group';
1678
+ const COMPONENT_NAME$1I = 'vc-checkbox-group';
1675
1679
  const CheckboxGroup = /* @__PURE__ */ defineComponent({
1676
- name: COMPONENT_NAME$1H,
1680
+ name: COMPONENT_NAME$1I,
1677
1681
  props: props$1b,
1678
1682
  emits: ['update:modelValue', 'change'],
1679
1683
  setup(props, {
@@ -1691,9 +1695,9 @@ const CheckboxGroup = /* @__PURE__ */ defineComponent({
1691
1695
 
1692
1696
  /** @jsxImportSource vue */
1693
1697
 
1694
- const COMPONENT_NAME$1G = 'vcm-checkbox';
1698
+ const COMPONENT_NAME$1H = 'vcm-checkbox';
1695
1699
  const MCheckbox = /* @__PURE__ */ defineComponent({
1696
- name: COMPONENT_NAME$1G,
1700
+ name: COMPONENT_NAME$1H,
1697
1701
  props: props$1c,
1698
1702
  emits: ['update:modelValue', 'change'],
1699
1703
  setup(props, {
@@ -1733,9 +1737,9 @@ const MCheckbox = /* @__PURE__ */ defineComponent({
1733
1737
 
1734
1738
  /** @jsxImportSource vue */
1735
1739
 
1736
- const COMPONENT_NAME$1F = 'vcm-checkbox-group';
1740
+ const COMPONENT_NAME$1G = 'vcm-checkbox-group';
1737
1741
  const MCheckboxGroup = /* @__PURE__ */ defineComponent({
1738
- name: COMPONENT_NAME$1F,
1742
+ name: COMPONENT_NAME$1G,
1739
1743
  props: props$1b,
1740
1744
  emits: ['update:modelValue', 'change'],
1741
1745
  setup(props, {
@@ -1794,9 +1798,9 @@ const props$19 = {
1794
1798
  }
1795
1799
  };
1796
1800
 
1797
- const COMPONENT_NAME$1E = "vc-customer";
1801
+ const COMPONENT_NAME$1F = "vc-customer";
1798
1802
  const Customer = defineComponent({
1799
- name: COMPONENT_NAME$1E,
1803
+ name: COMPONENT_NAME$1F,
1800
1804
  props: props$19,
1801
1805
  setup(props, context) {
1802
1806
  return () => h(() => {
@@ -1807,9 +1811,9 @@ const Customer = defineComponent({
1807
1811
 
1808
1812
  /** @jsxImportSource vue */
1809
1813
 
1810
- const COMPONENT_NAME$1D = 'vc-message';
1814
+ const COMPONENT_NAME$1E = 'vc-message';
1811
1815
  const MessageView = /* @__PURE__ */ defineComponent({
1812
- name: COMPONENT_NAME$1D,
1816
+ name: COMPONENT_NAME$1E,
1813
1817
  emits: ['before-close', 'close', 'portal-fulfilled'],
1814
1818
  props: props$1a,
1815
1819
  setup(props, {
@@ -1956,7 +1960,7 @@ class PortalLeaf {
1956
1960
  }
1957
1961
  }
1958
1962
 
1959
- const COMPONENT_NAME$1C = "vc-portal";
1963
+ const COMPONENT_NAME$1D = "vc-portal";
1960
1964
  class Portal {
1961
1965
  /**
1962
1966
  * 清理Portals类型组件
@@ -2008,7 +2012,7 @@ class Portal {
2008
2012
  this.wrapper = wrapper;
2009
2013
  this.globalOptions = {
2010
2014
  ...options,
2011
- name: options?.name || wrapper.name || Utils.getUid(COMPONENT_NAME$1C)
2015
+ name: options?.name || wrapper.name || Utils.getUid(COMPONENT_NAME$1D)
2012
2016
  };
2013
2017
  }
2014
2018
  popup(propsData, options) {
@@ -2107,7 +2111,7 @@ class Portal {
2107
2111
  ...rest
2108
2112
  } = options;
2109
2113
  let useAllNodes = fragment;
2110
- const name = multiple ? `${name$}__${Utils.getUid(COMPONENT_NAME$1C)}` : name$;
2114
+ const name = multiple ? `${name$}__${Utils.getUid(COMPONENT_NAME$1D)}` : name$;
2111
2115
  const container = document.createElement(tag);
2112
2116
  const root = typeof el === "object" ? el : document.querySelector(el || "body");
2113
2117
  !alive && Portal.leafs.get(name)?.destroy();
@@ -2141,7 +2145,7 @@ class Portal {
2141
2145
  } else {
2142
2146
  const wrapper = this.wrapper;
2143
2147
  const app = createApp({
2144
- name: COMPONENT_NAME$1C,
2148
+ name: COMPONENT_NAME$1D,
2145
2149
  parent,
2146
2150
  setup() {
2147
2151
  if (alive) {
@@ -2253,13 +2257,13 @@ const props$18 = {
2253
2257
  }
2254
2258
  };
2255
2259
 
2256
- const COMPONENT_NAME$1B = 'vc-portal-view';
2260
+ const COMPONENT_NAME$1C = 'vc-portal-view';
2257
2261
 
2258
2262
  /**
2259
2263
  * 写法不同,但与vue@2.x 保持一致
2260
2264
  */
2261
2265
  const PortalView = /* @__PURE__ */ defineComponent({
2262
- name: COMPONENT_NAME$1B,
2266
+ name: COMPONENT_NAME$1C,
2263
2267
  props: props$18,
2264
2268
  setup(props, {
2265
2269
  slots
@@ -2430,9 +2434,9 @@ const useClipboard = (done) => {
2430
2434
  return () => h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
2431
2435
  };
2432
2436
 
2433
- const COMPONENT_NAME$1A = "vc-clipboard";
2437
+ const COMPONENT_NAME$1B = "vc-clipboard";
2434
2438
  const Clipboard$1 = defineComponent({
2435
- name: COMPONENT_NAME$1A,
2439
+ name: COMPONENT_NAME$1B,
2436
2440
  props: props$17,
2437
2441
  setup() {
2438
2442
  return useClipboard((content) => Message.success({ content }));
@@ -2472,9 +2476,9 @@ const MTransitionZoom = TransitionZoom;
2472
2476
 
2473
2477
  /** @jsxImportSource vue */
2474
2478
 
2475
- const COMPONENT_NAME$1z = 'vcm-toast';
2479
+ const COMPONENT_NAME$1A = 'vcm-toast';
2476
2480
  const MToastView = /* @__PURE__ */ defineComponent({
2477
- name: COMPONENT_NAME$1z,
2481
+ name: COMPONENT_NAME$1A,
2478
2482
  emits: ['close', 'portal-fulfilled'],
2479
2483
  props: props$16,
2480
2484
  setup(props, {
@@ -2576,9 +2580,9 @@ const warning$2 = create$3({ mode: "warning" });
2576
2580
  const error$2 = create$3({ mode: "error" });
2577
2581
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
2578
2582
 
2579
- const COMPONENT_NAME$1y = "vcm-clipboard";
2583
+ const COMPONENT_NAME$1z = "vcm-clipboard";
2580
2584
  const MClipboard$1 = defineComponent({
2581
- name: COMPONENT_NAME$1y,
2585
+ name: COMPONENT_NAME$1z,
2582
2586
  props: props$17,
2583
2587
  setup() {
2584
2588
  return useClipboard((content) => MToast.info({ content }));
@@ -2610,9 +2614,9 @@ const props$15 = {
2610
2614
  }
2611
2615
  };
2612
2616
 
2613
- const COMPONENT_NAME$1x = "vc-collapse";
2617
+ const COMPONENT_NAME$1y = "vc-collapse";
2614
2618
  const Collapse = defineComponent({
2615
- name: COMPONENT_NAME$1x,
2619
+ name: COMPONENT_NAME$1y,
2616
2620
  props: props$15,
2617
2621
  emits: ["update:moodelValue", "change"],
2618
2622
  setup(props, { slots, emit }) {
@@ -2729,9 +2733,9 @@ const props$13 = {
2729
2733
  function _isSlot$3(s) {
2730
2734
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
2731
2735
  }
2732
- const COMPONENT_NAME$1w = 'vc-expand';
2736
+ const COMPONENT_NAME$1x = 'vc-expand';
2733
2737
  const Expand$1 = /* @__PURE__ */ defineComponent({
2734
- name: COMPONENT_NAME$1w,
2738
+ name: COMPONENT_NAME$1x,
2735
2739
  props: props$13,
2736
2740
  setup(props, {
2737
2741
  slots
@@ -2761,9 +2765,9 @@ const Expand$1 = /* @__PURE__ */ defineComponent({
2761
2765
 
2762
2766
  /** @jsxImportSource vue */
2763
2767
 
2764
- const COMPONENT_NAME$1v = 'vc-collapse-item';
2768
+ const COMPONENT_NAME$1w = 'vc-collapse-item';
2765
2769
  const CollapseItem = /* @__PURE__ */ defineComponent({
2766
- name: COMPONENT_NAME$1v,
2770
+ name: COMPONENT_NAME$1w,
2767
2771
  props: props$14,
2768
2772
  setup(props, {
2769
2773
  slots,
@@ -2838,9 +2842,9 @@ const props$12 = {
2838
2842
 
2839
2843
  /** @jsxImportSource vue */
2840
2844
 
2841
- const COMPONENT_NAME$1u = 'vc-color-picker';
2845
+ const COMPONENT_NAME$1v = 'vc-color-picker';
2842
2846
  const ColorPicker = /* @__PURE__ */ defineComponent({
2843
- name: COMPONENT_NAME$1u,
2847
+ name: COMPONENT_NAME$1v,
2844
2848
  props: props$12,
2845
2849
  setup(props, {
2846
2850
  slots
@@ -2864,9 +2868,9 @@ const props$11 = {
2864
2868
 
2865
2869
  /** @jsxImportSource vue */
2866
2870
 
2867
- const COMPONENT_NAME$1t = 'vc-countdown';
2871
+ const COMPONENT_NAME$1u = 'vc-countdown';
2868
2872
  const Countdown = /* @__PURE__ */ defineComponent({
2869
- name: COMPONENT_NAME$1t,
2873
+ name: COMPONENT_NAME$1u,
2870
2874
  props: props$11,
2871
2875
  setup(props, {
2872
2876
  slots
@@ -3178,7 +3182,8 @@ const useInput = (input) => {
3178
3182
  const classes = computed(() => {
3179
3183
  return {
3180
3184
  "is-focus": isFocus.value,
3181
- "is-disabled": props.disabled
3185
+ "is-disabled": props.disabled,
3186
+ "is-error": !!formItem?.message?.value
3182
3187
  };
3183
3188
  });
3184
3189
  const currentMaxlength = computed(() => {
@@ -3315,9 +3320,9 @@ const useNativeEmitter = (input, expose) => {
3315
3320
 
3316
3321
  /** @jsxImportSource vue */
3317
3322
 
3318
- const COMPONENT_NAME$1s = 'vc-input';
3323
+ const COMPONENT_NAME$1t = 'vc-input';
3319
3324
  const Input = /* @__PURE__ */ defineComponent({
3320
- name: COMPONENT_NAME$1s,
3325
+ name: COMPONENT_NAME$1t,
3321
3326
  inheritAttrs: false,
3322
3327
  props: {
3323
3328
  ...props$$,
@@ -3651,9 +3656,9 @@ const useInputNumber = () => {
3651
3656
 
3652
3657
  /** @jsxImportSource vue */
3653
3658
 
3654
- const COMPONENT_NAME$1r = 'vc-input-number';
3659
+ const COMPONENT_NAME$1s = 'vc-input-number';
3655
3660
  const InputNumber = /* @__PURE__ */ defineComponent({
3656
- name: COMPONENT_NAME$1r,
3661
+ name: COMPONENT_NAME$1s,
3657
3662
  props: props$X,
3658
3663
  inheritAttrs: false,
3659
3664
  setup(props, {
@@ -3717,9 +3722,9 @@ const props$W = {
3717
3722
 
3718
3723
  /** @jsxImportSource vue */
3719
3724
 
3720
- const COMPONENT_NAME$1q = 'vc-input-search';
3725
+ const COMPONENT_NAME$1r = 'vc-input-search';
3721
3726
  const InputSearch = /* @__PURE__ */ defineComponent({
3722
- name: COMPONENT_NAME$1q,
3727
+ name: COMPONENT_NAME$1r,
3723
3728
  props: props$W,
3724
3729
  inheritAttrs: false,
3725
3730
  setup(props, {
@@ -4010,9 +4015,9 @@ const usePos = () => {
4010
4015
  function _isSlot$2(s) {
4011
4016
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
4012
4017
  }
4013
- const COMPONENT_NAME$1p = 'vc-popover-wrapper';
4018
+ const COMPONENT_NAME$1q = 'vc-popover-wrapper';
4014
4019
  const PopoverWrapper = /* @__PURE__ */ defineComponent({
4015
- name: COMPONENT_NAME$1p,
4020
+ name: COMPONENT_NAME$1q,
4016
4021
  props: props$_,
4017
4022
  emits: ['portal-fulfilled', 'close'],
4018
4023
  setup(props, {
@@ -4262,9 +4267,9 @@ const PopoverPortal = new Portal(PopoverWrapper);
4262
4267
 
4263
4268
  /** @jsxImportSource vue */
4264
4269
 
4265
- const COMPONENT_NAME$1o = 'vc-popover';
4270
+ const COMPONENT_NAME$1p = 'vc-popover';
4266
4271
  const Popover$1 = /* @__PURE__ */ defineComponent({
4267
- name: COMPONENT_NAME$1o,
4272
+ name: COMPONENT_NAME$1p,
4268
4273
  props: props$Z,
4269
4274
  emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
4270
4275
  setup(props, {
@@ -5365,9 +5370,9 @@ const getTimeType = type => {
5365
5370
  }
5366
5371
  return view;
5367
5372
  };
5368
- const COMPONENT_NAME$1n = 'vc-date-confirm';
5373
+ const COMPONENT_NAME$1o = 'vc-date-confirm';
5369
5374
  const Confirm = /* @__PURE__ */ defineComponent({
5370
- name: COMPONENT_NAME$1n,
5375
+ name: COMPONENT_NAME$1o,
5371
5376
  props: {
5372
5377
  showTime: {
5373
5378
  type: Boolean,
@@ -5431,9 +5436,9 @@ const Confirm = /* @__PURE__ */ defineComponent({
5431
5436
 
5432
5437
  /** @jsxImportSource vue */
5433
5438
 
5434
- const COMPONENT_NAME$1m = 'vc-date-header';
5439
+ const COMPONENT_NAME$1n = 'vc-date-header';
5435
5440
  const DateHeader = /* @__PURE__ */ defineComponent({
5436
- name: COMPONENT_NAME$1m,
5441
+ name: COMPONENT_NAME$1n,
5437
5442
  props: {
5438
5443
  panelDate: Date,
5439
5444
  showNext: {
@@ -5517,9 +5522,9 @@ const DateHeader = /* @__PURE__ */ defineComponent({
5517
5522
 
5518
5523
  /** @jsxImportSource vue */
5519
5524
 
5520
- const COMPONENT_NAME$1l = 'vc-date-table';
5525
+ const COMPONENT_NAME$1m = 'vc-date-table';
5521
5526
  const DateTable = /* @__PURE__ */ defineComponent({
5522
- name: COMPONENT_NAME$1l,
5527
+ name: COMPONENT_NAME$1m,
5523
5528
  props: {
5524
5529
  value: Array,
5525
5530
  firstDayOfWeek: {
@@ -5728,9 +5733,9 @@ const DateTable = /* @__PURE__ */ defineComponent({
5728
5733
 
5729
5734
  /** @jsxImportSource vue */
5730
5735
 
5731
- const COMPONENT_NAME$1k = 'vc-month-table';
5736
+ const COMPONENT_NAME$1l = 'vc-month-table';
5732
5737
  const MonthTable = /* @__PURE__ */ defineComponent({
5733
- name: COMPONENT_NAME$1k,
5738
+ name: COMPONENT_NAME$1l,
5734
5739
  props: {
5735
5740
  value: Array,
5736
5741
  panelDate: Date,
@@ -5862,7 +5867,7 @@ const MonthTable = /* @__PURE__ */ defineComponent({
5862
5867
 
5863
5868
  /** @jsxImportSource vue */
5864
5869
 
5865
- const COMPONENT_NAME$1j = 'vc-quarter-table';
5870
+ const COMPONENT_NAME$1k = 'vc-quarter-table';
5866
5871
 
5867
5872
  /**
5868
5873
  * 获取季度对应的月份范围
@@ -5896,7 +5901,7 @@ const getQuarterRangeByMonth = value => {
5896
5901
  }
5897
5902
  };
5898
5903
  const QuarterTable = /* @__PURE__ */ defineComponent({
5899
- name: COMPONENT_NAME$1j,
5904
+ name: COMPONENT_NAME$1k,
5900
5905
  props: {
5901
5906
  value: Array,
5902
5907
  panelDate: Date,
@@ -6019,9 +6024,9 @@ const QuarterTable = /* @__PURE__ */ defineComponent({
6019
6024
 
6020
6025
  /** @jsxImportSource vue */
6021
6026
 
6022
- const COMPONENT_NAME$1i = 'vc-shortcuts-select';
6027
+ const COMPONENT_NAME$1j = 'vc-shortcuts-select';
6023
6028
  const ShortcutsSelect = /* @__PURE__ */ defineComponent({
6024
- name: COMPONENT_NAME$1i,
6029
+ name: COMPONENT_NAME$1j,
6025
6030
  props: {
6026
6031
  panelDate: Date,
6027
6032
  config: Array,
@@ -6061,9 +6066,9 @@ const ShortcutsSelect = /* @__PURE__ */ defineComponent({
6061
6066
 
6062
6067
  /** @jsxImportSource vue */
6063
6068
 
6064
- const COMPONENT_NAME$1h = 'vc-time-select';
6069
+ const COMPONENT_NAME$1i = 'vc-time-select';
6065
6070
  const TimeSelect = /* @__PURE__ */ defineComponent({
6066
- name: COMPONENT_NAME$1h,
6071
+ name: COMPONENT_NAME$1i,
6067
6072
  props: {
6068
6073
  hours: {
6069
6074
  type: [Number, String],
@@ -6342,9 +6347,9 @@ const TimeSelect = /* @__PURE__ */ defineComponent({
6342
6347
 
6343
6348
  /** @jsxImportSource vue */
6344
6349
 
6345
- const COMPONENT_NAME$1g = 'vc-year-table';
6350
+ const COMPONENT_NAME$1h = 'vc-year-table';
6346
6351
  const YearTable = /* @__PURE__ */ defineComponent({
6347
- name: COMPONENT_NAME$1g,
6352
+ name: COMPONENT_NAME$1h,
6348
6353
  props: {
6349
6354
  value: Array,
6350
6355
  panelDate: Date,
@@ -6467,9 +6472,9 @@ const getDateIsInRange = (value, type, leftPanelDate, rightPanelDate) => {
6467
6472
  }
6468
6473
  return true;
6469
6474
  };
6470
- const COMPONENT_NAME$1f = 'vc-date-range-panel';
6475
+ const COMPONENT_NAME$1g = 'vc-date-range-panel';
6471
6476
  const DateRangePanel = /* @__PURE__ */ defineComponent({
6472
- name: COMPONENT_NAME$1f,
6477
+ name: COMPONENT_NAME$1g,
6473
6478
  props: {
6474
6479
  ...props$V,
6475
6480
  confirm: {
@@ -6848,9 +6853,9 @@ const DateRangePanel = /* @__PURE__ */ defineComponent({
6848
6853
 
6849
6854
  /** @jsxImportSource vue */
6850
6855
 
6851
- const COMPONENT_NAME$1e = 'vc-date-panel';
6856
+ const COMPONENT_NAME$1f = 'vc-date-panel';
6852
6857
  const DatePanel = /* @__PURE__ */ defineComponent({
6853
- name: COMPONENT_NAME$1e,
6858
+ name: COMPONENT_NAME$1f,
6854
6859
  props: {
6855
6860
  ...props$V,
6856
6861
  type: String,
@@ -7058,9 +7063,9 @@ const isEqualYear$1 = value => {
7058
7063
  const endYear = value[1].getFullYear();
7059
7064
  return startYear === endYear;
7060
7065
  };
7061
- const COMPONENT_NAME$1d = 'vc-monthrange-panel';
7066
+ const COMPONENT_NAME$1e = 'vc-monthrange-panel';
7062
7067
  const MonthRangePanel = /* @__PURE__ */ defineComponent({
7063
- name: COMPONENT_NAME$1d,
7068
+ name: COMPONENT_NAME$1e,
7064
7069
  props: {
7065
7070
  ...props$V,
7066
7071
  confirm: {
@@ -7235,9 +7240,9 @@ const isEqualYear = value => {
7235
7240
  const endYear = value[1].getFullYear();
7236
7241
  return startYear === endYear;
7237
7242
  };
7238
- const COMPONENT_NAME$1c = 'vc-quarterrange-panel';
7243
+ const COMPONENT_NAME$1d = 'vc-quarterrange-panel';
7239
7244
  const QuarterRangePanel = /* @__PURE__ */ defineComponent({
7240
- name: COMPONENT_NAME$1c,
7245
+ name: COMPONENT_NAME$1d,
7241
7246
  props: {
7242
7247
  ...props$V,
7243
7248
  confirm: {
@@ -7476,9 +7481,9 @@ const getComparedDate = (leftDate, rightDate) => {
7476
7481
  seconds
7477
7482
  };
7478
7483
  };
7479
- const COMPONENT_NAME$1b = 'vc-timerange-panel';
7484
+ const COMPONENT_NAME$1c = 'vc-timerange-panel';
7480
7485
  const TimeRangePanel = /* @__PURE__ */ defineComponent({
7481
- name: COMPONENT_NAME$1b,
7486
+ name: COMPONENT_NAME$1c,
7482
7487
  props: props$U,
7483
7488
  emits: ['pick', 'clear', 'ok'],
7484
7489
  setup(props, {
@@ -7577,9 +7582,9 @@ const TimeRangePanel = /* @__PURE__ */ defineComponent({
7577
7582
 
7578
7583
  /** @jsxImportSource vue */
7579
7584
 
7580
- const COMPONENT_NAME$1a = 'vc-time-panel';
7585
+ const COMPONENT_NAME$1b = 'vc-time-panel';
7581
7586
  const TimePanel = /* @__PURE__ */ defineComponent({
7582
- name: COMPONENT_NAME$1a,
7587
+ name: COMPONENT_NAME$1b,
7583
7588
  props: props$U,
7584
7589
  emits: ['pick', 'clear', 'ok'],
7585
7590
  setup(props, {
@@ -7634,7 +7639,7 @@ const TimePanel = /* @__PURE__ */ defineComponent({
7634
7639
 
7635
7640
  /** @jsxImportSource vue */
7636
7641
 
7637
- const COMPONENT_NAME$19 = 'vc-date-picker';
7642
+ const COMPONENT_NAME$1a = 'vc-date-picker';
7638
7643
  const getPanel$1 = type => {
7639
7644
  if (['daterange', 'datetimerange'].includes(type)) {
7640
7645
  return DateRangePanel;
@@ -7645,7 +7650,7 @@ const getPanel$1 = type => {
7645
7650
  }
7646
7651
  return DatePanel;
7647
7652
  };
7648
- const DatePicker = createPicker(COMPONENT_NAME$19, props$10, () => {
7653
+ const DatePicker = createPicker(COMPONENT_NAME$1a, props$10, () => {
7649
7654
  const props = getCurrentInstance().props;
7650
7655
  const icon = ref('date');
7651
7656
  const panel = shallowRef({});
@@ -7678,9 +7683,9 @@ const props$T = {
7678
7683
 
7679
7684
  /** @jsxImportSource vue */
7680
7685
 
7681
- const COMPONENT_NAME$18 = 'vc-divider';
7686
+ const COMPONENT_NAME$19 = 'vc-divider';
7682
7687
  const Divider = /* @__PURE__ */ defineComponent({
7683
- name: COMPONENT_NAME$18,
7688
+ name: COMPONENT_NAME$19,
7684
7689
  props: props$T,
7685
7690
  setup(props, {
7686
7691
  slots
@@ -7835,7 +7840,7 @@ const props$Q = {
7835
7840
 
7836
7841
  /** @jsxImportSource vue */
7837
7842
 
7838
- const COMPONENT_NAME$17 = 'vc-scroller-track';
7843
+ const COMPONENT_NAME$18 = 'vc-scroller-track';
7839
7844
  const BAR_MAP = {
7840
7845
  vertical: {
7841
7846
  scroll: 'scrollTop',
@@ -7855,7 +7860,7 @@ const BAR_MAP = {
7855
7860
  }
7856
7861
  };
7857
7862
  const Track = /* @__PURE__ */ defineComponent({
7858
- name: COMPONENT_NAME$17,
7863
+ name: COMPONENT_NAME$18,
7859
7864
  props: props$S,
7860
7865
  emits: ['change'],
7861
7866
  inheritAttrs: false,
@@ -8045,9 +8050,9 @@ const Track = /* @__PURE__ */ defineComponent({
8045
8050
 
8046
8051
  /** @jsxImportSource vue */
8047
8052
 
8048
- const COMPONENT_NAME$16 = 'vc-scroller-bar';
8053
+ const COMPONENT_NAME$17 = 'vc-scroller-bar';
8049
8054
  const Bar = /* @__PURE__ */ defineComponent({
8050
- name: COMPONENT_NAME$16,
8055
+ name: COMPONENT_NAME$17,
8051
8056
  props: props$R,
8052
8057
  emits: ['change'],
8053
8058
  setup(props, {
@@ -8262,7 +8267,7 @@ const useScroller = (expose) => {
8262
8267
 
8263
8268
  /** @jsxImportSource vue */
8264
8269
 
8265
- const COMPONENT_NAME$15 = 'vc-scroller';
8270
+ const COMPONENT_NAME$16 = 'vc-scroller';
8266
8271
 
8267
8272
  /**
8268
8273
  * 作为备选方案,目前推荐使用ScrollerWheel
@@ -8273,7 +8278,7 @@ const COMPONENT_NAME$15 = 'vc-scroller';
8273
8278
  * 2. 增加了一层嵌套
8274
8279
  */
8275
8280
  const Scroller = /* @__PURE__ */ defineComponent({
8276
- name: COMPONENT_NAME$15,
8281
+ name: COMPONENT_NAME$16,
8277
8282
  props: props$Q,
8278
8283
  emits: ['scroll'],
8279
8284
  setup(props, {
@@ -8334,7 +8339,7 @@ const Scroller = /* @__PURE__ */ defineComponent({
8334
8339
 
8335
8340
  /** @jsxImportSource vue */
8336
8341
 
8337
- const COMPONENT_NAME$14 = 'vc-scroller-wheel';
8342
+ const COMPONENT_NAME$15 = 'vc-scroller-wheel';
8338
8343
 
8339
8344
  /**
8340
8345
  * 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
@@ -8356,7 +8361,7 @@ const COMPONENT_NAME$14 = 'vc-scroller-wheel';
8356
8361
  * 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
8357
8362
  */
8358
8363
  const ScrollerWheel = /* @__PURE__ */ defineComponent({
8359
- name: COMPONENT_NAME$14,
8364
+ name: COMPONENT_NAME$15,
8360
8365
  props: Object.assign(props$Q, {
8361
8366
  stopPropagation: {
8362
8367
  type: Boolean,
@@ -8545,9 +8550,9 @@ const props$P = {
8545
8550
 
8546
8551
  /** @jsxImportSource vue */
8547
8552
 
8548
- const COMPONENT_NAME$13 = 'vc-drawer';
8553
+ const COMPONENT_NAME$14 = 'vc-drawer';
8549
8554
  const DrawerView = /* @__PURE__ */ defineComponent({
8550
- name: COMPONENT_NAME$13,
8555
+ name: COMPONENT_NAME$14,
8551
8556
  props: props$P,
8552
8557
  emits: ['close', 'update:modelValue', 'visible-change'],
8553
8558
  setup(props, {
@@ -8699,7 +8704,7 @@ const Drawer$ = new Portal(DrawerView, {
8699
8704
  multiple: true
8700
8705
  });
8701
8706
  const destroy$3 = () => Drawer$.destroy();
8702
- const open$1 = (options) => {
8707
+ const open$2 = (options) => {
8703
8708
  const leaf = Drawer$.popup({
8704
8709
  ...options,
8705
8710
  onFulfilled: options.onClose,
@@ -8709,7 +8714,7 @@ const open$1 = (options) => {
8709
8714
  leaf.wrapper.toggle?.(true);
8710
8715
  return leaf;
8711
8716
  };
8712
- const Drawer = Object.assign(DrawerView, { open: open$1, destroy: destroy$3 });
8717
+ const Drawer = Object.assign(DrawerView, { open: open$2, destroy: destroy$3 });
8713
8718
 
8714
8719
  const MDrawer = Drawer;
8715
8720
  const MDrawerView = DrawerView;
@@ -8723,9 +8728,9 @@ const props$O = {
8723
8728
 
8724
8729
  /** @jsxImportSource vue */
8725
8730
 
8726
- const COMPONENT_NAME$12 = 'vc-dropdown';
8731
+ const COMPONENT_NAME$13 = 'vc-dropdown';
8727
8732
  const Dropdown = /* @__PURE__ */ defineComponent({
8728
- name: COMPONENT_NAME$12,
8733
+ name: COMPONENT_NAME$13,
8729
8734
  props: props$O,
8730
8735
  setup(props, {
8731
8736
  slots
@@ -8749,9 +8754,9 @@ const props$N = {
8749
8754
 
8750
8755
  /** @jsxImportSource vue */
8751
8756
 
8752
- const COMPONENT_NAME$11 = 'vc-editor';
8757
+ const COMPONENT_NAME$12 = 'vc-editor';
8753
8758
  const Editor = /* @__PURE__ */ defineComponent({
8754
- name: COMPONENT_NAME$11,
8759
+ name: COMPONENT_NAME$12,
8755
8760
  props: props$N,
8756
8761
  setup(props, {
8757
8762
  slots
@@ -8808,7 +8813,7 @@ const useForm = (expose, options = {}) => {
8808
8813
  const instance = getCurrentInstance();
8809
8814
  const props = instance.props;
8810
8815
  const fields = [];
8811
- provide("form", {
8816
+ provide("vc-form", {
8812
8817
  props,
8813
8818
  add: (field) => {
8814
8819
  field && fields.push(field);
@@ -8895,9 +8900,9 @@ const useForm = (expose, options = {}) => {
8895
8900
  });
8896
8901
  };
8897
8902
 
8898
- const COMPONENT_NAME$10 = "vc-form";
8903
+ const COMPONENT_NAME$11 = "vc-form";
8899
8904
  const Form = defineComponent({
8900
- name: COMPONENT_NAME$10,
8905
+ name: COMPONENT_NAME$11,
8901
8906
  props: props$M,
8902
8907
  setup(props, { slots, expose }) {
8903
8908
  useForm(expose);
@@ -8956,8 +8961,7 @@ const props$L = {
8956
8961
  default: false
8957
8962
  },
8958
8963
  labelPosition: {
8959
- type: String,
8960
- default: "right"
8964
+ type: String
8961
8965
  },
8962
8966
  contentStyle: [Object, String],
8963
8967
  contentClass: [Object, String],
@@ -8975,7 +8979,7 @@ const toRules = (rules) => {
8975
8979
  return rules instanceof Array ? rules : rules ? [rules] : [];
8976
8980
  };
8977
8981
  const useFormItem = (expose) => {
8978
- const form = inject("form");
8982
+ const form = inject("vc-form");
8979
8983
  const instance = getCurrentInstance();
8980
8984
  const props = instance.props;
8981
8985
  const { slots } = instance;
@@ -9223,9 +9227,9 @@ const useFormItem = (expose) => {
9223
9227
 
9224
9228
  /** @jsxImportSource vue */
9225
9229
 
9226
- const COMPONENT_NAME$$ = 'vc-form-item';
9230
+ const COMPONENT_NAME$10 = 'vc-form-item';
9227
9231
  const FormItem = /* @__PURE__ */ defineComponent({
9228
- name: COMPONENT_NAME$$,
9232
+ name: COMPONENT_NAME$10,
9229
9233
  props: props$L,
9230
9234
  setup(props, {
9231
9235
  slots,
@@ -9290,9 +9294,9 @@ const props$K = {
9290
9294
  }
9291
9295
  };
9292
9296
 
9293
- const COMPONENT_NAME$_ = "vcm-form";
9297
+ const COMPONENT_NAME$$ = "vcm-form";
9294
9298
  const MForm = defineComponent({
9295
- name: COMPONENT_NAME$_,
9299
+ name: COMPONENT_NAME$$,
9296
9300
  props: props$K,
9297
9301
  setup(props, { slots, expose }) {
9298
9302
  useForm(expose, {
@@ -9323,9 +9327,9 @@ const props$J = {
9323
9327
 
9324
9328
  /** @jsxImportSource vue */
9325
9329
 
9326
- const COMPONENT_NAME$Z = 'vcm-form-item';
9330
+ const COMPONENT_NAME$_ = 'vcm-form-item';
9327
9331
  const MFormItem = /* @__PURE__ */ defineComponent({
9328
- name: COMPONENT_NAME$Z,
9332
+ name: COMPONENT_NAME$_,
9329
9333
  props: props$J,
9330
9334
  setup(props, {
9331
9335
  slots,
@@ -9379,9 +9383,9 @@ const MFormItem = /* @__PURE__ */ defineComponent({
9379
9383
  }
9380
9384
  });
9381
9385
 
9382
- const COMPONENT_NAME$Y = "vc-fragment";
9386
+ const COMPONENT_NAME$Z = "vc-fragment";
9383
9387
  const Fragment = defineComponent({
9384
- name: COMPONENT_NAME$Y,
9388
+ name: COMPONENT_NAME$Z,
9385
9389
  setup(_, { slots }) {
9386
9390
  return () => h(Fragment$1, slots.default?.());
9387
9391
  }
@@ -9398,9 +9402,9 @@ const props$I = {
9398
9402
 
9399
9403
  /** @jsxImportSource vue */
9400
9404
 
9401
- const COMPONENT_NAME$X = 'vc-html-to-image';
9405
+ const COMPONENT_NAME$Y = 'vc-html-to-image';
9402
9406
  const HTMLToImage = /* @__PURE__ */ defineComponent({
9403
- name: COMPONENT_NAME$X,
9407
+ name: COMPONENT_NAME$Y,
9404
9408
  props: props$I,
9405
9409
  setup(props, {
9406
9410
  slots
@@ -9418,10 +9422,113 @@ const MHTMLToImage = HTMLToImage;
9418
9422
  const MIcon = Icon;
9419
9423
 
9420
9424
  const props$H = {
9425
+ tag: {
9426
+ type: String,
9427
+ default: "div"
9428
+ }
9429
+ };
9430
+
9431
+ /** @jsxImportSource vue */
9432
+
9433
+ const COMPONENT_NAME$X = 'vc-image-preview';
9434
+ const ImagePreview$1 = /* @__PURE__ */ defineComponent({
9435
+ name: COMPONENT_NAME$X,
9436
+ props: props$H,
9437
+ setup(props, {
9438
+ slots
9439
+ }) {
9440
+ return () => {
9441
+ return createVNode("div", {
9442
+ "class": "vc-image-preview"
9443
+ }, [slots?.default?.()]);
9444
+ };
9445
+ }
9446
+ });
9447
+
9448
+ const MAX_WIDTH = window.innerWidth;
9449
+ const MAX_HEIGHT = window.innerHeight;
9450
+ const getFitSize = (src) => {
9451
+ return new Promise((resolve) => {
9452
+ const img = new Image();
9453
+ let width;
9454
+ let height;
9455
+ img.onload = () => {
9456
+ const owidth = img.naturalWidth || img.width;
9457
+ const oheight = img.naturalHeight || img.height;
9458
+ if (owidth > oheight) {
9459
+ width = Math.min(MAX_WIDTH, owidth);
9460
+ height = width / owidth * oheight;
9461
+ resolve({
9462
+ width,
9463
+ height
9464
+ });
9465
+ } else {
9466
+ height = Math.min(MAX_HEIGHT, oheight);
9467
+ width = height / oheight * owidth;
9468
+ resolve({
9469
+ width,
9470
+ height
9471
+ });
9472
+ }
9473
+ };
9474
+ img.onerror = () => resolve({});
9475
+ img.src = src;
9476
+ });
9477
+ };
9478
+ const open$1 = async (options) => {
9479
+ const e = VcInstance.globalEvent;
9480
+ const data = options.data.map((i) => {
9481
+ if (typeof i === "string") {
9482
+ return {
9483
+ src: i
9484
+ };
9485
+ }
9486
+ return {
9487
+ ...i,
9488
+ src: i.source || i.src
9489
+ };
9490
+ });
9491
+ for (let i = 0; i < data.length; i++) {
9492
+ if (!data[i].width) {
9493
+ data[i] = {
9494
+ ...data[i],
9495
+ ...await getFitSize(data[i].src)
9496
+ };
9497
+ }
9498
+ }
9499
+ const lightbox = new PhotoSwipeLightbox({
9500
+ pswpModule: () => import('photoswipe'),
9501
+ closeTitle: "关闭(Esc)",
9502
+ zoomTitle: "缩放",
9503
+ arrowPrevTitle: "上一张",
9504
+ arrowNextTitle: "下一张",
9505
+ errorMsg: "网络异常 图片加载失败",
9506
+ indexIndicatorSep: " / ",
9507
+ initialZoomLevel: "fit"
9508
+ });
9509
+ lightbox.init();
9510
+ lightbox.loadAndOpen(
9511
+ options.current || 0,
9512
+ data,
9513
+ // 下面无效,需要给官方支持
9514
+ {
9515
+ x: e?.clientX,
9516
+ y: e?.clientY
9517
+ }
9518
+ );
9519
+ };
9520
+
9521
+ const ImagePreview = Object.assign(ImagePreview$1, { open: open$1 });
9522
+
9523
+ const props$G = {
9421
9524
  src: String,
9422
9525
  fit: String,
9423
9526
  lazy: Boolean,
9424
- wrapper: [Object, String]
9527
+ wrapper: [Object, String],
9528
+ previewable: {
9529
+ type: Boolean,
9530
+ default: true
9531
+ }
9425
9532
  };
9426
9533
 
9427
9534
  class IMGStore {
@@ -9488,10 +9595,10 @@ const ObjectFit = {
9488
9595
  FILL: 'fill',
9489
9596
  SCALE_DOWN: 'scale-down'
9490
9597
  };
9491
- const Image = /* @__PURE__ */ defineComponent({
9598
+ const Image$1 = /* @__PURE__ */ defineComponent({
9492
9599
  name: COMPONENT_NAME$W,
9493
9600
  inheritAttrs: false,
9494
- props: props$H,
9601
+ props: props$G,
9495
9602
  setup(props, {
9496
9603
  slots,
9497
9604
  emit
@@ -9640,6 +9747,14 @@ const Image = /* @__PURE__ */ defineComponent({
9640
9747
  const alignCenter = computed(() => {
9641
9748
  return !isSupportObjectFit && props.fit !== ObjectFit.FILL;
9642
9749
  });
9750
+ const handlePreview = () => {
9751
+ if (!props.previewable) return;
9752
+ ImagePreview.open({
9753
+ current: 0,
9754
+ data: [props.src],
9755
+ onClose() {}
9756
+ });
9757
+ };
9643
9758
  watch(() => props.src, v => {
9644
9759
  if (!v && !isLoading.value) {
9645
9760
  isLoading.value = true;
@@ -9660,7 +9775,9 @@ const Image = /* @__PURE__ */ defineComponent({
9660
9775
  return () => {
9661
9776
  return createVNode("div", {
9662
9777
  "style": its.value.style,
9663
- "class": [its.value.class, 'vc-image']
9778
+ "class": [its.value.class, {
9779
+ 'is-allow-preview': props.previewable
9780
+ }, 'vc-image']
9664
9781
  }, [isLoading.value && (slots.placeholder ? slots.placeholder() : createVNode("div", {
9665
9782
  "class": [{
9666
9783
  'is-auto': isAuto.value
@@ -9678,14 +9795,16 @@ const Image = /* @__PURE__ */ defineComponent({
9678
9795
  // 包含所有on*都会被绑定, 且listeners中覆盖将由listener内触发(inheritAttrs: false)
9679
9796
  ...its.value.attrs,
9680
9797
  ...its.value.listeners
9798
+ }, {
9799
+ "onClick": handlePreview
9681
9800
  }), null)]);
9682
9801
  };
9683
9802
  }
9684
9803
  });
9685
9804
 
9686
- const MImage = Image;
9805
+ const MImage = Image$1;
9687
9806
 
9688
- const props$G = {
9807
+ const props$F = {
9689
9808
  tag: {
9690
9809
  type: String,
9691
9810
  default: "div"
@@ -9697,7 +9816,7 @@ const props$G = {
9697
9816
  const COMPONENT_NAME$V = 'vc-image-crop';
9698
9817
  const ImageCrop = /* @__PURE__ */ defineComponent({
9699
9818
  name: COMPONENT_NAME$V,
9700
- props: props$G,
9819
+ props: props$F,
9701
9820
  setup(props, {
9702
9821
  slots
9703
9822
  }) {
@@ -9711,30 +9830,6 @@ const ImageCrop = /* @__PURE__ */ defineComponent({
9711
9830
 
9712
9831
  const MImageCrop = ImageCrop;
9713
9832
 
9714
- const props$F = {
9715
- tag: {
9716
- type: String,
9717
- default: "div"
9718
- }
9719
- };
9720
-
9721
- /** @jsxImportSource vue */
9722
-
9723
- const COMPONENT_NAME$U = 'vc-image-preview';
9724
- const ImagePreview = /* @__PURE__ */ defineComponent({
9725
- name: COMPONENT_NAME$U,
9726
- props: props$F,
9727
- setup(props, {
9728
- slots
9729
- }) {
9730
- return () => {
9731
- return createVNode("div", {
9732
- "class": "vc-image-preview"
9733
- }, [slots?.default?.()]);
9734
- };
9735
- }
9736
- });
9737
-
9738
9833
  const MImagePreview = ImagePreview;
9739
9834
 
9740
9835
  const props$E = {
@@ -9746,9 +9841,9 @@ const props$E = {
9746
9841
 
9747
9842
  /** @jsxImportSource vue */
9748
9843
 
9749
- const COMPONENT_NAME$T = 'vc-image-processing';
9844
+ const COMPONENT_NAME$U = 'vc-image-processing';
9750
9845
  const ImageProcessing = /* @__PURE__ */ defineComponent({
9751
- name: COMPONENT_NAME$T,
9846
+ name: COMPONENT_NAME$U,
9752
9847
  props: props$E,
9753
9848
  setup(props, {
9754
9849
  slots
@@ -9765,9 +9860,9 @@ const MImageProcessing = ImageProcessing;
9765
9860
 
9766
9861
  /** @jsxImportSource vue */
9767
9862
 
9768
- const COMPONENT_NAME$S = 'vcm-input';
9863
+ const COMPONENT_NAME$T = 'vcm-input';
9769
9864
  const MInput = /* @__PURE__ */ defineComponent({
9770
- name: COMPONENT_NAME$S,
9865
+ name: COMPONENT_NAME$T,
9771
9866
  inheritAttrs: false,
9772
9867
  props: {
9773
9868
  ...props$$,
@@ -9856,9 +9951,9 @@ const MInput = /* @__PURE__ */ defineComponent({
9856
9951
 
9857
9952
  /** @jsxImportSource vue */
9858
9953
 
9859
- const COMPONENT_NAME$R = 'vcm-input-number';
9954
+ const COMPONENT_NAME$S = 'vcm-input-number';
9860
9955
  const MInputNumber = /* @__PURE__ */ defineComponent({
9861
- name: COMPONENT_NAME$R,
9956
+ name: COMPONENT_NAME$S,
9862
9957
  props: props$X,
9863
9958
  inheritAttrs: false,
9864
9959
  setup(props, {
@@ -9907,9 +10002,9 @@ const MInputNumber = /* @__PURE__ */ defineComponent({
9907
10002
 
9908
10003
  /** @jsxImportSource vue */
9909
10004
 
9910
- const COMPONENT_NAME$Q = 'vcm-input-search';
10005
+ const COMPONENT_NAME$R = 'vcm-input-search';
9911
10006
  const MInputSearch = /* @__PURE__ */ defineComponent({
9912
- name: COMPONENT_NAME$Q,
10007
+ name: COMPONENT_NAME$R,
9913
10008
  props: {
9914
10009
  ...props$W,
9915
10010
  cancelText: {
@@ -9986,9 +10081,9 @@ const props$D = {
9986
10081
  }
9987
10082
  };
9988
10083
 
9989
- const COMPONENT_NAME$P = "vcm-list";
10084
+ const COMPONENT_NAME$Q = "vcm-list";
9990
10085
  const MList = defineComponent({
9991
- name: COMPONENT_NAME$P,
10086
+ name: COMPONENT_NAME$Q,
9992
10087
  props: props$D,
9993
10088
  setup(props, { slots }) {
9994
10089
  provide("vc-list", { props });
@@ -10043,10 +10138,10 @@ const props$C = {
10043
10138
 
10044
10139
  /** @jsxImportSource vue */
10045
10140
 
10046
- const COMPONENT_NAME$O = 'vcm-list-item';
10141
+ const COMPONENT_NAME$P = 'vcm-list-item';
10047
10142
  const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
10048
10143
  const MListItem = /* @__PURE__ */ defineComponent({
10049
- name: COMPONENT_NAME$O,
10144
+ name: COMPONENT_NAME$P,
10050
10145
  props: props$C,
10051
10146
  emits: ['click'],
10052
10147
  setup(props, {
@@ -10140,11 +10235,11 @@ const props$B = {
10140
10235
 
10141
10236
  /** @jsxImportSource vue */
10142
10237
 
10143
- const COMPONENT_NAME$N = 'vc-marquee';
10238
+ const COMPONENT_NAME$O = 'vc-marquee';
10144
10239
  const ANIMATION = prefixStyle('animation').camel;
10145
10240
  const TRANSFORM_KEBAB = prefixStyle('transform').kebab;
10146
10241
  const Marquee = /* @__PURE__ */ defineComponent({
10147
- name: COMPONENT_NAME$N,
10242
+ name: COMPONENT_NAME$O,
10148
10243
  props: props$B,
10149
10244
  setup(props, {
10150
10245
  slots
@@ -10212,9 +10307,9 @@ const props$A = {
10212
10307
  }
10213
10308
  };
10214
10309
 
10215
- const COMPONENT_NAME$M = "vc-resizer";
10310
+ const COMPONENT_NAME$N = "vc-resizer";
10216
10311
  const Resizer = defineComponent({
10217
- name: COMPONENT_NAME$M,
10312
+ name: COMPONENT_NAME$N,
10218
10313
  props: props$A,
10219
10314
  emit: ["resize", "change"],
10220
10315
  setup(props, { emit, slots, expose }) {
@@ -10341,9 +10436,8 @@ const props$z = {
10341
10436
  type: [String, Boolean],
10342
10437
  default: "取消"
10343
10438
  },
10344
- wrapperStyle: {
10345
- type: [String, Object]
10346
- },
10439
+ wrapperStyle: [String, Object],
10440
+ wrapperClass: [String, Object],
10347
10441
  footer: {
10348
10442
  type: Boolean,
10349
10443
  default: true
@@ -10373,10 +10467,10 @@ const props$z = {
10373
10467
 
10374
10468
  /** @jsxImportSource vue */
10375
10469
 
10376
- const COMPONENT_NAME$L = 'vc-modal';
10470
+ const COMPONENT_NAME$M = 'vc-modal';
10377
10471
  let zIndexNumber = 1002;
10378
10472
  const ModalView = /* @__PURE__ */ defineComponent({
10379
- name: COMPONENT_NAME$L,
10473
+ name: COMPONENT_NAME$M,
10380
10474
  emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
10381
10475
  props: props$z,
10382
10476
  setup(props, {
@@ -10397,6 +10491,7 @@ const ModalView = /* @__PURE__ */ defineComponent({
10397
10491
 
10398
10492
  // 注: 服务端渲染为0, 在客服端激活前,展示端存在问题【高度不定】
10399
10493
  const MAX_HEIGHT = IS_SERVER$1 ? 0 : window.innerHeight - 20;
10494
+ const MAX_WIDTH = IS_SERVER$1 ? 0 : window.innerWidth - 20;
10400
10495
  const defaultSize = computed(() => {
10401
10496
  let width = 0;
10402
10497
  let height = 0;
@@ -10415,7 +10510,7 @@ const ModalView = /* @__PURE__ */ defineComponent({
10415
10510
  break;
10416
10511
  }
10417
10512
  return {
10418
- width: props.width || width,
10513
+ width: Math.min(props.width || width, MAX_WIDTH),
10419
10514
  height: Math.min(props.height || height, MAX_HEIGHT)
10420
10515
  };
10421
10516
  });
@@ -10651,7 +10746,7 @@ const ModalView = /* @__PURE__ */ defineComponent({
10651
10746
  "style": [props.wrapperStyle || {}, props.draggable ? {
10652
10747
  top: 0
10653
10748
  } : {}],
10654
- "class": "vc-modal__wrapper",
10749
+ "class": [props.wrapperClass, 'vc-modal__wrapper'],
10655
10750
  "onClick": e => handleClose(e, false)
10656
10751
  }, [createVNode(TransitionScale, {
10657
10752
  "mode": "part",
@@ -10814,9 +10909,9 @@ const props$y = {
10814
10909
 
10815
10910
  /** @jsxImportSource vue */
10816
10911
 
10817
- const COMPONENT_NAME$K = 'vc-modal';
10912
+ const COMPONENT_NAME$L = 'vc-modal';
10818
10913
  const MModalView = /* @__PURE__ */ defineComponent({
10819
- name: COMPONENT_NAME$K,
10914
+ name: COMPONENT_NAME$L,
10820
10915
  emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
10821
10916
  props: props$y,
10822
10917
  setup(props, {
@@ -11028,9 +11123,9 @@ const props$x = {
11028
11123
 
11029
11124
  /** @jsxImportSource vue */
11030
11125
 
11031
- const COMPONENT_NAME$J = 'vc-notice';
11126
+ const COMPONENT_NAME$K = 'vc-notice';
11032
11127
  const NoticeView = /* @__PURE__ */ defineComponent({
11033
- name: COMPONENT_NAME$J,
11128
+ name: COMPONENT_NAME$K,
11034
11129
  props: props$x,
11035
11130
  emits: ['portal-fulfilled', 'close', 'before-close'],
11036
11131
  setup(props, {
@@ -11203,9 +11298,9 @@ const props$w = {
11203
11298
 
11204
11299
  /** @jsxImportSource vue */
11205
11300
 
11206
- const COMPONENT_NAME$I = 'vc-option';
11301
+ const COMPONENT_NAME$J = 'vc-option';
11207
11302
  const Option$1 = /* @__PURE__ */ defineComponent({
11208
- name: COMPONENT_NAME$I,
11303
+ name: COMPONENT_NAME$J,
11209
11304
  props: props$w,
11210
11305
  setup(props, {
11211
11306
  slots
@@ -11318,9 +11413,9 @@ const props$u = {
11318
11413
 
11319
11414
  /** @jsxImportSource vue */
11320
11415
 
11321
- const COMPONENT_NAME$H = 'vc-tag';
11416
+ const COMPONENT_NAME$I = 'vc-tag';
11322
11417
  const Tag = /* @__PURE__ */ defineComponent({
11323
- name: COMPONENT_NAME$H,
11418
+ name: COMPONENT_NAME$I,
11324
11419
  props: props$u,
11325
11420
  emits: ['close', 'change'],
11326
11421
  setup(props, {
@@ -11389,9 +11484,9 @@ const props$t = {
11389
11484
 
11390
11485
  /** @jsxImportSource vue */
11391
11486
 
11392
- const COMPONENT_NAME$G = 'vc-select-option';
11487
+ const COMPONENT_NAME$H = 'vc-select-option';
11393
11488
  const Option = /* @__PURE__ */ defineComponent({
11394
- name: COMPONENT_NAME$G,
11489
+ name: COMPONENT_NAME$H,
11395
11490
  props: props$t,
11396
11491
  setup(props, {
11397
11492
  slots
@@ -11464,9 +11559,9 @@ const props$s = {
11464
11559
 
11465
11560
  /** @jsxImportSource vue */
11466
11561
 
11467
- const COMPONENT_NAME$F = 'vc-select-option-group';
11562
+ const COMPONENT_NAME$G = 'vc-select-option-group';
11468
11563
  const OptionGroup = /* @__PURE__ */ defineComponent({
11469
- name: COMPONENT_NAME$F,
11564
+ name: COMPONENT_NAME$G,
11470
11565
  props: props$s,
11471
11566
  setup(props, {
11472
11567
  slots
@@ -11564,9 +11659,9 @@ const props$r = {
11564
11659
  function _isSlot$1(s) {
11565
11660
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
11566
11661
  }
11567
- const COMPONENT_NAME$E = 'vc-select';
11662
+ const COMPONENT_NAME$F = 'vc-select';
11568
11663
  const Select = /* @__PURE__ */ defineComponent({
11569
- name: COMPONENT_NAME$E,
11664
+ name: COMPONENT_NAME$F,
11570
11665
  props: props$r,
11571
11666
  emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
11572
11667
  setup(props, {
@@ -11813,9 +11908,9 @@ const Select = /* @__PURE__ */ defineComponent({
11813
11908
 
11814
11909
  /** @jsxImportSource vue */
11815
11910
 
11816
- const COMPONENT_NAME$D = 'vc-pagination';
11911
+ const COMPONENT_NAME$E = 'vc-pagination';
11817
11912
  const Pagination = /* @__PURE__ */ defineComponent({
11818
- name: COMPONENT_NAME$D,
11913
+ name: COMPONENT_NAME$E,
11819
11914
  props: props$v,
11820
11915
  emits: ['update:current', 'change', 'page-size-change'],
11821
11916
  setup(props, {
@@ -12013,9 +12108,9 @@ const props$q = {
12013
12108
 
12014
12109
  /** @jsxImportSource vue */
12015
12110
 
12016
- const COMPONENT_NAME$C = 'vc-picker';
12111
+ const COMPONENT_NAME$D = 'vc-picker';
12017
12112
  const Picker = /* @__PURE__ */ defineComponent({
12018
- name: COMPONENT_NAME$C,
12113
+ name: COMPONENT_NAME$D,
12019
12114
  props: props$q,
12020
12115
  setup(props, {
12021
12116
  slots
@@ -12039,9 +12134,9 @@ const props$p = {
12039
12134
 
12040
12135
  /** @jsxImportSource vue */
12041
12136
 
12042
- const COMPONENT_NAME$B = 'vc-popconfirm';
12137
+ const COMPONENT_NAME$C = 'vc-popconfirm';
12043
12138
  const Popconfirm = /* @__PURE__ */ defineComponent({
12044
- name: COMPONENT_NAME$B,
12139
+ name: COMPONENT_NAME$C,
12045
12140
  props: props$p,
12046
12141
  setup(props, {
12047
12142
  slots
@@ -12067,9 +12162,9 @@ const props$o = {
12067
12162
 
12068
12163
  /** @jsxImportSource vue */
12069
12164
 
12070
- const COMPONENT_NAME$A = 'vc-popup';
12165
+ const COMPONENT_NAME$B = 'vc-popup';
12071
12166
  const Popup = /* @__PURE__ */ defineComponent({
12072
- name: COMPONENT_NAME$A,
12167
+ name: COMPONENT_NAME$B,
12073
12168
  props: props$o,
12074
12169
  setup(props, {
12075
12170
  slots
@@ -12096,9 +12191,9 @@ const props$n = {
12096
12191
 
12097
12192
  /** @jsxImportSource vue */
12098
12193
 
12099
- const COMPONENT_NAME$z = 'vc-print';
12194
+ const COMPONENT_NAME$A = 'vc-print';
12100
12195
  const Print = /* @__PURE__ */ defineComponent({
12101
- name: COMPONENT_NAME$z,
12196
+ name: COMPONENT_NAME$A,
12102
12197
  props: props$n,
12103
12198
  setup(props, {
12104
12199
  expose,
@@ -12200,9 +12295,9 @@ const props$m = {
12200
12295
 
12201
12296
  /** @jsxImportSource vue */
12202
12297
 
12203
- const COMPONENT_NAME$y = 'vc-progress-circle';
12298
+ const COMPONENT_NAME$z = 'vc-progress-circle';
12204
12299
  const Circle = /* @__PURE__ */ defineComponent({
12205
- name: COMPONENT_NAME$y,
12300
+ name: COMPONENT_NAME$z,
12206
12301
  props: props$m,
12207
12302
  setup(props, {
12208
12303
  slots
@@ -12262,9 +12357,9 @@ const Circle = /* @__PURE__ */ defineComponent({
12262
12357
 
12263
12358
  /** @jsxImportSource vue */
12264
12359
 
12265
- const COMPONENT_NAME$x = 'vc-progress-line';
12360
+ const COMPONENT_NAME$y = 'vc-progress-line';
12266
12361
  const Line = /* @__PURE__ */ defineComponent({
12267
- name: COMPONENT_NAME$x,
12362
+ name: COMPONENT_NAME$y,
12268
12363
  props: props$m,
12269
12364
  setup(props) {
12270
12365
  const colorStyle = computed(() => {
@@ -12311,15 +12406,19 @@ const Line = /* @__PURE__ */ defineComponent({
12311
12406
  function _isSlot(s) {
12312
12407
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
12313
12408
  }
12314
- const COMPONENT_NAME$w = 'vc-progress';
12409
+ const COMPONENT_NAME$x = 'vc-progress';
12315
12410
  const Progress = /* @__PURE__ */ defineComponent({
12316
- name: COMPONENT_NAME$w,
12411
+ name: COMPONENT_NAME$x,
12317
12412
  props: props$m,
12318
12413
  setup(props, {
12319
12414
  slots
12320
12415
  }) {
12416
+ const currentPercent = computed(() => {
12417
+ const v = Number(props.percent);
12418
+ return v >= 100 ? 100 : v;
12419
+ });
12321
12420
  const currentStatus = computed(() => {
12322
- if (Number(props.percent) >= 100) {
12421
+ if (currentPercent.value === 100) {
12323
12422
  return 'success';
12324
12423
  }
12325
12424
  return props.status;
@@ -12331,6 +12430,7 @@ const Progress = /* @__PURE__ */ defineComponent({
12331
12430
  const binds = computed(() => {
12332
12431
  return {
12333
12432
  ...props,
12433
+ percent: currentPercent.value,
12334
12434
  status: currentStatus.value,
12335
12435
  color: currentColor.value
12336
12436
  };
@@ -12408,7 +12508,8 @@ const useRadio = () => {
12408
12508
  return {
12409
12509
  "is-checked": checked.value,
12410
12510
  "is-disabled": isDisabled.value,
12411
- "is-focus": isFocus.value
12511
+ "is-focus": isFocus.value,
12512
+ "is-error": !!formItem?.message?.value
12412
12513
  };
12413
12514
  });
12414
12515
  watch(
@@ -12465,9 +12566,9 @@ const useRadio = () => {
12465
12566
 
12466
12567
  /** @jsxImportSource vue */
12467
12568
 
12468
- const COMPONENT_NAME$v = 'vc-radio';
12569
+ const COMPONENT_NAME$w = 'vc-radio';
12469
12570
  const Radio = /* @__PURE__ */ defineComponent({
12470
- name: COMPONENT_NAME$v,
12571
+ name: COMPONENT_NAME$w,
12471
12572
  props: props$l,
12472
12573
  emits: ['update:modelValue', 'change'],
12473
12574
  setup(props, {
@@ -12578,9 +12679,9 @@ const useRadioGroup = () => {
12578
12679
 
12579
12680
  /** @jsxImportSource vue */
12580
12681
 
12581
- const COMPONENT_NAME$u = 'vc-radio-group';
12682
+ const COMPONENT_NAME$v = 'vc-radio-group';
12582
12683
  const RadioGroup = /* @__PURE__ */ defineComponent({
12583
- name: COMPONENT_NAME$u,
12684
+ name: COMPONENT_NAME$v,
12584
12685
  props: props$k,
12585
12686
  emits: ['update:modelValue', 'change'],
12586
12687
  setup(props, {
@@ -12592,8 +12693,7 @@ const RadioGroup = /* @__PURE__ */ defineComponent({
12592
12693
  return () => {
12593
12694
  if (props.fragment) return slots.default?.();
12594
12695
  return createVNode("div", {
12595
- "class": "vc-radio-group",
12596
- "style": classes.value,
12696
+ "class": [classes.value, 'vc-radio-group'],
12597
12697
  "name": props.name
12598
12698
  }, [slots?.default?.()]);
12599
12699
  };
@@ -12602,9 +12702,9 @@ const RadioGroup = /* @__PURE__ */ defineComponent({
12602
12702
 
12603
12703
  /** @jsxImportSource vue */
12604
12704
 
12605
- const COMPONENT_NAME$t = 'vcm-radio';
12705
+ const COMPONENT_NAME$u = 'vcm-radio';
12606
12706
  const MRadio = /* @__PURE__ */ defineComponent({
12607
- name: COMPONENT_NAME$t,
12707
+ name: COMPONENT_NAME$u,
12608
12708
  props: props$l,
12609
12709
  emits: ['update:modelValue', 'change'],
12610
12710
  setup(props, {
@@ -12645,9 +12745,9 @@ const MRadio = /* @__PURE__ */ defineComponent({
12645
12745
 
12646
12746
  /** @jsxImportSource vue */
12647
12747
 
12648
- const COMPONENT_NAME$s = 'vcm-radio-group';
12748
+ const COMPONENT_NAME$t = 'vcm-radio-group';
12649
12749
  const MRadioGroup = /* @__PURE__ */ defineComponent({
12650
- name: COMPONENT_NAME$s,
12750
+ name: COMPONENT_NAME$t,
12651
12751
  props: props$k,
12652
12752
  emits: ['update:modelValue', 'change'],
12653
12753
  setup(props, {
@@ -12676,9 +12776,9 @@ const props$j = {
12676
12776
 
12677
12777
  /** @jsxImportSource vue */
12678
12778
 
12679
- const COMPONENT_NAME$r = 'vc-rate';
12779
+ const COMPONENT_NAME$s = 'vc-rate';
12680
12780
  const Rate = /* @__PURE__ */ defineComponent({
12681
- name: COMPONENT_NAME$r,
12781
+ name: COMPONENT_NAME$s,
12682
12782
  props: props$j,
12683
12783
  setup(props, {
12684
12784
  slots
@@ -12746,9 +12846,9 @@ const props$i = {
12746
12846
 
12747
12847
  /** @jsxImportSource vue */
12748
12848
 
12749
- const COMPONENT_NAME$q = 'vc-recycle-list-scroll-state';
12849
+ const COMPONENT_NAME$r = 'vc-recycle-list-scroll-state';
12750
12850
  const ScrollState = /* @__PURE__ */ defineComponent({
12751
- name: COMPONENT_NAME$q,
12851
+ name: COMPONENT_NAME$r,
12752
12852
  setup(_, {
12753
12853
  slots
12754
12854
  }) {
@@ -12878,12 +12978,12 @@ const useDirectionKeys = () => {
12878
12978
 
12879
12979
  /** @jsxImportSource vue */
12880
12980
 
12881
- const COMPONENT_NAME$p = 'vc-recycle-list-container';
12981
+ const COMPONENT_NAME$q = 'vc-recycle-list-container';
12882
12982
 
12883
12983
  // TODO: 抽离
12884
12984
  const transformKey = $.prefixStyle('transform').camel;
12885
12985
  const Container = /* @__PURE__ */ defineComponent({
12886
- name: COMPONENT_NAME$p,
12986
+ name: COMPONENT_NAME$q,
12887
12987
  props: props$h,
12888
12988
  emits: ['refresh'],
12889
12989
  setup(props, {
@@ -12981,9 +13081,9 @@ const Container = /* @__PURE__ */ defineComponent({
12981
13081
 
12982
13082
  /** @jsxImportSource vue */
12983
13083
 
12984
- const COMPONENT_NAME$o = 'vc-recycle-list';
13084
+ const COMPONENT_NAME$p = 'vc-recycle-list';
12985
13085
  const RecycleList = /* @__PURE__ */ defineComponent({
12986
- name: COMPONENT_NAME$o,
13086
+ name: COMPONENT_NAME$p,
12987
13087
  props: props$i,
12988
13088
  emits: ['scroll', 'row-resize'],
12989
13089
  setup(props, {
@@ -13555,9 +13655,9 @@ const props$g = {
13555
13655
 
13556
13656
  /** @jsxImportSource vue */
13557
13657
 
13558
- const COMPONENT_NAME$n = 'vc-slider';
13658
+ const COMPONENT_NAME$o = 'vc-slider';
13559
13659
  const Slider = /* @__PURE__ */ defineComponent({
13560
- name: COMPONENT_NAME$n,
13660
+ name: COMPONENT_NAME$o,
13561
13661
  props: props$g,
13562
13662
  setup(props, {
13563
13663
  slots
@@ -13581,9 +13681,9 @@ const props$f = {
13581
13681
 
13582
13682
  /** @jsxImportSource vue */
13583
13683
 
13584
- const COMPONENT_NAME$m = 'vc-sort-list';
13684
+ const COMPONENT_NAME$n = 'vc-sort-list';
13585
13685
  const SortList = /* @__PURE__ */ defineComponent({
13586
- name: COMPONENT_NAME$m,
13686
+ name: COMPONENT_NAME$n,
13587
13687
  props: props$f,
13588
13688
  setup(props, {
13589
13689
  slots
@@ -13607,9 +13707,9 @@ const props$e = {
13607
13707
 
13608
13708
  /** @jsxImportSource vue */
13609
13709
 
13610
- const COMPONENT_NAME$l = 'vc-steps';
13710
+ const COMPONENT_NAME$m = 'vc-steps';
13611
13711
  const Steps = /* @__PURE__ */ defineComponent({
13612
- name: COMPONENT_NAME$l,
13712
+ name: COMPONENT_NAME$m,
13613
13713
  props: props$e,
13614
13714
  setup(props, {
13615
13715
  slots
@@ -13722,9 +13822,9 @@ const useSwitch = (expose) => {
13722
13822
 
13723
13823
  /** @jsxImportSource vue */
13724
13824
 
13725
- const COMPONENT_NAME$k = 'vc-switch';
13825
+ const COMPONENT_NAME$l = 'vc-switch';
13726
13826
  const Switch = /* @__PURE__ */ defineComponent({
13727
- name: COMPONENT_NAME$k,
13827
+ name: COMPONENT_NAME$l,
13728
13828
  props: props$d,
13729
13829
  // click -> onClick要被拦截,此处不能放置
13730
13830
  emits: ['update:modelValue', 'change', 'click'],
@@ -13761,9 +13861,9 @@ const Switch = /* @__PURE__ */ defineComponent({
13761
13861
 
13762
13862
  /** @jsxImportSource vue */
13763
13863
 
13764
- const COMPONENT_NAME$j = 'vcm-switch';
13864
+ const COMPONENT_NAME$k = 'vcm-switch';
13765
13865
  const MSwitch = /* @__PURE__ */ defineComponent({
13766
- name: COMPONENT_NAME$j,
13866
+ name: COMPONENT_NAME$k,
13767
13867
  props: props$d,
13768
13868
  // click -> onClick要被拦截,此处不能放置
13769
13869
  emits: ['update:modelValue', 'change', 'click'],
@@ -14876,9 +14976,9 @@ const useStates = (mapper, $store) => {
14876
14976
 
14877
14977
  /** @jsxImportSource vue */
14878
14978
 
14879
- const COMPONENT_NAME$i = 'vc-table-normal-list';
14979
+ const COMPONENT_NAME$j = 'vc-table-normal-list';
14880
14980
  const NormalList = /* @__PURE__ */ defineComponent({
14881
- name: COMPONENT_NAME$i,
14981
+ name: COMPONENT_NAME$j,
14882
14982
  props: {
14883
14983
  data: {
14884
14984
  type: Array,
@@ -15718,9 +15818,9 @@ const props$c = {
15718
15818
 
15719
15819
  /** @jsxImportSource vue */
15720
15820
 
15721
- const COMPONENT_NAME$h = 'vc-table';
15821
+ const COMPONENT_NAME$i = 'vc-table';
15722
15822
  const Table = /* @__PURE__ */ defineComponent({
15723
- name: COMPONENT_NAME$h,
15823
+ name: COMPONENT_NAME$i,
15724
15824
  props: props$c,
15725
15825
  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'],
15726
15826
  setup(props, {
@@ -16355,9 +16455,9 @@ const getFitIndex = (options = {}) => {
16355
16455
 
16356
16456
  /** @jsxImportSource vue */
16357
16457
 
16358
- const COMPONENT_NAME$g = 'vc-text';
16458
+ const COMPONENT_NAME$h = 'vc-text';
16359
16459
  const Text = /* @__PURE__ */ defineComponent({
16360
- name: COMPONENT_NAME$g,
16460
+ name: COMPONENT_NAME$h,
16361
16461
  props: props$b,
16362
16462
  setup(props, {
16363
16463
  emit
@@ -16913,7 +17013,11 @@ const props$a = {
16913
17013
  closable: {
16914
17014
  type: Boolean,
16915
17015
  default: false
16916
- }
17016
+ },
17017
+ barStyle: [Object, String],
17018
+ contentStyle: [Object, String],
17019
+ barClass: [Object, String],
17020
+ contentClass: [Object, String]
16917
17021
  };
16918
17022
 
16919
17023
  const useTabs = (options = {}) => {
@@ -17048,9 +17152,9 @@ const useTabs = (options = {}) => {
17048
17152
 
17049
17153
  /** @jsxImportSource vue */
17050
17154
 
17051
- const COMPONENT_NAME$f = 'vc-tabs';
17155
+ const COMPONENT_NAME$g = 'vc-tabs';
17052
17156
  const Tabs = /* @__PURE__ */ defineComponent({
17053
- name: COMPONENT_NAME$f,
17157
+ name: COMPONENT_NAME$g,
17054
17158
  props: props$a,
17055
17159
  emits: ['update:modelValue', 'change', 'click'],
17056
17160
  setup(props, {
@@ -17166,10 +17270,10 @@ const Tabs = /* @__PURE__ */ defineComponent({
17166
17270
  "class": "vc-tabs__extra"
17167
17271
  }, [slots.extra?.()]), createVNode("div", {
17168
17272
  "ref": wrapper,
17169
- "style": {
17273
+ "style": [props.barStyle, {
17170
17274
  padding: tabs.scrollable.value ? '0 24px' : 0
17171
- },
17172
- "class": "vc-tabs__bar"
17275
+ }],
17276
+ "class": [props.barClass, 'vc-tabs__bar']
17173
17277
  }, [tabs.scrollable.value && createVNode(Icon, {
17174
17278
  "class": "vc-tabs__icon is-left",
17175
17279
  "type": "left",
@@ -17209,8 +17313,8 @@ const Tabs = /* @__PURE__ */ defineComponent({
17209
17313
  }, null)]);
17210
17314
  })])])]), createVNode("div", {
17211
17315
  "ref": content,
17212
- "style": tabs.contentStyle.value,
17213
- "class": "vc-tabs__content"
17316
+ "style": [props.contentStyle, tabs.contentStyle.value],
17317
+ "class": [props.contentClass, 'vc-tabs__content']
17214
17318
  }, [slots.default?.()])]);
17215
17319
  };
17216
17320
  }
@@ -17298,9 +17402,9 @@ const useTabsPane = () => {
17298
17402
 
17299
17403
  /** @jsxImportSource vue */
17300
17404
 
17301
- const COMPONENT_NAME$e = 'vc-tabs-pane';
17405
+ const COMPONENT_NAME$f = 'vc-tabs-pane';
17302
17406
  const TabsPane = /* @__PURE__ */ defineComponent({
17303
- name: COMPONENT_NAME$e,
17407
+ name: COMPONENT_NAME$f,
17304
17408
  props: props$9,
17305
17409
  setup(_, {
17306
17410
  slots
@@ -17355,9 +17459,9 @@ const props$8 = {
17355
17459
 
17356
17460
  /** @jsxImportSource vue */
17357
17461
 
17358
- const COMPONENT_NAME$d = 'vcm-tabs';
17462
+ const COMPONENT_NAME$e = 'vcm-tabs';
17359
17463
  const MTabs = /* @__PURE__ */ defineComponent({
17360
- name: COMPONENT_NAME$d,
17464
+ name: COMPONENT_NAME$e,
17361
17465
  props: props$8,
17362
17466
  emits: ['update:modelValue', 'change', 'click'],
17363
17467
  setup(props, {
@@ -17622,9 +17726,9 @@ const MTabs = /* @__PURE__ */ defineComponent({
17622
17726
 
17623
17727
  /** @jsxImportSource vue */
17624
17728
 
17625
- const COMPONENT_NAME$c = 'vcm-tabs-pane';
17729
+ const COMPONENT_NAME$d = 'vcm-tabs-pane';
17626
17730
  const MTabsPane = /* @__PURE__ */ defineComponent({
17627
- name: COMPONENT_NAME$c,
17731
+ name: COMPONENT_NAME$d,
17628
17732
  props: props$9,
17629
17733
  setup(_, {
17630
17734
  slots
@@ -17825,7 +17929,8 @@ const useTextarea = (textarea, expose) => {
17825
17929
  const classes = computed(() => {
17826
17930
  return {
17827
17931
  "is-focus": isFocus.value,
17828
- "is-disabled": props.disabled
17932
+ "is-disabled": props.disabled,
17933
+ "is-error": !!formItem?.message?.value
17829
17934
  };
17830
17935
  });
17831
17936
  const listeners = computed(() => {
@@ -17924,9 +18029,9 @@ const props$7 = {
17924
18029
 
17925
18030
  /** @jsxImportSource vue */
17926
18031
 
17927
- const COMPONENT_NAME$b = 'vc-textarea';
18032
+ const COMPONENT_NAME$c = 'vc-textarea';
17928
18033
  const Textarea = /* @__PURE__ */ defineComponent({
17929
- name: COMPONENT_NAME$b,
18034
+ name: COMPONENT_NAME$c,
17930
18035
  props: Object.assign(props$7, {
17931
18036
  indicator: {
17932
18037
  type: [Boolean, Object],
@@ -17982,9 +18087,9 @@ const Textarea = /* @__PURE__ */ defineComponent({
17982
18087
 
17983
18088
  /** @jsxImportSource vue */
17984
18089
 
17985
- const COMPONENT_NAME$a = 'vcm-textarea';
18090
+ const COMPONENT_NAME$b = 'vcm-textarea';
17986
18091
  const MTextarea = /* @__PURE__ */ defineComponent({
17987
- name: COMPONENT_NAME$a,
18092
+ name: COMPONENT_NAME$b,
17988
18093
  props: Object.assign(props$7, {
17989
18094
  align: {
17990
18095
  type: String,
@@ -18067,9 +18172,9 @@ const props$6 = {
18067
18172
  }
18068
18173
  };
18069
18174
 
18070
- const COMPONENT_NAME$9 = "vc-theme";
18175
+ const COMPONENT_NAME$a = "vc-theme";
18071
18176
  const Theme = defineComponent({
18072
- name: COMPONENT_NAME$9,
18177
+ name: COMPONENT_NAME$a,
18073
18178
  props: props$6,
18074
18179
  setup(props, { slots }) {
18075
18180
  const themeId = Utils.getUid("vc-theme");
@@ -18155,9 +18260,9 @@ const Theme = defineComponent({
18155
18260
  }
18156
18261
  });
18157
18262
 
18158
- const COMPONENT_NAME$8 = "vc-theme-view";
18263
+ const COMPONENT_NAME$9 = "vc-theme-view";
18159
18264
  const ThemeView = defineComponent({
18160
- name: COMPONENT_NAME$8,
18265
+ name: COMPONENT_NAME$9,
18161
18266
  props: props$6,
18162
18267
  setup(props, { slots }) {
18163
18268
  return () => {
@@ -18173,9 +18278,9 @@ const ThemeView = defineComponent({
18173
18278
  }
18174
18279
  });
18175
18280
 
18176
- const COMPONENT_NAME$7 = "vc-theme-text";
18281
+ const COMPONENT_NAME$8 = "vc-theme-text";
18177
18282
  const ThemeText = defineComponent({
18178
- name: COMPONENT_NAME$7,
18283
+ name: COMPONENT_NAME$8,
18179
18284
  props: props$6,
18180
18285
  setup(props, { slots }) {
18181
18286
  return () => {
@@ -18191,9 +18296,9 @@ const ThemeText = defineComponent({
18191
18296
  }
18192
18297
  });
18193
18298
 
18194
- const COMPONENT_NAME$6 = "vc-theme-image";
18299
+ const COMPONENT_NAME$7 = "vc-theme-image";
18195
18300
  const ThemeImage = defineComponent({
18196
- name: COMPONENT_NAME$6,
18301
+ name: COMPONENT_NAME$7,
18197
18302
  props: props$6,
18198
18303
  setup(props, { slots }) {
18199
18304
  return () => {
@@ -18241,12 +18346,12 @@ const props$5 = {
18241
18346
 
18242
18347
  /** @jsxImportSource vue */
18243
18348
 
18244
- const COMPONENT_NAME$5 = 'vc-time-picker';
18349
+ const COMPONENT_NAME$6 = 'vc-time-picker';
18245
18350
  const getPanel = type => {
18246
18351
  const isRange = type === 'timerange';
18247
18352
  return isRange ? TimeRangePanel : TimePanel;
18248
18353
  };
18249
- const TimePicker = createPicker(COMPONENT_NAME$5, props$5, () => {
18354
+ const TimePicker = createPicker(COMPONENT_NAME$6, props$5, () => {
18250
18355
  const props = getCurrentInstance().props;
18251
18356
  const icon = ref('icon');
18252
18357
  const panel = shallowRef({});
@@ -18281,9 +18386,9 @@ const props$4 = {
18281
18386
 
18282
18387
  /** @jsxImportSource vue */
18283
18388
 
18284
- const COMPONENT_NAME$4 = 'vc-timeline';
18389
+ const COMPONENT_NAME$5 = 'vc-timeline';
18285
18390
  const Timeline = /* @__PURE__ */ defineComponent({
18286
- name: COMPONENT_NAME$4,
18391
+ name: COMPONENT_NAME$5,
18287
18392
  props: props$4,
18288
18393
  setup(props, {
18289
18394
  slots
@@ -18310,9 +18415,9 @@ const props$3 = {
18310
18415
 
18311
18416
  /** @jsxImportSource vue */
18312
18417
 
18313
- const COMPONENT_NAME$3 = 'vc-touch';
18418
+ const COMPONENT_NAME$4 = 'vc-touch';
18314
18419
  const Touch = /* @__PURE__ */ defineComponent({
18315
- name: COMPONENT_NAME$3,
18420
+ name: COMPONENT_NAME$4,
18316
18421
  props: props$3,
18317
18422
  setup(props, {
18318
18423
  slots
@@ -18336,9 +18441,9 @@ const props$2 = {
18336
18441
 
18337
18442
  /** @jsxImportSource vue */
18338
18443
 
18339
- const COMPONENT_NAME$2 = 'vc-tree';
18444
+ const COMPONENT_NAME$3 = 'vc-tree';
18340
18445
  const Tree = /* @__PURE__ */ defineComponent({
18341
- name: COMPONENT_NAME$2,
18446
+ name: COMPONENT_NAME$3,
18342
18447
  props: props$2,
18343
18448
  setup(props, {
18344
18449
  slots
@@ -18448,9 +18553,9 @@ const props$1 = {
18448
18553
  }
18449
18554
  };
18450
18555
 
18451
- const COMPONENT_NAME$1 = "vc-upload";
18556
+ const COMPONENT_NAME$2 = "vc-upload";
18452
18557
  const Upload = defineComponent({
18453
- name: COMPONENT_NAME$1,
18558
+ name: COMPONENT_NAME$2,
18454
18559
  props: props$1,
18455
18560
  emits: [
18456
18561
  "message",
@@ -18743,10 +18848,440 @@ const Upload = defineComponent({
18743
18848
  const MUpload = Upload;
18744
18849
 
18745
18850
  const props = {
18746
- tag: {
18747
- type: String,
18748
- default: "div"
18851
+ picker: {
18852
+ type: Array,
18853
+ default: () => ["image"]
18854
+ },
18855
+ sortable: {
18856
+ type: Boolean,
18857
+ default: false
18858
+ },
18859
+ mask: {
18860
+ type: Boolean,
18861
+ default: false
18862
+ },
18863
+ /**
18864
+ * vc-upload组件的属性
18865
+ */
18866
+ uploadOptions: {
18867
+ type: Object,
18868
+ default() {
18869
+ return {};
18870
+ }
18871
+ },
18872
+ /**
18873
+ * 数据源['xxx.jpg', ....]
18874
+ */
18875
+ modelValue: {
18876
+ type: [String, Array, Object],
18877
+ // { value: '', label: '' }
18878
+ default: () => []
18879
+ },
18880
+ // 数据字典
18881
+ keyValue: {
18882
+ type: Object,
18883
+ default: () => {
18884
+ return {
18885
+ label: "label",
18886
+ value: "value"
18887
+ };
18888
+ }
18889
+ },
18890
+ output: {
18891
+ type: [String, Function],
18892
+ default: "object",
18893
+ validator: (v) => /(string|object)/.test(v)
18894
+ },
18895
+ /**
18896
+ * 可上传的最大值,跟upload内的Max不同,有可能是对象类型,对应的Upload做限制
18897
+ */
18898
+ max: {
18899
+ type: [Number, Object],
18900
+ default: Number.MAX_SAFE_INTEGER
18901
+ },
18902
+ disabled: {
18903
+ type: Boolean,
18904
+ default: false
18905
+ },
18906
+ /**
18907
+ * 上传成功后对数据的格式化
18908
+ */
18909
+ formatter: Function,
18910
+ // TODO 下面两个重复了,需删除
18911
+ /**
18912
+ * 盒子className
18913
+ */
18914
+ boxClass: String,
18915
+ imagePreviewOptions: {
18916
+ type: Object,
18917
+ default: () => ({})
18918
+ },
18919
+ imageClass: String,
18920
+ videoClass: String,
18921
+ audioClass: String,
18922
+ fileClass: String,
18923
+ compressOptions: {
18924
+ type: Object,
18925
+ default: () => {
18926
+ return {
18927
+ compress: false,
18928
+ // 是否开启图片压缩
18929
+ width: 0,
18930
+ // 图片缩放最大宽度,为0默认源图片宽度
18931
+ height: 0,
18932
+ // 图片缩放最大高度,为0默认源图片高度
18933
+ filetype: "image/jpeg",
18934
+ // 文件类型
18935
+ encoderOptions: 0.92
18936
+ // 在指定图片格式为 image/jpeg 或 image/webp的情况下,可以从 0 到 1 的区间内选择图片的质量。如果超出取值范围,使用默认值 0.92
18937
+ };
18938
+ }
18939
+ },
18940
+ showMessage: Boolean,
18941
+ gallery: Boolean
18942
+ };
18943
+
18944
+ /** @jsxImportSource vue */
18945
+
18946
+ const COMPONENT_NAME$1 = 'vc-steps';
18947
+ const ImageItem = /* @__PURE__ */ defineComponent({
18948
+ name: COMPONENT_NAME$1,
18949
+ props: {
18950
+ imageClass: [String, Object, Array],
18951
+ disabled: Boolean,
18952
+ row: Object,
18953
+ imagePreviewOptions: {
18954
+ type: Object,
18955
+ default: () => ({})
18956
+ },
18957
+ index: [String, Number],
18958
+ data: {
18959
+ type: Array,
18960
+ default: () => []
18961
+ },
18962
+ keyValue: Object
18963
+ },
18964
+ emits: ['open', 'close', 'delete'],
18965
+ setup(props, {
18966
+ slots,
18967
+ emit
18968
+ }) {
18969
+ const instance = getCurrentInstance();
18970
+ const current = computed(() => {
18971
+ if (props.row?.status === 0) return -1;
18972
+ const v = props.data.filter(i => i.status !== 0);
18973
+ return v.findIndex(i => {
18974
+ const a = i[props.keyValue.value] || i;
18975
+ const b = props.row?.[props.keyValue.value] || props.row;
18976
+ return a === b;
18977
+ });
18978
+ });
18979
+ // 拿到可预览的图片,供预览组件使用
18980
+ const getPreviewData = () => {
18981
+ return props.data.map(i => i?.[props.keyValue.value]);
18982
+ };
18983
+ const previewByPS = (e, index) => {
18984
+ emit('open');
18985
+ ImagePreview.open({
18986
+ current: index,
18987
+ data: getPreviewData(),
18988
+ onClose: () => emit('close')
18989
+ });
18990
+ };
18991
+ const handlePreview = e => {
18992
+ /**
18993
+ * 渐进增强
18994
+ */
18995
+ let {
18996
+ enhancer
18997
+ } = VcInstance.options.ImagePreview || {};
18998
+ enhancer = props.imagePreviewOptions.enhancer || enhancer || (() => false);
18999
+ const images = getPreviewData().map(item => ({
19000
+ src: item
19001
+ }));
19002
+ enhancer(current.value, images, instance) || previewByPS(e, current.value);
19003
+ };
19004
+ const handleDel = () => {
19005
+ emit('delete');
19006
+ };
19007
+ return () => {
19008
+ const row = props.row;
19009
+ return createVNode("div", {
19010
+ "class": [{
19011
+ 'is-error': row.status == 0
19012
+ }, 'vc-upload-image-item']
19013
+ }, [slots.default ? slots.default({
19014
+ it: row,
19015
+ current: current.value
19016
+ }) : createVNode(Fragment$1, null, [!row.errorFlag && typeof row[props.keyValue.value] === 'string' ? createVNode(Image$1, {
19017
+ "src": row[props.keyValue.value],
19018
+ "class": [props.imageClass, 'vc-upload-image-item__content'],
19019
+ "fit": "cover",
19020
+ "previewable": false,
19021
+ "onClick": handlePreview
19022
+ }, null) : createVNode("div", {
19023
+ "class": [props.imageClass, 'vc-upload-image-item__content']
19024
+ }, [row.percent && row.percent != 100 ? createVNode(Progress, {
19025
+ "percent": row.percent,
19026
+ "show-text": false,
19027
+ "status": "normal",
19028
+ "style": "width: 100%;padding: 0 5px"
19029
+ }, null) : !row[props.keyValue.value] && row.percent === 100 && !row.errorFlag ? createVNode("p", {
19030
+ "style": "line-height: 1; padding: 5px"
19031
+ }, [createTextVNode("\u670D\u52A1\u5668\u6B63\u5728\u63A5\u6536...")]) : row.status == 0 ? createVNode("div", {
19032
+ "style": "padding: 5px"
19033
+ }, [createTextVNode("\u4E0A\u4F20\u5931\u8D25")]) : null]), (!props.disabled || row.errorFlag) && createVNode(Icon, {
19034
+ "type": "close-small",
19035
+ "class": "vc-upload-picker__delete",
19036
+ "onClick": handleDel
19037
+ }, null)])]);
19038
+ };
18749
19039
  }
19040
+ });
19041
+
19042
+ const recognizer = (url) => {
19043
+ const reg = /\.(jpe?g|png|gif|bmp|webp|image|heic|mp4|mov|avi|mpg|mpeg|rmvb)/ig;
19044
+ const result = url.match(reg);
19045
+ return result && result.length ? /.(jpe?g|png|gif|bmp|webp|image|heic)/ig.test(result[result.length - 1]) ? "image" : "video" : "file";
19046
+ };
19047
+ const FILE_ACCEPT_MAP = {
19048
+ DOC_ACCEPTS: ".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
19049
+ EXCEL_ACCEPTS: ".csv,.xls,.xlsx,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19050
+ PPT_ACCEPTS: ".ppt,.pptx,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation",
19051
+ PDF_ACCEPTS: ".pdf,application/pdf",
19052
+ TXT_ACCEPTS: "text/plain",
19053
+ HTML_ACCEPTS: "text/html"
19054
+ };
19055
+
19056
+ const {
19057
+ DOC_ACCEPTS,
19058
+ EXCEL_ACCEPTS,
19059
+ PPT_ACCEPTS,
19060
+ PDF_ACCEPTS,
19061
+ TXT_ACCEPTS,
19062
+ HTML_ACCEPTS
19063
+ } = FILE_ACCEPT_MAP;
19064
+ const usePicker = (expose) => {
19065
+ const instance = getCurrentInstance();
19066
+ const props = instance.props;
19067
+ const { emit } = instance;
19068
+ const formItem = inject("vc-form-item", {});
19069
+ const allowKeepString = computed(() => {
19070
+ return typeof props.modelValue === "string";
19071
+ });
19072
+ const allowKeepObject = computed(() => {
19073
+ const v = props.modelValue;
19074
+ return props.output === "object" && props.max === 1 && !Array.isArray(v) && typeof v === "object";
19075
+ });
19076
+ const currentValue = ref({
19077
+ image: [],
19078
+ video: [],
19079
+ audio: [],
19080
+ file: []
19081
+ });
19082
+ const currentUploadOptions = ref({
19083
+ image: {
19084
+ accept: "image/gif,image/jpeg,image/jpg,image/png",
19085
+ ...props.uploadOptions.image || {}
19086
+ },
19087
+ video: {
19088
+ accept: "video/*",
19089
+ ...props.uploadOptions.video || {}
19090
+ },
19091
+ audio: {
19092
+ accept: "audio/*",
19093
+ ...props.uploadOptions.audio || {}
19094
+ },
19095
+ file: {
19096
+ accept: `${DOC_ACCEPTS},${EXCEL_ACCEPTS},${PPT_ACCEPTS},${PDF_ACCEPTS},${TXT_ACCEPTS},${HTML_ACCEPTS}`,
19097
+ ...props.uploadOptions.file || {}
19098
+ }
19099
+ });
19100
+ const dynamicMax = computed(() => {
19101
+ const image = currentValue.value.image || [];
19102
+ const video = currentValue.value.video || [];
19103
+ const audio = currentValue.value.audio || [];
19104
+ const file = currentValue.value.file || [];
19105
+ const imageCount = image.length || 0;
19106
+ const videoCount = video.length || 0;
19107
+ const audioCount = audio.length || 0;
19108
+ const fileCount = file.length || 0;
19109
+ if (typeof props.max === "number") {
19110
+ const curNum = imageCount + videoCount + audioCount + fileCount;
19111
+ const leftNum = props.max - curNum;
19112
+ return {
19113
+ image: leftNum,
19114
+ video: leftNum,
19115
+ audio: leftNum,
19116
+ file: leftNum
19117
+ };
19118
+ } else if (typeof props.max === "object") {
19119
+ const {
19120
+ image: $image,
19121
+ video: $video,
19122
+ audio: $audio,
19123
+ file: $file
19124
+ } = props.max;
19125
+ const max = {};
19126
+ $image && (max.image = $image - imageCount);
19127
+ $video && (max.video = $video - videoCount);
19128
+ $audio && (max.audio = $audio - audioCount);
19129
+ $file && (max.file = $file - fileCount);
19130
+ return max;
19131
+ }
19132
+ return {};
19133
+ });
19134
+ const sync = () => {
19135
+ let v = props.picker.reduce((pre, cur) => pre.concat(currentValue.value[cur] || []), []).filter((i) => !i.errorFlag).map((i) => {
19136
+ if (props.output === "string") return i[props.keyValue.value];
19137
+ if (typeof props.output === "function") return props.output(i) || i;
19138
+ return i;
19139
+ });
19140
+ if (allowKeepString.value) {
19141
+ v = v.map((i) => i[props.keyValue.value] || i).join(",");
19142
+ } else if (allowKeepObject.value) {
19143
+ v = v[0] || null;
19144
+ }
19145
+ emit("update:modelValue", v);
19146
+ emit("change", v);
19147
+ formItem.change?.(v);
19148
+ };
19149
+ const handleFileBefore = async (vFile, fileList, type) => {
19150
+ if (props?.compressOptions?.compress && type === "image") ;
19151
+ const onFileBefore = instance.vnode.props?.onFileBefore || (() => {
19152
+ });
19153
+ return await onFileBefore(vFile, fileList, type) || vFile;
19154
+ };
19155
+ const handleFileStart = (vFile, type) => {
19156
+ currentValue.value[type].push(vFile);
19157
+ emit("file-start", vFile, type);
19158
+ };
19159
+ const handleFileProgress = (e, vFile, type) => {
19160
+ if (parseInt(e.percent, 10) <= 100) {
19161
+ currentValue.value[type] = currentValue.value[type].map((item) => {
19162
+ if (vFile.uploadId === item.uploadId) {
19163
+ return {
19164
+ ...item,
19165
+ percent: e.percent
19166
+ };
19167
+ }
19168
+ return item;
19169
+ });
19170
+ }
19171
+ };
19172
+ const handleFileSuccess = (response, vFile, cycle, type) => {
19173
+ currentValue.value[type] = currentValue.value[type].map((item) => {
19174
+ if (item.uploadId === vFile.uploadId) {
19175
+ return {
19176
+ type,
19177
+ [props.keyValue.label]: vFile.name,
19178
+ // 外部需要满足response中带source
19179
+ [props.keyValue.value]: response.source
19180
+ };
19181
+ }
19182
+ return item;
19183
+ });
19184
+ emit("file-success", response, vFile, cycle, type);
19185
+ };
19186
+ const handleError = (err, type) => {
19187
+ props.showMessage && err.message && Message.error(err.message);
19188
+ emit("error", err, type);
19189
+ };
19190
+ const handleFileError = (response, vFile, cycle, type) => {
19191
+ currentValue.value[type] = currentValue.value[type].map((item) => {
19192
+ if (item.uploadId === vFile.uploadId) {
19193
+ return {
19194
+ ...item,
19195
+ ...response,
19196
+ // 文件基础信息
19197
+ type,
19198
+ [props.keyValue.label]: vFile.name,
19199
+ errorFlag: (/* @__PURE__ */ new Date()).getTime()
19200
+ };
19201
+ }
19202
+ return item;
19203
+ });
19204
+ emit("file-error", response, vFile, cycle, type);
19205
+ };
19206
+ const handleFileComplete = (response, type) => {
19207
+ sync();
19208
+ emit("complete", response, type);
19209
+ };
19210
+ const handleDelete = async (index, type) => {
19211
+ const onRemoveBefore = instance.vnode.props?.onRemoveBefore || (() => {
19212
+ });
19213
+ await onRemoveBefore(index, type);
19214
+ const target = currentValue.value[type];
19215
+ const item = target[index];
19216
+ if (!item) {
19217
+ console.error("【vc-upload-picker】: 没有找到要删除的元素");
19218
+ return;
19219
+ }
19220
+ if (item.errorFlag) {
19221
+ currentValue.value[type] = target.filter(
19222
+ (it) => it.uploadId != item.uploadId
19223
+ );
19224
+ return;
19225
+ }
19226
+ target.splice(index, 1);
19227
+ sync();
19228
+ };
19229
+ const parseModelValue = (v) => {
19230
+ const initialData = { image: [], video: [], audio: [], file: [] };
19231
+ if (allowKeepString.value) {
19232
+ v = (props.max === 1 ? [v] : v.split(",")).filter((i) => !!i);
19233
+ } else if (allowKeepObject.value) {
19234
+ v = [v].filter((i) => i && !!i[props.keyValue.value]);
19235
+ }
19236
+ if (!Array.isArray(v) || !v.length) return initialData;
19237
+ return v.reduce((pre, cur) => {
19238
+ const value = cur[props.keyValue.value] || (typeof cur === "object" ? "" : cur);
19239
+ const label = cur[props.keyValue.label] || value.replace(/^.*\/([^/]+)$/, "$1");
19240
+ const type = cur.type || (props.picker.length === 1 ? props.picker[0] : recognizer(value));
19241
+ switch (type) {
19242
+ case "image":
19243
+ case "video":
19244
+ case "audio":
19245
+ case "file":
19246
+ pre[type].push({
19247
+ // 文件类型
19248
+ type,
19249
+ // 文件名
19250
+ [props.keyValue.label]: label,
19251
+ // 源文件地址
19252
+ [props.keyValue.value]: value,
19253
+ // 上传进度
19254
+ percent: null,
19255
+ // 错误标记
19256
+ errorFlag: false
19257
+ });
19258
+ return pre;
19259
+ default:
19260
+ return pre;
19261
+ }
19262
+ }, initialData);
19263
+ };
19264
+ watch(
19265
+ () => props.modelValue,
19266
+ (v) => {
19267
+ currentValue.value = parseModelValue(v);
19268
+ },
19269
+ { immediate: true }
19270
+ );
19271
+ expose();
19272
+ return {
19273
+ currentValue,
19274
+ currentUploadOptions,
19275
+ dynamicMax,
19276
+ handleDelete,
19277
+ handleFileBefore,
19278
+ handleFileStart,
19279
+ handleFileProgress,
19280
+ handleFileSuccess,
19281
+ handleFileError,
19282
+ handleError,
19283
+ handleFileComplete
19284
+ };
18750
19285
  };
18751
19286
 
18752
19287
  /** @jsxImportSource vue */
@@ -18755,17 +19290,115 @@ const COMPONENT_NAME = 'vc-upload-picker';
18755
19290
  const UploadPicker = /* @__PURE__ */ defineComponent({
18756
19291
  name: COMPONENT_NAME,
18757
19292
  props: props,
19293
+ emits: ['update:modelValue', 'file-success', 'file-start', 'file-before', 'file-error', 'success', 'error', 'complete', 'change', 'remove-before'],
18758
19294
  setup(props, {
18759
- slots
19295
+ slots,
19296
+ expose
18760
19297
  }) {
19298
+ const instance = getCurrentInstance();
19299
+ const currentPicker = computed(() => {
19300
+ return props.picker.reduce((pre, cur) => {
19301
+ switch (cur) {
19302
+ case 'image':
19303
+ pre.push({
19304
+ type: cur,
19305
+ item: ImageItem
19306
+ });
19307
+ return pre;
19308
+ case 'video':
19309
+ pre.push({
19310
+ type: cur,
19311
+ item: 'div'
19312
+ // item: VideoItem
19313
+ });
19314
+ return pre;
19315
+ case 'audio':
19316
+ pre.push({
19317
+ type: cur,
19318
+ item: 'div'
19319
+ // item: AudioItem
19320
+ });
19321
+ return pre;
19322
+ case 'file':
19323
+ pre.push({
19324
+ type: cur,
19325
+ item: 'div'
19326
+ // item: FileItem
19327
+ });
19328
+ return pre;
19329
+ default:
19330
+ return pre;
19331
+ }
19332
+ }, []);
19333
+ });
19334
+ const handleClick = (e, type) => {
19335
+ const options = VcInstance.options.UploadPicker || {};
19336
+ if (typeof props.gallery === 'function' || props.gallery && options.gallery) {
19337
+ const fn = typeof props.gallery === 'function' ? props.gallery : options.gallery;
19338
+
19339
+ // 阻止原生事件,如video, file不走gallery, 可以跳过;
19340
+ fn(instance, type) && e.stopPropagation();
19341
+ }
19342
+ };
19343
+ const base = usePicker(expose);
18761
19344
  return () => {
18762
19345
  return createVNode("div", {
18763
19346
  "class": "vc-upload-picker"
18764
- }, [slots?.default?.()]);
19347
+ }, [currentPicker.value.map((picker, $index) => {
19348
+ return createVNode(Fragment$1, {
19349
+ "key": `${picker}-${$index}`
19350
+ }, [base.currentValue.value[picker.type].map((item, index) => {
19351
+ const Item = picker.item;
19352
+ return createVNode(Item, {
19353
+ "key": typeof item === 'object' ? item.uid : item,
19354
+ "row": item,
19355
+ "disabled": props.disabled,
19356
+ "image-preview-options": props.imagePreviewOptions,
19357
+ "imageClass": props.imageClass,
19358
+ "videoClass": props.videoClass,
19359
+ "audioClass": props.audioClass,
19360
+ "fileClass": props.fileClass,
19361
+ "index": index,
19362
+ "keyValue": props.keyValue,
19363
+ "data": base.currentValue.value[picker.type],
19364
+ "class": "vc-upload-picker__item",
19365
+ "onDelete": () => base.handleDelete(index, picker.type)
19366
+ }, {
19367
+ default: slots.default ? scopeData => {
19368
+ return slots?.default?.({
19369
+ it: scopeData?.it,
19370
+ current: scopeData?.current,
19371
+ index,
19372
+ name: picker.type
19373
+ });
19374
+ } : null
19375
+ });
19376
+ }), withDirectives(createVNode(Upload, mergeProps(base.currentUploadOptions.value[picker.type], {
19377
+ "max": base.dynamicMax[picker.type],
19378
+ "class": "vc-upload-picker__upload",
19379
+ "onFileBefore": (vFile, fileList) => base.handleFileBefore(vFile, fileList, picker.type),
19380
+ "onFileStart": vFile => base.handleFileStart(vFile, picker.type),
19381
+ "onFileProgress": (e, vFile) => base.handleFileProgress(e, vFile, picker.type),
19382
+ "onFileSuccess": (response, vFile, cycle) => base.handleFileSuccess(response, vFile, cycle, picker.type),
19383
+ "onFileError": (response, vFile, cycle) => base.handleFileError(response, vFile, cycle, picker.type),
19384
+ "onError": e => base.handleError(e, picker.type),
19385
+ "onComplete": response => base.handleFileComplete(response, picker.type)
19386
+ }), {
19387
+ default: () => [slots?.[`${picker.type}-upload`] ? slots[`${picker.type}-upload`]?.() : createVNode("div", {
19388
+ "class": [props.boxClass, 'vc-upload-picker__box'],
19389
+ "onClick": e => handleClick(e, picker.type)
19390
+ }, [createVNode(Icon, {
19391
+ "type": "mini-plus",
19392
+ "class": "vc-upload-picker__plus-icon"
19393
+ }, null), createVNode("span", {
19394
+ "style": "margin-top: 8px"
19395
+ }, [createTextVNode("\u4E0A\u4F20")])])]
19396
+ }), [[vShow, !props.disabled && base.dynamicMax.value[picker.type] >= 1]])]);
19397
+ })]);
18765
19398
  };
18766
19399
  }
18767
19400
  });
18768
19401
 
18769
19402
  const MUploadPicker = UploadPicker;
18770
19403
 
18771
- export { ActionSheet, Alert, Artboard, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Chart, Checkbox, CheckboxGroup, Clipboard, Collapse, CollapseItem, ColorPicker, Countdown, Customer, DatePicker, Debounce, Divider, Drawer, DrawerView, Dropdown, Editor, Expand$1 as Expand, Form, FormItem, Fragment, HTMLToImage, Icon, IconManager, Image, ImageCrop, ImagePreview, ImageProcessing, Input, InputNumber, InputSearch, MList as List, MListItem as ListItem, MActionSheet, MAlert, MArtboard, MButton, MButtonGroup, MCalendar, MCard, MCarousel, MCascader, MChart, MCheckbox, MCheckboxGroup, MClipboard, MCollapse, MCollapseItem, MColorPicker, MCountdown, MCustomer, MDatePicker, Debounce as MDebounce, MDivider, MDrawer, MDrawerView, MDropdown, MEditor, MExpand, MForm, MFormItem, MFragment, MHTMLToImage, MIcon, MImage, MImageCrop, MImagePreview, MImageProcessing, MInput, MInputNumber, MInputSearch, MList, MListItem, MMarquee, MMessage, modal as MModal, MModalView, MNotice, MOption, MPagination, MPicker, MPopconfirm, MPopover, MPopup, MPortal, MPrint, MProgress, MRadio, MRadioGroup, MRate, MRecycleList, MResizer, MScroller, MSelect, MSlider, MSortList, MSpin, MSteps, MSwitch, MTable, MTableColumn, MTabs, MTabsPane, MTag, MText, MTextarea, MTimePicker, MTimeline, MToast, MToastView, MTouch, MTransition, MTransitionCollapse, MTransitionFade, MTransitionScale, MTransitionSlide, MTransitionZoom, MTree, MUpload, MUploadPicker, Marquee, Message, MessageView, Modal, ModalView, Notice, NoticeView, Option$1 as Option, Pagination, Picker, Popconfirm, Popover, Popup, Portal, PortalView, Print, Progress, Radio, RadioGroup, Rate, RecycleList, Resizer, Scroller, ScrollerWheel, Select, Slider, SortList, Spin, Steps, Switch, Table, TableColumn, Tabs, TabsPane, Tag, Text, Textarea, Theme, ThemeImage, ThemeText, ThemeView, TimePicker, Timeline, Toast, ToastView, Touch, Transition, TransitionCollapse, TransitionFade, TransitionScale, TransitionSlide, TransitionZoom, Tree, Upload, UploadPicker, VcError, VcInstance };
19404
+ export { ActionSheet, Alert, Artboard, Button, ButtonGroup, Calendar, Card, Carousel, Cascader, Chart, Checkbox, CheckboxGroup, Clipboard, Collapse, CollapseItem, ColorPicker, Countdown, Customer, DatePicker, Debounce, Divider, Drawer, DrawerView, Dropdown, Editor, Expand$1 as Expand, Form, FormItem, Fragment, HTMLToImage, Icon, IconManager, Image$1 as Image, ImageCrop, ImagePreview, ImageProcessing, Input, InputNumber, InputSearch, MList as List, MListItem as ListItem, MActionSheet, MAlert, MArtboard, MButton, MButtonGroup, MCalendar, MCard, MCarousel, MCascader, MChart, MCheckbox, MCheckboxGroup, MClipboard, MCollapse, MCollapseItem, MColorPicker, MCountdown, MCustomer, MDatePicker, Debounce as MDebounce, MDivider, MDrawer, MDrawerView, MDropdown, MEditor, MExpand, MForm, MFormItem, MFragment, MHTMLToImage, MIcon, MImage, MImageCrop, MImagePreview, MImageProcessing, MInput, MInputNumber, MInputSearch, MList, MListItem, MMarquee, MMessage, modal as MModal, MModalView, MNotice, MOption, MPagination, MPicker, MPopconfirm, MPopover, MPopup, MPortal, MPrint, MProgress, MRadio, MRadioGroup, MRate, MRecycleList, MResizer, MScroller, MSelect, MSlider, MSortList, MSpin, MSteps, MSwitch, MTable, MTableColumn, MTabs, MTabsPane, MTag, MText, MTextarea, MTimePicker, MTimeline, MToast, MToastView, MTouch, MTransition, MTransitionCollapse, MTransitionFade, MTransitionScale, MTransitionSlide, MTransitionZoom, MTree, MUpload, MUploadPicker, Marquee, Message, MessageView, Modal, ModalView, Notice, NoticeView, Option$1 as Option, Pagination, Picker, Popconfirm, Popover, Popup, Portal, PortalView, Print, Progress, Radio, RadioGroup, Rate, RecycleList, Resizer, Scroller, ScrollerWheel, Select, Slider, SortList, Spin, Steps, Switch, Table, TableColumn, Tabs, TabsPane, Tag, Text, Textarea, Theme, ThemeImage, ThemeText, ThemeView, TimePicker, Timeline, Toast, ToastView, Touch, Transition, TransitionCollapse, TransitionFade, TransitionScale, TransitionSlide, TransitionZoom, Tree, Upload, UploadPicker, VcError, VcInstance };