ref |> 解决从我的评论列表进入文章或动态后,立即返回时存在潜在崩溃问题
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Showing
2 changed files
with
7 additions
and
0 deletions
| @@ -129,7 +129,11 @@ export struct DynamicDetailComponent { | @@ -129,7 +129,11 @@ export struct DynamicDetailComponent { | ||
| 129 | }) | 129 | }) |
| 130 | 130 | ||
| 131 | } | 131 | } |
| 132 | + | ||
| 132 | aboutToDisappear() { | 133 | aboutToDisappear() { |
| 134 | + if (this.lastTimeoutId) { | ||
| 135 | + clearTimeout(this.lastTimeoutId) | ||
| 136 | + } | ||
| 133 | this.viewBlogInsightIntentShare() | 137 | this.viewBlogInsightIntentShare() |
| 134 | 138 | ||
| 135 | } | 139 | } |
| @@ -558,6 +558,9 @@ export struct ImageAndTextPageComponent { | @@ -558,6 +558,9 @@ export struct ImageAndTextPageComponent { | ||
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | aboutToDisappear() { | 560 | aboutToDisappear() { |
| 561 | + if (this.lastTimeoutId) { | ||
| 562 | + clearTimeout(this.lastTimeoutId) | ||
| 563 | + } | ||
| 561 | //意图上报 | 564 | //意图上报 |
| 562 | this.viewBlogInsightIntentShare() | 565 | this.viewBlogInsightIntentShare() |
| 563 | } | 566 | } |
-
Please register or login to post a comment