fix(workshop): AI创作弹窗v6.2 输入框默认两行空间(min-height 30→60+rows=2)

This commit is contained in:
maogeigei committed 2026-09-02 16:50:59 +08:00
1 parent cd0f876785
commit c25e56dee9
3 files changed
+16 -2

No files matched your search

+13
View File
@@ -293,3 +293,16 @@
- **CDP 验证** `tmp/cdp-req-v6_1-gap10-check.mjs`:createRight=929/sendLeft=939/gap_px=**10**(精确)
- **截图** `tmp/reqv6-1-toolbar-zoom.png`(更新版)
- 工作台页面重开 `?v=20260902-v6#/accounts`(v6.1 同 v6 版本号足够,CSS no-store)
## AI创作弹窗 v6.2 输入框默认两行空间(16:55,用户要求)
- **需求原话**:「输入框的输入位高度扩大,默认有两行输入空间」
- **调整**(style.css .req-input + data-pages.js HTML):
- CSS `.req-input` min-height: 30px → **60px**(行高 21px × 2 + padding 16 = 58px,取 60 留 2px 余量;box-sizing border-box 含 padding)
- HTML `<textarea rows="1">` → `rows="2"`(JS 加载前/极端情况也呈现两行)
- **autoGrow 行为复核**:
- 初始空态:60px(CSS min-height 兜底 + rows=2)
- 多行输入(6 行):100px(max-height cap 到 100px,与 v5 一致)
- 清空复位:60px(autoGrow reset → min-height 兜底)
- **CDP 验证 v6.2**(`tmp/cdp-req-v6_2-twolines-check.mjs`):rows=2/heightPx=60/lineHeight=21px/paddingTop=10/paddingBottom=6 ✓
- **截图** `tmp/reqv6-2-twolines-empty.png`(zoom 入参框:占位符一行 + 预留第二行 + 底部工具栏)/ `tmp/reqv6-2-full-modal.png`(整体)
- 工作台页面重开 `?v=20260902-v62#/accounts`(与 v6 不共存,最新版本号)
@@ -229,7 +229,7 @@ async function confirmAiScript(accountName, btn) {
<div class="req-attach-row" id="attachRow"></div>
<div class="req-bar">
<div class="req-input-box">
<textarea id="reqInput" class="req-input" rows="1" placeholder="说说你的想法,例如:想拍一个亲子互动的搞笑短剧…(也可以先上传需求文档)"></textarea>
<textarea id="reqInput" class="req-input" rows="2" placeholder="说说你的想法,例如:想拍一个亲子互动的搞笑短剧…(也可以先上传需求文档)"></textarea>
<div class="req-input-toolbar">
<button type="button" class="req-paper" id="reqPaper" title="上传需求附件(doc / docx / txt / pdf)">${svgIcon('paperclip', 17)}</button>
<div class="req-spacer"></div>
@@ -261,7 +261,8 @@ main { height: calc(100vh - 54px); }
width: 100%; box-sizing: border-box;
border: none; outline: none; resize: none; background: transparent;
font-size: 14px; font-family: inherit; line-height: 1.5;
min-height: 30px; max-height: 100px;
/* 默认两行输入空间(行高 21px × 2 + padding 16 = 58 → 取 60 留 2px 余量) */
min-height: 60px; max-height: 100px;
padding: 10px 14px 6px;
}
.req-input::placeholder { color: #a6aebc; }