From 9d670c44d4d6309068c7af9e832efb17775e86cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=B8=B9?= <12582130+fit2cloudwangdan@user.noreply.gitee.com> Date: Thu, 26 Sep 2024 00:03:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/function-lib/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/views/function-lib/index.vue b/ui/src/views/function-lib/index.vue index 3e3a18739..e54311229 100644 --- a/ui/src/views/function-lib/index.vue +++ b/ui/src/views/function-lib/index.vue @@ -119,12 +119,16 @@ const title = ref('') const changeStateloading = ref(false) const canEdit = (row: any) => { - return user.userInfo?.id === row.user_id + return user.userInfo?.id === row?.user_id } function openCreateDialog(data?: any) { title.value = data ? '编辑函数' : '创建函数' - if (data?.permission_type !== 'PUBLIC' && !canEdit(data)) { + if (data) { + if (data?.permission_type !== 'PUBLIC' || canEdit(data)) { + FunctionFormDrawerRef.value.open(data) + } + } else { FunctionFormDrawerRef.value.open(data) } }