docs: update ad doc
parent
93cf802b51
commit
05658b7165
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="markdown api-container">
|
<div class="markdown api-container">
|
||||||
<GoogleAds />
|
<GoogleAds v-if="showAd" />
|
||||||
<slot v-if="isZhCN" name="cn" />
|
<slot v-if="isZhCN" name="cn" />
|
||||||
<slot v-else />
|
<slot v-else />
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,6 +8,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { isZhCN } from '../util';
|
import { isZhCN } from '../util';
|
||||||
import GoogleAds from './GoogleAds';
|
import GoogleAds from './GoogleAds';
|
||||||
|
|
||||||
|
const showAd = location.host.indexOf('antdv.com') > -1;
|
||||||
export default {
|
export default {
|
||||||
name: 'Api',
|
name: 'Api',
|
||||||
components: {
|
components: {
|
||||||
|
@ -18,6 +20,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showAd,
|
||||||
isZhCN: isZhCN(this.demoContext.name),
|
isZhCN: isZhCN(this.demoContext.name),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -329,7 +329,7 @@ export default {
|
||||||
],
|
],
|
||||||
}}
|
}}
|
||||||
></router-view>
|
></router-view>
|
||||||
<GoogleAds key={`GoogleAds_${$route.path}`} />
|
{showAd ? <GoogleAds key={`GoogleAds_${$route.path}`} /> : null}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in New Issue