Skip to content

Commit

Permalink
fix: 自动销毁计时器
Browse files Browse the repository at this point in the history
  • Loading branch information
若海 committed Dec 3, 2023
1 parent c05c0f9 commit 3aa1453
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/apps/script/exec.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default class ScriptExec extends Vue {
public loading = false;
public timer = 0;
public unmounted() {
clearInterval(this.timer);
}
// 机器列表
public get hostnames() {
Expand Down Expand Up @@ -80,9 +84,8 @@ export default class ScriptExec extends Vue {
public visible = false;
public close() {
this.$emit('submit');
this.visible = false;
clearInterval(this.timer);
this.$emit('submit');
}
public open(machines: MachineItem[], script: ScriptItem) {
Expand Down

0 comments on commit 3aa1453

Please sign in to comment.