fix(fe): 评论输入框起始就是单行高度,消除「先高一下再缩」的抖动
原来 .cm-ta 是 height:auto,首帧按 textarea 默认约两行渲染成高的,auto-height 再测量缩回单行 → 抖动。改为显式单行 height(盖掉全局 textarea 的 88rpx), 文字换行时才由 auto-height 顶高,超过上限内部滚动。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -59,10 +59,13 @@ page{display:flex;flex-direction:column;height:100vh;overflow:hidden;background:
|
|||||||
}
|
}
|
||||||
.cm-cancel{display:flex;align-items:center}
|
.cm-cancel{display:flex;align-items:center}
|
||||||
.cm-bar-row{display:flex;align-items:flex-end;gap:var(--sp-3)}
|
.cm-bar-row{display:flex;align-items:flex-end;gap:var(--sp-3)}
|
||||||
|
/* 起始就是单行高度(显式 height 盖掉全局 textarea 的 88rpx,避免「先高一下再缩成单行」的抖动),
|
||||||
|
auto-height 只在文字换行时把它顶高;超过 max 就内部滚动 */
|
||||||
.cm-ta{
|
.cm-ta{
|
||||||
flex:1;min-width:0;box-sizing:border-box;min-height:72rpx;max-height:300rpx;height:auto;
|
flex:1;min-width:0;box-sizing:border-box;
|
||||||
padding:var(--sp-3) var(--sp-4);background:var(--surface-2);border-radius:var(--r-md);
|
height:72rpx;min-height:72rpx;max-height:280rpx;
|
||||||
font-size:var(--fs-md);line-height:1.5;
|
padding:16rpx var(--sp-4);background:var(--surface-2);border-radius:var(--r-md);
|
||||||
|
font-size:var(--fs-md);line-height:1.4;
|
||||||
}
|
}
|
||||||
.cm-pic{flex:none;display:flex;align-items:center;color:var(--muted);height:72rpx}
|
.cm-pic{flex:none;display:flex;align-items:center;color:var(--muted);height:72rpx}
|
||||||
.cm-pic.disabled{opacity:.35}
|
.cm-pic.disabled{opacity:.35}
|
||||||
|
|||||||
Reference in New Issue
Block a user