diff --git a/src/components/TopNavBar/index.vue b/src/components/TopNavBar/index.vue
index 4e4b590..f06d6ca 100644
--- a/src/components/TopNavBar/index.vue
+++ b/src/components/TopNavBar/index.vue
@@ -9,8 +9,8 @@
@@ -103,9 +103,9 @@ onMounted(() => {
// 计算导航栏样式类
const navBarClass = computed(() => {
return [
- "top-nav-bar",
+ "w-full",
{
- "top-nav-bar--fixed": props.fixed,
+ "fixed top-0 left-0 right-0": props.fixed,
},
];
});
@@ -129,7 +129,3 @@ const handleBack = () => {
}
};
-
-
diff --git a/src/components/TopNavBar/styles/index.scss b/src/components/TopNavBar/styles/index.scss
deleted file mode 100644
index 5de46a6..0000000
--- a/src/components/TopNavBar/styles/index.scss
+++ /dev/null
@@ -1,44 +0,0 @@
-// TopNavBar 组件样式
-.top-nav-bar {
- width: 100%;
- background-color: #e8fff1;
-
- &--fixed {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 999;
- }
-}
-
-
-.nav-bar-center {
- flex: 1;
- height: 30px;
- padding: 0 20px; // 为左右按钮留出空间
-
- // 居中对齐(默认)
- &--center {
- justify-content: center;
-
- .nav-bar-title {
- text-align: center;
- }
- }
-
- // 左对齐
- &--left {
- justify-content: flex-start;
- padding-left: 20px; // 为返回按钮留出更多空间
-
- .nav-bar-title {
- text-align: left;
- }
- }
-}
-
-// 固定导航栏时的页面内容适配
-.page-with-fixed-navbar {
- padding-top: calc(var(--status-bar-height, 44px) + 44px);
-}