动态的增加swiperitem不生效?
<swiper
@change="swiperChange"
class="swiper"
duration="400"
:vertical="true"
:current="swiperData.current"
@touchend="touchEnd"
@touchstart="touchStart"
:circular="swiperData.circular"
@animationfinish="animationfinish"
>
<swiper-item v-for="(item, index) in rawList" :key="index">
{{ rawList }}
<view class="swiper-item">
<VideoPlay :src="item.src" :current="swiperData.current" :id="index"/>
</view>
</swiper-item>
const animationfinish = (e: { detail: { current: number } }) => {
const {current} = e.detail;
if (current === rawList.length - 2) {
rawList.push({
src: "https://xjc.demo.hongcd.com/uploads/20210327/1b72e1b6153cd29df07f5449991e8083.mp4",
id: "6"
}); console.log(rawList, "滑动到倒数第二个push数据"); }};