Skip to content

Commit

Permalink
fix: badge的top、right不支持rpx单位
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohe0601 committed Nov 8, 2023
1 parent 5e56649 commit 964e4ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/nutui/components/badge/badge.vue
Expand Up @@ -2,13 +2,14 @@
import { computed, defineComponent } from 'vue'
import { PREFIX } from '../_constants'
import { badgeProps } from './badge'
import { pxCheck } from '../_utils'
const props = defineProps(badgeProps)
const stl = computed(() => {
return {
top: `${props.top}px`,
right: `${props.right}px`,
top: pxCheck(props.top),
right: pxCheck(props.right),
zIndex: props.zIndex,
background: props.customColor,
}
Expand Down

0 comments on commit 964e4ea

Please sign in to comment.