mirror of https://github.com/ElemeFE/element
parent
e204e28320
commit
2d8c887b6a
|
@ -84,11 +84,12 @@
|
||||||
return ret;
|
return ret;
|
||||||
},
|
},
|
||||||
contentStyle() {
|
contentStyle() {
|
||||||
let ret = {};
|
var ret = {};
|
||||||
const labelWidth = this.labelWidth || this.form.labelWidth;
|
if (this.form.labelPosition === 'top' || this.form.inline) return ret;
|
||||||
const form = this.form;
|
var labelWidth = this.labelWidth || this.form.labelWidth;
|
||||||
if (form.labelPosition === 'top' || form.inline) return ret;
|
if (labelWidth) {
|
||||||
if (labelWidth) ret.marginLeft = labelWidth;
|
ret.marginLeft = labelWidth;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
},
|
},
|
||||||
form() {
|
form() {
|
||||||
|
|
|
@ -21,10 +21,16 @@
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
& .el-form-item__label,
|
& .el-form-item__label {
|
||||||
|
float: none;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
& .el-form-item__content {
|
& .el-form-item__content {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
&.el-form--label-top .el-form-item__content {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@b form-item {
|
@b form-item {
|
||||||
|
|
Loading…
Reference in New Issue