You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ji...@apache.org on 2017/03/31 02:44:23 UTC

[07/50] [abbrv] incubator-weex git commit: * [html5] fix appear direction.

* [html5] fix appear direction.


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/36a71b12
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/36a71b12
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/36a71b12

Branch: refs/heads/0.11-dev
Commit: 36a71b12a7bbe46b2c541cd4187781ff7b8372ef
Parents: 146968b
Author: MrRaindrop <te...@gmail.com>
Authored: Wed Mar 22 21:09:32 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Wed Mar 22 21:09:32 2017 +0800

----------------------------------------------------------------------
 html5/render/vue/utils/component.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/36a71b12/html5/render/vue/utils/component.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/utils/component.js b/html5/render/vue/utils/component.js
index 7e2981c..2a8ff6a 100644
--- a/html5/render/vue/utils/component.js
+++ b/html5/render/vue/utils/component.js
@@ -94,10 +94,10 @@ export function watchAppear (context) {
               listener = listener.fn
             }
             const scrollTop = container.scrollTop || window.pageYOffset
-            lastScrollTop = scrollTop
             listener && listener(createEvent(context.$el, type, {
               direction: scrollTop > lastScrollTop ? 'down' : 'up'
             }))
+            lastScrollTop = scrollTop
           }
         }, 25, true)