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

@nutui/nutui-react-taro swiper在h5端兼容问题 #1213

Closed
yaob421123 opened this issue Jul 11, 2023 · 2 comments
Closed

@nutui/nutui-react-taro swiper在h5端兼容问题 #1213

yaob421123 opened this issue Jul 11, 2023 · 2 comments

Comments

@yaob421123
Copy link

NutUI scenes(nutui 场景)

H5 + 小程序

NutUI-react version(nutui-react 版本)

2.0.2

React version(react 版本)

18.2.0

Operating environment(运行环境)

dev:h5

Citation method(引用方式)

npm

Node version(node 版本)

16.18.0

Browser and its version(浏览器及其版本)

chrome

System and its version(系统及其版本)

mac

Taro environmental information(taro 环境信息)

3.6.6

Reproduction link(重现链接)

Steps to reproduce(重现步骤)

image

滑动过程中,Swiper.Item 渲染异常,滑动结束显示正常

import { View, Text, Button } from '@tarojs/components'
import { Swiper } from '@nutui/nutui-react-taro';
import './index.scss';

const demo = {
  display: 'flex'
}

const div = {
  flex: 1,
  border: '1px solid red'
}

export default function Index() {
  
  return (
    <View className='index'>
      <Swiper loop>
        <Swiper.Item>
          <div style={demo}>
            <div style={div}>1</div>
            <div style={div}>2</div>
            <div style={div}>3</div>
            <div style={div}>4</div>
          </div>
        </Swiper.Item>
        <Swiper.Item>
          <div style={demo}>
            <div style={div}>5</div>
            <div style={div}>6</div>
            <div style={div}>7</div>
            <div style={div}>8</div>
          </div>
        </Swiper.Item>
        <Swiper.Item>
          <div style={demo}>
            <div style={div}>9</div>
            <div style={div}>10</div>
            <div style={div}>11</div>
            <div style={div}>12</div>
          </div>
        </Swiper.Item>
      </Swiper>
    </View>
  )
}

What is expected?(期望的结果是什么?)

What is actually happening?(实际的结果是什么?)

@oasis-cloud
Copy link
Collaborator

由于 swiper 封装的 Taro Swiper 组件,问题是因为 Taro Swiper 自身导致,可以关注 NervJS/taro#14160 的处理情况

@xiaoyatong
Copy link
Collaborator

taro版本依赖升级到 3.6.14 即可解决。nutui 随后升级到 3.6.18,可关注。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants