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
1ae143c5
authored
Dec 20, 2024
by
Calcium-Ion
Committed by
GitHub
Dec 20, 2024
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #636 from HynoR/fix/smfix
fix: 修复添加模型切换模式时,初始化空值导致的判断问题
parents
d083d1ec
e95d6520
Hide 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 @
1ae143c5
...
...
@@ -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