mirror of https://gitee.com/topiam/eiam
⚡ 优化代码
parent
207d0ff7f7
commit
4f52d44966
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import { Avatar, Image } from 'antd';
|
||||
import { AvatarSize } from 'antd/es/avatar/SizeContext';
|
||||
import { AvatarSize } from 'antd/es/avatar/AvatarContext';
|
||||
|
||||
export default (props: {
|
||||
avatar: string;
|
||||
|
|
|
@ -46,7 +46,7 @@ export default () => {
|
|||
history.push(`/account/user`);
|
||||
return;
|
||||
}
|
||||
if (!type) {
|
||||
if (!type || !UserDetailTabs[type]) {
|
||||
setTabActiveKey(UserDetailTabs.user_info);
|
||||
history.replace({
|
||||
pathname: location.pathname,
|
||||
|
|
|
@ -55,7 +55,7 @@ export default () => {
|
|||
history.push(`/account/user-group`);
|
||||
return;
|
||||
}
|
||||
if (!type) {
|
||||
if (!type || !UserGroupDetailTabs[type]) {
|
||||
setTabActiveKey(UserGroupDetailTabs.member);
|
||||
history.push({
|
||||
pathname: location.pathname,
|
||||
|
|
|
@ -99,7 +99,7 @@ const UpdateUser = (props: UpdateFormProps) => {
|
|||
*/
|
||||
const cancel = async () => {
|
||||
if (onCancel) {
|
||||
await onCancel();
|
||||
onCancel();
|
||||
}
|
||||
setSubmitLoading(false);
|
||||
form.resetFields();
|
||||
|
|
Loading…
Reference in New Issue