Commit b3b2c07e authored by 童皓's avatar 童皓

update:添加版本显示

parent 32a45507
......@@ -4,7 +4,7 @@
<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')}}
<text class="nav-info__title__text">uView {{version}}</text>
</view>
<view class="nav-slogan">
{{$t('common.intro')}}
......@@ -21,7 +21,7 @@
</template>
<script>
export default {
export default {
props: {
desc: String,
title: String,
......@@ -31,6 +31,11 @@
return this.$i18n.locale == 'zh' ? 'zh' : 'en';
}
},
data() {
return {
version: uni.$u.config.v
}
},
methods: {
switchLang() {
this.$i18n.locale = this.$i18n.locale == 'en' ? 'zh' : 'en';
......@@ -42,57 +47,57 @@
});
}
}
}
}
</script>
<style lang="scss" scoped>
.nav-wrap {
.nav-wrap {
padding: 15px;
position: relative;
}
}
.lang {
.lang {
position: absolute;
top: 15px;
right: 15px;
}
}
.nav-title {
.nav-title {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
}
}
.nav-info {
.nav-info {
margin-left: 15px;
}
}
.nav-title__text {
.nav-title__text {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
color: $u-main-color;
font-size: 25px;
font-weight: bold;
}
}
.logo {
.logo {
width: 70px;
/* #ifndef APP-NVUE */
height: auto;
/* #endif */
}
}
.nav-slogan {
.nav-slogan {
color: $u-tips-color;
font-size: 14px;
}
}
.nav-desc {
.nav-desc {
margin-top: 10px;
font-size: 14px;
color: $u-content-color;
}
}
</style>
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