企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
### navigator ![](https://box.kancloud.cn/b8c89e2dd81af8ffbe3619aa67e50c7d_979x588.png) ![](https://box.kancloud.cn/83ebb504c43b8b0dffa5c9fb3108d856_974x473.png) 示例代码: /** wxss **/ /** 修改默认的navigator点击态 **/ .navigator-hover { color:blue; } /** 自定义其他点击态样式类 **/ .other-navigator-hover { color:red; } <!-- sample.wxml --> <view class="btn-area"> <navigator url="/page/navigate/navigate?title=navigate" hover-class="navigator-hover">跳转到新页面</navigator> <navigator url="../../redirect/redirect/redirect?title=redirect" open-type="redirect" hover-class="other-navigator-hover">在当前页打开</navigator> <navigator url="/page/index/index" open-type="switchTab" hover-class="other-navigator-hover">切换 Tab</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 }) } })