I am trying to implement an Android component in the style of toasts with animation in Vue.js 2. I have the following css for transitions:
.toast-enter-active { opacity: 0; transition: all 1s ease-out; } .toast-enter-to { opacity: 1; } .toast-leave { opacity: 1; transition: all .7s ease-out; } .toast-leave-to { opacity: 0; }
The transitions toast-enterlook good - the list moves and the item disappears, but when the item is deleted, for some reason, the item being deleted jumps to the bottom and then disappears.
toast-enter
Here's what it looks like: jsFiddle
. V-for - , . , toast :
toast
:
<div v-for="(toast, index) in toasts" :key="toast.id" :class = "['toast',toast.type]" >
{text:'1 test',type:'info', id:1}, {text:'2 test',type:'info', id:2}, {text:'3 test',type:'info', id:3},
jsFiddle
Source: https://habr.com/ru/post/1672925/More articles:response-native-socketio receives an error in connecting SocketIO only in iOS - react-nativeRxJava filter can be observed with other observables - javaReusing Swift code between projects, running framework code locally and through Carthage - gitЕсть ли предупреждение для строкового литерала для преобразования bool в gcc - c++Different default ExactSpelling values between C # and VB.NET. What for? - c #Начальное отставание для ячейки с UITextView - iosPhpStorm 2016.3.3 does not find a test class with PHPUnit 6.0. * - phpPHP client for sending messages - phpPhp посылает байты массива в веб-сокете - arraysC #: Passing derived classes as one common parameter - c #All Articles