Skip to content

Commit c539568

Browse files
committed
doc: update doc
1 parent 85702bb commit c539568

File tree

3 files changed

+47
-7
lines changed

3 files changed

+47
-7
lines changed

site/components/CarbonAds.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import axios from 'axios';
33
const carbonUrls = {
44
'www.antdv.com': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=antdvcom',
5-
'tangjinzhou.gitee.io':
6-
'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio',
7-
'ant-design-vue.gitee.io':
8-
'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio',
5+
// 'tangjinzhou.gitee.io':
6+
// '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio',
7+
// 'ant-design-vue.gitee.io':
8+
// '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio',
99
'vue.ant.design': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vueantdesign',
1010
};
1111
const carbonUrl =

site/components/layout.vue

+13-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const docsList = [
2828
];
2929
3030
let isMobile = false;
31+
const isGitee = window.location.host.indexOf('gitee.io') > -1;
3132
enquireScreen(b => {
3233
isMobile = b;
3334
});
@@ -74,6 +75,17 @@ export default {
7475
}
7576
},
7677
mounted() {
78+
if(isGitee) {
79+
this.$info({
80+
title: '提示',
81+
content: '访问国内镜像站点的用户请访问 antdv.com 站点',
82+
okText:'立即跳转',
83+
onOk() {
84+
location.href = 'https://www.antdv.com';
85+
},
86+
});
87+
}
88+
7789
this.$nextTick(() => {
7890
this.addSubMenu();
7991
const nprogressHiddenStyle = document.getElementById('nprogress-style');
@@ -263,7 +275,7 @@ export default {
263275
>
264276
<a-affix>
265277
<section class="main-menu-inner">
266-
<Sponsors title={isCN ? '赞助商' : 'Sponsors'} />
278+
<Sponsors isCN={isCN} />
267279
<a-menu
268280
class="aside-container menu-site"
269281
selectedKeys={[name]}

site/components/sponsors.vue

+30-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="snd-ad">
33
<div class="sponsorsWrap">
44
<span class="sponsorsTitle">
5-
{{ title }}
5+
{{ isCN ? '赞助商' : 'Sponsors' }}
66
</span>
77
<ul>
88
<li class="sponsorsItem">
@@ -27,19 +27,39 @@
2727
>
2828
<img
2929
height="66"
30+
width="34"
3031
src="https://qn.antdv.com/youkeda.jpeg"
3132
alt="bmatch"
3233
>
3334
</a>
3435
</li>
36+
<li class="sponsorsItem">
37+
<a-button
38+
type="primary"
39+
ghost
40+
style="font-size: 12px"
41+
@click="handleClick"
42+
>
43+
{{ isCN ? '成为赞助商':'Become a Sponsor' }}
44+
</a-button>
45+
</li>
3546
</ul>
3647
</div>
48+
<a-modal
49+
v-model="visible"
50+
title="成为赞助商"
51+
@ok="visible=false"
52+
>
53+
如果您有品牌推广、活动推广、招聘推广、社区合作等需求,欢迎联系我们,成为赞助商。<br>
54+
您的广告将出现在 And Design Vue 文档所有子页面及 GitHub Readme 等页面。<br>
55+
咨询邮箱:<a href="mailto:[email protected]">[email protected]</a><br>
56+
</a-modal>
3757
</div>
3858
</template>
3959
<script>
4060
import moment from 'moment';
4161
export default {
42-
props: ['title'],
62+
props: ['isCN'],
4363
data() {
4464
return {
4565
top: 50,
@@ -49,12 +69,20 @@ export default {
4969
end: '2019-06-11',
5070
},
5171
},
72+
visible: false,
5273
};
5374
},
5475
methods: {
5576
isEffective({start, end}){
5677
return moment().isBetween(start, end);
5778
},
79+
handleClick() {
80+
if(this.isCN) {
81+
this.visible = true;
82+
} else {
83+
window.open('https://opencollective.com/ant-design-vue#sponsor');
84+
}
85+
},
5886
},
5987
};
6088
</script>

0 commit comments

Comments
 (0)