## 基本用法
打开消息提示
```html ``` ## 不同状态
成功 警告 错误
```html ``` ## 可关闭
消息 成功 警告 错误
```html ``` ## 全局方法 element 为 Vue.prototype 添加了全局方法 $message。因此在 vue instance 中可以采用本页面中的方式调用 `Message`。 ## 单独引用 单独引入 `Message`: ```javascript import { Message } from 'element-ui'; ``` 此时调用方法为 `Message(options)`。 ## API | 参数 | 说明 | 类型 | 可选值 | 默认值 | |---------- |-------------- |---------- |-------------------------------- |-------- | | message | 消息文字 | string | | | | type | 主题 | string | 'success', 'warning', 'info', 'error' | 'info' | | duration | 显示时间, 毫秒。设为 0 则不会自动关闭 | number | | 3000 | | showClose | 是否显示关闭按钮 | boolean | | false | | onClose | 关闭时的回调函数, 参数为被关闭的 message 实例 | function | | |