bill 1 год назад
Родитель
Сommit
eda14cc03b
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/util/index.ts

+ 2 - 2
src/util/index.ts

@@ -68,13 +68,13 @@ export const numberSplice = (val: number) => {
 };
 
 //经纬度转度°分′秒″
-export const toDegrees = (val: number, retain = 2) => {
+export const toDegrees = (val: number, retain = 4) => {
   let temps = numberSplice(val);
   const d = temps[0];
   temps = numberSplice(temps[1] * 60);
   const m = temps[0];
   const s = round(temps[1] * 60, retain);
-  return `${d}°${m}′${s.toFixed(2)}″`;
+  return `${d}°${m}′${s.toFixed(retain)}″`;
 };
 
 export const copyText = async (