xiaodongxier / xiaodongxier.github.io

my github hexo blog
https://xiaodongxier.github.io
0 stars 0 forks source link

AntDesign选择器Select拿到选择节点的lable - 小东西儿 #305

Open xiaodongxier opened 1 year ago

xiaodongxier commented 1 year ago

https://blog.xiaodongxier.com/pages/a7f11cc8.html

AntDesign API: https://1x.antdv.com/components/select-cn/#components-select-demo-get-value-of-selected-item 默认情况下 onChange 里只能拿到 value,如果需要拿到选中的节点文本 label,可以使用 labelInValue 属性。 选中项的 label 会被包装到 val