fix: 修复创建函数问题
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
王丹 2024-09-26 00:03:16 +08:00
parent e8480013ee
commit 9d670c44d4

View File

@ -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)
}
}