Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(docs): 迁移文档到vitepress并更新前端相关配置
重构文档系统,从mkdocs迁移到vitepress
添加vitepress主题配置和样式
更新前端构建脚本以支持文档构建
移除不再使用的mkdocs相关文件和依赖
调整导航栏文档链接指向新文档系统
统一错误处理方式,将ElMessage.error替换为console.error
  • Loading branch information
zhangtao
zhangtao committed Aug 6, 2025
commit b124a519f65261de437557c2db276ad677c08860
4 changes: 2 additions & 2 deletions backend/app/api/v1/params/system/position_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def __init__(
name: Optional[str] = Query(None, description="岗位名称"),
status: Optional[bool] = Query(None, description="是否可用"),
creator: Optional[int] = Query(None, description="创建人"),
start_time: Optional[str] = Query(None, description="开始时间", example="2023-01-01 00:00:00"),
end_time: Optional[str] = Query(None, description="结束时间", example="2023-12-31 23:59:59"),
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2023-01-01 00:00:00"),
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2023-12-31 23:59:59"),
) -> None:
super().__init__()

Expand Down
4 changes: 2 additions & 2 deletions backend/app/api/v1/params/system/role_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def __init__(
name: Optional[str] = Query(None, description="角色名称"),
status: Optional[bool] = Query(None, description="是否可用"),
creator: Optional[int] = Query(None, description="创建人"),
start_time: Optional[str] = Query(None, description="开始时间", example="2023-01-01 00:00:00"),
end_time: Optional[str] = Query(None, description="结束时间", example="2023-12-31 23:59:59"),
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2023-01-01 00:00:00"),
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2023-12-31 23:59:59"),
) -> None:
super().__init__()

Expand Down
4 changes: 2 additions & 2 deletions backend/app/api/v1/params/system/user_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def __init__(
email: Optional[str] = Query(None, description="邮箱", pattern=r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'),
dept_id: Optional[int] = Query(None, description="部门ID"),
status: Optional[bool] = Query(None, description="是否可用"),
start_time: Optional[str] = Query(None, description="开始时间"),
end_time: Optional[str] = Query(None, description="结束时间"),
start_time: Optional[DateTimeStr] = Query(None, description="开始时间", example="2023-01-01 00:00:00"),
end_time: Optional[DateTimeStr] = Query(None, description="结束时间", example="2023-12-31 23:59:59"),
creator: Optional[int] = Query(None, description="创建人"),
) -> None:
super().__init__()
Expand Down
33 changes: 0 additions & 33 deletions backend/mkdocs.yml

This file was deleted.

6 changes: 1 addition & 5 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,4 @@ asyncmy==0.2.9 # mysql 异步操作数据库:基于 mysqlclient:asyncmy
motor==3.6.0 # mongodb 驱动
# asyncpg==0.30.0 # postgresql 异步操作数据库基于 psycopg2:asyncpg 是 psycopg2 的异步版本,psycopg2 是一个 pure-Python PostgreSQL 数据库适配器。性能:asyncpg 通常在性能上优于 psycopg2,特别是在高并发和大数据量的场景下。
# aiomysql==0.2.0 # mysql 异步操作数据库基于 pymysql:aiomysql 是 pymysql 的异步版本,pymysql 是一个纯 Python 实现的 MySQL 客户端。成熟度:aiomysql 相对较为成熟,社区支持较好,文档也比较完善。
cryptography==45.0.2 # mysql8 密码加密
mkdocs
mkdocs-material # 安装主题
mkdocs-minify-plugin # 插件
mkdocs-git-revision-date-localized-plugin
cryptography==45.0.2 # mysql8 密码加密
2 changes: 2 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ pnpm-lock.yaml
package-lock.json
.stylelintcache
.eslintcache
docs/.vitepress/cache
docs/dist
100 changes: 100 additions & 0 deletions frontend/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: '/docs/dist',
outDir: 'dist',
lang: 'zh-CN',
title: 'Fastapi Vue3 Admin',
description: '现代、开源、全栈融合的中后台快速开发平台',
head: [
['link', { rel: 'icon', href: '/favicon.png' }],
],
locales: {
root: { label: '简体中文' },
en: { label: 'English' },
},
lastUpdated: true,
cleanUrls: true,
metaChunk: true,
themeConfig: {
logo: '/logo.jpg',
siteTitle: 'Fastapi Vue3 Admin',
nav: [
{ text: '首页', link: '/' },
{ text: '指南', link: '/guide' },
{ text: '演示环境', link: 'http://service.fastapiadmin.com', target: '_blank' },
{
text: '版本',
items: [
{ text: 'master', link: 'https://github.com/1014TaoTao/fastapi_vue3_admin', target: '_blank' },
{ text: 'V2.0.0', link: 'https://github.com/1014TaoTao/fastapi_vue3_admin/tree/v2.0.0', target: '_blank' },
{ text: 'V1.0.0', link: 'https://github.com/1014TaoTao/fastapi_vue3_admin/tree/v1.0.0', target: '_blank' }
]
},
{ text: '更新日志', link: 'https://github.com/1014TaoTao/fastapi_vue3_admin/commits/master/', target: '_blank' },
{
text: '社区',
items: [
{ text: 'GitHub', link: 'https://github.com/1014TaoTao/fastapi_vue3_admin', target: '_blank' },
{ text: 'Gitee', link: 'https://gitee.com/tao__tao/fastapi_vue3_admin', target: '_blank' },
{ text: 'GitCode', link: 'https://gitcode.com/qq_36002987/fastapi_vue3_admin', target: '_blank' }
]
},
{ text: '关于我们', link: '/about' },
],

sidebar: [
{
text: '项目指南',
items: [
{ text: '项目介绍', link: '/guide#📘项目介绍' },
{ text: '核心亮点', link: '/guide#✨核心亮点' },
{ text: '技术栈概览', link: '/guide#🛠️技术栈概览' },
{ text: '内置模块', link: '/guide#📌内置模块' },
{ text: 'Docker部署', link: '/guide#🍪演示环境' },
{text: '安装和使用', link: '/guide#👷安装和使用' },
{text: '模块展示', link: '/guide#🔧模块展示' },
{text: '二开教程', link: '/guide#🚀二开教程' },
{text: '特别鸣谢', link: '/guide#🙏特别鸣谢' },
{text: '支持我', link: '/guide#❤️支持我' }
]
}
],

socialLinks: [
{ icon: 'github', link: 'https://github.com/1014TaoTao/fastapi_vue3_admin' },
{ icon: 'gitee', link: 'https://gitee.com/tao__tao/fastapi_vue3_admin' },
{ icon: 'gitcode', link: 'https://gitcode.com/qq_36002987/fastapi_vue3_admin' }
],

footer: {
message: '<a href="https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE" License</a>',
copyright: 'Copyright © 2025-2026 service.fastapiadmin.com 版权所有 |隐私 |条款 陕ICP备2025069493号-1'
},

search: {
provider: 'local',
options: {
locales: {
root: {
translations: {
button: {
buttonText: '搜索文档',
buttonAriaLabel: '搜索文档'
},
modal: {
footer: {
selectText: '选择',
navigateText: '切换',
closeText: '关闭',
},
},
},
},
},
},
},
outline: 3,
}
})
6 changes: 6 additions & 0 deletions frontend/docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Theme from 'vitepress/theme'
import './style.css'

