feat: add lazy load of image thumbnails

This commit is contained in:
Oleg Lobanov
2020-07-23 12:01:18 +02:00
parent 94ef59602f
commit bc00165094
4 changed files with 11 additions and 2 deletions

View File

@@ -13,7 +13,7 @@
:aria-label="name"
:aria-selected="isSelected">
<div>
<img v-if="type==='image'" :src="thumbnailUrl">
<img v-if="type==='image'" v-lazy="thumbnailUrl">
<i v-else class="material-icons">{{ icon }}</i>
</div>
@@ -213,4 +213,4 @@ export default {
}
}
}
</script>
</script>

View File

@@ -1,8 +1,11 @@
import Vue from 'vue'
import Noty from 'noty'
import VueLazyload from 'vue-lazyload'
import i18n from '@/i18n'
import { disableExternal } from '@/utils/constants'
Vue.use(VueLazyload)
Vue.config.productionTip = true
const notyDefault = {