use rIC to keep scrolling smooth
This commit is contained in:
parent
f137f0c56c
commit
fc8554bed3
|
@ -14,6 +14,7 @@
|
|||
<script>
|
||||
import PseudoVirtualListItem from './PseudoVirtualListItem.html'
|
||||
import { mark, stop } from '../../_utils/marks'
|
||||
import { scheduleIdleTask } from '../../_utils/scheduleIdleTask'
|
||||
|
||||
export default {
|
||||
async oncreate() {
|
||||
|
@ -23,7 +24,7 @@
|
|||
let key = this.get('key')
|
||||
if (makeProps) {
|
||||
let props = await makeProps(key)
|
||||
requestAnimationFrame(() => { // delay slightly to avoid slow scrolling
|
||||
scheduleIdleTask(() => { // delay to avoid slow scrolling
|
||||
mark('PseudoVirtualListLazyItem set props')
|
||||
this.set({props: props})
|
||||
stop('PseudoVirtualListLazyItem set props')
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<script>
|
||||
import VirtualListItem from './VirtualListItem'
|
||||
import { mark, stop } from '../../_utils/marks'
|
||||
import { scheduleIdleTask } from '../../_utils/scheduleIdleTask'
|
||||
|
||||
export default {
|
||||
async oncreate() {
|
||||
|
@ -18,7 +19,7 @@
|
|||
let key = this.get('key')
|
||||
if (makeProps) {
|
||||
let props = await makeProps(key)
|
||||
requestAnimationFrame(() => { // delay slightly to avoid slow scrolling
|
||||
scheduleIdleTask(() => { // delay to avoid slow scrolling
|
||||
mark('VirtualListLazyItem set props')
|
||||
this.set({props: props})
|
||||
stop('VirtualListLazyItem set props')
|
||||
|
|
Loading…
Reference in a new issue