From c53f41c4eeb824b76ec11029724ed408a335674b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E9=A9=AC?= <2547096351@qq.com>
Date: Thu, 25 Jul 2024 07:58:11 +0000
Subject: [PATCH 1/7] update README.md.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 王马 <2547096351@qq.com>
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 17a3f4d..0059fab 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ SnowAdmin 一款基于 Vue3、TypeScript、Vite5、Pinia、Arco-Design 开源的
- 项目更新日志:建设中
-- 项目文档地址:建设中
+- 项目文档地址:http://101.126.93.137:81/
### 项目功能 🔨
From e84ed2653be6322a457e343cf3e7a76e58b960d6 Mon Sep 17 00:00:00 2001
From: wf <2547096351@qq.com>
Date: Thu, 25 Jul 2024 18:46:47 +0800
Subject: [PATCH 2/7] =?UTF-8?q?docs:=20=E6=B3=A8=E9=87=8A=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/router/index.ts | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/router/index.ts b/src/router/index.ts
index c0a3c7a..941269c 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -29,10 +29,11 @@ const router = createRouter({
/**
* 路由加载前需要判断用户是否登录
- * 1、去登录页,无token,放行
- * 2、没有token,直接重定向到登录页
- * 3、去登录页,有token,直接重定向到home页
- * 4、去非登录页,有token,校验是否动态添加过路由,添加过则放行,未添加则执行路由初始化
+ * 1、是否有网络,有则放行,没有则跳转500,提示网络断开
+ * 2、去登录页,无token,放行
+ * 3、没有token,直接重定向到登录页
+ * 4、去登录页,有token,直接重定向到home页
+ * 5、去非登录页,有token,校验是否动态添加过路由,添加过则放行,未添加则执行路由初始化
* 注意:
* 全局routeTree不能持久化缓存
* 页面刷新会导致addRoute动态添加的路由失效,需要重新初始化路由
From fdfadd003c30404e2697ab0d2fdbba2863e8b492 Mon Sep 17 00:00:00 2001
From: wf <2547096351@qq.com>
Date: Fri, 26 Jul 2024 14:56:10 +0800
Subject: [PATCH 3/7] feat: README
---
README.md | 152 +++++++++++-------
.../test-instruction/test-instruction.vue | 12 +-
src/views/home/home.vue | 5 +
3 files changed, 109 insertions(+), 60 deletions(-)
diff --git a/README.md b/README.md
index 0059fab..83a5212 100644
--- a/README.md
+++ b/README.md
@@ -2,94 +2,85 @@
### 介绍 📖
-SnowAdmin 一款基于 Vue3、TypeScript、Vite5、Pinia、Arco-Design 开源的后台管理框架,符合直觉的使用模式,使用目前最新技术栈开发。项目提供了一些常用组件,在一定程度上提高您的开发效率。另外本项目还封装了一些常用组件、Hooks、动态路由等功能。
+SnowAdmin 是一个清新优雅、高颜值且功能强大的后台管理模板,基于最新的前端技术栈,包括 Vue3, Vite5, TypeScript, Pinia。它内置了丰富的主题配置和组件,代码规范严谨,实现了自动化的文件路由系统。SnowAdmin 为您提供了一站式的后台管理解决方案,无需额外配置,开箱即用。同样是一个快速学习前沿技术的最佳实践。
-### 在线预览 👀
+### 版本
-- 链接:建设中
-
-### 代码仓库 ⭐
-
-- Gitee:https://gitee.com/wang_fan_w/SnowAdmin
-
-### 项目文档 📚
-
-- 项目更新日志:建设中
-
-- 项目文档地址:http://101.126.93.137:81/
+SnowAdmin
+- [项目预览地址](http://101.126.93.137/#/login)
+- [项目文档地址](http://101.126.93.137:81/)
+- [Gitee 仓库](https://gitee.com/wang_fan_w/SnowAdmin)
+- [Github 仓库](https://github.com/Rabbit-ice/SnowAdmin)
### 项目功能 🔨
+- 清晰的项目架构:结构清晰,优雅易懂。
+- 前沿技术应用:采用 Vue3, Vite5, TypeScript, Pinia 等最新流行的技术栈。
- 使用 Vue3 + TypeScript 开发,单文件组件**<script setup>**
- 采用 Vite5 作为项目开发
- 使用 Pinia 替代 Vuex,轻量、简单、易用,集成 Pinia 持久化插件
-- 使用 TypeScript 对 Axios 整个二次封装(请求拦截、取消、常用请求封装…)
+- TypeScript: 支持严格的类型检查,提高代码的可维护性。
- 支持 Arco-Design 组件大小切换、多主题布局、暗黑模式、i18n 国际化
- 使用 VueRouter 配置动态路由权限拦截、路由懒加载,支持页面按钮权限控制
- 使用 KeepAlive 对页面进行缓存,支持多级嵌套路由缓存
- 使用 Prettier 统一格式化代码,集成 ESLint、Stylelint 代码校验规范
- 使用 husky、lint-staged、commitlint等插件,规范提交信息
+- 丰富的页面组件:内置多样页面和组件,包括 401、404、500 页面,以及布局组件、标签组件、主题配置组件等。
-### 项目预览📷
+### 环境准备
-
+确保你的环境满足以下要求:
-
-
-
-
-
-
-
-
-
-
-
-
-
+- **git**: 你需要 git 来克隆和管理项目版本。
+- **NodeJS**: >=18.12.0,推荐 20.12.0 或更高。
+- **pnpm**: >= 8.7.0,推荐最新版本。
### 安装使用步骤 📔
-- **Clone:**
+### 从 GitHub 获取代码
-```text
-# Gitee
+建设中
+
+### 从 Gitee 获取代码
+
+```bash
+# 克隆代码
git clone https://gitee.com/wang_fan_w/SnowAdmin.git
```
-- **Install:**
+::: warning 注意
+最新版本的代码以 gitee 为准。
+:::
-```text
+### 安装依赖
+
+安装项目依赖
+
+```bash
pnpm install
```
-- **Run:**
+## 插件配置
-```text
-pnpm dev
-```
+### 安装 Vue - Official,禁用 Vetur
-- **Build:**
+- [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) - Vue 服务插件
-```text
-# 开发环境
-pnpm run dev
+## npm scripts
-# 测试环境
-pnpm run preview
-
-# 生产环境
-pnpm run build
-```
-
-- **Lint:**
-
-```text
-# eslint 检测代码
-pnpm lint:eslint
-
-# prettier 格式化代码
-pnpm lint:prettier
+```json
+{
+ // 开发环境启动
+ "dev": "vite",
+ // 开发环境构建
+ "build:dev": "vue-tsc && vite build --mode development",
+ // 生产环境构建
+ "build:prod": "vue-tsc && vite build --mode production",
+ // 测试环境构建
+ "build:test": "vue-tsc && vite build --mode test",
+ // 预览环境启动
+ "preview": "vite preview",
+}
```
### 文件资源目录 📚
@@ -144,6 +135,49 @@ SnowAdmin
| :---------------------------------------------: | :-----------------------------------------------: | :--------------------------------------------------: | :-------------------------------------------------: | :-------------------------------------------------: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
-### 项目后台接口 🧩
+
+
+
+## 鸣谢列表
+
+- [vue:https://v3.cn.vuejs.org/](https://v3.cn.vuejs.org/)
+- [axios:https://github.com/axios/axios](https://github.com/axios/axios)
+- [nprogress:https://github.com/rstacruz/nprogress](https://github.com/rstacruz/nprogress)
+- [sortablejs:https://github.com/SortableJS/Sortabl](https://github.com/SortableJS/Sortable)
+- [sass:https://github.com/sass/sass](https://github.com/sass/sass)
+- [typescript:https://github.com/microsoft/TypeScript](https://github.com/microsoft/TypeScript)
+- [vite:https://github.com/vitejs/vite](https://github.com/vitejs/vite)
+- [wangeditor:https://github.com/wangeditor-team/wangEditor](https://github.com/wangeditor-team/wangEditor)
+- [qrcodejs:https://github.com/davidshimjs/qrcodejs](https://github.com/davidshimjs/qrcodejs)
+- [print-js:https://github.com/crabbly/Print.js](https://github.com/crabbly/Print.js)
+- [eslint:https://github.com/eslint/eslint](https://github.com/eslint/eslint)
+- [prettier:https://github.com/prettier/prettier](https://github.com/prettier/prettier)
+- [arco-design:https://arco.design/](https://arco.design/)
+
+## 特别鸣谢
+
+- [vue-next-admin:http://vuenextadmin.ccfast.cc/](http://vuenextadmin.ccfast.cc/)
+- [Gi-admin:https://lin-97.github.io/gi-demo/](https://lin-97.github.io/gi-demo/#/home)
+- [Geeker-Admin:https://admin.spicyboy.cn/](https://admin.spicyboy.cn/#/home/index)
+
+感谢以上框架为本项目提供了帮助,项目中的很多设计思想值得参考和学习,再次感谢。
+
+## 支持作者
+
+如果觉得框架不错,或者已经在使用了,希望你可以去 [Github](https://github.com/Rabbit-ice?tab=projects) 或者 [Gitee](https://gitee.com/wang_fan_w/SnowAdmin) 帮我点个 ⭐ Star,这将是对我极大的鼓励与支持。
+
+## 免责条款
+
+您充分了解并同意,您必须为自己使用本服务及注册帐号下的一切行为负责,包括您所发表的任何内容以及由此产生的任何后果。您应对本服务中的内容自行加以判断,并自行承担因使用内容而引起的所有风险。
+
+`SnowAdmin` 对网站上所显示的信息或资料的准确性、内容、完整性、合法性、可靠性、可操作性或可用性不承担任何责任。
+
+`SnowAdmin` 二次开发使用者因为违法而触犯中华人民共和国法律的,一切后果自己负责,`SnowAdmin` 作者不承担任何责任。
+
+本声明未涉及的问题参见国家有关法律法规,当本声明与国家法律法规冲突时,以国家法律法规为准。
+
+## 学习 & 商用
+
+`SnowAdmin` 是免费和开源的,可免费用于 学习、商业使用 。
\ No newline at end of file
diff --git a/src/views/custom-instruction/test-instruction/test-instruction.vue b/src/views/custom-instruction/test-instruction/test-instruction.vue
index 941b54f..5302b20 100644
--- a/src/views/custom-instruction/test-instruction/test-instruction.vue
+++ b/src/views/custom-instruction/test-instruction/test-instruction.vue
@@ -1,7 +1,8 @@
- 测试指令
+
+
@@ -21,6 +22,15 @@
// const getFun = (e: any) => {
// console.log("点击事件", e);
// };
+const router = useRouter();
+const jump = () => {
+ router.push({
+ path: "/home",
+ query: {
+ name: "张三"
+ }
+ });
+};
diff --git a/src/views/home/home.vue b/src/views/home/home.vue
index bef0644..230c547 100644
--- a/src/views/home/home.vue
+++ b/src/views/home/home.vue
@@ -16,6 +16,11 @@ import Shortcut from "@/views/home/components/shortcut.vue";
import TargetBox from "@/views/home/components/target-box.vue";
import Finance from "@/views/home/components/finance.vue";
import DataBox from "@/views/home/components/data-box.vue";
+
+const route = useRoute();
+onMounted(() => {
+ console.log("初始化", route);
+});
From b68205ce81129478a41b582f857a13c4b7ff508d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E9=A9=AC?= <2547096351@qq.com>
Date: Fri, 26 Jul 2024 06:58:19 +0000
Subject: [PATCH 4/7] update README.md.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 王马 <2547096351@qq.com>
---
README.md | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 83a5212..3cce414 100644
--- a/README.md
+++ b/README.md
@@ -48,9 +48,8 @@ SnowAdmin
git clone https://gitee.com/wang_fan_w/SnowAdmin.git
```
-::: warning 注意
-最新版本的代码以 gitee 为准。
-:::
+> 注意: 最新版本的代码以 gitee 为准。
+
### 安装依赖
@@ -180,4 +179,4 @@ SnowAdmin
## 学习 & 商用
-`SnowAdmin` 是免费和开源的,可免费用于 学习、商业使用 。
\ No newline at end of file
+`SnowAdmin` 是免费和开源的,可免费用于学习、商业使用 。
\ No newline at end of file
From 59ccbb0a208227b9b72daff9d462a5a84424bb30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E9=A9=AC?= <2547096351@qq.com>
Date: Fri, 26 Jul 2024 07:04:40 +0000
Subject: [PATCH 5/7] update README.md.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 王马 <2547096351@qq.com>
---
README.md | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index 3cce414..35d6f6d 100644
--- a/README.md
+++ b/README.md
@@ -14,12 +14,9 @@ SnowAdmin
### 项目功能 🔨
-- 清晰的项目架构:结构清晰,优雅易懂。
-- 前沿技术应用:采用 Vue3, Vite5, TypeScript, Pinia 等最新流行的技术栈。
-- 使用 Vue3 + TypeScript 开发,单文件组件**<script setup>**
-- 采用 Vite5 作为项目开发
+- 清晰的项目架构:结构清晰,优雅易懂,代码全注释。
+- 前沿技术应用:采用 Vue3, Vite5, TypeScript等最新流行的技术栈。
- 使用 Pinia 替代 Vuex,轻量、简单、易用,集成 Pinia 持久化插件
-- TypeScript: 支持严格的类型检查,提高代码的可维护性。
- 支持 Arco-Design 组件大小切换、多主题布局、暗黑模式、i18n 国际化
- 使用 VueRouter 配置动态路由权限拦截、路由懒加载,支持页面按钮权限控制
- 使用 KeepAlive 对页面进行缓存,支持多级嵌套路由缓存
@@ -59,13 +56,13 @@ git clone https://gitee.com/wang_fan_w/SnowAdmin.git
pnpm install
```
-## 插件配置
+### 插件配置
### 安装 Vue - Official,禁用 Vetur
- [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) - Vue 服务插件
-## npm scripts
+### npm scripts
```json
{
@@ -139,7 +136,7 @@ SnowAdmin
建设中 -->
-## 鸣谢列表
+### 鸣谢列表
- [vue:https://v3.cn.vuejs.org/](https://v3.cn.vuejs.org/)
- [axios:https://github.com/axios/axios](https://github.com/axios/axios)
@@ -155,7 +152,7 @@ SnowAdmin
- [prettier:https://github.com/prettier/prettier](https://github.com/prettier/prettier)
- [arco-design:https://arco.design/](https://arco.design/)
-## 特别鸣谢
+### 特别鸣谢
- [vue-next-admin:http://vuenextadmin.ccfast.cc/](http://vuenextadmin.ccfast.cc/)
- [Gi-admin:https://lin-97.github.io/gi-demo/](https://lin-97.github.io/gi-demo/#/home)
@@ -163,11 +160,11 @@ SnowAdmin
感谢以上框架为本项目提供了帮助,项目中的很多设计思想值得参考和学习,再次感谢。
-## 支持作者
+### 支持作者
如果觉得框架不错,或者已经在使用了,希望你可以去 [Github](https://github.com/Rabbit-ice?tab=projects) 或者 [Gitee](https://gitee.com/wang_fan_w/SnowAdmin) 帮我点个 ⭐ Star,这将是对我极大的鼓励与支持。
-## 免责条款
+### 免责条款
您充分了解并同意,您必须为自己使用本服务及注册帐号下的一切行为负责,包括您所发表的任何内容以及由此产生的任何后果。您应对本服务中的内容自行加以判断,并自行承担因使用内容而引起的所有风险。
@@ -177,6 +174,6 @@ SnowAdmin
本声明未涉及的问题参见国家有关法律法规,当本声明与国家法律法规冲突时,以国家法律法规为准。
-## 学习 & 商用
+### 学习 & 商用
`SnowAdmin` 是免费和开源的,可免费用于学习、商业使用 。
\ No newline at end of file
From 0ac63853a4c78c720b8ae1489cc75ab8d4af53f1 Mon Sep 17 00:00:00 2001
From: wf <2547096351@qq.com>
Date: Fri, 26 Jul 2024 16:37:45 +0800
Subject: [PATCH 6/7] docs: README
---
README.md | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
index 35d6f6d..1d652e4 100644
--- a/README.md
+++ b/README.md
@@ -4,9 +4,10 @@
SnowAdmin 是一个清新优雅、高颜值且功能强大的后台管理模板,基于最新的前端技术栈,包括 Vue3, Vite5, TypeScript, Pinia。它内置了丰富的主题配置和组件,代码规范严谨,实现了自动化的文件路由系统。SnowAdmin 为您提供了一站式的后台管理解决方案,无需额外配置,开箱即用。同样是一个快速学习前沿技术的最佳实践。
-### 版本
+### 版本 📦
SnowAdmin
+
- [项目预览地址](http://101.126.93.137/#/login)
- [项目文档地址](http://101.126.93.137:81/)
- [Gitee 仓库](https://gitee.com/wang_fan_w/SnowAdmin)
@@ -24,7 +25,7 @@ SnowAdmin
- 使用 husky、lint-staged、commitlint等插件,规范提交信息
- 丰富的页面组件:内置多样页面和组件,包括 401、404、500 页面,以及布局组件、标签组件、主题配置组件等。
-### 环境准备
+### 环境准备 🏝️
确保你的环境满足以下要求:
@@ -34,11 +35,11 @@ SnowAdmin
### 安装使用步骤 📔
-### 从 GitHub 获取代码
+### 从 GitHub 获取代码 🔗
建设中
-### 从 Gitee 获取代码
+### 从 Gitee 获取代码 🔗
```bash
# 克隆代码
@@ -47,8 +48,7 @@ git clone https://gitee.com/wang_fan_w/SnowAdmin.git
> 注意: 最新版本的代码以 gitee 为准。
-
-### 安装依赖
+### 安装依赖 📌
安装项目依赖
@@ -56,13 +56,13 @@ git clone https://gitee.com/wang_fan_w/SnowAdmin.git
pnpm install
```
-### 插件配置
+### 插件配置 🛠️
-### 安装 Vue - Official,禁用 Vetur
+安装 Vue - Official,禁用 Vetur
- [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) - Vue 服务插件
-### npm scripts
+### 项目启动 🚀
```json
{
@@ -75,7 +75,7 @@ pnpm install
// 测试环境构建
"build:test": "vue-tsc && vite build --mode test",
// 预览环境启动
- "preview": "vite preview",
+ "preview": "vite preview"
}
```
@@ -135,8 +135,7 @@ SnowAdmin
建设中 -->
-
-### 鸣谢列表
+### 鸣谢列表 🧩
- [vue:https://v3.cn.vuejs.org/](https://v3.cn.vuejs.org/)
- [axios:https://github.com/axios/axios](https://github.com/axios/axios)
@@ -152,7 +151,7 @@ SnowAdmin
- [prettier:https://github.com/prettier/prettier](https://github.com/prettier/prettier)
- [arco-design:https://arco.design/](https://arco.design/)
-### 特别鸣谢
+### 特别鸣谢 🎉
- [vue-next-admin:http://vuenextadmin.ccfast.cc/](http://vuenextadmin.ccfast.cc/)
- [Gi-admin:https://lin-97.github.io/gi-demo/](https://lin-97.github.io/gi-demo/#/home)
@@ -160,11 +159,11 @@ SnowAdmin
感谢以上框架为本项目提供了帮助,项目中的很多设计思想值得参考和学习,再次感谢。
-### 支持作者
+### 支持作者 🌟
如果觉得框架不错,或者已经在使用了,希望你可以去 [Github](https://github.com/Rabbit-ice?tab=projects) 或者 [Gitee](https://gitee.com/wang_fan_w/SnowAdmin) 帮我点个 ⭐ Star,这将是对我极大的鼓励与支持。
-### 免责条款
+### 免责条款 📫
您充分了解并同意,您必须为自己使用本服务及注册帐号下的一切行为负责,包括您所发表的任何内容以及由此产生的任何后果。您应对本服务中的内容自行加以判断,并自行承担因使用内容而引起的所有风险。
@@ -174,6 +173,6 @@ SnowAdmin
本声明未涉及的问题参见国家有关法律法规,当本声明与国家法律法规冲突时,以国家法律法规为准。
-### 学习 & 商用
+### 学习 & 商用 🌈
-`SnowAdmin` 是免费和开源的,可免费用于学习、商业使用 。
\ No newline at end of file
+`SnowAdmin` 是免费和开源的,可免费用于学习、商业使用 。
From 594ad5ba8286edd22206348d085ca814385eb623 Mon Sep 17 00:00:00 2001
From: wf <2547096351@qq.com>
Date: Fri, 26 Jul 2024 18:06:00 +0800
Subject: [PATCH 7/7] =?UTF-8?q?docs:=20=E6=B3=A8=E9=87=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main.ts b/src/main.ts
index 550ef46..32f5bcc 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -22,6 +22,7 @@ import "@/assets/fonts/fonts.scss";
// 引入自定义指令
import directives from "@/directives/index";
+// https://arco.design/react/docs/vchart
initVChartArcoTheme();
const app = createApp(App);