| 1234567891011121314151617 |
- import messages from '@/locale/index'
- function $t(title){
- let locale = uni.getLocale()
- let mes = messages[locale];
- let common = mes.common;
- if(!common){
- return title;
- }
- if(common[title]){
- return common[title]
- }else{
- return title;
- }
- }
- export default $t;
|