added animation for delete first msg in chat

This commit is contained in:
Kostya
2023-11-19 16:14:38 +03:00
parent 1e7868f220
commit 7fe5a11698
2 changed files with 23 additions and 14 deletions

View File

@@ -49,11 +49,18 @@
} }
.card__user { .card__user {
margin-top: 24px;
margin: 24px 70px 0px 23px; margin: 24px 70px 0px 23px;
display: flex; display: flex;
} }
.fade-enter-active, .fade-leave-active {
transition: opacity 0.5s, transform 0.5s;
}
.fade-enter, .fade-leave-to {
opacity: 0;
transform: translateY(20px);
}
.user__icon { .user__icon {
display: flex; display: flex;
justify-content: center; justify-content: center;

View File

@@ -12,20 +12,22 @@
</div> </div>
<div class="chat__content--users"> <div class="chat__content--users">
<ul> <ul>
<li <transition-group name="fade" mode="out-in">
v-for="msg in array" <li
:key="msg" v-for="msg in array"
> :key="msg"
<div class="card__user"> >
<div class="user__icon"> <div class="card__user">
<img :src="msg.icon"> <div class="user__icon">
<img :src="msg.icon">
</div>
<div class="content">
<h1>{{ msg.username }}</h1>
<p>{{ msg.msg }}</p>
</div>
</div> </div>
<div class="content"> </li>
<h1>{{ msg.username }}</h1> </transition-group>
<p>{{ msg.msg }}</p>
</div>
</div>
</li>
</ul> </ul>
</div> </div>
<writechat-component @send="ClaimDatamsg"></writechat-component> <writechat-component @send="ClaimDatamsg"></writechat-component>