Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uview-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李晖
uview-ui
Commits
4f8c388d
Commit
4f8c388d
authored
Jul 24, 2020
by
TtTao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增:允许自定义导航栏塌陷,以便于沉浸式导航栏设计
parent
9d07eb46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
u-navbar.vue
uview-ui/components/u-navbar/u-navbar.vue
+7
-1
No files found.
uview-ui/components/u-navbar/u-navbar.vue
View file @
4f8c388d
...
...
@@ -28,7 +28,7 @@
</view>
</view>
<!-- 解决fixed定位后导航栏塌陷的问题 -->
<view
class=
"u-navbar-placeholder"
v-if=
"isFixed"
:style=
"
{ width: '100%', height: Number(navbarHeight) + statusBarHeight + 'px' }">
</view>
<view
class=
"u-navbar-placeholder"
v-if=
"isFixed
&& !immersive
"
:style=
"
{ width: '100%', height: Number(navbarHeight) + statusBarHeight + 'px' }">
</view>
</view>
</
template
>
...
...
@@ -59,6 +59,7 @@
* @property {Boolean} is-back 是否显示导航栏左边返回图标和辅助文字(默认true)
* @property {Object} background 导航栏背景设置,见官网说明(默认{ background: '#ffffff' })
* @property {Boolean} is-fixed 导航栏是否固定在顶部(默认true)
* @property {Boolean} immersive 沉浸式,允许fixed定位后导航栏塌陷,仅fixed定位下生效(默认false)
* @property {Boolean} border-bottom 导航栏底部是否显示下边框,如定义了较深的背景颜色,可取消此值(默认true)
* @example <u-navbar back-text="返回" title="剑未配妥,出门已是江湖"></u-navbar>
*/
...
...
@@ -137,6 +138,11 @@
type
:
Boolean
,
default
:
true
},
// 是否沉浸式,允许fixed定位后导航栏塌陷,仅fixed定位下生效
immersive
:
{
type
:
Boolean
,
default
:
false
},
// 是否显示导航栏的下边框
borderBottom
:
{
type
:
Boolean
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment