diff --git a/lib/utils.js b/lib/utils.js index 82bfad5c..6677e7df 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -7,6 +7,11 @@ * @returns {Promise} */ export function loadExternalResource(url, type) { + // 检查是否已存在 + const elements = document.querySelectorAll(`[href='${url}']`) + if (elements.length > 0 || !url) { + return + } return new Promise((resolve, reject) => { let tag