You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

232 lines
4.6 KiB

<template>
<view class="pending">
{{title}}
</view>
</template>
<script>
export default {
name: 'Pending',
data() {
return {
timeObj: null,
title: '正在思考中...'
};
},
mounted() {
this.init()
},
beforeDestroy() {
this.timeObj && clearInterval(this.timeObj);
},
methods: {
init() {
this.timeObj = setInterval(() => {
this.title = this.title == '正在思考中...' ? this.title === '正在思考中..' ? '正在思考中.' : '正在思考中..' : '正在思考中...'
}, 500)
}
}
};
</script>
<style lang="scss">
.client-chat::-webkit-scrollbar {
display: none;
}
.pop-demo {
// background-color: pink;
padding: 10px;
display: flex;
min-width: var(--size-l);
padding: var(--spacing-base);
flex-direction: column;
justify-content: center;
// align-items: center;
gap: var(--spacing-tight);
border-radius: var(--radius-normal);
border: 0.5px solid var(--color-border-normal);
background: var(--color-bg-2);
/* shadow/--shadow-medium */
box-shadow: var(--shadow-medium-x-1) var(--shadow-medium-y-2)
var(--shadow-medium-blur-1) var(--shadow-medium-spread-1)
var(--shadow-medium-color-1),
var(--shadow-medium-x-2) var(--shadow-medium-y-2)
var(--shadow-medium-blur-2) var(--shadow-medium-spread-2)
var(--shadow-medium-color-2),
var(--shadow-medium-x-3) var(--shadow-medium-y-3)
var(--shadow-medium-blur-3) var(--shadow-medium-spread-3)
var(--shadow-medium-color-3);
.v-popper__arrow {
display: block;
}
.pop-demo-list {
color: var(--color-link-normal);
/* caption/--caption-regular */
font-family: var(--font-family-normal);
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 16px; /* 133.333% */
.v-button {
text-decoration: none;
text-align: left;
}
}
}
.client-chat {
display: flex;
flex-direction: column;
flex: 1;
overflow-y: overlay;
padding: 0 12px;
.loading {
margin: 1em 0;
width: 150px;
&:after {
content: ".";
animation: ellipsis 1.5s steps(1, end) infinite;
}
}
@keyframes ellipsis {
0% {
content: ".";
}
33% {
content: "..";
}
66% {
content: "...";
}
100% {
content: ".";
}
}
.qa-item {
display: flex;
flex-direction: column;
margin-bottom: 16px;
font-weight: 400;
font-size: 14px;
color: var(--color-text-primary);
.timestamp {
font-weight: 400;
font-size: 12px;
line-height: 16px;
text-align: center;
color: var(--color-text-caption);
margin: 16px 0;
}
.question-item {
display: flex;
align-items: center;
width: fit-content;
text-align: center;
align-self: flex-end;
padding-left: 44px;
.qs-error {
min-width: 16px;
margin-right: 10px;
color: var(--color-error-normal);
}
.qs-loading {
margin-right: 10px;
}
.question-text {
background: #dbe8ff;
border-radius: 6px;
padding: 0 12px;
text-align: left;
word-break: break-all;
word-wrap: break-word;
code {
white-space: break-spaces;
}
img {
max-width: 80%;
}
}
}
.summary-item {
align-self: center;
margin: 12px 0;
}
.answer-item {
display: flex;
.contacter-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 12px;
display: flex;
align-items: center;
justify-content: center;
}
.answer-info {
position: relative;
display: flex;
flex-direction: column;
padding: 12px;
background: #f4f5f7;
border-radius: 6px;
width: calc(100% - 67px);
.answer-expand {
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
width: 44px;
height: 24px;
margin-bottom: 12px;
background: var(--color-bg-2);
box-shadow: var(--shadow-small-light);
border-radius: 16px;
align-self: center;
}
.stop-ws {
color: var(--color-text-caption);
margin-left: 5px;
}
.answer-source {
margin: 12px 0;
font-size: 14px;
color: var(--color-text-caption);
text-align: left;
.v-button {
text-decoration: none;
text-align: left;
}
}
}
}
}
.qa-item:last-child {
padding-bottom: 120px;
}
}
</style>