优化代码

pull/43/head
smallbun 2023-09-08 12:41:39 +08:00
parent 207d0ff7f7
commit 4f52d44966
4 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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,

View File

@ -99,7 +99,7 @@ const UpdateUser = (props: UpdateFormProps) => {
*/
const cancel = async () => {
if (onCancel) {
await onCancel();
onCancel();
}
setSubmitLoading(false);
form.resetFields();