Skip to content

Commit dd40046

Browse files
committed
fix: add fallback template for no image scenario in preview component
https://web.tracklify.com/project/2b7ZVgE5/AdminForth/1305/3NmWNdI9/we-need-to-show-something-even
1 parent 429cd19 commit dd40046

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

custom/preview.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
</template>
3333
</div>
3434
</template>
35-
35+
<template v-else>
36+
{{ t('No image') }}
37+
</template>
3638

3739
</div>
3840
</template>
@@ -66,6 +68,9 @@
6668
import { ref, computed , onMounted, watch, nextTick} from 'vue'
6769
import mediumZoom from 'medium-zoom'
6870
import { useRoute } from 'vue-router'
71+
import { useI18n } from 'vue-i18n';
72+
73+
const { t } = useI18n();
6974
7075
const img = ref(null);
7176
const zoom = ref(null);

0 commit comments

Comments
 (0)