Update app.js

This commit is contained in:
Anyon 2021-12-01 10:33:43 +08:00
parent 8bbbf68762
commit 770e30a695

View File

@ -11,8 +11,10 @@ console.log('baseRoot', appRoot)
vue: Vue, less: less vue: Vue, less: less
}, },
getFile(url) { getFile(url) {
document.get
console.log('load.file', url) console.log('load.file', url)
if (!url.test(/^https?:\/\//)) {
url += url;
}
return fetch(url).then(res => { return fetch(url).then(res => {
if (res.ok) { if (res.ok) {
return {getContentData: binary => binary ? res.arrayBuffer() : res.text()}; return {getContentData: binary => binary ? res.arrayBuffer() : res.text()};