Browse Source

【2025】【工具】批量-转换过程中禁止切换类型

lizhe 1 month ago
parent
commit
082dd4e11e

+ 4 - 0
PDF Office/PDF Master/KMClass/NewBatch/View/BatchCollectionView/KMBatchCollectionView.swift

@@ -83,6 +83,10 @@ extension KMBatchCollectionView: KMBatchCollectionViewPrensenterDelegate {
 extension KMBatchCollectionView: NSCollectionViewDelegate {
     //当item被选中
     public func collectionView(_ collectionView: NSCollectionView, didSelectItemsAt indexPaths: Set<IndexPath>) {
+        if self.isDisable {
+            return
+        }
+        
         for item in self.data {
             item.isSelect = false
         }

+ 1 - 6
PDF Office/PDF Master/KMClass/NewBatch/View/BatchCollectionView/View/KMBatchCollectionViewItem.swift

@@ -41,13 +41,8 @@ class KMBatchCollectionViewItem: NSCollectionViewItem {
             self.titleButton.properties.state = .normal
         }
         
+        self.titleButton.properties.isDisabled = self.model.isDisable
         self.titleButton.reloadData()
-        
-        if self.model.isDisable {
-            
-        } else {
-            
-        }
     }
     
 }