el-form的label和表单自适应填满一行且靠左对齐

el-form的label和表单自适应填满一行且靠左对齐_第1张图片

如图:label和content均向左靠齐,且填满整行;

.el-form-item__label-wrap {
  margin-left: 0px !important;

}
.el-form-item__label{
    word-break: keep-all  !important;
}
.el-form-item__content{
    margin: 0 !important;
    width: -webkit-fill-available;
}
.el-input.el-input--medium,.el-select.el-select--medium {
    width: 100%;
}
.el-form-item.el-form-item--medium {
    display: flex;
    justify-content: start;
}

word-break:keep-all;文字保持一行

width:-webkit-fill-available;宽度自适应;

你可能感兴趣的:(vue.js,前端,javascript,elementui)