mirror of
https://github.com/youzan/vant.git
synced 2025-10-16 08:00:34 +00:00
fix(Swipe): should stop autoplay when page is hidden
This commit is contained in:
@@ -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