tangning 1 день назад
Родитель
Сommit
490daad13f
1 измененных файлов с 5 добавлено и 2 удалено
  1. 5 2
      src/app/map/App.vue

+ 5 - 2
src/app/map/App.vue

@@ -90,6 +90,7 @@ import linkIco from "@/assets/image/fire.ico";
 import { useUrlSearchParams } from "@vueuse/core";
 import emptyBG from "@/assets/image/empty__empty.png";
 import emptyCover from "@/assets/image/cover.png";
+import { debounce } from "@/util";
 
 import { changeThemeColor } from "./theme";
 const params = useUrlSearchParams("history");
@@ -222,8 +223,10 @@ const refresh = async () => {
 watch(
   () => state.deptId,
   () => {
-    console.log("state.deptId", state.deptId);
-    refresh();
+    const search = debounce(() => {
+      refresh();
+    }, 100);
+    search();
   },
   {
     immediate: false,