docs: update doc

pull/4597/head
tangjinzhou 2021-08-27 14:07:09 +08:00
parent 2b1b81b6ff
commit 7779c0469c
3 changed files with 39 additions and 28 deletions

View File

@ -0,0 +1,26 @@
<template>
<div>
<div ref="inner" class="wwads-cn wwads-horizontal" data-id="62" style="max-width: 350px" />
</div>
</template>
<script>
export default {
mounted() {
this.load();
},
methods: {
load() {
if (this.scriptDom) {
this.$el.removeChild(this.scriptDom);
}
this.$refs.inner.innerHTML = '';
const e = document.createElement('script');
e.src = 'https://wwads.cn/js/makemoney.js';
e.async = true;
this.$el.appendChild(e);
this.scriptDom = e;
},
},
};
</script>

View File

@ -17,7 +17,7 @@ export default {
return {
visibleAdblockBanner: !!this.demoContext.blocked,
value: null,
showTopBanner: !localStorage.getItem('notification-key-2.0'),
showTopBanner: !localStorage.getItem('notification-key-2.2'),
};
},
watch: {
@ -92,21 +92,11 @@ export default {
{isCN && this.showTopBanner && (
<div class="global-notification">
<span>
当前文档是 1.x 版本如需使用 Vue 3 请访问&nbsp;&nbsp;
<a href="https://2x.antdv.com/" target="_blank">
2.0 正式版
2.x
</a>
&nbsp;已发布更快更小更易用&nbsp;&nbsp;
</span>
<br />
<span style="padding: 5px 0; display: inline-block;">
支持 Vue 3.0全新 Composition API 文档TSJS 双示例
</span>
<br />
<span>
<a href="https://store.antdv.com/pro/" target="_blank">
Vue3 Admin Pro
</a>
&nbsp; 同步更新支持多种布局多标签页暗黑主题等
&nbsp;&nbsp;版本文档
</span>
<a-icon
type="close"
@ -118,21 +108,11 @@ export default {
{!isCN && this.showTopBanner && (
<div class="global-notification">
<span>
Youre browsing the documentation for v1.x (support vue 2).&nbsp;
<a href="https://2x.antdv.com/" target="_blank">
2.0 release
Click here
</a>
&nbsp; Faster, Smaller, Easier&nbsp;&nbsp;
</span>
<br />
<span style="padding: 5px 0; display: inline-block;">
Support Vue 3New Composition API document TS, JS dual examples
</span>
<br />
<span>
<a href="https://store.antdv.com/pro/?lang=en" target="_blank">
Vue3 Admin Pro
</a>
&nbsp; is updated synchronously, supports multiple layouts, dark themes, etc.
&nbsp;for v2.xsupport vue 3 documentation.
</span>
<a-icon
type="close"

View File

@ -10,7 +10,10 @@
</a-carousel>
</template>
<template v-else-if="showGoogleAd">
<GoogleAdsTop :key="`GoogleAdsTop_${$route.path}`" />
<template v-if="isCN">
<WWAds :key="`WWAds_${$route.path}`" />
</template>
<GoogleAdsTop v-else :key="`GoogleAdsTop_${$route.path}`" />
</template>
</div>
</template>
@ -18,12 +21,14 @@
<script>
import moment from 'moment';
import GoogleAdsTop from './GoogleAdsTop';
import WWAds from './WWAds.vue';
const isEffective = (start, end) => {
return moment().isBetween(start, end);
};
export default {
components: {
GoogleAdsTop,
WWAds,
},
props: ['isCN', 'isMobile'],
data() {