forked from ljxi/Cloudflare-R2-oss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (50 loc) · 1.78 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>文件库</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.37/vue.global.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.27.2/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue3-sfc-loader/dist/vue3-sfc-loader.js"></script>
<link rel="prefetch" href="/assets/main.mjs" />
<link rel="prefetch" href="/assets/MimeIcon.vue" />
<link rel="stylesheet" href="/assets/main.css" />
<link rel="manifest" href="/assets/manifest.json" />
<link rel="icon" type="image/png" href="/assets/favicon.png" />
</head>
<body>
<div id="app"></div>
<script>
const { loadModule } = window["vue3-sfc-loader"];
const options = {
moduleCache: { vue: Vue },
async getFile(url) {
const res = await fetch(url);
if (!res.ok)
throw Object.assign(new Error(res.statusText + " " + url), { res });
return {
getContentData: (asBinary) =>
asBinary ? res.arrayBuffer() : res.text(),
};
},
addStyle(textContent) {
const style = document.createElement("style");
style.textContent = textContent;
const ref = document.head.getElementsByTagName("style")[0] || null;
document.head.insertBefore(style, ref);
},
};
const app = Vue.createApp({
components: {
App: Vue.defineAsyncComponent(() =>
loadModule("/assets/App.vue", options)
),
},
template: "<App></App>",
});
app.mount("#app");
</script>
<script type="module"></script>
</body>
</html>