//消息框的滚动事件
mounted(){
this.Scroll()
},
methods:{
Scroll(){
const self=this
let _dom=this.$refs.userMsg
_dom.onscroll = () => {
if(_dom.scrollTop===0){
let _time=self.$Dayjs(new Date()).format('HH:mm:ss')
let _obj={name:'历史',msg:'历史消息读取'+_time}
self.msgData.unshift(_obj)
}
}
},
}