mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-30 03:07:36 +08:00
parent
47e75ad051
commit
c639474fcc
@ -134,4 +134,5 @@ Use a red dot to mark content that needs to be noticed.
|
||||
|------------- |---------------- |---------------- |---------------------- |-------- |
|
||||
| value | display value | string, number | — | — |
|
||||
| max | maximum value, shows '{max}+' when exceeded. Only works if `value` is a `Number` | number | — | — |
|
||||
| is-dot | if a little dot is displayed | boolean | — | false |
|
||||
| is-dot | if a little dot is displayed | boolean | — | false |
|
||||
| hidden | hidden badge | boolean | - | false |
|
||||
|
@ -137,3 +137,4 @@
|
||||
| value | 显示值 | string, number | — | — |
|
||||
| max | 最大值,超过最大值会显示 '{max}+',要求 value 是 Number 类型 | number | — | — |
|
||||
| is-dot | 小圆点 | boolean | — | false |
|
||||
| hidden | 隐藏 badge | boolean | - | false |
|
||||
|
@ -1,11 +1,14 @@
|
||||
<template>
|
||||
<div class="el-badge">
|
||||
<slot></slot>
|
||||
<sup
|
||||
v-text="content"
|
||||
class="el-badge__content"
|
||||
:class="{ 'is-fixed': $slots.default, 'is-dot': isDot }">
|
||||
</sup>
|
||||
<transition name="el-zoom-in-center">
|
||||
<sup
|
||||
v-show="!hidden"
|
||||
v-text="content"
|
||||
class="el-badge__content"
|
||||
:class="{ 'is-fixed': $slots.default, 'is-dot': isDot }">
|
||||
</sup>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -16,7 +19,8 @@ export default {
|
||||
props: {
|
||||
value: {},
|
||||
max: Number,
|
||||
isDot: Boolean
|
||||
isDot: Boolean,
|
||||
hidden: Boolean
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
Loading…
Reference in New Issue
Block a user