API <nuxt-link>组件
<nuxt-link> 组件用于在中至别的。
目前 <nuxt-link> 的作用和 一致,推荐阅读 来了解它的使用。
例如 (pages/index.vue):
<template> <div> <h1>F2er.com Home page</h1> <nuxt-link to="/about">前端之家</nuxt-link> </div> </template>
别名: <n-link>, <NuxtLink>, 和 <NLink>
Nuxt.js v2.4.0
为了提高Nuxt.js应用程序的响应能力,当将在视口中时,Nuxt.js将预分割。此的灵感来自Google Chrome Labs的。
要禁用的预,可以使用no-prefetch:
<n-link to="/about" no-prefetch>About page not pre-fetched</n-link>
您可以使用router.prefetchLinks全局配置此行为。
关于prefetched-class还可用于在预分割时的类。确保使用router.linkPrefetchedClass全局设置此。