Utils

工具类函数

Props

import commonTool from 'utils/commonTool';

getToday();
返回当日YYYY-MM-DD

DateFormat(str, type);
日期格式化

thousandsFormater(str, type);
千分位处理

accAdd(arg1, arg2);
js精确加法

accSub(arg1, arg2);
js精确减法

accMul(arg1, arg2);
js精确乘法

transformCalCyCde(rateCode, index);
提取第一货币或者第二货币(0表示第一货币,1表示第二货币)

getGuid();
'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'随机码

accSub(arg1, arg2);
js精确减法

isObject(obj);
判断是否为对象

isArray(arr);
判断是否为数组

isEmptyObject();
判断是否为空对象

Last updated