真是个悲伤的故事,由于动态表单里面嵌套动态表单,然后就不知道怎么获取和设置值了,然后公司的小朋友教我了QAQ
动态表单为
totalStrategy:{ strategy:{ mainArea:123, mainPublicArea:456, }, strategy:{ mainArea:123, mainPublicArea:456, } }
获取
form.getFieldValue(['totalStrategy', field.name, 'strategy', strategy.name, 'mainArea'])
设置
form.setFields([{ name: ['totalStrategy', field.name, 'strategy', strategy.name, 'mainPublicArea'], value: secondCity }])