반응형
※ 모달창에 애니메이션을 추가
※ vue에서 제공하는 transition으로 구현
1. App.vue
<template>
<transition name="fade">
<Modal :누른상품번호="누른상품번호" :products="products"
:모달창열림="모달창열림" @모달창닫기="모달창닫기()"/>
</transition>
</template>
<style>
.fade-enter-from, .fade-leave-to {
transform: scale(0);
}
.fade-enter-active, .fade-leave-active{
transition: all 0.5s;
}
.fade-enter-to, .fade-leave-from{
transform: scale(1);
}
</style>
2. 출력화면
반응형
'Vue.js > 실습' 카테고리의 다른 글
[vuejs] mounted (feat. lifecycle hook) (0) | 2023.01.18 |
---|---|
[vuejs] 게시물 or 데이터 정렬버튼 만들기 (0) | 2023.01.13 |
[vuejs] v-model, input, select, watch (0) | 2022.12.26 |
[vuejs] 컴포넌트(component), Props, Custom Event (1) | 2022.12.24 |
[vuejs] 이미지(image) 및 모달창(modal screen) v-if 사용 (0) | 2022.12.24 |
댓글