https://www.jianshu.com/p/55305c53de13
トランジションアニメーションフック知人:
< DIV ID = "ルート" > < 遷移名= 'フェード' @の前に入力します= 'handleBeforeEnter' @enter = 'handleEnter'を 入力した後、@ = 'handleAfterEnter' > < h1のV-ショー= 'ショー' > ときの外観のほとんどは若いです </ H1 > </ 遷移> < ボタン@click = '変更' >切换</ ボタン> </ DIV > < スクリプト> VAR VM = 新しいヴュー({ 上:' #root ' 、 データ:{ ショー:真 }、 方法:{ 変更:関数(){ この.SHOW =!この.SHOW; }、 handleBeforeEnter:関数(EL){ console.log(' 前' ); el.style.color = ' 赤' }、 handleEnter:関数(EL、行わ){ console.log(' 入力' ); setTimeout(()=> { el.style.color = ' 緑色' }、2000 ) setTimeout(()=> { 行って(); }、4000 ) }、 handleAfterEnter:関数(EL){ console.log(' 後' ); el.style.color = ' #000000 ' } } }) </ スクリプト>