diff --git a/website/.vitepress/theme/index.ts b/website/.vitepress/theme/index.ts index 4f9c3ae..3cd541f 100644 --- a/website/.vitepress/theme/index.ts +++ b/website/.vitepress/theme/index.ts @@ -1,4 +1,5 @@ import { NolebaseInlineLinkPreviewPlugin } from '@nolebase/vitepress-plugin-inline-link-preview/client' +import { ClientOnly } from 'vitepress' import DefaultTheme from 'vitepress/theme' import type { App } from 'vue' import { h } from 'vue' diff --git a/website/components/ChatBotButton.vue b/website/components/ChatBotButton.vue index 7431100..f388759 100644 --- a/website/components/ChatBotButton.vue +++ b/website/components/ChatBotButton.vue @@ -33,8 +33,8 @@ const buttonRightDistance = ref(20); const buttonBottomDistance = ref(20); // window size -const windowWidth = ref(window.innerWidth); -const windowHeight = ref(window.innerHeight); +const windowWidth = ref(0); +const windowHeight = ref(0); // update window size and buttonRightDistance const updateWindowSize = () => {