Showing
2 changed files
with
3 additions
and
3 deletions
@@ -267,12 +267,13 @@ Page(Object.assign({ | @@ -267,12 +267,13 @@ Page(Object.assign({ | ||
267 | }) | 267 | }) |
268 | setTimeout(function () { | 268 | setTimeout(function () { |
269 | wx.createSelectorQuery().select('.code-list-item-container').boundingClientRect().exec((r) => { | 269 | wx.createSelectorQuery().select('.code-list-item-container').boundingClientRect().exec((r) => { |
270 | + if (r && r[0] && r[0].height) { | ||
270 | animation.height(r[0].height - 65 * sys.screenWidth / 375).step(); | 271 | animation.height(r[0].height - 65 * sys.screenWidth / 375).step(); |
271 | this.setData({ | 272 | this.setData({ |
272 | animation: animation.export() | 273 | animation: animation.export() |
274 | + }); | ||
275 | + } | ||
273 | }) | 276 | }) |
274 | - }) | ||
275 | - | ||
276 | }.bind(this), 800); | 277 | }.bind(this), 800); |
277 | } | 278 | } |
278 | }); | 279 | }); |
-
Please register or login to post a comment