Commit ffbdf8db authored by wlxuqu's avatar wlxuqu

修改以适应nvue

parent 81791a34
......@@ -4,19 +4,21 @@
<image class="logo" src="https://cdn.uviewui.com/uview/common/logo.png" mode="widthFix"></image>
<view class="nav-info">
<view class="nav-title__text">
{{$t('common.title')}}
<!-- {{$t('common.title')}} -->
{{title}}
</view>
<view class="nav-slogan">
{{$t('common.intro')}}
<!-- {{$t('common.intro')}} -->
{{desc}}
</view>
</view>
</view>
<view class="nav-desc">
{{desc}}
</view>
<view class="lang" @tap="switchLang">
<!-- <view class="lang" @tap="switchLang">
<u-icon size="46" color="warning" :name="lang"></u-icon>
</view>
</view> -->
</view>
</template>
......@@ -27,20 +29,20 @@
title: String,
},
computed: {
lang() {
return this.$i18n.locale == 'zh' ? 'zh' : 'en';
}
// lang() {
// return this.$i18n.locale == 'zh' ? 'zh' : 'en';
// }
},
methods: {
switchLang() {
this.$i18n.locale = this.$i18n.locale == 'en' ? 'zh' : 'en';
this.vuex_tabbar[0].text = this.$t('nav.components')
this.vuex_tabbar[1].text = this.$t('nav.js')
this.vuex_tabbar[2].text = this.$t('nav.template')
uni.setNavigationBarTitle({
title: this.$t(this.title)
});
}
// switchLang() {
// this.$i18n.locale = this.$i18n.locale == 'en' ? 'zh' : 'en';
// this.vuex_tabbar[0].text = this.$t('nav.components')
// this.vuex_tabbar[1].text = this.$t('nav.js')
// this.vuex_tabbar[2].text = this.$t('nav.template')
// uni.setNavigationBarTitle({
// title: this.$t(this.title)
// });
// }
}
}
</script>
......
......@@ -20,7 +20,7 @@
data() {
return {
list: list,
//desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用。',
}
},
computed: {
......@@ -29,29 +29,31 @@
return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
}
},
desc() {
return this.$t('components.desc');
}
// desc() {
// return this.$t('components.desc');
// }
},
onShow() {
uni.setNavigationBarTitle({
title: this.$t('nav.components')
});
// uni.setNavigationBarTitle({
// title: this.$t('nav.components')
// });
},
created() {
//console.log(this.abc);
},
methods: {
openPage(path) {
this.$u.route({
this.$u.route({
url: path
})
},
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) {
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 @@
@import "../../libs/css/style.components.scss";
.u-badge {
/* #ifndef APP-NVUE */
display: inline-flex;
/* #endif */
justify-content: center;
align-items: center;
line-height: 24rpx;
......@@ -207,7 +209,7 @@
// }
.u-info {
background: $u-type-info;
background-color: $u-type-info;
color: #fff;
}
</style>
\ No newline at end of file
......@@ -113,7 +113,7 @@ const $u = {
}
const install = Vue => {
Vue.mixin(mixin)
Vue.mixin(mixin)
if (Vue.prototype.openShare) {
Vue.mixin(mpShare);
}
......
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