2.0.3 • Published 5 months ago
@wu-component/wu-badge v2.0.3
Badge 标记
出现在按钮、图标旁的数字或状态标记。
基础用法
展示新消息数量。
::: demo
<template>
<div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
<wu-plus-badge value="200" max="99" type="waring">
<wu-plus-button size="mini">评论</wu-plus-button>
</wu-plus-badge>
<wu-plus-badge value="90" max="99" type="primary">
<wu-plus-button size="mini">回复</wu-plus-button>
</wu-plus-badge>
<wu-plus-badge value="5" max="99" type="danger">
<wu-plus-button size="mini">回复</wu-plus-button>
</wu-plus-badge>
</div>
</template>
<script>
</script>
:::
最大值
可自定义最大值。
::: demo
<template>
<div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
<wu-plus-badge value="200" max="100" type="waring">
<wu-plus-button size="mini">评论</wu-plus-button>
</wu-plus-badge>
<wu-plus-badge value="15" max="20" type="primary">
<wu-plus-button size="mini">回复</wu-plus-button>
</wu-plus-badge>
</div>
</template>
<script>
</script>
:::
自定义内容
可以显示数字以外的文本内容。
::: demo
<template>
<div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
<wu-plus-badge value="new" type="waring">
<wu-plus-button size="mini">评论</wu-plus-button>
</wu-plus-badge>
<wu-plus-badge value="hot" max="20" type="primary">
<wu-plus-button size="mini">回复</wu-plus-button>
</wu-plus-badge>
</div>
</template>
<script>
</script>
:::
小红点
以红点的形式标注需要关注的内容。
::: demo
<template>
<div style="display: flex; align-items: center;justify-content: space-around;padding: 16px">
<wu-plus-badge dot="true" type="waring">
数据查询
</wu-plus-badge>
<wu-plus-badge dot="true" type="success">
<wu-plus-button size="mini">回复</wu-plus-button>
</wu-plus-badge>
</div>
</template>
<script>
</script>
:::
Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
value | 显示值 | String, Number | - | - |
max | 最大值,超过最大值会显示 '{max}+',要求 value 是 Number 类型 | number | - | 100 |
dot | 小圆点 | Boolean | true、false | false |
hide | 隐藏 badge | Boolean | true、false | false |
type | 类型 | TypeEnums | 'primary'、 'success'、 'warning'、 'info'、'danger' | 'info' |
2.0.3
5 months ago
2.0.1
1 year ago
2.0.0
1 year ago
1.11.8
1 year ago
1.11.7
1 year ago
1.11.6
1 year ago
1.11.4
1 year ago
1.11.3
1 year ago
1.11.1
1 year ago
1.11.0
1 year ago
1.10.6
1 year ago
1.10.5
1 year ago
1.10.4
1 year ago
1.10.3
1 year ago
1.10.2
1 year ago
1.10.1
1 year ago
1.10.0
1 year ago
1.9.24
2 years ago
1.9.21
2 years ago
1.9.20
2 years ago
1.9.18
2 years ago
1.9.17
2 years ago
1.9.1
2 years ago
1.8.0
2 years ago
1.7.0
2 years ago
1.6.1
2 years ago
1.6.0
2 years ago
1.5.0
2 years ago
1.4.3
2 years ago
1.4.2
2 years ago
1.4.1
2 years ago
1.4.0
2 years ago
1.0.1
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago