doc: update doc

pull/1143/head
tangjinzhou 2019-08-25 20:58:10 +08:00
parent 85702bb98f
commit c539568b76
3 changed files with 47 additions and 7 deletions

View File

@ -2,10 +2,10 @@
import axios from 'axios'; import axios from 'axios';
const carbonUrls = { const carbonUrls = {
'www.antdv.com': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=antdvcom', 'www.antdv.com': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=antdvcom',
'tangjinzhou.gitee.io': // 'tangjinzhou.gitee.io':
'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio', // '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio',
'ant-design-vue.gitee.io': // 'ant-design-vue.gitee.io':
'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio', // '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio',
'vue.ant.design': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vueantdesign', 'vue.ant.design': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vueantdesign',
}; };
const carbonUrl = const carbonUrl =

View File

@ -28,6 +28,7 @@ const docsList = [
]; ];
let isMobile = false; let isMobile = false;
const isGitee = window.location.host.indexOf('gitee.io') > -1;
enquireScreen(b => { enquireScreen(b => {
isMobile = b; isMobile = b;
}); });
@ -74,6 +75,17 @@ export default {
} }
}, },
mounted() { mounted() {
if(isGitee) {
this.$info({
title: '提示',
content: '访问国内镜像站点的用户请访问 antdv.com 站点',
okText:'立即跳转',
onOk() {
location.href = 'https://www.antdv.com';
},
});
}
this.$nextTick(() => { this.$nextTick(() => {
this.addSubMenu(); this.addSubMenu();
const nprogressHiddenStyle = document.getElementById('nprogress-style'); const nprogressHiddenStyle = document.getElementById('nprogress-style');
@ -263,7 +275,7 @@ export default {
> >
<a-affix> <a-affix>
<section class="main-menu-inner"> <section class="main-menu-inner">
<Sponsors title={isCN ? '赞助商' : 'Sponsors'} /> <Sponsors isCN={isCN} />
<a-menu <a-menu
class="aside-container menu-site" class="aside-container menu-site"
selectedKeys={[name]} selectedKeys={[name]}

View File

@ -2,7 +2,7 @@
<div class="snd-ad"> <div class="snd-ad">
<div class="sponsorsWrap"> <div class="sponsorsWrap">
<span class="sponsorsTitle"> <span class="sponsorsTitle">
{{ title }} {{ isCN ? '赞助商' : 'Sponsors' }}
</span> </span>
<ul> <ul>
<li class="sponsorsItem"> <li class="sponsorsItem">
@ -27,19 +27,39 @@
> >
<img <img
height="66" height="66"
width="34"
src="https://qn.antdv.com/youkeda.jpeg" src="https://qn.antdv.com/youkeda.jpeg"
alt="bmatch" alt="bmatch"
> >
</a> </a>
</li> </li>
<li class="sponsorsItem">
<a-button
type="primary"
ghost
style="font-size: 12px"
@click="handleClick"
>
{{ isCN ? '成为赞助商':'Become a Sponsor' }}
</a-button>
</li>
</ul> </ul>
</div> </div>
<a-modal
v-model="visible"
title="成为赞助商"
@ok="visible=false"
>
如果您有品牌推广活动推广招聘推广社区合作等需求欢迎联系我们成为赞助商<br>
您的广告将出现在 And Design Vue 文档所有子页面及 GitHub Readme 等页面<br>
咨询邮箱<a href="mailto:antdv@foxmail.com">antdv@foxmail.com</a><br>
</a-modal>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment'; import moment from 'moment';
export default { export default {
props: ['title'], props: ['isCN'],
data() { data() {
return { return {
top: 50, top: 50,
@ -49,12 +69,20 @@ export default {
end: '2019-06-11', end: '2019-06-11',
}, },
}, },
visible: false,
}; };
}, },
methods: { methods: {
isEffective({start, end}){ isEffective({start, end}){
return moment().isBetween(start, end); return moment().isBetween(start, end);
}, },
handleClick() {
if(this.isCN) {
this.visible = true;
} else {
window.open('https://opencollective.com/ant-design-vue#sponsor');
}
},
}, },
}; };
</script> </script>