File tree Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -193,17 +193,8 @@ const spec = {
193193 ]
194194};
195195
196- const getNewTheme = async () => {
197- const theme = // your custom theme
198- (
199- await import (' https://www.unpkg.com/@visactor/vchart-theme@latest/public/dark.json' , {
200- assert: { type: ' json' }
201- })
202- ).default ;
203- return theme;
204- };
205-
206- const newTheme = await getNewTheme ();
196+ const response = await fetch (' https://www.unpkg.com/@visactor/vchart-theme@latest/public/dark.json' );
197+ const newTheme = await response .json ();
207198
208199// 注册主题
209200VChart .ThemeManager .registerTheme (' user' , newTheme);
Original file line number Diff line number Diff line change @@ -194,17 +194,8 @@ const spec = {
194194 ]
195195};
196196
197- const getNewTheme = async () => {
198- const theme = // your custom theme
199- (
200- await import (' https://www.unpkg.com/@visactor/vchart-theme@latest/public/dark.json' , {
201- assert: { type: ' json' }
202- })
203- ).default ;
204- return theme;
205- };
206-
207- const newTheme = await getNewTheme ();
197+ const response = await fetch (' https://www.unpkg.com/@visactor/vchart-theme@latest/public/dark.json' );
198+ const newTheme = await response .json ();
208199
209200// 注册主题
210201VChart .ThemeManager .registerTheme (' user' , newTheme);
You can’t perform that action at this time.
0 commit comments