收藏
回答

swiper使用next/previous.margin,加开启循环,左切滑动是闪出来的,怎么解决?

<swiper
                class="swiper-index"
                next-margin="160rpx"
                previous-margin="160rpx"
                :circular="true"
                :current="current"
                @change="handleSwiperChange"
              >
                <swiper-item
                  v-for="(item, index) in list"
                  :key="index"
                  class="swiper-item"
                  :class="{ active: current === index }"
                >
                  <view class="flex-col items-start section_9">
                    <view class="flex-row section_10">
                      <image
                        src="https://codesign-v2-1258344706.cos.ap-guangzhou.myqcloud.com/codefun/16499074094311281604.png"
                        class="image_14"
                      />
                      <text decode="decode" class="text_4">470.5k{{ index }}</text>
                    </view>
                  </view>
                </swiper-item>
              </swiper>

list: [
        {
          title: 'AI为人工耳蜗降噪',
          content:
            '文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案'
        },
        {
          title: 'AI为人工耳蜗降噪',
          content:
            '文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案'
        },
        {
          title: 'AI为人工耳蜗降噪',
          content:
            '文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案文案'
        }
      ],
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容