update the media value url

This commit is contained in:
2023-05-02 21:05:07 +10:00
parent 6a16d545ec
commit e8e1e91d1c

View File

@@ -305,6 +305,10 @@ const disabled = ref(props.disabled);
watch( watch(
() => value.value, () => value.value,
(newValue) => { (newValue) => {
if (props.type === "media") {
mediaUrl.value = value.value.url ?? "";
}
active.value = active.value =
newValue.length > 0 || newValue.length > 0 ||
newValue instanceof File || newValue instanceof File ||
@@ -357,7 +361,7 @@ if (form) {
); );
} }
const mediaUrl = ref(value.value.url); const mediaUrl = ref(value.value.url ?? "");
const handleFocus = () => { const handleFocus = () => {
active.value = true; active.value = true;