Skip to content

Commit

Permalink
fix(badge): #2616 格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
qiusen committed Oct 10, 2023
1 parent 0e7f713 commit 9b535e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ui/badge/src/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {forwardRef, useMemo, isValidElement, cloneElement, ReactNode} from 'react'
import React, { forwardRef, useMemo, isValidElement, cloneElement, ReactNode } from 'react'
import { cx, getPrefixCls } from '@hi-ui/classname'
import { __DEV__, invariant } from '@hi-ui/env'
import { HiBaseHTMLProps } from '@hi-ui/core'
Expand All @@ -8,8 +8,8 @@ import { BadgeTypeEnum } from './types'
const _prefix = getPrefixCls('badge')

// 支持字符串和 number hover 显示,其他过滤
const getShowContent = (content: ReactNode)=>{
if (!['number','string'].includes(typeof content)) return ""
const getShowContent = (content: ReactNode) => {
if (!['number', 'string'].includes(typeof content)) return ""
return `${content}`
}
/**
Expand Down

0 comments on commit 9b535e2

Please sign in to comment.