diff --git a/src/component/form/form.field.js b/src/component/form/form.field.js index e6c11a924..0b67041b8 100644 --- a/src/component/form/form.field.js +++ b/src/component/form/form.field.js @@ -9,6 +9,7 @@ baseCls: "bi-form-field", label: "", el: {}, + headerCls: "", labelAlign: "right", // 文字默认右对齐 validate: function () { return true; @@ -69,6 +70,7 @@ textAlign: o.labelAlign, text: o.label, width: o.labelWidth, + cls: o.headerCls, rgap: 20 // 表单文字与右侧输入间距均为20px } }, field] : [field] diff --git a/src/component/form/form.js b/src/component/form/form.js index 27734455f..de8caeaea 100644 --- a/src/component/form/form.js +++ b/src/component/form/form.js @@ -18,7 +18,8 @@ label: "", el: {} }], - labelWidth: "" + labelWidth: "", + headerCls: "", // 左侧文字样式 }, render: function () { @@ -44,6 +45,7 @@ height: item.el.height || 28, labelAlign: o.labelAlign, labelWidth: o.labelWidth, + headerCls: o.headerCls, el: item.el, label: item.label, tip: item.tip,