-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
/
Main.vue
35 lines (31 loc) · 827 Bytes
/
Main.vue
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
<template>
<div class="comments"><!--hello--></div>
<h1>Vue SFCs</h1>
<pre>{{ time }}</pre>
<div class="hmr-block">
<Hmr />
</div>
<Syntax />
<PreProcessors />
<CssModules />
<Assets />
<CustomBlock />
<SrcImport />
</template>
<script setup lang="ts">
import Hmr from './Hmr.vue'
import Syntax from './Syntax.vue'
import PreProcessors from './PreProcessors.vue'
import CssModules from './CssModules.vue'
import Assets from './Assets.vue'
import CustomBlock from './CustomBlock.vue'
import SrcImport from './src-import/SrcImport.vue'
import { ref } from 'vue'
const time = ref('loading...')
window.addEventListener('load', () => {
setTimeout(() => {
const [entry] = performance.getEntriesByType("navigation")
time.value = `loaded in ${entry.duration.toFixed(2)}ms.`
}, 0)
})
</script>