vant icon indicating copy to clipboard operation
vant copied to clipboard

feat(Picker): picker supports setting the sliding direction

Open why91113 opened this issue 2 years ago • 4 comments

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

why91113 avatar Jan 18 '24 07:01 why91113

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 :warning:
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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jan 18 '24 08:01 codecov-commenter

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

inottn avatar Jan 20 '24 06:01 inottn

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

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

why91113 avatar Jan 20 '24 08:01 why91113

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

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

chenjiahan avatar Jan 27 '24 08:01 chenjiahan