国际化

This commit is contained in:
John
2024-03-09 18:27:20 +08:00
parent 041dda021a
commit 44e109ae4b
6 changed files with 300 additions and 221 deletions

View File

@@ -6,7 +6,8 @@
<van-tabbar route v-model="active" active-color="#F9BF3A">
<van-tabbar-item v-for="tabBar in tabBarList" :key="tabBar.name" :replace="tabBar.replace" :to="tabBar.to">
<span>{{ $t(tabBar.text) }}</span>
<!-- <van-text-ellipsis :content="$t(tabBar.text)" />-->
<div style="white-space: nowrap;overflow: hidden;text-align: center">{{ $t(tabBar.text) }}</div>
<template #icon="props">
<van-icon :color="props.active ? '' : 'rgb(229, 229, 229)'" :name="props.active ? tabBar.active : tabBar.inactive" />
</template>
@@ -61,6 +62,9 @@ const active = ref(0)
</script>
<style scoped>
<style lang="scss" scoped>
:deep('.van-tabbar-item__text') {
text-align: center !important;
}
</style>