# Universal_Template **Repository Path**: template-warehouse/Universal_Template ## Basic Information - **Project Name**: Universal_Template - **Description**: Universal_Template - **Primary Language**: JavaScript - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-13 - **Last Updated**: 2025-11-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Universal_Template ## 账号和密码 > - 除`uniapp`版本外,所有版本账号密码均为统一的 > - `超级管理员`账号:admin 密码:123456 > - `普通用户`账号:zhangsan 密码:zhangsan > - `uniapp`使用微信授权登录 均为`超级管理员` ## vscStting > - 常用的代码片段 ## 前端通用模版 ### my-react-app #### React模板 ##### 技术栈 - React 1. Create-React-App 脚手架 2. React-Router-Dom 路由 3. Antd UI 组件库 4. React-Redux和Redux-toolkit 状态管理 5. Axios 封装请求 6. Webpack 构建工具 7. Eslint 代码规范 8. Prettier 代码美化 9. Husky 代码提交规范 10. Mock 模拟数据 11. Echarts 图表 ### my-vue2-app #### Vue2模板 ##### 技术栈 - Vue2 1. vue-cli脚手架 2. vue-router 路由 3. element-ui 组件库 4. vuex 状态管理 5. Axios 封装请求 6. Webpack 构建工具 7. Eslint 代码规范 8. Prettier 代码美化 9. Mock 模拟数据 10. Echarts 图表 ### my-vue3-app #### Vue3模板 ##### 技术栈 - Vue3 1. vite 脚手架 2. vue-router 路由 3. ElementPlus 组件库 4. Pinia状态管理 5. Axios 封装请求 6. Vite 构建工具 7. Eslint 代码规范 8. Prettier 代码美化 9. Mock 模拟数据 10. Echarts 图表 ### my-vue3-ts-app #### Vue3+ts模板 ##### 技术栈 - Vue3 1. vite 脚手架 2. vue-router 路由 3. ElementPlus 组件库 4. Pinia状态管理 5. Axios 封装请求 6. Vite 构建工具 7. Eslint 代码规范 8. Prettier 代码美化 9. Mock 模拟数据 10. Echarts 图表 ##### 关于完整的tsconfig.json说明 ```json { // 项目配置 "compilerOptions": { // 基本选项 "target": "ESNext", // 指定 ECMAScript 目标版本,可选值: ES3, ES5, ES6/ES2015, ES2016, ES2017, ES2018, ES2019, ES2020, ES2021, ES2022, ESNext "module": "ESNext", // 指定模块系统,可选值: None, CommonJS, AMD, UMD, System, ES6/ES2015, ES2020, ESNext "lib": ["ESNext", "DOM"], // 指定要包含的库文件,可选值: ES5, ES6, ES2015, ES7, ES2016, ES2017, ES2018, ES2019, ES2020, ES2021, ES2022, ESNext, DOM, DOM.Iterable, WebWorker, ScriptHost "jsx": "react-jsx", // 指定 JSX 代码生成,可选值: preserve, react-native, react, react-jsx, react-jsxdev "moduleResolution": "Node", // 指定模块解析策略,可选值: Node (Node.js 风格), Classic (TypeScript 旧版风格) "baseUrl": ".", // 用于解析非相对模块名称的基础目录 "paths": { // 模块名到基于 baseUrl 的路径映射,用于创建别名 "@/*": ["src/*"] }, "rootDir": "./src", // 指定输入文件的根目录,用于控制输出目录结构 "outDir": "./dist", // 指定编译输出目录 "removeComments": true, // 移除注释,可选值: true, false // 严格类型检查选项 "strict": true, // 启用所有严格类型检查选项,可选值: true, false "noImplicitAny": true, // 不允许隐式的 any 类型,可选值: true, false "strictNullChecks": true, // 启用严格的 null 检查,可选值: true, false "strictFunctionTypes": true, // 启用严格的函数类型检查,可选值: true, false "strictBindCallApply": true, // 启用严格的 bind/call/apply 方法检查,可选值: true, false "strictPropertyInitialization": true, // 启用严格的属性初始化检查,可选值: true, false "noImplicitThis": true, // 不允许隐式的 this 类型,可选值: true, false "alwaysStrict": true, // 以严格模式解析并为每个源文件生成 "use strict",可选值: true, false // 额外检查 "noUnusedLocals": true, // 报告未使用的局部变量,可选值: true, false "noUnusedParameters": true, // 报告未使用的参数,可选值: true, false "noImplicitReturns": true, // 函数没有返回值时报告错误,可选值: true, false "noFallthroughCasesInSwitch": true, // 禁止 switch 语句贯穿,可选值: true, false "noUncheckedIndexedAccess": true, // 索引访问时不允许 undefined 类型,可选值: true, false // 模块选项 "esModuleInterop": true, // 支持 CommonJS 和 ES 模块之间的互操作性,可选值: true, false "allowSyntheticDefaultImports": true, // 允许从没有默认导出的模块中默认导入,可选值: true, false "skipLibCheck": true, // 跳过库文件的类型检查,可选值: true, false "forceConsistentCasingInFileNames": true // 强制文件名大小写一致,可选值: true, false }, // 包含的文件 "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.json"], // 支持 glob 模式 // 排除的文件 "exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"], // 支持 glob 模式 // 引用其他 tsconfig 文件 "references": [ { "path": "./tsconfig.server.json" } // 用于项目拆分和构建顺序控制 ], // 编译选项(非 TypeScript 官方选项) "pnpm": { "onlyBuiltDependencies": ["esbuild"] // pnpm 特定选项,允许 esbuild 运行构建脚本 } } ```