1.navigator 标签
<navigator url="../hello/hello" open-type="navigate">
<view class="struct">
I am {{student.age}} yeas old</br>4 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>
</navigator>
网友评论