ant-design-vue/site/components/sponsors.vue

62 lines
1.9 KiB
Vue
Raw Normal View History

2018-09-06 12:11:10 +00:00
<template>
2019-02-01 09:23:00 +00:00
<div class="snd-ad">
<div class="sponsorsWrap">
<span class="sponsorsTitle">
2019-08-25 12:58:10 +00:00
{{ isCN ? '赞助商' : 'Sponsors' }}
2019-02-01 09:23:00 +00:00
</span>
<ul>
<li class="sponsorsItem">
2019-09-28 12:45:07 +00:00
<a href="https://tipe.io/?ref=ant-design-vue" target="_blank">
<img height="51" src="https://cdn.tipe.io/tipe/tipe-cat-no-text.svg" alt="tipe" />
2019-02-01 09:23:00 +00:00
</a>
</li>
2019-09-28 12:45:07 +00:00
<li v-if="isEffective(effectiveTime.bmatch)" class="sponsorsItem">
<a href="https://www.youkeda.com?from=vue" target="_blank">
<img height="66" width="34" src="https://qn.antdv.com/youkeda.jpeg" alt="bmatch" />
2019-03-11 02:06:33 +00:00
</a>
</li>
2019-08-25 12:58:10 +00:00
<li class="sponsorsItem">
2019-09-28 12:45:07 +00:00
<a-button type="primary" ghost style="font-size: 12px" @click="handleClick">
{{ isCN ? '成为赞助商' : 'Become a Sponsor' }}
2019-08-25 12:58:10 +00:00
</a-button>
</li>
2019-02-01 09:23:00 +00:00
</ul>
</div>
2019-09-28 12:45:07 +00:00
<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 />
2019-08-25 12:58:10 +00:00
</a-modal>
2018-09-24 07:37:36 +00:00
</div>
2018-09-06 12:11:10 +00:00
</template>
<script>
2019-03-11 02:06:33 +00:00
import moment from 'moment';
2018-09-06 12:11:10 +00:00
export default {
2019-08-25 12:58:10 +00:00
props: ['isCN'],
2019-03-11 02:06:33 +00:00
data() {
return {
top: 50,
2019-09-28 12:45:07 +00:00
effectiveTime: {
2019-03-11 02:06:33 +00:00
bmatch: {
start: '2019-03-11',
end: '2019-06-11',
},
},
2019-08-25 12:58:10 +00:00
visible: false,
2019-03-11 02:06:33 +00:00
};
},
methods: {
2019-09-28 12:45:07 +00:00
isEffective({ start, end }) {
2019-03-11 02:06:33 +00:00
return moment().isBetween(start, end);
},
2019-08-25 12:58:10 +00:00
handleClick() {
2019-09-28 12:45:07 +00:00
if (this.isCN) {
2019-08-25 12:58:10 +00:00
this.visible = true;
} else {
window.open('https://opencollective.com/ant-design-vue#sponsor');
}
},
2019-03-11 02:06:33 +00:00
},
2019-01-12 03:33:27 +00:00
};
2018-09-06 12:11:10 +00:00
</script>