parent
1a291997f3
commit
d214e31f71
@ -51,19 +51,23 @@ export class ChatRecordManage {
|
|||||||
this.loading.value = true
|
this.loading.value = true
|
||||||
}
|
}
|
||||||
this.id = setInterval(() => {
|
this.id = setInterval(() => {
|
||||||
const s = this.chat.buffer.shift()
|
if (this.chat.buffer.length > 20) {
|
||||||
if (s !== undefined) {
|
this.chat.answer_text =
|
||||||
this.chat.answer_text = this.chat.answer_text + s
|
this.chat.answer_text + this.chat.buffer.splice(0, this.chat.buffer.length - 20).join('')
|
||||||
|
} else if (this.is_close) {
|
||||||
|
this.chat.answer_text = this.chat.answer_text + this.chat.buffer.join('')
|
||||||
|
this.chat.write_ed = true
|
||||||
|
this.write_ed = true
|
||||||
|
if (this.loading) {
|
||||||
|
this.loading.value = false
|
||||||
|
}
|
||||||
|
if (this.id) {
|
||||||
|
clearInterval(this.id)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.is_close) {
|
const s = this.chat.buffer.shift()
|
||||||
this.chat.write_ed = true
|
if (s !== undefined) {
|
||||||
this.write_ed = true
|
this.chat.answer_text = this.chat.answer_text + s
|
||||||
if (this.loading) {
|
|
||||||
this.loading.value = false
|
|
||||||
}
|
|
||||||
if (this.id) {
|
|
||||||
clearInterval(this.id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, this.ms)
|
}, this.ms)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user