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
Carousel 初始高度为 0 #1002
Comments
duplicated with #1001 |
https://github.com/FormidableLabs/nuka-carousel/blob/master/src/carousel.js#L71 这些参数应该是可以传入的 例如 |
@pingan1927 |
|
@warmhug 文档也更新特意说明下吧,已经存在这么多相关issue的问题,不应该一直被问下去 |
上次 |
这个问题解决了吗??? |
a 标签记得设置个display:block |
@tank537285 |
为什么a标签有href属性,却跳转不了,官方例子也是有链接跳转不了,无语了 |
|
图片资源是从服务器请求后赋值,使用Carousel渲染页面时.slider-list height:100px。解决方式:设置图片资源的默认值,在服务器请求成功后进行替换。 |
fixedHeight 并没有起到作用 不可以变高 |
I find when the data is fetched from remote server, the height is initialed as 100. So I render the children list when data done fetched while render as null when undefined. now it worked. |
轮播图中 加载异步数据后 好像有高度丢失 切换路由后不能正常切换的问题 解决办法 希望能帮到遇到同样问题的小伙伴 |
state = { componentDidMount() { render() { {this.state.isSwiperLoaded ? ( {/ 渲染的每一项的结构内容 */} {this.renderSwipers()} ) : ( "" )} ); } } |
Environment(required) | 环境(必填)
What did you do? Please provide steps to re-produce your problem.(请提供复现步骤)
引入了antd-mobile的Carousel组件
代码如下:
carousels是在Home组件的父组件中通过异步请求获得,然后通过props传到Home组件中的。carousels中的value是一个数组,包含了图片的url。
现在的话图片加载出来就是Carousel组件的默认高度,只有100px。然后如果自动轮播或者滑动的话图片的高度才会出来。
What do you expected?(预期的正常效果)
我就没有截图,但是有人遇到跟我一样的情况
What happen?(发生了何种非正常现象)
就是如果map前面的value如果是直接写死在里面,像官网的domo那样,就是没问题的,就是如果是从服务器拿图片数据回来再渲染,一开始图片是空的,才造成会这样好像
截图反映的情况跟我遇到的是一样的
Re-producible online demo (可复现的在线demo)
暂无
The text was updated successfully, but these errors were encountered: