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