File tree Expand file tree Collapse file tree
uview-ui/components/u-avatar-cropper Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 <image class =" logo" src =" https://cdn.uviewui.com/uview/common/logo.png" mode =" widthFix" ></image >
55 <view class =" nav-info" >
66 <view class =" nav-title__text" >
7- <!-- {{$t('common.title')}} -->
8- {{title}}
7+ {{$t('common.title')}}
98 </view >
109 <view class =" nav-slogan" >
11- <!-- {{$t('common.intro')}} -->
12- {{desc}}
10+ {{$t('common.intro')}}
1311 </view >
1412 </view >
1513 </view >
1614 <view class =" nav-desc" >
1715 {{desc}}
1816 </view >
19- <!-- < view class="lang" @tap="switchLang">
17+ <view class =" lang" @tap =" switchLang" >
2018 <u-icon size =" 46" color =" warning" :name =" lang" ></u-icon >
21- </view> -->
19+ </view >
2220 </view >
2321</template >
2422
2927 title: String ,
3028 },
3129 computed: {
32- // lang() {
33- // return this.$i18n.locale == 'zh' ? 'zh' : 'en';
34- // }
30+ lang () {
31+ return this .$i18n .locale == ' zh' ? ' zh' : ' en' ;
32+ }
3533 },
3634 methods: {
37- // switchLang() {
38- // this.$i18n.locale = this.$i18n.locale == 'en' ? 'zh' : 'en';
39- // this.vuex_tabbar[0].text = this.$t('nav.components')
40- // this.vuex_tabbar[1].text = this.$t('nav.js')
41- // this.vuex_tabbar[2].text = this.$t('nav.template')
42- // uni.setNavigationBarTitle({
43- // title: this.$t(this.title)
44- // });
45- // }
35+ switchLang () {
36+ this .$i18n .locale = this .$i18n .locale == ' en' ? ' zh' : ' en' ;
37+ this .vuex_tabbar [0 ].text = this .$t (' nav.components' )
38+ this .vuex_tabbar [1 ].text = this .$t (' nav.js' )
39+ this .vuex_tabbar [2 ].text = this .$t (' nav.template' )
40+ uni .setNavigationBarTitle ({
41+ title: this .$t (this .title )
42+ });
43+ }
4644 }
4745 }
4846 </script >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import Chinese from '@/common/locales/zh.js';
2929import English from '@/common/locales/en.js' ;
3030
3131// VueI18n
32- import VueI18n from 'vue-i18n'
32+ import VueI18n from '@/common/ vue-i18n.min.js '
3333
3434// VueI18n
3535Vue . use ( VueI18n )
Original file line number Diff line number Diff line change 2020 data () {
2121 return {
2222 list: list,
23- desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
23+ // desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
2424 }
2525 },
2626 computed: {
2929 return ' https://cdn.uviewui.com/uview/example/' + path + ' .png' ;
3030 }
3131 },
32- // desc() {
33- // return this.$t('components.desc');
34- // }
32+ desc () {
33+ return this .$t (' components.desc' );
34+ }
3535 },
3636 onShow () {
37- // uni.setNavigationBarTitle({
38- // title: this.$t('nav.components')
39- // });
37+ uni .setNavigationBarTitle ({
38+ title: this .$t (' nav.components' )
39+ });
4040 },
4141 created () {
42- //console.log(this.abc);
42+
4343 },
4444 methods: {
4545 openPage (path ) {
4848 })
4949 },
5050 getGroupTitle (item ) {
51- // return this.$i18n.locale == 'zh' ? item.groupName : item.groupName_en
52- return item.groupName;
51+ return this .$i18n .locale == ' zh' ? item .groupName : item .groupName_en
5352 },
5453 getFieldTitle (item ) {
55- // return this.$i18n.locale == 'zh' ? item.title : item.title_en
56- return item.title;
54+ return this .$i18n .locale == ' zh' ? item .title : item .title_en
5755 }
5856 }
5957 }
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ export default {
229229};
230230 </script >
231231
232- <style scoped>
232+ <style scoped lang="scss" >
233233@import ' ../../libs/css/style.components.scss' ;
234234
235235.content {
You can’t perform that action at this time.
0 commit comments