diff --git a/package.json b/package.json
index 462237a..913e33d 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"@types/crypto-js": "^4.2.2",
"@types/node": "^22.10.1",
"@unocss/reset": "^66.1.1",
+ "autofit.js": "^3.2.8",
"axios": "^1.7.9",
"crypto-js": "^4.2.0",
"echarts": "^5.6.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 72c39a5..6fd3611 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -17,6 +17,9 @@ importers:
'@unocss/reset':
specifier: ^66.1.1
version: 66.1.1
+ autofit.js:
+ specifier: ^3.2.8
+ version: 3.2.8
axios:
specifier: ^1.7.9
version: 1.7.9
@@ -876,6 +879,9 @@ packages:
engines: {node: '>= 4.5.0'}
hasBin: true
+ autofit.js@3.2.8:
+ resolution: {integrity: sha512-albZNwDIXvcRneEDyZLW3uAIOH0cUQG/TnCGQ7jpfnL0gPn/+1ZNVRuEz3ZuzZvVkQ4HQRplGHjUeMRtPNxjLQ==}
+
available-typed-arrays@1.0.7:
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
engines: {node: '>= 0.4'}
@@ -3382,6 +3388,8 @@ snapshots:
atob@2.1.2: {}
+ autofit.js@3.2.8: {}
+
available-typed-arrays@1.0.7:
dependencies:
possible-typed-array-names: 1.0.0
diff --git a/src/views/components/ChargingRanking.vue b/src/views/components/ChargingRanking.vue
index 74d6039..1e6fa04 100644
--- a/src/views/components/ChargingRanking.vue
+++ b/src/views/components/ChargingRanking.vue
@@ -2,19 +2,19 @@
-
+
-
+
diff --git a/src/views/components/OfflineStatus.vue b/src/views/components/OfflineStatus.vue
index 7246931..11eb9b6 100644
--- a/src/views/components/OfflineStatus.vue
+++ b/src/views/components/OfflineStatus.vue
@@ -1,12 +1,12 @@
-
+
@@ -52,7 +52,6 @@
headerRightSvg.value = svg;
};
-
const arrowLeftSvg = ref("");
const getArrowLeftSvg = async () => {
const { default: svg } = await import("/src/assets/svg-img/arrow-left.svg?raw");
@@ -60,29 +59,29 @@
};
const colorList = ref(["#0783FA", "#07D1FA", "#20E6A4", "#FFD15C"]);
- const askSectionData = inject("askSectionData", ref<{ offline: any[],scource:any[] }>({ offline: [],scource:[] }));
+ const askSectionData = inject("askSectionData", ref<{ offline: any[]; scource: any[] }>({ offline: [], scource: [] }));
const chartData = ref
([]);
watch(
() => askSectionData.value,
() => {
- initData()
+ initData();
},
);
- const offlineTotal = ref(0)
+ const offlineTotal = ref(0);
const initData = () => {
if (askSectionData.value.offline && askSectionData.value.offline.length > 0) {
- chartData.value = askSectionData.value.offline.map((item, index) => ({
- name: item.tag,
- value: item.total,
- color: colorList.value[index % colorList.value.length],
- }));
- offlineTotal.value = askSectionData.value.scource.filter(item => item.tag==="线下")[0].total
- }
- }
+ chartData.value = askSectionData.value.offline.map((item, index) => ({
+ name: item.tag,
+ value: item.total,
+ color: colorList.value[index % colorList.value.length],
+ }));
+ offlineTotal.value = askSectionData.value.scource.filter((item) => item.tag === "线下")[0].total;
+ }
+ };
onBeforeMount(() => {
getHeaderLeftSvg();
diff --git a/src/views/components/OnlineStatus.vue b/src/views/components/OnlineStatus.vue
index 462f027..4d859ab 100644
--- a/src/views/components/OnlineStatus.vue
+++ b/src/views/components/OnlineStatus.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/views/components/SixStatistics.vue b/src/views/components/SixStatistics.vue
index 2562780..af80b3d 100644
--- a/src/views/components/SixStatistics.vue
+++ b/src/views/components/SixStatistics.vue
@@ -1,12 +1,12 @@
-