You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by GitBox <gi...@apache.org> on 2018/12/12 11:50:58 UTC

[GitHub] zshshr closed pull request #230: update doc for

zshshr closed pull request #230: update doc for <a>
URL: https://github.com/apache/incubator-weex-site/pull/230
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/docs/components/a.md b/docs/docs/components/a.md
index d3e6cc790..d7c841165 100644
--- a/docs/docs/components/a.md
+++ b/docs/docs/components/a.md
@@ -1,25 +1,35 @@
-# &lt;a&gt;
-`<a>` 组件用于实现页面间的跳转。
+# Introduction 
 
-```html{1}
+&lt;a&gt;  used to implement jumps between pages.
+## Attributes
+
+* **href** string. target url of jump,target page must be a weex page.
+it is a undefined behavior if target page is a `html`
+
+
+## Styles
+
+* **common styles**. Check out [common styles](/wiki/common-styles.html).
+
+## Events
+
+* **common events**. Check out the [common events](/wiki/common-events.html).
+
+## Other
+
+- don't add text in `<a>` directly
+
+-  the order of event (`click` and `href`) is unpredictable , so don't do the logic which before `herf` jumps in `click`
+
+
+## Example
+
+
+```
 <a href="http://emas-ha-remote-log-poc.oss-cn-beijing.aliyuncs.com/eweex/app/biz-docs-com-mod/upload/271ccdca-db41-423d-981c-c7c6751ba479/show_1.js">
-  <text>主会场</text>
+  <text>main page</text>
 </a> 
 ```
-::: warning 注意
-- 不能直接在 `<a>` 中添加文本。
--  `click` 事件的回调函数和 `href` 跳转的执行顺序**未被定义**,**不要**使用 `click` 来进行 `href` 跳转前的逻辑处理。
-:::
-
-## 属性
-<table>
-  <thead><tr><th style="width: 15%">属性名</th><th style="width: 55%">说明</th><th style="width: 15%">类型</th><th style="width: 15%">默认值</th></tr></thead>
-  <tbody>
-    <tr><td>href</td><td>待跳转的页面 URL,待跳转页面需要是一个 Weex 页面。如果待跳转页面是一个普通 HTML,这会是一个未定义行为</td><td>string</td><td>-</td></tr>
-  </tbody>
-</table>
-
-## Demo
-
-* [页面跳转](http://dotwe.org/vue/3b789771e48be92a70bd682f084b84b5)
-<IPhoneImg imgSrc="https://img.alicdn.com/tfs/TB1scdtoiLaK1RjSZFxXXamPFXa-544-960.gif" />
\ No newline at end of file
+
+[try it](http://dotwe.org/vue/3b789771e48be92a70bd682f084b84b5)
+
diff --git a/docs/zh/docs/components/a.md b/docs/zh/docs/components/a.md
index d3e6cc790..fe88dbc6b 100644
--- a/docs/zh/docs/components/a.md
+++ b/docs/zh/docs/components/a.md
@@ -1,25 +1,33 @@
-# &lt;a&gt;
-`<a>` 组件用于实现页面间的跳转。
+# 简介 
+
+&lt;a&gt; 组件用于实现页面间的跳转。
+
+## 属性
+
+* **href** string. 待跳转的页面 URL,待跳转页面需要是一个 Weex 页面。如果待跳转页面是一个普通 HTML,这会是一个未定义行为
+
+
+## 样式
+
+* **通用样式**. 参见[通用样式](/wiki/common-styles.html).
+
+## 事件
+
+* **通用事件**. 参见[通用事件](/wiki/common-events.html)
+
+## 其它
 
-```html{1}
-<a href="http://emas-ha-remote-log-poc.oss-cn-beijing.aliyuncs.com/eweex/app/biz-docs-com-mod/upload/271ccdca-db41-423d-981c-c7c6751ba479/show_1.js">
-  <text>主会场</text>
-</a> 
-```
-::: warning 注意
 - 不能直接在 `<a>` 中添加文本。
 -  `click` 事件的回调函数和 `href` 跳转的执行顺序**未被定义**,**不要**使用 `click` 来进行 `href` 跳转前的逻辑处理。
-:::
 
-## 属性
-<table>
-  <thead><tr><th style="width: 15%">属性名</th><th style="width: 55%">说明</th><th style="width: 15%">类型</th><th style="width: 15%">默认值</th></tr></thead>
-  <tbody>
-    <tr><td>href</td><td>待跳转的页面 URL,待跳转页面需要是一个 Weex 页面。如果待跳转页面是一个普通 HTML,这会是一个未定义行为</td><td>string</td><td>-</td></tr>
-  </tbody>
-</table>
 
-## Demo
+## 示例
+
+
+```
+<a href="http://emas-ha-remote-log-poc.oss-cn-beijing.aliyuncs.com/eweex/app/biz-docs-com-mod/upload/271ccdca-db41-423d-981c-c7c6751ba479/show_1.js">
+  <text>主会场</text>
+</a> 
+```
 
-* [页面跳转](http://dotwe.org/vue/3b789771e48be92a70bd682f084b84b5)
-<IPhoneImg imgSrc="https://img.alicdn.com/tfs/TB1scdtoiLaK1RjSZFxXXamPFXa-544-960.gif" />
\ No newline at end of file
+[运行case](http://dotwe.org/vue/3b789771e48be92a70bd682f084b84b5)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services