标签和值在材料设计中与引导程序重叠
问题描述:
我在我的余烬应用程序中使用mdb。我为输入字段生成动态值。在UI中,值和标签重叠。如何处理它?标签和值在材料设计中与引导程序重叠
<div class="md-form">
<i class="fa fa-user-o prefix grey-text iconSize"></i>
{{input type="text" id="firstName" class="form-control" value=model.firstName}}
<label for="firstName">First Name<i class="mandatoryIcon">*</i></label>
</div>
答
试试这个:
didInsertElement() {
this._super(...arguments);
if (this.get('model.firstName') !== null) {
Ember.$('firstName').focus();
}
}
你总是可以使用自动对焦功能属性以及
{{input type="text" id="firstName" class="form-control" value=model.firstName autofocus=true}}