mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-18 07:26:48 +00:00
qrcode 改为cdn
This commit is contained in:
10
lib/utils.js
10
lib/utils.js
@@ -39,8 +39,14 @@ export function loadExternalResource(url, type) {
|
||||
tag.src = url
|
||||
}
|
||||
if (tag) {
|
||||
tag.onload = () => resolve(url)
|
||||
tag.onerror = () => reject(url)
|
||||
tag.onload = () => {
|
||||
console.log(url, '加载成功')
|
||||
resolve(url)
|
||||
}
|
||||
tag.onerror = () => {
|
||||
console.log(url, '加载失败')
|
||||
reject(url)
|
||||
}
|
||||
document.head.appendChild(tag)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user