mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-22 21:06:32 +00:00
chore: 整理项目配置与代码优化
1. 统一前端环境变量命名,新增通用项目标题配置 2. 修复后端接口参数绑定方式,将Depends改为Query适配FastAPI解析 3. 优化表格列排序、搜索过滤功能与页面布局样式 4. 重构路由与状态管理代码,移除循环依赖 5. 更新依赖版本与脚本命令,修复构建警告 6. 调整多语言文案与快捷入口配置 7. 修复通知中心样式与接口返回格式
This commit is contained in:
+1
-5
@@ -61,11 +61,7 @@
|
||||
label="数据库名称"
|
||||
:show-overflow-tooltip="true"
|
||||
></ElTableColumn>
|
||||
<ElTableColumn
|
||||
prop="table_name"
|
||||
label="表名称"
|
||||
:show-overflow-tooltip="true"
|
||||
></ElTableColumn>
|
||||
<ElTableColumn prop="table_name" label="表名称" :show-overflow-tooltip="true"></ElTableColumn>
|
||||
<ElTableColumn
|
||||
prop="table_comment"
|
||||
label="表描述"
|
||||
|
||||
@@ -705,6 +705,10 @@ async function handleDelete(row?: GenTableSchema): Promise<void> {
|
||||
type GencodeSearchForm = {
|
||||
table_name?: string;
|
||||
table_comment?: string;
|
||||
created_id?: number;
|
||||
updated_id?: number;
|
||||
created_time?: string[];
|
||||
updated_time?: string[];
|
||||
};
|
||||
|
||||
function buildGencodeRowActions(row: GenTableSchema): TableOperationAction[] {
|
||||
@@ -748,6 +752,10 @@ function formatGencodeOperationCell(row: GenTableSchema) {
|
||||
const searchForm = ref<GencodeSearchForm>({
|
||||
table_name: undefined,
|
||||
table_comment: undefined,
|
||||
created_id: undefined,
|
||||
updated_id: undefined,
|
||||
created_time: undefined,
|
||||
updated_time: undefined,
|
||||
});
|
||||
|
||||
const showSearchBar = ref(true);
|
||||
@@ -819,12 +827,14 @@ const useTableResult = useTable({
|
||||
prop: "created_time",
|
||||
label: "创建时间",
|
||||
width: 168,
|
||||
sortable: true,
|
||||
showOverflowTooltip: true,
|
||||
},
|
||||
{
|
||||
prop: "updated_time",
|
||||
label: "更新时间",
|
||||
width: 168,
|
||||
sortable: true,
|
||||
showOverflowTooltip: true,
|
||||
},
|
||||
{
|
||||
@@ -865,6 +875,16 @@ async function handleSearchBarSearch(params: GencodeSearchForm) {
|
||||
replaceSearchParams({
|
||||
table_name: params.table_name,
|
||||
table_comment: params.table_comment,
|
||||
created_id: params.created_id,
|
||||
updated_id: params.updated_id,
|
||||
created_time:
|
||||
Array.isArray(params.created_time) && params.created_time.length === 2
|
||||
? params.created_time
|
||||
: undefined,
|
||||
updated_time:
|
||||
Array.isArray(params.updated_time) && params.updated_time.length === 2
|
||||
? params.updated_time
|
||||
: undefined,
|
||||
});
|
||||
getData();
|
||||
}
|
||||
@@ -873,6 +893,10 @@ async function onResetSearch() {
|
||||
searchForm.value = {
|
||||
table_name: undefined,
|
||||
table_comment: undefined,
|
||||
created_id: undefined,
|
||||
updated_id: undefined,
|
||||
created_time: undefined,
|
||||
updated_time: undefined,
|
||||
};
|
||||
await resetSearchParams();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user