mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-29 23:44:41 +00:00
refactor: 批量优化前端页面样式与组件交互
1. 统一调整表单组件label-width为100px,移除分页默认内边距 2. 新增表格按钮悬浮动效,优化弹窗抽屉样式与交互 3. 重构仪表盘页面,迁移旧演示组件到首页 4. 调整日志详情项排序与表单重置逻辑 5. 优化缓存监控图表样式与布局
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
:items="deptDialogFormItems"
|
||||
:rules="rules"
|
||||
label-suffix=":"
|
||||
:label-width="'auto'"
|
||||
:label-width="100"
|
||||
label-position="right"
|
||||
:span="24"
|
||||
:gutter="16"
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
:items="dictDataDialogFormItems"
|
||||
:rules="rules"
|
||||
label-suffix=":"
|
||||
:label-width="'auto'"
|
||||
:label-width="100"
|
||||
label-position="right"
|
||||
:span="24"
|
||||
:gutter="16"
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
:items="dictDialogFormItems"
|
||||
:rules="rules"
|
||||
label-suffix=":"
|
||||
:label-width="'auto'"
|
||||
:label-width="100"
|
||||
label-position="right"
|
||||
:span="24"
|
||||
:gutter="16"
|
||||
|
||||
@@ -350,18 +350,23 @@ const logExportContentConfig = computed(() => ({
|
||||
const formData = ref<LogTable>({});
|
||||
|
||||
const logDetailItems: import("@/components/others/fa-descriptions/index.vue").DescriptionsItem[] = [
|
||||
// 基础信息
|
||||
{ label: "日志类型", prop: "type", slot: "type" },
|
||||
{ label: "描述", prop: "description", span: 4 },
|
||||
// 请求信息
|
||||
{ label: "请求路径", prop: "request_path" },
|
||||
{ label: "请求方法", prop: "request_method", slot: "request_method" },
|
||||
{ label: "响应状态码", prop: "response_code", slot: "response_code" },
|
||||
{ label: "请求IP", prop: "request_ip" },
|
||||
{ label: "处理时间", prop: "process_time" },
|
||||
{ label: "登录地点", prop: "login_location" },
|
||||
{ label: "浏览器", prop: "request_browser" },
|
||||
{ label: "操作系统", prop: "request_os" },
|
||||
{ label: "请求参数", prop: "request_payload", slot: "request_payload", span: 4 },
|
||||
{ label: "响应数据", prop: "response_json", slot: "response_json", span: 4 },
|
||||
{ label: "登录地点", prop: "login_location" },
|
||||
{ label: "描述", prop: "description", span: 4 },
|
||||
// 响应信息
|
||||
{ label: "响应状态码", prop: "response_code", slot: "response_code" },
|
||||
{ label: "处理时间", prop: "process_time" },
|
||||
// 详细数据(各占一行)
|
||||
{ label: "请求参数", prop: "request_payload", slot: "request_payload", span: 8 },
|
||||
{ label: "响应数据", prop: "response_json", slot: "response_json", span: 8 },
|
||||
// 元信息
|
||||
{ label: "创建人", prop: "created_by.name" },
|
||||
{ label: "更新人", prop: "updated_by.name" },
|
||||
{ label: "创建时间", prop: "created_time" },
|
||||
@@ -416,7 +421,7 @@ function onResetSearch() {
|
||||
}
|
||||
|
||||
async function resetForm() {
|
||||
Object.assign(formData, {});
|
||||
Object.assign(formData.value, {});
|
||||
}
|
||||
|
||||
async function handleCloseDialog() {
|
||||
@@ -427,7 +432,7 @@ async function handleCloseDialog() {
|
||||
async function handleOpenDialog(id: number) {
|
||||
dialogVisible.title = "日志详情";
|
||||
const response = await LogAPI.detailLog(id);
|
||||
Object.assign(formData, response.data.data ?? {});
|
||||
Object.assign(formData.value, response.data.data ?? {});
|
||||
dialogVisible.visible = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
:items="menuDialogFormItems"
|
||||
:rules="rules"
|
||||
label-suffix=":"
|
||||
:label-width="'auto'"
|
||||
:label-width="100"
|
||||
label-position="right"
|
||||
:span="24"
|
||||
:gutter="16"
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
:items="positionDialogFormItems"
|
||||
:rules="rules"
|
||||
label-suffix=":"
|
||||
:label-width="'auto'"
|
||||
:label-width="100"
|
||||
label-position="right"
|
||||
:span="24"
|
||||
:gutter="16"
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
:items="roleDialogFormItems"
|
||||
:rules="rules"
|
||||
label-suffix=":"
|
||||
:label-width="'auto'"
|
||||
:label-width="100"
|
||||
label-position="right"
|
||||
:span="24"
|
||||
:gutter="16"
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
:items="tenantDialogFormItems"
|
||||
:rules="rules"
|
||||
label-suffix=":"
|
||||
:label-width="'auto'"
|
||||
:label-width="100"
|
||||
label-position="right"
|
||||
:span="24"
|
||||
:gutter="16"
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
:items="userDialogFormItems"
|
||||
:rules="rules"
|
||||
label-suffix=":"
|
||||
:label-width="'auto'"
|
||||
:label-width="100"
|
||||
label-position="right"
|
||||
:span="24"
|
||||
:gutter="16"
|
||||
|
||||
Reference in New Issue
Block a user