fix: 容器创建清空表单

This commit is contained in:
ssongliu 2023-03-11 17:53:47 +08:00 committed by ssongliu
parent 26dd672522
commit c4e54b2f0f

View file

@ -237,13 +237,33 @@ const images = ref();
const volumes = ref(); const volumes = ref();
const acceptParams = (): void => { const acceptParams = (): void => {
handlReset();
drawerVisiable.value = true; drawerVisiable.value = true;
form.restartPolicy = 'no';
form.memoryUnit = 'MB';
loadImageOptions(); loadImageOptions();
loadVolumeOptions(); loadVolumeOptions();
}; };
const handlReset = () => {
form.name = '';
form.image = '';
form.cmdStr = '';
form.cmd = [];
form.publishAllPorts = false;
form.exposedPorts = [];
form.nanoCPUs = 1;
form.memory = 100;
form.memoryItem = 100;
form.memoryUnit = 'MB';
form.cpuUnit = 'Core';
form.volumes = [];
form.autoRemove = false;
form.labels = [];
form.labelsStr = '';
form.env = [];
form.envStr = '';
form.restartPolicy = 'no';
};
const handleClose = () => { const handleClose = () => {
drawerVisiable.value = false; drawerVisiable.value = false;
}; };