feat: Implement adding controls in Tabs (#21)

This commit is contained in:
Fine0830
2022-03-04 15:35:29 +08:00
committed by GitHub
parent 59441f7a67
commit 1377703185
15 changed files with 347 additions and 150 deletions

View File

@@ -26,7 +26,6 @@ import { routesEvent } from "./event";
import { routesAlert } from "./alert";
import { routesSetting } from "./setting";
import { routesAlarm } from "./alarm";
import { useTimeoutFn } from "@/hooks/useTimeout";
const routes: Array<RouteRecordRaw> = [
...routesGen,
@@ -52,7 +51,7 @@ router.beforeEach((to, from, next) => {
// const token = window.localStorage.getItem("skywalking-authority");
if ((window as any).axiosCancel.length !== 0) {
for (const func of (window as any).axiosCancel) {
useTimeoutFn(func(), 0);
setTimeout(func(), 0);
}
(window as any).axiosCancel = [];
}