Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Badge): Badge组件无status值不显示dot (#507) #560

Merged
merged 4 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/devui-vue/devui/badge/src/badge-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const badgeProps = {
status: {
type: String as PropType<BadgeStatusType>,
validator: (val: string): boolean => badgeStatusType.includes(val),
default: 'info'
},
position: {
type: String as PropType<BadgePositionType>,
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/docs/components/badge/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
| count | `number` | -- | 可选,设置基本徽章和计数徽章中显示的数目 |
| max-count | `number` | 99 | 可选,设置基本徽章和计数徽章最大可显示数目,<br>当 count > `max-count` 时显示 `max-count+` |
| show-dot | `boolean` | false | 可选,true 时为点状徽章(有包裹)或状态徽章(无包裹),<br>false 时为基本徽章(有包裹)或计数徽章(无包裹) |
| status | [BadgeStatusType](#badgestatustype) | -- | 可选,状态色 |
| status | [BadgeStatusType](#badgestatustype) | 'info' | 可选,状态色 |
| position | [BadgePositionType](#badgepositiontype) | 'top-right' | 可选,徽标位置 |
| bg-color | `string` | -- | 可选,自定义徽标色,此时 status 参数设置的徽章状态色失效 |
| text-color | `string` | -- | 可选, 可自定义徽标文字颜色 |
Expand Down