摘要:
/** * * @returns 获取当前月份的前12个月份 */ export const xDataYear = () => { let dataArr = []; let data = new Date(); data.setMonth(data.getMonth() + 1, 1); //获 阅读全文
摘要:
/** * 遍历单位基本信息树 * @param data * @param parentId * @returns */ const getTrees = (data: OrganizationResult[], parentId: number | null) => { let itemArr 阅读全文
摘要:
/** * 处理数字的保留位数 * @param num 要处理的数字 * @param fixNum 保留的小数位数 */ export const sliceNumberEnd = (num: string | number, fixNum?: number) => (+num).toFixed 阅读全文
摘要:
export const getUrlkey = (variable: string) => { var query = window.location.search.substring(1); var vars = query.split('&'); for (var i = 0; i < var 阅读全文
摘要:
export const combineClassName = (...classNames: (string | undefined)[]) => compact(classNames).join(' '); 合并class名字: <div className={combineClassName( 阅读全文