Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sdream-ai-fe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯明涛
sdream-ai-fe
Commits
944fd2ae
Commit
944fd2ae
authored
Aug 22, 2025
by
weiw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 隐藏复制功能
parent
8df296f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
src/pages/Chat/components/ChatItem/ChatAnswerOperate.tsx
+2
-13
No files found.
src/pages/Chat/components/ChatItem/ChatAnswerOperate.tsx
View file @
944fd2ae
...
@@ -2,7 +2,6 @@ import { Button, Tooltip } from '@heroui/react'
...
@@ -2,7 +2,6 @@ import { Button, Tooltip } from '@heroui/react'
import
{
useState
}
from
'react'
import
{
useState
}
from
'react'
import
{
useDebounceFn
}
from
'ahooks'
import
{
useDebounceFn
}
from
'ahooks'
import
type
{
Answer
}
from
'@/types/chat'
import
type
{
Answer
}
from
'@/types/chat'
import
CopyIcon
from
'@/assets/svg/copy.svg?react'
import
CollectIcon
from
'@/assets/svg/shouc.svg?react'
import
CollectIcon
from
'@/assets/svg/shouc.svg?react'
import
CollectIconA
from
'@/assets/svg/shoucA.svg?react'
import
CollectIconA
from
'@/assets/svg/shoucA.svg?react'
import
useToast
from
'@/hooks/useToast'
import
useToast
from
'@/hooks/useToast'
...
@@ -19,16 +18,6 @@ export const ChatAnswerOperate: React.FC<ChatAnswerOperateProps> = ({ answer })
...
@@ -19,16 +18,6 @@ export const ChatAnswerOperate: React.FC<ChatAnswerOperateProps> = ({ answer })
// const [isUnLike, setIsUnLike] = useState(answer.feedbackStatus === '02')
// const [isUnLike, setIsUnLike] = useState(answer.feedbackStatus === '02')
const
[
isOpenUnLikeModal
,
setIsOpenUnLikeOpen
]
=
useState
(
false
)
const
[
isOpenUnLikeModal
,
setIsOpenUnLikeOpen
]
=
useState
(
false
)
const
handleCopy
=
async
()
=>
{
if
(
!
navigator
.
clipboard
)
{
showToast
(
'您的浏览器不支持复制'
,
'error'
)
return
}
await
navigator
.
clipboard
.
writeText
(
answer
.
answer
)
showToast
(
'复制成功!快去分享吧!'
,
'success'
)
}
const
handleCollect
=
useDebounceFn
(
async
()
=>
{
const
handleCollect
=
useDebounceFn
(
async
()
=>
{
if
(
!
isCollect
)
{
if
(
!
isCollect
)
{
setIsCollect
(
true
)
setIsCollect
(
true
)
...
@@ -105,9 +94,9 @@ export const ChatAnswerOperate: React.FC<ChatAnswerOperateProps> = ({ answer })
...
@@ -105,9 +94,9 @@ export const ChatAnswerOperate: React.FC<ChatAnswerOperateProps> = ({ answer })
</Button>
</Button>
</Tooltip> */
}
</Tooltip> */
}
{
/* 复制 */
}
{
/* 复制 */
}
<
Tooltip
color=
"foreground"
content=
"复制"
className=
"capitalize"
>
{
/*
<Tooltip color="foreground" content="复制" className="capitalize">
<Button variant="light" isIconOnly aria-label="CopyIcon" onPress={handleCopy}><CopyIcon /></Button>
<Button variant="light" isIconOnly aria-label="CopyIcon" onPress={handleCopy}><CopyIcon /></Button>
</
Tooltip
>
</Tooltip>
*/
}
{
/* 收藏 */
}
{
/* 收藏 */
}
<
Tooltip
color=
"foreground"
content=
{
isCollect
?
'取消收藏'
:
'收藏'
}
className=
"capitalize"
>
<
Tooltip
color=
"foreground"
content=
{
isCollect
?
'取消收藏'
:
'收藏'
}
className=
"capitalize"
>
<
Button
variant=
"light"
isIconOnly
aria
-
label=
"CollectIcon"
onPress=
{
handleCollect
.
run
}
>
<
Button
variant=
"light"
isIconOnly
aria
-
label=
"CollectIcon"
onPress=
{
handleCollect
.
run
}
>
...
...
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