Use lozad for lazy image loading

Ref: grouped-emoji-picker
This commit is contained in:
Tusooa Zhu 2021-10-07 23:23:58 -04:00
commit c70cdbb873
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
5 changed files with 26 additions and 2 deletions

View file

@ -1,5 +1,6 @@
import { defineAsyncComponent } from 'vue'
import Checkbox from '../checkbox/checkbox.vue'
import LazyImageContainer from '../../directives/lazy_image_container'
import { library } from '@fortawesome/fontawesome-svg-core'
import {
faBoxOpen,
@ -64,6 +65,9 @@ const EmojiPicker = {
StickerPicker: defineAsyncComponent(() => import('../sticker_picker/sticker_picker.vue')),
Checkbox
},
directives: {
LazyImageContainer
},
methods: {
onStickerUploaded (e) {
this.$emit('sticker-uploaded', e)
@ -184,7 +188,7 @@ const EmojiPicker = {
this.showingStickers = value
},
limitedEmojis (list, groupId) {
return list.slice(0, this.loadedCount[groupId])
return list // list.slice(0, this.loadedCount[groupId])
},
filterByKeyword (list, keyword) {
return filterByKeyword(list, keyword)