mirror of https://github.com/1Panel-dev/1Panel
fix: 镜像导出增加默认值 (#988)
parent
1e4ea2f8c3
commit
dbb94942df
|
@ -493,6 +493,7 @@ const message = {
|
|||
imageBuild: 'Image build',
|
||||
pathSelect: 'Path',
|
||||
label: 'Label',
|
||||
imageTag: 'Image Tag',
|
||||
push: 'Push',
|
||||
fileName: 'FileName',
|
||||
export: 'Export',
|
||||
|
|
|
@ -518,6 +518,7 @@ const message = {
|
|||
build: '构建镜像',
|
||||
pathSelect: '路径选择',
|
||||
label: '标签',
|
||||
imageTag: '镜像标签',
|
||||
push: '推送',
|
||||
fileName: '文件名',
|
||||
export: '导出',
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue