feat: 小象助手

This commit is contained in:
2026-03-31 15:53:08 +08:00
parent 383857de2f
commit 76d42b4fb2
5 changed files with 20 additions and 18 deletions

View File

@@ -23,7 +23,13 @@
@mousedown="handleContainerMouseDown"
>
<div class="assistant-header-title">AI Assistant</div>
<SvgIcon name="canvas-assistant-menu" class="menu-icon" color="#D58C4D" />
<SvgIcon
name="closeAssistant"
class="menu-icon"
size="12"
color="#D58C4D"
@click="showAssistant = false"
/>
</div>
<div class="assistant-body flex-1">
<List :messageList="messageList" />
@@ -81,7 +87,7 @@
)
const listenAssistantPushChat = (message: Message) => {
// console.log('有新消息--');
console.log('有新消息--');
const exist = messageList.value.find((item: Message) => item.nodeType === message.nodeType)
if (!exist) {
@@ -98,10 +104,10 @@
<style lang="less" scoped>
.trigger {
position: absolute;
right: 0;
right: 3rem;
top: 10.3rem;
width: 5rem;
height: 5rem;
bottom: 50%;
background-color: #fff;
border-radius: 50%;
cursor: grab;
@@ -134,8 +140,8 @@
.assistant-container {
position: absolute;
right: 6.2rem;
bottom: 13.2rem;
right: 3rem;
top: 16.6rem;
width: 46.69rem;
height: 56.6rem;
flex-shrink: 0;
@@ -169,7 +175,8 @@
}
.menu-icon {
width: 1.8rem;
cursor: pointer;
width: initial;
}
}