mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
Co-authored-by: Yunfly <qinfy@knownsec.com>
This commit is contained in:
parent
d66458435d
commit
dd8e9f8568
@ -88,13 +88,6 @@ const Alert: AlertInterface = ({
|
||||
const prefixCls = getPrefixCls('alert', customizePrefixCls);
|
||||
|
||||
const handleClose = (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
e.preventDefault();
|
||||
const dom = ref.current as HTMLElement;
|
||||
dom.style.height = `${dom.offsetHeight}px`;
|
||||
// Magic code
|
||||
// 重复一次后才能正确设置 height
|
||||
dom.style.height = `${dom.offsetHeight}px`;
|
||||
|
||||
setClosing(true);
|
||||
props.onClose?.(e);
|
||||
};
|
||||
|
@ -7,6 +7,7 @@
|
||||
.reset-component;
|
||||
|
||||
position: relative;
|
||||
max-height: 1000vh;
|
||||
padding: 8px 15px 8px 37px;
|
||||
word-wrap: break-word;
|
||||
border-radius: @border-radius-base;
|
||||
@ -146,7 +147,7 @@
|
||||
}
|
||||
|
||||
&&-closing {
|
||||
height: 0 !important;
|
||||
max-height: 0;
|
||||
margin: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user