mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
fix: 修复创建函数问题
This commit is contained in:
parent
e8480013ee
commit
9d670c44d4
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue