# @ant-design-vue/nuxt 中文文档

规范地址：https://npmcn.com/package/%40ant-design-vue/nuxt/

版本：1\.4\.6
npm 元数据更新时间：2024-11-11T09:47:24.565Z
中文译文更新时间：2026-11-06T06:03:00.245Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40ant-design-vue/nuxt
原文对照：https://npmcn.com/package/%40ant-design-vue/nuxt/?lang=original
项目主页：https://github.com/vueComponent/ant-design-vue-nuxt#readme
源码仓库：https://github.com/vueComponent/ant-design-vue-nuxt

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：15.1 kB，13 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：2 个
- peer 依赖：ant-design-vue \>=4
- 首次发布：2023-05-31T01:50:51.059Z
- 最新版本发布：2024-11-11T09:47:24.360Z
- 近 30 天下载量：18002（2026-10-06 至 2026-11-04，npm 官方下载统计）
- 已发布版本数：16（近 12 个月 0 个）

## 中文简介

蚂蚁设计-vue-nuxt模块

## 安装

```sh
npm install @ant-design-vue/nuxt
```

也可以使用：`pnpm add @ant-design-vue/nuxt`、`yarn add @ant-design-vue/nuxt`、`bun add @ant-design-vue/nuxt`

## README

# 蚂蚁设计 Vue Nuxt

[![npm version](https://img.shields.io/npm/v/@ant-design-vue/nuxt/latest.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://npmjs.com/package/@ant-design-vue/nuxt) [![npm downloads](https://img.shields.io/npm/dm/@ant-design-vue/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://npmjs.com/package/@ant-design-vue/nuxt) [![License](https://img.shields.io/npm/l/@ant-design-vue/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D)](https://npmjs.com/package/@ant-design-vue/nuxt) [![Nuxt](https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js)](https://nuxt.com/)

[蚂蚁设计Vue](https://www.antdv.com/) 模块 [坚果](https://nuxt.com/)

-   [QQ 发布注释](https://npmcn.com/CHANGELOG.md)

## 特征

-   \* 应要求自动导入组件.
-   自动导入图标 [@ant-deign/icons-vue (英语)](https://github.com/ant-design/ant-design-icons/tree/master/packages/icons-vue)。 。 。 .
-   \* 自动导入信件、通知和模块方法.

## 快速设置

1.  添加 `@ant-design-vue/nuxt` 对您的项目的依赖性

```bash
npx nuxi@latest module add ant-design-vue
```

2.  添加 `@ant-design-vue/nuxt` 页:1 `modules` 节 `nuxt.config.ts`

```js
export default defineNuxtConfig({
  modules: [
    '@ant-design-vue/nuxt'
  ],
  antd:{
    // Options
  }
})
```

就这样! 您现在可以在您的 Nuxt app 中使用 ant- design- vue

## 使用量

[在线游戏场](https://stackblitz.com/~/github.com/antdv-pro/antdv-nuxt-starter)

```vue
<script lang="ts" setup>
const handleMessage = () => {
  message.info("This is a normal message");
}
</script>
<template>
  <a-button @click="handleMessage">
    button
  </a-button>
</template>
```

参考文献 [Nuxt 文档](https://nuxt.com/docs/guide/directory-structure/components) 财务报告和审定财务报表 [游乐场](https://npmcn.com/package/%40ant-design-vue/nuxt/playground/app.vue) 使用时.

## 选项

### 组件

-   类型 : `array` "虚"

如果有组件并非从Ant Design Vue自动导入,则需要在此添加组件名称.

譬如说.`['Button']`

### 进口

-   类型 : `array`

如果您想要从 Ant Design Vue 自动导入内容, 您可以在此添加 .

### 图标

-   类型 : `array` "虚"

如果有组件不是从@ant-dedesign/icons-vue自动导入的,需要在此添加组件名.

### 提取Style (1.4.1)

-   类型 : `boolean`

> 解决页面 css 闪烁问题

按需提取并注入 cs, 默认为虚假

```vue
<!-- If the extractStyle option is enabled, we can use a-extract-style on the outermost level of the template in app.vue -->
<template>
  <a-extract-style>
    <!-- Your page or component -->
  </a-extract-style>
</template>
```

## 发展

```bash
# 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

# Build for production
npm run build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release
```

## 常见问题

### @ant-design-vue/nuxt 是什么？

蚂蚁设计-vue-nuxt模块

### 如何安装 @ant-design-vue/nuxt？

在项目目录运行 npm install @ant-design-vue/nuxt，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：ant-design-vue（\>=4）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @ant-design-vue/nuxt 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @ant-design-vue/nuxt 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @ant-design-vue/nuxt 可以商用吗？

@ant-design-vue/nuxt 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @ant-design-vue/nuxt 的下载量有多少？

根据 npm 官方下载统计，@ant-design-vue/nuxt 在 2026/10/06 – 2026/11/04 这 30 天内被下载 18,002 次，日均约 600 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @ant-design-vue/nuxt 还在维护吗？

最新版本 1\.4\.6 发布于 2024/11/11（2 年前）；至今共发布 16 个版本，其中过去 12 个月发布了 0 个；首次发布于 2023/05/31。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

