Skip to content

wangrongding/vue3-admin

Repository files navigation

Vue 3 + Typescript + Vite

This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.

Recommended IDE Setup

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 enable Volar's .vue type support plugin by running Volar: Switch TS Plugin on/off from VSCode command palette.


vue3 项目实践

设置别名

vite.config.js 文件中无法使用 require 如果我们使用的是typeScript2.x,则需要通过安装@types/node 来解决

集成 vuex

集成 vue-router

关于 vue3 的代码校验

语法风格检测:ESLint+Prettier

Vue3.0 的项目中如何使用 ESLint 和 Prettier 对代码风格进行约束。 首先安装这几个包:

eslint代码质量检测(用 var 还是 let,用==还是===...) prettier代码风格检测(加不加尾逗号,单引号还是双引号...) eslint-config-prettier解决 ESLint 与 Prettier 的风格冲突 eslint-plugin-prettierESLint 的插件,集成 Prettier 的功能 eslint-plugin-vueESLint 的插件,增加 Vue 的检测能力 @typescript-eslint/eslint-plugin

Git Message 提交规范:Angular 提交规范

https://blog.csdn.net/Ed7zgeE9X/article/details/118097302 test

https://www.cnblogs.com/ypSharing/p/15304219.html#1%E3%80%81vite%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published