徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
811 B

export interface CommafyOptions {
/**
* 分割位数,默认3
*/
spaceNumber?: number;
/**
* 分隔符,默认','
*/
separator?: string;
/**
* 只对 number 类型有效,小数位数,默认null
*/
digits?: number;
/**
* 只对 number 类型有效,四舍五入,默认true
*/
round?: boolean;
/**
* 只对 number 类型有效,向上舍入
*/
ceil?: boolean;
/**
* 只对 number 类型有效,向下舍入
*/
floor?: boolean;
}
/**
* 数值千分位分隔符、小数点
* @param num 数值/字符串
* @param options 可选参数
*/
export declare function commafy(num: string | number, options?: CommafyOptions): string;
declare module './ctor' {
interface XEUtilsMethods {
commafy: typeof commafy;
}
}
export default commafy