fix: 镜像导出增加默认值 (#988)

pull/989/head
ssongliu 2023-05-10 16:16:15 +08:00 committed by GitHub
parent 1e4ea2f8c3
commit dbb94942df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 2 deletions

View File

@ -493,6 +493,7 @@ const message = {
imageBuild: 'Image build',
pathSelect: 'Path',
label: 'Label',
imageTag: 'Image Tag',
push: 'Push',
fileName: 'FileName',
export: 'Export',

View File

@ -518,6 +518,7 @@ const message = {
build: '',
pathSelect: '',
label: '',
imageTag: '',
push: '',
fileName: '',
export: '',

View File

@ -173,6 +173,7 @@ const buttons = [
label: i18n.global.t('container.tag'),
click: (row: Container.ImageInfo) => {
let params = {
itemName: row.tags.length !== 0 ? row.tags[0].split(':')[0] : '',
repos: repos.value,
sourceID: row.id,
};

View File

@ -79,8 +79,8 @@ const dialogData = ref<DialogProps>({
const acceptParams = async (params: DialogProps): Promise<void> => {
drawerVisiable.value = true;
form.tags = params.tags;
form.tagName = form.tags.length !== 0 ? form.tags[0] : '';
form.path = '';
form.tagName = '';
form.name = '';
dialogData.value.repos = params.repos;
};

View File

@ -1,7 +1,7 @@
<template>
<el-drawer v-model="drawerVisiable" :destroy-on-close="true" :close-on-click-modal="false" size="50%">
<template #header>
<DrawerHeader :header="$t('container.image') + ' Tag'" :back="handleClose" />
<DrawerHeader :header="$t('container.imageTag')" :resource="form.itemName" :back="handleClose" />
</template>
<el-form v-loading="loading" label-position="top" ref="formRef" :model="form" label-width="80px">
<el-row type="flex" justify="center">
@ -56,6 +56,7 @@ const loading = ref(false);
const drawerVisiable = ref(false);
const repos = ref();
const form = reactive({
itemName: '',
sourceID: '',
fromRepo: true,
repoID: 1,
@ -63,6 +64,7 @@ const form = reactive({
});
interface DialogProps {
itemName: string;
repos: Array<Container.RepoOptions>;
sourceID: string;
}
@ -70,6 +72,7 @@ interface DialogProps {
const acceptParams = async (params: DialogProps): Promise<void> => {
drawerVisiable.value = true;
form.repoID = 1;
form.itemName = params.itemName;
form.sourceID = params.sourceID;
form.targetName = '';
form.fromRepo = true;