Appearance
function getDecimalPlaces(num: number): number
获取数字的小数位数,整数返回 0。
0
number
import { getDecimalPlaces } from '@mingto/tools' getDecimalPlaces(1.23) // 2 getDecimalPlaces(10) // 0 getDecimalPlaces(0.001) // 3