@arco-design/mobile-react 2.32.0 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.33.0](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.32.0...@arco-design/mobile-react@2.33.0) (2024-10-24)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * fix carousel scrolling bug when trigger click ([8b62ee3](https://github.com/arco-design/arco-design-mobile/commit/8b62ee3dfe489fc1890f099cc26c527d94f4ddbd))
12
+
13
+
14
+ ### Features
15
+
16
+ * `Steps` support reverse order ([#287](https://github.com/arco-design/arco-design-mobile/issues/287)) ([8ed5614](https://github.com/arco-design/arco-design-mobile/commit/8ed5614d385d20bfb5fa1ada83d7f56e9f1c5150))
17
+ * add custom class support to `Avatar` component ([#285](https://github.com/arco-design/arco-design-mobile/issues/285)) ([8a37b7c](https://github.com/arco-design/arco-design-mobile/commit/8a37b7cbd05bacb457a3c2692a66a6a02cd7646f))
18
+
19
+
20
+
21
+
22
+
6
23
  # [2.32.0](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.31.6...@arco-design/mobile-react@2.32.0) (2024-08-16)
7
24
 
8
25
 
package/README.en-US.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.31.6/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.31.6/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.32.0/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.32.0/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## Full import
package/README.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.31.6/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.31.6/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.32.0/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.32.0/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## 引入全部
@@ -59,6 +59,8 @@ function componentGenerator(Comp) {
59
59
  textAvatar = _props$textAvatar === void 0 ? '' : _props$textAvatar,
60
60
  _props$avatarStyle = props.avatarStyle,
61
61
  avatarStyle = _props$avatarStyle === void 0 ? {} : _props$avatarStyle,
62
+ _props$avatarClass = props.avatarClass,
63
+ avatarClass = _props$avatarClass === void 0 ? '' : _props$avatarClass,
62
64
  _props$autoFixFontSiz = props.autoFixFontSize,
63
65
  autoFixFontSize = _props$autoFixFontSiz === void 0 ? true : _props$autoFixFontSiz,
64
66
  _props$autoFixFontOff = props.autoFixFontOffset,
@@ -140,7 +142,7 @@ function componentGenerator(Comp) {
140
142
  className: (0, _mobileUtils.cls)(prefixCls + "-avatar-wrapper", className, size, shape, prefixCls + "-avatar-wrapper-shape-" + shape, (_cls = {}, _cls[prefixCls + "-avatar-wrapper-with-info " + prefixCls + "-avatar-wrapper-with-info-size-" + size + " with-info"] = Boolean(avatarName), _cls)),
141
143
  onClick: onClick
142
144
  }, /*#__PURE__*/_react.default.createElement("div", {
143
- className: (0, _mobileUtils.cls)(prefixCls + "-avatar", prefixCls + "-avatar-size-" + size, size, prefixCls + "-avatar-shape-" + shape, shape, (_cls2 = {}, _cls2[prefixCls + "-text-avatar " + prefixCls + "-avatar-mode-text"] = isTextAvatar, _cls2[prefixCls + "-image-avatar " + prefixCls + "-avatar-mode-image"] = isImageAvatar, _cls2[prefixCls + "-avatar-default-overlap default-overlap"] = useDefaultAvatar, _cls2)),
145
+ className: (0, _mobileUtils.cls)(prefixCls + "-avatar", avatarClass, prefixCls + "-avatar-size-" + size, size, prefixCls + "-avatar-shape-" + shape, shape, (_cls2 = {}, _cls2[prefixCls + "-text-avatar " + prefixCls + "-avatar-mode-text"] = isTextAvatar, _cls2[prefixCls + "-image-avatar " + prefixCls + "-avatar-mode-image"] = isImageAvatar, _cls2[prefixCls + "-avatar-default-overlap default-overlap"] = useDefaultAvatar, _cls2)),
144
146
  style: avatarStyle,
145
147
  ref: avatarRef
146
148
  }, children, useDefaultAvatar && (defaultOverLap === void 0 ? /*#__PURE__*/_react.default.createElement(_IconUserFill.default, {
@@ -42,6 +42,12 @@ export interface AvatarProps<T extends ImageProps = ImageProps> extends BaseProp
42
42
  * @default {}
43
43
  */
44
44
  avatarStyle?: React.CSSProperties;
45
+ /**
46
+ * 头像元素的自定义类名
47
+ * @en Custom classname for avatar element
48
+ * @default ""
49
+ */
50
+ avatarClass?: string;
45
51
  /**
46
52
  * 是否自动根据头像尺寸调整字体大小
47
53
  * @en Whether to automatically adjust the font size according to the avatar size
@@ -243,6 +243,12 @@ var Carousel = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
243
243
 
244
244
  if (posAdjustingRef.current) {
245
245
  return;
246
+ } // touchMove触发时,阻止handleTouchStart多次执行(如点击事件)
247
+ // @en When touchMove is triggered, prevent handleTouchStart from executing multiple times (such as click events)
248
+
249
+
250
+ if (touchStartedRef.current && touchMovedRef.current) {
251
+ return;
246
252
  }
247
253
 
248
254
  touchStartedRef.current = true;
@@ -699,12 +705,23 @@ var Carousel = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
699
705
  return;
700
706
  }
701
707
 
702
- if (!touchStartedRef.current || !touchMovedRef.current || posAdjustingRef.current || touchStoppedRef.current) {
708
+ if (!touchStartedRef.current) {
703
709
  return;
704
710
  }
705
711
 
706
712
  touchStartedRef.current = false;
713
+
714
+ if (!touchMovedRef.current) {
715
+ setPlayIntervalRef.current();
716
+ return;
717
+ }
718
+
707
719
  touchMovedRef.current = false;
720
+
721
+ if (posAdjustingRef.current || touchStoppedRef.current) {
722
+ return;
723
+ }
724
+
708
725
  var touchEndTime = new Date().getTime();
709
726
  var dis = Math.abs(distance);
710
727
  var speed = dis / (touchEndTime - touchStartTimeRef.current) * 1000;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { StepsProps, StepsRef } from './type';
3
3
  export * from './type';
4
- export declare const StepsContext: React.Context<Pick<StepsProps, "direction" | "status" | "align" | "iconType" | "current"> & {
4
+ export declare const StepsContext: React.Context<Pick<StepsProps, "direction" | "status" | "align" | "iconType" | "current" | "reverseOrder"> & {
5
5
  index?: number | undefined;
6
6
  changeIndex: (newIndex: number) => void;
7
7
  }>;
@@ -53,6 +53,8 @@ var Steps = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
53
53
  _props$status = props.status,
54
54
  status = _props$status === void 0 ? 'process' : _props$status,
55
55
  items = props.items,
56
+ _props$reverseOrder = props.reverseOrder,
57
+ reverseOrder = _props$reverseOrder === void 0 ? false : _props$reverseOrder,
56
58
  onClick = props.onClick,
57
59
  onChange = props.onChange;
58
60
  var defaultAlign = direction === 'vertical' ? 'start' : 'center';
@@ -93,6 +95,7 @@ var Steps = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
93
95
  index: index,
94
96
  status: activeIndex === index ? status : void 0,
95
97
  align: align,
98
+ reverseOrder: reverseOrder,
96
99
  changeIndex: changeIndex
97
100
  },
98
101
  key: index
@@ -101,7 +104,9 @@ var Steps = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
101
104
  return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref) {
102
105
  var prefixCls = _ref.prefixCls;
103
106
  return /*#__PURE__*/_react.default.createElement("div", {
104
- className: prefixCls + "-steps all-border-box " + className + " " + direction + " " + system,
107
+ className: (0, _mobileUtils.cls)(prefixCls + "-steps all-border-box " + className + " " + direction + " " + system, {
108
+ 'reverse-order': reverseOrder
109
+ }),
105
110
  style: style,
106
111
  ref: domRef
107
112
  }, items ? items.map(function (item, index) {
@@ -516,6 +516,12 @@
516
516
  display: flex;
517
517
  padding: 0.32rem 0 ;
518
518
  }
519
+ .arco-steps.reverse-order {
520
+ -webkit-box-orient: horizontal;
521
+ -webkit-box-direction: reverse;
522
+ -webkit-flex-direction: row-reverse;
523
+ flex-direction: row-reverse;
524
+ }
519
525
  .arco-steps-item {
520
526
  position: relative;
521
527
  display: -webkit-box;
@@ -548,6 +554,14 @@
548
554
  .arco-steps-item:last-child .arco-steps-item-tail::after {
549
555
  visibility: hidden;
550
556
  }
557
+ .reverse-order .arco-steps-item:first-child .arco-steps-item-tail::after,
558
+ .reverse-order .arco-steps-item:last-child .arco-steps-item-tail::before {
559
+ visibility: hidden;
560
+ }
561
+ .reverse-order .arco-steps-item:first-child .arco-steps-item-tail::before,
562
+ .reverse-order .arco-steps-item:last-child .arco-steps-item-tail::after {
563
+ visibility: visible;
564
+ }
551
565
  .arco-steps-item-tail {
552
566
  position: absolute;
553
567
  display: -webkit-box;
@@ -577,13 +591,13 @@
577
591
  right: 9PX ;
578
592
  }
579
593
  .horizontal .arco-steps-item-tail-align-start::after {
580
- content: "";
594
+ content: '';
581
595
  width: 100%;
582
596
  border-radius: 2PX ;
583
597
  }
584
598
  .horizontal .arco-steps-item-tail-align-center::before,
585
599
  .horizontal .arco-steps-item-tail-align-center::after {
586
- content: "";
600
+ content: '';
587
601
  width: 50%;
588
602
  }
589
603
  .horizontal .arco-steps-item-tail-align-center::before {
@@ -637,13 +651,13 @@
637
651
  padding: 14PX 0 ;
638
652
  }
639
653
  .vertical .arco-steps-item-tail-align-start::after {
640
- content: "";
654
+ content: '';
641
655
  height: 100%;
642
656
  border-radius: 2PX ;
643
657
  }
644
658
  .vertical .arco-steps-item-tail-align-center::before,
645
659
  .vertical .arco-steps-item-tail-align-center::after {
646
- content: "";
660
+ content: '';
647
661
  height: 50%;
648
662
  }
649
663
  .vertical .arco-steps-item-tail-align-center::before {
@@ -667,6 +681,15 @@
667
681
  .arco-steps-item-tail-align-center.arco-steps-item-tail-status-error::before {
668
682
  background: #165DFF ;
669
683
  }
684
+ .reverse-order .arco-steps-item-tail-status-finish::before,
685
+ .reverse-order .arco-steps-item-tail-status-process::after,
686
+ .reverse-order .arco-steps-item-tail-align-center.arco-steps-item-tail-status-error::after {
687
+ background: #165DFF ;
688
+ }
689
+ .reverse-order .arco-steps-item-tail-status-process::before,
690
+ .reverse-order .arco-steps-item-tail-align-center.arco-steps-item-tail-status-error::before {
691
+ background: #e5e6eb ;
692
+ }
670
693
  .arco-steps-item-custom-icon,
671
694
  .arco-steps-item-icon {
672
695
  display: -webkit-inline-box;
@@ -796,6 +819,12 @@
796
819
  padding-bottom: 0 ;
797
820
  padding-left: 0.4rem ;
798
821
  }
822
+ .arco-steps.vertical.reverse-order {
823
+ -webkit-box-orient: vertical;
824
+ -webkit-box-direction: reverse;
825
+ -webkit-flex-direction: column-reverse;
826
+ flex-direction: column-reverse;
827
+ }
799
828
  [dir="rtl"] .arco-steps.vertical {
800
829
  padding-left: initial;
801
830
  padding-right: 0.4rem ;
@@ -823,6 +852,15 @@
823
852
  .arco-theme-dark .arco-steps-item-tail-align-center.arco-steps-item-tail-status-error::before {
824
853
  background: #3C7EFF ;
825
854
  }
855
+ .arco-theme-dark .reverse-order .arco-steps-item-tail-status-finish::before,
856
+ .arco-theme-dark .reverse-order .arco-steps-item-tail-status-process::after,
857
+ .arco-theme-dark .reverse-order .arco-steps-item-tail-align-center.arco-steps-item-tail-status-error::after {
858
+ background: #3C7EFF ;
859
+ }
860
+ .arco-theme-dark .reverse-order .arco-steps-item-tail-status-process::before,
861
+ .arco-theme-dark .reverse-order .arco-steps-item-tail-align-center.arco-steps-item-tail-status-error::before {
862
+ background: #484849 ;
863
+ }
826
864
  .arco-theme-dark .number.finish .arco-steps-item-icon {
827
865
  background: #000D4D ;
828
866
  }
@@ -1,9 +1,13 @@
1
- @import "../../../style/mixin.less";
1
+ @import '../../../style/mixin.less';
2
2
 
3
3
  .@{prefix}-steps {
4
4
  display: flex;
5
5
  .use-var(padding, steps-padding);
6
6
 
7
+ &.reverse-order {
8
+ flex-direction: row-reverse;
9
+ }
10
+
7
11
  &-item {
8
12
  position: relative;
9
13
  display: flex;
@@ -30,6 +34,20 @@
30
34
  visibility: hidden;
31
35
  }
32
36
 
37
+ &:first-child &-tail::after,
38
+ &:last-child &-tail::before {
39
+ .reverse-order & {
40
+ visibility: hidden;
41
+ }
42
+ }
43
+
44
+ &:first-child &-tail::before,
45
+ &:last-child &-tail::after {
46
+ .reverse-order & {
47
+ visibility: visible;
48
+ }
49
+ }
50
+
33
51
  &-tail {
34
52
  position: absolute;
35
53
  display: flex;
@@ -50,7 +68,7 @@
50
68
  .use-var(padding, steps-tail-horizontal-padding);
51
69
 
52
70
  &::after {
53
- content: "";
71
+ content: '';
54
72
  width: 100%;
55
73
  .use-var(border-radius, steps-tail-border-radius);
56
74
  }
@@ -59,7 +77,7 @@
59
77
  &-align-center {
60
78
  &::before,
61
79
  &::after {
62
- content: "";
80
+ content: '';
63
81
  width: 50%;
64
82
  }
65
83
  &::before {
@@ -90,7 +108,7 @@
90
108
  .use-var(padding, steps-tail-vertical-padding);
91
109
 
92
110
  &::after {
93
- content: "";
111
+ content: '';
94
112
  height: 100%;
95
113
  .use-var(border-radius, steps-tail-border-radius);
96
114
  }
@@ -99,7 +117,7 @@
99
117
  &-align-center {
100
118
  &::before,
101
119
  &::after {
102
- content: "";
120
+ content: '';
103
121
  height: 50%;
104
122
  }
105
123
  &::before {
@@ -127,6 +145,20 @@
127
145
  &-align-center&-status-error::before {
128
146
  .use-var(background, steps-tail-finish-background);
129
147
  }
148
+
149
+ &-status-finish::before,
150
+ &-status-process::after,
151
+ &-align-center&-status-error::after {
152
+ .reverse-order & {
153
+ .use-var(background, steps-tail-finish-background);
154
+ }
155
+ }
156
+ &-status-process::before,
157
+ &-align-center&-status-error::before {
158
+ .reverse-order & {
159
+ .use-var(background, steps-tail-standard-background);
160
+ }
161
+ }
130
162
  }
131
163
 
132
164
  &-custom-icon,
@@ -206,7 +238,6 @@
206
238
  }
207
239
 
208
240
  &-content {
209
-
210
241
  .horizontal & {
211
242
  .use-var(margin-top, steps-horizontal-content-margin-top);
212
243
  &-align-center {
@@ -262,6 +293,10 @@
262
293
  }
263
294
 
264
295
  &.vertical {
296
+ &.reverse-order {
297
+ flex-direction: column-reverse;
298
+ }
299
+
265
300
  flex-direction: column;
266
301
  .use-var(padding-bottom, steps-vertical-padding-bottom);
267
302
  .use-var-with-rtl(padding-left, steps-vertical-padding-left);
@@ -307,6 +342,23 @@
307
342
  .use-var(background, dark-steps-tail-finish-background);
308
343
  }
309
344
  }
345
+ &-status-finish::before,
346
+ &-status-process::after,
347
+ &-align-center&-status-error::after {
348
+ .reverse-order & {
349
+ @{arco-dark-mode-selector} & {
350
+ .use-var(background, dark-steps-tail-finish-background);
351
+ }
352
+ }
353
+ }
354
+ &-status-process::before,
355
+ &-align-center&-status-error::before {
356
+ .reverse-order & {
357
+ @{arco-dark-mode-selector} & {
358
+ .use-var(background, dark-steps-tail-standard-background);
359
+ }
360
+ }
361
+ }
310
362
  }
311
363
  &-icon {
312
364
  .number.finish & {
@@ -32,6 +32,11 @@ export interface StepsProps {
32
32
  * @en Custom classname
33
33
  */
34
34
  className?: string;
35
+ /**
36
+ * 顺序反转,设置为true后,顺序将从右到左,从下到上
37
+ * @en reverse the order from right to left and from bottom to top
38
+ */
39
+ reverseOrder?: boolean;
35
40
  /**
36
41
  * 自定义样式,如果想用 css 控制 icon 颜色,可使用公共 mixin '.set-steps-color(@color)'
37
42
  * @en Custom stylesheet. If want to use CSS to control icon color, use public mixin '.set-steps-color(@color)'
package/dist/index.js CHANGED
@@ -7813,19 +7813,21 @@
7813
7813
  _e = props.status,
7814
7814
  status = _e === void 0 ? 'process' : _e,
7815
7815
  items = props.items,
7816
+ _f = props.reverseOrder,
7817
+ reverseOrder = _f === void 0 ? false : _f,
7816
7818
  onClick = props.onClick,
7817
7819
  onChange = props.onChange;
7818
7820
  var defaultAlign = direction === 'vertical' ? 'start' : 'center';
7819
7821
  var align = userSetAlign !== void 0 ? userSetAlign : defaultAlign;
7820
7822
 
7821
- var _f = React.useState(Number(defaultIndex)),
7822
- innerIndex = _f[0],
7823
- setInnerIndex = _f[1];
7823
+ var _g = React.useState(Number(defaultIndex)),
7824
+ innerIndex = _g[0],
7825
+ setInnerIndex = _g[1];
7824
7826
 
7825
- var _g = useRefState(current === void 0 ? innerIndex : current),
7826
- activeIndex = _g[0],
7827
- activeRefIndex = _g[1],
7828
- setActiveIndex = _g[2];
7827
+ var _h = useRefState(current === void 0 ? innerIndex : current),
7828
+ activeIndex = _h[0],
7829
+ activeRefIndex = _h[1],
7830
+ setActiveIndex = _h[2];
7829
7831
 
7830
7832
  var domRef = React.useRef(null);
7831
7833
  var system = useSystem();
@@ -7853,6 +7855,7 @@
7853
7855
  index: index,
7854
7856
  status: activeIndex === index ? status : void 0,
7855
7857
  align: align,
7858
+ reverseOrder: reverseOrder,
7856
7859
  changeIndex: changeIndex
7857
7860
  },
7858
7861
  key: index
@@ -7861,7 +7864,9 @@
7861
7864
  return /*#__PURE__*/React__default["default"].createElement(ContextLayout, null, function (_a) {
7862
7865
  var prefixCls = _a.prefixCls;
7863
7866
  return /*#__PURE__*/React__default["default"].createElement("div", {
7864
- className: prefixCls + "-steps all-border-box " + className + " " + direction + " " + system,
7867
+ className: cls(prefixCls + "-steps all-border-box " + className + " " + direction + " " + system, {
7868
+ 'reverse-order': reverseOrder
7869
+ }),
7865
7870
  style: style,
7866
7871
  ref: domRef
7867
7872
  }, items ? items.map(function (item, index) {
@@ -9826,24 +9831,26 @@
9826
9831
  textAvatar = _g === void 0 ? '' : _g,
9827
9832
  _h = props.avatarStyle,
9828
9833
  avatarStyle = _h === void 0 ? {} : _h,
9829
- _j = props.autoFixFontSize,
9830
- autoFixFontSize = _j === void 0 ? true : _j,
9831
- _k = props.autoFixFontOffset,
9832
- autoFixFontOffset = _k === void 0 ? 2 : _k,
9833
- _l = props.avatarName,
9834
- avatarName = _l === void 0 ? '' : _l,
9835
- _m = props.avatarDesc,
9836
- avatarDesc = _m === void 0 ? '' : _m,
9837
- _o = props.children,
9838
- children = _o === void 0 ? null : _o,
9839
- _p = props.renderInfo,
9840
- renderInfo = _p === void 0 ? null : _p,
9841
- _q = props.className,
9842
- className = _q === void 0 ? '' : _q,
9843
- _r = props.style,
9844
- style = _r === void 0 ? {} : _r,
9845
- _s = props.imageProps,
9846
- imageProps = _s === void 0 ? {} : _s,
9834
+ _j = props.avatarClass,
9835
+ avatarClass = _j === void 0 ? '' : _j,
9836
+ _k = props.autoFixFontSize,
9837
+ autoFixFontSize = _k === void 0 ? true : _k,
9838
+ _l = props.autoFixFontOffset,
9839
+ autoFixFontOffset = _l === void 0 ? 2 : _l,
9840
+ _m = props.avatarName,
9841
+ avatarName = _m === void 0 ? '' : _m,
9842
+ _o = props.avatarDesc,
9843
+ avatarDesc = _o === void 0 ? '' : _o,
9844
+ _p = props.children,
9845
+ children = _p === void 0 ? null : _p,
9846
+ _q = props.renderInfo,
9847
+ renderInfo = _q === void 0 ? null : _q,
9848
+ _r = props.className,
9849
+ className = _r === void 0 ? '' : _r,
9850
+ _s = props.style,
9851
+ style = _s === void 0 ? {} : _s,
9852
+ _t = props.imageProps,
9853
+ imageProps = _t === void 0 ? {} : _t,
9847
9854
  defaultOverLap = props.defaultOverLap,
9848
9855
  onClickDecoration = props.onClickDecoration,
9849
9856
  onClick = props.onClick;
@@ -9851,9 +9858,9 @@
9851
9858
  var avatarRef = React.useRef(null);
9852
9859
  var avatarTextRef = React.useRef(null);
9853
9860
 
9854
- var _t = React.useState(1),
9855
- textScale = _t[0],
9856
- setTextScale = _t[1];
9861
+ var _u = React.useState(1),
9862
+ textScale = _u[0],
9863
+ setTextScale = _u[1];
9857
9864
 
9858
9865
  React.useImperativeHandle(ref, function () {
9859
9866
  return {
@@ -9902,7 +9909,7 @@
9902
9909
  className: cls(prefixCls + "-avatar-wrapper", className, size, shape, prefixCls + "-avatar-wrapper-shape-" + shape, (_a = {}, _a[prefixCls + "-avatar-wrapper-with-info " + prefixCls + "-avatar-wrapper-with-info-size-" + size + " with-info"] = Boolean(avatarName), _a)),
9903
9910
  onClick: onClick
9904
9911
  }, /*#__PURE__*/React__default["default"].createElement("div", {
9905
- className: cls(prefixCls + "-avatar", prefixCls + "-avatar-size-" + size, size, prefixCls + "-avatar-shape-" + shape, shape, (_b = {}, _b[prefixCls + "-text-avatar " + prefixCls + "-avatar-mode-text"] = isTextAvatar, _b[prefixCls + "-image-avatar " + prefixCls + "-avatar-mode-image"] = isImageAvatar, _b[prefixCls + "-avatar-default-overlap default-overlap"] = useDefaultAvatar, _b)),
9912
+ className: cls(prefixCls + "-avatar", avatarClass, prefixCls + "-avatar-size-" + size, size, prefixCls + "-avatar-shape-" + shape, shape, (_b = {}, _b[prefixCls + "-text-avatar " + prefixCls + "-avatar-mode-text"] = isTextAvatar, _b[prefixCls + "-image-avatar " + prefixCls + "-avatar-mode-image"] = isImageAvatar, _b[prefixCls + "-avatar-default-overlap default-overlap"] = useDefaultAvatar, _b)),
9906
9913
  style: avatarStyle,
9907
9914
  ref: avatarRef
9908
9915
  }, children, useDefaultAvatar && (defaultOverLap === void 0 ? /*#__PURE__*/React__default["default"].createElement(IconUserFill, {
@@ -10402,6 +10409,12 @@
10402
10409
 
10403
10410
  if (posAdjustingRef.current) {
10404
10411
  return;
10412
+ } // touchMove触发时,阻止handleTouchStart多次执行(如点击事件)
10413
+ // @en When touchMove is triggered, prevent handleTouchStart from executing multiple times (such as click events)
10414
+
10415
+
10416
+ if (touchStartedRef.current && touchMovedRef.current) {
10417
+ return;
10405
10418
  }
10406
10419
 
10407
10420
  touchStartedRef.current = true;
@@ -10858,12 +10871,23 @@
10858
10871
  return;
10859
10872
  }
10860
10873
 
10861
- if (!touchStartedRef.current || !touchMovedRef.current || posAdjustingRef.current || touchStoppedRef.current) {
10874
+ if (!touchStartedRef.current) {
10862
10875
  return;
10863
10876
  }
10864
10877
 
10865
10878
  touchStartedRef.current = false;
10879
+
10880
+ if (!touchMovedRef.current) {
10881
+ setPlayIntervalRef.current();
10882
+ return;
10883
+ }
10884
+
10866
10885
  touchMovedRef.current = false;
10886
+
10887
+ if (posAdjustingRef.current || touchStoppedRef.current) {
10888
+ return;
10889
+ }
10890
+
10867
10891
  var touchEndTime = new Date().getTime();
10868
10892
  var dis = Math.abs(distance);
10869
10893
  var speed = dis / (touchEndTime - touchStartTimeRef.current) * 1000;