This commit is contained in:
2026-04-28 14:24:47 +08:00
parent 9b9005a66e
commit 05a1193e95
2 changed files with 3 additions and 40 deletions

View File

@ -6,9 +6,7 @@
</span> </span>
<span :style="{color:fontColor}" class="navtitle">{{ title }}</span> <span :style="{color:fontColor}" class="navtitle">{{ title }}</span>
<van-icon :name="rightIcon" :color="props.fontColor" size="25px" @click.stop="onClickRight" v-if="showRight" /> <van-icon :name="rightIcon" :color="props.fontColor" size="25px" @click.stop="onClickRight" v-if="showRight" />
<span class="rightTitle" @click="onClickRight" v-if="rightTitle">{{ <span class="rightTitle" @click="onClickRight" v-if="rightTitle">{{ rightTitle }}</span>
rightTitle
}}</span>
</div> </div>
</van-config-provider> </van-config-provider>
</template> </template>

View File

@ -1,12 +1,7 @@
<template> <template>
<div class="map-page"> <div class="map-page">
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<div class="nav-bar"> <TopNav title="预警地图" rightIcon="filter-o" :showRight="true" @click-right="showFilter = !showFilter"></TopNav>
<van-icon name="arrow-left" class="nav-back" @click="goBack" />
<h1 class="nav-title">预警地图</h1>
<van-icon name="filter" class="nav-filter" @click="showFilter = !showFilter" />
</div>
<!-- 预警类型切换按钮 --> <!-- 预警类型切换按钮 -->
<div class="type-tabs"> <div class="type-tabs">
<button class="type-tab" :class="{ active: activeAlertType === 'road' }" @click="activeAlertType = 'road'">路况预警</button> <button class="type-tab" :class="{ active: activeAlertType === 'road' }" @click="activeAlertType = 'road'">路况预警</button>
@ -82,6 +77,7 @@
</template> </template>
<script setup> <script setup>
import TopNav from "@/components/topNav.vue";
import { ref, onMounted, watch, nextTick } from "vue"; import { ref, onMounted, watch, nextTick } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import BottomTabs from "@/components/bottomTabs.vue"; import BottomTabs from "@/components/bottomTabs.vue";
@ -204,11 +200,6 @@ onMounted(() => {
fetchUnfinishedEvents(); fetchUnfinishedEvents();
}); });
// 返回
function goBack() {
router.back();
}
// 定位点击 // 定位点击
function handleLocationClick() { function handleLocationClick() {
console.log("定位到当前位置"); console.log("定位到当前位置");
@ -242,32 +233,6 @@ function resetFilter() {
background: #f3f4f6; background: #f3f4f6;
} }
.nav-bar {
display: flex;
align-items: center;
justify-content: space-between;
background: white;
padding: 12px 16px;
border-bottom: 1px solid #e5e7eb;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
.nav-back {
font-size: 24px;
color: #333;
}
.nav-title {
font-size: 17px;
font-weight: 600;
color: #333;
}
.nav-filter {
font-size: 24px;
color: #333;
}
}
.type-tabs { .type-tabs {
display: flex; display: flex;
gap: 12px; gap: 12px;