question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NavBar 导航栏

属性

属性 说明 类型 默认值
title 标题文字 string -
leftArrow 是否显示左侧箭头 boolean true
onLeftClick 导航左侧点击回调 () => void -
rightContent 导航右侧内容 ReactNode -
border 是否显示下边框 boolean false
fixed 是否固定在顶部 boolean false
placeholder 固定在顶部时,是否在对应位置生成一个等高的占位元素 boolean false

CSS 变量

属性 说明 默认值
–z-index 导航栏 z-index –adm-z-index-nav-bar

问题:

--adm-z-index-nav-bar 取多少合适呢?

borderfixedplaceholder 有没有必要做

主要参考:

Ant Design Mobile v2 NavBar Vant NavBar

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
awmleercommented, Sep 16, 2021

那 backArrow 的类型要不要设置成 boolean | ReactNode,为 true 时就是左箭头,为 false 时不渲染,是 ReactNode 就展示用户自定义的

嗯嗯可以的~有些设计风格下的箭头可能是 <- 而不是 <

1reaction
awmleercommented, Sep 16, 2021

稍微调整了一下,back left right 是并列的关系 backArrow 是附属于 back 的,默认为 trueback 默认为 '' 空字符串,所以默认状态下是只展示一个返回箭头。如果用户把 back 设置为 null,那么就整个返回按钮都没有了,不论 backArrow 是什么值。

Read more comments on GitHub >

github_iconTop Results From Across the Web

RFC 5829: Link Relation Types for Simple Version Navigation ...
RFC 5829 Version Navigation Link Relations April 2010 1. Introduction This specification defines a set of link relation types that may be used...
Read more >
[RFC] Refactor main navbar · Discussion #1728 · stashapp/stash
we need to maintain single-click navigation for at least the most used buttons. I know that I will be bothered if I suddenly...
Read more >
Template:RFC Navigation - FlightGear wiki
This template is used on top of pages with proposals in Category:RFC. Usage. Add this to the top of the page: {{RFC Navigation}}....
Read more >
[RFC] Move navbar(s) to new template file (navbar_header.html)
Would it be a good idea to move the <div class="navbar"> section to a new template file navbar_header.html? It's gotten pretty big.
Read more >
Layouts RFC - Next.js
It should be easy to create layouts that can be nested, shared across routes, and have their state preserved on navigation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found