Skip to content

Commit c276dbe

Browse files
committed
fix(404): add src as data
1 parent e7733f4 commit c276dbe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/error/404.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ export default {
5050
default: () => {},
5151
},
5252
},
53+
data() {
54+
return { src: '/img/404.jpg' };
55+
},
5356
head() {
5457
return {
5558
title: this.$t('error.404.heading'),
@@ -76,7 +79,7 @@ export default {
7679
},
7780
computed: {
7881
_srcset() {
79-
return this.$img.getSizes('/img/404.jpg', {
82+
return this.$img.getSizes(this.src, {
8083
sizes: 'xs:100vw sm:100vw md:100vw lg:100vw xl:100vw',
8184
modifiers: {
8285
format: 'webp',

0 commit comments

Comments
 (0)