perf: Improving the conversation to a left-right layout(#2286)
* refactor: Optimize code * feat: Improving the conversation to a left-right layout(#2286)
This commit is contained in:
parent
2a84c58d4b
commit
cc7f49fa8b
@ -33,7 +33,6 @@
|
|||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"marked": "^12.0.2",
|
"marked": "^12.0.2",
|
||||||
"md-editor-v3": "^4.16.7",
|
"md-editor-v3": "^4.16.7",
|
||||||
"medium-zoom": "^1.1.0",
|
|
||||||
"mermaid": "^10.9.0",
|
"mermaid": "^10.9.0",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.0",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
|
|||||||
@ -1,19 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 问题内容 -->
|
<!-- 问题内容 -->
|
||||||
<div class="item-content mb-16 lighter">
|
<div class="qustion-content item-content mb-16 lighter">
|
||||||
<div class="avatar">
|
<div class="content mr-16">
|
||||||
<el-image
|
|
||||||
v-if="application.user_avatar"
|
|
||||||
:src="application.user_avatar"
|
|
||||||
alt=""
|
|
||||||
fit="cover"
|
|
||||||
style="width: 32px; height: 32px; display: block"
|
|
||||||
/>
|
|
||||||
<AppAvatar v-else>
|
|
||||||
<img src="@/assets/user-icon.svg" style="width: 50%" alt="" />
|
|
||||||
</AppAvatar>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<div class="text break-all pre-wrap">
|
<div class="text break-all pre-wrap">
|
||||||
<div class="mb-8" v-if="document_list.length">
|
<div class="mb-8" v-if="document_list.length">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
@ -90,6 +78,18 @@
|
|||||||
{{ chatRecord.problem_text }}
|
{{ chatRecord.problem_text }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="avatar">
|
||||||
|
<el-image
|
||||||
|
v-if="application.user_avatar"
|
||||||
|
:src="application.user_avatar"
|
||||||
|
alt=""
|
||||||
|
fit="cover"
|
||||||
|
style="width: 32px; height: 32px; display: block"
|
||||||
|
/>
|
||||||
|
<AppAvatar v-else>
|
||||||
|
<img src="@/assets/user-icon.svg" style="width: 50%" alt="" />
|
||||||
|
</AppAvatar>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -137,6 +137,10 @@ function downloadFile(item: any) {
|
|||||||
onMounted(() => {})
|
onMounted(() => {})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.qustion-content {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
.download-file {
|
.download-file {
|
||||||
height: 43px;
|
height: 43px;
|
||||||
|
|
||||||
@ -159,4 +163,5 @@ onMounted(() => {})
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -30,7 +30,6 @@
|
|||||||
></FormRander>
|
></FormRander>
|
||||||
<MdPreview
|
<MdPreview
|
||||||
v-else
|
v-else
|
||||||
noIconfont
|
|
||||||
ref="editorRef"
|
ref="editorRef"
|
||||||
editorId="preview-only"
|
editorId="preview-only"
|
||||||
:modelValue="item.content"
|
:modelValue="item.content"
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
<el-collapse-transition>
|
<el-collapse-transition>
|
||||||
<div class="border-l mt-8" v-show="showThink">
|
<div class="border-l mt-8" v-show="showThink">
|
||||||
<MdPreview
|
<MdPreview
|
||||||
noIconfont
|
|
||||||
ref="editorRef"
|
ref="editorRef"
|
||||||
editorId="preview-only"
|
editorId="preview-only"
|
||||||
:modelValue="content"
|
:modelValue="content"
|
||||||
|
|||||||
@ -29,7 +29,16 @@
|
|||||||
type="ai-chat"
|
type="ai-chat"
|
||||||
:available="applicationAvailable"
|
:available="applicationAvailable"
|
||||||
:appId="applicationDetail?.id"
|
:appId="applicationDetail?.id"
|
||||||
></AiChat>
|
:record="recordList"
|
||||||
|
>
|
||||||
|
<template #operateBefore>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link class="new-chat-button mb-8" @click="newChat">
|
||||||
|
<el-icon><Plus /></el-icon><span class="ml-4">{{ $t('chat.createChat') }}</span>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</AiChat>
|
||||||
</div>
|
</div>
|
||||||
<div class="chat__footer"></div>
|
<div class="chat__footer"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,6 +66,11 @@ const applicationDetail = computed({
|
|||||||
},
|
},
|
||||||
set: (v) => {}
|
set: (v) => {}
|
||||||
})
|
})
|
||||||
|
const recordList = ref([])
|
||||||
|
|
||||||
|
function newChat() {
|
||||||
|
recordList.value = []
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.chat {
|
.chat {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user