fix(Popup): failed to autoplay when activated (#9452)

This commit is contained in:
neverland
2021-09-12 09:31:36 +08:00
committed by GitHub
parent e3c0c7ea46
commit 89d08f2d06

View File

@@ -279,6 +279,8 @@ export default defineComponent({
children.forEach((swipe) => {
swipe.setOffset(0);
});
autoplay();
};
const resize = () => initialize(state.active);
@@ -417,7 +419,7 @@ export default defineComponent({
);
watch(count, () => initialize(state.active));
watch([count, () => props.autoplay], autoplay);
watch(() => props.autoplay, autoplay);
watch([windowSize.width, windowSize.height], resize);
watch(usePageVisibility(), (visible) => {
if (visible === 'visible') {