pb-sxp-ui 1.15.43 → 1.15.44

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.
@@ -26,8 +26,9 @@ const PictureGroup = forwardRef(({ imgUrls, data, height, rec, index, onViewImag
26
26
  };
27
27
  });
28
28
  useEffect(() => {
29
+ let timerId;
29
30
  if (isLoad && isActive && isDiyH5) {
30
- setTimeout(() => {
31
+ timerId = setTimeout(() => {
31
32
  var _a, _b, _c, _d, _e, _f;
32
33
  if (!loopPlayRef.current)
33
34
  return;
@@ -40,6 +41,10 @@ const PictureGroup = forwardRef(({ imgUrls, data, height, rec, index, onViewImag
40
41
  }
41
42
  }, 3000);
42
43
  }
44
+ return () => {
45
+ if (timerId)
46
+ clearTimeout(timerId);
47
+ };
43
48
  }, [isLoad, isActive, isDiyH5, data, index, swiperRef]);
44
49
  useEffect(() => {
45
50
  if (isLoad && isActive) {
@@ -28,8 +28,9 @@ const PictureGroup = (0, react_1.forwardRef)(({ imgUrls, data, height, rec, inde
28
28
  };
29
29
  });
30
30
  (0, react_1.useEffect)(() => {
31
+ let timerId;
31
32
  if (isLoad && isActive && isDiyH5) {
32
- setTimeout(() => {
33
+ timerId = setTimeout(() => {
33
34
  var _a, _b, _c, _d, _e, _f;
34
35
  if (!loopPlayRef.current)
35
36
  return;
@@ -42,6 +43,10 @@ const PictureGroup = (0, react_1.forwardRef)(({ imgUrls, data, height, rec, inde
42
43
  }
43
44
  }, 3000);
44
45
  }
46
+ return () => {
47
+ if (timerId)
48
+ clearTimeout(timerId);
49
+ };
45
50
  }, [isLoad, isActive, isDiyH5, data, index, swiperRef]);
46
51
  (0, react_1.useEffect)(() => {
47
52
  if (isLoad && isActive) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pb-sxp-ui",
3
- "version": "1.15.43",
3
+ "version": "1.15.44",
4
4
  "description": "React enterprise-class UI components",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",