Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ec567f8c
authored
Nov 21, 2023
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rollback EditUser.js
parent
3eb7843b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
24 deletions
+5
-24
web/src/pages/User/EditUser.js
+5
-24
No files found.
web/src/pages/User/EditUser.js
View file @
ec567f8c
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Form
,
Header
,
Segment
}
from
'semantic-ui-react'
;
import
{
Button
,
Form
,
Header
,
Segment
}
from
'semantic-ui-react'
;
import
{
useParams
,
useNavigate
}
from
'react-router-dom'
;
import
{
useParams
,
useNavigate
}
from
'react-router-dom'
;
import
{
API
,
isMobile
,
showError
,
showSuccess
}
from
'../../helpers'
;
import
{
API
,
showError
,
showSuccess
}
from
'../../helpers'
;
import
{
renderQuota
,
renderQuotaWithPrompt
}
from
'../../helpers/render'
;
import
{
renderQuota
,
renderQuotaWithPrompt
}
from
'../../helpers/render'
;
import
Title
from
"@douyinfe/semi-ui/lib/es/typography/title"
;
import
{
SideSheet
,
Space
}
from
"@douyinfe/semi-ui"
;
const
EditUser
=
(
props
)
=>
{
const
EditUser
=
()
=>
{
const
params
=
useParams
();
const
params
=
useParams
();
const
userId
=
params
.
id
;
const
userId
=
params
.
id
;
const
[
loading
,
setLoading
]
=
useState
(
true
);
const
[
loading
,
setLoading
]
=
useState
(
true
);
...
@@ -86,24 +84,8 @@ const EditUser = (props) => {
...
@@ -86,24 +84,8 @@ const EditUser = (props) => {
return
(
return
(
<>
<>
<
SideSheet
<
Segment
loading
=
{
loading
}
>
placement
=
{
'left'
}
<
Header
as
=
'h3'
>
更新用户信息
<
/Header
>
title
=
{
<
Title
level
=
{
3
}
>
更新用户信息
<
/Title>
}
headerStyle
=
{{
borderBottom
:
'1px solid var(--semi-color-border)'
}}
bodyStyle
=
{{
borderBottom
:
'1px solid var(--semi-color-border)'
}}
visible
=
{
props
.
visiable
}
footer
=
{
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
Space
>
<
Button
theme
=
'solid'
size
=
{
'large'
}
onClick
=
{
submit
}
>
提交
<
/Button
>
<
Button
theme
=
'solid'
size
=
{
'large'
}
type
=
{
'tertiary'
}
onClick
=
{
handleCancel
}
>
取消
<
/Button
>
<
/Space
>
<
/div
>
}
closeIcon
=
{
null
}
onCancel
=
{()
=>
handleCancel
()}
width
=
{
isMobile
()
?
'100%'
:
600
}
>
<
Form
autoComplete
=
'new-password'
>
<
Form
autoComplete
=
'new-password'
>
<
Form
.
Field
>
<
Form
.
Field
>
<
Form
.
Input
<
Form
.
Input
...
@@ -200,8 +182,7 @@ const EditUser = (props) => {
...
@@ -200,8 +182,7 @@ const EditUser = (props) => {
<
Button
onClick
=
{
handleCancel
}
>
取消
<
/Button
>
<
Button
onClick
=
{
handleCancel
}
>
取消
<
/Button
>
<
Button
positive
onClick
=
{
submit
}
>
提交
<
/Button
>
<
Button
positive
onClick
=
{
submit
}
>
提交
<
/Button
>
<
/Form
>
<
/Form
>
<
/Segment
>
<
/SideSheet
>
<
/
>
<
/
>
);
);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment