Skip to content

Commit 30f15e6

Browse files
committed
fix: make preview url link prio higher for the create/edit view
1 parent cc39864 commit 30f15e6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

custom/uploader.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ onMounted(async () => {
171171
const existingFilePath =
172172
typeof existingValue === 'string' && existingValue.trim() ? existingValue : null;
173173
174-
if (!uploaded.value && existingFilePath) {
174+
if (!uploaded.value && props.record?.[previewColumnName]) {
175+
imgPreview.value = props.record[previewColumnName];
176+
uploaded.value = true;
177+
emit('update:emptiness', false);
178+
} else if (!uploaded.value && existingFilePath) {
175179
const resp = await callAdminForthApi({
176180
path: `/plugin/${props.meta.pluginInstanceId}/get-file-download-url`,
177181
method: 'POST',
@@ -186,11 +190,6 @@ onMounted(async () => {
186190
}
187191
}
188192
189-
if (!uploaded.value && props.record?.[previewColumnName]) {
190-
imgPreview.value = props.record[previewColumnName];
191-
uploaded.value = true;
192-
emit('update:emptiness', false);
193-
}
194193
});
195194
196195
const allowedExtensionsLabel = computed(() => {

0 commit comments

Comments
 (0)