Vue3 쓰시는분들 트랜지션 설정 팁
891
HW J
작성한 질문수 4
4
실무에서 쓸일이 있어서 복습하다보니 Vue 버전이 바뀌어서 강의 내용보면서 Vue3 에 맞게 적용중인데요. 우선 아래 레퍼런스 참고하시면 될 듯 합니다.
강의내용과는 크게 다른건 없긴합니다.
TodoList.vue
<template>
<div>
<!-- name 은 하단의 css 클래스 transition class 와 연관-->
<TransitionGroup tag="ul" name="list" class="container">
<li v-bind:key="todoItem.item" v-for="(todoItem, index) in propsdata" class="shadow">
<i class="checkBtn fa-solid fa-check"
v-bind:class="{checkBtnCompleted: todoItem.completed}"
v-on:click="toggleComplete(todoItem, index)"></i>
<span v-bind:class="{textCompleted : todoItem.completed}" >{{ todoItem.item }} </span> <!--{{ index }}-->
<span class="removeBtn" v-on:click="removeTodo(todoItem, index)">
<i class="fa-solid fa-trash"></i>
</span>
</li>
</TransitionGroup>
</div>
</template>
<style>
/* 기존 css 는 생략, 아래 레퍼런스 css 참고
https://vuejs.org/examples/#list-transition
*/
/* 리스트 아이템 트랜지션 효과 */
/* 1. declare transition */
.list-move,
.list-enter-active,
.list-leave-active {
transition: all 0.5s cubic-bezier(0.55, 0, 0.1, 1);
}
/* 2. declare enter from and leave to state */
.list-enter-from,
.list-leave-to {
opacity: 0;
transform: translateY(30px);
}
/* 3. ensure leaving items are taken out of layout flow so that moving
animations can be calculated correctly. */
.list-leave-active {
position: absolute;
transition: all 1s;
}
</style>
답변 1
Chrome 개발자 모드 확장이 안됨
0
272
1
깃 권한 요청드립니다
0
118
1
vue.js 중급 리포지토리 권한 관련
0
118
1
vuex + axios 질문 있습니다!
1
198
2
깃 권한 요청드립니다!
0
162
1
강의 깃주소 문의
0
145
1
router-view에 props를 어떻게 넘길 수 있나요?
1
281
2
Vue가 인식되지 않는 현상
0
207
1
기초강좌는 어디있나요?
1
193
2
App.vue가 필요한 이유
0
193
1
getter가 정의되어 있지 않아 오류가 발생합니다.
1
256
1
뷰 라이프사이클
1
188
1
TSLint 말고 TSLint Vue 설치해도 되나요?
1
369
3
로컬 스토리지는 어디에 있나요?
1
282
1
vuex 실행시 새로고침해야지만 리스트에 나타나는 현상
1
391
2
export default 관련한 질문
0
357
2
깃허브 vue-todo 접근불가에 따른 확인요청
1
356
2
깃허브에 문제있는것 같습니다.
1
275
2
인프런 강의 재생 화면 구성 변경 문의드립니다
1
306
2
addTodo Helper 함수 적용
1
244
1
vuex 헬퍼 전역 설정
1
248
2
github 권한요청드립니다.
1
258
2
이벤트 위치에 대한 궁금증 입니다.
1
224
2
구조 차이에 대한 문의
1
347
2





