Global message like ant-design
高仿 ant-design 全局消息提示
Using npm:
$ npm install antd-message --save
Using yarn:
$ yarn add antd-message
import Message from 'antd-message';
window.message = Message;
message.success(content, timeout);
Three types: message.success
、message.warn
、message.error
params | summary | type | default |
---|---|---|---|
content |
message content | String |
- |
timeout |
timeout the message unmount | Number |
3000 (ms) |
MIT