use double rAF instead of rIC for lazy pages
This commit is contained in:
parent
148b1f1b38
commit
bf0592aee4
|
@ -2,11 +2,13 @@
|
||||||
<:Component {pageComponent} :params />
|
<:Component {pageComponent} :params />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<script>
|
<script>
|
||||||
import { scheduleIdleTask } from '../_utils/scheduleIdleTask'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
oncreate() {
|
oncreate() {
|
||||||
scheduleIdleTask(() => this.set({revealed: true}))
|
requestAnimationFrame(() => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
this.set({revealed: true})
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
revealed: !process.browser
|
revealed: !process.browser
|
||||||
|
|
Loading…
Reference in a new issue