ant-design/components/message/demo/duration.md
2015-07-11 18:19:48 +08:00

432 B

基本

  • order: 4

全局提示 - 操作成功提示,并自定义时长10s,默认时长1.5s



var message = antd.message;
var success = function() {
  message.success('这是一条成功的提示,并将于10秒后消失', 10);
};

React.render(<button className="ant-btn ant-btn-primary" onClick={success}>自定义时长提示</button>
, document.getElementById('components-message-demo-duration'));