浏览代码

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

caipin 6 月之前
父节点
当前提交
cd6baea72f
共有 1 个文件被更改,包括 5 次插入0 次删除
  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 = {