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
8170ed6b
authored
Dec 19, 2024
by
HynoR
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复添加模型切换模式时,初始化空值导致的判断问题
parent
75699475
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
6 deletions
+1
-6
web/src/pages/Setting/Operation/ModelSettingsVisualEditor.js
+1
-6
No files found.
web/src/pages/Setting/Operation/ModelSettingsVisualEditor.js
View file @
8170ed6b
...
...
@@ -75,7 +75,7 @@ export default function ModelSettingsVisualEditor(props) {
output
.
ModelPrice
[
model
.
name
]
=
parseFloat
(
model
.
price
)
}
else
{
if
(
model
.
ratio
!==
''
)
output
.
ModelRatio
[
model
.
name
]
=
parseFloat
(
model
.
ratio
);
if
(
model
.
completionRatio
!=
''
)
output
.
CompletionRatio
[
model
.
name
]
=
parseFloat
(
model
.
completionRatio
);
if
(
model
.
completionRatio
!=
=
''
)
output
.
CompletionRatio
[
model
.
name
]
=
parseFloat
(
model
.
completionRatio
);
}
});
...
...
@@ -203,11 +203,6 @@ export default function ModelSettingsVisualEditor(props) {
showError
(
'模型名称已存在'
);
return
;
}
// 不允许同时添加固定价格和倍率
if
(
values
.
price
!==
''
&&
(
values
.
ratio
!==
''
||
values
.
completionRatio
!==
''
))
{
showError
(
'固定价格和倍率不能同时存在'
);
return
;
}
setModels
(
prev
=>
[{
name
:
values
.
name
,
price
:
values
.
price
||
''
,
...
...
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