remove unnecessary rAF
This commit is contained in:
parent
436c8c05aa
commit
c97937eced
|
@ -20,9 +20,12 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import { mark, stop } from '../_utils/marks'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
oncreate() {
|
oncreate() {
|
||||||
requestAnimationFrame(() => {
|
mark('LazyImage oncreate()')
|
||||||
let img = new Image()
|
let img = new Image()
|
||||||
let src = this.get('src')
|
let src = this.get('src')
|
||||||
let fallback = this.get('fallback')
|
let fallback = this.get('fallback')
|
||||||
|
@ -41,7 +44,7 @@
|
||||||
this.set({displaySrc: fallback})
|
this.set({displaySrc: fallback})
|
||||||
}
|
}
|
||||||
img.src = src
|
img.src = src
|
||||||
})
|
stop('LazyImage oncreate()')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
Reference in a new issue