2020/01/23
yumemi.vue #5
<transition name="slide-fade">
<div>
<!-- 入れたい要素 -->
</div>
</transition>
.selected-enter {
transform: translateX(5px);
opacity: 0;
}
.selected-enter-active,
.selected-leave-active {
transition: all 0.15s ease-out;
}
.selected-enter-to {
transform: translateX(0px);
opacity: 1;
}
.selected-leave-to {
transform: translateX(5px);
opacity: 0;
}
import Vue from 'vue'
export default Vue.extend({
methods: {
beforeEnter(el) {
el.style.transitionDelay = 100 * parseInt(el.dataset.index, 10) + 'ms'
},
afterLeave(el) {
el.style.transitionDelay = ''
if (this.selectedIds.length !== 0) {
this.isEmpty = false
} else {
this.isEmpty = true
}
}
}
})
<transition name="slide" mode="out-in">
<div></div>
</transition>
.picker-enter-active {
transition: all .2s ease;
}
.picker-leave-active {
transition: all .1s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
.picker-enter {
transform: translateX(10px);
opacity: 0;
}
.picker-leave-to {
transform: translateX(10px);
opacity: 0;
}