Skip to content

Commit fc9b43b

Browse files
authored
fix: fix shaking when dialog and drawer show (#3362)
* fix: fix shaking when dialog and drawer show * chore: update common
1 parent 3758b27 commit fc9b43b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/drawer/drawer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ export default mixins(ActionMixin, getConfigReceiverMixins<Vue, DrawerConfig>('d
137137
},
138138

139139
mounted() {
140-
const hasScrollBar = document.body.scrollHeight > document.body.clientHeight;
140+
const hasScrollBar = window.innerWidth > document.documentElement.clientWidth;
141+
141142
const scrollWidth = hasScrollBar ? getScrollbarWidth() : 0;
142143

143144
this.styleEl = document.createElement('style');

0 commit comments

Comments
 (0)