fix: Resolve the issue of application edit parameters becoming mandatory. (#10386)

Refs https://github.com/1Panel-dev/1Panel/issues/10381
This commit is contained in:
CityFun 2025-09-16 15:46:10 +08:00 committed by GitHub
parent 813f1718fb
commit 6609871b1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -222,6 +222,7 @@ const acceptParams = async (props: ParamProps) => {
paramData.value.id = props.id;
paramModel.params = {};
edit.value = false;
rules.params = {};
await get();
open.value = true;
openConfig.value = false;
@ -272,12 +273,12 @@ const get = async () => {
});
if (d.required) {
rules.params[d.key] = [Rules.requiredInput];
if (d.rule) {
rules.params[d.key].push(Rules[d.rule]);
}
} else {
rules.params[d.key] = [];
}
if (d.rule) {
rules.params[d.key].push(Rules[d.rule]);
}
});
}
paramModel.memoryLimit = res.data.memoryLimit;