WIP Наладила таймер

This commit is contained in:
Daria Golova
2022-12-02 15:15:56 +03:00
parent 469961a05b
commit 1db2ca2113
3 changed files with 15 additions and 8 deletions

View File

@@ -189,8 +189,10 @@ export default {
},
changeCountdown() {
if (this.countdown === 0) {
this.stopTimer();
this.deleteClient().then(() => this.updateDataClient());
this.deleteClient().then(() => {
this.updateDataClient();
this.stopTimer();
});
} else {
this.countdown -= 1;
}
@@ -483,9 +485,12 @@ export default {
photo: this.client.photo,
};
},
/*beforeUnmount() {
this.stopTimer();
},*/
beforeUnmount() {
if (this.timer) {
this.deleteClient().then(() => this.updateDataClient());
this.stopTimer();
}
},
};
</script>