<template>
<view>
<u-transition :show="showIndex===0" mode="fade">
//主页
<button @click="goOne"></button>
<button @click="goTwo"></button>
</u-transition>
<u-transition :show="showIndex===1" :mode="zoomin">
分页面1
<button @click="goTwo"></button>
<button @click="backHome"></button>
</u-transition>
<u-transition :show="showIndex===2" :mode="zoomin">
分页面2
<button @click="goOne"></button>
<button @click="backHome"></button>
</u-transition>
</view>
<template>
<script>
export default {
data(){
return{
showIndex:0
}
},
methods:{
goOne(){
this.showIndex=1
},
goTwo(){
this.showIndex=2
},
backHome(){
this.showIndex=0
}
}
}
</script>
发现从主页跳转到1和2页面不存在动画卡顿,不过1和2之间切换存在卡顿,猜测可能是动画都是zoomin
个人探索的解决方法:
先切换到主页再跳转进分页面就不卡了
goOne(){
setTimeout(() => {
this.showIndex = 0
}, 0)
this.showIndex=1
},
goTwo(){
setTimeout(() => {
this.showIndex = 0
}, 0)
this.showIndex=2
},
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· DeepSeek在M芯片Mac上本地化部署