目录
目录README.md

vue-ts-demo

This template should help get you started developing with Vue 3 in Vite.

VS Code + Vue (Official) (and disable Vetur).

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 Volar to make the TypeScript language service aware of .vue types.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint

以下是项目结构

public # 暂定 dist #编译部署文件 src/ ├── components/ # 公共组件 │ ├── ui/ # 基础UI组件 │ ├── business/ # 业务组件 │ └── index.ts # 组件导出 ├── composables/ # 组合式函数 ├── views/ # 页面组件 ├── stores/ # 状态管理 ├── types/ # 类型定义 │ ├── api/ │ ├── business/ │ ├── component/ │ ├── common/ │ └── index.ts # 类型统一导出 ├── utils/ # 工具函数 ├── api/ # API 接口 ├── router/ # 路由配置 ├── assets/ # 静态资源 └── App.vue

命名规范

组件文件:大驼峰 类型定义:大驼峰

工具函数/工具类:小驼峰 组合式函数:小驼峰 + “use” 前缀 Store/状态管理:小驼峰

api 定义规范 http

认证授权

POST /api/v1/auth/login POST /api/v1/auth/refresh POST /api/v1/auth/logout POST /api/v1/auth/password-reset POST /api/v1/auth/mfa/verify

用户管理

GET /api/v1/users POST /api/v1/users # 注册 GET /api/v1/users/{id} PUT /api/v1/users/{id} DELETE /api/v1/users/{id}

权限管理

GET /api/v1/roles POST /api/v1/roles GET /api/v1/permissions

关于

学习用

136.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号