wujingjing
2024-11-14 ce1658eb1c17ba7e8fe3f0a21771b4af5ccee8cd
src/utils/util.ts
@@ -470,6 +470,7 @@
   const startDate = new Date();
   startDate.setTime(startDate.getTime() - 3600 * 1000 * 24 * dates);
   startDate.setHours(0, 0, 0, 0);
   endDate.setHours(23,59,59,59)
   return [startDate, endDate];
};
@@ -706,7 +707,9 @@
 */
export const toMyFixed = (num, precision) => {
   if (num == null) return '';
   return num.toFixed(precision).replace(/\.?0+$/, '');
   if (!precision) return num + '';
   const factor = Math.pow(10, precision);
   return Math.round(Number(num) * factor) / factor + '';
};
type GetTextWidthOption = {