소스 검색

feat: (bashbroad) update

gemercheung 3 년 전
부모
커밋
a2a70db5a0
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/views/dashboard/analysis/components/VisitAnalysis.vue
  2. 1 1
      src/views/dashboard/analysis/components/VisitAnalysisBar.vue

+ 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();
     },