Message
Message组件采用js调用的方式来使用,组件提供了六个常用静态方法,调用后返回的是该消息实例的关闭函数。
Props
content
Custom │ string
duration
number
1.5
closable
bool
false
onClose
func
direction
'top' │ 'bottom' │ 'center' │ 'left' │ 'right'
'top'
Message.config全局配置参数
| 属性 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| direction | 消息的展现位置 | String | 'top' |
| duration | 默认自动关闭延时,单位秒 | Number | 2 |
| zIndex | 消息展示zIndex | Number | 4000 |