We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
希望动态表单支持无限嵌套写法
function Demo() { const config = { fields:[ { name: 'test', field: { type: 'input', props: { placeholder: '请输入', style: { width: 120, }, }, }, }, { name: 'outer', label: '外层表单', isList: true, container: 'Card', field: { type: 'dynamicdepfieldcomp', props: { fields: [ { name: '嵌套表单', label: 'inner', isList: true, container: 'Card', field: { type: 'dynamicdepfieldcomp', props:{ fields: [ { name: 'test', label: 'test', field: 'input', }, ], }, }, }, { name: 'q', rules: [{ required: true, message: 'type something' }], field: { type: 'input', props: { placeholder: '请输入', style: { width: 120, }, }, }, }, { name: 'fruilt', label: '水果', field: { type: 'select', props: { placeholder: '请输入', style: { width: 120, }, }, }, remoteSource: { init: false, url: 'https://run.mocky.io/v3/a435a830-a2b3-49ce-bc6b-40298ba57bcb', method: 'GET', converter: ({ data }) => { return data.map((item) => { return { text: item.text, value: item.value, }; }); }, }, }, { name: 'goods', label: '货物', initialValue: 'oil', initialSource: [ { label: '石油', value: 'oil', }, { label: '煤', value: 'coal', }, ], field: { type: 'select', props: { placeholder: '请输入', style: { width: 120, }, }, }, }, ], }, }, }, { label: ' ', colon: false, render: { type: 'button', props: { htmlType: 'submit', type: 'primary', children: 'submit', }, }, }, { label: ' ', colon: false, render: { type: 'button', props: { onClick: () => { this.ref.current.validateFields().then((values) => { console.log('表单值: ', values); }); }, children: 'api提交', }, }, }, ], }; return ( <Form initialValues={{ radiogroup: 'peach' }} onFinish={(values) => { console.log('Success:', values); }} {...config} /> ); }
The text was updated successfully, but these errors were encountered:
正好需要这个场景,求大佬更新下
Sorry, something went wrong.
No branches or pull requests
Description
希望动态表单支持无限嵌套写法
Solution
The text was updated successfully, but these errors were encountered: