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[];
|
||||
roles: Role[];
|
||||
postIds?: number[];
|
||||
posts: Post[];
|
||||
posts?: Post[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -139,14 +139,8 @@ const [BasicDrawer, drawerApi] = useVbenDrawer({
|
||||
},
|
||||
]);
|
||||
// 更新 && 赋值
|
||||
const {
|
||||
postIds = [],
|
||||
posts = [],
|
||||
roleIds = [],
|
||||
roles = [],
|
||||
user,
|
||||
} = await findUserInfo(id);
|
||||
const postOptions = posts.map((item) => ({
|
||||
const { postIds, posts, roleIds, roles, user } = await findUserInfo(id);
|
||||
const postOptions = (posts ?? []).map((item) => ({
|
||||
label: item.postName,
|
||||
value: item.postId,
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user