Skip to content

Commit b9fe1ce

Browse files
committed
chore: add missing Vue support for Vercel builds
1 parent 7da3521 commit b9fe1ce

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

index.html

+54
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,58 @@
8484
},
8585
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'],
8686
},
87+
vueComponents: {
88+
'button-counter': {
89+
template: /* html */ `<button @click="count += 1">You clicked me {{ count }} times</button>`,
90+
data() {
91+
return {
92+
count: 0,
93+
};
94+
},
95+
},
96+
},
97+
vueGlobalOptions: {
98+
data() {
99+
return {
100+
count: 0,
101+
message: 'Hello, World!',
102+
// Fake API response
103+
images: [
104+
{ title: 'Image 1', url: 'https://picsum.photos/150?random=1' },
105+
{ title: 'Image 2', url: 'https://picsum.photos/150?random=2' },
106+
{ title: 'Image 3', url: 'https://picsum.photos/150?random=3' },
107+
],
108+
};
109+
},
110+
computed: {
111+
timeOfDay() {
112+
const date = new Date();
113+
const hours = date.getHours();
114+
115+
if (hours < 12) {
116+
return 'morning';
117+
} else if (hours < 18) {
118+
return 'afternoon';
119+
} else {
120+
return 'evening';
121+
}
122+
},
123+
},
124+
methods: {
125+
hello() {
126+
alert(this.message);
127+
},
128+
},
129+
},
130+
vueMounts: {
131+
'#counter': {
132+
data() {
133+
return {
134+
count: 0,
135+
};
136+
},
137+
},
138+
},
87139
plugins: [
88140
DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'),
89141
function (hook, vm) {
@@ -121,5 +173,7 @@
121173
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-markdown.min.js"></script>
122174
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-nginx.min.js"></script>
123175
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-php.min.js"></script>
176+
177+
<script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.min.js"></script>
124178
</body>
125179
</html>

0 commit comments

Comments
 (0)