W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
該組件只適用于在布局中顯示頁面組件(即非布局內(nèi)容)。
例子 (layouts/default.vue):
<template>
<div>
<div>頁頭</div>
<nuxt/>
<div>頁腳</div>
</div>
</template>
可以看下這個實際的布局示例。
Props:
有三種方式可以處理 <router-view /> 內(nèi)部屬性的 key。
<template>
<div>
<nuxt :nuxt-child-key="someKey"/>
</div>
</template>
export default {
key (route) {
return route.fullPath
}
}
watchQuery選項中指定的查詢會被用于構(gòu)建key。如果watchQuery為true,則默認使用fullPath。
查看例子請點擊: 命名視圖例子.
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: