1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-31 14:08:06 +08:00

feat: 容器编辑提示增加判断条件 (#2553)

This commit is contained in:
zhengkunwang 2023-10-14 10:53:57 -05:00 committed by GitHub
parent 2d2869d184
commit 99951029c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@
<el-row type="flex" justify="center">
<el-col :span="22">
<el-alert
v-if="dialogData.title === 'edit'"
v-if="dialogData.title === 'edit' && isFromApp(dialogData.rowData!)"
:title="$t('container.containerFromAppHelper')"
class="common-prompt"
:closable="false"
@ -579,6 +579,13 @@ const checkPortValid = () => {
}
return true;
};
const isFromApp = (rowData: Container.ContainerHelper) => {
if (rowData && rowData.labels) {
return rowData.labels.indexOf('createdBy=Apps') > -1;
}
return false;
};
defineExpose({
acceptParams,
});