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

feat(Picker): picker supports setting the sliding direction #12581

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

why91113
Copy link

van-picker 增加滑动方向属性 direction,适配元素旋转以后选项的滑动

@why91113 why91113 changed the title feat: picker supports setting the sliding direction feat(Picker): picker supports setting the sliding direction Jan 18, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (812c528) 89.90% compared to head (6740a92) 89.84%.

Files Patch % Lines
packages/vant/src/picker/PickerColumn.tsx 14.28% 2 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12581      +/-   ##
==========================================
- Coverage   89.90%   89.84%   -0.07%     
==========================================
  Files         257      257              
  Lines        6827     6833       +6     
  Branches     1655     1659       +4     
==========================================
+ Hits         6138     6139       +1     
- Misses        365      367       +2     
- Partials      324      327       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@inottn
Copy link
Collaborator

inottn commented Jan 20, 2024

感谢你的 PR,但我不确定是否要在 vant 中适配 CSS 旋转这种特殊情况以及目前这种实现方式是否合适,因为其余组件在这种特殊场景下也有类似的问题。

@why91113
Copy link
Author

why91113 commented Jan 20, 2024

感谢你的 PR,但我不确定是否要在 vant 中适配 CSS 旋转这种特殊情况以及目前这种实现方式是否合适,因为其余组件在这种特殊场景下也有类似的问题。

我遇到的是特殊场景,确实也给我造成了困扰,虽然我可以通过patch的方式解决,但是这就意味着我必须锁死vant版本,未来不能轻易更新,而不能应用到vant更新的功能。
因为我已经在项目中尝试修改过了,并且我也想贡献代码参与共建,所以提了PR,若我贡献的代码有欠缺考虑的地方,并且其余组件也有类似问题,那你们是否考虑统一处理呢。
ant-design-mobile 也有这种情况,参考:ant-design/ant-design-mobile#5303

@chenjiahan
Copy link
Member

这个需求确实比较特殊,对于绝大多数用户来说是多余的逻辑,暂时不考虑合入。

如果有相似需求的开发者,可以在这个 PR 下留言

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

Successfully merging this pull request may close these issues.

4 participants