Skip to content

Commit c0b95c5

Browse files
author
cunjinli
committed
A getTotalHeight
1 parent 280d78f commit c0b95c5

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "miniprogram-recycle-view",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "miniprogram custom component",
55
"main": "miniprogram_dist/index.js",
66
"scripts": {

src/recycle-view.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,9 @@ Component({
731731
}
732732
return indexes
733733
},
734+
getTotalHeight() {
735+
return this.totalHeight
736+
},
734737
setUseInPage(useInPage) {
735738
this.useInPage = useInPage
736739
},

src/utils/recycle-context.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,4 +536,8 @@ RecycleContext.prototype.getViewportItems = function (inViewportPx) {
536536
}
537537
return viewportItems
538538
}
539+
RecycleContext.prototype.getTotalHeight = function () {
540+
this.checkComp()
541+
return this.comp.getTotalHeight()
542+
}
539543
module.exports = RecycleContext

0 commit comments

Comments
 (0)