我是靠谱客的博主 无情冰淇淋,这篇文章主要介绍uniapp如何实现页面地址跳转,现在分享给大家,希望可以做个参考。

本教程操作环境:windows7系统、uni-app2.5.1版本、thinkpad t480电脑。

推荐(免费):uni-app开发教程

uniapp实现页面地址跳转的方法:

1.navigator 标签

复制代码
1
2
3
4
5
6
<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事件跳转

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<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如何实现页面地址跳转内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(99)

评论列表共有 0 条评论

立即
投稿
返回
顶部