mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-09-01 05:39:45 +08:00
fix(Popup): failed to autoplay when activated (#9452)
This commit is contained in:
parent
e3c0c7ea46
commit
89d08f2d06
@ -279,6 +279,8 @@ export default defineComponent({
|
|||||||
children.forEach((swipe) => {
|
children.forEach((swipe) => {
|
||||||
swipe.setOffset(0);
|
swipe.setOffset(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
autoplay();
|
||||||
};
|
};
|
||||||
|
|
||||||
const resize = () => initialize(state.active);
|
const resize = () => initialize(state.active);
|
||||||
@ -417,7 +419,7 @@ export default defineComponent({
|
|||||||
);
|
);
|
||||||
|
|
||||||
watch(count, () => initialize(state.active));
|
watch(count, () => initialize(state.active));
|
||||||
watch([count, () => props.autoplay], autoplay);
|
watch(() => props.autoplay, autoplay);
|
||||||
watch([windowSize.width, windowSize.height], resize);
|
watch([windowSize.width, windowSize.height], resize);
|
||||||
watch(usePageVisibility(), (visible) => {
|
watch(usePageVisibility(), (visible) => {
|
||||||
if (visible === 'visible') {
|
if (visible === 'visible') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user