Explorar el Código

修复权限选中bug

Cheng hace 3 años
padre
commit
8cfa86aae9
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      src/views/role/index.vue

+ 4 - 2
src/views/role/index.vue

@@ -231,8 +231,10 @@ export default {
       if(!this.checkList.includes(val)){
           var index = this.permissionData.findIndex((item) => {
               return item.functionId == val;
-            });
-        this.permissionData.splice(index,1)
+          });
+        if (!index) {
+          this.permissionData.splice(index,1)
+            }
         // console.log(this.permissionData)
       }
     },