mirror of https://github.com/openspug/spug
U 优化组件
parent
375ac435e2
commit
ed4822ead6
|
@ -65,10 +65,9 @@ export default function () {
|
||||||
fetch();
|
fetch();
|
||||||
const {title, content} = JSON.parse(e.data);
|
const {title, content} = JSON.parse(e.data);
|
||||||
const key = `open${Date.now()}`;
|
const key = `open${Date.now()}`;
|
||||||
const btn = (
|
const description = <div style={{whiteSpace: 'pre-wrap'}}>{content}</div>;
|
||||||
<Button type="primary" size="small" onClick={() => notification.close(key)}>知道了</Button>
|
const btn = <Button type="primary" size="small" onClick={() => notification.close(key)}>知道了</Button>;
|
||||||
);
|
notification.warning({message: title, description, btn, key, top: 64, duration: null})
|
||||||
notification.warning({message: title, description: content, btn, key, top: 64, duration: null})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue