docs: update ad doc

pull/1845/head
tangjinzhou 2020-02-26 19:57:31 +08:00
parent 93cf802b51
commit 05658b7165
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<template>
<div class="markdown api-container">
<GoogleAds />
<GoogleAds v-if="showAd" />
<slot v-if="isZhCN" name="cn" />
<slot v-else />
</div>
@ -8,6 +8,8 @@
<script>
import { isZhCN } from '../util';
import GoogleAds from './GoogleAds';
const showAd = location.host.indexOf('antdv.com') > -1;
export default {
name: 'Api',
components: {
@ -18,6 +20,7 @@ export default {
},
data() {
return {
showAd,
isZhCN: isZhCN(this.demoContext.name),
};
},

View File

@ -329,7 +329,7 @@ export default {
],
}}
></router-view>
<GoogleAds key={`GoogleAds_${$route.path}`} />
{showAd ? <GoogleAds key={`GoogleAds_${$route.path}`} /> : null}
</div>
) : (
''