Function formatNumber

  • 数字人性化显示

    Parameters

    • value: string | number

      数值

    • n: number = 2

      精度

    Returns string

    formatNumber('12312300'); /// '12,312,300'
    formatNumber(851232.1314); /// '851,232.13'
    formatNumber(851232.1314, 0); /// '851,232'