fix img lazyloading

This commit is contained in:
les 2020-02-21 18:10:21 +01:00
parent f1fe10e715
commit a000704a99
2 changed files with 4 additions and 1 deletions

View file

@ -1,7 +1,8 @@
<template lang="pug"> <template lang="pug">
.card.event.h-event.mt-1.text-white(body-style='padding: 0px;') .card.event.h-event.mt-1.text-white(body-style='padding: 0px;')
nuxt-link(:to='`/event/${event.id}`') nuxt-link(:to='`/event/${event.id}`')
el-image(v-if='showImage && event.image_path' lazy-load :src='`/media/thumb/${event.image_path}`') el-image(v-if='showImage && event.image_path'
lazy :src='`/media/thumb/${event.image_path}`')
.float-right .float-right
i.text-danger.el-icon-refresh(v-if='event.parentId') i.text-danger.el-icon-refresh(v-if='event.parentId')
.badge.text-info(v-if='settings.enable_resources && event.resources && event.resources.length') {{event.resources.length}} .badge.text-info(v-if='settings.enable_resources && event.resources && event.resources.length') {{event.resources.length}}
@ -109,6 +110,7 @@ export default {
} }
} }
.el-image { width: 100% }
img { img {
width: 100%; width: 100%;
max-height: 250px; max-height: 250px;

View file

@ -110,6 +110,7 @@ module.exports = {
cacheGroups: { cacheGroups: {
vendor: { vendor: {
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
enforce: true,
name (module) { name (module) {
// get the name. E.g. node_modules/packageName/not/this/part.js // get the name. E.g. node_modules/packageName/not/this/part.js
// or node_modules/packageName // or node_modules/packageName