mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-04 17:14:21 +00:00
docs(backend): 重构后端README文档,完善项目文档与开发指南
- 全面更新README,添加项目特性、架构设计与技术栈介绍 - 详细补充项目结构说明及模块设计规范 - 增加快速开始步骤,包括环境配置、数据库初始化和服务启动 - 补充主要API模块路径和认证授权使用示例 - 添加开发指南、数据库迁移与测试方法 - 集成监控、日志级别说明及性能监控内容 - 完善Docker、传统部署及Nginx配置示例 - 添加贡献指南和代码规范说明 - 新增MCP模块概述及智能对话API接口文档 - 清理和移除module_ai中旧的mcp_server相关实现代码 - 在api/v1初始化文件中注册AI模块路由 - 修改resource模块,增强资源路径安全检查和文件类型检测逻辑 - 增强资源搜索和上传服务的健壮性及安全性
This commit is contained in:
+258
-216
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* 主样式文件
|
||||
* 统一管理所有样式,保持简洁清晰
|
||||
*/
|
||||
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
@@ -7,256 +12,293 @@ body,
|
||||
}
|
||||
|
||||
.app-container {
|
||||
padding: 10rpx 10rpx;
|
||||
padding: 16rpx;
|
||||
|
||||
:deep(.custom-item) {
|
||||
height: 80px !important;
|
||||
height: 100px !important;
|
||||
}
|
||||
:deep(.wd-card) {
|
||||
margin: 10rpx 0 !important;
|
||||
margin: 16rpx 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 全局样式变量
|
||||
*/
|
||||
|
||||
/*
|
||||
* 主题颜色 - 会被theme.ts中的动态设置覆盖
|
||||
* 这里作为默认值和IDE提示
|
||||
*/
|
||||
/* ===== 全局主题变量 ===== */
|
||||
:root {
|
||||
/* 主色 */
|
||||
/* 主题色系 */
|
||||
--primary-color: #165dff;
|
||||
--primary-color-light: #94bfff;
|
||||
--primary-color-dark: #0e3c9b;
|
||||
--wot-color-theme: #165dff;
|
||||
|
||||
/* 功能色 */
|
||||
--success-color: #0fc6c2;
|
||||
/* 功能色系 */
|
||||
--success-color: #07c160;
|
||||
--warning-color: #ff7d00;
|
||||
--danger-color: #f5222d;
|
||||
--danger-color: #f53f3f;
|
||||
--info-color: #86909c;
|
||||
|
||||
/* 文字颜色 */
|
||||
--text-primary: #1d2129;
|
||||
--text-regular: #4e5969;
|
||||
--text-secondary: #86909c;
|
||||
--text-placeholder: #c9cdd4;
|
||||
--text-inverse: #ffffff;
|
||||
--text-color: #1d2129;
|
||||
--text-color-2: #4e5969;
|
||||
--text-color-3: #86909c;
|
||||
--text-color-placeholder: #c9cdd4;
|
||||
--text-color-inverse: #ffffff;
|
||||
|
||||
/* 背景颜色 */
|
||||
--bg-color: #ffffff;
|
||||
--bg-color-2: #f8f8f8;
|
||||
--bg-color-3: #f2f3f5;
|
||||
--card-bg-color: #ffffff;
|
||||
|
||||
/* 边框颜色 */
|
||||
--border-color: #e5e6eb;
|
||||
--border-light: #f2f3f5;
|
||||
--border-color-light: #f2f3f5;
|
||||
|
||||
/* 背景颜色 */
|
||||
--bg-white: #ffffff;
|
||||
--bg-light: #f2f3f5;
|
||||
--bg-gray: #f7f8fa;
|
||||
/* 阴影 */
|
||||
--shadow-light: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
--shadow-medium: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
||||
--shadow-heavy: 0 8rpx 32rpx rgba(0, 0, 0, 0.15);
|
||||
|
||||
/* 圆角 */
|
||||
--radius-sm: 4rpx;
|
||||
--radius-md: 8rpx;
|
||||
--radius-lg: 16rpx;
|
||||
--radius-xl: 24rpx;
|
||||
--radius-full: 9999rpx;
|
||||
|
||||
/* 间距 */
|
||||
--spacing-xs: 8rpx;
|
||||
--spacing-sm: 16rpx;
|
||||
--spacing-md: 24rpx;
|
||||
--spacing-lg: 32rpx;
|
||||
--spacing-xl: 48rpx;
|
||||
--spacing-xxl: 64rpx;
|
||||
|
||||
/* 字体大小 */
|
||||
--font-xs: 24rpx;
|
||||
--font-sm: 28rpx;
|
||||
--font-md: 32rpx;
|
||||
--font-lg: 36rpx;
|
||||
--font-xl: 40rpx;
|
||||
--font-xxl: 48rpx;
|
||||
--font-xxxl: 56rpx;
|
||||
|
||||
/* 动画 */
|
||||
--transition-fast: 0.15s ease;
|
||||
--transition-normal: 0.3s ease;
|
||||
--transition-slow: 0.5s ease;
|
||||
}
|
||||
|
||||
/**
|
||||
* 主题相关的通用类
|
||||
*/
|
||||
/* ===== 暗黑模式变量 ===== */
|
||||
.dark {
|
||||
--text-color: #ffffff;
|
||||
--text-color-2: #e0e0e0;
|
||||
--text-color-3: #a0a0a0;
|
||||
--text-color-placeholder: #606060;
|
||||
--text-color-inverse: #1d2129;
|
||||
|
||||
/* 主色文本 */
|
||||
--bg-color: #0f0f0f;
|
||||
--bg-color-2: #1a1a1a;
|
||||
--bg-color-3: #242424;
|
||||
--card-bg-color: #1a1a1a;
|
||||
|
||||
--border-color: #2f2f2f;
|
||||
--border-color-light: #3d3d3d;
|
||||
|
||||
--shadow-light: 0 2rpx 8rpx rgba(0, 0, 0, 0.3);
|
||||
--shadow-medium: 0 4rpx 16rpx rgba(0, 0, 0, 0.4);
|
||||
--shadow-heavy: 0 8rpx 32rpx rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
/* ===== 主题适配类 ===== */
|
||||
.theme-adaptive {
|
||||
color: var(--text-color);
|
||||
background-color: var(--bg-color);
|
||||
border-color: var(--border-color);
|
||||
transition:
|
||||
color var(--transition-normal),
|
||||
background-color var(--transition-normal),
|
||||
border-color var(--transition-normal);
|
||||
}
|
||||
|
||||
.theme-card {
|
||||
background-color: var(--card-bg-color);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: var(--shadow-light);
|
||||
transition: all var(--transition-normal);
|
||||
|
||||
&:hover {
|
||||
box-shadow: var(--shadow-medium);
|
||||
}
|
||||
}
|
||||
|
||||
.theme-text-primary {
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.theme-text-secondary {
|
||||
color: var(--text-color-2);
|
||||
}
|
||||
|
||||
.theme-text-tertiary {
|
||||
color: var(--text-color-3);
|
||||
}
|
||||
|
||||
.theme-text-muted {
|
||||
color: var(--text-color-placeholder);
|
||||
}
|
||||
|
||||
.theme-text-inverse {
|
||||
color: var(--text-color-inverse);
|
||||
}
|
||||
|
||||
/* ===== 常用工具类 ===== */
|
||||
.text-primary {
|
||||
color: var(--primary-color) !important;
|
||||
}
|
||||
.text-success {
|
||||
color: var(--success-color) !important;
|
||||
}
|
||||
.text-warning {
|
||||
color: var(--warning-color) !important;
|
||||
}
|
||||
.text-danger {
|
||||
color: var(--danger-color) !important;
|
||||
}
|
||||
.text-info {
|
||||
color: var(--info-color) !important;
|
||||
}
|
||||
.text-muted {
|
||||
color: var(--text-color-3) !important;
|
||||
}
|
||||
|
||||
/* 主色背景 */
|
||||
.bg-primary {
|
||||
color: #fff;
|
||||
color: var(--text-color-inverse);
|
||||
background-color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
/* 主色边框 */
|
||||
.border-primary {
|
||||
border-color: var(--primary-color) !important;
|
||||
.bg-card {
|
||||
background-color: var(--card-bg-color) !important;
|
||||
}
|
||||
.bg-light {
|
||||
background-color: var(--bg-color-2) !important;
|
||||
}
|
||||
|
||||
/* 主色按钮样式 */
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: var(--primary-color);
|
||||
border: none;
|
||||
border-radius: 8rpx;
|
||||
transition: opacity 0.3s;
|
||||
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
/* 圆角按钮 */
|
||||
.btn-rounded {
|
||||
border-radius: 45rpx !important;
|
||||
}
|
||||
|
||||
/* 次级按钮 */
|
||||
.btn-secondary {
|
||||
color: var(--primary-color);
|
||||
background-color: #fff;
|
||||
border: 1px solid var(--primary-color);
|
||||
border-radius: 8rpx;
|
||||
transition: background-color 0.3s;
|
||||
|
||||
&:active {
|
||||
background-color: rgba(22, 93, 255, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 字体大小
|
||||
*/
|
||||
.font-xs {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.font-sm {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.font-md {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.font-lg {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.font-xl {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 边距辅助类
|
||||
*/
|
||||
.mt-10 {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.mt-20 {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.mt-30 {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.mt-40 {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.mb-10 {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.mb-20 {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.mb-30 {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.mb-40 {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.ml-10 {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.ml-20 {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.ml-30 {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.ml-40 {
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
.mr-10 {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.mr-20 {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.mr-30 {
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.mr-40 {
|
||||
margin-right: 40rpx;
|
||||
}
|
||||
|
||||
.p-10 {
|
||||
padding: 10rpx;
|
||||
}
|
||||
.p-20 {
|
||||
padding: 20rpx;
|
||||
}
|
||||
.p-30 {
|
||||
padding: 30rpx;
|
||||
}
|
||||
.p-40 {
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 布局辅助类
|
||||
*/
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
.flex-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.flex-column {
|
||||
flex-direction: column;
|
||||
}
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
.items-start {
|
||||
align-items: flex-start;
|
||||
}
|
||||
.items-end {
|
||||
align-items: flex-end;
|
||||
}
|
||||
.justify-center {
|
||||
justify-content: center;
|
||||
}
|
||||
.justify-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.justify-around {
|
||||
justify-content: space-around;
|
||||
}
|
||||
.justify-start {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.justify-end {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/**
|
||||
* 其他辅助类
|
||||
*/
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
.text-left {
|
||||
text-align: left;
|
||||
}
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.rounded-sm {
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
.rounded {
|
||||
border-radius: 8rpx;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
.rounded-lg {
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.rounded-xl {
|
||||
border-radius: 24rpx;
|
||||
border-radius: var(--radius-lg);
|
||||
}
|
||||
.rounded-full {
|
||||
border-radius: 9999rpx;
|
||||
border-radius: var(--radius-full);
|
||||
}
|
||||
|
||||
.shadow {
|
||||
box-shadow: var(--shadow-light);
|
||||
}
|
||||
.shadow-lg {
|
||||
box-shadow: var(--shadow-medium);
|
||||
}
|
||||
|
||||
.transition {
|
||||
transition: all var(--transition-normal);
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex !important;
|
||||
}
|
||||
.items-center {
|
||||
align-items: center !important;
|
||||
}
|
||||
.justify-center {
|
||||
justify-content: center !important;
|
||||
}
|
||||
.justify-between {
|
||||
justify-content: space-between !important;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
.font-bold {
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
/* ===== 间距工具类 ===== */
|
||||
.p-xs {
|
||||
padding: var(--spacing-xs) !important;
|
||||
}
|
||||
.p-sm {
|
||||
padding: var(--spacing-sm) !important;
|
||||
}
|
||||
.p-md {
|
||||
padding: var(--spacing-md) !important;
|
||||
}
|
||||
.p-lg {
|
||||
padding: var(--spacing-lg) !important;
|
||||
}
|
||||
.p-xl {
|
||||
padding: var(--spacing-xl) !important;
|
||||
}
|
||||
|
||||
.m-xs {
|
||||
margin: var(--spacing-xs) !important;
|
||||
}
|
||||
.m-sm {
|
||||
margin: var(--spacing-sm) !important;
|
||||
}
|
||||
.m-md {
|
||||
margin: var(--spacing-md) !important;
|
||||
}
|
||||
.m-lg {
|
||||
margin: var(--spacing-lg) !important;
|
||||
}
|
||||
.m-xl {
|
||||
margin: var(--spacing-xl) !important;
|
||||
}
|
||||
|
||||
.mt-sm {
|
||||
margin-top: var(--spacing-sm) !important;
|
||||
}
|
||||
.mt-md {
|
||||
margin-top: var(--spacing-md) !important;
|
||||
}
|
||||
.mt-lg {
|
||||
margin-top: var(--spacing-lg) !important;
|
||||
}
|
||||
.mt-xl {
|
||||
margin-top: var(--spacing-xl) !important;
|
||||
}
|
||||
|
||||
.mb-sm {
|
||||
margin-bottom: var(--spacing-sm) !important;
|
||||
}
|
||||
.mb-md {
|
||||
margin-bottom: var(--spacing-md) !important;
|
||||
}
|
||||
.mb-lg {
|
||||
margin-bottom: var(--spacing-lg) !important;
|
||||
}
|
||||
.mb-xl {
|
||||
margin-bottom: var(--spacing-xl) !important;
|
||||
}
|
||||
|
||||
/* ===== 字体大小类 ===== */
|
||||
.text-xs {
|
||||
font-size: var(--font-xs) !important;
|
||||
}
|
||||
.text-sm {
|
||||
font-size: var(--font-sm) !important;
|
||||
}
|
||||
.text-md {
|
||||
font-size: var(--font-md) !important;
|
||||
}
|
||||
.text-lg {
|
||||
font-size: var(--font-lg) !important;
|
||||
}
|
||||
.text-xl {
|
||||
font-size: var(--font-xl) !important;
|
||||
}
|
||||
.text-2xl {
|
||||
font-size: var(--font-xxl) !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user