新增 Alert 文档

This commit is contained in:
liaoxuezhi 2019-07-03 16:05:49 +08:00
parent e32703a1a1
commit b5c0ac936f
3 changed files with 27 additions and 1 deletions

19
docs/renderers/Alert.md Normal file
View File

@ -0,0 +1,19 @@
## Alert
用来做文字特殊提示,分为四类:提示类、成功类、警告类和危险类。可结合 `visibleOn` 用来做错误信息提示。
| 属性名 | 类型 | 默认值 | 说明 |
| --------- | --------- | ------------------------------------------------ | ------------------- |
| type | `string` | `"alert"` | 指定为 alert 渲染器 |
| className | `string` | | 外层 Dom 的类名 |
| level | `string` | `info` | 级别,可以是:`info`、`success`、`warning` 或者 `danger` |
| showCloseButton | `boolean` | false | 是否显示关闭按钮 |
```schema:height="120" scope="body"
{
"type": "alert",
"body": "这是一段提示",
"level": "warning",
"showCloseButton": true
}
```

View File

@ -17,6 +17,6 @@
{ {
"type": "audio", "type": "audio",
"autoPlay": false, "autoPlay": false,
"src": "http://www.ytmp3.cn/down/32791.mp3" "src": "https://amis.bj.bcebos.com/amis/2019-7/1562137295708/chicane-poppiholla-original-radio-edit%20(1).mp3"
} }
``` ```

View File

@ -434,6 +434,13 @@ export default {
cb(null, makeMarkdownRenderer(doc)); cb(null, makeMarkdownRenderer(doc));
}), }),
}, },
{
label: 'Alert',
path: '/docs/renderers/Alert',
getComponent: (location, cb) => require(['../../docs/renderers/Alert.md'], (doc) => {
cb(null, makeMarkdownRenderer(doc));
}),
},
{ {
label: 'Action', label: 'Action',
path: '/docs/renderers/Action', path: '/docs/renderers/Action',