Skip to content

Commit 0d2f8ac

Browse files
committed
fix(docs): 🐛 ReferenceError: document is not defined
1 parent 94acc2b commit 0d2f8ac

File tree

4 files changed

+74
-101
lines changed

4 files changed

+74
-101
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<script setup lang="ts"></script>
2+
3+
<template>
4+
<div class="loading">
5+
<span>L</span>
6+
<span>o</span>
7+
<span>a</span>
8+
<span>d</span>
9+
<span>i</span>
10+
<span>n</span>
11+
<span>g</span>
12+
<span>.</span>
13+
<span>.</span>
14+
<span>.</span>
15+
</div>
16+
</template>
17+
18+
<style scoped>
19+
.loading {
20+
text-align: left;
21+
}
22+
.loading span {
23+
display: inline-block;
24+
padding-right: 0.1em;
25+
margin: 0 -0.075em;
26+
animation: loading 0.7s infinite alternate;
27+
}
28+
.loading span:nth-child(2) {
29+
animation-delay: 0.1s;
30+
}
31+
.loading span:nth-child(3) {
32+
animation-delay: 0.2s;
33+
}
34+
.loading span:nth-child(4) {
35+
animation-delay: 0.3s;
36+
}
37+
.loading span:nth-child(5) {
38+
animation-delay: 0.4s;
39+
}
40+
.loading span:nth-child(6) {
41+
animation-delay: 0.5s;
42+
}
43+
.loading span:nth-child(7) {
44+
animation-delay: 0.6s;
45+
}
46+
.loading span:nth-child(8) {
47+
animation-delay: 0.7s;
48+
}
49+
.loading span:nth-child(9) {
50+
animation-delay: 0.8s;
51+
}
52+
.loading span:nth-child(10) {
53+
animation-delay: 0.9s;
54+
}
55+
@keyframes loading {
56+
0% {
57+
transform: scale(1);
58+
}
59+
100% {
60+
transform: scale(0.8);
61+
}
62+
}
63+
</style>

docs/content/.vitepress/theme/index.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
import { h } from 'vue'
1+
import { h, defineAsyncComponent } from 'vue'
22
import Theme from 'vitepress/theme'
33
import HomeDemo from './components/HomeDemo.vue'
4+
import Loading from './components/Loading.vue'
5+
6+
import './styles/tailwind.css'
7+
import './styles/vars.css'
8+
9+
const QuillEditor = defineAsyncComponent({
10+
loader: () =>
11+
import('@vueup/vue-quill').then((VueQuill) => VueQuill.QuillEditor),
12+
loadingComponent: Loading,
13+
})
414

5-
import { QuillEditor } from '@vueup/vue-quill'
615
import '@vueup/vue-quill/dist/vue-quill.core.css' // import styles
716
import '@vueup/vue-quill/dist/vue-quill.bubble.css' // for bubble theme
817
import '@vueup/vue-quill/dist/vue-quill.snow.css' // for snow theme
918

10-
import './styles/tailwind.css'
11-
import './styles/vars.css'
12-
// import './styles/custom.css'
13-
1419
export default {
1520
enhanceApp({ app, router, siteData }) {
1621
// app is the Vue 3 app instance from `createApp()`. router is VitePress'

docs/content/.vitepress/theme/styles/base.css

Lines changed: 0 additions & 60 deletions
This file was deleted.

docs/content/.vitepress/theme/styles/custom.css

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)