This commit is contained in:
icssoa
2025-07-22 14:55:22 +08:00
parent 37e7a9cb6c
commit 76002da89f
2 changed files with 5 additions and 6 deletions

View File

@@ -14,7 +14,7 @@
@tap="router.to(item.pagePath)"
>
<cl-image
:src="router.path() == item.pagePath ? item.icon2 : item.icon"
:src="path == item.pagePath ? item.icon2 : item.icon"
:height="56"
:width="56"
></cl-image>
@@ -24,11 +24,7 @@
:pt="{
className: parseClass([
'!text-xs mt-1',
[
router.path() == item.pagePath,
'!text-primary-500',
'!text-surface-400'
]
[path == item.pagePath, '!text-primary-500', '!text-surface-400']
])
}"
>{{ t(item.text!) }}</cl-text
@@ -50,6 +46,8 @@ type Item = {
text: string | null;
};
const path = computed(() => router.path());
// tabbar 列表
const list = computed<Item[]>(() => {
return (ctx.tabBar.list ?? []).map((e) => {

View File

@@ -19,6 +19,7 @@ export type TabBarItem = {
};
export type TabBar = {
custom?: boolean;
color?: string;
selectedColor?: string;
backgroundColor?: string;