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/02/20 06:41:33 UTC

[44/50] [abbrv] incubator-weex git commit: * [doc] Fix typo errors.

* [doc] Fix typo errors.


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

Branch: refs/heads/master
Commit: a28979367c59cb42e6aa192bef2d9b18a669b035
Parents: 6289eed
Author: Yun Dong <yu...@gmail.com>
Authored: Fri Feb 17 12:42:55 2017 +0800
Committer: Yun Dong <yu...@gmail.com>
Committed: Fri Feb 17 12:42:55 2017 +0800

----------------------------------------------------------------------
 .../cn/references/advanced/extend-to-android.md | 15 ++--
 .../cn/references/advanced/extend-to-ios.md     | 75 ++++++++++----------
 .../cn/v-0.10/advanced/extend-to-android.md     | 14 ++--
 doc/source/cn/v-0.10/advanced/extend-to-ios.md  | 74 +++++++++----------
 .../references/advanced/extend-to-android.md    | 17 +++--
 doc/source/references/advanced/extend-to-ios.md | 14 ++--
 doc/source/v-0.10/advanced/extend-to-android.md | 64 ++++++++---------
 doc/source/v-0.10/advanced/extend-to-ios.md     | 18 ++---
 8 files changed, 146 insertions(+), 145 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a2897936/doc/source/cn/references/advanced/extend-to-android.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/advanced/extend-to-android.md b/doc/source/cn/references/advanced/extend-to-android.md
index 9575203..343fdce 100644
--- a/doc/source/cn/references/advanced/extend-to-android.md
+++ b/doc/source/cn/references/advanced/extend-to-android.md
@@ -148,21 +148,22 @@ public class ImageAdapter implements IWXImgLoaderAdapter {
  ```java
  @JSMethod
  public void focus(){
- 	//method implementation
+  //method implementation
  }
  ```
+ 
 - \u6ce8\u518c\u7ec4\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5728weex \u6587\u4ef6\u4e2d\u8c03\u7528
   
   ```html
 	<template>
- 		<mycomponent id='mycomponent'></mycomponent>
+    <mycomponent id='mycomponent'></mycomponent>
 	</template>
 	<script>
-   		module.exports = {
-    		created: function() {
-    			this.$el('mycomponent').focus();
-    		}
-   		}
+    module.exports = {
+      created: function() {
+        this.$el('mycomponent').focus();
+      }
+    }
 	</script>
 	```
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a2897936/doc/source/cn/references/advanced/extend-to-ios.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/advanced/extend-to-ios.md b/doc/source/cn/references/advanced/extend-to-ios.md
index d293487..85f7660 100644
--- a/doc/source/cn/references/advanced/extend-to-ios.md
+++ b/doc/source/cn/references/advanced/extend-to-ios.md
@@ -235,43 +235,44 @@ return [[WXImageView alloc] init];
 ```
 
 ##### component \u65b9\u6cd5
-  WeexSDK 0.9.5 \u4e4b\u540e\u652f\u6301\u4e86\u5728js\u4e2d\u76f4\u63a5\u8c03\u7528component\u7684\u65b9\u6cd5\uff0c\u8fd9\u91cc\u63d0\u4f9b\u4e00\u4e2a\u4f8b\u5b50\uff0c
+
+WeexSDK 0.9.5 \u4e4b\u540e\u652f\u6301\u4e86\u5728 js \u4e2d\u76f4\u63a5\u8c03\u7528 component \u7684\u65b9\u6cd5\uff0c\u8fd9\u91cc\u63d0\u4f9b\u4e00\u4e2a\u4f8b\u5b50
   
-  - \u81ea\u5b9a\u4e49\u4e00\u4e2aWXMyCompoenent \u7684\u7ec4\u4ef6
+- \u81ea\u5b9a\u4e49\u4e00\u4e2a WXMyCompoenent \u7684\u7ec4\u4ef6
   
-	 ```
-	 @implementation WXMyComponent
-	 	WX_EXPORT_METHOD(@selector(focus)) // \u66b4\u9732\u8be5\u65b9\u6cd5\u7ed9js
-	 - (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSArray *)events weexInstance:(WXSDKInstance *)weexInstance
-	 {
-	     if (self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance]) {
-	         // handle your attributes
-	         // handle your styles
-	     }
-	     
-	     return self;
-	 }
-	 
-	 - (void)focus
-	   {
-          NSLog(@"you got it");
-	   }
-	 @end
-	 ```
+  ```
+  @implementation WXMyComponent
+  WX_EXPORT_METHOD(@selector(focus)) // \u66b4\u9732\u8be5\u65b9\u6cd5\u7ed9js
+  - (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSArray *)events weexInstance:(WXSDKInstance *)weexInstance
+  {
+      if (self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance]) {
+          // handle your attributes
+          // handle your styles
+      }
+      
+      return self;
+  }
+
+  - (void)focus
+  {
+      NSLog(@"you got it");
+  }
+  @end
+  ```
 	
-	- \u6ce8\u518c\u7ec4\u4ef6 `[WXSDKEngine registerComponent:@"mycomponent" withClass:[WXMyComponent class]]`
-
-	- \u5728weex \u6587\u4ef6\u4e2d\u8c03\u7528
-
-      ```
-        <template>
-          <mycomponent id='mycomponent'></mycomponent>
-	 	</template>
-		<script>
-          module.exports = {
-            created:function() {
-                      this.$el('mycomponent').focus();
-		    		}
-          }
-		</script>
-      ``` 
+- \u6ce8\u518c\u7ec4\u4ef6 `[WXSDKEngine registerComponent:@"mycomponent" withClass:[WXMyComponent class]]`
+
+- \u5728 weex \u6587\u4ef6\u4e2d\u8c03\u7528
+
+  ```html
+  <template>
+    <mycomponent id='mycomponent'></mycomponent>
+  </template>
+  <script>
+    module.exports = {
+      created:function() {
+        this.$el('mycomponent').focus();
+      }
+    }
+  </script>
+  ``` 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a2897936/doc/source/cn/v-0.10/advanced/extend-to-android.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/v-0.10/advanced/extend-to-android.md b/doc/source/cn/v-0.10/advanced/extend-to-android.md
index f794f73..f816ebd 100644
--- a/doc/source/cn/v-0.10/advanced/extend-to-android.md
+++ b/doc/source/cn/v-0.10/advanced/extend-to-android.md
@@ -149,21 +149,21 @@ public class ImageAdapter implements IWXImgLoaderAdapter {
  ```java
  @JSMethod
  public void focus(){
- 	//method implementation
+ //method implementation
  }
  ```
 - \u6ce8\u518c\u7ec4\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5728weex \u6587\u4ef6\u4e2d\u8c03\u7528
   
   ```html
 	<template>
