mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-05-20 16:04:00 +00:00
修复刷新配置会被重置的bug
This commit is contained in:
parent
5cc983d4ae
commit
a0fc514ac9
@ -116,10 +116,10 @@ export default defineComponent({
|
||||
Bus.off(BusMsg.ShowPlace, funcShowPlace);
|
||||
Bus.off(BusMsg.EnableSchedule, funcEnableSchedule);
|
||||
bridge.off(Msg.InspectNode, onInspectNode);
|
||||
timer.clean();
|
||||
timer.destroy();
|
||||
});
|
||||
function updateTree() {
|
||||
console.log("update tree info");
|
||||
// console.log("update tree info");
|
||||
const id = toRaw(frameID.value);
|
||||
bridge.send(Msg.RequstTreeInfo, { frameID: id } as RequestTreeInfoData);
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ export default defineComponent({
|
||||
Bus.off(BusMsg.ChangeContent, changeContent);
|
||||
Bus.off(BusMsg.SelectNode, funSelectNode);
|
||||
Bus.off(BusMsg.EnableSchedule, funcEnableSchedule);
|
||||
timer.clean();
|
||||
timer.destroy();
|
||||
});
|
||||
bridge.on(Msg.ResponseSupport, (event: PluginEvent) => {
|
||||
let data: ResponseSupportData = event.data;
|
||||
|
@ -18,12 +18,18 @@ export class Timer {
|
||||
this.onWork && this.onWork();
|
||||
}
|
||||
}
|
||||
clean() {
|
||||
destroy(): boolean {
|
||||
if (this.timer === null) {
|
||||
return;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
clean() {
|
||||
if (this.destroy()) {
|
||||
this.onClean && this.onClean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user