From 051eb785a36ec3b6cd3b4305fdb65f6940415e9b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 14 九月 2021 13:17:48 +0800
Subject: [PATCH] 2021-09-14

---
 src/components/normalform/modalform/index.jsx |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx
index 99658a4..5fc454c 100644
--- a/src/components/normalform/modalform/index.jsx
+++ b/src/components/normalform/modalform/index.jsx
@@ -101,10 +101,17 @@
 
         if (cell.hidden) return
 
-        if (supItem.hidden || !item.values.includes(supItem.initval)) {
+        if (supItem.hidden) {
           cell.hidden = true
-          fieldMap.set(item.field, cell)
+        } else if (supItem.type === 'checkbox') {
+          let vals = [...supItem.initval, ...item.values]
+          if (vals.length === new Set(vals).size) {
+            cell.hidden = true
+          }
+        } else if (!item.values.includes(supItem.initval)) {
+          cell.hidden = true
         }
+        fieldMap.set(item.field, cell)
 
         fields.push(item)
       })

--
Gitblit v1.8.0