<div class="refleshBtn">
<el-button type="primary" plain size="mini" @click="recovery">恢復刷新</el-button>
<el-button type="primary" size="mini" @click="stopReflash">停止刷新</el-button>
</div>
created() {
this.timer = setInterval(() => {
this.getList();
}, 5000);
},
//銷燬前清除定時器
beforeDestroy() {
clearInterval(this.timer);
},
recovery() {
this.timer = setInterval(() => {
this.getList();
}, 5000);
},
stopReflash() {
clearInterval(this.timer);
},