Uniapp's method to implement page address jump: 1. Use the navigator tag, the code is [
]; 2. Use [@tap] event to jump.
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, thinkpad t480 computer.
Recommended (free): uni-app development tutorial
uniapp implements page address jump Method:
1.navigator tag
<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 event jump
<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>
Related free learning recommendations: Programming Video
The above is the detailed content of How uniapp implements page address jump. For more information, please follow other related articles on the PHP Chinese website!