add localization for tab-bar

This commit is contained in:
Dawn_Ocean
2024-03-07 14:21:55 +08:00
parent 6cbd6685bc
commit d995c6ed43
3 changed files with 29 additions and 7 deletions
+7 -6
View File
@@ -3,19 +3,20 @@ import { AtTabBar } from 'taro-ui';
import Taro from '@tarojs/taro';
import 'taro-ui/dist/style/index.scss';
import './index.scss';
import pt from '@/plain-text';
const navList: Array<Taro.TabBarItem> = [
{
pagePath: '/pages/index/index',
text: '主页',
text: pt.get().tabBar.indexText,
},
{
pagePath: '/pages/repair/repair',
text: '维修',
text: pt.get().tabBar.repairText,
},
{
pagePath: '/pages/user/user',
text: '我的',
text: pt.get().tabBar.userText,
},
];
@@ -24,15 +25,15 @@ export default class Index extends Component {
selected: 0,
tabList: [
{
title: '主页',
title: pt.get().tabBar.indexText,
iconType: 'home',
},
{
title: '维修',
title: pt.get().tabBar.repairText,
iconType: 'settings',
},
{
title: '我的',
title: pt.get().tabBar.userText,
iconType: 'user',
},
],