UNPKG

cjd-parkball

Version:

> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用

39 lines (30 loc) 668 B
--- category: 2 title: 更新消息内容 title_en: Update Message Content --- zh-CN 可以通过唯一的 key 来更新内容。 en-US Update content with unique key. ````jsx import { Button, notification } from 'parkball'; const key = 'updatable'; const openNotification = () => { notification.open({ key, message: 'Notification Title', description: 'description.', }); setTimeout(() => { notification.open({ key, message: 'New Title', description: 'New description.', }); }, 1000); }; ReactDOM.render( <Button type="primary" onClick={openNotification}>Open the notification box</Button>, mountNode); ````