- 在 goods API 中添加 userArtworks 函数- 更新 auth store,将 userInfo 默认值改为对象 - 优化 LiveRoom 页面布局,添加安全区域支持 - 修改 AppFooter 组件,修复路由判断逻辑 - 更新首页 Column 组件,调整图片显示样式 - 在 Profile 页面添加用户信息展示
41 lines
995 B
Vue
41 lines
995 B
Vue
<script setup>
|
|
import { useAppFooterRouteNames as names } from '~/config/index.js'
|
|
import MyIcon from "~/components/icons/MyIcon.vue";
|
|
import HomeIcon from "~/components/icons/HomeIcon.vue";
|
|
const route = useRoute()
|
|
|
|
const active = ref(0)
|
|
const show = computed(() => {
|
|
if (route.name && names.includes(route.name))
|
|
return true
|
|
return false
|
|
})
|
|
const initData=()=>{
|
|
active.value=route.path==='/profile'?1:0
|
|
}
|
|
|
|
onMounted(()=>{
|
|
initData()
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="show">
|
|
|
|
<van-tabbar v-model="active" route placeholder fixed>
|
|
<van-tabbar-item replace to="/">
|
|
<span>{{ $t('tabbar.home') }}</span>
|
|
<template #icon>
|
|
<HomeIcon :active="active===0"></HomeIcon>
|
|
</template>
|
|
</van-tabbar-item>
|
|
<van-tabbar-item replace to="/profile">
|
|
<span>{{ $t('tabbar.profile') }}</span>
|
|
<template #icon>
|
|
<MyIcon :active="active===1"></MyIcon>
|
|
</template>
|
|
</van-tabbar-item>
|
|
</van-tabbar>
|
|
</div>
|
|
</template>
|