在App.vue文件中 监听路由
在create中给transitionName赋值
css样式
/** 解决路由切换ios左右闪动问题 */ .transitionBody { transition: all 0.377s ease-out; //设置动画 } .transitionLeft-enter, .transitionRight-leave-active { -webkit-transform: translate(100%, 0); transform: translate(100%, 0); } .transitionLeft-leave-active, .transitionRight-enter { -webkit-transform: translate(-100%, 0); transform: translate(-100%, 0); } .transitionLeft-enter-active, .transitionRight-enter-active { //防止过渡时元素抖动 position: absolute; top: 0; right: 0; left: 0; bottom: 0; }
标签:transitionLeft,transitionRight,vue,100%,ios,transform,闪屏,active,translate From: https://www.cnblogs.com/goging/p/17349303.html