Browse Source

聊天内容靠右

master
xueyinfei 2 weeks ago
parent
commit
31c4965416
  1. 4
      vue-fastapi-frontend/src/layout/components/AppMain.vue
  2. 8
      vue-fastapi-frontend/src/views/aichat/aichat.vue

4
vue-fastapi-frontend/src/layout/components/AppMain.vue

@ -32,7 +32,7 @@ const route = useRoute()
const tagsViewStore = useTagsViewStore()
const showDiv = ref(false)
const largeDiv = ref(true)
const aiChatDivStyle = ref({display: 'none',width: '450px',height: '600px',bottom: '16px',right: '16px'})
const aiChatDivStyle = ref({display: 'none',width: '450px',height: '100%',bottom: '0',right: '0'})
onMounted(() => {
@ -61,7 +61,7 @@ function showDivClick(){
function littleChatDiv(){
largeDiv.value = !largeDiv.value
aiChatDivStyle.value = {display: 'block',width: '450px',height: '600px',bottom: '16px',right: '16px'}
aiChatDivStyle.value = {display: 'block',width: '450px',height: '100%',bottom: '0',right: '0'}
}
function closeChatDiv(){

8
vue-fastapi-frontend/src/views/aichat/aichat.vue

@ -15,17 +15,17 @@
<template v-for="(item, index) in chatList" :key="index">
<!-- 问题 -->
<div v-if="item.type === 'question'" class="item-content mb-16 lighter" style="margin-bottom: 16px;font-weight: 400">
<div class="avatar">
<div v-if="item.type === 'question'" class="item-content mb-16 lighter" style="margin-bottom: 16px;font-weight: 400;display: flex;align-items: flex-start;max-width: 100%;flex-direction: row-reverse;">
<div class="avatar" style="margin-left: 10px">
<el-avatar style="width:30px;height: 30px;background: #3370FF">
<img src="@/assets/aichat/user-icon.svg" style="width: 30px" alt="" />
</el-avatar>
</div>
<div class="content">
<div class="content" style="max-width: 100%;word-break: break-all;white-space: pre-wrap;">
<div class="text break-all pre-wrap" style="word-break: break-all;white-space: pre-wrap;">
{{ item.content }}
</div>
<el-tag type="success" style="margin-bottom: 5px;cursor: pointer" v-for="(fileName,index) in item.file" :disable-transitions="false" @click="downloadFile(fileName.file,fileName.bucket,item.sessionId)">{{fileName.file}}</el-tag>
<el-tag type="success" style="margin-bottom: 5px;cursor: pointer;display: inline-block" v-for="(fileName,index) in item.file" :disable-transitions="false" @click="downloadFile(fileName.file,fileName.bucket,item.sessionId)">{{fileName.file}}</el-tag>
</div>
</div>
<!-- 回答 -->

Loading…
Cancel
Save