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
50f70b21
Commit
50f70b21
authored
Jan 14, 2025
by
HoMeTown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: mdimg替换
parent
fb57570e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
src/App.css
+3
-3
src/components/MarkdownDetail/index.tsx
+7
-4
src/pages/Chat/components/ChatItem/ChatItemUser.tsx
+1
-1
src/pages/Chat/components/ChatWelcome/index.tsx
+1
-1
No files found.
src/App.css
View file @
50f70b21
...
...
@@ -9,11 +9,11 @@
PingFangSC
,
PingFang
SC
;
font-weight
:
400
;
font-size
:
1
4
px
;
font-size
:
1
5
px
;
color
:
#161823
;
line-height
:
24px
;
}
@media
screen
and
(
max-width
:
480px
)
{
/*
@media screen and (max-width: 480px) {
img {
width: 100% !important;
display: block;
...
...
@@ -24,7 +24,7 @@
width: 40%;
display: block;
margin: 12px 0;
}
}
*/
h3
{
font-size
:
14px
;
}
...
...
src/components/MarkdownDetail/index.tsx
View file @
50f70b21
...
...
@@ -4,6 +4,7 @@ import rehypeRaw from 'rehype-raw'
import
rehypeSanitize
from
'rehype-sanitize'
import
remarkGfm
from
'remark-gfm'
import
{
PhotoProvider
,
PhotoView
}
from
'react-photo-view'
import
{
Image
}
from
'@nextui-org/react'
interface
MarkdownDetailProps
{
children
:
ReactNode
...
...
@@ -16,13 +17,15 @@ export const MarkdownDetail: React.FC<MarkdownDetailProps> = memo(({ children })
remarkPlugins=
{
[
remarkGfm
]
}
className=
"markdown-body !bg-[#fff] flex flex-col text-[#27353C] text-[15px]"
components=
{
{
img
:
({
...
data
}):
JSX
.
Element
=>
(
<
PhotoProvider
maskOpacity=
{
0.1
}
bannerVisible=
{
false
}
>
img
:
({
...
data
}):
JSX
.
Element
=>
{
return
(
<
PhotoProvider
maskOpacity=
{
0.5
}
bannerVisible=
{
false
}
>
<
PhotoView
{
...
(
data
as
any
)}
>
<
img
className=
"w-2/3 cursor-pointer mt-[24px] mb-[8px]"
{
...
data
}
/>
<
Image
width=
{
300
}
height=
{
300
}
className=
"cursor-pointer mt-[24px] mb-[8px]"
src=
{
data
.
src
}
/>
</
PhotoView
>
</
PhotoProvider
>
),
)
},
// p(data): JSX.Element
{
// return <p className="leading-[24px] break-words w-full"
{...
data
}
/
>
//
},
...
...
src/pages/Chat/components/ChatItem/ChatItemUser.tsx
View file @
50f70b21
...
...
@@ -11,7 +11,7 @@ export const ChatItemUser: React.FC<ChatItemUserProps> = ({ record }) => {
<
div
className=
"chatItemUser"
>
<
div
className=
"flex justify-end"
>
<
div
className=
"sm:block w-[65px] flex-shrink-0"
></
div
>
<
div
className=
"text-[1
4
px] mr-[20px] bg-[#29B6FD] rounded-[20px] box-border text-[#fff] px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
>
{
record
.
question
}
</
div
>
<
div
className=
"text-[1
5
px] mr-[20px] bg-[#29B6FD] rounded-[20px] box-border text-[#fff] px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
>
{
record
.
question
}
</
div
>
<
Avatar
className=
"flex-shrink-0"
src=
{
AvatarUser
}
/>
</
div
>
<
div
className=
"h-[32px] w-full"
></
div
>
...
...
src/pages/Chat/components/ChatWelcome/index.tsx
View file @
50f70b21
...
...
@@ -13,7 +13,7 @@ export const ChatWelcome: React.FC = () => {
>
<
div
className=
"content"
>
<
p
className=
"text-[16px] sm:text-[18px] font-medium text-[#333]"
>
您好,我是晓得
</
p
>
<
p
className=
"text-[1
4
px] mt-[8px] sm:text-13px text-[#27353C] font-300"
>
做为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~
</
p
>
<
p
className=
"text-[1
5
px] mt-[8px] sm:text-13px text-[#27353C] font-300"
>
做为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~
</
p
>
</
div
>
</
motion
.
div
>
</
div
>
...
...
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