@@ -14,6 +14,8 @@ import { isZhCN } from '../util';
1414import { Provider , create } from ' ../../components/_util/store' ;
1515import NProgress from ' nprogress' ;
1616import MobileMenu from ' ../../components/vc-drawer/src' ;
17+ import GoogleAdsTop from ' ./GoogleAdsTop' ;
18+ import GoogleAds from ' ./GoogleAds' ;
1719
1820const docsList = [
1921 { key: ' introduce' , enTitle: ' Ant Design of Vue' , title: ' Ant Design of Vue' },
@@ -129,11 +131,9 @@ export default {
129131 const title = isCN ? cnTitle : usTitle;
130132 lis .push (< a- anchor- link key= {id} href= {` #${ id} ` } title= {title} / > );
131133 });
132- const showApi = this .$route .path .indexOf (' /components/' ) !== - 1 ;
133134 return (
134135 < a- anchor offsetTop= {100 } class = " demo-anchor" >
135136 {lis}
136- {showApi ? < a- anchor- link key= " API" title= " API" href= " #API" / > : ' ' }
137137 < / a- anchor>
138138 );
139139 },
@@ -240,7 +240,7 @@ export default {
240240 }
241241 const config = AllDemo[titleMap[reName]];
242242 this .resetDocumentTitle (config, reName, isCN);
243- const { isMobile } = this ;
243+ const { isMobile , $route } = this ;
244244 return (
245245 < div class = " page-wrapper" >
246246 < Header searchData= {searchData} name= {name} / >
@@ -294,10 +294,11 @@ export default {
294294 )}
295295 < a- col xxl= {20 } xl= {19 } lg= {19 } md= {18 } sm= {24 } xs= {24 }>
296296 < section class = " main-container main-container-component" >
297- < CarbonAds isMobile= {isMobile} / >
297+ < GoogleAdsTop key= {` GoogleAdsTop_${ $route .path } ` } / >
298+ {! isMobile ? < CarbonAds / > : null }
298299 < GeektimeAds isMobile= {isMobile} / >
299300 {! isMobile ? (
300- < div class = " toc-affix" style= " width: 150px;" >
301+ < div class = {[ ' toc-affix' , isCN ? ' toc-affix-cn ' : ' ' ]} style= " width: 150px;" >
301302 {this .getSubMenu (isCN)}
302303 < / div>
303304 ) : null }
@@ -330,6 +331,7 @@ export default {
330331 ],
331332 }}
332333 >< / router- view>
334+ < GoogleAds key= {` GoogleAds_${ $route .path } ` } / >
333335 < / div>
334336 ) : (
335337 ' '
0 commit comments