Skip to content

Commit 05658b7

Browse files
committed
docs: update ad doc
1 parent 93cf802 commit 05658b7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

site/components/api.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<template>
22
<div class="markdown api-container">
3-
<GoogleAds />
3+
<GoogleAds v-if="showAd" />
44
<slot v-if="isZhCN" name="cn" />
55
<slot v-else />
66
</div>
77
</template>
88
<script>
99
import { isZhCN } from '../util';
1010
import GoogleAds from './GoogleAds';
11+
12+
const showAd = location.host.indexOf('antdv.com') > -1;
1113
export default {
1214
name: 'Api',
1315
components: {
@@ -18,6 +20,7 @@ export default {
1820
},
1921
data() {
2022
return {
23+
showAd,
2124
isZhCN: isZhCN(this.demoContext.name),
2225
};
2326
},

site/components/layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export default {
329329
],
330330
}}
331331
></router-view>
332-
<GoogleAds key={`GoogleAds_${$route.path}`} />
332+
{showAd ? <GoogleAds key={`GoogleAds_${$route.path}`} /> : null}
333333
</div>
334334
) : (
335335
''

0 commit comments

Comments
 (0)