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
lan-yonghui 2024-05-14 10:06:33 +08:00 committed by GitHub
parent 0d524e1ba2
commit d7b655267e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -54,8 +54,10 @@ const handleClose = () => {
<component :is="TypeIcons[type]" />
</slot>
</div>
<div class="alert-title">
<div v-if="title || $slots.title" class="alert-title">
<slot name="title">
{{ title }}
</slot>
</div>
<div v-if="closable" class="alert-close" @click="handleClose">
<IconClose />