mirror of
https://github.com/filegator/filegator.git
synced 2025-08-16 16:24:00 +02:00
img lazyload
This commit is contained in:
@@ -6,6 +6,7 @@ import Buefy from 'buefy'
|
||||
import shared from './mixins/shared'
|
||||
import axios from 'axios'
|
||||
import api from './api/api'
|
||||
import VueLazyload from 'vue-lazyload'
|
||||
import '@fortawesome/fontawesome-free/css/all.css'
|
||||
import '@fortawesome/fontawesome-free/css/fontawesome.css'
|
||||
|
||||
@@ -25,6 +26,11 @@ Vue.use(Buefy, {
|
||||
defaultIconPack: 'fas',
|
||||
})
|
||||
|
||||
Vue.use(VueLazyload, {
|
||||
preLoad: 1.3,
|
||||
})
|
||||
|
||||
|
||||
Vue.mixin(shared)
|
||||
|
||||
new Vue({
|
||||
|
@@ -19,7 +19,7 @@
|
||||
<div v-if="images.length > 1" class="column is-one-fifth sidebox">
|
||||
<ul>
|
||||
<li v-for="(image, index) in images" :key="index">
|
||||
<img :src="imageSrc(image.path)" @click="currentItem = image">
|
||||
<img v-lazy="imageSrc(image.path)" @click="currentItem = image">
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user