File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 133133 return
134134 }
135135
136- delta . end = zone . end
137- delta . start = zone . start
138- this . $forceUpdate ( )
136+ // we'd better make sure calls as less as possible.
137+ if ( zone . start !== delta . start || zone . end !== delta . end ) {
138+ delta . end = zone . end
139+ delta . start = zone . start
140+ this . forceRender ( )
141+ }
142+ } ,
143+
144+ // force render ui list if we needed.
145+ // call this before the next repaint to get better performance.
146+ forceRender ( ) {
147+ var that = this
148+ window . requestAnimationFrame ( function ( ) {
149+ that . $forceUpdate ( )
150+ } )
139151 } ,
140152
141153 // return the scroll passed items count in variable.
358370 this . alter = ''
359371 delta . end = zone . end
360372 delta . start = zone . start
361- this . $forceUpdate ( )
373+ this . forceRender ( )
362374 }
363375 } ,
364376
You can’t perform that action at this time.
0 commit comments