From c145e4fd8cb6f32677a66909a8f3733478808e10 Mon Sep 17 00:00:00 2001 From: JiaoTianBo Date: Sat, 28 Mar 2026 19:28:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(project):=20=E6=B7=BB=E5=8A=A0=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E8=AF=A6=E6=83=85=E9=A1=B5=E8=BE=B9=E8=B7=9D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增marginSettings响应式变量管理页面边距数值 - 计算marginStyle以动态应用边距padding样式 - 在页面右上角添加边距设置按钮,使用Popover弹出控制面板 - 边距面板支持上下左右边距数值调整,限制输入范围 - 提供恢复默认边距功能按钮 - 为边距设置按钮与面板添加样式,固定位置,提升交互体验 --- src/views/project/detail.vue | 117 ++++++++++++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/src/views/project/detail.vue b/src/views/project/detail.vue index 3a7fd1c..d142ae8 100644 --- a/src/views/project/detail.vue +++ b/src/views/project/detail.vue @@ -39,6 +39,19 @@ const projectId = ref(route.params.id as string); const loading = ref(false); const ganttLoading = ref(false); +// 边距设置 +const marginSettings = ref({ + top: 16, + right: 80, + bottom: 16, + left: 16 +}); + +// 计算边距样式 +const marginStyle = computed(() => ({ + padding: `${marginSettings.value.top}px ${marginSettings.value.right}px ${marginSettings.value.bottom}px ${marginSettings.value.left}px` +})); + // 项目详情数据 const projectDetail = ref(null); @@ -407,7 +420,62 @@ onMounted(() => {