Merge pull request #20791 from iamkun/feat/v3-banner

chore: update header banner
pull/20797/head
好多大米 2021-02-23 14:56:55 +08:00 committed by GitHub
commit 6c9af477a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 1 deletions

View File

@ -3,6 +3,21 @@
height: 80px; height: 80px;
} }
#v3-banner {
background-color: #409EFF;
min-height: 30px;
padding: 5px 60px;
z-index: 19;
box-sizing: border-box;
text-align: center;
color: #eee;
}
#v3-banner a {
color: #FFF;
font-weight: bold;
}
.header { .header {
height: 80px; height: 80px;
background-color: #fff; background-color: #fff;
@ -267,6 +282,16 @@
</style> </style>
<template> <template>
<div class="headerWrapper"> <div class="headerWrapper">
<div id="v3-banner" v-if="isHome">
<template v-if="lang === 'zh-CN'">
您正在浏览基于 Vue 2.x Element UI 文档;
<a href="https://element-plus.org/#/zh-CN">点击这里</a> 查看 Vue 3.x 的升级版本
</template>
<template v-else>
Youre browsing the documentation of Element UI for Vue 2.x version.
<a href="https://element-plus.org">Click here</a> for Vue 3.x version
</template>
</div>
<header class="header" ref="header"> <header class="header" ref="header">
<div class="container"> <div class="container">
<h1><router-link :to="`/${ lang }`"> <h1><router-link :to="`/${ lang }`">
@ -422,6 +447,9 @@
}, },
isComponentPage() { isComponentPage() {
return /^component/.test(this.$route.name); return /^component/.test(this.$route.name);
},
isHome() {
return /^home/.test(this.$route.name);
} }
}, },
mounted() { mounted() {

View File

@ -3,7 +3,7 @@
text-align: center; text-align: center;
} }
.banner-desc { .banner-desc {
padding-top: 20px; padding-top: 50px;
h1 { h1 {
font-size: <%= titleSize >px; font-size: <%= titleSize >px;