mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-11 03:33:48 +08:00
实现聊天光标闪烁,实现聊天会话上下文
This commit is contained in:
@@ -6,7 +6,10 @@
|
||||
|
||||
<div class="chat-item">
|
||||
<div class="triangle"></div>
|
||||
<div class="content">{{ content }}</div>
|
||||
<div class="content">
|
||||
<span v-html="content"></span>
|
||||
<span class="cursor" v-show="cursor"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -24,6 +27,10 @@ export default defineComponent({
|
||||
icon: {
|
||||
type: String,
|
||||
default: 'images/gpt-icon.png',
|
||||
},
|
||||
cursor: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -68,6 +75,21 @@ export default defineComponent({
|
||||
background-color: #fff;
|
||||
font-size: var(--content-font-size);
|
||||
border-radius: 5px;
|
||||
|
||||
.cursor {
|
||||
height 24px;
|
||||
border-left 1px solid black;
|
||||
|
||||
animation: cursorImg 1s infinite steps(1, start);
|
||||
@keyframes cursorImg {
|
||||
0%, 100% {
|
||||
opacity: 0;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user