-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 did not support custom dot styles #1146
Comments
RN ? @qingtong234 |
@silentcloud 是的 |
@qingtong234 你可以先暂时写一个类似这样的脚本 https://github.com/ant-design/antd-mobile-samples/blob/master/rn-custom-ui/scripts/custom-rn-theme.js |
@silentcloud 后续可以什么时候实现,这样做本地开发么问题,但是rn打包不支持 |
@qingtong234 为什么不支持?没看太懂,这里不是把props.style传下去了么? https://github.com/ant-design/ant-design-mobile/blob/master/components/carousel/index.tsx#L233 |
@paranoidjk 注意在 |
这个要改的话,需要 RN Carousel 支持传入自定义 pagination,不然就算给内置的开一个 xxxStyle 的属性也没办法完全自定义的,除非 Pagination 将大部分样式开放 @qingtong234 ,比如 Pagination 的 |
@silentcloud 我倾向于 【RN Carousel 支持传入自定义 pagination】,传 React.Element 自由度更大,实现成本也更低。 |
@paranoidjk 我也是这个想法 |
@silentcloud 但是这里可能要做成 HOC 的形式,因为 会有个类似 activeCarouselIndex 的 props |
恩, renderDots props 就行了,就两个参数,index 和 count,然后用户将自己自定义的 Pagination render 过来就好 |
@qingtong234 打包没问题的,在打包前覆盖就行了,后面要改也是放再 1.1 里的 |
@paranoidjk 1.1并没有支持,请问1.2发布计划是什么时候 |
@qingtong234 这个是个增强功能,只是新增了个 api,随后的 1.1.x 就发了,不用等 1.2了 |
@silentcloud 合掉了,RN 没那么大业务包袱。我们尽量还是严格 semver。 |
you can use dotStyle or dotActiveStyle in your Carousel Prop <Carousel //images thx |
RN组件
carousel
不支持自定义dot样式呀。在
pagination
里面有定义Styles,但是carousel里面没有传递styles。。。。以下是pagination代码:
The text was updated successfully, but these errors were encountered: