You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by zs...@apache.org on 2018/12/14 04:31:41 UTC
[incubator-weex-site] branch draft updated: Update a.md
This is an automated email from the ASF dual-hosted git repository.
zshshr pushed a commit to branch draft
in repository https://gitbox.apache.org/repos/asf/incubator-weex-site.git
The following commit(s) were added to refs/heads/draft by this push:
new 9b5dee3 Update a.md
9b5dee3 is described below
commit 9b5dee356e810ffe06b292acfff096bcd2320c1c
Author: zshshr <zh...@gmail.com>
AuthorDate: Fri Dec 14 12:31:38 2018 +0800
Update a.md
---
docs/docs/components/a.md | 53 +++++++++++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 23 deletions(-)
diff --git a/docs/docs/components/a.md b/docs/docs/components/a.md
index d7c8411..cf128b2 100644
--- a/docs/docs/components/a.md
+++ b/docs/docs/components/a.md
@@ -1,35 +1,42 @@
-# Introduction
+---
+title: <a>
+type: references
+group: Build-in Components
+order: 8.01
+version: 2.1
+---
-<a> used to implement jumps between pages.
-## Attributes
+`<a>` is mainly used for navigation between weex pages。
-* **href** string. target url of jump,target page must be a weex page.
-it is a undefined behavior if target page is a `html`
+> **Note:** The behavior of `<a>` is similar to [`<div>`](./div.html) except for the aspect mentioned in current page.
+> **Note:** It's forbidden to add text directly to `<a>`, use [`<text>`](./text.html) to wrap your text instead.
-## Styles
+## Basic Usage
+Wrap the element navigating from with `<a>`
-* **common styles**. Check out [common styles](/wiki/common-styles.html).
+ <a href="http://dotwe.org/raw/dist/a5e3760925ac3b9d68a3aa0cc0298857.bundle.wx">
+ <text>Jump</text>
+ </a>
-## Events
-
-* **common events**. Check out the [common events](/wiki/common-events.html).
-
-## Other
+Refer the [demo](http://dotwe.org/vue/1cec564d6e25c169a0a9a92db3a00955).
-- don't add text in `<a>` directly
+## Attributes:
+| Attribute | Type |Value| Default Value|
+| ------------- | ------ | --- | ------------ |
+| `href` | String | {URL} | - | - |
-- the order of event (`click` and `href`) is unpredictable , so don't do the logic which before `herf` jumps in `click`
+### `href`
+`href` defines the URL that current page will navigate. `href` **must** point to a weex page, the behavior of other case is **undefined**.
+## Style
+Support [common styles](../../wiki/common-styles.html).
-## 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>main page</text>
-</a>
-```
+## Events
+Support [common events](../../wiki/common-events.html)
-[try it](http://dotwe.org/vue/3b789771e48be92a70bd682f084b84b5)
+### `click`
+> **Notes:** The execution order of callback function of click and href is **undefined**. Do **not** use click event to do the preprocessing of `href`.
+## Examples
+* [Basic usage for `<a>`](http://dotwe.org/vue/1cec564d6e25c169a0a9a92db3a00955) .