@liujitcn/kratos-uni-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
|
@@ -2,25 +2,13 @@
|
|
|
2
2
|
import { computed, onMounted } from 'vue'
|
|
3
3
|
import { resolveModuleIcon, resolveStaticView } from '../module'
|
|
4
4
|
import { APP_MENU_ROOT_ID, useAppMenuBadge, useAppNavigation } from '../navigation'
|
|
5
|
-
import { useI18n } from '../locales'
|
|
6
5
|
import { useThemeStore } from '../stores'
|
|
7
6
|
import { resolveRootMenuId } from '../navigation-tree.mjs'
|
|
8
7
|
|
|
9
8
|
const props = defineProps<{ route: string }>()
|
|
10
9
|
const { menus, tabBar, navigate } = useAppNavigation()
|
|
11
|
-
const { t } = useI18n()
|
|
12
10
|
const themeStore = useThemeStore()
|
|
13
11
|
|
|
14
|
-
/** 按稳定 viewKey 优先取界面语言标签,未配置的菜单回退后端标题。 */
|
|
15
|
-
const tabBarTitleKeys: Record<string, string> = {
|
|
16
|
-
HOME: 'core.navigation.home',
|
|
17
|
-
APP_ANALYTIC: 'core.navigation.analytics',
|
|
18
|
-
APP_REPORT: 'core.navigation.report',
|
|
19
|
-
MESSAGE_INBOX: 'core.navigation.message',
|
|
20
|
-
PROFILE_HOME: 'core.navigation.my',
|
|
21
|
-
}
|
|
22
|
-
const tabBarTitle = (item: { viewKey: string; title: string }): string =>
|
|
23
|
-
(tabBarTitleKeys[item.viewKey] ? t(tabBarTitleKeys[item.viewKey]) : '') || item.title
|
|
24
12
|
/** 设计稿导航坞线稿图标(viewKey → SVG path)。 */
|
|
25
13
|
const TAB_ICON_PATHS: Record<string, string> = {
|
|
26
14
|
HOME: 'M3 11 12 3l9 8M5 10v10h14V10',
|
|
@@ -98,7 +86,7 @@ onMounted(() => {
|
|
|
98
86
|
aria-hidden="true"
|
|
99
87
|
/>
|
|
100
88
|
<text :class="{ 'kratos-tab-bar__text--active': activeMenu?.id === item.id }">
|
|
101
|
-
{{
|
|
89
|
+
{{ item.title }}
|
|
102
90
|
</text>
|
|
103
91
|
</view>
|
|
104
92
|
</view>
|