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

@@ -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
}
}
}