@arco-design/mobile-react 2.29.5 → 2.29.6

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.
@@ -25,8 +25,7 @@
25
25
  unmountOnExit: true
26
26
  }, config || {}, {
27
27
  close: function close() {}
28
- });
29
- var dynamicProps = (0, _extends2.default)({}, baseProps); // 不同的key用不同的容器挂载
28
+ }); // 不同的key用不同的容器挂载
30
29
  // @en Different keys are mounted in different containers
31
30
 
32
31
  var id = "_ARCO_IMAGE_PREVIEW_DIV_" + (baseProps.key || '') + "_";
@@ -39,6 +38,12 @@
39
38
  var _ReactDOMRender = new _render.ReactDOMRender(Component, div, context),
40
39
  render = _ReactDOMRender.render;
41
40
 
41
+ var dynamicProps = (0, _extends2.default)({}, baseProps, {
42
+ getContainer: function getContainer() {
43
+ return div;
44
+ }
45
+ });
46
+
42
47
  function update(newConfig) {
43
48
  dynamicProps = (0, _extends2.default)({}, dynamicProps, newConfig || {});
44
49
  render(dynamicProps);
@@ -33,8 +33,7 @@
33
33
  }, normalize(config), {
34
34
  visible: false,
35
35
  close: function close() {}
36
- });
37
- var dynamicProps = (0, _extends2.default)({}, baseProps); // 不同的key用不同的容器挂载
36
+ }); // 不同的key用不同的容器挂载
38
37
 
39
38
  var id = "_" + (containerId || 'ARCO_MASKING') + "_DIV_" + (config.key || '') + "_";
40
39
 
@@ -46,6 +45,12 @@
46
45
  var _ReactDOMRender = new _render.ReactDOMRender(Component, div, context),
47
46
  render = _ReactDOMRender.render;
48
47
 
48
+ var dynamicProps = (0, _extends2.default)({}, baseProps, {
49
+ getContainer: function getContainer() {
50
+ return div;
51
+ }
52
+ });
53
+
49
54
  function update(newConfig) {
50
55
  dynamicProps = (0, _extends2.default)({}, dynamicProps, normalize(newConfig));
51
56
  render(dynamicProps);
@@ -63,10 +63,7 @@ export declare function methodsGenerator<P extends OpenBaseProps>(Comp: React.Fu
63
63
  close: () => void;
64
64
  update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">> & {
65
65
  key?: string | undefined;
66
- }) => void; /**
67
- * 内容面板 touchstart 事件,返回true时表示阻止本组件内部处理事件
68
- * @en The touchstart callback of content panel. When it returns true, it means that the event is prevented from being processed inside the component
69
- */
66
+ }) => void;
70
67
  };
71
68
  };
72
69
  declare const _default: React.ForwardRefExoticComponent<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>> & {
@@ -82,10 +79,7 @@ declare const _default: React.ForwardRefExoticComponent<PopupSwiperProps & React
82
79
  close: () => void;
83
80
  update: (newConfig: Pick<import("../context-provider").WithGlobalContext<PopupSwiperProps & React.RefAttributes<PopupSwiperRef>>, "direction" | "children" | "ref" | "key" | "context" | "translateZ" | "className" | "getScrollContainer" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "getContainer" | "mountOnEnter" | "unmountOnExit" | "onClose" | "initialBodyOverflow" | "maskClass" | "maskStyle" | "contentClass" | "contentStyle" | "maskTransitionType" | "contentTransitionType" | "maskTransitionTimeout" | "contentTransitionTimeout" | "maskClosable" | "animatingClosable" | "orientationDirection" | "preventBodyScroll" | "gestureOutOfControl" | "onOpen" | "onMaskClick" | "onPreventTouchMove" | "needBottomOffset" | "percentToClose" | "distanceToClose" | "speedToClose" | "allowSwipeDirections" | "exitDirection"> & {
84
81
  key?: string | undefined;
85
- }) => void; /**
86
- * 内容面板 touchstart 事件,返回true时表示阻止本组件内部处理事件
87
- * @en The touchstart callback of content panel. When it returns true, it means that the event is prevented from being processed inside the component
88
- */
82
+ }) => void;
89
83
  };
90
84
  };
91
85
  /**
package/umd/tabs/index.js CHANGED
@@ -255,7 +255,10 @@
255
255
  // 利用受控手动更改index时,给cell line加上动画
256
256
  // @en Animate the cell line when changeing the index
257
257
  setCellTrans(true);
258
- changeFromRef.current = 'manual';
258
+
259
+ if (!changeFromRef.current) {
260
+ changeFromRef.current = 'manual';
261
+ }
259
262
  }, [activeTab]);
260
263
  (0, _helpers.useUpdateEffect)(function () {
261
264
  onDistanceChange && onDistanceChange(distance, wrapWidth, activeIndex);