透過 100 多個技巧的集合學習 Nuxt!

locomotive-scroll
nuxt-locomotive-scroll

一個 Nuxt 模組,可輕鬆將 Locomotive Scroll 整合到您的 Nuxt 應用程式中。

感謝 starter-kit-nuxt-locomotive-scroll nuxt v2,作者為 DidoMarchet

Nuxt Locomotive Scroll

一個 Nuxt 模組,可輕鬆將 Locomotive Scroll 整合到您的 Nuxt 應用程式中。

npm versionnpm downloadsLicenseNuxt

功能

  • 🚀  易於使用
  • 🎨  可自訂

快速設定

使用一個命令將模組安裝到您的 Nuxt 應用程式

npx nuxi module add locomotive-scroll

就這樣!您現在可以在您的 Nuxt 應用程式中使用 Nuxt Locomotive Scroll ✨ 或您可以手動安裝它

# npm
npm install nuxt-locomotive-scroll

# yarn
yarn add nuxt-locomotive-scroll

# pnpm
pnpm add nuxt-locomotive-scroll

並將 nuxt-locomotive-scroll 添加到 nuxt.configmodules 區段中。

export default defineNuxtConfig({
  modules: [
    'nuxt-locomotive-scroll',
  ],
})

用法

只需將 v-locomotive 指令添加到您要動畫化的元素。

<template>
  <div v-locomotive>
    <!-- Your content here -->
  </div>
</template>

您可以查看遊樂場以取得更多範例。

貢獻

本機開發
# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release