Badge add new slot: text
This commit is contained in:
parent
ed0817359c
commit
b321e1abca
2 changed files with 13 additions and 2 deletions
|
@ -5,12 +5,12 @@
|
|||
</span>
|
||||
<span v-else-if="status" :class="classes" class="ivu-badge-status" ref="badge">
|
||||
<span :class="statusClasses"></span>
|
||||
<span class="ivu-badge-status-text">{{ text }}</span>
|
||||
<span class="ivu-badge-status-text"><slot name="text">{{ text }}</slot></span>
|
||||
</span>
|
||||
<span v-else :class="classes" ref="badge">
|
||||
<slot></slot>
|
||||
<sup v-if="$slots.count" :style="styles" :class="customCountClasses"><slot name="count"></slot></sup>
|
||||
<sup v-else-if="hasCount" :style="styles" :class="countClasses" v-show="badge">{{ finalCount }}</sup>
|
||||
<sup v-else-if="hasCount" :style="styles" :class="countClasses" v-show="badge"><slot name="text">{{ finalCount }}</slot></sup>
|
||||
</span>
|
||||
</template>
|
||||
<script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue