类别:uni-app文档

日期:2020-11-24 浏览:2030 评论:0

  navigator

**属性名 **

类型 默认值 说明 平台支持

url String  应用内的跳转链接,值为相对路径或绝对路径,如:"../first/first","/pages/first/first",注意不能加 .vue 后缀 

open-type String navigate 跳转方式 

delta Number  当 open-type 为 'navigateBack' 时有效,表示回退的层数 

hover-class String navigator-hover 指定点击时的样式类,当hover-class="none"时,没有点击态效果 

hover-stop-propagation Boolean false 指定是否阻止本节点的祖先节点出现点击态 微信小程序

hover-start-time Number 50 按住后多久出现点击态,单位毫秒 

hover-stay-time Number 600 手指松开后点击态保留时间,单位毫秒  

open-type 有效值:

  值 说明 平台支持

navigate 对应 uni.navigateTo 的功能 

redirect 对应 uni.redirectTo 的功能 

switchTab 对应 uni.switchTab 的功能 

reLaunch 对应 uni.reLaunch 的功能 微信小程序

navigateBack 对应 uni.navigateBack 的功能 微信小程序

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

示例:

<template>
    <view>
        <view class="page-body">
            <view class="btn-area">
                <navigator url="navigate/navigate?title=navigate" hover-class="navigator-hover">
                    <button type="default">跳转到新页面</button>
                </navigator>
                <navigator url="redirect/redirect?title=redirect" redirect hover-class="other-navigator-hover">
                    <button type="default">在当前页打开</button>
                </navigator>
            </view>
        </view>
    </view></template>export default {
    data() {
        return {
            title: 'navigator'
        }
    },
    methods: {
    }}

页面传值及接收
index/index.vue

test.vue 接收参数


本文标题:uni-app 组件 - navigator(导航)及页
本文链接:https://vtzw.com/post/451.html
作者授权:除特别说明外,本文由 零一 原创编译并授权 零一的世界 刊载发布。
版权声明:本文不使用任何协议授权,您可以任何形式自由转载或使用。
 您阅读本篇文章共花了: 

 可能感兴趣的文章

评论区

发表评论 / 取消回复

必填

选填

选填

◎欢迎讨论,请在这里发表您的看法及观点。