use double rAF instead of rIC for lazy pages

This commit is contained in:
Nolan Lawson 2018-03-27 19:46:01 -07:00
parent 148b1f1b38
commit bf0592aee4

View file

@ -2,11 +2,13 @@
<:Component {pageComponent} :params />
{{/if}}
<script>
import { scheduleIdleTask } from '../_utils/scheduleIdleTask'
export default {
oncreate() {
scheduleIdleTask(() => this.set({revealed: true}))
requestAnimationFrame(() => {
requestAnimationFrame(() => {
this.set({revealed: true})
})
})
},
data: () => ({
revealed: !process.browser