对于我正在使用的插件,我必须有一个看起来像这样的状态:
getInitialState() {
return {
invalid: true,
access: {
access_code: '',
zipcode: '',
password: '',
confirm: '',
hospital_id: '',
},
}
},
Run Code Online (Sandbox Code Playgroud)
如何在不设置其余访问权限的情况下设置hospital_id的状态?
这似乎删除了除hospital_id之外的所有内容:
this.setState({access: {hospital_id: 1}})
Run Code Online (Sandbox Code Playgroud) 我有两个并排的数字(带标题),每个数字都充当链接。出于某种原因,左链接的文本有一个额外的带下划线的空格,即使它没有出现在我的 html 文件中。这可能是间距问题吗?我是 CSS 新手,所以可能会有冗余/矛盾。
这是问题的预览:缩放图像
#leg {
text-align: center;
}
#leg_tag {
text-align: center;
color: white;
}
.leg_link {
margin-left: 10px;
margin-right: 10px;
}
figure {
display: inline-block;
margin: 0 auto 0 auto;
}Run Code Online (Sandbox Code Playgroud)
<div id="leg">
<p id="leg_tag">How to reach me:</p>
<a class="leg_link" href="..." target="_blank">
<figure>
<img src="..." width="30" height="30">
<figcaption>
<p>My GitHub!</p>
</figcaption>
</figure>
</a>
<a class="leg_link" href="...">
<figure>
<img src="..." width="30" height="30">
<figcaption>
<p>My LinkedIn!</p>
</figcaption>
</figure>
</a>
</div>Run Code Online (Sandbox Code Playgroud)
编辑:问题已经解决,但我仍然很好奇为什么第二个链接没有空格,而第一个链接有。想法?
我有验证组的规则(需要 3 个之一)。效果很好,但是,我只需要满足 3 个要求中的 1 个就可以了,这取决于表单中的选择。
rules: {
cloudfront_7: {
require_from_group: {
depends: function(element) {
if ($( "#classify" ).val() == "PIC" ){
return false;
} else {
return [1, ".verification-group"];
}
}
}
},
cloudfront_8: {
require_from_group: {
depends: function(element) {
if ($( "#classify" ).val() == "PIC" ){
return false;
} else {
return [1, ".verification-group"];
}
}
}
},
cloudfront_9: {
require_from_group: {
depends: function(element) {
if ($( "#classify" ).val() == "PIC" ){
return false;
} else { …Run Code Online (Sandbox Code Playgroud)