@deot/vc-components 1.0.63 → 1.0.64

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.
@@ -77,7 +77,7 @@
77
77
  }
78
78
  const VcInstance = new Instance();
79
79
 
80
- const props$1u = {
80
+ const props$1v = {
81
81
  tag: {
82
82
  type: String,
83
83
  default: "div"
@@ -86,10 +86,10 @@
86
86
 
87
87
  /** @jsxImportSource vue */
88
88
 
89
- const COMPONENT_NAME$2b = 'vc-action-sheet';
89
+ const COMPONENT_NAME$2g = 'vc-action-sheet';
90
90
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
91
- name: COMPONENT_NAME$2b,
92
- props: props$1u,
91
+ name: COMPONENT_NAME$2g,
92
+ props: props$1v,
93
93
  setup(props, {
94
94
  slots
95
95
  }) {
@@ -103,7 +103,7 @@
103
103
 
104
104
  const MActionSheet = ActionSheet;
105
105
 
106
- const props$1t = {
106
+ const props$1u = {
107
107
  modelValue: {
108
108
  type: Boolean,
109
109
  default: false
@@ -381,11 +381,11 @@
381
381
 
382
382
  /** @jsxImportSource vue */
383
383
 
384
- const COMPONENT_NAME$2a = 'vc-affix';
384
+ const COMPONENT_NAME$2f = 'vc-affix';
385
385
  const Affix = /* @__PURE__ */ vue.defineComponent({
386
- name: COMPONENT_NAME$2a,
386
+ name: COMPONENT_NAME$2f,
387
387
  emits: ['update:modelValue'],
388
- props: props$1t,
388
+ props: props$1u,
389
389
  setup(props, {
390
390
  slots,
391
391
  expose,
@@ -551,7 +551,7 @@
551
551
 
552
552
  const MAffix = Affix;
553
553
 
554
- const props$1s = {
554
+ const props$1t = {
555
555
  modelValue: {
556
556
  type: Boolean,
557
557
  default: true
@@ -578,7 +578,7 @@
578
578
  }
579
579
  };
580
580
 
581
- const props$1r = {
581
+ const props$1s = {
582
582
  type: String,
583
583
  inherit: {
584
584
  type: Boolean,
@@ -715,10 +715,10 @@
715
715
 
716
716
  /** @jsxImportSource vue */
717
717
 
718
- const COMPONENT_NAME$29 = 'vc-icon';
718
+ const COMPONENT_NAME$2e = 'vc-icon';
719
719
  const Icon = /* @__PURE__ */ vue.defineComponent({
720
- name: COMPONENT_NAME$29,
721
- props: props$1r,
720
+ name: COMPONENT_NAME$2e,
721
+ props: props$1s,
722
722
  setup(props) {
723
723
  const viewBox = vue.ref('0 0 1024 1024');
724
724
  const path = vue.ref([]);
@@ -751,7 +751,7 @@
751
751
  }
752
752
  });
753
753
 
754
- const props$1q = {
754
+ const props$1r = {
755
755
  /**
756
756
  * 进入/离开持续时间
757
757
  * {enter: 300, leave: 300}
@@ -916,10 +916,10 @@
916
916
  };
917
917
  };
918
918
 
919
- const COMPONENT_NAME$28 = "vc-transition";
919
+ const COMPONENT_NAME$2d = "vc-transition";
920
920
  const Transition = vue.defineComponent({
921
- name: COMPONENT_NAME$28,
922
- props: props$1q,
921
+ name: COMPONENT_NAME$2d,
922
+ props: props$1r,
923
923
  // 当不声明emits的情况下,事件存在于attrs中
924
924
  inheritAttrs: false,
925
925
  setup(props, { slots, attrs }) {
@@ -939,10 +939,10 @@
939
939
  }
940
940
  });
941
941
 
942
- const COMPONENT_NAME$27 = "vc-transition-collapse";
942
+ const COMPONENT_NAME$2c = "vc-transition-collapse";
943
943
  const TransitionCollapse = vue.defineComponent({
944
- name: COMPONENT_NAME$27,
945
- props: props$1q,
944
+ name: COMPONENT_NAME$2c,
945
+ props: props$1r,
946
946
  // 当不声明emits的情况下,事件存在于attrs中
947
947
  inheritAttrs: false,
948
948
  setup(props, { slots, attrs: _attrs }) {
@@ -1056,11 +1056,11 @@
1056
1056
  }
1057
1057
  });
1058
1058
 
1059
- const COMPONENT_NAME$26 = "vc-transition-fade";
1059
+ const COMPONENT_NAME$2b = "vc-transition-fade";
1060
1060
  const TransitionFade = vue.defineComponent({
1061
- name: COMPONENT_NAME$26,
1061
+ name: COMPONENT_NAME$2b,
1062
1062
  props: {
1063
- ...props$1q,
1063
+ ...props$1r,
1064
1064
  // inheritAttrs必须是false
1065
1065
  style: {
1066
1066
  type: Object,
@@ -1093,11 +1093,11 @@
1093
1093
  }
1094
1094
  });
1095
1095
 
1096
- const COMPONENT_NAME$25 = "vc-transition-scale";
1096
+ const COMPONENT_NAME$2a = "vc-transition-scale";
1097
1097
  const TransitionScale = vue.defineComponent({
1098
- name: COMPONENT_NAME$25,
1098
+ name: COMPONENT_NAME$2a,
1099
1099
  props: {
1100
- ...props$1q,
1100
+ ...props$1r,
1101
1101
  mode: {
1102
1102
  type: String,
1103
1103
  default: "both",
@@ -1135,11 +1135,11 @@
1135
1135
  }
1136
1136
  });
1137
1137
 
1138
- const COMPONENT_NAME$24 = "vc-transition-slide";
1138
+ const COMPONENT_NAME$29 = "vc-transition-slide";
1139
1139
  const TransitionSlide = vue.defineComponent({
1140
- name: COMPONENT_NAME$24,
1140
+ name: COMPONENT_NAME$29,
1141
1141
  props: {
1142
- ...props$1q,
1142
+ ...props$1r,
1143
1143
  mode: {
1144
1144
  type: String,
1145
1145
  default: "left",
@@ -1177,11 +1177,11 @@
1177
1177
  }
1178
1178
  });
1179
1179
 
1180
- const COMPONENT_NAME$23 = "vc-transition-zoom";
1180
+ const COMPONENT_NAME$28 = "vc-transition-zoom";
1181
1181
  const TransitionZoom = vue.defineComponent({
1182
- name: COMPONENT_NAME$23,
1182
+ name: COMPONENT_NAME$28,
1183
1183
  props: {
1184
- ...props$1q,
1184
+ ...props$1r,
1185
1185
  mode: {
1186
1186
  type: String,
1187
1187
  default: "x",
@@ -1221,7 +1221,7 @@
1221
1221
 
1222
1222
  /** @jsxImportSource vue */
1223
1223
 
1224
- const COMPONENT_NAME$22 = 'vc-alert';
1224
+ const COMPONENT_NAME$27 = 'vc-alert';
1225
1225
 
1226
1226
  // [color, borderColor, backgroundColor], -> CSS
1227
1227
  const THEME_MAP = {
@@ -1231,8 +1231,8 @@
1231
1231
  warning: ['#ffbf00', '#ffe58f', '#fffbe6']
1232
1232
  };
1233
1233
  const Alert = /* @__PURE__ */ vue.defineComponent({
1234
- name: COMPONENT_NAME$22,
1235
- props: props$1s,
1234
+ name: COMPONENT_NAME$27,
1235
+ props: props$1t,
1236
1236
  setup(props, {
1237
1237
  slots,
1238
1238
  emit
@@ -1447,7 +1447,7 @@
1447
1447
  return flatten$1(value, JSON.parse);
1448
1448
  };
1449
1449
 
1450
- const props$1p = {
1450
+ const props$1q = {
1451
1451
  // canvas配置参数
1452
1452
  options: Object,
1453
1453
  width: {
@@ -1463,10 +1463,10 @@
1463
1463
  /** @jsxImportSource vue */
1464
1464
 
1465
1465
  const isTouch = typeof document !== 'undefined' && 'ontouchend' in document;
1466
- const COMPONENT_NAME$21 = 'vc-artboard';
1466
+ const COMPONENT_NAME$26 = 'vc-artboard';
1467
1467
  const Artboard = /* @__PURE__ */ vue.defineComponent({
1468
- name: COMPONENT_NAME$21,
1469
- props: props$1p,
1468
+ name: COMPONENT_NAME$26,
1469
+ props: props$1q,
1470
1470
  setup(props, {
1471
1471
  emit,
1472
1472
  expose
@@ -1669,7 +1669,7 @@
1669
1669
 
1670
1670
  const MArtboard = Artboard;
1671
1671
 
1672
- const props$1o = {
1672
+ const props$1p = {
1673
1673
  size: {
1674
1674
  type: Number,
1675
1675
  default: 28
@@ -1693,10 +1693,10 @@
1693
1693
 
1694
1694
  /** @jsxImportSource vue */
1695
1695
 
1696
- const COMPONENT_NAME$20 = 'vc-spin';
1696
+ const COMPONENT_NAME$25 = 'vc-spin';
1697
1697
  const Spin = /* @__PURE__ */ vue.defineComponent({
1698
- name: COMPONENT_NAME$20,
1699
- props: props$1o,
1698
+ name: COMPONENT_NAME$25,
1699
+ props: props$1p,
1700
1700
  setup(props, {
1701
1701
  slots
1702
1702
  }) {
@@ -6768,7 +6768,7 @@
6768
6768
  });
6769
6769
  }
6770
6770
 
6771
- const props$1n = {
6771
+ const props$1o = {
6772
6772
  wait: {
6773
6773
  type: Number,
6774
6774
  default: 250
@@ -6784,10 +6784,10 @@
6784
6784
  exclude: RegExp
6785
6785
  };
6786
6786
 
6787
- const COMPONENT_NAME$1$ = "vc-debounce";
6787
+ const COMPONENT_NAME$24 = "vc-debounce";
6788
6788
  const Debounce = vue.defineComponent({
6789
- name: COMPONENT_NAME$1$,
6790
- props: props$1n,
6789
+ name: COMPONENT_NAME$24,
6790
+ props: props$1o,
6791
6791
  /**
6792
6792
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
6793
6793
  * 如事件onClick
@@ -6827,7 +6827,7 @@
6827
6827
  }
6828
6828
  });
6829
6829
 
6830
- const props$1m = {
6830
+ const props$1n = {
6831
6831
  tag: {
6832
6832
  type: String,
6833
6833
  default: "button"
@@ -6859,11 +6859,11 @@
6859
6859
 
6860
6860
  /** @jsxImportSource vue */
6861
6861
 
6862
- const COMPONENT_NAME$1_ = 'vc-button';
6862
+ const COMPONENT_NAME$23 = 'vc-button';
6863
6863
  const Button = /* @__PURE__ */ vue.defineComponent({
6864
- name: COMPONENT_NAME$1_,
6864
+ name: COMPONENT_NAME$23,
6865
6865
  emits: ['click'],
6866
- props: props$1m,
6866
+ props: props$1n,
6867
6867
  setup(props, {
6868
6868
  slots
6869
6869
  }) {
@@ -6924,7 +6924,7 @@
6924
6924
  }
6925
6925
  });
6926
6926
 
6927
- const props$1l = {
6927
+ const props$1m = {
6928
6928
  vertical: {
6929
6929
  type: Boolean,
6930
6930
  default: false
@@ -6945,10 +6945,10 @@
6945
6945
 
6946
6946
  /** @jsxImportSource vue */
6947
6947
 
6948
- const COMPONENT_NAME$1Z = 'vc-button-group';
6948
+ const COMPONENT_NAME$22 = 'vc-button-group';
6949
6949
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
6950
- name: COMPONENT_NAME$1Z,
6951
- props: props$1l,
6950
+ name: COMPONENT_NAME$22,
6951
+ props: props$1m,
6952
6952
  setup(props, {
6953
6953
  slots
6954
6954
  }) {
@@ -6972,7 +6972,7 @@
6972
6972
  const MButton = Button;
6973
6973
  const MButtonGroup = ButtonGroup;
6974
6974
 
6975
- const props$1k = {
6975
+ const props$1l = {
6976
6976
  tag: {
6977
6977
  type: String,
6978
6978
  default: "div"
@@ -6981,10 +6981,10 @@
6981
6981
 
6982
6982
  /** @jsxImportSource vue */
6983
6983
 
6984
- const COMPONENT_NAME$1Y = 'vc-calendar';
6984
+ const COMPONENT_NAME$21 = 'vc-calendar';
6985
6985
  const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
6986
- name: COMPONENT_NAME$1Y,
6987
- props: props$1k,
6986
+ name: COMPONENT_NAME$21,
6987
+ props: props$1l,
6988
6988
  setup(props, {
6989
6989
  slots
6990
6990
  }) {
@@ -6998,7 +6998,7 @@
6998
6998
 
6999
6999
  const MCalendar = Calendar$1;
7000
7000
 
7001
- const props$1j = {
7001
+ const props$1k = {
7002
7002
  border: {
7003
7003
  type: Boolean,
7004
7004
  default: true
@@ -7021,10 +7021,10 @@
7021
7021
 
7022
7022
  /** @jsxImportSource vue */
7023
7023
 
7024
- const COMPONENT_NAME$1X = 'vc-card';
7024
+ const COMPONENT_NAME$20 = 'vc-card';
7025
7025
  const Card = /* @__PURE__ */ vue.defineComponent({
7026
- name: COMPONENT_NAME$1X,
7027
- props: props$1j,
7026
+ name: COMPONENT_NAME$20,
7027
+ props: props$1k,
7028
7028
  setup(props, {
7029
7029
  slots
7030
7030
  }) {
@@ -7050,31 +7050,776 @@
7050
7050
 
7051
7051
  const MCard = Card;
7052
7052
 
7053
- const props$1i = {
7054
- tag: {
7053
+ class Resize {
7054
+ el;
7055
+ static of(el) {
7056
+ return new Resize(el);
7057
+ }
7058
+ /**
7059
+ * Resize.of(el, fn);
7060
+ * @param el ~
7061
+ * @param fn ~
7062
+ * @returns off
7063
+ */
7064
+ static on(el, fn) {
7065
+ return new Resize(el).on(fn);
7066
+ }
7067
+ /**
7068
+ * 要实现Resize.off(el),el必须侵入式修改挂上__rz__
7069
+ * @param el ~
7070
+ * @param fn ~
7071
+ * @returns ~
7072
+ */
7073
+ static off(el, fn) {
7074
+ return new Resize(el).off(fn);
7075
+ }
7076
+ listeners = [];
7077
+ ro = null;
7078
+ constructor(el) {
7079
+ this.el = el;
7080
+ let rz = el.__rz__;
7081
+ if (rz && rz instanceof Resize) {
7082
+ this.listeners = rz.listeners;
7083
+ this.ro = rz.ro;
7084
+ }
7085
+ }
7086
+ handleResize = (entries) => {
7087
+ /* istanbul ignore else -- @preserve */
7088
+ if (entries.some((i) => i.target === this.el)) {
7089
+ this.listeners?.forEach((fn) => fn());
7090
+ }
7091
+ };
7092
+ on(fn) {
7093
+ if (typeof ResizeObserver === "undefined")
7094
+ return () => {
7095
+ };
7096
+ if (!this.listeners.length) {
7097
+ this.ro = this.ro || new ResizeObserver(this.handleResize);
7098
+ this.ro.observe(this.el);
7099
+ this.el.__rz__ = this;
7100
+ }
7101
+ this.listeners.push(fn);
7102
+ return () => this.off(fn);
7103
+ }
7104
+ off(fn) {
7105
+ if (fn) {
7106
+ this.listeners.splice(this.listeners.indexOf(fn), 1);
7107
+ } else {
7108
+ this.listeners = [];
7109
+ }
7110
+ if (!this.listeners.length && this.ro) {
7111
+ this.ro.disconnect();
7112
+ }
7113
+ }
7114
+ }
7115
+
7116
+ const useCarousel = (wrapper, content, expose) => {
7117
+ const instance = vue.getCurrentInstance();
7118
+ const props = instance.props;
7119
+ const { emit } = instance;
7120
+ const items = vue.ref([]);
7121
+ const activeIndex = vue.ref(-1);
7122
+ const timer = vue.ref(null);
7123
+ const offset = vue.ref(0);
7124
+ const carouselId = vue.ref(getUid("carousel"));
7125
+ const start = vue.ref();
7126
+ const startX = vue.ref();
7127
+ const startY = vue.ref();
7128
+ const allowTransition = vue.ref(false);
7129
+ const direction = vue.computed(() => {
7130
+ return props.vertical ? "vertical" : "horizontal";
7131
+ });
7132
+ const hasLabel = vue.computed(() => {
7133
+ return items.value.some((item) => item.props.label.toString().length > 0);
7134
+ });
7135
+ const dotsClasses = vue.computed(() => {
7136
+ const classes = ["is-" + direction.value];
7137
+ if (hasLabel.value) {
7138
+ classes.push("is-labels");
7139
+ }
7140
+ if (props.dots === "outside" || props.card) {
7141
+ classes.push("is-outside");
7142
+ }
7143
+ return classes;
7144
+ });
7145
+ const resetItems = (oldIndex) => {
7146
+ items.value.forEach((item, index) => {
7147
+ item.exposed?.reset?.(index, activeIndex.value, oldIndex);
7148
+ });
7149
+ };
7150
+ const playSlides = () => {
7151
+ allowTransition.value = true;
7152
+ if (activeIndex.value < items.value.length - 1) {
7153
+ activeIndex.value++;
7154
+ } else if (props.loop) {
7155
+ activeIndex.value = 0;
7156
+ }
7157
+ };
7158
+ const pauseTimer = () => {
7159
+ if (timer.value) {
7160
+ clearInterval(timer.value);
7161
+ timer.value = null;
7162
+ }
7163
+ };
7164
+ const startTimer = () => {
7165
+ if (props.t <= 0 || !props.autoplay || timer.value) return;
7166
+ timer.value = setInterval(playSlides, props.t);
7167
+ };
7168
+ const setActiveItem = (index) => {
7169
+ if (typeof index === "string") {
7170
+ const filteredItems = items.value.filter((item) => item.props.name === index);
7171
+ if (filteredItems.length > 0) {
7172
+ index = items.value.indexOf(filteredItems[0]);
7173
+ }
7174
+ }
7175
+ index = Number(index);
7176
+ if (isNaN(index) || index !== Math.floor(index)) {
7177
+ throw new VcError("carousel", "索引必须是整数");
7178
+ }
7179
+ const length = items.value.length;
7180
+ const oldIndex = activeIndex.value;
7181
+ if (index < 0) {
7182
+ activeIndex.value = props.loop ? length - 1 : 0;
7183
+ } else if (index >= length) {
7184
+ activeIndex.value = props.loop ? 0 : length - 1;
7185
+ } else {
7186
+ activeIndex.value = index;
7187
+ }
7188
+ if (oldIndex === activeIndex.value) {
7189
+ resetItems(oldIndex);
7190
+ }
7191
+ };
7192
+ const prev = () => {
7193
+ setActiveItem(activeIndex.value - 1);
7194
+ };
7195
+ const next = () => {
7196
+ setActiveItem(activeIndex.value + 1);
7197
+ };
7198
+ const handleDotClick = (index) => {
7199
+ activeIndex.value = index;
7200
+ };
7201
+ const handleStart = (e) => {
7202
+ allowTransition.value = true;
7203
+ if (!props.draggable) return;
7204
+ pauseTimer();
7205
+ start.value = true;
7206
+ startX.value = e.screenX;
7207
+ startY.value = e.screenY;
7208
+ };
7209
+ const handleMove = (e) => {
7210
+ if (!start.value || !props.draggable) return;
7211
+ offset.value = !props.vertical ? e.screenX - startX.value : e.screenY - startY.value;
7212
+ resetItems();
7213
+ };
7214
+ const handleEnd = () => {
7215
+ if (!props.draggable) return;
7216
+ start.value = false;
7217
+ startTimer();
7218
+ const $offset = Math.abs(offset.value);
7219
+ const $direction = offset.value > 0;
7220
+ offset.value = 0;
7221
+ if ($offset > 5) {
7222
+ $direction && prev();
7223
+ !$direction && next();
7224
+ } else {
7225
+ resetItems();
7226
+ }
7227
+ };
7228
+ vue.watch(
7229
+ () => items.value,
7230
+ (v) => {
7231
+ if (v.length > 0) setActiveItem(props.initialIndex);
7232
+ }
7233
+ );
7234
+ vue.watch(
7235
+ () => activeIndex.value,
7236
+ (v, oldV) => {
7237
+ resetItems(oldV);
7238
+ emit("change", v, oldV);
7239
+ }
7240
+ );
7241
+ vue.watch(
7242
+ () => props.autoplay,
7243
+ (v) => {
7244
+ v ? startTimer() : pauseTimer();
7245
+ }
7246
+ );
7247
+ vue.watch(
7248
+ () => props.loop,
7249
+ () => {
7250
+ setActiveItem(activeIndex.value);
7251
+ }
7252
+ );
7253
+ vue.watch(
7254
+ () => props.t,
7255
+ () => {
7256
+ pauseTimer();
7257
+ startTimer();
7258
+ }
7259
+ );
7260
+ vue.onMounted(() => {
7261
+ vue.nextTick(() => {
7262
+ if (wrapper.value) Resize.on(wrapper.value, resetItems);
7263
+ if (props.initialIndex < items.value.length && props.initialIndex >= 0) {
7264
+ activeIndex.value = props.initialIndex;
7265
+ }
7266
+ startTimer();
7267
+ });
7268
+ });
7269
+ vue.onBeforeUnmount(() => {
7270
+ if (wrapper.value) Resize.off(wrapper.value, resetItems);
7271
+ pauseTimer();
7272
+ startTimer();
7273
+ });
7274
+ const add = (item) => {
7275
+ if (!item) return;
7276
+ vue.nextTick(() => {
7277
+ if (content.value) {
7278
+ const index = Array.from(content.value.children).filter((i) => /vcm?-carousel-item/.test(i.className)).indexOf(item.vnode.el);
7279
+ items.value.splice(index, 0, item);
7280
+ return;
7281
+ }
7282
+ items.value.push(item);
7283
+ });
7284
+ };
7285
+ const remove = (item) => {
7286
+ if (!item) return;
7287
+ items.value.splice(items.value.indexOf(item), 1);
7288
+ };
7289
+ vue.provide("vc-carousel", {
7290
+ props,
7291
+ items,
7292
+ offset,
7293
+ allowTransition,
7294
+ setActiveItem,
7295
+ wrapper,
7296
+ content,
7297
+ add,
7298
+ remove
7299
+ });
7300
+ expose({
7301
+ setActiveItem,
7302
+ prev,
7303
+ next
7304
+ });
7305
+ return {
7306
+ carouselId,
7307
+ allowTransition,
7308
+ items,
7309
+ activeIndex,
7310
+ offset,
7311
+ direction,
7312
+ hasLabel,
7313
+ dotsClasses,
7314
+ start,
7315
+ startX,
7316
+ startY,
7317
+ handleStart,
7318
+ handleMove,
7319
+ handleEnd,
7320
+ handleDotClick,
7321
+ prev,
7322
+ next,
7323
+ setActiveItem,
7324
+ pauseTimer,
7325
+ startTimer
7326
+ };
7327
+ };
7328
+
7329
+ const props$1j = {
7330
+ t: {
7331
+ type: Number,
7332
+ default: 3e3
7333
+ },
7334
+ card: Boolean,
7335
+ gutter: {
7336
+ type: Number,
7337
+ default: 0
7338
+ },
7339
+ height: [String, Number],
7340
+ initialIndex: {
7341
+ type: Number,
7342
+ default: 0
7343
+ },
7344
+ trigger: {
7055
7345
  type: String,
7056
- default: "div"
7346
+ default: "hover"
7347
+ },
7348
+ autoplay: {
7349
+ type: Boolean,
7350
+ default: true
7351
+ },
7352
+ dots: {
7353
+ type: [String, Boolean],
7354
+ default: "bottom"
7355
+ // bottom/outside | false
7356
+ },
7357
+ arrow: {
7358
+ type: [String, Boolean],
7359
+ default: "hover"
7360
+ // hover/always | false
7361
+ },
7362
+ loop: {
7363
+ type: Boolean,
7364
+ default: true
7365
+ },
7366
+ vertical: {
7367
+ type: Boolean,
7368
+ default: false
7369
+ },
7370
+ draggable: {
7371
+ type: Boolean,
7372
+ default: true
7057
7373
  }
7058
7374
  };
7059
7375
 
7060
7376
  /** @jsxImportSource vue */
7061
7377
 
7062
- const COMPONENT_NAME$1W = 'vc-carousel';
7378
+ const COMPONENT_NAME$1$ = 'vc-carousel';
7063
7379
  const Carousel = /* @__PURE__ */ vue.defineComponent({
7064
- name: COMPONENT_NAME$1W,
7380
+ name: COMPONENT_NAME$1$,
7381
+ props: props$1j,
7382
+ setup(props, {
7383
+ slots,
7384
+ expose
7385
+ }) {
7386
+ const isHover = vue.ref(false);
7387
+ const wrapper = vue.ref(null);
7388
+ const content = vue.ref(null);
7389
+ const arrowDisplay = vue.computed(() => {
7390
+ return props.arrow && !props.vertical;
7391
+ });
7392
+ const carousel = useCarousel(wrapper, content, expose);
7393
+ const itemInStage = (item, index, items) => {
7394
+ const length = items.length;
7395
+ const isInStage = item.exposed.isInStage.value;
7396
+ if (index === length - 1 && isInStage && items[0].exposed.isActive.value || isInStage && items[index + 1] && items[index + 1].exposed.isActive.value) {
7397
+ return 'left';
7398
+ } else if (index === 0 && isInStage && items[length - 1].exposed.isActive.value || isInStage && items[index - 1] && items[index - 1].exposed.isActive.value) {
7399
+ return 'right';
7400
+ }
7401
+ return false;
7402
+ };
7403
+ const handleButtonEnter = arrow => {
7404
+ if (props.vertical) return;
7405
+ carousel.items.value.forEach((item, index, items) => {
7406
+ if (arrow === itemInStage(item, index, items)) {
7407
+ item.exposed.isHover.value = true;
7408
+ }
7409
+ });
7410
+ };
7411
+ const handleButtonLeave = () => {
7412
+ if (props.vertical) return;
7413
+ carousel.items.value.forEach(item => {
7414
+ item.exposed.isHover.value = false;
7415
+ });
7416
+ };
7417
+ const handleDotHover = index => {
7418
+ if (props.trigger === 'hover' && index !== carousel.activeIndex.value) {
7419
+ carousel.activeIndex.value = index;
7420
+ }
7421
+ };
7422
+ const handleMouseEnter = () => {
7423
+ isHover.value = true;
7424
+ carousel.pauseTimer();
7425
+ };
7426
+ const handleMouseLeave = () => {
7427
+ isHover.value = false;
7428
+ carousel.startTimer();
7429
+ };
7430
+ const throttledArrowClick = throttle$1(carousel.setActiveItem);
7431
+ const throttledDotHover = throttle$1(handleDotHover);
7432
+ return () => {
7433
+ return vue.createVNode("div", {
7434
+ "ref": wrapper,
7435
+ "class": ['vc-carousel', `is-${carousel.direction.value}`],
7436
+ "onMousedown": vue.withModifiers(carousel.handleStart, ['stop', 'prevent']),
7437
+ "onMousemove": vue.withModifiers(carousel.handleMove, ['stop', 'prevent']),
7438
+ "onMouseup": vue.withModifiers(carousel.handleEnd, ['stop', 'prevent']),
7439
+ "onMouseenter": vue.withModifiers(handleMouseEnter, ['stop']),
7440
+ "onMouseleave": vue.withModifiers(handleMouseLeave, ['stop'])
7441
+ }, [vue.createVNode("div", {
7442
+ "ref": content,
7443
+ "class": "vc-carousel__wrapper",
7444
+ "style": {
7445
+ height: props.height ? `${props.height}px` : 'auto'
7446
+ }
7447
+ }, [arrowDisplay.value && vue.createVNode(TransitionSlide, {
7448
+ "mode": "left-part"
7449
+ }, {
7450
+ default: () => [vue.withDirectives(vue.createVNode("button", {
7451
+ "type": "button",
7452
+ "class": "vc-carousel__arrow is-left-arrow",
7453
+ "onMouseenter": () => handleButtonEnter('left'),
7454
+ "onMouseleave": handleButtonLeave,
7455
+ "onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value - 1), ['stop'])
7456
+ }, [vue.createVNode(Icon, {
7457
+ "type": "left"
7458
+ }, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value > 0)]])]
7459
+ }), arrowDisplay.value && vue.createVNode(TransitionSlide, {
7460
+ "mode": "right-part"
7461
+ }, {
7462
+ default: () => [vue.withDirectives(vue.createVNode("button", {
7463
+ "type": "button",
7464
+ "class": "vc-carousel__arrow is-right-arrow",
7465
+ "onMouseenter": () => handleButtonEnter('right'),
7466
+ "onMouseleave": handleButtonLeave,
7467
+ "onClick": vue.withModifiers(() => throttledArrowClick(carousel.activeIndex.value + 1), ['stop'])
7468
+ }, [vue.createVNode(Icon, {
7469
+ "type": "right"
7470
+ }, null)]), [[vue.vShow, (props.arrow === 'always' || isHover.value) && (props.loop || carousel.activeIndex.value < carousel.items.value.length - 1)]])]
7471
+ }), slots.default?.()]), props.dots && vue.createVNode("ul", {
7472
+ "class": ['vc-carousel__dots', ...carousel.dotsClasses.value]
7473
+ }, [carousel.items.value.map((item, index) => vue.createVNode("li", {
7474
+ "key": index,
7475
+ "class": ['vc-carousel__dot', `is-${carousel.direction.value}`, {
7476
+ 'is-active': index === carousel.activeIndex.value
7477
+ }],
7478
+ "onMouseenter": () => throttledDotHover(index),
7479
+ "onClick": () => carousel.handleDotClick(index)
7480
+ }, [vue.createVNode("button", {
7481
+ "class": "vc-carousel__button"
7482
+ }, [carousel.hasLabel.value && vue.createVNode("span", null, [item.props.label])])]))])]);
7483
+ };
7484
+ }
7485
+ });
7486
+
7487
+ const props$1i = {
7488
+ name: String,
7489
+ label: {
7490
+ type: [String, Number],
7491
+ default: ""
7492
+ },
7493
+ // card大小
7494
+ width: {
7495
+ type: [Number, String],
7496
+ default: "70%"
7497
+ },
7498
+ // card之间间距, 或者滑动时候的间距
7499
+ gutter: {
7500
+ type: Number,
7501
+ default: 0
7502
+ },
7503
+ scale: {
7504
+ type: Number,
7505
+ default: 0.83
7506
+ }
7507
+ };
7508
+
7509
+ const TRANSFORM = prefixStyle("transform").camel;
7510
+ const useCarouselItem = (expose) => {
7511
+ const instance = vue.getCurrentInstance();
7512
+ const carousel = vue.inject("vc-carousel", {});
7513
+ const props = instance.props;
7514
+ const translate = vue.ref(0);
7515
+ const currentScale = vue.ref(1);
7516
+ const isHover = vue.ref(false);
7517
+ const isActive = vue.ref(false);
7518
+ const isReady = vue.ref(false);
7519
+ const isInStage = vue.ref(false);
7520
+ const isAnimating = vue.ref(false);
7521
+ const isVertical = vue.computed(() => {
7522
+ return carousel.props.vertical;
7523
+ });
7524
+ const isCard = vue.computed(() => {
7525
+ return carousel.props.card;
7526
+ });
7527
+ const isMove = vue.computed(() => {
7528
+ return carousel.offset.value !== 0;
7529
+ });
7530
+ const itemGutter = vue.computed(() => {
7531
+ return props.gutter || carousel.props.gutter || 0;
7532
+ });
7533
+ const itemStyle = vue.computed(() => {
7534
+ const translateType = isVertical.value ? "translateY" : "translateX";
7535
+ if (carousel.props.card) {
7536
+ return {
7537
+ [TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
7538
+ width: props.width
7539
+ };
7540
+ } else {
7541
+ return {
7542
+ [TRANSFORM]: `${translateType}(${translate.value}px) scale(${currentScale.value})`,
7543
+ width: itemGutter.value ? props.width : "100%"
7544
+ };
7545
+ }
7546
+ });
7547
+ vue.onBeforeMount(() => {
7548
+ carousel.add?.(instance);
7549
+ if (!isCard.value && itemGutter.value && carousel.props.loop) {
7550
+ throw new VcError("carousel", "slide模式下loop不能为true");
7551
+ }
7552
+ });
7553
+ vue.onBeforeUnmount(() => {
7554
+ carousel.remove?.(instance);
7555
+ });
7556
+ const processIndex = (index, activeIndex, length) => {
7557
+ if (activeIndex === 0 && index === length - 1) {
7558
+ return -1;
7559
+ } else if (activeIndex === length - 1 && index === 0) {
7560
+ return length;
7561
+ } else if (index < activeIndex - 1 && activeIndex - index >= length / 2) {
7562
+ return length + 1;
7563
+ } else if (index > activeIndex + 1 && index - activeIndex >= length / 2) {
7564
+ return -2;
7565
+ }
7566
+ return index;
7567
+ };
7568
+ const calcCardTranslate = (index, activeIndex) => {
7569
+ let value;
7570
+ const widthNumber = +props.width / 100;
7571
+ const parentW = carousel.wrapper.value.offsetWidth;
7572
+ if (isInStage.value) {
7573
+ if (index === activeIndex) {
7574
+ value = parentW * (1 - widthNumber) / 2;
7575
+ } else if (index > activeIndex) {
7576
+ value = parentW * (1 + widthNumber * props.scale) / 2 + itemGutter.value;
7577
+ } else {
7578
+ value = -(parentW * ((widthNumber * props.scale - 1) / 2 + widthNumber)) - itemGutter.value;
7579
+ }
7580
+ } else if (index < activeIndex) {
7581
+ value = parentW * (1 - widthNumber) / 2;
7582
+ } else {
7583
+ value = parentW * (1 - widthNumber) / 2;
7584
+ }
7585
+ return value;
7586
+ };
7587
+ const calcSlideOffset = (index, activeIndex, wrapperWidth) => {
7588
+ const { length } = carousel.items.value;
7589
+ const offset = wrapperWidth - (instance.vnode?.el?.offsetWidth || 0);
7590
+ const gutter = itemGutter.value;
7591
+ if (!gutter || isVertical.value) return 0;
7592
+ let slideOffset = 0;
7593
+ if (length === 1) {
7594
+ return offset / 2;
7595
+ }
7596
+ if (activeIndex == 0) {
7597
+ if (index - activeIndex === 0) {
7598
+ slideOffset = gutter;
7599
+ } else if (index - activeIndex === 1) {
7600
+ slideOffset = -offset + gutter * 2;
7601
+ }
7602
+ }
7603
+ if (activeIndex !== 0 && activeIndex != length - 1) {
7604
+ if (index - activeIndex === 0) {
7605
+ slideOffset = offset / 2;
7606
+ } else if (index - activeIndex === 1) {
7607
+ slideOffset = -offset / 2 + gutter;
7608
+ } else if (index - activeIndex === -1) {
7609
+ slideOffset = offset * 3 / 2 - gutter;
7610
+ }
7611
+ }
7612
+ if (activeIndex == length - 1) {
7613
+ if (index - activeIndex === 0) {
7614
+ slideOffset = offset - gutter;
7615
+ } else if (index - activeIndex === -1) {
7616
+ slideOffset = offset * 2 - gutter * 2;
7617
+ }
7618
+ }
7619
+ return slideOffset;
7620
+ };
7621
+ const calcTranslate = (index, activeIndex) => {
7622
+ const distance = carousel.vnode.el[isVertical.value ? "offsetHeight" : "offsetWidth"];
7623
+ const slideOffset = calcSlideOffset(index, activeIndex, distance);
7624
+ return distance * (index - activeIndex) + carousel.offset.value + slideOffset;
7625
+ };
7626
+ const reset = (index, activeIndex, oldIndex) => {
7627
+ const { length } = carousel.items.value;
7628
+ if (carousel.allowTransition.value && !isCard.value && oldIndex !== void 0) {
7629
+ isAnimating.value = index === activeIndex || index === oldIndex;
7630
+ if (!isVertical.value && !isAnimating.value && itemGutter.value && (index - activeIndex === 1 || index - activeIndex === -1)) {
7631
+ isAnimating.value = true;
7632
+ }
7633
+ }
7634
+ if (index !== activeIndex && length > 2 && carousel.props.loop) {
7635
+ index = processIndex(index, activeIndex, length);
7636
+ }
7637
+ if (isCard.value) {
7638
+ if (isVertical.value) {
7639
+ throw new VcError("carousel", "卡片模式不支持垂直方向");
7640
+ }
7641
+ isInStage.value = Math.round(Math.abs(index - activeIndex)) <= 1;
7642
+ isActive.value = index === activeIndex;
7643
+ translate.value = calcCardTranslate(index, activeIndex);
7644
+ currentScale.value = isActive.value ? 1 : props.scale;
7645
+ } else {
7646
+ isActive.value = index === activeIndex;
7647
+ translate.value = calcTranslate(index, activeIndex);
7648
+ }
7649
+ isReady.value = true;
7650
+ };
7651
+ const handleItemClick = () => {
7652
+ if (parent && isCard.value) {
7653
+ const index = carousel.items.value.indexOf(instance);
7654
+ carousel.setActiveItem(index);
7655
+ }
7656
+ };
7657
+ expose({
7658
+ reset,
7659
+ isInStage,
7660
+ isHover,
7661
+ isActive
7662
+ });
7663
+ return {
7664
+ translate,
7665
+ currentScale,
7666
+ isHover,
7667
+ isActive,
7668
+ isReady,
7669
+ isInStage,
7670
+ isAnimating,
7671
+ isVertical,
7672
+ isCard,
7673
+ isMove,
7674
+ itemGutter,
7675
+ itemStyle,
7676
+ reset,
7677
+ handleItemClick
7678
+ };
7679
+ };
7680
+
7681
+ /** @jsxImportSource vue */
7682
+
7683
+ const COMPONENT_NAME$1_ = 'vc-carousel-item';
7684
+ const CarouselItem = /* @__PURE__ */ vue.defineComponent({
7685
+ name: COMPONENT_NAME$1_,
7065
7686
  props: props$1i,
7687
+ setup(_, {
7688
+ slots,
7689
+ expose
7690
+ }) {
7691
+ const it = useCarouselItem(expose);
7692
+ return () => {
7693
+ return vue.withDirectives(vue.createVNode("div", {
7694
+ "class": ['vc-carousel-item', {
7695
+ 'is-active': it.isActive.value,
7696
+ 'is-card': it.isCard.value,
7697
+ 'is-in-stage': it.isInStage.value,
7698
+ 'is-hover': it.isHover.value,
7699
+ 'is-animating': it.isAnimating.value && !it.isMove.value
7700
+ }],
7701
+ "style": it.itemStyle.value,
7702
+ "onClick": it.handleItemClick
7703
+ }, [it.isCard.value && vue.withDirectives(vue.createVNode("div", {
7704
+ "class": "vc-carousel-item__mask"
7705
+ }, null), [[vue.vShow, !it.isActive.value]]), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
7706
+ };
7707
+ }
7708
+ });
7709
+
7710
+ /** @jsxImportSource vue */
7711
+
7712
+ const COMPONENT_NAME$1Z = 'vcm-carousel';
7713
+ const MCarousel = /* @__PURE__ */ vue.defineComponent({
7714
+ name: COMPONENT_NAME$1Z,
7715
+ props: {
7716
+ ...props$1j,
7717
+ dots: {
7718
+ type: [String, Boolean],
7719
+ default: false
7720
+ },
7721
+ indicator: {
7722
+ type: Boolean,
7723
+ default: true
7724
+ }
7725
+ },
7066
7726
  setup(props, {
7067
- slots
7727
+ slots,
7728
+ expose
7068
7729
  }) {
7730
+ const wrapper = vue.ref(null);
7731
+ const content = vue.ref(null);
7732
+ const carousel = useCarousel(wrapper, content, expose);
7733
+ let scrollStatus = 0;
7734
+ const handleTouchStart = e => {
7735
+ carousel.handleStart(e.touches[0]);
7736
+ scrollStatus = 0;
7737
+ };
7738
+ const handleTouchMove = e => {
7739
+ const absX = Math.abs(e.touches[0].screenX - carousel.startX.value);
7740
+ const absY = Math.abs(e.touches[0].screenY - carousel.startY.value);
7741
+ if (!props.vertical && absX > absY && scrollStatus !== 1) {
7742
+ e.preventDefault();
7743
+ carousel.handleMove(e.touches[0]);
7744
+ scrollStatus = 2;
7745
+ return;
7746
+ }
7747
+ if (props.vertical && absY > absX) {
7748
+ e.preventDefault();
7749
+ carousel.handleMove(e.touches[0]);
7750
+ return;
7751
+ }
7752
+ if (scrollStatus === 0) {
7753
+ scrollStatus = 1;
7754
+ }
7755
+ };
7756
+
7757
+ // e.changedTouches[0]
7758
+ const handleTouchEnd = () => {
7759
+ carousel.handleEnd();
7760
+ scrollStatus = 0;
7761
+ };
7069
7762
  return () => {
7070
7763
  return vue.createVNode("div", {
7071
- "class": "vc-carousel"
7072
- }, [slots?.default?.()]);
7764
+ "ref": wrapper,
7765
+ "class": ['vcm-carousel', `is-${carousel.direction.value}`],
7766
+ "onTouchstart": vue.withModifiers(handleTouchStart, ['stop']),
7767
+ "onTouchmove": vue.withModifiers(handleTouchMove, ['stop']),
7768
+ "onTouchend": vue.withModifiers(handleTouchEnd, ['stop'])
7769
+ }, [vue.createVNode("div", {
7770
+ "ref": content,
7771
+ "style": {
7772
+ height: props.height ? `${props.height}px` : 'auto'
7773
+ },
7774
+ "class": "vcm-carousel__wrapper"
7775
+ }, [slots.default?.()]), props.dots && vue.createVNode("ul", {
7776
+ "class": ['vcm-carousel__dots', ...carousel.dotsClasses.value]
7777
+ }, [carousel.items.value.map((_, index) => vue.createVNode("li", {
7778
+ "key": index,
7779
+ "class": ['vcm-carousel__dot', 'is-' + carousel.direction.value, {
7780
+ 'is-active': index === carousel.activeIndex.value
7781
+ }],
7782
+ "onClick": e => {
7783
+ e.stopPropagation();
7784
+ carousel.handleDotClick(index);
7785
+ }
7786
+ }, [vue.createVNode("button", {
7787
+ "class": "vcm-carousel__button"
7788
+ }, [carousel.hasLabel.value && vue.createVNode("span", null, [carousel.items.value[index].props.label])])]))]), !props.card && props.indicator && vue.createVNode("div", {
7789
+ "class": "vcm-carousel__indicator"
7790
+ }, [vue.createVNode("span", null, [carousel.activeIndex.value + 1]), vue.createVNode("span", null, [vue.createTextVNode(" / ")]), vue.createVNode("span", null, [carousel.items.value.length])])]);
7073
7791
  };
7074
7792
  }
7075
7793
  });
7076
7794
 
7077
- const MCarousel = Carousel;
7795
+ /** @jsxImportSource vue */
7796
+
7797
+ const COMPONENT_NAME$1Y = 'vcm-carousel-item';
7798
+ const MCarouselItem = /* @__PURE__ */ vue.defineComponent({
7799
+ name: COMPONENT_NAME$1Y,
7800
+ props: props$1i,
7801
+ setup(_, {
7802
+ slots,
7803
+ expose
7804
+ }) {
7805
+ const it = useCarouselItem(expose);
7806
+ return () => {
7807
+ return vue.withDirectives(vue.createVNode("div", {
7808
+ "style": it.itemStyle.value,
7809
+ "class": {
7810
+ 'vcm-carousel-item': true,
7811
+ 'is-active': it.isActive.value,
7812
+ 'is-card': it.isCard.value,
7813
+ 'is-animating': it.isAnimating.value && !it.isMove.value,
7814
+ 'is-in-stage': it.isInStage.value
7815
+ },
7816
+ "onClick": it.handleItemClick
7817
+ }, [it.isCard.value && !it.isActive.value && vue.createVNode("div", {
7818
+ "class": "vcm-carousel-item__mask"
7819
+ }, null), slots.default?.()]), [[vue.vShow, it.isReady.value]]);
7820
+ };
7821
+ }
7822
+ });
7078
7823
 
7079
7824
  const useAttrs = (options) => {
7080
7825
  const attrs = vue.useAttrs();
@@ -7418,9 +8163,9 @@
7418
8163
 
7419
8164
  /** @jsxImportSource vue */
7420
8165
 
7421
- const COMPONENT_NAME$1V = 'vc-input';
8166
+ const COMPONENT_NAME$1X = 'vc-input';
7422
8167
  const Input$1 = /* @__PURE__ */ vue.defineComponent({
7423
- name: COMPONENT_NAME$1V,
8168
+ name: COMPONENT_NAME$1X,
7424
8169
  inheritAttrs: false,
7425
8170
  props: {
7426
8171
  ...props$1h,
@@ -7755,9 +8500,9 @@
7755
8500
 
7756
8501
  /** @jsxImportSource vue */
7757
8502
 
7758
- const COMPONENT_NAME$1U = 'vc-input-number';
8503
+ const COMPONENT_NAME$1W = 'vc-input-number';
7759
8504
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
7760
- name: COMPONENT_NAME$1U,
8505
+ name: COMPONENT_NAME$1W,
7761
8506
  props: props$1g,
7762
8507
  inheritAttrs: false,
7763
8508
  setup(props, {
@@ -7821,9 +8566,9 @@
7821
8566
 
7822
8567
  /** @jsxImportSource vue */
7823
8568
 
7824
- const COMPONENT_NAME$1T = 'vc-input-search';
8569
+ const COMPONENT_NAME$1V = 'vc-input-search';
7825
8570
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
7826
- name: COMPONENT_NAME$1T,
8571
+ name: COMPONENT_NAME$1V,
7827
8572
  props: props$1f,
7828
8573
  inheritAttrs: false,
7829
8574
  setup(props, {
@@ -7956,69 +8701,6 @@
7956
8701
  ...pick(props$1e, wrapperKeys)
7957
8702
  };
7958
8703
 
7959
- class Resize {
7960
- el;
7961
- static of(el) {
7962
- return new Resize(el);
7963
- }
7964
- /**
7965
- * Resize.of(el, fn);
7966
- * @param el ~
7967
- * @param fn ~
7968
- * @returns off
7969
- */
7970
- static on(el, fn) {
7971
- return new Resize(el).on(fn);
7972
- }
7973
- /**
7974
- * 要实现Resize.off(el),el必须侵入式修改挂上__rz__
7975
- * @param el ~
7976
- * @param fn ~
7977
- * @returns ~
7978
- */
7979
- static off(el, fn) {
7980
- return new Resize(el).off(fn);
7981
- }
7982
- listeners = [];
7983
- ro = null;
7984
- constructor(el) {
7985
- this.el = el;
7986
- let rz = el.__rz__;
7987
- if (rz && rz instanceof Resize) {
7988
- this.listeners = rz.listeners;
7989
- this.ro = rz.ro;
7990
- }
7991
- }
7992
- handleResize = (entries) => {
7993
- /* istanbul ignore else -- @preserve */
7994
- if (entries.some((i) => i.target === this.el)) {
7995
- this.listeners?.forEach((fn) => fn());
7996
- }
7997
- };
7998
- on(fn) {
7999
- if (typeof ResizeObserver === "undefined")
8000
- return () => {
8001
- };
8002
- if (!this.listeners.length) {
8003
- this.ro = this.ro || new ResizeObserver(this.handleResize);
8004
- this.ro.observe(this.el);
8005
- this.el.__rz__ = this;
8006
- }
8007
- this.listeners.push(fn);
8008
- return () => this.off(fn);
8009
- }
8010
- off(fn) {
8011
- if (fn) {
8012
- this.listeners.splice(this.listeners.indexOf(fn), 1);
8013
- } else {
8014
- this.listeners = [];
8015
- }
8016
- if (!this.listeners.length && this.ro) {
8017
- this.ro.disconnect();
8018
- }
8019
- }
8020
- }
8021
-
8022
8704
  const EXTRA_DISTANCE = 4;
8023
8705
  const HALF_ARROW = 12.73 / 2;
8024
8706
  const usePos = () => {
@@ -8279,9 +8961,9 @@
8279
8961
  }
8280
8962
  };
8281
8963
 
8282
- const COMPONENT_NAME$1S = "vc-customer";
8964
+ const COMPONENT_NAME$1U = "vc-customer";
8283
8965
  const Customer = vue.defineComponent({
8284
- name: COMPONENT_NAME$1S,
8966
+ name: COMPONENT_NAME$1U,
8285
8967
  props: props$1c,
8286
8968
  setup(props, context) {
8287
8969
  return () => vue.h(() => {
@@ -8416,7 +9098,7 @@
8416
9098
  }
8417
9099
  }
8418
9100
 
8419
- const COMPONENT_NAME$1R = "vc-portal";
9101
+ const COMPONENT_NAME$1T = "vc-portal";
8420
9102
  class Portal {
8421
9103
  /**
8422
9104
  * 清理Portals类型组件
@@ -8466,7 +9148,7 @@
8466
9148
  this.wrapper = wrapper;
8467
9149
  this.globalOptions = {
8468
9150
  ...options,
8469
- name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1R)
9151
+ name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1T)
8470
9152
  };
8471
9153
  }
8472
9154
  popup(propsData, options) {
@@ -8564,7 +9246,7 @@
8564
9246
  ...rest
8565
9247
  } = options;
8566
9248
  let useAllNodes = fragment;
8567
- const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1R)}` : name$;
9249
+ const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1T)}` : name$;
8568
9250
  const container = document.createElement(tag);
8569
9251
  const root = typeof el === "object" ? el : document.querySelector(el || "body");
8570
9252
  !alive && Portal.leafs.get(name)?.destroy();
@@ -8598,7 +9280,7 @@
8598
9280
  } else {
8599
9281
  const wrapper = this.wrapper;
8600
9282
  const app = vue.createApp({
8601
- name: COMPONENT_NAME$1R,
9283
+ name: COMPONENT_NAME$1T,
8602
9284
  parent,
8603
9285
  setup() {
8604
9286
  if (alive) {
@@ -8709,13 +9391,13 @@
8709
9391
  }
8710
9392
  };
8711
9393
 
8712
- const COMPONENT_NAME$1Q = 'vc-portal-view';
9394
+ const COMPONENT_NAME$1S = 'vc-portal-view';
8713
9395
 
8714
9396
  /**
8715
9397
  * 写法不同,但与vue@2.x 保持一致
8716
9398
  */
8717
9399
  const PortalView = /* @__PURE__ */ vue.defineComponent({
8718
- name: COMPONENT_NAME$1Q,
9400
+ name: COMPONENT_NAME$1S,
8719
9401
  props: props$1b,
8720
9402
  setup(props, {
8721
9403
  slots
@@ -8735,9 +9417,9 @@
8735
9417
 
8736
9418
  /** @jsxImportSource vue */
8737
9419
 
8738
- const COMPONENT_NAME$1P = 'vc-popover-wrapper';
9420
+ const COMPONENT_NAME$1R = 'vc-popover-wrapper';
8739
9421
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
8740
- name: COMPONENT_NAME$1P,
9422
+ name: COMPONENT_NAME$1R,
8741
9423
  props: props$1e,
8742
9424
  emits: ['portal-fulfilled', 'close'],
8743
9425
  setup(props, {
@@ -8995,9 +9677,9 @@
8995
9677
 
8996
9678
  /** @jsxImportSource vue */
8997
9679
 
8998
- const COMPONENT_NAME$1O = 'vc-popover';
9680
+ const COMPONENT_NAME$1Q = 'vc-popover';
8999
9681
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
9000
- name: COMPONENT_NAME$1O,
9682
+ name: COMPONENT_NAME$1Q,
9001
9683
  props: props$1d,
9002
9684
  emits: ['update:modelValue', 'visible-change', 'ready', 'close'],
9003
9685
  setup(props, {
@@ -9141,9 +9823,9 @@
9141
9823
 
9142
9824
  /** @jsxImportSource vue */
9143
9825
 
9144
- const COMPONENT_NAME$1N = 'vc-cascader-column';
9826
+ const COMPONENT_NAME$1P = 'vc-cascader-column';
9145
9827
  const CascaderColumn = /* @__PURE__ */ vue.defineComponent({
9146
- name: COMPONENT_NAME$1N,
9828
+ name: COMPONENT_NAME$1P,
9147
9829
  emits: ['click', 'change'],
9148
9830
  props: {
9149
9831
  data: {
@@ -9351,9 +10033,9 @@
9351
10033
 
9352
10034
  /** @jsxImportSource vue */
9353
10035
 
9354
- const COMPONENT_NAME$1M = 'vc-cascader';
10036
+ const COMPONENT_NAME$1O = 'vc-cascader';
9355
10037
  const Cascader = /* @__PURE__ */ vue.defineComponent({
9356
- name: COMPONENT_NAME$1M,
10038
+ name: COMPONENT_NAME$1O,
9357
10039
  inheritAttrs: false,
9358
10040
  props: props$19,
9359
10041
  emits: ['update:modelValue', 'visible-change', 'ready', 'change', 'close'],
@@ -9705,9 +10387,9 @@
9705
10387
 
9706
10388
  /** @jsxImportSource vue */
9707
10389
 
9708
- const COMPONENT_NAME$1L = 'vc-chart';
10390
+ const COMPONENT_NAME$1N = 'vc-chart';
9709
10391
  const Chart = /* @__PURE__ */ vue.defineComponent({
9710
- name: COMPONENT_NAME$1L,
10392
+ name: COMPONENT_NAME$1N,
9711
10393
  props: props$18,
9712
10394
  emits: [...EVENTS$1, 'ready'],
9713
10395
  setup(props, {
@@ -9946,9 +10628,9 @@
9946
10628
 
9947
10629
  /** @jsxImportSource vue */
9948
10630
 
9949
- const COMPONENT_NAME$1K = 'vc-checkbox';
10631
+ const COMPONENT_NAME$1M = 'vc-checkbox';
9950
10632
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
9951
- name: COMPONENT_NAME$1K,
10633
+ name: COMPONENT_NAME$1M,
9952
10634
  props: props$17,
9953
10635
  emits: ['update:modelValue', 'change'],
9954
10636
  setup(props, {
@@ -10035,9 +10717,9 @@
10035
10717
 
10036
10718
  /** @jsxImportSource vue */
10037
10719
 
10038
- const COMPONENT_NAME$1J = 'vc-checkbox-group';
10720
+ const COMPONENT_NAME$1L = 'vc-checkbox-group';
10039
10721
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
10040
- name: COMPONENT_NAME$1J,
10722
+ name: COMPONENT_NAME$1L,
10041
10723
  props: props$16,
10042
10724
  emits: ['update:modelValue', 'change'],
10043
10725
  setup(props, {
@@ -10055,9 +10737,9 @@
10055
10737
 
10056
10738
  /** @jsxImportSource vue */
10057
10739
 
10058
- const COMPONENT_NAME$1I = 'vcm-checkbox';
10740
+ const COMPONENT_NAME$1K = 'vcm-checkbox';
10059
10741
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
10060
- name: COMPONENT_NAME$1I,
10742
+ name: COMPONENT_NAME$1K,
10061
10743
  props: props$17,
10062
10744
  emits: ['update:modelValue', 'change'],
10063
10745
  setup(props, {
@@ -10097,9 +10779,9 @@
10097
10779
 
10098
10780
  /** @jsxImportSource vue */
10099
10781
 
10100
- const COMPONENT_NAME$1H = 'vcm-checkbox-group';
10782
+ const COMPONENT_NAME$1J = 'vcm-checkbox-group';
10101
10783
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
10102
- name: COMPONENT_NAME$1H,
10784
+ name: COMPONENT_NAME$1J,
10103
10785
  props: props$16,
10104
10786
  emits: ['update:modelValue', 'change'],
10105
10787
  setup(props, {
@@ -10153,9 +10835,9 @@
10153
10835
 
10154
10836
  /** @jsxImportSource vue */
10155
10837
 
10156
- const COMPONENT_NAME$1G = 'vc-message';
10838
+ const COMPONENT_NAME$1I = 'vc-message';
10157
10839
  const MessageView = /* @__PURE__ */ vue.defineComponent({
10158
- name: COMPONENT_NAME$1G,
10840
+ name: COMPONENT_NAME$1I,
10159
10841
  emits: ['before-close', 'close', 'portal-fulfilled'],
10160
10842
  props: props$15,
10161
10843
  setup(props, {
@@ -10404,9 +11086,9 @@
10404
11086
  return () => vue.h(props.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
10405
11087
  };
10406
11088
 
10407
- const COMPONENT_NAME$1F = "vc-clipboard";
11089
+ const COMPONENT_NAME$1H = "vc-clipboard";
10408
11090
  const Clipboard$2 = vue.defineComponent({
10409
- name: COMPONENT_NAME$1F,
11091
+ name: COMPONENT_NAME$1H,
10410
11092
  props: props$14,
10411
11093
  setup() {
10412
11094
  return useClipboard((content) => Message.success({ content }));
@@ -10446,9 +11128,9 @@
10446
11128
 
10447
11129
  /** @jsxImportSource vue */
10448
11130
 
10449
- const COMPONENT_NAME$1E = 'vcm-toast';
11131
+ const COMPONENT_NAME$1G = 'vcm-toast';
10450
11132
  const MToastView = /* @__PURE__ */ vue.defineComponent({
10451
- name: COMPONENT_NAME$1E,
11133
+ name: COMPONENT_NAME$1G,
10452
11134
  emits: ['close', 'portal-fulfilled'],
10453
11135
  props: props$13,
10454
11136
  setup(props, {
@@ -10550,9 +11232,9 @@
10550
11232
  const error$3 = create$6({ mode: "error" });
10551
11233
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$3 });
10552
11234
 
10553
- const COMPONENT_NAME$1D = "vcm-clipboard";
11235
+ const COMPONENT_NAME$1F = "vcm-clipboard";
10554
11236
  const MClipboard$1 = vue.defineComponent({
10555
- name: COMPONENT_NAME$1D,
11237
+ name: COMPONENT_NAME$1F,
10556
11238
  props: props$14,
10557
11239
  setup() {
10558
11240
  return useClipboard((content) => MToast.info({ content }));
@@ -10584,9 +11266,9 @@
10584
11266
  }
10585
11267
  };
10586
11268
 
10587
- const COMPONENT_NAME$1C = "vc-collapse";
11269
+ const COMPONENT_NAME$1E = "vc-collapse";
10588
11270
  const Collapse = vue.defineComponent({
10589
- name: COMPONENT_NAME$1C,
11271
+ name: COMPONENT_NAME$1E,
10590
11272
  props: props$12,
10591
11273
  emits: ["update:moodelValue", "change"],
10592
11274
  setup(props, { slots, emit }) {
@@ -10703,9 +11385,9 @@
10703
11385
  function _isSlot$3(s) {
10704
11386
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
10705
11387
  }
10706
- const COMPONENT_NAME$1B = 'vc-expand';
11388
+ const COMPONENT_NAME$1D = 'vc-expand';
10707
11389
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
10708
- name: COMPONENT_NAME$1B,
11390
+ name: COMPONENT_NAME$1D,
10709
11391
  props: props$10,
10710
11392
  setup(props, {
10711
11393
  slots
@@ -10735,9 +11417,9 @@
10735
11417
 
10736
11418
  /** @jsxImportSource vue */
10737
11419
 
10738
- const COMPONENT_NAME$1A = 'vc-collapse-item';
11420
+ const COMPONENT_NAME$1C = 'vc-collapse-item';
10739
11421
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
10740
- name: COMPONENT_NAME$1A,
11422
+ name: COMPONENT_NAME$1C,
10741
11423
  props: props$11,
10742
11424
  setup(props, {
10743
11425
  slots,
@@ -10812,9 +11494,9 @@
10812
11494
 
10813
11495
  /** @jsxImportSource vue */
10814
11496
 
10815
- const COMPONENT_NAME$1z = 'vc-color-picker';
11497
+ const COMPONENT_NAME$1B = 'vc-color-picker';
10816
11498
  const ColorPicker$1 = /* @__PURE__ */ vue.defineComponent({
10817
- name: COMPONENT_NAME$1z,
11499
+ name: COMPONENT_NAME$1B,
10818
11500
  props: props$$,
10819
11501
  setup(props, {
10820
11502
  slots
@@ -10877,9 +11559,9 @@
10877
11559
  function _isSlot$2(s) {
10878
11560
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
10879
11561
  }
10880
- const COMPONENT_NAME$1y = 'vc-countdown';
11562
+ const COMPONENT_NAME$1A = 'vc-countdown';
10881
11563
  const Countdown = /* @__PURE__ */ vue.defineComponent({
10882
- name: COMPONENT_NAME$1y,
11564
+ name: COMPONENT_NAME$1A,
10883
11565
  props: props$_,
10884
11566
  emits: ['change', 'complete', 'error'],
10885
11567
  setup(props, {
@@ -11152,9 +11834,9 @@
11152
11834
  function _isSlot$1(s) {
11153
11835
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
11154
11836
  }
11155
- const COMPONENT_NAME$1x = 'vc-counter';
11837
+ const COMPONENT_NAME$1z = 'vc-counter';
11156
11838
  const Counter = /* @__PURE__ */ vue.defineComponent({
11157
- name: COMPONENT_NAME$1x,
11839
+ name: COMPONENT_NAME$1z,
11158
11840
  props: props$Z,
11159
11841
  emits: ['begin', 'complete', 'change'],
11160
11842
  setup(props, {
@@ -12417,9 +13099,9 @@
12417
13099
  }
12418
13100
  return view;
12419
13101
  };
12420
- const COMPONENT_NAME$1w = 'vc-date-confirm';
13102
+ const COMPONENT_NAME$1y = 'vc-date-confirm';
12421
13103
  const Confirm = /* @__PURE__ */ vue.defineComponent({
12422
- name: COMPONENT_NAME$1w,
13104
+ name: COMPONENT_NAME$1y,
12423
13105
  props: {
12424
13106
  showTime: {
12425
13107
  type: Boolean,
@@ -12483,9 +13165,9 @@
12483
13165
 
12484
13166
  /** @jsxImportSource vue */
12485
13167
 
12486
- const COMPONENT_NAME$1v = 'vc-date-header';
13168
+ const COMPONENT_NAME$1x = 'vc-date-header';
12487
13169
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
12488
- name: COMPONENT_NAME$1v,
13170
+ name: COMPONENT_NAME$1x,
12489
13171
  props: {
12490
13172
  panelDate: Date,
12491
13173
  showNext: {
@@ -12569,9 +13251,9 @@
12569
13251
 
12570
13252
  /** @jsxImportSource vue */
12571
13253
 
12572
- const COMPONENT_NAME$1u = 'vc-date-table';
13254
+ const COMPONENT_NAME$1w = 'vc-date-table';
12573
13255
  const DateTable = /* @__PURE__ */ vue.defineComponent({
12574
- name: COMPONENT_NAME$1u,
13256
+ name: COMPONENT_NAME$1w,
12575
13257
  props: {
12576
13258
  value: Array,
12577
13259
  firstDayOfWeek: {
@@ -12780,9 +13462,9 @@
12780
13462
 
12781
13463
  /** @jsxImportSource vue */
12782
13464
 
12783
- const COMPONENT_NAME$1t = 'vc-month-table';
13465
+ const COMPONENT_NAME$1v = 'vc-month-table';
12784
13466
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
12785
- name: COMPONENT_NAME$1t,
13467
+ name: COMPONENT_NAME$1v,
12786
13468
  props: {
12787
13469
  value: Array,
12788
13470
  panelDate: Date,
@@ -12914,7 +13596,7 @@
12914
13596
 
12915
13597
  /** @jsxImportSource vue */
12916
13598
 
12917
- const COMPONENT_NAME$1s = 'vc-quarter-table';
13599
+ const COMPONENT_NAME$1u = 'vc-quarter-table';
12918
13600
 
12919
13601
  /**
12920
13602
  * 获取季度对应的月份范围
@@ -12948,7 +13630,7 @@
12948
13630
  }
12949
13631
  };
12950
13632
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
12951
- name: COMPONENT_NAME$1s,
13633
+ name: COMPONENT_NAME$1u,
12952
13634
  props: {
12953
13635
  value: Array,
12954
13636
  panelDate: Date,
@@ -13071,9 +13753,9 @@
13071
13753
 
13072
13754
  /** @jsxImportSource vue */
13073
13755
 
13074
- const COMPONENT_NAME$1r = 'vc-shortcuts-select';
13756
+ const COMPONENT_NAME$1t = 'vc-shortcuts-select';
13075
13757
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
13076
- name: COMPONENT_NAME$1r,
13758
+ name: COMPONENT_NAME$1t,
13077
13759
  props: {
13078
13760
  panelDate: Date,
13079
13761
  config: Array,
@@ -13113,9 +13795,9 @@
13113
13795
 
13114
13796
  /** @jsxImportSource vue */
13115
13797
 
13116
- const COMPONENT_NAME$1q = 'vc-time-select';
13798
+ const COMPONENT_NAME$1s = 'vc-time-select';
13117
13799
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
13118
- name: COMPONENT_NAME$1q,
13800
+ name: COMPONENT_NAME$1s,
13119
13801
  props: {
13120
13802
  hours: {
13121
13803
  type: [Number, String],
@@ -13395,9 +14077,9 @@
13395
14077
 
13396
14078
  /** @jsxImportSource vue */
13397
14079
 
13398
- const COMPONENT_NAME$1p = 'vc-year-table';
14080
+ const COMPONENT_NAME$1r = 'vc-year-table';
13399
14081
  const YearTable = /* @__PURE__ */ vue.defineComponent({
13400
- name: COMPONENT_NAME$1p,
14082
+ name: COMPONENT_NAME$1r,
13401
14083
  props: {
13402
14084
  value: Array,
13403
14085
  panelDate: Date,
@@ -13520,9 +14202,9 @@
13520
14202
  }
13521
14203
  return true;
13522
14204
  };
13523
- const COMPONENT_NAME$1o = 'vc-date-range-panel';
14205
+ const COMPONENT_NAME$1q = 'vc-date-range-panel';
13524
14206
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
13525
- name: COMPONENT_NAME$1o,
14207
+ name: COMPONENT_NAME$1q,
13526
14208
  props: {
13527
14209
  ...props$W,
13528
14210
  confirm: {
@@ -13901,9 +14583,9 @@
13901
14583
 
13902
14584
  /** @jsxImportSource vue */
13903
14585
 
13904
- const COMPONENT_NAME$1n = 'vc-date-panel';
14586
+ const COMPONENT_NAME$1p = 'vc-date-panel';
13905
14587
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
13906
- name: COMPONENT_NAME$1n,
14588
+ name: COMPONENT_NAME$1p,
13907
14589
  props: {
13908
14590
  ...props$W,
13909
14591
  type: String,
@@ -14111,9 +14793,9 @@
14111
14793
  const endYear = value[1].getFullYear();
14112
14794
  return startYear === endYear;
14113
14795
  };
14114
- const COMPONENT_NAME$1m = 'vc-monthrange-panel';
14796
+ const COMPONENT_NAME$1o = 'vc-monthrange-panel';
14115
14797
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
14116
- name: COMPONENT_NAME$1m,
14798
+ name: COMPONENT_NAME$1o,
14117
14799
  props: {
14118
14800
  ...props$W,
14119
14801
  confirm: {
@@ -14288,9 +14970,9 @@
14288
14970
  const endYear = value[1].getFullYear();
14289
14971
  return startYear === endYear;
14290
14972
  };
14291
- const COMPONENT_NAME$1l = 'vc-quarterrange-panel';
14973
+ const COMPONENT_NAME$1n = 'vc-quarterrange-panel';
14292
14974
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
14293
- name: COMPONENT_NAME$1l,
14975
+ name: COMPONENT_NAME$1n,
14294
14976
  props: {
14295
14977
  ...props$W,
14296
14978
  confirm: {
@@ -14529,9 +15211,9 @@
14529
15211
  seconds
14530
15212
  };
14531
15213
  };
14532
- const COMPONENT_NAME$1k = 'vc-timerange-panel';
15214
+ const COMPONENT_NAME$1m = 'vc-timerange-panel';
14533
15215
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
14534
- name: COMPONENT_NAME$1k,
15216
+ name: COMPONENT_NAME$1m,
14535
15217
  props: props$V,
14536
15218
  emits: ['pick', 'clear', 'ok'],
14537
15219
  setup(props, {
@@ -14632,9 +15314,9 @@
14632
15314
 
14633
15315
  /** @jsxImportSource vue */
14634
15316
 
14635
- const COMPONENT_NAME$1j = 'vc-time-panel';
15317
+ const COMPONENT_NAME$1l = 'vc-time-panel';
14636
15318
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
14637
- name: COMPONENT_NAME$1j,
15319
+ name: COMPONENT_NAME$1l,
14638
15320
  props: props$V,
14639
15321
  emits: ['pick', 'clear', 'ok'],
14640
15322
  setup(props, {
@@ -14690,7 +15372,7 @@
14690
15372
 
14691
15373
  /** @jsxImportSource vue */
14692
15374
 
14693
- const COMPONENT_NAME$1i = 'vc-date-picker';
15375
+ const COMPONENT_NAME$1k = 'vc-date-picker';
14694
15376
  const getPanel$1 = type => {
14695
15377
  if (['daterange', 'datetimerange'].includes(type)) {
14696
15378
  return DateRangePanel;
@@ -14701,7 +15383,7 @@
14701
15383
  }
14702
15384
  return DatePanel;
14703
15385
  };
14704
- const DatePicker = createPicker(COMPONENT_NAME$1i, props$Y, () => {
15386
+ const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
14705
15387
  const props = vue.getCurrentInstance().props;
14706
15388
  const icon = vue.ref('date');
14707
15389
  const panel = vue.shallowRef({});
@@ -14742,9 +15424,9 @@
14742
15424
 
14743
15425
  /** @jsxImportSource vue */
14744
15426
 
14745
- const COMPONENT_NAME$1h = 'vc-divider';
15427
+ const COMPONENT_NAME$1j = 'vc-divider';
14746
15428
  const Divider = /* @__PURE__ */ vue.defineComponent({
14747
- name: COMPONENT_NAME$1h,
15429
+ name: COMPONENT_NAME$1j,
14748
15430
  props: props$U,
14749
15431
  setup(props, {
14750
15432
  slots
@@ -14880,7 +15562,7 @@
14880
15562
 
14881
15563
  /** @jsxImportSource vue */
14882
15564
 
14883
- const COMPONENT_NAME$1g = 'vc-scroller-track';
15565
+ const COMPONENT_NAME$1i = 'vc-scroller-track';
14884
15566
  const BAR_MAP = {
14885
15567
  vertical: {
14886
15568
  scroll: 'scrollTop',
@@ -14900,7 +15582,7 @@
14900
15582
  }
14901
15583
  };
14902
15584
  const Track$1 = /* @__PURE__ */ vue.defineComponent({
14903
- name: COMPONENT_NAME$1g,
15585
+ name: COMPONENT_NAME$1i,
14904
15586
  props: props$T,
14905
15587
  emits: ['change'],
14906
15588
  inheritAttrs: false,
@@ -15090,9 +15772,9 @@
15090
15772
 
15091
15773
  /** @jsxImportSource vue */
15092
15774
 
15093
- const COMPONENT_NAME$1f = 'vc-scroller-bar';
15775
+ const COMPONENT_NAME$1h = 'vc-scroller-bar';
15094
15776
  const Bar = /* @__PURE__ */ vue.defineComponent({
15095
- name: COMPONENT_NAME$1f,
15777
+ name: COMPONENT_NAME$1h,
15096
15778
  props: props$S,
15097
15779
  emits: ['change'],
15098
15780
  setup(props, {
@@ -15327,7 +16009,7 @@
15327
16009
 
15328
16010
  /** @jsxImportSource vue */
15329
16011
 
15330
- const COMPONENT_NAME$1e = 'vc-scroller';
16012
+ const COMPONENT_NAME$1g = 'vc-scroller';
15331
16013
 
15332
16014
  /**
15333
16015
  * 作为备选方案,目前推荐使用ScrollerWheel
@@ -15338,7 +16020,7 @@
15338
16020
  * 2. 增加了一层嵌套
15339
16021
  */
15340
16022
  const Scroller = /* @__PURE__ */ vue.defineComponent({
15341
- name: COMPONENT_NAME$1e,
16023
+ name: COMPONENT_NAME$1g,
15342
16024
  props: props$R,
15343
16025
  emits: ['scroll'],
15344
16026
  setup(props, {
@@ -16285,7 +16967,7 @@
16285
16967
 
16286
16968
  /** @jsxImportSource vue */
16287
16969
 
16288
- const COMPONENT_NAME$1d = 'vc-scroller-wheel';
16970
+ const COMPONENT_NAME$1f = 'vc-scroller-wheel';
16289
16971
 
16290
16972
  /**
16291
16973
  * 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
@@ -16307,7 +16989,7 @@
16307
16989
  * 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
16308
16990
  */
16309
16991
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
16310
- name: COMPONENT_NAME$1d,
16992
+ name: COMPONENT_NAME$1f,
16311
16993
  props: Object.assign({}, props$R, {
16312
16994
  stopPropagation: {
16313
16995
  type: Boolean,
@@ -16496,9 +17178,9 @@
16496
17178
 
16497
17179
  /** @jsxImportSource vue */
16498
17180
 
16499
- const COMPONENT_NAME$1c = 'vc-drawer';
17181
+ const COMPONENT_NAME$1e = 'vc-drawer';
16500
17182
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
16501
- name: COMPONENT_NAME$1c,
17183
+ name: COMPONENT_NAME$1e,
16502
17184
  props: props$Q,
16503
17185
  emits: ['close', 'update:modelValue', 'visible-change'],
16504
17186
  setup(props, {
@@ -16687,9 +17369,9 @@
16687
17369
 
16688
17370
  /** @jsxImportSource vue */
16689
17371
 
16690
- const COMPONENT_NAME$1b = 'vc-dropdown';
17372
+ const COMPONENT_NAME$1d = 'vc-dropdown';
16691
17373
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
16692
- name: COMPONENT_NAME$1b,
17374
+ name: COMPONENT_NAME$1d,
16693
17375
  props: props$P,
16694
17376
  inheritAttrs: false,
16695
17377
  emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
@@ -16759,9 +17441,9 @@
16759
17441
 
16760
17442
  /** @jsxImportSource vue */
16761
17443
 
16762
- const COMPONENT_NAME$1a = 'vc-dropdown-menu';
17444
+ const COMPONENT_NAME$1c = 'vc-dropdown-menu';
16763
17445
  const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
16764
- name: COMPONENT_NAME$1a,
17446
+ name: COMPONENT_NAME$1c,
16765
17447
  setup(_, {
16766
17448
  slots
16767
17449
  }) {
@@ -16775,9 +17457,9 @@
16775
17457
 
16776
17458
  /** @jsxImportSource vue */
16777
17459
 
16778
- const COMPONENT_NAME$19 = 'vc-dropdown-item';
17460
+ const COMPONENT_NAME$1b = 'vc-dropdown-item';
16779
17461
  const DropdownItem = /* @__PURE__ */ vue.defineComponent({
16780
- name: COMPONENT_NAME$19,
17462
+ name: COMPONENT_NAME$1b,
16781
17463
  emits: ['click'],
16782
17464
  props: {
16783
17465
  value: {
@@ -17021,9 +17703,9 @@
17021
17703
 
17022
17704
  /** @jsxImportSource vue */
17023
17705
 
17024
- const COMPONENT_NAME$18 = 'vc-editor-toolbar';
17706
+ const COMPONENT_NAME$1a = 'vc-editor-toolbar';
17025
17707
  const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
17026
- name: COMPONENT_NAME$18,
17708
+ name: COMPONENT_NAME$1a,
17027
17709
  props: {
17028
17710
  options: [Array, Object],
17029
17711
  elementId: String
@@ -17231,9 +17913,9 @@
17231
17913
 
17232
17914
  /** @jsxImportSource vue */
17233
17915
 
17234
- const COMPONENT_NAME$17 = 'vc-image-preview';
17916
+ const COMPONENT_NAME$19 = 'vc-image-preview';
17235
17917
  const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
17236
- name: COMPONENT_NAME$17,
17918
+ name: COMPONENT_NAME$19,
17237
17919
  props: props$O,
17238
17920
  setup(props, {
17239
17921
  slots
@@ -19386,9 +20068,9 @@
19386
20068
  }
19387
20069
  };
19388
20070
 
19389
- const COMPONENT_NAME$16 = "vc-upload";
20071
+ const COMPONENT_NAME$18 = "vc-upload";
19390
20072
  const Upload$1 = vue.defineComponent({
19391
- name: COMPONENT_NAME$16,
20073
+ name: COMPONENT_NAME$18,
19392
20074
  props: props$N,
19393
20075
  emits: [
19394
20076
  "message",
@@ -19922,9 +20604,9 @@
19922
20604
 
19923
20605
  /** @jsxImportSource vue */
19924
20606
 
19925
- const COMPONENT_NAME$15 = 'vc-editor';
20607
+ const COMPONENT_NAME$17 = 'vc-editor';
19926
20608
  const Editor$1 = /* @__PURE__ */ vue.defineComponent({
19927
- name: COMPONENT_NAME$15,
20609
+ name: COMPONENT_NAME$17,
19928
20610
  props: props$M,
19929
20611
  defaults: defaults$1,
19930
20612
  emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
@@ -20113,7 +20795,7 @@
20113
20795
 
20114
20796
  /** @jsxImportSource vue */
20115
20797
 
20116
- const COMPONENT_NAME$14 = 'vc-editor-view';
20798
+ const COMPONENT_NAME$16 = 'vc-editor-view';
20117
20799
  const setImages = v => {
20118
20800
  if (!v) return;
20119
20801
  const IMG_REGX = /<img.*?(?:>|\/>)/gi;
@@ -20131,7 +20813,7 @@
20131
20813
  return;
20132
20814
  };
20133
20815
  const EditorView = /* @__PURE__ */ vue.defineComponent({
20134
- name: COMPONENT_NAME$14,
20816
+ name: COMPONENT_NAME$16,
20135
20817
  props: {
20136
20818
  value: {
20137
20819
  type: String,
@@ -20346,9 +21028,9 @@
20346
21028
  });
20347
21029
  };
20348
21030
 
20349
- const COMPONENT_NAME$13 = "vc-form";
21031
+ const COMPONENT_NAME$15 = "vc-form";
20350
21032
  const Form = vue.defineComponent({
20351
- name: COMPONENT_NAME$13,
21033
+ name: COMPONENT_NAME$15,
20352
21034
  props: props$L,
20353
21035
  setup(props, { slots, expose }) {
20354
21036
  useForm(expose);
@@ -20828,9 +21510,9 @@
20828
21510
 
20829
21511
  /** @jsxImportSource vue */
20830
21512
 
20831
- const COMPONENT_NAME$12 = 'vc-form-item';
21513
+ const COMPONENT_NAME$14 = 'vc-form-item';
20832
21514
  const FormItem = /* @__PURE__ */ vue.defineComponent({
20833
- name: COMPONENT_NAME$12,
21515
+ name: COMPONENT_NAME$14,
20834
21516
  props: props$K,
20835
21517
  setup(props, {
20836
21518
  slots,
@@ -20898,9 +21580,9 @@
20898
21580
  }
20899
21581
  };
20900
21582
 
20901
- const COMPONENT_NAME$11 = "vcm-form";
21583
+ const COMPONENT_NAME$13 = "vcm-form";
20902
21584
  const MForm = vue.defineComponent({
20903
- name: COMPONENT_NAME$11,
21585
+ name: COMPONENT_NAME$13,
20904
21586
  props: props$J,
20905
21587
  setup(props, { slots, expose }) {
20906
21588
  useForm(expose, {
@@ -20931,9 +21613,9 @@
20931
21613
 
20932
21614
  /** @jsxImportSource vue */
20933
21615
 
20934
- const COMPONENT_NAME$10 = 'vcm-form-item';
21616
+ const COMPONENT_NAME$12 = 'vcm-form-item';
20935
21617
  const MFormItem = /* @__PURE__ */ vue.defineComponent({
20936
- name: COMPONENT_NAME$10,
21618
+ name: COMPONENT_NAME$12,
20937
21619
  props: props$I,
20938
21620
  setup(props, {
20939
21621
  slots,
@@ -20988,9 +21670,9 @@
20988
21670
  }
20989
21671
  });
20990
21672
 
20991
- const COMPONENT_NAME$$ = "vc-fragment";
21673
+ const COMPONENT_NAME$11 = "vc-fragment";
20992
21674
  const Fragment = vue.defineComponent({
20993
- name: COMPONENT_NAME$$,
21675
+ name: COMPONENT_NAME$11,
20994
21676
  setup(_, { slots }) {
20995
21677
  return () => vue.h(vue.Fragment, slots.default?.());
20996
21678
  }
@@ -21029,9 +21711,9 @@
21029
21711
 
21030
21712
  /** @jsxImportSource vue */
21031
21713
 
21032
- const COMPONENT_NAME$_ = 'vc-snapshot';
21714
+ const COMPONENT_NAME$10 = 'vc-snapshot';
21033
21715
  const Snapshot = /* @__PURE__ */ vue.defineComponent({
21034
- name: COMPONENT_NAME$_,
21716
+ name: COMPONENT_NAME$10,
21035
21717
  props: props$H,
21036
21718
  emits: ['ready'],
21037
21719
  setup(props, {
@@ -21564,7 +22246,7 @@
21564
22246
 
21565
22247
  /** @jsxImportSource vue */
21566
22248
 
21567
- const COMPONENT_NAME$Z = 'vc-image';
22249
+ const COMPONENT_NAME$$ = 'vc-image';
21568
22250
  let isSupportObjectFit = false;
21569
22251
  window.addEventListener('DOMContentLoaded', () => {
21570
22252
  isSupportObjectFit = !IS_SERVER$1 && document.documentElement.style.objectFit !== undefined;
@@ -21577,7 +22259,7 @@
21577
22259
  SCALE_DOWN: 'scale-down'
21578
22260
  };
21579
22261
  const Image$2 = /* @__PURE__ */ vue.defineComponent({
21580
- name: COMPONENT_NAME$Z,
22262
+ name: COMPONENT_NAME$$,
21581
22263
  inheritAttrs: false,
21582
22264
  props: props$G,
21583
22265
  setup(props, {
@@ -21794,9 +22476,9 @@
21794
22476
 
21795
22477
  /** @jsxImportSource vue */
21796
22478
 
21797
- const COMPONENT_NAME$Y = 'vc-image-crop';
22479
+ const COMPONENT_NAME$_ = 'vc-image-crop';
21798
22480
  const ImageCrop = /* @__PURE__ */ vue.defineComponent({
21799
- name: COMPONENT_NAME$Y,
22481
+ name: COMPONENT_NAME$_,
21800
22482
  props: props$F,
21801
22483
  setup(props, {
21802
22484
  slots
@@ -21822,9 +22504,9 @@
21822
22504
 
21823
22505
  /** @jsxImportSource vue */
21824
22506
 
21825
- const COMPONENT_NAME$X = 'vc-image-processing';
22507
+ const COMPONENT_NAME$Z = 'vc-image-processing';
21826
22508
  const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
21827
- name: COMPONENT_NAME$X,
22509
+ name: COMPONENT_NAME$Z,
21828
22510
  props: props$E,
21829
22511
  setup(props, {
21830
22512
  slots
@@ -21841,9 +22523,9 @@
21841
22523
 
21842
22524
  /** @jsxImportSource vue */
21843
22525
 
21844
- const COMPONENT_NAME$W = 'vcm-input';
22526
+ const COMPONENT_NAME$Y = 'vcm-input';
21845
22527
  const MInput = /* @__PURE__ */ vue.defineComponent({
21846
- name: COMPONENT_NAME$W,
22528
+ name: COMPONENT_NAME$Y,
21847
22529
  inheritAttrs: false,
21848
22530
  props: {
21849
22531
  ...props$1h,
@@ -21932,9 +22614,9 @@
21932
22614
 
21933
22615
  /** @jsxImportSource vue */
21934
22616
 
21935
- const COMPONENT_NAME$V = 'vcm-input-number';
22617
+ const COMPONENT_NAME$X = 'vcm-input-number';
21936
22618
  const MInputNumber = /* @__PURE__ */ vue.defineComponent({
21937
- name: COMPONENT_NAME$V,
22619
+ name: COMPONENT_NAME$X,
21938
22620
  props: props$1g,
21939
22621
  inheritAttrs: false,
21940
22622
  setup(props, {
@@ -21983,9 +22665,9 @@
21983
22665
 
21984
22666
  /** @jsxImportSource vue */
21985
22667
 
21986
- const COMPONENT_NAME$U = 'vcm-input-search';
22668
+ const COMPONENT_NAME$W = 'vcm-input-search';
21987
22669
  const MInputSearch = /* @__PURE__ */ vue.defineComponent({
21988
- name: COMPONENT_NAME$U,
22670
+ name: COMPONENT_NAME$W,
21989
22671
  props: {
21990
22672
  ...props$1f,
21991
22673
  cancelText: {
@@ -22062,9 +22744,9 @@
22062
22744
  }
22063
22745
  };
22064
22746
 
22065
- const COMPONENT_NAME$T = "vcm-list";
22747
+ const COMPONENT_NAME$V = "vcm-list";
22066
22748
  const MList = vue.defineComponent({
22067
- name: COMPONENT_NAME$T,
22749
+ name: COMPONENT_NAME$V,
22068
22750
  props: props$D,
22069
22751
  setup(props, { slots }) {
22070
22752
  vue.provide("vc-list", { props });
@@ -22119,10 +22801,10 @@
22119
22801
 
22120
22802
  /** @jsxImportSource vue */
22121
22803
 
22122
- const COMPONENT_NAME$S = 'vcm-list-item';
22804
+ const COMPONENT_NAME$U = 'vcm-list-item';
22123
22805
  const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
22124
22806
  const MListItem = /* @__PURE__ */ vue.defineComponent({
22125
- name: COMPONENT_NAME$S,
22807
+ name: COMPONENT_NAME$U,
22126
22808
  props: props$C,
22127
22809
  emits: ['click'],
22128
22810
  setup(props, {
@@ -22216,11 +22898,11 @@
22216
22898
 
22217
22899
  /** @jsxImportSource vue */
22218
22900
 
22219
- const COMPONENT_NAME$R = 'vc-marquee';
22901
+ const COMPONENT_NAME$T = 'vc-marquee';
22220
22902
  const ANIMATION = prefixStyle('animation').camel;
22221
22903
  const TRANSFORM_KEBAB = prefixStyle('transform').kebab;
22222
22904
  const Marquee = /* @__PURE__ */ vue.defineComponent({
22223
- name: COMPONENT_NAME$R,
22905
+ name: COMPONENT_NAME$T,
22224
22906
  props: props$B,
22225
22907
  setup(props, {
22226
22908
  slots
@@ -22288,9 +22970,9 @@
22288
22970
  }
22289
22971
  };
22290
22972
 
22291
- const COMPONENT_NAME$Q = "vc-resizer";
22973
+ const COMPONENT_NAME$S = "vc-resizer";
22292
22974
  const Resizer = vue.defineComponent({
22293
- name: COMPONENT_NAME$Q,
22975
+ name: COMPONENT_NAME$S,
22294
22976
  props: props$A,
22295
22977
  emits: ["resize"],
22296
22978
  setup(props, { emit, slots, expose }) {
@@ -22460,10 +23142,10 @@
22460
23142
 
22461
23143
  /** @jsxImportSource vue */
22462
23144
 
22463
- const COMPONENT_NAME$P = 'vc-modal';
23145
+ const COMPONENT_NAME$R = 'vc-modal';
22464
23146
  let zIndexNumber = 1002;
22465
23147
  const ModalView = /* @__PURE__ */ vue.defineComponent({
22466
- name: COMPONENT_NAME$P,
23148
+ name: COMPONENT_NAME$R,
22467
23149
  emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
22468
23150
  props: props$z,
22469
23151
  setup(props, {
@@ -22902,9 +23584,9 @@
22902
23584
 
22903
23585
  /** @jsxImportSource vue */
22904
23586
 
22905
- const COMPONENT_NAME$O = 'vc-modal';
23587
+ const COMPONENT_NAME$Q = 'vc-modal';
22906
23588
  const MModalView = /* @__PURE__ */ vue.defineComponent({
22907
- name: COMPONENT_NAME$O,
23589
+ name: COMPONENT_NAME$Q,
22908
23590
  emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
22909
23591
  props: props$y,
22910
23592
  setup(props, {
@@ -23116,9 +23798,9 @@
23116
23798
 
23117
23799
  /** @jsxImportSource vue */
23118
23800
 
23119
- const COMPONENT_NAME$N = 'vc-notice';
23801
+ const COMPONENT_NAME$P = 'vc-notice';
23120
23802
  const NoticeView = /* @__PURE__ */ vue.defineComponent({
23121
- name: COMPONENT_NAME$N,
23803
+ name: COMPONENT_NAME$P,
23122
23804
  props: props$x,
23123
23805
  emits: ['portal-fulfilled', 'close', 'before-close'],
23124
23806
  setup(props, {
@@ -23291,9 +23973,9 @@
23291
23973
 
23292
23974
  /** @jsxImportSource vue */
23293
23975
 
23294
- const COMPONENT_NAME$M = 'vc-option';
23976
+ const COMPONENT_NAME$O = 'vc-option';
23295
23977
  const Option$1 = /* @__PURE__ */ vue.defineComponent({
23296
- name: COMPONENT_NAME$M,
23978
+ name: COMPONENT_NAME$O,
23297
23979
  props: props$w,
23298
23980
  setup(props, {
23299
23981
  slots
@@ -23377,9 +24059,9 @@
23377
24059
 
23378
24060
  /** @jsxImportSource vue */
23379
24061
 
23380
- const COMPONENT_NAME$L = 'vc-tag';
24062
+ const COMPONENT_NAME$N = 'vc-tag';
23381
24063
  const Tag = /* @__PURE__ */ vue.defineComponent({
23382
- name: COMPONENT_NAME$L,
24064
+ name: COMPONENT_NAME$N,
23383
24065
  props: props$u,
23384
24066
  emits: ['close', 'change'],
23385
24067
  setup(props, {
@@ -23450,9 +24132,9 @@
23450
24132
 
23451
24133
  /** @jsxImportSource vue */
23452
24134
 
23453
- const COMPONENT_NAME$K = 'vc-select-option';
24135
+ const COMPONENT_NAME$M = 'vc-select-option';
23454
24136
  const Option = /* @__PURE__ */ vue.defineComponent({
23455
- name: COMPONENT_NAME$K,
24137
+ name: COMPONENT_NAME$M,
23456
24138
  props: props$t,
23457
24139
  setup(props, {
23458
24140
  slots,
@@ -23547,9 +24229,9 @@
23547
24229
 
23548
24230
  /** @jsxImportSource vue */
23549
24231
 
23550
- const COMPONENT_NAME$J = 'vc-select-option-group';
24232
+ const COMPONENT_NAME$L = 'vc-select-option-group';
23551
24233
  const OptionGroup = /* @__PURE__ */ vue.defineComponent({
23552
- name: COMPONENT_NAME$J,
24234
+ name: COMPONENT_NAME$L,
23553
24235
  props: props$s,
23554
24236
  setup(props, {
23555
24237
  slots
@@ -23579,9 +24261,9 @@
23579
24261
 
23580
24262
  /** @jsxImportSource vue */
23581
24263
 
23582
- const COMPONENT_NAME$I = 'vc-select-all';
24264
+ const COMPONENT_NAME$K = 'vc-select-all';
23583
24265
  const SelectAll = /* @__PURE__ */ vue.defineComponent({
23584
- name: COMPONENT_NAME$I,
24266
+ name: COMPONENT_NAME$K,
23585
24267
  props: {
23586
24268
  data: {
23587
24269
  type: Array,
@@ -23651,9 +24333,9 @@
23651
24333
 
23652
24334
  /** @jsxImportSource vue */
23653
24335
 
23654
- const COMPONENT_NAME$H = 'vc-select';
24336
+ const COMPONENT_NAME$J = 'vc-select';
23655
24337
  const Select = /* @__PURE__ */ vue.defineComponent({
23656
- name: COMPONENT_NAME$H,
24338
+ name: COMPONENT_NAME$J,
23657
24339
  props: props$1a,
23658
24340
  emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
23659
24341
  setup(props, {
@@ -23947,9 +24629,9 @@
23947
24629
 
23948
24630
  /** @jsxImportSource vue */
23949
24631
 
23950
- const COMPONENT_NAME$G = 'vc-pagination';
24632
+ const COMPONENT_NAME$I = 'vc-pagination';
23951
24633
  const Pagination = /* @__PURE__ */ vue.defineComponent({
23952
- name: COMPONENT_NAME$G,
24634
+ name: COMPONENT_NAME$I,
23953
24635
  props: props$v,
23954
24636
  emits: ['update:current', 'change', 'page-size-change'],
23955
24637
  setup(props, {
@@ -24147,9 +24829,9 @@
24147
24829
 
24148
24830
  /** @jsxImportSource vue */
24149
24831
 
24150
- const COMPONENT_NAME$F = 'vc-picker';
24832
+ const COMPONENT_NAME$H = 'vc-picker';
24151
24833
  const Picker$1 = /* @__PURE__ */ vue.defineComponent({
24152
- name: COMPONENT_NAME$F,
24834
+ name: COMPONENT_NAME$H,
24153
24835
  props: props$r,
24154
24836
  setup(props, {
24155
24837
  slots
@@ -24212,9 +24894,9 @@
24212
24894
 
24213
24895
  /** @jsxImportSource vue */
24214
24896
 
24215
- const COMPONENT_NAME$E = 'vc-popconfirm';
24897
+ const COMPONENT_NAME$G = 'vc-popconfirm';
24216
24898
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
24217
- name: COMPONENT_NAME$E,
24899
+ name: COMPONENT_NAME$G,
24218
24900
  props: props$q,
24219
24901
  inheritAttrs: false,
24220
24902
  emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
@@ -24382,9 +25064,9 @@
24382
25064
 
24383
25065
  /** @jsxImportSource vue */
24384
25066
 
24385
- const COMPONENT_NAME$D = 'vc-popup';
25067
+ const COMPONENT_NAME$F = 'vc-popup';
24386
25068
  const MPopup = /* @__PURE__ */ vue.defineComponent({
24387
- name: COMPONENT_NAME$D,
25069
+ name: COMPONENT_NAME$F,
24388
25070
  props: props$p,
24389
25071
  emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change'],
24390
25072
  setup(props, {
@@ -24511,9 +25193,9 @@
24511
25193
 
24512
25194
  /** @jsxImportSource vue */
24513
25195
 
24514
- const COMPONENT_NAME$C = 'vc-print';
25196
+ const COMPONENT_NAME$E = 'vc-print';
24515
25197
  const Print = /* @__PURE__ */ vue.defineComponent({
24516
- name: COMPONENT_NAME$C,
25198
+ name: COMPONENT_NAME$E,
24517
25199
  props: props$o,
24518
25200
  setup(props, {
24519
25201
  expose,
@@ -24593,7 +25275,7 @@
24593
25275
  },
24594
25276
  strokeColor: {
24595
25277
  type: String,
24596
- default: "#2d8cf0"
25278
+ default: "#456CF6"
24597
25279
  },
24598
25280
  trackColor: {
24599
25281
  type: String,
@@ -24615,9 +25297,9 @@
24615
25297
 
24616
25298
  /** @jsxImportSource vue */
24617
25299
 
24618
- const COMPONENT_NAME$B = 'vc-progress-circle';
25300
+ const COMPONENT_NAME$D = 'vc-progress-circle';
24619
25301
  const Circle$1 = /* @__PURE__ */ vue.defineComponent({
24620
- name: COMPONENT_NAME$B,
25302
+ name: COMPONENT_NAME$D,
24621
25303
  props: props$n,
24622
25304
  setup(props, {
24623
25305
  slots
@@ -24677,9 +25359,9 @@
24677
25359
 
24678
25360
  /** @jsxImportSource vue */
24679
25361
 
24680
- const COMPONENT_NAME$A = 'vc-progress-line';
25362
+ const COMPONENT_NAME$C = 'vc-progress-line';
24681
25363
  const Line$2 = /* @__PURE__ */ vue.defineComponent({
24682
- name: COMPONENT_NAME$A,
25364
+ name: COMPONENT_NAME$C,
24683
25365
  props: props$n,
24684
25366
  setup(props) {
24685
25367
  const colorStyle = vue.computed(() => {
@@ -24726,9 +25408,9 @@
24726
25408
  function _isSlot(s) {
24727
25409
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
24728
25410
  }
24729
- const COMPONENT_NAME$z = 'vc-progress';
25411
+ const COMPONENT_NAME$B = 'vc-progress';
24730
25412
  const Progress = /* @__PURE__ */ vue.defineComponent({
24731
- name: COMPONENT_NAME$z,
25413
+ name: COMPONENT_NAME$B,
24732
25414
  props: props$n,
24733
25415
  setup(props, {
24734
25416
  slots
@@ -24890,9 +25572,9 @@
24890
25572
 
24891
25573
  /** @jsxImportSource vue */
24892
25574
 
24893
- const COMPONENT_NAME$y = 'vc-radio';
25575
+ const COMPONENT_NAME$A = 'vc-radio';
24894
25576
  const Radio = /* @__PURE__ */ vue.defineComponent({
24895
- name: COMPONENT_NAME$y,
25577
+ name: COMPONENT_NAME$A,
24896
25578
  props: props$m,
24897
25579
  emits: ['update:modelValue', 'change'],
24898
25580
  setup(props, {
@@ -24936,9 +25618,9 @@
24936
25618
 
24937
25619
  /** @jsxImportSource vue */
24938
25620
 
24939
- const COMPONENT_NAME$x = 'vc-radio-button';
25621
+ const COMPONENT_NAME$z = 'vc-radio-button';
24940
25622
  const RadioButton = /* @__PURE__ */ vue.defineComponent({
24941
- name: COMPONENT_NAME$x,
25623
+ name: COMPONENT_NAME$z,
24942
25624
  props: {
24943
25625
  ...props$m,
24944
25626
  labelStyle: [String, Object],
@@ -25051,9 +25733,9 @@
25051
25733
 
25052
25734
  /** @jsxImportSource vue */
25053
25735
 
25054
- const COMPONENT_NAME$w = 'vc-radio-group';
25736
+ const COMPONENT_NAME$y = 'vc-radio-group';
25055
25737
  const RadioGroup = /* @__PURE__ */ vue.defineComponent({
25056
- name: COMPONENT_NAME$w,
25738
+ name: COMPONENT_NAME$y,
25057
25739
  props: props$l,
25058
25740
  emits: ['update:modelValue', 'change'],
25059
25741
  setup(props, {
@@ -25074,9 +25756,9 @@
25074
25756
 
25075
25757
  /** @jsxImportSource vue */
25076
25758
 
25077
- const COMPONENT_NAME$v = 'vcm-radio';
25759
+ const COMPONENT_NAME$x = 'vcm-radio';
25078
25760
  const MRadio = /* @__PURE__ */ vue.defineComponent({
25079
- name: COMPONENT_NAME$v,
25761
+ name: COMPONENT_NAME$x,
25080
25762
  props: props$m,
25081
25763
  emits: ['update:modelValue', 'change'],
25082
25764
  setup(props, {
@@ -25120,9 +25802,9 @@
25120
25802
 
25121
25803
  /** @jsxImportSource vue */
25122
25804
 
25123
- const COMPONENT_NAME$u = 'vcm-radio-group';
25805
+ const COMPONENT_NAME$w = 'vcm-radio-group';
25124
25806
  const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
25125
- name: COMPONENT_NAME$u,
25807
+ name: COMPONENT_NAME$w,
25126
25808
  props: props$l,
25127
25809
  emits: ['update:modelValue', 'change'],
25128
25810
  setup(props, {
@@ -25189,9 +25871,9 @@
25189
25871
 
25190
25872
  /** @jsxImportSource vue */
25191
25873
 
25192
- const COMPONENT_NAME$t = 'vc-rate';
25874
+ const COMPONENT_NAME$v = 'vc-rate';
25193
25875
  const Rate = /* @__PURE__ */ vue.defineComponent({
25194
- name: COMPONENT_NAME$t,
25876
+ name: COMPONENT_NAME$v,
25195
25877
  props: props$k,
25196
25878
  emits: ['update:modelValue', 'change'],
25197
25879
  setup(props, {
@@ -25507,9 +26189,9 @@
25507
26189
 
25508
26190
  /** @jsxImportSource vue */
25509
26191
 
25510
- const COMPONENT_NAME$s = 'vc-recycle-list-scroll-state';
26192
+ const COMPONENT_NAME$u = 'vc-recycle-list-scroll-state';
25511
26193
  const ScrollState = /* @__PURE__ */ vue.defineComponent({
25512
- name: COMPONENT_NAME$s,
26194
+ name: COMPONENT_NAME$u,
25513
26195
  setup(_, {
25514
26196
  slots
25515
26197
  }) {
@@ -25639,12 +26321,12 @@
25639
26321
 
25640
26322
  /** @jsxImportSource vue */
25641
26323
 
25642
- const COMPONENT_NAME$r = 'vc-recycle-list-container';
26324
+ const COMPONENT_NAME$t = 'vc-recycle-list-container';
25643
26325
 
25644
26326
  // TODO: 抽离
25645
26327
  const transformKey = prefixStyle('transform').camel;
25646
26328
  const Container$1 = /* @__PURE__ */ vue.defineComponent({
25647
- name: COMPONENT_NAME$r,
26329
+ name: COMPONENT_NAME$t,
25648
26330
  props: props$i,
25649
26331
  emits: ['refresh'],
25650
26332
  setup(props, {
@@ -25742,9 +26424,9 @@
25742
26424
 
25743
26425
  /** @jsxImportSource vue */
25744
26426
 
25745
- const COMPONENT_NAME$q = 'vc-recycle-list';
26427
+ const COMPONENT_NAME$s = 'vc-recycle-list';
25746
26428
  const RecycleList = /* @__PURE__ */ vue.defineComponent({
25747
- name: COMPONENT_NAME$q,
26429
+ name: COMPONENT_NAME$s,
25748
26430
  props: props$j,
25749
26431
  emits: ['scroll', 'row-resize'],
25750
26432
  setup(props, {
@@ -26318,9 +27000,9 @@
26318
27000
 
26319
27001
  /** @jsxImportSource vue */
26320
27002
 
26321
- const COMPONENT_NAME$p = 'vc-slider';
27003
+ const COMPONENT_NAME$r = 'vc-slider';
26322
27004
  const Slider = /* @__PURE__ */ vue.defineComponent({
26323
- name: COMPONENT_NAME$p,
27005
+ name: COMPONENT_NAME$r,
26324
27006
  props: props$h,
26325
27007
  setup(props, {
26326
27008
  slots
@@ -26344,9 +27026,9 @@
26344
27026
 
26345
27027
  /** @jsxImportSource vue */
26346
27028
 
26347
- const COMPONENT_NAME$o = 'vc-sort-list';
27029
+ const COMPONENT_NAME$q = 'vc-sort-list';
26348
27030
  const SortList = /* @__PURE__ */ vue.defineComponent({
26349
- name: COMPONENT_NAME$o,
27031
+ name: COMPONENT_NAME$q,
26350
27032
  props: props$g,
26351
27033
  setup(props, {
26352
27034
  slots
@@ -26370,9 +27052,9 @@
26370
27052
 
26371
27053
  /** @jsxImportSource vue */
26372
27054
 
26373
- const COMPONENT_NAME$n = 'vc-steps';
27055
+ const COMPONENT_NAME$p = 'vc-steps';
26374
27056
  const Steps = /* @__PURE__ */ vue.defineComponent({
26375
- name: COMPONENT_NAME$n,
27057
+ name: COMPONENT_NAME$p,
26376
27058
  props: props$f,
26377
27059
  setup(props, {
26378
27060
  slots
@@ -26498,9 +27180,9 @@
26498
27180
 
26499
27181
  /** @jsxImportSource vue */
26500
27182
 
26501
- const COMPONENT_NAME$m = 'vc-switch';
27183
+ const COMPONENT_NAME$o = 'vc-switch';
26502
27184
  const Switch = /* @__PURE__ */ vue.defineComponent({
26503
- name: COMPONENT_NAME$m,
27185
+ name: COMPONENT_NAME$o,
26504
27186
  props: props$e,
26505
27187
  // click -> onClick要被拦截,此处不能放置
26506
27188
  emits: ['update:modelValue', 'change', 'click'],
@@ -26574,9 +27256,9 @@
26574
27256
 
26575
27257
  /** @jsxImportSource vue */
26576
27258
 
26577
- const COMPONENT_NAME$l = 'vcm-switch';
27259
+ const COMPONENT_NAME$n = 'vcm-switch';
26578
27260
  const MSwitch = /* @__PURE__ */ vue.defineComponent({
26579
- name: COMPONENT_NAME$l,
27261
+ name: COMPONENT_NAME$n,
26580
27262
  props: props$e,
26581
27263
  // click -> onClick要被拦截,此处不能放置
26582
27264
  emits: ['update:modelValue', 'change', 'click'],
@@ -27689,9 +28371,9 @@
27689
28371
 
27690
28372
  /** @jsxImportSource vue */
27691
28373
 
27692
- const COMPONENT_NAME$k = 'vc-table-normal-list';
28374
+ const COMPONENT_NAME$m = 'vc-table-normal-list';
27693
28375
  const NormalList = /* @__PURE__ */ vue.defineComponent({
27694
- name: COMPONENT_NAME$k,
28376
+ name: COMPONENT_NAME$m,
27695
28377
  props: {
27696
28378
  data: {
27697
28379
  type: Array,
@@ -28692,9 +29374,9 @@
28692
29374
 
28693
29375
  /** @jsxImportSource vue */
28694
29376
 
28695
- const COMPONENT_NAME$j = 'vc-table';
29377
+ const COMPONENT_NAME$l = 'vc-table';
28696
29378
  const Table$1 = /* @__PURE__ */ vue.defineComponent({
28697
- name: COMPONENT_NAME$j,
29379
+ name: COMPONENT_NAME$l,
28698
29380
  props: props$d,
28699
29381
  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', 'update:sort'],
28700
29382
  setup(props, {
@@ -29897,9 +30579,9 @@
29897
30579
 
29898
30580
  /** @jsxImportSource vue */
29899
30581
 
29900
- const COMPONENT_NAME$i = 'vc-tabs';
30582
+ const COMPONENT_NAME$k = 'vc-tabs';
29901
30583
  const Tabs = /* @__PURE__ */ vue.defineComponent({
29902
- name: COMPONENT_NAME$i,
30584
+ name: COMPONENT_NAME$k,
29903
30585
  props: props$c,
29904
30586
  emits: ['update:modelValue', 'change', 'click'],
29905
30587
  setup(props, {
@@ -30152,9 +30834,9 @@
30152
30834
 
30153
30835
  /** @jsxImportSource vue */
30154
30836
 
30155
- const COMPONENT_NAME$h = 'vc-tabs-pane';
30837
+ const COMPONENT_NAME$j = 'vc-tabs-pane';
30156
30838
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
30157
- name: COMPONENT_NAME$h,
30839
+ name: COMPONENT_NAME$j,
30158
30840
  props: props$b,
30159
30841
  setup(_, {
30160
30842
  slots
@@ -30209,9 +30891,9 @@
30209
30891
 
30210
30892
  /** @jsxImportSource vue */
30211
30893
 
30212
- const COMPONENT_NAME$g = 'vcm-tabs';
30894
+ const COMPONENT_NAME$i = 'vcm-tabs';
30213
30895
  const MTabs = /* @__PURE__ */ vue.defineComponent({
30214
- name: COMPONENT_NAME$g,
30896
+ name: COMPONENT_NAME$i,
30215
30897
  props: props$a,
30216
30898
  emits: ['update:modelValue', 'change', 'click'],
30217
30899
  setup(props, {
@@ -30476,9 +31158,9 @@
30476
31158
 
30477
31159
  /** @jsxImportSource vue */
30478
31160
 
30479
- const COMPONENT_NAME$f = 'vcm-tabs-pane';
31161
+ const COMPONENT_NAME$h = 'vcm-tabs-pane';
30480
31162
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
30481
- name: COMPONENT_NAME$f,
31163
+ name: COMPONENT_NAME$h,
30482
31164
  props: props$b,
30483
31165
  setup(_, {
30484
31166
  slots
@@ -30542,9 +31224,9 @@
30542
31224
 
30543
31225
  /** @jsxImportSource vue */
30544
31226
 
30545
- const COMPONENT_NAME$e = 'vc-text';
31227
+ const COMPONENT_NAME$g = 'vc-text';
30546
31228
  const Text$2 = /* @__PURE__ */ vue.defineComponent({
30547
- name: COMPONENT_NAME$e,
31229
+ name: COMPONENT_NAME$g,
30548
31230
  props: props$9,
30549
31231
  setup(props, {
30550
31232
  emit
@@ -30911,9 +31593,9 @@
30911
31593
 
30912
31594
  /** @jsxImportSource vue */
30913
31595
 
30914
- const COMPONENT_NAME$d = 'vc-textarea';
31596
+ const COMPONENT_NAME$f = 'vc-textarea';
30915
31597
  const Textarea = /* @__PURE__ */ vue.defineComponent({
30916
- name: COMPONENT_NAME$d,
31598
+ name: COMPONENT_NAME$f,
30917
31599
  props: Object.assign({}, props$8, {
30918
31600
  indicator: {
30919
31601
  type: [Boolean, Object],
@@ -30969,9 +31651,9 @@
30969
31651
 
30970
31652
  /** @jsxImportSource vue */
30971
31653
 
30972
- const COMPONENT_NAME$c = 'vcm-textarea';
31654
+ const COMPONENT_NAME$e = 'vcm-textarea';
30973
31655
  const MTextarea = /* @__PURE__ */ vue.defineComponent({
30974
- name: COMPONENT_NAME$c,
31656
+ name: COMPONENT_NAME$e,
30975
31657
  props: Object.assign({}, props$8, {
30976
31658
  align: {
30977
31659
  type: String,
@@ -31054,9 +31736,9 @@
31054
31736
  }
31055
31737
  };
31056
31738
 
31057
- const COMPONENT_NAME$b = "vc-theme";
31739
+ const COMPONENT_NAME$d = "vc-theme";
31058
31740
  const Theme$1 = vue.defineComponent({
31059
- name: COMPONENT_NAME$b,
31741
+ name: COMPONENT_NAME$d,
31060
31742
  props: props$7,
31061
31743
  setup(props, { slots }) {
31062
31744
  const themeId = getUid("vc-theme");
@@ -31139,9 +31821,9 @@
31139
31821
  }
31140
31822
  });
31141
31823
 
31142
- const COMPONENT_NAME$a = "vc-theme-view";
31824
+ const COMPONENT_NAME$c = "vc-theme-view";
31143
31825
  const ThemeView = vue.defineComponent({
31144
- name: COMPONENT_NAME$a,
31826
+ name: COMPONENT_NAME$c,
31145
31827
  props: props$7,
31146
31828
  setup(props, { slots }) {
31147
31829
  return () => {
@@ -31157,9 +31839,9 @@
31157
31839
  }
31158
31840
  });
31159
31841
 
31160
- const COMPONENT_NAME$9 = "vc-theme-text";
31842
+ const COMPONENT_NAME$b = "vc-theme-text";
31161
31843
  const ThemeText = vue.defineComponent({
31162
- name: COMPONENT_NAME$9,
31844
+ name: COMPONENT_NAME$b,
31163
31845
  props: props$7,
31164
31846
  setup(props, { slots }) {
31165
31847
  return () => {
@@ -31175,9 +31857,9 @@
31175
31857
  }
31176
31858
  });
31177
31859
 
31178
- const COMPONENT_NAME$8 = "vc-theme-image";
31860
+ const COMPONENT_NAME$a = "vc-theme-image";
31179
31861
  const ThemeImage = vue.defineComponent({
31180
- name: COMPONENT_NAME$8,
31862
+ name: COMPONENT_NAME$a,
31181
31863
  props: props$7,
31182
31864
  setup(props, { slots }) {
31183
31865
  return () => {
@@ -31229,12 +31911,12 @@
31229
31911
 
31230
31912
  /** @jsxImportSource vue */
31231
31913
 
31232
- const COMPONENT_NAME$7 = 'vc-time-picker';
31914
+ const COMPONENT_NAME$9 = 'vc-time-picker';
31233
31915
  const getPanel = type => {
31234
31916
  const isRange = type === 'timerange';
31235
31917
  return isRange ? TimeRangePanel : TimePanel;
31236
31918
  };
31237
- const TimePicker = createPicker(COMPONENT_NAME$7, props$6, () => {
31919
+ const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
31238
31920
  const props = vue.getCurrentInstance().props;
31239
31921
  const icon = vue.ref('icon');
31240
31922
  const panel = vue.shallowRef({});
@@ -31270,9 +31952,9 @@
31270
31952
 
31271
31953
  /** @jsxImportSource vue */
31272
31954
 
31273
- const COMPONENT_NAME$6 = 'vc-timeline';
31955
+ const COMPONENT_NAME$8 = 'vc-timeline';
31274
31956
  const Timeline = /* @__PURE__ */ vue.defineComponent({
31275
- name: COMPONENT_NAME$6,
31957
+ name: COMPONENT_NAME$8,
31276
31958
  props: props$5,
31277
31959
  setup(props, {
31278
31960
  slots
@@ -31299,9 +31981,9 @@
31299
31981
 
31300
31982
  /** @jsxImportSource vue */
31301
31983
 
31302
- const COMPONENT_NAME$5 = 'vc-touch';
31984
+ const COMPONENT_NAME$7 = 'vc-touch';
31303
31985
  const Touch = /* @__PURE__ */ vue.defineComponent({
31304
- name: COMPONENT_NAME$5,
31986
+ name: COMPONENT_NAME$7,
31305
31987
  props: props$4,
31306
31988
  setup(props, {
31307
31989
  slots
@@ -31809,21 +32491,68 @@
31809
32491
  parentNode.insertChild({ data });
31810
32492
  }
31811
32493
  }
32494
+ /**
32495
+ * 级联非 strict:仅对「选中集合里的最深节点」做 setChecked(true, deep),
32496
+ * 避免对祖先逐个 deep 勾选把未出现在 checkedValues 里的兄弟子树再次全选。
32497
+ * @param checkedValues ~
32498
+ * @returns ~
32499
+ */
32500
+ _getCascadeCheckedAnchorIds(checkedValues) {
32501
+ const checkedSet = new Set(checkedValues);
32502
+ const nodesMap = this.nodesMap;
32503
+ const anchors = [];
32504
+ for (const id of checkedValues) {
32505
+ const node = nodesMap[id];
32506
+ if (!node) continue;
32507
+ const hasSelectedChildInSet = node.childNodes.some(
32508
+ (child) => checkedSet.has(child.getter.value)
32509
+ );
32510
+ if (!hasSelectedChildInSet) {
32511
+ anchors.push(id);
32512
+ }
32513
+ }
32514
+ anchors.sort((a, b) => {
32515
+ const na = nodesMap[a];
32516
+ const nb = nodesMap[b];
32517
+ if (!na || !nb) return 0;
32518
+ return nb.states.level - na.states.level;
32519
+ });
32520
+ return anchors;
32521
+ }
31812
32522
  _initDefaultCheckedNodes() {
31813
32523
  const checkedValues = this.checkedValues || [];
31814
32524
  const nodesMap = this.nodesMap;
31815
- checkedValues.forEach((id) => {
32525
+ if (this.checkStrictly) {
32526
+ checkedValues.forEach((id) => {
32527
+ const node = nodesMap[id];
32528
+ if (node) {
32529
+ node.setChecked(true, false);
32530
+ }
32531
+ });
32532
+ return;
32533
+ }
32534
+ const anchorIds = this._getCascadeCheckedAnchorIds(checkedValues);
32535
+ anchorIds.forEach((id) => {
31816
32536
  const node = nodesMap[id];
31817
32537
  if (node) {
31818
- node.setChecked(true, !this.checkStrictly);
32538
+ node.setChecked(true, true);
31819
32539
  }
31820
32540
  });
31821
32541
  }
31822
32542
  _initDefaultCheckedNode(node) {
31823
32543
  const checkedValues = this.checkedValues || [];
31824
32544
  const nodeValue = node.getter.value;
31825
- if (checkedValues.indexOf(nodeValue) !== -1) {
31826
- node.setChecked(true, !this.checkStrictly);
32545
+ if (checkedValues.indexOf(nodeValue) === -1) return;
32546
+ if (this.checkStrictly) {
32547
+ node.setChecked(true, false);
32548
+ return;
32549
+ }
32550
+ const checkedSet = new Set(checkedValues);
32551
+ const hasSelectedChildInSet = node.childNodes.some(
32552
+ (child) => checkedSet.has(child.getter.value)
32553
+ );
32554
+ if (!hasSelectedChildInSet) {
32555
+ node.setChecked(true, true);
31827
32556
  }
31828
32557
  }
31829
32558
  setCheckedValues(newVal) {
@@ -32051,9 +32780,9 @@
32051
32780
 
32052
32781
  /** @jsxImportSource vue */
32053
32782
 
32054
- const COMPONENT_NAME$4 = 'vc-tree-node';
32783
+ const COMPONENT_NAME$6 = 'vc-tree-node';
32055
32784
  const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
32056
- name: COMPONENT_NAME$4,
32785
+ name: COMPONENT_NAME$6,
32057
32786
  props: props$3,
32058
32787
  emits: ['node-expand'],
32059
32788
  setup(props, {
@@ -32552,9 +33281,9 @@
32552
33281
 
32553
33282
  /** @jsxImportSource vue */
32554
33283
 
32555
- const COMPONENT_NAME$3 = 'vc-tree';
33284
+ const COMPONENT_NAME$5 = 'vc-tree';
32556
33285
  const Tree$1 = /* @__PURE__ */ vue.defineComponent({
32557
- name: COMPONENT_NAME$3,
33286
+ name: COMPONENT_NAME$5,
32558
33287
  props: props$2,
32559
33288
  emits: ['update:modelValue', 'change', 'check-change', 'current-change', 'node-click', 'node-contextmenu', 'node-collapse', 'node-expand', 'check', 'node-drag-start', 'node-drag-end', 'node-drop', 'node-drag-leave', 'node-drag-enter', 'node-drag-over'],
32560
33289
  setup(props, {
@@ -32749,6 +33478,225 @@
32749
33478
  }
32750
33479
  });
32751
33480
 
33481
+ /** @jsxImportSource vue */
33482
+
33483
+ const COMPONENT_NAME$4 = 'vc-tree-select-content';
33484
+ const TreeSelectContent = /* @__PURE__ */ vue.defineComponent({
33485
+ name: COMPONENT_NAME$4,
33486
+ props: {
33487
+ value: {
33488
+ type: Array,
33489
+ required: true
33490
+ },
33491
+ data: {
33492
+ type: Array,
33493
+ default: () => []
33494
+ },
33495
+ checkStrictly: {
33496
+ type: Boolean,
33497
+ default: false
33498
+ },
33499
+ renderNodeLabel: Function
33500
+ },
33501
+ emits: ['change'],
33502
+ setup(props, {
33503
+ emit
33504
+ }) {
33505
+ return () => {
33506
+ return vue.createVNode(Scroller, {
33507
+ "class": "vc-tree-select__options",
33508
+ "max-height": "200px"
33509
+ }, {
33510
+ default: () => [vue.createVNode(Tree$1, {
33511
+ "model-value": props.value,
33512
+ "expanded-values": props.value,
33513
+ "data": props.data,
33514
+ "checkStrictly": props.checkStrictly,
33515
+ "allowDispatch": false,
33516
+ "showCheckbox": true,
33517
+ "renderNodeLabel": props.renderNodeLabel,
33518
+ "onChange": (_, data) => emit('change', _, data)
33519
+ }, null)]
33520
+ });
33521
+ };
33522
+ }
33523
+ });
33524
+
33525
+ /** @jsxImportSource vue */
33526
+
33527
+ const COMPONENT_NAME$3 = 'vc-tree-select-content-cascader';
33528
+ const TreeSelectContentCascader = /* @__PURE__ */ vue.defineComponent({
33529
+ name: COMPONENT_NAME$3,
33530
+ props: {
33531
+ value: {
33532
+ type: Array,
33533
+ required: true
33534
+ },
33535
+ data: {
33536
+ type: Array,
33537
+ default: () => []
33538
+ },
33539
+ checkStrictly: {
33540
+ type: Boolean,
33541
+ default: false
33542
+ },
33543
+ renderNodeLabel: Function,
33544
+ numerable: {
33545
+ type: Boolean,
33546
+ default: false
33547
+ },
33548
+ separator: {
33549
+ type: String,
33550
+ default: ','
33551
+ },
33552
+ max: {
33553
+ type: Number,
33554
+ default: 1
33555
+ },
33556
+ nullValue: {
33557
+ type: [Number, String, Object],
33558
+ default: void 0
33559
+ }
33560
+ },
33561
+ emits: ['change'],
33562
+ setup(props, {
33563
+ emit
33564
+ }) {
33565
+ const treeRef = vue.ref(null);
33566
+ /** hover 展开路径,与 Cascader 一致 */
33567
+ const currentValue = vue.ref([]);
33568
+ const rebuildData = vue.computed(() => {
33569
+ if (!props.data.length) return [];
33570
+ let temp = props.data;
33571
+ const data = [];
33572
+ currentValue.value.forEach(cur => {
33573
+ const col = temp;
33574
+ data.push(col);
33575
+ const next = (temp.find(i => i.value == cur) || {}).children || [];
33576
+ temp = next;
33577
+ });
33578
+ data.push(temp);
33579
+ return data;
33580
+ });
33581
+ /** 驱动列区在 TreeStore 更新后重绘 */
33582
+ const panelTick = vue.ref(0);
33583
+ const columns = vue.computed(() => Array.from({
33584
+ length: currentValue.value.length + 1
33585
+ }).map((_, index) => index));
33586
+ const handleHover = (value, columnIndex) => {
33587
+ const len = currentValue.value.length - columnIndex;
33588
+ currentValue.value.splice(columnIndex, len, value);
33589
+ };
33590
+ const sync = async () => {
33591
+ await vue.nextTick();
33592
+ const tree = treeRef.value;
33593
+ if (!tree) return;
33594
+ const data = {
33595
+ checkedNodes: tree.getCheckedNodes(),
33596
+ checkedValues: tree.getCheckedValues(),
33597
+ halfCheckedNodes: tree.getHalfCheckedNodes(),
33598
+ halfCheckedValues: tree.getHalfCheckedValues()
33599
+ };
33600
+ panelTick.value++;
33601
+ emit('change', null, data);
33602
+ };
33603
+ const getNodeState = item => {
33604
+ const tree = treeRef.value;
33605
+ if (!tree) {
33606
+ return {
33607
+ checked: false,
33608
+ indeterminate: false
33609
+ };
33610
+ }
33611
+ const node = tree.getNode(item);
33612
+ if (!node) {
33613
+ return {
33614
+ checked: false,
33615
+ indeterminate: false
33616
+ };
33617
+ }
33618
+ return {
33619
+ checked: !!node.states.checked,
33620
+ indeterminate: !!node.states.indeterminate
33621
+ };
33622
+ };
33623
+ const hasChildren = item => {
33624
+ return !!(item.children && item.children.length > 0);
33625
+ };
33626
+ const handleCheckboxChange = async (v, item) => {
33627
+ const tree = treeRef.value;
33628
+ if (!tree) return;
33629
+ tree.setChecked(item, v, !props.checkStrictly);
33630
+ sync();
33631
+ };
33632
+ const handleLabelClick = (v, item) => {
33633
+ const tree = treeRef.value;
33634
+ if (!tree) return;
33635
+ tree.setChecked(item, v, !props.checkStrictly);
33636
+ sync();
33637
+ };
33638
+ return () => {
33639
+ return vue.createVNode("div", {
33640
+ "class": "vc-tree-select__cascader"
33641
+ }, [vue.createVNode(Tree$1, {
33642
+ "ref": treeRef,
33643
+ "class": "vc-tree-select__cascader-tree-hidden",
33644
+ "model-value": props.value,
33645
+ "expanded-values": props.value,
33646
+ "data": props.data,
33647
+ "checkStrictly": props.checkStrictly,
33648
+ "allowDispatch": false,
33649
+ "showCheckbox": true,
33650
+ "renderNodeLabel": props.renderNodeLabel,
33651
+ "numerable": props.numerable,
33652
+ "separator": props.separator,
33653
+ "max": props.max,
33654
+ "nullValue": props.nullValue
33655
+ }, null), vue.createVNode("div", {
33656
+ "class": "vc-tree-select__cascader-columns"
33657
+ }, [columns.value.map(columnIndex => {
33658
+ const col = rebuildData.value[columnIndex];
33659
+ if (!col || !col.length) return null;
33660
+ return vue.createVNode("div", {
33661
+ "class": "vc-tree-select__cascader-column",
33662
+ "key": columnIndex
33663
+ }, [vue.createVNode("div", {
33664
+ "class": "vc-tree-select__cascader-column-wrapper"
33665
+ }, [col.map(item => {
33666
+ const state = getNodeState(item);
33667
+ const isSelect = currentValue.value[columnIndex] === item.value;
33668
+ const child = hasChildren(item);
33669
+ return vue.createVNode("div", {
33670
+ "key": item.value,
33671
+ "class": ['vc-tree-select__cascader-item', {
33672
+ 'is-select': isSelect
33673
+ }],
33674
+ "onMouseenter": () => handleHover(item.value, columnIndex),
33675
+ "onClick": () => handleLabelClick(!state.checked, item)
33676
+ }, [vue.createVNode("span", {
33677
+ "class": "vc-tree-select__cascader-checkbox",
33678
+ "onClick": e => e.stopPropagation()
33679
+ }, [vue.createVNode(Checkbox, {
33680
+ "modelValue": state.checked,
33681
+ "indeterminate": state.indeterminate,
33682
+ "disabled": !!item.disabled,
33683
+ "onChange": v => handleCheckboxChange(v, item)
33684
+ }, null)]), vue.createVNode("span", {
33685
+ "class": "vc-tree-select__cascader-label"
33686
+ }, [props.renderNodeLabel && treeRef.value?.getNode?.(item) ? vue.createVNode(Customer, {
33687
+ "render": props.renderNodeLabel,
33688
+ "store": treeRef.value.getNode(item),
33689
+ "row": item
33690
+ }, null) : vue.createVNode("span", null, [item.label])]), child ? vue.createVNode(Icon, {
33691
+ "type": "right",
33692
+ "class": "vc-tree-select__cascader-icon"
33693
+ }, null) : null]);
33694
+ })])]);
33695
+ })])]);
33696
+ };
33697
+ }
33698
+ });
33699
+
32752
33700
  const treeKeys = [
32753
33701
  "checkStrictly",
32754
33702
  "data",
@@ -32757,7 +33705,18 @@
32757
33705
  ];
32758
33706
  const props$1 = {
32759
33707
  ...props$1a,
32760
- ...pick(props$2, treeKeys)
33708
+ ...pick(props$2, treeKeys),
33709
+ autoWidth: {
33710
+ type: Boolean,
33711
+ default: void 0
33712
+ },
33713
+ /**
33714
+ * 级联列模式:与 Cascader 相同的 hover 展开下一级,勾选逻辑与树形模式一致
33715
+ */
33716
+ cascader: {
33717
+ type: Boolean,
33718
+ default: false
33719
+ }
32761
33720
  };
32762
33721
 
32763
33722
  /** @jsxImportSource vue */
@@ -32783,12 +33742,37 @@
32783
33742
  const searchValue = vue.ref('');
32784
33743
  const searchRegex = vue.ref(new RegExp(''));
32785
33744
  const currentValue = vue.ref([]);
33745
+ const currentValueGroups = vue.computed(() => {
33746
+ if (props.checkStrictly) return;
33747
+ if (!props.data?.length || !Array.isArray(currentValue.value) || !currentValue.value.length) {
33748
+ return [];
33749
+ }
33750
+ const pathMap = new Map();
33751
+ const traverse = (data, path = []) => {
33752
+ data.forEach(item => {
33753
+ const v = item.value;
33754
+ if (v == null) return;
33755
+ const fullPath = [...path, v];
33756
+ pathMap.set(v, fullPath);
33757
+ if (item.children?.length) traverse(item.children, fullPath);
33758
+ });
33759
+ };
33760
+ traverse(props.data);
33761
+ const allPaths = currentValue.value.map(v => pathMap.get(v)).filter(Boolean);
33762
+ return allPaths.filter(path => !allPaths.some(other => other !== path && other.length > path.length && path.every((v, i) => v === other[i])));
33763
+ });
32786
33764
  const source = vue.computed(() => {
32787
33765
  return flattenData$1(props.data, {
32788
33766
  parent: true,
32789
33767
  cascader: true
32790
33768
  });
32791
33769
  });
33770
+ const labelMap = vue.computed(() => {
33771
+ return source.value.reduce((pre, cur) => {
33772
+ pre[cur.value] = cur.label || '';
33773
+ return pre;
33774
+ }, {});
33775
+ });
32792
33776
  const icon = vue.computed(() => {
32793
33777
  return isActive.value ? 'up' : 'down';
32794
33778
  });
@@ -32805,17 +33789,34 @@
32805
33789
  'is-disabled': props.disabled
32806
33790
  };
32807
33791
  });
32808
- const currentLabel = vue.computed(() => {
33792
+ const displayTags = vue.computed(() => {
32809
33793
  if (!props.data.length) {
32810
33794
  return [];
32811
33795
  }
32812
- return currentValue.value.map(getLabel.bind(null, source.value));
33796
+ if (props.checkStrictly) {
33797
+ return currentValue.value.map(v => ({
33798
+ value: v,
33799
+ label: labelMap.value[v] || ''
33800
+ }));
33801
+ }
33802
+ return (currentValueGroups.value || []).map(path => {
33803
+ const value = path[path.length - 1];
33804
+ const label = path.map(v => labelMap.value[v] || '').filter(Boolean).join(' / ');
33805
+ return {
33806
+ path,
33807
+ value,
33808
+ label
33809
+ };
33810
+ });
32813
33811
  });
32814
33812
  const collapseTagCount = vue.computed(() => {
32815
33813
  if (!props.maxTags) return 0;
32816
- const v = currentValue.value.length - props.maxTags;
33814
+ const v = displayTags.value.length - props.maxTags;
32817
33815
  return v < 0 ? 0 : v;
32818
33816
  });
33817
+ const autoWidth = vue.computed(() => {
33818
+ return typeof props.autoWidth === 'boolean' ? props.autoWidth : !!props.cascader;
33819
+ });
32819
33820
 
32820
33821
  /**
32821
33822
  * v-model 同步, 外部的数据改变时不会触发
@@ -32828,8 +33829,9 @@
32828
33829
  separator: props.separator,
32829
33830
  nullValue: props.nullValue
32830
33831
  });
32831
- emit('update:modelValue', v, currentLabel.value);
32832
- emit('change', v, currentLabel.value);
33832
+ const labels = displayTags.value.map(item => item.label);
33833
+ emit('update:modelValue', v, labels);
33834
+ emit('change', v, labels);
32833
33835
 
32834
33836
  // form表单
32835
33837
  formItem?.change?.(currentValue.value);
@@ -32854,8 +33856,15 @@
32854
33856
  const close = () => {
32855
33857
  isActive.value = false;
32856
33858
  };
32857
- const handleClose = index => {
32858
- currentValue.value.splice(index, 1);
33859
+ const handleClose = item => {
33860
+ if (props.checkStrictly) {
33861
+ const index = currentValue.value.findIndex(v => v === item.value);
33862
+ if (index === -1) return;
33863
+ currentValue.value = currentValue.value.filter((_, i) => i !== index);
33864
+ } else if (item.path) {
33865
+ const remaining = (currentValueGroups.value || []).filter(p => !(p.length === item.path.length && p.every((v, i) => v === item.path[i])));
33866
+ currentValue.value = [...new Set(remaining.flat())];
33867
+ }
32859
33868
  sync();
32860
33869
  };
32861
33870
  const handleClear = e => {
@@ -32892,6 +33901,7 @@
32892
33901
  multiple,
32893
33902
  isActive,
32894
33903
  current: currentValue,
33904
+ currentValueGroups,
32895
33905
  // for portal
32896
33906
  toggle(v) {
32897
33907
  v = typeof v === 'boolean' ? v : !isActive.value;
@@ -32906,7 +33916,7 @@
32906
33916
  "trigger": props.trigger,
32907
33917
  "tag": props.tag,
32908
33918
  "placement": props.placement,
32909
- "auto-width": props.autoWidth,
33919
+ "autoWidth": autoWidth.value,
32910
33920
  "disabled": props.disabled,
32911
33921
  "portalClass": [['is-padding-none', props.portalClass]],
32912
33922
  "class": [classes.value, its.value.class, 'vc-tree-select'],
@@ -32923,22 +33933,22 @@
32923
33933
  return vue.createVNode(Input$1, {
32924
33934
  "id": props.id,
32925
33935
  "disabled": props.disabled,
32926
- "modelValue": currentLabel.value[0] || props.extra,
33936
+ "modelValue": displayTags.value[0]?.label || props.extra,
32927
33937
  "allow-dispatch": false,
32928
33938
  "class": "vc-tree-select__input",
32929
33939
  "readonly": true,
32930
33940
  "placeholder": its.value.attrs?.placeholder || '请选择'
32931
33941
  }, {
32932
- content: multiple.value && currentValue.value && currentValue.value.length > 0 ? () => {
33942
+ content: multiple.value && displayTags.value.length > 0 ? () => {
32933
33943
  return vue.createVNode("div", {
32934
33944
  "class": [classes.value, 'vc-tree-select__tags']
32935
- }, [currentValue.value.slice(0, props.maxTags).map((item, index) => {
33945
+ }, [displayTags.value.slice(0, props.maxTags).map(item => {
32936
33946
  return vue.createVNode(Tag, {
32937
- "key": item,
33947
+ "key": item.path ? item.path.join('-') : item.value,
32938
33948
  "closable": !props.disabled,
32939
- "onClose": () => handleClose(index)
33949
+ "onClose": () => handleClose(item)
32940
33950
  }, {
32941
- default: () => [currentLabel.value[index] || '']
33951
+ default: () => [item.label]
32942
33952
  });
32943
33953
  }), collapseTagCount.value ? vue.createVNode(Tag, null, {
32944
33954
  default: () => [`+${collapseTagCount.value}...`]
@@ -32971,16 +33981,23 @@
32971
33981
  }, [vue.createVNode(Spin, {
32972
33982
  "size": 16
32973
33983
  }, null)]), vue.createVNode(Scroller, {
32974
- "class": "vc-tree-select__options",
33984
+ "class": ['vc-tree-select__options', props.cascader && 'is-cascader'],
32975
33985
  "max-height": "200px"
32976
33986
  }, {
32977
- default: () => [vue.createVNode(Tree$1, {
32978
- "model-value": currentValue.value,
32979
- "expanded-values": currentValue.value,
33987
+ default: () => [props.cascader ? vue.createVNode(TreeSelectContentCascader, {
33988
+ "value": currentValue.value,
33989
+ "data": props.data,
33990
+ "checkStrictly": props.checkStrictly,
33991
+ "renderNodeLabel": props.renderNodeLabel,
33992
+ "numerable": props.numerable,
33993
+ "separator": props.separator,
33994
+ "max": props.max,
33995
+ "nullValue": props.nullValue,
33996
+ "onChange": handleChange
33997
+ }, null) : vue.createVNode(TreeSelectContent, {
33998
+ "value": currentValue.value,
32980
33999
  "data": props.data,
32981
34000
  "checkStrictly": props.checkStrictly,
32982
- "allowDispatch": false,
32983
- "showCheckbox": true,
32984
34001
  "renderNodeLabel": props.renderNodeLabel,
32985
34002
  "onChange": handleChange
32986
34003
  }, null)]
@@ -139708,6 +140725,7 @@ ${r}
139708
140725
  exports.Calendar = Calendar$1;
139709
140726
  exports.Card = Card;
139710
140727
  exports.Carousel = Carousel;
140728
+ exports.CarouselItem = CarouselItem;
139711
140729
  exports.Cascader = Cascader;
139712
140730
  exports.Chart = Chart;
139713
140731
  exports.Checkbox = Checkbox;
@@ -139753,6 +140771,7 @@ ${r}
139753
140771
  exports.MCalendar = MCalendar;
139754
140772
  exports.MCard = MCard;
139755
140773
  exports.MCarousel = MCarousel;
140774
+ exports.MCarouselItem = MCarouselItem;
139756
140775
  exports.MCascader = MCascader;
139757
140776
  exports.MChart = MChart;
139758
140777
  exports.MCheckbox = MCheckbox;