mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复函数库编辑权限
This commit is contained in:
parent
636b60acfa
commit
69a0ce74b6
|
|
@ -43,7 +43,7 @@
|
|||
:description="item.desc"
|
||||
class="function-lib-card"
|
||||
@click="openCreateDialog(item)"
|
||||
:class="item.permission_type === 'PUBLIC' ? 'notAllowed' : 'cursor'"
|
||||
:class="item.permission_type === 'PUBLIC' && !canEdit(item) ? 'notAllowed' : 'cursor'"
|
||||
>
|
||||
<template #icon>
|
||||
<AppAvatar class="mr-12 avatar-green" shape="square" :size="32">
|
||||
|
|
@ -124,7 +124,7 @@ const canEdit = (row: any) => {
|
|||
|
||||
function openCreateDialog(data?: any) {
|
||||
title.value = data ? '编辑函数' : '创建函数'
|
||||
if (data?.permission_type !== 'PUBLIC') {
|
||||
if (data?.permission_type !== 'PUBLIC' && !canEdit(data)) {
|
||||
FunctionFormDrawerRef.value.open(data)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue