1. 放入匯出的元件
從工坊匯出 Vue 3 元件(Pro)存至 components/PixelLogoLoader.vue,Nuxt 將自動完成註冊。
2. 以 <ClientOnly> 包裹
搭配 <ClientOnly> 與等高 #fallback 佔位即可消除 SSR 水合警告:
<template>
<ClientOnly>
<PixelLogoLoader variant="vortex" :height="340" :duration="3.2" />
<template #fallback>
<div style="height: 340px" aria-hidden="true" />
</template>
</ClientOnly>
</template>
完整 Props 說明請參考 Vue 3 元件教學。