From 0b7ff9fb05f8a816f98002a67f20ff1606e4d203 Mon Sep 17 00:00:00 2001 From: lichaojun Date: Fri, 2 Jan 2026 07:39:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8B=96=E6=8B=BD=E5=B8=83=E5=B1=80-?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=B8=83=E5=B1=80=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demoHtml/flex/GEMINI.md | 3 ++- demoHtml/flex/css/index.css | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/demoHtml/flex/GEMINI.md b/demoHtml/flex/GEMINI.md index 01fb962..9d6b7e1 100644 --- a/demoHtml/flex/GEMINI.md +++ b/demoHtml/flex/GEMINI.md @@ -21,4 +21,5 @@ ## 要求 * 执行任何任务的时候,请先输出你的思路,等待我确认之后再修改代码 -* 有任何不确认的地方,请先向我确认再执行任务 \ No newline at end of file +* 有任何不确认的地方,请先向我确认再执行任务 +* 请任何时候使用中文与我沟通或者确认,包括项目中使用注释也使用中文 \ No newline at end of file diff --git a/demoHtml/flex/css/index.css b/demoHtml/flex/css/index.css index 95cb636..fa2fb71 100644 --- a/demoHtml/flex/css/index.css +++ b/demoHtml/flex/css/index.css @@ -49,10 +49,11 @@ html { border-bottom: 2px solid #667eea; } -/* Components panel */ +/* 组件面板 */ #components-panel { position: relative; - flex: 1; + width: 150px; /* 固定宽度 */ + flex: none; /* 禁用flex伸缩 */ background-color: #fff; border-right: 1px solid #e0e0e0; display: flex; @@ -64,14 +65,12 @@ html { padding: 10px; overflow-y: auto; display: flex; - flex-direction: row; - flex-wrap: wrap; - align-content: flex-start; + flex-direction: column; /* 垂直堆叠组件 */ gap: 10px; } .component-item { - width: calc(50% - 5px); + width: 100%; /* 组件宽度占满父容器,实现一行一个 */ height: 120px; border-radius: 8px; cursor: pointer; @@ -117,17 +116,18 @@ html { .action-btn { position: relative; width: 100%; - height: 50px; + height: auto; /* 高度自适应内容 */ display: flex; + flex-direction: column; /* 子元素垂直堆叠 */ align-items: center; justify-content: center; - padding: 0 10px; + padding: 10px; /* 添加垂直内边距 */ } .action-btn .trash-container, .action-btn .save-container { - width: 46%; + width: 100%; /* 宽度占满父容器 */ height: 40px; - margin: 0 2%; + margin: 5px 0; /* 添加垂直外边距,移除水平外边距 */ border-radius: 8px; display: flex; align-items: center;