Explorar o código

fix: 防止重复添加用户时触发事件传播

caipin hai 1 mes
pai
achega
cd6baea72f
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      app/public/js/setting_manage.js

+ 5 - 0
app/public/js/setting_manage.js

@@ -634,6 +634,7 @@ $(document).ready(() => {
                 }
                 }
                 if (_.includes(saIdList, id)) {
                 if (_.includes(saIdList, id)) {
                     toastr.error('该用户已存在列表中,无需重复添加');
                     toastr.error('该用户已存在列表中,无需重复添加');
+                    e.stopPropagation();
                     return;
                     return;
                 }
                 }
 
 
@@ -675,6 +676,7 @@ $(document).ready(() => {
                 }
                 }
                 if (_.includes(saIdList, id)) {
                 if (_.includes(saIdList, id)) {
                     toastr.error('该用户已存在列表中,无需重复添加');
                     toastr.error('该用户已存在列表中,无需重复添加');
+                    e.stopPropagation();
                     return;
                     return;
                 }
                 }
 
 
@@ -696,6 +698,7 @@ $(document).ready(() => {
                 }
                 }
                 if (_.includes(saIdList, id)) {
                 if (_.includes(saIdList, id)) {
                     toastr.error('该用户已存在列表中,无需重复添加');
                     toastr.error('该用户已存在列表中,无需重复添加');
+                    e.stopPropagation();
                     return;
                     return;
                 }
                 }
 
 
@@ -716,6 +719,7 @@ $(document).ready(() => {
                 }
                 }
                 if (_.includes(saIdList, id)) {
                 if (_.includes(saIdList, id)) {
                     toastr.error('该用户已存在列表中,无需重复添加');
                     toastr.error('该用户已存在列表中,无需重复添加');
+                    e.stopPropagation();
                     return;
                     return;
                 }
                 }
 
 
@@ -734,6 +738,7 @@ $(document).ready(() => {
                 }
                 }
                 if (_.includes(saIdList, id)) {
                 if (_.includes(saIdList, id)) {
                     toastr.error('该用户已存在列表中,无需重复添加');
                     toastr.error('该用户已存在列表中,无需重复添加');
+                    e.stopPropagation();
                     return;
                     return;
                 }
                 }
                 const prop = {
                 const prop = {