Skip to content

Commit 7faa79d

Browse files
committed
refactor: disable buttons based on permission type
--bug=1052737 --user=刘瑞斌 【函数库】-非当前用户所有的函数,不应该支持复制和导出 https://www.tapd.cn/57709429/s/1661776
1 parent 9d5f9fd commit 7faa79d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ui/src/views/function-lib/index.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,17 @@
115115
<div class="footer-content flex-between">
116116
<div>
117117
<el-tooltip effect="dark" :content="$t('common.copy')" placement="top">
118-
<el-button text @click.stop="copyFunctionLib(item)">
118+
<el-button text @click.stop="copyFunctionLib(item)"
119+
:disabled="item.permission_type === 'PUBLIC' && !canEdit(item)"
120+
>
119121
<AppIcon iconName="app-copy"></AppIcon>
120122
</el-button>
121123
</el-tooltip>
122124
<el-divider direction="vertical" />
123125
<el-tooltip effect="dark" :content="$t('common.export')" placement="top">
124-
<el-button text @click.stop="exportFunctionLib(item)">
126+
<el-button text @click.stop="exportFunctionLib(item)"
127+
:disabled="item.permission_type === 'PUBLIC' && !canEdit(item)"
128+
>
125129
<AppIcon iconName="app-export"></AppIcon>
126130
</el-button>
127131
</el-tooltip>

0 commit comments

Comments
 (0)