Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swiper 组件的 circular 模式下,复制的元素缺失 #14160

Closed
oasis-cloud opened this issue Jul 12, 2023 · 1 comment · Fixed by #14400
Closed

swiper 组件的 circular 模式下,复制的元素缺失 #14160

oasis-cloud opened this issue Jul 12, 2023 · 1 comment · Fixed by #14400
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@oasis-cloud
Copy link
Contributor

相关平台

H5

复现仓库

https://github.com/oasis-cloud/taro-swiper-bug.git
浏览器版本: Chrome
使用框架: React

复现步骤

git clone https://github.com/oasis-cloud/taro-swiper-bug.git

pnpm install

pnpm dev:h5

然后在浏览器中滑动 swiper,会出现问题

期望结果

swiper-slide-duplicate 的子元素数量为 3 个,实际应该是 4 个

实际结果

swiper-slide-duplicate 的子元素数量为 3 个,实际应该是 4 个

环境信息

👽 Taro v3.6.8


  Taro CLI 3.6.8 environment info:
    System:
      OS: macOS 12.0.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.18.2 - ~/.nvm/versions/node/v14.18.2/bin/node
      Yarn: 1.22.17 - ~/.nvm/versions/node/v14.18.2/bin/yarn
      npm: 6.14.15 - ~/.nvm/versions/node/v14.18.2/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.8 => 3.6.8
      @tarojs/components: 3.6.8 => 3.6.8
      @tarojs/helper: 3.6.8 => 3.6.8
      @tarojs/plugin-framework-react: 3.6.8 => 3.6.8
      @tarojs/plugin-platform-alipay: 3.6.8 => 3.6.8
      @tarojs/plugin-platform-h5: 3.6.8 => 3.6.8
      @tarojs/plugin-platform-jd: 3.6.8 => 3.6.8
      @tarojs/plugin-platform-qq: 3.6.8 => 3.6.8
      @tarojs/plugin-platform-swan: 3.6.8 => 3.6.8
      @tarojs/plugin-platform-tt: 3.6.8 => 3.6.8
      @tarojs/plugin-platform-weapp: 3.6.8 => 3.6.8
      @tarojs/react: 3.6.8 => 3.6.8
      @tarojs/runtime: 3.6.8 => 3.6.8
      @tarojs/shared: 3.6.8 => 3.6.8
      @tarojs/taro: 3.6.8 => 3.6.8
      @tarojs/taro-loader: 3.6.8 => 3.6.8
      @tarojs/webpack5-runner: 3.6.8 => 3.6.8
      babel-preset-taro: 3.6.8 => 3.6.8
      eslint-config-taro: 3.6.8 => 3.6.8
      react: ^18.0.0 => 18.2.0
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Jul 12, 2023
@github-project-automation github-project-automation bot moved this to Padding in H5 Jul 12, 2023
@oasis-cloud
Copy link
Contributor Author

<TSwiper circular>
          <TSwiperItem>
            <View style={demo}>
              <View style={div}>1</View>
              <View style={div}>2</View>
              <View style={div}>3</View>
              <View style={div}>4</View>
            </View>
          </TSwiperItem>
          <TSwiperItem>
            <View style={demo}>
              <View style={div}>5</View>
              <View style={div}>6</View>
              <View style={div}>7</View>
              <View style={div}>8</View>
            </View>
          </TSwiperItem>
          <TSwiperItem>
            <View style={demo}>
              <View style={div}>9</View>
              <View style={div}>10</View>
              <View style={div}>11</View>
              <View style={div}>12</View>
            </View>
          </TSwiperItem>
        </TSwiper>

当滑动超过 12 后,界面展示异常。如下图:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant