diff --git a/packages/devui-vue/devui/drawer/src/drawer-service.ts b/packages/devui-vue/devui/drawer/src/drawer-service.ts
index 597621d7d2..df635e6aae 100644
--- a/packages/devui-vue/devui/drawer/src/drawer-service.ts
+++ b/packages/devui-vue/devui/drawer/src/drawer-service.ts
@@ -1,7 +1,7 @@
import { createApp } from 'vue'
import { DrawerProps } from './drawer-types'
import Drawer from './drawer'
-
+import { inBrowser } from '../../shared/util/common-var'
function createDrawerApp(props: DrawerProps) {
return createApp(Drawer, { ...props })
@@ -9,7 +9,7 @@ function createDrawerApp(props: DrawerProps) {
export default class DrawerService {
- static $body: HTMLElement | null = document.body
+ static $body: HTMLElement | null
static $div: HTMLDivElement | null = null
static drawer = null;
@@ -28,6 +28,8 @@ export default class DrawerService {
}
this.$div = null
}
+}
-
-}
\ No newline at end of file
+if (inBrowser) {
+ DrawerService.$body = document.body
+}
diff --git a/packages/devui-vue/docs/components/button/index.md b/packages/devui-vue/docs/components/button/index.md
index 76870fb7e2..05128fd859 100644
--- a/packages/devui-vue/docs/components/button/index.md
+++ b/packages/devui-vue/docs/components/button/index.md
@@ -144,7 +144,7 @@