Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(antd/next): fix arrayCollapse will throw error in accordion mode
- Loading branch information
Showing
7 changed files
with
76 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { ISchema } from '@formily/react' | ||
|
||
export const FormCollapse: ISchema = { | ||
type: 'object', | ||
properties: { | ||
accordion: { | ||
type: 'boolean', | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Switch', | ||
}, | ||
collapsible: { | ||
type: 'string', | ||
enum: ['header', 'disabled'], | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Radio.Group', | ||
'x-component-props': { | ||
defaultValue: 'header', | ||
optionType: 'button', | ||
}, | ||
}, | ||
ghost: { | ||
type: 'boolean', | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Switch', | ||
}, | ||
bordered: { | ||
type: 'boolean', | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Switch', | ||
'x-component-props': { | ||
defaultChecked: true, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export const FormCollapse_o_CollapsePanel: ISchema = { | ||
type: 'object', | ||
properties: { | ||
collapsible: { | ||
type: 'string', | ||
enum: ['header', 'disabled'], | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Radio.Group', | ||
'x-component-props': { | ||
defaultValue: 'header', | ||
optionType: 'button', | ||
}, | ||
}, | ||
header: { | ||
type: 'boolean', | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Input', | ||
}, | ||
extra: { | ||
type: 'boolean', | ||
'x-decorator': 'FormItem', | ||
'x-component': 'Input', | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters