copilot处理完成
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<el-scrollbar class="chatContent">
|
||||
<div class="chat-wrapper" v-for="item in list" :key="item.id">
|
||||
<div class="chat-text" :class="{right:item.userType == '0'}">
|
||||
<img class="avatar" :src="avatar(item)" alt=""/>
|
||||
<div class="chat-text" :class="{right:item.userType == '0',system:item.userType == '2'}">
|
||||
<img v-if="item.userType!=2" class="avatar" :src="avatar(item)" alt=""/>
|
||||
<div class="content" v-text="item.content"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,6 +11,9 @@
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
* userType: 0-用户 1-机器人 2-系统
|
||||
*/
|
||||
export default {
|
||||
name: "chatContent",
|
||||
props: {
|
||||
@@ -58,7 +61,7 @@ export default {
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
max-width: 220px;
|
||||
max-width: max(calc(100% - 140px), 220px);
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
background: #F3F5F7;
|
||||
@@ -91,6 +94,24 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.system {
|
||||
padding-right: 0;
|
||||
justify-content: center;
|
||||
|
||||
.content {
|
||||
font-size: 12px;
|
||||
background: #F0F0F0;
|
||||
border-radius: 4px;
|
||||
color: #888;
|
||||
padding: 3px 6px;
|
||||
width: fit-content;
|
||||
|
||||
&:before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar {
|
||||
|
||||
Reference in New Issue
Block a user