mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-09-20 23:55:58 +08:00
fix: 容器创建清空表单
This commit is contained in:
parent
26dd672522
commit
c4e54b2f0f
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue