基于 Vue 3 与 Vite 构建,使用 TypeScript 编写
vue3-vite-template — Vue 启动器模板
作者 GavinHome
基于 Vue 3、Vite 与 Ant Design Vue 的 TypeScript 启动模板,内置路由、状态管理、国际化、Mock 与单元测试等目录结构。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
目前有 1 张原始预览,可打开完整图片查看设计细节。
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
UI 组件库为 ant-design-vue
内置路由、Vuex 状态管理、国际化与 Mock 目录结构
支持 JSX/TSX 与 <script setup> 语法
提供单元测试目录与 Vite 插件、代理的独立配置目录
采用 MIT 许可,允许免费使用、修改、商用和分发
模板详细介绍
这是一个面向 Vue 3 与 TypeScript 的 Vite 启动模板,UI 层使用 ant-design-vue。仓库把常用工程配置按目录拆分:Vite 插件放在 build/vite/plugin,代理配置放在 build/vite/proxy,单元测试放在 tests,接口 Mock 放在 mock。应用侧代码按入口(src/main)、路由(src/router)、状态管理(src/store)、页面(src/views)、组合式函数(src/hook)、组件(src/components)、工具与通用模块(src/common、src/utils)、国际化(src/language)组织。模板支持 JSX/TSX 以及 <script setup> 语法。README 给出的启动方式是先执行 yarn 安装依赖,再执行 yarn serve 运行开发服务。README 同时说明 <script setup> 当时仍处于 RFC 阶段,并给出 VSCode 下 Vetur 与 Volar 两种编辑器配置方式,以及让 TypeScript 正确识别 .vue 导入类型的处理步骤。仓库采用 MIT 许可,可免费使用、修改、商用和分发该版本代码,但演示图片、字体、图标等第三方素材需单独核对许可。
适合你的项目吗?
适用场景
- 需要 Vue 3 + TypeScript + Vite 组合的中后台项目起步
- 希望直接使用 ant-design-vue 组件库搭建界面
- 需要按约定目录组织路由、状态、国际化、Mock 与测试代码
- 在项目中使用 JSX/TSX 或 <script setup> 编写组件
适合人群
- 熟悉 Vue 3 与 TypeScript 的前端开发者
- 需要快速搭建管理后台类前端工程的团队
- 接受以目录约定方式组织 Vite 配置与业务代码的项目
- 使用 VSCode 并愿意按 README 配置 Vetur 或 Volar 的开发者
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
使用 yarn 安装依赖,再执行 yarn serve 启动开发服务
- 2
README 建议使用 VSCode,并说明 Vetur 与 Volar 两种编辑器配置方式
- 3
使用 <script setup> 时,README 建议改用 Volar 并禁用 Vetur
- 4
若需要 .vue 导入的准确类型,README 给出 Volar 或 Vetur 对应的额外配置步骤
- 5
演示图片、字体、图标等第三方素材需按各自许可单独核对
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
https://github.com/GavinHome/vue3-vite-template/blob/master/LICENSEhttps://github.com/GavinHome/vue3-vite-template/blob/master/README.mdPermission is hereby granted, free of charge
许可证原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-12。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料一般 · 70 / 100
- 技术栈
- Vue · Vite
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2021-05-28
- 截图检查日期
- 2026-10-12
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Vue。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-13
查看当时使用的来源资料
SHA-256: 89a895d7c69c2e3eb3b2fbe6c450838e8a5170f74cb54cf0140c4019e71bd368
2026-10-12T23:41:15.740Z
来源文件 / 仓库# Vue3 + Vite2 + Typescript
<p>
<a href="https://github.com/vuejs/vue-next">
<img src="https://img.shields.io/badge/vue-3.0.11-brightgreen.svg" alt="vue3"></a>
<a href="https://github.com/vueComponent/ant-design-vue">
<img src="https://img.shields.io/badge/antdv--ui-2.1.6-brightgreen.svg" alt="ant-desigin-vue"></a>
<a href="https://github.com/vuejs/vuex.git">
<img src="https://img.shields.io/badge/vuex-4.0.0-brightgreen.svg" alt="vuex"></a>
<a href="https://github.com/GavinHome/vue3-vite-template/blob/dev/LICENSE">
<img src="https://img.shields.io/github/license/gavinhome/vue3-vite-template" alt="MIT license"></a>
</p>
[Simplified Chinese](./README.zh.md) | English
The starter developed base on [vue3](https://github.com/vuejs/vue-next) and [ant-design-vue](https://github.com/vueComponent/ant-design-vue). This template should help get you started developing with Vue 3 and Typescript in Vite.
* [Preview](https://gavinhome.github.io/vue3-vite-template)
## Feature
* plugin:build/vite/plugin
* proxy:build/vite/proxy
* UT:tests
* mock:mock
* entry:src/main
* router:src/router
* store:src/store
* views:src/views
* hook:src/hook
* components:src/components
* utils:src/common, src/utils
* globalization:src/language
* support jsx & tsx, and `script setup`
## Quick Start
```shell
yarn
```
```shell
yarn serve
```
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings!
### If Using `<script setup>`
[`<script setup>`](https://github.com/vuejs/rfcs/pull/227) is a feature that is currently in RFC stage. To get proper IDE support for the syntax, use [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) instead of Vetur (and disable Vetur).
## Type Support For `.vue` Imports in TS
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can use the following:
### If Using Volar
Run `Volar: Switch TS Plugin on/off` from VSCode command palette.
### If Using Vetur
1. Install and add `@vuedx/typescript-plugin-vue` to the [plugins section](https://www.typescriptlang.org/tsconfig#plugins) in `tsconfig.json`
2. Delete `src/shims-vue.d.ts` as it is no longer needed to provide module info to Typescript
3. Open `src/main.ts` in VSCode
4. Open the VSCode command palette
5. Search and run "Select TypeScript version" -> "Use workspace version"
## Licenses
[MIT](https://opensource.org/licenses/MIT)
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

vitesse
🏕 Opinionated Vite + Vue Starter Template
Vue · 启动器

vitesse-webext
⚡️ WebExtension Vite Starter Template
Vue · 启动器

laravel-vue-spa
A Laravel-Vue SPA starter kit.
Vue · 启动器

vue3-h5-template
vue3-h5-template 是一个面向移动端 H5 项目的启动模板,基于 Vue3、Vite 和 Vant4 构建,同时集成了 TypeScript、Tailwindcss、Pinia、Vue-router 等常用…
Vue · 启动器

tov-template
vite + vue3 + ts 开箱即用现代开发模板 | vite + vue3 + ts out-of-the-box modern development template
Vue · 启动器

shadcn-vue-landing-page
New design 🎉 Vue + Shadcn-vue + TypeScript + Tailwind. Landing page template ease-to-use
Vue · 企业官网
