@@ -116,28 +116,28 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
116116 default : function _default ( ) { }
117117 }
118118 } ,
119- // use alter to identify which prop change.
119+ // use changeProp to identify which prop change.
120120 watch : {
121121 size : function size ( ) {
122- this . alter = 'size' ;
122+ this . changeProp = 'size' ;
123123 } ,
124124 remain : function remain ( ) {
125- this . alter = 'remain' ;
125+ this . changeProp = 'remain' ;
126126 } ,
127127 bench : function bench ( ) {
128- this . alter = 'bench' ;
128+ this . changeProp = 'bench' ;
129129 this . itemModeForceRender ( ) ;
130130 } ,
131131 start : function start ( ) {
132- this . alter = 'start' ;
132+ this . changeProp = 'start' ;
133133 this . itemModeForceRender ( ) ;
134134 } ,
135135 offset : function offset ( ) {
136- this . alter = 'offset' ;
136+ this . changeProp = 'offset' ;
137137 this . itemModeForceRender ( ) ;
138138 } ,
139139 itemcount : function itemcount ( ) {
140- this . alter = 'itemcount' ;
140+ this . changeProp = 'itemcount' ;
141141 this . itemModeForceRender ( ) ;
142142 }
143143 } ,
@@ -183,17 +183,17 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
183183 beforeUpdate : function beforeUpdate ( ) {
184184 var delta = this . delta ;
185185 delta . keeps = this . remain + ( this . bench || this . remain ) ;
186- var calcstart = this . alter === 'start' ? this . start : delta . start ;
186+ var calcstart = this . changeProp === 'start' ? this . start : delta . start ;
187187 var zone = this . getZone ( calcstart ) ; // if start, size or offset change, update scroll position.
188188
189- if ( this . alter && [ 'start' , 'size' , 'offset' ] . includes ( this . alter ) ) {
190- var scrollTop = this . alter === 'offset' ? this . offset : this . variable ? this . getVarOffset ( zone . isLast ? delta . total : zone . start ) : zone . isLast && delta . total - calcstart <= this . remain ? delta . total * this . size : calcstart * this . size ;
189+ if ( this . changeProp && [ 'start' , 'size' , 'offset' ] . includes ( this . changeProp ) ) {
190+ var scrollTop = this . changeProp === 'offset' ? this . offset : this . variable ? this . getVarOffset ( zone . isLast ? delta . total : zone . start ) : zone . isLast && delta . total - calcstart <= this . remain ? delta . total * this . size : calcstart * this . size ;
191191 this . $nextTick ( this . setScrollTop . bind ( this , scrollTop ) ) ;
192192 } // if points out difference, force update once again.
193193
194194
195- if ( this . alter || delta . end !== zone . end || calcstart !== zone . start ) {
196- this . alter = '' ;
195+ if ( this . changeProp || delta . end !== zone . end || calcstart !== zone . start ) {
196+ this . changeProp = '' ;
197197 delta . end = zone . end ;
198198 delta . start = zone . start ;
199199 this . forceRender ( ) ;
@@ -473,9 +473,11 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
473473 }
474474 } ,
475475 render : function render ( h ) {
476- var list = this . filter ( h ) ;
477- var delta = this . delta ;
478476 var dbc = this . debounce ;
477+ var list = this . filter ( h ) ;
478+ var _this$delta = this . delta ,
479+ paddingTop = _this$delta . paddingTop ,
480+ paddingBottom = _this$delta . paddingBottom ;
479481 return h ( this . rtag , {
480482 'ref' : 'vsl' ,
481483 'style' : {
@@ -489,8 +491,8 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
489491 } , [ h ( this . wtag , {
490492 'style' : {
491493 'display' : 'block' ,
492- 'padding-top' : delta . paddingTop + 'px' ,
493- 'padding-bottom' : delta . paddingBottom + 'px'
494+ 'padding-top' : paddingTop + 'px' ,
495+ 'padding-bottom' : paddingBottom + 'px'
494496 } ,
495497 'class' : this . wclass ,
496498 'attrs' : {
0 commit comments