refactor(formcontrol): restore the grid layout properties of fromcontrol

This commit is contained in:
xzdry 2022-05-16 09:55:05 +08:00
parent 40e5af4f06
commit 96b3c98cad
3 changed files with 33 additions and 1 deletions

View File

@ -35,6 +35,14 @@ const exampleProperties: Static<typeof FormControlPropsSpec> = {
labelAlign: 'left',
colon: false,
help: '',
labelCol: {
span: 3,
offset: 0,
},
wrapperCol: {
span: 21,
offset: 0,
},
};
export const FormControl = implementRuntimeComponent({

View File

@ -36,5 +36,25 @@ export const FormControlPropsSpec = {
colon: Type.Boolean({
title: 'Colon',
category: Category.Style,
})
}),
labelCol: Type.Object(
{
span: Type.Number(),
offset: Type.Number(),
},
{
title: 'Label Col',
category: Category.Layout,
}
),
wrapperCol: Type.Object(
{
span: Type.Number(),
offset: Type.Number(),
},
{
title: 'Wrapper Col',
category: Category.Layout,
}
),
};

View File

@ -13,6 +13,10 @@ export const InputPropsSpec = {
category: Category.Basic,
weight: 1,
}),
updateWhenDefaultValueChanges: Type.Boolean({
title: 'Update When Default Value Changes',
category: 'Basic',
}),
allowClear: Type.Boolean({
title: 'Allow Clear',
category: Category.Basic,