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
f8efe264
authored
Mar 28, 2025
by
Ordinary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fixed bug where target.id was null when clicking 'x' icon
parent
638950c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
web/src/pages/Setting/Operation/SettingsGeneral.js
+8
-7
No files found.
web/src/pages/Setting/Operation/SettingsGeneral.js
View file @
f8efe264
...
...
@@ -27,9 +27,10 @@ export default function GeneralSettings(props) {
const
refForm
=
useRef
();
const
[
inputsRow
,
setInputsRow
]
=
useState
(
inputs
);
function
onChange
(
value
,
e
)
{
const
name
=
e
.
target
.
id
;
setInputs
((
inputs
)
=>
({
...
inputs
,
[
name
]:
value
}));
function
handleFieldChange
(
fieldName
)
{
return
(
value
)
=>
{
setInputs
((
inputs
)
=>
({
...
inputs
,
[
fieldName
]:
value
}));
};
}
function
onSubmit
()
{
...
...
@@ -98,7 +99,7 @@ export default function GeneralSettings(props) {
label
=
{
t
(
'充值链接'
)}
initValue
=
{
''
}
placeholder
=
{
t
(
'例如发卡网站的购买链接'
)}
onChange
=
{
onChange
}
onChange
=
{
handleFieldChange
(
'TopUpLink'
)
}
showClear
/>
<
/Col
>
...
...
@@ -108,7 +109,7 @@ export default function GeneralSettings(props) {
label
=
{
t
(
'文档地址'
)}
initValue
=
{
''
}
placeholder
=
{
t
(
'例如 https://docs.newapi.pro'
)}
onChange
=
{
onChange
}
onChange
=
{
handleFieldChange
(
'general_setting.docs_link'
)
}
showClear
/>
<
/Col
>
...
...
@@ -118,7 +119,7 @@ export default function GeneralSettings(props) {
label
=
{
t
(
'单位美元额度'
)}
initValue
=
{
''
}
placeholder
=
{
t
(
'一单位货币能兑换的额度'
)}
onChange
=
{
onChange
}
onChange
=
{
handleFieldChange
(
'QuotaPerUnit'
)
}
showClear
onClick
=
{()
=>
setShowQuotaWarning
(
true
)}
/
>
...
...
@@ -129,7 +130,7 @@ export default function GeneralSettings(props) {
label
=
{
t
(
'失败重试次数'
)}
initValue
=
{
''
}
placeholder
=
{
t
(
'失败重试次数'
)}
onChange
=
{
onChange
}
onChange
=
{
handleFieldChange
(
'RetryTimes'
)
}
showClear
/>
<
/Col
>
...
...
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