vant icon indicating copy to clipboard operation
vant copied to clipboard

[Feature Request] 如何支持 vant picker item 自定义样式?

Open ly525 opened this issue 6 years ago • 4 comments

这个功能解决了什么问题

支持 vant picker item 自定义className

描述您想要的解决方案

支持 className 配置

建议的API是什么样的

columns: [
  {
     optionClassName
  }
]

ly525 avatar Sep 05 '20 03:09 ly525

Columns 有 className 选项的,可以再看下文档

chenjiahan avatar Sep 05 '20 06:09 chenjiahan

Columns 有 className 选项的,可以再看下文档

这个 className 是针对 columns的,在类型为 text的时候,就失效了

ly525 avatar Sep 05 '20 08:09 ly525

失效是啥意思,能给个示例代码看下么

chenjiahan avatar Sep 05 '20 09:09 chenjiahan

image 看了一下picker的源码,当默认是text的时候,直接把formattedColumns 重新赋值了,丢失了className属性,后面渲染的时候就失效了 image

kelvshi avatar Jul 03 '23 08:07 kelvshi