@@ -38,7 +38,7 @@ const FooterButtons: React.FC<{ formInstance: FormInstance }> = ({formInstance})
3838 textarea : '这是一段文本' ,
3939 date : '2021-08-01' ,
4040 cascader : '1,1-1,1-1-1' ,
41- select : '1,2' ,
41+ select : '1-1-1 ,2' ,
4242 avatar : 'c84fb304c180f61bb7db40efef7f85b7' ,
4343 color : '#000000' ,
4444 ideCode : 'console.log("hello world")'
@@ -345,7 +345,20 @@ const FormPage = () => {
345345 label : '选择器' ,
346346 selectMultiple : true ,
347347 options : [
348- { label : '选项1' , value : '1' } ,
348+ {
349+ label : '选项1' , value : '1' ,
350+ children : [
351+ {
352+ label : '选项1-1' ,
353+ value : '1-1' ,
354+ children : [
355+ { label : '选项1-1-1' , value : '1-1-1' } ,
356+ { label : '选项1-1-2' , value : '1-1-2' } ,
357+ ]
358+ } ,
359+ { label : '选项1-2' , value : '1-2' } ,
360+ ]
361+ } ,
349362 { label : '选项2' , value : '2' } ,
350363 { label : '选项3' , value : '3' } ,
351364 ]
@@ -384,7 +397,7 @@ const FormPage = () => {
384397 < Form
385398 form = { leftFormInstance }
386399 layout = { "horizontal" }
387- onFinish = { async ( values ) => {
400+ onFinish = { async ( values ) => {
388401 message . success ( JSON . stringify ( values ) ) ;
389402 } }
390403 footer = { (
@@ -547,7 +560,20 @@ const FormPage = () => {
547560 label = { "选择器" }
548561 selectMultiple = { true }
549562 options = { [
550- { label : '选项1' , value : '1' } ,
563+ {
564+ label : '选项1' , value : '1' ,
565+ children : [
566+ {
567+ label : '选项1-1' ,
568+ value : '1-1' ,
569+ children : [
570+ { label : '选项1-1-1' , value : '1-1-1' } ,
571+ { label : '选项1-1-2' , value : '1-1-2' } ,
572+ ]
573+ } ,
574+ { label : '选项1-2' , value : '1-2' } ,
575+ ]
576+ } ,
551577 { label : '选项2' , value : '2' } ,
552578 { label : '选项3' , value : '3' } ,
553579 ] }
@@ -575,7 +601,7 @@ const FormPage = () => {
575601
576602 < Col span = { 12 } >
577603 < Form
578- onFinish = { async ( values ) => {
604+ onFinish = { async ( values ) => {
579605 message . success ( JSON . stringify ( values ) ) ;
580606 } }
581607 form = { rightFormInstance }
0 commit comments