From 6a39094090bb96721acd11941d84c84336faefd0 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Fri, 09 Jan 2026 18:59:24 +0800
Subject: [PATCH] 1
---
src/components/BottomNav.vue | 58 ++++++++++++++++++++++++++++++++++------------------------
1 files changed, 34 insertions(+), 24 deletions(-)
diff --git a/src/components/BottomNav.vue b/src/components/BottomNav.vue
index 252f7bb..2693c29 100644
--- a/src/components/BottomNav.vue
+++ b/src/components/BottomNav.vue
@@ -7,7 +7,9 @@
:class="{ active: $route.path === item.path }"
@click="$router.push(item.path)"
>
- <div class="nav-icon" v-html="item.icon"></div>
+ <div class="nav-icon">
+ <Icon :icon="item.icon" />
+ </div>
<span class="nav-label">{{ item.label }}</span>
</div>
</div>
@@ -15,34 +17,35 @@
<script setup lang="ts">
import { useRoute } from 'vue-router'
+import { Icon } from '@iconify/vue'
const route = useRoute()
const navItems = [
{
path: '/',
- label: '首页',
- icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" fill="currentColor"/></svg>'
+ label: '首页',
+ icon: 'solar:home-bold'
},
{
path: '/market',
- label: '行情',
- icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z" fill="currentColor"/></svg>'
+ label: '行情',
+ icon: 'solar:graph-up-bold'
},
{
path: '/trade',
- label: '交易',
- icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z" fill="currentColor"/></svg>'
+ label: '交易',
+ icon: 'solar:transfer-horizontal-bold'
},
{
path: '/discover',
- label: '发现',
- icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill="currentColor"/></svg>'
+ label: '发现',
+ icon: 'solar:compass-bold'
},
{
path: '/wallet',
- label: '钱包',
- icon: '<svg width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z" fill="currentColor"/></svg>'
+ label: '钱包',
+ icon: 'solar:wallet-bold'
}
]
</script>
@@ -55,14 +58,15 @@
bottom: 0;
left: 0;
right: 0;
- height: 60px;
+ min-height: 70px;
+ padding: 8px 0;
background: #ffffff;
border-top: 1px solid $border-light;
display: flex;
justify-content: space-around;
align-items: center;
z-index: 1000;
- padding-bottom: env(safe-area-inset-bottom);
+ padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.nav-item {
@@ -74,29 +78,35 @@
cursor: pointer;
&.active {
- .nav-icon {
- color: $primary-blue;
- }
.nav-label {
- color: $primary-blue;
+ color: $text-primary;
+ font-weight: 600;
}
}
}
.nav-icon {
- width: 24px;
- height: 24px;
+ width: 32px;
+ height: 32px;
+ margin-bottom: 4px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
color: $text-tertiary;
- margin-bottom: 2px;
- svg {
- width: 100%;
- height: 100%;
+ :deep(svg) {
+ width: 32px;
+ height: 32px;
+ color: inherit;
}
}
+.nav-item.active .nav-icon {
+ color: $primary;
+}
+
.nav-label {
- font-size: $font-xs;
+ font-size: $font-sm;
color: $text-tertiary;
}
</style>
--
Gitblit v1.9.3