You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by mo...@apache.org on 2019/12/05 13:11:19 UTC

[incubator-weex] branch master updated: 修复当数据改变时index无效

This is an automated email from the ASF dual-hosted git repository.

moshen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 3b61758  修复当数据改变时index无效
     new 69c9ed6  Merge pull request #1695 from ttarigo/master
3b61758 is described below

commit 3b61758cf57542ff41fef8c84d2c461be05c1484
Author: ttarigo <Li...@163.com>
AuthorDate: Fri Nov 2 11:55:23 2018 +0800

    修复当数据改变时index无效
---
 ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm
index 402e592..5bd794b 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm
+++ b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.mm
@@ -528,7 +528,9 @@ typedef NS_ENUM(NSInteger, Direction) {
     
     WXRecycleSliderView *recycleSliderView = (WXRecycleSliderView *)_view;
     [recycleSliderView removeItemView:view];
-    [recycleSliderView setCurrentIndex:0];
+    if (self.childrenView.count <= _index) {
+        [recycleSliderView setCurrentIndex:0];
+    }
 }
 
 - (void)updateAttributes:(NSDictionary *)attributes