Commit e4ee598a authored by xhx's avatar xhx

调整

parent 68240c63
...@@ -97,7 +97,8 @@ export default Vue.extend({ ...@@ -97,7 +97,8 @@ export default Vue.extend({
}) })
}, },
watch: { watch: {
$route() { $route(n) {
if (n.path !== '/home') return
const _t = this.swiper1 as any const _t = this.swiper1 as any
_t.destroy() _t.destroy()
this.$nextTick(() => { this.$nextTick(() => {
......
...@@ -103,7 +103,8 @@ export default Vue.extend({ ...@@ -103,7 +103,8 @@ export default Vue.extend({
this.swiper2 = {} this.swiper2 = {}
}, },
watch: { watch: {
$route(){ $route(n){
if (n.path !== '/home') return
const _t = this.swiper2 as any const _t = this.swiper2 as any
_t.destroy() _t.destroy()
this.$nextTick(() => { this.$nextTick(() => {
......
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
</div> </div>
<ul class="menulist"> <ul class="menulist">
<li class="px-6 text-base text-title-color" :class="{'menu-active': $route.path === '/home'}" @click="goPage('/')">{{ $t('lang.home') }}</li> <li class="px-6 text-base text-title-color" :class="{'menu-active': $route.path === '/home'}" @click="goPage('/')">{{ $t('lang.home') }}</li>
<li class="px-6 text-base text-title-color"><a href="http://yuanorg.oss-ap-southeast-1.aliyuncs.com/yuan_introduction.pdf" target="_blank">{{ $t('lang.book') }}</a></li> <li class="px-6 text-base text-title-color">
<a
:href="iconType === 'zh-CN' ? 'http://yuanorg.oss-ap-southeast-1.aliyuncs.com/yuan_introduction.pdf' : 'http://yuanorg.oss-ap-southeast-1.aliyuncs.com/yuan_introduction.pdf'"
target="_blank">{{ $t('lang.book') }}</a>
</li>
<li class="px-6 text-base text-title-color" :class="{'menu-active': $route.path === '/newsList' || $route.path === '/newsDetails'}" @click="goPage('/newsList')">{{ $t('lang.news') }}</li> <li class="px-6 text-base text-title-color" :class="{'menu-active': $route.path === '/newsList' || $route.path === '/newsDetails'}" @click="goPage('/newsList')">{{ $t('lang.news') }}</li>
</ul> </ul>
</Drawer> </Drawer>
...@@ -26,7 +30,11 @@ export default Vue.extend({ ...@@ -26,7 +30,11 @@ export default Vue.extend({
Drawer Drawer
}, },
props: { props: {
isShow: Boolean isShow: Boolean,
iconType: {
type: String,
default: 'zh-CN'
}
}, },
methods: { methods: {
onClose() { onClose() {
......
...@@ -5,7 +5,11 @@ ...@@ -5,7 +5,11 @@
<img src="@/assets/images/header/logo.png" alt="logo" width="164"> <img src="@/assets/images/header/logo.png" alt="logo" width="164">
<ul class="header_menu flex leading-normal text-sm ml-16"> <ul class="header_menu flex leading-normal text-sm ml-16">
<router-link :to="{path: '/home', query: {lang: $route.query.lang}}" tag="li" :class="{'active': $route.path === '/home'}" class="pl-5 pr-5">{{ $t('lang.home') }}</router-link> <router-link :to="{path: '/home', query: {lang: $route.query.lang}}" tag="li" :class="{'active': $route.path === '/home'}" class="pl-5 pr-5">{{ $t('lang.home') }}</router-link>
<li class="pl-5 pr-5"><a href="http://yuanorg.oss-ap-southeast-1.aliyuncs.com/yuan_introduction.pdf" target="_blank">{{ $t('lang.book') }}</a></li> <li class="pl-5 pr-5">
<a
:href="iconType === 'zh-CN' ? 'http://yuanorg.oss-ap-southeast-1.aliyuncs.com/yuan_introduction.pdf' : 'http://yuanorg.oss-ap-southeast-1.aliyuncs.com/yuan_introduction.pdf'"
target="_blank">{{ $t('lang.book') }}</a>
</li>
<router-link :to="{path: '/newsList', query: {lang: $route.query.lang}}" :class="{'active': $route.path === '/newsList' || $route.path === '/newsDetails'}" tag="li" class="pl-5 pr-5">{{ $t('lang.news') }}</router-link> <router-link :to="{path: '/newsList', query: {lang: $route.query.lang}}" :class="{'active': $route.path === '/newsList' || $route.path === '/newsDetails'}" tag="li" class="pl-5 pr-5">{{ $t('lang.news') }}</router-link>
</ul> </ul>
</div> </div>
...@@ -48,7 +52,7 @@ ...@@ -48,7 +52,7 @@
</div> </div>
</div> </div>
<Menu :isShow="showMenu" v-on:close="closeMenu"></Menu> <Menu :isShow="showMenu" v-on:close="closeMenu" :iconType="iconType"></Menu>
</div> </div>
</template> </template>
......
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