|
@@ -161,7 +161,13 @@ const RoleMenu: React.FC<RoleMenuProps> = ({ menuId, onSelect, itemCount }) => {
|
|
|
visible={state.visible}
|
|
|
formRef={formRef}
|
|
|
isKeyPressSubmit
|
|
|
- onVisibleChange={visible => setState({ ...state, visible })}
|
|
|
+ onVisibleChange={visible => {
|
|
|
+ if (!visible) {
|
|
|
+ setState({ ...state, visible, showExtraFormItem: false, defaultMenuData: null })
|
|
|
+ } else {
|
|
|
+ setState({ ...state, visible })
|
|
|
+ }
|
|
|
+ }}
|
|
|
title={state.modalType === ModalType.ADD ? '添加新的角色' : '更新角色'}
|
|
|
width="500px"
|
|
|
layout="horizontal"
|