fix(插件管理): xpack插件禁止在线更新

This commit is contained in:
fit2cloud-chenyw 2022-10-16 20:26:05 +08:00
parent fa7464b9ec
commit 74aa2f64e2
4 changed files with 21 additions and 1 deletions

View File

@ -443,6 +443,7 @@ export default {
all_read_successfully: 'All read successfully',
by_plugin_name: 'Search by plug-in name',
unable_to_uninstall: 'Built in plug-in, unable to uninstall',
unable_to_update: 'Built in plug-in, unable to update',
free: 'free',
cost: 'cost',
developer: 'developer',

View File

@ -443,6 +443,7 @@ export default {
message_list: '消息清單',
by_plugin_name: '通過挿件名稱搜索',
unable_to_uninstall: '內寘挿件,無法卸載',
unable_to_update: '內寘挿件,無法更新',
free: '免費',
cost: '費用',
developer: '開發者',

View File

@ -442,6 +442,7 @@ export default {
message_list: '消息列表',
by_plugin_name: '通过插件名称搜索',
unable_to_uninstall: '内置插件,无法卸载',
unable_to_update: '内置插件,无法更新',
free: '免费',
cost: '费用',
developer: '开发者',

View File

@ -104,8 +104,22 @@
class="card-method"
:class="`btn-${numPlugin}`"
>
<el-tooltip
class="item"
effect="dark"
:content="$t('components.unable_to_update')"
placement="top"
>
<div
v-if="checkPermission(['plugin:upload']) && updateDisabled(ele)"
:class="[{ 'is-disable': updateDisabled(ele) }]"
class="btn-plugin update"
>
<i class="el-icon-more" /> {{ $t('dataset.update') }}
</div>
</el-tooltip>
<el-upload
v-permission="['plugin:upload']"
v-if="checkPermission(['plugin:upload']) && !updateDisabled(ele)"
:action="baseUrl + 'api/plugin/update/' + ele.pluginId"
:multiple="false"
:show-file-list="false"
@ -270,6 +284,9 @@ export default {
},
btnDisabled(row) {
return row.pluginId < 4
},
updateDisabled(row) {
return row.pluginId === 1
}
}
}