脚本宝典收集整理的这篇文章主要介绍了uniapp如何实现页面地址跳转,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
uniapP实现页面地址跳转的方法:1、使用navigator标签,代码为【<navigator url="../hello/hello" oPEn-type="navigate">】;2、使用【@tap】事件跳转。
本教程操作环境:windows7系统、uni-app2.5.1版本、ThinkPad t480电脑。
推荐(免费):uni-app开发教程
uniapp实现页面地址跳转的方法:
1.navigator 标签
<navigator url="../hello/hello" open-type="navigate"> <view class="struct"> I am {{student.age}} yeas old </br> I have skills such as {{student.skill[0]}},{{student.skill[1]}} </view> </navigator>
2.@tap事件跳转
<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(ITem,index) in news" :key="index" @tap="openinfo"> <view class="uni-media-list-text-top">{{item.title}}</view> </view> <script> methods: { openinfo(e) { console.LOG(e) VAR newsid = e.currentTarget.dataset.newsid ; uni.navigateTo({ url: '../info/info?newsid='+newsid, success: res => {}, fail: () => {}, complete: () => {} }); } } </script>
相关免费学习推荐:编程视频
以上就是uniapp如何实现页面地址跳转的详细内容,更多请关注脚本宝典其它相关文章!
以上是脚本宝典为你收集整理的uniapp如何实现页面地址跳转全部内容,希望文章能够帮你解决uniapp如何实现页面地址跳转所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。