{
    "type": "page",
    "title": "向导组件事件",
    "regions": [
        "body",
        "toolbar",
        "header"
    ],
    "body": [
        {
            "name": "wizard-prev",
            "type": "button",
            "label": "跳转上一步",
            "level": "primary",
            "className": "mr-3 mb-3",
            "onEvent": {
                "click": {
                    "actions": [
                        {
                            "actionType": "prev",
                            "componentId": "wizard-receiver",
                            "description": "跳转上一步"
                        }
                    ]
                }
            }
        },
        {
            "name": "wizard-next",
            "type": "button",
            "label": "跳转下一步",
            "level": "primary",
            "className": "mr-3 mb-3",
            "onEvent": {
                "click": {
                    "actions": [
                        {
                            "actionType": "next",
                            "componentId": "wizard-receiver",
                            "description": "跳转下一步"
                        }
                    ]
                }
            }
        },
        {
            "name": "wizard-goto-step",
            "type": "button",
            "label": "跳转第三步",
            "level": "primary",
            "className": "mr-3 mb-3",
            "onEvent": {
                "click": {
                    "actions": [
                        {
                            "actionType": "goto-step",
                            "componentId": "wizard-receiver",
                            "description": "跳转第三步",
                            "args": {
                                "step": 3
                            }
                        }
                    ]
                }
            }
        },
        {
            "name": "wizard-step-submit",
            "type": "button",
            "label": "本步骤提交",
            "level": "primary",
            "className": "mr-3 mb-3",
            "onEvent": {
                "click": {
                    "actions": [
                        {
                            "actionType": "step-submit",
                            "componentId": "wizard-receiver",
                            "description": "本步骤提交"
                        }
                    ]
                }
            }
        },
        {
            "name": "wizard-submit",
            "type": "button",
            "label": "全部提交",
            "level": "primary",
            "className": "mr-3 mb-3",
            "onEvent": {
                "click": {
                    "actions": [
                        {
                            "actionType": "submit",
                            "componentId": "wizard-receiver",
                            "description": "全部提交"
                        }
                    ]
                }
            }
        },
        {
            "name": "wizard",
            "id": "wizard-receiver",
            "type": "wizard",
            "initApi": "/amis/api/mock2/form/initForm",
            "steps": [
                {
                    "title": "第一步",
                    "body": [
                        {
                            "name": "website",
                            "label": "网址",
                            "type": "input-url",
                            "required": true
                        },
                        {
                            "name": "email",
                            "label": "邮箱",
                            "type": "input-email",
                            "required": true
                        }
                    ],
                    "api": "/amis/api/mock2/form/saveForm?waitSeconds=2"
                },
                {
                    "title": "第二步",
                    "body": [
                        {
                            "name": "defaultEmail",
                            "type": "input-email",
                            "label": "Email",
                            "value": "test@test.com"
                        },
                        {
                            "type": "input-text",
                            "name": "name"
                        }
                    ],
                    "initApi": "/amis/api/mock2/form/initForm",
                    "api": "/amis/api/mock2/form/saveForm?waitSeconds=2"
                },
                {
                    "title": "确定",
                    "body": [
                        "最后一步了，确认要提交吗？"
                    ],
                    "api": "/amis/api/mock2/form/saveForm?waitSeconds=2"
                }
            ],
            "onEvent": {
                "inited": {
                    "actions": [
                        {
                            "actionType": "toast",
                            "msgType": "info",
                            "msg": "派发 inited 事件"
                        }
                    ]
                },
                "change": {
                    "actions": [
                        {
                            "actionType": "toast",
                            "msgType": "info",
                            "msg": "派发 change 事件"
                        }
                    ]
                },
                "stepChange": {
                    "actions": [
                        {
                            "actionType": "toast",
                            "msgType": "info",
                            "msg": "派发 stepChange 事件"
                        }
                    ]
                },
                "finished": {
                    "actions": [
                        {
                            "actionType": "toast",
                            "msgType": "info",
                            "msg": "派发 finished 事件"
                        }
                    ]
                },
                "submitSucc": {
                    "actions": [
                        {
                            "actionType": "toast",
                            "msgType": "info",
                            "msg": "派发 submitSucc 事件"
                        }
                    ]
                },
                "submitFail": {
                    "actions": [
                        {
                            "actionType": "toast",
                            "msgType": "info",
                            "msg": "派发 submitFail 事件"
                        }
                    ]
                },
                "stepSubmitSucc": {
                    "actions": [
                        {
                            "actionType": "toast",
                            "msgType": "info",
                            "msg": "派发 stepSubmitSucc 事件"
                        }
                    ]
                },
                "stepSubmitFail": {
                    "actions": [
                        {
                            "actionType": "toast",
                            "msgType": "info",
                            "msg": "派发 stepSubmitFail 事件"
                        }
                    ]
                }
            }
        }
    ]
}