From 1c428f240cd44d3389510263dd7f03973cfbfa2b Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Tue, 12 Jan 2021 19:47:41 +0800 Subject: [PATCH] fix(Swipe): should stop autoplay when page is hidden --- src/swipe/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/swipe/index.js b/src/swipe/index.js index 0d0fa213d..a10c44d0e 100644 --- a/src/swipe/index.js +++ b/src/swipe/index.js @@ -400,7 +400,7 @@ export default createComponent({ watch([windowSize.width, windowSize.height], resize); watch(usePageVisibility(), (visible) => { - if (visible) { + if (visible === 'visible') { autoplay(); } else { stopAutoplay();