微信小程序-页面链接

navigator

页面链接。

微信小程序-页面链接

注:navigator-hover默认为{background-color: rgba(0, 0, 0, 0.1); opacity: 0.7;}<navigator/>的子节点背景色应为透明色

示例代码:

/** wxss **/
/** 修改默认的navigator点击态 **/
.navigator-hover {
    color:blue;
}
/** 自定义其他点击态样式类 **/
.other-navigator-hover {
    color:red;
}
<!-- sample.wxml -->
<view class="btn-area">
  <navigator url="navigate?title=navigate" hover-class="navigator-hover">跳转到新页面</navigator>
  <navigator url="redirect?title=redirect" redirect hover-class="other-navigator-hover">在当前页打开</navigator>
</view>
<!-- navigator.wxml -->
<view style="text-align:center"> {{title}} </view>
<view> 点击左上角返回回到之前页面 </view>
<!-- redirect.wxml -->
<view style="text-align:center"> {{title}} </view>
<view> 点击左上角返回回到上级页面 </view>
// redirect.js navigator.js
Page({
  onLoad: function(options) {
    this.setData({
      title: options.title
    })
  }
})
上一篇:Zookeeper 监视(Watches) 简介(转)


下一篇:安装SQL SERVER 2005出现“sql2005 执行安装向导期间出错 ”