mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
chore: add missing Vue support for Vercel builds (#2134)
This commit is contained in:
parent
a1eb3068a6
commit
63afa9cd87
54
index.html
54
index.html
@ -84,6 +84,58 @@
|
||||
},
|
||||
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'],
|
||||
},
|
||||
vueComponents: {
|
||||
'button-counter': {
|
||||
template: /* html */ `<button @click="count += 1">You clicked me {{ count }} times</button>`,
|
||||
data() {
|
||||
return {
|
||||
count: 0,
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
vueGlobalOptions: {
|
||||
data() {
|
||||
return {
|
||||
count: 0,
|
||||
message: 'Hello, World!',
|
||||
// Fake API response
|
||||
images: [
|
||||
{ title: 'Image 1', url: 'https://picsum.photos/150?random=1' },
|
||||
{ title: 'Image 2', url: 'https://picsum.photos/150?random=2' },
|
||||
{ title: 'Image 3', url: 'https://picsum.photos/150?random=3' },
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
timeOfDay() {
|
||||
const date = new Date();
|
||||
const hours = date.getHours();
|
||||
|
||||
if (hours < 12) {
|
||||
return 'morning';
|
||||
} else if (hours < 18) {
|
||||
return 'afternoon';
|
||||
} else {
|
||||
return 'evening';
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
hello() {
|
||||
alert(this.message);
|
||||
},
|
||||
},
|
||||
},
|
||||
vueMounts: {
|
||||
'#counter': {
|
||||
data() {
|
||||
return {
|
||||
count: 0,
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'),
|
||||
function (hook, vm) {
|
||||
@ -121,5 +173,7 @@
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-markdown.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-nginx.min.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-php.min.js"></script>
|
||||
|
||||
<script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user