fix(ui): 注册验证码输入框与按钮改为并排,并让按钮可辨认
两个问题一起修。 一、验证码输入框与「获取验证码」按钮上下堆叠 该行的容器写了 gap / align-items,输入框也写了 flex:1,但这些全是 flex 专用属性,容器却没有 display:flex,因此全部失效,两个元素按 块级堆叠成上下两行。 同时显隐逻辑用的是 style.display = '',清空内联样式后回退到默认的 display:block,也无法变成 flex。 改为把布局写进 .email-code-row 类(display:flex + gap + align-items), 显隐只切 .is-visible 类。JS 中通过 style.display 判断字段是否启用的 两处也一并改为读类名,避免两套判断标准。 二、按钮看起来不像按钮 这一条是之前「模态框改白底」的同类残留:.btn-primary / .btn-secondary 的背景取自 --glass-bg,亮色下是 18% 的不透明白,本就为叠在模糊背景 上设计;模态框改为纯白底后,这类按钮在白底上几乎不可见。 先为模态框内的按钮统一补上底色与描边,但实测发现按钮底色 rgb(247,249,252) 与输入框 rgb(238,241,246) 过于接近,「获取验证码」 看起来像第二个输入框。因此对该按钮改用品牌色实心样式,与输入框 明确区分;倒计时禁用时降低不透明度而非换色,保持位置稳定。 另外统一按钮高度为 38px 与输入框对齐——按钮的行高受继承影响会比 输入框高 3px,在 align-items:center 下出现轻微错位。 实测(Puppeteer 读取计算样式与几何位置):容器 display 为 flex、 输入框与按钮 top 均为 479、高度均为 38、按钮位于右侧; 按钮背景为品牌色 rgb(91,155,213),与输入框背景明确不同。
This commit is contained in:
1 parent
c4acf06253
commit
68ef257759
3 files changed
+144
-12
No files matched your search
+3
-5
@@ -369,11 +369,9 @@
|
||||
<input type="email" id="regEmail" placeholder="邮箱" />
|
||||
<input type="password" id="regPassword" placeholder="密码(至少6位)" />
|
||||
<input type="password" id="regBootstrapToken" placeholder="管理员初始化令牌" autocomplete="off" style="display:none;" />
|
||||
<div id="regEmailCodeRow" style="display:none;gap:8px;align-items:center;margin-bottom:12px;">
|
||||
<input type="text" id="regEmailCode" placeholder="邮箱验证码" autocomplete="off"
|
||||
style="flex:1;margin-bottom:0;font-family:monospace;letter-spacing:2px;" />
|
||||
<button type="button" id="regSendCodeBtn" class="btn-secondary"
|
||||
style="padding:10px 14px;white-space:nowrap;font-size:13px;">获取验证码</button>
|
||||
<div id="regEmailCodeRow" class="email-code-row">
|
||||
<input type="text" id="regEmailCode" placeholder="邮箱验证码" autocomplete="off" />
|
||||
<button type="button" id="regSendCodeBtn" class="btn-secondary">获取验证码</button>
|
||||
</div>
|
||||
<div class="captcha-row">
|
||||
<span id="regCaptchaQuestion">3 + 5 = ?</span>
|
||||
|
||||
Reference in new issue
Block a user