1. 调整header路由跳转卡死问题
2. 封装完成公用的bannertop组件
This commit is contained in:
parent
21b5f87d63
commit
479a6afcf4
@ -49,3 +49,12 @@ body{
|
|||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-enter-active,
|
||||||
|
.page-leave-active {
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
|
.page-enter,
|
||||||
|
.page-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
BIN
assets/image/banner/aboutus-banner.png
Normal file
BIN
assets/image/banner/aboutus-banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 145 KiB |
89
components/banner-top.vue
Normal file
89
components/banner-top.vue
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
<template>
|
||||||
|
<section class="header" :style="{background: `url(${options.img}) no-repeat`}">
|
||||||
|
<h2 class="mb-0 mb-md-3">{{ options.title }}</h2>
|
||||||
|
<h4>{{ options.subTitle }}</h4>
|
||||||
|
<div class="crumbs d-none d-md-block">
|
||||||
|
<ul class="container d-flex align-items-center">
|
||||||
|
<li>
|
||||||
|
<nuxt-link to="/">{{ $t('menu.Home') }}</nuxt-link>
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{{ options.title }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'BannerTop',
|
||||||
|
props: {
|
||||||
|
options: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
subTitle: '',
|
||||||
|
img: undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.header {
|
||||||
|
height: 15rem;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #ffffff;
|
||||||
|
background-size: 100% 100% !important;
|
||||||
|
overflow: hidden;
|
||||||
|
h2 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-family: 'SourceHanSansCN-Heavy';
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
font-size: .875rem;
|
||||||
|
}
|
||||||
|
.crumbs {
|
||||||
|
width: 100%;
|
||||||
|
height: 2.125rem;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(255,255,255,0.52);
|
||||||
|
ul {
|
||||||
|
line-height: 2.125rem;
|
||||||
|
a, li {
|
||||||
|
color: #3a3a3a;
|
||||||
|
font-size: .875rem;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
margin-right: .3125rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 特殊样式小屏幕处理
|
||||||
|
@media screen and (max-width:400px) {
|
||||||
|
.header {
|
||||||
|
height: 5.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
@ -9,14 +9,14 @@
|
|||||||
|
|
||||||
<b-collapse id="nav-collapse" is-nav>
|
<b-collapse id="nav-collapse" is-nav>
|
||||||
<b-navbar-nav class="ml-md-5 text-center">
|
<b-navbar-nav class="ml-md-5 text-center">
|
||||||
<b-nav-item
|
<nuxt-link
|
||||||
class="nav-link-item d-flex align-items-center"
|
class="nav-link-item d-flex align-items-center"
|
||||||
href="/"
|
:to="item.href"
|
||||||
v-for="item in menuList"
|
v-for="(item,index) in menuList"
|
||||||
:key="item"
|
:key="index"
|
||||||
>
|
>
|
||||||
{{ item }}
|
{{ item.name }}
|
||||||
</b-nav-item>
|
</nuxt-link>
|
||||||
|
|
||||||
<b-nav-item-dropdown class="nav-link-item d-flex align-items-center" text="demo" right>
|
<b-nav-item-dropdown class="nav-link-item d-flex align-items-center" text="demo" right>
|
||||||
<b-dropdown-item href="#">Account</b-dropdown-item>
|
<b-dropdown-item href="#">Account</b-dropdown-item>
|
||||||
@ -45,7 +45,15 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
searchVal: '',
|
searchVal: '',
|
||||||
menuList: ['Home','About Us','Products','News','Exhibition','Contact Us','Feedback']
|
menuList: [
|
||||||
|
{ name: this.$t('menu.Home'), href: '/' },
|
||||||
|
{ name: this.$t('menu.AboutUs'), href: '/abou-us' },
|
||||||
|
{ name: this.$t('menu.Products'), href: '/' },
|
||||||
|
{ name: this.$t('menu.News'), href: '/' },
|
||||||
|
{ name: this.$t('menu.Exhibition'), href: '/' },
|
||||||
|
{ name: this.$t('menu.ContactUs'), href: '/' },
|
||||||
|
{ name: this.$t('menu.Feedback'), href: '/' },
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,15 @@
|
|||||||
"send": "SEND",
|
"send": "SEND",
|
||||||
"enterEail": "Enter your email here"
|
"enterEail": "Enter your email here"
|
||||||
},
|
},
|
||||||
|
"menu": {
|
||||||
|
"Home": "Home",
|
||||||
|
"AboutUs": "AboutUs",
|
||||||
|
"Products": "Products",
|
||||||
|
"News": "News",
|
||||||
|
"Exhibition": "Exhibition",
|
||||||
|
"ContactUs": "ContactUs",
|
||||||
|
"Feedback": "Feedback"
|
||||||
|
},
|
||||||
"index": {
|
"index": {
|
||||||
"companyProfile": "COMPANY PROFILE",
|
"companyProfile": "COMPANY PROFILE",
|
||||||
"corporateName": "SINOTRUCK HOWO SALES CO.,LTD.",
|
"corporateName": "SINOTRUCK HOWO SALES CO.,LTD.",
|
||||||
@ -32,6 +41,11 @@
|
|||||||
"joinOurNewsletter": "JOIN OUR NEWSLETTER",
|
"joinOurNewsletter": "JOIN OUR NEWSLETTER",
|
||||||
"signUpOurNewsletter": "Sign up our newsletter and get more events & promotions!"
|
"signUpOurNewsletter": "Sign up our newsletter and get more events & promotions!"
|
||||||
},
|
},
|
||||||
|
"aboutUs": {
|
||||||
|
"AboutUs": "About Us",
|
||||||
|
"company": "Sinotruck Howo Sales Co.,Ltd",
|
||||||
|
"address": "Room 2403, No.1 Yinzuo Jingdu Mansion, Shunhe East Street No.66, District Shizhong, Jinan city, shandong province, China"
|
||||||
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
"contactUs": "Contact us"
|
"contactUs": "Contact us"
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,15 @@
|
|||||||
"send": "发送",
|
"send": "发送",
|
||||||
"enterEail": "在此处输入您的电子邮件"
|
"enterEail": "在此处输入您的电子邮件"
|
||||||
},
|
},
|
||||||
|
"menu": {
|
||||||
|
"Home": "首页",
|
||||||
|
"AboutUs": "关于我们",
|
||||||
|
"Products": "产品",
|
||||||
|
"News": "新闻",
|
||||||
|
"Exhibition": "展览",
|
||||||
|
"ContactUs": "联系我们",
|
||||||
|
"Feedback": "反馈"
|
||||||
|
},
|
||||||
"index": {
|
"index": {
|
||||||
"companyProfile": "公司简介",
|
"companyProfile": "公司简介",
|
||||||
"corporateName": "中国重汽豪沃销售有限公司",
|
"corporateName": "中国重汽豪沃销售有限公司",
|
||||||
@ -32,6 +41,11 @@
|
|||||||
"joinOurNewsletter": "加入我们的实时通讯",
|
"joinOurNewsletter": "加入我们的实时通讯",
|
||||||
"signUpOurNewsletter": "注册我们的实时通讯,获取更多活动和促销!"
|
"signUpOurNewsletter": "注册我们的实时通讯,获取更多活动和促销!"
|
||||||
},
|
},
|
||||||
|
"aboutUs": {
|
||||||
|
"AboutUs": "关于我们",
|
||||||
|
"company": "中车豪沃销售有限公司",
|
||||||
|
"address": "中国山东省济南市市中区顺河东街66号银座京都大厦1号2403室"
|
||||||
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
"contactUs": "联系我们"
|
"contactUs": "联系我们"
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,10 @@ const webpack = require('webpack')
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
buildDir: 'nuxt-dist',
|
buildDir: 'nuxt-dist',
|
||||||
|
transition: {
|
||||||
|
name: 'page',
|
||||||
|
mode: 'out-in'
|
||||||
|
},
|
||||||
/*
|
/*
|
||||||
** Headers of the page
|
** Headers of the page
|
||||||
*/
|
*/
|
||||||
@ -35,7 +39,7 @@ export default {
|
|||||||
/*
|
/*
|
||||||
** Customize the progress-bar color
|
** Customize the progress-bar color
|
||||||
*/
|
*/
|
||||||
loading: { color: '#073B8C' },
|
loading: { color: '#015fe8' },
|
||||||
/*
|
/*
|
||||||
** Global CSS
|
** Global CSS
|
||||||
*/
|
*/
|
||||||
|
30
pages/abou-us.vue
Normal file
30
pages/abou-us.vue
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 个人中心 -->
|
||||||
|
<div class="content">
|
||||||
|
<BannerTop :options="bannerTopOptions"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'abou-us',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
bannerTopOptions: {
|
||||||
|
title: this.$t('aboutUs.AboutUs'),
|
||||||
|
subTitle: this.$t('aboutUs.company'),
|
||||||
|
img: require('../assets/image/banner/aboutus-banner.png')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
@ -1,3 +1,5 @@
|
|||||||
// import 'babel-polyfill'
|
import Vue from 'vue';
|
||||||
|
import bannerTop from '@/components/banner-top.vue';
|
||||||
|
|
||||||
|
Vue.component('BannerTop', bannerTop);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user