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 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 >
99import { isZhCN } from ' ../util' ;
1010import GoogleAds from ' ./GoogleAds' ;
11+
12+ const showAd = location .host .indexOf (' antdv.com' ) > - 1 ;
1113export 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 },
Original file line number Diff line number Diff 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 ' '
You can’t perform that action at this time.
0 commit comments