Appearance
<NuxtLoadingIndicator>
- 页面加载进度组件
Nuxt 提供<NuxtLoadingIndicator>
组件在页面导航上显示当前页面的加载状态进度条。
Basic
添加<NuxtLoadingIndicator />
到app.vue
或layout
组件中。
<template>
<NuxtLayout>
<NuxtLoadingIndicator /> <!-- here -->
<NuxtPage />
</NuxtLayout>
</template>
Props
color:加载条颜色
height:加载条高度,单位:
px
,默认值为:3duration:加载条加载持续时间,单位:毫秒,默认值为:2000
throttle:显示加载条之前等待的时间,单位:毫秒,默认值为:200
自定义加载条
此组件是完全可选的。可以基于此文件实现自定义加载条。