mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
fix(Swipe): should stop autoplay when page is hidden
This commit is contained in:
parent
215b55536c
commit
1c428f240c
@ -400,7 +400,7 @@ export default createComponent({
|
||||
watch([windowSize.width, windowSize.height], resize);
|
||||
|
||||
watch(usePageVisibility(), (visible) => {
|
||||
if (visible) {
|
||||
if (visible === 'visible') {
|
||||
autoplay();
|
||||
} else {
|
||||
stopAutoplay();
|
||||
|
Loading…
x
Reference in New Issue
Block a user