@deot/vc-components 1.0.62 → 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, {
@@ -10891,6 +11573,7 @@
10891
11573
  const minute = vue.ref('');
10892
11574
  const second = vue.ref('');
10893
11575
  const millisecond = vue.ref('');
11576
+ const isComplete = vue.ref(false);
10894
11577
  const showResult = vue.computed(() => {
10895
11578
  return !props.render && !slots.default;
10896
11579
  });
@@ -10963,15 +11646,18 @@
10963
11646
 
10964
11647
  if (timestamp <= 0) {
10965
11648
  stop();
10966
- emit('change', {
10967
- timestamp: 0,
10968
- day: '00',
10969
- hour: '00',
10970
- minute: '00',
10971
- second: '00',
10972
- millisecond: '00'
10973
- });
10974
- emit('complete');
11649
+ if (!isComplete.value) {
11650
+ isComplete.value = true;
11651
+ emit('change', {
11652
+ timestamp: 0,
11653
+ day: '00',
11654
+ hour: '00',
11655
+ minute: '00',
11656
+ second: '00',
11657
+ millisecond: '00'
11658
+ });
11659
+ emit('complete');
11660
+ }
10975
11661
  } else {
10976
11662
  emit('change', {
10977
11663
  timestamp,
@@ -10986,6 +11672,8 @@
10986
11672
  const start = () => {
10987
11673
  if (targetTimestamp.value) {
10988
11674
  timer && clearInterval(timer);
11675
+ isComplete.value = false;
11676
+ run(); // 立即执行一次,界面马上展示当前数值
10989
11677
  timer = setInterval(run, T.value);
10990
11678
  }
10991
11679
  };
@@ -11146,9 +11834,9 @@
11146
11834
  function _isSlot$1(s) {
11147
11835
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
11148
11836
  }
11149
- const COMPONENT_NAME$1x = 'vc-counter';
11837
+ const COMPONENT_NAME$1z = 'vc-counter';
11150
11838
  const Counter = /* @__PURE__ */ vue.defineComponent({
11151
- name: COMPONENT_NAME$1x,
11839
+ name: COMPONENT_NAME$1z,
11152
11840
  props: props$Z,
11153
11841
  emits: ['begin', 'complete', 'change'],
11154
11842
  setup(props, {
@@ -12411,9 +13099,9 @@
12411
13099
  }
12412
13100
  return view;
12413
13101
  };
12414
- const COMPONENT_NAME$1w = 'vc-date-confirm';
13102
+ const COMPONENT_NAME$1y = 'vc-date-confirm';
12415
13103
  const Confirm = /* @__PURE__ */ vue.defineComponent({
12416
- name: COMPONENT_NAME$1w,
13104
+ name: COMPONENT_NAME$1y,
12417
13105
  props: {
12418
13106
  showTime: {
12419
13107
  type: Boolean,
@@ -12477,9 +13165,9 @@
12477
13165
 
12478
13166
  /** @jsxImportSource vue */
12479
13167
 
12480
- const COMPONENT_NAME$1v = 'vc-date-header';
13168
+ const COMPONENT_NAME$1x = 'vc-date-header';
12481
13169
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
12482
- name: COMPONENT_NAME$1v,
13170
+ name: COMPONENT_NAME$1x,
12483
13171
  props: {
12484
13172
  panelDate: Date,
12485
13173
  showNext: {
@@ -12563,9 +13251,9 @@
12563
13251
 
12564
13252
  /** @jsxImportSource vue */
12565
13253
 
12566
- const COMPONENT_NAME$1u = 'vc-date-table';
13254
+ const COMPONENT_NAME$1w = 'vc-date-table';
12567
13255
  const DateTable = /* @__PURE__ */ vue.defineComponent({
12568
- name: COMPONENT_NAME$1u,
13256
+ name: COMPONENT_NAME$1w,
12569
13257
  props: {
12570
13258
  value: Array,
12571
13259
  firstDayOfWeek: {
@@ -12774,9 +13462,9 @@
12774
13462
 
12775
13463
  /** @jsxImportSource vue */
12776
13464
 
12777
- const COMPONENT_NAME$1t = 'vc-month-table';
13465
+ const COMPONENT_NAME$1v = 'vc-month-table';
12778
13466
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
12779
- name: COMPONENT_NAME$1t,
13467
+ name: COMPONENT_NAME$1v,
12780
13468
  props: {
12781
13469
  value: Array,
12782
13470
  panelDate: Date,
@@ -12908,7 +13596,7 @@
12908
13596
 
12909
13597
  /** @jsxImportSource vue */
12910
13598
 
12911
- const COMPONENT_NAME$1s = 'vc-quarter-table';
13599
+ const COMPONENT_NAME$1u = 'vc-quarter-table';
12912
13600
 
12913
13601
  /**
12914
13602
  * 获取季度对应的月份范围
@@ -12942,7 +13630,7 @@
12942
13630
  }
12943
13631
  };
12944
13632
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
12945
- name: COMPONENT_NAME$1s,
13633
+ name: COMPONENT_NAME$1u,
12946
13634
  props: {
12947
13635
  value: Array,
12948
13636
  panelDate: Date,
@@ -13065,9 +13753,9 @@
13065
13753
 
13066
13754
  /** @jsxImportSource vue */
13067
13755
 
13068
- const COMPONENT_NAME$1r = 'vc-shortcuts-select';
13756
+ const COMPONENT_NAME$1t = 'vc-shortcuts-select';
13069
13757
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
13070
- name: COMPONENT_NAME$1r,
13758
+ name: COMPONENT_NAME$1t,
13071
13759
  props: {
13072
13760
  panelDate: Date,
13073
13761
  config: Array,
@@ -13107,9 +13795,9 @@
13107
13795
 
13108
13796
  /** @jsxImportSource vue */
13109
13797
 
13110
- const COMPONENT_NAME$1q = 'vc-time-select';
13798
+ const COMPONENT_NAME$1s = 'vc-time-select';
13111
13799
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
13112
- name: COMPONENT_NAME$1q,
13800
+ name: COMPONENT_NAME$1s,
13113
13801
  props: {
13114
13802
  hours: {
13115
13803
  type: [Number, String],
@@ -13389,9 +14077,9 @@
13389
14077
 
13390
14078
  /** @jsxImportSource vue */
13391
14079
 
13392
- const COMPONENT_NAME$1p = 'vc-year-table';
14080
+ const COMPONENT_NAME$1r = 'vc-year-table';
13393
14081
  const YearTable = /* @__PURE__ */ vue.defineComponent({
13394
- name: COMPONENT_NAME$1p,
14082
+ name: COMPONENT_NAME$1r,
13395
14083
  props: {
13396
14084
  value: Array,
13397
14085
  panelDate: Date,
@@ -13514,9 +14202,9 @@
13514
14202
  }
13515
14203
  return true;
13516
14204
  };
13517
- const COMPONENT_NAME$1o = 'vc-date-range-panel';
14205
+ const COMPONENT_NAME$1q = 'vc-date-range-panel';
13518
14206
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
13519
- name: COMPONENT_NAME$1o,
14207
+ name: COMPONENT_NAME$1q,
13520
14208
  props: {
13521
14209
  ...props$W,
13522
14210
  confirm: {
@@ -13895,9 +14583,9 @@
13895
14583
 
13896
14584
  /** @jsxImportSource vue */
13897
14585
 
13898
- const COMPONENT_NAME$1n = 'vc-date-panel';
14586
+ const COMPONENT_NAME$1p = 'vc-date-panel';
13899
14587
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
13900
- name: COMPONENT_NAME$1n,
14588
+ name: COMPONENT_NAME$1p,
13901
14589
  props: {
13902
14590
  ...props$W,
13903
14591
  type: String,
@@ -14105,9 +14793,9 @@
14105
14793
  const endYear = value[1].getFullYear();
14106
14794
  return startYear === endYear;
14107
14795
  };
14108
- const COMPONENT_NAME$1m = 'vc-monthrange-panel';
14796
+ const COMPONENT_NAME$1o = 'vc-monthrange-panel';
14109
14797
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
14110
- name: COMPONENT_NAME$1m,
14798
+ name: COMPONENT_NAME$1o,
14111
14799
  props: {
14112
14800
  ...props$W,
14113
14801
  confirm: {
@@ -14282,9 +14970,9 @@
14282
14970
  const endYear = value[1].getFullYear();
14283
14971
  return startYear === endYear;
14284
14972
  };
14285
- const COMPONENT_NAME$1l = 'vc-quarterrange-panel';
14973
+ const COMPONENT_NAME$1n = 'vc-quarterrange-panel';
14286
14974
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
14287
- name: COMPONENT_NAME$1l,
14975
+ name: COMPONENT_NAME$1n,
14288
14976
  props: {
14289
14977
  ...props$W,
14290
14978
  confirm: {
@@ -14523,9 +15211,9 @@
14523
15211
  seconds
14524
15212
  };
14525
15213
  };
14526
- const COMPONENT_NAME$1k = 'vc-timerange-panel';
15214
+ const COMPONENT_NAME$1m = 'vc-timerange-panel';
14527
15215
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
14528
- name: COMPONENT_NAME$1k,
15216
+ name: COMPONENT_NAME$1m,
14529
15217
  props: props$V,
14530
15218
  emits: ['pick', 'clear', 'ok'],
14531
15219
  setup(props, {
@@ -14626,9 +15314,9 @@
14626
15314
 
14627
15315
  /** @jsxImportSource vue */
14628
15316
 
14629
- const COMPONENT_NAME$1j = 'vc-time-panel';
15317
+ const COMPONENT_NAME$1l = 'vc-time-panel';
14630
15318
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
14631
- name: COMPONENT_NAME$1j,
15319
+ name: COMPONENT_NAME$1l,
14632
15320
  props: props$V,
14633
15321
  emits: ['pick', 'clear', 'ok'],
14634
15322
  setup(props, {
@@ -14684,7 +15372,7 @@
14684
15372
 
14685
15373
  /** @jsxImportSource vue */
14686
15374
 
14687
- const COMPONENT_NAME$1i = 'vc-date-picker';
15375
+ const COMPONENT_NAME$1k = 'vc-date-picker';
14688
15376
  const getPanel$1 = type => {
14689
15377
  if (['daterange', 'datetimerange'].includes(type)) {
14690
15378
  return DateRangePanel;
@@ -14695,7 +15383,7 @@
14695
15383
  }
14696
15384
  return DatePanel;
14697
15385
  };
14698
- const DatePicker = createPicker(COMPONENT_NAME$1i, props$Y, () => {
15386
+ const DatePicker = createPicker(COMPONENT_NAME$1k, props$Y, () => {
14699
15387
  const props = vue.getCurrentInstance().props;
14700
15388
  const icon = vue.ref('date');
14701
15389
  const panel = vue.shallowRef({});
@@ -14736,9 +15424,9 @@
14736
15424
 
14737
15425
  /** @jsxImportSource vue */
14738
15426
 
14739
- const COMPONENT_NAME$1h = 'vc-divider';
15427
+ const COMPONENT_NAME$1j = 'vc-divider';
14740
15428
  const Divider = /* @__PURE__ */ vue.defineComponent({
14741
- name: COMPONENT_NAME$1h,
15429
+ name: COMPONENT_NAME$1j,
14742
15430
  props: props$U,
14743
15431
  setup(props, {
14744
15432
  slots
@@ -14874,7 +15562,7 @@
14874
15562
 
14875
15563
  /** @jsxImportSource vue */
14876
15564
 
14877
- const COMPONENT_NAME$1g = 'vc-scroller-track';
15565
+ const COMPONENT_NAME$1i = 'vc-scroller-track';
14878
15566
  const BAR_MAP = {
14879
15567
  vertical: {
14880
15568
  scroll: 'scrollTop',
@@ -14894,7 +15582,7 @@
14894
15582
  }
14895
15583
  };
14896
15584
  const Track$1 = /* @__PURE__ */ vue.defineComponent({
14897
- name: COMPONENT_NAME$1g,
15585
+ name: COMPONENT_NAME$1i,
14898
15586
  props: props$T,
14899
15587
  emits: ['change'],
14900
15588
  inheritAttrs: false,
@@ -15084,9 +15772,9 @@
15084
15772
 
15085
15773
  /** @jsxImportSource vue */
15086
15774
 
15087
- const COMPONENT_NAME$1f = 'vc-scroller-bar';
15775
+ const COMPONENT_NAME$1h = 'vc-scroller-bar';
15088
15776
  const Bar = /* @__PURE__ */ vue.defineComponent({
15089
- name: COMPONENT_NAME$1f,
15777
+ name: COMPONENT_NAME$1h,
15090
15778
  props: props$S,
15091
15779
  emits: ['change'],
15092
15780
  setup(props, {
@@ -15321,7 +16009,7 @@
15321
16009
 
15322
16010
  /** @jsxImportSource vue */
15323
16011
 
15324
- const COMPONENT_NAME$1e = 'vc-scroller';
16012
+ const COMPONENT_NAME$1g = 'vc-scroller';
15325
16013
 
15326
16014
  /**
15327
16015
  * 作为备选方案,目前推荐使用ScrollerWheel
@@ -15332,7 +16020,7 @@
15332
16020
  * 2. 增加了一层嵌套
15333
16021
  */
15334
16022
  const Scroller = /* @__PURE__ */ vue.defineComponent({
15335
- name: COMPONENT_NAME$1e,
16023
+ name: COMPONENT_NAME$1g,
15336
16024
  props: props$R,
15337
16025
  emits: ['scroll'],
15338
16026
  setup(props, {
@@ -16279,7 +16967,7 @@
16279
16967
 
16280
16968
  /** @jsxImportSource vue */
16281
16969
 
16282
- const COMPONENT_NAME$1d = 'vc-scroller-wheel';
16970
+ const COMPONENT_NAME$1f = 'vc-scroller-wheel';
16283
16971
 
16284
16972
  /**
16285
16973
  * 为减少一层嵌套,为去除滚动bar的抖动,使用wheel模拟
@@ -16301,7 +16989,7 @@
16301
16989
  * 设置scrollTop不会reflow和repaint,不需要考虑transfrom来改变content(transform也只在draw完成)
16302
16990
  */
16303
16991
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
16304
- name: COMPONENT_NAME$1d,
16992
+ name: COMPONENT_NAME$1f,
16305
16993
  props: Object.assign({}, props$R, {
16306
16994
  stopPropagation: {
16307
16995
  type: Boolean,
@@ -16490,9 +17178,9 @@
16490
17178
 
16491
17179
  /** @jsxImportSource vue */
16492
17180
 
16493
- const COMPONENT_NAME$1c = 'vc-drawer';
17181
+ const COMPONENT_NAME$1e = 'vc-drawer';
16494
17182
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
16495
- name: COMPONENT_NAME$1c,
17183
+ name: COMPONENT_NAME$1e,
16496
17184
  props: props$Q,
16497
17185
  emits: ['close', 'update:modelValue', 'visible-change'],
16498
17186
  setup(props, {
@@ -16681,9 +17369,9 @@
16681
17369
 
16682
17370
  /** @jsxImportSource vue */
16683
17371
 
16684
- const COMPONENT_NAME$1b = 'vc-dropdown';
17372
+ const COMPONENT_NAME$1d = 'vc-dropdown';
16685
17373
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
16686
- name: COMPONENT_NAME$1b,
17374
+ name: COMPONENT_NAME$1d,
16687
17375
  props: props$P,
16688
17376
  inheritAttrs: false,
16689
17377
  emits: ['update:modelValue', 'ready', 'close', 'visible-change', 'click'],
@@ -16753,9 +17441,9 @@
16753
17441
 
16754
17442
  /** @jsxImportSource vue */
16755
17443
 
16756
- const COMPONENT_NAME$1a = 'vc-dropdown-menu';
17444
+ const COMPONENT_NAME$1c = 'vc-dropdown-menu';
16757
17445
  const DropdownMenu = /* @__PURE__ */ vue.defineComponent({
16758
- name: COMPONENT_NAME$1a,
17446
+ name: COMPONENT_NAME$1c,
16759
17447
  setup(_, {
16760
17448
  slots
16761
17449
  }) {
@@ -16769,9 +17457,9 @@
16769
17457
 
16770
17458
  /** @jsxImportSource vue */
16771
17459
 
16772
- const COMPONENT_NAME$19 = 'vc-dropdown-item';
17460
+ const COMPONENT_NAME$1b = 'vc-dropdown-item';
16773
17461
  const DropdownItem = /* @__PURE__ */ vue.defineComponent({
16774
- name: COMPONENT_NAME$19,
17462
+ name: COMPONENT_NAME$1b,
16775
17463
  emits: ['click'],
16776
17464
  props: {
16777
17465
  value: {
@@ -17015,9 +17703,9 @@
17015
17703
 
17016
17704
  /** @jsxImportSource vue */
17017
17705
 
17018
- const COMPONENT_NAME$18 = 'vc-editor-toolbar';
17706
+ const COMPONENT_NAME$1a = 'vc-editor-toolbar';
17019
17707
  const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
17020
- name: COMPONENT_NAME$18,
17708
+ name: COMPONENT_NAME$1a,
17021
17709
  props: {
17022
17710
  options: [Array, Object],
17023
17711
  elementId: String
@@ -17225,9 +17913,9 @@
17225
17913
 
17226
17914
  /** @jsxImportSource vue */
17227
17915
 
17228
- const COMPONENT_NAME$17 = 'vc-image-preview';
17916
+ const COMPONENT_NAME$19 = 'vc-image-preview';
17229
17917
  const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
17230
- name: COMPONENT_NAME$17,
17918
+ name: COMPONENT_NAME$19,
17231
17919
  props: props$O,
17232
17920
  setup(props, {
17233
17921
  slots
@@ -19380,9 +20068,9 @@
19380
20068
  }
19381
20069
  };
19382
20070
 
19383
- const COMPONENT_NAME$16 = "vc-upload";
20071
+ const COMPONENT_NAME$18 = "vc-upload";
19384
20072
  const Upload$1 = vue.defineComponent({
19385
- name: COMPONENT_NAME$16,
20073
+ name: COMPONENT_NAME$18,
19386
20074
  props: props$N,
19387
20075
  emits: [
19388
20076
  "message",
@@ -19916,9 +20604,9 @@
19916
20604
 
19917
20605
  /** @jsxImportSource vue */
19918
20606
 
19919
- const COMPONENT_NAME$15 = 'vc-editor';
20607
+ const COMPONENT_NAME$17 = 'vc-editor';
19920
20608
  const Editor$1 = /* @__PURE__ */ vue.defineComponent({
19921
- name: COMPONENT_NAME$15,
20609
+ name: COMPONENT_NAME$17,
19922
20610
  props: props$M,
19923
20611
  defaults: defaults$1,
19924
20612
  emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
@@ -20107,7 +20795,7 @@
20107
20795
 
20108
20796
  /** @jsxImportSource vue */
20109
20797
 
20110
- const COMPONENT_NAME$14 = 'vc-editor-view';
20798
+ const COMPONENT_NAME$16 = 'vc-editor-view';
20111
20799
  const setImages = v => {
20112
20800
  if (!v) return;
20113
20801
  const IMG_REGX = /<img.*?(?:>|\/>)/gi;
@@ -20125,7 +20813,7 @@
20125
20813
  return;
20126
20814
  };
20127
20815
  const EditorView = /* @__PURE__ */ vue.defineComponent({
20128
- name: COMPONENT_NAME$14,
20816
+ name: COMPONENT_NAME$16,
20129
20817
  props: {
20130
20818
  value: {
20131
20819
  type: String,
@@ -20340,9 +21028,9 @@
20340
21028
  });
20341
21029
  };
20342
21030
 
20343
- const COMPONENT_NAME$13 = "vc-form";
21031
+ const COMPONENT_NAME$15 = "vc-form";
20344
21032
  const Form = vue.defineComponent({
20345
- name: COMPONENT_NAME$13,
21033
+ name: COMPONENT_NAME$15,
20346
21034
  props: props$L,
20347
21035
  setup(props, { slots, expose }) {
20348
21036
  useForm(expose);
@@ -20822,9 +21510,9 @@
20822
21510
 
20823
21511
  /** @jsxImportSource vue */
20824
21512
 
20825
- const COMPONENT_NAME$12 = 'vc-form-item';
21513
+ const COMPONENT_NAME$14 = 'vc-form-item';
20826
21514
  const FormItem = /* @__PURE__ */ vue.defineComponent({
20827
- name: COMPONENT_NAME$12,
21515
+ name: COMPONENT_NAME$14,
20828
21516
  props: props$K,
20829
21517
  setup(props, {
20830
21518
  slots,
@@ -20892,9 +21580,9 @@
20892
21580
  }
20893
21581
  };
20894
21582
 
20895
- const COMPONENT_NAME$11 = "vcm-form";
21583
+ const COMPONENT_NAME$13 = "vcm-form";
20896
21584
  const MForm = vue.defineComponent({
20897
- name: COMPONENT_NAME$11,
21585
+ name: COMPONENT_NAME$13,
20898
21586
  props: props$J,
20899
21587
  setup(props, { slots, expose }) {
20900
21588
  useForm(expose, {
@@ -20925,9 +21613,9 @@
20925
21613
 
20926
21614
  /** @jsxImportSource vue */
20927
21615
 
20928
- const COMPONENT_NAME$10 = 'vcm-form-item';
21616
+ const COMPONENT_NAME$12 = 'vcm-form-item';
20929
21617
  const MFormItem = /* @__PURE__ */ vue.defineComponent({
20930
- name: COMPONENT_NAME$10,
21618
+ name: COMPONENT_NAME$12,
20931
21619
  props: props$I,
20932
21620
  setup(props, {
20933
21621
  slots,
@@ -20982,9 +21670,9 @@
20982
21670
  }
20983
21671
  });
20984
21672
 
20985
- const COMPONENT_NAME$$ = "vc-fragment";
21673
+ const COMPONENT_NAME$11 = "vc-fragment";
20986
21674
  const Fragment = vue.defineComponent({
20987
- name: COMPONENT_NAME$$,
21675
+ name: COMPONENT_NAME$11,
20988
21676
  setup(_, { slots }) {
20989
21677
  return () => vue.h(vue.Fragment, slots.default?.());
20990
21678
  }
@@ -21023,9 +21711,9 @@
21023
21711
 
21024
21712
  /** @jsxImportSource vue */
21025
21713
 
21026
- const COMPONENT_NAME$_ = 'vc-snapshot';
21714
+ const COMPONENT_NAME$10 = 'vc-snapshot';
21027
21715
  const Snapshot = /* @__PURE__ */ vue.defineComponent({
21028
- name: COMPONENT_NAME$_,
21716
+ name: COMPONENT_NAME$10,
21029
21717
  props: props$H,
21030
21718
  emits: ['ready'],
21031
21719
  setup(props, {
@@ -21558,7 +22246,7 @@
21558
22246
 
21559
22247
  /** @jsxImportSource vue */
21560
22248
 
21561
- const COMPONENT_NAME$Z = 'vc-image';
22249
+ const COMPONENT_NAME$$ = 'vc-image';
21562
22250
  let isSupportObjectFit = false;
21563
22251
  window.addEventListener('DOMContentLoaded', () => {
21564
22252
  isSupportObjectFit = !IS_SERVER$1 && document.documentElement.style.objectFit !== undefined;
@@ -21571,7 +22259,7 @@
21571
22259
  SCALE_DOWN: 'scale-down'
21572
22260
  };
21573
22261
  const Image$2 = /* @__PURE__ */ vue.defineComponent({
21574
- name: COMPONENT_NAME$Z,
22262
+ name: COMPONENT_NAME$$,
21575
22263
  inheritAttrs: false,
21576
22264
  props: props$G,
21577
22265
  setup(props, {
@@ -21788,9 +22476,9 @@
21788
22476
 
21789
22477
  /** @jsxImportSource vue */
21790
22478
 
21791
- const COMPONENT_NAME$Y = 'vc-image-crop';
22479
+ const COMPONENT_NAME$_ = 'vc-image-crop';
21792
22480
  const ImageCrop = /* @__PURE__ */ vue.defineComponent({
21793
- name: COMPONENT_NAME$Y,
22481
+ name: COMPONENT_NAME$_,
21794
22482
  props: props$F,
21795
22483
  setup(props, {
21796
22484
  slots
@@ -21816,9 +22504,9 @@
21816
22504
 
21817
22505
  /** @jsxImportSource vue */
21818
22506
 
21819
- const COMPONENT_NAME$X = 'vc-image-processing';
22507
+ const COMPONENT_NAME$Z = 'vc-image-processing';
21820
22508
  const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
21821
- name: COMPONENT_NAME$X,
22509
+ name: COMPONENT_NAME$Z,
21822
22510
  props: props$E,
21823
22511
  setup(props, {
21824
22512
  slots
@@ -21835,9 +22523,9 @@
21835
22523
 
21836
22524
  /** @jsxImportSource vue */
21837
22525
 
21838
- const COMPONENT_NAME$W = 'vcm-input';
22526
+ const COMPONENT_NAME$Y = 'vcm-input';
21839
22527
  const MInput = /* @__PURE__ */ vue.defineComponent({
21840
- name: COMPONENT_NAME$W,
22528
+ name: COMPONENT_NAME$Y,
21841
22529
  inheritAttrs: false,
21842
22530
  props: {
21843
22531
  ...props$1h,
@@ -21926,9 +22614,9 @@
21926
22614
 
21927
22615
  /** @jsxImportSource vue */
21928
22616
 
21929
- const COMPONENT_NAME$V = 'vcm-input-number';
22617
+ const COMPONENT_NAME$X = 'vcm-input-number';
21930
22618
  const MInputNumber = /* @__PURE__ */ vue.defineComponent({
21931
- name: COMPONENT_NAME$V,
22619
+ name: COMPONENT_NAME$X,
21932
22620
  props: props$1g,
21933
22621
  inheritAttrs: false,
21934
22622
  setup(props, {
@@ -21977,9 +22665,9 @@
21977
22665
 
21978
22666
  /** @jsxImportSource vue */
21979
22667
 
21980
- const COMPONENT_NAME$U = 'vcm-input-search';
22668
+ const COMPONENT_NAME$W = 'vcm-input-search';
21981
22669
  const MInputSearch = /* @__PURE__ */ vue.defineComponent({
21982
- name: COMPONENT_NAME$U,
22670
+ name: COMPONENT_NAME$W,
21983
22671
  props: {
21984
22672
  ...props$1f,
21985
22673
  cancelText: {
@@ -22056,9 +22744,9 @@
22056
22744
  }
22057
22745
  };
22058
22746
 
22059
- const COMPONENT_NAME$T = "vcm-list";
22747
+ const COMPONENT_NAME$V = "vcm-list";
22060
22748
  const MList = vue.defineComponent({
22061
- name: COMPONENT_NAME$T,
22749
+ name: COMPONENT_NAME$V,
22062
22750
  props: props$D,
22063
22751
  setup(props, { slots }) {
22064
22752
  vue.provide("vc-list", { props });
@@ -22113,10 +22801,10 @@
22113
22801
 
22114
22802
  /** @jsxImportSource vue */
22115
22803
 
22116
- const COMPONENT_NAME$S = 'vcm-list-item';
22804
+ const COMPONENT_NAME$U = 'vcm-list-item';
22117
22805
  const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
22118
22806
  const MListItem = /* @__PURE__ */ vue.defineComponent({
22119
- name: COMPONENT_NAME$S,
22807
+ name: COMPONENT_NAME$U,
22120
22808
  props: props$C,
22121
22809
  emits: ['click'],
22122
22810
  setup(props, {
@@ -22210,11 +22898,11 @@
22210
22898
 
22211
22899
  /** @jsxImportSource vue */
22212
22900
 
22213
- const COMPONENT_NAME$R = 'vc-marquee';
22901
+ const COMPONENT_NAME$T = 'vc-marquee';
22214
22902
  const ANIMATION = prefixStyle('animation').camel;
22215
22903
  const TRANSFORM_KEBAB = prefixStyle('transform').kebab;
22216
22904
  const Marquee = /* @__PURE__ */ vue.defineComponent({
22217
- name: COMPONENT_NAME$R,
22905
+ name: COMPONENT_NAME$T,
22218
22906
  props: props$B,
22219
22907
  setup(props, {
22220
22908
  slots
@@ -22282,9 +22970,9 @@
22282
22970
  }
22283
22971
  };
22284
22972
 
22285
- const COMPONENT_NAME$Q = "vc-resizer";
22973
+ const COMPONENT_NAME$S = "vc-resizer";
22286
22974
  const Resizer = vue.defineComponent({
22287
- name: COMPONENT_NAME$Q,
22975
+ name: COMPONENT_NAME$S,
22288
22976
  props: props$A,
22289
22977
  emits: ["resize"],
22290
22978
  setup(props, { emit, slots, expose }) {
@@ -22454,10 +23142,10 @@
22454
23142
 
22455
23143
  /** @jsxImportSource vue */
22456
23144
 
22457
- const COMPONENT_NAME$P = 'vc-modal';
23145
+ const COMPONENT_NAME$R = 'vc-modal';
22458
23146
  let zIndexNumber = 1002;
22459
23147
  const ModalView = /* @__PURE__ */ vue.defineComponent({
22460
- name: COMPONENT_NAME$P,
23148
+ name: COMPONENT_NAME$R,
22461
23149
  emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change', 'ok', 'cancel'],
22462
23150
  props: props$z,
22463
23151
  setup(props, {
@@ -22896,9 +23584,9 @@
22896
23584
 
22897
23585
  /** @jsxImportSource vue */
22898
23586
 
22899
- const COMPONENT_NAME$O = 'vc-modal';
23587
+ const COMPONENT_NAME$Q = 'vc-modal';
22900
23588
  const MModalView = /* @__PURE__ */ vue.defineComponent({
22901
- name: COMPONENT_NAME$O,
23589
+ name: COMPONENT_NAME$Q,
22902
23590
  emits: ['update:modelValue', 'portal-fulfilled', 'close', 'ok', 'cancel'],
22903
23591
  props: props$y,
22904
23592
  setup(props, {
@@ -23110,9 +23798,9 @@
23110
23798
 
23111
23799
  /** @jsxImportSource vue */
23112
23800
 
23113
- const COMPONENT_NAME$N = 'vc-notice';
23801
+ const COMPONENT_NAME$P = 'vc-notice';
23114
23802
  const NoticeView = /* @__PURE__ */ vue.defineComponent({
23115
- name: COMPONENT_NAME$N,
23803
+ name: COMPONENT_NAME$P,
23116
23804
  props: props$x,
23117
23805
  emits: ['portal-fulfilled', 'close', 'before-close'],
23118
23806
  setup(props, {
@@ -23285,9 +23973,9 @@
23285
23973
 
23286
23974
  /** @jsxImportSource vue */
23287
23975
 
23288
- const COMPONENT_NAME$M = 'vc-option';
23976
+ const COMPONENT_NAME$O = 'vc-option';
23289
23977
  const Option$1 = /* @__PURE__ */ vue.defineComponent({
23290
- name: COMPONENT_NAME$M,
23978
+ name: COMPONENT_NAME$O,
23291
23979
  props: props$w,
23292
23980
  setup(props, {
23293
23981
  slots
@@ -23371,9 +24059,9 @@
23371
24059
 
23372
24060
  /** @jsxImportSource vue */
23373
24061
 
23374
- const COMPONENT_NAME$L = 'vc-tag';
24062
+ const COMPONENT_NAME$N = 'vc-tag';
23375
24063
  const Tag = /* @__PURE__ */ vue.defineComponent({
23376
- name: COMPONENT_NAME$L,
24064
+ name: COMPONENT_NAME$N,
23377
24065
  props: props$u,
23378
24066
  emits: ['close', 'change'],
23379
24067
  setup(props, {
@@ -23444,9 +24132,9 @@
23444
24132
 
23445
24133
  /** @jsxImportSource vue */
23446
24134
 
23447
- const COMPONENT_NAME$K = 'vc-select-option';
24135
+ const COMPONENT_NAME$M = 'vc-select-option';
23448
24136
  const Option = /* @__PURE__ */ vue.defineComponent({
23449
- name: COMPONENT_NAME$K,
24137
+ name: COMPONENT_NAME$M,
23450
24138
  props: props$t,
23451
24139
  setup(props, {
23452
24140
  slots,
@@ -23541,9 +24229,9 @@
23541
24229
 
23542
24230
  /** @jsxImportSource vue */
23543
24231
 
23544
- const COMPONENT_NAME$J = 'vc-select-option-group';
24232
+ const COMPONENT_NAME$L = 'vc-select-option-group';
23545
24233
  const OptionGroup = /* @__PURE__ */ vue.defineComponent({
23546
- name: COMPONENT_NAME$J,
24234
+ name: COMPONENT_NAME$L,
23547
24235
  props: props$s,
23548
24236
  setup(props, {
23549
24237
  slots
@@ -23573,9 +24261,9 @@
23573
24261
 
23574
24262
  /** @jsxImportSource vue */
23575
24263
 
23576
- const COMPONENT_NAME$I = 'vc-select-all';
24264
+ const COMPONENT_NAME$K = 'vc-select-all';
23577
24265
  const SelectAll = /* @__PURE__ */ vue.defineComponent({
23578
- name: COMPONENT_NAME$I,
24266
+ name: COMPONENT_NAME$K,
23579
24267
  props: {
23580
24268
  data: {
23581
24269
  type: Array,
@@ -23645,9 +24333,9 @@
23645
24333
 
23646
24334
  /** @jsxImportSource vue */
23647
24335
 
23648
- const COMPONENT_NAME$H = 'vc-select';
24336
+ const COMPONENT_NAME$J = 'vc-select';
23649
24337
  const Select = /* @__PURE__ */ vue.defineComponent({
23650
- name: COMPONENT_NAME$H,
24338
+ name: COMPONENT_NAME$J,
23651
24339
  props: props$1a,
23652
24340
  emits: ['ready', 'close', 'visible-change', 'clear', 'change', 'update:modelValue'],
23653
24341
  setup(props, {
@@ -23941,9 +24629,9 @@
23941
24629
 
23942
24630
  /** @jsxImportSource vue */
23943
24631
 
23944
- const COMPONENT_NAME$G = 'vc-pagination';
24632
+ const COMPONENT_NAME$I = 'vc-pagination';
23945
24633
  const Pagination = /* @__PURE__ */ vue.defineComponent({
23946
- name: COMPONENT_NAME$G,
24634
+ name: COMPONENT_NAME$I,
23947
24635
  props: props$v,
23948
24636
  emits: ['update:current', 'change', 'page-size-change'],
23949
24637
  setup(props, {
@@ -24141,9 +24829,9 @@
24141
24829
 
24142
24830
  /** @jsxImportSource vue */
24143
24831
 
24144
- const COMPONENT_NAME$F = 'vc-picker';
24832
+ const COMPONENT_NAME$H = 'vc-picker';
24145
24833
  const Picker$1 = /* @__PURE__ */ vue.defineComponent({
24146
- name: COMPONENT_NAME$F,
24834
+ name: COMPONENT_NAME$H,
24147
24835
  props: props$r,
24148
24836
  setup(props, {
24149
24837
  slots
@@ -24206,9 +24894,9 @@
24206
24894
 
24207
24895
  /** @jsxImportSource vue */
24208
24896
 
24209
- const COMPONENT_NAME$E = 'vc-popconfirm';
24897
+ const COMPONENT_NAME$G = 'vc-popconfirm';
24210
24898
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
24211
- name: COMPONENT_NAME$E,
24899
+ name: COMPONENT_NAME$G,
24212
24900
  props: props$q,
24213
24901
  inheritAttrs: false,
24214
24902
  emits: ['update:modelValue', 'visible-change', 'ready', 'close', 'cancel', 'ok'],
@@ -24376,9 +25064,9 @@
24376
25064
 
24377
25065
  /** @jsxImportSource vue */
24378
25066
 
24379
- const COMPONENT_NAME$D = 'vc-popup';
25067
+ const COMPONENT_NAME$F = 'vc-popup';
24380
25068
  const MPopup = /* @__PURE__ */ vue.defineComponent({
24381
- name: COMPONENT_NAME$D,
25069
+ name: COMPONENT_NAME$F,
24382
25070
  props: props$p,
24383
25071
  emits: ['update:modelValue', 'close', 'portal-fulfilled', 'visible-change'],
24384
25072
  setup(props, {
@@ -24505,9 +25193,9 @@
24505
25193
 
24506
25194
  /** @jsxImportSource vue */
24507
25195
 
24508
- const COMPONENT_NAME$C = 'vc-print';
25196
+ const COMPONENT_NAME$E = 'vc-print';
24509
25197
  const Print = /* @__PURE__ */ vue.defineComponent({
24510
- name: COMPONENT_NAME$C,
25198
+ name: COMPONENT_NAME$E,
24511
25199
  props: props$o,
24512
25200
  setup(props, {
24513
25201
  expose,
@@ -24587,7 +25275,7 @@
24587
25275
  },
24588
25276
  strokeColor: {
24589
25277
  type: String,
24590
- default: "#2d8cf0"
25278
+ default: "#456CF6"
24591
25279
  },
24592
25280
  trackColor: {
24593
25281
  type: String,
@@ -24609,9 +25297,9 @@
24609
25297
 
24610
25298
  /** @jsxImportSource vue */
24611
25299
 
24612
- const COMPONENT_NAME$B = 'vc-progress-circle';
25300
+ const COMPONENT_NAME$D = 'vc-progress-circle';
24613
25301
  const Circle$1 = /* @__PURE__ */ vue.defineComponent({
24614
- name: COMPONENT_NAME$B,
25302
+ name: COMPONENT_NAME$D,
24615
25303
  props: props$n,
24616
25304
  setup(props, {
24617
25305
  slots
@@ -24671,9 +25359,9 @@
24671
25359
 
24672
25360
  /** @jsxImportSource vue */
24673
25361
 
24674
- const COMPONENT_NAME$A = 'vc-progress-line';
25362
+ const COMPONENT_NAME$C = 'vc-progress-line';
24675
25363
  const Line$2 = /* @__PURE__ */ vue.defineComponent({
24676
- name: COMPONENT_NAME$A,
25364
+ name: COMPONENT_NAME$C,
24677
25365
  props: props$n,
24678
25366
  setup(props) {
24679
25367
  const colorStyle = vue.computed(() => {
@@ -24720,9 +25408,9 @@
24720
25408
  function _isSlot(s) {
24721
25409
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
24722
25410
  }
24723
- const COMPONENT_NAME$z = 'vc-progress';
25411
+ const COMPONENT_NAME$B = 'vc-progress';
24724
25412
  const Progress = /* @__PURE__ */ vue.defineComponent({
24725
- name: COMPONENT_NAME$z,
25413
+ name: COMPONENT_NAME$B,
24726
25414
  props: props$n,
24727
25415
  setup(props, {
24728
25416
  slots
@@ -24884,9 +25572,9 @@
24884
25572
 
24885
25573
  /** @jsxImportSource vue */
24886
25574
 
24887
- const COMPONENT_NAME$y = 'vc-radio';
25575
+ const COMPONENT_NAME$A = 'vc-radio';
24888
25576
  const Radio = /* @__PURE__ */ vue.defineComponent({
24889
- name: COMPONENT_NAME$y,
25577
+ name: COMPONENT_NAME$A,
24890
25578
  props: props$m,
24891
25579
  emits: ['update:modelValue', 'change'],
24892
25580
  setup(props, {
@@ -24930,9 +25618,9 @@
24930
25618
 
24931
25619
  /** @jsxImportSource vue */
24932
25620
 
24933
- const COMPONENT_NAME$x = 'vc-radio-button';
25621
+ const COMPONENT_NAME$z = 'vc-radio-button';
24934
25622
  const RadioButton = /* @__PURE__ */ vue.defineComponent({
24935
- name: COMPONENT_NAME$x,
25623
+ name: COMPONENT_NAME$z,
24936
25624
  props: {
24937
25625
  ...props$m,
24938
25626
  labelStyle: [String, Object],
@@ -25045,9 +25733,9 @@
25045
25733
 
25046
25734
  /** @jsxImportSource vue */
25047
25735
 
25048
- const COMPONENT_NAME$w = 'vc-radio-group';
25736
+ const COMPONENT_NAME$y = 'vc-radio-group';
25049
25737
  const RadioGroup = /* @__PURE__ */ vue.defineComponent({
25050
- name: COMPONENT_NAME$w,
25738
+ name: COMPONENT_NAME$y,
25051
25739
  props: props$l,
25052
25740
  emits: ['update:modelValue', 'change'],
25053
25741
  setup(props, {
@@ -25068,9 +25756,9 @@
25068
25756
 
25069
25757
  /** @jsxImportSource vue */
25070
25758
 
25071
- const COMPONENT_NAME$v = 'vcm-radio';
25759
+ const COMPONENT_NAME$x = 'vcm-radio';
25072
25760
  const MRadio = /* @__PURE__ */ vue.defineComponent({
25073
- name: COMPONENT_NAME$v,
25761
+ name: COMPONENT_NAME$x,
25074
25762
  props: props$m,
25075
25763
  emits: ['update:modelValue', 'change'],
25076
25764
  setup(props, {
@@ -25114,9 +25802,9 @@
25114
25802
 
25115
25803
  /** @jsxImportSource vue */
25116
25804
 
25117
- const COMPONENT_NAME$u = 'vcm-radio-group';
25805
+ const COMPONENT_NAME$w = 'vcm-radio-group';
25118
25806
  const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
25119
- name: COMPONENT_NAME$u,
25807
+ name: COMPONENT_NAME$w,
25120
25808
  props: props$l,
25121
25809
  emits: ['update:modelValue', 'change'],
25122
25810
  setup(props, {
@@ -25183,9 +25871,9 @@
25183
25871
 
25184
25872
  /** @jsxImportSource vue */
25185
25873
 
25186
- const COMPONENT_NAME$t = 'vc-rate';
25874
+ const COMPONENT_NAME$v = 'vc-rate';
25187
25875
  const Rate = /* @__PURE__ */ vue.defineComponent({
25188
- name: COMPONENT_NAME$t,
25876
+ name: COMPONENT_NAME$v,
25189
25877
  props: props$k,
25190
25878
  emits: ['update:modelValue', 'change'],
25191
25879
  setup(props, {
@@ -25501,9 +26189,9 @@
25501
26189
 
25502
26190
  /** @jsxImportSource vue */
25503
26191
 
25504
- const COMPONENT_NAME$s = 'vc-recycle-list-scroll-state';
26192
+ const COMPONENT_NAME$u = 'vc-recycle-list-scroll-state';
25505
26193
  const ScrollState = /* @__PURE__ */ vue.defineComponent({
25506
- name: COMPONENT_NAME$s,
26194
+ name: COMPONENT_NAME$u,
25507
26195
  setup(_, {
25508
26196
  slots
25509
26197
  }) {
@@ -25633,12 +26321,12 @@
25633
26321
 
25634
26322
  /** @jsxImportSource vue */
25635
26323
 
25636
- const COMPONENT_NAME$r = 'vc-recycle-list-container';
26324
+ const COMPONENT_NAME$t = 'vc-recycle-list-container';
25637
26325
 
25638
26326
  // TODO: 抽离
25639
26327
  const transformKey = prefixStyle('transform').camel;
25640
26328
  const Container$1 = /* @__PURE__ */ vue.defineComponent({
25641
- name: COMPONENT_NAME$r,
26329
+ name: COMPONENT_NAME$t,
25642
26330
  props: props$i,
25643
26331
  emits: ['refresh'],
25644
26332
  setup(props, {
@@ -25736,9 +26424,9 @@
25736
26424
 
25737
26425
  /** @jsxImportSource vue */
25738
26426
 
25739
- const COMPONENT_NAME$q = 'vc-recycle-list';
26427
+ const COMPONENT_NAME$s = 'vc-recycle-list';
25740
26428
  const RecycleList = /* @__PURE__ */ vue.defineComponent({
25741
- name: COMPONENT_NAME$q,
26429
+ name: COMPONENT_NAME$s,
25742
26430
  props: props$j,
25743
26431
  emits: ['scroll', 'row-resize'],
25744
26432
  setup(props, {
@@ -26312,9 +27000,9 @@
26312
27000
 
26313
27001
  /** @jsxImportSource vue */
26314
27002
 
26315
- const COMPONENT_NAME$p = 'vc-slider';
27003
+ const COMPONENT_NAME$r = 'vc-slider';
26316
27004
  const Slider = /* @__PURE__ */ vue.defineComponent({
26317
- name: COMPONENT_NAME$p,
27005
+ name: COMPONENT_NAME$r,
26318
27006
  props: props$h,
26319
27007
  setup(props, {
26320
27008
  slots
@@ -26338,9 +27026,9 @@
26338
27026
 
26339
27027
  /** @jsxImportSource vue */
26340
27028
 
26341
- const COMPONENT_NAME$o = 'vc-sort-list';
27029
+ const COMPONENT_NAME$q = 'vc-sort-list';
26342
27030
  const SortList = /* @__PURE__ */ vue.defineComponent({
26343
- name: COMPONENT_NAME$o,
27031
+ name: COMPONENT_NAME$q,
26344
27032
  props: props$g,
26345
27033
  setup(props, {
26346
27034
  slots
@@ -26364,9 +27052,9 @@
26364
27052
 
26365
27053
  /** @jsxImportSource vue */
26366
27054
 
26367
- const COMPONENT_NAME$n = 'vc-steps';
27055
+ const COMPONENT_NAME$p = 'vc-steps';
26368
27056
  const Steps = /* @__PURE__ */ vue.defineComponent({
26369
- name: COMPONENT_NAME$n,
27057
+ name: COMPONENT_NAME$p,
26370
27058
  props: props$f,
26371
27059
  setup(props, {
26372
27060
  slots
@@ -26492,9 +27180,9 @@
26492
27180
 
26493
27181
  /** @jsxImportSource vue */
26494
27182
 
26495
- const COMPONENT_NAME$m = 'vc-switch';
27183
+ const COMPONENT_NAME$o = 'vc-switch';
26496
27184
  const Switch = /* @__PURE__ */ vue.defineComponent({
26497
- name: COMPONENT_NAME$m,
27185
+ name: COMPONENT_NAME$o,
26498
27186
  props: props$e,
26499
27187
  // click -> onClick要被拦截,此处不能放置
26500
27188
  emits: ['update:modelValue', 'change', 'click'],
@@ -26568,9 +27256,9 @@
26568
27256
 
26569
27257
  /** @jsxImportSource vue */
26570
27258
 
26571
- const COMPONENT_NAME$l = 'vcm-switch';
27259
+ const COMPONENT_NAME$n = 'vcm-switch';
26572
27260
  const MSwitch = /* @__PURE__ */ vue.defineComponent({
26573
- name: COMPONENT_NAME$l,
27261
+ name: COMPONENT_NAME$n,
26574
27262
  props: props$e,
26575
27263
  // click -> onClick要被拦截,此处不能放置
26576
27264
  emits: ['update:modelValue', 'change', 'click'],
@@ -27683,9 +28371,9 @@
27683
28371
 
27684
28372
  /** @jsxImportSource vue */
27685
28373
 
27686
- const COMPONENT_NAME$k = 'vc-table-normal-list';
28374
+ const COMPONENT_NAME$m = 'vc-table-normal-list';
27687
28375
  const NormalList = /* @__PURE__ */ vue.defineComponent({
27688
- name: COMPONENT_NAME$k,
28376
+ name: COMPONENT_NAME$m,
27689
28377
  props: {
27690
28378
  data: {
27691
28379
  type: Array,
@@ -28203,6 +28891,10 @@
28203
28891
  const allowDrag = vue.computed(() => {
28204
28892
  return typeof props.resizable === 'boolean' ? props.resizable : props.border;
28205
28893
  });
28894
+ const dragLineClass = vue.computed(() => {
28895
+ if (props.border || !props.resizable) return;
28896
+ return 'has-drag-line';
28897
+ });
28206
28898
  const states = useStates({
28207
28899
  columns: 'columns',
28208
28900
  isAllSelected: 'isAllSelected',
@@ -28436,7 +29128,7 @@
28436
29128
  "style": [getHeaderCellStyle(rowIndex, columnIndex, columns, column), {
28437
29129
  width: `${column.realWidth}px`
28438
29130
  }],
28439
- "class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), 'vc-table__th'],
29131
+ "class": [getHeaderCellClass(rowIndex, columnIndex, columns, column), column.resizable && dragLineClass.value, 'vc-table__th'],
28440
29132
  "key": column.id
28441
29133
  }, [vue.createVNode("div", {
28442
29134
  "class": ['vc-table__cell',
@@ -28682,9 +29374,9 @@
28682
29374
 
28683
29375
  /** @jsxImportSource vue */
28684
29376
 
28685
- const COMPONENT_NAME$j = 'vc-table';
29377
+ const COMPONENT_NAME$l = 'vc-table';
28686
29378
  const Table$1 = /* @__PURE__ */ vue.defineComponent({
28687
- name: COMPONENT_NAME$j,
29379
+ name: COMPONENT_NAME$l,
28688
29380
  props: props$d,
28689
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'],
28690
29382
  setup(props, {
@@ -29887,9 +30579,9 @@
29887
30579
 
29888
30580
  /** @jsxImportSource vue */
29889
30581
 
29890
- const COMPONENT_NAME$i = 'vc-tabs';
30582
+ const COMPONENT_NAME$k = 'vc-tabs';
29891
30583
  const Tabs = /* @__PURE__ */ vue.defineComponent({
29892
- name: COMPONENT_NAME$i,
30584
+ name: COMPONENT_NAME$k,
29893
30585
  props: props$c,
29894
30586
  emits: ['update:modelValue', 'change', 'click'],
29895
30587
  setup(props, {
@@ -30142,9 +30834,9 @@
30142
30834
 
30143
30835
  /** @jsxImportSource vue */
30144
30836
 
30145
- const COMPONENT_NAME$h = 'vc-tabs-pane';
30837
+ const COMPONENT_NAME$j = 'vc-tabs-pane';
30146
30838
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
30147
- name: COMPONENT_NAME$h,
30839
+ name: COMPONENT_NAME$j,
30148
30840
  props: props$b,
30149
30841
  setup(_, {
30150
30842
  slots
@@ -30199,9 +30891,9 @@
30199
30891
 
30200
30892
  /** @jsxImportSource vue */
30201
30893
 
30202
- const COMPONENT_NAME$g = 'vcm-tabs';
30894
+ const COMPONENT_NAME$i = 'vcm-tabs';
30203
30895
  const MTabs = /* @__PURE__ */ vue.defineComponent({
30204
- name: COMPONENT_NAME$g,
30896
+ name: COMPONENT_NAME$i,
30205
30897
  props: props$a,
30206
30898
  emits: ['update:modelValue', 'change', 'click'],
30207
30899
  setup(props, {
@@ -30466,9 +31158,9 @@
30466
31158
 
30467
31159
  /** @jsxImportSource vue */
30468
31160
 
30469
- const COMPONENT_NAME$f = 'vcm-tabs-pane';
31161
+ const COMPONENT_NAME$h = 'vcm-tabs-pane';
30470
31162
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
30471
- name: COMPONENT_NAME$f,
31163
+ name: COMPONENT_NAME$h,
30472
31164
  props: props$b,
30473
31165
  setup(_, {
30474
31166
  slots
@@ -30532,9 +31224,9 @@
30532
31224
 
30533
31225
  /** @jsxImportSource vue */
30534
31226
 
30535
- const COMPONENT_NAME$e = 'vc-text';
31227
+ const COMPONENT_NAME$g = 'vc-text';
30536
31228
  const Text$2 = /* @__PURE__ */ vue.defineComponent({
30537
- name: COMPONENT_NAME$e,
31229
+ name: COMPONENT_NAME$g,
30538
31230
  props: props$9,
30539
31231
  setup(props, {
30540
31232
  emit
@@ -30901,9 +31593,9 @@
30901
31593
 
30902
31594
  /** @jsxImportSource vue */
30903
31595
 
30904
- const COMPONENT_NAME$d = 'vc-textarea';
31596
+ const COMPONENT_NAME$f = 'vc-textarea';
30905
31597
  const Textarea = /* @__PURE__ */ vue.defineComponent({
30906
- name: COMPONENT_NAME$d,
31598
+ name: COMPONENT_NAME$f,
30907
31599
  props: Object.assign({}, props$8, {
30908
31600
  indicator: {
30909
31601
  type: [Boolean, Object],
@@ -30959,9 +31651,9 @@
30959
31651
 
30960
31652
  /** @jsxImportSource vue */
30961
31653
 
30962
- const COMPONENT_NAME$c = 'vcm-textarea';
31654
+ const COMPONENT_NAME$e = 'vcm-textarea';
30963
31655
  const MTextarea = /* @__PURE__ */ vue.defineComponent({
30964
- name: COMPONENT_NAME$c,
31656
+ name: COMPONENT_NAME$e,
30965
31657
  props: Object.assign({}, props$8, {
30966
31658
  align: {
30967
31659
  type: String,
@@ -31044,9 +31736,9 @@
31044
31736
  }
31045
31737
  };
31046
31738
 
31047
- const COMPONENT_NAME$b = "vc-theme";
31739
+ const COMPONENT_NAME$d = "vc-theme";
31048
31740
  const Theme$1 = vue.defineComponent({
31049
- name: COMPONENT_NAME$b,
31741
+ name: COMPONENT_NAME$d,
31050
31742
  props: props$7,
31051
31743
  setup(props, { slots }) {
31052
31744
  const themeId = getUid("vc-theme");
@@ -31129,9 +31821,9 @@
31129
31821
  }
31130
31822
  });
31131
31823
 
31132
- const COMPONENT_NAME$a = "vc-theme-view";
31824
+ const COMPONENT_NAME$c = "vc-theme-view";
31133
31825
  const ThemeView = vue.defineComponent({
31134
- name: COMPONENT_NAME$a,
31826
+ name: COMPONENT_NAME$c,
31135
31827
  props: props$7,
31136
31828
  setup(props, { slots }) {
31137
31829
  return () => {
@@ -31147,9 +31839,9 @@
31147
31839
  }
31148
31840
  });
31149
31841
 
31150
- const COMPONENT_NAME$9 = "vc-theme-text";
31842
+ const COMPONENT_NAME$b = "vc-theme-text";
31151
31843
  const ThemeText = vue.defineComponent({
31152
- name: COMPONENT_NAME$9,
31844
+ name: COMPONENT_NAME$b,
31153
31845
  props: props$7,
31154
31846
  setup(props, { slots }) {
31155
31847
  return () => {
@@ -31165,9 +31857,9 @@
31165
31857
  }
31166
31858
  });
31167
31859
 
31168
- const COMPONENT_NAME$8 = "vc-theme-image";
31860
+ const COMPONENT_NAME$a = "vc-theme-image";
31169
31861
  const ThemeImage = vue.defineComponent({
31170
- name: COMPONENT_NAME$8,
31862
+ name: COMPONENT_NAME$a,
31171
31863
  props: props$7,
31172
31864
  setup(props, { slots }) {
31173
31865
  return () => {
@@ -31219,12 +31911,12 @@
31219
31911
 
31220
31912
  /** @jsxImportSource vue */
31221
31913
 
31222
- const COMPONENT_NAME$7 = 'vc-time-picker';
31914
+ const COMPONENT_NAME$9 = 'vc-time-picker';
31223
31915
  const getPanel = type => {
31224
31916
  const isRange = type === 'timerange';
31225
31917
  return isRange ? TimeRangePanel : TimePanel;
31226
31918
  };
31227
- const TimePicker = createPicker(COMPONENT_NAME$7, props$6, () => {
31919
+ const TimePicker = createPicker(COMPONENT_NAME$9, props$6, () => {
31228
31920
  const props = vue.getCurrentInstance().props;
31229
31921
  const icon = vue.ref('icon');
31230
31922
  const panel = vue.shallowRef({});
@@ -31260,9 +31952,9 @@
31260
31952
 
31261
31953
  /** @jsxImportSource vue */
31262
31954
 
31263
- const COMPONENT_NAME$6 = 'vc-timeline';
31955
+ const COMPONENT_NAME$8 = 'vc-timeline';
31264
31956
  const Timeline = /* @__PURE__ */ vue.defineComponent({
31265
- name: COMPONENT_NAME$6,
31957
+ name: COMPONENT_NAME$8,
31266
31958
  props: props$5,
31267
31959
  setup(props, {
31268
31960
  slots
@@ -31289,9 +31981,9 @@
31289
31981
 
31290
31982
  /** @jsxImportSource vue */
31291
31983
 
31292
- const COMPONENT_NAME$5 = 'vc-touch';
31984
+ const COMPONENT_NAME$7 = 'vc-touch';
31293
31985
  const Touch = /* @__PURE__ */ vue.defineComponent({
31294
- name: COMPONENT_NAME$5,
31986
+ name: COMPONENT_NAME$7,
31295
31987
  props: props$4,
31296
31988
  setup(props, {
31297
31989
  slots
@@ -31799,21 +32491,68 @@
31799
32491
  parentNode.insertChild({ data });
31800
32492
  }
31801
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
+ }
31802
32522
  _initDefaultCheckedNodes() {
31803
32523
  const checkedValues = this.checkedValues || [];
31804
32524
  const nodesMap = this.nodesMap;
31805
- 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) => {
31806
32536
  const node = nodesMap[id];
31807
32537
  if (node) {
31808
- node.setChecked(true, !this.checkStrictly);
32538
+ node.setChecked(true, true);
31809
32539
  }
31810
32540
  });
31811
32541
  }
31812
32542
  _initDefaultCheckedNode(node) {
31813
32543
  const checkedValues = this.checkedValues || [];
31814
32544
  const nodeValue = node.getter.value;
31815
- if (checkedValues.indexOf(nodeValue) !== -1) {
31816
- 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);
31817
32556
  }
31818
32557
  }
31819
32558
  setCheckedValues(newVal) {
@@ -32041,9 +32780,9 @@
32041
32780
 
32042
32781
  /** @jsxImportSource vue */
32043
32782
 
32044
- const COMPONENT_NAME$4 = 'vc-tree-node';
32783
+ const COMPONENT_NAME$6 = 'vc-tree-node';
32045
32784
  const TreeNodeContent = /* @__PURE__ */ vue.defineComponent({
32046
- name: COMPONENT_NAME$4,
32785
+ name: COMPONENT_NAME$6,
32047
32786
  props: props$3,
32048
32787
  emits: ['node-expand'],
32049
32788
  setup(props, {
@@ -32542,9 +33281,9 @@
32542
33281
 
32543
33282
  /** @jsxImportSource vue */
32544
33283
 
32545
- const COMPONENT_NAME$3 = 'vc-tree';
33284
+ const COMPONENT_NAME$5 = 'vc-tree';
32546
33285
  const Tree$1 = /* @__PURE__ */ vue.defineComponent({
32547
- name: COMPONENT_NAME$3,
33286
+ name: COMPONENT_NAME$5,
32548
33287
  props: props$2,
32549
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'],
32550
33289
  setup(props, {
@@ -32739,6 +33478,225 @@
32739
33478
  }
32740
33479
  });
32741
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
+
32742
33700
  const treeKeys = [
32743
33701
  "checkStrictly",
32744
33702
  "data",
@@ -32747,7 +33705,18 @@
32747
33705
  ];
32748
33706
  const props$1 = {
32749
33707
  ...props$1a,
32750
- ...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
+ }
32751
33720
  };
32752
33721
 
32753
33722
  /** @jsxImportSource vue */
@@ -32773,12 +33742,37 @@
32773
33742
  const searchValue = vue.ref('');
32774
33743
  const searchRegex = vue.ref(new RegExp(''));
32775
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
+ });
32776
33764
  const source = vue.computed(() => {
32777
33765
  return flattenData$1(props.data, {
32778
33766
  parent: true,
32779
33767
  cascader: true
32780
33768
  });
32781
33769
  });
33770
+ const labelMap = vue.computed(() => {
33771
+ return source.value.reduce((pre, cur) => {
33772
+ pre[cur.value] = cur.label || '';
33773
+ return pre;
33774
+ }, {});
33775
+ });
32782
33776
  const icon = vue.computed(() => {
32783
33777
  return isActive.value ? 'up' : 'down';
32784
33778
  });
@@ -32795,17 +33789,34 @@
32795
33789
  'is-disabled': props.disabled
32796
33790
  };
32797
33791
  });
32798
- const currentLabel = vue.computed(() => {
33792
+ const displayTags = vue.computed(() => {
32799
33793
  if (!props.data.length) {
32800
33794
  return [];
32801
33795
  }
32802
- 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
+ });
32803
33811
  });
32804
33812
  const collapseTagCount = vue.computed(() => {
32805
33813
  if (!props.maxTags) return 0;
32806
- const v = currentValue.value.length - props.maxTags;
33814
+ const v = displayTags.value.length - props.maxTags;
32807
33815
  return v < 0 ? 0 : v;
32808
33816
  });
33817
+ const autoWidth = vue.computed(() => {
33818
+ return typeof props.autoWidth === 'boolean' ? props.autoWidth : !!props.cascader;
33819
+ });
32809
33820
 
32810
33821
  /**
32811
33822
  * v-model 同步, 外部的数据改变时不会触发
@@ -32818,8 +33829,9 @@
32818
33829
  separator: props.separator,
32819
33830
  nullValue: props.nullValue
32820
33831
  });
32821
- emit('update:modelValue', v, currentLabel.value);
32822
- 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);
32823
33835
 
32824
33836
  // form表单
32825
33837
  formItem?.change?.(currentValue.value);
@@ -32844,8 +33856,15 @@
32844
33856
  const close = () => {
32845
33857
  isActive.value = false;
32846
33858
  };
32847
- const handleClose = index => {
32848
- 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
+ }
32849
33868
  sync();
32850
33869
  };
32851
33870
  const handleClear = e => {
@@ -32882,6 +33901,7 @@
32882
33901
  multiple,
32883
33902
  isActive,
32884
33903
  current: currentValue,
33904
+ currentValueGroups,
32885
33905
  // for portal
32886
33906
  toggle(v) {
32887
33907
  v = typeof v === 'boolean' ? v : !isActive.value;
@@ -32896,7 +33916,7 @@
32896
33916
  "trigger": props.trigger,
32897
33917
  "tag": props.tag,
32898
33918
  "placement": props.placement,
32899
- "auto-width": props.autoWidth,
33919
+ "autoWidth": autoWidth.value,
32900
33920
  "disabled": props.disabled,
32901
33921
  "portalClass": [['is-padding-none', props.portalClass]],
32902
33922
  "class": [classes.value, its.value.class, 'vc-tree-select'],
@@ -32913,22 +33933,22 @@
32913
33933
  return vue.createVNode(Input$1, {
32914
33934
  "id": props.id,
32915
33935
  "disabled": props.disabled,
32916
- "modelValue": currentLabel.value[0] || props.extra,
33936
+ "modelValue": displayTags.value[0]?.label || props.extra,
32917
33937
  "allow-dispatch": false,
32918
33938
  "class": "vc-tree-select__input",
32919
33939
  "readonly": true,
32920
33940
  "placeholder": its.value.attrs?.placeholder || '请选择'
32921
33941
  }, {
32922
- content: multiple.value && currentValue.value && currentValue.value.length > 0 ? () => {
33942
+ content: multiple.value && displayTags.value.length > 0 ? () => {
32923
33943
  return vue.createVNode("div", {
32924
33944
  "class": [classes.value, 'vc-tree-select__tags']
32925
- }, [currentValue.value.slice(0, props.maxTags).map((item, index) => {
33945
+ }, [displayTags.value.slice(0, props.maxTags).map(item => {
32926
33946
  return vue.createVNode(Tag, {
32927
- "key": item,
33947
+ "key": item.path ? item.path.join('-') : item.value,
32928
33948
  "closable": !props.disabled,
32929
- "onClose": () => handleClose(index)
33949
+ "onClose": () => handleClose(item)
32930
33950
  }, {
32931
- default: () => [currentLabel.value[index] || '']
33951
+ default: () => [item.label]
32932
33952
  });
32933
33953
  }), collapseTagCount.value ? vue.createVNode(Tag, null, {
32934
33954
  default: () => [`+${collapseTagCount.value}...`]
@@ -32961,16 +33981,23 @@
32961
33981
  }, [vue.createVNode(Spin, {
32962
33982
  "size": 16
32963
33983
  }, null)]), vue.createVNode(Scroller, {
32964
- "class": "vc-tree-select__options",
33984
+ "class": ['vc-tree-select__options', props.cascader && 'is-cascader'],
32965
33985
  "max-height": "200px"
32966
33986
  }, {
32967
- default: () => [vue.createVNode(Tree$1, {
32968
- "model-value": currentValue.value,
32969
- "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,
32970
33999
  "data": props.data,
32971
34000
  "checkStrictly": props.checkStrictly,
32972
- "allowDispatch": false,
32973
- "showCheckbox": true,
32974
34001
  "renderNodeLabel": props.renderNodeLabel,
32975
34002
  "onChange": handleChange
32976
34003
  }, null)]
@@ -139698,6 +140725,7 @@ ${r}
139698
140725
  exports.Calendar = Calendar$1;
139699
140726
  exports.Card = Card;
139700
140727
  exports.Carousel = Carousel;
140728
+ exports.CarouselItem = CarouselItem;
139701
140729
  exports.Cascader = Cascader;
139702
140730
  exports.Chart = Chart;
139703
140731
  exports.Checkbox = Checkbox;
@@ -139743,6 +140771,7 @@ ${r}
139743
140771
  exports.MCalendar = MCalendar;
139744
140772
  exports.MCard = MCard;
139745
140773
  exports.MCarousel = MCarousel;
140774
+ exports.MCarouselItem = MCarouselItem;
139746
140775
  exports.MCascader = MCascader;
139747
140776
  exports.MChart = MChart;
139748
140777
  exports.MCheckbox = MCheckbox;