From a74b5eb38b86d7e9501ea9b62a1c7dc71be84d5f Mon Sep 17 00:00:00 2001 From: liweijie0812 <674416404@qq.com> Date: Tue, 17 Dec 2024 19:01:48 +0800 Subject: [PATCH] fix(swiper): resolve change current not work (#4845) --- src/swiper/swiper.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/swiper/swiper.tsx b/src/swiper/swiper.tsx index 61241112fb..85e9c07856 100644 --- a/src/swiper/swiper.tsx +++ b/src/swiper/swiper.tsx @@ -327,9 +327,7 @@ export default defineComponent({ watch( () => props.current, () => { - if (props.autoplay) { - swiperTo(props.current, { source: 'autoplay' }); - } + swiperTo(props.current, { source: 'autoplay' }); }, );