瀏覽代碼

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

wangcong 3 周之前
父節點
當前提交
196012bb9b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/services/echarts.ts

+ 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(() => {