fix: 注册表单仅输入区域滚动,暗色主题输入框颜色优化
- 注册Tab结构: Text(固定) + VScrollPanel(仅Form) + Button(固定) - 暗色主题输入框背景 #0f172a -> #1e293b,更协调
This commit is contained in:
parent
d1b3ca0914
commit
b0d6b59613
@ -217,7 +217,7 @@
|
||||
border-bottom-color: #818cf8 !important;
|
||||
}
|
||||
[data-theme="dark"] .login-window .inputbox {
|
||||
background: #0f172a !important;
|
||||
background: #1e293b !important;
|
||||
border-color: #475569 !important;
|
||||
color: #e2e8f0 !important;
|
||||
}
|
||||
|
||||
@ -121,21 +121,21 @@
|
||||
"name": "register",
|
||||
"label": "注册账号",
|
||||
"content": {
|
||||
"widgettype": "VScrollPanel",
|
||||
"options": {"height": "100%"},
|
||||
"widgettype": "VBox",
|
||||
"options": {"gap": "8px", "height": "100%"},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {"gap": "8px"},
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"otext": "手机号需短信验证后方可注册",
|
||||
"i18n": true,
|
||||
"css": "login-desc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "VScrollPanel",
|
||||
"options": {"height": "100%", "flex": "1"},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"otext": "手机号需短信验证后方可注册",
|
||||
"i18n": true,
|
||||
"css": "login-desc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Form",
|
||||
"id": "register_form",
|
||||
@ -162,20 +162,20 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"id": "reg_sms_btn",
|
||||
"options": {"label": "发送验证码", "i18n": true, "css": "sms-send-btn"},
|
||||
"binds": [
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"id": "reg_sms_btn",
|
||||
"options": {"label": "发送验证码", "i18n": true, "css": "sms-send-btn"},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "script",
|
||||
"target": "self",
|
||||
"script": "var form=bricks.getWidgetById('register_form',bricks.app);if(!form)return;var cell=form._getValue().mobile;if(!cell||cell.length<11){alert('请输入正确的手机号');return;}var btn=this;btn.disabled=true;btn.text_w&&btn.text_w.set_otext('发送中...');fetch('{{sms_code_url}}?_webbricks_=1&cellphone='+encodeURIComponent(cell)).then(function(r){return r.json()}).then(function(d){if(d.status==='ok'){var w=form.name_inputs['codeid'];if(w)w.setValue(d.data.key);btn.text_w&&btn.text_w.set_otext('已发送');var s=60;var t=setInterval(function(){s--;if(s<=0){clearInterval(t);btn.disabled=false;btn.text_w&&btn.text_w.set_otext('重新发送')}else btn.text_w&&btn.text_w.set_otext(s+'s')},1000)}else{alert(d.data.message||'发送验证码出错');btn.disabled=false;btn.text_w&&btn.text_w.set_otext('发送验证码')}}).catch(function(e){alert('网络错误: '+e);btn.disabled=false;btn.text_w&&btn.text_w.set_otext('发送验证码')})"
|
||||
}
|
||||
]
|
||||
"wid": "self",
|
||||
"event": "click",
|
||||
"actiontype": "script",
|
||||
"target": "self",
|
||||
"script": "var form=bricks.getWidgetById('register_form',bricks.app);if(!form)return;var cell=form._getValue().mobile;if(!cell||cell.length<11){alert('请输入正确的手机号');return;}var btn=this;btn.disabled=true;btn.text_w&&btn.text_w.set_otext('发送中...');fetch('{{sms_code_url}}?_webbricks_=1&cellphone='+encodeURIComponent(cell)).then(function(r){return r.json()}).then(function(d){if(d.status==='ok'){var w=form.name_inputs['codeid'];if(w)w.setValue(d.data.key);btn.text_w&&btn.text_w.set_otext('已发送');var s=60;var t=setInterval(function(){s--;if(s<=0){clearInterval(t);btn.disabled=false;btn.text_w&&btn.text_w.set_otext('重新发送')}else btn.text_w&&btn.text_w.set_otext(s+'s')},1000)}else{alert(d.data.message||'发送验证码出错');btn.disabled=false;btn.text_w&&btn.text_w.set_otext('发送验证码')}}).catch(function(e){alert('网络错误: '+e);btn.disabled=false;btn.text_w&&btn.text_w.set_otext('发送验证码')})"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user