diff --git a/components/tabbar.uvue b/components/tabbar.uvue index 5170a28..013e70b 100644 --- a/components/tabbar.uvue +++ b/components/tabbar.uvue @@ -14,7 +14,7 @@ @tap="router.to(item.pagePath)" > @@ -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!) }} router.path()); + // tabbar 列表 const list = computed(() => { return (ctx.tabBar.list ?? []).map((e) => { diff --git a/cool/ctx/index.ts b/cool/ctx/index.ts index e158152..c11c135 100644 --- a/cool/ctx/index.ts +++ b/cool/ctx/index.ts @@ -19,6 +19,7 @@ export type TabBarItem = { }; export type TabBar = { + custom?: boolean; color?: string; selectedColor?: string; backgroundColor?: string;