diff --git a/src/packages/__VUE/swiper/index.taro.vue b/src/packages/__VUE/swiper/index.taro.vue index e56fc00fa0..abed80a2dd 100644 --- a/src/packages/__VUE/swiper/index.taro.vue +++ b/src/packages/__VUE/swiper/index.taro.vue @@ -342,6 +342,7 @@ export default create({ stopAutoPlay(); useTaroRect(container).then( (rect: any) => { + state.rect = rect; active = Math.min(childCount.value - 1, active); state.width = props.width ? +props.width : rect?.width; state.height = props.height ? +props.height : rect?.height;