diff --git a/Cunkebao/src/components/DeviceSelection/selectionPopup.tsx b/Cunkebao/src/components/DeviceSelection/selectionPopup.tsx index 8dbac0ad..0485f58d 100644 --- a/Cunkebao/src/components/DeviceSelection/selectionPopup.tsx +++ b/Cunkebao/src/components/DeviceSelection/selectionPopup.tsx @@ -121,13 +121,13 @@ const SelectionPopup: React.FC = ({ } } else { // 多选模式:原有的逻辑 - if (tempSelectedOptions.some(v => v.id === device.id)) { - setTempSelectedOptions( - tempSelectedOptions.filter(v => v.id !== device.id), - ); - } else { - const newSelectedOptions = [...tempSelectedOptions, device]; - setTempSelectedOptions(newSelectedOptions); + if (tempSelectedOptions.some(v => v.id === device.id)) { + setTempSelectedOptions( + tempSelectedOptions.filter(v => v.id !== device.id), + ); + } else { + const newSelectedOptions = [...tempSelectedOptions, device]; + setTempSelectedOptions(newSelectedOptions); } } }; diff --git a/Cunkebao/src/components/PopuLayout/footer.tsx b/Cunkebao/src/components/PopuLayout/footer.tsx index a9d09855..3dbf8a52 100644 --- a/Cunkebao/src/components/PopuLayout/footer.tsx +++ b/Cunkebao/src/components/PopuLayout/footer.tsx @@ -34,15 +34,15 @@ const PopupFooter: React.FC = ({ {/* 分页栏 */}
{onSelectAll && ( -
- onSelectAll(e.target.checked)} - className={style.selectAllCheckbox} - > - 全选当前页 - -
+
+ onSelectAll(e.target.checked)} + className={style.selectAllCheckbox} + > + 全选当前页 + +
)}