File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " miniprogram-recycle-view" ,
3- "version" : " 0.1.1 " ,
3+ "version" : " 0.1.2 " ,
44 "description" : " miniprogram custom component" ,
55 "main" : " miniprogram_dist/index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -340,9 +340,7 @@ RecycleContext.prototype._recalculateSize = function (list) {
340340 const listLen = list . length
341341 // 把整个页面拆分成200*200的很多个方格, 判断每个数据落在哪个方格上
342342 for ( let i = 0 ; i < listLen ; i ++ ) {
343- if ( typeof list [ i ] . __index__ === 'undefined' ) {
344- list [ i ] . __index__ = i
345- }
343+ list [ i ] . __index__ = i
346344 let itemSize = { }
347345 // 获取到每一项的宽和高
348346 if ( funcExist ) {
@@ -574,4 +572,8 @@ RecycleContext.prototype.getTotalHeight = function () {
574572 this . checkComp ( )
575573 return this . comp . getTotalHeight ( )
576574}
575+ // 返回完整的列表数据
576+ RecycleContext . prototype . getList = function ( ) {
577+ return recycleData [ this . id ] . list
578+ }
577579module . exports = RecycleContext
You can’t perform that action at this time.
0 commit comments