feat: 向导组件 事件&动作 配置

This commit is contained in:
liuzedong02 2022-03-02 20:54:18 +08:00
parent 94e2fb327f
commit e45f3dbb8d
3 changed files with 2 additions and 44 deletions

View File

@ -32,11 +32,6 @@ order: 73
"label": "邮箱",
"type": "input-email",
"required": true
},
{
"name": "ajax",
"label": "按钮",
"type": "button"
}
]
},

View File

@ -89,43 +89,6 @@ export default {
title: '向导组件事件',
regions: ['body', 'toolbar', 'header'],
body: [
<<<<<<< HEAD
// {
// name: "wizard-next",
// type: "button",
// label: '',
// level: 'primary',
// onEvent: {
// click: {
// actions: [
// {
// actionType: 'next',
// componentId: 'wizard-receiver',
// description: ''
// }
// ]
// }
// }
// },
// {
// name: "wizard-prev",
// type: "button",
// label: '',
// level: 'primary',
// onEvent: {
// click: {
// actions: [
// {
// actionType: 'prev',
// componentId: 'wizard-receiver',
// description: ''
// }
// ]
// }
// }
// },
=======
>>>>>>> 700b723e (feat: 向导组件 事件&动作 配置)
...generateActions([
{
actionName: 'prev',

View File

@ -229,7 +229,7 @@ export default class Wizard extends React.Component<WizardProps, WizardState> {
initFinishedField,
store,
messages: {fetchSuccess, fetchFailed},
onInit // c
onInit
} = this.props;
if (isEffectiveApi(initApi, store.data, initFetch)) {
@ -675,7 +675,7 @@ export default class Wizard extends React.Component<WizardProps, WizardState> {
redirect,
reload,
env,
onFinished // c
onFinished
} = this.props;
if (await this.dispatchEvent('finished', store.data)) {