1. 程式人生 > 其它 >nuxt動態路由配置

nuxt動態路由配置

技術標籤:前端nuxt.js

1、pages檔案結構
在這裡插入圖片描述
2、nuxt-link使用

<nuxt-link v-for="(val,index) in listCon"
	:to="{
		name:'newsDetail-id',
		params:
			{   
				 id:val.tag_id,
				 title:val.title,
				 media_info:val.media_info,
				 media_name:val.media_name,
				 datetime:val.datetime,
				 abstract:
val.abstract, image_list:val.image_list, repin_count:val.repin_count, comment_count:val.comment_count, keywords:val.keywords } }" </nuxt-link>