NervJS / taro-ui

一款基于 Taro 框架开发的多端 UI 组件库
https://taro-ui.taro.zone
MIT License
4.52k stars 756 forks source link

AtBadge强行将String类型的带”+“号的数字当作Number显示,”+“号不显示了。 #745

Open wuwenyuan111 opened 5 years ago

wuwenyuan111 commented 5 years ago

问题描述 AtBadge的value属性传值为 ‘+12’的字符串,在显示的时候会直接当作number:12 显示,‘+’加号没了,无论我怎么使用转换成字符串的方式都有这个问题。此时如果再自己拼个加号的话,就会显示为 ‘++12’。

// 此处item.index的值都是类似'+12'类型的字符串。
<AtBadge value={`${(item.index)}`} maxValue={100000}>
...
</AtBadge>

系统信息

taro-ui-bot[bot] commented 5 years ago

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

taro-ui-bot[bot] commented 5 years ago

CC @lsqy

taro-ui-bot[bot] commented 5 years ago

CC @koppthe

gaochunxue commented 1 month ago

可是设置为'+ 12',中间加个空格