ApoorvSaxena / ApoorvSaxena/lozad.js

enableAutoReload for background images

オープン
#272 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
7.5k
フォーク
435
PR マージ指標
30日以内にマージされた PR はありません

説明

I am not able to get my images reloaded, enabling the parameter `enableAutoReload `, while using the `data-background-image` to provide the image source.

## Expected Behavior
The background image should be updated for the observed element.

## Current Behavior
The element keeps with the same background image, and the observer is not triggering the update.

## Steps to Reproduce (for bugs)
Following are the relevant parts of the component I am working on:
TEMPLATE:
```

```
SCRIPT:
```
props: {
src: {
type: String,
required: true,
},
mounted() {
this.observer = lozad('.lozad', { enableAutoReload: true })
this.observer.observe()
},
```

## Context
I am trying to build a gallery for a hybrid application with Nuxt (Vue), in which I have an album selector. When I change that selector, the images should change to the ones stored in the new album selected.

## Tested on:
* Browser Name and version: **Google Chrome Version 92.0.4515.131 (Official Build) (64-bit)**
* Operating System and version (desktop or mobile): **Windows 10 Home Version 20H2**
* Framework & Version: **Vue 2.6.14**

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。