Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
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
Unverified
Commit
9a45fb64
authored
Apr 06, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 未更新信息时也能保存
parent
881c3654
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/pages/model/detail/components/InputDataModal.tsx
+9
-7
No files found.
src/pages/model/detail/components/InputDataModal.tsx
View file @
9a45fb64
...
@@ -80,19 +80,21 @@ const InputDataModal = ({
...
@@ -80,19 +80,21 @@ const InputDataModal = ({
const
updateData
=
useCallback
(
const
updateData
=
useCallback
(
async
(
e
:
FormData
)
=>
{
async
(
e
:
FormData
)
=>
{
if
(
!
e
.
dataId
)
return
;
if
(
!
e
.
dataId
)
return
;
if
(
e
.
text
===
defaultValues
.
text
&&
e
.
q
===
defaultValues
.
q
)
return
;
await
putModelDataById
({
if
(
e
.
text
!==
defaultValues
.
text
||
e
.
q
!==
defaultValues
.
q
)
{
dataId
:
e
.
dataId
,
await
putModelDataById
({
text
:
e
.
text
,
dataId
:
e
.
dataId
,
q
:
e
.
q
===
defaultValues
.
q
?
''
:
e
.
q
text
:
e
.
text
,
});
q
:
e
.
q
===
defaultValues
.
q
?
''
:
e
.
q
});
onSuccess
();
}
toast
({
toast
({
title
:
'修改回答成功'
,
title
:
'修改回答成功'
,
status
:
'success'
status
:
'success'
});
});
onClose
();
onClose
();
onSuccess
();
},
},
[
defaultValues
,
onClose
,
onSuccess
,
toast
]
[
defaultValues
,
onClose
,
onSuccess
,
toast
]
);
);
...
...
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