|
@@ -395,6 +395,8 @@
|
|
|
},
|
|
},
|
|
|
transformedData: [],
|
|
transformedData: [],
|
|
|
areaData: [],
|
|
areaData: [],
|
|
|
|
|
+ titleTimer: null,
|
|
|
|
|
+ titleOutput: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -625,16 +627,22 @@
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- titleWriter (str) {
|
|
|
|
|
- let that = this
|
|
|
|
|
- let i = 0;
|
|
|
|
|
- let timer = setInterval(function () {
|
|
|
|
|
- that.replyData.reply += str.charAt(i)
|
|
|
|
|
- i++;
|
|
|
|
|
- if (i >= str.length) {
|
|
|
|
|
- clearInterval(timer);
|
|
|
|
|
|
|
+ titleWriter (text) {
|
|
|
|
|
+ clearTimeout(this.titleTimer)
|
|
|
|
|
+ this.titleTimer = null
|
|
|
|
|
+ let index = 0
|
|
|
|
|
+ this.replyData.reply = ''
|
|
|
|
|
+ this.titleOutput = true
|
|
|
|
|
+ const writeText = () => {
|
|
|
|
|
+ if (index < text.length) {
|
|
|
|
|
+ this.replyData.reply += text.charAt(index)
|
|
|
|
|
+ index++
|
|
|
|
|
+ this.titleTimer = setTimeout(writeText, 50)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.titleOutput = false
|
|
|
}
|
|
}
|
|
|
- }, 50);
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ writeText()
|
|
|
},
|
|
},
|
|
|
// 客户洞察
|
|
// 客户洞察
|
|
|
insight () {
|
|
insight () {
|