From 5b07fed518c82cbb626f2da737155aee0a66347c Mon Sep 17 00:00:00 2001 From: mkg <1650473152@qq.com> Date: Sat, 24 Jul 2021 16:50:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3layer=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/templates/roles/main.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/applications/templates/roles/main.html b/applications/templates/roles/main.html index 0c3feb0..a418020 100644 --- a/applications/templates/roles/main.html +++ b/applications/templates/roles/main.html @@ -210,8 +210,9 @@ }) }) - window.add = function () { - layer.open({ + let add_index; + window.add = function () { + add_index = layer.open({ type: 1, title: '新增', shade: 0.1, @@ -324,7 +325,7 @@ if (result.success) { layer.msg(result.msg, { icon: 1, time: 1000 }, function () { // TODO 关闭不了页面 flask-restful 拦截的错误信息没有提示 - layer.close(layer.index) // 关闭当前页 + layer.close(add_index) // 关闭当前页 layui.table.reload('role-table') }) } else {