uni-app:クリックイベントの実装(クリック情報、ページジャンプを実現)

スタイル:

スタートページ:

クリック後のページ:

 

 パス表示:

 コアコード:

フロントエンドのクリック イベント:

@tap='テスト'

 ページ ジャンプ メソッドは次のように記述します。

test(){                 uni.navigateTo({                     url:'../start_detail/start_detail?order_number=' + this.result                 })             },



完全なコード:

<template>
	<view>
		<view @tap='test'>点我</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			test(){
				uni.navigateTo({
					url:'../start_detail/start_detail?order_number=' + this.result
				})
			},
		}

	}
</script>

<style lang="scss">

</style>

 

おすすめ

転載: blog.csdn.net/weixin_46001736/article/details/131834575