|
@@ -2,7 +2,7 @@
|
|
<div class="bottom-nav">
|
|
<div class="bottom-nav">
|
|
<a v-for="item in menuList" :key="item.path" :class="{ 'active': activeIndex === item.path }"
|
|
<a v-for="item in menuList" :key="item.path" :class="{ 'active': activeIndex === item.path }"
|
|
@click.prevent="setActiveIndex(item.path)">
|
|
@click.prevent="setActiveIndex(item.path)">
|
|
- <ion-icon :icon="item.icon"></ion-icon>
|
|
|
|
|
|
+ <van-icon style="margin-bottom: 5px;" :name="item.icon" :color="activeIndex === item.path ? '#007BFF' : '#fff'" size="1.3rem" />
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
</a>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@@ -11,18 +11,18 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
-import { homeOutline, navigateCircleOutline, shieldCheckmarkOutline, helpCircleOutline, personCircleOutline } from 'ionicons/icons';
|
|
|
|
|
|
+// import { homeOutline, navigateCircleOutline, shieldCheckmarkOutline, helpCircleOutline, personCircleOutline } from 'ionicons/icons';
|
|
|
|
|
|
const menuList = [
|
|
const menuList = [
|
|
- { name: '首页', icon: homeOutline, path: '/index' },
|
|
|
|
- { name: '一张图', icon: navigateCircleOutline, path: '/onepic' },
|
|
|
|
- { name: '督查', icon: shieldCheckmarkOutline, path: '/inspect' },
|
|
|
|
- { name: '问题', icon: helpCircleOutline, path: '/inspect' },
|
|
|
|
- { name: '我的', icon: personCircleOutline, path: '/inspect' },
|
|
|
|
|
|
+ { name: '首页', icon: 'wap-home-o', path: '/home' },
|
|
|
|
+ { name: '一张图', icon: 'location-o', path: '/map' },
|
|
|
|
+ { name: '督查', icon: 'completed-o', path: '/inspect' },
|
|
|
|
+ { name: '问题', icon: 'orders-o', path: '/question' },
|
|
|
|
+ { name: '我的', icon: 'user-o', path: '/about' },
|
|
]
|
|
]
|
|
|
|
|
|
// 定义当前激活的导航索引
|
|
// 定义当前激活的导航索引
|
|
-const activeIndex = ref('/index');
|
|
|
|
|
|
+const activeIndex = ref('/home');
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
|
// 定义设置激活索引的方法
|
|
// 定义设置激活索引的方法
|
|
@@ -47,24 +47,15 @@ const setActiveIndex = (path) => {
|
|
.bottom-nav a {
|
|
.bottom-nav a {
|
|
color: white;
|
|
color: white;
|
|
text-decoration: none;
|
|
text-decoration: none;
|
|
- padding: 10px;
|
|
|
|
|
|
+ padding: 8px;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
align-items: center;
|
|
- font-size: .8rem;
|
|
|
|
|
|
+ font-size: .7rem;
|
|
|
|
+ border-radius: 10px;
|
|
}
|
|
}
|
|
|
|
|
|
.bottom-nav a.active {
|
|
.bottom-nav a.active {
|
|
color: #007BFF;
|
|
color: #007BFF;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
-<style>
|
|
|
|
-.bottom-nav ion-icon {
|
|
|
|
- font-size: 1.5rem;
|
|
|
|
- color: #fff;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-.bottom-nav .active ion-icon {
|
|
|
|
- color: #007BFF;
|
|
|
|
-}
|
|
|
|
</style>
|
|
</style>
|