feat:增加vant组件库

This commit is contained in:
2026-02-12 17:27:14 +08:00
parent 1b8bd5a7e2
commit 8940b3972a
29 changed files with 241 additions and 269 deletions

View File

@@ -1,10 +1,5 @@
<template>
<div class="tab-bar">
<router-link to="/home" @click="routerClick()" class="item">
<i class="fa-solid fa-house"></i>
<span>主页</span>
</router-link>
<router-link v-if="path.includes('bill')" to="/bill/data"
@click="routerClick()" class="item">
<i class="fa-solid fa-calendar-days"></i>
@@ -174,12 +169,6 @@
<i class="fa-solid fa-box-archive"></i>
<span>归档</span>
</router-link>
<router-link to="/profile/index"
@click="routerClick()" class="item">
<i class="fa-solid fa-user"></i>
<span>我的</span>
</router-link>
</div>
</template>

View File

@@ -5,7 +5,7 @@
type="info" :icon="Back" size="small"
circle color="#FFFFFF"
@click="goBackClick" />
<div v-else class="logo-container">
<div v-else class="logo-container" @click="goHomeClick">
<img :src="getAssetsImageFile('logo/logo.png')" alt="暂无图片" class="logo"/>
<span>{{ appStore.appName }}</span>
</div>
@@ -44,6 +44,10 @@ const router = useRouter()
const title = computed(() => router.currentRoute.value.meta.title)
const goHomeClick = () => {
router.push('/home')
}
const goBackClick = () => {
appStore.isShowMobileBack = false
history.back()

View File

@@ -1,12 +1,14 @@
<template>
<section class="layout-mobile-home"
:class="{ 'hide-tab-bar': appStore.isShowMobileBack }">
<title-bar />
<van-config-provider :theme="appStore.isDark ? 'dark' : 'light'">
<section class="layout-mobile-home"
:class="{ 'hide-tab-bar': appStore.isShowMobileBack }">
<title-bar />
<router-view />
<router-view />
<tab-bar v-if="!appStore.isShowMobileBack"/>
</section>
<tab-bar v-if="!appStore.isShowMobileBack"/>
</section>
</van-config-provider>
</template>
<script lang="ts" setup>