Commit ffbdf8db authored by wlxuqu's avatar wlxuqu

修改以适应nvue

parent 81791a34
...@@ -4,19 +4,21 @@ ...@@ -4,19 +4,21 @@
<image class="logo" src="https://cdn.uviewui.com/uview/common/logo.png" mode="widthFix"></image> <image class="logo" src="https://cdn.uviewui.com/uview/common/logo.png" mode="widthFix"></image>
<view class="nav-info"> <view class="nav-info">
<view class="nav-title__text"> <view class="nav-title__text">
{{$t('common.title')}} <!-- {{$t('common.title')}} -->
{{title}}
</view> </view>
<view class="nav-slogan"> <view class="nav-slogan">
{{$t('common.intro')}} <!-- {{$t('common.intro')}} -->
{{desc}}
</view> </view>
</view> </view>
</view> </view>
<view class="nav-desc"> <view class="nav-desc">
{{desc}} {{desc}}
</view> </view>
<view class="lang" @tap="switchLang"> <!-- <view class="lang" @tap="switchLang">
<u-icon size="46" color="warning" :name="lang"></u-icon> <u-icon size="46" color="warning" :name="lang"></u-icon>
</view> </view> -->
</view> </view>
</template> </template>
...@@ -27,20 +29,20 @@ ...@@ -27,20 +29,20 @@
title: String, title: String,
}, },
computed: { computed: {
lang() { // lang() {
return this.$i18n.locale == 'zh' ? 'zh' : 'en'; // return this.$i18n.locale == 'zh' ? 'zh' : 'en';
} // }
}, },
methods: { methods: {
switchLang() { // switchLang() {
this.$i18n.locale = this.$i18n.locale == 'en' ? 'zh' : 'en'; // this.$i18n.locale = this.$i18n.locale == 'en' ? 'zh' : 'en';
this.vuex_tabbar[0].text = this.$t('nav.components') // this.vuex_tabbar[0].text = this.$t('nav.components')
this.vuex_tabbar[1].text = this.$t('nav.js') // this.vuex_tabbar[1].text = this.$t('nav.js')
this.vuex_tabbar[2].text = this.$t('nav.template') // this.vuex_tabbar[2].text = this.$t('nav.template')
uni.setNavigationBarTitle({ // uni.setNavigationBarTitle({
title: this.$t(this.title) // title: this.$t(this.title)
}); // });
} // }
} }
} }
</script> </script>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
data() { data() {
return { return {
list: list, list: list,
//desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。', desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
} }
}, },
computed: { computed: {
...@@ -29,17 +29,17 @@ ...@@ -29,17 +29,17 @@
return 'https://cdn.uviewui.com/uview/example/' + path + '.png'; return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
} }
}, },
desc() { // desc() {
return this.$t('components.desc'); // return this.$t('components.desc');
} // }
}, },
onShow() { onShow() {
uni.setNavigationBarTitle({ // uni.setNavigationBarTitle({
title: this.$t('nav.components') // title: this.$t('nav.components')
}); // });
}, },
created() { created() {
//console.log(this.abc);
}, },
methods: { methods: {
openPage(path) { openPage(path) {
...@@ -48,10 +48,12 @@ ...@@ -48,10 +48,12 @@
}) })
}, },
getGroupTitle(item) { getGroupTitle(item) {
return this.$i18n.locale == 'zh' ? item.groupName : item.groupName_en // return this.$i18n.locale == 'zh' ? item.groupName : item.groupName_en
return item.groupName;
}, },
getFieldTitle(item) { getFieldTitle(item) {
return this.$i18n.locale == 'zh' ? item.title : item.title_en // return this.$i18n.locale == 'zh' ? item.title : item.title_en
return item.title;
} }
} }
} }
......
...@@ -141,7 +141,9 @@ ...@@ -141,7 +141,9 @@
@import "../../libs/css/style.components.scss"; @import "../../libs/css/style.components.scss";
.u-badge { .u-badge {
/* #ifndef APP-NVUE */
display: inline-flex; display: inline-flex;
/* #endif */
justify-content: center; justify-content: center;
align-items: center; align-items: center;
line-height: 24rpx; line-height: 24rpx;
...@@ -207,7 +209,7 @@ ...@@ -207,7 +209,7 @@
// } // }
.u-info { .u-info {
background: $u-type-info; background-color: $u-type-info;
color: #fff; color: #fff;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment