|
|
|
@ -1,8 +1,8 @@ |
|
|
|
<template> |
|
|
|
<div class="tabs" v-if="menuList.find(({ content: { path } }) => path === $route.path)"> |
|
|
|
<div :class="['item', tab.content.path === $route.path ? 'active' : '']" v-for="(tab, i) of menuList" :key="tab.id" @click="goPage(tab)"> |
|
|
|
<div class="icon"><img :src="theme.images[tab.content.moduleName]" /></div> |
|
|
|
<div class="title">{{ tab.content.name }}</div> |
|
|
|
<div class="tabs" v-if="menuList.find(({ routePath }) => routePath === $route.path)"> |
|
|
|
<div :class="['item', tab.routePath === $route.path ? 'active' : '']" v-for="(tab, i) of menuList" :key="tab.id" @click="goPage(tab)"> |
|
|
|
<div class="icon"><img :src="theme.images[tab.routePath.slice(1)]" /></div> |
|
|
|
<div class="title">{{ tab.moduleName }}</div> |
|
|
|
<div class="count" v-if="i === 0 && activityCount">{{ activityCount }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -19,7 +19,7 @@ const router = useRouter() |
|
|
|
const store = useStore() |
|
|
|
const { menuList, theme } = storeToRefs(store) |
|
|
|
const goPage = item => { |
|
|
|
router.push(item.content.path) |
|
|
|
router.push(item.routePath) |
|
|
|
} |
|
|
|
|
|
|
|
getActivityList().then(({ data }) => { |
|
|
|
|