Skip to content

Commit 18c09d8

Browse files
author
xuqingkai
committed
fix: 🐛 修复 Navbar显示下边框时fixed不生效的问题
1 parent 6d1e633 commit 18c09d8

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/pages/navbar/Index.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<!--
2+
* @Author: weisheng
3+
* @Date: 2023-10-17 17:20:31
4+
* @LastEditTime: 2024-03-04 12:48:00
5+
* @LastEditors: weisheng
6+
* @Description:
7+
* @FilePath: \wot-design-uni\src\pages\navbar\Index.vue
8+
* 记得注释
9+
-->
110
<template>
211
<wd-toast></wd-toast>
312
<page-wraper>
@@ -44,6 +53,7 @@
4453
</template>
4554
</wd-navbar>
4655
</demo-block>
56+
<view style="height: 500rpx"></view>
4757
</page-wraper>
4858
</template>
4959
<script lang="ts" setup>

src/uni_modules/wot-design-uni/components/wd-navbar/index.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,16 @@
9090
color: $-navbar-color;
9191
}
9292

93+
94+
@include when(border) {
95+
@include halfPixelBorder('bottom');
96+
}
97+
9398
@include when(fixed) {
9499
position: fixed;
95100
top: 0;
96101
left: 0;
97102
width: 100%;
98103
z-index: 500;
99104
}
100-
101-
@include when(border) {
102-
@include halfPixelBorder('bottom');
103-
}
104105
}

0 commit comments

Comments
 (0)