@@ -373,6 +373,10 @@ export default {
this.$emit('render', data)
},
update (data) {
+ if (this.abortController && this.disabled) {
+ this.abortController.abort('')
+ this.abortController = null
+ }
this.items.splice(1, this.items.length - 1, ...data.messages.map(e => {
if (e.role === 'user') {
return {
@@ -80,6 +80,10 @@ export default {
} catch (error) {
this.$snackbar.error(error)
}
+ },
+
+ handleLogout () {
+ this.$store.dispatch('user/userLogout')
@@ -126,9 +126,6 @@ export default {
this.chart.setOption(_option, true)
this.chart.hideLoading()
- handleLogout () {
- this.$store.dispatch('user/userLogout')
- },
onUpdate (data) {
this.$refs.dataChartEditChatRefs.update(data)