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
41e461f3
authored
Nov 27, 2023
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人设置可点击复制模型名称
parent
394b0abc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
+12
-1
web/src/components/PersonalSetting.js
+12
-1
No files found.
web/src/components/PersonalSetting.js
View file @
41e461f3
...
@@ -257,6 +257,15 @@ const PersonalSetting = () => {
...
@@ -257,6 +257,15 @@ const PersonalSetting = () => {
setOpenTransfer
(
false
);
setOpenTransfer
(
false
);
}
}
const
copyText
=
async
(
text
)
=>
{
if
(
await
copy
(
text
))
{
showSuccess
(
'已复制:'
+
text
);
}
else
{
// setSearchKeyword(text);
Modal
.
error
({
title
:
'无法复制到剪贴板,请手动复制'
,
content
:
text
});
}
}
return
(
return
(
<
div
style
=
{{
lineHeight
:
'40px'
}}
>
<
div
style
=
{{
lineHeight
:
'40px'
}}
>
<
Layout
>
<
Layout
>
...
@@ -313,7 +322,9 @@ const PersonalSetting = () => {
...
@@ -313,7 +322,9 @@ const PersonalSetting = () => {
<div style={{marginTop: 10}}>
<div style={{marginTop: 10}}>
<Space wrap>
<Space wrap>
{models.map((model) => (
{models.map((model) => (
<Tag key={model} color="cyan">
<Tag key={model} color="cyan" onClick={() => {
copyText(model)
}}>
{model}
{model}
</Tag>
</Tag>
))}
))}
...
...
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