<a>
组件用于实现页面间的跳转。
::: tip 不可以在标签内部直接添加文本,需要使用 <text>
标签来显示文本。 :::
<a href="http://dotwe.org/raw/dist/a5e3760925ac3b9d68a3aa0cc0298857.bundle.wx"> <text>Jump</text> </a>
::: tip click
事件的回调函数和 href
跳转的执行顺序未被定义,不要使用 click
来进行 href
跳转前的逻辑处理。 :::
<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>
rax-link
是 <a>
组件的上层封装,抹平了 Web 和 Weex 的展现
import { createElement, render } from 'rax'; import Driver from "driver-universal"; import Link from 'rax-link'; import Text from 'rax-text'; function App() { return <Link href={"//www.google.com"} onPress={(e)=>{console.log(e)}}> <Text>点击跳转</Text> </Link> }