- 		<mycomponent id='mycomponent'></mycomponent>
+    <mycomponent id='mycomponent'></mycomponent>
 	</template>
 	<script>
-   		module.exports = {
-    		created: function() {
-    			this.$el('mycomponent').focus();
-    		}
-   		}
+    module.exports = {
+      created: function() {
+        this.$el('mycomponent').focus();
+      }
+    }
 	</script>
 	```
 	

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a2897936/doc/source/cn/v-0.10/advanced/extend-to-ios.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/v-0.10/advanced/extend-to-ios.md b/doc/source/cn/v-0.10/advanced/extend-to-ios.md
index 54b855b..b163d62 100644
--- a/doc/source/cn/v-0.10/advanced/extend-to-ios.md
+++ b/doc/source/cn/v-0.10/advanced/extend-to-ios.md
@@ -234,45 +234,45 @@ Weex SDK \u53ea\u63d0\u4f9b\u6e32\u67d3\uff0c\u800c\u4e0d\u662f\u5176\u4ed6\u7684\u80fd\u529b\uff0c\u5982\u679c\u4f60\u9700\u8981 \u50cf\u7f51\u7edc
    <image style="your-custom-style" src="image-remote-source" resize="contain/cover/stretch"></image>
    ```
 ##### component \u65b9\u6cd5
