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
7f5041ba
Commit
7f5041ba
authored
Aug 22, 2025
by
weiw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉校验
parent
944fd2ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
26 deletions
+2
-26
eslint.config.mjs
+2
-0
src/pages/Collect/Collect.tsx
+0
-26
No files found.
eslint.config.mjs
View file @
7f5041ba
...
@@ -4,6 +4,8 @@ import antfu from '@antfu/eslint-config'
...
@@ -4,6 +4,8 @@ import antfu from '@antfu/eslint-config'
export default antfu({
export default antfu({
react: true,
react: true,
rules: {
rules: {
// 禁用缩进检查
'style/indent': 'off',
'n/prefer-global/process': ['off'], // 关闭process报错
'n/prefer-global/process': ['off'], // 关闭process报错
'react-hooks/exhaustive-deps': ['off'],
'react-hooks/exhaustive-deps': ['off'],
'ban-ts-comment': ['off'],
'ban-ts-comment': ['off'],
...
...
src/pages/Collect/Collect.tsx
View file @
7f5041ba
...
@@ -6,10 +6,7 @@ import { formatMarkdown } from '../Chat/components/ChatItem/markdownFormatter'
...
@@ -6,10 +6,7 @@ import { formatMarkdown } from '../Chat/components/ChatItem/markdownFormatter'
import
{
ChatAnswerAttachment
}
from
'../Chat/components/ChatItem/ChatAnswerAttchment'
import
{
ChatAnswerAttachment
}
from
'../Chat/components/ChatItem/ChatAnswerAttchment'
import
styles
from
'./Collect.module.less'
import
styles
from
'./Collect.module.less'
import
{
fetchQueryCollectionList
}
from
'@/api/collect'
import
{
fetchQueryCollectionList
}
from
'@/api/collect'
import
CopyIcon
from
'@/assets/svg/copy.svg?react'
import
DeleteIcon
from
'@/assets/svg/delete.svg?react'
import
DeleteIcon
from
'@/assets/svg/delete.svg?react'
import
type
{
Answer
}
from
'@/types/chat'
import
useToast
from
'@/hooks/useToast'
import
{
fetchDelCollection
}
from
'@/api/chat'
import
{
fetchDelCollection
}
from
'@/api/chat'
import
{
MarkdownDetail
}
from
'@/components/MarkdownDetail'
import
{
MarkdownDetail
}
from
'@/components/MarkdownDetail'
import
AIcon
from
'@/assets/svg/aicon.svg?react'
import
AIcon
from
'@/assets/svg/aicon.svg?react'
...
@@ -28,7 +25,6 @@ export const Collect: React.FC = () => {
...
@@ -28,7 +25,6 @@ export const Collect: React.FC = () => {
const
[
pageNum
,
setPageNum
]
=
useState
(
1
)
const
[
pageNum
,
setPageNum
]
=
useState
(
1
)
const
[
pageSize
]
=
useState
(
5
)
const
[
pageSize
]
=
useState
(
5
)
const
[
total
,
setTotal
]
=
useState
(
0
)
const
[
total
,
setTotal
]
=
useState
(
0
)
const
showToast
=
useToast
()
const
getCollectList
=
async
()
=>
{
const
getCollectList
=
async
()
=>
{
setIsLoading
(
true
)
setIsLoading
(
true
)
...
@@ -47,18 +43,6 @@ export const Collect: React.FC = () => {
...
@@ -47,18 +43,6 @@ export const Collect: React.FC = () => {
},
500
)
},
500
)
}
}
const
handleCopy
=
async
(
item
:
Answer
)
=>
{
if
(
!
navigator
.
clipboard
)
{
showToast
(
'您的浏览器不支持复制'
,
'error'
)
return
}
const
text
=
`问:
${
item
.
question
}
\n答:
${
item
.
answer
}
`
await
navigator
.
clipboard
.
writeText
(
text
)
showToast
(
'复制成功!快去分享吧!'
,
'success'
)
}
const
handleDelete
=
(
item
:
any
)
=>
{
const
handleDelete
=
(
item
:
any
)
=>
{
setIsOpen
(
true
)
setIsOpen
(
true
)
setCollectId
(
item
.
collectionId
)
setCollectId
(
item
.
collectionId
)
...
@@ -153,16 +137,6 @@ export const Collect: React.FC = () => {
...
@@ -153,16 +137,6 @@ export const Collect: React.FC = () => {
<
div
className=
"mt-[12px] flex gap-[4px] justify-between items-center"
>
<
div
className=
"mt-[12px] flex gap-[4px] justify-between items-center"
>
<
div
className=
"text-12px text-[#B2B8C1]"
>
{
item
.
collectionTime
}
</
div
>
<
div
className=
"text-12px text-[#B2B8C1]"
>
{
item
.
collectionTime
}
</
div
>
<
div
>
<
div
>
<
Tooltip
color=
"foreground"
content=
"复制"
className=
"capitalize"
>
<
Button
variant=
"light"
isIconOnly
aria
-
label=
"CopyIcon"
onPress=
{
()
=>
handleCopy
(
item
)
}
>
<
CopyIcon
/>
</
Button
>
</
Tooltip
>
<
Tooltip
color=
"foreground"
content=
"删除"
className=
"capitalize"
>
<
Tooltip
color=
"foreground"
content=
"删除"
className=
"capitalize"
>
<
Button
<
Button
variant=
"light"
variant=
"light"
...
...
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