Skip to content

Commit

Permalink
fix: update page infomation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuhengtan committed May 12, 2023
1 parent 4e4de36 commit 663a153
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
padding: 0;
}

.ant-space {
.width-100p {
width: 100%;
}
4 changes: 1 addition & 3 deletions src/pages/auth/page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,11 @@ const Pages: React.FC = () => {
}, [setRoutes, addKey])

const onClickUpdate = useCallback(() => {
const data = form.getValues()
updatePage(data)
updatePage({ ...form.getValues(), ...form.getHiddenValues() })
}, [form, updatePage])

const onClickCreate = useCallback(() => {
const data = form.getValues()
console.log(data)
const tmp = { ...data }
delete tmp.id
createPage(tmp)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/role/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const Roles: React.FC = () => {
}, [getRoles])

return (
<Space direction="vertical">
<Space direction="vertical" className="width-100p">
<AuthFragment authKey="create">
<Button
type="primary"
Expand Down

0 comments on commit 663a153

Please sign in to comment.