Pārlūkot izejas kodu

feat: (bashbroad) update

gemercheung 2 gadi atpakaļ
vecāks
revīzija
a2a70db5a0

+ 1 - 1
src/views/dashboard/analysis/components/VisitAnalysis.vue

@@ -113,7 +113,7 @@
       console.log('viewStatics-data', bulletChatAmountsData.value);
       const maxNumber = Math.max(...bulletChatAmountsData.value);
       const pow = Math.pow(10, maxNumber.toString().length - 1);
-      maxSize.value = Math.floor(maxNumber / 10) * 10 + pow * 2;
+      maxSize.value = maxNumber > 10 ? Math.floor(maxNumber / 10) * 10 + pow * 2 : 10;
       console.log('maxSize', maxSize.value);
       handleSetOptions();
       // viewStaticsData.value = data;

+ 1 - 1
src/views/dashboard/analysis/components/VisitAnalysisBar.vue

@@ -85,7 +85,7 @@
 
       const maxNumber = Math.max(...viewStaticsData.value);
       const pow = Math.pow(10, maxNumber.toString().length - 1);
-      maxSize.value = Math.floor(maxNumber / 10) * 10 + pow * 2;
+      maxSize.value = maxNumber > 10 ? Math.floor(maxNumber / 10) * 10 + pow * 2 : 10;
       console.log('maxSize', maxSize.value);
       handlesetOptions();
     },