feat: add action props to ModalAction component

add action props to ModalAction component, then can use the action static props for the instance function

Change-Id: Ib22120105deb30f108218d040fc1fc33f88b39bc
This commit is contained in:
Jingwei.Zhang 2023-09-07 10:25:18 +08:00
parent 74ffcc6215
commit d5b58ac16d
2 changed files with 6 additions and 0 deletions

View File

@ -537,6 +537,7 @@ export class ActionButton extends Component {
onFinishAction={onFinishAction}
onCancelAction={onCancelAction}
modalProps={modalProps}
action={action}
/>
</Modal>
);

View File

@ -158,6 +158,11 @@ export default class ModalAction extends BaseForm {
return (this.item || {}).id;
}
get actionId() {
const { action } = this.props;
return action?.id;
}
get items() {
const { items } = this.props;
return items;