修复懒加载标签重复的问题
This commit is contained in:
parent
50b890c396
commit
1c466465de
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue