File tree Expand file tree Collapse file tree 5 files changed +34
-32
lines changed
uview-ui/components/u-avatar-cropper Expand file tree Collapse file tree 5 files changed +34
-32
lines changed Original file line number Diff line number Diff line change 4
4
<image class =" logo" src =" https://cdn.uviewui.com/uview/common/logo.png" mode =" widthFix" ></image >
5
5
<view class =" nav-info" >
6
6
<view class =" nav-title__text" >
7
- <!-- {{$t('common.title')}} -->
8
- {{title}}
7
+ {{$t('common.title')}}
9
8
</view >
10
9
<view class =" nav-slogan" >
11
- <!-- {{$t('common.intro')}} -->
12
- {{desc}}
10
+ {{$t('common.intro')}}
13
11
</view >
14
12
</view >
15
13
</view >
16
14
<view class =" nav-desc" >
17
15
{{desc}}
18
16
</view >
19
- <!-- < view class="lang" @tap="switchLang">
17
+ <view class =" lang" @tap =" switchLang" >
20
18
<u-icon size =" 46" color =" warning" :name =" lang" ></u-icon >
21
- </view> -->
19
+ </view >
22
20
</view >
23
21
</template >
24
22
29
27
title: String ,
30
28
},
31
29
computed: {
32
- // lang() {
33
- // return this.$i18n.locale == 'zh' ? 'zh' : 'en';
34
- // }
30
+ lang () {
31
+ return this .$i18n .locale == ' zh' ? ' zh' : ' en' ;
32
+ }
35
33
},
36
34
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
+ }
46
44
}
47
45
}
48
46
</script >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import Chinese from '@/common/locales/zh.js';
29
29
import English from '@/common/locales/en.js' ;
30
30
31
31
// VueI18n
32
- import VueI18n from 'vue-i18n'
32
+ import VueI18n from '@/common/ vue-i18n.min.js '
33
33
34
34
// VueI18n
35
35
Vue . use ( VueI18n )
Original file line number Diff line number Diff line change 20
20
data () {
21
21
return {
22
22
list: list,
23
- desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
23
+ // desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
24
24
}
25
25
},
26
26
computed: {
29
29
return ' https://cdn.uviewui.com/uview/example/' + path + ' .png' ;
30
30
}
31
31
},
32
- // desc() {
33
- // return this.$t('components.desc');
34
- // }
32
+ desc () {
33
+ return this .$t (' components.desc' );
34
+ }
35
35
},
36
36
onShow () {
37
- // uni.setNavigationBarTitle({
38
- // title: this.$t('nav.components')
39
- // });
37
+ uni .setNavigationBarTitle ({
38
+ title: this .$t (' nav.components' )
39
+ });
40
40
},
41
41
created () {
42
- //console.log(this.abc);
42
+
43
43
},
44
44
methods: {
45
45
openPage (path ) {
48
48
})
49
49
},
50
50
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
53
52
},
54
53
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
57
55
}
58
56
}
59
57
}
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ export default {
229
229
};
230
230
</script >
231
231
232
- <style scoped>
232
+ <style scoped lang="scss" >
233
233
@import ' ../../libs/css/style.components.scss' ;
234
234
235
235
.content {
You can’t perform that action at this time.
0 commit comments