Skip to content

Commit

Permalink
feat(ObjectPortrait): add lazyLoading prop
Browse files Browse the repository at this point in the history
add prop for img loading attribute
  • Loading branch information
rudnovd committed Feb 9, 2022
1 parent d1a87f4 commit d2f1992
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/ObjectPortrait.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class="object-portrait"
:alt="object.name"
:title="object.name"
loading="lazy"
:loading="lazyLoading ? 'lazy' : 'eager'"
@click="$emit('click', object.id)"
/>
</picture>
Expand Down Expand Up @@ -39,6 +39,10 @@ export default defineComponent({
type: [Number, String],
default: 'auto',
},
lazyLoading: {
type: Boolean,
default: true,
},
},
emits: ['click'],
})
Expand Down

0 comments on commit d2f1992

Please sign in to comment.