diff --git a/layout/_partial/scripts/index.ejs b/layout/_partial/scripts/index.ejs index 4cd90bb..adc4416 100644 --- a/layout/_partial/scripts/index.ejs +++ b/layout/_partial/scripts/index.ejs @@ -61,6 +61,11 @@ // 从 butterfly 和 volantis 获得灵感 loadScript: (src, opt) => new Promise((resolve, reject) => { + // 判断是否存在 + let el = document.querySelector("script[src='" + src + "']") + if (el !== null) { + return + } var script = document.createElement('script') script.src = src if (opt) {