docs: readme

This commit is contained in:
WANGFAN\wangf 2025-04-11 15:47:42 +08:00
parent 2e90b3836f
commit 210d33c9c2
3 changed files with 17 additions and 16 deletions

View File

@ -60,19 +60,20 @@ SnowAdmin 是一个清新优雅、高颜值且功能强大的后台管理模板
### 项目功能 🔨 ### 项目功能 🔨
- 清晰的项目架构:结构清晰,优雅易懂,代码全注释。 - 清晰的项目架构:结构清晰,优雅易懂,代码全注释
- 前沿技术应用:采用 Vue3, Vite5, TypeScript等最新流行的技术栈。 - 前沿技术应用:采用 Vue3, Vite5, TypeScript等最新流行的技术栈
- 内置RBAC角色权限模型实现路由、角色、按钮权限访问控制
- 使用 Pinia 替代 Vuex轻量、简单、易用集成 Pinia 持久化插件 - 使用 Pinia 替代 Vuex轻量、简单、易用集成 Pinia 持久化插件
- 支持 Arco-Design 组件大小切换、多主题布局、暗黑模式、i18n 国际化 - 支持 Arco-Design 组件大小切换、多主题布局、暗黑模式、i18n 国际化
- 使用 VueRouter 配置动态路由权限拦截、路由懒加载,支持页面按钮权限控制 - 使用 VueRouter 配置动态路由权限拦截、路由懒加载,支持页面按钮权限控制
- 使用 KeepAlive 对页面进行缓存,支持多级嵌套路由缓存 - 使用 KeepAlive 对页面进行缓存,支持多级嵌套路由缓存
- 使用 Prettier 统一格式化代码,集成 ESLint、Stylelint 代码校验规范 - 使用 Prettier 统一格式化代码,集成 ESLint、Stylelint 代码校验规范
- 使用 husky、lint-staged、commitlint等插件规范提交信息 - 使用 husky、lint-staged、commitlint等插件规范提交信息
- 丰富的页面组件:内置多样页面和组件,包括 401、404、500 页面,以及布局组件、标签组件、主题配置组件等 - 丰富的页面组件:内置多样页面和组件,包括 401、404、500 页面,以及布局组件、标签组件、主题配置组件等
### 环境准备 🏝️ ### 环境准备 🏝️
确保你的环境满足以下要求: 确保你的环境满足以下要求(重要)
- **git**: 你需要 git 来克隆和管理项目版本。 - **git**: 你需要 git 来克隆和管理项目版本。
- **NodeJS**: >=18.12.0,推荐 20.12.0 或更高。 - **NodeJS**: >=18.12.0,推荐 20.12.0 或更高。
@ -138,7 +139,8 @@ SnowAdmin
│ ├─ assets # 静态资源文件 │ ├─ assets # 静态资源文件
│ ├─ components # 全局组件 │ ├─ components # 全局组件
│ ├─ config # 全局配置项 │ ├─ config # 全局配置项
│ ├─ directives # 全局指令文件 │ ├─ directives # 全局自定义指令文件
│ ├─ globals # 全局函数
│ ├─ hooks # 常用 Hooks 封装 │ ├─ hooks # 常用 Hooks 封装
│ ├─ lang # 语言国际化 i18n │ ├─ lang # 语言国际化 i18n
│ ├─ layout # 框架布局模块 │ ├─ layout # 框架布局模块
@ -153,7 +155,7 @@ SnowAdmin
│ ├─ main.ts # 项目入口文件 │ ├─ main.ts # 项目入口文件
│ └─ vite-env.d.ts # 指定 ts 识别 vue │ └─ vite-env.d.ts # 指定 ts 识别 vue
├─ .editorconfig # 代码编辑器配置文件 ├─ .editorconfig # 代码编辑器配置文件
├─ .env # vite 常用配置 ├─ .env # 通用环境配置
├─ .env.development # 开发环境配置 ├─ .env.development # 开发环境配置
├─ .env.production # 生产环境配置 ├─ .env.production # 生产环境配置
├─ .env.test # 测试环境配置 ├─ .env.test # 测试环境配置
@ -185,10 +187,6 @@ SnowAdmin
| :---------------------------------------------: | :-----------------------------------------------: | :--------------------------------------------------: | :-------------------------------------------------: | :-------------------------------------------------: | | :---------------------------------------------: | :-----------------------------------------------: | :--------------------------------------------------: | :-------------------------------------------------: | :-------------------------------------------------: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions | | not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
<!-- ### 项目后台接口 🧩
建设中 -->
### 鸣谢列表 🧩 ### 鸣谢列表 🧩
- [vuehttps://v3.cn.vuejs.org/](https://v3.cn.vuejs.org/) - [vuehttps://v3.cn.vuejs.org/](https://v3.cn.vuejs.org/)
@ -203,8 +201,11 @@ SnowAdmin
- [print-jshttps://github.com/crabbly/Print.js](https://github.com/crabbly/Print.js) - [print-jshttps://github.com/crabbly/Print.js](https://github.com/crabbly/Print.js)
- [eslinthttps://github.com/eslint/eslint](https://github.com/eslint/eslint) - [eslinthttps://github.com/eslint/eslint](https://github.com/eslint/eslint)
- [prettierhttps://github.com/prettier/prettier](https://github.com/prettier/prettier) - [prettierhttps://github.com/prettier/prettier](https://github.com/prettier/prettier)
- [arco-designhttps://arco.design/ - [arco.designhttps://arco.design/](https://arco.design/)
- [](https://arco.design/) - [pinyin-prohttps://github.com/zh-lx/pinyin-pro](https://github.com/zh-lx/pinyin-pro)
- [qrcodehttps://www.npmjs.com/package/qrcode](https://www.npmjs.com/package/qrcode)
- [jsbarcodehttps://github.com/lindell/JsBarcode/wiki/Options](https://github.com/lindell/JsBarcode/wiki/Options)
- [fingerprintjs2https://www.npmjs.com/package/fingerprintjs2](https://www.npmjs.com/package/fingerprintjs2)
### 特别鸣谢 🎉 ### 特别鸣谢 🎉

View File

@ -29,11 +29,11 @@ const i18n = createI18n({
/** /**
* @param { string } str key * @param { string } str key
* @returns "menu.home" => "home" * @returns "menu.home" => "home"
*/ */
function removeBeforeFirstDot(str: string) { function removeBeforeFirstDot(str: string) {
const dotIndex = str.indexOf("."); const dotIndex = str.indexOf(".");
return dotIndex >= 0 ? str.slice(dotIndex + 1) : "未定义"; return dotIndex >= 0 ? str.slice(dotIndex + 1) : str;
} }
export default i18n; export default i18n;

View File

@ -22,7 +22,7 @@
* *
* meta对象参数meta对象中 * meta对象参数meta对象中
* meta: { * meta: {
* title: 国际化key * title: 国际化keyKey则直接展示
* hide: 是否隐藏此路由访 * hide: 是否隐藏此路由访
* disable: 是否停用此路由-访 * disable: 是否停用此路由-访
* keepAlive: 是否缓存组件 * keepAlive: 是否缓存组件
@ -51,7 +51,7 @@ export const systemMenu = [
name: "home", // 路由name name: "home", // 路由name
component: "home/home", // 路由跳转的文件路径默认在src/views内这里就是src/views/home/home.vue component: "home/home", // 路由跳转的文件路径默认在src/views内这里就是src/views/home/home.vue
meta: { meta: {
title: "home", // 国际化key title: "home", // 国际化key无对应Key则直接展示
hide: false, // 是否隐藏此路由-不显示但可访问 hide: false, // 是否隐藏此路由-不显示但可访问
disable: false, // 是否停用此路由-不显示且不可访问 disable: false, // 是否停用此路由-不显示且不可访问
keepAlive: false, // 是否缓存组件 keepAlive: false, // 是否缓存组件