Commit ebd56386 authored by tyyin lan's avatar tyyin lan

chore(首页): 历史记录删除后没有创建新对话

parent 980bb6d7
...@@ -223,7 +223,7 @@ function handleQuestionSubmitEnter(event: KeyboardEvent) { ...@@ -223,7 +223,7 @@ function handleQuestionSubmitEnter(event: KeyboardEvent) {
<div class="box-border flex !w-[160px] w-full items-center justify-between px-[12px]"> <div class="box-border flex !w-[160px] w-full items-center justify-between px-[12px]">
<div class="mr-[5px] flex flex-1 items-center overflow-hidden"> <div class="mr-[5px] flex flex-1 items-center overflow-hidden">
<div <div
class="mr-[10px] h-[16px] w-[16px] rounded-full bg-cover" class="mr-[10px] h-[16px] w-[16px] bg-contain bg-no-repeat"
:class="{ 'bg-px-home-cuixiang_icon-png': !currentAgentApplication.agentAvatar }" :class="{ 'bg-px-home-cuixiang_icon-png': !currentAgentApplication.agentAvatar }"
:style="{ backgroundImage: `url(${currentAgentApplication.agentAvatar})` }" :style="{ backgroundImage: `url(${currentAgentApplication.agentAvatar})` }"
></div> ></div>
...@@ -255,7 +255,7 @@ function handleQuestionSubmitEnter(event: KeyboardEvent) { ...@@ -255,7 +255,7 @@ function handleQuestionSubmitEnter(event: KeyboardEvent) {
@click="handleApplicationChange(item)" @click="handleApplicationChange(item)"
> >
<div <div
class="mr-[10px] h-[16px] w-[16px] rounded-full bg-cover" class="mr-[10px] h-[16px] w-[16px] bg-contain bg-no-repeat"
:class="{ 'bg-px-home-cuixiang_icon-png': !item.agentAvatar }" :class="{ 'bg-px-home-cuixiang_icon-png': !item.agentAvatar }"
:style="{ backgroundImage: `url(${item.agentAvatar})` }" :style="{ backgroundImage: `url(${item.agentAvatar})` }"
></div> ></div>
......
...@@ -49,7 +49,8 @@ function getSessionHistoryRecordList(isCreateNewSessionCheck = false) { ...@@ -49,7 +49,8 @@ function getSessionHistoryRecordList(isCreateNewSessionCheck = false) {
if ( if (
isCreateNewSessionCheck && isCreateNewSessionCheck &&
props.currentSessionId && props.currentSessionId &&
sessionHistoryRecordList.value.find((item) => item.dialogsId !== props.currentSessionId) (sessionHistoryRecordList.value.length === 0 ||
sessionHistoryRecordList.value.find((item) => item.dialogsId !== props.currentSessionId))
) { ) {
emit('createNewSession') emit('createNewSession')
} }
......
...@@ -32,7 +32,7 @@ const name = computed(() => { ...@@ -32,7 +32,7 @@ const name = computed(() => {
<template> <template>
<div class="mb-[20px] last:mb-0"> <div class="mb-[20px] last:mb-0">
<div class="flex"> <div class="flex">
<img class="h-[36px] w-[36px]" :src="avatarUrl" alt="Avatar" /> <img class="h-[36px] w-[36px] object-contain" :src="avatarUrl" alt="Avatar" />
<div class="ml-[11px]"> <div class="ml-[11px]">
<div class="mb-[7px] text-[12px] text-[#999]"> <div class="mb-[7px] text-[12px] text-[#999]">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment