fix bug
This commit is contained in:
parent
38263f19c8
commit
c67065b011
|
@ -61,13 +61,8 @@
|
||||||
|
|
||||||
// 从 butterfly 和 volantis 获得灵感
|
// 从 butterfly 和 volantis 获得灵感
|
||||||
loadScript: (src, opt) => new Promise((resolve, reject) => {
|
loadScript: (src, opt) => new Promise((resolve, reject) => {
|
||||||
// 判断是否存在
|
var script = document.createElement('script');
|
||||||
let el = document.querySelector("script[src='" + src + "']")
|
script.src = src;
|
||||||
if (el !== null) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var script = document.createElement('script')
|
|
||||||
script.src = src
|
|
||||||
if (opt) {
|
if (opt) {
|
||||||
for (let key of Object.keys(opt)) {
|
for (let key of Object.keys(opt)) {
|
||||||
script[key] = opt[key]
|
script[key] = opt[key]
|
||||||
|
|
Loading…
Reference in New Issue