adjust mobile

This commit is contained in:
AceDataCloud committed 2023-04-08 12:30:02 +08:00
1 parent 75884bbaa7
commit 1b5efc6cb5
3 files changed
+29 -13

No files matched your search

+14 -5
View File
@@ -1,8 +1,8 @@
<template>
<div class="introduction">
<h2 class="title">ChatGPT</h2>
<el-row class="introduction-items" :gutter="15">
<el-col :span="8">
<el-row class="introduction-items" justify="center" :gutter="15">
<el-col :md="8" :sm="24" :xs="24">
<div class="text-center">
<font-awesome-icon icon="fa-regular fa-sun" class="icon icon-rotate" />
</div>
@@ -23,7 +23,7 @@
@click="$emit('draft', $t('conversation.message.explainDefinition'))"
/>
</el-col>
<el-col :span="8">
<el-col :md="8" :sm="24" :xs="24">
<div class="text-center">
<font-awesome-icon icon="fa-solid fa-bolt" class="icon icon-rotate" />
</div>
@@ -32,7 +32,7 @@
<introduction-item :content="$t('conversation.message.supportStream')" />
<introduction-item :content="$t('conversation.message.rejectInvalidPrompt')" />
</el-col>
<el-col :span="8">
<el-col :md="8" :sm="24" :xs="24">
<div class="text-center">
<font-awesome-icon icon="fa-solid fa-triangle-exclamation" class="icon icon-rotate" />
</div>
@@ -70,7 +70,8 @@ export default defineComponent({
.introduction {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 50%;
transform: translate(-50%, -50%);
.title {
height: 70px;
@@ -98,4 +99,12 @@ export default defineComponent({
}
}
}
@media (max-width: 767px) {
.introduction {
width: 90%;
left: 5%;
transform: translateY(-50%);
}
}
</style>
+1 -1
View File
@@ -50,7 +50,7 @@ $width: 300px;
height: 100%;
}
@media (max-width: 800px) {
@media (max-width: 767px) {
.container {
display: block;
}
+14 -7
View File
@@ -1,7 +1,7 @@
<template>
<div class="conversation">
<el-row v-if="!messages || messages.length === 0" class="introduction-wrapper">
<el-col :span="12" :offset="6">
<el-row v-if="!messages || messages.length === 0" class="introduction-wrapper" justify="center">
<el-col :md="14" :sm="22" :xs="22">
<introduction @draft="onDraft" />
</el-col>
</el-row>
@@ -15,8 +15,8 @@
bot: message.author.type === 'bot'
}"
>
<el-row>
<el-col :span="12" :offset="6">
<el-row justify="center">
<el-col :md="14" :sm="22" :xs="22">
<message
:content="message.content"
:author="message.author"
@@ -28,8 +28,8 @@
</div>
</div>
<div class="footer">
<el-row>
<el-col :span="12" :offset="6">
<el-row justify="center">
<el-col :md="14" :sm="22" :xs="22">
<new-message-box
v-model="input"
:initializing="loading"
@@ -338,7 +338,7 @@ export default defineComponent({
flex-direction: column;
display: flex;
.messages-wrapper {
margin-bottom: 200px;
margin-bottom: 100px;
}
.introduction-wrapper {
flex: 1;
@@ -363,5 +363,12 @@ export default defineComponent({
bottom: 0;
width: calc(100% - 300px);
}
@media (max-width: 767px) {
.footer {
left: 0px;
width: calc(100%);
}
}
}
</style>