-  WeexSDK 0.9.5 \u4e4b\u540e\u652f\u6301\u4e86\u5728js\u4e2d\u76f4\u63a5\u8c03\u7528component\u7684\u65b9\u6cd5\uff0c\u8fd9\u91cc\u63d0\u4f9b\u4e00\u4e2a\u4f8b\u5b50\uff0c
-  
-  - \u81ea\u5b9a\u4e49\u4e00\u4e2aWXMyCompoenent \u7684\u7ec4\u4ef6
-  
-	 ```
-	 @implementation WXMyComponent
-	 	WX_EXPORT_METHOD(@selector(focus)) // \u66b4\u9732\u8be5\u65b9\u6cd5\u7ed9js
-	 - (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSArray *)events weexInstance:(WXSDKInstance *)weexInstance
-	 {
-	     if (self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance]) {
-	         // handle your attributes
-	         // handle your styles
-	     }
-	     
-	     return self;
-	 }
-	 
-	 - (void)focus
-	   {
-	   		NSLog(@"you got it");
-	   }
-	 @end
-	 ```
+WeexSDK 0.9.5 \u4e4b\u540e\u652f\u6301\u4e86\u5728js\u4e2d\u76f4\u63a5\u8c03\u7528component\u7684\u65b9\u6cd5\uff0c\u8fd9\u91cc\u63d0\u4f9b\u4e00\u4e2a\u4f8b\u5b50\uff0c
+
+- \u81ea\u5b9a\u4e49\u4e00\u4e2aWXMyCompoenent \u7684\u7ec4\u4ef6
+
+    ```
+    @implementation WXMyComponent
+    WX_EXPORT_METHOD(@selector(focus)) // \u66b4\u9732\u8be5\u65b9\u6cd5\u7ed9js
+    - (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSArray *)events weexInstance:(WXSDKInstance *)weexInstance
+    {
+        if (self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance]) {
+            // handle your attributes
+            // handle your styles
+        }
+        
+        return self;
+    }
+    
+    - (void)focus
+    {
+        NSLog(@"you got it");
+    }
+    @end
+    ```
 	
-	- \u6ce8\u518c\u7ec4\u4ef6 `[WXSDKEngine registerComponent:@"mycomponent" withClass:[WXMyComponent class]] `
-	- \u5728weex \u6587\u4ef6\u4e2d\u8c03\u7528
+- \u6ce8\u518c\u7ec4\u4ef6 `[WXSDKEngine registerComponent:@"mycomponent" withClass:[WXMyComponent class]] `
+- \u5728weex \u6587\u4ef6\u4e2d\u8c03\u7528
 
