// 打字机效果typewriter(txt, index) {this.$refs.nowReply.innerHTML = ''let timer = setInterval(() => {this.$refs.nowReply.innerHTML += txt.substring(index, index + 1)index++;if (index >= txt.length) {clearInterval(timer);timer = '';this.showReply = false;this.$refs.nowReply.innerHTML = ''this.pushbotmsg(txt)}if (index % 5 === 0) {this.scrollPage()}}, 50)},
txt:需要打字的文本
index:一般为0,从问问头部开始打印
this.$refs.nowReply:显示文本的div框