fix: 结构时null不会被使用
This commit is contained in:
parent
5cb1e36fba
commit
a09234071f
2
apps/web-antd/src/api/system/user/model.d.ts
vendored
2
apps/web-antd/src/api/system/user/model.d.ts
vendored
@ -91,7 +91,7 @@ export interface UserInfoResponse {
|
|||||||
roleIds?: string[];
|
roleIds?: string[];
|
||||||
roles: Role[];
|
roles: Role[];
|
||||||
postIds?: number[];
|
postIds?: number[];
|
||||||
posts: Post[];
|
posts?: Post[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -139,14 +139,8 @@ const [BasicDrawer, drawerApi] = useVbenDrawer({
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
// 更新 && 赋值
|
// 更新 && 赋值
|
||||||
const {
|
const { postIds, posts, roleIds, roles, user } = await findUserInfo(id);
|
||||||
postIds = [],
|
const postOptions = (posts ?? []).map((item) => ({
|
||||||
posts = [],
|
|
||||||
roleIds = [],
|
|
||||||
roles = [],
|
|
||||||
user,
|
|
||||||
} = await findUserInfo(id);
|
|
||||||
const postOptions = posts.map((item) => ({
|
|
||||||
label: item.postName,
|
label: item.postName,
|
||||||
value: item.postId,
|
value: item.postId,
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user