說明:vue 中我有一個上傳的大組件包含三個子組件。三個組件我通過三個布爾變量來設置顯示和隱藏第一個組件默認是顯示的(v-if),剩余兩個組件默認是隱藏的(v-if)。第一個組件包含一個上傳按鈕,用戶點擊上傳按鈕上傳文件成功后,第一個組件會淡出消失。第二個組件會淡入顯示,第三個組件依舊是隱藏的。第二個組件同理也包含一個繼續(xù)按鈕,點擊后同樣是第二個組件淡出隱藏,第三個組件會淡入顯示。問題:目前我通過 transition-group 來寫,但是只有淡出效果,沒有淡入效果<template> <transition-group tag="article" name="upload-fade" class="gaga-upload"> <upload-instructions key="instructions" v-if="showList.instructionsShow"></upload-instructions> <upload-content key="content" :imgs="imgs" v-if="showList.contentShow" v-on:getNext="getDesign"></upload-content> <upload-design key="design" v-if="showList.designShow"></upload-design> </transition-group></template>
vue 如何針對性運用過渡效果
慕田峪4524236
2018-10-18 14:10:40