Vant module for Nuxt
npm install @vant/nuxt

Vant module for Nuxt
- Automatically import components and styles on demand.
- Automatically import of showDialog, showToast and other methods.
``shell`
npx nuxi@latest module add vantor
npm i vant @vant/nuxt -D
`ts`
export default defineNuxtConfig({
modules: ['@vant/nuxt'],
vant: {
/* Options /
},
});
`vue`
Reference Nuxt documentation and playground use.
- Type: boolean | objectfalse
- Default:
How to load directives and components from lazyload.
eg. { lazyComponent: true }
- Type: booleantrue
- Default:
Whether to automatically import styles.
- Type: string
Replace default locale, you can find locale list here.
- Type: array['Lazyload', 'Locale']
- Default:
Exclude exports from Vant that are not component content.
- Type: array
If there are components that are not imported automatically from Vant, you need to add the component here.
- Type: array
If you wish to add automatically import content from Vant, you can add it here.
- Type: array[ /\.vue$/, /\.vue\?vue/, /\.vue\?v=/, /\.((c|m)?j|t)sx?$/]
- Default:
Include files that need to automatically import styles.
- Type: array[/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/]
- Default:
Exclude files that do not require the automatic import of styles.
- Run pnpm i to install the dependencies.pnpm dev:prepare
- Run to generate type stubs.pnpm dev
- Run to start playground in development mode.pnpm dev:build
- Run to build playground.pnpm dev:start
- Run to locally preview playground.pnpm build` to build this project.
- Run