修复 lint warnings
This commit is contained in:
@@ -416,6 +416,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
|
||||
|
||||
const hasDevices = deviceIds.length > 0;
|
||||
const hasData = timeSeries.length > 0;
|
||||
const deviceIdsKey = useMemo(() => deviceIds.join(","), [deviceIds]);
|
||||
|
||||
const dataset = useMemo(
|
||||
() => buildDataset(timeSeries, deviceIds, fractionDigits, showCleaning),
|
||||
@@ -528,7 +529,7 @@ const SCADADataPanel: React.FC<SCADADataPanelProps> = ({
|
||||
} else {
|
||||
setTimeSeries([]);
|
||||
}
|
||||
}, [deviceIds.join(",")]);
|
||||
}, [deviceIdsKey, handleFetch, hasDevices]);
|
||||
|
||||
// 当设备数量变化时,调整数据源选择
|
||||
useEffect(() => {
|
||||
|
||||
@@ -741,7 +741,7 @@ const SCADADeviceList: React.FC<SCADADeviceListProps> = ({
|
||||
source.addFeature(feature);
|
||||
}
|
||||
});
|
||||
}, [selectedDeviceIds, highlightFeatures]);
|
||||
}, [selectedDeviceIds, highlightFeatures, highlightLayer]);
|
||||
// 清理定时器
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user