feat: refs #8388 add hasFile property handling in VnDms component
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
028477ecbe
commit
2fabff05be
|
@ -50,11 +50,9 @@ const dms = ref({});
|
|||
|
||||
onMounted(() => {
|
||||
defaultData();
|
||||
if (!$props.formInitialData) {
|
||||
if (!$props.formInitialData)
|
||||
dms.value.description =
|
||||
$props.description ?? t($props.model + 'Description', dms.value);
|
||||
dms.value.hasFile = $props.hasFile;
|
||||
}
|
||||
});
|
||||
function onFileChange(files) {
|
||||
dms.value.hasFileAttached = !!files;
|
||||
|
@ -96,6 +94,7 @@ function defaultData() {
|
|||
if ($props.formInitialData) return (dms.value = $props.formInitialData);
|
||||
return addDefaultData({
|
||||
reference: route.params.id,
|
||||
hasFile: $props.hasFile,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue