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 | — | — |
|
| value | display value | string, number | — | — |
|
||||||
| max | maximum value, shows '{max}+' when exceeded. Only works if `value` is a `Number` | 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 | — | — |
|
| value | 显示值 | string, number | — | — |
|
||||||
| max | 最大值,超过最大值会显示 '{max}+',要求 value 是 Number 类型 | number | — | — |
|
| max | 最大值,超过最大值会显示 '{max}+',要求 value 是 Number 类型 | number | — | — |
|
||||||
| is-dot | 小圆点 | boolean | — | false |
|
| is-dot | 小圆点 | boolean | — | false |
|
||||||
|
| hidden | 隐藏 badge | boolean | - | false |
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="el-badge">
|
<div class="el-badge">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<sup
|
<transition name="el-zoom-in-center">
|
||||||
v-text="content"
|
<sup
|
||||||
class="el-badge__content"
|
v-show="!hidden"
|
||||||
:class="{ 'is-fixed': $slots.default, 'is-dot': isDot }">
|
v-text="content"
|
||||||
</sup>
|
class="el-badge__content"
|
||||||
|
:class="{ 'is-fixed': $slots.default, 'is-dot': isDot }">
|
||||||
|
</sup>
|
||||||
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -16,7 +19,8 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
value: {},
|
value: {},
|
||||||
max: Number,
|
max: Number,
|
||||||
isDot: Boolean
|
isDot: Boolean,
|
||||||
|
hidden: Boolean
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
Loading…
Reference in New Issue
Block a user