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
215e768c
authored
Mar 11, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui): Improve model testing button layout and styling
parent
0db072de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
24 deletions
+22
-24
web/src/components/ChannelsTable.js
+22
-24
No files found.
web/src/components/ChannelsTable.js
View file @
215e768c
...
...
@@ -450,13 +450,6 @@ const ChannelsTable = () => {
dataIndex
:
'operate'
,
render
:
(
text
,
record
,
index
)
=>
{
if
(
record
.
children
===
undefined
)
{
// 构建模型测试菜单
const
modelMenuItems
=
record
.
models
.
split
(
','
).
map
(
model
=>
({
node
:
'item'
,
name
:
model
,
onClick
:
()
=>
testChannel
(
record
,
model
)
}));
return
(
<
div
>
<
SplitButtonGroup
...
...
@@ -1566,8 +1559,9 @@ const ChannelsTable = () => {
<
div
style
=
{{
display
:
'grid'
,
gridTemplateColumns
:
'repeat(auto-fill, minmax(180px, 1fr))'
,
gap
:
'10px'
gridTemplateColumns
:
'repeat(auto-fill, minmax(200px, 1fr))'
,
gap
:
'12px'
,
marginBottom
:
'16px'
}}
>
{
currentTestChannel
.
models
.
split
(
','
)
.
filter
(
model
=>
model
.
toLowerCase
().
includes
(
modelSearchKeyword
.
toLowerCase
()))
...
...
@@ -1575,27 +1569,31 @@ const ChannelsTable = () => {
return
(
<
Button
key
=
{
index
}
theme
=
"light"
type
=
"tertiary"
style
=
{{
height
:
'auto'
,
padding
:
'8px 12px'
,
textAlign
:
'center'
,
}}
onClick
=
{()
=>
{
testChannel
(
currentTestChannel
,
model
);
}}
>
{
model
}
<
/Button
>
theme
=
"light"
type
=
"tertiary"
style
=
{{
height
:
'auto'
,
padding
:
'10px 12px'
,
textAlign
:
'center'
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
,
width
:
'100%'
,
borderRadius
:
'6px'
}}
onClick
=
{()
=>
{
testChannel
(
currentTestChannel
,
model
);
}}
>
{
model
}
<
/Button
>
);
})}
<
/div
>
{
/* 显示搜索结果数量 */
}
{
modelSearchKeyword
&&
(
<
Typography
.
Text
type
=
"secondary"
style
=
{{
marginTop
:
'16px'
,
display
:
'block'
}}
>
<
Typography
.
Text
type
=
"secondary"
style
=
{{
display
:
'block'
}}
>
{
t
(
'找到'
)}
{
currentTestChannel
.
models
.
split
(
','
).
filter
(
model
=>
model
.
toLowerCase
().
includes
(
modelSearchKeyword
.
toLowerCase
())
).
length
}
{
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