Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
不推荐使用,建议 Web 场景使用 a
标签,小程序场景使用 navigator
标签
Web / Weex / 阿里小程序 / 微信小程序 / 字节跳动小程序
Link 是基础的链接组件,同 a 标签。它带有默认样式 textDecoration: 'none'。 在浏览器中,同我们熟悉的 a 标签,使用 Link 标签并不能新开一个 webview ,它只是在当前的 webview 中做页面的跳转。
$ npm install rax-link --save
小程序中需要通过 miniappHref 传递参数支持跳转,参数以“跳转类型:目标页面路径”格式传递,跳转类型支持:
?
分隔,参数键与参数值用=
相连,不同参数必须用&
分隔path?key1=value1&key2=value2
?
分隔,参数键与参数值用 =
相连,不同参数必须用&
分隔path?key1=value1&key2=value2
app.json
的 tabbar
字段定义的页面)miniappHref
参数的格式中目标页面路径部分所对应的是返回的页面数(例如:navigateBack:1
表示返回上一级),如果返回的页面数大于现有打开的页面数,则返回到首页。属性 | 类型 | 默认值 | 必填 | 描述 | 支持 |
---|---|---|---|---|---|
onClick | function | - | false | 节点被点击之后触发 | |
href | string | - | true | 跳转目标地址 | |
miniappHref | string | - | true | 跳转类型:目标页面路径 |
import { createElement, render } from 'rax';
import DriverUniversal from 'driver-universal';
import Link from 'rax-link';
import Text from 'rax-text';
render(
<Link
href={'//www.taobao.com'}
miniappHref={'/pages/Home/index'}
onClick={e => {
console.log(e);
}}
>
<Text
style={{
fontSize: 14,
color: '#333333',
}}
>
点击跳转
</Text>
</Link>,
document.body,
{ driver: DriverUniversal },
);
FAQs
Link component for Rax.
We found that rax-link demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.