Alert: Add dark theme (#15041)

This commit is contained in:
Zhi Cun
2019-04-19 11:57:20 +08:00
committed by hetech
parent 128feba18f
commit 686595627e
8 changed files with 216 additions and 25 deletions

View File

@@ -29,6 +29,39 @@
```
:::
### 主题
Alert 组件提供了两个不同的主题:`light``dark`
:::demo 通过设置`effect`属性来改变主题,默认为`light`
```html
<template>
<el-alert
title="成功提示的文案"
type="success"
effect="dark">
</el-alert>
<el-alert
title="消息提示的文案"
type="info"
effect="dark">
</el-alert>
<el-alert
title="警告提示的文案"
type="warning"
effect="dark">
</el-alert>
<el-alert
title="错误提示的文案"
type="error"
effect="dark">
</el-alert>
</template>
```
:::
### 自定义关闭按钮
自定义关闭按钮为文字或其他符号。
@@ -190,6 +223,7 @@
| center | 文字是否居中 | boolean | — | true |
| close-text | 关闭按钮自定义文本 | string | — | — |
| show-icon | 是否显示图标 | boolean | — | false |
| effect | 选择提供的主题 | string | light/dark | light |
### Slot