import { Button, notification } from 'antd';
queryDemanDetail_two = () => {
const openNotificationWithIcon = type => {
switch (type)
{
case 'success':
notification[type]({
message: '修改成功',
description:
'修改成功',
});
break;
case 'error':
notification[type]({
message: '修改失败',
description:
'修改失败',
});
break;
}
};
this.props.dispatch({
type: 'xxx/xxxx',
payload: {
Id: this.state.Id
}
}).then((res) => {
if (res.code == "200") {
openNotificationWithIcon('success')
} else {
openNotificationWithIcon('error')
}
})
}
ant notification的使用
最新推荐文章于 2024-06-17 15:52:54 发布