[update] 修改bug80925
This commit is contained in:
+9
-3
@@ -4,7 +4,7 @@
|
||||
<van-nav-bar
|
||||
v-if="hasNavBar"
|
||||
:class="{'white-style': isWhiteNavBar}"
|
||||
:title="pageTitle"
|
||||
:title="specialTitle || pageTitle"
|
||||
:left-text="hasBack ? $t('back') : ''"
|
||||
:left-arrow="hasBack"
|
||||
:right-text="isChinese ? $t('chinese') : $t('english')"
|
||||
@@ -12,7 +12,7 @@
|
||||
@click-right="handleChangeLang"
|
||||
/>
|
||||
<div class="scroll-box" :class="{'no-nav-bar': !hasNavBar}">
|
||||
<router-view />
|
||||
<router-view @titleChange="titleChange" />
|
||||
</div>
|
||||
</div>
|
||||
</a-locale-provider>
|
||||
@@ -33,7 +33,8 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
currentLang: ZH,
|
||||
local: zh_CN
|
||||
local: zh_CN,
|
||||
specialTitle: '' // 需要特别处理的标题
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -73,10 +74,15 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
pageTitle (val) {
|
||||
this.specialTitle = ''
|
||||
this.changeTitle(val)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
titleChange (value) {
|
||||
this.specialTitle = value
|
||||
this.changeTitle(value)
|
||||
},
|
||||
// 返回上一层
|
||||
handleBack () {
|
||||
this.$router.go(-1)
|
||||
|
||||
Reference in New Issue
Block a user