mirror of https://github.com/halo-dev/halo
feat: Add title slot to alert component (#5911)
#### What type of PR is this? /kind feature /area core /area ui #### What this PR does / why we need it: alert 组件增加标题插槽,可以更好的自定义标题内容! #### Does this PR introduce a user-facing change? ```release-note 为 VAlert 组件增加标题插槽 ```pull/5917/head
parent
0d524e1ba2
commit
d7b655267e
|
@ -54,8 +54,10 @@ const handleClose = () => {
|
||||||
<component :is="TypeIcons[type]" />
|
<component :is="TypeIcons[type]" />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert-title">
|
<div v-if="title || $slots.title" class="alert-title">
|
||||||
{{ title }}
|
<slot name="title">
|
||||||
|
{{ title }}
|
||||||
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="closable" class="alert-close" @click="handleClose">
|
<div v-if="closable" class="alert-close" @click="handleClose">
|
||||||
<IconClose />
|
<IconClose />
|
||||||
|
|
Loading…
Reference in New Issue