Explorar o código

关闭自动开机扫描

yichael hai 4 meses
pai
achega
c35f926f46
Modificáronse 1 ficheiros con 7 adicións e 7 borrados
  1. 7 7
      src/pages/Devices/Devices.js

+ 7 - 7
src/pages/Devices/Devices.js

@@ -137,13 +137,13 @@ export function DevicesLogic() {
     });
   };
 
-  // 页面加载时自动扫描
-  useEffect(() => {
-    if (!hasScanned.current) {
-      hasScanned.current = true;
-      scanDevices();
-    }
-  }, []);
+  // 页面加载时自动扫描(已禁用,只允许手动刷新)
+  // useEffect(() => {
+  //   if (!hasScanned.current) {
+  //     hasScanned.current = true;
+  //     scanDevices();
+  //   }
+  // }, []);
 
   // 处理连接设备点击
   const handleConnect = async (ipPort) => {