💄 消息淡出时间调整

This commit is contained in:
Vanessa 2022-06-09 10:57:27 +08:00
parent c536908cfd
commit 1a7520fada
2 changed files with 5 additions and 5 deletions

View file

@ -1,7 +1,7 @@
.b3-snackbar {
margin-bottom: 16px;
position: relative;
transition: transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;
transition: transform 256ms cubic-bezier(0.45, 0.05, 0.55, 0.95) 0ms;
text-align: right;
&--hide {
@ -17,7 +17,7 @@
display: flex;
flex-direction: column;
transform: translate3d(calc(20vw + 48px), 0, 0);
transition: transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;
transition: transform 0.15s cubic-bezier(0.4, 0, 1, 1) 0ms;
&--show {
transform: translate3d(0, 0, 0) !important;

View file

@ -83,8 +83,8 @@ export const hideMessage = (id: string) => {
setTimeout(() => {
messageElement.remove();
}, Constants.TIMEOUT_INPUT);
if (messagesElement.childElementCount < 2) {
messagesElement.parentElement.classList.remove("b3-snackbars--show");
}
}
if (messagesElement.childElementCount < 2) {
messagesElement.parentElement.classList.remove("b3-snackbars--show");
}
};