Skip to content

vue3+ts+vite后台管理项目,ui组件库:element plus,能作为后台管理项目业务模板使用

Notifications You must be signed in to change notification settings

SnakeLil/vue3-admin-template

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

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

笔记

  1. 配置不同环境下的env文件 .env.development

开发环境下的配置文件

#变量必须以 VITE_为前缀才能暴露给外部读取 NODE_ENV = 'development' VITE_APP_TITLE = 'vue-admin-dev' VITE_APP_BASE_API ='/dev-api' VITE_SERVE = 'https://xxx.com' 再package.json中配置 "build:test": "vue-tsc && vite build --mode test", "build:pro":"vue-tsc && vite build --mode production"

通过:import.meta.env,即可获取到该环境下的env文件中的数据

svg使用

通过:

bug :

vue-admin\vue-admin-template\src\views\product\spu\skuForm.vue, 请求无法添加成功,估计是接口问题

About

vue3+ts+vite后台管理项目,ui组件库:element plus,能作为后台管理项目业务模板使用

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published