From e8d048b01d50c53edded97e6b1a27c1ea61ef948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=80=8E=E8=89=BA=E3=80=8F?= <348799370@qq.com> Date: Mon, 29 Aug 2022 10:42:51 +0000 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=97=B6=E6=8F=90=E7=A4=BA=E6=9D=83=E9=99=90?= =?UTF-8?q?=E4=B8=8D=E8=B6=B3=20=E5=85=B7=E6=9C=89=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=97=B6=EF=BC=8C=E5=8F=8C=E5=87=BB=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E7=BC=96=E8=BE=91=E6=9D=83=E9=99=90=E4=B8=8D=E8=B6=B3?= =?UTF-8?q?=EF=BC=8C=E5=9B=A0=E4=B8=BA=E6=A0=A1=E9=AA=8C=E6=9D=83=E9=99=90?= =?UTF-8?q?=E4=BC=A0=E7=9A=84=E6=98=AF=E6=95=B0=E7=BB=84=EF=BC=8C=E6=89=80?= =?UTF-8?q?=E4=BB=A5=E9=9C=80=E8=A6=81=E8=BF=9B=E8=A1=8C=E9=81=8D=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 『艺』 <348799370@qq.com> --- src/components/ma-crud/index.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/ma-crud/index.vue b/src/components/ma-crud/index.vue index e09ab47..88b04c6 100644 --- a/src/components/ma-crud/index.vue +++ b/src/components/ma-crud/index.vue @@ -601,9 +601,11 @@ const dbClickOpenEdit = (record) => { return } - if (! checkAuth(defaultCrud.value.edit.auth || [])) { - Message.error('没有编辑数据的权限') - return + for(let i in defaultCrud.value.edit.auth){ + if (! checkAuth(defaultCrud.value.edit.auth[i] || [])) { + Message.error('没有编辑数据的权限') + return + } } if (defaultCrud.value.edit.api && isFunction(defaultCrud.value.edit.api)) { -- Gitee From 6a8f67eea569524e25a859c126e3364581aca2bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=80=8E=E8=89=BA=E3=80=8F?= <348799370@qq.com> Date: Mon, 29 Aug 2022 11:50:11 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=97=B6=E6=8F=90=E7=A4=BA=E6=9D=83=E9=99=90?= =?UTF-8?q?=E4=B8=8D=E8=B6=B3=20=E6=9D=83=E9=99=90=E4=B8=BA=E6=95=B0?= =?UTF-8?q?=E7=BB=84=EF=BC=8C=E6=89=80=E4=BB=A5=E5=9C=A8=E5=AF=B9=E6=AF=94?= =?UTF-8?q?=E6=97=B6=E8=BF=94=E5=9B=9E=E4=B8=BAfalse=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E5=85=B7=E6=9C=89=E6=9D=83=E9=99=90=E4=BD=86=E6=98=AF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=9D=83=E9=99=90=E4=B8=8D=E8=B6=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 『艺』 <348799370@qq.com> --- src/components/ma-crud/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/ma-crud/index.vue b/src/components/ma-crud/index.vue index 88b04c6..9696a5c 100644 --- a/src/components/ma-crud/index.vue +++ b/src/components/ma-crud/index.vue @@ -601,8 +601,13 @@ const dbClickOpenEdit = (record) => { return } + if(defaultCrud.value.edit.auth === []){ + Message.error('没有编辑数据的权限') + return + } + for(let i in defaultCrud.value.edit.auth){ - if (! checkAuth(defaultCrud.value.edit.auth[i] || [])) { + if (! checkAuth(defaultCrud.value.edit.auth[i])) { Message.error('没有编辑数据的权限') return } -- Gitee