@@ -62,6 +62,8 @@ export const FormProps = {
62
62
layout : PropTypes . oneOf ( [ 'horizontal' , 'inline' , 'vertical' ] ) ,
63
63
labelCol : PropTypes . shape ( ColProps ) . loose ,
64
64
wrapperCol : PropTypes . shape ( ColProps ) . loose ,
65
+ colon : PropTypes . bool ,
66
+ labelAlign : PropTypes . oneOf ( [ 'left' , 'right' ] ) ,
65
67
form : PropTypes . object ,
66
68
// onSubmit: React.FormEventHandler<any>;
67
69
prefixCls : PropTypes . string ,
@@ -128,6 +130,7 @@ const Form = {
128
130
props : initDefaultProps ( FormProps , {
129
131
layout : 'horizontal' ,
130
132
hideRequiredMark : false ,
133
+ colon : true ,
131
134
} ) ,
132
135
Item : FormItem ,
133
136
createFormField : createFormField ,
@@ -148,7 +151,7 @@ const Form = {
148
151
} ,
149
152
provide ( ) {
150
153
return {
151
- FormProps : this . $props ,
154
+ FormContextProps : this ,
152
155
// https://github.com/vueComponent/ant-design-vue/issues/446
153
156
collectFormItemContext :
154
157
this . form && this . form . templateContext
@@ -178,6 +181,11 @@ const Form = {
178
181
this . $forceUpdate ( ) ;
179
182
} ,
180
183
} ,
184
+ computed : {
185
+ vertical ( ) {
186
+ return this . layout === 'vertical' ;
187
+ } ,
188
+ } ,
181
189
beforeUpdate ( ) {
182
190
this . formItemContexts . forEach ( ( number , c ) => {
183
191
if ( c . $forceUpdate ) {
@@ -220,7 +228,7 @@ const Form = {
220
228
[ `${ prefixCls } -hide-required-mark` ] : hideRequiredMark ,
221
229
} ) ;
222
230
if ( autoFormCreate ) {
223
- warning ( false , '`autoFormCreate` is deprecated. please use `form` instead.' ) ;
231
+ warning ( false , 'Form' , ' `autoFormCreate` is deprecated. please use `form` instead.') ;
224
232
const DomForm =
225
233
this . DomForm ||
226
234
createDOMForm ( {
0 commit comments