判断小数

/\D/.test(String(num))
\D 表示非正整数,可以取到 . ,取到了则说明是一个小数

浏览器渲染小数

问题原因:DPI Scaling for Windows 10
win10 设置系统缩放 125%,导致出现了小数
系统缩放,浏览器缩放,都会导致渲染出现小数
https://github.com/ant-design/ant-design/issues/25300
另外这个是浏览器对小数的缩放
https://cruft.io/posts/percentage-calculations-in-ie/
一堆解决方案,全是需要使用者设置:
https://www.auslogics.com/en/articles/fix-google-chrome-scaling-on-win-10/
一个奇诡的配置,让浏览器始终展示真实的效果:
https://danreynolds.ca/tech/2017/10/15/Variable-Browser-Zoom/