darwinia-network / apps

Darwinia Apps
https://apps.darwinia.network
1 stars 5 forks source link

验证人收益参数不能设置 0% #157

Closed mittwillson closed 2 years ago

mittwillson commented 2 years ago
image
mittwillson commented 2 years ago
image

这里是不是应该禁止输入其他字符,感觉会很奇怪

JayJay1024 commented 2 years ago
image

这里是不是应该禁止输入其他字符,感觉会很奇怪

这里应该不用禁止了,这里用了antd的InputNumber组件,只关心number输入,而且上面有提示输入0-100

mittwillson commented 2 years ago
image

这里是不是应该禁止输入其他字符,感觉会很奇怪

这里应该不用禁止了,这里用了antd的InputNumber组件,只关心number输入,而且上面有提示输入0-100

但依旧还是能输入其他非 number 字符串,并且输入 1% 的时候它的校验也通过了

JayJay1024 commented 2 years ago
image

这里是不是应该禁止输入其他字符,感觉会很奇怪

这里应该不用禁止了,这里用了antd的InputNumber组件,只关心number输入,而且上面有提示输入0-100

但依旧还是能输入其他非 number 字符串,并且输入 1% 的时候它的校验也通过了

可以输入但是不响应那个%号。我在onChange中试过不响应非number,所以如果确实想不让输入非number就不能用InputNumber了,我感觉暂时先这样吧