feat(Form): add label-align prop

This commit is contained in:
陈嘉涵
2020-02-13 16:00:50 +08:00
parent fbe3d20558
commit f1e25123a3
4 changed files with 13 additions and 1 deletions
+10 -1
View File
@@ -433,10 +433,19 @@ export default createComponent({
);
}
},
getProp(key) {
if (this.vanForm && isDef(this.vanForm[key])) {
return this.vanForm[key];
}
return this[key];
},
},
render() {
const { slots, labelAlign } = this;
const { slots } = this;
const labelAlign = this.getProp('labelAlign');
const scopedSlots = {
icon: this.genLeftIcon,