mirror of
https://github.com/youzan/vant.git
synced 2026-05-08 01:07:46 +08:00
fix(Swipe): should stop autoplay when page is hidden
This commit is contained in:
+1
-1
@@ -400,7 +400,7 @@ export default createComponent({
|
||||
watch([windowSize.width, windowSize.height], resize);
|
||||
|
||||
watch(usePageVisibility(), (visible) => {
|
||||
if (visible) {
|
||||
if (visible === 'visible') {
|
||||
autoplay();
|
||||
} else {
|
||||
stopAutoplay();
|
||||
|
||||
Reference in New Issue
Block a user