Skip to content

Commit

Permalink
fix(components): fix element-plus#5582 (element-plus#5583)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi authored Jan 28, 2022
1 parent eb6553b commit 2b38b5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/components/avatar/src/avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ export default defineComponent({
const sizeStyle = computed(() => {
const { size } = props
return {
'--el-avatar-size': isNumber(size) ? addUnit(size) : undefined,
} as CSSProperties
return isNumber(size)
? ({
'--el-avatar-size': addUnit(size),
} as CSSProperties)
: undefined
})
const fitStyle = computed<CSSProperties>(() => ({
Expand Down

0 comments on commit 2b38b5f

Please sign in to comment.