@cainiaofe/cn-utils
Version:
菜鸟前端基础工具库
30 lines (29 loc) • 842 B
TypeScript
import { TLanguage } from '@cainiaofe/cn-i18n';
import { ThisContext } from '../common/type';
import { Numeric } from './type';
/**
* 通过语种获取当前数字系统小数点
* @param lang 语种
* @returns
*/
export declare const getDecimalSeparator: (lang?: TLanguage) => string;
/**
* 通过语种获取当前数字系统格式化配置
* @param lang 语种
* @returns
*/
export declare const getNumSysFormatConf: (lang?: TLanguage) => {
decimalSeparator: string;
groupSeparator: string;
groupSize: number;
secondaryGroupSize: number;
fractionGroupSeparator: string;
fractionGroupSize: number;
};
/**
*通过语种获取当前数字系统格式化字符串
* @param num
* @param lang
* @returns
*/
export declare const numberFormat: (this: ThisContext, num: Numeric, lang?: TLanguage) => Numeric;