Commit 2d8c887b authored by baiyaaaaa's avatar baiyaaaaa Committed by 杨奕

fix form inline label bug

This reverts commit d76d28dd54f9f02222d5190182a3e6d8790bcbe6.

fix form inline label bug
parent e204e283
......@@ -84,11 +84,12 @@
return ret;
},
contentStyle() {
let ret = {};
const labelWidth = this.labelWidth || this.form.labelWidth;
const form = this.form;
if (form.labelPosition === 'top' || form.inline) return ret;
if (labelWidth) ret.marginLeft = labelWidth;
var ret = {};
if (this.form.labelPosition === 'top' || this.form.inline) return ret;
var labelWidth = this.labelWidth || this.form.labelWidth;
if (labelWidth) {
ret.marginLeft = labelWidth;
}
return ret;
},
form() {
......
......@@ -21,10 +21,16 @@
margin-right: 10px;
vertical-align: top;
}
& .el-form-item__label,
& .el-form-item__label {
float: none;
display: inline-block;
}
& .el-form-item__content {
display: inline-block;
}
&.el-form--label-top .el-form-item__content {
display: block;
}
}
}
@b form-item {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment