|
@@ -10,6 +10,7 @@ const props = defineProps({
|
|
selectedIconPath: string
|
|
selectedIconPath: string
|
|
path: string
|
|
path: string
|
|
hiddenTitle?: boolean
|
|
hiddenTitle?: boolean
|
|
|
|
+ main?: boolean
|
|
}[]
|
|
}[]
|
|
>,
|
|
>,
|
|
default: () => [],
|
|
default: () => [],
|
|
@@ -63,22 +64,27 @@ onMounted(async () => {
|
|
<div
|
|
<div
|
|
ref="tabbar"
|
|
ref="tabbar"
|
|
:class="[fixed ? 'fixed bottom-0 left-0 right-0' : '']"
|
|
:class="[fixed ? 'fixed bottom-0 left-0 right-0' : '']"
|
|
- class="m-3.5 h-[60px] bg-white/70 rounded-[60px] border border-white backdrop-blur-[25px] flex items-center justify-around"
|
|
|
|
|
|
+ class="h-[60px] bg-white border border-white backdrop-blur-[25px] flex items-center justify-around"
|
|
>
|
|
>
|
|
<template
|
|
<template
|
|
- v-for="({ iconPath, selectedIconPath, title, hiddenTitle, path }, i) in items"
|
|
|
|
|
|
+ v-for="({ iconPath, selectedIconPath, title, hiddenTitle, path, main }, i) in items"
|
|
:key="i"
|
|
:key="i"
|
|
>
|
|
>
|
|
- <div class="flex flex-col items-center justify-center" @click="handleClick(path)">
|
|
|
|
- <wd-img
|
|
|
|
- round
|
|
|
|
- :height="hiddenTitle ? 40 : 22"
|
|
|
|
- :width="hiddenTitle ? 40 : 22"
|
|
|
|
- :src="currentPath === path ? selectedIconPath : iconPath"
|
|
|
|
- ></wd-img>
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="relative flex flex-col items-center justify-center"
|
|
|
|
+ @click="handleClick(path)"
|
|
|
|
+ >
|
|
|
|
+ <div :class="[main ? 'absolute top--6' : '']">
|
|
|
|
+ <wd-img
|
|
|
|
+ :height="hiddenTitle || main ? 42 : 22"
|
|
|
|
+ :width="hiddenTitle || main ? 42 : 22"
|
|
|
|
+ :src="`/${currentPath}` === path ? selectedIconPath : iconPath"
|
|
|
|
+ ></wd-img>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="main" class="h-5.5"></div>
|
|
<span
|
|
<span
|
|
class="mt-1 text-center text-[10px] font-normal leading-none"
|
|
class="mt-1 text-center text-[10px] font-normal leading-none"
|
|
- :class="[currentPath === path ? 'text-black' : 'text-[#8c8c8c]']"
|
|
|
|
|
|
+ :class="[`/${currentPath}` === path ? 'text-[#2357e9]' : 'text-[#8c8c8c]']"
|
|
v-if="!hiddenTitle"
|
|
v-if="!hiddenTitle"
|
|
>
|
|
>
|
|
{{ title }}
|
|
{{ title }}
|