feat: add tabs demo

This commit is contained in:
vben
2024-07-20 09:36:10 +08:00
parent 1fbf69e6eb
commit 30d4057216
10 changed files with 48 additions and 40 deletions

View File

@@ -55,9 +55,16 @@ export function useTabbar() {
const { locale } = useI18n();
const currentTabs = ref<RouteLocationNormalizedGeneric[]>();
watch([() => coreTabbarStore.getTabs, () => locale.value], ([tabs, _]) => {
currentTabs.value = tabs.map((item) => wrapperTabLocale(item));
});
watch(
[
() => coreTabbarStore.getTabs,
() => coreTabbarStore.updateTime,
() => locale.value,
],
([tabs]) => {
currentTabs.value = tabs.map((item) => wrapperTabLocale(item));
},
);
/**
* 初始化固定标签页