export default {
...Theme
}
52 changes: 52 additions & 0 deletions frontend/docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
:root:where(:lang(fa)) {
--vp-font-family-base:
'Vazirmatn', 'Inter', ui-sans-serif, system-ui, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

:root {
/* 标题 */
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#bd34fe 30%,
#41d1ff
);

/* 图标背景 */
--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#bd34fe 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(44px);

/* brand按钮 */
--vp-button-brand-border: #F6CEEC;
--vp-button-brand-text: #F6CEEC;
--vp-button-brand-bg: #D939CD;

--vp-button-brand-hover-border: #F6CEEC;
--vp-button-brand-hover-text: #fff;
--vp-button-brand-hover-bg: #D939CD;

--vp-button-brand-active-border: #F6CEEC;

}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}

.VPHero .VPImage {
filter: drop-shadow(-2px 4px 6px rgba(0, 0, 0, 0.2));
padding: 18px;
}
30 changes: 30 additions & 0 deletions frontend/docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 🎨 关于我们

欢迎与我们取得联系,以下是我们的联系方式:

- **QQ**:948080782

- **邮箱**:948080782@qq.com

### 扫码交流
以下是相关二维码,点击图片可查看大图:
<div style="display: flex; justify-content: space-around; flex-wrap: wrap;">
<div style="text-align: center; margin: 10px;">
<a href="https://gitee.com/tao__tao/fastapi_vue3_admin/raw/master/backend/static/image/wechat.jpg">
<img src="https://gitee.com/tao__tao/fastapi_vue3_admin/raw/master/backend/static/image/wechat.jpg" alt="微信二维码" style="max-width: 200px;"/>
</a>
<p>微信二维码</p>
</div>
<div style="text-align: center; margin: 10px;">
<a href="https://gitee.com/tao__tao/fastapi_vue3_admin/raw/master/backend/static/image/group.jpg">
<img src="https://gitee.com/tao__tao/fastapi_vue3_admin/raw/master/backend/static/image/group.jpg" alt="群组二维码" style="max-width: 200px;"/>
</a>
<p>群组二维码</p>
</div>
<div style="text-align: center; margin: 10px;">
<a href="https://gitee.com/tao__tao/fastapi_vue3_admin/raw/master/backend/static/image/wechatPay.jpg">
<img src="https://gitee.com/tao__tao/fastapi_vue3_admin/raw/master/backend/static/image/wechatPay.jpg" alt="微信支付二维码" style="max-width: 200px;"/>
</a>
<p>微信支付二维码</p>
</div>
</div>
Loading