refactor: disable buttons based on permission type
Some checks failed
sync2gitee / repo-sync (push) Has been cancelled
Typos Check / Spell Check with Typos (push) Has been cancelled

--bug=1052737 --user=刘瑞斌 【函数库】-非当前用户所有的函数,不应该支持复制和导出 https://www.tapd.cn/57709429/s/1661776
This commit is contained in:
CaptainB 2025-03-04 14:06:46 +08:00 committed by 刘瑞斌
parent 9d5f9fde62
commit 7faa79d361

View File

@ -115,13 +115,17 @@
<div class="footer-content flex-between">
<div>
<el-tooltip effect="dark" :content="$t('common.copy')" placement="top">
<el-button text @click.stop="copyFunctionLib(item)">
<el-button text @click.stop="copyFunctionLib(item)"
:disabled="item.permission_type === 'PUBLIC' && !canEdit(item)"
>
<AppIcon iconName="app-copy"></AppIcon>
</el-button>
</el-tooltip>
<el-divider direction="vertical" />
<el-tooltip effect="dark" :content="$t('common.export')" placement="top">
<el-button text @click.stop="exportFunctionLib(item)">
<el-button text @click.stop="exportFunctionLib(item)"
:disabled="item.permission_type === 'PUBLIC' && !canEdit(item)"
>
<AppIcon iconName="app-export"></AppIcon>
</el-button>
</el-tooltip>