Skip to content

Commit

Permalink
use cdn hosted in asf server to avoid csp issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Feb 4, 2025
1 parent d178a15 commit 70ad255
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/LiveExample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ let echartsLoadPromise;
function fetchECharts() {
return echartsLoadPromise || (echartsLoadPromise = new Promise(function (resolve, reject) {
const script = document.createElement('script');
script.src = store.locale === 'zh'
? 'https://registry.npmmirror.com/echarts/latest/files/dist/echarts.min.js'
: 'https://fastly.jsdelivr.net/npm/echarts@latest/dist/echarts.min.js';
script.src = (window.ECHARTS_WWW_VENDORS_CDN_ROOT || 'https://fastly.jsdelivr.net/npm/') + 'echarts/dist/echarts.min.js';
script.async = true;
script.onload = function () {
echartsLoadPromise = null;
Expand Down

0 comments on commit 70ad255

Please # to comment.