zoukankan      html  css  js  c++  java
  • 微信小程序组件navigator

    导航navigator:官方文档

    Demo Code:

    // redirect.js navigator.js
    Page({
      onLoad: function(options) {
        this.setData({
          title: options.title
        })
      }
    })
    JS
    <!-- 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>
    WXML
    /** wxss **/
    /** 修改默认的navigator点击态 **/
    .navigator-hover {
        color:blue;
    }
    /** 自定义其他点击态样式类 **/
    .other-navigator-hover {
        color:red;
    }
    WXSS
  • 相关阅读:
    h5 穿透滚动
    Safari 导航栏
    浮层滚动问题
    兼容性常规检测
    CORS
    Webpack 一些概念
    01 离散时间信号的时域表示
    03 信道容量
    01 MATLAB基本概念
    02 字斟句酌
  • 原文地址:https://www.cnblogs.com/betterlife/p/5974043.html
Copyright © 2011-2022 走看看