mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-30 15:10:11 +00:00
字体相关调整
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* @returns {Promise<unknown>}
|
||||
*/
|
||||
export function loadExternalResource(url, type) {
|
||||
console.log('加载', url, type)
|
||||
return new Promise((resolve, reject) => {
|
||||
let tag
|
||||
|
||||
@@ -14,6 +15,11 @@ export function loadExternalResource(url, type) {
|
||||
tag = document.createElement('link')
|
||||
tag.rel = 'stylesheet'
|
||||
tag.href = url
|
||||
} else if (type === 'font') {
|
||||
tag = document.createElement('link')
|
||||
tag.rel = 'preload'
|
||||
tag.as = 'font'
|
||||
tag.href = url
|
||||
} else if (type === 'js') {
|
||||
tag = document.createElement('script')
|
||||
tag.src = url
|
||||
|
||||
Reference in New Issue
Block a user