Skip to content

Commit 52933a0

Browse files
committed
fix(docs): fix button demo
1 parent 513cca1 commit 52933a0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

packages/devui-vue/devui/drawer/src/drawer-service.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { createApp } from 'vue'
22
import { DrawerProps } from './drawer-types'
33
import Drawer from './drawer'
4-
4+
import { inBrowser } from '../../shared/util/common-var'
55

66
function createDrawerApp(props: DrawerProps) {
77
return createApp(Drawer, { ...props })
88
}
99

1010
export default class DrawerService {
1111

12-
static $body: HTMLElement | null = document.body
12+
static $body: HTMLElement | null
1313
static $div: HTMLDivElement | null = null
1414
static drawer = null;
1515

@@ -28,6 +28,8 @@ export default class DrawerService {
2828
}
2929
this.$div = null
3030
}
31+
}
3132

32-
33-
}
33+
if (inBrowser) {
34+
DrawerService.$body = document.body
35+
}

packages/devui-vue/docs/components/button/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
<d-button icon="delete" variant="text-dark" :disabled="true" title="delete"></d-button>
145145
</div>
146146
<div class="mb-l">
147-
<d-button class="mr-xs" variant="common" class="mr-xs" bsSize="xs">
147+
<d-button class="mr-xs" variant="common">
148148
Click me
149149
<span class="icon-chevron-down"></span>
150150
</d-button>

0 commit comments

Comments
 (0)