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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import { Avatar, Image } from 'antd';
|
import { Avatar, Image } from 'antd';
|
||||||
import { AvatarSize } from 'antd/es/avatar/SizeContext';
|
import { AvatarSize } from 'antd/es/avatar/AvatarContext';
|
||||||
|
|
||||||
export default (props: {
|
export default (props: {
|
||||||
avatar: string;
|
avatar: string;
|
||||||
|
|
|
@ -46,7 +46,7 @@ export default () => {
|
||||||
history.push(`/account/user`);
|
history.push(`/account/user`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!type) {
|
if (!type || !UserDetailTabs[type]) {
|
||||||
setTabActiveKey(UserDetailTabs.user_info);
|
setTabActiveKey(UserDetailTabs.user_info);
|
||||||
history.replace({
|
history.replace({
|
||||||
pathname: location.pathname,
|
pathname: location.pathname,
|
||||||
|
|
|
@ -55,7 +55,7 @@ export default () => {
|
||||||
history.push(`/account/user-group`);
|
history.push(`/account/user-group`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!type) {
|
if (!type || !UserGroupDetailTabs[type]) {
|
||||||
setTabActiveKey(UserGroupDetailTabs.member);
|
setTabActiveKey(UserGroupDetailTabs.member);
|
||||||
history.push({
|
history.push({
|
||||||
pathname: location.pathname,
|
pathname: location.pathname,
|
||||||
|
|
|
@ -99,7 +99,7 @@ const UpdateUser = (props: UpdateFormProps) => {
|
||||||
*/
|
*/
|
||||||
const cancel = async () => {
|
const cancel = async () => {
|
||||||
if (onCancel) {
|
if (onCancel) {
|
||||||
await onCancel();
|
onCancel();
|
||||||
}
|
}
|
||||||
setSubmitLoading(false);
|
setSubmitLoading(false);
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
|
|
Loading…
Reference in New Issue