import React from 'react'; import ProForm, { ProFormText, ProFormDependency, ProFormGroup, ProFormList, } from '@ant-design/pro-form'; import { Form } from 'antd'; import type { NamePath } from 'antd/es/form/interface'; const Demo = () => { const initialValues = { a: 1, b: 2, c: { a: 3, b: 4, c: { a: 5, }, d: [{ a: 6, b: 7 }], e: [{ a: 8, b: 9 }], }, }; const depName1: NamePath[] = [ 'a', 'b', ['c', 'a'], ['c', 'b'], ['c', 'c', 'a'], ['c', 'd'], ['c', 'e'], ]; const depName2: NamePath[] = ['a', 'b', ['c', 'a']]; const depName3: NamePath[] = ['a', 'b', ['c', 'a']]; return ( {(depValues) => ( `} extra="a, b, c.a取自局部" >
                      {JSON.stringify(depValues, null, 2)}
                    
)}
{(depValues) => ( `} extra="a, b, c.a取自全局" >
                      {JSON.stringify(depValues)}
                    
)}
`} > {(depValues) => (
              {JSON.stringify(depValues)}
            
)}
); }; export default Demo;