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
1c138412
Commit
1c138412
authored
Apr 15, 2023
by
littleforest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: fixed grid of the mobile version
parent
8954c246
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
28 deletions
+35
-28
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
+30
-23
No files found.
src/pages/Chat/components/content.tsx
View file @
1c138412
...
@@ -80,9 +80,9 @@ const ChatFirstContent: FC<ChatFirstContentProps> = (props) => {
...
@@ -80,9 +80,9 @@ const ChatFirstContent: FC<ChatFirstContentProps> = (props) => {
{
cardList
.
map
((
item
,
index
)
=>
{
{
cardList
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
Col
lg=
{
8
}
md=
{
12
}
span=
{
8
}
xs=
{
24
}
sm=
{
16
}
key=
{
`${item.title}-card-${index}`
}
>
<
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
}
/>
<
ProductionCard
title=
{
item
.
title
}
content=
{
item
.
content
}
onChange=
{
item
.
onclick
}
/>
</
div
>
</
Row
>
</
Col
>
</
Col
>
);
);
})
}
})
}
...
...
src/pages/Chat/index.less
View file @
1c138412
...
@@ -23,8 +23,6 @@
...
@@ -23,8 +23,6 @@
border-radius: 2px;
border-radius: 2px;
}
}
}
}
.siderTabs {
}
}
}
}
}
.header {
.header {
...
@@ -80,7 +78,6 @@
...
@@ -80,7 +78,6 @@
background-color: white;
background-color: white;
box-shadow: 0 2px 8px #f0f1f2;
box-shadow: 0 2px 8px #f0f1f2;
.chatWrapper {
.chatWrapper {
flex: 1;
padding: 0 16px 0 50px;
padding: 0 16px 0 50px;
:global {
:global {
.ant-input:focus,
.ant-input:focus,
...
@@ -114,3 +111,6 @@
...
@@ -114,3 +111,6 @@
font-size: 15px;
font-size: 15px;
background-color: #009b95;
background-color: #009b95;
}
}
.mobileContent {
padding-top: 68px;
}
src/pages/Chat/index.tsx
View file @
1c138412
...
@@ -61,6 +61,7 @@ const Chat: React.FC = () => {
...
@@ -61,6 +61,7 @@ const Chat: React.FC = () => {
};
};
const
onChange
=
(
value
:
any
)
=>
{
const
onChange
=
(
value
:
any
)
=>
{
console
.
log
(
value
);
value
?.
chatInput
&&
setChat
(
value
?.
chatInput
);
value
?.
chatInput
&&
setChat
(
value
?.
chatInput
);
value
?.
firstInput
&&
setInput
(
value
);
value
?.
firstInput
&&
setInput
(
value
);
};
};
...
@@ -159,7 +160,6 @@ const Chat: React.FC = () => {
...
@@ -159,7 +160,6 @@ const Chat: React.FC = () => {
</
div
>
</
div
>
</
Col
>
</
Col
>
)
}
)
}
<
Col
<
Col
className=
{
styles
.
chatContent
}
className=
{
styles
.
chatContent
}
span=
{
20
}
span=
{
20
}
...
@@ -168,18 +168,20 @@ const Chat: React.FC = () => {
...
@@ -168,18 +168,20 @@ const Chat: React.FC = () => {
md=
{
17
}
md=
{
17
}
xs=
{
isMobile
?
24
:
12
}
xs=
{
isMobile
?
24
:
12
}
>
>
<
div
className=
{
styles
.
header
}
>
{
!
isMobile
&&
(
<
Row
>
<
div
className=
{
styles
.
header
}
>
<
Col
span=
{
24
}
>
<
Row
>
<
Title
level=
{
1
}
>
产品名称
</
Title
>
<
Col
span=
{
24
}
>
</
Col
>
<
Title
level=
{
1
}
>
产品名称
</
Title
>
<
Col
span=
{
24
}
>
</
Col
>
<
Title
level=
{
5
}
className=
{
styles
.
subTitle
}
>
<
Col
span=
{
24
}
>
AI改变世界
<
Title
level=
{
5
}
className=
{
styles
.
subTitle
}
>
</
Title
>
AI改变世界
</
Col
>
</
Title
>
</
Row
>
</
Col
>
</
div
>
</
Row
>
</
div
>
)
}
<
Form
<
Form
form=
{
form
}
form=
{
form
}
initialValues=
{
{
chatInput
:
chat
}
}
initialValues=
{
{
chatInput
:
chat
}
}
...
@@ -188,18 +190,18 @@ const Chat: React.FC = () => {
...
@@ -188,18 +190,18 @@ const Chat: React.FC = () => {
onFinish=
{
onSend
}
onFinish=
{
onSend
}
>
>
{
firstChat
?
(
{
firstChat
?
(
<
NewSession
<
NewSession
questionValue=
{
chat
}
/>
questionValue=
{
chat
}
/>
)
:
(
)
:
(
<
Item
name=
"firstInput"
>
<
div
className=
{
classNames
(
isMobile
&&
styles
.
mobileContent
)
}
>
<
ChatFirstContent
/>
<
Item
name=
"firstInput"
>
</
Item
>
<
ChatFirstContent
/>
</
Item
>
</
div
>
)
}
)
}
<
div
className=
{
styles
.
footer
}
>
<
div
className=
{
styles
.
footer
}
>
<
Row
>
<
Row
>
<
Col
span=
{
16
}
push=
{
4
}
>
<
Col
span=
{
isMobile
?
20
:
16
}
push=
{
isMobile
?
0
:
4
}
>
<
div
className=
{
styles
.
chatWrapper
}
style=
{
{
margin
:
isMobile
&&
'o auto'
}
}
>
<
div
style=
{
{
paddingLeft
:
isMobile
&&
0
}
}
className=
{
styles
.
chatWrapper
}
>
<
Item
name=
"chatInput"
>
<
Item
name=
"chatInput"
>
<
Input
<
Input
placeholder=
"在这里输入你想知道的问题,给我几句提示,我来帮你回答"
placeholder=
"在这里输入你想知道的问题,给我几句提示,我来帮你回答"
...
@@ -208,10 +210,15 @@ const Chat: React.FC = () => {
...
@@ -208,10 +210,15 @@ const Chat: React.FC = () => {
</
Item
>
</
Item
>
</
div
>
</
div
>
</
Col
>
</
Col
>
<
Col
span=
{
4
}
push=
{
4
}
>
<
Col
span=
{
4
}
push=
{
isMobile
?
0
:
4
}
>
<
div
className=
{
styles
.
outputButtonWrapper
}
>
<
div
className=
{
styles
.
outputButtonWrapper
}
>
<
Item
name=
"outputButton"
>
<
Item
name=
"outputButton"
>
<
Button
htmlType=
"submit"
type=
"primary"
size=
"large"
disabled=
{
chat
.
length
===
0
}
>
<
Button
htmlType=
"submit"
type=
"primary"
size=
"large"
disabled=
{
chat
.
length
===
0
}
>
发送
发送
</
Button
>
</
Button
>
</
Item
>
</
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