File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" markdown api-container" >
3
- <GoogleAds />
3
+ <GoogleAds v-if = " showAd " />
4
4
<slot v-if =" isZhCN" name =" cn" />
5
5
<slot v-else />
6
6
</div >
7
7
</template >
8
8
<script >
9
9
import { isZhCN } from ' ../util' ;
10
10
import GoogleAds from ' ./GoogleAds' ;
11
+
12
+ const showAd = location .host .indexOf (' antdv.com' ) > - 1 ;
11
13
export default {
12
14
name: ' Api' ,
13
15
components: {
@@ -18,6 +20,7 @@ export default {
18
20
},
19
21
data () {
20
22
return {
23
+ showAd,
21
24
isZhCN: isZhCN (this .demoContext .name ),
22
25
};
23
26
},
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ export default {
329
329
],
330
330
}}
331
331
>< / router- view>
332
- < GoogleAds key= {` GoogleAds_${ $route .path } ` } / >
332
+ {showAd ? < GoogleAds key= {` GoogleAds_${ $route .path } ` } / > : null }
333
333
< / div>
334
334
) : (
335
335
' '
You can’t perform that action at this time.
0 commit comments