docs: add ICP license (#12893)

This commit is contained in:
neverland 2024-05-28 21:51:19 +08:00 committed by GitHub
parent c56337e7f3
commit 1cd6050a3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 0 deletions

View File

@ -11,6 +11,11 @@
:dark-mode-class="darkModeClass" :dark-mode-class="darkModeClass"
> >
<router-view /> <router-view />
<div class="van-doc-icp" v-if="icpLicense">
<a :href="icpLicense.link" target="_black">
{{ icpLicense.text }}
</a>
</div>
</van-doc> </van-doc>
</div> </div>
</template> </template>
@ -64,6 +69,13 @@ export default {
return config.site; return config.site;
}, },
icpLicense() {
if (this.lang === 'zh-CN') {
return config.site.icpLicense;
}
return null;
},
versions() { versions() {
return config.site.versions || null; return config.site.versions || null;
}, },
@ -144,4 +156,13 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
} }
.van-doc-icp {
font-size: 14px;
text-align: center;
a {
color: #bbb;
}
}
</style> </style>

View File

@ -33,6 +33,10 @@ export default {
baiduAnalytics: { baiduAnalytics: {
seed: 'af5d41bc4e446e76665dbe3ec18d55c3', seed: 'af5d41bc4e446e76665dbe3ec18d55c3',
}, },
icpLicense: {
text: '浙ICP备2021036118号',
link: 'https://beian.miit.gov.cn/',
},
headHtml: `<script> headHtml: `<script>
if (location.host === 'youzan.github.io') { if (location.host === 'youzan.github.io') {
location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io'); location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');