Эх сурвалжийг харах

fix(services): 修复 echarts 主题加载失败的问题

wangcong 3 долоо хоног өмнө
parent
commit
196012bb9b

+ 2 - 2
src/services/echarts.ts

@@ -4,7 +4,7 @@ import i18n from '../i18n';
 const $t = i18n.global.t;
 //注册所有主题
 export function registerTheme() {
-  fetch((cdn ? cdn + '/v/' : import.meta.env.BASE_URL.slice(0, -1)) + 'theme/dark.json')
+  fetch((cdn ? cdn + '/v/' : import.meta.env.BASE_URL.slice(0, -1)) + '/theme/dark.json')
     .then((r) => r.json())
     .then((theme) => {
       const timer = setInterval(() => {
@@ -14,7 +14,7 @@ export function registerTheme() {
         }
       }, 200);
     });
-  fetch((cdn ? cdn + '/v/' : import.meta.env.BASE_URL.slice(0, -1)) + 'theme/light.json')
+  fetch((cdn ? cdn + '/v/' : import.meta.env.BASE_URL.slice(0, -1)) + '/theme/light.json')
     .then((r) => r.json())
     .then((theme) => {
       const timer = setInterval(() => {