src/utils/common.js
@@ -115,5 +115,16 @@ return Math.round(v * 100, 2) + '%' } return { isExceedOneMonth, cmpp, exportToExcel, descFiftyTime, percentFormatter } /** * 找出字符串数字的最大值 * @param: * @returns: */ function findMaxValue(values) { const numbers = values.map((value) => parseFloat(value)) const max = Math.max(...numbers) return max.toString() } return { isExceedOneMonth, cmpp, exportToExcel, descFiftyTime, percentFormatter,findMaxValue } }