parent
5174e16f7b
commit
21f8dbf2de
7 changed files with 104 additions and 56 deletions
|
@ -79,6 +79,7 @@ export default Vue.extend({
|
|||
|
||||
this.connection.on('message', this.onMessage);
|
||||
this.connection.on('read', this.onRead);
|
||||
this.connection.on('deleted', this.onDeleted);
|
||||
|
||||
if (this.isNaked) {
|
||||
window.addEventListener('scroll', this.onScroll, { passive: true });
|
||||
|
@ -204,6 +205,13 @@ export default Vue.extend({
|
|||
}
|
||||
},
|
||||
|
||||
onDeleted(id) {
|
||||
const msg = this.messages.find(m => m.id === id);
|
||||
if (msg) {
|
||||
this.messages = this.messages.filter(m => m.id !== msg.id);
|
||||
}
|
||||
},
|
||||
|
||||
isBottom() {
|
||||
const asobi = 64;
|
||||
const current = this.isNaked
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue