add localization for tab-bar
This commit is contained in:
@@ -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',
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user