|
@@ -1,6 +1,19 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import TabbarEvo from '@/components/tabbar-evo.vue'
|
|
import TabbarEvo from '@/components/tabbar-evo.vue'
|
|
import { iconCamera, iconWallet } from '@/core/libs/pngs'
|
|
import { iconCamera, iconWallet } from '@/core/libs/pngs'
|
|
|
|
+import {
|
|
|
|
+ home,
|
|
|
|
+ homeActive,
|
|
|
|
+ material,
|
|
|
|
+ materialActive,
|
|
|
|
+ message,
|
|
|
|
+ messageActive,
|
|
|
|
+ mine,
|
|
|
|
+ mineActive,
|
|
|
|
+ publish,
|
|
|
|
+} from '@/core/libs/svgs'
|
|
|
|
+import { currRoute } from '@/utils'
|
|
|
|
+import { select } from 'radash'
|
|
import type { ConfigProviderThemeVars } from 'wot-design-uni'
|
|
import type { ConfigProviderThemeVars } from 'wot-design-uni'
|
|
|
|
|
|
const themeVars: ConfigProviderThemeVars = {
|
|
const themeVars: ConfigProviderThemeVars = {
|
|
@@ -10,27 +23,37 @@ const themeVars: ConfigProviderThemeVars = {
|
|
}
|
|
}
|
|
const publishState = ref(false)
|
|
const publishState = ref(false)
|
|
const items = [
|
|
const items = [
|
|
- { title: '首页', icon: 'home', iconPath: '/static/tabbar/home.svg', path: '/pages/home/index' },
|
|
|
|
|
|
+ {
|
|
|
|
+ title: '首页',
|
|
|
|
+ iconPath: home,
|
|
|
|
+ selectedIconPath: homeActive,
|
|
|
|
+ path: '/pages/home/index',
|
|
|
|
+ },
|
|
{
|
|
{
|
|
title: '材料',
|
|
title: '材料',
|
|
- icon: 'home',
|
|
|
|
- iconPath: '/static/tabbar/material.svg',
|
|
|
|
|
|
+ iconPath: material,
|
|
|
|
+ selectedIconPath: materialActive,
|
|
path: '/pages/material/index',
|
|
path: '/pages/material/index',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '发布',
|
|
title: '发布',
|
|
- icon: 'home',
|
|
|
|
- iconPath: '/static/tabbar/publish.svg',
|
|
|
|
|
|
+ iconPath: publish,
|
|
|
|
+ selectedIconPath: publish,
|
|
path: '/pages/publish/index',
|
|
path: '/pages/publish/index',
|
|
hiddenTitle: true,
|
|
hiddenTitle: true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '消息',
|
|
title: '消息',
|
|
- icon: 'home',
|
|
|
|
- iconPath: '/static/tabbar/message.svg',
|
|
|
|
|
|
+ iconPath: message,
|
|
|
|
+ selectedIconPath: messageActive,
|
|
path: '/pages/messages/index',
|
|
path: '/pages/messages/index',
|
|
},
|
|
},
|
|
- { title: '我的', icon: 'home', iconPath: '/static/tabbar/mine.svg', path: '/pages/mine/index' },
|
|
|
|
|
|
+ {
|
|
|
|
+ title: '我的',
|
|
|
|
+ iconPath: mine,
|
|
|
|
+ selectedIconPath: mineActive,
|
|
|
|
+ path: '/pages/mine/index',
|
|
|
|
+ },
|
|
]
|
|
]
|
|
const handleTabbarItemClick = (path: string) => {
|
|
const handleTabbarItemClick = (path: string) => {
|
|
if (path === '/pages/publish/index') {
|
|
if (path === '/pages/publish/index') {
|
|
@@ -47,7 +70,13 @@ const handleTabbarItemClick = (path: string) => {
|
|
<slot />
|
|
<slot />
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <TabbarEvo :items="items" fixed safeAreaInsetBottom @click="handleTabbarItemClick" />
|
|
|
|
|
|
+ <TabbarEvo
|
|
|
|
+ :items="items"
|
|
|
|
+ fixed
|
|
|
|
+ safeAreaInsetBottom
|
|
|
|
+ :current-path="currRoute().path"
|
|
|
|
+ @click="handleTabbarItemClick"
|
|
|
|
+ />
|
|
<div
|
|
<div
|
|
v-if="publishState"
|
|
v-if="publishState"
|
|
class="bg-white/80 backdrop-blur-[100px] fixed top-0 left-0 right-0 bottom-0 z-1"
|
|
class="bg-white/80 backdrop-blur-[100px] fixed top-0 left-0 right-0 bottom-0 z-1"
|