Statistic : fix slot display bug (#22375)

* Update main.vue

* Update main.vue
pull/22383/head
yang 2023-02-09 15:33:25 +08:00 committed by GitHub
parent 3c0780d9ca
commit 614422011c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="el-statistic"> <div class="el-statistic">
<div class="head" v-if="title"> <div class="head" v-if="title||$slots.title">
<slot name="title"> <slot name="title">
<span class="title"> <span class="title">
{{ title }} {{ title }}
@ -8,7 +8,7 @@
</slot> </slot>
</div> </div>
<div class="con"> <div class="con">
<span class="prefix" v-if="!prefix"> <span class="prefix" v-if="prefix||$slots.prefix">
<slot name="prefix" > <slot name="prefix" >
{{ prefix }} {{ prefix }}
</slot> </slot>
@ -16,7 +16,7 @@
<span class="number" :style="valueStyle"> <span class="number" :style="valueStyle">
<slot name="formatter"> {{ disposeValue }}</slot> <slot name="formatter"> {{ disposeValue }}</slot>
</span> </span>
<span class="suffix" v-if="!suffix"> <span class="suffix" v-if="suffix||$slots.suffix">
<slot name="suffix"> <slot name="suffix">
{{ suffix }} {{ suffix }}
</slot> </slot>