Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chatGLM
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘坚-丰林-DEV
chatGLM
Commits
192ec780
Commit
192ec780
authored
Apr 15, 2023
by
Ylg
Browse files
Options
Browse Files
Download
Plain Diff
resolve file conflict
parents
22a08e65
1c138412
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
25 deletions
+34
-25
content.tsx
src/pages/Chat/components/content.tsx
+2
-2
index.less
src/pages/Chat/index.less
+3
-3
index.tsx
src/pages/Chat/index.tsx
+29
-20
No files found.
src/pages/Chat/components/content.tsx
View file @
192ec780
...
...
@@ -80,9 +80,9 @@ const ChatFirstContent: FC<ChatFirstContentProps> = (props) => {
{
cardList
.
map
((
item
,
index
)
=>
{
return
(
<
Col
lg=
{
8
}
md=
{
12
}
span=
{
8
}
xs=
{
24
}
sm=
{
16
}
key=
{
`${item.title}-card-${index}`
}
>
<
div
className=
{
styles
.
cardPadding
}
>
<
Row
justify=
{
isMobile
&&
'center'
}
className=
{
styles
.
cardPadding
}
>
<
ProductionCard
title=
{
item
.
title
}
content=
{
item
.
content
}
onChange=
{
item
.
onclick
}
/>
</
div
>
</
Row
>
</
Col
>
);
})
}
...
...
src/pages/Chat/index.less
View file @
192ec780
...
...
@@ -23,8 +23,6 @@
border-radius: 2px;
}
}
.siderTabs {
}
}
}
.header {
...
...
@@ -80,7 +78,6 @@
background-color: white;
box-shadow: 0 2px 8px #f0f1f2;
.chatWrapper {
flex: 1;
padding: 0 16px 0 50px;
:global {
.ant-input:focus,
...
...
@@ -114,3 +111,6 @@
font-size: 15px;
background-color: #009b95;
}
.mobileContent {
padding-top: 68px;
}
src/pages/Chat/index.tsx
View file @
192ec780
...
...
@@ -63,6 +63,7 @@ const Chat: React.FC = () => {
};
const
onChange
=
(
value
:
any
)
=>
{
console
.
log
(
value
);
value
?.
chatInput
&&
setChat
(
value
?.
chatInput
);
value
?.
firstInput
&&
setInput
(
value
);
};
...
...
@@ -161,7 +162,6 @@ const Chat: React.FC = () => {
</
div
>
</
Col
>
)
}
<
Col
className=
{
styles
.
chatContent
}
span=
{
20
}
...
...
@@ -170,18 +170,20 @@ const Chat: React.FC = () => {
md=
{
17
}
xs=
{
isMobile
?
24
:
12
}
>
<
div
className=
{
styles
.
header
}
>
<
Row
>
<
Col
span=
{
24
}
>
<
Title
level=
{
1
}
>
产品名称
</
Title
>
</
Col
>
<
Col
span=
{
24
}
>
<
Title
level=
{
5
}
className=
{
styles
.
subTitle
}
>
AI改变世界
</
Title
>
</
Col
>
</
Row
>
</
div
>
{
!
isMobile
&&
(
<
div
className=
{
styles
.
header
}
>
<
Row
>
<
Col
span=
{
24
}
>
<
Title
level=
{
1
}
>
产品名称
</
Title
>
</
Col
>
<
Col
span=
{
24
}
>
<
Title
level=
{
5
}
className=
{
styles
.
subTitle
}
>
AI改变世界
</
Title
>
</
Col
>
</
Row
>
</
div
>
)
}
<
Form
form=
{
form
}
initialValues=
{
{
chatInput
:
chat
}
}
...
...
@@ -195,14 +197,16 @@ const Chat: React.FC = () => {
answerValue=
''
/>
)
:
(
<
Item
name=
"firstInput"
>
<
ChatFirstContent
/>
</
Item
>
<
div
className=
{
classNames
(
isMobile
&&
styles
.
mobileContent
)
}
>
<
Item
name=
"firstInput"
>
<
ChatFirstContent
/>
</
Item
>
</
div
>
)
}
<
div
className=
{
styles
.
footer
}
>
<
Row
>
<
Col
span=
{
16
}
push=
{
4
}
>
<
div
className=
{
styles
.
chatWrapper
}
style=
{
{
margin
:
isMobile
&&
'0 auto'
}
}
>
<
Col
span=
{
isMobile
?
20
:
16
}
push=
{
isMobile
?
0
:
4
}
>
<
div
style=
{
{
paddingLeft
:
isMobile
&&
0
}
}
className=
{
styles
.
chatWrapper
}
>
<
Item
name=
"chatInput"
>
<
Input
placeholder=
"在这里输入你想知道的问题,给我几句提示,我来帮你回答"
...
...
@@ -211,10 +215,15 @@ const Chat: React.FC = () => {
</
Item
>
</
div
>
</
Col
>
<
Col
span=
{
4
}
push=
{
4
}
>
<
Col
span=
{
4
}
push=
{
isMobile
?
0
:
4
}
>
<
div
className=
{
styles
.
outputButtonWrapper
}
>
<
Item
name=
"outputButton"
>
<
Button
htmlType=
"submit"
type=
"primary"
size=
"large"
>
<
Button
htmlType=
"submit"
type=
"primary"
size=
"large"
disabled=
{
chat
.
length
===
0
}
>
发送
</
Button
>
</
Item
>
...
...
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