@liujitcn/kratos-taro-app-core 0.0.80 → 0.0.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "type": "git",
8
8
  "url": "git@github.com:liujitcn/kratos-admin.git"
9
9
  },
10
- "version": "0.0.80",
10
+ "version": "0.0.81",
11
11
  "type": "module",
12
12
  "files": [
13
13
  "dist",
@@ -1,7 +1,6 @@
1
1
  import { Image, Text, View } from '@tarojs/components'
2
2
  import { resolveModuleIcon, resolveStaticView } from '../module'
3
3
  import { APP_MENU_ROOT_ID, navigateAppRoute, useAppMenuBadges, useAppNavigation } from '../navigation'
4
- import { useI18n } from '../locales'
5
4
  import { useThemeStore } from '../stores'
6
5
  import { resolveRootMenuId } from '../navigation-tree.mjs'
7
6
  import './KratosTabBar.scss'
@@ -39,19 +38,8 @@ const tabIconSrc = (viewKey: string, active: boolean, theme: string): string =>
39
38
  export function KratosTabBar({ route }: KratosTabBarProps) {
40
39
  const menus = useAppNavigation((state) => state.menus)
41
40
  const tabBar = useAppNavigation((state) => state.tabBar)
42
- const { t } = useI18n()
43
41
  const themeStore = useThemeStore()
44
42
 
45
- /** 按稳定 viewKey 优先取界面语言标签,未配置的菜单回退后端标题。 */
46
- const tabBarTitleKeys: Record<string, string> = {
47
- HOME: 'core.navigation.home',
48
- APP_ANALYTIC: 'core.navigation.analytics',
49
- APP_REPORT: 'core.navigation.report',
50
- MESSAGE_INBOX: 'core.navigation.message',
51
- PROFILE_HOME: 'core.navigation.my',
52
- }
53
- const tabBarTitle = (item: { viewKey: string; title: string }): string =>
54
- (tabBarTitleKeys[item.viewKey] ? t(tabBarTitleKeys[item.viewKey]) : '') || item.title
55
43
  const messageBadge = useAppMenuBadges((state) => state.badges.MESSAGE_INBOX ?? 0)
56
44
  const routeMenu = menus.find((menu) => resolveStaticView(menu.viewKey) === route)
57
45
  const tabMenuId = routeMenu
@@ -85,7 +73,7 @@ export function KratosTabBar({ route }: KratosTabBarProps) {
85
73
  {item.viewKey === 'MESSAGE_INBOX' && messageBadge ? (
86
74
  <View className='kratos-tab-bar__badge' aria-hidden='true' />
87
75
  ) : null}
88
- <Text className={active ? 'kratos-tab-bar__text--active' : ''}>{tabBarTitle(item)}</Text>
76
+ <Text className={active ? 'kratos-tab-bar__text--active' : ''}>{item.title}</Text>
89
77
  </View>
90
78
  )
91
79
  })}