Skip to content

Commit

Permalink
refactor(components): [drawer] replace with addUnit (#8463)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuhangyeong committed Jun 24, 2022
1 parent 4abd29c commit 272c2e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/components/drawer/src/drawer.vue
Expand Up @@ -86,6 +86,7 @@ import { Close } from '@element-plus/icons-vue'
import { ElOverlay } from '@element-plus/components/overlay'
import ElFocusTrap from '@element-plus/components/focus-trap'
import { useDialog } from '@element-plus/components/dialog'
import { addUnit } from '@element-plus/utils'
import ElIcon from '@element-plus/components/icon'
import { useDeprecated, useLocale, useNamespace } from '@element-plus/hooks'
import { drawerEmits, drawerProps } from './drawer'
Expand Down Expand Up @@ -121,9 +122,7 @@ export default defineComponent({
const isHorizontal = computed(
() => props.direction === 'rtl' || props.direction === 'ltr'
)
const drawerSize = computed(() =>
typeof props.size === 'number' ? `${props.size}px` : props.size
)
const drawerSize = computed(() => addUnit(props.size))
return {
...useDialog(props, drawerRef),
Expand Down

0 comments on commit 272c2e6

Please sign in to comment.