{"id":21090307,"url":"https://github.com/xinlc/uniapp-vue3-ts-template","last_synced_at":"2025-04-13T00:55:28.777Z","repository":{"id":61385802,"uuid":"549944206","full_name":"xinlc/uniapp-vue3-ts-template","owner":"xinlc","description":"uni-app + Vue3 + Vite3 + Pinia + TypeScript + UnoCSS 基础框架","archived":false,"fork":false,"pushed_at":"2023-10-27T03:11:42.000Z","size":11921,"stargazers_count":32,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T00:55:01.762Z","etag":null,"topics":["typescript","uniapp","unocss","vue"],"latest_commit_sha":null,"homepage":"","language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xinlc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-12T01:16:14.000Z","updated_at":"2025-03-31T01:33:50.000Z","dependencies_parsed_at":"2025-01-21T01:21:47.477Z","dependency_job_id":null,"html_url":"https://github.com/xinlc/uniapp-vue3-ts-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinlc%2Funiapp-vue3-ts-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinlc%2Funiapp-vue3-ts-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinlc%2Funiapp-vue3-ts-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinlc%2Funiapp-vue3-ts-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xinlc","download_url":"https://codeload.github.com/xinlc/uniapp-vue3-ts-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650438,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["typescript","uniapp","unocss","vue"],"created_at":"2024-11-19T21:35:24.878Z","updated_at":"2025-04-13T00:55:28.747Z","avatar_url":"https://github.com/xinlc.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"uni-app Vue3 Vite3 Pinia TypeScript 基础框架\n===\n\n## 特性\n\n- **最新技术栈**：使用 Vue3/Vite3/Pinia/TypeScript/Windicss/Unocss 等前端前沿技术开发;\n- **Eslint/Prettier**：规范代码格式，统一编码;\n- **路由拦截**：基于 uni.addInterceptor 进行路由拦截;\n- **请求拦截**：核心使用 [luch-request](https://github.com/lei-mu/luch-request)，支持请求和响应拦截等;\n- **缓存加密**：使用AES加密缓存，可设置区分在开发或生成环境中是否加密;\n- **自动导入**：自动导入 vue3 的 hooks 等。\n\n## 目录结构\n\n```shell\n├── mock              # mockjs\n├── src\n│  ├── api            # 接口相关\n│  │  ├── models      # 数据模型\n│  │  ├── auth.ts\n│  │  └── ...\n│  ├── assets         # 静态资源目录，css、less/scss 等资源不要放在 static 目录下\n│  ├── components     # 组件目录\n│  │  ├── AppProvider\n│  │  └── ...\n│  ├── config         # 配置相关\n│  │  ├── app.ts\n│  │  └── encryptionConfig.ts\n│  ├── enums          # 枚举/常量\n│  │  ├── appEnum.ts\n│  │  └── ...\n│  ├── language        # i18n\n│  │  ├── lang\n│  │  └── index.ts\n│  ├── pages           # 页面\n│  │  ├── about\n│  │  └── ...\n│  ├── pagesA          # 子页面(拆包)\n│  │  └── list\n│  ├── stores           # state 状态管理模式(pinia)\n│  │  ├── modules\n│  │  └── index.ts\n│  ├── static          # 静态文件静态公共文件\n│  │  ├── images\n│  │  └── ...\n│  ├── types           # 类型文件\n│  ├── uni_modules     # uni 组件库\n│  ├── utils           # 工具类\n│  │  ├── cache        # 缓存相关目录\n│  │  ├── http         # request相关目录\n│  │  ├── interceptors # 拦截器相关目录\n│  │  └── ...\n│  ├── wxcomponents    # 微信小程序组件\n│  ├── App.vue\n│  ├── env.d.ts\n│  ├── main.ts\n│  ├── manifest.json\n│  ├── pages.json\n│  └── uni.scss\n├── .editorconfig\n├── .env\n├── .env.development\n├── .env.production\n├── .env.staging\n├── .eslintignore\n├── .eslintrc.js\n├── .gitignore\n├── .npmrc\n├── .prettierignore\n├── .prettierrc.js\n├── LICENSE\n├── README.md\n├── favicon.ico\n├── index.html\n├── package-lock.json\n├── package.json\n├── tsconfig.json\n└── vite.config.ts\n\n```\n\n## 安装使用\n\n- 安装依赖\n\n```bash\n# nodejs v18.12.x\nnpx degit xinlc/uniapp-vue3-ts-template my-project\n\ncd my-project\n\npnpm install\n```\n\n- 运行\n\n```bash\n# 其他端请查看 package.json script\n\n# h5 or npm run xxx\npnpm dev:h5\n\n# 微信小程序, 生成的包在 dist/dev/mp-weixin 下，用微信开发者工具打开\npnpm dev:mp-weixin\n```\n\n- 打包\n\n```bash\n# 其他端请查看 package.json script\npnpm build:h5\n```\n\n## 开发工具\n\n### VsCode 插件\n\n- volar\n- ESLint\n- prettier\n- UnoCSS\n\n## Git 提交规范\n\n- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))\n\n  - `feat` 增加新功能\n  - `fix` 修复问题/BUG\n  - `style` 代码风格相关无影响运行结果的\n  - `perf` 优化/性能提升\n  - `refactor` 重构\n  - `revert` 撤销修改\n  - `test` 测试相关\n  - `docs` 文档/注释\n  - `chore` 依赖更新/脚手架配置修改等\n  - `workflow` 工作流改进\n  - `ci` 持续集成\n  - `types` 类型定义文件更改\n  - `wip` 开发中\n  \n## 参考资料\n\n- [uni-app Vue3 Vite3 TypeScript 基础框架](https://gitee.com/h_mo/uniapp-vue3-vite3-ts-template) - 基于该项目进行修改\n- [uni-app](https://github.com/dcloudio/uni-app) - 跨平台框架\n- [Vue3](https://github.com/vuejs/) - Vue3\n- [Vite](https://github.com/vitejs/vite) - 构建工具\n- [Pinia](https://github.com/vuejs/pinia) - 状态管理（代替 Vuex)\n- [TypeScript](https://github.com/microsoft/TypeScript) - TS\n- [luch-request](https://github.com/lei-mu/luch-request) - API 请求库\n- [Windi CSS](https://github.com/windicss/windicss) - ACSS 框架\n- [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import) - 自动导入\n- [UnoCSS](https://github.com/unocss/unocss) - 原子 CSS 引擎。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinlc%2Funiapp-vue3-ts-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxinlc%2Funiapp-vue3-ts-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinlc%2Funiapp-vue3-ts-template/lists"}