From b9fe1ce6250562a212c4472a67f4153490543394 Mon Sep 17 00:00:00 2001 From: Joe Pea Date: Sun, 16 Jul 2023 10:54:02 -0700 Subject: [PATCH] chore: add missing Vue support for Vercel builds --- index.html | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/index.html b/index.html index aeef81c1e..9bc8ad0bb 100644 --- a/index.html +++ b/index.html @@ -84,6 +84,58 @@ }, pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'], }, + vueComponents: { + 'button-counter': { + template: /* html */ ``, + 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 @@ + +