U 优化组件

pull/418/head
vapao 2021-12-06 10:07:35 +08:00
parent 375ac435e2
commit ed4822ead6
1 changed files with 3 additions and 4 deletions

View File

@ -65,10 +65,9 @@ export default function () {
fetch();
const {title, content} = JSON.parse(e.data);
const key = `open${Date.now()}`;
const btn = (
<Button type="primary" size="small" onClick={() => notification.close(key)}>知道了</Button>
);
notification.warning({message: title, description: content, btn, key, top: 64, duration: null})
const description = <div style={{whiteSpace: 'pre-wrap'}}>{content}</div>;
const btn = <Button type="primary" size="small" onClick={() => notification.close(key)}>知道了</Button>;
notification.warning({message: title, description, btn, key, top: 64, duration: null})
}
}
}