Skip to content

Commit 8d47439

Browse files
committed
fix: ensure imgPreview updates correctly on upload and log upload changes
1 parent 2764180 commit 8d47439

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

custom/uploader.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ const uploadedSize = ref(0);
107107
const downloadFileUrl = ref('');
108108
109109
watch(uploaded, (value) => {
110+
console.log('Uploaded changed:', value);
110111
emit('update:emptiness', !value);
111112
});
112113
@@ -185,10 +186,10 @@ onMounted(async () => {
185186
}
186187
imgPreview.value = resp.url;
187188
} else {
188-
imgPreview.value = props.record[previewColumnName];
189+
imgPreview.value = props.record[previewColumnName];
190+
uploaded.value = true;
191+
emit('update:emptiness', false);
189192
}
190-
uploaded.value = true;
191-
emit('update:emptiness', false);
192193
} else if (!uploaded.value && existingFilePath) {
193194
const resp = await callAdminForthApi({
194195
path: `/plugin/${props.meta.pluginInstanceId}/get-file-download-url`,

0 commit comments

Comments
 (0)