安装

使用我们的在线入门指南快速开始使用 Nuxt,或使用你的终端本地开始使用。

在线游戏

¥Play Online

如果你只想在浏览器中使用 Nuxt 而不设置项目,则可以使用我们的在线沙盒之一:

¥If you just want to play around with Nuxt in your browser without setting up a project, you can use one of our online sandboxes:

在 StackBlitz 上打开

在 CodeSandbox 上打开

或者,按照以下步骤在你的计算机上设置一个新的 Nuxt 项目。

¥Or follow the steps below to set up a new Nuxt project on your computer.

新项目

¥New Project

先决条件

¥Prerequisites

::details 最佳设置附加说明: - Node.js:确保使用偶数版本(18、20 等) - Nuxtr:安装社区开发的 Nuxtr extension - WSL:如果你使用的是 Windows 系统并且 HMR 运行缓慢,建议你尝试使用 WSL (Windows Subsystem for Linux),这可能会解决一些性能问题。:: ::打开终端(如果你使用的是 Visual Studio Code,则可以打开 集成终端),并使用以下命令创建一个新的启动项目:¥Open a terminal (if you're using Visual Studio Code, you can open an integrated terminal) and use the following command to create a new starter project:
npm create nuxt <project-name>
或者,你可以打开 nuxt.new 并按照那里的说明找到其他启动器或主题。
在 Visual Studio Code 中打开项目文件夹:¥Open your project folder in Visual Studio Code:
Terminal
code <project-name>
或者,从你的终端切换到你的新项目目录:¥Or change directory into your new project from your terminal:
cd <project-name>

开发服务器

¥Development Server现在,你将能够以开发模式启动你的 Nuxt 应用:¥Now you'll be able to start your Nuxt app in development mode:
npm run dev -- -o
做得好!浏览器窗口应自动为 http://localhost:3000 打开。¥Well done! A browser window should automatically open for http://localhost:3000.

后续步骤

¥Next Steps现在你已经创建了 Nuxt 项目,可以开始构建应用了。¥Now that you've created your Nuxt project, you are ready to start building your application.
Read more in Nuxt Concepts.