-		```
-		<template>
-	     		<mycomponent id='mycomponent'></mycomponent>
-	 	</template>
-		<script>
-		   module.exports = {
-		    	created: function() {
-		    		this.$el('mycomponent').focus();
-		    		}
-		   }
-		</script>
- 		``` 
+  ```html
+  <template>
+    <mycomponent id='mycomponent'></mycomponent>
+  </template>
+  <script>
+    module.exports = {
+      created: function() {
+        this.$el('mycomponent').focus();
+      }
+    }
+  </script>
+  ``` 
  
  
  

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a2897936/doc/source/references/advanced/extend-to-android.md
----------------------------------------------------------------------
diff --git a/doc/source/references/advanced/extend-to-android.md b/doc/source/references/advanced/extend-to-android.md
index e382372..3d5a8ae 100644
--- a/doc/source/references/advanced/extend-to-android.md
+++ b/doc/source/references/advanced/extend-to-android.md
@@ -165,24 +165,23 @@ public class ImageAdapter implements IWXImgLoaderAdapter {
  for example, define a method in component:
  
  ```java
- 
  @JSMethod
  public void focus(){
- 	//method implementation
+  //method implementation
  }
- 
  ```
+
  after your registration for your own custom component, now you can call it in your js file.
  
  ```html
 <template>
- 		<mycomponent id='mycomponent'></mycomponent>
+  <mycomponent id='mycomponent'></mycomponent>
 </template>
 <script>
-   module.exports = {
-    	created: function() {
-    		this.$el('mycomponent').focus();
-    		}
-   }
+  module.exports = {
+    created: function() {
+      this.$el('mycomponent').focus();
+    }
+  }
 </script>
 ``` 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a2897936/doc/source/references/advanced/extend-to-ios.md
----------------------------------------------------------------------
diff --git a/doc/source/references/advanced/extend-to-ios.md b/doc/source/references/advanced/extend-to-ios.md
index 133e784..398e0d8 100644
--- a/doc/source/references/advanced/extend-to-ios.md
+++ b/doc/source/references/advanced/extend-to-ios.md
@@ -288,15 +288,15 @@ for example:
    
 after your registration for your own custom component, now you can call it in your js file.
  
-```
+```html
 <template>
- 		<mycomponent id='mycomponent'></mycomponent>
+  <mycomponent id='mycomponent'></mycomponent>
 </template>
 <script>
-   module.exports = {
-    	created: function() {
-    		this.$el('mycomponent').focus();
-    		}
-   }
+  module.exports = {
+    created: function() {
+      this.$el('mycomponent').focus();
+    }
+  }
 </script>
 ``` 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a2897936/doc/source/v-0.10/advanced/extend-to-android.md
----------------------------------------------------------------------
diff --git a/doc/source/v-0.10/advanced/extend-to-android.md b/doc/source/v-0.10/advanced/extend-to-android.md
index 4816578..97bb49e 100644
--- a/doc/source/v-0.10/advanced/extend-to-android.md
+++ b/doc/source/v-0.10/advanced/extend-to-android.md
@@ -95,19 +95,19 @@ public class MyViewComponent extends WXComponent{
   public MyViewComponent(WXSDKInstance instance, WXDomObject dom,
                      WXVContainer parent, String instanceId, boolean isLazy)
    {
-	   public MyViewComponent(WXSDKInstance instance, WXDomObject dom,
-	     WXVContainer parent, String instanceId, boolean isLazy) {
-	    super(instance, dom, parent, instanceId, isLazy);
-	   }
-
-	   @Override
-	   protected void initView() {
-	      mHost = new TextView(mContext);
-	   }
-	   @WXComponentProp(name=WXDomPropConstant.WX_ATTR_VALUE)
-	   public void setMyViewValue(String value) {
-	      ((TextView)mHost).setText(value);
-	   }
+     public MyViewComponent(WXSDKInstance instance, WXDomObject dom,
+       WXVContainer parent, String instanceId, boolean isLazy) {
+      super(instance, dom, parent, instanceId, isLazy);
+     }
+
+     @Override
+     protected void initView() {
+        mHost = new TextView(mContext);
+     }
+     @WXComponentProp(name=WXDomPropConstant.WX_ATTR_VALUE)
+     public void setMyViewValue(String value) {
+        ((TextView)mHost).setText(value);
+     }
 }
 ```
 
@@ -160,30 +160,30 @@ public class ImageAdapter implements IWXImgLoaderAdapter {
   }
 }
 ```
+
 #### Component Method
- from WeexSDK `0.9.5`, you can define your component method
+from WeexSDK `0.9.5`, you can define your component method
 
- for example, define a method in component:
- 
- ```java
- 
- @JSMethod
- public void focus(){
- 	//method implementation
- }
- 
- ```
- after your registration for your own custom component, now you can call it in your js file.
+for example, define a method in component:
+
+```java
+@JSMethod
+public void focus(){
+//method implementation
+}
+```
+
+after your registration for your own custom component, now you can call it in your js file.
  
- ```html
+```html
 <template>
- 		<mycomponent id='mycomponent'></mycomponent>
+  <mycomponent id='mycomponent'></mycomponent>
 </template>
 <script>
-   module.exports = {
-    	created: function() {
-    		this.$el('mycomponent').focus();
-    		}
-   }
+  module.exports = {
+    created: function() {
+      this.$el('mycomponent').focus();
+    }
+  }
 </script>
 ``` 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a2897936/doc/source/v-0.10/advanced/extend-to-ios.md
----------------------------------------------------------------------
diff --git a/doc/source/v-0.10/advanced/extend-to-ios.md b/doc/source/v-0.10/advanced/extend-to-ios.md
index cfc69cd..bddb96e 100644
--- a/doc/source/v-0.10/advanced/extend-to-ios.md
+++ b/doc/source/v-0.10/advanced/extend-to-ios.md
@@ -281,23 +281,23 @@ for example:
  
  - (void)focus
    {
-   		NSLog(@"you got it");
+      NSLog(@"you got it");
    }
 @end
 ```
    
- after your registration for your own custom component, now you can call it in your js file.
+after your registration for your own custom component, now you can call it in your js file.
  
-```
+```html
 <template>
- 		<mycomponent id='mycomponent'></mycomponent>
+  <mycomponent id='mycomponent'></mycomponent>
 </template>
 <script>
-   module.exports = {
-    	created: function() {
-    		this.$el('mycomponent').focus();
-    		}
-   }
+  module.exports = {
+    created: function() {
+      this.$el('mycomponent').focus();
+    }
+  }
 </script>
 ```