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
8160fb64
authored
Apr 25, 2025
by
IcedTangerine
Committed by
GitHub
Apr 25, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #843 from IllTamer/pr
fix: the pricing available popover display anyway
parents
a0017f22
b26b34ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
web/src/components/ModelPricing.js
+8
-3
No files found.
web/src/components/ModelPricing.js
View file @
8160fb64
...
...
@@ -81,7 +81,7 @@ const ModelPricing = () => {
}
function
renderAvailable
(
available
)
{
return
(
return
available
?
(
<
Popover
content
=
{
<
div
style
=
{{
padding
:
8
}}
>
{
t
(
'您的分组可以使用该模型'
)}
<
/div
>
...
...
@@ -98,7 +98,7 @@ const ModelPricing = () => {
>
<
IconVerify
style
=
{{
color
:
'green'
}}
size
=
'large'
/>
<
/Popover
>
);
)
:
null
;
}
const
columns
=
[
...
...
@@ -109,7 +109,12 @@ const ModelPricing = () => {
// if record.enable_groups contains selectedGroup, then available is true
return
renderAvailable
(
record
.
enable_groups
.
includes
(
selectedGroup
));
},
sorter
:
(
a
,
b
)
=>
a
.
available
-
b
.
available
,
sorter
:
(
a
,
b
)
=>
{
const
aAvailable
=
a
.
enable_groups
.
includes
(
selectedGroup
);
const
bAvailable
=
b
.
enable_groups
.
includes
(
selectedGroup
);
return
Number
(
aAvailable
)
-
Number
(
bAvailable
);
},
defaultSortOrder
:
'descend'
,
},
{
title
:
t
(
'模型名称'
),
...
...
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