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/24 09:02:08 UTC

[1/2] incubator-weex git commit: * [doc] use inline event handler binding.

Repository: incubator-weex
Updated Branches:
  refs/heads/dev 014aa8183 -> 0a030911e


* [doc] use inline event handler binding.


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

Branch: refs/heads/dev
Commit: 7f34c7f81e4075aaf9174dde6070b02480360889
Parents: 8fa5c93
Author: MrRaindrop <te...@gmail.com>
Authored: Fri Mar 24 16:51:24 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Fri Mar 24 16:51:24 2017 +0800

----------------------------------------------------------------------
 doc/source/v-0.10/references/components/list.md        | 11 +++++------
 .../v-0.10/references/components/refresh-loading.md    | 13 ++++++-------
 2 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7f34c7f8/doc/source/v-0.10/references/components/list.md
----------------------------------------------------------------------
diff --git a/doc/source/v-0.10/references/components/list.md b/doc/source/v-0.10/references/components/list.md
index 3c51418..3b4745e 100644
--- a/doc/source/v-0.10/references/components/list.md
+++ b/doc/source/v-0.10/references/components/list.md
@@ -18,7 +18,7 @@ It can provide excellent experience and performance while still maintaining smoo
 ```html
 <template>
   <list>
-    <cell onappear="onappear" ondisappear="ondisappear" class="row" repeat="{{staffs}}" index="{{$index}}">
+    <cell onappear="onappear($event, $index)" ondisappear="ondisappear($event, $index)" class="row" repeat="{{staffs}}" index="{{$index}}">
       <div class="item">
         <text>{{name}}</text>
       </div>
@@ -45,13 +45,12 @@ It can provide excellent experience and performance while still maintaining smoo
       staffs:[{name:'inns'},{name:'connon'},{name:'baos'},{name:'anna'},{name:'dolley'},{name:'lucy'},{name:'john'}, {name:'lily'},{name:'locke'},{name:'jack'},{name:'danny'},{name:'rose'},{name:'harris'},{name:'lotus'},{name:'louis'}]
     },
     methods:{
-      onappear: function (e) {
-        var index = e.target.attr.index
-        nativeLog('+++++', index);
+      onappear: function (e, index) {
+        console.log('+++++', index)
         console.log(this.staffs[index].name + ' is appearing...');
       },
-      ondisappear:function (e) {
-        nativeLog('+++++', e.target.attr.index);
+      ondisappear:function (e, index) {
+        console.log('+++++', index)
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7f34c7f8/doc/source/v-0.10/references/components/refresh-loading.md
----------------------------------------------------------------------
diff --git a/doc/source/v-0.10/references/components/refresh-loading.md b/doc/source/v-0.10/references/components/refresh-loading.md
index 5152964..8b1d610 100644
--- a/doc/source/v-0.10/references/components/refresh-loading.md
+++ b/doc/source/v-0.10/references/components/refresh-loading.md
@@ -17,7 +17,7 @@ To be rendered properly, the refresh/loading Components must appear inside the S
 **example**
 
 ```html
-<template>
+`<template>
   <list>
     <header>
       <div class="center">
@@ -27,7 +27,7 @@ To be rendered properly, the refresh/loading Components must appear inside the S
     <loading onloading="onloading" display="{{loadingDisplay}}" style="width:750;flex-direction: row;justify-content: center;">
       <loading-indicator style="height:160;width:160;color:#3192e1"></loading-indicator>
     </loading>
-    <cell onappear="onappear" ondisappear="ondisappear" class="row" repeat="{{staffs}}" index="{{$index}}">
+    <cell onappear="onappear($event, $index)" ondisappear="ondisappear($event, $index)" class="row" repeat="{{staffs}}" index="{{$index}}">
         <div class="item">
           <text>{{name}}</text>
         </div>
@@ -69,13 +69,12 @@ To be rendered properly, the refresh/loading Components must appear inside the S
       this.staffs=[{name:'inns'},{name:'connon'},{name:'baos'},{name:'anna'},{name:'dolley'},{name:'lucy'},{name:'john'}, {name:'lily'},{name:'locke'},{name:'jack'},{name:'danny'},{name:'rose'},{name:'harris'},{name:'lotus'},{name:'louis'}];
     },
     methods:{
-      onappear: function (e) {
-        var index = e.target.attr.index
-        // nativeLog('+++++', index);
+      onappear: function (e, index) {
+        // console.log('+++++', index);
         // console.log(this.staffs[index].name + ' is appearing...');
       },
-      ondisappear:function (e) {
-        // nativeLog('+++++', e.target.attr.index);
+      ondisappear:function (e, index) {
+        // console.log('+++++', index);
       },
       onloading:function(e){
         console.log('onloading...');


[2/2] incubator-weex git commit: Merge branch 'dev' of https://github.com/MrRaindrop/incubator-weex into dev

Posted by ji...@apache.org.
Merge branch 'dev' of https://github.com/MrRaindrop/incubator-weex into dev


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

Branch: refs/heads/dev
Commit: 0a030911e043f7c585d4d71e7d52423a272035a6
Parents: 014aa81 7f34c7f
Author: Jinjiang <zh...@me.com>
Authored: Fri Mar 24 17:01:55 2017 +0800
Committer: Jinjiang <zh...@me.com>
Committed: Fri Mar 24 17:01:55 2017 +0800

----------------------------------------------------------------------
 doc/source/v-0.10/references/components/list.md        | 11 +++++------
 .../v-0.10/references/components/refresh-loading.md    | 13 ++++++-------
 2 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------